jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language<http://cliki.net/> logs:<https://irclog.whitequark.org/lisp,http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.5, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
Kundry_Wag has quit [Ping timeout: 244 seconds]
longshi has joined #lisp
rumbler31 has joined #lisp
Kundry_Wag has joined #lisp
longshi has quit [Ping timeout: 245 seconds]
rumbler31 has quit [Ping timeout: 244 seconds]
Kundry_Wag has quit [Ping timeout: 252 seconds]
Kundry_Wag has joined #lisp
pjb has quit [Ping timeout: 252 seconds]
shifty has joined #lisp
Kundry_Wag has quit [Ping timeout: 252 seconds]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lavaflow has joined #lisp
hitchhikingcoder has joined #lisp
cl-arthur has quit [Quit: Lost terminal]
Kundry_Wag has joined #lisp
hitchhikingcoder has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 252 seconds]
Roy_Fokker has quit [Read error: Connection reset by peer]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 244 seconds]
dented42 has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 245 seconds]
asarch has joined #lisp
orivej has quit [Ping timeout: 244 seconds]
marvin2 has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 252 seconds]
Kundry_Wag has joined #lisp
mindCrime has joined #lisp
Kundry_Wag has quit [Ping timeout: 244 seconds]
Kundry_Wag has joined #lisp
holycow has joined #lisp
Kundry_Wag has quit [Read error: Connection reset by peer]
<holycow> huh
<holycow> i presume everyone knows about this: https://3lproject.org/
<holycow> first time i have heard about this
Balooga_ has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
<aeth> a subset of Scheme
<aeth> as if Scheme itself isn't tiny enough
<holycow> huh, this was a kickstarter. never heard of that either.
rpg has joined #lisp
actuallybatman has joined #lisp
<holycow> interesting: https://3lproject.org/status
Balooga_ has quit [Quit: Balooga_]
meepdeew has quit []
oxo1o1o1o has joined #lisp
<aeth> It doesn't surprise me that it's slow.
Kundry_Wag has joined #lisp
equwal has joined #lisp
robotoad has quit [Quit: robotoad]
Kundry_Wag has quit [Ping timeout: 272 seconds]
Kundry_Wag has joined #lisp
lavaflow has quit [Ping timeout: 272 seconds]
Kundry_Wag has quit [Ping timeout: 252 seconds]
Balooga_ has joined #lisp
lavaflow has joined #lisp
esrse has joined #lisp
Kundry_Wag has joined #lisp
<no-defun-allowed> did they even release sources?
<no-defun-allowed> all i saw was one video
Balooga_ has quit [Quit: Balooga_]
asarch has quit [Ping timeout: 245 seconds]
lavaflow has quit [Ping timeout: 240 seconds]
Kundry_Wag has quit [Ping timeout: 245 seconds]
pjb has joined #lisp
lavaflow has joined #lisp
robotoad has joined #lisp
stacksmith has joined #lisp
mindCrime has quit [Ping timeout: 240 seconds]
<stacksmith> Good morning
equwal has quit [Remote host closed the connection]
holycow has quit [Quit: Lost terminal]
Balooga_ has joined #lisp
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nckx has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
dddddd has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 272 seconds]
Kundry_Wag has joined #lisp
housel has quit [Read error: Connection reset by peer]
xrash has quit [Read error: Connection reset by peer]
Kundry_Wag has quit [Ping timeout: 244 seconds]
asarch has joined #lisp
pjb has quit [Ping timeout: 252 seconds]
acolarh has quit [Ping timeout: 245 seconds]
Kundry_Wag has joined #lisp
nckx has joined #lisp
oxo1o1o1o has quit [Remote host closed the connection]
oxo1o1o1o has joined #lisp
Kundry_Wag has quit [Ping timeout: 252 seconds]
rpg has joined #lisp
acolarh has joined #lisp
rumbler31 has joined #lisp
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rtypo has quit [Ping timeout: 264 seconds]
Pixel_Outlaw has quit [Quit: Leaving]
rumbler31 has quit [Ping timeout: 244 seconds]
pjb has joined #lisp
<LdBeth> morning
<LdBeth> I think there are tones of Schemes
<Balooga_> US ton or metric ton?
Kundry_Wag has joined #lisp
<Bike> a refrigeration ton. long story
Kundry_Wag has quit [Ping timeout: 240 seconds]
lavaflow has quit [Ping timeout: 272 seconds]
jack_rabbit has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
pjb has quit [Ping timeout: 252 seconds]
atgreen_ has quit [Ping timeout: 244 seconds]
atgreen__ has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
pyx has joined #lisp
pyx has quit [Client Quit]
pierpal has quit [Ping timeout: 272 seconds]
pierpal has joined #lisp
atgreen__ has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
earl-ducaine has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
Kundry_Wag has quit [Ping timeout: 252 seconds]
pierpal has joined #lisp
makomo has quit [Ping timeout: 252 seconds]
esrse has quit [Ping timeout: 252 seconds]
pierpal has quit [Read error: Connection reset by peer]
Balooga_ has quit [Quit: Balooga_]
Kundry_Wag has joined #lisp
esrse has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Bike has quit [Quit: Lost terminal]
Kundry_Wag has quit [Ping timeout: 240 seconds]
varjag has joined #lisp
neopantsu has joined #lisp
SaganMan has quit [Ping timeout: 240 seconds]
anewuser has quit [Read error: Connection reset by peer]
optikalmouse has joined #lisp
varjag has quit [Ping timeout: 245 seconds]
anewuser has joined #lisp
zagura has quit [Ping timeout: 240 seconds]
lavaflow has joined #lisp
rumbler31 has joined #lisp
SaganMan has joined #lisp
lavaflow has quit [Ping timeout: 252 seconds]
Kundry_Wag has joined #lisp
housel has joined #lisp
optikalmouse has quit [Ping timeout: 245 seconds]
Balooga_ has joined #lisp
Kundry_Wag has quit [Ping timeout: 272 seconds]
nirved has quit [Ping timeout: 240 seconds]
pierpal has joined #lisp
dented42 has joined #lisp
nirved has joined #lisp
jack_rabbit has quit [Ping timeout: 252 seconds]
optikalmouse has joined #lisp
frgo has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
pierpal has quit [Ping timeout: 244 seconds]
Kundry_Wag has quit [Read error: Connection reset by peer]
figurehe4d has joined #lisp
rumbler31 has quit [Remote host closed the connection]
pierpal has joined #lisp
neopantsu has quit [Remote host closed the connection]
optikalmouse has quit [Quit: Leaving]
pierpal has quit [Read error: Connection reset by peer]
optikalmouse has joined #lisp
jack_rabbit has joined #lisp
Inline has quit [Quit: Leaving]
reverse_light has quit [Remote host closed the connection]
<beach> Good morning everyone!
<Balooga_> Morning beach
daniel-s has quit [Remote host closed the connection]
vlatkoB has joined #lisp
<no-defun-allowed> morning beach
varjag has joined #lisp
frodef has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
varjag has quit [Ping timeout: 240 seconds]
Kundry_Wag has quit [Ping timeout: 252 seconds]
oxo1o1o1o has quit [Ping timeout: 272 seconds]
impulse has quit [Remote host closed the connection]
orivej has joined #lisp
shifty has quit [Ping timeout: 246 seconds]
Balooga_ is now known as Balooga[away]
<russellw> morning!
Tordek has quit [Ping timeout: 272 seconds]
<beach> Hello russellw.
<russellw> When writing a Common Lisp program, are you supposed to put your main program code at top level, or in a 'main' function? From my experiments thus far, putting the main program code at top level seems to work when running interpreted but not compiled
Tordek has joined #lisp
<beach> russellw: What implementation are you using?
<Shinmera> typically you write you software as a library plus a singular entry function that you may call main or whatever else.
<russellw> SBCL and CCL
<beach> russellw: Then it is probably never interpreted.
<russellw> beach, okay, rather than get into terminology questions, let's pretend I didn't say that part; would you agree with Shinmera that main code should go into a function rather than top-level?
<jackdaniel> having entry point has benefits: you may provide top-level error handler, unwind-protect, load necessary assets which are not part of the image etc
<aeth> russellw: If I was writing it like a script, I'd do it Python-style and have a main function and then a call to main underneath it, like (defun main () ...) (main)
<Shinmera> typically during development you'll want to call functions at your leisure and only reserve a main for when it's run standalone
<russellw> aeth, I have tried doing that, but then when I compile the program with SBCL on Windows, the compiled program does nothing; (main) being top level code, is simply disregarded. It is possible to supply the (main) call on the compiler command line. Would this be considered a normal way to do it?
<Shinmera> Having things at the top level removes the ability to choose whether you want to run the standalone startup
<aeth> russellw: You have to make it a script, you can't just use it as a file
<russellw> Shinmera, this is also a good point. So when compiling the standalone program, supplying the main call on the compiler command line, is that the recommended way to do it?
<aeth> e.g. in Linux you add a "#!/bin/sbcl --script" to the top line (without quotes) and make the file executable
<aeth> (for SBCL, obviously)
<russellw> aeth, different scenario – I'm on Windows, trying to compile a version that can work without SBCL installed
<Shinmera> russellw: if you generate a binary for deployment it'll ask you for an entry point anyway
<no-defun-allowed> `(save-lisp-and-die ... :toplevel #'foo)`
<aeth> russellw: Then you don't need "(main)" in your source file
Kundry_Wag has joined #lisp
<russellw> Okay so the consensus seems to be that the source file should *not* contain (main). The source file should contain (defun main ...) and then the instructions to call (main) as the entry point, should be given to the compiler when compiling the standalone program. Would that be a correct summary?
<Shinmera> yes
<russellw> cool, thanks
<Shinmera> also see libraries like Deploy to help with, well, deployment
pierpal has joined #lisp
shrdlu68 has joined #lisp
Kundry_Wag has quit [Ping timeout: 245 seconds]
Kundry_Wag has joined #lisp
frgo has joined #lisp
<russellw> How do you get SBCL to do something once the program loads? sbcl --script main.lisp --eval "(main)" doesn't do anything, but then, nor does sbcl --script main.lisp --eval "(print 123456)"
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Shinmera> don't use --script, it ends the options that interpret --eval
pierpal has quit [Ping timeout: 264 seconds]
<jackdaniel> russellw: try sbcl --load main.lisp --eval "(main)"
<Shinmera> --sript is just a shorthand anyway, read the manpage
trittweiler has joined #lisp
<russellw> ah! thanks
khisanth_ has quit [Ping timeout: 245 seconds]
Kundry_Wag has quit [Ping timeout: 264 seconds]
pierpal has joined #lisp
dented42 has joined #lisp
milanj has joined #lisp
orivej has quit [Ping timeout: 244 seconds]
Balooga[away] has quit [Quit: Balooga[away]]
trittweiler has quit [Ping timeout: 272 seconds]
lagagain has quit [Quit: Connection closed for inactivity]
NB0X-Matt-CA has quit [Excess Flood]
NB0X-Matt-CA has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
asarch has quit [Quit: Leaving]
pjb has joined #lisp
figurehe4d has quit [Ping timeout: 250 seconds]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
khisanth_ has joined #lisp
pierpal has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
frgo has quit []
mange has quit [Ping timeout: 272 seconds]
frgo has joined #lisp
makomo has joined #lisp
<shrdlu68> I get a style-warning for (make-array n :element-type '(simple-array short-float 2))
varjag has joined #lisp
<shrdlu68> But then I also get a warning when I set :initial-element to (make-array 2 :element-type 'short-float :initial-element 0.0))
Tordek has quit [Ping timeout: 272 seconds]
<Shinmera> read-default-float-format is single-float, not short-float
<Shinmera> though a lot of implementations conflate the two
zooey has quit [Ping timeout: 256 seconds]
<aeth> You want 0s0 or 0.0s0 for short float (f is single-float, d is double-float, and l is long-float... long-float is often the same as double-float and short-float is often the same as single-float)
zooey has joined #lisp
<aeth> (and e is the *read-default-float-format*)
Tordek has joined #lisp
esrse has quit [Ping timeout: 246 seconds]
<Shinmera> also, an array of arrays is extremely likely just gonna be an array of T
esrse has joined #lisp
Kundry_Wag has joined #lisp
orivej has joined #lisp
<aeth> You can do (upgraded-array-element-type 'foo) to see if it will become. Only character and bit are guaranteed (unless base-char also is?), but (unsigned-byte 8) is in essentially every useful implementation.
<aeth> Nearly every one will have multiples of 8 in signed and unsigned, possibly up to 64 (even though that's probably larger than the fixnum size in 64-bit implementations) as well as fixnum. Most will have single-float and double-float. If short-float and long-float are part of the implementation, they're probably there, too.
<aeth> (By multiples of 8 I mean signed/unsigned byte multiples of 8)
<aeth> s/see if it will become/see what it will become/
Kundry_Wag has quit [Ping timeout: 252 seconds]
<aeth> Other integer sizes often exist. It will round up to the nearest one. e.g. (integer 0 5000000) becomes (unsigned-byte 32) everywhere I tested except SBCL, where it becomes (unsigned-byte 31)
<aeth> Oh, and which multiples of 8 depends on the implementation, but probably 8, 16, 32, 64 (if it's a 64-bit implementation)
pjb has quit [Ping timeout: 252 seconds]
gpiero has joined #lisp
<aeth> The tl;dr pattern here is that it's (in practice) basically all numbers, with the exception of characters (character arrays are strings)
anewuser has quit [Quit: anewuser]
frodef has quit [Remote host closed the connection]
scymtym has quit [Ping timeout: 240 seconds]
frodef has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Read error: Connection reset by peer]
ogamita has joined #lisp
makomo_ has joined #lisp
schweers has joined #lisp
ogamita has quit [Client Quit]
makomo has quit [Ping timeout: 252 seconds]
optikalmouse has quit [Quit: Leaving]
makomo_ is now known as makomo
nowhere_man has joined #lisp
<shrdlu68> Is it accurate to say that pgloader is the most widely used CL program?
<Shinmera> The most widely used CL program is probably sbcl
<shrdlu68> Well, apart from implementations.
<jackdaniel> shrdlu68: what makes you say that? (I mean - do you have any statistics?)
<aeth> It's possible that e.g. stumpwm has more users.
<aeth> (I use stumpwm.)
<aeth> Then there's stuff that's indirect. e.g. https://en.wikipedia.org/wiki/Maxima_(software) is apparently a part of Sage, which is incredibly popular.
<shrdlu68> jackdaniel: I've heard it mentioned in non-CL contexts.
<shka_> eh, i need to checkout next browser
<shka_> maybe it is better already ;]
Kundry_Wag has joined #lisp
<jackdaniel> shrdlu68: I think it is fair to say, that it is one of few applications written in CL which aim to be applications which are used without any knowledge about Lisp whatsoever
<Shinmera> what about websites powered by CL
<jackdaniel> so saying that pgloader is the most widely used program written in CL which targets audience outside the Lisp community could be accurate
<Shinmera> I'm quite sure google flights has more users than pgloader
Jesin has quit [Ping timeout: 240 seconds]
<Shinmera> grammarly maybe too
<jackdaniel> Shinmera: I suspect that the sole user of this CL code are google servers, users run javascript
<aeth> jackdaniel: on the other hand, my .stumpwmrc is 6 lines, so even though it claims to be the Emacs of window managers, it falls short of that goal because I don't have to extensively configure it in Lisp to make it usable.
<Shinmera> that's not a fair assessment of users of a software
<jackdaniel> but sure, that's debatable what counts as an application given a definition I've proposed
Jesin has joined #lisp
Kundry_Wag has quit [Ping timeout: 245 seconds]
<aeth> Shinmera: I almost mentioned Google Flights, but I don't think it counted in shrdlu68's definition.
<Shinmera> I don't know what the point of the question is anyway, so I don't know about that
<jackdaniel> shrdlu68: do you mean by application a tool used on non-lisper desktop system?
<shrdlu68> jackdaniel: Or server, really. So software like hbase, elastic-search would count too.
<shrdlu68> I wonder how many apt-get-installable CL programs there are...
<shrdlu68> Shinmera: I was just taking a look at the issue on the pgloader repo, and it occured to me that it might be the most widely used CL program.
<no-defun-allowed> not CL but GIMP and Audacity both use Lisp
<shrdlu68> s/issue/issues/
<Shinmera> no-defun-allowed: UIM too
<Shinmera> There's also OpusModus, but I have no idea about the size of their userbase
<aeth> You're probably not going to get too far with popularity in desktop software without graphics. If I had to guess what has the most potential there (especially if you ad "outside of the Lisp community" as a qualification) it would be a game. There are probably at least 6 game engine projects right now.
<aeth> s/ad/add/
<shrdlu68> OpusModus looks very sophisticated.
<Shinmera> A CCL success story :)
<no-defun-allowed> what persistent object storage should i use? elephant's not on quicklisp but it seems exactly what i want
<no-defun-allowed> postmodern can make clos instances transparently which is also a good point
Kundry_Wag has joined #lisp
<shrdlu68> "Opusmodus is currently the most advanced software for computer-assisted composition available."
mkolenda has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
mkolenda has joined #lisp
scymtym has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
<aeth> shrdlu68: pgloader might have the most issues reported for a CL program that's not an implementation.
<aeth> it has hundreds more than ECL!
<no-defun-allowed> pgloader issue #12345: "node port when pls i dont know lisp but i want to help"
orivej has quit [Ping timeout: 252 seconds]
_bryan has joined #lisp
<Shinmera> Me writing a ticket to Microsoft: when r u goin to rewrite windows in lisp i wanna help
<aeth> L#
<shka_> winlispos
<shka_> lindows?
<Shinmera> lindows was a linux windows thing that got sued for the name, if I remember correctly
<no-defun-allowed> singularity but lisp when?
<Shinmera> anyway, I wouldn't be surprised if Lisp is used internally somewhere in quite a few companies
<no-defun-allowed> greenspun's tenth law?
<Shinmera> So usage or popularity of lisp software is hard to assess
flamebeard has joined #lisp
<no-defun-allowed> is it morally ethical to gently tap php users with textbooks?
<aeth> I can assess Lisp's popularity. It's very popular. My experience might be skewed, but most of my experience is with my Lisp projects.
milanj has quit [Quit: This computer has gone to sleep]
<no-defun-allowed> lisp is only used by one person in this house and there is only one programmer
<no-defun-allowed> conclusion: lisp is the most popular programming language
<no-defun-allowed> (additionally, by anime edits scheme is most popular :)
marvin3 has joined #lisp
marvin2 has quit [Ping timeout: 244 seconds]
orivej has joined #lisp
Kundry_Wag has joined #lisp
<no-defun-allowed> if lisp can abstract all the pain from maintaining databases there's possibilities for another 25 lispers at school
<no-defun-allowed> doing sql (or excel but fuck that) is a course this year in computing
<aeth> make sure to use CL in every class where you can choose a language
<no-defun-allowed> who says i don't?
<no-defun-allowed> [here was my holiday assignment](https://pastebin.com/qTh66f5Q)
<no-defun-allowed> using tk i had to make some stupid shit
trittweiler has joined #lisp
Kundry_Wag has quit [Ping timeout: 264 seconds]
<no-defun-allowed> aeth: the tasks aren't interesting enough for CL to shine in my opinion
pjb has joined #lisp
shifty has joined #lisp
Kundry_Wag has joined #lisp
<jackdaniel> aeth: ECL is officially bugfree™ since version 16.1.2
<jackdaniel> no wonder there are no issues with it ;-)
<shrdlu68> Heh.
<v0|d> jackdaniel: mm, news about profiler?
<jackdaniel> v0|d: what kind of news?
<v0|d> any updates?
<jackdaniel> did I make some obligation I don't remember?
<v0|d> I request a fix for the current one, you said you are working on a new one.
<jackdaniel> I'm not working on integrating ecl with perf if that's what you ask about
<v0|d> ah, its a sep. repo?
<jackdaniel> metering? yes, and it is on quicklisp too
<v0|d> clld perf?
<jackdaniel> https://gitlab.common-lisp.net/dkochmanski/metering this is a profiler written in CL
<v0|d> see, OK.
<jackdaniel> as of perf, it is a standard linux tool for profiling
Kundry_Wag has quit [Ping timeout: 240 seconds]
SaganMan has quit [Ping timeout: 246 seconds]
Essadon has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 272 seconds]
pierpal has joined #lisp
Kundry_Wag has joined #lisp
dddddd has joined #lisp
pjb has quit [Ping timeout: 264 seconds]
Kundry_Wag has quit [Ping timeout: 252 seconds]
pierpal has quit [Ping timeout: 272 seconds]
orivej has quit [Ping timeout: 240 seconds]
trittweiler has quit [Ping timeout: 245 seconds]
m00natic has joined #lisp
orivej has joined #lisp
atgreen__ has joined #lisp
Kundry_Wag has joined #lisp
milanj has joined #lisp
Kaisyu has quit [Quit: Connection closed for inactivity]
Kundry_Wag has quit [Ping timeout: 250 seconds]
esrse has quit [Ping timeout: 252 seconds]
nowhere_man has quit [Ping timeout: 246 seconds]
esrse has joined #lisp
lavaflow has joined #lisp
lavaflow has quit [Ping timeout: 245 seconds]
esrse has quit [Ping timeout: 245 seconds]
ebzzry has quit [Read error: Connection reset by peer]
cl-arthur has joined #lisp
Kundry_Wag has joined #lisp
frgo has quit [Read error: Connection reset by peer]
frgo_ has joined #lisp
Kundry_Wag has quit [Ping timeout: 245 seconds]
kooga has joined #lisp
SaganMan has joined #lisp
vaporatorius has quit [Ping timeout: 246 seconds]
orivej has quit [Ping timeout: 250 seconds]
igemnace has quit [Quit: WeeChat 2.2]
longshi has joined #lisp
cl-arthur has quit [Ping timeout: 246 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 252 seconds]
SaganMan has quit [Ping timeout: 272 seconds]
Kundry_Wag has joined #lisp
lavaflow has joined #lisp
Kundry_Wag has quit [Ping timeout: 272 seconds]
SaganMan has joined #lisp
pjb has joined #lisp
cl-arthur has joined #lisp
frgo_ has quit [Remote host closed the connection]
frgo has joined #lisp
frgo has quit [Ping timeout: 240 seconds]
<oni-on-ion> how come more CL projects are not on gitlab.common-lisp.net ?
<Shinmera> github is more convenient
<no-defun-allowed> All my friends use GitLab dot com
nowhere_man has joined #lisp
SenasOzys has quit [Ping timeout: 244 seconds]
<oni-on-ion> i currently use notabug
Kundry_Wag has joined #lisp
<_death> gitlab requires javascript to view static text.. github getting worse day by day.. recently I noticed that followers and then repos are no longer ordered by date of last update.. I expect they'll continue to gimp it down.. so everything is basically terrible
orivej has joined #lisp
<oni-on-ion> aha! i can use M-x eww for github views, even syntax color it; MS is going to try to "do a facebook" with it.
<oni-on-ion> that is how i see it. MS always copying stuff and github purchase was perfect to buddy on a social platform. cant wait for windows only featurez
Kundry_Wag has quit [Ping timeout: 252 seconds]
Kundry_Wag has joined #lisp
Lycurgus has joined #lisp
frgo has joined #lisp
Kundry_Wag has quit [Ping timeout: 272 seconds]
Cymew has joined #lisp
frgo has quit [Ping timeout: 244 seconds]
longshi has quit [Ping timeout: 240 seconds]
dddddd has quit [Ping timeout: 250 seconds]
trittweiler has joined #lisp
warweasle has joined #lisp
pjb has quit [Ping timeout: 252 seconds]
Kundry_Wag has joined #lisp
cage_ has joined #lisp
Kundry_Wag has quit [Ping timeout: 252 seconds]
dddddd has joined #lisp
frgo has joined #lisp
Kundry_Wag has joined #lisp
pierpal has joined #lisp
<russellw> The standard library function sublis, takes an expression and performs variable substitutions from an alist. I need to write a variant version that performs iterated substitution for an alist returned by unification that e.g. maps x->y->z. The code is easy to write, but what would be an idiomatic name for the new version? sublisr for the recursive version? sublis* for an extended version?
nowhere_man has quit [Ping timeout: 272 seconds]
frgo has quit [Ping timeout: 252 seconds]
Kundry_Wag has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
<_death> usual name is subst-bindings.. I guess you could call it deep-sublis
<russellw> it already has a name? great, thanks!
lavaflow has quit [Ping timeout: 240 seconds]
stux|RC has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 252 seconds]
pierpal has quit [Ping timeout: 250 seconds]
frgo has joined #lisp
Bike has joined #lisp
frgo has quit [Ping timeout: 252 seconds]
Kundry_Wag has joined #lisp
rumbler31 has joined #lisp
Kundry_Wag has quit [Ping timeout: 252 seconds]
FreeBirdLjj has joined #lisp
frgo has joined #lisp
SenasOzys has joined #lisp
FreeBirdLjj has quit [Ping timeout: 244 seconds]
frgo has quit [Ping timeout: 246 seconds]
Lycurgus has quit [Quit: Exeunt]
orivej has joined #lisp
mindCrime has joined #lisp
frgo has joined #lisp
frgo has quit [Ping timeout: 240 seconds]
nowhere_man has joined #lisp
Kundry_Wag has joined #lisp
<pfdietz> "Other integer sizes often exist. It will round up to the nearest one. e.g. (integer 0 5000000) becomes (unsigned-byte 32) everywhere I tested except SBCL, where it becomes (unsigned-byte 31)"
Kundry_Wag has quit [Remote host closed the connection]
<pfdietz> aeth: that's because SBCL takes spec compliance seriously.
<pfdietz> clhs upgraded-array-element-type
<pfdietz> clhs 15.1.2.1
nowhere_man has quit [Ping timeout: 240 seconds]
longshi has joined #lisp
frgo has joined #lisp
yrk has joined #lisp
<yrk> why is clsql refusing to build on my machine? "Ensure that you have multiarch i386 build tools and libraries if you want to build 32-bit library"
frgo has quit [Ping timeout: 246 seconds]
frgo has joined #lisp
mindCrime has quit [Ping timeout: 250 seconds]
regreg has joined #lisp
longshi has quit [Ping timeout: 252 seconds]
pjb has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
asarch has joined #lisp
emerson has quit [Quit: leaving]
jack_rabbit has quit [Ping timeout: 252 seconds]
dale_ has joined #lisp
dale_ is now known as dale
yrk has left #lisp ["ERC (IRC client for Emacs 26.1)"]
pierpal has joined #lisp
pierpal has quit [Client Quit]
pierpal has joined #lisp
FreeBirdLjj has joined #lisp
Inline has joined #lisp
Inline has quit [Read error: Connection reset by peer]
Inline has joined #lisp
pjb has quit [Ping timeout: 252 seconds]
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
nowhere_man has joined #lisp
frgo has quit [Ping timeout: 272 seconds]
frodef has quit [Ping timeout: 264 seconds]
mindCrime has joined #lisp
mindCrime has quit [Ping timeout: 272 seconds]
duetbhai has joined #lisp
rpg has joined #lisp
SenasOzys has quit [Ping timeout: 240 seconds]
duetbhai has left #lisp ["Leaving"]
SenasOzys has joined #lisp
francogrex has joined #lisp
shka_ has quit [Quit: WeeChat 1.9.1]
<francogrex> an someone give me pointers as to how investigate and correct this problem here, it's doing my head in: https://pastebin.com/Ke1rXaVN
<francogrex> I had no problems in a previous version of that library, but the new one causes errors
<francogrex> so i put debug level to 3 and started stepping...
bradcomp has joined #lisp
<francogrex> but the stepping is not that fine-grained and it kinda skips over large parts, so I am not able to understand what is the undefined alien function that is the error
<francogrex> i even attach a gdb to examine the alien functions (calls)
steiner has quit [Ping timeout: 240 seconds]
pierpal has quit [Read error: Connection reset by peer]
<jkordani_> if you've changed your debug level, you will also need to purge all fasls and recompile with those settings
frodef has joined #lisp
<francogrex> jkordani_: I am careful to use asdf:operate 'asdf:load-source-op
<francogrex> so i am not compiling in principle
pierpal has joined #lisp
<jkordani_> francogrex: mmm.... I wouldn't be surprised if debug declarations are also honored for interpreted code
<jkordani_> however, I suppose if you're sure no fasls are created
<jkordani_> ccl doesn't have an interpreter for example, so everything is compiled. Even if you used load-source-op, fasls would still be created
<francogrex> jkordani_: yes ok. ccl doesn't have a stepper either
<francogrex> i could have used it to compare otherwise. in any case though the code runs fine on ccl, it's the library's interaction with sbcl that is problematic
<jkordani_> and also if you're relying on ql libraries, it is possible that loading them also causes a compilation, even if your own script is not compiled
<jkordani_> but i'm making assumptions here, I would be curious to know if your system has cached fasls around, unless you've made pains to ensure that no compilation is performed on any code your code depends on
<francogrex> no not ql, i am using the old fashioned loading of asdf
<francogrex> i cannot guarantee no compilation though
<francogrex> i think the stepper is just not that detailed anyway
igemnace has joined #lisp
<francogrex> it isn't like gdb
atgreen__ has quit [Remote host closed the connection]
frodef has quit [Ping timeout: 246 seconds]
<jkordani_> there are some things to know to get sbcl to produce the debug output you'd expect but I can't find the specific info at the moment. And gdb is only as good as the optimization settings and debug symbols it can find ;-) trust me I'
<jkordani_> ve wasted so much time trying to figure out why I can't see some local here or there
gpiero has quit [Quit: Leaving.]
dyelar has joined #lisp
Lycurgus has joined #lisp
shrdlu68 has quit [Ping timeout: 245 seconds]
<jkordani_> francogrex: exactly what code are you running?
dyelar has quit [Remote host closed the connection]
flamebeard has quit []
rpg has quit [Ping timeout: 272 seconds]
SenasOzys has quit [Ping timeout: 252 seconds]
shifty has quit [Ping timeout: 244 seconds]
actuallybatman has quit [Read error: Connection reset by peer]
cage_ has quit [Quit: Leaving]
pjb has joined #lisp
LiamH has joined #lisp
lavaflow has joined #lisp
<phoe> Is it possible to send binary data inside Lisp strings, as long as I escape the #\" and #\\?
<phoe> s/send/put/
<jasom> phoe: it's complicated, do you want the full answer?
<phoe> jasom: yes
<dlowe> the answer is "other people will hate you if they have to deal with this crap in their code"
<phoe> ...oh wait
<dlowe> Just use byte vectors if you want to stick binary data in your code
<jasom> The easiest way to handle binary data in strings is to use iso-8859-1 when serializing, since all modern implementations use unicode, that means char-code will be the byte that ends up on the line
<jasom> however, there is the issue of line-endings. Many lisps on windows will default to converting #\Newline to #\Return #\Newline on output
SenasOzys has joined #lisp
<jasom> last I checked, all but one (CCL I think?) lisp had a way of specifying the line ending in the external-format, so it is motsly soluble
schweers has quit [Ping timeout: 250 seconds]
<jasom> On many implementations strings are far faster than byte vectors, perhaps counterintuitively. If you only care about some subset of (SBCL, CCL) then fast-io is probably a better bet, since CCL can't do binary strings on windows correctly and fast-io is only rarely slower (and sometimes faster) than using strings on SBCL.
<jasom> As far as doing things that are mixed ascii and binary (many formats work this way) I find the best of the bad choices is to use #. to conver the string to binary at read-time.
francogrex has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
dented42 has joined #lisp
<asarch> Is "(= 10 n)" a predicate or an assignation expression?
<jasom> phoe: if you have "mostly text" formats that may contain a small amount of binary information, then using iso-8859-1 is by far the easiest way, except windows/ccl just won't work
<jasom> clhs =
<jasom> asarch: predicate. See above link
<asarch> Thank you! :-)
<jasom> asarch: common lisp uses setf for assignment
<jasom> clhs setf
<asarch> I was reviewing the bodyless Fibonacci computing loop: (do ((n 0 (+ 1 n)) (cur 0 next) (next 1 (
<asarch> ..+ cur next))) ((= 10 n) cur))
<asarch> And I found that expression
<jasom> asarch: I tend to avoid DO since it's a pain to remember that many positional arguments in a control-flow macro
FreeBirdLjj has quit [Remote host closed the connection]
<jasom> asarch: but there are many here who use DO preferentially, so ymmv.
<asarch> (do ((n 0 (+ 1 n)) (cur 0 next) (next 1 (+ cur next))) ((= 10 n) cur))
<asarch> Ok
dented42 has quit [Ping timeout: 246 seconds]
<asarch> A powerful program on a single line :-)
frgo has joined #lisp
<asarch> Common Lisp would be great in this cases: https://www.youtube.com/watch?v=jvIzIAgRWV0
<jkordani_> jasom: ccl lets you change the line endings...
<phoe> asarch: what you're looking at is a test inside a DO expression
<phoe> DO will finish iterating when (= 10 n) evaluates to true.
<jasom> jkordani_: good to know; I may be misremembering the implementation, or it may have changed in the past 10 years.
longshi has joined #lisp
<phoe> (do VARIABLE-BINDINGS (TEST . EPILOGUE) LOOP-BODY) is the structure.
Jesin has quit [Quit: Leaving]
<dlowe> (loop for n from 0 upto 10 sum n)
<dlowe> I think I'll stick with loop
frgo has quit [Ping timeout: 240 seconds]
<dlowe> actually, (loop for n upto 10 sum n)
<jkordani_> jasom: https://ccl.clozure.com/docs/ccl.html#characters-and-external-formats but note that *default is unix, even on windows
<jasom> so maybe ecl or clisp then is the one that worked that way
<jkordani_> I seem to remember having to change *something* else in order to get it to work the way I wanted on ccl though so I don't think you're wrong
<jasom> phoe: disregard what I said about CCL, feel free to use binary strings and an iso-8859-1 encoding, though others may hate you (I got more pull requests to change to using byte vectors than I have gottent total pull requests on all other lisp projects I've ever put on github).
<jkordani_> like the external format was respected for some streams and not others
<jasom> and I eventually switched to fast-io, as it was within an order of magnitude of the speed of strings on all implementations except CLISP
<jasom> when your string functions are compiled hand-optimized C and your byte functions are only slightly optimized byte code interpreted, there's no escaping the performance gap.
warweasle has quit [Quit: laster]
<jasom> I also had 2 different people suggest using offset vectors instead of copying subvectors out both citing "performance" and both obviously never having actually benchmarked the difference...
jdormit has joined #lisp
Jesin has joined #lisp
<jasom> I don't know if it's gotten better, but at the time simple-array was several times faster than non simple-array on sbcl.
FreeBirdLjj has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
pierpal has quit [Ping timeout: 246 seconds]
<pfdietz> I wonder how clisp would perform with a JIT compiler for its bytecode.
<Bike> i thought it had one already
varjag has joined #lisp
dolohov has joined #lisp
veinofhavit is now known as veinoflegaladvic
<pfdietz> Hmm.
Jesin has quit [Quit: Leaving]
Jesin has joined #lisp
shka_ has joined #lisp
cross has joined #lisp
<asarch> Thank you phoe
<asarch> Thank you very much :-)
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #lisp
jasmith has quit [Ping timeout: 250 seconds]
<asarch> Thank you jasom
<asarch> Thank you very much :-)
<jackdaniel> (map () #'thank-you '(phoe jasom)) ; DRY! :-)
FreeBirdLjj has quit [Read error: Connection reset by peer]
jmercouris has joined #lisp
longshi has quit [Ping timeout: 250 seconds]
pierpal has joined #lisp
jxy has joined #lisp
frgo has joined #lisp
longshi has joined #lisp
<cgay> dlowe: you can save three more characters!!! (loop as n to 10 sum n)
stacksmith has quit [Remote host closed the connection]
m00natic has quit [Remote host closed the connection]
nbunjevac has joined #lisp
<jasom> and there's always dynamic programming version of fib: (defun fib (n) (if (< n (length *fibs*)) (aref *fibs* n) (progn (vector-push-extend (+ (fib (- n 1) ) (fib (- n 2))) *fibs*) (fib n))))
mkolenda has quit [Remote host closed the connection]
mkolenda has joined #lisp
lavaflow has quit [Ping timeout: 252 seconds]
lavaflow has joined #lisp
papachan has joined #lisp
shrdlu68 has joined #lisp
moei has quit [Quit: Leaving...]
ealfonso has joined #lisp
jdormit has quit [Quit: rcirc on GNU Emacs 26.1]
<pjb> What lisp implementation had the "cdr consing" optimization? Was it on lisp machines?
<pjb> err, "cdr coding" perhaps?
<pfdietz> Lisp machines, yes.
<pjb> AFAIK, it didn't require hardware support. Wouldn't that be an interesting optimization to implement with a multi-generational copying garbage collector? (ie. older generations are not mutated, so we could cdr code lists in them without much drawback).
<shrdlu68> When an array has an :element-type that is also an array, is it possible to have an :initial-element that won't just be the one same array?
dented42 has joined #lisp
<shrdlu68> Never mind, this is impossible.
<pjb> shrdlu68: (map-into (make-array 3 :element-type '(vector t 4)) (lambda () (make-array 4))) #| --> #(#(0 0 0 0) #(0 0 0 0) #(0 0 0 0)) |#
<pjb> shrdlu68: or (make-array 3 :initial-contents #(#(1 2 3 4) #(0 0 1 1) #(2 2 1 1))) #| --> #(#(1 2 3 4) #(0 0 1 1) #(2 2 1 1)) |#
lavaflow has quit [Ping timeout: 252 seconds]
stacksmith has joined #lisp
<shrdlu68> Yeah, no way but this, or :initial-contents.
<Bike> since make-array is just a function, the initial-element is only evaluated once
dented42 has quit [Ping timeout: 252 seconds]
<shrdlu68> (type-of (coerce 0 'short-float)) => SINGLE-FLOAT
<Bike> What's (subtypep 'single-float 'short-float)?
emaczen has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<shrdlu68> => T
<Bike> so it's fine. your implementation doesn't have distinct short and single floats.
dented42 has joined #lisp
figurehe4d has joined #lisp
zooey has quit [Ping timeout: 256 seconds]
zooey has joined #lisp
trafaret1 has joined #lisp
<trafaret1> hi there
<trafaret1> just common question
<trafaret1> can I use lisp for programming PLC?
<trafaret1> maybe there are here wisards who do that
<trafaret1> wizard :)
<jackdaniel> trafaret1: you may write a compiler in common lisp which will assemble sexp instructuions tailored for PLC
<jackdaniel> it is not a hardware suitable for hosting any runtime afaik
dented42 has quit [Ping timeout: 244 seconds]
milanj has quit [Quit: This computer has gone to sleep]
dented42 has joined #lisp
<asarch> Dynamic programming version?
<asarch> A recursive function?
<pfdietz> Dynamic programming can be thought of as memoizing a recursive function.
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
warweasle has joined #lisp
figurehe4d has quit [Remote host closed the connection]
vlatkoB has quit [Remote host closed the connection]
<shrdlu68> Can someome make sense of this type-error? https://gist.github.com/shrdlu68/10ce10d70d4818017a174226382ba990
Sauvin has quit [Ping timeout: 252 seconds]
<Bike> shrdlu68: (simple-array single-float 2) means a two dimensional array of single-floats.
<Bike> shrdlu68: you meant (simple-array single-float (2))
<pjb> shrdlu68: (typep (make-array 2 :element-type 'single-float :initial-element 0.0) '(simple-array single-float (2))) #| --> t |# that should work.
<Bike> i.e. a one dimensional array of length 2.
<pjb> You're losing a lot of time with those type considerations. Wouldn't this time be better spent not putting any type declarations and improving your algorithms or your life?
<shrdlu68> Confusion now hath made her masterpiece, thanks.
Sauvin has joined #lisp
<pjb> Not counting that restricting the types of sequences or arrays will generally bite you in the ass later, when you want to pass some other type of sequence or array. Then you will have to copy, and become as slow as C++.
<shrdlu68> pjb: sb-sprof says that (SB-VM::OPTIMIZED-DATA-VECTOR-REF T) is the function with the most sample, I'm trying to see whether I can optimize it away.
azimut has quit [Ping timeout: 252 seconds]
<pjb> shrdlu68: but of course! It's always in optimized functions that all the time is spent!
<pjb> Otherwise there would be no point in optimizing them!
astalla has joined #lisp
azimut has joined #lisp
hitchhikingcoder has joined #lisp
hitchhikingcoder has quit [Client Quit]
orivej has joined #lisp
dented42 has joined #lisp
hitchhikingcoder has joined #lisp
<asarch> Thank you pfdietz :-)
azimut has quit [Ping timeout: 246 seconds]
<pfdietz> There is an even better way of computing the n-th Fibonacci number, though, involving raising a certain 2x2 matrix to the n-th power. This takes O(log n) arithmetic operations (and with most of those having small size compared to the last O(1) iterations of the repeated squaring.)
astalla has quit [Ping timeout: 240 seconds]
scymtym has quit [Ping timeout: 250 seconds]
AroPar has joined #lisp
igemnace has quit [Read error: Connection reset by peer]
igemnace has joined #lisp
lavaflow has joined #lisp
moei has joined #lisp
nirved_ has joined #lisp
frodef has joined #lisp
nirved has quit [Ping timeout: 240 seconds]
nirved has joined #lisp
aydio has joined #lisp
nirved_ has quit [Ping timeout: 272 seconds]
azimut has joined #lisp
kingcons has left #lisp ["ERC (IRC client for Emacs 26.1)"]
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
nirved_ has joined #lisp
slyrus1 has joined #lisp
nirved has quit [Ping timeout: 272 seconds]
AroPan has joined #lisp
AroPan has quit [Remote host closed the connection]
scymtym has joined #lisp
nirved_ is now known as nirved
AroPar has quit [Ping timeout: 272 seconds]
Jesin has quit [Quit: Leaving]
shrdlu68 has quit [Ping timeout: 240 seconds]
Lord_Nightmare has quit [Quit: ZNC - http://znc.in]
Lord_Nightmare has joined #lisp
kooga has quit [Quit: :]
ober has joined #lisp
Lycurgus has quit [Quit: Exeunt]
hitchhikingcoder has quit [Ping timeout: 252 seconds]
Jesin has joined #lisp
<aeth> Oh no. That's making me want to revise my project Euler code again. I think there's an n-th fib question or two
<aeth> It's already the most over-engineered CL I've written.
longshi has quit [Ping timeout: 250 seconds]
<Bike> i remember the fib questions in euler generally being more about identities than computation
<Bike> like sums of all, or odd, or even indexed fibonacci numbers are just otherfibonacci numbers, and stuff
<aeth> yes.
<aeth> I guess this new information won't be useful in my Euler lib (I separate my answers from the general algorithms/etc. used to solve the problem)
aydio has quit [Quit: WeeChat 2.2]
<aeth> I probably should publish parts of this, e.g. my prime sieve
<aeth> I wouldn't be surprised if I have the fastest prime sieve in CL.
Roy_Fokker has joined #lisp
<aeth> (An old version is probably on Lisp paste)
igemnace has quit [Read error: Connection reset by peer]
hitchhikingcoder has joined #lisp
Essadon has quit [Quit: Qutting]
lemonpepper24 has joined #lisp
lavaflow has quit [Ping timeout: 246 seconds]
Bike has quit [Ping timeout: 252 seconds]
orivej has quit [Ping timeout: 252 seconds]
lavaflow has joined #lisp
trittweiler has quit [Ping timeout: 244 seconds]
lavaflow has quit [Ping timeout: 240 seconds]
slyrus1 has quit [Read error: Connection reset by peer]
shka_ has quit [Ping timeout: 272 seconds]
meepdeew has joined #lisp
regreg has quit [Remote host closed the connection]
trafaret1 has quit [Ping timeout: 244 seconds]
<cl-arthur> There was a prime sieve implementation through infinite streams as one of the exercises in SICP if I recall correctly, fun stuff :)
<russellw> I'm seeing recommendations to use (in-package :foo) to define your own namespace in which to define your functions and variables separate from anyone else's. I can see how that mostly works fine, but the problem is, suppose I'm writing e.g. a symbolic differentiation library. That needs to input (expt x 2) and return (* x 2), but expt and * need to be the standard ones, not the ones in package
<russellw> foo. What's the recommended way to solve this problem?
ober has left #lisp ["ERC (IRC client for Emacs 26.1)"]
<asarch> Is there any library for matrix operations in Common Lisp?
lavaflow has joined #lisp
<no-defun-allowed> Good morning everyone!
<aeth> russellw: You could do two things (and probably several other approaches) if you have to define your own *. You could call cl:* or you could define foo:* from a package that uses :cl
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
loli has quit [Quit: WeeChat 2.2]
<jasom> asarch: FWIW "Dynamic Programming" is a fancy name for something that basically boils down to speeding up recursive operations with memoization. As far as I can tell it got named that "because it sounded cool"
loli has joined #lisp
<aeth> russellw: I haven't tested to see if this is portable yet, but for my Scheme I create a package called r7rs, but I don't in-package it, and just define r7rs::+, r7rs::*, etc.
<aeth> jasom: Iirc it was "because it sounded cool to a government bureaucrat"
marvin3 has quit [Ping timeout: 252 seconds]
<jasom> russellw: just have the package foo :use the package "CL"
<aeth> russellw: I believe the third option is shadowing
<jasom> russellw: the only reason *not* to :use "CL" would be if you want to have a distinct symbol with the same name as a standard one.
jmercouris has quit [Ping timeout: 244 seconds]
<pjb> jasom: yes, there was a period where you had things like operational research, dynamic programming, artifical intelligence. Nowadays, we have deep learning, and stuff…
<russellw> aeth, jasom, see, the thing is, I do not want to define my own *, and the problem is not getting to use CL, the syntax for this is straightforward. The problem is /quoted/ symbols. If I say '* then that will end up returning 'foo:*. I could firmly resolve in my mind to always write 'cl:* but in practice I would sometimes forget, and there is no way to automatically check for this error
<aeth> russellw: '* is 'cl:* not 'foo:* as long as foo uses CL
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
<russellw> aeth, ah! Good, that sounds like a solution to the problem, then
<aeth> russellw: I misunderstood your question, I thought you wanted separate symbols so (differentiate:expt x 2) would return '(cl:* x 2)
<russellw> Right, no, I would actually rather avoid shadowing standard symbols where possible
<aeth> You'd probably actually want (differentiate (expt x 2))
<russellw> yeah
<aeth> (If differentiate is a macro)
hitchhikingcoder has quit [Quit: hitchhikingcoder]
<russellw> well, a function, so (differentiate '(expt x 2))
<pjb> (differentiate '(expt x 2) 'x)
<russellw> yeah
<aeth> For this sort of thing I tend to define both a macro and a function, where the macro is something like (defmacro foobar (form) (foo form)) or (defmacro foobar (&rest forms) (foo forms))
<aeth> foo would be a function that takes '(expt x 2) and return '(* 2 x) while foobar would be a macro that calls that function, so it would evaluate (* 2 x) assuming x is defined, e.g. (let ((x 42)) (differentiation-macro (expt x 2))) => 84
rtypo has joined #lisp
<aeth> (For the (&rest forms) version, you may want a slight variant like `(progn ,@(foo forms)) or `(progn ,@(mapcar #'foo forms)) etc. depending on your API of foo)
<aeth> (In this very strange case you might want to insert a + in front and then feed `(+ ,@forms) into foo)
dented42 has joined #lisp
Bike has joined #lisp
<asarch> Thank you jasom
<asarch> Thank you very much :-)
* asarch takes notes...
asarch has quit [Quit: Leaving]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hitchhikingcoder has joined #lisp
frodef has quit [Ping timeout: 252 seconds]
shifty has joined #lisp
Sauvin has quit [Ping timeout: 240 seconds]
jack_rabbit has joined #lisp
hitchhikingcoder has quit [Quit: hitchhikingcoder]
Sauvin has joined #lisp
robotoad has quit [Quit: robotoad]
djeis[m] has joined #lisp
pierpa has joined #lisp
djeis has joined #lisp
LiamH has quit [Quit: Leaving.]
robotoad has joined #lisp
robotoad has quit [Read error: Connection reset by peer]
robotoad_ has joined #lisp
robotoad_ has quit [Ping timeout: 240 seconds]
robotoad has joined #lisp
k-hos has quit [Read error: Connection reset by peer]
k-hos has joined #lisp
robotoad has quit [Client Quit]
bradcomp has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 244 seconds]
dale has quit [Quit: dale]