freenode/#lisp - IRC Chatlog
Search
8:29:13
TMA
Chream_: sure. those probably frequent #emacs too. I am still of the opinion, that iqubic would be better off asking there, probabilistically speaking -- there is a greater proportion of those willing to discuss things emacs there than it is here. I might have worded it too terse. It looks like iqubic was helped there faster anyway.
11:25:47
beach
It is a somewhat labor-intensive task, so if anyone feels like helping out, that would be great.
11:27:20
beach
What I have decided to do is to modify the text in place, and then refer to some appendix for the original text whenever I decide to update some text in the spirit of WSCL.
11:31:15
phoe
beach: Yep, I see, except you're creating a modification of the standard where I'm creating a clarification of it.
11:32:51
beach
Some TeX macro calls, like beginSection etc. I just replace by standard LaTeX macro calls.
11:33:24
beach
Some others, like semantic markup things like newterm, I define a macro for and don't modify the original.
11:40:05
phoe
beach: yep, fire up the issues on GitHub that can be picked up by other people if they want to.
11:40:44
beach
blurgh: Please, we don't need to know what time it is in every time zone in the world.
11:56:09
phoe
Will be in Malaga at 18:00 my time, it'll take me a little bit longer to go to Marbella.
12:02:47
beach
Sure. We'll be there around 14:00 or so. Hotel Villa Marbella. Show up for a beer if you like.
12:03:35
phoe
So we'll end up in Marbella later. I still don't know what the bus travel is from Malaga to Marbella.
12:33:11
phoe
PCL is a good place if you already know some programming. Get yourself a Portacle for an all-in-one Common Lisp development environment.
12:36:00
phoe
the most essential one is SLIME. the best way of getting it is installing Quicklisp first, and then (ql:quickload :quicklisp-slime-helper)
12:36:03
Shinmera
Regarding ELS I'll be arriving in Malaga at ~9:00 and with the Bus I should be in Marbella at around 10:30
12:37:28
phoe
He's mostly talking good stuff, though several things he said in that book are simply wrong.
12:37:59
random-nick
why is installing SLIME through quicklisp preferable to installing it through ELPA?
12:38:02
phoe
Scheme is oriented towards functional programming where CL is as multiparadigm as a language can get.
12:38:35
phoe
random-nick: it'll get upgraded with each Quicklisp upgrade. For some reason, I prefer that to the mess that I often ran into with ELPA/MELPA.
12:39:01
phoe
Shinmera: the last time I attempted to troll on #lisp you were the first one to complain about it
12:39:34
White_Flame
"Lisp" is the name of a family of languages which includes Scheme, but "LISP" is also the name of the first implementation, and languages whcih derived from it and recombined into "Common Lisp" are still basically known as "Lisp" when no other modifier is involved
12:41:56
siraben
I've already ordered Practical Common Lisp, should arrive in a couple days. I like how it very, well, practical and that Lisp isn't just for cool meta-circular evaluators :)
12:44:55
makomo
\h is supposed to include both the "classical" horizontal whitespace and some unicode stuff like no-break space, etc.
12:45:01
siraben
What can I expect to be able to understand well after reading through Practical Common Lisp?
12:45:17
phoe
in 100% conformant ANSI CL, we have a perfect bijective mapping between lowercase characters and uppercase characters; Unicode does not implement anything like that.
12:45:20
makomo
i mean, i doubt i'll have documents with such horizontal space, but having it for completeness would be nice
12:45:35
phoe
siraben: reading, no idea; actually following through with the exercises, you'll grasp the basics of CL
12:50:03
smokeink
I'm currently reading the last 2 chapters, about making interpretors and compilers in common lisp
12:50:39
smokeink
so far I've only read the first few chapters, now I'm reading the last few chapters
12:51:39
smokeink
cuz I don't need to understand the Eliza talking bot right now , but I want to understand how this thing works: http://lisperator.net/slip/ , it seems to be based on PAIP
12:53:45
Bike
paip is mainly about historical AI. it has some basic stuff about interpreting and compiling lisp, but you'd need to know more t han that for an actual implementation
12:54:55
smokeink
what other books do you guys recommend , for understanding how to make a lisp ? Lisp in Small Pieces ?
12:55:18
drunk_foxx[m]
I've started PAIP and On Lisp in parallel after Land of Lisp, seems like a great flavor to me. There are also quite great excercises in the book so that you don't just read and repeat
12:57:15
drunk_foxx[m]
It's especially funny to compare it to some of the modern bots, and understand that actually not much progress has been made since those days
12:58:07
smokeink
can SBCL easily be ported to WebAssembly (which funny enough, is based on S-Expressions) ? https://www.youtube.com/watch?v=yEYtwmI7bDg ( WebAssembly hello world )
13:00:17
p_l
WebAssembly could be generated from SBCL's compiler, but AFAIK there were some issues in making it a lisp friendly place
13:02:15
p_l
I don't remember everything, but I seem to recall some of type checking and function call semantics were iffy?
13:02:49
p_l
That said, you could probably port a CL implementation to wasm, maybe not necessarily SBCL
13:05:19
siraben
Siri is really bad, any deviation from a specific phrasing makes it say "Sorry, I don't understand" or other canned responses
13:06:15
drunk_foxx[m]
> drunk\_foxx[m]: Why has work on Eliza-like assistants gone dark after the 1990s?
13:06:54
nirved
back at the end 90s i came to the conclusion that human mind state can be represented in 50-70 dimensions (each dimension is a duality), haven't checked if this is correct though
13:08:16
drunk_foxx[m]
A note about voice recognition: it was there almost 40 years ago with the use of Symbolics Lisp Machines. Now think about how much progress has been made since then (not much imo)
13:08:16
drunk_foxx[m]
https://www.reddit.com/r/lisp/comments/89elb7/symbolics_lisp_machines_in_use_in_a_research_lab/
13:09:44
smokeink
p_l: well does x86 assembly offer any special support for multiple-return-values ?
13:13:28
drunk_foxx[m]
I personally tried PCL after Land of Lisp (I had no serious prior experience in any programming language), and I didn't like the way of telling (I think Peter is oversimplifying in some places)
13:13:44
drunk_foxx[m]
For some practical stuff, I think that Common Lisp Recipes by Ed Weitz is great
13:14:01
siraben
I'm not even fully done with SICP, just the lectures and some chapters, still to finish the compiler, logic programming section.
13:15:16
siraben
One can do so much with Scheme, can't imagine the power of Common Lisp and its libraries
13:17:42
drunk_foxx[m]
> I'm not even fully done with SICP, just the lectures and some chapters, still to finish the compiler, logic programming section.
13:17:43
drunk_foxx[m]
Common Lisp can also be used for logic programming, if you will be interested in the future: https://github.com/nikodemus/screamer/
13:19:48
phoe
try writing some stuff of your own, use other people's libraries, find shortcomings and bugs in these libraries, dive into these libraries, start fixing things in them and submitting PRs
13:20:59
phoe
emacs itself is a core that's rather tightly guarded by GNU and contributing to it is hard.
13:21:32
phoe
shrdlu68: things that need to be done don't disappear magically on their own, unless someone does them
13:35:15
siraben
phoe: I'm planning to contribute to Emacs Calc, a default package that isn't well documented and needs a better integration algorithm
13:35:35
siraben
But for core C code and core Emacs Lisp functions, I can see why they are guarding it closely.
13:36:49
phoe
siraben: you're free to fork Emacs and modify it on your own, but expect a lot of work required to pull your changes back into the root codebase.
13:39:28
siraben
And adding relatively benign functions such as the powerset, more set operations, should be all right, but I have yet to submit a patch request
13:44:08
phoe
If it's C, I have no idea if emacs needs such functions; if it's elisp, they'll most likely ask you to create a package submittable to one of Emacs package repositories.
13:47:16
pjb
Well, more precisely (turing equivalence and all that), the difference is that lisp is extensible at a smaller level, using small tools provided by the language itself, in the same program where the extension is used, while in C, extensions have to be made by way of pre-processors, that requires in general to implement a whole C parser, and a whole new program of the size of a compiler.
13:47:57
pjb
C is still extensible by its users (and is being and has been extended in several occasions: Objective-C, C++, PRO*C, etc).
13:49:17
pjb
And then, when you see the difficulties C programmers have with the simple abstraction tool that functions are…
13:54:22
siraben
They already have some set functions like intersection, disjoint, union, so powerset can't hurt
13:56:14
siraben
And I can't believe functions like `calc-prime-test' are still without documentation
14:21:21
phoe
random-nick: ~/ invokes arbitrary Lisp code. without ~/, format is not turing complete.
14:27:11
phoe
You get some Lisp forms as input, are able to perform arbitrary computations on them, and return the result as Lisp forms.
14:27:47
phoe
But you have all of Lisp available when you do macroexpansion, just like during runtime, compile-time, read-time.
14:28:18
phoe
oh, SRS. It's Turing complete, but it doesn't have anything to do with Lisp macros, I think.
14:42:11
pjb
phoe: I wouldn't be so sure. If you write (let ((string (make-array +infinite-size+ :element-type 'character))) (format string "…" string)), perhaps something can be done?
14:43:25
pjb
(let ((string (make-array 100 :element-type 'character :fill-pointer 3))) (replace string "abc") (format string "~S" string) string) #| --> "abc\"abc\"" |#
14:45:16
phoe
pjb: that's exactly the problem with format. The lists passed to it as arguments are immutable by FORMAT itself.
15:30:09
phoe
I think (if foo 't 'nil) would be *the* most idiomatic and correct, since you explicitly want the symbols T and NIL
15:30:19
makomo
phoe: i guess, but that reminds me of "if (x > y) return true; else return false;" instead of just "return x > y;"
15:31:17
makomo
Shinmera: well, for example, say i want to test whether a given string is an email address
15:31:21
phoe
if you want either the symbol T or the symbol NIL, then (if foo 't 'nil) conveys exactly this meaning
15:31:31
makomo
i can use cl-ppcre on it, but i want to return just T/NIL, and not cl-ppcre's matches and stuff
15:31:51
makomo
even if i wrapped cl-ppcre:scan's into (values), i would still get the first "match-begin" value
15:35:11
Shinmera
makomo: No, the point of explicitly returning NIL/T. If you document that it's a boolean, it's fine to return generalised booleans.
15:40:10
Shinmera
I'm much more in the camp of "conciseness" than "explicitness" myself, but it's just different ideals.
15:40:36
Shinmera
So if you want to return explicit booleans sure. Just better be consistent about it.
15:45:05
impaktor
Slightly shameful question/offer, but: I have an article that's about to be published in Scientific Reports (accepted, I just got the proof back for final check, called "Fitting a function to time-dependent ensemble averaged data"), and in it I have the sentence "Computer codes are freely available (Python, Octave/matlab, and Lisp)". My intention was to put "Common Lisp", but I got stuck when porting python's numpy method calls to
15:45:15
impaktor
I eventually gave up and ported the Python code to Hy Lisp, because I do want my article to mention there's code in "Lisp". If anyone feels up to tinker with it, I have both working python and hy lisp code here: https://github.com/impaktor/wlsice
15:46:08
impaktor
Anyway, I'm tired of fighting this code, so just thought I'd throw it out as a last check here.
15:50:06
pjb
makomo: the most direct from the user point of view, and assuming a dumb compiler would be (if b 't 'nil). But (not (null b)) (or (not (not b))) would also be nice if you have a good compiler, eg. a compiler that is able to deal with machine booleans, and who understand what (not (null b)) mean (but then, if it knew, it would also know about (if b 't 'nil)). On different processors, there booleans can be represented differently.
15:50:06
pjb
Eg. on 680x0, they're #x00 or #xFF and the boolean instructions (such as the Scc instructions) produce those values. https://stackoverflow.com/questions/25035030/understanding-the-scc-instructions-of-68000-assembly?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
16:12:53
pierpal
and you may want to add a comment clarifying that this conversion has only an aesthetical purpose when using the function in the repl. otherwise readers, including you at a later time, will wonder why you did that
16:28:23
pjb
in any case, I would write a functional abstraction. (defun bool (x) (not (not x))) (declaim (inline bool)) (defun foop (x) (bool (some-predicate-foo x)))
17:01:23
pfdietz
I'd prefer if functions that return generalized booleans return T for true. In general, more specific provided behavior for an interface is good, unless there's a significant reason for that not to be the case.
17:02:16
pfdietz
It's an example of the Robustness Principle. https://en.wikipedia.org/wiki/Robustness_principle
17:11:53
phoe
I might do a lightning demo of the working fork of Reddit 1.0 that has emerged, https://github.com/tamurashingo/reddit1.0/
17:12:22
phoe
absolutely not my work and I take no credit for it, but I think it would be worthy to quickload it, run it, and do some silly things in the web browser
18:11:20
phoe
"there's only three people on the Internet: you, me, and this guy who types really fast"
18:23:42
makomo
phoe: hey that's pretty neat. i saw that the reddit 1.0 code was out but didn't know someone made it work
18:24:10
phoe
pfdietz: some code changes to make it work on non-CMUCL, reconstructing the database schema
18:48:46
Shinmera
Though actually the current 1.1 release was erroneously built on 10.12 and thus doesn't run on 10.11. There's a 1.1b release though that does run on 10.11: https://github.com/portacle/portacle/releases/tag/1.1b
18:49:18
Shinmera
I did build it with travis on 10.10, which works, but 10.9 gives errors from brew about it no longer being supported and I didn't want to care to try and make it work.
19:08:39
pfdietz
(scrolls back in log) That unicode's case mapping is not 1-1 doesn't prevent it from working with a comformant Common Lisp, I think. Those beyond-standard characters just aren't treated as having Common Lisp case.
20:11:58
phoe
Okay. You'll hear from me again when I'm waiting for my plane in Warsaw. Over and out.