Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #lisp
Xof has quit [Ping timeout: 260 seconds]
terpri has quit [Ping timeout: 264 seconds]
pierpal has joined #lisp
FreeBirdLjj has joined #lisp
slyrus2 has quit [Remote host closed the connection]
Pixel_Outlaw has joined #lisp
pfdietz has quit []
<_death>
ok.. closette has method functions taking 2 params (args and next-methods), code in post has them taking 3 ("inner-blobs"), and closer-mop expects them to take keyword args for gf and method
<Bike>
yeah, mop is kind of ambiguous on this point. keyword arguments is costanza's proposal (in "make-method-lambda considered harmful")
pierpal has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 240 seconds]
<Bike>
i have my own idea for it, but he's like the only person who actually writes make-method-lambda methods, sooooo
pierpa has joined #lisp
<_death>
hehe
foojin has quit [Quit: leaving]
fikka has joined #lisp
<_death>
but given that I remove the silly ,gf from the expansion, I can compile and load the beta method combination implementation and user code, and running it gives expected results
<Bike>
the... oh, because functions aren't dumpable
<_death>
jcowan: right.. it also explains the compilation-related issue.. doesn't talk about the particular keyword args used by closer-mop, but I guess they make sense as "default good-to-haves"
fikka has quit [Ping timeout: 256 seconds]
Kundry_Wag_ has quit [Remote host closed the connection]
eli_oat has joined #lisp
eli_oat has quit [Quit: Leaving.]
fikka has joined #lisp
markong has quit [Ping timeout: 260 seconds]
eli_oat has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
trocado has quit [Ping timeout: 250 seconds]
k-hos has quit [Read error: Connection reset by peer]
vap1 has joined #lisp
eli_oat has quit [Client Quit]
vaporatorius has quit [Ping timeout: 260 seconds]
jcowan_ has joined #lisp
d4ryus1 has joined #lisp
jcowan has quit [Ping timeout: 246 seconds]
d4ryus has quit [Ping timeout: 250 seconds]
kolb has quit [Read error: Connection reset by peer]
ioa has quit [Read error: Connection reset by peer]
ioa has joined #lisp
mrottenkolber has joined #lisp
damke_ has joined #lisp
fikka has joined #lisp
damke has quit [Ping timeout: 268 seconds]
fikka has quit [Ping timeout: 246 seconds]
shrdlu68 has joined #lisp
terpri has joined #lisp
FreeBirdLjj has joined #lisp
Arcaelyx_ has joined #lisp
EvW has joined #lisp
Arcaelyx has quit [Ping timeout: 246 seconds]
EvW has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
mrm_ is now known as mrm
mrm has quit [Changing host]
mrm has joined #lisp
eli_oat has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
Khisanth has quit [Ping timeout: 240 seconds]
Arcaelyx_ has quit [Read error: Connection reset by peer]
fikka has joined #lisp
Arcaelyx has joined #lisp
FreeBirdLjj has quit [Ping timeout: 250 seconds]
fikka has quit [Ping timeout: 255 seconds]
Kundry_Wag_ has joined #lisp
doanyway has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
Khisanth has joined #lisp
fikka has joined #lisp
warweasle has quit [Quit: Leaving]
Kundry_Wag_ has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 260 seconds]
milanj has joined #lisp
Kaisyu has joined #lisp
eli_oat has quit [Quit: Leaving.]
fikka has joined #lisp
iqubic has joined #lisp
EvW has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
sjl has joined #lisp
EvW has quit [Ping timeout: 246 seconds]
igemnace has joined #lisp
fikka has joined #lisp
sjl has quit [Ping timeout: 250 seconds]
jonh has quit [Quit: WeeChat 1.4]
orivej has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 255 seconds]
trn has quit [Ping timeout: 260 seconds]
shrdlu68 has quit [Ping timeout: 260 seconds]
shrdlu68 has joined #lisp
fikka has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
fikka has quit [Ping timeout: 246 seconds]
shka_ has joined #lisp
schoppenhauer has quit [Ping timeout: 250 seconds]
fikka has joined #lisp
schoppenhauer has joined #lisp
terpri has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 256 seconds]
mejja has quit [Quit: mejja]
Louge has joined #lisp
pierpa has quit [Quit: Page closed]
fikka has joined #lisp
fikka has quit [Ping timeout: 246 seconds]
simplegauss has quit [Ping timeout: 265 seconds]
trn has joined #lisp
pierpal has joined #lisp
<White_Flame>
What's the way best to permanently set a new readtable at compile time, for the reset of the project? Are changes to a readtable scoped under the current LOAD?
<White_Flame>
s/reset/rest/
<White_Flame>
trying to use fare-quasiquote (with named-readtables) to make simple list-based codewalkers see comma terms
simplegauss has joined #lisp
<Bike>
load does rebind *readtable*, but that doesn't matter for compile time obviously.
dddddd has quit [Remote host closed the connection]
<Bike>
compile-file rebinds them too, so there's your issue.
<White_Flame>
ok, that ended up being my suspicion
<White_Flame>
I'll have to inject that way high up the build script
<White_Flame>
right now the readtable change is nested inside a LOADed file
koisoke has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #lisp
koisoke has joined #lisp
<Bike>
i t hink asdf has like, around hooks, to use? dunno
<White_Flame>
I do have an (eval (read-from-string field-from-init-file)) that should serve the purpose
Bike has quit [Quit: Lost terminal]
pierpal has quit [Ping timeout: 250 seconds]
fikka has joined #lisp
<White_Flame>
our build stuff is many years old by now. I define a single init file, and can use it either interactively in SLIME to set up the environment, or to build an executable image. Are there other tools out there that are more common for such a purpose?
<White_Flame>
(still haven't replaced our simple-utils package with alexandria either, and those serve highly overlapping purposes)
Louge has quit [Quit: Louge]
Mutex7 has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 250 seconds]
pierpal has joined #lisp
Pixel_Outlaw has quit [Quit: Leaving]
pierpal has quit [Read error: Connection reset by peer]
emaczen` has quit [Remote host closed the connection]
jcowan has joined #lisp
sveit has quit [Ping timeout: 246 seconds]
jcowan_ has quit [Ping timeout: 246 seconds]
fikka has joined #lisp
nydel has quit [Ping timeout: 255 seconds]
nydel has joined #lisp
Khisanth has quit [Ping timeout: 260 seconds]
Khisanth has joined #lisp
dented42 has joined #lisp
sveit has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
asarch has quit [Read error: Connection reset by peer]
sveit has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
sveit has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
Khisanth has quit [Ping timeout: 255 seconds]
nolanv has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
terpri has joined #lisp
shrdlu68 has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
Khisanth has joined #lisp
krrrcks has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 240 seconds]
epony has quit [Read error: Connection reset by peer]
<jasom>
hmm, I'm testing a program and sbcl just exits without entering the debugger, printing only this: ; compilation unit aborted\n; caught 1 fatal ERROR condition
<jasom>
okay, I'm actually calling uiop:quit which explains the exiting without entering the debugger. Not sure where that compilation unit aborted is coming from though.
fikka has joined #lisp
epony has joined #lisp
k-hos has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
|3b|` has quit [Remote host closed the connection]
fikka has joined #lisp
Ukari has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 250 seconds]
sauvin has joined #lisp
Ukari has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
hazyPurple has joined #lisp
fikka has joined #lisp
simplegauss has quit [Ping timeout: 255 seconds]
jcrowgey1 has joined #lisp
simplegauss has joined #lisp
<jcrowgey1>
lets say i'm a long time vim user interested in lisp. i can apt-get install sbcl on debian and get to a repl
mflem has quit [Read error: Connection reset by peer]
<jasom>
jcrowgey1: 1) use emacs with evil-mode 2) try out slimv 3) use emacs just as your REPL.
<jcrowgey1>
but i've got no readline, no up arrow for history, nothing like thiat. i understand that this is where people link into emacs, but surely there's a way to get some basic features without having to learn emacs
mflem has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
<jasom>
jcrowgey1: you *can* rlwrap sbcl, but it sucks so much compared to an actual full-featured REPL.
<jcrowgey1>
jasom: thanks for the suggestions, i'll try them out!
<jasom>
jcrowgey1: somewhere around here I have my workflow I used to use when slimv was immature and evil-mode didn't exist. I'll see if I can find it.
* jasom
has used some form of VI for 25 years and vim for 20, so I get where you're coming from
* jasom
does not know why he capitalized vi there
doanyway has quit []
<jcrowgey1>
lol :)
fikka has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
quazimodo has joined #lisp
Hello_ has quit [Ping timeout: 260 seconds]
Kevslinger has quit [Quit: Connection closed for inactivity]
jcrowgey1 has quit [Ping timeout: 260 seconds]
sveit has quit [Ping timeout: 250 seconds]
fikka has joined #lisp
shrdlu68 has joined #lisp
aeth has quit [Ping timeout: 268 seconds]
sveit has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #lisp
sveit has quit [Ping timeout: 256 seconds]
Karl_Dscc has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DataLinkDroid has quit [*.net *.split]
pillton has quit [*.net *.split]
hdurer[m] has quit [*.net *.split]
spectrumgomas[m] has quit [*.net *.split]
wetha has quit [*.net *.split]
katco[m] has quit [*.net *.split]
kjeldahl has quit [*.net *.split]
khrbt has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
groovy2shoes has quit [Ping timeout: 265 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
groovy2shoes has joined #lisp
bexx has quit [Ping timeout: 240 seconds]
bexx has joined #lisp
sveit has joined #lisp
damke has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
vlatkoB has joined #lisp
khrbt has joined #lisp
damke_ has quit [Ping timeout: 268 seconds]
daniel-s has joined #lisp
nika has joined #lisp
fiddlerwoaroof_ has quit [Quit: Gone.]
fikka has joined #lisp
fiddlerwoaroof has joined #lisp
fiddlerwoaroof has quit [Remote host closed the connection]
fiddlerwoaroof has joined #lisp
sveit has quit [Ping timeout: 250 seconds]
khrbt has quit [Ping timeout: 260 seconds]
khrbt has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
pierpal has joined #lisp
fiddlerwoaroof has quit [Client Quit]
fiddlerwoaroof has joined #lisp
fiddlerwoaroof has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 248 seconds]
fiddlerwoaroof has joined #lisp
ldb has joined #lisp
sveit has joined #lisp
FreeBirdLjj has quit [Ping timeout: 256 seconds]
matijja has joined #lisp
iqubic` has joined #lisp
iqubic has quit [Ping timeout: 246 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
aeth has joined #lisp
sjl has joined #lisp
milanj has joined #lisp
fikka has joined #lisp
sjl has quit [Ping timeout: 250 seconds]
fikka has quit [Ping timeout: 264 seconds]
pierpal has quit [Read error: Connection reset by peer]
quazimodo has quit [Ping timeout: 264 seconds]
quazimodo has joined #lisp
energizer has joined #lisp
fikka has joined #lisp
Zhivago has joined #lisp
Zhivago has quit [Changing host]
Zhivago has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
mflem has quit [Read error: Connection reset by peer]
shka_ has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
wigust has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
<jdz>
jasom: it's like capitalizing LISP, to show your age.
fikka has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
mange has quit [Ping timeout: 250 seconds]
fraya has joined #lisp
<edgar-rft>
yeah, we are little kids at school I learning uppercase letters first
fikka has quit [Ping timeout: 250 seconds]
<akkad>
jdz: or to hide the fact that you're tone deaf from having used real lisp :P
shrdlu68 has quit [Quit: Reconnecting]
shrdlu68 has joined #lisp
<beach>
Good morning everyone!
fikka has joined #lisp
red-dot has joined #lisp
FreeBirdLjj has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
rumbler31 has joined #lisp
fikka has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
rumbler31 has quit [Ping timeout: 246 seconds]
milanj has joined #lisp
<shrdlu68>
Morning beach!
fikka has quit [Ping timeout: 240 seconds]
igemnace has quit [Quit: WeeChat 2.1]
angavrilov has joined #lisp
<p_l>
beach: 'morning
fikka has joined #lisp
pierpal has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
JuanDaugherty has joined #lisp
pierpal has quit [Ping timeout: 260 seconds]
deng_cn has joined #lisp
deng_cn has quit [Quit: deng_cn]
deng_cn has joined #lisp
deng_cn has quit [Remote host closed the connection]
deng_cn has joined #lisp
DataLinkDroid has joined #lisp
katco[m] has joined #lisp
kjeldahl has joined #lisp
wetha has joined #lisp
hdurer[m] has joined #lisp
spectrumgomas[m] has joined #lisp
pillton has joined #lisp
foojin has joined #lisp
<shka>
beach: good morning!
Xof has joined #lisp
hdurer[m] has quit [Ping timeout: 240 seconds]
spectrumgomas[m] has quit [Ping timeout: 240 seconds]
wetha has quit [Ping timeout: 240 seconds]
katco[m] has quit [Ping timeout: 240 seconds]
eatonphil has quit [Ping timeout: 250 seconds]
RichardPaulBck[m has quit [Ping timeout: 250 seconds]
plll[m] has quit [Ping timeout: 256 seconds]
drunk_foxx[m] has quit [Ping timeout: 256 seconds]
GNUPONUT[m] has quit [Ping timeout: 256 seconds]
dirb has quit [Ping timeout: 256 seconds]
kammd[m] has quit [Ping timeout: 256 seconds]
theemacsshibe[m] has quit [Ping timeout: 260 seconds]
manila[m] has quit [Ping timeout: 260 seconds]
thorondor[m] has quit [Ping timeout: 260 seconds]
CharlieBrown has quit [Ping timeout: 255 seconds]
harlequin78[m] has quit [Ping timeout: 255 seconds]
Guest21272 has quit [Ping timeout: 255 seconds]
equalunique[m] has quit [Ping timeout: 255 seconds]
Jach[m] has quit [Ping timeout: 240 seconds]
jach[m]1 has quit [Ping timeout: 240 seconds]
kumori[m] has quit [Ping timeout: 240 seconds]
hiq[m] has quit [Ping timeout: 240 seconds]
LdBeth has quit [Ping timeout: 240 seconds]
can3p[m] has quit [Ping timeout: 255 seconds]
ArthurAGleckler[ has quit [Ping timeout: 269 seconds]
blep-on-external has quit [Ping timeout: 269 seconds]
clog has quit [Ping timeout: 260 seconds]
sellout-1 has quit [Ping timeout: 260 seconds]
ioa has quit [Ping timeout: 240 seconds]
ioa has joined #lisp
lyosha[m] has quit [Ping timeout: 276 seconds]
z3r0d5y[m] has quit [Ping timeout: 276 seconds]
mhitchman[m] has quit [Ping timeout: 276 seconds]
sellout- has joined #lisp
nowhere_man has joined #lisp
Guest9989 has quit [Ping timeout: 250 seconds]
ravi has quit [Ping timeout: 255 seconds]
DataLinkDroid has quit [*.net *.split]
pillton has quit [*.net *.split]
kjeldahl has quit [*.net *.split]
Quetzal2 has joined #lisp
shrdlu68 has quit [Ping timeout: 256 seconds]
shrdlu68 has joined #lisp
pierpal has joined #lisp
DataLinkDroid has joined #lisp
kjeldahl has joined #lisp
pillton has joined #lisp
fikka has joined #lisp
<shka>
yo all
<shka>
what is the best way to visualize sb-sprof output?
<jackdaniel>
scymtym wrote a CLIM application for flamegraphs
makomo has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 256 seconds]
<shka>
jackdaniel: sounds quite awesome
<shka>
but it looks like it won't work with current sbcl
<jackdaniel>
not sure if it is available somewhere yet, but we plan to include it in clim-examples
<dlowe>
when I search "red herring ealfonso" I get pictures of fish. Probably not a conincidence, either.
<himmAllRight>
Does anyone know how I can write to the windows CMD in an allegro common lisp application, instead of to the debug consel?
wigust has quit [Ping timeout: 246 seconds]
Quetzal2 has quit [Read error: Connection reset by peer]
comborico1611 has quit [Quit: Konversation terminated!]
juki has joined #lisp
ravi has quit [Ping timeout: 264 seconds]
dented42 has joined #lisp
comborico1611 has joined #lisp
<Xach>
himmAllRight: in my experience franz support is very helpful with questions like that
<himmAllRight>
Xach: lol mine too (for the most part :P) Just though I'd ask in here first ;)
shka_ has quit [Ping timeout: 240 seconds]
<Xach>
himmAllRight: windows and allegro cl is a rare combination here
<himmAllRight>
yea.... L(
<himmAllRight>
:( *
milanj has joined #lisp
shrdlu68 has joined #lisp
shrdlu68 has quit [Client Quit]
cezary has joined #lisp
EvW has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dented42 has joined #lisp
Satou has quit [Quit: Cya soon guys!]
zxcvz has quit [Quit: zxcvz]
xaxaac has quit [Quit: Leaving]
damke has joined #lisp
Bike has quit [Ping timeout: 260 seconds]
damke_ has quit [Ping timeout: 268 seconds]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
angavrilov has quit [Remote host closed the connection]
dawnfant` has joined #lisp
dawnfant` has quit [Remote host closed the connection]
rumbler31 has joined #lisp
rumbler31 has quit [Client Quit]
|3b| has joined #lisp
cezary has quit [Remote host closed the connection]
pierpa has joined #lisp
dented42 has joined #lisp
shiho has quit [Quit: Page closed]
vap1 has quit [Remote host closed the connection]
papachan has quit [Quit: WeeChat 2.1]
vlatkoB has quit [Remote host closed the connection]
sunshavi has quit [Ping timeout: 256 seconds]
jmercouris has quit [Ping timeout: 255 seconds]
chewzerita has joined #lisp
zmt00 has quit [Quit: Leaving]
zmt00 has joined #lisp
fromthebest has quit [Remote host closed the connection]
<chewzerita>
@(+ 1 1)
<chewzerita>
nope, ok
Bike has joined #lisp
Hello_ has joined #lisp
dasdas has joined #lisp
<dasdas>
hi
python476 has joined #lisp
rumbler31 has joined #lisp
clintm has joined #lisp
Kundry_Wag has quit [Ping timeout: 268 seconds]
eli_oat has joined #lisp
wxie has joined #lisp
rumbler31 has quit [Ping timeout: 248 seconds]
Kundry_Wag has joined #lisp
dasdas has quit [Quit: Page closed]
jcowan has quit [Ping timeout: 268 seconds]
juki has left #lisp ["ERC (IRC client for Emacs 25.2.2)"]
damke_ has joined #lisp
<cgay>
hi
damke has quit [Ping timeout: 268 seconds]
clintm has quit [Remote host closed the connection]
foojin has quit [Ping timeout: 268 seconds]
foojin has joined #lisp
Josh_2 has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
eli_oat has quit [Quit: Leaving.]
jcowan has joined #lisp
wxie has quit [Quit: Bye.]
sjl has quit [Ping timeout: 240 seconds]
sunshavi has joined #lisp
jcowan_ has joined #lisp
jcowan__ has joined #lisp
jcowan has quit [Ping timeout: 250 seconds]
jcowan_ has quit [Ping timeout: 268 seconds]
jcowan__ has quit [Ping timeout: 248 seconds]
smurfrobot has joined #lisp
potatonomicon has joined #lisp
minion has quit [Remote host closed the connection]
Kaisyu7 has quit [Remote host closed the connection]
Kaisyu7 has joined #lisp
DGASAU has quit [Remote host closed the connection]
DGASAU` has joined #lisp
pierpal has quit [Ping timeout: 240 seconds]
trn has quit [Quit: quit]
markong has quit [Remote host closed the connection]
trn has joined #lisp
Aritheanie has quit [Quit: No Ping reply in 180 seconds.]
minion has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
markong has joined #lisp
k-hos has quit [Ping timeout: 260 seconds]
innovati_ has joined #lisp
minion has quit [Disconnected by services]
minion has joined #lisp
comborico1611_ has joined #lisp
[df]_ has joined #lisp
drastik has quit [Ping timeout: 260 seconds]
Aritheanie has joined #lisp
comborico1611 has quit [Remote host closed the connection]
[df] has quit [Ping timeout: 240 seconds]
drastik_ has joined #lisp
innovati has quit [Ping timeout: 260 seconds]
runejuhl has quit [Ping timeout: 260 seconds]
foojin has quit [Ping timeout: 260 seconds]
foojin has joined #lisp
malcom2073 has joined #lisp
runejuhl1 has joined #lisp
asarch has quit [Quit: Leaving]
innovati_ is now known as innovati
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
smurfrobot has quit [Ping timeout: 260 seconds]
fraktor has joined #lisp
<fraktor>
I'm trying to learn lisp, and one of the hardest things is writing idiomatically. I can write things that work and that compile, but they don't really "feel" like lisp. If I post some small code in a paste, will someone be willing to help me make it more lispy?
ryanbw has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 260 seconds]
<_death>
go ahead
Kaisyu has joined #lisp
<makomo>
fraktor: i guess that's one of the hardest things when learning a new language (both a human one and a computer one) :-)
<aeth>
Idiomatic Lisp prefers tiny helper functions with descriptive names and expressions returning values instead of setting values where possible.
jcowan__ has joined #lisp
jcowan__ is now known as jcowan
<aeth>
So e.g. setting some value as the result of some conditional? See if you can instead have that conditional return values.
<aeth>
And extra bonus points if you can then spin tha conditional off into its own function, whose return value(s) (use multiple-value-bind if necessary) set the thing you want to set.
LiamH has quit [Quit: Leaving.]
<aeth>
So for a trivial, useless example: Instead of (if (zerop x) (setf y 42) (setf y 1)) do (setf y (if (zerop x) 42 1)) or, even better: (let ((y (if (zerop x) 42 1))) ...)
<MichaelRaskin>
Then notice you don't need a setf because let would serve you just as well
<aeth>
You usually have finer control over the scope of variables in Lisp because you're mostly working with return values feeding into let or multiple-value-bind instead of setting variables.
<aeth>
This is just an example. In general, the goal is expression-oriented programming.
<aeth>
Nearly everything returns something in the standard. Nearly everything you write should return something. Take advantage of that.
<MichaelRaskin>
And note the «nearly»
<MichaelRaskin>
If you hit something that is definitely clearer if expressed via imperative assignments, you go ahead and use imperative assignments. This happens rarely, but it does happen, and Lisp is multi-paradigm: you write each piece of code in the style that best suits it.
EvW has quit [Ping timeout: 255 seconds]
<aeth>
One example is a game loop. You're going to be updating state. You're probably going to be updating state through lots of helper functions to keep things tidy. These functions will be mutating things each step of the loop, and probably won't have any useful return value, since you're just calling them for their side effects.
<aeth>
You really have to have an ultra-imperative domain for these things to show up, though. And you're still going to be using lots of return values, just not in the game loop function.
<aeth>
I guess they'll probably always show up as when you are mutating some data structure passed in to the function.
<MichaelRaskin>
aeth: most complicated algorithms are easier to implement with mutation, though. Even some persistent data structures (immutable for the world) are better than corresponding purely functional (immutable-throughout) data structures.
<MichaelRaskin>
Of course, there are many programs that can find all the necessary algorithms in libraries.
<aeth>
What I find that works is "mostly functional" style of pure functions feeding into mutable data structures. e.g. (setf (aref foo 42) (1+ x))
fraktor has quit [Ping timeout: 260 seconds]
<aeth>
1+ is easy to reason about, small, trivial, inline.
<aeth>
There are plenty of opportunities for your own 1+es
<aeth>
Even if your domain is very mutable
fikka has joined #lisp
EvW1 has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
ealfonso has quit [Ping timeout: 246 seconds]
python476 has quit [Ping timeout: 250 seconds]
fikka has joined #lisp
Beepy has joined #lisp
<pierpa>
you have scared them away :)
quazimodo has joined #lisp
<Beepy>
How do I compile a form only if a certain safety or optimization level is set?
<pierpa>
you can't do this in portable CL, so check your implementation docs
<Beepy>
Okay
<pierpa>
(or, if non portble code is ok for you, then say which implementation you are interested in)
<Beepy>
sbcl
smurfrobot has joined #lisp
<pierpa>
then someone will know surely. Not me though.
smurfrobot has quit [Remote host closed the connection]
<Bike>
i'm not sure what you mean, but you can examine the optimization levels with sb-cltl2