freenode/lisp - IRC Chatlog
Search
9:17:08
|3b|
ah, most of the time seems to be quicklisp reading its list of systems to see if it knows about them :/
10:28:57
beach
In a few minutes I need to leave to go pick up drmeister and his family at the airport. I'll deal with it later. Thanks.
10:39:06
jackdaniel
brand new is exaggeration, sicl is brand new in a sense of being build from scratch
10:41:01
pjb
Branding is usually rather instantaneous. Building sicl, some parts get old before others are even designed :-)
11:21:43
makomo
shka_: that's probably not his intention though, but i'm still leaving the possibility
11:26:47
makomo
paule32: take a look at all of the format directives and find what you need http://www.lispworks.com/documentation/lw445/CLHS/Body/22_c.htm
12:03:33
no-defun-allowed
You could hypothetically have no gc, the standard says nothing about requiring one.
12:12:35
pjb
no-defun-allowed: Movitz doesn't have a GC (on purpose, since it's a kernel implementation implementation).
12:21:07
pjb
no-defun-allowed: If only we could make a few clones of ourselves, to take Movitz and fly with it!
12:33:22
phoe
...damn, I just realized that I'm facing a problem that could easily be solved using continuations - if I only could save the stack somewhere and somehow
13:23:56
phoe
shka_: implement a reader for a Lisp-like protocol, except the reader may be interrupted at any point (for example, by NIL returned from READ-CHAR-NO-HANG) and it should be possible for it to remember what it read so far and restart reading when input is available again
13:30:57
phoe
in the worst case, I'll just remember the part of the string that was read so far, save it somewhere, and then start reading again from a concatenated stream
13:31:53
phoe
if we read "(1 2" then we save that string somewhere, so later we may read "3 4 5)" which will give us the resulting (1 23 4 5)
13:33:22
phoe
let's assume that we're reading from a network socket - when a character is read from that socket's stream, it won't be read again from it
13:38:05
pjb
But for a character by character repeatition, it'd be harder, because in your example, the prefix would already be parsed…
13:39:13
phoe
Yep, my issue is that I need to be able to return control any time READ-CHAR-NO-HANG returns NIL, meaning, there's no character available for reading.
13:39:33
phoe
And then I need to be able to rewind the stack and continue reading from the exact same position and state.
13:45:44
shrdlu68
shka_: I tried a tree thing: https://gist.github.com/shrdlu68/117d02da6390d9ff8d45dd719412f17e
14:17:22
asarch
I'm planning to write a web interface for an IRC client written in Common Lisp so I could check all the messages from any PC connected in the LAN
14:18:24
oni-on-ion
asarch: sounds cool. i had a very pleasant time setting up cl-irc for a similar purpose the other day.
14:26:34
phoe
How can I create an output stream that forever blocks? I need it for testing purposes.
14:27:09
phoe
In other words, I want to create a modified string output stream that, for example, outputs "a b" and then hangs indefinitely (READ-CHAR-NO-HANG returns NIL on it).
14:29:18
phoe
sure, but the in-memory flexistream will AFAIK behave the same way a string output stream behaves
14:30:10
shrdlu68
shka_: Interestingly, converting to a vector instead of a class improves performance 2x.
14:30:49
shrdlu68
Actually that might have to do with the fact that each child node is only created when needed.
14:32:21
shka_
if i was you, i would try to introduce bitmask into my tree node and use this to compress vector
14:46:11
dlowe
I'm pretty sure that means you've set the socket to non-blocking mode before connecting
14:54:44
flip214
phoe: you can use a CONCATENATED-STREAM and have first a STRING-OUTPUT-STREAM and then some pipe or socket
14:54:54
Posterdati
mmmh I placed iolib/sockets:socket-error in the thread, but fallen in to the debugger...
15:03:00
_death
it's unlikely that you actually want something that "hangs indefinitely".. you can use gray streams to define a stream that makes sense
15:04:48
Posterdati
people! I founf the problem, I used remote-host and remote-port on the error handler-case on the dead socket :), now I removed them and it worked!
15:04:54
flip214
phoe: if you would be so kind as to create a github project with a stream that outputs _only_ what gets written to it? a "pipe stream"?
17:49:28
phoe
...or rather, wait, it does have two versions - a gray streams one and a non-gray-streams one
19:54:20
paule32
illegal terminating character after a colon: #\; Line: 514, Column: 1, File-Position: 21863
19:56:25
pjb
paule32: nope. [1]> (load "/tmp/a.lisp") ;; Loading file /tmp/a.lisp ... *** - READ: input stream #<INPUT BUFFERED FILE-STREAM CHARACTER #P"/tmp/a.lisp" @516> ends within an object. Last opening parenthesis probably in line 413.
20:01:46
pjb
paule32: but you can be smart: (with-open-file (source #P"/tmp/a.lisp") (loop for sexp := (read source nil source) :until (eq sexp source) :do (print sexp)))
20:48:29
paule32
it is an advanture programming with lisp, if you have much code - that means, if you have forget a open or closed parenthese, you fail
20:51:37
djeis[m]
paule32: it is difficult at first, but if you learn some paren management packages it’ll become a lot easier.
20:52:23
aeth
if I want to move the (* 3 4) in (+ 1 2 (* 3 4)) I don't want to have to do anything other than move the ( before the *
20:52:29
adlai
managing them by hand builds character, and eventually you lose patience with unbased chars
20:54:20
no-defun-allowed
On the blackboards he was checking himself. He only missed one in lecture 2b.
20:55:09
aeth
The problem with parentheses is that the level they're at often changes, especially if you e.g. refactor (+ 1 2 (* 3 4)) into (let ((a 0) (b 1) (c 2) (d 4)) (+ a b (* c d)))