freenode/#lisp - IRC Chatlog
Search
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)))
20:58:01
no-defun-allowed
I'd say usually program stacks are around 1000 calls long in interpreters.
21:02:08
makomo
paule32: that's not how you're supposed to use SETQ. the syntax is (setq <var1> <value1> <var2> <value2> ...)
21:05:59
makomo
paule32: also, the size of the stack is irrelevant here, because who knows how the parameters are actually passed (it's an implementation detail)
21:07:10
aeth
well, it won't crash, it'll just say "the integrity of this image has been compromised. continuing with fingers crossed" or whatever the exact message is.
21:08:54
aeth
Ah, it's "The integrity of this image is possibly compromised.\nContinuing with fingers crossed.\n" I looked it up in the source.
21:10:02
White_Flame
paule32: there's the CALL-ARGUMENTS-LIMIT constant that will tell you the max things you can pass to a function
21:11:32
Bike
when paul came around here last january it was suggested they read a book about the language, but they don't seem to have gotten around to it.
21:12:22
paule32
my plan is it (atm), to have a database of nouns, vocals ... these what you can see in the paste, i try to place it into real database like mysql
21:12:26
aeth
SBCL and CCL and CMUCL are native compilers. ABCL compiles to JVM bytecode. CLISP compiles to its own bytecode. ECL compiles to C, but has a backup interpreter.
21:12:48
White_Flame
paule32: honestly, Prolog is probably what you want to play with, as it combines symbolic inference with a database
21:17:32
adlai
paule32: skip the screenshot, study p-adic arithmetic and see if you can't find a more efficiently verifiable proof of Fermat's Last.
21:17:54
adlai
trust me, Top Men are hard at work on "supporting lisp ansi standard ide programming" or whatever it is.
21:23:15
White_Flame
paule32: CL is a language steeped in issuing custom commands, from the language to the editor. I don't think colors, buttons, & forms will garner much interest, but rather any useful helper call that those invoke
21:23:49
aeth
no-defun-allowed: it's done without any consideration of aesthetics or design... very 90s retro
21:23:52
White_Flame
unless you have something genera-like, where all those elements are active Lisp objects
21:29:36
minion
Blackbeard: cl-decentralise: cl-decentralise is a consensus building protocol designed for fast prototyping and development
21:29:54
no-defun-allowed
There you go. (They asked in a different room and I'm too lazy to type that out.)
21:33:16
Blackbeard
netfarm / cl-decentralise · GitLab - https://gitlab.com/netfarm.gq/cl-decentralise
21:41:17
no-defun-allowed
To understand it, you must balance weasels on a rake while reading the sources.
22:10:16
pjb
paule32: Try: https://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/sedit/index.html
22:17:18
White_Flame
yes. Also, maybe these sorts of questions are more appropriate for #clschool than #lisp
22:22:12
pjb
aeth: that's and advice. Learning the GPS should help somebody who wants to do NLP but don't seem to care for learning lisp before trying to write NLP in lisp…
22:22:39
pjb
aeth: cf. https://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/sedit/index.html
22:27:34
pjb
White_Flame: now, granted, sedit would need a new command to insert a new list. I took the easy path, by using the lisp reader.