freenode/#lisp - IRC Chatlog
Search
12:09:17
dmiles
ty for suggerstions .. i am making it all the way thru https://github.com/TeamSPoon/wam_common_lisp/blob/master/t/sanity-test-1.lisp#L158
12:44:25
phoe
I have a string like ":FOO :BAR :BAZ :QUUX". Is there a function that will read it as a list?
12:44:54
phoe
Like, I want something better than to define my own function that does (READ-FROM-STRING (CONCATENATE 'STRING "(" STRING ")")).
12:53:14
pfdietz
Can also use the second return value of READ-FROM-STRING, which is the position of the first character not read. Also, the :START keyword parameter of READ-FROM-STRING.
12:55:11
pfdietz
You would need to read from S, with eof-error-p false, and a distinct eof-value you'd check for to terminate the loop.
12:56:17
phoe
13:44 < phoe> Like, I want something better than to define my own function that does (READ-FROM-STRING (CONCATENATE 'STRING "(" STRING ")")).
12:58:31
Zhivago
(with-input-from-string (s ":foo :bar") (loop for x = (read s nil) until (null x) collect x)) ; like this, surely?
12:59:44
pfdietz
(read (apply #'make-concatenated-stream (mapcar #'make-string-input-stream (list "(" string ")"))))
13:03:09
Zhivago
(with-input-from-string (s ":foo :bar") (loop for x = (read s nil s) until (eql x s) collect x))
13:04:27
oleo
* (with-input-from-string (s ":FOO :BAR :BAZ :QUUX") (loop repeat 4 collect (read s)))
13:09:46
antoszka
how about just catching the END-OF-FILE condition and not specifying the number of repetitions?
13:09:54
oleo
you can use two loops one for counting how many reads it does that will determine the length of the string
13:11:36
Zhivago
antoszka: That is what (with-input-from-string (s ":foo :bar") (loop for x = (read s nil s) until (eql x s) collect x)) does.
13:31:28
oleo
(with-input-from-string (s ":FOO :BAR :BAZ :QUUX") (loop as x = (read s nil s) while (not (eql x s)) collect x))
14:12:50
phoe
I have been committing a lot of sins related to comparing symbol names of symbols from different packages.
14:21:20
dmiles
matching "(member 1 '(1 2 3) :test #'=)" to (defun member (item list &key test test-not key) .. )
14:25:30
phoe
Then you will want to match only *the* symbol :TEST and not any other symbol like FOO:TEST.
14:26:23
dmiles
whnen i am returning the error message i would like to let the user know that they should have used a keyword
14:28:34
phoe
2) when the user uses 'TEST which is not a keyword but is STRING= to a valid keyword - you want to inform the user that there is a keyword available that perhaps should have been used.
14:29:00
phoe
3) when the user uses a thing like 'KJAFKJHF that is not EQ or STRING= to anything - you just want to err out.
14:35:47
pjb
(defun foo (&key test ((test #:bad-test) nil bad-test-p)) (when bad-test-p (error "You should have used :test not 'test")))
14:37:01
pjb
But the question is why you want to test those cases? a bad keyword is a bad keyword, the lisp system already reports them.
14:38:01
dmiles
i understand it is wrong heads to ever compare symbols by name.. that anyone doing that is obviously doing something wrong
14:38:26
pjb
dmiles: the implicit point here being that 'test might be exactly what the keyword should be, if the user programmed it so!
14:38:51
pjb
dmiles: there's only one place where you need to compare symbols by name, it's with LOOP keywords.
14:39:09
dmiles
pjb: yes indeed that is what is happening in 44mb of work code.. we dont have to actually use keyword names in cyc.. we have to use the right key from the right package is all
14:40:30
pjb
ie. you cannot just compare with string=, you have to compare with (and symbolp string=)
14:51:18
dmiles
my other usecase i am setting up for is durring make-isntance that i respect slots from differnt classes that came from differnt packages
14:55:23
dmiles
loke: i was going to make that argument.. but technically we can compile :x in the parse and have it bind to foo:x in the body
14:56:58
loke
The interesting thing is that :INITARG for DEFCLASS is indeed processed that way. You can specify an initarg in any package, not just KEYWORD:
14:57:20
loke
(defclass bar () ((val :initarg z))) (slot-value (make-instance 'bar 'z 10) 'val) ⇒ 10
14:59:13
loke
Plenty of times have I forgot to add the colon in front of an INITARG argument. Annoying :-)
14:59:35
dmiles
parsing initargs i have to pass once over wwith #'eq then again over with (equal (symbol-name their-keyword)(symbol-name read-symbol-not-in-keyword))
15:03:23
dmiles
i think it is nice to allow: (make-instance 'bar 'z 10) or (make-instance 'bar :z 10)
15:11:24
dmiles
many serialized objects in cyc have "defun based constructors" that mimic the init slots using (foo:make-foo &key foo::z baz::z quux::z ) ...
15:12:29
dmiles
(secretly i thought that was standard until a couple years ago.. and was slightly surprised)
15:13:22
jmercouris
I've defined the following asd: https://gist.github.com/8c7ff859c3b6b4fc51c44c1a48188321 how do I load my subsystem?
15:13:22
minion
jmercouris, memo from jasom: the best way to use asdf and features is to use defsystem-depends-on to require any packages that might set features you need (e.g. trivial-features) and then if-feature inside your defsystem
15:13:53
jmercouris
it doesn't appear anywhere in slime-load-system, it only shows the parent system
15:15:51
phoe
jmercouris: my knowledge might not be enough in this case. I'm no good with more complex ASDF setups.
15:36:47
jmercouris
so if you look at the gist I posted earlier https://gist.github.com/8c7ff859c3b6b4fc51c44c1a48188321, next/cocoa doesn't come up in slime-load-system, but next does
15:37:01
Xach_
oh. slime-load-system is something that works only in a limited set of circumstances.
15:37:55
Xach_
There is no way to know in advance the lst of strings that will return a good result for find-system.
15:38:59
Xach_
jmercouris: when you do (asdf:find-system "foo") -- a precursor to loading a system -- asdf consults a number of functions to convert the string "foo" into a path to a system file (or a system object)
15:39:11
Xach_
This mapping is very handy and is one of the reasons why quicklsp caan do what it does.
15:39:36
Xach_
But it does mean that, when doing auto-complete, there's no easy way to say "give me a list of all systems that start with 's'" for completion purposes.
15:40:03
Xach_
But there is one built-in, standard function that is not so hard to use like that, because it maps from strings to files in the registry config.
15:40:18
Xach_
So you could consult the file system to say "which *.asd files in the registry start with 'f'?"
15:40:41
Xach_
but it can't tell you anything about the subsystems defined in one of those *.asd files.
15:43:18
jmercouris
I see but you could traverse those returned files and pass them to the other function that finds systems right?
15:44:55
Xach_
jmercouris: if you load the system file, you could have more information to use for completion. but loading system files is a pretty heavyweight operation. it could load dozens of supporting systems.
15:45:23
Xach_
a new system should make it easier to explore the mapping without doing an unpredictable amount of work.
15:46:02
jmercouris
Xach_: You could just write a simple parser that looks for defsystem + some string in each of those asd files
15:46:20
jmercouris
it's not necessary to know anything about the system or it's location as asdf:find-system can do that for you later, right?
15:47:42
jmercouris
I'm of course extremely ignorant about what this requires, but I thought that defsystem was ALWAYS followed by the system name
15:49:54
beach
(#.(intern (concatenate 'string "DEF" "SYSTEM") (find-package "ASDF_USER")) name-of-system ...)
15:54:42
beach
In fact, it requires the Common Lisp reader, which in turn requires a running Common Lisp system.
16:04:50
whoman
hmm eye of the beholder. as is life, readers are subjectively processed =) who knows what a person will feel when i wear a shirt consisting of the color Red
16:14:03
jmercouris
So now that Fare is leaving the community, who will further the development of ASDF?
16:18:15
jmercouris
trafaret1: Of course, I may not be able to answer it, though someone else will, in IRC the etiquette is generally to just ask your question
16:19:40
trafaret1
jmercouris: I not a programmer but I want to be, is it good choise to starte learning programing from lisp or it's bad idea?
16:20:47
jmercouris
trafaret1: That is a difficult question, it depends, do you wish to make money as a programmer? What are your constraints in life, etc?
16:21:03
jmercouris
trafaret1: You'll have to tell us your motivations for learning programming before we can give a conclusive answer
16:22:07
jmercouris
trafaret1: What beach says is true about the simplicity of the language, the question is, can you afford to learn lisp and then another language for employment
16:22:46
beach
jmercouris: I think every programmer should know Common Lisp, whether they actually need it in their job or not.
16:25:02
trafaret1
I have recently installed emacs and to be honest I fall in love with it, some ppl in interat says that lisp hard to learn but easy to write same things than in for example c/c++, java
16:26:56
jmercouris
trafaret1: It sounds like you've already made up your mind, might as well learn lisp :)
16:27:30
beach
jmercouris: It is definitely not a luxury. It is a necessity in order to be a good programmer. Well, not necessarily Common Lisp, but some Lisp dialect.
16:28:06
beach
jmercouris: Granted, the industry if full of incompetent programmers, but that's not some advice I would like to give, i.e. to remain incompetent.
16:28:27
jmercouris
beach: If you were in some poor country and had to provide for your family asap, you'd learn whatever language pays money, and common lisp rarely pays money
16:29:23
jmercouris
I'm not promoting incompetency myself :D, but I do believe it is a luxry to become competent, imagine just struggling to survive and provide for you and your family, you will do the minimum you can do to get by, because you have so many other problems going on in your life that you have to manage
16:31:47
jasom
jmercouris: also, the only supported subsytem syntax in foo.asd would be something like foo/bar (i.e. the prefix is the name of the .asd file, followed by a slash)
16:32:33
jasom
jmercouris: but yeah, slime won't autocomplete subsystems (finishing up reading backlog now)
16:46:46
eschulte
Xach_: ah, thanks! I made a breaking change to curry-compose-reader-macros and hadn't updated graph... should be fixed now
17:07:12
Xach_
jasom: http://blog.quicklisp.org/2015/01/getting-library-into-quicklisp.html has some ideas
18:21:54
stylewarning
jmercouris: I’m pretty sure that if you can afford to be somewhat competent enough to become an industry programmer, you can fit Lisp in with it.
18:22:38
stylewarning
I am baffled when there’s this implication that folks are able to really only learn a single language or they must somehow make a presumably lifelong choice and dedication to some single language
18:24:29
stylewarning
rme: but I’ll suppose on the outset that you didn’t think “well, I’ve got one language to learn in my life, which should it be?”
18:27:54
dmiles
jmercouris: knowing and doing Prolog and/or Lisp work has always paid way more than C#,Java,Scala and ASP comvined
18:28:15
beach
stylewarning: I'll be happy to review drafts of it, if you think that would be advantageous.
18:28:53
dmiles
jmercouris: mostly due to being able to work in markets that are starved of programmers
18:29:08
beach
I will do what I usually do, namely submit links to drafts here, so that anyone who wants can review the paper(s).
18:29:15
stylewarning
beach: I’d love that. I’m hoping I can publish about some of this quantum simulation business. We will probably be writing our drafts in a few weeks
18:42:46
rme
I've mostly been successful in earning a living with CL, though there are rough spots from time to time.
18:46:53
jmercouris
stylewarning: The point is that you'll learn one language in your life, I myself have learned dozens of languages for different purposes at different times
18:47:05
jmercouris
the point is, that someone learning to program, as an absolute beginner should only learn one language
18:47:19
jmercouris
they don't have infinity time at their disposal, and they will have to make money with that language, so they better be good at it
18:49:18
jmercouris
stylewarning: Absolutely agreed, learning lisp has changed how I think about programming
18:49:37
jmercouris
I wouldn't say I have "learned" lisp, but I've learned some, and already so many of my old opinions have changed
18:50:09
jmercouris
dmiles: These types of jobs can be very highly paid, IFF they can be found, and that you must admit is more difficult than finding a job in Ruby or Python or some .NET technology
18:50:57
jmercouris
dmiles: rme even provides evidence for my claim, an excellent developer claiming there are rough spots
18:55:03
jmercouris
because by that same logic, whenever you are happy, you should be less happy, because no doubt someone is happier
18:55:17
dmiles
jmercouris: oh definatley, there is probably aobut 1 or 2 lisp/prolog job openings per month that I see :P verses 100s per week of everyhitng else.
18:55:26
minion
KZiemian, memo from beach: One item for CLUS. In the description of the functions for setting macro character or dispatch macro character, the only place to figure out the signature of the function seems to be in the example. It wouldn't hurt to state that signature explicitly.
18:58:07
stylewarning
KZiemian: quantum computing but knowledge of that isn’t necessary. See this video sometime https://youtu.be/f9vRcSAneiw the email to email is at the end (:
18:58:11
fiddlerwoaroof
ACTION wishes there were more remote lisp jobs and/or jobs in Ventur County, ca
19:00:13
dmiles
ACTION would only look for a job that is allowing opensource and letting me work on what i work on
19:00:35
fiddlerwoaroof
The company I work for is hiring senior engineers and we have opportunities to use clojure
19:00:38
stylewarning
dmiles that basically goes entirely against what jobs exist for, for the most part
19:01:06
fiddlerwoaroof
But, I haven't yet convinced them to allow CL yet: they would be willing if someone could present a compelling business case
19:01:13
dmiles
stylewarning: oh the incentive is that I'd get two or three people to do the things i dont like doing
19:01:22
fiddlerwoaroof
stylewarning: it sort of depends on the relationship of your company to the technology
19:01:45
fiddlerwoaroof
In places where network effects matter, e.g. advertising and social media, it's fairly risk-free to opensource your technology
19:03:07
fiddlerwoaroof
Most places you want to work will take demonstrated talent over formal CS education
19:04:09
mlius
21:03 < fiddlerwoaroof> Most places you want to work will take demonstrated talent over formal CS education
19:07:04
fiddlerwoaroof
shrdlu68: if you are interested in living in the LA area, PM me your contact info and I can send your resume to our internal recruiter
19:10:12
rme
I'm living in the Seattle area at the moment, but if anyone wants me in a French-speaking country, let me know.
19:17:51
AeroNotix
Probably. In all honesty ASDF has always lurked in the background of any lisp hacking I've ever done. I've rarely had to use its APIs directly and instead used Quicklisp which works on top of it.
19:20:05
AeroNotix
I don't get exactly what you're talking about here but from the sounds of it you've decided to use CCLDoc in another project and therefore also wanted to document CCLDoc in the process?
19:23:37
KZiemian
AeroNotix: I don't know all detailes because I was working on diffs between CLUS and CLHS when they are debating
19:23:58
AeroNotix
I'm reading about CLUS now. This is a new kind of be-all/end-all documentation project?
19:24:18
AeroNotix
http://phoe.tymoon.eu/clus/doku.php?id=clus:todo seemingly with some kind of interactive UI/webpage aspect
19:25:59
AeroNotix
aside from "This is Common Lisp UltraSpec, a community project to create a contemporary and unified documentation file for the whole modern Common Lisp universe."
19:26:42
KZiemian
AeroNotix: phoe, TeMPOraL, bugrum, mfiano and all other folks on Discord clus-general
19:26:52
AeroNotix
KZiemian: a good starting point perhaps could be to add some nicer CSS/formatting to the clhs?
19:28:06
AeroNotix
it's so damn slow and resource hungry to run it in the browser and "natively", though
19:30:20
KZiemian
AeroNotix: if you want know what CLUS is about you must ask phoe, mfiano or some other big folk. Or read this https://blog.teknik.io/phoe/p/375
19:31:25
KZiemian
AeroNotix: I just quit my embrioning state as CL user and most things about documentation are beyond me
19:32:38
KZiemian
AeroNotix: project menager of CLUS is my bud from kraklisp, which is lisp community now in coma of people living in Cracow, Poland
19:33:47
KZiemian
AeroNotix: and he start looking for help about weeks or so when I uderstand that I never left lisp embrionig state if I not find good project to work
19:34:44
KZiemian
AeroNotix: 2 + 2 = 4 so I ask him that can I join and get deeper knowledge about CL working on CLUS
19:35:36
KZiemian
AeroNotix: so I get in and being in strange position of one of top contributors and at the same worst lispers of all members
19:35:54
oleo
i have edited a definition of a library function from within my init file,but when i load it it does not take effect even tho it shows it as being redefined
19:37:22
AeroNotix
just contribute as you can and see where it goes. Not everything has to be perfect.
19:37:42
AeroNotix
oleo: yeah but what? Who is calling that? What is the --load file? Can you share code?
19:37:58
KZiemian
AeroNotix: yes, Lisp is strange, as my life achivments. This is way I start my journey with this language
19:39:06
KZiemian
AeroNotix: I hope you understand why I can't answer you question why CLUS? But phoe is near so you can ask him if some question left.
19:42:34
oleo
i only see an effect when i edit the source file in place but not when i try to override it from my init file
19:43:42
oleo
but it does not work neither way, the only solution seems to be to edit the source file, then i see an effect otherwise not
19:44:38
KZiemian
AeroNotix: and because I the lowest in CL ranks among them I said: ok, I go to CCLDoc
19:46:04
mfiano
KZiemian: In case you are wondering, you are actually the only one doing work on CLUS. phoe took time off some months ago because life is getting in the way, and I was never part of the project really, just offered suggestions to get it rolling, but it stopped rolling again months ago.
19:46:51
AeroNotix
Hence why I mentioned to stop worrying and just contribute where you can. Stop caring about "CL ranks" whatever that means. :)
19:49:36
KZiemian
mfiano: the only things that is pain in the back for me is that, when I talk about it
19:50:42
KZiemian
mfiano: one ask question: So what is a state, where you are going, why you do it that way? And only answer I can get is: ask phoe or some other folk
19:51:30
KZiemian
mfiano: I always feel bad in all are of my life, when I can't answer directly such basic question
19:52:04
mfiano
There are no answers because there is no support of the project from anyone other than yourself. This may be a sign
19:52:33
KZiemian
AeroNotix: job = it is my duty, but my check is not in dollars but in Lisp knowldge and good words from community
19:53:37
pjb
KZiemian: either you don't do anything and you're a lurker, or you do something and you're a hero.
19:54:28
KZiemian
mfiano: not quite true, there is a reson for using CCLDoc and not cearing about CSS, but I don't know either
19:55:19
rme
KZiemian: Try starting out with something simple: write some documentation in ccldoc format.
19:59:13
pjb
The thing is that receiving a private message should open a new window to dialog with the correspondant, and depending on the IRC client, this can be more or less conspicuous.
19:59:18
KZiemian
AeroNotix: GoogleChrome, I don't have enough energy to learn something more sophisticated
20:01:08
fiddlerwoaroof
Because they need fancy IDE support to be even slightly bearable... and no one I work with wants to learn emacs :)
20:02:00
pjb
fiddlerwoaroof: I say, more code generation! Write emacs lisp to generate parts of your programs; this is the killing feature of emacs.
20:02:34
fiddlerwoaroof
Yeah, I've been really tempted to use ABCL to write some boilerplate-generators
20:03:43
pjb
KZiemian: about asdf, just take a simple project asd file, copy it, and modify it for your needs.
20:04:50
fiddlerwoaroof
e.g.: https://github.com/fiddlerwoaroof/dotfiles/blob/9abf345f72f6754bcc84ac807802ec0126d84895/emacs.d/lisp/lisp-skeletons.el#L108
20:05:21
KZiemian
pbj: open project number 734: learn more elisp to the point you can configure Emacs as you need
20:06:17
KZiemian
If you want know what I more or less know about Lisp and Common Lisp in particular
20:06:26
fiddlerwoaroof
If you want to make an add-on to ccldoc, you probably just want to make a new system that depends on ccldoc
20:06:54
fiddlerwoaroof
And then have whatever processes the documentation depend on both ccldoc and your new system
20:07:20
fiddlerwoaroof
Of course, if ccldoc isn't designed to be extensible, this might not be feasible
20:09:10
jasom
Xach_: clinenoise (my port of linenoise from C to lisp). I just had a bug filed against it so apparently someone other than I has already found it useful
20:09:53
jasom
Xach_: I'm doing things like docstrings and actually exporting symbols right now before I file the PR
20:10:58
KZiemian
fiddlerwoaroof: main point is that, when we both end we marge our threads and make add-ons to CCLDoc
20:12:26
fiddlerwoaroof
Xach_: looks like a readline alternative: https://github.com/antirez/linenoise
20:13:32
KZiemian
I'm sorry, from CLUS project I understand my thread and some of main idea what happens in other areas
20:15:19
jasom
It sits somewhere between cl:read-line and the GNU readline library in terms of features and complexity
20:16:28
jasom
I wrote it to use as the input for my toy shell, as I was dissatisfied with the existing options in various ways
20:26:42
rpg
In SLIME is there anything I can do to resync buffer position, so that warnings, etc. show up in the right place? I find that they drift from their proper position over time.
20:32:09
rpg
jmercouris: It's not the REPL screen position, it's where SLIME "thinks" the defuns are in a lisp file, versus where they actually are.
20:32:40
rpg
If I do slime-compile-defun (I think that's the name) a few times, SLIME loses track of where to place the underlines for the warnings.
21:07:18
Xach_
rpg: I hate to offer a guess, but it's the best I can do right now - maybe try recompiling the whole file? C-c C-k usually.
21:07:47
rpg
Xach_: That's probably right, but if I do that, I think I end up with a fasl pooped out into the source directory, instead of the cache :-/
21:09:21
rpg
I should probably just rerun the ASDF build when I need it. But the conclusion might be that -- despite the fact that it probably was a pretty challenging hack -- putting the warnings on the code, instead of in the minibuffer is a waste of time, at least when you're compiling interactively.
21:27:32
pfdietz
jasom: while catching up on iRC archives, I noticed you asked about lisp compiler fuzzing.
21:28:49
pfdietz
I sent a flurry of bug reports (mostly fixed now) to sbcl recently that were generated by various kinds of that.
21:34:08
jasom
pfdietz: One of the great wins when I last fuzzed a compiler was how many bugs in a short time could be uncovered, which allowed for finding patterns with just short-term data. e.g. one class of optimizations was found to be a large source of bugs, so those were removed or rewritten in a different style. Perhaps 10 years of organic bug reports could have been aggregated to find such a pattern, but having 30
21:34:10
jasom
or so bugs in a few months made it obvious just by "wait, didn't I just fix a bug like this"
21:36:49
pfdietz
I think it's important to keep fuzzing, because development introduces new bugs, but also exposes old bugs. Still finding bugs that go back to CMUCL.
22:34:30
jasom
makomo: https://github.com/jasom/cl-fccs/blob/e01f45a00577c22200ffdf8113efc421d3f00e10/src/util.lisp#L25
22:36:01
jasom
makomo: also note that I use vectors for json lists as well, so nil is unambigously false.
22:39:37
jasom
actually null would also decode to nil, but my data shouldn't have nulls in it for this case.
22:41:36
jasom
makomo: https://sites.google.com/site/sabraonthehill/home/json-libraries#TOC-Quick-JSON-syntax-refresher cl-json decodes 4! JSON types to something that could be nil by default :(
22:43:29
jasom
com.gigamonkeys.json is the only one on the list with a JSON->lisp->JSON that can survive a round-trip by default.
22:44:44
makomo
hm yeah, i only thought about the false/null case, but object/arrays could ofc be empty
22:46:15
jasom
the number of times that I've needed to distinguish betwenn "false" and "null" in javascript code is approximately zero, so that one is the most forgivable.
22:49:30
jasom
hmm, I was bad and didn't use safe-json-intern for making the keyword there though...
23:16:22
stylewarning
So you could product efficient parsers into whatever data structure you prefer
23:28:25
makomo
yeah, that's what i thought. thought there might be some neat way using and/or or something, but they both return either nil or the last value/the first non-nil value
23:35:37
aeth
If you're going to be unclear and use (and x t), you could still use if's implicit nil else and just say (if x t)
23:36:54
aeth
All three should have identical disassemblies with a sufficiently smart compiler. Works in SBCL.
23:38:01
makomo
i agree it's not very clear so i probably won't use it. i was wondering whether a clever trick like that is idiomatic or not.
23:40:49
aeth
Still identical disassembly in SBCL. In fact, all four functions (I called them foo, bar, foobar, and barfoo) have 100% identical disassemblies in SBCL.
23:43:33
aeth
for the lazy: (if x t nil) (and x t) (if x t) (when x t) (not (not x)) (not (null x)) (not (eq x nil))
23:44:28
_death
(let ((m (make-hash-table))) (setf (gethash nil m) nil) (defun bool (x) (values (gethash x m t))))
23:45:15
aeth
That's going to fool SBCL because you're using a mutable data structure and it's not that sophisticated... I think. Let's see
23:47:06
Fare
sjl: ASDF needs a new maintainer... but I don't know anyone paying for ASDF maintenance at the moment.
23:48:09
_death
aeth: (defun bool (x) (case x ((nil) nil) (t t))) seems to give slightly worse results
23:50:04
aeth
_death: I get identical results, as in 100% identical except "disassembly for BOOL" instead of "disassembly for FOO" and a different origin
23:55:56
jasom
(disassemble (lambda (x) (declare (optimize (speed 3)))(when x t))) is what you want, I think
23:57:00
mfiano
aeth, no regression: https://gist.github.com/mfiano/20b05bed9fe971de14085b89e13a9de6
23:58:46
aeth
definitely shorter. CMP MOV CMOVEQ MOV MOV CLC POP RET BREAK and 26 bytes with the disassemble lambda version
23:59:34
jasom
26 bytes for (disassemble (lambda (x) (declare (optimize (speed 3)))(if x t nil))) here
0:00:13
_death
35 bytes.. oh, I forgot that I also have (declaim (optimize (debug 3) (safety 3))) in .sbclrc