Xach changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook>
<dieggsy> So i'm looking at some code that loads a BUNCH of files and runs some lisp in them (in runs eval, which may be relevant?). and i tried to parallelize it with threads. in the parallel version, the functions it tries to eval don't pass fboundp, where they do in the sequential version
<dieggsy> does that.... make any sense at all, or is this code just an absolute mess
<hayley> Yes, don't parallelize unless you know what dependencies there are.
<hayley> Yes to the latter, rather.
<dieggsy> yeah, i have to investigate more deeply and i'm not at all experienced with threads, it just struck me as a bit odd
attila_lendvai has quit [Ping timeout: 248 seconds]
<dieggsy> *no-defun-allowed*: wait, do you mean file deypendencies?
<dieggsy> i know for a fact everything is defined and bound before loading any of the files
<dieggsy> so what could cause the condition where the individual threads see the symbol as unbound?
<dieggsy> the files themselves don't define any new lisp, it's just 2-3 forms each (some-function arg1 arg2 ..)
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life_ is now known as Lord_of_Life
dlowe has quit [Remote host closed the connection]
<pjb> dieggsy: uiop was a parallelising asdf proof of concept IIRC.
<dieggsy> pjb: wait what
<pjb> poiu I mean. https://github.com/fare/poiu
<pjb> With idiotic names, it's harder to remember them correctly…
<dieggsy> pjb: oh. this isn't a build
<dieggsy> we're using read to load in a bunch of forms, checking if the car is fboundp, and eval-ing them
<dieggsy> i'm not sure exactly why this is being done, but that's the way it is lol
<pjb> dieggsy: doesn't matter: you need to define the dependencies between the file.
<dieggsy> pjb: i don't follo
<pjb> You can use asdf:load-source-op; I guess there's something similar in poiu?
<pjb> If you use your own "load" function, I guess you an define your own asdf operation.
<dieggsy> pjb: i'm lost. why would a lisp form you read have to do with asdf ?
<dieggsy> read at runtime
<dieggsy> as in, the file has (princ 4), we read that into '(princ 4) as form, check (fboundp (first form)). i'm not arguing, i'm just trying to explain myself better because i'm lost lol
<dieggsy> in this case it's not princ though, it's some-function that's already defined in the environment though
<pjb> First, you said "load a bunch of file". We assume it's with CL:LOAD.
<dieggsy> pjb: correct, that's imprecise language on my part, my bad.
<dieggsy> then i still used the word load the second time around, which didn't help. again my bad lol
<pjb> Now, if you're sure that all the functions are defined before you start reading the files, ie. you don't have file containing any function call such as: (define-a-new-function 'foo '(x) '(+ x 2)) with another file containing (foo 40) then ok, there may be no dependencies between your files.
<dieggsy> i'm sure
<pjb> But then, how do you explain it works in serie, but not in parallel?
<dieggsy> pjb: and it's not cl:load, it's cl:read and cl:eval
<pjb> If it didn't work at all, we could consider it's a problem of *package* not set correctely.
<pjb> dieggsy: basically, (defun load (s) (loop (eval (read))))
<dieggsy> eh, more or less
<pjb> So if you define your own load function, and you have files with dependencies, then you can put those depedencies in an asd system, and define a my-load-op asdf operation, and use asdf to load them.
<pjb> and poiu to load them in parallel.
<dieggsy> what?
<dieggsy> but that doesn't seem to explain why it works in series but not parallel heh
<pjb> Exactly.
<dieggsy> exactly.
<pjb> So providing your code and files, would be the next step to get help debugging it, but now I'm going to bed.
<dieggsy> it's a mess, i won't fill the channel with more noise before trying to look into it further
<dieggsy> pjb: good night, and thanks for the info always
<pjb> You may have it on git?
makomo has quit [Ping timeout: 240 seconds]
<dieggsy> pjb: nah, it's work code that someone else wrote. i can't share it and even if i could oh boy is it just a bunch of spaghetti lol
<pjb> well, check *package* is set correctly, as well as (readtable-case *readtable*) and check you really defined the functions.
<pjb> You may try by qualifying the symbols in the files too.
<pjb> If you generate them, a way to do it easily is to bind *package* when you write the file to a new empty package (let ((*package* (make-package (gensym) :use '())) (*print-readable* t)) (write-file "foo.data"))
<dieggsy> i'm pretty sure package is set correctly
<dieggsy> hmmmm
<dieggsy> would read have any reason not to read into the same package lol
<dieggsy> anyway, thanks for the extra info
<dieggsy> huh, maybe package isn't set correctly.
<dieggsy> but only in the parallel version
<dieggsy> ah, yeah (bt:make-thread (lambda () (print *package*))) -> CL-USER.
<dieggsy> *package*, i mean. matrix is swallowing my asterisks
<mfiano> It isn't. Formatting is not stripped away in a proper IRC client.
<moon-child> you did have * on your package
<moon-child> at least in irc
<moon-child> mfiano: the irc server, on the other hand--
<dieggsy> oh, good. thanks
* moon-child note the conspicuous +c mode on #commonlisp
ln43 has joined #commonlisp
<White_Flame> dynamic bindings could be another thing that's lost when you start threading stuff
<dieggsy> White_Flame: incredible, i did not know that lol
<dieggsy> that makes this entire effort pretty futile. i'd have to reorganize the CRAP out of this code
Oladon has quit [Quit: Leaving.]
contrapunctus has left #commonlisp [#commonlisp]
tophullyte has joined #commonlisp
ln43 has quit [Ping timeout: 248 seconds]
prxq has quit [Ping timeout: 252 seconds]
prxq has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
elf_fortrez has quit [Ping timeout: 246 seconds]
john__ has joined #commonlisp
esb has joined #commonlisp
gaqwas has quit [Ping timeout: 252 seconds]
Oladon has joined #commonlisp
waleee has quit [Ping timeout: 250 seconds]
<beach> Good morning everyone!
wilfred has joined #commonlisp
prxq has quit [Ping timeout: 252 seconds]
prxq has joined #commonlisp
taiju has quit [Ping timeout: 250 seconds]
semz has quit [Ping timeout: 250 seconds]
tophullyte has quit [Quit: Leaving]
asarch has joined #commonlisp
asarch has quit [Client Quit]
semz has joined #commonlisp
contrapunctus has joined #commonlisp
taiju has joined #commonlisp
Bike has quit [Quit: Lost terminal]
rain3 has joined #commonlisp
khrbt has quit [Ping timeout: 250 seconds]
khrbt has joined #commonlisp
taiju has quit [Ping timeout: 250 seconds]
Oladon has quit [Quit: Leaving.]
shka has joined #commonlisp
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
pve has joined #commonlisp
akoana has quit [Quit: leaving]
amb007 has quit [Ping timeout: 250 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 250 seconds]
amb007 has joined #commonlisp
taiju has joined #commonlisp
taiju has quit [Ping timeout: 250 seconds]
lisp123 has joined #commonlisp
lisp123 has quit [Quit: Leaving...]
wilfred has quit [Quit: Connection closed for inactivity]
makomo has joined #commonlisp
john__ is now known as gaqwas
mjoerg has joined #commonlisp
mjoerg has quit [Remote host closed the connection]
hendursa1 has joined #commonlisp
hendursaga has quit [Ping timeout: 276 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<beach> I am looking at Baker's paper "Metacircular Semantics for Common Lisp Special Forms", and in his emulation of CATCH/THROW using BLOCK/RETURN-FROM, he uses PROGV and SYMBOL-VALUE. I can't see any difference between that and just binding *CATCHERS* using LET. Can anyone else?
asarch has joined #commonlisp
cosimone has joined #commonlisp
<beach> So my question is: Isn't (progv '(*var*) (list (cons <exp> (symbol-value '*var*))) ...) the same as (let ((*var* (cons <exp> *var*))) ...) ?
<rain3> they are not the same, no
<rain3> I mean in general. For catch/throw, I don't know if it matters
<beach> They look identical to me. In every possible situation.
<rain3> you mean in every situation in general? or in every possible situation for catch/throw
<beach> In general.
<rain3> the article above, shows how they differ
taiju has joined #commonlisp
<beach> I know how PROGV and LET differ. But in this case, there is only one special variable and its name is known at compile time. That is the case I am interested in.
<rain3> ok
<moon-child> rain3: the question is, comparing the two forms beach showed, given any value for ... and <exp>, but with some fixed *var*
<beach> Exactly.
<rain3> got it
attila_lendvai has joined #commonlisp
<rain3> I was in the middle of something, so I missed that detail, thanks
<beach> Also, why does Baker do a (MULTIPLE-VALUE-LIST ,EXPRESSION) at the end of CATCH?
<beach> This makes no sense to me.
<beach> Oh and his CATCH allow for a single expression, whereas Common Lisp CATCH can take an arbitrary number of expressions.
<pjb> dieggsy: (bt:make-thread (function your-thread-function) :initial-bindings (acons '*package* (find-package "THE-PACKAGE-YOU-WANT-TO-READ-IN") bt:*default-special-bindings*)) ; or use LET to bind *package* in your-thread-function.
<pjb> beach: progv let you compute the name of the variable at run-time. Now if he uses a literal variable name, indeed, no difference.
<beach> pjb: Thanks for confirming that I am not going mad (yet).
<pjb> For the multiple-value-list, I guess it's a copy/paste error from the previous code.
psycomic has joined #commonlisp
<beach> AH! That makes sense.
<pjb> That said, unless you're doing code golfing, even a minimal implementation may choose to avoid too much folding onto a single operator. Unless of course you consider the use for setjmp/longjmp to be the single eventual operator for all the non-local exits ;-)
<beach> My plan is to clean up this code, and not use a special variable, but my list of dynamic-environment entries. And my plan is also to do better error checking and reporting if there is no valid catch tag.
<pjb> Also it depends on what tool you have to perform optimization. If you have a good IR optimizer, it may not matter how you transform the code at the sexp-level, it'll be transformed and optimized out the same in the IR level. But if you don't have it, it may be preferable to avoid folding, to be able to optimize each operator as much as possible.
<pjb> It can still be a great inspiration indeed.
<beach> Sure, but I will say the same thing as I did yesterday in #sicl. CATCH and THROW are not used very often, and when they are, they are costly (at least THROW is) anyway, so I don't think they need to be optimized.
shka has quit [Quit: Konversation terminated!]
<pjb> Of course. I was thinking more about let/let*.
<beach> Oh, OK.
asarch has quit [Quit: Leaving]
cage has joined #commonlisp
okflo has joined #commonlisp
okflo has quit [Client Quit]
gaqwas has quit [Remote host closed the connection]
okflo has joined #commonlisp
gaqwas has joined #commonlisp
esb has quit [Ping timeout: 240 seconds]
cosimone` has joined #commonlisp
kakuhen has quit [Quit: Leaving...]
cosimone has quit [Ping timeout: 250 seconds]
random-nick has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
gaqwas has quit [Remote host closed the connection]
pranavats has joined #commonlisp
scymtym has quit [Ping timeout: 252 seconds]
gaqwas has joined #commonlisp
john__ has joined #commonlisp
john__ has quit [Client Quit]
scymtym has joined #commonlisp
dra has joined #commonlisp
tyson2 has joined #commonlisp
attila_lendvai has quit [Remote host closed the connection]
cosimone` has quit [Ping timeout: 250 seconds]
Inline has quit [Quit: Leaving]
lisp123 has joined #commonlisp
cosimone has joined #commonlisp
peterhil has joined #commonlisp
lisp123 has quit [Quit: Leaving...]
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #commonlisp
okflo_ has joined #commonlisp
okflo has quit [Quit: WeeChat 3.2]
hhdave has joined #commonlisp
hhdave_ has quit [Ping timeout: 250 seconds]
waleee has joined #commonlisp
okflo_ has quit [Quit: ZNC 1.6.3+deb1ubuntu0.2 - http://znc.in]
okflo has joined #commonlisp
waleee has quit [Ping timeout: 250 seconds]
igemnace has joined #commonlisp
waleee has joined #commonlisp
waleee has quit [Quit: WeeChat 3.2]
kulernil has joined #commonlisp
kuler has quit [Ping timeout: 276 seconds]
yitzi has joined #commonlisp
waleee has joined #commonlisp
kulernil has quit [Remote host closed the connection]
kulernil has joined #commonlisp
waleee has quit [Ping timeout: 250 seconds]
Inline has joined #commonlisp
lisp123 has joined #commonlisp
<lisp123> Are there any tools to convert javascript to CL?
hafat has joined #commonlisp
<random-nick> why would you want to do that?
<random-nick> but it implements an old version of javascript
<lisp123> oooo thank you, this could work
<lotuseater> random-nick: a standardized one? :P
<lisp123> I want to convert mathjax to common lisp
<lotuseater> lisp123: you could use named-readtables and write your own
<lisp123> First I wanted to convert TeX to CL, but damn that program is hard to read
<lotuseater> ahh mathjax
<lotuseater> I like KaTeX.
<lisp123> lotuseater: Oh yes, thanks. Let me check out that one too. Maybe its source code is easier. MathJax is horrendous - its not really open source if they intentionally make it so difficult to follow =.=
<lisp123> KaTeX on the other hand is very good (just saw), I think I will try (and fail) to convert it to CL
<lotuseater> I got to know it from RocketChat and that rocketed this chat platform to a high rank.
<lotuseater> communicating in 2D forms can be very powerful
<lotuseater> lisp123: maybe you want to learn before about a technique called (monadic) parser combinators
<lisp123> Indeed :)
<lisp123> lotuseater: Thanks, let me look into that. Parsers always blow my mind (I wrote a mini one for myself before, works well, but hard for me to even read my own code)
<lotuseater> yeah and think about the difference, parsing complex things with some monolithic thing is not such a good idea
<lisp123> I agree
<lotuseater> so you can define a parser for every case and combine them as needed, even with backtracking
<lisp123> I see
<lisp123> I will need to reed into it more to understand a bit better, seems like this is the go to resource: https://www.cs.nott.ac.uk/~pszgmh/monparsing.pdf
<lisp123> Thanks for mentioning it
VincentVega has joined #commonlisp
<rain3> "I just write the parser classes using CLOS, it's doable in pure Common Lisp. See https://github.com/thodg/css-parser and https://github.com/thodg/css-lexer It's actually the only parser code I ever found to be readable without banging my head on the walls. But I might be biased. Some Ruby parsers are written this way also, like ruby-less which is deprecated nowadays."
<lotuseater> hihi Graham Hutton
<random-nick> why not use a parser generator like esrap?
PinealGlandOptic has joined #commonlisp
<lotuseater> lisp123: or have a read in the chapter about it in the good book "Real World Haskell" they explain well and not too much, show how to write a correct CSV parser
<lisp123> lotuseater: Thanks
<lisp123> rain3: Thanks
<rain3> random-nick: any good tutorial on esrap ?
<lotuseater> ah nice
<random-nick> do note that esrap isn't a CFG parser
<random-nick> because its choice operator is ordered choice
selwyn has joined #commonlisp
<random-nick> i.e. the first successful choice is valid (resulting in at most one parse tree) instead of all successful choices (possibly resulting in multiple parse trees)
seok has joined #commonlisp
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
Oladon has joined #commonlisp
kulernil has quit [Remote host closed the connection]
kulernil has joined #commonlisp
kulernil has quit [Remote host closed the connection]
kulernil has joined #commonlisp
kulernil has quit [Remote host closed the connection]
kulernil has joined #commonlisp
kulernil has quit [Remote host closed the connection]
<saltrocklamp[m]> does anyone have a non-trivial use of cffi-groveller that they're able to share? i'm struggling to understand how to set things up properly
<saltrocklamp[m]> (i'm not using autowrap because i can't get c2ffi to build)
<saltrocklamp[m]> i could also try using claw https://github.com/borodust/claw but it seems very new
<saltrocklamp[m]> thank you rain3
<rain3> these two I have read a while ago when I used cffi-groveller
<saltrocklamp[m]> what's the benefit of having 3 separate `defsystem`s? i'm also still very new to asdf
<saltrocklamp[m]> i looks like there's 1 for each grovell'ed c source tree, and then 1 for the main user-facing system
<borodust> saltrocklamp[m]: i can help you wrap with claw if you have particular library in mind
<borodust> setting up :claw is as much pita as cl-autowrap+c2ffi
<borodust> as of now
<borodust> it is also new and lacks docs, yes
<rain3> saltrocklamp[m]: I remember it was tricky to control the order of the files that are loaded , making a separate defsystem that uses :cffi-grovel-file was the only way to kinda have control
taiju has quit [Ping timeout: 248 seconds]
taiju has joined #commonlisp
* beach refrains from reminding that it is better in all respects to program in Common Lisp instead.
<recordgroovy> sounds like a failure to refrain
* borodust is trying not to shoot a remark, that it depends on man-hours involved
<edgar-rft> that's true, the overly many man-hours needed to keep the FFI bindings up-to-date have ruined many Common Lisp projects in the past
selwyn has quit [Read error: Connection reset by peer]
<borodust> yes! that's why we have claw, cl-autowrap and groveller :)
<borodust> but really, once bindings generated you don't need to touch it, unless you need a new version of a lib
<edgar-rft> what happens every few months with C libraries...
<borodust> if foreign or native lib changes interface, you need to adapt either way - not specific to pure CL or foreign stuff
<borodust> edgar-rft: not really
<borodust> stuff like libuv or libclang is really forever interfaces at this point
okflo has quit [Quit: ZNC 1.6.3+deb1ubuntu0.2 - http://znc.in]
okflo has joined #commonlisp
<borodust> the real problem with foreign libraries is just their foreign nature - you need to use another pack of tools to build them and their dependencies
selwyn has joined #commonlisp
derelict has quit [Quit: WeeChat 3.2]
derelict has joined #commonlisp
<jcowan> beach: That strikes me as self-fulfilling. CATCH/THROW are traditionally implemented inefficiently, so no one uses them, so no one bothers to optimize them.
<beach> I see.
<beach> Your opinion seems to match that of SBCL maintainers, because it appears to me that they optimize every part of the system that they can and have time for.
derelict has quit [Quit: bye]
derelict has joined #commonlisp
<jcowan> That also agrees with Google's style guide: use the whole language.
<beach> I think that is totally different.
<beach> I totally agree with that advice.
tyson2 has joined #commonlisp
<jcowan> I don't know what SBCL does, but one well-established approach when tags are compile-time constants is to maintain a vector of structures {pointer to start of code block, pointer to end of code block, sxhash of tag} sorted by the first two members of the struct.
<jcowan> This reduces the O(n) search to O(log n). There are probably ways to make it O(1) as well.
<beach> Sounds like a great idea.
Bike has joined #commonlisp
<loke> jcowan: I wouldn't say no one.
<loke> Maxima uses them
<jcowan> A rhetorical move on my part. (My training, such as it is, is in neither syntax nor semantics, but the third that stands between: rhetoric.)
<yitzi> Well, Maxima uses them all over the place along with symbol plists because a lot of the code base is still pre CL.
<beach> yitzi: What would you use instead now?
<beach> Rather, what should Maxima use instead now?
<yitzi> Oh I am not saying that I don't use catch/throw myself. Just that a lot Maxima's code is kind of crufty. There is no use of CLOS or restarts that I recall.
khrbt has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
<loke> beach: The plists aren't the biggest issue in Maxima. The number one problem is that it relies on a lot of global state.
<loke> So it's impossible to run anything in threads.
<yitzi> loke: Good point.
khrbt has joined #commonlisp
<beach> loke: I meant instead of CATCH/THROW.
<yitzi> I am working on integrating the their debugger into JupyterLab via common-lisp-jupyter and having to adapt it to work with restarts etc. ... so my opinion is probably slightly biased.
srhm has joined #commonlisp
srhm has quit [Client Quit]
IPmonger has joined #commonlisp
IPmonger has quit [Remote host closed the connection]
<loke> There are over 300 uses of throw in maxima code (345 it seems)
<loke> An example snippet that should be quite telling:
<loke> (cond ((contains-a-replacement expression) (throw 'must-replace t)))
<loke> It's also exposed to the Maxima language itself.
Oladon has quit [Quit: Leaving.]
lisp123 has quit [Quit: Leaving...]
<recordgroovy> Making progress on a libwayland-less wayland: https://0x0.st/-t6v.png
lisp123 has joined #commonlisp
<borodust> lisp123: what about it
<lisp123> PG's advocating Lisp :-) One step closer to world domination
<recordgroovy> How long has PG been advocating lisp for, though?
<aeth> I mean
<borodust> can he stop, it's embarassing at this point
<recordgroovy> ^
<aeth> he gave up talking about Lisp in like 2003-2004 and focused on just startup stuff since then, with a brief pause to release Arc, which was, unfortunately, one of the biggest flops in programming language history due to the hype
<lisp123> There's always a few that will bite, and a few of that few will write the next CL libraries ;)
<aeth> Since Arc, pg might have had a post or two to talk about the "sequel" language, Bel, but due to the disappointment of Arc, it didn't really have the same effect
<recordgroovy> I thought Bel was more of a though experiment than a practical lisp
<recordgroovy> As in, "what would lisps look like if we had infinite computing power?"
<aeth> recordgroovy: he probably learned not to overpromise and underdeliver
<lisp123> recordgroovy: Yes, that it was. I tried reading the first few paragraphs, then got bored and moved on. But something useful might be there
<aeth> recordgroovy: I get the impression that "Hundred-Year Language" was a major essay (I even had to read it for a comp sci class, actually)... and that many people (perhaps even pg himself) assumed that pg was claiming that Arc would be that 100 year language.
<aeth> It wasn't.
<lisp123> Seems like a lot of people to try reinvent Lisp
<lisp123> But in any case, any advocacy about Lisp is a good thing imo :)
<aeth> these days (2021), this sort of thing is more typical for pg's essays: "An NFT That Saves Lives". http://paulgraham.com/nft.html
<lisp123> (try to reinvent and fail)
<semz> eh, see how this worked out for rust
<lisp123> aeth: That and shilling bitcoin and crypto currencies (coinbase must have made YC ridiculously rich)
<aeth> lisp123: eh, back when pg was more popular, in the early '10s, a lot of people, myself included, joined #lisp on freenode with an extremely mistaken impression of the language saying rather laughable things (myself included)
<borodust> lisp123: best advocacy is a work done - libraries, documentation, actual programs
<semz> ^
<semz> there's a sizable group that has no interest to ever engage with anything rust, no matter how good, simply because of how obnoxious the advocacy was
<semz> and i can't fully blame them
<aeth> This is the kind of thing that '00s and early '10s Lisp advocacy produced: https://xkcd.com/224/
<lisp123> I count myself one of them, I eye roll everytime I see "xyz written in rust"
<recordgroovy> Most end-user programs that advertise their implementation languages, even when that has nothing relevant with the program, it's usually Rust
<lisp123> aeth: Did he trick you into thinking Macros were a super power? :D
<aeth> The more grounded Lisp of the '10s and '20s is more about things like #lispgames https://github.com/lispgames/lispgames.github.io/wiki/Lisp-Games
<lisp123> aeth: lol @ at that xkcd
<lisp123> borodust: Yes that would help too, but its not everybody's cup of tea or capability. For those, any other way to help is also fine
<aeth> My go-to example for the "power" of Lisp is literally as mundane as how HTML templating is done in most languages (embed the language or a DSL inside of otherwise-normal .html files) vs in most Lisps (generate HTML strings from s-expressions that map to the HTML syntax)
<aeth> HTML isn't going to save the world, but it's a good example.
<aeth> Another example I give is https://borodust.org/projects/trivial-gamekit/
<aeth> From borodust
<aeth> But it's kind of a revolving door as far as which project to point to
<aeth> for a while it was https://github.com/vydd/sketch/
* borodust blushes
asarch has joined #commonlisp
kulernil has joined #commonlisp
<saltrocklamp[m]> <borodust> "salt rock lamp: i can help you..." <- that'd be very helpful! i wanted to wrap libgit2 to get started, but probably others in the near future
<saltrocklamp[m]> <rain3> "salt rock lamp: I remember it..." <- are the defsystem's executed in the order that they are defined?
<rain3> if system_two depends on system_one , system_one is loaded first
<saltrocklamp[m]> oh, so this lets you express dependencies
<saltrocklamp[m]> you can't express dependencies among components within a system?
<Bike> you can express dependencies between files within a system
<Bike> might get weird with something like a groveller though
kulernil has quit [Remote host closed the connection]
kulernil has joined #commonlisp
<saltrocklamp[m]> is there any convention about `/` and `.` in system names?
<saltrocklamp[m]> it looks like people are using `/` to refer to specific locations in the source tree, and i've seen others using names like `foo` and `foo.test`
<scymtym> ASDF allows grouping files into "modules" within systems and those modules can have dependencies as well. dependencies between files, as Bike mentioned, allow finer grained expression of dependencies, though
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
<scymtym> an asd file named FOO.asd should only contain systems named either FOO or FOO/SUFFIX since FOO/SUFFIX cannot refer to a file FOO/SUFFIX.asd so ASDF knows to look in FOO.asd when searching for FOO/SUFFIX. in contrast, FOO.SUFFIX could be defined in a file FOO.SUFFIX.asd
mjoerg has joined #commonlisp
<saltrocklamp[m]> ah, ok
<saltrocklamp[m]> so `foo` and `foo/bar` should live in `foo.asd`, and `foo.baz` should live in `foo.baz.asd`
<saltrocklamp[m]> is `foo.bar/baz` also accepted?
<saltrocklamp[m]> is this somewhere in the asdf docs?
mjoerg has quit [Remote host closed the connection]
kulernil has quit [Remote host closed the connection]
kulernil has joined #commonlisp
kulernil has quit [Remote host closed the connection]
<scymtym> ASDF will warn if a system name does not follow the scheme. i don't know whether the documentation discusses this topic. note that it is not strictly forbidden to define, say, a system named foo.bar in foo.asd. if the system foo is always loaded before foo.bar, ASDF doesn't have to know how to find the definition of foo.bar. because of that, it has been debated whether the naming restriction should exist
kulernil has joined #commonlisp
<scymtym> recordgroovy: which parts of the wayland protocol did you implement so far?
<recordgroovy> scymtym: Message-passing, events, a naiive dispatching mechanism, and wl_display_roundtrip(), and wl_display_sync()
<recordgroovy> The object map used to link ID's to objects is also naiively implemented
<scymtym> recordgroovy: are you using the protocol definitions, that is wayland.xml?
<recordgroovy> Not yet, that's my main goal
<scymtym> i see, thanks
kulernil has quit [Remote host closed the connection]
<recordgroovy> First step is to make a DSL that's like the XML definitions, and then a reader that transforms the XML file *into* that DSL.
<recordgroovy> something like (load-protocol-definitions :package-to-create "wayland.xml")
<recordgroovy> It will then create pre-built methods like (package-to-create:sync
<scymtym> yeah, i did that part. but not as a dsl since there is no need for a surface syntax
Bike has quit [Quit: Connection closed]
<saltrocklamp[m]> is `register-system-packages` essentially a shorthand for `defsystem`?
waleee has joined #commonlisp
lisp123 has quit [Quit: Leaving...]
<etimmons> salt rock lamp: no. It lets ASDF know which packages a system provides as it's not required for the package name to have any relation to the system name.
<etimmons> salt rock lamp: You frequently see it used with package inferred systems. Those infer system dependencies based on the packages its components use.
cosimone has quit [Ping timeout: 252 seconds]
<borodust> saltrocklamp[m]: i'll have a look
<borodust> looks like it shouldn't take more than 15 minutes to wrap
scymtym has quit [Ping timeout: 250 seconds]
<etimmons> salt rock lamp: I actually recently started wrapping libgit2 with claw. Wrapping was pretty quick once I grokked claw and I'm now working on lispify'ing it.
<etimmons> salt rock lamp: let me know if you're interested in collaborating. I haven't pushed it anywhere yet and won't be able to until tomorrow afternoon, though.
<borodust> oh wait
<etimmons> borodust: I really enjoy using claw! Although I feel like there's still some features to it that I am unaware of
Bike has joined #commonlisp
<borodust> etimmons: thanks! and i'm kinda amazed you got it working with so little docs ;p
<borodust> well, i'm halfway wrapping git2 - i'll link result on github, but you can safely discard it or steal whatever seems usable
<etimmons> Haha, it did take a bit to get everything working! But I've tried the other options out there and knew I didn't like them.
<etimmons> I think I even had some issues where autowrap just failed on libgit2.
<etimmons> Cool, I'll definitely take a look and see what I can learn from the master at work
<borodust> huh, 10k lines bindigns source, okay
<borodust> that's no small lib
<borodust> here's the untested version: https://github.com/borodust/claw-git2
scymtym has joined #commonlisp
<borodust> clone it into ~/quicklisp/local-projects, (ql:register-local-projects) and (ql:quickload :claw-git2)
<borodust> i'll see if i can arrange an example
<saltrocklamp[m]> eric: so `register-system-packages` is _always_ required whenever a package name doesn't match a system name?
<saltrocklamp[m]> also yes i would love to see what you did so far!
rain3 has quit [Ping timeout: 240 seconds]
<saltrocklamp[m]> #commonlisp bands together to make useful working examples and hopefully contribute better docs
IPmonger has joined #commonlisp
IPmonger has quit [Remote host closed the connection]
<saltrocklamp[m]> i don't know what it is about common lisp but i really have a hard time getting through some of these manuals
<saltrocklamp[m]> I just don't really know what to do with information like this:
<saltrocklamp[m]> > The file starts with a form `(in-package :asdf-user)`, but it is actually redundant, not necessary and not recommended. But yet more complex cases (also not recommended) may usefully use an in-package form.
vats has joined #commonlisp
attila_lendvai has joined #commonlisp
<etimmons> salt rock lamp: it's needed if a package inferred system depends on a system where the package and system names mismatch
<saltrocklamp[m]> so it's not needed for "plain" systems?
Krystof has joined #commonlisp
<etimmons> But it's important to note that it's routinely put in the asd file for the package inferred system, not the system with the mismatching package name
<etimmons> Correct
<saltrocklamp[m]> i see, thanks
<saltrocklamp[m]> for "plain" systems, there's no "mapping" of packages to systems, you just use `defpackage` somewhere inside the system. right?
selwyn has quit [Read error: Connection reset by peer]
<etimmons> Yes
<saltrocklamp[m]> ty
<saltrocklamp[m]> borodust: i just saw this. claw is like autowrap in that it generates everything for you?
srhm has joined #commonlisp
<borodust> saltrocklamp[m]: in that sense - yes
<borodust> i would go as far as to say - literally
<borodust> it generates everything for me, but mostly not everyone else
<borodust> although there are few exceptional ones like etimmons
cosimone has joined #commonlisp
<saltrocklamp[m]> lol
<borodust> saltrocklamp[m]: don't bother with claw atm, i'm really just helping to generate bindings, and promoting :claw - it is extremely hard to get it work atm
<borodust> *and NOT promoting :claw ;p
<saltrocklamp[m]> well if you manage to get the libgit2 bindings working i will certainly use them
esb has joined #commonlisp
<borodust> i also suggest using etimmons bindings, not the ones i generated - i'm not going to maintain them
<saltrocklamp[m]> hah ok
defaultxr has quit [Quit: bbiab]
srhm has quit [Quit: Konversation terminated!]
srhm has joined #commonlisp
<borodust> okay, added an example
<borodust> that's it for this system, i guess ;p
<borodust> steal everything you need from it
asarch has quit [Quit: Leaving]
* borodust is back working on delivering common lisp games based on alien-works
PinealGlandOptic has quit [Quit: leaving]
Lord_of_Life has quit [Ping timeout: 250 seconds]
Lord_of_Life has joined #commonlisp
yitzi has quit [Quit: Leaving]
srhm has quit [Quit: Konversation terminated!]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
Lord_of_Life has quit [Read error: Connection reset by peer]
VincentVega has quit [Ping timeout: 250 seconds]
okflo has quit [Quit: ZNC 1.6.3+deb1ubuntu0.2 - http://znc.in]
okflo has joined #commonlisp
pve has quit [Quit: leaving]
kakuhen has joined #commonlisp
okflo has quit [Quit: ZNC 1.6.3+deb1ubuntu0.2 - http://znc.in]
okflo has joined #commonlisp
Bike has quit [Quit: Connection closed]
djuber has quit [Remote host closed the connection]
Lord_of_Life has joined #commonlisp
Lord_of_Life has quit [Client Quit]
Lord_of_Life has joined #commonlisp
<saltrocklamp[m]> `typedef struct Foo Foo_t` does this require _two_ groveler forms? `(ctype foo-t "Foo_t")` and `(cstruct foo "Foo" ())`?
lisp123 has joined #commonlisp
<lisp123> borodust: Are you using lisp-works?
<borodust> lisp123: i primarily use sbcl and ccl, but sometimes check if lispworks, khm, works too, yes
<lisp123> borodust: Ah okay. Thought you were using lisp-works as your main (alien-works)
<borodust> i plan to maintain support for SBCL, CCL and ECL in alien-works
<borodust> if at some point in time i would be able to afford lispworks - i'll certainly add it to this list ;p
<lisp123> Oh I see :P Sorry I thought you were making a pun 'alien-works' = 'lisp-works'
<borodust> nah, it's a pun for alien-works being a heavily lispfied layer over foreign libraries
<borodust> or properly lispified, as much as possible
<lisp123> Nice
<lisp123> Nice one. Hope it goes well.
<lisp123> "Non-consing in tight loops" :D
<borodust> thanks!
Bike has joined #commonlisp
Oladon has joined #commonlisp
selwyn has joined #commonlisp
vats has quit [Ping timeout: 245 seconds]
vats has joined #commonlisp
attila_lendvai has quit [Ping timeout: 250 seconds]
<saltrocklamp[m]> "stylobate" that's a new one on me
<saltrocklamp[m]> "The immediate foundation of a row of classical columns." -- good metaphor
* borodust winks
tyson2 has joined #commonlisp
lisp123 has quit [Quit: Leaving...]
srhm has joined #commonlisp
hayley has left #commonlisp [#commonlisp]
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
makomo has quit [Ping timeout: 252 seconds]
akoana has joined #commonlisp
vats has quit [Ping timeout: 250 seconds]
<MetaYan> borodust: Thanks for the git2 example.
cosimone has quit [Ping timeout: 240 seconds]
selwyn has quit [Read error: Connection reset by peer]
<borodust> MetaYan: no problemo
<borodust> thanks for bodge-glfw report :)
dra has quit [Ping timeout: 240 seconds]
<MetaYan> borodust: You're most welcome. Glad I finally nailed that one. Been tearing my hair about why it didn't find %glfw . It's used by sucle.
<borodust> yeh, i've lost access to macos machine and can't check that stuff anymore
<borodust> MetaYan: well, okay, lemme try to generate proper bindings for darwin, hopefully they would work ;p
yitzi has joined #commonlisp
<borodust> actually, why not, while we are at it, i might as well just go for windows too
<borodust> mingw though
<borodust> claw doesn't feel well with msvc yet
<MetaYan> borodust: New bindings work on Darwin. Tested with sucle.
<borodust> noice!
akoana has quit [Ping timeout: 250 seconds]
akoana has joined #commonlisp
gaqwas has quit [Ping timeout: 240 seconds]
<borodust> i'm a master copypaster it seems
selwyn has joined #commonlisp
<borodust> ill grep for drawin guy across all of my projects tomorrow, thanks for heads up!)
random-nick has quit [Ping timeout: 248 seconds]
jhi has quit [Ping timeout: 268 seconds]
<MetaYan> borodust: Yeah, found 20 with https://github.com/search?q=user%3Aborodust+%3Adrawin&type=code ;)
Oladon has quit [Quit: Leaving.]
jhi has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]