<_death> 35 bytes.. oh, I forgot that I also have (declaim (optimize (debug 3) (safety 3))) in .sbclrc
<aeth> ah
<_death> it doesn't matter much anyway, since you'd likely also want to declaim that function inline
<jasom> _death: I think we were using the disassembly of the lambda for a proxy of the inline code that would be generated
<jasom> obv. if it can determine that x is non-nill, then it should be even shorter
<jasom> 13 bytes in that case
<_death> jasom: I'm thinking about some peephole optimizer or something mutilating it into something better
<jasom> 11 bytes with safety-0 and (type (not null) x)
<jasom> MOV MOV CLC POP RET
<jasom> the CLC would probably go away when inlined
nirved has quit [Quit: Leaving]
Amplituhedron has joined #lisp
<_death> the POP/RET as well..
<aeth> nice
<aeth> one way to benchmark more directly would be to compare two functions, one that calls an inline version and one that calls a notinline version
raynold has joined #lisp
peterpp has quit [Ping timeout: 240 seconds]
mrcom_ has joined #lisp
damke has joined #lisp
Amplituhedron has quit [Ping timeout: 248 seconds]
mrcom has quit [Ping timeout: 248 seconds]
damke_ has quit [Ping timeout: 264 seconds]
peterpp has joined #lisp
Amplituhedron has joined #lisp
<pfdietz> When I want to convert generalized boolean to actual boolean I use (not (not ...))
<Xach_> same
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.1)]
Lisp-chan has joined #lisp
<pjb> I use (bool generalized-boolean).
<pjb> or I use negative logic: (defun equiv (a b) (eq (not a) (not b)))
<dlowe> I use (not (null ...))
<pjb> (declaim (inline bool)) (defun bool (x) (if x 'nil 't))
<pjb> Using not or null is relying on the compiler to optimize it out.
<dlowe> so is using an inline declaration. ;) but yes, that's less smarts required.
igemnace has joined #lisp
Rawriful has joined #lisp
Bike has joined #lisp
<_death> pjb: your consequent and alternative are reversed ;)
atgreen has quit [Quit: atgreen]
atgreen has joined #lisp
<jasom> oh, if anybody has tips for getting SBCL to generate CMOV rather than CMP/JNE, let me know. I have a portable utf-8 decoder that is slower than SBCL's built-in only because of that difference.
<_death> bet #sbcl can help ;)
Amplituhedron has quit [Ping timeout: 264 seconds]
atgreen has quit [Client Quit]
atgreen has joined #lisp
milanj has joined #lisp
safe has joined #lisp
<jmercouris> AeroNotix: Are you still awake?
<jmercouris> Can someone please remind me what the memo syntax is?
<_death> /msg minion help
<pjb> _death: oops;
<pjb> --> minion: memo for foo: message
<AeroNotix> jmercouris: yes
<jmercouris> minion: memo for AeroNotix: Is javascript execution working within cl-webkit-2?
<minion> Remembered. I'll tell AeroNotix when he/she/it next speaks.
<jmercouris> AeroNotix: Ah, there you are :D
<AeroNotix> I was able to execute javascript yes
<minion> AeroNotix, memo from jmercouris: Is javascript execution working within cl-webkit-2?
<jmercouris> well, you see the message, I'm getting really close to completing the GTK port, looking at your code has been very enlightening
<AeroNotix> Glad to hear :)
<jmercouris> AeroNotix: Ok, great, thank you
<AeroNotix> I remember I had JS execution working yes
<jmercouris> I hope to have an alpha ready within the week, so get ready :)
<AeroNotix> wow that's awesome!
<AeroNotix> nice
<jmercouris> I'm brimming with ideas, I just wish I had more energy
<AeroNotix> post christmas lethargy?
<jmercouris> Also, GTK is really easy compared to Cocoa, just sayin :P
<jmercouris> AeroNotix: No, I just don't have a lot of energy in general, I sleep like 10 hours a day or so
<AeroNotix> Just not a fan of GTK in all honesty. I think it's because of the heavy old style C naming conventions and (IMHO) crappy docs that continually put me off it
<AeroNotix> and strange conventions for doing simple operations
<jmercouris> The docs are really shitty, I'll give you that
<jmercouris> the conventions are strange
<jmercouris> but nothing next to cocoa lol
<AeroNotix> again, probably stemming from the fact it's written in C
<jmercouris> btw, I saw that you use a notebook for the tabs
<AeroNotix> I can't remember now, notebook sounds familiar though
<jmercouris> can one easily add and remove views from GTK without redrawing the whole display?
<jmercouris> Like I want to make a sort of container view to house the active buffer
<AeroNotix> hmm, I think I've dropped any associated memory with that :)
<jmercouris> but I don't want to have to add all buffers beforehand to the view, it should be possible to add and rmove them right?
<jmercouris> Ah, well, I'll find out soon enough then :D
<jmercouris> I'm really excited
<jmercouris> I was worried that GTK was going to be a huge pain, and it is because I'm developing in a VM, but programmatically speaking it is quite okay
<AeroNotix> You can dynamically add new webkit views to anything really. I think there's a way to hide them from being drawn as well, but it's all long old memory
<jmercouris> Keep in mind, what will be ready in a week will likely be VERY alpha
<AeroNotix> I get that ;)
<jmercouris> AeroNotix: Yeah, they can be hidden automagically, they must be told to be rendered
<AeroNotix> something like that
<jmercouris> I guess it is not such a big deal if I have to add new webviews to some magic container, I'm just worried about removing them later
<jmercouris> and garbage collection
<jmercouris> I guess when that bridge comes, some linux user can debug it for me :P
<AeroNotix> Yes, I had issues with garbage collection and doing dynamic allocation of webkit views
<jmercouris> Yeah, that's what I'm worried about
<AeroNotix> and moving them/keeping them in a continuous buffer.
<jmercouris> the bindings for cl-webkit-2 are of course incomplete in this regard
<jmercouris> there is supposed to be some sort of cleanup functionality
<jmercouris> like "prepare-to-close" where it collects system resources, and then some call to dealloc or whatever
<AeroNotix> I don't recall now but I seem to remember coming across a more automatically generated set of bindings for webkit-2
<AeroNotix> which was far more complete than the partially manual set of bindings
<jmercouris> yeah, joachim was talking about some generation tools for making the bindings actually
Amplituhedron has joined #lisp
<jmercouris> there was an issue opened, and when I emailed him, he mentioned it again, so it is probably a good path
zaquest has joined #lisp
<AeroNotix> I remember joachim being very busy with school though
<jmercouris> or at least, he believes it is a good path, and I trust him
<jmercouris> yeah, he is quite busy, but if he can just give me some guidance, I might be able to pick it up
<jmercouris> At any rate, memory leaks or not, I think I'll have an alpha VERY soon
<jmercouris> *fingers crossed/knock on wood*
<AeroNotix> I can handle memory leaks :)
<AeroNotix> right now I'm balls deep in a memory leak with Erlang
<jmercouris> I could have a webkit pool or something, at least as an interim solution
<jmercouris> the implementation of the GTK stuff is opaque to nEXT via an API, so it can be improved REALLY easily
<jmercouris> Ah, Erlang, the language that I'm not sure how to pronounce in real life
<AeroNotix> good hide away the gtk
<AeroNotix> just like "er lang"
<jmercouris> Yeah but what does "er" sound like?
<AeroNotix> er as in ergo
<jmercouris> That carries multiple pronounciations as well
<AeroNotix> er as in her
<jmercouris> some people say orgo, airgo, urgo
<jmercouris> etc
<AeroNotix> no, Americans pronounce it a million different ways :)
<jmercouris> Cogito ergo sum
<jmercouris> Anyways, thanks for your quick feedback
<jmercouris> What's generally a good time to find you on IRC?
<AeroNotix> no worries, I was awake any way
<AeroNotix> well, sometimes I don't glance over at the tab for a couple of hours/days
<AeroNotix> oh twitter or email is better
<AeroNotix> @AeroNotix on twitter
<jmercouris> pjb: Thanks for the syntax example
<jmercouris> _death: didn't know it was a full help prompt and everything, useful to know as well, thank you
orivej has quit [Ping timeout: 265 seconds]
Amplituhedron has quit [Remote host closed the connection]
<jmercouris> Is there an index of the minion advice numbers?
<pjb> AFAIK, only in the sources.
<jmercouris> hmm, ok
<jmercouris> Any reason they start at such a high number?
<earl-ducaine> Hi Lisponians! I'm remembering that it's a bad idea to use defun in a non-toplevel form. But I'm not remember why or what I should use instead. Anyone have anything thoughts? CLHS doesn't seem to have anything to say about it directly.
makomo has quit [Ping timeout: 250 seconds]
<jmercouris> earl-ducaine: Is it even possible to use defun in a non-toplevel form?
<Bike> it is.
<jmercouris> I guess one could use it in a progn
<jmercouris> but I mean can one nest defun?
<Bike> sure.
<pjb> earl-ducaine: you can use it, but if it's not in toplevel, then the compiler cannot notice that you defined a function. This is the main drawback.
<Bike> being in a progn is still top level.
<pjb> earl-ducaine: so you can declare it yourself.
<jmercouris> (defun funcy (a b c) (defun funcx (b c a) (funcx a b c)))?
eschatologist has quit [Ping timeout: 264 seconds]
<Bike> but yeah, earl-ducaine, e.g. later code might not be aware that there was a function defined earlier so you get an undefined function warning, kind of thing.
<pjb> (declaim (function foo)) (let ((x 0)) (defun foo () (incf x))) (defun g () (list (foo) (foo) (foo)))
<Bike> jmercouris: yeah that's fine.
eschatologist has joined #lisp
<Bike> jmercouris: kind of weird, obviously.
<jmercouris> Bike: Interesting, then why do lambdas exist?
<Bike> because you don't always need or want functions to be globally accessible through names
<jmercouris> Why not just use a throwaway name?
<AeroNotix> It'll still be accessible by that name
<jmercouris> Seems like redundant functionality to me
<Bike> why use a throwaway name?
<jmercouris> I feel like it should be part of the defun spec that you can declare anonymous functions
<Bike> what would that even mean?
<jmercouris> like it should just be (defun (arg1 arg2))
<jmercouris> instead of lambda
<Bike> how are you supposed to call it?
<jmercouris> A function without a name
<jmercouris> an anonymous function
<Bike> what defun does is make a binding from a name to a function.
<jmercouris> is that not effectively what a lambda is?
<Bike> would this make some kind of binding with no name?
<jmercouris> what does defun stand for? define function?
<Bike> and if so, what's the point of having such a binding
<Bike> define function, yes.
<jmercouris> maybe I misunderstand the point of defun
<earl-ducaine> Ah, basically the same answer as for my question yesterday regarding defvar.
<pfdietz> DEF... operators create connections between names and things.
<jmercouris> so if you define a function with no name, is that not effectively a lambda?
<Bike> You're not thinking about what "define" means.
<Bike> For defun as exists, "define" means that some name is associated with some function.
<Bike> If you remove the name, what do you have left? No "definition" per se.
<jmercouris> So anytime we are doing defining, we are doing assignment?
dieggsy has quit [Ping timeout: 248 seconds]
<Bike> Yes, the minimum functionality of defun is basically (defun foo (x) x) => (setf (fdefinition 'foo) (lambda (x) x))
<earl-ducaine> Bike: it's a poor mans objects system, i.e. create the binding at run-time based on whether you're running in a Uinx env (CLX) or in an Mac env.
<Bike> => being macroexpansion
<pjb> jmercouris: actually (defmacro defun (name lambda-list &body declarations-and-body) `(progn (setf (fdefinition ',name) (lambda ,lambda-list (block ,name ,@declarations-and-body))) (declaim (function ,name)) ',name))
<pjb> jmercouris: defun is defined using lambda!
<AeroNotix> earl-ducaine: there are reader macros to define functions based on platform
<Bike> oh, yes, it returns the name too
<jmercouris> pjb: That absolutely blows my mind
<jmercouris> but it makes complete sense now that I'm thinking about it for the first time
kupad has joined #lisp
<jmercouris> I always envisioned defun as a special form for declaring a function, but now I see that it is for associating a lambda with a name
<jmercouris> Bike: pjb: As always, thank you for the education
<Bike> mhm
<aeth> It's more obvious in Scheme, where (define (foo x) x) is just syntactic sugar over (define foo (lambda (x) x))
<aeth> CL... adds a few more complicating factors there
<aeth> I think most of it is because it's a lisp-2
<AeroNotix> I actually thought lambda would be a special form
<dmiles> is it just awol?
<aeth> hmm... it's implementation-specific, e.g. (macroexpand-1 `(defun foo (x) x))
<AeroNotix> ,(+ 1 1)
<AeroNotix> oh that bot is in #clojure
<AeroNotix> anyway, back to beating erlang around the head with gdb
<dmiles> and backquote might be missing from that list?
Amplituhedron has joined #lisp
<Bike> backquote is not a special operator.
<Bike> it's not even an operator, necessarily
<Bike> and while lambda isn't a special operator, the symbol LAMBDA has a special meaning to the FUNCTION special operator in a way that can be conceptualized as a kind of special operator.
<jmercouris> Everytime you guys talk, I remember how little I know
<dmiles> backquote would not have entered my mind had quote not been an been a special operator
<jasom> man read-byte is poorly optimized on sbcl; slurping a stream with read-byte is slower than slurping a utf-8 stream with read-char...
esthlos has joined #lisp
esthlos has left #lisp ["ERC (IRC client for Emacs 25.3.1)"]
esthlos has joined #lisp
<earl-ducaine> It's been up for a while. (last April) But in case you haven't seen it, the old GigaMos k-machine emulator along with all the associated LMI branch Lisp Machine code has been posted on bitsavers
peterpp has quit [Ping timeout: 268 seconds]
<jasom> If anybody hasn't been able to figure out how to do X with clack, PRs and Feature requests for my tutorial are accepted here: https://github.com/jasom/clack-tutorial/blob/src/pages/getting-started-with-clack.org
<AeroNotix> Is it just me who isn't a fan of multiple values
<AeroNotix> Why isn't env a class
<AeroNotix> rather than just a blob of VALUES
<jasom> AeroNotix: it's a plist, not multiple values, FWIW
<jasom> There is zero good reason that I can think of for it to be a class, since there is an infinite variation in which keys might be present in it...
<jasom> and middle-ware may add or remove "slots"
<AeroNotix> oh missed the &keys
<AeroNotix> &key*
<jasom> plus right above, it has a print of the environment and calls it a plist ...
<AeroNotix> local time: 3am :)
<jasom> AeroNotix: fair enough :)
<jasom> but yes a list of values with no structure is stupid, particularly since defstruct lets you define a tagged list of values...
<AeroNotix> I've used bare VALUES before but always felt odd using it.
<AeroNotix> It doesn't seem useful compared to other similar features
<jasom> values *is* useful
<jasom> e.g. like what floor does
<jasom> where there is one value that you will almost always want, but a second value that you only sometimes want. Plus it avoids consing on most implementations
<aeth> values is a nice way to write pure functions where you would otherwise use a very short list or vector that conses to do the same thing, evne if you need the 2nd, 3rd, etc., values.
<aeth> s/evne/even/
<aeth> Using it a lot will probably add an overhead of maybe one instruction, but it gives you pure functions for "free"
<jasom> did they ever figure out a way to implement it efficiently in wasm? There was a tempest in a teapot about that a few years back...
<aeth> (It's not really free, but afaik you pay the cost for efficient multiple return values whether you use them or not. But you do need to implement support for them at the compiler level.)
<aeth> jasom: Probably not. wasm is for C++
<aeth> If something isn't C++, people don't care.
<aeth> There are lots of cool things you can do in languages that C++ can't do... good luck getting those efficiently implemented in wasm.
<mfiano> Can anyone tell me why uiop:safe-read-file-form coerces floats to doubles (d0 suffix), as compared to uiop:read-file-form which does not?
notzmv is now known as livoreno
d4ryus3 has joined #lisp
<mfiano> Looks like it's binding *read-default-float-format* 'double-float, but why is it 'unsafe' not to?
d4ryus2 has quit [Ping timeout: 248 seconds]
<Bike> perhaps it's part of the standardized syntax.
<mfiano> I mean it doesn't stop the reader from coming across something like 1d999
<mfiano> I just tracked down a bug that stems from this function coercing all my floats to doubles. Looks like I'll have to just safely read on my own. I just don't understand how not coercing is unsafe
EvW has quit [Ping timeout: 265 seconds]
<Bike> wait, coercing?
<Bike> i don't think i understand. do you need long floats or something?
<aeth> if *read-default-float-format* is 'double-float, you can still get single-float from 1.0f0, 2.0f0, etc.
<mfiano> No, I need my floats read verbatim from a DSL file, and 1.0 not changed to 1.0d0
<aeth> I never assume *read-default-float-format* because that has bitten me before, in source code!
livoreno is now known as `420
<Bike> there is no "verbatim". 1.0 can mean any one depending on how it's read. single-float is just the default binding.
<Bike> perhaps you could petition fare or whoever mantains uiop to let you provide the float format yourself, though.
`420 has left #lisp [#lisp]
livoreno has joined #lisp
<mfiano> Is 'the default binding' part of the standard, or most implementations?
<aeth> But it's a global so you can't rely on it always being single-float
jmercouris has quit [Ping timeout: 265 seconds]
<mfiano> Thanks. I guess it makes sense to change my machine-generated dsl data format over using my own reader function.
Tobbi has quit [Remote host closed the connection]
<aeth> If I had to read numbers as single-float without the "f0" suffix, I'd probably do what they do in the example to make sure it's single-float and then read it, i.e. (let ((*read-default-float-format* 'single-float)) ...)
<aeth> Unless the numbers have a different syntax than CL's
Tobbi has joined #lisp
<Bike> the issue is that this uiop function specificaklly binds it to double.
<aeth> yes, that won't fix that for uiop
Arcaelyx_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<aeth> It should be configurable
aindilis has joined #lisp
<mfiano> It makes total sense to change the file data instead, since these files may be used by other developers too.
<aeth> e.g. I turn off *read-eval* but I make it configurable just in case someone is using that feature for some reason.
<mfiano> ie; unless i write a user api for parsing these files, rather than just provide them for users to do whatever, i should encode the data in an unambiguous method
<aeth> s/I turn off/I always turn off/
Rawriful has quit [Ping timeout: 264 seconds]
<Fare> Bike, discussed changing the *read-default-float-format* in 2014 or so, and the overwhelming reaction was that ASDF should stick to the standard.
<Fare> That said, see the document in my "syntax-control" branch
<Fare> rpg, do you have time to review the syntax-control branch?
<mfiano> The question is, what would be the best way to write out 1.0f0 to a file, such that it is not read and then written as 1.0 ?
<Fare> rpg, after it gets merged (or rejected), the document should be updated to reflect the current situation and current plans.
<Fare> mfiano, bind *read-default-float-format* yourself inside a with-{safe,standard}-io-syntax
<mfiano> I am talking about writing literally 1.0f0 to an output stream.
<Fare> what about it?
<Fare> which do you want? make it happen with suitable bindings
<mfiano> When I tried, it just writes 1.0
<Fare> and?
<mfiano> and I want the file to contain the explicit f0 suffices
<Fare> until you state what you want, no one (not even yourself) can help you achieve it.
<aeth> mfiano: You could change the default float format to double-float before writing
<aeth> mfiano: that will force 1.0f0
cadence has joined #lisp
<aeth> (let ((*read-default-float-format* 'double-float)) (write 1.0)) => 1.0f0
<aeth> If you're not mixing floats, it will work
<aeth> The only time it won't work is when single-float is double-float.
<aeth> (or if you have double-floats in your code, too)
<Fare> see also long-float
<Fare> and short-float
<aeth> I tend to just write my own custom writer, though. It's hard to get the output just the way I want it.
<Fare> which may or may not be supported by your implementation.
<Fare> READ and WRITE are very cool, but ultimately are not portable.
<aeth> Fare: If short-float is single-float, then it'll write as 1.0, not 1.0f0. It's probably safe to assume a separate single-float and double-float. Conforming implementations that don't do this will probably be broken by some dependency before they get to the unique code.
<Fare> too many knobs end up being not so nice :-/
<aeth> It's very easy for some niche Lisp to be broken by a dependency or a dependency's dependency.
<aeth> As far as read and write not being portable... ime read tends to work more or less as I want it, but write is trickier because of where it decides to newline long s-expressions.
<aeth> Often when I write a custom reader, I'll try to rely on the built-in read where I can get away with using it.
QualityAddict has quit [Remote host closed the connection]
Amplituhedron has quit [Ping timeout: 240 seconds]
peterpp has joined #lisp
zaquest has quit [Quit: Leaving]
luis has quit [Ping timeout: 248 seconds]
mfiano has quit [Ping timeout: 248 seconds]
luis has joined #lisp
TMA has quit [Remote host closed the connection]
TMA has joined #lisp
peterpp has quit [Ping timeout: 256 seconds]
Bike has quit [Ping timeout: 260 seconds]
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Arcaelyx has joined #lisp
mfiano has joined #lisp
TMA has quit [Ping timeout: 264 seconds]
damke_ has joined #lisp
atgreen_ has joined #lisp
zooey has quit [Remote host closed the connection]
zooey has joined #lisp
damke has quit [Ping timeout: 264 seconds]
atgreen has quit [Ping timeout: 256 seconds]
atgreen_ is now known as atgreen
luis has quit [Ping timeout: 248 seconds]
luis has joined #lisp
<Fare> aeth, builtin read is ok for things you trust 100%
<Fare> horrible to expose to user input
<Fare> not just #.
rpg has quit [Quit: Textual IRC Client: www.textualapp.com]
Rawriful has joined #lisp
zaquest has joined #lisp
TMA has joined #lisp
<aeth> Fair point. I've mostly used read for things like configuration files and programming languages, where the user is essentially trusted.
<aeth> I guess for things like an IRC bot, you'd need to be really careful
<mfiano> How does careful prevent reading something like 1d999 ?
<mfiano> I don't think even with-default-io-syntax will help there
damke has joined #lisp
<mfiano> Also sorry...connection issues, so I missed some of the conversation I prompted.
damke_ has quit [Ping timeout: 264 seconds]
<aeth> "1d999" doesn't seem problematic. It should error on all popular implementations.
<jasom> aeth: almost all architectures introduced after 1990 support at least 3 return values with zero overhead (and 8 is not unusual) in hardware; there is no cost to the caller if it doesn't use them, and the cost to the callee is only an extra register store (to marke the RV count)
<aeth> jasom: unfortunately, I often use 4.
<aeth> that is nice to know, though
<jasom> aeth: well Power, ARM and MIPS can each do at least 8 (though the common ABIs often don't define that many, it is 100% compatible to use all caller-save registers)
<beach> Good morning everyone!
<jasom> x86-64 ABI specifies 7 volatile registers, so 6 return values could be done cheaply; I'm not sure if sbcl does this though...
TMA has quit [Ping timeout: 256 seconds]
<jasom> looks like SBCL on'y uses 4 of them for return values, and one is a count, so 4 will require stack access
damke_ has joined #lisp
TMA has joined #lisp
Jesin has joined #lisp
damke has quit [Ping timeout: 264 seconds]
brendyn has joined #lisp
emacsoma` has quit [Remote host closed the connection]
emacsoma` has joined #lisp
moei has joined #lisp
dddddd has quit [Remote host closed the connection]
damke has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
damke has quit [Ping timeout: 263 seconds]
<cryptomarauder> Hey beach
<cryptomarauder> mfiano: I am a string whore myself which may not work on some systems applications but for keeping the format good on something like 1.0f0 unaltered I throw it in a string like a do tortillas. Otherwise if it's not dealing with standardized definitions which would endure the data integrity in your output you just can't be sure in a portable way.
<cryptomarauder> Luckily cl isn't as dogmatic as scheme etc about types and mutability
lildragon has joined #lisp
<lildragon> Hello
<lildragon> Is there a good book/guide to learn (Common ?) Lisp that is straight to the point?
<lildragon> Learn Lisp The Hard Way seems to be down.
<mfiano> minion: tell lildragon about PCL
<minion> lildragon: look at PCL: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
<lildragon> And Practical Common Lisp is too verbose. I don't care about your dad, I don't need you to repeat the same idea five times for me to learn how a list works.
<mfiano> cryptomarauder: thanks. solved
<lildragon> I want something concise and on point. :)
<parjanya> what’s the smart way of getting just some values that get-decoded-time outputs? if I use multiple-value-bind it gives me a warning if I don’t use all the variables... I thought of using multiple-value-list and then selecting just the parts I want, but isn’t there a better way? something like (grab (0 2 4) (get-decoded-time)) to output only the first, the third and the fifth values
damke has joined #lisp
<lildragon> mfiano: Thanks, see my problem with the book, two chapters in and I am already bored. :P
<mfiano> lildragon: That's ok, because the book is very short, and you won't find another like it.
<lildragon> mfiano: *sigh* I guess I have to deal with it then
<lildragon> too chatty for my liking. Just give me the bloody meat.
<lildragon> "A single record, however, does not a database make. You need some larger construct to hold the records. Again, for simplicity's sake, a list seems like a good choice."
<mfiano> You could start with Common Lisp Recipes, which is a bunch of concise "recipes", but it is designed to be a companion to PCL.
<mfiano> So not sure how well that will go :)
<lildragon> So many words, so completely useless for anyone worth their salt.
<cadence> any thoughts on starting with land of lisp?
<lildragon> ^ interested too.
<beach> clhs nth-value
<beach> parjanya: ↑
vibs29 has quit [Ping timeout: 264 seconds]
vibs29 has joined #lisp
<beach> lildragon: Just read the Common Lisp HyperSpec.
<parjanya> beach: thanks! is this decent, (list (nth-value 5 (get-decoded-time)) (nth-value 4 (get-decoded-time)) (nth-value 3 (get-decoded-time))), or would be better to collect the values in a list and then extracting what I want from it?
damke has quit [Ping timeout: 252 seconds]
<beach> parjanya: The latter.
<aeth> parjanya: Why not use multiple-value-bind?
<pfdietz> Was going to say.
<parjanya> aeth: I would bind some variables and not use them, and get a warning
<aeth> And for the things you don't use, just do this so the compiler doesn't warn you: (declare (ignore foo bar baz))
<beach> parjanya: Declare them IGNORE.
<parjanya> ohh, that exists
<beach> clhs ignore
<parjanya> I tried nil :-$
vibs29 has quit [Ping timeout: 248 seconds]
<pfdietz> Also IGNORABLE, but that's mostly for macro writers.
vibs29 has joined #lisp
<aeth> Is there a legitimate use for ignorable outside of a macro?
<parjanya> thanks : )
<pfdietz> Might use it for variables that will just be used in, say, debugging or logging statements that may or not actually be compiled (due to #-/#+ or macros).
<aeth> good point
mlius has quit [Ping timeout: 265 seconds]
damke has joined #lisp
dieggsy has joined #lisp
<lildragon> beach: It looks really good in terms of the content, the user interface is monstrosity though.
kilfer has joined #lisp
<lildragon> beach: Couple of hours into finally committing to learn Lisp I see a common pattern across everything lisp related, there is a strong commitment in the early ages of computer human interaction (I avoid the term UX because that is too modern). :P
<fiddlerwoaroof> lildragon: CLHS looks better when viewed with lynx ;)
damke_ has joined #lisp
schoppenhauer has quit [Ping timeout: 272 seconds]
schoppenhauer has joined #lisp
damke has quit [Ping timeout: 264 seconds]
damke has joined #lisp
<lildragon> fiddlerwoaroof: hahaha, only validating my point. :)
damke_ has quit [Ping timeout: 264 seconds]
asarch has quit [Quit: Leaving]
turkja has joined #lisp
<lildragon> beach: I think it is not that bad after all, thanks for reminding me that it is not that long.
milanj has quit [Quit: This computer has gone to sleep]
orivej has joined #lisp
cadence has quit [Quit: WeeChat 2.0.1]
lildragon has quit [Ping timeout: 260 seconds]
dieggsy has quit [Ping timeout: 256 seconds]
bthesorceror has joined #lisp
pierpa has quit [Quit: Page closed]
PinealGlandOptic has quit [Quit: leaving]
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
zacts has quit [Quit: WeeChat 1.9.1]
zacts has joined #lisp
shka has joined #lisp
kajo has quit [Ping timeout: 252 seconds]
mlius has joined #lisp
LocaMocha has joined #lisp
mlius has quit [Ping timeout: 248 seconds]
orivej has quit [Ping timeout: 260 seconds]
yeticry has quit [Ping timeout: 248 seconds]
shka has quit [Ping timeout: 252 seconds]
CrazyEddy has quit [Ping timeout: 248 seconds]
t0adst00l has joined #lisp
arrdem has joined #lisp
t0adst00l has quit [Read error: Connection reset by peer]
gravicappa has joined #lisp
myrkraverk_ has joined #lisp
myrkraverk has quit [Ping timeout: 240 seconds]
nika_ has joined #lisp
orivej has joined #lisp
nika_ has quit [Client Quit]
nika_ has joined #lisp
mishoo_ has joined #lisp
peterpp has joined #lisp
t0adst00l has joined #lisp
Arcaelyx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cryptomarauder> Nice chat. You guys never quit being eager to help. I am such a lurker but I get so much with virtually no snark. Golden lol
dec0n has joined #lisp
yeticry has joined #lisp
peterpp has quit [Ping timeout: 260 seconds]
CrazyEddy has joined #lisp
Karl_Dscc has joined #lisp
moei has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 260 seconds]
t0adst00l has quit [Remote host closed the connection]
Amplituhedron has joined #lisp
t0adst00l has joined #lisp
d4ryus3 is now known as d4ryus
ramus has quit [Ping timeout: 252 seconds]
Karl_Dscc has quit [Remote host closed the connection]
sz0 has joined #lisp
orivej has joined #lisp
ramus has joined #lisp
myrkraverk_ is now known as myrkraverk
raphaelss has quit [Remote host closed the connection]
uuplusu has joined #lisp
mlius has joined #lisp
mlius has quit [Ping timeout: 265 seconds]
kilfer has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
wigust has joined #lisp
t0adst00l has quit [Ping timeout: 272 seconds]
rmr has quit [Read error: Connection reset by peer]
fourier has joined #lisp
safe has quit [Read error: Connection reset by peer]
guna has quit [Ping timeout: 246 seconds]
Amplituhedron has quit [Quit: Konversation terminated!]
t0adst00l has joined #lisp
guna has joined #lisp
Karl_Dscc has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
norfumpit has joined #lisp
fourier has quit [Ping timeout: 268 seconds]
gravicappa has quit [Remote host closed the connection]
damke has joined #lisp
bthesorceror has quit [Ping timeout: 268 seconds]
orivej has quit [Ping timeout: 256 seconds]
damke_ has quit [Ping timeout: 263 seconds]
t0adst00l has quit [Ping timeout: 272 seconds]
bthesorceror has joined #lisp
d4ryus1 has joined #lisp
d4ryus has quit [Ping timeout: 272 seconds]
froggey has quit [Ping timeout: 256 seconds]
_cosmonaut_ has joined #lisp
fourier has joined #lisp
raphaelss has joined #lisp
mishoo_ has quit [Ping timeout: 268 seconds]
orivej has joined #lisp
whoman has quit [Quit: Leaving]
whoman has joined #lisp
mlius has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<phoe> Can I trace (SETF FOO)? if yes, how?
<beach> (trace (setf foo))
<phoe> On SBCL: (trace (setf config)) ;;=> WARNING: (SETF CONFIG) is not a valid function name, not tracing.
<phoe> where #'(setf config) ;;=> #<FUNCTION (COMMON-LISP:SETF CONFIG)>
<beach> Works for me.
<phoe> What is your SBCL version?
<beach> 1.4.0
<phoe> I'm on 1.4.2.
<phoe> One second, I'll try to double-check.
<Shinmera> phoe: Are you perchance in a cl+qt package?
<Shinmera> because remember, CL+QT:SETF is not eq to CL:SETF
<phoe> Shinmera: dlskgfjdlsgkj
<phoe> thanks.
<phoe> there, (trace (cl:setf config)) worked.
mlius has quit [Ping timeout: 248 seconds]
<beach> Why is it not the Common Lisp SETF?
<Shinmera> It's been a while since I implemented it, but I remember discussing the available options at the time and coming to the begrudging conclusion that a SETF "pre-processor" is the best way to go
<Shinmera> Discussing them with you, that is
<beach> What memory.
mlius has joined #lisp
igemnace has quit [Quit: WeeChat 2.0.1]
<Shinmera> It was something about the SETF facility not giving you access to a variable amount of multiple values, which I needed.
<beach> I see.
<phoe> AFAIK needs to be a custom one because of how Qtools hacks around the reader - only the symbols requested by the client code are generated, et cetera.
<Shinmera> phoe: Nah
<phoe> But again, it's compli---
<phoe> Exactly.
<Shinmera> Essentially (setf (q+:size foo) (values 400 500)) is read as (setf (q+ set-size foo) (values 400 500)), so in that case it needs two values, but let's say (setf (q+:rect foo) (values a b c d)) needs four and so forth.
<Shinmera> Err, it's read as (setf (q+ size foo) (values 400 500))
igemnace has joined #lisp
vydd has joined #lisp
vydd has quit [Changing host]
vydd has joined #lisp
Amplituhedron has joined #lisp
<Shinmera> Anyhoot, the SETF wrapper turns that into (q+ set-size foo 400 500) or whatever else depending on the VALUES form.
<Shinmera> Which is a gross workaround, but I still can't think of anything better.
<Shinmera> You might think I could just specify like a hundred values or something expecting that no function call will ever need that many, but then you also never get any information from SETF about which values were actually passed and which weren't, so you can't compose the proper call.
m00natic has joined #lisp
Karl_Dscc has joined #lisp
j0nd1e``` has joined #lisp
j0nd1e`` has quit [Read error: Connection reset by peer]
Karl_Dscc has quit [Remote host closed the connection]
makomo has joined #lisp
rgrau has joined #lisp
Karl_Dscc has joined #lisp
rme has quit [Read error: Connection reset by peer]
rme has joined #lisp
gravicappa has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
froggey has joined #lisp
gravicappa has quit [Ping timeout: 248 seconds]
rgrau has quit [Ping timeout: 264 seconds]
nika_ has quit []
Amplituhedron has quit [Quit: Konversation terminated!]
livoreno is now known as notzmv
damke_ has joined #lisp
<makomo> jasom: regarding that cl-json hash table thing from yesterday, are you sure that works?
<makomo> because i keep getting an error from the internals of cl-json when the body of my *beginning-of-object-handler* is run
damke has quit [Ping timeout: 264 seconds]
<makomo> "The value NIL is not of type CONS", in JSON::ACCUMULATOR-ADD-KEY
<makomo> ohh hmm, i think i see why
fourier has quit [Ping timeout: 256 seconds]
Amplituhedron has joined #lisp
arbv has joined #lisp
atgreen has quit [Read error: Connection reset by peer]
<beach> I just hate that kind of error message. It contains absolutely no information that is of value to even the most novice Common Lisp programmer.
<phoe> Haha, I just got hit by a similar message an hour ago and spent thirty minutes debugging it.
<Shinmera> Rust's compiler is pretty nice about error messages, but I don't know if you could replicate that kind of experience for run-time errors.
<makomo> jasom: yup, my bad. i delayed the writing of your "to-keyword" and in *object-key-handler* just forwarded the call to the original handler, but that makes no sense because that handler expects all sorts of internal state to be already built (set up by *beginning-of-object-handler*, etc.)
orivej has quit [Remote host closed the connection]
<phoe> Roses are red,
<phoe> A bird flaps its wing,
<phoe> The value 14 is not of type STRING.
* phoe ducks
<beach> Ducks are birds, yes.
<makomo> haha
Kaisyu7 has quit [Quit: WeeChat 1.4]
rgrau has joined #lisp
orivej has joined #lisp
wxie has joined #lisp
fourier has joined #lisp
notzmv is now known as livoreno
Lisp-chan has quit [Ping timeout: 272 seconds]
moei has joined #lisp
orivej has quit [Ping timeout: 268 seconds]
d4ryus2 has joined #lisp
Cymew has quit [Remote host closed the connection]
uuplusu_ has joined #lisp
dddddd has joined #lisp
wxie has quit [Remote host closed the connection]
d4ryus1 has quit [Ping timeout: 264 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
uuplusu has quit [Ping timeout: 265 seconds]
Cymew has joined #lisp
Cymew has quit [Remote host closed the connection]
Cymew has joined #lisp
j0nd1e``` has quit [Remote host closed the connection]
epony has quit [Read error: Connection reset by peer]
epony has joined #lisp
uuplusu has joined #lisp
uuplusu_ has quit [Ping timeout: 246 seconds]
quazimodo has joined #lisp
jdz_ is now known as jdz
raynold has quit [Quit: Connection closed for inactivity]
makomo_ has joined #lisp
makomo has quit [Ping timeout: 268 seconds]
nirved has joined #lisp
Amplituhedron has quit [Quit: Konversation terminated!]
Amplituhedron has joined #lisp
fourier has quit [Ping timeout: 240 seconds]
EvW1 has joined #lisp
rgrau has quit [Ping timeout: 260 seconds]
bthesorceror has quit [Ping timeout: 240 seconds]
gravicappa has joined #lisp
orivej has joined #lisp
Tobbi has joined #lisp
rgrau has joined #lisp
Rawriful has quit [Quit: WeeChat 1.4]
rgrau has quit [Ping timeout: 272 seconds]
mlius has quit [Read error: Connection reset by peer]
Amplituhedron has quit [Ping timeout: 248 seconds]
wxie has joined #lisp
wxie has quit [Remote host closed the connection]
Karl_Dscc has joined #lisp
karswell has joined #lisp
brendyn has quit [Ping timeout: 264 seconds]
d4ryus3 has joined #lisp
d4ryus2 has quit [Ping timeout: 256 seconds]
wxie has joined #lisp
EvW1 has quit [Ping timeout: 250 seconds]
wxie has quit [Remote host closed the connection]
cromachina has joined #lisp
orivej has quit [Ping timeout: 276 seconds]
Karl_Dscc has quit [Ping timeout: 246 seconds]
hyero has joined #lisp
heurist` has joined #lisp
heurist has quit [Ping timeout: 240 seconds]
d4ryus4 has joined #lisp
d4ryus3 has quit [Ping timeout: 248 seconds]
heurist`_ has joined #lisp
heurist` has quit [Ping timeout: 240 seconds]
heurist_ has joined #lisp
heurist`_ has quit [Ping timeout: 240 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
Karl_Dscc has joined #lisp
sjl__ has joined #lisp
atgreen has joined #lisp
fikka has joined #lisp
orivej has joined #lisp
pjb has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
mlau has joined #lisp
pjb has joined #lisp
FreeBirdLjj has joined #lisp
SaganMan has joined #lisp
FreeBirdLjj has quit [Ping timeout: 272 seconds]
LiamH has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #lisp
turkja has quit [Ping timeout: 240 seconds]
<Xach_> Shinmera: i'm having an odd issue where i can't build qtools from a warm fasl cache due to VERBOSE symbol issues. i suspect it's a case where something builds the fasl with :verbose but then a subsequent load of the fasl is done without verbose.
<Xach_> Shinmera: i can work around it on the build side, but wanted to let you know
Karl_Dscc has quit [Ping timeout: 240 seconds]
<Shinmera> Yeah, I know
<Shinmera> It's been a problem in the past, I still don't know of a good solution
makomo_ has quit [Ping timeout: 272 seconds]
* Shinmera once again wishes for optional dependencies
<Xach_> I just updated my stuff to flag certain projects as requiring a cold fasl cache
<Xach_> this is the second project that needs it recently
<Shinmera> I can get rid of the Verbose uses, I think.
<Shinmera> I doubt anyone but me ever actively used it
shka has joined #lisp
Xal has quit [Ping timeout: 240 seconds]
Xal has joined #lisp
santakolb is now known as kolb
fikka has quit [Ping timeout: 240 seconds]
<Shinmera> I'll do that later tonight
<pjb> phoe: (defmethod ensure-string ((x integer)) (prin1-to-string x))
orivej has joined #lisp
Arcaelyx has joined #lisp
<fe[nl]ix> Shinmera: magical optional dependencies are dangerous
shrdlu68 has joined #lisp
<Shinmera> fe[nl]ix: In this case they just provide some debug info if a logging system is present
<Shinmera> which seems perfectly fine to me
<fe[nl]ix> since Quicklisp makes it easy to download all dependencies it makes no sense to resort to that kind of optimization
<dim> make verbose into a proper feature, #+qtools-verbose or something?
<dim> maybe feature names beling into packages even?
<Shinmera> fe[nl]ix: I don't want to force a dep that launches threads and stuff onto people that don't need it.
<fe[nl]ix> then make it explicit
orivej has quit [Ping timeout: 240 seconds]
dec0n has quit [Read error: Connection reset by peer]
SaganMan has quit [Quit: WeeChat 1.6]
ryanbw has quit [Ping timeout: 260 seconds]
mlau has quit [Ping timeout: 256 seconds]
Bike has joined #lisp
_cosmonaut_ has quit [Ping timeout: 260 seconds]
rippa has joined #lisp
lclark``` has joined #lisp
kajo has joined #lisp
mishoo_ has joined #lisp
lclark`` has quit [Ping timeout: 264 seconds]
smurfrobot has quit [Remote host closed the connection]
sjl__ is now known as sjl
raphaelss has quit [Remote host closed the connection]
damke_ has quit [Quit: quit]
Avian-Anathema has quit [Quit: ZNC 1.7.x-git-876-42939c9 - https://znc.in]
mlau has joined #lisp
smurfrobot has joined #lisp
Avian-Anathema has joined #lisp
Avian-Anathema has quit [Remote host closed the connection]
EvW has joined #lisp
makomo_ has joined #lisp
Tobbi has quit [Remote host closed the connection]
Tobbi has joined #lisp
vydd has quit [Ping timeout: 265 seconds]
fourier has joined #lisp
<antoszka> Guys, trying to fire up sbcl in shell with linedit (which I do sometimes, nvm the reasons), I'm now getting: http://wklej.org/id/3330582/ ← any hints where to look for problems? madeira-port quickloads without any issues in Slime.
smurfrobot has quit [Remote host closed the connection]
<Xach_> antoszka: incompatible with latest asdf which is what sbcl 1.4.2 now ships
<Xach_> antoszka: work in progress to fix
<antoszka> ah, okay, I'll wait then, thanks.
smurfrobot has joined #lisp
<makomo_> what does "expanded" mean in "If the backquote syntax is nested, the innermost backquoted form should be expanded first."? http://www.lispworks.com/documentation/HyperSpec/Body/02_df.htm
<Zhivago> Consider (let ((a 1)) `(x ,a)) -> (x 1)
makomo_ is now known as auxo
auxo is now known as makomo
<makomo> Zhivago: is that all?
smurfrobot has quit [Remote host closed the connection]
<Zhivago> Pretty much -- it's a form of substitution into a templae.
FreeBirdLjj has quit [Remote host closed the connection]
<makomo> Zhivago: so "expansion" here refers just to the process of "substitution". whether any substitutions are made or not is a matter of the level of quoting/unquoting done, right?
<makomo> for example, ``(,,a2); (,a2) is the "innermost backquoted form" but the substitution process doesn't actually substitute any values
<Zhivago> Yes, but you also have splices -- (let ((a '(1 2))) `(x ,@a)) -> (x 1 2)
<makomo> true, but i thought "substitution" is somehow more clear, however "substitution" is also used only once on that page
<Zhivago> Lisp also talks about macros in terms of expansion.
bthesorceror has joined #lisp
EvW has quit [Ping timeout: 265 seconds]
jmercouris has joined #lisp
asarch has joined #lisp
Karl_Dscc has joined #lisp
rpg has joined #lisp
smurfrobot has joined #lisp
<rpg> Does anyone know how to refer to the currently inspected object using slime-inspector-eval?
<rpg> The docstring isn't very helpful: "Evaluate an expression in the context of the inspected object."
<rpg> is the inspected object bound to some name that I can use?
<rpg> Looks like * is bound to the currently inspected object.
smurfrobot has quit [Ping timeout: 264 seconds]
Karl_Dscc has quit [Remote host closed the connection]
smurfrobot has joined #lisp
bthesorceror has quit []
<rpg> I suppose I should submit a manual patch....
ryanbw has joined #lisp
damke has joined #lisp
fourier has quit [Ping timeout: 256 seconds]
eudoxia has joined #lisp
<jmercouris> rpg: You mean a patch to the manual?
<rpg> jmercouris: yes!
ebrasca has joined #lisp
mejja has joined #lisp
<ebrasca> What type is for bit array?
vaporatorius has joined #lisp
vaporatorius has quit [Client Quit]
quazimodo has quit [Ping timeout: 265 seconds]
<Bike> (array bit)
mishoo_ has quit [Read error: Connection reset by peer]
mishoo_ has joined #lisp
<ebrasca> Bike: In structure is it like (nanme nil :type (array bit)) ?
Kaisyu has quit [Quit: Connection closed for inactivity]
<Bike> I think that's fine, yes.
orivej has joined #lisp
peterpp has joined #lisp
<peterpp> I'm new to lisp and am about to use s-expressions for the first time as a configuration file format... I'm wondering if there's anything I should watch out for
<peterpp> my understanding is that using s-expressions for this purpose is a rather common thing to do?
markong has joined #lisp
<mejja> watch out for square brackets.. :-)
<peterpp> if this is an inside joke then it's lost on me :(
orivej has quit [Ping timeout: 264 seconds]
<ebrasca> peterpp: What else do you like to use?
<peterpp> you mean for config files?
<peterpp> usually yaml
<peterpp> before I began using lisp
<shka> good evening all
__sigjuice__ has joined #lisp
<shka> Shinmera: you there?
<peterpp> ebrasca, what about you?
<ebrasca> peterpp: I like to use s-expressions , you can use what you like more.
<Shinmera> shka: I am, but tied up. Should be free in some hours.
<shka> oh, i will be asleep then
<shka> well, carry on
<Shinmera> shka: Just write to #shirakumo and I'll get back to you later.
<shka> it is not urgent, just regarding documentation-utils -- i think that we don't connect perfectly
<peterpp> ebrasca, do you happen to have an example of a config file that uses s-epxrs that you could show me?
<peterpp> may sound stupid...
<peterpp> but I'd really like to see an example
<ebrasca> peterpp: I have stumpwm with config/code in s-expressions.
<peterpp> haha I also used stumpwm before I switched to ratpoison :-)
<peterpp> good idea actually
<peterpp> are there a lot of stumpwm users around here? never met one before
<Xach_> Shinmera: hmm, it's not sufficient just to rebuild qtools with fresh fasls, it seems that other projects that require qtools will trigger the fasl symbol issue.
<ebrasca> peterpp: I have emacs style . All my configs are in ~/.stumpwm.d
<Xach_> i can build more with fresh fasls, but it does increase the build time quite a bit.
<ebrasca> peterpp: I am stumpwm user.
<peterpp> oh man I had no idea stumpwm is so well maintained... I just looked at the recent commit history on github
<sjl> peterpp: if you're using READ to parse the config file, be aware that it can execute arbitrary code, e.g. (:username #.(run-program "rm -rf /")
<__sigjuice__> peterpp: you could take a look at people's .sbclrc files?
<peterpp> good idea thanks
<__sigjuice__> or did you want stumpwm config files in particular?
<peterpp> no, just generally wanted to take inspiration from config file formats that rely on s-expressions
<__sigjuice__> or .emacs files
<sjl> so if you want to use untrusted config files, you'll probably want something like cl-secure-read
drcode has quit [Ping timeout: 260 seconds]
<peterpp> ah thanks
<__sigjuice__> .swank.lisp is another example that comes to mind. https://common-lisp.net/project/slime/doc/html/Other-configurables.html#Other-configurables
attila_lendvai has quit [Read error: Connection reset by peer]
Guest92705 has quit [Remote host closed the connection]
<__sigjuice__> peterpp: my imagination should be considered very limited, but I can't envision needing anything more complicated than a pile of special variables
attila_lendvai has joined #lisp
eazar001 has joined #lisp
dilated_dinosaur has joined #lisp
livoreno is now known as notzmv
raynold has joined #lisp
damke has quit [Ping timeout: 264 seconds]
fourier has joined #lisp
damke has joined #lisp
Tobbi has quit [Remote host closed the connection]
<peterpp> has anyone here looked into shen?
<peterpp> I read the author's essay on 'bipolar lisp programmers' today oO
Tobbi has joined #lisp
<ebrasca> peterpp: "bipolar"?
<peterpp> yeah
<peterpp> wait
<sjl> I've looked at Shen a little bit, but the development environment isn't nearly as mature as something like CL+Slime
<sjl> so I mostly stick to CL
alexmlw has joined #lisp
<jasom> makomo: cool, also note cl-json ships with two different ways of generating keywords from strings, one of which will refuse to intern new symbols (which is good if you're concerned about someone sending you a billion different keywords to use up all your server RAM)
mishoo__ has joined #lisp
<peterpp> I'm struggling with how lisp-mode indents my source code: https://gist.github.com/anonymous/d87c3cf2a2c4fc85e0ee60b12e71f183
mishoo_ has quit [Ping timeout: 248 seconds]
<jasom> peterpp: that would be code that is calling the function named :foo with the arguments :bar :baz :boom
<peterpp> say it occurs somewhere in a list with '(...)
<jasom> i.e. the first expample is correct without any further context.
wheelsucker has joined #lisp
<jasom> peterpp: see my content; it "works on my machine"
conceivably has joined #lisp
<jasom> s/content/comment on the gist/
<jasom> though I'm not in pure lisp-mode, I'm running slime, I don't think it makes a difference for this case, but I can try in a bit
drcode has joined #lisp
<peterpp> hmm for me lisp-mode still indents the wrong way... good to know it works on your machine though, I guess I messed something up
<peterpp> thank you
<peterpp> I'm also running slime
<peterpp> anyways I'll find out
<parjanya> peterpp: ouch, that "bipolar" text
<peterpp> I personally don't know lisp's culture well enough to evaluate it
<peterpp> what do you think?
<peterpp> neither its culture nor history
<jasom> hmm, bare lisp-mode does seem to do it the way you see (e.g. *scratch* indents my example wrongly)
<parjanya> parjanya: I’m a newcomer (too?), but I’ve seen a good chunk of that attitude of melancholia and lack of interaction with other people
drcode has quit [Excess Flood]
<parjanya> ... peterpp ↑
<__sigjuice__> peterpp: what other cultures have you evaluated?
<peterpp> I don't think I've even been a close insider in any programming-related 'culture'
<peterpp> ever
<peterpp> not even
<jasom> peterpp: can you paste the output of C-h m
<jasom> peterpp: do it with the file that is indenting wrongly open
<peterpp> jasom, err... now it works
<peterpp> I just opened another new buffer and now it gets indented correctly
<peterpp> sorry if I wasted your time :(
<jasom> peterpp: don't worry about it. That sounds like a problem with emacs or slime. If you figure out how to reproduce it, let me know
<peterpp> I will, thanks, are you a maintainer?
<jasom> parjanya: Taver's essay is problematic, if for no other reason than that the symptoms described are not bipolar.
al-damiri has joined #lisp
hexfive has joined #lisp
<peterpp> I must say... you folks are a lot more enjoyable to talk to than the folks I met in most other programming-related irc channels
<Xach_> peterpp: it helps if you stay on topic and show an interest in learning
<parjanya> jasom: yes, it’s quite an imprecise use of the term... I don’t know enough about lispers to say anything meaningful, but I know plenty of the kind of people he describes, from school on
varjag has joined #lisp
<mlau> : don't worry about it. That sounds like a problem with emacs or slime. If you figure out how
smurfrobot has quit [Remote host closed the connection]
<makomo> jasom: mhm, i remember you mentioned that. however, cl-json:*identifier-name-to-key* isn't mentioned anywhere in the docs
<makomo> the variable holds the function which turns a string into an object that will be used as the key
<makomo> by default it's CL-JSON:JSON-INTERN
smurfrobot has joined #lisp
<makomo> there's just a little note somewhere about JSON-INTERN and JSON-SAFE-INTERN, but no mention of how to actually swap one with the other (or use your own version)
<makomo> i.e. *IDENTIFIER-NAME-TO-KEY* isn't documented, at least not in https://common-lisp.net/project/cl-json/
wigust has quit [Ping timeout: 256 seconds]
<makomo> hah, it's documented here http://quickdocs.org/cl-json/api
<pjb> You can measure how bad a system is by measuring how much it's talked about in help channels. JSON is very bad. Why don't you just use SEXPS?
<makomo> well, the data i pulled from the web is in JSON, so i have no other choice right now
<makomo> however, i was thinking of switching the data over to either sexps or into an SQL database
<makomo> still, i don't find json *that* horrible
rgrau has joined #lisp
<pjb> Granted, there are worst things.
smurfrobot has quit [Ping timeout: 260 seconds]
<jasom> makomo: also, you can just use strings and change the make-hash-table to use #'equal
LocaMocha has quit [Ping timeout: 256 seconds]
<jasom> pjb: part of it is just that it's really easy to write bad JSON libraries
<peterpp> pjb, in what way do you consider s-expressions superior to json for this purpose? (genuine question from a lisp newbie)
<dmiles> JSON implies an exact structural meaning. whereas s-expressions (depending on the content can have differnt meanings beyond structure)
<rme> Of course, s-expressions are very easy to print and read from lisp (just like json is in javascript).
<dmiles> for example: (loves john martha) ,, how do you say that in JSON?
<jasom> dmiles: [loves john martha]
<jasom> dmiles: ["loves", "john", "martha"] rather
fourier has quit [Ping timeout: 265 seconds]
<dmiles> jasom: yeah true JSON-LD (link data) encourages such meanings to be preformed based on operators
<jasom> obviously there are things that you can represent in JSON that are harder to represent in sexps and vice-versa
<jasom> How do you represent this in JSON, for example? [null, false]
<jasom> s/JSON/sexp
<dmiles> *nod* secretly JSON has more structual freedoms that just conses
<jasom> but sexps have strings and symbols as distinct entities
<dmiles> *nod* secretly JSON has more structual freedoms than *just* conses
orivej has joined #lisp
makomo has quit [Ping timeout: 248 seconds]
<jasom> and is nil a boolean false, an empty list, an empty alist, or an empty plist?
arbv has quit [Ping timeout: 248 seconds]
jmercouris has quit [Ping timeout: 248 seconds]
vap1 has joined #lisp
<dmiles> oh true i see what you mean .. if we wanted to we could even have multiple types of nils
vaporatorius__ has quit [Ping timeout: 256 seconds]
<jasom> communicating between two lisp programs with JSON is rather silly, but JSON isn't inherently worse or better than sexps for other cases.
pfdietz has quit []
<pjb> peterpp: the superiority of sexp is that it's designed for lisp objects (mind you, not all of them, but a sizeable subset of them). So it works well to communicate between lisp processes.
<pjb> (loves john martha) may mean something different from (loves john "Martha")
<pjb> John hated Martha, however he named his daughter "Martha" since he loved that name.
<pjb> But then you can always write more complex json to encode it.
<jasom> peterpp: I'm not necessarily recommending this, but here's an example of me using an actual lisp file for configuration; I just LOAD it: https://github.com/jasom/cl-fccs/blob/master/config.lisp
gravicappa has quit [Ping timeout: 248 seconds]
wigust has joined #lisp
<dmiles> yeah the point of json-ld is to document the various complex meaning-rich json encodings, just like IKL (Icarus language) document the various complex meaning-rich s-expressions
caffe has joined #lisp
<caffe> o/
<caffe> silly question.. i've been playing around, and noticed that things like :foo do not result in a debugger prompt or error. is there a use for this, or some way i can define a function to those symbols(?)
<caffe> that is, just something like * :foo, not contained in an s-expression
<shka> caffe: those are keyword symbols and you can't
<caffe> so all they can ever do is just repeat :FOO back to you?
<rpg> dmiles: I thought json-ld was just to let people smear JSON data across different documents?
<shka> caffe: they have uses
<dmiles> rpg: yes, though in a way that we can know what the data meant postmortum
hyero has quit [Quit: #ledger-mode]
<rpg> dmiles: post mortem?
<rpg> Is it supposed to somehow be like OWL?
<caffe> reading up more on them now, and yeah.. this isn't what i was looking for.
<caffe> what i was hoping for was a way to define a shorthand command to be used in the repl, similar to commands in the lisp listener prefixed with a colon
<caffe> er, a comma.. not a colon
drcode has joined #lisp
<rpg> caffe: those commands are defined using special facilities that are not the same as DEFUN.
<dmiles> analysis for after the json object is plastered to the page ["loves", "john", "martha"] .. ahah there was a loveful event involving john towards something
<rpg> caffe: The :-commands used in ACL's repl or SBCL's ACLREPL are defined with a special defining macro.
<dmiles> rpg: yes, json-ld sort of replaces owl for many users
<rpg> Similarly, the comma-commands in SLIME's repl are defined in a special way.
<caffe> so are those methods unique to their environments?
wigust has quit [Ping timeout: 272 seconds]
<rpg> dmiles: OWL was intended to be able to say what a particular data item "means", but has been less than satisfactory for a number of reasons. IMNSHO the use of description logic for its semantics was a total disaster.
<dmiles> it was a disaster due to the "rule of least power"
damke_ has joined #lisp
<rpg> Not only the rule of least power, but also because it's a *logical* notation that *looks like* an object-oriented notation, meaning that the vast majority of people -- even very sophisticated people -- who use it don't understand what it means.
drcode has quit [Ping timeout: 248 seconds]
<rpg> The essence of OO programming is mutation, so giving people a notation that looks like OO, but in which mutation is forbidden is nutso.
<caffe> or rather, are the facilities for defining those macros unique to their implementations? (clim listener, slime, etc)
<dmiles> haha, true
<rpg> caffe: Yes.
<dmiles> (true about what you said is nutso)
<caffe> well, thank you. now i have a better idea on what i need to read up on next.
<dmiles> instead of description logic, we should have used situatation/fluent calculus which is what congress paid for in funding the research
<rpg> dmiles: the notation is a "false friend" like "he" in hebrew (which means "she")
damke has quit [Ping timeout: 264 seconds]
<rpg> dmiles: Worked on a project where we tried to use OWL-S (the OWL-based webservices markup language). Wow! Having a language for describing computation that has no provision for state change or for the concept of "variable" was a total trainwreck.
<rpg> oh yeah, and it couldn't deal with the fact that web services often produce *knowledge* about things in the world.
<dmiles> (congress was sold on the abilites of inference engines that used dynamicly mutating situations that transacted using inferred states)
<dmiles> (for your usecase even!)
<rpg> In my experience there are now tons of systems that use the *syntax* of OWL, but that have widely diverging semantics, or no semantics at all.
<rpg> (for those who have heard the "Car Talk" radio show, I should have said "don't get me stahted!")
uuplusu has quit [Remote host closed the connection]
<dmiles> rpg: i am glad you might be a kindered soul whom is angry as hell at the debacle)
<dmiles> because how much time you had to waste
<rpg> dmiles: sounds like it.
<rpg> caffe: I don't fully understand the comma commands for SLIME because they seem somewhat awkwardly split across emacs-lisp and common lisp.
<dmiles> rpg: what relaly bugs me is for 5 years prior to the semantic web, myself and many people were doing all the things the semantic web dreammed of
<rpg> what really bugs *me* is that it's clear that no one could have tried to use OWL-S or DAML seriously before trying to foist it on the world at large.
<dmiles> the semantic web was created so we didnt have to do those things secretly anymore
<caffe> i don't personally use SLIME much. i'm more familiar with them in clim-listener, but i'd like to hack together something similar that works in a plain sbcl repl just the same as it would in the listener, or slime, etc
makomo has joined #lisp
amberglint has joined #lisp
<dmiles> (yet the semaantic web *prevented* specifically the logical representations required to perform those tasks)
<rpg> caffe: I think that would be pretty hard, at least for SLIME, because of the way that its commands must be written in elisp. Also, for reasons I'm too lazy to understand, SLIME and (SB-ACLREPL and ACL's REPL) are incompatible. I think it's probably because SLIME has to parse all the stuff that goes into the repl itself, so commands that are programmed into the underlying lisp aren't understandable
<rpg> dmiles: It's afternoon here and I *must* eat or I will start chewing my keyboard. TTYL, I hope.
<caffe> i'm not too worried about it working in SLIME
Ven`` has joined #lisp
<dmiles> rpg: one day i was translating English to KIF and then back to English (round tripping), my supervisor told me to start billing DAML project
<dmiles> and to round trip in DAML-OIL instead
<dmiles> i couldnt do it :(
<dmiles> so i wasted a year
DeadTrickster_ has quit [Remote host closed the connection]
uuplusu has joined #lisp
<dmiles> then i watch everyone else melt away in the same pain
<caffe> i'll start by picking apart SB-ACLREPL to get a better understanding of what i'm dealing with, and/or see if that's something i could make use of
EvW has joined #lisp
eudoxia has quit [Remote host closed the connection]
shka has quit [Ping timeout: 256 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
arbv has joined #lisp
spoken-tales has joined #lisp
uuplusu has quit [Remote host closed the connection]
didi has joined #lisp
<didi> What problems should I expect by setting *print-circle* to t inside my .sbclrc?
<antoszka> I haven't really noticed any serious issues.
<didi> antoszka: Thanks.
<antoszka> It may actually give you additional insight into the way your structures actually *reuse* data.
<antoszka> Using the #N# notation.
<didi> Hum, interesting.
<antoszka> (not only for truly circular structures)
<rpg> dmiles: Hi. Sorry about running off...
wigust has joined #lisp
parjanya has left #lisp ["Changed major mode"]
raphaelss has joined #lisp
parjanya has joined #lisp
mejja has quit [Quit: mejja]
uuplusu has joined #lisp
Ven`` has quit [Ping timeout: 240 seconds]
eazar001 has quit [Quit: WeeChat 2.0.1]
ebrasca has left #lisp ["ERC (IRC client for Emacs 25.2.1)"]
wigust has quit [Ping timeout: 248 seconds]
Ven`` has joined #lisp
uuplusu has quit [Ping timeout: 264 seconds]
DeadTrickster has joined #lisp
uuplusu has joined #lisp
alexmlw has quit [Quit: alexmlw]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
EvW has quit [Ping timeout: 272 seconds]
DeadTrickster has quit [Read error: Connection reset by peer]
DeadTrickster has joined #lisp
fluxi- has quit [Quit: ...]
fluxit has joined #lisp
EvW has joined #lisp
chocolait has quit [Ping timeout: 272 seconds]
chocolait has joined #lisp
giraffe has quit [Ping timeout: 240 seconds]
Xach_ is now known as Xach
Xach has quit [Changing host]
Xach has joined #lisp
giraffe has joined #lisp
uuplusu has quit [Ping timeout: 240 seconds]
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
uuplusu has joined #lisp
jmercouris has joined #lisp
<jmercouris> jasom: +1 That essay was not even close to describing what bipolar is
varjag has quit [Remote host closed the connection]
varjag has joined #lisp
QualityAddict has joined #lisp
didi has left #lisp ["there are always reasons to /part"]
rgrau has quit [Read error: Connection reset by peer]
rgrau` has joined #lisp
sjl has quit [Ping timeout: 252 seconds]
mlau has quit [Ping timeout: 240 seconds]
aindilis has quit [Ping timeout: 260 seconds]
uuplusu has quit [Ping timeout: 264 seconds]
mishoo_ has joined #lisp
mishoo__ has quit [Read error: Connection reset by peer]
mlau has joined #lisp
uuplusu has joined #lisp
vydd has joined #lisp
vydd has quit [Changing host]
vydd has joined #lisp
smurfrobot has joined #lisp
mishoo_ has quit [Ping timeout: 264 seconds]
smurfrobot has quit [Ping timeout: 272 seconds]
wxie has joined #lisp
damke has joined #lisp
uuplusu has quit [Remote host closed the connection]
<le4fy> jmercouris: definitely sub-optimal word choice w/ "bipolar". but if you're a little forgiving i think it is still a decent point
uuplusu has joined #lisp
fikka has joined #lisp
<le4fy> the point being "lispers" tend to work hard on interesting problems, and can easily lack motivation when forced to do something they don't believe in
<le4fy> "bimodal" might be better
damke_ has quit [Ping timeout: 264 seconds]
wxie has quit [Remote host closed the connection]
groovy2shoes has quit [Remote host closed the connection]
<jasom> le4fy: I'll have to reread that essay, because that's a much kinder interpretation than I remember getting
jmercouris has quit [Ping timeout: 272 seconds]
<le4fy> jason: was your interpretation one that was unkind to the lisper?
<le4fy> mine was one that was relatively kind to the lisper, but understood the lisper as being stuck in a world of bullshit
nirved has quit [Quit: Leaving]
<le4fy> i read this essay (a couple years ago) at the same time i read this one (http://www.winestockwebdesign.com/Essays/Lisp_Curse.html)
<le4fy> i felt they are related
Kaisyu has joined #lisp
joast has quit [Ping timeout: 264 seconds]
Jesin has quit [Quit: Leaving]
spoken-tales has quit [Remote host closed the connection]
spoken-tales has joined #lisp
brendyn has joined #lisp
<_death> essays about lispers are easier to write than essays about lisp
<fe[nl]ix> :D
groovy2shoes has joined #lisp
uuplusu has quit [Remote host closed the connection]
rgrau` has quit [Quit: ERC (IRC client for Emacs 26.0.50.1)]
__main__ has quit [Ping timeout: 248 seconds]
rgrau has joined #lisp
joast has joined #lisp
smurfrobot has joined #lisp
uuplusu has joined #lisp
smurfrobot has quit [Ping timeout: 260 seconds]
rgrau has quit [Quit: ZNC 1.6.3+deb1 - http://znc.in]
rpg has quit [Quit: Textual IRC Client: www.textualapp.com]
rgrau has joined #lisp
rgrau has quit [Remote host closed the connection]
pierpa has joined #lisp
vydd has quit [Ping timeout: 260 seconds]
<aeth> I personally see Lisp as just another language (1) that is more multiparadigm than most languages (to make up numbers, you can do 45% of the paradigms in most languages and 84% in CL) and (2) where it is much easier to control when non-runtime evaluation happens than with most languages (lots of ways to do it, too).
<aeth> I think essays about how Lisp is some special magic language and Lispers are rare geniuses aren't productive.
uuplusu has quit [Ping timeout: 260 seconds]
<drdo> I can write lisp macros, that means I'm a genius of the highest calibre!
<aeth> Oh #2 is far more than just the defmacro macros.
<aeth> And if you're willing to give up portability to all implementations, there are some extensions that give even more power than CLHS offers.
m00natic has quit [Remote host closed the connection]
rgrau has joined #lisp
<aeth> (A new standard would be great to make all the popular and very useful extensions standard.)
<rme> more lisp, fewer essays
al-damiri has quit [Quit: Connection closed for inactivity]
uuplusu has joined #lisp
<aeth> Ironically, there probably needs to be an essay about how all the popular essays are wrong.
<drdo> I would welcome a new standard, but don't go around saying that, they'll shoot you
<aeth> drdo: I always sneak in "there should be a new standard" as often as possible, in hopes that I can gradually get people used to the idea. Subtle propaganda.
<aeth> Right now the ideology is that (1) there shouldn't be a new standard and (2) it's impossible to do one even if people wanted one
<aeth> And, yeah, #2 is true if you're going for an ANSI or ISO or whatever standard. But no one cares about those anymore for programming languages. Scheme gets by fine with its rnrs.