freenode/#lisp - IRC Chatlog
Search
8:44:13
beach
I am still not sure whether your question was answered, but I hope you have some more hints. What was the reason for your question?
8:44:16
no-defun-allowed
Although hardly related, I have this opinion after a discussion with my favourite co-author about "Why Turtl Switched From CL to JavaScript" <https://lisp-journey.gitlab.io/blog/why-turtl-switched-from-lisp-to-js/>, in which the author was mainly stuffed, because they began writing asynchronous code, and had to either patch in, or completely rewrite, all this synchronous stuff that already existed.
8:46:07
frodef`
I do think CL have some warts and shortcomings. Warts like e.g. the sequence functions that I sometimes see as both awkward to use and incurs extra O(N) performance hits.
8:46:55
frodef`
beach: reason being general interest and trying to understand the SICL project, combined with my own related experience I guess.
8:48:36
beach
frodef`: The reason for the SICL project is that I wanted to improve on implementations, but not the language (for which I am not smart enough), but the improvements I could see would be unacceptable to maintainers of existing implementations.
8:49:36
beach
frodef`: In particular, I want to improve on development and debugging tools. I am always amazed when I see how some people here think Emacs+SLIME represent the best development environment around, no matter the language.
8:50:19
frodef`
beach: that brings me to antoher of my pet peevs, the lack of a recursive debugger/repl in SLIME.
8:51:47
beach
frodef`: I don't consider "staring at a backtrace when things go wrong" a "debugger". I want to be able to set breakpoints without recompiling the code, and I want to be able to step from a breakpoint.
8:53:21
beach
And, if I run ASDF from the SLIME REPL, I get no presentations to click on, and I get compiler messages as text that I then have to manually match to the source code.
8:53:41
mfiano
Sly stickers, and breaking stickers, are a vast improvement over the SLIME debugging experience, and print traditional "print debugging".
8:55:10
beach
mfiano: If the underlying Common Lisp implementations can't set breakpoints, I think there are limits to the possible improvements.
8:55:47
frodef`
phoe: well, maybe slime even works the way it should, but the "debugger" buffer gives me a very strong impetus to "get out of here!" immediately.
8:56:04
mfiano
Indeed. You don't have to tell me. I have seen your talks. I'm just saying there are better alternatives/companions to the "SLIME Debugger"
8:56:12
beach
mfiano: I also seem to recall some people here mentioning features that are missing in Sly that I often use.
8:56:34
phoe
frodef`: I see and understand; still, the REPL buffer is still working even with the debugger open
8:56:46
phoe
you can minimize the buffer or keep it elsewhere while you REPL your way out of the error
8:57:02
phoe
and only then hit some restart in the debugger window, or manually INVOKE-RESTART in the REPL to make it disappear
8:57:17
fiddlerwoaroof
frodef`: as far as the O(n) issues with sequence functions, most of those are solvable
8:57:25
beach
mfiano: I can't remember what it was. I just saw someone mention it as lacking is Sly, and I recognized that I used it.
8:58:04
beach
frodef`: So, I suggest that, instead of trying to improve the language, you use your experience and knowledge to help create a better development environment.
8:58:08
mfiano
The only thing I can recall off hand that is lacking in Sly over SLIME, is a contrib for SBCL's statistical profiler.
8:58:49
beach
mfiano: Maybe I should just try Sly and let you know when I wanted something that is missing.
8:59:07
phoe
it'll be available tomorrow evening and I'll post it on Reddit once it's made available
8:59:24
mfiano
Sly is forked off of SLIME with nothing really removed, just features added and bugs fixed that weren't in the interest of SLIME. Of course, there are probably some exceptions to this, which I cannot recall off hand.
9:00:24
phoe
someone asked me for an interview about the Common Lisp condition system and it turned out to be an interview about Common Lisp in general
9:00:41
phoe
and the video will go public tomorrow, showing off my majestic technical screensharing setup too
9:05:36
mfiano
One nice feature of Sly, is a function which can be used to send arbitrary data to the REPL from CL. I use this in a game engine to be able to cast a ray through 3-space where the mouse cursor is, and return a CLOS instance of the first object intersecting that raycast, so "mouse picking" in a projected 3-dimensional space.
9:08:43
mfiano
I have a game engine I've been working on for years, that takes a lot of inspiration from Unity (and fixes a lot of its mistakes [and admittedly creates more still])
9:10:28
flip214
mfiano: I'd love to have something unity-like (but not too like it ;) in CL... that could enable quite a lot of quick game ideas
9:14:01
mfiano
Sadly my game engine is not documented yet, and aimed at professional-quality games, not quick prototypical projects. Its focus is on interactivity, thus removing the need for an "editor". For example, there is a rather complex DEFINE-PREFAB macro that can be used to describe arbitrary sub-trees that can be instantiated or spliced into other sub-trees to be instantiated with them. C-c C-c'ing any of
9:14:03
mfiano
these as a game is running is an easy way to redefine large portions of the game. There is a DEFINE-* form for everything actually, including individual GLSL shader functions.
9:15:24
frodef`
phoe video: "... why don't everybody do this if it has been known for a long time?", indeed.
9:16:40
no-defun-allowed
And, of course, they know the answer is because no one wrote a paper detailing the denotational semantics and underpinning by the lambda calculus or something like that.
9:18:48
no-defun-allowed
(But actually, someone told me that without the presence of state, having the dynamic environment doesn't matter. Also, aren't they supposed to not have bugs or something? I'll stop now.)
9:19:55
mfiano
flip214: The problem is it's a lot of work, as evidenced by working at it for about a decade now, and while it can be used to make games currently, it is still far from ready. The sad part is, even with a complete game engine that is general-purpose enough for the kind of game you want to make, game development is an even longer process. Just the playtest-tweak feedback loop could take a year or
9:19:56
mfiano
longer, and that's after all the game logic, assets, have allocated a lot of time. I wouldn't advice anyone to make an engine if that are looking to make a game, heh.
9:20:32
mfiano
Yes it is, but I wouldn't recommend using it yet, not that it'd make much sense, being such a large codebase and without documentation yet.
9:21:08
frodef`
no-defun-allowed: the idea that a software system should not be designed on the assumption that there are no bugs, seems to be lost.
9:25:13
mfiano
It's quite a large project, and has been refactored several times, and I still wouldn't call it the nicest code I've written. Just the math support library is 15hloc and growing, which is quite a lot for Lisp.
9:27:16
flip214
mfiano: well, make it a well-known project and hope for volunteers to help clean it up?!
9:28:40
mfiano
My goal right now is to add some of the missing features that are absolutely needed, so that I can finalize its API and begin documenting it. Only then can I advertise or recommend its use
9:30:52
mfiano
I was prepared to give a talk on phoe's stream soon, but I decided against that, as I really want to stabilize it first (sorry phoe).
9:32:44
mfiano
I might consider giving a theory talk on why I think CL is the best language for gamedev, but as far as demonstrating my project(s), I don't think that is a good idea.
9:40:58
phoe
frodef`: https://github.com/slime/slime/blob/fb12bac676ab51b75be19197e21ab4674479d627/contrib/slime-repl.el#L1491-L1493
10:01:41
beach
Like I said, phoe's written English is quite good, and he has only a few major quirks, so I think there is hope. :)
10:02:38
beach
For speakers of German pronouncing English `v' as an English `w' I have much more work to do. :)
10:06:48
flip214
My daughter opines that I've committed some major faults in her (and her siblings) education, being too sincere or outright and similar stuff
10:12:15
beach
flip214: I see huge differences in my students, with respect to the willingness to learn and to be humiliated and embarrassed (which is an essential part of learning). My estimate is that phoe prefers to learn and that he can deal with humiliation and embarrassment, especially since he knows me and my intentions.
10:12:40
beach
For your offspring, you need to tread carefully according to the attitude of each one.
10:21:08
flip214
beach: most of that is just good-natured leg-pulling... and everything that we've done wrong it's too late to change now anyway ;)
10:27:51
ralt
I personally think the "praise in public, blame in private" motto is not a too bad one
10:28:14
ralt
especially for things like correcting english, doing it in PM isn't too much of a chore, and would potentially avoid the off-topic in #lisp ;-)
10:29:24
flip214
but then all the other people couldn't learn at the same time, increasing beach's work by a factor > 1!
10:35:20
beach
phoe: This interview is an excellent exposure of Common Lisp to (I assume) people who did not yet know much of it.
10:45:24
beach
Number the symbols, or at least the ones that are bound. Provide a thread-specific slot in the thread object. Put old values on the stack.
10:47:12
beach
So access to a special variable is: Go to the thread object, and index the vector with the symbol number.
10:49:22
phoe
if the thread-specific slot is EQ to some unbound value, visit the thread-independent global value stored somewhere?
10:52:44
beach
Yes, I think the phrase is "binds it and then makes it unbound" or something like that.
10:52:54
phoe
> progv creates new dynamic variable bindings and executes each form using those bindings. Each form is evaluated in order.
10:54:10
beach
If too few values are supplied, the remaining symbols are bound and then made to have no value"
10:55:16
phoe
oh well then, s/some unbound value/some marker value that is different from the unbound value/
10:55:28
beach
So you can have a recent binding with no value shadowing a less recent one with a value.
11:01:17
ralt
the fact that handlers are just functions that are called normally at this part of the stack
11:04:08
phoe
(with-shameless-plug (princ "that's a sneak-peek of the contents of TCLCS, if you ever decide to read it"))
11:07:43
beach
phoe: I don't know the interviewer, but I take it it's about functional programming, usually, yes?
11:08:46
beach
But let me say this again. Excellent plug for Common Lisp. And the ease with which you manipulate the development environment is bound to impress them.
11:09:04
phoe
beach: yes, this person comes from the functional programming community and was interested by TCLCS and Lisp in general
11:09:17
phoe
I mentioned to him that Lisp isn't really functional, but he wanted to discuss things anyway
11:28:44
ralt
actually, how is a retry restart not going down the stack if it's just a normal function?
11:30:07
ralt
if you execute a restart handler, and you pick "Retry", the naive way would be to call the function again
11:30:22
phoe
the whole magic of the condition system is because we have UNWIND-PROTECT and TAGBODY/GO/BLOCK/RETURN-FROM
11:31:03
phoe
you could take a look at https://www.youtube.com/watch?v=V4P9lFK79hQ where I describe the topic - both halves of the video should be of interest to you
11:44:17
phoe
I've showed it to several people and the general reaction was either "wow you can do that in Lisp?" or "wow you can do BASIC in Lisp?"
11:46:01
phoe
there are more contrived examples to be shown, including LOOP expansions (which I did in the video), but IMO it's important to start with something as simple as possible
11:54:33
flip214
so we need to have some similar-to-python snippets for such videos in 20 years, when The Next Generation has taken over
12:01:05
flip214
Krystof: as I invested in having kids, it better not stop turning until that has paid off!
12:05:06
flip214
really? I haven't been to the UK for more than switching between planes, but there's this joke about Canada...
12:07:06
ralt
I live in another part of France, those calling it "chocolatine" are considered heathens around here :p
12:09:13
beach
flip214: I see you are set on starting two off-topic discussion with short intervals.
12:14:30
phoe
well, he should join, I'm kinda curious about French breakfasts but I don't want to make #lisp participants hungry by discussing foodstuffs here
12:37:46
flip214
https://www.twitch.tv/elsconf/videos?filter=all says "ELSConf is offline" and there are no videos... are they somewhere else?
12:51:08
ralt
I had to use it recently to do ancillary data with sockets, SOCKINT was already providing unexported symbols for msghdr structures
12:54:48
varjag
usocket's way of broadcast works fine on ccl and sbcl i think, so there's no need to fiddle
13:27:55
SpaceIgor2075
Okay, thanks. Joining irc channels makes me forget that i can just rtfm indtead of asking basic questions :)
14:22:14
SpaceIgor2075
It seems my project name was so complicated i typed it with typos and asdf didn'r work. Tip for the future: don't use project names that are too complex
14:25:16
shinohai
Interesting thread this morning, I've been looking into methods for producing binaries. linux-packaging tool looks neat but I just can't overcome my distaste for Docker to make it useful in my case.
14:26:13
dim
for managing an easy to reproduce env to produce binaries, it looks pretty well suited for the task
14:28:47
shinohai
Producing actual *fully static* binary that will run irregardless of system still pipe dream I suppose.
14:51:26
SpaceIgor2075
SBCL says ; Evaluation aborted on Component #:CL not found, required by #<SYSTEM
15:09:01
ralt
shinohai: as I was saying in #sicl a few hours ago, I think sbcl recently got some fixes to work with musl, so static binaries might be possible now. Haven't played with it yet.
15:10:28
ralt
that said, you can already do some pretty cool stuff like statically linking sqlite https://gitlab.com/ralt/ballish/-/blob/master/ballish.asd#L12
15:12:12
shinohai
ralt: oh neat, didn't know sbcl got some musl fixes, ~year ago I managed to get 1.5.7 patched together to work on musl system, still using it.
15:31:41
SpaceIgor2075
Is there a builtin way to make executables in clisp, like sb-ext:save-lisp-and-die in sbcl?
15:33:52
phoe
SpaceIgor2075: https://gitlab.common-lisp.net/asdf/asdf/-/blob/master/uiop/image.lisp#L364-373
15:37:07
ralt
actually, here is the recommendation: https://github.com/fare/asdf/blob/master/doc/best_practices.md#delivering-an-executable
15:55:53
phoe
also, what do you mean, components and depenencies? this will require foobar to be loaded before this is system is loaded
15:56:09
phoe
and loading foobar requires its dependencies to be loaded, and then its components to be compiled and loaded, too
15:56:28
phoe
so I guess, yes... but I wonder why you need a separate system for building executables
15:56:53
phoe
I guess that build-operation, built-pathname, entry-point can all be specified in foobar itself, unless you have other issues
16:06:13
SpaceIgor2075
It works. I'm so happy. Are there newbie guides on doing stuff with a lisp program while it runs in slime?
16:07:00
Xach
SpaceIgor2075: i find it helps to think of the lisp program as a thing to which you connect, and which you extend incrementally with new functions, types, data, etc.
16:07:58
Xach
it's not something you design, start, it runs and completes, and you think about what you want different for the next time.
16:08:31
Xach
start, design, add pieces, run pieces, design, add more pieces, run more pieces, design, etc
16:10:07
Xach
Hmm, I'm not sure what might be available, sorry. I think the SLIME video might have some examples (it's pretty old but the concepts are not outdated)
16:12:54
tyson2
I am using the free book Practical Common Lisp, which uses sbcl and slime by default, seems to work well. Just set up Slime a couple of weeks ago.
16:14:44
SpaceIgor2075
I'm talking about this thing: https://stevelosh.com/blog/2018/08/a-road-to-common-lisp/#s16-lisp-as-a-system
16:18:49
SpaceIgor2075
Xach, phoe: Thanks! Now, finally, after a week of messing with emacs, slime, sbcl and cl i can start trying to make my tiny game
16:25:31
scymtym
fiddlerwoaroof: https://github.com/s-expressionists/Eclector/tree/documentation-listings and https://github.com/sharplispers/linedit/tree/syntax-highlighting should be enough to try the syntax highlighting stuff
16:26:07
scymtym
fiddlerwoaroof: i didn't manage to clean up as much as i wanted so all of this is subject to change
18:55:31
phoe
SpaceIgor2075: I do some livecoding in a video that comes live tomorrow at https://www.youtube.com/watch?v=pkqQq2Hwt5o
18:59:40
VincentVega
is there some placeholder symbol which wouldn't give the unused warnings in functions? is "-" ok?
19:03:11
phoe
it's a dynamic variable, meaning that if you name a function argument with that symbol, it'll audorebind it
19:04:10
phoe
so, (defun frobnicate (foo bar baz) (declare (ignore foo baz)) ...) is what I consider the best
19:05:59
phoe
and when you decide to actually use the arguments in your function body, you need to modify only the ignore declarations.
20:18:33
aeth
VincentVega: You can write a macro which replaces each _ with a new gensym, saves those gensyms into a list, and then adds an implicit (declare (ignore ,@gensym-list)) at the start.
20:20:18
aeth
It might be useful for certain advanced macros that might do actions on otherwise-ignored things, where it could instead do (declare (ignorable ,@gensym-list)) instead.
20:20:55
aeth
(i.e. it's not used in the user code, and it may or may not trigger the macro processing that uses it in the macro's code)
20:30:00
VincentVega
aeth: I see what you mean. I don't have macro code needing that yet, but i will keep this possibilityin mind!
20:41:21
phoe
okay, tomorrow at 18:00 CET is the official premiere of this Common Lisp video. https://www.47deg.com/academy/2021-01-05-immutable-conversations-common-lisp/