freenode/lisp - IRC Chatlog
Search
22:24:31
jcowan
I was kind of surprised that the gf argument to n-a-m is of type t rather than type gf, but it's nice, it means it can be called when an ordinary function with type declarations fails the declarations, if an implementation wants to
22:34:09
jcowan
wonderful Abstract Heresies blog post, GvR vs. the JVM on tail recursion: http://funcall.blogspot.com/2011/03/tail-recursion-and-debugging.html
22:53:18
LdBeth
quipa: well you have to deal with some system level programming or emulate some aspects of an OS
22:55:55
quipa
LdBeth: hum ok, why would that be an issue if I am using scheme to implement a pi-calculus?
22:58:18
LdBeth
<freenode_qui "LdBeth: hum ok, why would that b"> quipa: it’s possible with emulating scheduling and context switching from Scheme
23:01:16
LdBeth
So modeling pi calculus is fine but after all high performance might not be expected
23:02:17
quipa
Fine with me for now, just wanted to see if I could learn / understand it coming from Scheme
23:02:46
quipa
Basically I was trying to compile Pict programming language which from what I can see is written in OCaml and it got me thinking if it can be done in OCaml surely it can be done in Scheme / Lisp
23:26:53
aeth
jasom: Where SLIME fails is usually custom lambda lists, or in macros that behave similarly to FLET.
23:27:59
aeth
jasom: It will also fail completely in mini-languages because it will treat everything internal to it like a function
23:28:20
aeth
(well, if it has s-expressions at all, but let's not talk about trying to indent loop)
23:29:31
aeth
In particular, with custom lambda lists Emacs fails to match the &key and &optional (and probably &rest) indentation that it uses for DEFUN/etc.
23:31:12
aeth
By "similarly to FLET" I mean this: ((name lambda-list body) (name lambda-list body) ...)
23:31:51
aeth
In particular, I actually have my own custom version of FLET now and manual indentation does not play nice with paredit.
23:37:50
dim
so I think I just solved a huge problem in pgloader that I didn't know how to reproduce (until tonigth where I had an ssh connection to a box where it happened)... and it turns out (setf *print-circle* t) would save the day and avoid the crash.
23:41:23
Colleen
Unknown command. Possible matches: 8, set, say, mop, get, time, tell, roll, help, deny,
23:42:26
dim
Xach: I might have abused recursive data structures, but to my defense, that simplifies walking from anywhere so much and for such a small cost that I'm happy to do it that way
23:56:02
jasom
dim: I hung the slime repl by doing the following in the repl: (let ((*print-circle* t)) (print something-circular))
23:56:41
jasom
print, of course, returns the object that was printed, which gets printed by the repl after unwinding the dynamic binding of *print-circle* :(
23:57:44
no-defun-allowed
Same happens in most terminal repls too, but it prints out the elements of the list infinitely.
0:08:15
sjl
Doesn't necessarily even have to be circular stuff -- accidentally returning an 100mb vector of bytes and having it printed is unpleasant, but not circular.
4:26:00
fiddlerwoaroof
ACTION once loaded a 20GB or so file into a vector inside slime and then accidentally told the slime repl to print it
4:49:51
no-defun-allowed
turns out macroexpanders with auxiliary functions prefer having the auxiliary functions compiled beforehand
5:01:08
elderK
Guys, is there like a reference for FORMAT directives, like, as a big list? Kind of like how some things on the CLHS has a "dictionary for objects', say
5:07:25
no-defun-allowed
nope but it was being very unsafe with a funcall, don't remember declaiming anything
5:20:27
elderK
Ah, when-let* is more akin to the semantics you mentioned, although they do it via recursive expansion.
5:27:26
no-defun-allowed
great! cl-base64 is broken! fuck yes, that's what i wanted to fix this afternoon!
5:33:11
no-defun-allowed
s-base64 is a little more verbose and requires stream handling but it looks better overall
5:41:29
no-defun-allowed
my guess is that cl-base64 just does (map 'string #'code-char output-vector) and that fails for multi-byte chars
5:41:54
no-defun-allowed
that was odd though cause it worked when i typed in emojis and it handled those fine
5:42:26
White_Flame
base64 doesn't encode characters, it encodes bytes. So you should convert to utf8 or something first
5:42:31
no-defun-allowed
s-base64 uses streams and byte vectors which i pass through FLEXI-STREAMS:OCTETS-TO-STRING and STRING-TO-OCTETS which handles utf-8
5:46:00
oni-on-ion
not that i amn't anymores; but i think something like RLE could allow them optional. ie escape codes
5:53:26
no-defun-allowed
and now apparently there's an error about an unbound variable that is nowhere in my code
6:24:19
fiddlerwoaroof
pillton: yeah, the problem with those variables is that I only remember that I need them after I've tried to print a huge data structure
6:28:27
fiddlerwoaroof
I like the 4-byte encoding of unicode because it makes it easy to calculate the position of an arbitrary code-point.
6:29:48
fiddlerwoaroof
It would be even better if there was an encoding that normalized every grapheme into a fixed number of bytes
6:34:18
fiddlerwoaroof
Hmm, I guess that's impossible because you can combine diacritics, etc. arbitrarily
6:47:09
no-defun-allowed
fiddlerwoaroof: i do not believe so, i have two auxiliary functions ENSURE-SYMBOL and ENSURE-STRING which handle strings and symbols in the macro body so i can write somewhat neater definitions for a macro
6:47:14
no-defun-allowed
eg when i write segments, ((foo key-value)) goes in, (("foo" :key-value)) comes out
7:28:20
no-defun-allowed
aeth: i don't like the "use debugger hooks to kill lisp" report method very much, do you?
7:45:30
splittist
Did someone point elderK to https://www.hexstreamsoft.com/articles/common-lisp-format-reference/ ?
8:00:46
splittist
elderK: this, from PCL, is often handy, too http://www.gigamonkeys.com/book/a-few-format-recipes.html
8:10:37
jackdaniel
you may want to read discussion after you got to sleep, makomo has presented different expectations from said macros
8:11:04
jackdaniel
as of ix.io, I have script in my ~/bin called ix, so I just call it like `ix foo.lisp` and get the url
8:15:51
jackdaniel
interesting historical paper about continuations: http://www.math.bas.bg/~bantchev/place/iswim/conti-disco.pdf
9:14:18
elderK
Is there a way I can set the default eval-when of a file, without having to wrap everything in the file in a giant eval-when form?
9:22:19
frodef
elderK: Wrap it (in some sense) around the form that loads that file into your system?
9:39:30
splittist
elderK: if everything in the file is being treated in the same way, shouldn't you be thinking about file-level compilation and loading, rather than form-level?
9:44:09
elderK
Like, I have a macro. And it makes use of a bunch of helper functions to do the expansion.
9:44:22
elderK
Now, from what I understand, the compiler will evaluate the macro - expand it - as it goes about its work.
9:44:46
elderK
It will compile the functions the macro relies on - but not be able to execute them - unless I have them in an eval-when :compile-toplevel, correcT?
9:50:45
splittist
This might help. (Or not.) https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node68.html#SECTION00933000000000000000
9:54:06
splittist
It is common to put macro definitions in a different file which is loaded (or compiled and loaded...) before the files which use them. But I guess you know that.
9:58:23
elderK
splittist: Aye. I'm just... wondering about the functions that the macro uses to do its expansion.
9:58:33
elderK
Like, my macro doesn't do all the expansion itself - it calls out to a bunch of helpers.
10:00:56
splittist
elderK: if you decide you hate the whole thing you can read https://fare.livejournal.com/146698.html (:
10:09:59
ogamita
Of course. CLHS is not a tutorial, it's a reference specifciation. To avoid ambiguity, they strove to avoid any redundancy. There's no order (you need to read it entirely several time, and basically to retain everything in mind).
10:09:59
ogamita
On the other hand, CLtL2 doesn't describe the ANSI CL standard, but some preliminary version. So some explanations don't apply. If you can sort it out, it can be interesting.