freenode/lisp - IRC Chatlog
Search
5:40:01
johnnymacs
I am thinking I would really like to write in common lisp but then I cant take my code and use it in emacs
5:40:15
johnnymacs
like what if I make a cool thing with hash tables and then I have to hand compile it to emacs lisp
5:40:46
beach
Emacs has a Common Lisp package these days. Write it in a subset that will work in both Emacs and Common Lisp.
5:44:26
johnnymacs
I am thinking of a DSL that is meant to pass code freely between scheme lisp and elisp. It would use the lambda calculus for the logic programming and hash tables to manage memory. In scheme you would have to use hash tables to implement an immutable tree
5:47:36
whoman
ahhhh https://yoo2080.wordpress.com/2013/08/16/differences-between-common-lisp-and-emacs-lisp/
6:02:08
pjb
whoman: you would have to add reader macros to all the characters. Some implementations use a-list for the reader macro table. Even if you only had mostly base-char in your sources, this would require several tens of memory accesses to read each character before executing your reader macro. It would not be difficult to implement, but it would be very ugly.
6:10:30
whoman
pjb: what do you mean, for C+CL ? or for a lisp file that compiles to scheme,cl,elisp ? ive seen that file, there were a couple of macros but it was mostly compiler switches for the parts where the langs were different
6:22:07
pjb
whoman: it would be preferable to prefix the code where you want such drastic syntactic changes with a singular reader macro.
6:22:35
pjb
So that you can implement your own lexical and syntactic analysis more classically and cleanly, than going thru the readtable.
6:24:23
whoman
http://lisp-lang.org/ <-- see first example clipping here. keywords are kind of hideous
6:27:59
whoman
one day i realised i dont type direct digital numbers merely as often as i type all the symbols they hide under shiftmodding
6:38:15
pjb
whoman: also, you can trivially write an emacs command so that when you type foo: SPC, it changes it to :foo.
6:52:22
whoman
pjb: oh true! also emacs can display words/stuff that is different than whats in the buffer. forgot about that...
7:44:55
beach
Improved arrow rendering for incorrect indentation in Second Climacs: http://metamodular.com/gutter3.png Notice that it still doesn't know how to indent DEFMETHOD and LOOP, hence the arrows in that picture.
7:56:26
loke
ACTION needs to test it again. Please remind me where is the official repository for second climas?
8:08:59
cess11
Not sure if the maintainers of http://lisp-lang.org/learn/continuous-integration are here but if you are, the link to JSCL seems to be out of date and ought to be replaced with https://github.com/jscl-project/jscl .
8:10:36
loke
OK, I have a few issues. Which one of these do you want me to try to fix? 1) Cursor keys are not mapped. 2) The cursor takes up horizontal space. 3) Graphical artifacts when scrolling. 4) TAB key is not mapped to anything sensible.
8:11:09
beach
loke: My plan was to get enough functionality related to Common Lisp editing working, because I think I am the only one with ideas in that respect, and then leave a lot of the rest to contributors.
8:12:03
loke
beach: I find it to be hhugely distracting. Would you be OK with making it a configurable option?
8:30:43
epony
beach did you write this? http://metamodular.com/Psychology/continuous-improvement.html
8:41:22
bjorkintosh
epony, that's funny. I just discovered the same essay a few minutes ago! and then beach showed me Dweck's video on growth mindset https://www.youtube.com/watch?v=isHM1rEd3GE
8:45:14
epony
that's funnier, I was just processing the knowledge collection here, so it just fits in the work I was previously doing
8:46:21
epony
I think I am in this channel here exactly for the learning and continuous improvements aspects and find it intriguing it relates to Lisp.
8:55:02
loke
Clearly we need a package called “Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch”
10:20:29
beach
What software on GNU/Linux do people use to record screen sessions, like for showing off their latest Common Lisp software?
10:23:16
beach
I wasn't thinking of terminal sessions, but of GUI sessions. But thanks for the link.
10:23:31
flip214
beach: how about that: ffmpeg -f x11grab -video_size cif -framerate 25 -i :0.0 /tmp/out.mpg
10:24:07
pjb
beach: it seems ffmpeg can do it: ffmpeg -video_size 1024x768 -framerate 25 -f x11grab -i :0.0+100,200 output.mp4
10:25:14
flip214
although you might want to put a "sleep 3" before that, to have enough time to switch to the right window and so on
10:29:53
Shinmera
Might be a bit more trouble to set up, but is a really solid recording software that I use for all my needs in that area.
10:29:57
beach
I also found this list: https://www.tecmint.com/best-linux-screen-recorders-for-desktop-screen-recording/
10:31:54
Shinmera
If you need help setting it up, I'd be glad to offer some (maybe over privmsgs, though)
10:32:19
beach
I am again thinking about this community project to create a site for learning Common Lisp. It would contain a graph of short subjects, and each subject should contain text, examples, exercises, and video snippets.
10:32:44
beach
Shinmera: Thanks. I won't do it right now, but I might take you up on that once I am ready.
10:33:26
jmercouris
I'd also be interested in making these learning resources as portable as possible
10:33:42
|3b|
OBS gives you a lot more control, and i use it on windows sometimes, but the simple stuff is nice when you don't need the extra control :)
10:33:44
jmercouris
if we could make these assets accessible on a site like "udemy" or "codeacademy" it would be great I think
10:34:10
beach
Shinmera: Do you have any advice about where such a thing could be hosted, so that people could make contributions without too much trouble?
10:34:23
jmercouris
beach: I know you didn't ask me, but I would think wiki software would be the best
10:35:29
Shinmera
The way I do it for ELS is that we have a syntax for edition data that people can edit as lisp files. This is then assembled into HTML pages by a generator.
10:36:10
beach
Shinmera: I have vague ideas, but there would be a fairly large number of "nodes", one for each very small subject. And there would be all kinds of ways to navigate the graph of nodes.
10:36:36
Shinmera
The quick start would be to do what the cookbook does, which is to just throw a bunch of markdown files into a github repo.
10:38:43
jackdaniel
afair drmeister hacked jupyter notebooks and CL - they look very handy for this kind of learning
10:38:54
beach
I can't even begin to imagine how a "node" would be represented in a GitHub repository.
10:40:25
beach
jmercouris: I am totally ignorant here. I didn't even know that GIT had the concept of a folder.
10:40:53
ecraven
doesn't git only know about files, not folders? last I heard, you cannot add empty directories to git
10:41:59
jmercouris
so basically, I mean just make a dir like "/learning-book" and then make "/learning-book/chapter1"
10:42:12
ecraven
jmercouris: but what if I want to add the directory to git, without any files in it?
10:42:17
beach
I guess the thing to do would be to have all you cool kids agree on a structure, stick in some initial material, and then tell me how to add more.
10:44:00
beach
Anyway, I think the most important part is to create a bunch of nodes. They don't have to be organized in a graph, at least not to begin with.
10:44:29
pjb
jmercouris: touch foo/.keep ; git add touch/.keep ; git commit -m 'Added the touch/ directory ' touch/.keep
10:44:32
Shinmera
beach: An advantage of my approach is that you could start out defining some nodes as some lisp data, and then later figure out how to assemble them into a website.
10:44:32
beach
I would like to see video snippets around 5 minutes long, so as to cater to the young generation with an attention span of a gnat.
10:45:41
pjb
ecraven: touch foo/.keep ; git add touch/.keep ; git commit -m 'Added the touch/ directory ' touch/.keep
10:46:10
beach
I have ideas about how to organize such a thing. And I have ideas about the contents. But I really don't have the technical knowledge about the tools to do the mechanics of it.
10:46:46
ecraven
anyway, I know this doesn't work, I was just pointing it out, as someone said git supports adding empty directories (which afaik it just doesn't)
10:49:58
pjb
ecraven: I mean, Finland, the country where they catch and domesticate Santa Clauses https://www.youtube.com/watch?v=KZlNF3qWFT8
10:51:28
pjb
Linus could have as well written a lisp machine; he choose to implement Linux… Doesn't that tell you all you need to know about Finland?
10:58:05
JuanDaugherty
you say that because you know of some relation he had to lisp or on general principle?
11:07:39
minion
schweers, memo from pjb: "IMPORTER:**;*.tar.gz" is not a logical pathname, because gz is not a valid version number.
11:07:39
minion
schweers, memo from pjb: also, you must have the same number of stars in both sides.
11:15:46
JuanDaugherty
well he was a german, iirc he didn resist worked on their rocket program and stuff but I doubt was more than that
11:17:59
jmercouris
beach: So I'm I would imagine, about halfway through the transformation that you had described with the foreign "server gui", and it is going pretty good, I think in the long run, this will pay huge dividends
13:28:01
didi
I wanted to provide a RETURN escape for a macro I was writing. Unfortunately the BODY of the macro was deep inside a nested DOLIST, so a RETURN would just pop from the inner DOLIST. Turns out MAPC is very useful for these situations. I just switch DOLIST to MAPC.
13:32:49
didi
dlowe: I thought of that. But I couldn't think of a simple way. I still wanted the user of the macro to use RETURN.
13:40:00
specbot
Constraints on the COMMON-LISP Package for Conforming Programs: http://www.lispworks.com/reference/HyperSpec/Body/11_abab.htm
13:40:25
schweers
pjb: does this mean that (let ((car (car foo))) (do-stuff-with car)) is not a conforming program (fragment)?
13:42:37
pjb
right, in the execptions, the first paragraph: If an external symbol of the COMMON-LISP package is not globally defined as a standardized dynamic variable or constant variable, it is allowed to lexically bind it and to declare the type of that binding, and it is allowed to locally establish it as a symbol macro (e.g., with symbol-macrolet).
13:43:11
schweers
I made the mistake of first asking the question and only then reading the exceptions to the rules :/
13:43:20
pjb
this says also that no other symbol exported from CL than the specifically specified as dynamic variables or constant variables, is declared special.
13:50:39
francogrex
i updated to the new sbcl which also uses the new asdf apparently. I notice a very annoying change. everytime I load a system, it tends to recompile. before it was not the case
14:00:21
Shinmera
I don't remember if it was fixed in ASDF completely and/or whether that made it into SBCL again.
14:17:26
francogrex
yes it is in sbcl 1.4.5 unfortunately. thanks now I realize it's not just me. I hope it gets fixed
14:26:57
Bike
if X is a macro, then when the compiler sees a form (X ...), it calls X's macro function with the form and the lexical environment, and then compiles the resulting form instead
14:34:02
sjl
Let Over Lambda covers macros pretty heavily. Not everyone likes the book though — there are some weird style choices, and the tone is a bit much sometimes.
14:36:26
sjl
Shinmera: how about https://www.amazon.com/Large-Himalayan-Salt-Animals-Horses/dp/B00KAD811C/
14:37:25
Shinmera
Ah, perfect, even includes a rope to hang yourself with when you can't take the constant jerkoff in the book anymore.
14:50:53
Shinmera
I remember when SBCL made that change to their backquote implementation. One dude got really furious about it.
14:51:27
sjl
didi: yeah, that's it. part of it is available online I guess, so you can try before you buy.
14:54:44
Bike
it defines this macro that's supposed to let you define macros such that in their body, g!name is replaced with a gensym
14:55:20
didi
"Only the top percentile of programmers use lisp and if you can understand this book you are in the top percentile of lisp programmers." Hihi.
14:58:34
sjl
well, that's a bad example because it doesn't actually prove it's a gensym... but: `foo#
15:00:38
sjl
per syntax-quote, so if you need to unquote and requote you have to do it the old fashioned way
15:01:17
sjl
LOL has o! to replace ONCE-ONLY too. I prefer just using the with-gensyms and once-only macros myself.
15:01:36
Bike
Have your ` replacement bind the translation table, and then ! or whatever does the replacement
15:06:13
drmeister
ACTION doesn't like those kinds of salt licks. He never knows who's been licking it before him.
15:08:07
schweers
how come g! and o! in LOL are broken? I use defmacro! from a package someone made from the LOL code (on quicklisp) and it seems to be working fine.
15:13:00
schweers
oh. because what (read-from-string "`(foo bar)") returns is implementation defined?
15:20:58
schweers
I don’t think it is. I’ve never used it, I’m just trying to see how defmacro! is broken, and whether the version I’m using is broken too: https://github.com/thephoeron/let-over-lambda
15:21:27
schweers
I don’t think the use of parse-body fixes this issue. But no, I don’t think its bad. I should be using it more myself :D
15:21:37
Bike
https://github.com/thephoeron/let-over-lambda/blob/master/let-over-lambda.lisp#L93-L95 here. this part.
16:17:25
comborico1611
Is it customary to put the key or the list first, in the order of parameters?
16:19:43
Shinmera
However, usually the thing you're looking for is more important or interesting, so it coming first makes more sense in my opinion.
16:21:05
didi
I like to go as it would read in English: (find x list) => Find the element X in the list LIST
16:22:56
didi
Of course one could argue for: (find list x) -> Find, in the list LIST, the element X. But I think it's awkward.
16:22:57
Shinmera
In some cases where what you are retrieving is more of a property, the "container key" order can make more sense since it implies a "depth".
16:23:37
pjb
comborico1611: it doesn't matter, anyways you should define your own functional abstractions, so you can use your own conventions.
16:32:21
pjb
Scientists: syntax highlighting doesn't support software developers enough <https://medium.com/jexia/requirements-mislead-and-undermine-good-design-e065ab5cae80>
16:33:10
pjb
Sorry, the right url is: https://link.springer.com/epdf/10.1007/s10664-017-9579-0?author_access_token=k4oGeJTmqhJxzIPaaGED3Pe4RwlQNchNByi7wbcMAY6Fle4EoE8tIdI693hz9UVo8vGkF1TVHbc2IJokKLOhdq50VzjP4FAgDEGKnm-UbZjyZL01APX6JwWNERV0wYZnjidayHG9bj7AFWhFo0NyYw%3D%3D&utm_campaign=Revue%20newsletter&utm_medium=Newsletter&utm_source=Coding%20Insights%20from%20Scientists