igemnace has quit [Remote host closed the connection]
<anthk_>
uhm, same issue with elisp =)
<bike>
elisp does also not have scheme's internal definition syntax, i believe, but this is not an elisp channel
<anthk_>
ok, I defined fact-iter first and then factorial, same error in sbcl
<bike>
the scheme syntax you are trying to use is an abbreviation for a letrec form. this abbreviation is not available in common lisp. you will have to use LABELS, which is like letrec.
<ixelp>
CLHS: Special Operator FLET, LABELS, MACROLET
<anthk_>
s,forks,works
younder has quit [Remote host closed the connection]
<anthk_>
ah, I fixed it
<bike>
defun in common lisp defines a common lisp function. when you called your factorial function, it defined a global fact-iter function you can now use.
<bike>
defines a global function*
<anthk_>
(fact-iter 1 1 x)
<anthk_>
I chose PAIP as an starting book, it might not be the best starting one, but I find it more inspiring
<bike>
it is very unusual and pretty bad style to have a function define another global function when you run it. you want a local function, which you can define with cl:labels.
<anthk_>
I will try to forget scheme-isms them
younder has joined #commonlisp
<bike>
well, like i said, you can define it in the scheme way, you just can't use scheme's particular abbreviated syntax
<anthk_>
otoh, the lem editor/repl it's fun to use, and I don't have to think on two lisps in parallel
green_ has quit [Ping timeout: 264 seconds]
<bike>
and PAIP should be fine. it's not really a tutorial, though. there's https://gigamonkeys.com/book/ available online if you want.
<ixelp>
Practical Common Lisp
AndreiDuma has quit [Ping timeout: 252 seconds]
<bjorkintosh>
anthk_ speaking spanish to a native portuguese speaker and insisting the listener ought to understand :-) scheme is not common lisp.
<bjorkintosh>
all appearances to the contrary.
<anthk_>
well, I'm from Spain and a Portuguese might have better luck with Spanish than applying Scheme into CL
<bjorkintosh>
hahah
<anthk_>
on sbcl/lem, I would like a function to search in the history, there was some Emacs keybinding but I can't remember it
<bjorkintosh>
anthk_, also #clschool exists. check it out.
<anthk_>
thanks
rogersm has joined #commonlisp
waleee has joined #commonlisp
Odin-FOO has quit [Quit: What's this button do?]
Inline has quit [Quit: Leaving]
Inline has joined #commonlisp
rogersm has quit [Quit: Leaving...]
green_ has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
a51 has quit [Quit: WeeChat 4.1.2]
kevingal_ has quit [Ping timeout: 268 seconds]
kevingal has quit [Ping timeout: 268 seconds]
green_ has quit [Remote host closed the connection]
green__ has joined #commonlisp
green__ has quit [Ping timeout: 264 seconds]
czy has quit [Remote host closed the connection]
czy has joined #commonlisp
kevingal has joined #commonlisp
kevingal_ has joined #commonlisp
NotThatRPG has joined #commonlisp
younder has quit [Remote host closed the connection]
younder has joined #commonlisp
josrr has quit [Remote host closed the connection]
rgherdt has quit [Read error: Connection reset by peer]
rgherdt has joined #commonlisp
villageidiot has quit [Quit: Client closed]
Pixel_Outlaw has quit [Quit: Leaving]
tyson2 has joined #commonlisp
puke has quit [Ping timeout: 264 seconds]
khrbtxyz has quit [Ping timeout: 264 seconds]
khrbtxyz has joined #commonlisp
a51 has joined #commonlisp
khrbtxyz has quit [Ping timeout: 256 seconds]
azimut has quit [Ping timeout: 240 seconds]
khrbtxyz has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
Kyuvi has quit [Quit: Client closed]
danza has joined #commonlisp
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
yitzi has joined #commonlisp
Inline has quit [Quit: Leaving]
Inline has joined #commonlisp
ronald has quit [Ping timeout: 245 seconds]
Jach has quit [Ping timeout: 255 seconds]
Jach has joined #commonlisp
ronald has joined #commonlisp
yitzi_ has joined #commonlisp
yitzi has quit [Ping timeout: 276 seconds]
ronald has quit [Ping timeout: 245 seconds]
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
ronald has joined #commonlisp
yitzi_ has quit [Remote host closed the connection]
energizer_ is now known as energizer
bubblegum has quit [Ping timeout: 252 seconds]
bubblegum has joined #commonlisp
bilegeek has joined #commonlisp
zxcvz has joined #commonlisp
ronald has quit [Ping timeout: 268 seconds]
poselyqualityles has joined #commonlisp
Kyuvi has joined #commonlisp
puke has joined #commonlisp
zxcvz has quit [Remote host closed the connection]
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
mgl_ has quit [Ping timeout: 264 seconds]
tyson2 has joined #commonlisp
shka has quit [Ping timeout: 264 seconds]
tyson2 has quit [Remote host closed the connection]
donleo has quit [Quit: Leaving]
ronald has joined #commonlisp
azimut has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Inline has quit [Ping timeout: 252 seconds]
mgl_ has joined #commonlisp
Inline has joined #commonlisp
random-jellyfish has joined #commonlisp
<olnw>
anthk_: The shortcut to search the listener history in Lem is M-r.
NicknameJohn has joined #commonlisp
contrapunctus has quit [Quit: Gateway shutdown]
pranavats has quit [Quit: Gateway shutdown]
azimut has quit [Ping timeout: 240 seconds]
metsomedog has quit [Remote host closed the connection]
<BrokenCog>
ugh. I don't understand what's happening ... I have (load "~/Projects/QuickLisp/setup.lisp") in the top of my lisp file, which is correct - if I manually eval that in the REPL, it loads as does "sbcl --load file.lisp" However "sbcl --script file.lisp" complains QL not installed.
kevingal_ has quit [Remote host closed the connection]
kevingal has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
<Lycurgus>
it's getting sbcl without a userinit modified to load ql
<Lycurgus>
normally done with the ql install
<Lycurgus>
ql isn built into sbcl
<BrokenCog>
it's installed. ~/.sbclrc loads it on start.
<aeth>
in practice, you want: sbcl --non-interactive --load
<aeth>
or, alternatively, at the top of your --script, add (load "~/.sbclrc")
<BrokenCog>
aeth: instead of --script? or inaddition?
<aeth>
instead of
<aeth>
because --script doesn't load the init file by default
<aeth>
but, you can also just load it at the top, too
<BrokenCog>
yeah, it's the loading it at top of file which isn't working.
<aeth>
--script is an alias for --no-sysinit --no-userinit --disable-debugger --end-toplevel-options
danza has quit [Quit: Leaving]
<waleee>
BrokenCog: aeth probably meant that you can also load your init file at the top of "file.lisp"
<BrokenCog>
ahhh. so, --script is really not what I want. Thanks for that.
<aeth>
doing "--non-interactive --load" is basically what you think "--script" should do, whereas "--script" doesn't load the init file that loads quicklisp
<BrokenCog>
gotcha
<aeth>
my guess is --script came first
<aeth>
seems to be common to have the older, worse option with the shorter, nicer name
<BrokenCog>
thinking "if they want to load it, they'll just start the REPL" ...
<BrokenCog>
indeed.
<aeth>
so #!/path/to/sbcl --non-interactive
<aeth>
or this: sbcl --non-interactive --load path/to/file.lisp
<BrokenCog>
non-interactive does'nt actually eval the file - at least I don't see anything processing.
<BrokenCog>
(without --load)
<BrokenCog>
I probably should instead add the shebang to the file.
<aeth>
the problem with the shebang-at-top-of-file is iirc you'd want to do #!/usr/bin/env sbcl, but then you can't pass --non-interactive
<aeth>
or something like that
<aeth>
you'd also have to chmod +x the entry point instead of assuming the user has an SBCL
khrbtxyz has quit [Ping timeout: 264 seconds]
<aeth>
depending on what you're doing, you can also build an all-in-one executable of your script and SBCL
<aeth>
or use a library that is portable across implementations
<aeth>
There are as many ways to run a script as there are JSON libraries (-:
<BrokenCog>
hmm, --non-interactive --load are not symetric.
<BrokenCog>
yeah. I don't need a binary, at least not yet ... so invoking the interpreter manually is fine.
khrbtxyz has joined #commonlisp
NotThatRPG has joined #commonlisp
johnjaye has quit [Ping timeout: 252 seconds]
johnjaye has joined #commonlisp
mgl_ has quit [Ping timeout: 252 seconds]
random-jellyfish has quit [Ping timeout: 255 seconds]
dino_tutter has quit [Ping timeout: 255 seconds]
attila_lendvai has quit [Ping timeout: 256 seconds]
amb007 has quit [Ping timeout: 264 seconds]
poselyqualityles has quit [Quit: Using Circe, the loveliest of all IRC clients]