freenode/#lisp - IRC Chatlog
Search
10:50:09
shka_
beach: btw, don't feel preasured in any manner, but you often already have those things done. What about case study of first climacs and what needs to be redesigned for the second climacs?
10:55:04
beach
In Emacs, (first) Climacs, and other editors, Common Lisp code is parsed using regular expressions, or something with similar power.
10:57:18
beach
This technique then opens up interesting possibilities. The plan is to adapt Cleavir (which it was written to facilitate, so no big deal here) to invoke the first few passes of the compiler to analyze the code at typing speed.
10:57:37
dim
usually editors refrain from using the language's parser not because it's complex to call a READ function, but because the job is to parse incomplete forms while the user is typing them...
10:58:59
dim
I remember mostly about the speed of typing vs the speed of figuring out what you typed, not about adapting read to invalid input
11:01:25
scymtym
the support for incomplete input needs more work. it is definitely a high-priority feature
11:04:06
jackdaniel
"Thoughts on the Formalization of Program Construction" here https://european-lisp-symposium.org/static/proceedings/2018.pdf was also an interesting talk
11:10:05
heisig
I loved that talk. The author also has a website for the project: http://www.expressionsofchange.org
11:29:55
jmercouris
so, I'm running Lisp in a production setting as a webserver, and what I usually do is ssh into the box, run screen, and then start my lisp application
11:30:27
jmercouris
this however means that whenever I want to restart the server, I have to ssh onto the machine, connect to the running screen session C-d and then restart the program
11:32:41
otwieracz
jmercouris: if this is recently-dated operating system, you probably have `systemd`.
11:34:07
shrdlu68
jmercouris: Start your program with a swank listener. Then daemonize it with your system's init mechanism (probably systemd, upstart, sysv, openrc, etc.)
11:36:02
jackdaniel
jmercouris: running it from screen is hardly a practice at all, especially for a "production" setting. you need to write a service file for your application (that depends on your init system) and run it like any other daemon on it
11:36:29
jackdaniel
keep in mind, that to be able to restart it properly you need to handle certain (operating-system dependent) signals inside the application
11:37:10
jmercouris
jackdaniel: properly being a "clean" restart, instead of a kill -9, is what you mean?
11:38:21
otwieracz
jmercouris: one more question - are you delivering it as binary image (like `saves-lisp-and-die`) or running it from source?
11:38:57
jmercouris
because I would be compiling on macOS, and running on FreeBSD, not sure the SBCL kernel can do that
11:44:56
jmercouris
I'll also probably want to compile the application in the make and add a make install to put it into the path
11:46:13
jmercouris
heisig: I'm familiar with cl-launch, it's not really applicable here, unfortunately
15:46:08
beach
Sometimes, ordering something from Amazon is strange. A few years back when I ordered the book Advanced Compiler Design Implementation by Muchnick, it came with a Cover with Chinese characters on it.
15:46:09
beach
Today I received Modern Operating Systems by Banenbaum and Bos, and it has a text on the cover: Circulation of this edition outside the Indian subcontinent is UNAUTHORIZED.
15:47:01
Quike
in college i got an "international" version of a class's discrete math textbook and it turned out they just removed a chapter and otherwise it was the same
15:48:06
beach
I am convinced these books are the same no matter where I buy them. But it is strange to order from the French branch of a large international company, and have them ship me an unauthorized edition.
15:51:23
warweasle
Generally international textbooks are printed in black and white and are much cheaper.
15:55:52
jcowan
Note that "unauthorized" does not mean "illegal". Circulation of books in the U.S., if they are published by the legitimate publisher, can't be limited.
15:57:03
beach
But I assume in this case that the publisher only makes it available in India, and considers exporting it to be unauthorized.
15:58:55
fiddlerwoaroof
I believe it was the exact same book and I got the edition that was meant for distributing in China
15:59:26
shka_
Quike: copyrights belong to the author, but the remark suggests publishing rights, but publishing rights already belong to the publisher
16:00:08
Quike
Well I was thinking the publisher is doing whatever price discrimination, then another firm buys books from them in India and sells them in France.
16:18:16
jcowan
Quike: Really? You can't sell a painting you have bought without the painter's consent?
16:44:59
jmercouris
Quike: I don't think things are so simple, consider the recent scandal with the John Cena's reselling of his Ford GT
16:45:18
jmercouris
here's a quick link for those curious: https://jalopnik.com/john-cena-is-being-sued-by-ford-for-reselling-his-new-f-1820913011
16:47:21
jmercouris
does Ford not own Copyright on a "published" (manufactured) instance of each Ford-GT they produce?
17:47:00
jmercouris
shka_: sounds pretty wieldy to me, actually seems like it would be really clean, probably you had a comment on almost every line since assembler is pretty hard to decipher without comments
17:47:24
jmercouris
shka_: so it most likely looked like a table, on the left hand code, and on the right hand explanations
17:48:04
jmercouris
also assembler functions, from what I understand RARELY would need to be wide enough to be multiple lines
17:49:40
edgar-rft
God never documented his code when he created earth. That's why it's such a mess.
17:52:11
jackdaniel
comments, assembler, religion, and god put a close paren to end it. https://www.xkcd.com/312/
17:56:59
edgar-rft
In early programming languages it wasn't important to have a special comment char because the program text was written to be read by humans, not computers. The programmer had to look-up the CPU op-codes in the CPU manual and program the machine via hex numbers (memory address + op-code). No joke.
18:13:05
zigpaw
eight bit zx spectrum was great in this, as you had every op code translated directly to a single byte; you could literally learn most of those often used so you could transliterate asm code to hex on the paper (probably other 8bit computers too, but I had only experience with this one).
18:29:06
edgar-rft
jmercouris: I was talking about assembly language, too. On my first two computers it was *me* who was the assembler.
18:29:57
edgar-rft
I first wrote the assembly program on a piece of paper, then I programmed the computer via hexdumps.
18:56:49
oni-on-ion
i realised my positive perspectives on C are related to how it "let" me feel like half computer half human
19:03:25
jcowan
More accurately: "The name of Poet was almost forgotten; that of Orator was usurped by the sophists. A cloud of critics, of compilers, of commentators, darkened the face of learning, and the decline of genius was soon followed by the corruption of taste."
20:02:47
didi
Hey, little trick: if you have a list on slime, but you want to kill and yank one of its elements, eval (values-list *) and then you can kill and yank it.
21:36:56
sjl_
No, I write things that rely on LCO fairly often. I have debug 2 + safety 3 in my vlime config though
21:40:57
fiddlerwoaroof
But, I've discovered that evil-mode is the best implementation of the vim standard
21:41:24
jmercouris
there is literally no reason to use VI in this day and age when emacs can emulate it
21:41:30
sjl_
I try emacs every couple of years. I've tried viper, vile, evil, vimpulse... I think that's it. They're all meh compared to actual vim.
21:42:30
sjl_
It usually takes me about 30 minutes to run into a situation where I wonder "how can I do Vim thing X in whatever-the-emacs-vi-mode-is-called-this-year?" and the answer is "oh yeah you can't do that"
21:42:52
fiddlerwoaroof
sjl_: yeah, there are a couple things I miss from vim, but the better lisp experience + discovering how easily I could migrate the important parts of my vim config convinced me to make the jump
21:42:53
it3ration
Hey folks - I've been using Clojure in my day job for about a year and have been reading Practical Common Lisp. I'm curious if there are any good comparative resources on Clojure vs CL out there. So far, I vastly prefer Clojure's syntax, brevity, [] / #{} / {} syntax for vectors / sets / maps, consistency, etc. Basically, I'm looking for someone to show me benefits of CL over Clojure from a usage POV (not a performance POV). Thanks!
21:43:20
jmercouris
sjl_: the key to success in a tool is embracing the new tool instead of fighting it
21:44:06
fiddlerwoaroof
In other languages, you start your program in your debugger if you want to debug it
21:44:09
sukaeto
fwiw, I've been using emacs+evil for ~3 years now. I believe myself to be a heavy user of "vi the text editing language" + some of the VIM extensions to that language
21:44:17
it3ration
The names of things seem super antiquated compared to Clojure (aka, remove-if-not instead of filter, etc)
21:44:42
fiddlerwoaroof
In common lisp, the debugger is always listening and it pops up in the stack frame where the error happened when there's an error
21:45:03
fiddlerwoaroof
it3ration: that's sort of true, but there are also 40 year old code bases that still work
21:45:16
sukaeto
granted, I was never a heavy user of VIM plugins. I mostly just used it out of the box for the dozen or so years that I used it.
21:45:32
sjl_
Yeah being able to write code now and be confident it won't break in ten years is a big advantage of CL.
21:45:50
TMA
the emulation is not good enough. it has annoyances that are just wrong (like search timeout. pause for half a second while writing a regular expression and bam, the next character won't be part of the regex, but a normal command
21:46:15
sjl_
Clojure 1.3 breaking the world by removing clojure.contrib was one of the big things that pushed me away from Clojure.
21:47:13
fiddlerwoaroof
I've also found that multimethods in Clojure sound really useful but they never work the way I want them to when I try to use them
21:47:50
sjl_
it3ration: I moved from Clojure to Common Lisp and have no regrets. I haven't written specifically about Clojure vs CL, but I wrote about why I like CL here: http://stevelosh.com/blog/2018/08/a-road-to-common-lisp/
21:48:09
fiddlerwoaroof
Maybe that's solvable, but there've been several occasions where I've thought "Ah, a use case for a multimethod" and then discovered that the limitations of Clojure's multimethods mean they usually don't do what I want them to
21:49:50
fiddlerwoaroof
As far as vim/emacs goes, though, I agree that evil-mode isn't actually a complete vim replacement. But, I've generally found that I can take advantage of other emacs packages to come up with a decent new workflow
21:51:21
cgay
it3ration: even at 50 years old, i think i am still capable of change. CL should be too. :)
21:54:16
jcowan
"As long as it can balance parentheses, highlight comments and strings, and autoindent Lisp code that’s all you need to start." Of course, I write Lisp with an editor that can do none of those things (well, balance parens, but it's awkward to do so).
21:54:51
sjl_
I did the Schemer books with pen and paper, but *some* basic editing support really helps.
21:57:33
it3ration
I will say, having []'s in let blocks, and [], {}, #{} for vectors / maps / sets is super nice
21:58:36
cgay
I feel the opposite. The indentation makes it clear, whereas mixing () and [] means I have to balance parens mentally.
22:00:30
oni-on-ion
i like [] better than #() for vectors. shifting becomes a nuisance for any code, but snoopy-mode helps
22:02:19
jcowan
oni-on-ion: Chez (like all R6RS) treats [] like (), so you can use whatever convention you want.
22:04:37
oni-on-ion
ohhhhhh. well thats cool actually! did not know it was R6 either. opinion changed
22:09:09
sjl_
You can make CL read [] as vectors if you want, but it won't help you when reading other folks' code. It took a while but I got used to the extra parens.
22:21:35
jcowan
Does anyone have a class diagram (showing classes and their subclasses) for the CL package, either an actual picture (text or image) or code to generate it? Doesn't have to be pretty, just correct.
22:29:28
aeth
rumbler31: jcowan is the chair of the r7rs-large committee and since Common Lisp is the closest language to Scheme/Racket jcowan is probably mining Common Lisp for ideas
22:30:08
aeth
rumbler31: A diagram like that is probably only interesting to language implementers and people going really deep into MOP/CLOS/type stuff
22:32:18
oni-on-ion
not sure if this is the same thing but this is the version i've seen, outside of CLIM or Slime : http://sellout.github.io/2012/03/03/common-lisp-type-hierarchy/
22:32:45
jcowan
well, yes, that fits the CL model of numbers (the Scheme numeric tower is another story)
22:35:36
it3ration
what [perceived] advantage is there of a Lisp-2 over a Lisp-1? It seems to just make everything more verbose ..
22:37:30
aeth
it3ration: What you wind up doing is having a type foo made with the function foo and calling it the variable foo.
22:38:02
aeth
it3ration: e.g. list is of type list, is made with list (or make-list) and is best called list when there's only one
22:45:07
sjl_
I find it allows SBCL to catch some of my stupid mistakes too -- like if I name a parameter "timestamp" but try to use it in the body as "timestamp" it will tell me I'm an idiot, instead of evaluating time as the built-in function time.