jackdaniel 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> | Pastebin: <https://plaster.tymoon.eu/> | News: ELS'22 this Monday (2022-03-21), see https://european-lisp-symposium.org
pjb has quit [Read error: Connection reset by peer]
<bollu> Hmm, but I do need to write to some global mutable state :)
<bollu> do I have critical sections?
<bollu> [I have tests I want to run in parallel, and I need to lock a hash table to update success/failure counts]
<bollu> is there some way to conveniently get the loop iteration index when using the LOOP macro?
<sm2n> (loop for x across vec for i from 0 ...)
<sm2n> and I think you should be able to use bordeux-thread's condition variables or whatever with it
<bollu> (loop for x in `(1 2 3 4) collect (loop for y in `(5 6 7 8) collect 42)) <- I want a flat list of `42`s, not a list of lists
<bollu> how do I achieve that?
<bollu> In general, my `y` will depend on `x`
<bollu> Perhaps this a bettter(?) example: (loop for x in `(1 2 3 4) collect (loop for y in `(,x ,x) collect (* y y))
<yitzi> clhs 6.1.3
<yitzi> bollu: ^
<bollu> specbot they don't help with nested lists
<bollu> specbot I'm already using `collecting`
akoana has joined #commonlisp
<bollu> I don't see how to use it to get a flat list
<yitzi> specbot is a bot.
<bollu> ahh :)
<bollu> yitzi my question stands
<yitzi> Try append?
<bollu> yitzi (loop for x in `(1 2 3 4) append (loop for y in `(,x ,x) collect (* y y)) | this seems to work, thanks!
<bollu> that's.. pretty powerful!
<bollu> yeesh, slime seems to get the indentation for the `loop` macro completely wrong
<bollu> or, er, lisp-mode
yauhsien has joined #commonlisp
zacque has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 276 seconds]
<bollu> hmm, can I index a hash table by strings instead of symbols?
<bollu> it seems annoying to have to call intern each time
<bollu> not to mention error prone...
<bollu> (make-hash-table :test 'equal) nice
<mfiano> Absolutely.
<mfiano> Well you might not want #'equal
<mfiano> Comparing strings with #'equal is case-insensitive. "Foo" and "foo" would be hashed to the same value.
<bollu> Another question: How do I get a hash table that stores a "default value" if it doesn't have a given key, and returns me the default value?
<mfiano> THe optional argument to #'gethash
<bollu> that doesn't seem to have the same semantics
<mfiano> Then you'll have to explain better.
edgar-rft has quit [Quit: Leaving]
<bollu> (progn (defstruct s s1 s2) (defparameter *h* (make-hash-table)) (incf (s-s1 (gethash :k *h* (make-s :s1 0 :s2 0)))) (gethash :k *h*))
<bollu> I would expect this to return #S(S :S1 1 :S2 0)
<bollu> but it returns nil
leeb has quit [Ping timeout: 256 seconds]
<bollu> essentially, I expected that it would create a value of #S(S :S1 0 :S2 0), and then let me increment the `:S1` slot
<bollu> but that's not what seems to happen (?)
<bollu> I imagined it returns a *pointer* to the new value it stores in the hash table. Rather, the semantics seems to be different, in a way that I don't follow.
leeb has joined #commonlisp
<mfiano> (multiple-value-bind (value exists-p) (gethash key table) (if exists-p value (setf (gethash key table) default-value)))
<mfiano> Common Lisp uses uniform reference semantics.
<bollu> mfiano what does that mean?
<mfiano> Common Lisp employs uniform reference semantics.
<bollu> :)
<bollu> so, I don't follow why this does not follow from reference semantics
gko has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
<bollu> (gethash :k *h* (make-s :s1 0 :s2 0)) <- does this return a reference to a value **stored in the hash table** ?
gko has joined #commonlisp
<mfiano> I am not going to try to understand code that is not indented in a paste service. Indentation is important for understanding the semantics.
<mfiano> No.
<mfiano> It returns a reference to the object you just created, leaving the hash table alone.
<Bike> bollu: if you do (gethash :k *h* (make-s ...)) and :k is not in the table, it will evaluate the make-s and return that, but not alter the hash table.
<mfiano> I think I just said that.
<Bike> Yes
<bollu> mfiano, Bike I see
<Bike> when you do (incf (s-s1 ...)), that will mutate the s object, but not anything else
<mfiano> See my multiple-value-bind form for the semantics you are looking for. Wrap it in a function, called #'ensure-gethash or something.
<bollu> https://gist.github.com/bollu/8d2639c6e09657f3283f970e592b2a43 <- Then I don't understand why the last line prints a `1`.
<Bike> Because when you do (incf (gethash ...)), you are actually altering the table
<Bike> that does, more or less, (setf (gethash ...) (+ 1 (gethash ...)))
<Bike> whereas your other form does (setf (s-s1 ...) ...) so the setf is only altering the S, not the table
<bollu> ah, I see
<bollu> mh
kahve has quit [Remote host closed the connection]
<bollu> mfiano thanks for the implementation
<mfiano> Anytime.
<mfiano> Feel free to ask any more questions if you are confused.
<mfiano> You might want to join #clschool if you have lots of questions regarding the basics though. I think this channel assumes at least experience with the fundamentals
<bollu> mfiano yep, will join the other channel as well
yauhsien has joined #commonlisp
edgar-rft has joined #commonlisp
* mfiano can't remember everyone that asks questions here, and tries to give answers more suitable to beginners in #clschool
neirac has quit [Ping timeout: 256 seconds]
notzmv has quit [Ping timeout: 248 seconds]
Bike has quit [Quit: Lost terminal]
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
neirac has joined #commonlisp
neirac has quit [Client Quit]
euandreh has quit [Quit: WeeChat 3.5]
Bike has joined #commonlisp
guest74 has joined #commonlisp
yauhsien has quit [Ping timeout: 256 seconds]
zeroc00l0 has joined #commonlisp
<beach> Good morning everyone!
_paul0 has quit [Quit: Leaving]
hashfunc65d has quit [Ping timeout: 250 seconds]
euandreh has joined #commonlisp
aeth_ has joined #commonlisp
waleee has quit [Ping timeout: 248 seconds]
aeth has quit [Ping timeout: 256 seconds]
<zeroc00l0> hey beach!
akoana has quit [Quit: leaving]
zeroc00l0 has quit [Quit: Client closed]
aeth_ is now known as aeth
yauhsien has joined #commonlisp
semz_ has joined #commonlisp
semz has quit [Ping timeout: 248 seconds]
yauhsien has quit [Ping timeout: 256 seconds]
<zacque> clhs 3.1.1.4
<zacque> How can one create and/or pass an environment object into a function/macro?
<zacque> Is it an alist?
<beach> The nature of such an object is not specified.
<mfiano> An environment is not an object that is defined. You will need to use a portability library.
<beach> You need to get it from the argument to a macro or something similar.
<Bike> i think &environment parameters are actually the only defined way to get an environment. well, and make-load-form methods, but that's about the same
tyson2 has quit [Read error: Connection reset by peer]
<Bike> Certainly there are no operators to construct one from scratch or to augment an existing one, except in extensions like the cltl2 interface
notzmv has joined #commonlisp
<zacque> Oh, so it's implicitly passed as an &environment argument?
<zacque> I meant the environment object is passed around implicitly, rather than being manipulated explicitly by the user
slowButPresent has quit [Quit: leaving]
<beach> There is nothing implicit about it being passed around. But there are no specified operations you can apply to it.
<zacque> Hmmm, this is so confusing
<Bike> the only defined thing you can do with an environment object is pass it to other standard functions, e.g. macroexpand. none of these standard functions mutate the environment or anything
<beach> zacque: What is confusing about it?
<zacque> Bike: How do you "pass it to other standard functions" then?
<Bike> same way you pass anything else
<zacque> Where does it come from and how do you pass it around?
<beach> zacque: (list <some-form-that-evaluates-to-an-environment-object>)
<Bike> (defmacro foo (&environment env) (macroexpand 'bar env))
<Bike> they're not magical or anything, it's just that there's not much you can do with them
<zacque> beach: What are the forms that evaluate into an environment object?
<Bike> &environment parameters in defmacro, the optional parameter to a make-load-form method
<zacque> Bike: What to pass into `foo`? Or are we only allow to use `(foo)`?
<Bike> i think that's basically it
<zacque> Can I do something like `(foo <some-env-object>)`?
<Bike> zacque: foo is a macro. you do (foo) and the implementation passes in the environment.
<zacque> Ah, I see, that's what I meant by "passing around implicitly"
<Bike> you can, but given that foo is a macro its arguments won't be evaluated, so you probably don't want to. but you can certainly do (defun foo (env) (macroexpand 'bar env)), and then if you have an environment from elsewhere you can do (foo env)
<zacque> Bike: But how would you invoke `(foo <env>)`?
<beach> (defmacro m (&environment env) (foo env))
<zacque> Oh, I see
<zacque> To clear my thought, the only way to obtain an environment object is through the &environment parameter in the `defmacro` form
<zacque> And that object is automatically supplied at macroexpansion time
<beach> As Bike said: "<Bike> &environment parameters in defmacro, the optional parameter to a make-load-form method"
<beach> Yes, macro functions are called with a form and an environment object as arguments.
<zacque> Oh, so there are only *two* ways to obtain an environment object
<beach> That's what Bike said. I can't exclude having missed some way.
<zacque> Ah, that's good enough for now. I'll add more to the "obtain environment object" list if there are more
<Bike> i guess you could get one via *macroexpand-hook*, but that's not different from the parameter
<Bike> and operators other than defmacro have &environment, like define-setf-expansion, but that's basically the same as the macro situation
<Bike> *-expander
Bike has quit [Quit: Connection closed]
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
Oladon has joined #commonlisp
jeosol has joined #commonlisp
<jeosol> Morning guys
<jeosol> is there a case where you can open a file-stream (not using with-open-file) because  I need to access it from many functions and then after processing, close it manually. Each function writes stuff to the file progressively. Or this is a bad, just use with-open-file and use :append mode)
mebious has joined #commonlisp
aeth has quit [Ping timeout: 260 seconds]
mebious has quit [Read error: Connection reset by peer]
aeth has joined #commonlisp
z4kz has joined #commonlisp
rotateq has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
z4kz has quit [Ping timeout: 252 seconds]
<White_Flame> jeosol: open & close
<White_Flame> no problem doing it that way if that's what it needs
<White_Flame> just watch your error capture to try to close it; however, due to GC it might autoclose at some indeterminate future point even if you just die and unwind
<White_Flame> if something does go wrong
<White_Flame> or, you could do (with-open-file (...) (catch :close ...)) and throw a :close from some deeply nested point instead of calling CLOSE there
<White_Flame> that way you could keep a simple loop of handling whatever needs to stream out the file
<White_Flame> re-opening it with :append every time you want to write is expensive, but could be fine if this isn't time-sensitive, or it needs have a chance to be valid after every write, like appending to a log file
<jeosol> White_Flame: Thanks for your reply. I have it working right now, there are not too many functions to try to instrument with-open-file and that may introduce bugs.
<jeosol> So basically, what I do, is I create an object and save the stream in a slot, so I have methods that specialized on the object and I just access the slot for the stream, and use it to write. When done, I close it.
<jeosol> It's something like gnuplot, I write a bunch of commands, through many functions, .., I imagine reopening each time will add some small but finite cost
<White_Flame> yeah, fully indefinite extent
<jeosol> I'll probably leave it like that.
<White_Flame> however, if you can bound the scope of that extent, it can be handy
<White_Flame> since often it's just there during a load/export/whatever processing
<jeosol> yeah, it will be nice, I do agree with that
<jeosol> I was running a long run test code and machine goes up, up to 70% cpu, could be for other reason. So I started going through code to check resources, etc. Eventually the machine trips off. I check and it seems it's a dell issue with the machine. But when I am not running high load, the machine stays on.
attila_lendvai has quit [Ping timeout: 252 seconds]
<jeosol> As soon as I start the CL application, it ramps up and then dies, so I started checking that resources to make sure it's not from the application
Inline has quit [Quit: Leaving]
<White_Flame> does it just die on cpu temps, regardless of code?
yauhsien has joined #commonlisp
Oladon has quit [Quit: Leaving.]
yauhsien has quit [Ping timeout: 250 seconds]
Sankalp has quit [Ping timeout: 248 seconds]
szkl has quit [Quit: Connection closed for inactivity]
shka has joined #commonlisp
Cymew has joined #commonlisp
wmblathers has joined #commonlisp
wmblathe_ has quit [Ping timeout: 260 seconds]
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
aartaka has joined #commonlisp
attila_lendvai has joined #commonlisp
frgo has quit [Ping timeout: 256 seconds]
karlosz has joined #commonlisp
rotateq has joined #commonlisp
Sankalp has joined #commonlisp
Algernon69 has joined #commonlisp
bitmapper has quit [Quit: Connection closed for inactivity]
Sankalp has quit [Read error: Connection reset by peer]
dre has joined #commonlisp
karlosz_ has joined #commonlisp
karlosz_ has quit [Remote host closed the connection]
Sankalp has joined #commonlisp
karlosz has quit [Ping timeout: 240 seconds]
<jackdaniel> how outrageous would be to signal storage-exhausted condition when the resulting integer falls outside of the fixnum size? (asking for a friend)
<jackdaniel> more seriously though, would that be conforming?
varjag has joined #commonlisp
joast has quit [Ping timeout: 250 seconds]
szkl has joined #commonlisp
<mfiano> You mean storage-condition?
<jackdaniel> yes
ttree has quit [Ping timeout: 276 seconds]
<mfiano> "In general, the entire question of how storage allocation is done is implementation-dependent, and so any operation might signal storage-condition at any time."
<mfiano> So conforming, yes.
<jackdaniel> thanks
<zacque> I'm playing with EVAL-WHEN according to the Figure 3-7. EVAL-WHEN processing table, in clhs 3.2.3.1
<zacque> clhs 3.2.3.1
<specbot> Processing of Top Level Forms: http://www.lispworks.com/reference/HyperSpec/Body/03_bca.htm
<rotateq> It still gives me a tough time.
<zacque> I don't think :evaluate in CTT mode works?
<zacque> With this code: https://paste.debian.net/1239984/
pjb has joined #commonlisp
<jackdaniel> you need to define what do you mean by works :) execute is called when you load a ".fasl" file
<zacque> rotateq: Ya, it's complicated.. Ha!
<zacque> jackdaniel: Oh, I'm expecting to see the message "CTT Evaluate" printing out with `(asdf:load-system :asdf-eval-when :force t)`
<zacque> The `defsystem` is simply (defsystem #:asdf-eval-when :components ((:file "main")))
<zacque> `asdf:load-system` will invoke `compile`, then following by `load`
<jackdaniel> the moment you enter asdf semantics, you leave the cl standard field. asdf may do something non-obvious
<jackdaniel> i.e I can't tell whether it will do compile then load a fasl, or load the file then compile etc
<jackdaniel> so if your goal is to understand eval-when, I'd experiment with functions load and compile-file
<zacque> Okay, let me try again
<jackdaniel> (load "file.lisp") (compile-file "file.lisp") and (load (compile-file "file.lisp")
<jackdaniel> )
<pjb> it should do: (load (compile-file "file.lisp"))
<zacque> Interesting, only (eval-when (:execute) (format t "CTT Evaluate~%")) is executed with `LOAD main.lisp`
<zacque> But not with (load (compile-file "main.lisp"))
<jackdaniel> sorry, I've provided invalid information
<zacque> Why? I didn't see anything wrong
<jackdaniel> execute forms are executed "that is, those that are not top level forms, or those in code processed by eval or compile"
<jackdaniel> and I've said that they are executed when you load a fasl file (and that is not true)
treflip has joined #commonlisp
treflip has quit [Remote host closed the connection]
treflip has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
azimut has joined #commonlisp
Brucio-61 has quit [Ping timeout: 248 seconds]
<pjb> zacque: indeed, the :execute situation is when you load the source file (or run the expression at the REPL).
<pjb> zacque: when you load the .fasl file, it's the :load-toplevel situation.
<pjb> zacque: and when you compile the code, it's the :compile-toplevel situation.
scymtym has quit [Ping timeout: 260 seconds]
yauhsien has joined #commonlisp
<zacque> jackdaniel: Okay... But I don't quite get the difference
<zacque> pjb: Ya, thanks. I just figured out that ASDF doesn't provide the semantics for (load "file.lisp")
<zacque> Since it always compiles before loads
<zacque> So, (asdf:load-system :foo :force t) = (load (compile-file ...)), (asdf:operate 'asdf:compile-op :asdf-eval-when :force t) = (compile-file ...)
<jackdaniel> /what/ always compiles before loads?
<jackdaniel> as I said, asdf questions are orthogonal to eval-when behavior
<zacque> Oh, I meant ASDF:LOAD-OP only loads .fasl files
<jackdaniel> (i.e asdf is not part of the standard)
<zacque> Ya, but ASDF is built on top of the standard with respect to the LOAD and COMPILE-FILE behaviour
<zacque> And we usually interact with Lisp projects from ASDF pov
yauhsien has quit [Ping timeout: 248 seconds]
<zacque> So it's helpful to see how ASDF and eval-when can work together
<jackdaniel> the fact that my function (defun hello () (print "hello world")) is built on top of the standard with respect to print behavior gives me 0 insight on how the pretty printer works
NotThatRPG has quit [Ping timeout: 248 seconds]
Brucio-61 has joined #commonlisp
<jackdaniel> indeed, knowing what to expect from asdf wrt eval-when is useful, so if that's your goal then tinker with that
<zacque> Okay, I get your point
<zacque> Yup, I just want to see how ASDF and eval-when works together
jmdaemon has quit [Ping timeout: 252 seconds]
azimut has quit [Ping timeout: 240 seconds]
NotThatRPG has joined #commonlisp
Brucio-61 has quit [Ping timeout: 248 seconds]
Brucio-61 has joined #commonlisp
scymtym has joined #commonlisp
random-nick has joined #commonlisp
leeb has quit [Quit: WeeChat 3.2.1]
aartaka has quit [Ping timeout: 248 seconds]
Alfr has quit [Quit: Leaving]
Alfr has joined #commonlisp
<zacque> Back to Figure 3-7, how to observe the behaviour of (eval-when (:execute) ...) in CTT mode?
<zacque> To quote clhs 3.2.3: "When compile-file is in compile-time-too mode, forms are evaluated both at compile time and load time."
dre has left #commonlisp [Leaving]
<zacque> With this code, I'd expect my (eval-when (:execute) ...) will be executed at both compile time and load time, but that's not what I'm getting
snits has quit [Quit: No Ping reply in 180 seconds.]
<zacque> I run with (compile-file "main.lisp"), then (load "main.fasl")
snits has joined #commonlisp
Inline has joined #commonlisp
Sankalp has quit [Ping timeout: 248 seconds]
wmblathe_ has joined #commonlisp
Sankalp has joined #commonlisp
Dynom has joined #commonlisp
wmblathers has quit [Ping timeout: 256 seconds]
kevingal has joined #commonlisp
<pjb> zacque: you can use the the asdf:load-source-op to load the sources in asdf. Useful for debugging in clisp for example…
<pjb> zacque: the situation :execute is only at run-time and source load time.
<pjb> For compile-time, use :compile-toplevel and for fasl load time, use :load-toplevele.
<pjb> s/e././
lisp123 has joined #commonlisp
kevingal has quit [Ping timeout: 252 seconds]
kevingal has joined #commonlisp
Inline has quit [Quit: Leaving]
<zacque> pjb: Thanks for informing me about asdf:load-source-op!
<jeosol> White_Flame: I slept off. Responding to your question on "does it just die on cpu temps, regardless of code?" I check the forums, a lot of people suggest it's due to some CPU temp thing, that I need to replace the termal paste (not an expert on this), and other things
<jeosol> White_Flame: I did some code refactoring, using with-open-file ... as much as possible to ensure there aren't problems coming from the code itself. I don't think it's due to the CL code as I have run similar code elsewhere. I will continue investigating
<jeosol> White_Flame: Thanks for your time to discuss the approaches
<zacque> pjb: Hmmm, my question is mainly about the difference in eval-when behaviour as described in clhs vs as implemented (by sbcl)... From my understanding, in clhs, eval-when (:execute) is stateful because of the two CTT and NCT modes. In practice, eval-when (:execute) is stateless and has behaviour as you described
<zacque> pjb: Hmmm, maybe I'll just stick to the behaviour that you described
xaotuk has joined #commonlisp
Inline has joined #commonlisp
jeosol has quit [Quit: Client closed]
<lieven> are you sure? back in the day you had FSUBRs. functions whose arguments were not evaluated.
<lieven> they can do the same thing as macros more or less
Inline has quit [Client Quit]
<lieven> Kent Pitman's Special Forms in Lisp paper also seems to talk about FEXPRs as historically earlier
jeosol has joined #commonlisp
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 248 seconds]
treflip has quit [Quit: Quit]
tyson2 has joined #commonlisp
perrierjouet has quit [Ping timeout: 248 seconds]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 256 seconds]
Lord_of_Life_ is now known as Lord_of_Life
semz_ is now known as semz
treflip has joined #commonlisp
Oddity has quit [Ping timeout: 246 seconds]
WBarends has quit [Quit: Textual IRC Client: www.textualapp.com]
Bike has joined #commonlisp
jeosol has quit [Quit: Client closed]
pillton has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
<Bike> zacque: you're misunderstanding the compilation semantics. eval-when alters the CTT etc state _within the body of eval-when_. it doesn't affect later top level forms.
<Bike> 3.2.3.1 talks about how _the body of the eval-when_ is processed, not subsequent top level forms, which are unaffected.
vats has quit [Ping timeout: 246 seconds]
dec0d3r has joined #commonlisp
<Bike> as it says in 3.2.3, "successive forms are read from the file by compile-file and processed in not-compile-time mode"
Oddity has joined #commonlisp
yauhsien has joined #commonlisp
Oddity has quit [Ping timeout: 256 seconds]
<zacque> Bike: Hmmm, then how does the CTT/NCT MODE fit into the picture if it doesn't the subsequent top-level forms?
<zacque> Is it about nested EVAL-WHEN?
<Bike> like i said, it affects the processing of the body of eval-when. including nested eval-when, yes.
yauhsien has quit [Ping timeout: 256 seconds]
<zacque> I see... That's a bit weird
<zacque> Is it because there is no "top-level form" concept anymore within the body of EVAL-WHEN?
<zacque> So it needs to define the semantics for nested EVAL-WHEN?
<Bike> the reason eval-when semantics only affect the body of eval-when and not later top level forms is that this is complicated enough without working in side effects
szkl has quit [Quit: Connection closed for inactivity]
<Bike> and that's just generally how forms work. LET doesn't affect later forms either
<zacque> Can you please elaborate on this: "this is complicated enough without working in side effects"?
<zacque> You meant the alternative way to obtain the same behaviour is complicated and needs to rely on side-effects?
<zacque> > "that's just generally how forms work" I see
<Bike> i mean, from your paste, it seems like how you expected it to work is that each eavl-when would side effect the compiler state to change how later top level forms were processed.
<zacque> Ah, yup I did expect it to work that way
<zacque> I see
<Bike> which would mea
<Bike> n that to figure out whether any form is evaluated by the compiler or what, you'd need to look at all previous forms in the file
<zacque> Make sense
<zacque> Thanks! Now I need to play with nested EVAL-WHEN a little bit :-D
slowButPresent has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
rgherdt has quit [Ping timeout: 260 seconds]
<zacque> I think I get it! Running (load "main.lisp"), (compile-file "main.lisp") and (load "main.fasl") on this file clicks for me
<zacque> This should handle all the cases as shown in Figure 3-7
<zacque> Thanks!
Inline has joined #commonlisp
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
yauhsien has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
varjag has quit [Quit: ERC (IRC client for Emacs 26.3)]
rgherdt has joined #commonlisp
cage has joined #commonlisp
waleee has joined #commonlisp
<bollu> I wanted a library for task parallelism and lightweight locks around a global hash table
<bollu> I was recommended lparallel + bordeaux-threads
<bollu> I was wondering if there were other suggestions
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 256 seconds]
lisp123 has joined #commonlisp
<bollu> hmm, how do I set the PATH variable for `slime`'s REPL?
rotateq has quit [Remote host closed the connection]
<bollu> uiop:run-program isn't able to find an executable that I'm pretty sure is in my $PATH
aartaka has joined #commonlisp
lisp123 has quit [Ping timeout: 256 seconds]
<Bike> uiop:run-program goes through system(3), so it should be using your usual PATH. you could try :force-shell t to make sure it's doing that instead of trying to run a binary
random-nick has quit [Ping timeout: 256 seconds]
<NotThatRPG> bollu: You could test by pointing run program at an absolute path for the executable to see if it's a PATH issue.
<NotThatRPG> Note it's possible that if you are in SLIME, it's *possible* that Emacs has a different value of PATH from your shell.
zacque has quit [Quit: Goodbye :D]
random-nick has joined #commonlisp
aartaka has quit [Ping timeout: 276 seconds]
aartaka has joined #commonlisp
orestarod has joined #commonlisp
kevingal has quit [Ping timeout: 256 seconds]
kevingal has joined #commonlisp
cage has quit [Remote host closed the connection]
cage has joined #commonlisp
frgo has joined #commonlisp
frgo has quit [Ping timeout: 260 seconds]
Algernon69 has quit [Quit: Leaving]
kevingal has quit [Ping timeout: 256 seconds]
kevingal has joined #commonlisp
rotateq has joined #commonlisp
ttree has joined #commonlisp
MajorBiscuit has joined #commonlisp
rogersm has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
Cymew has quit [Ping timeout: 256 seconds]
Bike has quit [Quit: Connection closed]
NotThatRPG has quit [Ping timeout: 246 seconds]
MajorBiscuit has quit [Quit: WeeChat 3.4]
xaotuk has quit [Ping timeout: 260 seconds]
xaotuk has joined #commonlisp
<bollu> Hmm, how do I set environment variables for `uiop:run-program`?
<bollu> argh, I keep forgetting that "slots" are a very general concept!
<bollu> (setf (uiop:getenv "LEAN_PATH") "../../build/lib/") works perfectly...
MajorBiscuit has joined #commonlisp
rogersm has quit [Quit: Leaving...]
random-nick has quit [Ping timeout: 248 seconds]
tyson2 has quit [Remote host closed the connection]
Bike has joined #commonlisp
random-nick has joined #commonlisp
jcowan has left #commonlisp [#commonlisp]
dec0d3r has quit [Quit: Leaving]
azimut has joined #commonlisp
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
aartaka has joined #commonlisp
Oladon has joined #commonlisp
jmdaemon has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
NotThatRPG has joined #commonlisp
euandreh has quit [Ping timeout: 260 seconds]
ec has joined #commonlisp
euandreh has joined #commonlisp
morganw has joined #commonlisp
treflip has quit [Quit: Quit]
matt` has joined #commonlisp
Sankalp has quit [Ping timeout: 260 seconds]
ns12 has quit [Quit: bye]
ns12 has joined #commonlisp
Sankalp has joined #commonlisp
karlosz has joined #commonlisp
karlosz has quit [Client Quit]
kevingal has quit [Remote host closed the connection]
ebrasca has joined #commonlisp
MajorBiscuit has quit [Quit: WeeChat 3.4]
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NotThatRPG has joined #commonlisp
tyson2 has joined #commonlisp
kpoeck has joined #commonlisp
igemnace has quit [Ping timeout: 276 seconds]
jeosol has joined #commonlisp
<jackdaniel> I'm not sure whether someone shared this here, but there is a new common lisp implementation written /entirely/ in C: https://github.com/nptcl/npt
<White_Flame> is beach seriously the only person creating a new common lisp implementation entirely in common lisp?
ec has quit [Ping timeout: 240 seconds]
lisp123 has joined #commonlisp
nature has joined #commonlisp
<White_Flame> the c, the </simpsons>
<jackdaniel> I suppose that it is a spectrum; i.e ccl is mostly written in common lisp, similar to sbcl and unlike ecl
<jackdaniel> I don't know about commercial implementations
<rotateq> jackdaniel: And this npt is by now a full CL?
lisp123 has quit [Ping timeout: 248 seconds]
<jackdaniel> I don't know, but the codebase looks surely impressive
<rotateq> Yeah okay. :)
<jackdaniel> someone should probably run ansi-test on it and see how far they get
<jackdaniel> i.e 1) do tests start, 2) do they finish without crashing, 3) list known defects
xaotuk has quit [Ping timeout: 260 seconds]
<rotateq> Impressive of course, I wouldn't be able to do that.
<jackdaniel> there remains the question whether it is impressive in a good or in a bad sense, but surely it must have been a big undertaking
<random-nick> mezzano is pure CL, if you disregard the bootloader and count LAPs (essentially functions written in sexp asm) as CL
<rotateq> A big plus is, it's not everything in one file.
<random-nick> though the demo isn't pure CL, since it includes doom and quake (written in C)
akoana has joined #commonlisp
<Bike> is there a rationale somewhere? i guess maybe not in english?
rgherdt has quit [Read error: Connection reset by peer]
<jackdaniel> it is apparently "meant to be embeddable in C", but I'm only repeating what I saw as a reddit comment
<rotateq> random-nick: Or when you use the meta level and capabilities CL provides to generate the appropriate assembler code.
rgherdt has joined #commonlisp
<Bike> not much detail. i see, thanks
<rotateq> jackdaniel: Would be metacircular again taking the C implementation of Symbolics to compile the new implementation.
<random-nick> rotateq: this is basically how those LAPs look like in mezzano https://github.com/froggey/Mezzano/blob/master/runtime/runtime-x86-64.lisp
<jackdaniel> how would that be metacircular?
<jackdaniel> random-nick: it has plenty of parenthesis, so lispiness test passed ,-)
<rotateq> jackdaniel: Okay.
<rotateq> random-nick: Nice, I see it way nearer to assembler. (or better the other way around, assembler nearer to lisp than C)
<rotateq> jackdaniel: Cause afaik their C impl was in CL.
<jackdaniel> isn't metacircularity about sharing operators with the host language?
<rotateq> yes right, wasn't meant too serious
yauhsien has joined #commonlisp
rgherdt has quit [Ping timeout: 250 seconds]
<jackdaniel> I just didn't get the joke (mainly because I've never studied in depth what is a metacircular interpreter, so I wasn't sure:)
<rotateq> next time I'll name it chicken-egg situation ^^
<random-nick> it seems to have some trouble parsing something in ansi-tests
<random-nick> says Token-type error
<random-nick> that's only for gclload1.lsp, gclload2.lsp fails with some file error
aeth has quit [Ping timeout: 248 seconds]
<jackdaniel> do you say "stored in the accessor"? "accessed with the accessor(?)"
aeth has joined #commonlisp
<random-nick> hmm, interestingly enough, the debug build of npt does manage to begin loading ansi-tests
rgherdt has joined #commonlisp
<guest74> Is there a format operator to capitalize a string? I can't quite remember.
yauhsien has quit [Remote host closed the connection]
tyson2 has quit [Remote host closed the connection]
<White_Flame> Guest74: string-upcase
<White_Flame> unless you mean just the first character? have to roll your own
<guest74> ~@()
<White_Flame> oh, FORMAT
kpoeck has quit [Quit: Client closed]
<random-nick> ah no, it was loading its own tests, not ansi-tests (and they don't pass)
<Nilby> (apropos 'capitalize) or (string-<completion key> reveals one
Oladon has quit [Quit: Leaving.]
<guest74> apparently I also forgot about string-capitalize.
<White_Flame> huh
<guest74> format is fun though.  One day the first sentient emoji will be born from a format string.
ec has joined #commonlisp
n1to has joined #commonlisp
guest74 has quit [Quit: Connection closed]
rgherdt has quit [Ping timeout: 256 seconds]
n1to has quit [Client Quit]
n1to has joined #commonlisp
Inline has quit [Remote host closed the connection]
* Nilby might be just a sentient emoji
<Nilby> since my dad always said my mom knew how to sink characters, and my mom always said my dad was a source of expletives, and that i was "emotionally expressive"
<rotateq> Nilby: You're one of the FORMAT masters. :)
<Nilby> a dubious title for sure
splatt990 has quit [Ping timeout: 250 seconds]
<jackdaniel> don't get picky, unless you want them to dub you /the master of emoji/
<Nilby> :-( 🆖
Oddity has joined #commonlisp
<rotateq> as long as no one says to another "You may be part of the council, but we don't grant you the rank of a master."
wmblathe_ is now known as wmblathers
<random-nick> hmm, I give up trying to run ansi-test on that npt implementation
<random-nick> if someone else wants to try, the reader error when trying to load gclload1.lsp is the symbols :|| and #:|| in universe.lsp
<random-nick> but now it gives some kind of stream related error and I have no idea why
xaotuk has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
aeth has quit [Ping timeout: 260 seconds]
aeth has joined #commonlisp
pranavats has joined #commonlisp
Posterdati has quit [Ping timeout: 248 seconds]
morganw has quit [Remote host closed the connection]
aeth_ has joined #commonlisp
aeth has quit [Killed (NickServ (GHOST command used by aeth_))]
aeth_ is now known as aeth
Posterdati has joined #commonlisp
scymtym has quit [Ping timeout: 248 seconds]
Brucio-61 has quit [Ping timeout: 248 seconds]
tyson2 has joined #commonlisp
Dynom has quit [Quit: WeeChat 3.5]
igemnace has joined #commonlisp
rgherdt has joined #commonlisp
pfd has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
scymtym has joined #commonlisp
Brucio-61 has joined #commonlisp
Inline has joined #commonlisp
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
pillton has joined #commonlisp
karlosz has joined #commonlisp
NotThatRPG has quit [Quit: Textual IRC Client: www.textualapp.com]
vats has joined #commonlisp
sjl has quit [Quit: WeeChat 2.2-dev]
matt` has quit [Remote host closed the connection]
z4kz has joined #commonlisp
rotateq has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
gxt has quit [Ping timeout: 240 seconds]
aeth has quit [Ping timeout: 256 seconds]
gxt has joined #commonlisp
aeth has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
shka has quit [Ping timeout: 256 seconds]
z4kz has quit [Quit: Client closed]
orestarod has quit [Ping timeout: 248 seconds]
n1to has quit [Quit: Leaving]
ec has quit [Ping timeout: 240 seconds]
Bike has quit [Quit: Connection closed]
random-nick has quit [Ping timeout: 260 seconds]
pfd has quit [Quit: Client closed]
hashfunc65d has joined #commonlisp
Bike has joined #commonlisp
xaotuk has quit [Ping timeout: 260 seconds]
azimut has quit [Ping timeout: 240 seconds]
azimut has joined #commonlisp
z4kz has joined #commonlisp
seok has quit [Ping timeout: 248 seconds]
jack_rabbit has quit [Quit: ZNC 1.8.2 - https://znc.in]
knusbaum has joined #commonlisp