libera/commonlisp - IRC Chatlog
Search
19:54:44
Guest74
I really need to fix my recording functions. recording this https://youtu.be/zgXHWmBH00o has brought my laptop to a crawl. a single thread running an ffmpeg process shouldn't cause this should it? I wonder if sbcl is reading all the output? Shouldn't this slowdown go away after the thread is killed?
23:05:52
mister_m
Does CL have anything comparable to elixir's Enum.chunk_every? https://hexdocs.pm/elixir/Enum.html#chunk_every/4
23:13:28
Bike
nothing standard. serapeum has the case of count = step as "batches". other utility libraries might also.
0:19:06
Guest74
mister_m: There has to be an easier way. It's a three line loop if you don't care about adding elements or removing lists. 4 to remove lists that are less than count. And this mess is what I got for everything. https://plaster.tymoon.eu/view/2769#2769
0:46:41
Guest74
nested? if you mean the new lines it's so it doesn't run off the screen. I choose when or unless based on which I think reads better.
0:47:08
Bike
as in, after macroexpansion this will be like (setf current (typecase leftover ... (cons (setf current ...))))
0:55:10
rotateq
that this is no argument for it when you just think be "seeing" that it shall never happen. things are also by reading intention
0:58:49
Guest74
What do you propose as a solution. Can you give an example of how this would happen?
1:00:10
rotateq
i didn't say it's about anything that could happen, just the intention you give to your readers
1:00:53
rotateq
and no, i don't even have until now the right specification of what should clearly be done by the elixir thing
1:19:54
Guest74
I think you're missing collecting just the short chunk if I'm reading yours correctly.
2:39:46
Guest74
I think I used nil because I don't like typing empty lists. but that makes the code so much easier.
5:36:16
lisp123
Has the idea of (slightly after) compile-time determination of generic-function calls to the relevant specialised method been thought of in the past?
5:37:54
lisp123
In the event new classes are not added after compiliation, then each function call could be fully determined right after compile time? And if that is correct, then one could inline the actual methods vs. runtime determination
5:38:34
lisp123
Perhaps have like a marker for particular functions to say "hey dont worry about classes created at runtime, just inline these at compile time"
5:40:48
Nilby
Most things in CL, including CLOS, was designed with the idea and possibility that a "sufficiently smart compiler" could make it fast. So yeah. Not that it always works out.
5:44:07
lisp123
That would make sense. Until a new class is created during runtime, you can use the old specialisations and avoid having to recheck
5:45:11
Nilby
Compilers are allowed to inline things where they can, which is why all those redefinition warnings can actually be useful, becuase if the other uses aren't recompiled it could be using the old inline version.
5:45:18
edgar-rft
Classes still an be re-defined and inheritance order still can be changed, both at run-time.
6:00:58
beach
lisp123: Yes, one idea is "sealing" as heisig explains in his paper on fast generic functions.
6:01:25
beach
lisp123: Another idea is to alter the call site in some way when the generic function changes.
6:02:52
hayley
An inline cache avoids performing a full lookup almost all of the time, and still permits redefinition by "emptying" the caches.
6:03:39
lisp123
beach: Thanks! I will read these. I read bits of http://metamodular.com/SICL/generic-dispatch.pdf, but to be honest I skimmed to the unique number bit so maybe missed other parts
6:05:58
beach
Nilby: What does the standard say about inlining generic functions? I would be surprised if it were allowed to inline a generic function in the state it is in when the caller is compiled.
6:06:26
lisp123
hayley: I was looking at Swift which basically copied many of CL's ideas and renamed them. But instead of mixins, they would inline the code directly by synthesising the different components
6:07:15
hayley
ACTION waits for Swift to copy tracing garbage collection and multiple dispatch. Oh wait.
6:08:04
hayley
But "mixins" are a design strategy, and inlining is a compilation strategy. You could still program using mixins, if the compiler inlined everything.
6:08:27
beach
lisp123: I don't know Swift, but is it a dynamic programming language, by which I mean a language where the semantics are defined by a sequence of interactions in a global environment?
6:08:38
lisp123
hayley: Seriously, they go out of their way to rename things when its clear they took inspiration from CL. Blatant plagiarising, but then they hide a lot of their details so its a complete mess anyway
6:08:55
hayley
You might want to read <https://bibliography.selflanguage.org/_static/pics.pdf> on polymorphic inline caches.
6:09:46
beach
lisp123: In a static language, you have none of the problems you have in a dynamic language with adding methods at run time.
6:13:46
lisp123
beach: So I was wondering the value of giving people the option to specify certain methods not to be superceded by other methods defined at run time
6:14:23
beach
lisp123: It can have a great impact on performance, as heisig's technique takes advantage of.
6:16:06
beach
However, heisig is now convinced that my technique for call-site optimization will largely supersede his technique.
6:19:45
beach
So a "programming language" is a specification that determines the syntax and semantics of conforming programs as well as the result of some non-conforming programs.