libera/#commonlisp - IRC Chatlog
Search
11:42:44
mgl
For review, if anyone's interested in autoloading: https://github.com/melisgl/autoload/tree/wip
11:42:56
mgl
(needs https://github.com/melisgl/dref/tree/fancy-autoload and https://github.com/melisgl/mgl-pax/tree/fancy-autoload to compile)
12:52:10
cdegroot
(I still have https://www.tfeb.org/fragments/2024/05/15/an-iteration-construct-for-common-lisp/ open in a tab; I like the design, but too busy with other stuff to give it a spin. LOOP will never be my friend, I think. Purely a matter of taste, that)
13:23:54
yacin
i keep trying to convince myself to use one of the other iteration constructs, but it's nice to have a few fewer libs and just use LOOP since i know it now
13:27:16
aeth
something that had identical semantics to LOOP (just more parentheses and some other extensions) would be the most readable
13:27:31
aeth
I find ITERATE to be the worst of the ones I encountered because it kind of hits an "uncanny valley" of almost LOOP-like, but definitely not LOOP-based
13:37:46
beach
kiliro: It is best to use the (HTML-ized) standard as a reference. For example the Nova Spec.
13:37:59
edgar-rft`
It's true that ANSI forbids us to redefine *anything* (including LOOP) in the COMMON-LISP package but people still can use the LOOP code in their own packages and extend it as much as they like -> https://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/iter/loop/
13:37:59
edgar-rft`
For example Rick Taube in "Common Music" uses a modified LOOP macro called PROCESS (to avoid name clashes) with heavily extended LOOP syntax to generate MIDI files. It's one of the the central macros in Common Music.
13:37:59
edgar-rft`
This won't help people who don't like the LOOP syntax but the myth is not true that the LOOP syntax cannot be extended.
13:39:37
jackdaniel
edgar-rft`: it is turing tarpit; you can pull any number of libraries to replace loop if you are willing to, or write your own construct, or even assume that it is MIT loop and extend it with factually existing macros
13:42:08
beach
kiliro: I think not. But you can ask gilberth who created it. It was created by him from the draft ANSI standard, which is freely available.
13:42:13
jackdaniel
kiliro: ANSI standard for common lisp is a copyrighted document, but before the process was finalized, the last draft was released as dpans
13:43:18
jackdaniel
while the copyright of converted document is, as stated on the website, belonging to Gilbert Baumann
13:46:58
jackdaniel
you may build your own version of dpans to pdf, there were even nice instructions for that
13:47:14
kiliro
but GNU documentation license is copyright but allows use, modification, distribution and redistribution
13:47:45
edgar-rft`
kiliro: don't worry too much, gilberth prefers free licenses - but the last word about it of course has gilberth, not me
13:48:35
gilberth
I hold the copyright of the HTML conversion I did. And of course you're free to browse it. But that's it, no additional rights granted.
13:50:17
gilberth
It says "Conversion to HTML copyright 2023 by Gilbert Baumann" and I think that suffices.
13:51:02
gilberth
Yes, it's converted from the TeX sources. Well, technically from an instrumented DVI.
13:51:04
jackdaniel
you may build documentation yourself: https://gitlab.com/vancan1ty/clstandard_build
13:52:56
aeth
The two most notable things to me that LOOP is missing (when it normally can do anything) is vector-collecting (although that's generally only useful if an element-type can also be provided) and handling multiple-values without first turning them into a list (but an implementation could optimize that idiom)
13:53:37
kiliro
the copyright which makes a work free as in freedom would say something like: "Conversion to HTML copyright 2023 by Gilbert Baumann. You are free to use thes work for any purpose, modify it, redistribute it or distribute it with modifications."
13:54:11
jackdaniel
kiliro: most people do understand what is free software and what are licenses, gilberth explicitly stated that he is not willing to grant such rights
13:55:24
aeth
The two weirdest things for me in LOOP are the syntax for hash table iteration (iirc e.g. being the hash-key) and the list destructuring (which is distinct from and less powerful than destructuring-bind; also, it doesn't do checking, unlike d-b, so you can't use it to essentially parse even-list-or-error to get cheap plist iteration)
13:58:08
yacin
if i need to iterate the key/value of a hash-table i always need to look up the syntax
13:58:39
beach
kiliro: I am afraid your only option then is the draft ANSI standard. It is available as TeX files and you can turn those into PDF or something like that.
13:58:39
jackdaniel
(loop for hocus pocus surely-it-is-something about hash-keys-on (table) with values-being x do)
14:00:24
beach
kiliro: If you are new to Common Lisp, I can also recommend #clschool, where people hang out specifically to help with language questions.
14:02:06
yitzi
As per usual, in reponse to LOOP complaints I'll leave this here: https://github.com/s-expressionists/Khazern
14:02:58
yitzi
And yes, it does vector accumulation and multiple-value destructuring. Although the latter is not in the docs yet.
14:33:49
jackdaniel
another inane thing in loop is how for-as-on-list treats non-lists, namely -- if it is atom then surely it is an empty list
14:34:21
jackdaniel
i.e I'd expect that it would (at least) complain when the argument is not a list
14:35:01
jackdaniel
most notably (loop for (a b) on #(1 2 3 4) by #'cddr do (print a)) will gleefuly do nothing
14:39:06
yitzi
Well, the spec requires ATOM to test the end. Probably since it allowed to be a dotted list. They probabably should have specified that a non-proper list was alowed.
14:40:53
jackdaniel
kiliro: where did you pick this weird capitalization of elisp? I've never seen it written like this
14:47:45
jackdaniel
lisp is abbreviation of "list processing", not processor; also if you want to capitalize each word, then it would be ELisP, not eLisP, nor eLiSp or whatnot
14:52:09
aeth
On the other hand, "Lisp" was often written "LISP" and sometimes still is, while "emacs" is often written all lowercase, although this is not the most common (Wikipedia calls the editor family "Emacs" with a capital-E).
15:18:55
aeth
Right or wrong in writing is a collective personal opinion (which changes over time or else we'd still be able to read Old English)
15:19:24
aeth
For instance, I'm kind of 50/50 on punctuation and on capitalization here, but there's a trend lately online of people writing longform blogposts entirely in lowercase as if they were chatting on IRC and it just doesn't work. It's just too hard to read.
15:19:34
kiliro
the proof is that most people do not speak Esperanto, even if it the most ordered language
15:20:19
jackdaniel
in any case linguistic convictions and refusal to admit being wrong are offtopic here, so let's move to lisp
15:21:06
aeth
Yes, #lispcafe is for arguing over language, grammar, etc., when the language, etc., is not standard Common Lisp
16:01:03
jackdaniel
fooling with opengl renderer in McCLIM: https://turtleware.eu/static/paste/f29b1cae-sdlgl.mp4
16:38:17
aeth
Interestingly, you can go from 2D to 3D in different ways; for instance, you can make a torus by rotating an offset circle.
16:38:34
aeth
Probably would be best done in a version of OpenGL newer than what McCLIM probably uses. Or maybe even in Vulkan.
16:43:35
jackdaniel
drawing 3d objects would be the easiest part for mcclim in spaceland. spatial relations, bounding cubes and projecting pointer to space/presentations would be more demanding conceptually
17:25:48
limiduality
jackdaniel: Any plans for a bigger project, using what you've been working on recently? WECL and what not
17:32:37
jackdaniel
I think that both McCLIM and ECL are bigger projects on their own terms; I'm also slowly working on other things, but there are only so many hours in a day
17:34:33
limiduality
Ah I was vague, sorry. McCLIM and ECL are definitely big projects, I meant bigger plans like developing a videogame
17:36:05
jackdaniel
I'm not that much interested in video games; I'm working on polyclot (interactive graphs) among other things
17:36:35
jackdaniel
recent improvements to text editing will enable me to also try some other things I had in mind
17:43:41
jackdaniel
including configurable completion, inlined accept results, more robust command line procesing and whatnot
17:48:10
jackdaniel
game development touches many interesting topics, I can imagine that it is fun. do you have a landpage for the game?
18:05:35
limiduality
Very much like Minecraft, I wanted to make a lispier version of it. I'm going to release it by the end of the year, if I stick to my new-year's resolution :)
18:26:08
cdegroot
There's no parenthesis on the blocks, how can you call it "lispier"? ;-). Awesome project! What are you using toolkit-wise? (I'm on a discovery tour for a game I'll be writing in the coming months. Errr... years).
19:22:35
limiduality
cdegroot: Toolkit wiiiise, I'm writing it in an old version of SBCL w/ slime, with cl-sdl2 and cl-opengl. cl-store for saving/loading, cbaggers' rtg-math and livesupport, along with Shinmera's deploy and precise-time
19:31:12
limiduality
cdegroot: Here, a glass block in some stone parens just for you :) https://imgur.com/a/oumjePh
19:37:24
Pixel_Outlaw
Also this is worth knowing about. http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/speope_block.html
19:39:13
Pixel_Outlaw
limiduality, I reproduced edgar-rft` s comment in full and it's valid code in Interlisp. The [ and ] are an autocomplete for parens so it works. ;)
19:41:07
limiduality
I can't believe I haven't used block a single time in writing my cool block game, hah
19:42:47
Pixel_Outlaw
Well, you don't need them in most cases directly because forms like defun have one already. This is why you can exit functions early.
19:42:56
aeth
BLOCK is a pretty good example of ordinary syntax highlighting not knowing the context
19:44:26
Alfr
limiduality, you probably have, unless you've gone out of your way to avoid defun, defmethod etc.
19:44:59
Pixel_Outlaw
It's a silent building ... block of higher level forms that need early exit. :)
19:45:16
limiduality
I'm sure I've used macros that expand to use BLOCK... Ah, LOOP, I use that one often.
21:08:12
jcowan
I actually ordered that at a coffee store because I couldn't remember the right name, and the guy laughed and said he knew what I wanted.
21:23:23
limiduality
Ohh, different coffee bean types. I only ever get preground these days, my ex kept the coffee grinder :`)
21:24:10
pl
I need to do deep clean on my coffee machine, BBotE however is essentially premade concentrate done through evil science
21:42:22
Pixel_Outlaw
limiduality, well currently revising my Common Lisp laser control code. Prior there was a serial model that consisted of sending GCODE to the controller then doing a read. All this reading takes up a good bit of the controller's time so now I'm moving to a model that counts tracks the size of the buffer in the controller's memory and sends GCODE until the buffer is filled keeping it always full.
21:44:06
Pixel_Outlaw
In order to maintain clean movement the controller prefers a mostly full buffer so it can plan acceleration and deceleration so it's' best to keep it nearly full as much as possible. I believe it looks something like 14 moves ahead.
21:47:23
Pixel_Outlaw
It's a 10 watt diode on a gantry. Useful for cutting thin material and also doing engraving/burning.
21:48:10
Pixel_Outlaw
I'm using cl-libserialport for the C drivers. https://github.com/jetmonk/cl-libserialport
21:50:58
Pixel_Outlaw
Yes, it's the kind of thing that can quickly hurt you if the beam somehow gets reflected at an odd angle.
21:51:29
Pixel_Outlaw
The example here I'm doing in CL. Particularly the stream.py one: https://github.com/grbl/grbl/tree/master/doc/script
21:53:01
Pixel_Outlaw
Once that CL bedrock is done I can focus on handling safty errors properly. I'm hoping I can us CL's condition system to send a shutoff call to the laser if ANYTHING goes wrong or has an error.
21:55:15
limiduality
CL is great for shrugging off errors though, definitely. I hope the project goes well :)
21:56:17
Pixel_Outlaw
Thanks, I'm essentially making some personal tools to replace Lightburn for small tasks.
21:57:15
Pixel_Outlaw
The program is excellent but it's closed source and right now I don't want to purchase it despite the cost.
21:58:22
Pixel_Outlaw
But to bring this back to Lisp, it is good to be able to export entire projects as s-expressions. And if I write a simulator I can query the engraving/cutting at any step to see if the project would go outside the machine limits or other such situations.
22:01:33
limiduality
And I imagine continuations would help with not restarting an engraving process if there's an error somewhere during the cut
22:02:28
Pixel_Outlaw
Yeah, if you want to do REPL stuff. But there is the small thing of the laser just sitting there turned on ... burning. :)
22:13:25
Pixel_Outlaw
aeth, yes. It does depend on the serial port getting that emergency stop call. https://support.easel.com/hc/en-us/articles/40531445916691-Grbl-v1-1-Real-Time-Commands
22:16:40
aeth
I mean, I'm not sure, but there are probably cases where it wouldn't be sent in time from CL? Maybe GC pauses?