The lisp-chat Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The lisp-chat Reference Manual

This is the lisp-chat Reference Manual, version 0.1, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 08:54:55 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

Quicklisp dist

Lisp Chat

An experimental chat irc-like written in Lisp.

lisp-chat-screenshot

Installation

You'll need in your system:

Make sure that ~/.sbclrc has a entry calling to the Quicklisp setup.

(load "~/.quicklisp/setup.lisp")

Since that ~/.quicklisp is the Quicklisp instalation distribution, clone this repository with:

git clone https://www.github.com/ryukinix/lisp-chat.git ~/.quicklisp/local-projects/lisp-chat

Tip for Quicklisp

As I said, we'll need a proper instalation of Quicklisp to getting this running. To accomplish that, if you are not familiar with the CL ecossystem, I'll guide you in a simple way: clone the Quicklisp Client and execute the setup.lisp with sbcl --script setup.lisp.

In general Quicklisp distribution provide the folder ~/quicklisp instead of ~/.quicklisp, but I personally don't like it much. Make sure to synchronize with the quicklisp correct folder. Maybe will need change the .sblcrc file to accomplish that, since for default as I said quicklisp set ~/quicklisp folder.

Usage

Load the server

$ ./lisp-chat-server

Get a client

$ ./lisp-chat

You can easilly setup your own configuration of *port* and *domain* for running a new instance of the server and client. For now we have a instance of lisp-chat as example running. If you really want to runs locally, you can just change the *domain* variable to "localhost" as:

(require 'lisp-chat)
(setq lisp-chat-config:*domain* "localhost")

For Non-lispers

If you want test this and don't have the Lisp environment with SBCL and Quicklisp, I have two alternative choices for you:

On Python client, I wrote in a way only using ths stdlib avoiding pain to handle the dependency hell, so you can just call that:

$ python client.py

So finally... netcat. Yes! You can even just use netcat! An user called Chris in past days just logged in the server with the following message:

|16:30:37| [Chris]: Used netcad
|16:30:41| [Chris]: netcat*
|16:30:50| [Chris]: bye

So you can type netcat chat.lerax.me 5558 and go on! I tested on my machine and works fine! The main reason is because the communication between server and client just use raw data. For better synchronization with text data from server while you typing, I suggest you to use a readline wrapper like rlwrap calling as rlwrap netcat ryukinix.tk 5558.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 lisp-chat

Author

Manoel Vilela

Contact

manoel_vilela@engineer.com

License

MIT

Description

An experimental chat irc-like

Version

0.1

Dependencies
Source

lisp-chat.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 lisp-chat.asd

Location

lisp-chat.asd

Systems

lisp-chat (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 lisp-chat/config.lisp

Parent

lisp-chat (system)

Location

config.lisp

Packages

lisp-chat-config

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 lisp-chat/client.lisp

Dependency

config.lisp (file)

Parent

lisp-chat (system)

Location

client.lisp

Packages

lisp-chat-client

Exported Definitions

main (function)

Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

3.1.4 lisp-chat/server.lisp

Dependency

config.lisp (file)

Parent

lisp-chat (system)

Location

server.lisp

Packages

lisp-chat-server

Exported Definitions

main (function)

Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 lisp-chat-config

Source

config.lisp (file)

Use List

common-lisp

Used By List
Exported Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

4.2 lisp-chat-client

Source

client.lisp (file)

Use List
Exported Definitions

main (function)

Internal Definitions

Previous: , Up: Packages   [Contents][Index]

4.3 lisp-chat-server

Source

server.lisp (file)

Use List
Exported Definitions

main (function)

Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Special variables

Special Variable: *debug*
Package

lisp-chat-config

Source

config.lisp (file)

Special Variable: *host*
Package

lisp-chat-config

Source

config.lisp (file)

Special Variable: *port*
Package

lisp-chat-config

Source

config.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: main ()
Package

lisp-chat-client

Source

client.lisp (file)

Function: main &optional RETRY
Package

lisp-chat-server

Source

server.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: *client-mutex*
Package

lisp-chat-server

Source

server.lisp (file)

Special Variable: *clients*
Package

lisp-chat-server

Source

server.lisp (file)

Special Variable: *commands-names*
Package

lisp-chat-server

Source

server.lisp (file)

Special Variable: *day-names*
Package

lisp-chat-server

Source

server.lisp (file)

Special Variable: *io-mutex*
Package

lisp-chat-client

Source

client.lisp (file)

Special Variable: *message-semaphore*
Package

lisp-chat-server

Source

server.lisp (file)

Special Variable: *messages-log*
Package

lisp-chat-server

Source

server.lisp (file)

Special Variable: *messages-stack*
Package

lisp-chat-server

Source

server.lisp (file)

Special Variable: *uptime*
Package

lisp-chat-server

Source

server.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Functions

Function: /help ()
Package

lisp-chat-server

Source

server.lisp (file)

Function: /log &optional DEPTH
Package

lisp-chat-server

Source

server.lisp (file)

Function: /uptime ()
Package

lisp-chat-server

Source

server.lisp (file)

Function: /users ()
Package

lisp-chat-server

Source

server.lisp (file)

Function: call-command-by-name STRING
Package

lisp-chat-server

Source

server.lisp (file)

Function: client-address INSTANCE
Function: (setf client-address) VALUE INSTANCE
Package

lisp-chat-server

Source

server.lisp (file)

Function: client-delete CLIENT
Package

lisp-chat-server

Source

server.lisp (file)

Function: client-loop ()
Package

lisp-chat-client

Source

client.lisp (file)

Function: client-name INSTANCE
Function: (setf client-name) VALUE INSTANCE
Package

lisp-chat-server

Source

server.lisp (file)

Function: client-p OBJECT
Package

lisp-chat-server

Source

server.lisp (file)

Function: client-reader CLIENT
Package

lisp-chat-server

Source

server.lisp (file)

Function: client-reader-routine CLIENT
Package

lisp-chat-server

Source

server.lisp (file)

Function: client-sender SOCKET USERNAME
Package

lisp-chat-client

Source

client.lisp (file)

Function: client-socket INSTANCE
Function: (setf client-socket) VALUE INSTANCE
Package

lisp-chat-server

Source

server.lisp (file)

Function: client-stream C
Package

lisp-chat-server

Source

server.lisp (file)

Function: command-message CONTENT
Package

lisp-chat-server

Source

server.lisp (file)

Function: connection-handler SOCKET-SERVER
Package

lisp-chat-server

Source

server.lisp (file)

Function: copy-client INSTANCE
Package

lisp-chat-server

Source

server.lisp (file)

Function: copy-message INSTANCE
Package

lisp-chat-server

Source

server.lisp (file)

Function: create-client CONNECTION
Package

lisp-chat-server

Source

server.lisp (file)

Function: debug-format &rest ARGS
Package

lisp-chat-server

Source

server.lisp (file)

Function: erase-last-line ()
Package

lisp-chat-client

Source

client.lisp (file)

Function: formated-message MESSAGE
Package

lisp-chat-server

Source

server.lisp (file)

Function: get-time ()
Package

lisp-chat-server

Source

server.lisp (file)

Function: get-user-input USERNAME
Package

lisp-chat-client

Source

client.lisp (file)

Function: login SOCKET
Package

lisp-chat-client

Source

client.lisp (file)

Function: make-client &key (NAME NAME) (SOCKET SOCKET) (ADDRESS ADDRESS)
Package

lisp-chat-server

Source

server.lisp (file)

Function: make-message &key (FROM FROM) (CONTENT CONTENT) (TIME TIME)
Package

lisp-chat-server

Source

server.lisp (file)

Function: message-broadcast ()
Package

lisp-chat-server

Source

server.lisp (file)

Function: message-content INSTANCE
Function: (setf message-content) VALUE INSTANCE
Package

lisp-chat-server

Source

server.lisp (file)

Function: message-from INSTANCE
Function: (setf message-from) VALUE INSTANCE
Package

lisp-chat-server

Source

server.lisp (file)

Function: message-p OBJECT
Package

lisp-chat-server

Source

server.lisp (file)

Function: message-time INSTANCE
Function: (setf message-time) VALUE INSTANCE
Package

lisp-chat-server

Source

server.lisp (file)

Function: push-message FROM CONTENT
Package

lisp-chat-server

Source

server.lisp (file)

Function: receive-message MESSAGE
Package

lisp-chat-client

Source

client.lisp (file)

Function: safe-client-thread CONNECTION
Package

lisp-chat-server

Source

server.lisp (file)

Function: send-message MESSAGE SOCKET
Package

lisp-chat-client

Source

client.lisp (file)

Function: send-message CLIENT MESSAGE
Package

lisp-chat-server

Source

server.lisp (file)

Function: server-broadcast SOCKET
Package

lisp-chat-client

Source

client.lisp (file)

Function: server-listener SOCKET
Package

lisp-chat-client

Source

client.lisp (file)

Function: server-loop SOCKET-SERVER
Package

lisp-chat-server

Source

server.lisp (file)

Function: socket-peer-address SOCKET
Package

lisp-chat-server

Source

server.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Structures

Structure: client ()
Package

lisp-chat-server

Source

server.lisp (file)

Direct superclasses

structure-object (structure)

Direct slots
Slot: name
Readers

client-name (function)

Writers

(setf client-name) (function)

Slot: socket
Readers

client-socket (function)

Writers

(setf client-socket) (function)

Slot: address
Readers

client-address (function)

Writers

(setf client-address) (function)

Structure: message ()
Package

lisp-chat-server

Source

server.lisp (file)

Direct superclasses

structure-object (structure)

Direct slots
Slot: from
Readers

message-from (function)

Writers

(setf message-from) (function)

Slot: content
Readers

message-content (function)

Writers

(setf message-content) (function)

Slot: time
Readers

message-time (function)

Writers

(setf message-time) (function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L  
Index Entry  Section

F
File, Lisp, lisp-chat.asd: The lisp-chat<dot>asd file
File, Lisp, lisp-chat/client.lisp: The lisp-chat/client<dot>lisp file
File, Lisp, lisp-chat/config.lisp: The lisp-chat/config<dot>lisp file
File, Lisp, lisp-chat/server.lisp: The lisp-chat/server<dot>lisp file

L
Lisp File, lisp-chat.asd: The lisp-chat<dot>asd file
Lisp File, lisp-chat/client.lisp: The lisp-chat/client<dot>lisp file
Lisp File, lisp-chat/config.lisp: The lisp-chat/config<dot>lisp file
Lisp File, lisp-chat/server.lisp: The lisp-chat/server<dot>lisp file
lisp-chat.asd: The lisp-chat<dot>asd file
lisp-chat/client.lisp: The lisp-chat/client<dot>lisp file
lisp-chat/config.lisp: The lisp-chat/config<dot>lisp file
lisp-chat/server.lisp: The lisp-chat/server<dot>lisp file

Jump to:   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (   /  
C   D   E   F   G   L   M   P   R   S  
Index Entry  Section

(
(setf client-address): Internal functions
(setf client-name): Internal functions
(setf client-socket): Internal functions
(setf message-content): Internal functions
(setf message-from): Internal functions
(setf message-time): Internal functions

/
/help: Internal functions
/log: Internal functions
/uptime: Internal functions
/users: Internal functions

C
call-command-by-name: Internal functions
client-address: Internal functions
client-delete: Internal functions
client-loop: Internal functions
client-name: Internal functions
client-p: Internal functions
client-reader: Internal functions
client-reader-routine: Internal functions
client-sender: Internal functions
client-socket: Internal functions
client-stream: Internal functions
command-message: Internal functions
connection-handler: Internal functions
copy-client: Internal functions
copy-message: Internal functions
create-client: Internal functions

D
debug-format: Internal functions

E
erase-last-line: Internal functions

F
formated-message: Internal functions
Function, (setf client-address): Internal functions
Function, (setf client-name): Internal functions
Function, (setf client-socket): Internal functions
Function, (setf message-content): Internal functions
Function, (setf message-from): Internal functions
Function, (setf message-time): Internal functions
Function, /help: Internal functions
Function, /log: Internal functions
Function, /uptime: Internal functions
Function, /users: Internal functions
Function, call-command-by-name: Internal functions
Function, client-address: Internal functions
Function, client-delete: Internal functions
Function, client-loop: Internal functions
Function, client-name: Internal functions
Function, client-p: Internal functions
Function, client-reader: Internal functions
Function, client-reader-routine: Internal functions
Function, client-sender: Internal functions
Function, client-socket: Internal functions
Function, client-stream: Internal functions
Function, command-message: Internal functions
Function, connection-handler: Internal functions
Function, copy-client: Internal functions
Function, copy-message: Internal functions
Function, create-client: Internal functions
Function, debug-format: Internal functions
Function, erase-last-line: Internal functions
Function, formated-message: Internal functions
Function, get-time: Internal functions
Function, get-user-input: Internal functions
Function, login: Internal functions
Function, main: Exported functions
Function, main: Exported functions
Function, make-client: Internal functions
Function, make-message: Internal functions
Function, message-broadcast: Internal functions
Function, message-content: Internal functions
Function, message-from: Internal functions
Function, message-p: Internal functions
Function, message-time: Internal functions
Function, push-message: Internal functions
Function, receive-message: Internal functions
Function, safe-client-thread: Internal functions
Function, send-message: Internal functions
Function, send-message: Internal functions
Function, server-broadcast: Internal functions
Function, server-listener: Internal functions
Function, server-loop: Internal functions
Function, socket-peer-address: Internal functions

G
get-time: Internal functions
get-user-input: Internal functions

L
login: Internal functions

M
main: Exported functions
main: Exported functions
make-client: Internal functions
make-message: Internal functions
message-broadcast: Internal functions
message-content: Internal functions
message-from: Internal functions
message-p: Internal functions
message-time: Internal functions

P
push-message: Internal functions

R
receive-message: Internal functions

S
safe-client-thread: Internal functions
send-message: Internal functions
send-message: Internal functions
server-broadcast: Internal functions
server-listener: Internal functions
server-loop: Internal functions
socket-peer-address: Internal functions

Jump to:   (   /  
C   D   E   F   G   L   M   P   R   S  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
A   C   F   N   S   T  
Index Entry  Section

*
*client-mutex*: Internal special variables
*clients*: Internal special variables
*commands-names*: Internal special variables
*day-names*: Internal special variables
*debug*: Exported special variables
*host*: Exported special variables
*io-mutex*: Internal special variables
*message-semaphore*: Internal special variables
*messages-log*: Internal special variables
*messages-stack*: Internal special variables
*port*: Exported special variables
*uptime*: Internal special variables

A
address: Internal structures

C
content: Internal structures

F
from: Internal structures

N
name: Internal structures

S
Slot, address: Internal structures
Slot, content: Internal structures
Slot, from: Internal structures
Slot, name: Internal structures
Slot, socket: Internal structures
Slot, time: Internal structures
socket: Internal structures
Special Variable, *client-mutex*: Internal special variables
Special Variable, *clients*: Internal special variables
Special Variable, *commands-names*: Internal special variables
Special Variable, *day-names*: Internal special variables
Special Variable, *debug*: Exported special variables
Special Variable, *host*: Exported special variables
Special Variable, *io-mutex*: Internal special variables
Special Variable, *message-semaphore*: Internal special variables
Special Variable, *messages-log*: Internal special variables
Special Variable, *messages-stack*: Internal special variables
Special Variable, *port*: Exported special variables
Special Variable, *uptime*: Internal special variables

T
time: Internal structures

Jump to:   *  
A   C   F   N   S   T  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   L   M   P   S  
Index Entry  Section

C
client: Internal structures

L
lisp-chat: The lisp-chat system
lisp-chat-client: The lisp-chat-client package
lisp-chat-config: The lisp-chat-config package
lisp-chat-server: The lisp-chat-server package

M
message: Internal structures

P
Package, lisp-chat-client: The lisp-chat-client package
Package, lisp-chat-config: The lisp-chat-config package
Package, lisp-chat-server: The lisp-chat-server package

S
Structure, client: Internal structures
Structure, message: Internal structures
System, lisp-chat: The lisp-chat system

Jump to:   C   L   M   P   S