freenode/#lisp - IRC Chatlog
Search
13:17:15
xificurC
(read (process-output (sb-ext:run-program "/bin/sh" '("-c" "export-lisp") :output :stream))) is there something inherently wrong with such code? It keeps hanging in some cases even though the internal program always finishes when running from the shell directly
13:20:50
flip214
but the process will block if the pipe is too small to hold all the output at once.
13:21:38
flip214
use UIOP:launch-program (or use :wait nil), read the stream, and then explicitly let it stop (== read the return code)
13:25:42
xificurC
flip214: ah, I tried :wait nil and then (read (process-output process)) (process-close process) but forgot to return the read value... That works. uiop:run-program worked too so I knew it must be something me doing wrong
14:33:50
HighMemoryDaemon
Caveman uses a syntax feature of Lisp I have not seen before. Ex. '@route GET "/"' - What is this syntax feature called?
14:35:11
random-nick
HighMemoryDaemon: reader macros work by telling the reader to call a function when encountering a certain character on the beginning of an expression
14:36:29
random-nick
the simplest reader macro is probably quote ('), which reads the following expression and returns it wrapped in a (quote ...) form
14:39:07
antoszka
You can use reader macros to quite trivially create, say, a literal syntax for hashes.
14:39:35
HighMemoryDaemon
That is very cool. Not saying that it is worth doing at all, but using these macros, couldn't you do something like re-make the entire Python or Ruby programming languages..within Lisp?
14:44:04
HighMemoryDaemon
Well, that's me. I wouldn't have a need to use it but it's just cool that it's possible.
14:45:57
specbot
Standard Macro Characters: http://www.lispworks.com/reference/HyperSpec/Body/02_d.htm
14:48:21
beach
shka: Hello. Very well thank you. I had some very good ideas today. How about yourself?
16:46:34
beach
What is a good way for a Common Lisp implementation to distinguish between a source file and a FASL file when loading?
16:49:13
jasom
beach: what do you mean? Like having a magic number at the beginning of all FASL files?
16:51:53
jasom
I mean if someone starts their source file like ".. I AM A FASL AND I'M NOT LYING" then they deserve what they get :P
17:53:11
jasom
beach: I assume you saw https://blog.golang.org/ismmkeynote ? Of note is that they found the write-barriers to hurt throughput more than generational collection helped on programs with small heaps. They attribute some of this to good escape analysis in the compiler. They show typical pauses of 500us on an 18GB heap which is pretty good, though it sounds like heavy allocators can get starved for longer.
17:56:07
beach
I can't read it today because I am off to spend time with my (admittedly small) family, but I'll look at it tomorrow.