<AeroNotix>
uiop:read-file-string on a 100mb file results in crazy high memory usage
<AeroNotix>
enough to exhaust the heap
<mfiano>
That would depend on the implementation.
<AeroNotix>
sbcl
<mfiano>
That explains it. SBCL uses UTF32
<AeroNotix>
mfiano: but surely that's only ~4x increase
<AeroNotix>
it's exhausing the heap entirely, which on this system is 1GB by default
<mfiano>
Plus all the imtermediary buffering and copying
<AeroNotix>
seems pretty over-the-top
<mfiano>
1GB is way too small. SBCL should really change that one of these days. It's not like it is allocated unless it is needed. I dedicate almost all 128G of mine
<White_Flame>
it goes through slurp-string stream, instead of reading the file length firsrt
<White_Flame>
the latter would be much smarter, but less abstract. I'd still do it though
<AeroNotix>
well it's just as well that I am cffi wrapping iouring, then
<AeroNotix>
I was just comparing with some off the shelf 'read file to string' thing
<AeroNotix>
surprising that it uses so much memory
<AeroNotix>
mfiano: good call, though
<AeroNotix>
mfiano: only 128G?
<AeroNotix>
Maybe RAM prices will come down so you can upgrade soon
<AeroNotix>
;)
karlosz has joined #commonlisp
<AeroNotix>
(setq inferior-lisp-program "sbcl --dynamic-space-size 256000") there we go
<White_Flame>
--dynamic-space-size yes
<AeroNotix>
lol
<AeroNotix>
tbf, would that be a useful option?
<White_Flame>
man, I wish all GC environments had a growing heap option instead of just fixed size
<AeroNotix>
$DAYJOB runs into this a bunch with toad.js
<AeroNotix>
it's annoying but can be useful in some cases
<AeroNotix>
but yeah I wish the default was to use all available memory, if needed, but an option to limit it
<AeroNotix>
Will sbcl try to run gc if it sees an allocation cannot be made with the currently available heap?
<AeroNotix>
didn't seem like it would, just now. Would need to test it specifically, but thought I'd ask first
<moon-child>
that's what most gcs do...
<AeroNotix>
yeah that's what I expected
<AeroNotix>
like I said, I would need to go back and specifically try but it did not seem to do it just now when I was seeing heap exhaustion
<AeroNotix>
i'll check it out later
<White_Flame>
SBCL runs the GC when the nursery runs out
<White_Flame>
how that operates per-thread, not sure
<White_Flame>
or I should say, how tha tinteracts with multiple threads, not sure
<AeroNotix>
I'm sure it's fine and I probably wasn't paying attention to the order of events
occ has quit [Read error: Connection reset by peer]
ebrasca has quit [Remote host closed the connection]
<dbotton>
Is there a way from a running CL program to tell slime/swank to pull up a certain file in the emacs session that is connected?
<Bike>
i think you can use eval-in-emacs to do anything in emacs. i don't know if there's a more convenient/specific way.
<dbotton>
ok, I'll play around a bit.
jeosol has joined #commonlisp
lisp123 has quit [Quit: Leaving...]
<pillton>
dbotton: There is swank:ed-in-emacs.
<dbotton>
That works for files :)
<dbotton>
now if I can do by symbol :)
<pillton>
You said "pull up a certain file".
<dbotton>
I know and that is perfect
<pillton>
Oh ok. I thought I misread something.
<dbotton>
Do you know how to do the equiv of M-.
<pillton>
I don't know, but I'd probably start with applying M-. to swank:find-definition-for-thing.
<beach>
Good morning everyone!
<ns12>
Good morning beach.
<dbotton>
bike and pilton thanks!
<Bike>
glad to be of service
<pillton>
dbotton: I'd also do C-h k M-. and have a look at slime-edit-definition.
<pillton>
Best of luck.
fitzsim has quit [Read error: Connection reset by peer]
fitzsim has joined #commonlisp
fitzsim` has joined #commonlisp
fitzsim` has quit [Client Quit]
hlz has quit [Quit: WeeChat 3.4]
Rue has joined #commonlisp
Rue has quit [Client Quit]
sjl has quit [Quit: WeeChat 2.2-dev]
mon_aaraj has quit [Ping timeout: 256 seconds]
mon_aaraj has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
semz_ has joined #commonlisp
semz has quit [Ping timeout: 245 seconds]
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
jealousmonk has quit [Quit: ERC 5.4.1 (IRC client for GNU Emacs 27.1)]
dec0d3r has quit [Quit: Leaving]
kathe has joined #commonlisp
<kathe>
good morning everyone. :)
serbest has joined #commonlisp
<kathe>
beach: will 'sicl' evovle from being a set of components for others to being a full common-lisp in itself?
Rue has joined #commonlisp
<Guest74>
any thoughts on user specified modifier keys and/or locks for keyboards? it seems at the kernel interface there's no difference between keys.
akoana has joined #commonlisp
akoana_ has joined #commonlisp
akoana has quit [Client Quit]
akoana_ has quit [Client Quit]
<kathe>
the 'repl' in 'cl' implementations should have some degree of the functionality of a 'cl' editor like "emacs" supporting features like parentheses balancing and syntax colouring.
akoana has joined #commonlisp
Rue has quit [Client Quit]
Rue has joined #commonlisp
<kathe>
it could go a step further by allowing function code to be pulled-in to the 'repl' editor and written-out of the same in the appropriate location in a file.
<kathe>
hmnn, that's one more idea i would love to work on after i've gained command over common-lisp.
<kathe>
i think i'll target beach's 'sicl' while utilising code from his "second-climacs".
<kathe>
beach: sorry to have bothered you. just read that 'sicl' *will* become a full implementation (https://sicl.common-lisp.dev/).
mon_aaraj has quit [Ping timeout: 256 seconds]
Bike has quit [Quit: sleep]
<kathe>
somehow the modal switching between code editing and 'repl' execution feels uncomfortable. maybe because i'm not used to it yet.
<kathe>
it should be modeless, i.e. the code editing should be integrated with the 'repl'.
<kathe>
the value of modelessness was imbibed into me by my mentor; mr raskin.
mon_aaraj has joined #commonlisp
s-liao has joined #commonlisp
<beach>
kathe: Yes, in fact, the components are currently not usable for a traditional implementation that starts with a "core" in something like C. The reason is that our modules use the full Common Lisp language.
<kathe>
beach: yes, i realised that. so will 'sicl' eventually need to be compiled from another common-lisp implementation to get a working system?
<kathe>
beach: just the way 'sbcl' is currently?
<beach>
kathe: I think the right thing is to have an IDE rather than adding IDE-like features to a very simple REPL.
<White_Flame>
well, C-x C-e can evaluate straight from a source code buffer
Guest74 has quit [Ping timeout: 256 seconds]
<White_Flame>
so you can keep expressions positionally in a file instead of in history at hte repl
<beach>
kathe: SICL is bootstrapped from an existing Common Lisp implementation, which is the most reasonable way of writing a Common Lisp system.
<kathe>
beach: i guess you're right about the 'ide' part. a better approach would be improve your "second-climacs" to improve the user experience while writing code.
<beach>
kathe: Yes, the idea for Second Climacs is to provide much better feedback than existing editors.
<kathe>
beach: count me in on your "second-climacs" project. but it will take me around 8 years from now to be productive. sorry about that, but with my learning disability, study progress is very slow.
<beach>
kathe: There is a paper by Krystof that describes how SBCL is bootstrapped. "SBCL, a Sanely Bootstrappable Common Lisp". It is not nearly as ambitious as the bootstrapping technique used by SICL.
<kathe>
beach: that paper appears to be by someone else; christophe rhodes.
<beach>
That is who Krystof is.
<kathe>
ah, okay.
<kathe>
why do people on 'irc' assume identity labels which are far removed rom real world?
<kathe>
my surname is "kathe" so i'm kathe on 'irc', and my website is "kathe.in".
<kathe>
simple, isn't it?
<kathe>
is there some kind of fear of repurcussions?
<beach>
kathe: "Krystof", "Christof", "Xof" are pronounced the same way.
<kathe>
beach: alternatively, could it be because those handles aren't available?
<beach>
kathe: And "beach" and "spiaggia" are just literal translations of my last name. It is just for kicks. Few people are trying to be real anonymous.
<kathe>
beach: just for kicks! :D
<beach>
A large number of people here come to ELS pretty much every year, so we know one another fairly well.
<kathe>
beach: are you of italian ancestry?
<beach>
No.
<beach>
In fact, a significant number of people here have come to visit me at home. :)
<kathe>
i thought spiaggia is an italian surname.
<moon-child>
kathe: I do not maintain strong anonymity, but I do try to make the link between my digital presence and my real-life one moderately weaker rather than stronger. Not using my real name as my IRC nickname is part of that
<beach>
kathe: "spiaggia" is just Italian for "beach".
<kathe>
beach: so which nationality is "strandh" from?
<beach>
Sweden.
<kathe>
ah, okay.
<kathe>
so "strandh" in swedish is associated with a beach?
<beach>
Swedish names are often references to nature, so "strand" means "beach" or "shore", but this is getting quite off topic, so let's leave it there.
<kathe>
beach: thanks. and you're right. stopping now.
<beach>
I'll be happy to talk more about IDEs and Common Lisp implementations, of course.
<kathe>
sure.
<kathe>
is "second-climacs" independent enough to earn it's own name?
<kathe>
i'll vouch for 'clide' "common lisp integrated development environment". :)
<beach>
It's a complete rewrite of (first) Climacs, so yes. The buffer representation is better, and (first) Climacs did not attempt to analyze the buffer contents.
<kathe>
beach: if 'clide' isn't already taken, could you please use it?
<kathe>
'clide' is simpler and neater. :)
<beach>
The IDE will likely be a bunch of independent components based on McCLIM. People have strong preferences of how their windows are organized, so that aspect should be flexible. We already have several components like an inspector, a backtrace inspector, etc.
<beach>
kathe: Second Climacs is not an IDE and won't be.
<kathe>
beach: just wait for me to be ready. i think i can contribute heavily to improve the "user experience".
<beach>
It will be just one of the many components.
<kathe>
beach: just read-up on "cannon cat" or "archie" editors.
<kathe>
i think it was "archy" editor.
<kathe>
beach: first rule of successful interface design is to reduce mental context switches as much as possible.
<beach>
The techniques for analyzing source code used by most editors won't be very useful for Common Lisp.
<kathe>
i used to have a one-handed keyboard in addition to my regular one because while working with smalltalk the context switching induced while moving the right-hand from the mouse to the keyboard was too much.
<beach>
I am not an expert in user interaction, but that's not the important part of Second Climacs. Since it uses McCLIM, that part can be easily replaced by any user.
<kathe>
beach: yes, that's one more part of the principle, the user-interface should be as easily modifiable on a per user basis as possible.
<beach>
The important part is the analysis of the code in the buffer, and how that result of that analysis is presented to the user.
<kathe>
beach: it's not just how well the presentation is for analysis, but also how natural it is for the user to "get back" in the game after analysis is over.
<kathe>
beach: every mental context switch is considered a penalty point. :)
<beach>
Er, what?
<beach>
There will be no beginning or end of the analysis. Everything will be analyzed at typing speed.
pranavats has joined #commonlisp
<kathe>
beach: yes. that would be *very* impressive.
tyson2 has quit [Read error: Connection reset by peer]
<kathe>
beach: but you do understand that the user moving his "attention" between writing code and noticing it's analysis is a "context switch".
occ has joined #commonlisp
<beach>
There is nothing I can do about that.
<kathe>
beach: just wait for me to get ready. :)
<moon-child>
I think the most problematic thing is a human<->computer round-trip. So long as explicit feedback is not needed to shift attention, I do not think there is a problem
<beach>
Sounds right. I don't plan for any feedback to impose any requirements on how the user proceeds.
<kathe>
moon-child: did you know the tooling used in microsoft visual studio while writing code; the drop-down code completion list, actually induces a context-switch?
<moon-child>
I have not used visual studio in any serious capacity
<kathe>
mr raskin beat me up on that point repeatedly, with a heated iron bar ;)
<beach>
kathe: I see absolutely no reason to take inspiration from Visual Studio.
<kathe>
beach: i'm saying the converse, "do not" get inspired by visual studio. :)
<beach>
I have never used any Microsoft product, so I'm safe.
Jing has joined #commonlisp
s-liao has quit [Quit: Client closed]
<kathe>
beach: most of my professional life was spent under microsoft visual c++. :)
<kathe>
beach: the advantage with 'clim' based 'ide' is one can break new ground.
<kathe>
while learning from the past (genera, interlisp, etc.).
<kathe>
okay, i gotta go take my dad to the neurologist.
<kathe>
see you all after 6 hours.
kathe has quit [Quit: Leaving]
aartaka has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
rain3 has joined #commonlisp
mon_aaraj has quit [Ping timeout: 240 seconds]
mon_aaraj has joined #commonlisp
ogamita has joined #commonlisp
rain3 has quit [Quit: Leaving]
mon_aaraj has quit [Ping timeout: 256 seconds]
ogamita has quit [Ping timeout: 250 seconds]
mon_aaraj has joined #commonlisp
<flip214>
ELS22 is still planned to be on-site, right?
<beach>
Yes.
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
xsperry has joined #commonlisp
<flip214>
thanks!
OlCe has joined #commonlisp
wacki has joined #commonlisp
Rue has quit [Ping timeout: 250 seconds]
mon_aaraj has quit [Ping timeout: 256 seconds]
hhdave has quit [Ping timeout: 250 seconds]
Rue has joined #commonlisp
mon_aaraj has joined #commonlisp
karlosz has quit [Quit: karlosz]
karlosz has joined #commonlisp
shka has joined #commonlisp
treflip has joined #commonlisp
Cymew has joined #commonlisp
<phoe>
flip214: both on-site and virtual
<flip214>
phoe: well, I prefer to be there, possibly seeing the Atlantic
pranavats has left #commonlisp [Error from remote client]
igemnace has quit [Read error: Connection reset by peer]
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
<flip214>
great, let'
<flip214>
let's have a nice time there
igemnace has joined #commonlisp
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
occ has quit [Ping timeout: 256 seconds]
mon_aaraj has quit [Ping timeout: 250 seconds]
mon_aaraj has joined #commonlisp
cage has joined #commonlisp
MajorBiscuit has joined #commonlisp
dre has quit [Quit: dinner with inlaws]
Cymew has quit [Ping timeout: 250 seconds]
mon_aaraj has quit [Ping timeout: 252 seconds]
mon_aaraj has joined #commonlisp
igemnace has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
<lisp123>
Is there a way to do `(.... ,@(append .. .. `,@[list] ..))
<lisp123>
the inner `,@ is illegal, so wondering if there is another way to achieve it
<lisp123>
hmmm ignore me for now, the problem is more nuanced
<jackdaniel>
,@(list* (append .. ..) ,list) ;?
<jackdaniel>
or `(... ,@(append .. ..) ,@list)
<flip214>
lisp123: if that matches your use-case, there's (alexandria:flatten (list ...))
<lisp123>
The actual problem is I have `(... ,@(append R O K R)) correctly becomes (R O K R)
Rue has quit [Quit: WeeChat 3.4]
<lisp123>
but K = (if (null 'something (:K K) nil)
Rue has joined #commonlisp
<lisp123>
so I need to splice it twice, the second time after if (null 'something) or whatever gets evaluated
<lisp123>
Example: (APPLY #'PROMPT-FOR-TARGET-STRING-WITH-CLIENT CLIENT (REMOVE NIL (LIST PROMPT IF DIRECTION (:DIRECTION DIRECTION) NIL)))))
<lisp123>
The IF DIRECTION (:DIRECTION DIRECTION) ... part is my issue, I need to merge (:DIRECTION DIRECTION) into the higher list that starts with (REMOVE NIL (LIST ...)
<jackdaniel>
assuming that (if (null …)) can't be evaluated at compile time and that you write it in a macro, then it is not possible
<jackdaniel>
because the list to be appended is not available at compile time
<lisp123>
Yeah I think I need to figure out another way to do it
<lisp123>
(hopefully there is one)
mon_aaraj has quit [Ping timeout: 250 seconds]
Rue has quit [Client Quit]
<lisp123>
because the list to be appended is not available at compile time -> unfortunately this is the problem
<jackdaniel>
that said, if you are intimate with what is passed, then you may expand to
<lisp123>
jackdaniel: Why did you say (sorry if I'm mistaken) earlier that you didn't like how CLIM mixed optionals and keyword parameters?
Rue has joined #commonlisp
<jackdaniel>
consider the function present, its lambda list goes like: (object &optional (object-type (ptype-of object)) &key stream some other options)
<jackdaniel>
now, usually indeed object-type is the right default
<jackdaniel>
but when I want to supply a different stream, then I need to always type (ptype-of object)
<jackdaniel>
what is braindead from the "defaulting" perspective
ogamita has joined #commonlisp
<jackdaniel>
especially that it is not such short function name, it is (presentation-type-of object) ;)
migap has joined #commonlisp
<lisp123>
thats true :)
<jackdaniel>
that said the fact that sbcl issues a style warning is also a hindrance, because when you have such lambda lists in the specification then you get style warnings you can only comment as "yeah, I know."
<lisp123>
I feel like the CL spec writers dropped the ball on &optional &key
<jackdaniel>
(because such lambda lists are very much in limit of the spec)
<lisp123>
*ducks*
<lisp123>
It's an aggressive style warning though
<lisp123>
Hopefully ECL is more nice :)
hhdave has joined #commonlisp
<jackdaniel>
hm, allowing mixing keyword and optional parameters was probably a decision to allow extending /existing/ software that has optional parameters with keywords
<lisp123>
Life would be much easier if &key was separate to &optional
<jackdaniel>
i.e you can't remove the optional part, but you may make the rest less annoying
<lisp123>
ah fair enough
<jackdaniel>
yes, that's the reason why this style warning is issues I suppose - to discourage doing that
<jackdaniel>
s/issues/issued/
<jackdaniel>
and not really "I suppose" - that's basically what I've been told by sbcl devs :)
<ogamita>
lisp123: but it is.
<ogamita>
lisp123: &key is used to parse &rest
<ogamita>
And would you discourage &optional with &rest ?
<jackdaniel>
yes, I would :)
Rue has quit [Quit: WeeChat 3.4]
<mfiano>
Is my guess that ogamita = pjb correct?
<jackdaniel>
yes
<Shinmera>
yes
<mfiano>
I win :)
<lisp123>
ogamita: No, &optional &rest are good together :)
Rue has joined #commonlisp
<flip214>
lisp123: if you don't know at compile time, you need to build the argument list at runtime.
pillton has quit [Quit: ERC (IRC client for Emacs 27.2)]
<lisp123>
But, I would've thought a better parser could have been written?
Rue has quit [Client Quit]
<lisp123>
But maybe I missed a step (worse one could have &optional &key without &rest, for those scenarios, don't collect &key into &optional)
Rue has joined #commonlisp
ogamita has quit [Ping timeout: 240 seconds]
Mandus has quit [Quit: WeeChat 3.4]
<lisp123>
flip214: Yup
<jackdaniel>
keyword arguments are on the other hand whole another problem
ogamita has joined #commonlisp
karlosz has quit [Quit: karlosz]
ogamita has quit [Killed (zinc.libera.chat (Nickname regained by services))]
MajorBiscuit has quit [Ping timeout: 256 seconds]
Rue has quit [Quit: WeeChat 3.4]
MajorBiscuit has joined #commonlisp
Rue has joined #commonlisp
ogamita has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
cosimone has joined #commonlisp
lisp123w has joined #commonlisp
<lisp123w>
the bigger issue which made my original comment wrong is there is already a minor overhead in parsing lambda lists
<lisp123w>
And any more advanced parsing will just slow down the system to allow edge cases to benefit
<lisp123w>
So I guess from that perspective it makes sense the way it is
ogamita has quit [Ping timeout: 256 seconds]
Rue has quit [Quit: WeeChat 3.4]
Rue has joined #commonlisp
OlCe has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 245 seconds]
Lord_of_Life has joined #commonlisp
jeosol has quit [Quit: Client closed]
<ns12>
Hello, suppose I use the REPL to define function F and G. Function F makes use of function G. If I compile function F, and later call function G from the REPL, will I be executing the compiled version of function G?
<moon-child>
most modern implementations compile all functions. Not sure exactly what you're asking, though, or why you would care if a function were compiled or not
<lisp123w>
Note that Re-evaluating F will not automatically re-evaluate G
<lisp123w>
And re-evaluating G means that every function that calls G gets the new version
<moon-child>
not if G is inlined
<lisp123w>
(unrelated but something I thought to flag)
<lisp123w>
moon-child: True :)
Rue has quit [Quit: WeeChat 3.4]
<moon-child>
(I assume that by 're-evaluating G' you mean 're-eevaluating the definition of G')
<ns12>
What do you mean by "re-evaluating"? Does it refer to a re-definition?
<lisp123w>
yes
Rue has joined #commonlisp
<phoe>
that's redefining, not reevaluating
<phoe>
you can evaluate a function object a real lot of times and it'll always return itself
<lisp123w>
Yes of course :)
<moon-child>
(loop for x = #'f then (eval x))
<lisp123w>
I meant reevaluating the defun form, but redefining is a better term
<lisp123w>
I'm just used to C-x C-e ;)
mon_aaraj has quit [Ping timeout: 240 seconds]
mon_aaraj has joined #commonlisp
attila_lendvai has joined #commonlisp
akoana has quit [Quit: leaving]
silasfox has joined #commonlisp
attila_lendvai has quit [Ping timeout: 256 seconds]
s-liao has joined #commonlisp
cosimone has quit [Quit: ERC (IRC client for Emacs 27.1)]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 250 seconds]
Rue has quit [Quit: WeeChat 3.4]
Rue has joined #commonlisp
Cymew has joined #commonlisp
random-nick has joined #commonlisp
Rue has quit [Quit: WeeChat 3.4]
Rue has joined #commonlisp
cosimone has joined #commonlisp
mon_aaraj has quit [Ping timeout: 240 seconds]
s-liao has quit [Quit: Client closed]
mon_aaraj has joined #commonlisp
s-liao has joined #commonlisp
treflip has quit [Quit: rebooting...]
treflip has joined #commonlisp
OlCe has quit [Ping timeout: 260 seconds]
s-liao has quit [Ping timeout: 256 seconds]
mon_aaraj has quit [Ping timeout: 256 seconds]
iamFIREcracker has quit [Ping timeout: 256 seconds]
mon_aaraj has joined #commonlisp
lottaquestions has quit [Ping timeout: 240 seconds]
OlCe has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
<dieggsy>
huh, I went to install CCL just to check out how it compares to SBCL and found it's not in fedora's repos
morganw has joined #commonlisp
serbest has quit [Quit: Konversation terminated!]
<jackdaniel>
it may be due to the sentiment some linux distributions have that packages need to be bootstrapped from C (possibly indirectly)
<jackdaniel>
while CCL is bootstrapped from its older version
Everything has joined #commonlisp
<jackdaniel>
sbcl doesn't have this problem because it may be bootstrapped from either clisp or ecl that in turn require only standard toolchain plus a few popular libraries as dependencies
<jackdaniel>
dieggsy: ^
<dieggsy>
jackdaniel: oh, interesting. well. that feels a bit purist? jaja. I guess I'll build it myself. thanks for the info
<dieggsy>
I suppose it's as good a time as any to finally figure out how to set up a copr repo
Guest74 has joined #commonlisp
<dieggsy>
ah i guess they also provide binaries
Bike has joined #commonlisp
<jackdaniel>
rebuilding it is still worth it
<jackdaniel>
working C-. for the implementation symbols is the prime reason
<dieggsy>
Ah true
iamFIREcracker has joined #commonlisp
OlCe has quit [Ping timeout: 240 seconds]
VincentVega has joined #commonlisp
tyson2 has joined #commonlisp
light has quit [Ping timeout: 250 seconds]
lisp123 has joined #commonlisp
mon_aaraj has quit [Ping timeout: 240 seconds]
mon_aaraj has joined #commonlisp
hhdave has quit [Quit: hhdave]
Mandus has joined #commonlisp
Guest4474 has joined #commonlisp
Rue has left #commonlisp [WeeChat 3.4]
lisp123 has quit [Remote host closed the connection]
s-liao has joined #commonlisp
<Guest74>
anybody know how case to jump table conversion works on sbcl? Do the clauses have to be linear and sequential?
<beach>
Let me see whether I understand this correctly. When we use ASDF COMPILE-OP, the FASLs resulting from the compilation are not loaded, yes?
wmblathers has joined #commonlisp
<Bike>
i think so?
<beach>
If so, then a system with file A and B in that order and where A defines a function the typical way, and B calls this function at compile time will not work. Right again?
<Bike>
yeah, i just tried compiling one of my systems and it's not loaded, but it's clearly been read etc
<jackdaniel>
a common gotcha is that this is transient. if system A depends on B, and you compile-op A, then B will be loaded
<jackdaniel>
this is *not* transient
ogamita has joined #commonlisp
<beach>
"transient" how?
<jackdaniel>
your compile-op will trigger load-op of your dependencies afaik
<jackdaniel>
so this assertion that compile-op won't load the system is true only for your system, not for your dependecies
OlCe has joined #commonlisp
<beach>
How is that "transient"?
<Guest74>
I get away with defining functions normally in a file preceeding a macro and have no problem with them being available at compile time.
<jackdaniel>
I've corrected myself a line below
<jackdaniel>
that "this is *not* transient"
lottaquestions has joined #commonlisp
<Guest74>
s/a macro/a macro in another file/
waleee has joined #commonlisp
aeth has quit [Ping timeout: 260 seconds]
<_death>
transitive.. "transient" means "temporary"
<jackdaniel>
ah, thanks, my bad then
Guest4474 has quit [Ping timeout: 256 seconds]
<jackdaniel>
yes, I've meant that it is not transitive to your dependencies
<beach>
Ah, "transitive". Now I understand.
aeth has joined #commonlisp
<jackdaniel>
a "false friend", in polish "przejściowy" have two meanings (it could be used as 'transient' and as 'transitive')
<beach>
Anyway, so it seems to me a bad idea for a system to do what I just described, i.e., define a function in A without (EVAL-WHEN (:COMPILE-TOPLEVEL) ...) and count on it being usable at compile time in B.
<jackdaniel>
if you do compile-op then this seems like a bad idea
<jackdaniel>
if you load the system then I don't know whether it first compiles all files and then loads them, or compile-and-load's them as it goes
<beach>
Yes, so I mean, the person designing such a system essentially rules out COMPILE-OP.
kathe has joined #commonlisp
<beach>
And that doesn't necessarily sound like a good idea. At least not if the system is meant to be used by others, like a library for instance.
<kathe>
hello everyone.
<jackdaniel>
if someone uses it as a library, then compiling your system that depends on that library will cause this library to be loaded
<beach>
Yes, I understand that, but that's not the use case I am currently interested in.
<Guest74>
isn't this how asdf is specified to compile files?
hhdave has joined #commonlisp
<beach>
Guest74: "this"?
<Guest74>
how you described, not what jd: is going on about.
AeroNotix has joined #commonlisp
light has joined #commonlisp
<kathe>
circumstances on home front now prevent me from continuing with computing.
<beach>
Guest74: That was my first question, so apparently, the answer is "yes".
<kathe>
i am thankful for the good exchanges we've had in our short association.
<kathe>
i will no longer be able to spend time here.
<beach>
kathe: Sorry to hear that. Take care!
<kathe>
sorry if i've bothered anyone, it wasn't intentional.
<AeroNotix>
uhhhhh
<AeroNotix>
drama?
<kathe>
beach: thanks. in particular, thanks for the exchanges we've had.
<beach>
Sure.
<kathe>
also thanks to "phoe".
<etimmons>
beach: I think it depends. Do you have :serial t? If so, then I'm fairly certain A's fasl will be loaded before B is compiled
<kathe>
goodbye. and may you all fare well. happy hacking.
kathe has quit [Client Quit]
<AeroNotix>
well that's a shame :(
<etimmons>
If you don't and the file components don't have a :depends-on list, then the fasls will not be loaded
<beach>
etimmons: Even with compile-op?
<jackdaniel>
etimmons: so compile-op will load all except for the last file if dependencies are specified?
<etimmons>
If B has a :depends-on (A), A's fasl will be loaded before B is compiled.
<etimmons>
I'm fairly certain. I can double check when my computer boots
ogamita has quit [Killed (zinc.libera.chat (Nickname regained by services))]
<beach>
etimmons: Let me re-read what you said.
<beach>
Wow, that's very surprising.
<beach>
... and it contradicts what Bike said, no?
<jackdaniel>
I've just checked, with two files with serial dependency indeed the first one is loaded (and the second one is not) during compile-op
<beach>
My expectation would be that ASDF would reuse the compilation and evaluation environments between all the files, but that no files would be loaded.
aeth has quit [Ping timeout: 245 seconds]
<beach>
Anyway, I must adjust my expectations and perhaps invent my own ?-OP.
epony has quit [Read error: Connection reset by peer]
aeth has joined #commonlisp
s-liao has quit [Quit: Client closed]
<etimmons>
Computer booted. I see the same thing as jackdaniel
<etimmons>
beach: Is there a portable way for it to reuse the environment?
<jackdaniel>
perhaps with-compilation-unit
<etimmons>
It uses w-c-u, but I thought that only deferred warnings
<jackdaniel>
either way, assuming that the function use wrapped in (EVAL-WHEN (:COMPILE-TOPLEVEL) …) and it is used by some exported macro, then when the lisp is restarted and the system is loaded, then this macro will complain that the function doesn't exist
<jackdaniel>
so indeed that's a bad idea
<etimmons>
A quick test using w-c-u (on SBCL, at least) shows that two compile-files don't share the same compilation environment
<jackdaniel>
then all what is left is either concatenating files (asdf has such functionality afair) and then compiling the result or adopting first class global environments in all implementations and feeding them to compile-op
<Bike>
"and it contradicts what Bike said, no?" i compiled my own system which has no external dependencies, so it probably just compile-op'd all the files in the system
<etimmons>
Or use POIU :P
<Bike>
and apparently i'm not missing any eval-whens, so that's nice
<Bike>
oh wait. spoke to soon, it did load some stuff
<Bike>
yeah, it just didn't load the last file. everything else seems to be loaded. sorry for the confusion.
<etimmons>
ASDF's source file concatenation leaves some things to be desired. It'll work on most systems, but not on systems that use an around-compile hook or assume the _package_ binding is reset between files
<jackdaniel>
I've put big fat '(PRINT "AAAAAAAAAAAAAAAAA")' and '(PRINT "BBBBBBBBBBBB")' in my files a.lisp and b.lisp
<jackdaniel>
that's how I've verified it
<jackdaniel>
only aaaa was printed ,)
<etimmons>
And I'm sure there are other corner cases where it'll fail
<jackdaniel>
then concatenate files but put each file in (with-asdf-file-unit (…) …)
<jackdaniel>
it will be very asdf.lisp-esque
<etimmons>
yeah, I think that's what needs to be done
<Guest74>
is there something like SUBSTITUTE to replace sequences, e.g. (substitute "ab" "ba" "abababa")
<phoe>
Guest74: cl-ppcre
<Guest74>
i should have prefaced, in the standard.
lambdart has joined #commonlisp
<beach>
etimmons: No, probably no portable way.
<Bike>
no. if the key and the replacement are the same length, you could maybe whip something up with SEARCH and REPLACE.
<_death>
jackdaniel: cool :)
<jackdaniel>
thanks
<Guest74>
oh, I have something. Just wondering if there was something standard. I've run into that before writing my own SEARCH.
<etimmons>
jackdaniel: That is very nice :)
<beach>
jackdaniel: I specifically stated that B used the function only at compile time.
<jackdaniel>
I see
Guest4461 has quit [Ping timeout: 256 seconds]
<beach>
Bike: Ah, yes, no dependencies would explain the observation.
<beach>
Thanks for all the information about ASDF COMPILE-OP. It does seem like I need to create a different operation.
Rue has joined #commonlisp
<AeroNotix>
jackdaniel: are you familiar with McCLIM?
<AeroNotix>
how would you compare it to something like Qt/GTK?
<jackdaniel>
a little, yes
<jackdaniel>
qt/gtk manage sets of widgets while mcclim manages commands and presentations
<jackdaniel>
and mcclim is more lispy :)
<AeroNotix>
I'd hope so!
<AeroNotix>
I love Qt personally, but I find using it from anything which isn't C++/Python to be extremely tedious
<jackdaniel>
qml is also an option
<AeroNotix>
I never got deep into QML. I should take another look some time
<AeroNotix>
I got out of the Qt game around Qt4
<jackdaniel>
in fact Paul Ruetz works on lqml right now (that is an offshot of eql5 without dependencies on runtime libraries if I understand correctly)
<AeroNotix>
I'll take a gander, thanks
<beach>
AeroNotix: jackdaniel is being modest. He is the main maintainer of McCLIM.
<AeroNotix>
:)
<AeroNotix>
I've seen a tonne of McCLIM screenshots over the years and there's just this great look n feel to them all that I really dig
<beach>
AeroNotix: If you can, I strongly recommend you try McCLIM. More users and more contributors would be a good thing for the entire "community".
<AeroNotix>
beach: you mean all 50 of us?
<AeroNotix>
beach: I will definitely give it a fair go
<beach>
50 is quite a decent number.
Rue has quit [Quit: WeeChat 3.4]
<AeroNotix>
is there anything like QtDesigner for McCLIM?
Rue has joined #commonlisp
<jackdaniel>
I've seen some mentions of such tools for CLIM (not especially for McCLIM), but I've never used one (I don't know where to look for them)
<jackdaniel>
that said having :reinitialize-frames t options gives "update frame on recompilation" behavior, so you have interactive C-c C-c mechanism
<AeroNotix>
jackdaniel: skimming through so far seems like the 'presentation' concept is an early iteration of MVC?
<jackdaniel>
perhaps? in mcclim you slap objects onto the screen and they retain their presentation-type
<jackdaniel>
so then when you have an input context that accepts i.e instances of the class rover, then "rovers" will be mouse sensitive
<AeroNotix>
does the presentation layer automatically update when domain objects update?
<jackdaniel>
you mean like change-class ?
<AeroNotix>
I mean sort of like how React operates
<jackdaniel>
I don't know how react operates
<AeroNotix>
some of the wording implies this might be the case
<_death>
you could marry mcclim and cells
lisp123 has quit [Ping timeout: 268 seconds]
<jackdaniel>
you may redisplay output records (and presentations are a kind of the output record), so you could plug something to update the screen on the model change that is not triggered by the command
<jackdaniel>
that said, the "traditional" way in clim to redisplay the screen is executing a command
OlCe has quit [Ping timeout: 256 seconds]
<AeroNotix>
got it, thanks
<jackdaniel>
like REPL, but Read(command)Execute(command)Display(screen)Loop
lottaquestions has quit [Quit: Konversation terminated!]
<jackdaniel>
if you try it and have questions then there is #clim channel for troubleshooting and bragging (sometimes mild chit-chat:)
<etimmons>
I recently added a bunch of Windows specific APIs to it
<AeroNotix>
etimmons: do you maintain it?
<etimmons>
I recently got commit bits, but wouldn't say I maintain it. That's luis
<AeroNotix>
oh... ok then..
<AeroNotix>
nvm
<AeroNotix>
there's a bunch of symbols which aren't exported for C structs
<AeroNotix>
at least not in a way that is documented/discoverable
<AeroNotix>
in particular for iovec
<AeroNotix>
iovec itself isn't exported
<etimmons>
Hmm. I've never used iovec myself, so it'd take me a while to get up to speed on what it's supposed to do/if it makes sense to export the symbols/etc.
<AeroNotix>
etimmons: it makes sense to export the symbols for sure :)
<AeroNotix>
iovec is the means through which you perform scatter/gather IO
<AeroNotix>
a lot of APIs require you to provide a pointer to an iovec array in order to perform scatter/gather IO
mon_aaraj has quit [Ping timeout: 256 seconds]
<AeroNotix>
and you need to be able to set the fields of the individual iovec structs
<AeroNotix>
so you need the iovec symbol, and the struct field symbols
mon_aaraj has joined #commonlisp
<AeroNotix>
additionally, another thing I don't understand is why it just sets the types to bare :pointer, rather than specifying the type of what the pointer is
epony has joined #commonlisp
<AeroNotix>
it goes miles to explain the API
<etimmons>
If you make an MR, I'd be happy give it a one over. I do suspect it'd be preferred to export accessors instead of the slot names directly, though.
<AeroNotix>
nah I'm good for making a PR
<etimmons>
Basically, I don't think the end user should have to use cffi:foreign-slot-value to access them
Tallund has joined #commonlisp
<AeroNotix>
accessors or slot-names, whichever. Just anything which makes structs defined in the package to ... be able to be used?
<etimmons>
Yeah, it definitely does look odd currently. It doesn't even seem to be used internally?
<AeroNotix>
etimmons: well you'd know if it was used internally if the c functions didn't just use `:pointer` as the types :)
<AeroNotix>
there are a bunch of functions in osicat which actually take pointers to iovecs
<AeroNotix>
readv/writev are the easiest to go learn about etimmons
<etimmons>
Huh. ok. I just searched for iovec and didn't see anything except the cstruct
<etimmons>
Thanks, I'll take a look
treflip has quit [Quit: rebooting]
<AeroNotix>
etimmons: from my pov if there's a system which is just a bare cffi wrapper, it should export literally everything
<Tallund>
Hi, the Woo package's github page states '[Woo] is still BETA quality', meaning what, in practice? After seeing the last commit was 8 months ago, I had it in my head that it is mostly complete and entered a sort of maintenance mode
<jackdaniel>
woo is a web server, I think that it is in a state that satisfies the author, but not as tested or polished as he'd himself would expect non-beta quality software to be
<jackdaniel>
s/is a webserver,/is a webserver?/
<etimmons>
AeroNotix: I agree in principle. But it seems osicat is largely trying to hide the fact that it uses CFFI from the user. I suspect it's because it originally used UFFI and may use another library in the future
<AeroNotix>
etimmons: hiding the fact it uses CFFI is different from hiding entirely useful symbols the package goes to the trouble of setting up
<etimmons>
for sure
<etimmons>
And after looking at it a bit more, I think accessors should be definitely exported
Tallund49 has joined #commonlisp
<AeroNotix>
cool
<AeroNotix>
it'll save me at least.... 50 bytes in my source code :)
cosimone has quit [Remote host closed the connection]
<Tallund49>
Ok, that's what I get for using a web app client like this one
Josh_2 has quit [Remote host closed the connection]
treflip has quit [Quit: ERC (IRC client for Emacs 27.2)]
epony has quit [Ping timeout: 240 seconds]
treflip has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
epony has joined #commonlisp
Dynom has joined #commonlisp
Rue has left #commonlisp [WeeChat 3.4]
<luis>
fe[nl]ix: can we go back to Launchpad? GitHub issues apparently makes it too easy for people to submit issues about the Python CFFI *sigh* :)
NotThatRPG has joined #commonlisp
<luis>
etimmons, AeroNotix: yeah, Osicat is meant to be a Lispy API and that is incompatible with exposing FFI guts.
<AeroNotix>
k
<AeroNotix>
luis: again though
<phoe>
luis: I can help with closing these if that's what's required
<AeroNotix>
that's completely unrelated to not exposing something the system explicitly sets up
<AeroNotix>
but feel free to just ignore me
<AeroNotix>
;)
<AeroNotix>
cffi or not, it's literally creating bindings to something and then.... not using them / exposing them at all
<AeroNotix>
but you do you tho
<AeroNotix>
you maintain it after all :)
<luis>
AeroNotix: the osicat-posix bits are a bit more low level. Seems sensible to export things that are defined, yeah.
<AeroNotix>
k
<luis>
AeroNotix: warning: if you submit too many patches you will become a maintainer too
<AeroNotix>
luis: nah I'm good
<AeroNotix>
too much drama
<luis>
and hatemail!
<luis>
phoe: no, it's fine. Just feeling nostalgic about Launchpad.
<AeroNotix>
You can set up issue templates
<AeroNotix>
in the issue template you can explicitly call out that the repo is not for Python CFFI
<AeroNotix>
additionally it might be worth just mentioning in the README that it is NOT for anything other than Common Lisp.
<AeroNotix>
and maybe a link to the Python CFFI project, too
<luis>
AeroNotix: good idea, if this happens again I'll do the template thing.
<luis>
AeroNotix: ... or I can start opening Lisp CFFI bugs on their project page so that they suffer too
<AeroNotix>
That doesn't seem like something a good citizen would do
<AeroNotix>
it's a shame they are named similarly, but I have no idea why you'd want to call your cffi functionality for a platform anything other than cffi
<luis>
>:)
Guest74 has quit [Quit: Connection closed]
OlCe has joined #commonlisp
OlCe has quit [Ping timeout: 256 seconds]
MajorBiscuit has quit [Quit: WeeChat 3.4]
pingpongball is now known as blacked
blacked is now known as pingpongball
pingpongball is now known as blacked
blacked is now known as pingpongball
pingpongball is now known as blacked
<phoe>
why do we not have a common domestic function interface for code that is actually pure CL
<luis>
The Lisp CFFI predates the Python CFFI by about 7 years FWIW
<phoe>
I am aware, but it does not answer my question
<phoe>
:D
* phoe
ducks
<AeroNotix>
phoe: I'm not sure I follow your question tbh
<phoe>
just making fun of the fact we have a Common Foreign Function Interface but we do not have a Common Domestic Function Interface
<AeroNotix>
oh ok
hhdave has quit [Ping timeout: 256 seconds]
blacked has quit [Quit: Client closed]
cosimone has quit [Remote host closed the connection]
Cymew has quit [Ping timeout: 256 seconds]
cosimone has joined #commonlisp
semz_ is now known as semz
raeda has joined #commonlisp
Oladon has joined #commonlisp
OlCe has joined #commonlisp
rgherdt has joined #commonlisp
treflip has quit [Remote host closed the connection]
migap has quit [Quit: leaving]
Tallund has joined #commonlisp
Guest443 has quit [Ping timeout: 256 seconds]
NotThatRPG has quit [Read error: Connection reset by peer]
NotThatRPG has joined #commonlisp
NotThatRPG has quit [Read error: Connection reset by peer]