jackdaniel 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/> | offtopic --> #lispcafe
mbomba has quit [Ping timeout: 260 seconds]
notzmv has quit [Remote host closed the connection]
mbomba has joined #lisp
notzmv has joined #lisp
jonatack has quit [Quit: jonatack]
drl_ has joined #lisp
drl_ has quit [Read error: Connection reset by peer]
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
karayan has quit [Ping timeout: 240 seconds]
karayan has joined #lisp
surabax has quit [Quit: Leaving]
dhil has quit [Ping timeout: 240 seconds]
psebcc[m] has joined #lisp
judson_ has joined #lisp
sm2n_ has joined #lisp
sm2n has quit [Ping timeout: 260 seconds]
housel has quit [Ping timeout: 260 seconds]
housel has joined #lisp
Codaraxis__ has quit [Remote host closed the connection]
Codaraxis__ has joined #lisp
wildlander has joined #lisp
zcheng3 has joined #lisp
raamdev[m] has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
<thmprover> OK, I have an interesting conundrum: I want to make a `thm` class, to track results proven from axioms and other theorems. BUT I don't want anyone to be able to "cheat" and construct their own `thm` instances. Is there any way to raise an exception if `make-instance` is called for `thm` outside of certain white-listed packages?
<no-defun-allowed> Does instantiating a thereom put it somewhere?
<thmprover> It just creates an object, it doesn't store it in a "theorem dictionary" anywhere.
<no-defun-allowed> I would rather have an internal function like ADD-THEOREM-TO-DATABASE, which could also allow for multiple theorem databases.
<thmprover> Ah, so, that's the next layer of abstraction. You could think of `thm` as working at the "assembly level of mathematics". Having a database of theorems would be at a higher level.
zcheng3 has quit [Ping timeout: 240 seconds]
<no-defun-allowed> Right, so instantiating a theorem shouldn't be a problem in itself?
<thmprover> Hmm, maybe you're right, and I'm just overly concerned.
<thmprover> You know, how hatters go mad? Theorem provers go paranoid.
Codaraxis__ has quit [Ping timeout: 260 seconds]
Codaraxis__ has joined #lisp
wxie has joined #lisp
wildlander has quit [Quit: Konversation terminated!]
<mfiano> We don't "raise exceptions" in Common Lisp
<mfiano> We signal conditions. Big difference
Lord_of_Life has quit [Read error: Connection reset by peer]
<thmprover> Well, I wanted the computer to explode into a million pieces, but then I thought, "No, that might be a bit too much..."
<aeth> An exception is only for exceptional circumstances. A condition is... only for exceptional circumstances. But the latter's way more powerful.
<aeth> thmprover: and yes, there is
<aeth> *package*
<Xach> conditions are not only for exceptional circumstances!
<aeth> thmprover: I guess (let ((*package* foo)) ...) could be used to cheat, but I've only ever seen *package* change with in-package and if they want to cheat that badly, then let them
<thmprover> Yeah, I think the best I can do is just make life hard for them if they want to cheat.
Lord_of_Life has joined #lisp
<Alfr_> Is there some fundamental difference between axioms and theorems in your model? If not, then why not unify them and cheating will hopefully result in some contradiction down the road or let's the user discover an interesting bunch of axioms ...
<aeth> thmprover: for this sort of thing, I'd personally consider a WARN, actually.
<aeth> (warn "You shouldn't be doing this.")
fitzsim has quit [Ping timeout: 240 seconds]
ebrasca has quit [Remote host closed the connection]
<no-defun-allowed> On the other hand, if the user cheats, I also believe they get what they deserve.
<aeth> error/cerror/signal/warn... probably a few more. http://www.lispworks.com/documentation/HyperSpec/Body/c_condit.htm
<aeth> It would be amusing if you use cerror and give the user a chance to rebind *package*
mbomba has quit [Quit: WeeChat 3.0]
mbomba has joined #lisp
EvW has quit [Ping timeout: 264 seconds]
Lord_of_Life has quit [Ping timeout: 256 seconds]
Lord_of_Life has joined #lisp
Fare has quit [Quit: Leaving]
housel has quit [Ping timeout: 260 seconds]
housel has joined #lisp
Josh_2 has quit [Ping timeout: 240 seconds]
<oni-on-ion> can clos names be hidden/private, so that make-instance would fail to find symbol?
mankaev_ has quit [Ping timeout: 240 seconds]
Inoperable has quit [Quit: All your buffer are belong to us!]
jw4 has quit [Quit: tot siens]
jw4 has joined #lisp
mankaev has joined #lisp
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Inoperable has joined #lisp
hahawang has joined #lisp
ckoz[m] has joined #lisp
srandon111 has quit [Remote host closed the connection]
lucasb has quit [Quit: Connection closed for inactivity]
frost-lab has joined #lisp
semz has quit [Ping timeout: 246 seconds]
judson_ has joined #lisp
<Xach> oni-on-ion: i think you could use an uninterned symbol as the name. that would make it trickier.
<no-defun-allowed> Yes, uninterned symbols work fine. We use those when describing classes generated from external schemas in Netfarm.
idxu_ has joined #lisp
<edgar-rft> I have encrypted all your symbols! Send MOST-POSSIBLE-BIGNUM bitcoins to get the decrypion key.
idxu has quit [Ping timeout: 260 seconds]
idxu_ is now known as idxu
<no-defun-allowed> Where do I get that many?
<no-defun-allowed> I could give you (1+ most-positive-bignum) though.
lonjil has quit [Ping timeout: 246 seconds]
jbgg has quit [Ping timeout: 246 seconds]
Fare has joined #lisp
Codaraxis__ has quit [Remote host closed the connection]
Codaraxis__ has joined #lisp
lonjil has joined #lisp
semz has joined #lisp
mbomba has quit [Quit: WeeChat 3.0]
jbgg has joined #lisp
karayan has quit [Ping timeout: 264 seconds]
karayan has joined #lisp
sgibber2018 has joined #lisp
sgibber2018 has quit [Client Quit]
sgibber2018 has joined #lisp
_whitelogger has joined #lisp
Lycurgus has joined #lisp
judson_ has joined #lisp
orivej has quit [Quit: orivej]
igemnace has joined #lisp
sgibber2018 has quit [Quit: WeeChat 2.9]
quazimodo has joined #lisp
Codaraxis__ has quit [Ping timeout: 240 seconds]
Codaraxis__ has joined #lisp
orivej has joined #lisp
drl has quit [Remote host closed the connection]
Lycurgus has quit [Quit: Exeunt]
akoana has quit [Quit: leaving]
marblestation[m] has joined #lisp
<beach> Good morning everyone!
Alfr has joined #lisp
Alfr_ has quit [Ping timeout: 264 seconds]
banjomet has joined #lisp
<banjomet> yesterday I remember everybody was talking about garbage collectors and I was wondering what you guys thought about azul's c4 continuously compacting collector for the jvm aimed at finance companies
nowhereman has quit [Remote host closed the connection]
<no-defun-allowed> C4 is a very good solution for garbage, provided you clean up the debris.
nowhereman has joined #lisp
<no-defun-allowed> Interesting, that is a generational collector too.
skapata has quit [Remote host closed the connection]
narimiran has joined #lisp
mbomba has joined #lisp
clar[m] has joined #lisp
_whitelogger has joined #lisp
wxie has quit [Ping timeout: 240 seconds]
thmprover has quit [Quit: Up, up, and away]
zaquest has joined #lisp
zaquest has quit [Remote host closed the connection]
Bike has quit [Quit: Lost terminal]
aartaka has joined #lisp
wxie has joined #lisp
tempest_nox has joined #lisp
galex-713 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
nowhereman has quit [Ping timeout: 272 seconds]
Codaraxis__ has quit [Remote host closed the connection]
Codaraxis__ has joined #lisp
torbo has quit [Remote host closed the connection]
KREYREEN is now known as kreystorm
kreystorm is now known as KREYREEN
Stanley00 has joined #lisp
wooden has quit [Quit: leaving]
wooden has joined #lisp
wooden has joined #lisp
galex-713 has joined #lisp
banjomet has quit [Quit: Leaving]
urek__ has quit [Ping timeout: 272 seconds]
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
judson_ has joined #lisp
<oni-on-ion> gmb
saganman has joined #lisp
grandpa_nick has joined #lisp
imode has joined #lisp
grandpa_nick has left #lisp [#lisp]
abhixec has joined #lisp
shka_ has joined #lisp
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<beach> oni-on-ion: You forgot to turn on abbrev mode.
<Nilby> Does anyone know how to avoid the sbcl note: could not stack allocate ?
<Nilby> For example with this: (defun foo (c1 c2 &key key test) (intersection c1 c2 :key key :test test))
<Nilby> I'm guessing it's telling me it can't to tail recursion?
<no-defun-allowed> Why would that use tail recursion?
<no-defun-allowed> Also, that code doesn't produce a note, even with (declare (optimize (speed 3) (safety 1))) preceding the body, so I think something else is going on.
<Nilby> I'm guessing it wouldn't, and maybe that's why it's warning?
<beach> Nilby: (declare (sb-ext:muffle-conditions sb-ext:compiler-notes)) or something like that.
<beach> Nilby: You may want to look in the SBCL manual.
<no-defun-allowed> Why would it produce a warning if there is no way it could benefit from tail recursion?
<no-defun-allowed> It could tail-call INTERSECTION, sure, but I don't think that is the problem. Usually I get that note when I have declared something DYNAMIC-EXTENT.
<Nilby> beach: Thank you, but I'm trying avoid havving these long muffling around everything.
<beach> Then do it once with DECLAIM.
<Nilby> It produces the note when you compile it, e.g. with compile-file or asdf
<beach> ... and put it in your .sbclrc
<no-defun-allowed> I can't tell how you could produce that note with that code, so I can't tell you how to avoid it.
<Nilby> no-defun-allowed: If you stick that line in file and compile-file it.
<no-defun-allowed> No notes here.
<Nilby> Maybe my setup is crazy. :( I'm always seeing some strange notes when compiling with default optimization settings.
<oni-on-ion> beach +)
<Nilby> no-defun-allowed: Thanks, maybe looking at the DYNAMIC-EXTENT optimizations is a clue.
<Nilby> Weird. I don't get it when I run with --no-userinit, so I must have done something in the ~3k lines of .sbclrc.
<Nilby> Thanks lispers for the sanity check.
<no-defun-allowed> There wasn't a DYNAMIC-EXTENT declaration in the code you provided, by the way.
makomo has quit [Ping timeout: 272 seconds]
<Nilby> I get other inexplicable notes too, so I should figure out why.
karayan has quit [Ping timeout: 240 seconds]
karayan has joined #lisp
andreyorst has joined #lisp
karayan has quit [Read error: Connection reset by peer]
srandon111 has joined #lisp
karayan has joined #lisp
karayan has quit [Client Quit]
abhixec has quit [Ping timeout: 240 seconds]
<srandon111> guys i am newbie with lisp, i tinkered a little bit and read some SICP, i am able to do basic stuff, but won't consider myself more than a newbie... my question is... do the lisp languages today (2020) still have advantages over other programming languages? such as python, ruby or golang ? if yes, which are these advantages? i mean most of the programming languages nowadays have a repl and can do functional stuff.. what are the reall advantages of
<srandon111> using a lisp ?
sgibber2018 has joined #lisp
sgibber2018 has quit [Client Quit]
g0d_shatter has joined #lisp
<beach> Yes, CLOS, macros.
zacts has joined #lisp
<beach> Compiler available at run time.
<beach> Each other language may have one or more of those features, but no other language has them all.
<beach> One more: The Common Lisp language was carefully designed to allow for the compiler to generate fast code.
zacts has quit [Client Quit]
<beach> One more: With the exception of structs, the semantics are defined by a suite of interactions, whereas most languages must start from an empty global environment.
<beach> I am off to buy food, but I can give you more when I get back.
<beach> Or others can point you to the "Common Lisp features" web site.
jurov has quit [Ping timeout: 272 seconds]
<Nilby> srandon111: Common Lisp has strong advantages over every language, but may have some ecosystem disadvantages for some uses. One has to weigh the power, expressiveness, flexibility, and speed against the ecosystem concerns.
<oni-on-ion> basically its just the binary size (50mb+)
<no-defun-allowed> Python and Ruby are basically single-implementation languages, and that implementation is very slow.
<hahawang> In my opinion, learning lisp makes you a better programmer, it's delightful. Many other popular programming language evolutes itself to lisp.
<no-defun-allowed> Go does not have a REPL and cannot do functional stuff.
<no-defun-allowed> I'm not sure if someone said it ironically or not, but you're supposed to be able to eyeball the complexity of a function with the braces, and that's not doable with higher-order functions.
g0d_shatter has quit [Quit: Leaving]
<oni-on-ion> i just relate it to C --- linux/windows/mac already comes with all the stuff thats needed. so "unix" being a C VM. lisp just happens to come with its own (which ironically does depend on the whole "C VM")
<hahawang> Lisp gives you a better prospective to think about what programs are and what programming means. It roots from a few of axioms and constructs program in an elegant way.
<no-defun-allowed> It has also been said that Go is a good language if you believe nothing happened since the 1960s, because it is basically only an imperative language, with CSP, no exceptions or generics, and a shoddy incremental mark-sweep GC.
<mfiano> no-defun-allowed: Go doesn't have 90% of the features even comparable lisp-exclusive languages have
<no-defun-allowed> mfiano: That is also true.
<hahawang> In lisp, there is no gap between program and data, everything is about lists and atoms, i think it's the most powerful feature that other programming language lacks.
<mfiano> The philosophy is that by being simpler, it is easier to reason about and faster to produce code. But it turns out that is far from the case. You can't even overload arity, and because of a lack of generics, you are left copypasta left and right
<no-defun-allowed> And I should note that I do not really use Common Lisp as a functional programming language.
<no-defun-allowed> Most of my "work" is using the Common Lisp Object System and associated meta-object protocol, and/or in "controlled" side effects
tempest_nox has quit [Read error: Connection reset by peer]
Blukunfando has quit [Ping timeout: 256 seconds]
andreyorst` has joined #lisp
<srandon111> beach, CLOS ? well i would like to use lisp as a functional language
andreyorst` has quit [Client Quit]
andreyorst` has joined #lisp
<srandon111> can i use common lisp in a functional way?
<no-defun-allowed> Yes, but you would be missing out.
andreyorst has quit [Ping timeout: 256 seconds]
<srandon111> no-defun-allowed, missing out what?
<no-defun-allowed> Lisp is a fine imperative language, should you need side effects. I would say you would also miss out on object-oriented concepts, but that is because most people who want to use a "functional language" are explicitly trying to avoid it, and not because functional and object paradigms are separate.
bilegeek has joined #lisp
<srandon111> no-defun-allowed, ok but my thing is... if want to write in a functional style, does lisp allows that or it has its quirks ?
<no-defun-allowed> It does allow for that, yes.
<srandon111> no-defun-allowed, and is it not a recommended style? i mean lisp programmers generally prefeer OOP instead of functional?
<srandon111> differing for example from scheme programmers
<no-defun-allowed> I don't think many people would admit they have a preference, saying they "pick whichever is more suitable". Of course, that's subjective too.
<srandon111> okok thanks no-defun-allowed
aartaka has quit [Read error: Connection reset by peer]
aartaka has joined #lisp
<no-defun-allowed> Most of my code is imperative, and uses an object-oriented style though. (And you've fallen for something, contrasting "OOP instead of functional")
<Nilby> You can use Lisp as a functional language, but it is imperative that you don't constrain or object to functional metaprogramming dataflow induction.
<no-defun-allowed> I recall Dylan and Scala were/are explicitly marketed as "object-functional" languages.
<srandon111> no-defun-allowed, so you mean that it is also not a problem to combine the two approaches ? ok but i prefer a more functionalish approach to OOP
<srandon111> and using structs
<no-defun-allowed> And Gabriel, White and Bobrow have a good outline of how that could happen: https://www.dreamsongs.com/Files/clos-cacm.pdf
<no-defun-allowed> srandon111: You can use generic functions with any class (including structure-classes).
<srandon111> no-defun-allowed, yes that's fine!
<srandon111> no-defun-allowed, are you aware of any scheme books similar to "practical common lisp" ?
<no-defun-allowed> If you use those without inheritance, then you get something like Haskell typeclasses, where you have "ad-hoc polymorphism".
<no-defun-allowed> srandon111: I am not, I haven't done much Scheme programming before.
<srandon111> no-defun-allowed, i don't know what typeclasses are
<srandon111> where can i learn these things ?
<no-defun-allowed> Well, there aren't actual typeclasses in Common Lisp, but the "dispatch" that happens is similar.
<srandon111> no-defun-allowed, i don't knkow what typeclasses are
<no-defun-allowed> To summarise, you have a data structure (eg Maybe), you have the typeclass (eg Monad), and there are several generic functions that you implement with that data structure (I think those are...fmap, return at least?)
<no-defun-allowed> So you have a functional data structure which is separate from the methods (note this is also true for "normal" CLOS with standard-classes), and you have a dispatch system when you call the generic function.
<no-defun-allowed> And, of course, you can use immutable objects, and because generic functions are functions, you can use them with higher order functions.
<Nilby> Imagine looking at one of these https://imgur.com/a/zcuLMKu, and thinking up functional programming in Lisp.
<no-defun-allowed> Apart from type weenieng, I think those are most of the characteristics of functional programming.
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
wallyduchamp has joined #lisp
<srandon111> no-defun-allowed, where can i learn these concepts? should i learn haskell first? or is there any resource to learn functional programming with common lisp ?
<no-defun-allowed> srandon111: Learning Haskell isn't necessary, but my point is that you would eventually find something like generic functions and structures in another functional programming language.
Alfr has quit [Remote host closed the connection]
Alfr has joined #lisp
Codaraxis__ has quit [Remote host closed the connection]
Codaraxis__ has joined #lisp
random-nick has joined #lisp
orivej has quit [Ping timeout: 264 seconds]
Codaraxis__ has quit [Ping timeout: 246 seconds]
wallyduchamp has quit [Quit: Leaving]
Codaraxis__ has joined #lisp
<Nilby> In case anyone was wondering, I was getting a bunch of unexpected notes in sbcl because I changed the default optimize space from 1 to 0.
KREYREEN has quit [Remote host closed the connection]
<phoe> Nilby: what kind of notes?
KREYREEN has joined #lisp
Codaraxis__ has quit [Remote host closed the connection]
<Nilby> "could not stack allocate"
<phoe> oh - you are trying to DX some objects?
Codaraxis__ has joined #lisp
<Nilby> What's DX?
<Nilby> I know XD but...
<Nilby> A one line example was: (defun foo (c1 c2 &key key test) (intersection c1 c2 :key key :test test))
<phoe> DX, dynamic-extent
liberliver has joined #lisp
<Nilby> Ah no, but that's what no-defun-allowed gueesed too.
<Nilby> I almost always trust the compiler to get that.
<Nilby> Now I learned at least 2 things today :)
achilles has quit [Quit: WeeChat 2.9]
jianbo has joined #lisp
<Nilby> I still get the lovely "Type assertion too complex to check" notes.
bitmapper has quit [Quit: Connection closed for inactivity]
Cymew has joined #lisp
<beach> srandon111: That's not what you asked though.
<beach> srandon111: CLOS is different from object-oriented programming, both as defined by Alan Kay and as defined by what we usually think about as object-oriented languages, like Java, C#, etc.
<beach> srandon111: So to summarize, yes, Common Lisp has plenty of advantages compared to other languages, and I forgot to mention homoiconicity (but it was said in a different way), but if what you want is a purely functional language, Common Lisp is not it.
catchme_ has joined #lisp
<beach> srandon111: Then, I don't quite understand why you would want to renounce something like CLOS, since you don't seem to know what it does.
CatchMe has joined #lisp
CatchMe has quit [Quit: done]
catchme_ is now known as catchme
Necktwi has quit [Ping timeout: 240 seconds]
frgo_ has joined #lisp
anticrisis has joined #lisp
Necktwi has joined #lisp
frgo has quit [Ping timeout: 260 seconds]
jianbo has quit [Ping timeout: 264 seconds]
<srandon111> beach, i was thinking it was something for OOP
<srandon111> beach, i like clojure and scheme ideas, but the problem with clojure is slow startup which i care for my apps
<srandon111> and the problem with schemes is that there is not much resources and third party libraries
<srandon111> except for racket which i don't like for it being too much bound to drracket
<beach> srandon111: There is no widespread agreement of "object-oriented programming", so call it what you want, but if you expect something like what Java does, then that's not it.
<beach> srandon111: CLOS is way more versatile. It does not confuse object representation and encapsulation.
<moon-child> srandon111: graalvm has fast startup times, and I think works for clojure
<beach> srandon111: And it has things like method combinations, multiple dispatch, etc.
<srandon111> moon-child, "it works" ,ahhahah funny... try to compile any program with graalvm, only a very small fraction would work
<phantomics> Hey, a question: is there a way to "copy" a symbol macro from one package to another at runtime without doing an (eval `(define-symbol-macro ,symbol ,other-symbol))?
<phoe> hm
<phoe> there is no symbol-macro-function
<beach> Yeah, I was looking for it too.
<beach> I guess you need first-class global environments in the form of Clostrum.
<phoe> or a trivial-symbol-macro-function
<beach> Well, it's not a function, really.
<beach> More like an "expansion".
<phoe> well we have macro-function, maybe we could also have symbol-macro-function
<phoe> but yes, that would be a zero-arg thunk
<phoe> because symbol macros take no arguments for their expansion.
<Krystof> (define-symbol-macro symbol nil) (setf *macroexpand-hook* (lambda (expansion form env) (if (eql form symbol) (macroexpand other-symbol env) (funcall expander form env))))
<beach> Hey Krystof.
<Krystof> untested, not actually recommended, why would you do this anyway, etc.
<Krystof> morning
<beach> So you still have some time for Lisp? :)
<Krystof> barely
hendursa1 has joined #lisp
toorevitimirp has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
harlchen has joined #lisp
<Krystof> well. I might have had more time for Lisp were it not that I'm do programming as the job now, so my enthusiasm is lower for out-of-hours programming (or indeed staring at screens) of any sort
toorevitimirp has joined #lisp
<Krystof> and, also, 2020
<beach> Understandable.
<phoe> Krystof: oh no
<phantomics> Hmm, thanks phoe
<phoe> I did not really help much
hendursaga has quit [Ping timeout: 240 seconds]
Codaraxis__ has quit [Remote host closed the connection]
Codaraxis__ has joined #lisp
<phantomics> Thanks to Krystof too, I'll try that code
Lord_of_Life has quit [Changing host]
Lord_of_Life has joined #lisp
<Krystof> phantomics: but seriously, you probably shouldn't want to do what you want to do
<phantomics> Ok, there's probably another way
<phantomics> I'm basically converting one symbol to another which is supposed to be interned in a particular package, but I can just convert it to the macro symbol in the original package
<Krystof> symbol macros are pretty fundamentally: (a) a compile-time thing, and (b) a helper for implementing lexical things like with-slots / with-accessors or, at a pinch, doing other weird things like communicating things about the current environment
Codaraxis__ has quit [Remote host closed the connection]
<Krystof> can't you actually make it be the same symbol? (intern it into its new package?)
<Krystof> I mean "import" not "intern"
srandon111 has quit [Ping timeout: 256 seconds]
<Krystof> (import other-symbol "PACKAGE-OTHER-SYMBOL-SHOULD-BE-IN")
Codaraxis__ has joined #lisp
iskander- has joined #lisp
wxie has quit [Ping timeout: 240 seconds]
iskander has quit [Ping timeout: 272 seconds]
wxie has joined #lisp
iskander- has quit [Ping timeout: 256 seconds]
iskander has joined #lisp
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
anticrisis has quit [Read error: Connection reset by peer]
srandon111 has joined #lisp
wxie has quit [Ping timeout: 272 seconds]
srandon111 has quit [Ping timeout: 260 seconds]
ljavorsk has joined #lisp
pve has joined #lisp
wxie has joined #lisp
luna_is_here has joined #lisp
saganman has quit [Ping timeout: 240 seconds]
wxie has quit [Ping timeout: 256 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
srandon111 has joined #lisp
mbomba has quit [Quit: WeeChat 3.0]
hahawang has quit [Quit: WeeChat 1.4]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
srandon111 has quit [Ping timeout: 256 seconds]
SAL9000 has quit [Ping timeout: 256 seconds]
srandon111 has joined #lisp
wxie has joined #lisp
wxie has quit [Ping timeout: 240 seconds]
catchme has quit [Quit: Connection closed for inactivity]
lxsameer has quit [Ping timeout: 264 seconds]
orivej has joined #lisp
wxie has joined #lisp
wxie has quit [Ping timeout: 260 seconds]
lxsameer has joined #lisp
surabax has joined #lisp
bilegeek has quit [Quit: Leaving]
imode has quit [Ping timeout: 264 seconds]
tris[m] has joined #lisp
jonatack has joined #lisp
srandon111 has quit [Ping timeout: 258 seconds]
srandon111 has joined #lisp
jonatack has quit [Ping timeout: 258 seconds]
jonatack has joined #lisp
srandon111 has quit [Ping timeout: 272 seconds]
vegansbane has quit [Quit: The Lounge - https://thelounge.chat]
srandon111 has joined #lisp
diamondbond has quit [Ping timeout: 272 seconds]
stzsch has quit [Quit: stzsch]
stzsch has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
jeosol has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #lisp
vegansbane6 has joined #lisp
shifty has quit [Ping timeout: 264 seconds]
urek__ has joined #lisp
frgo_ has quit [Read error: Connection reset by peer]
frgo has joined #lisp
diamondbond has joined #lisp
amirouche has joined #lisp
spal is now known as susam_[m]
susam_[m] is now known as spal
frost-lab has quit [Quit: Connection closed]
gareppa has joined #lisp
zstest3[m] has joined #lisp
<spxy[m]> hello
<phoe> heyyyy
gareppa has quit [Remote host closed the connection]
gko_ has joined #lisp
EvW has joined #lisp
cosimone has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
dhil has joined #lisp
Stanley00 has quit []
EvW has quit [Ping timeout: 258 seconds]
cosimone has quit [Quit: cosimone]
spal is now known as susam
susam is now known as spal
nowhereman has joined #lisp
gaqwas has quit [Remote host closed the connection]
aartaka_d has joined #lisp
aartaka has quit [Ping timeout: 240 seconds]
aartaka has joined #lisp
<beach> spxy[m]: You are relatively new here, right?
<phoe> beach: AFAIK yes, he is
<beach> phoe: How do you know spxy[m] is male?
aartaka_d has quit [Ping timeout: 260 seconds]
<phoe> damn
<phoe> beach: AFAIK yes, they are
<beach> Heh.
* phoe not feeling well today - sorries.
<beach> Oh, sorry to hear that! What's wrong?
* phoe moves to query.
<srandon111> phoe, hey how are you ?
<phoe> srandon111: alive, will be well in a few days. thanks.
Fare has joined #lisp
<Nilby> .oO (incf (player-hp (player 'phoe)))
amirouche has left #lisp ["WeeChat 2.8"]
Bike has joined #lisp
marblestation[m] has left #lisp ["User left"]
gxt_ has quit [Remote host closed the connection]
gxt_ has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
EvW has joined #lisp
mbomba has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
Blukunfando has joined #lisp
ljavorsk has quit [Ping timeout: 240 seconds]
amb007 has joined #lisp
gproto23 has joined #lisp
wsinatra has joined #lisp
orivej has joined #lisp
lukego has quit [Ping timeout: 240 seconds]
contrapunctus has joined #lisp
<contrapunctus> o/
lukego has joined #lisp
gproto23 has quit [Quit: Leaving]
kaftejiman has joined #lisp
rumbler31 has joined #lisp
<phoe> heyyy
thomasb06 has joined #lisp
<flip214> shouldn't that be *phoe*? or at least |#lisp|::phoe?
<phoe> flip214: but we are in #lisp
<thomasb06> Hello. Does anyone have an idea how to bind a key to execute a bash command in Stumpwm (in my case 'nnn')? The config `(define-key *top-map* (stumpwm:kbd "s-F7") "exec xterm n")` doesn't work
<phoe> that's why 'phoe === '|#lisp|::phoe
<flip214> phoe: well, do you want to be readable everywhere?
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #lisp
<phoe> thomasb06: there's #stumpwm that might be more specific to this question
<phoe> oh! you've asked there
<thomasb06> phoe went there first...
<thomasb06> yep, quiet place
<Bike> it does have activity, though you might have to wait a couple hours
<thomasb06> Bike jet lag issue maybe
<phoe> if it's completely silent and/or the issue is impatient, you might want to try https://github.com/stumpwm/stumpwm/issues
rumbler31 has quit [Remote host closed the connection]
krwq has joined #lisp
<thomasb06> Wow, I'm not going to publish something on github for that... My only worry is that I can't reconnect and see if someone answered
<phoe> seems like #stumpwm is logged so you can check answers later
<thomasb06> phoe I just need to go to that link to see there is an answer later? Nice, thanks for the trick
ljavorsk has joined #lisp
<phoe> thomasb06: yes
<phoe> might need to go back in history a bit, but this contains the channel logs
<flip214> "let's do the time warp again" ... but don't kill Caesar, that always messes up the history books until the fallout settles
<thomasb06> phoe many thanks
<phoe> et tu, flip214, contra me
<_death> thomasb06: I'm guessing you want "S-F7"... s seems to mean super, while S means shift
<thomasb06> _death it's lower 's', for super indeed
ljavorsk has quit [Ping timeout: 258 seconds]
<_death> thomasb06: generally you can use `C-t h k` (I think C-t is the default stumpwm prefix?.. I've been using C-z for a long time now) to see how to designate a keybinding
pfdietz has joined #lisp
johnjay has quit [Ping timeout: 260 seconds]
aartaka has quit [Read error: Connection reset by peer]
urek__ has quit [Read error: Connection reset by peer]
<thomasb06> _death let me have a look
<aeth> phoe: probably more like '|irc.freenode.#lisp|::phoe
urek__ has joined #lisp
<aeth> phoe: or a::phoe (where a is for alias) for short with the magic of package local nicknames
<thomasb06> _death it works great, thanks
<phoe> aeth: I like this last suggestion
<thomasb06> _death C-z is my command key in screen...
<_death> C-t in emacs is just too useful ;)
<thomasb06> for now I didn't have the issue, but it's less than a week I'm under Stump...
johnjay has joined #lisp
C-16 has joined #lisp
C-16 has quit [Client Quit]
aartaka has joined #lisp
C-16 has joined #lisp
C-16 has quit [Client Quit]
dyelar has joined #lisp
ljavorsk has joined #lisp
Lycurgus has joined #lisp
rumbler31 has joined #lisp
hendursaga has quit [Ping timeout: 240 seconds]
rumbler31 has quit [Ping timeout: 246 seconds]
lxsameer has left #lisp ["WeeChat 2.9"]
hendursaga has joined #lisp
EvW has quit [Ping timeout: 264 seconds]
nowhereman has quit [Ping timeout: 258 seconds]
abel-abel has joined #lisp
<phantomics> Hey everyone, another question: I'm having trouble due to compiling code containing symbols from packages that don't exist yet but will at runtime.
<phantomics> I have functions that, when they run, will create a Lisp package and populate it with some variables, the code I'm compiling calls these variables. Is there a way to make this work?
<phantomics> In all cases, the compiled code will not run before the package is created, but the compiler chokes on the references to variables from a nonexistent package regardless
<Bike> you cannot read, let alone compile, code with symbols from nonexistent packages.
<Bike> you can defer the symbol lookups to runtime though.
<phantomics> Ok
waleee-cl has joined #lisp
<Bike> like, instead of (apply 'nonexistent:foo ...), (apply (find-symbol "FOO" "NONEXISTENT") ...)
<phantomics> Makes sense, thanks
<Nilby> phantomics: maybe uiop:symbol-call
<phantomics> That would have to be (apply (symbol-function (find-symbol "FOO" "NONEXISTENT")) ...) right?
<phoe> phantomics: doesn't need to be
<phoe> symbols are funcallable
<phoe> (funcall (find-symbol "LIST" "CL") 1 2 3)
<phoe> ;=> (1 2 3)
<phantomics> Interesting, not sure I ever tried that
<phoe> this is useful e.g. when the functions don't exist yet
<phoe> you can't get a hold of #'foo for funcalling it later, but you do can get a hold of 'foo
<phantomics> Cool
<phoe> I exercised this knowledge recently because the code I submitted to quicklisp did not compile
<phoe> try taking a look at this commit, at this whole file, and tell me why!
judson_ has joined #lisp
jianbo has joined #lisp
Lycurgus has quit [Quit: Exeunt]
jianbo has quit [Client Quit]
aartaka_d has joined #lisp
aartaka has quit [Ping timeout: 240 seconds]
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aartaka has joined #lisp
aartaka_d has quit [Ping timeout: 256 seconds]
<flip214> phoe: how fast is this queue compared to SBCL's mailboxes (which ISTR are lockless)?
aartaka has quit [Ping timeout: 260 seconds]
<phoe> flip214: I did not compare against SBCL mailboxes - only Quicklisp libraries. Might be worth to check them mayhaps, the benchmark code is easily adaptable
<phoe> also my queue is not thread-safe by any means.
thomasb06 has quit [Remote host closed the connection]
makomo has joined #lisp
judson_ has joined #lisp
slyrus has joined #lisp
abel-abel has quit [Ping timeout: 246 seconds]
SAL9000 has joined #lisp
<Kabriel> beach srandon111 another advantage, CL is backed by a standard specification
<beach> Yes, I keep forgetting to point that out.
<beach> It's a major argument in my talks to industry.
<aeth> The advantage is that people can and do switch from implementations, e.g. everyone who used CLISP 10 years ago is probably using SBCL or CCL now.
aartaka has joined #lisp
<phoe> but the source code is mostly the same, plus minus extensions beyond the standard that got unified into portalibs
sjl has joined #lisp
andreyorst` has quit [Quit: andreyorst`]
aartaka has quit [Ping timeout: 256 seconds]
Cymew has quit [Ping timeout: 240 seconds]
<jmercouris> "Computationally augmented browsing"
<beach> I should check out Nyxt at some point.
<jmercouris> I would be most interested in your opinions :-D
<beach> When I do, I will almost certainly give you feedback.
<pfdietz> phoe: it's also useful for serialization. 'foo can be written and read back in, or put into a fasl file as a constant. #'foo cannot (although load-time-value can be used to recreate it.)
aartaka has joined #lisp
bitmapper has joined #lisp
<_death> jmercouris: cool.. consider using a tree for the range queries.. the naive approach is very slow
<spal> I can relate to CLISP to SBCL transistion that aeth mentioned. I began learning Common Lisp using CLISP in 2007 on a rickety laptop running Debian 4.0 (Etch) in an airport when I had a long layover. Now 13 years later, I use SBCL on macOS.
mbomba has quit [Quit: WeeChat 3.0]
<jmercouris> _death: a tree where the neighbor nodes are childreN?
<_death> jmercouris: a spatial tree that stores the points
zcheng3 has joined #lisp
<jmercouris> each node has a hash table, each key in that hash table is an edge, each value a weight (distance)
<jmercouris> it is a fully connected graph in this way
<jmercouris> I don't know if what you are suggesting is more performant or not
Nilby has quit [Read error: Connection reset by peer]
<_death> in generate-document-distance-vectors you compare every document with every other document (twice)
<jmercouris> _death: this is true
<jmercouris> you know what, actually there is an easy way around this, store the reciprocal value immediately
<_death> this is not necessary.. you can use properties of the metric, like commutativity or triangle inequality
<jmercouris> so if we calculate (distance a b) we can store (distance b a) as well, and just check if it has been calculated
<jmercouris> comutativity is the best I think
<jmercouris> commutativity*
<jmercouris> I will improve that, thank you
<_death> you also use appendf for simulating a queue
<jmercouris> what's wrong with that?
<_death> each insertion is O(N)
<jmercouris> oh boy
<jmercouris> each call to appendf? is O(N)?
<jmercouris> really?
<jmercouris> I would have assumed it just tags onto the end of the cons list
<beach> How could it be otherwise?
<Bike> append is not destructive. it cons up copies of all lists but the final one.
<jmercouris> I figured it may have a reference to the head and tail of each list
<_death> it needs to get to the end of the list
<jmercouris> I did not know that...
<jmercouris> hm, expensive indeed
<beach> jmercouris: Where would it store that reference?
<jmercouris> implementation detail
<jmercouris> not my proble :-D
<jmercouris> it seems like an obvious optimization...
<jmercouris> well, less assuming on my part would be good
<beach> So each CONS cell would have an additional pointer?
jeosol has joined #lisp
<beach> And what if the same CONS cell were used in several APPEND operations?
<jmercouris> a good point...
<jmercouris> I was thinking more along the lines of I specify (list) the implementation should consider I want to do many operations against it
<jmercouris> maintain a head, tail, etc
urek has joined #lisp
<jmercouris> I see now that in the general case this would be extremely difficult
<jmercouris> so should I use a queue library?
<_death> there used to be a TCONC operator, if you want something lightweight..
jonatack has quit [Ping timeout: 272 seconds]
urek__ has quit [Ping timeout: 272 seconds]
<jmercouris> I could also just maintain a list of lists
<jmercouris> then traverse the list of lists to remove all elements
<jmercouris> then appending would be a lot cheaper in general unless the lists are all of length 1
jonatack has joined #lisp
<_death> why not just use a queue data type?
Steeve has joined #lisp
surabax has quit [Quit: Leaving]
mathrick has quit [Ping timeout: 246 seconds]
<jmercouris> there is a queue in CL?
<_death> it's simple enough to implement one.. there are also a bunch of libraries
gko_ has quit [Ping timeout: 256 seconds]
<jmercouris> of course it is, but I don't know if I want to add another dependency
<jmercouris> I may write one if it isn't in any of our dependencies already
reaktivo[m] has joined #lisp
mathrick has joined #lisp
<sjl> (which mentions TCONC that _death was referring to)
<_death> hah, I didn't remember it also had a TCONC definition ;)
reaktivo[m] has left #lisp [#lisp]
kaftejiman has quit [Remote host closed the connection]
<jmercouris> looks simple enough
<jmercouris> thank you Steve
<sjl> Though probably not thread safe. If you want synchronized queues I think JPL queues has one, or the queue from lparappel
<sjl> *lparallel
<jmercouris> not needed to be thread safe
EvW has joined #lisp
<_death> before you do anything, it may be a good idea to measure the timings.. say for 1000 items
<_death> this should help you understand the issues
ljavorsk has quit [Ping timeout: 258 seconds]
hnOsmium0001 has joined #lisp
srandon111 has quit [Ping timeout: 240 seconds]
tris[m] has left #lisp ["User left"]
<contrapunctus> If there's a program written in CL which is extensible in the Emacs style (arbitrary external code), what can I do to prevent extensions from doing certain things like accessing the filesystem outside of the storage provided by the application or running shell commands, without explicitly prompting the user? (There's the SICL project, but I'm not sure it's ready for use at the moment...and I'd prefer a
<contrapunctus> n implementation-independent solution.)
<jmercouris> contrapunctus: good luck :-)
jianbo has joined #lisp
<contrapunctus> lol
<jmercouris> _death: yes, I haven't done any optimization yet
<beach> contrapunctus: first-class global environments.
<jmercouris> the real answer is OS level security
<jmercouris> jails, containers, etc
<beach> Now in the form of an external library: Clostrum.
<phoe> contrapunctus: CL is generally written in a way that trusts the programmer and trusts code that is executed
<jmercouris> there real answer is that when the user can execute arbitrary code, they can override your overrides, no matter what
<jmercouris> s/there/the
<jmercouris> so, run only trusted code
<jmercouris> and only in a secure environment
<phoe> so either you wait for beach's suggestion to become widespread across implementations and limit the symbols (and therefore API) that they can access
<beach> jmercouris: But with first-class global environments, the user can't execute arbitrary code.
<phoe> or you jail the whole Lisp image.
<beach> phoe: No need to wait. I convert the code to an AST then run the AST evaluator.
<jmercouris> beach: I wouldn't know about that
<jmercouris> not that I am doubting you
<jmercouris> I am saying, I am not knowledgable about that
<beach> phoe: It is around 4 times as slow as the native code, which is not bad.
<contrapunctus> beach: oh :'(
<beach> contrapunctus: What?
<phoe> beach: oh!
<contrapunctus> "4 times as slow"
<phoe> nice
<beach> contrapunctus: It will drop into native code for all the functions you allow it to execute.
notzmv has quit [Remote host closed the connection]
cosimone has joined #lisp
<contrapunctus> Oh, interesting ._.
<_death> contrapunctus: you can check out a project called cl-eval-bot.. it has a sandbox feature that supports a restricted subset of CL
<jmercouris> I would like to learn more about this, could be very useful for Nyxt
notzmv has joined #lisp
<jmercouris> s/could/will
<contrapunctus> beach: is this the repo? No license? 🤔 https://github.com/s-expressionists/Clostrum
<_death> contrapunctus: that may or may not be enough
<phoe> oh right, this might need to get a license
<jmercouris> which means both daniel and beach will need to agree on a license
krwq has quit [Ping timeout: 256 seconds]
<beach> contrapunctus: Yes, that's it.
<contrapunctus> Unlicense \o/ 😏
Cesdo has joined #lisp
<beach> BST 2 clause.
<jmercouris> It will probably be some MIT / BSD variant
<beach> Just like SICL.
<beach> er, BSD
<beach> Sorry.
<Cesdo> Hi all
<phoe> hey Cesdo
notzmv has quit [Remote host closed the connection]
<contrapunctus> Hey Cesdo
<jmercouris> there is your answer, it is written here
<jmercouris> BSD License
<beach> jmercouris: We don't need to agree. I paid jackdaniel to develop it, so I decide.
<jmercouris> you can use it now
<jmercouris> oh I see :-D
<jmercouris> well, well well then!
myNameJeff has joined #lisp
<contrapunctus> Who says you can't get paid writing Lisp?
<beach> Cesdo: Are you new here? I don't recognize your nick.
<contrapunctus> (SCNR)
<jmercouris> contrapunctus: very few people get paid writing Lisp, you must want it very much to achieve it
<beach> That's what jackdaniel does for a living, yes.
<Cesdo> beach: yes
<beach> Cesdo: Great! Welcome! What brings you to #lisp?
<phoe> hey hi hello then, new soul
<jmercouris> he would probably like to convert a Perl program into Lisp to see if Lisp is a better language, _death
<jackdaniel> I confirm (that beach decides about the license - but also the implementation is implicit from the specification he wrote)
<phoe> there's #lisp for Common Lisp discussion, ##lisp for discussing Lisps in general, #clschool for learning Common Lisp, and #lispcafe for general chillout offtopic chat stuff
gxt__ has joined #lisp
<phoe> and lots of smaller channels for Lisp implementations, projects, etc..
<contrapunctus> And an XMPP room too 😏 https://conversations.im/j/lisp@conference.a3.pm
<phoe> and a discord server as well
<Cesdo> Guys, please watch my code
andreyorst has joined #lisp
myNameJeff has left #lisp [#lisp]
<jackdaniel> the indentation is all wrong, and this code is scheme
<jackdaniel> there is a channel #scheme for scheme
gxt_ has quit [Ping timeout: 240 seconds]
<Cesdo> jackdaniel: ok
notzmv has joined #lisp
<beach> Cesdo: Or you can do your code in Common Lisp.
<beach> Cesdo: Then we can recommend tools to make it look idiomatic.
<Cesdo> :-D
<phoe> converting it to CL ain't too hard
<phoe> it's just frobbing DEFINE into a DEFUN
<beach> You need to get rid of the CamelCase too.
<contrapunctus> Cesdo: also, Lisp convention is to use kebab-case without abbreviations
<Cesdo> contrapunctus: understood
<pfdietz> For queues in Lisp: it's easy enough to implement a queue functionally in O(1) amortized time per operation, using two stacks.
<pfdietz> With a little more work you can get that down to O(1) time (not amortized) per operation.
<Cesdo> thanks to all
<phoe> pfdietz: a priority queue you mean, right?
<phoe> not just a FIFO one
<pfdietz> Nah, just a regular queue.
<phoe> oh, whew
<beach> It's a standard trick.
<pfdietz> Priority queue can sort, so not O(1) time per operation.
<phoe> for a moment I thought that I screwed up while programming DFPQ and I could go to O(1) with a prioqueue
<jmercouris> if you believe hard enough, anything is possible
<jackdaniel> that is not true
<jmercouris> lol, of course it isn't
<jackdaniel> then why did you say that?
<jmercouris> also, the moon is made of cheese
<jmercouris> because it was a joke
<_death> actually for jmercouris's code a queue isn't needed after all.. he can just transpose the two arguments to appendf and be done with it.. also that nonstandard loop syntax again...
<phoe> jmercouris: gimme a O(1) sorting algorithm and a slice of moon cheddar then
<pfdietz> Truly I tell you: we have a friend in cheeses.
<jmercouris> a friend in need is a cheese indeed
contrapunctus has left #lisp [#lisp]
surabax has joined #lisp
notzmv has quit [Remote host closed the connection]
notzmv has joined #lisp
jibanes has quit [Ping timeout: 246 seconds]
<_death> (well, not just transpose them.. he'll need to use append rather than appendf, or define prependf)
notzmv has quit [Remote host closed the connection]
notzmv has joined #lisp
jibanes has joined #lisp
notzmv has quit [Remote host closed the connection]
lalilulelo has joined #lisp
aeth has quit [Ping timeout: 240 seconds]
aeth has joined #lisp
hal99999 has joined #lisp
ebrasca has joined #lisp
cosimone has quit [Quit: cosimone]
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dim> the O(1) sorting algorithm is sometimes referred to as “God's algo” as in “if I were God, what would I do?” and then if you were God then of course the data would be already sorted to your preference... what a strange question... and then you try to imagine the next best thing
<spal> Am I misremembering it or did SLIME really use to have a startup animation while starting with M-x slime? I don't see the animated SLIME startup anymore.
<_death> it got removed
nkatte has joined #lisp
<_death> well, moved into a contrib.. slime-banner
<spal> :(
* easye still has slime-banner in slime-setup
easiere has joined #lisp
* _death discovers M-x animate-birthday-present
judson_ has joined #lisp
easye has quit [Remote host closed the connection]
easiere has quit [Quit: ERC (IRC client for Emacs 25.1.1)]
easye has joined #lisp
zabow has joined #lisp
makomo has quit [Quit: WeeChat 2.9]
sgibber2018 has joined #lisp
cosimone has joined #lisp
matryoshka` has quit [Quit: ZNC 1.8.2 - https://znc.in]
matryoshka has joined #lisp
rumbler31 has joined #lisp
notzmv has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
<dim> M-x butterfly anyone?
<lotuseater> yes I used it some time ago :D just for the fun of it
rumbler31 has quit [Ping timeout: 264 seconds]
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
Cesdo has quit [Read error: Connection reset by peer]
aindilis has joined #lisp
Cesdo has joined #lisp
sgibber2018 has quit [Quit: WeeChat 2.9]
norserob has quit [Quit: leaving]
sgibber2018 has joined #lisp
hal99999 has quit [Ping timeout: 256 seconds]
Jesin has quit [Quit: Leaving]
tempest_nox has joined #lisp
galex-713 has quit [Read error: Connection reset by peer]
hal99999 has joined #lisp
Jesin has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
skapata has joined #lisp
galex-713 has joined #lisp
zabow has quit [Ping timeout: 258 seconds]
abhixec has joined #lisp
notzmv` has joined #lisp
dhil has quit [Ping timeout: 264 seconds]
notzmv has quit [Ping timeout: 246 seconds]
easye has quit [Quit: ERC (IRC client for Emacs 25.1.1)]
easye has joined #lisp
easye has quit [Remote host closed the connection]
easye has joined #lisp
dhil has joined #lisp
liberliver has quit [Ping timeout: 256 seconds]
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
EvW1 has joined #lisp
dhil has quit [Ping timeout: 256 seconds]
judson_ has joined #lisp
EvW has quit [Ping timeout: 258 seconds]
EvW1 is now known as EvW
aorst has joined #lisp
andreyorst has quit [Quit: andreyorst]
akoana has joined #lisp
judson_ has quit [Client Quit]
judson_ has joined #lisp
aartaka_d has joined #lisp
aartaka has quit [Ping timeout: 240 seconds]
Jesin has quit [Quit: Leaving]
dhil has joined #lisp
notzmv` has quit [Ping timeout: 258 seconds]
Steeve has quit [Quit: end]
Jesin has joined #lisp
EvW has quit [Ping timeout: 260 seconds]
EvW has joined #lisp
narimiran has quit [Ping timeout: 246 seconds]
<lotuseater> okay now I get why NASA/JPL refuses using lisp anymore ^^ https://en.wikipedia.org/wiki/The_Power_of_10:_Rules_for_Developing_Safety-Critical_Code
notzmv has joined #lisp
jw4 has quit [Read error: Connection reset by peer]
jw4 has joined #lisp
quazimodo has quit [Ping timeout: 240 seconds]
quazimodo has joined #lisp
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fengshaun has quit [Quit: bibi!]
fengshaun has joined #lisp
_whitelogger has joined #lisp
urek has quit [Ping timeout: 260 seconds]
andreyorst has joined #lisp
_whitelogger has joined #lisp
shka_ has quit [Ping timeout: 240 seconds]
notzmv has quit [Remote host closed the connection]
notzmv has joined #lisp
Cesdo has left #lisp [#lisp]
urek has joined #lisp
jdz_ has joined #lisp
jdz has quit [Ping timeout: 260 seconds]
johnjay has quit [Ping timeout: 240 seconds]
fengshaun has quit [Quit: bibi!]
fengshaun has joined #lisp
dyelar has quit [Quit: Leaving.]
notzmv has quit [Remote host closed the connection]
nij has joined #lisp
<nij> Help! I think I'm stuck with the type system of 'defstruct...
<nij> https://bpa.st/23FQ <-- here's the issue.
<nij> I defined a structure 'date, which requires each slot to contain a number.
<nij> I then tried to parse string into it.. but it does not work.
<Bike> when you do a let binding like that you only take the primary value of the form
<Bike> that is, all the values of decode-universal-time past the primary value are discarded here
<Bike> you probably want to use multiple-value-bind instead
<Bike> (nth-value n a-variable) is always nil if n is greater than zero (and a-variable is not a symbol macro)
pve has quit [Quit: leaving]
<Bike> if you take this code but do like (print (nth-value 5 parsed-date)) you'll see that it's nil.
<nij> Hmm.. I'm trying to search for what the primary values are
<nij> but in vain.
<nij> So I should use 'multiple-value-bind instead of 'let?
<nij> :(
<Bike> what?
* nij fails to understand why the sequence isn't parsed successfully into the variable 'parsed-date
<Bike> okay, well, basiclaly decode-universal-time isn't returning a sequence. it's returning multiple values, which is a different thing.
<Bike> it's a bit more efficient in that it doesn't actually need to allocate any storage, like it would for a sequence.
<nij> I see. A multiple-valued function.
<Bike> The language semantics mean that in most contexts, values besides the primary return value are discarded. You need to use something like nth-value or multiple-value-bind to get at them.
<Bike> If you just bind the results of the form to a variable, like here, the variable will just be the primary value.
<nij> OH!
<nij> I see :D
<nij> Thank yah!
<Bike> You can e.g. use (multiple-value-list (decode-universal-time ...)) to get an actual list (i.e. sequence) of the values, and work with that, but multiple-value-bind is more idiomatic and efficient.
<Bike> yeah, no problem.
<Xach> oh man
<Xach> i forgot that jcb made mkcl!
<Xach> that makes his weird pro question even weirder!
<nij> It works :D I'm happy Bike
<Bike> that's good.
EvW has quit [Ping timeout: 258 seconds]
EvW has joined #lisp
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
judson_ has joined #lisp
<phoe> Xach: which pro question
<Xach> "change-class is hard to implement and nobody uses it, difficult things should be justified before adding them"
Fare has quit [Ping timeout: 264 seconds]
<phoe> >nobody uses it
<phoe> "Robert Strandh would like to know your location"
<phoe> no, I mean, seriously - I have use cases for it
<phoe> so should update-instance-for-redefined-class, who the hell even knows about this function
<phoe> who even designs functions that have names as long as this
<Xach> i uses it often
aeth has quit [Ping timeout: 246 seconds]
nij has quit [Ping timeout: 260 seconds]
aeth has joined #lisp
<Gnuxie[m]> change-class 💜💕
EvW has quit [Ping timeout: 260 seconds]
EvW has joined #lisp
dhil has quit [Quit: Leaving]
<yottabyte> question about yason, I want to encode json like {"something": {"a": 5, "b": [1, 2, 3]}} but I'm having some trouble with the inner object nesting. I tried using alexandria:plist-hash-table with no luck
<phoe> I guess this depends on how yason encodes lists vs objects
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<phoe> (yason:encode (alexandria:plist-hash-table (list "foo" 42 "bar" (alexandria:plist-hash-table (list "aaa" '(1 2 3))))))
<phoe> this seems to work for me
judson_ has joined #lisp
wsinatra has quit [Ping timeout: 240 seconds]
moon-child has quit [Ping timeout: 260 seconds]
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aartaka_d has quit [Ping timeout: 240 seconds]
judson_ has joined #lisp
harlchen has quit [Quit: WeeChat 2.9]
judson_ has quit [Client Quit]
xantoz has quit [Ping timeout: 260 seconds]
quazimodo has quit [Ping timeout: 258 seconds]
quazimodo has joined #lisp
hal99999 has quit [Ping timeout: 240 seconds]
judson_ has joined #lisp
judson_ has quit [Client Quit]
cg505 has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
wsinatra has joined #lisp
cg505 has joined #lisp
yonkunas has joined #lisp
mathrick has quit [Remote host closed the connection]
random-nick has quit [Ping timeout: 260 seconds]
sjl has quit [Ping timeout: 240 seconds]
judson_ has joined #lisp
Fare has joined #lisp
beach has quit [Ping timeout: 246 seconds]
beach has joined #lisp
notzmv` has joined #lisp
xantoz has joined #lisp
notzmv` is now known as notzmv
notzmv has quit [Changing host]
notzmv has joined #lisp
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
judson_ has joined #lisp
mathrick has joined #lisp
<yottabyte> what's the best way to create json? is it this?
judson_ has quit [Client Quit]
<phoe> depends - there are multiple json libraries, and they have different encoding schemes
<phoe> some of them allow you to turn instances into JSON
<phoe> like, standard-objects
KREYREEN has quit [Remote host closed the connection]
judson_ has joined #lisp
KREYREEN has joined #lisp