p_l changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | ASDF 3.3.4
edgar-rft has quit [Ping timeout: 256 seconds]
wxie has joined #lisp
wxie has quit [Read error: Connection reset by peer]
wxie1 has joined #lisp
wxie has joined #lisp
wxie1 has quit [Ping timeout: 265 seconds]
edgar-rft has joined #lisp
wxie1 has joined #lisp
wxie has quit [Read error: Connection reset by peer]
wxie1 is now known as wxie
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
<Xach> (for phoe)
SGASAU` has joined #lisp
edgar-rft has quit [Ping timeout: 265 seconds]
SGASAU has quit [Ping timeout: 258 seconds]
wxie has quit [Read error: Connection reset by peer]
wxie has joined #lisp
Bourne has quit [Read error: Connection reset by peer]
jeosol has quit [Ping timeout: 240 seconds]
wxie has quit [Read error: Connection reset by peer]
SGASAU` has quit [Quit: ERC (IRC client for Emacs 26.3)]
wxie has joined #lisp
SGASAU has joined #lisp
iAmDecim has quit [Ping timeout: 265 seconds]
edgar-rft has joined #lisp
wxie has quit [Read error: Connection reset by peer]
wxie1 has joined #lisp
wxie1 has quit [Read error: Connection reset by peer]
wxie has joined #lisp
shangul has quit [Ping timeout: 265 seconds]
techquila has quit [Read error: Connection reset by peer]
techquila has joined #lisp
igemnace has quit [Quit: WeeChat 2.8]
Bourne has joined #lisp
wxie has quit [Ping timeout: 256 seconds]
madage has quit [Remote host closed the connection]
madage has joined #lisp
asarch has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
jeosol has joined #lisp
asarch has quit [Ping timeout: 265 seconds]
efm has joined #lisp
bitmapper has quit [Ping timeout: 240 seconds]
torbo has joined #lisp
anlsh60 has quit [Remote host closed the connection]
defaultxr has left #lisp ["WeeChat 2.8"]
iAmDecim has joined #lisp
iAmDecim has quit [Ping timeout: 265 seconds]
dddddd has quit [Ping timeout: 256 seconds]
Josh_2 has quit [Ping timeout: 256 seconds]
turona has quit [Ping timeout: 272 seconds]
turona has joined #lisp
asarch has joined #lisp
Fare has quit [Ping timeout: 258 seconds]
pilne has quit [Quit: Life without danger is a waste of oxygen]
wxie has joined #lisp
Bourne has quit [Read error: Connection reset by peer]
efm has quit [Quit: Konversation terminated!]
<White_Flame> finally wrote my own (do-mapcar (var list) ...) which can filter out elements and return multiple elements to be grafted in, as well as the common case
<aeth> Why "skip"?
<aeth> I think Python uses "pass"
<aeth> I might use "ignore" for something like that, though
<White_Flame> nice that macrolets can define keyword-named macros for maximizing non-collisionality, I didn't expect that to work at first
Bike has quit [Quit: Lost terminal]
<White_Flame> eh, the output skips some of hte input intems
<White_Flame> -n
<jeosol> nice
<beach> Good morning everyone!
<jeosol> Good morning beach!
<White_Flame> re
wxie has quit [Ping timeout: 256 seconds]
wxie has joined #lisp
<asarch> One stupid question: from a list, how could I get a range of elements? e.g. mathematically the (nth, nth+nth) elements of (list ...)?
<beach> clhs subseq
<asarch> Thank you!
<asarch> Thank you very much!
<asarch> :-)
<asarch> Using CL-DBI, how could I do this query (from PostgreSQL SQL dialect)?: SELECT * FROM student ORDER BY id DESC LIMIT (20-10+1) OFFSET 10;
Inline has joined #lisp
xlei has quit [Ping timeout: 256 seconds]
xlei has joined #lisp
Lord_Nightmare has quit [Ping timeout: 256 seconds]
Lord_Nightmare has joined #lisp
wxie has quit [Ping timeout: 256 seconds]
patlv has quit [Quit: patlv]
dtman34 has joined #lisp
vlatkoB has joined #lisp
Oladon has quit [Quit: Leaving.]
Inline has quit [Quit: Leaving]
voidlily has quit [Ping timeout: 272 seconds]
Oladon has joined #lisp
<pjb> asarch: also, you can use the :start and :end arguments of a lot of CL functions to avoid consing with SUBSEQ.
Oladon has quit [Client Quit]
<pjb> (position 0 '(0 1 2 3 4 0 1 2 3 4) :start 2 :end 6) #| --> 5 |#
<pjb> (+ (position 0 (subseq '(0 1 2 3 4 0 1 2 3 4) 2 6)) 2) #| --> 5 |#
akoana has left #lisp ["Leaving"]
iAmDecim has joined #lisp
voidlily has joined #lisp
voidlily has quit [Ping timeout: 246 seconds]
<White_Flame> if I have (progn (tagbody ... fail) (tagbody ... fail)), then (go fail) should only find the tag within the current tagbody, right?
<beach> Right.
<beach> And the innermost one in case they are nested.
<White_Flame> hmm. because my execution is just disappearing after a filure in the 1st, and hte 2nd isn't running at all
ayuce has quit [Read error: Connection reset by peer]
<beach> Can we assume that your (go fail) is inside one of the TAGBODYs?
<White_Flame> yes, and this is in macroexpansion
<White_Flame> ah, there. rubber-duck debugging succeeded (it was something else, of course :-P)
<beach> Heh. Great!
<White_Flame> my 1st body was unexpectedly succeeding, and not running the 2nd
<beach> I see.
drewc has quit [Ping timeout: 256 seconds]
Bourne has joined #lisp
<White_Flame> it's how I implemented a sort of cond-let, using (go fail) if the bindings in the test didn't work out
<White_Flame> while leaving the LETs intact for the body of the cond clause to execute within
voidlily has joined #lisp
iAmDecim has quit [Ping timeout: 240 seconds]
Bourne has quit [Read error: Connection reset by peer]
sauvin has joined #lisp
<asarch> Thank you!
<asarch> Thank you very much pjb! :-)
gravicappa has joined #lisp
iAmDecim has joined #lisp
drewc has joined #lisp
<phoe> Xach: thanks, fixed.
narimiran has joined #lisp
<jeosol> I want to check some style issue to see if I doing something wrong:
<jeosol> I have a class and I create a constructor to create an instance, e.g., (defun constructor (&rest args &key :first-name :last-name) (apply #'make-instance 'class-name args))
<phoe> &key first name last-name
<axion> You don't want to prepend colons to your keyword arguments in the lambda list.
<jeosol> (defun constructor (&rest args &key :first-name :last-name) (apply #'make-instance 'class-name args))
<phoe> you cannot have keywords as variables
<jeosol> corrected
<jeosol> It was mistake, I corrected it
<phoe> nope, not corrected
<phoe> you still have colons in there
<jeosol> but I get warnings that the keywords are not used, not sure if that's I should be using
<phoe> (defun constructor (&rest args &key first-name last-name) (apply #'make-instance 'class-name args))
<jeosol> (defun constructor (&rest args &key first-name last-name) (apply #'make-instance 'class-name args))
<phoe> (declare (ignore first-name last-name))
<jeosol> but is that style bad? its legit I thought
<axion> You only need the `&rest args` and the above declaration if you intend to pass additional arguments beyond those two.
<phoe> you don't need to use first-name and last-name if you pass &rest args to another function
<phoe> I have seen &rest + &keys in code where the keys are ignored
JohnMS_WORK has joined #lisp
<phoe> and I don't consider that style to be bad - it limits the user to these two keyword arguments by default
<axion> It's perfectly fine style if you need it.
<jeosol> but if I call that constructor with a different keyword it should complain right
<phoe> yes, it will complain by default
<jeosol> and it does complain
<jeosol> I added it that way instead of just the args as part of documentation.
<phoe> sure, it's a meaningful way of documenting what can go into the constructor
<phoe> but then again, I wonder if there's much gain in the constructor function if all it does is call make-instance; slime shows keywords for make-instance as a part of its lambda list displaying
<jeosol> phoe: that's my reason, but you still recommend adding the (ignore ...) to remove the style-warnings?
<phoe> buuuut that's another reason
<phoe> jeosol: yes
<phoe> the keywords in there are purely for lambda list validation, you only use the &rest parameter
<phoe> so you can ignore the keywords
<jeosol> I agree, it's a bit redundant having a constructor.
_whitelogger has joined #lisp
<jeosol> I use it that way in some cases, when I create objects, I do a bunch of other that stuff/calculations. not just create an instance. Nothing rigid at all.
JohnMS_WORK has quit [Read error: Connection reset by peer]
sth_ has joined #lisp
<beach> jeosol: Both the AMOP and CLIM often omit the explicit &key parameters in case the current function does not process them explicitly. By omitting them, its caller and its callee can communicate without the current function having explicit knowledge about this communication.
<beach> This solution is sometimes better for the purpose of modularity and maintainability.
<jeosol> beach: Thanks for that beach. I appreciate it.
torbo has quit [Remote host closed the connection]
<beach> Sure.
<jeosol> So there is some merit to not add the parameters. I ran into some design issues, some of my functions take many arguments (but appropriately defaulted) because I am trying run many scenarios, e.g., change a few variables, leave others defaulted to
JohnMS_WORK has joined #lisp
<jeosol> I end up with code that only I understand or can work it.
<beach> Yes, there are situations where it is better to omit those explicit &key parameters.
<jeosol> I mean it's documented, I use long variable names, verbs for functions, etc, most of the recommendations in Pittmans style document
_paul0 has joined #lisp
<flip214> jeosol: perhaps it would make sense to split it up into some setup part (a "WITH-" macro) and a calculation part, each with fewer moving parts?
Cymew has joined #lisp
<jeosol> flip214: that's a good suggestion. I think leaving our the explicity key parameters will reduce the interface to the functions, and then I should look to splitting things up.
paul0 has quit [Ping timeout: 265 seconds]
<jeosol> Dependency is something else, I'll need to look into and Fare mentioned looking at POIU, I never got it to work first time around.
orivej has joined #lisp
<jeosol> I'll circle back to it later, and document my findings somewhere online.
aeth has quit [Read error: Connection reset by peer]
aeth has joined #lisp
<flip214> scymtym: do you have any content for https://github.com/scymtym/clim.flamegraph? Is that just a placeholder, "Hier könnte Ihre Werbung stehen"? ;)
<no-defun-allowed> flip214: Did you check the other branches of that repository?
random-nick has joined #lisp
<phoe> Are there any written resources that one can consult when dealing with multiple backquote?
<phoe> I can see LOL does describe them.
<phoe> Or rather, well. Mention. Not describe, unless I am not searching correctly.
<beach> I try to avoid them as much as possible by factoring out some code.
hiroaki has quit [Ping timeout: 250 seconds]
<phoe> so do I, but it's present in actual code though - I'm looking at written resources that I can point someone to
pve has joined #lisp
dale has quit [Quit: My computer has gone to sleep]
Bourne has joined #lisp
v_m_v has joined #lisp
jprajzne has joined #lisp
<flip214> no-defun-allowed: no, I didn't
varjag has joined #lisp
davsebamse has joined #lisp
davsebam1e has quit [Ping timeout: 260 seconds]
heisig has joined #lisp
v_m_v has quit [Remote host closed the connection]
KDr22 has quit [Ping timeout: 264 seconds]
iAmDecim has quit [Ping timeout: 264 seconds]
ralt has joined #lisp
ljavorsk has joined #lisp
<ralt> good morning
<beach> Hello ralt.
<ralt> how does one debug a thread, in Lisp? Say, I have something that looks like a stuck thread, but I'm not exactly sure. In other languages I have tooling to grab stacks and stuff, but I don't know anything in Lisp.
jeosol has quit [Remote host closed the connection]
<ralt> slime-list-threads -> "d" on the relevant thread
<ralt> C-h m in that mode helped
<ralt> sorry everyone
<ralt> I am a firm believer in rubber duck debugging
v_m_v has joined #lisp
wheelsucker has quit [Ping timeout: 256 seconds]
KDr22 has joined #lisp
<phoe> ralt: quack quack
asarch has quit [Quit: Leaving]
<ralt> trying to think of a silly answer but can't come up with one, so, hello phoe
<phoe> ralt: quack https://github.com/phoe/quicklisp-quackload quack quack
<phoe> I wonder if I should change the description of that system to "it aids with rubber-duck debugging of Quicklisp..."
<ralt> That is beautiful
<scymtym> flip214: there two relevant branches: the "future" branch contains basically a graphical user interface for sb-sprof, the "advice-backend" branch contains an unfinished hybrid statistical/deterministic profiling system, also with a graphical user interface. i have no intention of including advertisements
<pjb> phoe: IIRC, there was some posts and discussions, and perhaps a blog, about multiple backquotes in cll
<pjb> phoe: there's an occurence of a triple embedded backquote in a macro in some library…
<phoe> ouch
JohnMS_WORK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<pjb> Nothing strange about it, once you understand that ` is just constructing a sexp.
<no-defun-allowed> Aw, alexandria:once-only only goes two levels deep.
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
jeosol has joined #lisp
JohnMS_WORK has joined #lisp
v_m_v has quit [Remote host closed the connection]
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
techquila has quit [Read error: Connection reset by peer]
techquila has joined #lisp
<jackdaniel> no-defun-allowed: what does it mean?
v_m_v has joined #lisp
<flip214> scymtym: thanks, will take a look
<no-defun-allowed> jackdaniel: There are only two levels of quasiquotation, and I thought the macro had more.
<jackdaniel> ah, you mean macro definition itself
<jackdaniel> I thought your remark is about expansion and I did not understand it
<no-defun-allowed> Yeah.
<phoe> I wouldn't ever want a macro to expand into a quasiquoted form
<no-defun-allowed> I think my cee-switch macro from a long time ago had a macro that expanded into a MACROLET which had a quasiquoted body.
<no-defun-allowed> Huh, it's cee-case and I wrote it almost 1.5 years ago: https://pastebin.com/jPuXLRVe
shifty has joined #lisp
<phoe> what's cee-case?
<phoe> it looks like alexandria:switch
<no-defun-allowed> A switching construct, that you have to break out of yourself.
<phoe> ooh, I see now
<no-defun-allowed> As you do in C(ee). I think someone wanted to know if it was possible in #clschool.
<phoe> ooh, you mean will fallthrough
<phoe> s/will/with/
<no-defun-allowed> Yeah.
<flip214> scymtym: for clim.flamegraph, is there a way to reduce the depth by not showing the function frames outside some limit, eg. above REPL-EVAL or so?
<flip214> oh, a right mouse click does the trick
<flip214> thanks
<Shinmera> Anyone know of a library to fetch DNS records?
<Shinmera> Preferably portable and pure lisp.
<ralt> I always end up using getaddrinfo, sorry
<Shinmera> I don't want to resolve the hostname, I need the actual records.
<pjb> there's a dns library in cl, IIRC.
<pjb> Have you tried cliki.net?
<Shinmera> that was my first stop.
<flip214> might be a fun project to learn https://cliki.net/Binary-types
<ralt> https://github.com/fjames86/dragons seems to fit the bill
<Shinmera> Yeah, but it's not on QL.
<flip214> well, there's a local-projects that you can git clone into....
<Shinmera> Won't work for a library, my man.
<flip214> I beg your pardon?
<Shinmera> If I want to distribute a library that uses dragons, then dragons needs to be in a dist, too.
<flip214> ah, okay.
<Shinmera> along with the rest of... whatever it is it uses.
<flip214> well, open an issue to have it in the next ql release
<Shinmera> like fsocket. and pounds. and drx?
<ralt> lot of interesting libraries on that github account
<Shinmera> a lot of NIH, yeah.
v_m_v has quit [Remote host closed the connection]
<flip214> and pounds is in QL
<flip214> no issue for drx
<flip214> well, you could always start a second, parallel QL dist
<Shinmera> I could also just avoid the headache and write my own DNS client.
<flip214> still need to get _that_ into QL.... and what was that right now about NIH? ;)
<ralt> that sounds like the most headache-inducing option to me
<Shinmera> flip214: I wouldn't be reinventing sockets, for instance.
<Shinmera> ralt: dealing with other people's messes is much more of a headache to me than dealing with my own mess.
<Shinmera> that's how I got to having over 100 messes in QL.
<beach> Shinmera: That's the spirit! Keep it up!
<pjb> I don't think it would be that difficult to implement a dns client in lisp. That could take 2 days at most, I'd guess.
<flip214> Shinmera: that's one of the points we like about you!
<pjb> Shinmera: you probably already ate 1/4 of that budget looking for it !!!
<Shinmera> pjb: probably!
<jackdaniel> there is nothing wrong with such strategy, but accusing them of NIH (what seems to be a pejorative term) doesn't have much weight given it (this strategy that is)
shangul has joined #lisp
<Shinmera> I have yet to write my own socket library. Maybe I'll get there some day.
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 256 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<jackdaniel> s/given it/given the above/
Bourne has quit [Read error: Connection reset by peer]
<MichaelRaskin> Hmm. Combination of Windows, FFI and 2015 in fsocket makes me think it might have been actually more reliable on Windows than the alternatives (when written)
v_m_v has joined #lisp
Intensity has quit [Ping timeout: 250 seconds]
v_m_v has quit [Ping timeout: 265 seconds]
Bourne has joined #lisp
igemnace has joined #lisp
dra has joined #lisp
shka_ has joined #lisp
<shka_> no-defun-allowed: yo, you there?
<no-defun-allowed> shka_: Hello.
<shka_> query? i have some non-lispy questions
<no-defun-allowed> Sure.
gxt has quit [Remote host closed the connection]
gxt has joined #lisp
Retropikzel has quit [Quit: Konversation terminated!]
jeosol has quit [Remote host closed the connection]
Ekho has quit [Quit: An alternate universe was just created where I didn't leave. But here, I left you. I'm sorry.]
Josh_2 has joined #lisp
<Josh_2> Can I just serve a static site with ningle?
<Josh_2> I have managed to get the html to work but the CSS which I had to add an extra route for does not
<Josh_2> firefox keeps saying "Style sheet could not be loaded""
jeosol has joined #lisp
rixard_ has quit [Read error: Connection reset by peer]
<Josh_2> I would generate the html with cl-who etc but I'm working on this site with someone else who does not know cl, so It's more convenient to just have a static page
<Grue`> is /css/main.css accessible by itself?
sbryant_ has quit [Quit: ZNC - http://znc.in]
rixard has joined #lisp
sbryant has joined #lisp
Ekho has joined #lisp
<Josh_2> it is when I just load the html straight into firefox
<Josh_2> but not with ningle
seok has joined #lisp
<seok> Morning guys
scymtym has quit [Ping timeout: 256 seconds]
<phoe> morning
<Josh_2> Grue`: I found the problem I was using the key :main-page-css instead of :main-css...
SGASAU has quit [Remote host closed the connection]
hdasch has quit [Ping timeout: 258 seconds]
SGASAU has joined #lisp
hdasch has joined #lisp
<seok> Is Snooze the most used library for building a REST API
<Xach> seok: i am not aware of any survey that would confirm or deny that question
<seok> It was the only library listed on awesome-cl built specifically for REST
<seok> I want something light, but having an issue with ningle
<seok> I'm familiar with Caveman but feels like an overkill
<seok> Eh, I could learn clack
<Xach> seok: it is ok to make things too
<seok> no.. I am still a newbie :(
<boeg> anyone here using caveman2? Is the "start server and automatically rebuild as changes occur in codebase" feature that a lot of similar frameworks has built available in caveman2 too? I cannot seem to find it ...
<seok> Yes
<seok> I believe every web framework in CL works that way
<boeg> so how do I use it?
<boeg> doesn't seem to be "on" if I just :start my app
<seok> just compile the routing s-exp
<seok> What do you mean?
cosimone has joined #lisp
<boeg> just manually recompile it?
<Xach> boeg: I am not familiar with caveman2, but in CL it is typical to recompile individual functions or data definitions to see changes. It is not usually based on file timestamp changes or things like that.
<seok> You can access the page on your browser right?
<boeg> Sure, I know I can do that, I was just wondering if I had to
<Josh_2> Well I got it to work
<seok> you don't have to restart the server
<boeg> seok: indeed
<Josh_2> Had to set the content type to "text/css"
<seok> in caveman2, web.lisp in src/ folder
<seok> contains the routing codes
<boeg> Xach: correct, I was just wondering if caveman2 would do it for me like many webframeworks do
<seok> edit that and just re-compile that line
<seok> then refresh on your browser
<Xach> boeg: i do not know about that, sorry.
<boeg> seok: alright, thank you
<seok> should work
<boeg> Xach: no problem!
<Xach> boeg: i'm curious - what would trigger the rebuild?
<seok> It doesn't rebuild, but the server calls whatever lisp function it has in memory
<boeg> Xach: I guess most webframeworks uses something like inotify?
<Xach> boeg: ok
<seok> which you can edit and compile while server is running
<boeg> seok: indeed, like is the normal lisp way
<boeg> seok: just wondered if caveman2 had that other thing also :P
<boeg> its no problem that it doesnt though
<boeg> seok: thank you for your help
<seok> Am I answering your question right? Not sure if I understood it
<boeg> seok: well, yes and no
<boeg> I know I can just send a function to slime, thats how i usually do
<boeg> but its not exactly the "watch for changes"
<boeg> like is popular for many webframeworks
<boeg> however its not a deal breaker in any way
<boeg> seok: actually - how can I send a template change?
<seok> You want to restart the server?
<boeg> or does that just "work" out of the box?
<boeg> ill try
<seok> Still trying to figure out what you are trying to do
<boeg> seok: sorry, let me explain
<seok> No prob
<seok> Sorry
<seok> template change meaning you want to rewrite a particular web page right?
<boeg> in many webframeworks in other languages, the usual way is that when you work on the codebase, you "start the server" and it will automatically watch for file changes in the project and recompile them
<boeg> it seems that in caveman2 i should just send the changed code to sbcl per usual with lisp
<boeg> regarding templates, it just seems to work somehow
SGASAU has quit [Ping timeout: 264 seconds]
<seok> You can do it either way
<boeg> I dont have to recompile anything
<seok> yeah
<seok> You can do it like other languages, restart the server every time you edit
<seok> but there is no need to do that
<seok> that would be slower
<boeg> i dont think the other frameworks restarts the server though, they just recompile the changes bits
<boeg> not sure though
<seok> Which frameworks are we talking about?
<seok> like node?
<boeg> for example flask and phoenix
<seok> ok
<seok> Don't you have to close the python application
<seok> to apply the changes?
<boeg> no it does that for me - i'm not sure if it actually restarts everything, but its very quick
<boeg> miliseconds
jeosol has quit [Remote host closed the connection]
<seok> compiling the routing is even faster though
SGASAU` has joined #lisp
<seok> because it only recompiles that one function
<boeg> yeah, as i said, it doesnt matter, i think its actually probably a feature that caveman2 doesnt do it because it just uses the "normal common lisp work flow"
<boeg> the best kind of feature; the one where you leaving out stuff becomes a strength :D
<seok> like when you write "flask run" on command line right?
<boeg> indeed
<seok> I believe that restarts the server
<boeg> alright
<boeg> ive done a lot of professional flask work, but i dont like python
<seok> That is same as app:stop and app:start
<boeg> i've come to like elisp and common lisp over the last couple of months and thought out try out caveman2
SGASAU` has quit [Quit: ERC (IRC client for Emacs 26.3)]
<seok> Oh, I thought a lot of people liked working in flask
<boeg> i like flask
<boeg> i just dont like python
<seok> Same here, I've moved from python
cosimone has quit [Remote host closed the connection]
<seok> Haven't done any web work in python though
<boeg> alright - i see that i actually have to go pick up my kid now!
<boeg> thank you for the help
cosimone has joined #lisp
<seok> Nw, hope it helped
<boeg> bye!
dddddd has joined #lisp
SGASAU has joined #lisp
SGASAU` has joined #lisp
seok has quit [Remote host closed the connection]
SGASAU has quit [Ping timeout: 240 seconds]
SGASAU` has quit [Quit: ERC (IRC client for Emacs 26.3)]
SGASAU has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
libre-man has joined #lisp
libre-man has left #lisp [#lisp]
cosimone has quit [Quit: Terminated!]
SGASAU has quit [Remote host closed the connection]
EvW has joined #lisp
SGASAU has joined #lisp
sunwukong has joined #lisp
Bike has joined #lisp
wxie has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
q3d has joined #lisp
SGASAU has quit [Remote host closed the connection]
gko has joined #lisp
SGASAU has joined #lisp
wxie1 has joined #lisp
iAmDecim has joined #lisp
wxie has quit [Ping timeout: 258 seconds]
wxie1 is now known as wxie
SGASAU has quit [Remote host closed the connection]
iAmDecim has quit [Ping timeout: 256 seconds]
SGASAU has joined #lisp
Bourne has quit [Read error: Connection reset by peer]
Bourne has joined #lisp
q3d has quit [Remote host closed the connection]
keep_learning has quit [Quit: This computer has gone to sleep]
ljavorsk has quit [Ping timeout: 256 seconds]
jonatack has quit [Quit: jonatack]
Lycurgus has joined #lisp
wxie1 has joined #lisp
cosimone has joined #lisp
Krystof has quit [Ping timeout: 260 seconds]
wxie has quit [Ping timeout: 240 seconds]
wxie1 is now known as wxie
patlv has joined #lisp
<jmercouris> let's say I'm calling a function which returns 2 values and I only want the second one, how can I do that?
<jmercouris> right now I'm using multiple value bind
<jmercouris> and ignoring the first arg, but that doesn't seem so right...
<beach> clhs nth-value
<jmercouris> I tried that
<jmercouris> Oh nth-value
<jmercouris> damnit, always a couple characters off
<jmercouris> thank you beach
<beach> Sure.
<beach> jmercouris: Here is a hint: go to the Common Lisp HyperSpec, use the Permuted Symbol Index, and search for "value".
<beach> I mean, "value" is very likely to be part of the operator you are looking for.
<jmercouris> I have the local hyperspec so I can fuzzy search it
<jmercouris> I first searched and read multiple-value-bind maybe it would list a related function or so
<beach> But a fuzzy search would likely give way too many hits.
<jmercouris> it does :-D
<beach> ... which is why I suggested the permuted index.
<jmercouris> yes :-) next time I try
<phoe> I have achieved a round number of pages: 128, to be exact
<phoe> and I'm still not done
* phoe sigh
<jmercouris> it is a power of 2 though!
<jmercouris> I believe in you phoe
<phoe> that's why I said it is round, yes
<jmercouris> round really doesn't mean anything in casual conversation
<jmercouris> people often say intervals of 5 are a round number...
wxie has quit [Ping timeout: 250 seconds]
<phoe> mayhaps they use a quintary number base on a daily basis
jonatack has joined #lisp
wxie has joined #lisp
<Josh_2> If I have this path #P"/home/josh/documents/website/site/css/milligram-1.3.0/package.js" and this #P"/home/josh/documents/website/site/" how can I just get the /css/milligram-1.3.0/package.js ?
<jmercouris> you could convert the path to a string
<jmercouris> if you are more comfortable working with strings
<Josh_2> is there no default way to do this?
<jmercouris> there are ways
<Josh_2> does uiop have the ability?
<phoe> Josh_2:
<phoe> clhs enough-namestring
<phoe> I think that's the one
<phoe> oh wait, no, that's a namestring function
pilne has joined #lisp
<jmercouris> what's tricky is that you want three layers
<jmercouris> I can't think of a way to do it without looping
<jmercouris> you know what would be cool? a function to convert a path to a list of subpaths forming that path
<jmercouris> so if we had /location/something/salmon, we'd get a list of three elements "location" "something" "salmon"
<phoe> found it
<Bike> i thought pathname-directory did that.
<phoe> (uiop/pathname:enough-pathname #p"/home/phoe/Downloads/099.jpg" #p"/home/phoe/") ;=> #P"Downloads/099.jpg"
<phoe> uiop:enough-pathname is the one
v_m_v_ has joined #lisp
<jmercouris> Bike: seems so
<Josh_2> phoe: that works
<Josh_2> thanks
<Shinmera> Colleen: look up pathname-utils relative-pathname
<Colleen> Function pathname-utils:relative-pathname https://shinmera.github.io/pathname-utils#FUNCTION%20PATHNAME-UTILS%3ARELATIVE-PATHNAME
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
wxie1 has joined #lisp
ljavorsk has joined #lisp
wxie has quit [Ping timeout: 256 seconds]
wxie1 is now known as wxie
cosimone has quit [Remote host closed the connection]
gravicappa has quit [Ping timeout: 260 seconds]
cosimone has joined #lisp
wxie1 has joined #lisp
wxie has quit [Ping timeout: 240 seconds]
wxie1 is now known as wxie
ahungry has joined #lisp
<jmercouris> OK to use ironclad:random-data to suggest random passwords for users?
Kingsy has joined #lisp
<phoe> jmercouris: it should be cryptographically secure, yes.
<Kingsy> does anyone know of any good video courses about lisp and learning lisp? I find its a really good way to learn.
<phoe> about Common Lisp specifically?
<jackdaniel> pushing pixels with lisp maybe?
gravicappa has joined #lisp
<jackdaniel> by baggers
<phoe> ^
<Kingsy> phoe: I guess so, I am totally new to lisp in general, but I think common lisp is where to start right>?
<jmercouris> phoe: thanks
v_m_v_ has quit [Ping timeout: 265 seconds]
<beach> Kingsy: Absolutely.
* beach says that because that is what this channel is dedicated to.
wxie has quit [Ping timeout: 240 seconds]
cosimone has quit [Remote host closed the connection]
<beach> Kingsy: I went to YouTube and typed Common Lisp, and there were some reasonable answers.
cosimone has joined #lisp
<phoe> Kingsy: sure - just remember that you're asking Common Lisp programmers whether Common Lisp is a good place to start ;)
<jmercouris> get out while you still can
<jmercouris> it is not too late for you
<phoe> Kingsy: have you programmer before? if yes, how long?
<phoe> s/how long/for how long/
nullman has quit [Ping timeout: 264 seconds]
fanta1 has joined #lisp
nullman has joined #lisp
<Lycurgus> missing be participle
dalz has joined #lisp
<jmercouris> or russian
<Lycurgus> slavic lang lang articles but they do inflect
<Lycurgus> unclear about nominal stative
<Lycurgus> which chinese is big on
<Kingsy> phoe: quite a few years, I havea degree in computing science. I use php everyday
<phoe> Kingsy: baggers' stream should be good for you then
<Lycurgus> s/lang lang/lang/
<Lycurgus> *langs actually
<phoe> you could also always watch the Sussman/Abelson SICP lectures if you want to refresh your programming basics while also learning the basics of Lisp
<phoe> they use Scheme rather than Common Lisp, but the difference is not very big at the level of the lectures
<Lycurgus> it's night and day uih
<phoe> night and day?
<phoe> later on, yes; just not at the beginnings where they describe the syntax, basic evaluation rules, the environment model and so on
<Lycurgus> scheme vs cl
<jmercouris> OoO! Scheme vs CL? man
<phoe> closures, setters, all of that translates well between scheme and CL
<jmercouris> Why didn't Phoe think of that?
<phoe> only later the two diverge
<jmercouris> That seems so obvious now that you point it out
<jmercouris> I'm done being sarcastic now
<phoe> wait what
<jmercouris> I'm just saying I agree with phoe
<phoe> ......that's a very *unique* way of saying that you agree with me
* Lycurgus waits for the ##lisp nazi
<phoe> I'm one of them, lol
<phoe> I simply say that SICP lectures are good enough material for getting into Common Lisp, since they're good for getting into Lisp in general
<Kingsy> phoe: could you chuck me across some links?
adip has quit [Quit: Lost terminal]
sjl_ has joined #lisp
<Kingsy> omg wow!
cosimone has quit [Remote host closed the connection]
<Kingsy> are these the Sussman/Abelson SICP lectures you mentioned?
cosimone has joined #lisp
<phoe> yesssss
<phoe> they teach basics of "computer" "science" in general, but you can also learn the very basics of Lisp by following them
<Kingsy> phoe: ok cool, and whats baggers' stream ?
Lycurgus has quit [Remote host closed the connection]
<phoe> he starts from the very beginning, too, and uses CL from the start - if SICP is too slow for you, you might enjoy that one
<Kingsy> perrrrrrfect thanks
<Kingsy> I'll be using vlime much to the absolute disgust of many I am sure! :D
<phoe> no, not necessarily
<Kingsy> oh. I thought LISP == EMACS most of the time.
frgo_ has quit []
<phoe> I've heard that vlime/slimv are kind of good nowadays; still subpar to slime and sly, but doable
<Kingsy> well I am a vim nut... so sue me :D
<phoe> there's also slima for atom that is being actively developed. which is very good, because it's a jailbreak out of the ancient "emacs or vim" box that lispers were effectively confined in ever since lisp machines died.
frgo has joined #lisp
<jmercouris> also lem
<Kingsy> oh nice! I don't currently have atom but that could be worth a look see
<jmercouris> good luck running it
<Kingsy> hah lem?
<phoe> also lem, hemlock, and climacs - editors developed within Common Lisp
<phoe> ...and documentation, in case of lem.
<Kingsy> oh wow! cool
<Kingsy> very nice. All dockered up and such.
<Kingsy> hah!
<Kingsy> so do all of you just do LISP for fun? like I am looking to do? or is it a job requirement?
<jmercouris> both, frequently
<beach> Indeed.
<jmercouris> you'll find ways to incoroporate lisp into your job if you enjoy it
<jmercouris> that's what many do when they can't find a lisp only position
<phoe> there are some people who do Common Lisp professionally, some researchers, some hobbyists, some people who use it for writing their personal projects and utilities, some learners, some bookwriters, some people who don't easily fit into any of these categories too
<Kingsy> yeah
<phoe> we've a pretty varied kin, if I can even call #lisp a "kin"
<Kingsy> My goal (I find it helpful to have a purpose when learning something) is to build a bulk file renaming tool.
<Kingsy> and then after that, a server health check application
<Kingsy> phoe: well it sounds like a good mix
dyelar has quit [Remote host closed the connection]
<phoe> so, basically, a Lisp version of https://packages.debian.org/sid/rename ?
<Kingsy> exactly.
<jmercouris> could integrate with mezzano
<phoe> and then something that accesses some network resource every X milliseconds and executing some function if it dies?
<Kingsy> well I havent decided on specific requirements
<Kingsy> phoe: haha! exactly again
<phoe> both seem simple enough and could be written in Lisp as first projects, sure
<Kingsy> yeah super simple, but both are things I need.
<Kingsy> and I don't want to use bash. I am sick of that and moved onto elvish, but I already have a project for that.
<phoe> sure, you can use lisp for writing these tools.
<Kingsy> good to hear :)
<Kingsy> thanks so much for the introduction and the links. Appreciate it
<phoe> #clschool is a channel dedicated to people who are learning the basic; in case #lisp is full with some other discussion, you could try moving there with your questions
<Kingsy> excellent will do
dale_ has joined #lisp
dale_ is now known as dale
ayuce has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
rippa has joined #lisp
bitmapper has joined #lisp
dra has quit [Quit: Leaving]
madage has quit [Ping timeout: 240 seconds]
gxt has quit [Ping timeout: 240 seconds]
corpix has quit [Ping timeout: 240 seconds]
Aurora_v_kosmose has quit [Ping timeout: 240 seconds]
cantstanya has quit [Ping timeout: 240 seconds]
zooey_ has quit [Ping timeout: 240 seconds]
jonatack has quit [Ping timeout: 256 seconds]
jonatack has joined #lisp
monokrom has joined #lisp
ljavorsk has quit [Ping timeout: 258 seconds]
Aurora_v_kosmose has joined #lisp
corpix has joined #lisp
madage has joined #lisp
cosimone has quit [Remote host closed the connection]
zooey has joined #lisp
cosimone has joined #lisp
cosimone has quit [Client Quit]
cosimone has joined #lisp
<Josh_2> When saving with asdf:make how do I drop into the repl when the entry-point function is complete?
lucasb has joined #lisp
gxt has joined #lisp
cantstanya has joined #lisp
<jmercouris> if you don't have a program-op it will allow you to drop into the REPL
<jmercouris> that is, :build-operation
<Josh_2> So if I remove :program-op ?
<Josh_2> sorry
<jmercouris> remove line :build-operation "program-op"
<Josh_2> so if I remove :build-operation
<Josh_2> Okay
<Josh_2> will do. Thanks
cosimone has quit [Remote host closed the connection]
<jmercouris> that should work
<jmercouris> if not, keep removing, you can remove build pathname, entry point, and you can still asdf:make something
cosimone has joined #lisp
ljavorsk has joined #lisp
cosimone_ has joined #lisp
cosimone has quit [Read error: Connection reset by peer]
ljavorsk has quit [Ping timeout: 256 seconds]
<Bike> it s ounds like josh might want to just run some code before entering the repl?
ljavorsk has joined #lisp
sjl_ has quit [Quit: WeeChat 2.3-dev]
<phoe> that sounds like a thawing hook
<phoe> UIOP/IMAGE:*IMAGE-RESTORE-HOOK* to be precise
scymtym has joined #lisp
sunwukong has quit [Quit: Leaving]
ljavorsk has quit [Ping timeout: 260 seconds]
jprajzne has quit [Quit: Leaving.]
cosimone_ has quit [Remote host closed the connection]
cosimone_ has joined #lisp
Cymew has quit [Ping timeout: 250 seconds]
cosimone_ is now known as cosimone
SGASAU has quit [Remote host closed the connection]
Lycurgus has joined #lisp
cosimone_ has joined #lisp
cosimone has quit [Read error: Connection reset by peer]
shka_ has quit [Ping timeout: 264 seconds]
EvW has quit [Ping timeout: 240 seconds]
cosimone_ has quit [Ping timeout: 256 seconds]
JohnMS_WORK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
cosimone has joined #lisp
X-Scale` has joined #lisp
X-Scale has quit [Ping timeout: 258 seconds]
X-Scale` is now known as X-Scale
hiroaki has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
fanta1 has quit [Quit: fanta1]
SGASAU has joined #lisp
gko has quit [Ping timeout: 258 seconds]
<Xach> phoe: in my experience, referring to symbols with their full home package can be fragile in asdf/uiop. it is safer to refer to their main package, UIOP (or ASDF).
<phoe> Xach: correct
<phoe> so, UIOP:*IMAGE-RESTORE-HOOK* to be even more precise
EvW has joined #lisp
<Xach> it is a pain when generating code, since that is how they print
* Xach could use a pprint dispatch update to get sanity or something
easye has quit [Remote host closed the connection]
easye has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
scymtym_ has joined #lisp
scymtym has quit [Ping timeout: 252 seconds]
<aeth> Another argument for hierarchical packages, I guess.
<aeth> Symbols could appear under the "top level" package.
<Xach> I would prefer to internn in the external package and import into implementation packages.
<phoe> that would be kinda better for modularity, honestly
<Xach> "external" in the colloquial, not spec, sense.
<phoe> the external package defines the protocol, the internal ones implement it
<Bike> kind of a pain to write out, tho.
<phoe> but then again, one could argue that the current approach is better for modularity, too
<Bike> but maybe not, since uiop has its own defpackage operator
<Xach> Only through pain do we achieve purity
<phoe> uiop modules are completely separate and do not depend on external packages
scymtym_ has quit [Ping timeout: 252 seconds]
<phoe> unless they explicitly specify that dependency, yadda yadda
<phoe> they export their own symbols, hence modularity.
<phoe> welp
<phoe> I can actually imagine a useful library that defines pprint dispatch for such symbols, after accepting some package relationships
<jackdaniel> modularity without merit is a root of all confusion
<phoe> I do not think I am ready to start the debate about what is the merit of uiop's modularity
ym_ has joined #lisp
techquila has quit [Read error: Connection reset by peer]
ym has quit [Ping timeout: 256 seconds]
iAmDecim has joined #lisp
techquila has joined #lisp
ym_ is now known as ym
<aeth> one-package-per-file makes sense for absolutely huge projects because otherwise it becomes an absolute mess to work with imo
<aeth> it's just that most projects are small, and are composed, and get modularity that way
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
xlei has quit [Ping timeout: 265 seconds]
xlei has joined #lisp
asarch has joined #lisp
srandon111 has joined #lisp
<srandon111> guys i am at the lecture about the henderson - escher example... (i think it's lecture 5), and i can't understand what the professor mean when he says that by building hiis data as a function (when talking about piictures) he has all the procedures for free and can create simply an embedded language... i didn't understand how implementing pictures as functions allows this... can somebody explain?
<Xach> what lecture?
<Xach> SICP, I guess?
<srandon111> Xach, yes
<Xach> srandon111: I don't know how to make it clear to you, sorry, but the topic of this channel is common lisp. If I could figure a way to relate it to CL i'd give a shot at clarifying, but I can't, sorry.
<srandon111> Xach, i know it's not really lisp, but scheme, but still i thought this was the most appropriate channel to ask
<Xach> No, this is not really a good one.
<srandon111> Xach, i am trying to do all of his excercises in common lisp
<srandon111> Xach, that's the connection :D
<Xach> I don't remember the exercise well enough to help, but maybe someone else does.
<srandon111> ook thanks Xach
SGASAU has quit [Read error: Connection reset by peer]
SGASAU has joined #lisp
<_death> maybe you should read the book in addition to watching the video (those students had to read the book as well...)
shka_ has joined #lisp
<aeth> There's even an unofficial, alternate HTML version: https://sarabander.github.io/sicp/
EarwainBanadar has joined #lisp
efm has joined #lisp
iAmDecim has quit [Ping timeout: 250 seconds]
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
shka_ has quit [Read error: Connection reset by peer]
shka_ has joined #lisp
<rumbler31> srandon111: while this might not be the channel for an abstract discussion of the topic, I think you need to provide some more context for your question
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
vlatkoB has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
shka_ has quit [Read error: Connection reset by peer]
shka_ has joined #lisp
SGASAU has quit [Ping timeout: 264 seconds]
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
<phoe> Could someone double-check if the double-evaluation avoidance inside my CCASE implementation is correct?
<phoe> I think I got it right. I bind the variable to the value of KEYFORM before entering tagbody; this will prevent the keyform from being evaluated multiple times. The keyform is only placed to WITH-STORE-VALUE-RESTART because it is passed to SETF there.
hiroaki has quit [Ping timeout: 264 seconds]
sauvin has quit [Read error: Connection reset by peer]
<Bike> the standard explicitly allows subforms of the place to be evaluated again, so i think you're fine.
SGASAU has joined #lisp
<pve> aeth: I find one-package-per-folder (module) to be a decent middle ground
SierraSkye has joined #lisp
<phoe> oh! good.
shangul has quit [Ping timeout: 265 seconds]
SierraSkye has quit [Client Quit]
<Josh_2> I can use (sb-impl::toplevel-init) to go straight to the top level with sbcl
jeosol has joined #lisp
cosimone has quit [Remote host closed the connection]
SGASAU has quit [Remote host closed the connection]
cosimone has joined #lisp
SGASAU` has joined #lisp
SGASAU` has quit [Remote host closed the connection]
frgo_ has joined #lisp
SGASAU has joined #lisp
choegusung has joined #lisp
frgo has quit [Ping timeout: 240 seconds]
ym has quit [Ping timeout: 260 seconds]
cosimone_ has joined #lisp
cosimone has quit [Ping timeout: 246 seconds]
MightyJoe is now known as cyraxjoe
cosimone_ has quit [Ping timeout: 240 seconds]
cosimone_ has joined #lisp
gravicappa has quit [Ping timeout: 258 seconds]
shangul has joined #lisp
iAmDecim has joined #lisp
<boeg> Anyone here using caveman2? How/for what is the db/schema.sql file supposed to be used? It's not obvious to me since as far as I understand, there is no ORM built into caveman2 - no migrations and so on - but the file is part of the skeleton, so whats the idea with it? Just to define your database layout and manually apply it?
EvW has quit [Ping timeout: 246 seconds]
<markasoftware> Are (load)s evaluated at compile time?
<phoe> markasoftware: nope
<phoe> they're evaluated at execution time
shangul has quit [Ping timeout: 256 seconds]
<markasoftware> ok, thanks!
<phoe> if you're looking into compile-time loads, you might instead want to look at system-defining software, such as ASDF
<phoe> loading stuff at compile time is non-trivial
azrazalea has quit [Quit: ZNC 1.6.2+deb2~bpo8+1 - http://znc.in]
azrazalea has joined #lisp
EvW has joined #lisp
AdmiralBumbleBee has joined #lisp
hiroaki has joined #lisp
iAmDecim has quit [Ping timeout: 260 seconds]
dyelar has joined #lisp
<markasoftware> i was looking into executable builders like buildapp
<markasoftware> it does seem to be mostly based on asdf now that i take a closer look
dyelar has quit [Client Quit]
iAmDecim has joined #lisp
v_m_v_ has joined #lisp
Inline has joined #lisp
<phoe> myself, I use Shinmera's deploy, which is based on uiop:dump-image
<phoe> and it's somewhat more lispy than buildapp from what I've investigated it
EarwainBanadar has quit [Read error: Connection reset by peer]
akoana has joined #lisp
EarwainBanadar has joined #lisp
<markasoftware> yeah, i don't like that buildapp is primarily a command line tool (though there's probably some way to use it from the repl that i'm not aware of)
cosimone_ has quit [Remote host closed the connection]
cosimone_ has joined #lisp
<Xach> markasoftware: not really
<Xach> markasoftware: except you can do (buildapp::command-line "--blah" "--blah" ...) as a hack, or similar
<markasoftware> I suppose you would know :)
<asarch> boeg, as far I understand, that is the place where you construct all your models from zero (in a blank new app)
<Xach> see the source of buildapp:build-buildapp
<markasoftware> i think sb-ext:save-lisp-and-die may actually be enough for my purposes
Lycurgus has quit [Ping timeout: 256 seconds]
cosimone_ has quit [Quit: Terminated!]
<markasoftware> but i'll definitely take a look at the buildapp source code to see how to include systems properly and all that
cosimone has joined #lisp
<ralt> I use :build-operation "asdf:program-op" :build-pathname "foo" :entry-point "foo:main" and (asdf:make #:foo)
<Xach> markasoftware: buildapp, imho, is pretty simple. it turns the CLI args into a sequence of function calls saved to a file, then spawns a new SBCL to load that file and dump the executable.
<Xach> markasoftware: the calls do things like extend the asdf search path, load a system, load a file, eval an expression. nothing too fancy.
<aeth> pve: One package per directory, one package per file, and one package per project all have different tradeoffs. I'd say the main disadvantage of the middle ground approach is that it's not automated, and it doesn't produce one system per directory, unlike package-inferred-system. Even with a package-inferred-system project, you probably only want to load at the directory level anyway.
<aeth> Files aren't necessarily a stable interface, but directories almost always should be...
<Xach> the tricky part is setting up an environment that crashes properly in case of a problem, and unloading itself just before dumping, but you don't have to get too fancy for a specific project.
z147 has joined #lisp
thonkpod has quit [Ping timeout: 260 seconds]
thonkpod has joined #lisp
hhdave_ has joined #lisp
hhdave has quit [Ping timeout: 258 seconds]
hhdave_ is now known as hhdave
z147 has quit [Quit: z147]
choegusung has left #lisp [#lisp]
<asarch> !quicksort
scymtym has joined #lisp
KDr22 has quit [Ping timeout: 240 seconds]
iAmDecim has quit [Ping timeout: 256 seconds]
<pve> aeth: you're right.. I kinda wish asdf had some automation for one-package-per-directory, like package-inferred-system
<aeth> It might be possible to patch it in.
v_m_v_ has quit [Remote host closed the connection]
SGASAU has quit [Ping timeout: 260 seconds]
v_m_v_ has joined #lisp
PuercoPope has joined #lisp
PuercoPope is now known as PuercoPop
KDr22 has joined #lisp
shka_ has quit [Ping timeout: 256 seconds]
v_m_v_ has quit [Ping timeout: 250 seconds]
<PuercoPop> oi, when writing a cffi wrapper, do both const char * and char * map map to :string? Is it not important to reflect the const in the 'lisp type'?
<phoe> "const" is a C thing; it's gone after compilation
<phoe> it translates to undefined behaviour if const memory is ever altered by the program, which may cause a segfault or - worse - not cause a segfault
<phoe> if a char* pointer is defined as const by C, then your CFFI code may only read from the data this pointer points to - never write to it.
<_death> no, it doesn't say anything about the memory itself
SGASAU has joined #lisp
<_death> it only says something about access to that memory via that pointer
<_death> consider char *p = get_some_string(); const char *q = p;
pve has quit [Quit: leaving]
<phoe> oh wait a second
<phoe> welp, I confused const-declared data with const pointers
<PuercoPop> in case the answer is it is not important when declaring the c function (defcfun), right?
zaquest has quit [Ping timeout: 256 seconds]
<phoe> yes; CFFI has no concept of C const
<_death> PuercoPop: right, but the expectation is that you should not modify the memory
<phoe> it is the user who needs to remember what is const and what is not
<phoe> or it should be the above-C-API that does not expose writers for things that were defined to be const in C
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
zaquest has joined #lisp
heisig has quit [Quit: Leaving]
SGASAU has quit [Remote host closed the connection]
<PuercoPop> thanks
SGASAU has joined #lisp
SGASAU has quit [Remote host closed the connection]
narimiran has quit [Ping timeout: 240 seconds]
SGASAU has joined #lisp
shifty has quit [Ping timeout: 258 seconds]
keep_learning has joined #lisp
verisimilitude has joined #lisp
<verisimilitude> I've a quick question regarding CLOS: Isn't COMPUTE-APPLICABLE-METHODS usable as a caching method to avoid extra dispatching; assuming this is a correct understanding, where could I perhaps find a nice example of using it for this, or otherwise see how to use its result well?
<Bike> caching how? what do you mean?
v_m_v_ has joined #lisp
<verisimilitude> I want to compute the applicable methods once and then repeatedly use the result, since it should always be valid to do so, if possible.
<phoe> verisimilitude: I think many CLOS implementations perform that optimization
<phoe> the result of c-a-m for a given set of classes may be cached as long as no methods are added/removed; doing such invalidates the cache
<phoe> or rather, a set of specializers - we need to take EQL-specializers into account
<Bike> compute-applicable-methods gets you a list of methods. the actual behavior of the generic function is called the effective method, and you can get that with mop... kinda.
<Bike> but yeah, usually the applicable methods aren't computed every call. that would be real expensive.
<p_l> _death: isn't const a declaration on the value of the pointer, i.e. the address?
<phoe> CFFI doesn't deal with any of those on its own, it's up to the caller to remember and use these
<verisimilitude> The main complication I'm facing is actually using the return value of COMPUTE-APPLICABLE-METHODS, as I've never needed to do so before and it seems to involve those queer local forms.
<p_l> phoe: I'll just say *JESUS FUCK*
<verisimilitude> Why are you needing to deal with C types anyway, p_l?
<p_l> verisimilitude: not me, it was talked earlier in terms of dealing with CFFI
<p_l> I'm personally of the opinion that operating systems and shared libraries should have language agnostic IDL specs
<p_l> so that I can use them from Lisp without worry
<verisimilitude> Oh, alright; I don't care to deal with CFFI at all, but using Ada has made me aware of how other languages do it much better, but Ada also has this standardized and embedded into its design from the start.
<verisimilitude> Unfortunately, UNIX won out, but you'd like VMS, from what I've read.
<phoe> verisimilitude: it seems that on SBCL the results of c-a-m are not cached, only the effective method function is
<Bike> verisimilitude: you mean call-method and make-method?
<verisimilitude> Yes, and I believe there's others, Bike.
<Bike> no, should pretty much just be those...
<Bike> those are part of the effective method, like i said. they make getting an actual function for the effective method difficult for the programmer.
<verisimilitude> I could've continued playing with it, but thought I'd just ask here for advice, instead.
<Bike> mop compute-effective-method
<verisimilitude> I'll read this; I appreciate your help, Bike.
<Bike> mhm. if i had more idea of what your endgoal is i could maybe be more helpful
keep_learning has quit [Quit: This computer has gone to sleep]
<verisimilitude> Is it necessary to use the MOP to get what I want?
<Bike> well, i'm not sure precisely what it is that you want.
<verisimilitude> This relates to a program of mine which is too slow and I want to optimize it. I'll link to it now.
iAmDecim has joined #lisp
<Bike> so you don't want blockhash to dispatch in the loop?
<verisimilitude> I've a HASH generic function which internally uses my BLOCKHASH, which destructively modifies the object it dispatches on, and an obvious optimization is computing BLOCKHASH's dispatch once.
<verisimilitude> Yes, Bike.
<verisimilitude> If it's still too slow, I'll bother to use a profiler, but this is an optimization I wanted to do anyway.
<Bike> You could avoid messing with the mop or anything by instead defining a "blockhasher" generic function, methods of which return a function that carries out the operation.
ahungry has quit [Remote host closed the connection]
<Bike> i think someone might have had a library for doing what you want, though... let me try to refresh my memory
<verisimilitude> I've thought of that approach, yes, but was trying to salvage the current design, instead.
<verisimilitude> You're thinking of Ironclad.
<Bike> No, a library for this precomputation, I mean
<verisimilitude> Oh; I wouldn't be interested in using the library, but I suppose I'd be interested in reading it.
<phoe> oh right, heisig's stuff
<jackdaniel> inlined-generic-functions by guicho
<phoe> these are all similar approaches, AFAIK heisig's and alex's stuff builds on guicho's i-g-f
Lord_of_Life has quit [Excess Flood]
Lord_of_Life has joined #lisp
hiroaki has quit [Ping timeout: 256 seconds]
asarch has quit [Ping timeout: 246 seconds]
efm has quit [Ping timeout: 240 seconds]
vmhost has quit [Ping timeout: 256 seconds]
EarwainBanadar has quit [Read error: Connection reset by peer]
EarwainBanadar has joined #lisp
efm has joined #lisp
iAmDecim has quit [Ping timeout: 256 seconds]
reggie_ has quit [Remote host closed the connection]
Grue` has quit [Quit: ZNC 1.7.2 - https://znc.in]
reggie_ has joined #lisp
Grue` has joined #lisp
wooden has quit [Read error: Connection reset by peer]
lacroixboy_ has joined #lisp
wooden has joined #lisp
wooden has joined #lisp
wooden has quit [Changing host]
hhdave has quit [Read error: Connection reset by peer]
hhdave has joined #lisp
Mandus has quit [Ping timeout: 265 seconds]
eMBee has quit [Ping timeout: 265 seconds]
Mandus has joined #lisp
eMBee has joined #lisp
mason has quit [Ping timeout: 265 seconds]
lemoinem has quit [Ping timeout: 265 seconds]
flip214 has quit [Ping timeout: 265 seconds]
Tordek has quit [Ping timeout: 265 seconds]
acolarh has quit [Ping timeout: 265 seconds]
ozzloy has quit [Ping timeout: 265 seconds]
ayuce has left #lisp ["ERC (IRC client for Emacs 28.0.50)"]
flip214 has joined #lisp
lemoinem has joined #lisp
mason has joined #lisp
lacroixboy__ has quit [Ping timeout: 265 seconds]
ozzloy has joined #lisp
ozzloy has joined #lisp
Tordek has joined #lisp
acolarh has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
Lord_of_Life_ has joined #lisp
<Xach> sha.lisp can't be compiled, and when compiled, it can't run. at least not in sbcl.
<Xach> i was interested in trying it because i recently made some sha stuff and wanted to compare results, but i can't get it working.
Lord_of_Life has quit [Ping timeout: 256 seconds]
Lord_of_Life_ is now known as Lord_of_Life
* Xach gets procmail flashbacks
SGASAU has quit [Remote host closed the connection]
cosimone has quit [Remote host closed the connection]
SGASAU has joined #lisp
cosimone has joined #lisp
iAmDecim has joined #lisp
karlosz has joined #lisp
madage has quit [Ping timeout: 240 seconds]
<Inline> i'm confused about the clos algorithm for class-precedence-list
<Inline> hmmmm
<Bike> what's the confusion
<Inline> depth-first,left-to-right,up-to-joins, and then the descriptions in the amop with different sortings, my confusion is basically about the splits
<Inline> so depth-first is depth-first-up-to-splits ?
<Inline> right ?
<fe[nl]ix> cgay: you have to manually download asdf and load it in your .sbclrc before loading quicklisp
<Xach> fe[nl]ix: what is the context there?
<fe[nl]ix> Xach: using ASDF3 with quicklisp
<Inline> and saw a graph where it also looks like not left-to-right....
<Xach> fe[nl]ix: sbcl comes with asdf3, also cgay did not write anything recently (that i can see)
<fe[nl]ix> at least, handling your own ASDF is my favorite solution because I can upgrade it faster than SBCL does
<Xach> ok
<fe[nl]ix> it's definitely true that using the latest SBCL release is sufficient in most cases
<verisimilitude> I've not had any issue compiling it with ECL, and I don't see why SBCL would have the issue, so will you provide more detail, Xach?
<Xach> verisimilitude: no, i won't. if you're curious, try it in sbcl.
<verisimilitude> I try it in SBCL and it works fine.
<verisimilitude> I'm using SBCL 1.3.7.
<verisimilitude> I see now there's still an error with a class not yet existing; I'll work on a correction for this, if it's actually an error.
madage has joined #lisp
iAmDecim has quit [Ping timeout: 256 seconds]
__jrjsmrtn__ has joined #lisp
_jrjsmrtn has quit [Ping timeout: 256 seconds]
v_m_v_ has quit [Remote host closed the connection]
efm has quit [Ping timeout: 250 seconds]
v_m_v_ has joined #lisp
iAmDecim has joined #lisp
v_m_v_ has quit [Read error: No route to host]
v_m_v_ has joined #lisp
cosimone has quit [Quit: Quit.]
random-nick has quit [Ping timeout: 240 seconds]
whiteline has quit [Read error: Connection reset by peer]
whiteline has joined #lisp
v_m_v_ has quit [Remote host closed the connection]
techquila has quit [Remote host closed the connection]
v_m_v_ has joined #lisp
Inline has quit [Quit: Leaving]
SGASAU has quit [Remote host closed the connection]
v_m_v_ has quit [Ping timeout: 256 seconds]
pierpa has joined #lisp
SGASAU` has joined #lisp
msk has quit [Remote host closed the connection]
msk has joined #lisp
iAmDecim has quit [Ping timeout: 250 seconds]
pilne_ has joined #lisp
pilne_ has quit [Client Quit]
<verisimilitude> Dealing with SBCL reminds me of something, though; I was getting a queer macroexpansion error due to a malformed DECLARE, but this wasn't being evaluated, and so it seems this is a flaw.
<verisimilitude> Now I seem to have corrected the SBCL compilation issue, by giving up on using DEFCONSTANT with my CLOS objects, using DEFVAR instead, but there's something else odd that prevents compilation; I've defined my SHA::F function in a way which could return NIL, but never actually will, and SBCL refuses to compile it due to this, but I won't be changing that function.
pilne has quit [Ping timeout: 264 seconds]
<fe[nl]ix> cgay: right :D
<Bike> declarations are messages to the compiler. if the compiler can't interpret them it's a problem regardless of whether that code path is actually executed
SGASAU` has quit [Remote host closed the connection]
<verisimilitude> Since I was using MACROEXPAND-1, it should just be treated as a normal list.
<Bike> as for that f function, looks like you could maybe just declare position to be an (integer 0 (80))
<verisimilitude> It wasn't actually being executed.
<Xach> fe[nl]ix: Is cgay writing in this channel?
<verisimilitude> I could, Bike, but I'm not going to make an unnecessary change just for SBCL.
SGASAU` has joined #lisp
<Bike> um, okay.
<verisimilitude> You'd agree the issue here is with SBCL, right?
<verisimilitude> I don't see a reason it shouldn't compile the code.
<Bike> well, i don't know what you mean by refuse to compile. is it issuing you a type warning?
<verisimilitude> Perhaps it's SLIME doing this.
<verisimilitude> Yes, it was just SLIME doing that.
<Bike> compile-file issuing an error conceptually means failure, still, so i guess that could work
<verisimilitude> It's just warnings, not failures.
<verisimilitude> Alright; I'll upload my changes and you can try testing again, if you care to, Xach.
<Xach> verisimilitude: if i wanted to compute the sha256 value for a file, what is the right thing to run?
<fe[nl]ix> Xach: yes, he is
<verisimilitude> (SHA:HASH SHA:256 #p"file")
<verisimilitude> I'll need a minute to upload this change, though.
<Xach> fe[nl]ix: It's weird, but I don't see anything he writes either via this account and client or on another account and client.
SGASAU` has quit [Remote host closed the connection]
<Xach> Does anyone else see anything cgay writes?
<verisimilitude> I'm not seeing anytihng from a cgay, and I don't ignore anyone.
SGASAU` has joined #lisp
<fe[nl]ix> is this a ghost movie ?
keep_learning has joined #lisp
<Xach> maybe?
<Xach> I wonder if it's a channel or user mode coming into play?
<Bike> no messages from cgay in any of the three logs.
<Bike> ...or my client.
<cgay> Xach: how about now?
<Xach> fe[nl]ix: do you smell burnt toast or oranges?
<Xach> hi cgay!
<cgay> heh. I forgot to identify
<Xach> cgay: what is happening?
<edgar-rft> looks as if cgay is fe[nl]ix's imaginative friend, cannot see either
<Xach> ah
<Xach> mystery solved, thank you
<edgar-rft> ah yes, now I see cgay
<cgay> Xach: well I think I have a somewhat weird situation, which is that my sbcl doesn't have asdf in it, so it's using the old 2.26 (IIRC) asdf in Quicklisp.
<cgay> and that was confusing for a while, but fe[nl]ix sorted me out.
<Xach> cgay: ok. fe[nl]ix is right, then. you could copy asdf.lisp over sbcl's version also.
<Xach> but loading in sbclrc is also fine
<Xach> err, over quicklisp's version that is
<cgay> roight...gotcha
<cgay> Xach: but ... maybe upgrade the version of asdf in quicklisp? (probably there are reasons why it needs the older version?)
<Xach> cgay: i'd rather have implementations provide the asdf version that works best for their users.
<bitmapper> hmm
<cgay> :thumbsup:
<bitmapper> i cannot find a copy of allegro cl/lispworks 4.1 for irix
<Xach> when quicklisp was starting, asdf2 seemed like a strong upgrade from asdf1 and worth pushing out with quicklisp simultaneously.
<Xach> the asdf3 process has been much less clear cut to me
<Xach> i am bummed by the confusion it causes when there's no implementation asdf but i haven't settled on a way out of that yet
<Xach> bitmapper: if i had a nickel for every user coming to #lisp with that complaint...
<bitmapper> you'd have two?
SGASAU` has quit [Remote host closed the connection]
<fe[nl]ix> I'm working on publishing my own SBCL binaries, with minimal patches
<bitmapper> fe[nl]ix: ?
jason_m has joined #lisp
SGASAU` has joined #lisp
<bitmapper> wait, for irix, or was that poor timing
<fe[nl]ix> I figured out how to statically link it to libfixposix, and I'll bundle a newer ASDF and possibly Quicklisp too
<fe[nl]ix> bitmapper: no, on Linux
<bitmapper> yeah that makes sense lol
iAmDecim has joined #lisp
Oladon has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<Xach> verisimilitude: does (SHA:HASH SHA:256 #p"file") work for you in sbcl?
<verisimilitude> Well, I'm testing the FASL and now I'm getting another odd error, involving my SHA::COPY-STATUS-STATUS, because an array isn't of an (AND VECTOR (NOT SIMPLE-ARRAY)) type.
<verisimilitude> So now I'm working on that.
<verisimilitude> This is happening in multiple implementations, so it was somehow caused by changing the DEFCONSTANT to a DEFVAR.
Misha_B has joined #lisp
<verisimilitude> ECL has given a better error message I can use, so that's nice.
<verisimilitude> I see it now, so I'll just need a few more minutes to correct this and upload the changes, Xach.
lxbarbosa has joined #lisp
iAmDecim has quit [Ping timeout: 256 seconds]
monokrom has quit [Remote host closed the connection]
efm has joined #lisp
<cgay> So is ESL2020 free now that it's all online or is there some place I can give them $$? Didn't see anything on the website yesterday.
<Xach> cgay: free - don't know about donating or otherwise paying https://twitter.com/elsconf/status/1249994741455949825
<cgay> Thanks Xach
wxie has joined #lisp