freenode/#lisp - IRC Chatlog
Search
8:38:24
scymtym
svillemot: this is not a problem or anything, but i was wondering whether there is a particular reason for Debian not upgrading to SBCL 1.5.0 in unstable. put differently: did we do something problematic or worrying in SBCL?
8:39:15
svillemot
scymtym: this is because Debian is currently in freeze, in preparation for the next release (“Buster” 10), probably for a couple of months
9:46:15
ym
I heard several times that initially by design LISP wasn't for evaluation, but for human-friendly and mathematically strict description of Turing-complete language. Is there any papers, describing this historical episode in details?
10:19:38
pjb
ym: lisp was introduced, because the Algol commitee wouldn't consider COND, and Fortran wouldn't add COND or a ternary IF.
10:20:15
pjb
And also, those languages weren't good enough to implement the AI ideas of the new AILab founded by McCarthy et al.
10:21:54
pjb
ym: on the other hand, the s-expression form of lisp was designed only as a data description language. There was a m-expression form for lisp code. But the student Russel realized that he could implement the eval function easily, and use the s-expression for the program source without waiting for the finalization of the m-expression syntax.
10:22:12
pjb
ym: https://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/aim-8/index.html
10:22:20
pjb
ym: https://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/m-expression/index.html
13:19:09
jsjolen
Hi. I want to have a modern (aka case-preserving) readtable. That's easy with named-readtable. Now I want to downcase the CL package and its symbols so that I can use it 'naturally'. My attempt: D-E-S over CL, SETF FDEFINITION and SYMBOL-VALUE. My issue: I can't SETF FDEFINITION of special operators. Is there anyting else I can do? Is there a solution for this?
13:21:55
jsjolen
dlowe: Yeah, but I want variable case. I want to do stuff like defclass MyClass (this is for personal use)
13:24:47
jsjolen
http://www.lispworks.com/documentation/HyperSpec/Body/23_aba.htm there it is, aah crap :)
13:27:36
Bike
if you did want to stick with the first idea for some reason, just define macros, like (defmacro my-cl:|progn| (&rest forms) `(cl:|PROGN| ,@forms))
15:59:07
jcowan
As a Unix non-hater, I can say that the BSD API is definitely not aligned with the spirit of Unix.
16:26:37
verisimilitude
It's not the only bad API; it's what one's stuck using under GNU/Linux and the BSDs, in any case.
16:32:35
verisimilitude
Making a network request should in no way be more laborious than making a filesystem request, at the least, I think.
16:35:36
PuercoPop
verisimilitude: but besides opening the socket sb-bsd-socket gives you a socket to write and read from, is that not what you are looking for?
16:37:16
verisimilitude
Just opening the socket is bad enough. SB-BSD-SOCKETS:SOCKET-MAKE-STREAM gets a proper interface, however.
16:39:40
verisimilitude
Yes, trafaret1; so, lambda gives one the ability to play with functions as one would with other data.
16:46:36
verisimilitude
I've been skulking around for some details concerning Genera's network facilities, but haven't found much in the way of details yet; if any of you know where to find this, I'd appreciate it.
17:12:34
pjb
PuercoPop: int server=open("/dev/tcp/www.google.com/80","r+"); int ret=write(server,"GET /\r\n",7); char buffer[8192]; ret=read(fd,buffer,sizeof(buffer)); close(fd);
17:14:54
verisimilitude
The Google homepage is 220 kilobytes, pjb, so your C example doesn't work as well as you think.
17:15:42
verisimilitude
I know, but a real solution would require more than those few lines is my point.
17:16:15
pjb
Of course. This is the unix way: simple kernel, complex userland. Requires good and disciplined programmers.
17:17:45
emaczen
Why is (decode-universal-time 0) giving me december 31st 1899 at the 16th hour of the day?
17:17:46
minion
emaczen, memo from phoe: if your hooks depend on each other (e.g. due to calling order), then they are actually a badly factored single hook - and they should become a single hook
17:17:58
dlowe
you can open a socket in plan9 like cd /net/tcp/`/net/tcp/clone/ctl`;echo connect example.com 80 >ctl;echo "GET / HTTP/1.0" >data;cat data
17:18:47
pjb
If time-zone is not supplied, it defaults to the current time zone adjusted for daylight saving time. If time-zone is supplied, daylight saving time information is ignored.
17:20:59
moldybits
i have a little snake game. there's a class that keeps all the state, and now i wish to add state-saving. my problem is that one of the slots store a lambda. i could specify that it's not allowed to be a closure, i guess ...
17:21:48
Xach
emaczen: >> time zone n. a rational multiple of 1/3600 between -24 (inclusive) and 24 (inclusive) that represents a time zone as a number of hours offset from Greenwich Mean Time. Time zone values increase with motion to the west, so Massachusetts, U.S.A. is in time zone 5...
17:31:54
moldybits
if i want to save a lambda to a file, i'd need to store the sexp somewhere myself, right?
17:33:53
moldybits
if i have a (lambda () 42) list, what's a good way of turning it into a function? eval?
17:38:39
Bike
which will probably run more efficiently, but the compilation process will take longer
17:38:49
Bike
...assuming the implementation actually has a separate compiler and evaluator, which it may not
17:40:10
Bike
may i ask what it is you're actually doing, that you want to save functions to a file?
17:41:21
dlowe
I mean, you could write code to a file, then call COMPILE-FILE which might make a fasl
17:41:34
moldybits
i want to save the current state of the snake game. how to calculate the new cooldown for the snake (based on its length) is a lambda that i want to be user-modifiable.
17:44:56
verisimilitude
If you call a function in SNAKE-COOLDOWN, set by a file LOAD or with a default value, otherwise, you can of course still change this variable at any point.
17:47:08
moldybits
hm. there's a further complication: replays. i need to store every change to the state somewhere.
17:48:27
moldybits
(set-cooldown-calculator '(lambda (snake-length) ...)), and set-cooldown-calculator will stuff this into the replay.
17:50:51
moldybits
i'm using this snake game to figure out how to structure more advanced games in the future. i've run into these issues before.
17:58:41
Xach
moldybits: it would be more tractable to maintain state in an object passed into callbacks.
18:02:47
moldybits
i'm not following exactly. my thought was to not allow any free variables in the callbacks.
18:05:08
moldybits
eventually i would want the callbacks to be evaluated in a separate environment, with a custom eval
18:18:40
moldybits
Bike: i'm not sure? i want code writing to be a part of some games. suppose this snake game has a level where you're supposed to figure out the appropriate cooldown function to get past some obstacle in a clever way, or something.
18:36:09
jdz
moldybits: Probably something similar to what you're doing: https://technomancy.itch.io/bussard