freenode/#lisp - IRC Chatlog
Search
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/
21:03:00
ralt
Just putting this here, sorry if it's a bit spammy, but I think it's relevant. https://twitter.com/Crell/status/1346198039409647616
21:04:43
ralt
I don't want to be more spammy than necessary, that's a fyi, if the people lurk around in #lisp they'll see it