phoe changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.16, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
<grewal> no-defun-allowed: well, you're fine with it :P
<pjb> Notice that both brothers were referenced by "brother" in the above sentence.
<no-defun-allowed> Having that many "smith"s makes it hard to parse for people.
<pjb> (and by "Smith" and "smith", even if for the later, one was a lock-smith, not a pure smith.).
<pjb> He we still an occasional smith.
<grewal> But it's the same issue with using he/she when there are multiple people it can refer to.
<no-defun-allowed> grewal: I seldom use tagbody, block, etc, and I try to pick descriptive names so I don't usually have many collisions like that.
pillton has joined #lisp
<grewal> But there aren't any collisions. And in most code, you won't even notice it. Norvig's example is a degenerate case
zotan has quit [Ping timeout: 272 seconds]
<pjb> note that in (defun square-list (list-of-numbers) (mapcar (function square) list-of-numbers)) the parameter name list-of-numbers is somewhat 1- redundant, and 2- misleading.
<no-defun-allowed> Sure, since people avoid them (maybe cause there are better names), except for a few generic names like LIST
<pjb> because its type actually depends on the called functions, ie. mapcar (it must be a list) and square a list of what? depends on square!
zotan has joined #lisp
<pjb> (defun square (x) `(expt 2 ,x)) (square-list '(1 x #(1 2 3))) #| --> ((expt 2 1) (expt 2 x) (expt 2 #(1 2 3))) |#
<pjb> so actually, square-list doesn't take a list-of-numbers, but just a list. The type of the elements depend on square, which can be different at run-time.
<pjb> Or even not defined when we compile square-list.
iovec has quit [Quit: Connection closed for inactivity]
<grewal> (defclass color () ((color :accessor color :initform 'color))) (let ((color (make-instance 'color))) (color color))
<pjb> So it's better to use list instead of l or x, but it would be bad to try a more specific name. On the other hand, you should remember to rename it sequence when you change square-list to use (map 'list (function square) sequence).
<grewal> I don't think that's taxing or difficult to read
<pjb> grewal: it's ok, but color is not a color.
<pjb> default-color could be a symbolic color.
<pjb> name or rgb could be better names for slots than color in this case. But it may happen.
<grewal> sure, I should have made the initform 'red or something, but you get my point. Using the same name over and over again doesn't hinder readablity and sometimes can even enhance it
<pjb> yep
caltelt has joined #lisp
<aeth> 'color could be short for colorful (but you should just call it colorful) and could e.g. mean color the area in some multicolored rainbow
beach has quit [Read error: Connection reset by peer]
<randyjohnson86> aeth: one step ahead of the game https://i.gyazo.com/3fc34dc7dad8dedf2db2a90e6cff8e0b.png
keep_learning_M has joined #lisp
<aeth> randyjohnson86: yeah, that's generally given in a book before showing you like the way I wrote it that you can rewrite it to be tail recursive.
<aeth> It might not be considered that important to have the extra complexity in an example, especially in CL, though.
<no-defun-allowed> (defun mapcar (function list) (loop for item in list collect (funcall function list)))
<aeth> It's usually better to build up the program in steps than to just throw the final result out like it's a math proof. We're not mathematicians. :-)
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
<aeth> s/throw/put/
troydm has joined #lisp
<randyjohnson86> the next page literally goes into the 'labels' keyword as a means to declutter the global space with helper functions, just as you did
<randyjohnson86> what a wonderful language
<sjl> another good short read https://groups.google.com/forum/message/raw?msg=comp.lang.lisp/9SKZ5YJUmBg/Fj05OZQomzIJ
<aeth> > Date: 1 Apr 1993 17:37:56 GMT
<aeth> Clearly that means that it can't be trusted
meepdeew has joined #lisp
<aeth> Actually, it's surprising how little has changed since 1993.
<pjb> And now for something completely different: running Lisp on GPUs [pdf] <https://dspace.lboro.ac.uk/dspace-jspui/bitstream/2134/35128/1/main.pdf>
<no-defun-allowed> Doesn't seem very efficient.
randyjohnson86 has quit [Ping timeout: 248 seconds]
hiredman has quit [Ping timeout: 244 seconds]
hiredman has joined #lisp
lavaflow_ has joined #lisp
lavaflow has quit [Ping timeout: 246 seconds]
<no-defun-allowed> Also, I don't see much list processing in that "Lisp".
<oni-on-ion> processing = parallelization ?
<aeth> no-defun-allowed: a GPU Lisp probably shouldn't be doing any list processing on the GPU
<no-defun-allowed> aeth: nor should it be reading or printing (which are sequential operations)
<no-defun-allowed> but this appears to be doing exactly those
akoana has joined #lisp
<no-defun-allowed> though I would love to see a very very parallel Lisp machine, like *Lisp and Connection Machines but using modern hardware
<oni-on-ion> can't wait for clasp
<no-defun-allowed> why are you waiting? it's right here: https://github.com/clasp-developers/clasp
<oni-on-ion> because - "Building on most systems will take around 8-12GB of memory and ~1-2 hours with a relatively modern processor,"
<no-defun-allowed> welcome to C++, it won't get better for a while i'd guess
<oni-on-ion> well, prebuilt would help. i wouldnt be able to build firefox either!
<no-defun-allowed> it does get faster if you use the clasp boehm GC
<oni-on-ion> the only thing this whole year that ate swap was building LLVM for emscripten
<oni-on-ion> only 4gb ram here. though i seen a recent comment about clasp being 95-97% CL ? maybe i could build it elsewhere
<no-defun-allowed> i could (possibly) build it for you, i have time and a machine to waste
<aeth> no-defun-allowed: Later this year you should be able to, for about $7000 to $14000, buy a dual-CPU AMD Epyc motherboard and 2 Zen 2 Epyc 64 core 128 thread CPUs for a total of 256 system threads. This is probably cheaper than a minicomputer was back in the day when adjusted for inflation.
<aeth> no-defun-allowed: and since it's x86-64 just install Mezzano on the bare metal
<oni-on-ion> wow
<aeth> no-defun-allowed: It looks like the CM-5 was 1024 cores. https://en.wikipedia.org/wiki/Connection_Machine#CM_designs
pfdietz_ has quit [Ping timeout: 256 seconds]
<aeth> I suspect that what I just described would greatly outperform that, and still give you enough threads to play with
<no-defun-allowed> i dunno if Mezzano supports SMT yet
<aeth> Actually getting that up to 1024 cores (not threads!), maybe through 8x2 64 core CPUs, is definitely doable. That would probably be at least $80,000 just for the CPUs alone, though, assuimng the 64 core one will be at least $5k because AMD's current 32 core Epyc offering is $4200.
CrazyEddy has quit [Remote host closed the connection]
<aeth> You'd probably want to run SBCL on a commodity OS, though, to maximize performance.
<aeth> I think at this point you're working with a company like Cray, not building it yourself.
<oni-on-ion> i want to reply but its #lisp
shifty has joined #lisp
<aeth> Oh, the most fun thing is that what I'm describing would easily be one of the top 10 computers in the world 20 years ago. Maybe even sooner than that.
lavaflow_ is now known as lavaflow
<aeth> And the way more affordable 128 core one? Probably 25 years.
<aeth> oni-on-ion: Well, my point was that you don't have to dream about a very parallel Lisp system. You could probably even get a 64 core Threadripper for a few thousand USD next year and just run SBCL or CCL on it. And for less than a programmer's yearly salary (unless the interconnect is *really* expensive), you'd get something that's more of a supercomputer than a computer, but still commodity x86-64 hardware.
<aeth> s/a programmer's yearly salary/a SV programmer's yearly salary/
<aeth> Actually getting the price estimate is tricky because none of the components are out until late 2019 or 2020 and even then the upper range is still expensive enough to have the price of "Contact Us" rather than having a listed price.
<oni-on-ion> my computer was 80$ =P 2 core , and i think 4 thrtead
abarbosa has joined #lisp
<aeth> hmm, I might have been optimistic on my pricing, but you should definitely be able to put together an AMD-based Common Lisp-oriented "supercomputer" for < $300,000
<aeth> Dual CPU is going to make everything way more expensive than my intuition thinks because you're doing server CPUs, server motherboards, server RAM, etc.
meepdeew has quit [Remote host closed the connection]
abarbosa has quit [Remote host closed the connection]
anewuser has joined #lisp
<aeth> I should add that I think the hardest part would be finding a justified reason for running a CL program on 64-1024 cores.
anewuser has quit [Read error: Connection reset by peer]
MetaYan has joined #lisp
xantoz has joined #lisp
anewuser has joined #lisp
orivej has quit [Ping timeout: 248 seconds]
mla has joined #lisp
mla has left #lisp ["WeeChat 2.2"]
jeosol has joined #lisp
akoana has left #lisp [#lisp]
makomo has quit [Ping timeout: 258 seconds]
<oni-on-ion> aeth, 1024 CL programs
caltelt_ has joined #lisp
Patzy has quit [Ping timeout: 268 seconds]
Patzy has joined #lisp
caltelt has quit [Ping timeout: 258 seconds]
nanoz has joined #lisp
nanoz has quit [Ping timeout: 272 seconds]
barrenbass has joined #lisp
capadoodle has joined #lisp
Bike has quit [Quit: Lost terminal]
pillton has quit [Read error: Connection reset by peer]
nanoz has joined #lisp
igemnace has joined #lisp
igemnace has quit [Read error: Connection reset by peer]
igemnace has joined #lisp
beach has joined #lisp
<beach> Good morning everyone!
mikecheck has joined #lisp
dddddd has quit [Read error: Connection reset by peer]
meepdeew has joined #lisp
_whitelogger has joined #lisp
anamorphic has quit [Remote host closed the connection]
barrenbass has quit [Ping timeout: 258 seconds]
meepdeew has quit [Remote host closed the connection]
anamorphic has joined #lisp
meepdeew has joined #lisp
barrenbass has joined #lisp
nowhere_man has joined #lisp
meepdeew has quit [Ping timeout: 258 seconds]
nowhereman has quit [Ping timeout: 258 seconds]
meepdeew has joined #lisp
terpri has joined #lisp
buhman has quit [Quit: WeeChat 2.2]
leb has quit []
meepdeew has quit [Ping timeout: 272 seconds]
pankajgodbole has joined #lisp
sr5h has joined #lisp
barrenbass has quit [Ping timeout: 268 seconds]
nanoz has quit [Ping timeout: 246 seconds]
anamorphic has quit [Ping timeout: 244 seconds]
<asarch> おはよ!
Arcaelyx has quit [Ping timeout: 252 seconds]
<phoe> dzień dobry
barrenbass has joined #lisp
amerlyq has joined #lisp
dale has quit [Quit: dale]
<asarch> When you have done (ql:quickload :cl-glut) a lot, how would you update your code from the git repo?
<asarch> доброе утро!
meepdeew has joined #lisp
<LdBeth> By hand?
SaganMan has joined #lisp
<asarch> Oh. I thought there was an interface from QuickLisp to do that
<asarch> Ok. Thank you!
meepdeew has quit [Ping timeout: 246 seconds]
asarch has quit [Quit: Leaving]
<no-defun-allowed> Καλημερα, phoe
orivej has joined #lisp
meepdeew has joined #lisp
vlatkoB has joined #lisp
<LdBeth> 六國,可怕
donotturnoff has joined #lisp
jprajzne has joined #lisp
anewuser has quit [Quit: anewuser]
barrenbass has quit [Remote host closed the connection]
donotturnoff has quit [Remote host closed the connection]
iovec has joined #lisp
sauvin has joined #lisp
crystalball has joined #lisp
manualcrank has quit [Quit: WeeChat 1.9.1]
<p_l> no-defun-allowed: for scale - modern single-system-image supercomputers (i.e. ones that can run a single multithreaded program with common memory) have to be partitioned or have HT disabled because they hit linux kernel limits on core count
<no-defun-allowed> oof
<p_l> SGI UV30, which is *not* a new thing
<p_l> or rather, UV3000, which is made out of multiple UV30 units
<p_l> I had... 3? UV30 units at work (or UV20?) which were a case of idiotic purchase of otherwise great hardware (they were *misused* and thus money down the drain)
<p_l> a mid-level configuration is (was?) sold as packaged turnkey SAP HANA server (an in-memory database)
<p_l> AMD used to sell a similar setup under the name AMD Horus, with I think 64 cores, back before dual-core became a thing in amd64 world
<p_l> SGI UltraViolets use Xeons + custom cache coherence chips + SGI NUMAlink fabric to connect separate "building blocks"
<p_l> most supercomputers these days are closer to beowulf cluster type, so UltraViolet series is kinda rare thing
<jackdaniel> I understand nothing of what you said above
<jackdaniel> so many names
<shka_> I think that those are some computers
<shka_> not sure about it though
<no-defun-allowed> jackdaniel: it's all rocks we tricked into doing maths, don't worry
<p_l> SGI UltraViolet is a series of supercomputers that to programmer are just "normal but big" computer (thus, single-system-image + common, cache coherent memory)
<p_l> NUMAlink - very fast interconnect system back from SGI MIPS days
<p_l> beowulf cluster - multiple separate computers communicating over network to cooperate using messages instead of letting you treat it like single machine ;)
<jackdaniel> that makes sense. now the missing link! how is this related to the channel topic?
<p_l> jackdaniel: discussion on building "big core count" machine for use with lisps (including mezzano as OS)
<no-defun-allowed> something about running "lisp" on GPUs didn't go so well then someone asked why you would want to run lisp that parallel
<no-defun-allowed> doesn't answer why but that people do, though not really lisp
<jackdaniel> I have a wonderful scrapbooks on a shelf
<jackdaniel> you may scribble lisp code in them
<jackdaniel> they have plenty of pages, all white
<jackdaniel> with a nice square pattern
<no-defun-allowed> very nice
<jackdaniel> and they have margins on the right
<no-defun-allowed> also handy
<jackdaniel> indeed
<no-defun-allowed> now i must finish some mockups for clomptroller
<no-defun-allowed> you ever feel very proud you finish everything early then you realise you forgot something on the last day? exactly what happened here
crystalball has quit []
benkard has joined #lisp
mulk has quit [Ping timeout: 272 seconds]
benkard is now known as mulk
caltelt_ has quit [Ping timeout: 248 seconds]
myrkraverk has quit [Ping timeout: 258 seconds]
<aeth> p_l: what's the core limit?
myrkraverk has joined #lisp
<aeth> p_l: And as I said, now that there are 64 core Epyc x86-64 coming out (rumor says September) that's only 8 2x CPU motherboards to get to 1024. Sounds very doable, although it sounds like you know far more about this than I do.
<p_l> IIRC linux gets issues around either 4096 or 8192
<p_l> technically fixable by changing few values in source, but I'm pretty sure you're going to see scalability issues
<aeth> well good because 8 2x 64 with 2x SMT gets you to 2048 so it works
<p_l> for the EPYC you'llneed custom work to make it 1024 cores in single image
sr5h has quit [Read error: Connection reset by peer]
sr5h has joined #lisp
<aeth> AMD list their Epyc "server platforms" as Cisco, Dell, HPE, Cray, and Supermicro. Of course, I guess you could also do it yourself. https://www.amd.com/en/where-to-buy/epyc-platforms
<p_l> the issue is lack of standard setup above 2S for EPYC, afaik
<aeth> well, the motherboards are 1 or 2 CPU. Is that what you mean?
<p_l> especially since as-is, from my understanding, going beyond 2S requires custom interconnect chip
<p_l> yes
<aeth> Cray has a custom interconnect. The other "platforms" might, too. How much are custom interconnects? Really pricey?
<jackdaniel> please move it to #lispcafe
<aeth> ok
<jackdaniel> thank you
ggole has joined #lisp
longshi has joined #lisp
sr5h has quit [Read error: Connection reset by peer]
sr5h has joined #lisp
meepdeew has quit [Remote host closed the connection]
actuallybatman has joined #lisp
<mrSpec> Hi! I use postmodern, however my database is full of dashes, column names like 'foo-bar'. Does anyone know if there is any special variable which allows me to turn off - → _ conversion? I can't find anything in the ref.
<mrSpec> Whats worse I've found 10yrs old discussion where author admitted that he was not aware that dashes are even possible :(
<aeth> it's in the package s-sql so its full name is s-sql:from-sql-name
<aeth> also s-sql:to-sql-name
<aeth> I'd probably do it by making a global list of names to preserve, unless there are a lot
hhdave has joined #lisp
<aeth> (my bad, you probably only need to fix to, not from)
<mrSpec> aeth: jackdaniel just helped me fix the issue: (setf postmodern:*escape-sql-names-p* :literal)
<mrSpec> but now I need to write '|foo-bar|
<SaganMan> Morning beach
sr5h has quit [Remote host closed the connection]
sr5h has joined #lisp
<shka_> mrSpec: you can simply use strings as well
<mrSpec> shka_: no you cant :(
<shka_> oh, no?
<shka_> i could swear that you can
froggey has quit [Ping timeout: 248 seconds]
froggey has joined #lisp
ricekrispie has joined #lisp
ricekrispie2 has quit [Ping timeout: 244 seconds]
longshi has quit [Ping timeout: 258 seconds]
<p_l> mrSpec: dashes are nothing...
<p_l> SQL allows free text column naming :P
<no-defun-allowed> SELECT stuff FROM "bright green pants" is legal last time i checked, or something like that
minion has quit [Remote host closed the connection]
specbot has quit [Remote host closed the connection]
specbot has joined #lisp
minion has joined #lisp
ck_ has joined #lisp
JohnMS_WORK has joined #lisp
<loke> no-defun-allowed: unless you use MSSQL, where you have to quote [columns names line this]
<loke> like
<no-defun-allowed> hmm, aight
hhdave_ has joined #lisp
hhdave has quit [Ping timeout: 268 seconds]
hhdave_ is now known as hhdave
brundleticks has quit [Read error: Connection reset by peer]
<p_l> loke: MSSQL accepts standard quoting as well
* p_l actually likes [] quotes, though
<aeth> I think it would have been better if Common Lisp had used '[foo] instead of '|foo| for escaping symbols. It has an open and a close. Maybe even '{foo}
<aeth> I guess too many people even back then had ideas for [] reader macros, though
<oni-on-ion> for what purpose open and close?
<jackdaniel> [symbols which have spaces may are be also quoted]
<oni-on-ion> i mean why the open and close, because "any single char can get spaces"
<jackdaniel> s/quoted/escaped/
<oni-on-ion> er?
<oni-on-ion> '[foo [+ 4 ['5]]] ==> |foo 9| ?
<aeth> no
<aeth> I mean it just looks better to say '[Hello, world!] than '|Hello, world!| imo because of the random punctuation/spaces.
<oni-on-ion> eh i'd rather strings == symbols
<oni-on-ion> literals
<aeth> Oh, and similarly, #[ and ]# instead of #| and |# for block comments would make them look better
<aeth> For basically the same reason.
<aeth> I think (almost) no one uses block comments in part because they're ugly
<oni-on-ion> pound makes everything look worse
<aeth> my eyes seem to have problems parsing |#
<aeth> And I don't get the same issue with ]#
<jackdaniel> poor slime/paredit support for them would be a major factor imo (regarding block comments)
<oni-on-ion> anything with a pound for some reason my brain cant remember what side is what on. #+BEGIN_SRC took me a while to remember
<aeth> I literally only get that problem of "which side is it on" for |#
<aeth> it hurts my brain
<oni-on-ion> i got error in lisp mode for typing '[' with paredit: "up-list: Scan error: "Unbalanced parentheses", 3030, 1", though it added the closing ]. however how come we can tell those quotes <--- which ones are inner and outer, when using the same char? theres four " chars
<oni-on-ion> "up-list: Scan error: "Unbalanced parentheses", 3030, 1" <<--- because this is making me think what is the need for open and close () parens ?
sr5h has quit [Ping timeout: 244 seconds]
hhdave has quit [Ping timeout: 258 seconds]
JohnMS_WORK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
rixard has joined #lisp
hhdave has joined #lisp
<beach> Interesting. Once we get Second Climacs working, things like FORWARD-EXPRESSION and BACKWARD-EXPRESSION will rely on the result of a call to READ, so they can have unbalanced parentheses, brackets, whatever, in them.
<beach> ... and spaces, if that is how the readtable is defined.
rixard has quit [Quit: (eq status leaving) T]
hhdave has quit [Ping timeout: 258 seconds]
hhdave_ has joined #lisp
<jackdaniel> beach: I think that this error was paredit-specific - its sole purpose is to keep parentheses balanced and to make navigating between them easier
hhdave_ has quit [Ping timeout: 248 seconds]
<jackdaniel> as in: feature not a bug
q3d has joined #lisp
varjag has joined #lisp
gxt has quit [Quit: WeeChat 2.4]
<beach> I see.
hhdave has joined #lisp
ym555 has joined #lisp
ym555 has quit [Client Quit]
lnostdal has quit [Ping timeout: 248 seconds]
lnostdal has joined #lisp
<oni-on-ion> paredit's sole purpose to keep parentheses balanced? heh.
hhdave has quit [Ping timeout: 245 seconds]
<oni-on-ion> the error above was undeserved; paredit inserted '[]' just fine. but it was toplevel, and if it were using results of calls to READ, it would work fine if that were a macro, rather than the confusing error; beach 's solution i think is perfect
lnostdal has quit [Excess Flood]
lnostdal has joined #lisp
ravenousmoose has joined #lisp
Lord_of_Life has quit [Ping timeout: 258 seconds]
Lord_of_Life has joined #lisp
pankajgodbole has quit [Ping timeout: 258 seconds]
q3d has quit [Ping timeout: 256 seconds]
hhdave has joined #lisp
CrazyEddy has joined #lisp
m00natic has joined #lisp
libertyprime has joined #lisp
crystalball has joined #lisp
cosimone has joined #lisp
Folkol has quit [Read error: Connection reset by peer]
Folkol has joined #lisp
rgrau has joined #lisp
SaganMan has quit [Ping timeout: 248 seconds]
<LdBeth> I really want Interlisp’s ] closing all parentheses behavior
crystalball has quit []
crystalball has joined #lisp
pierpal has joined #lisp
cosimone has quit [Quit: WeeChat 2.3]
<pjb> LdBeth: beark.
<pjb> LdBeth: You have paredit in emacs!
<pjb> Or even without paredit, emacs blinks the matching parenthesis when closing.
<pjb> M-x customize-variable RET blink-matching-paren RET
<LdBeth> I don’t remember any particular key strokes
<LdBeth> After all a ] is a elegant design but paredit only gets the editor buggy and complex
<shka_> i don't think that ] is an elegant design
<shka_> quite opposite in fact
Roargh has joined #lisp
<no-defun-allowed> yeah, ] is a bit nasty and assymetrical to me
rdh has quit [Ping timeout: 272 seconds]
<ggole> There's some slime function for closing all parens, iirc
<phoe> [
<ggole> Seems it is slime-close-all-parens-in-sexp
pfdietz has joined #lisp
makomo has joined #lisp
<LdBeth> It’s different
<dlowe> you could bind ] to slime-close-all-parens-in-sexp :)
<LdBeth> ([A (B (C D] E) is ((A (B (C D))) E)
<dlowe> hrm. That seems unresolvable without backtracking
<LdBeth> Not ((A (B (C D)))) E >)
<dlowe> oh, nevermind, I see
<dlowe> You could hack the reader to provide that
<dlowe> it'd drive me nuts
<LdBeth> btw if the form is very long blinking match would move back and forth
dddddd has joined #lisp
Ekho has quit [Quit: An alternate universe was just created where I didn't leave. But here, I left you. I'm sorry.]
<ck_> you mean like % in vim?
<pjb> No, don't hack the reader. But indeed, you can bind ] to slime-close-all-parens-in-sexp and be happy forever after.
<pjb> LdBeth: don't write very long forms!
Ekho has joined #lisp
milanj has joined #lisp
<phoe> wait a second, how would you hack the reader
<phoe> a reader macro can't really do that methinks
<phoe> if you have already five recursive READs on the stack, how are you going to resolve those with a single reader macro atop the stack?
Bike has joined #lisp
iovec has quit [Quit: Connection closed for inactivity]
shangul has joined #lisp
<shangul> Hello. What is CL's alternative for matplotlib?
<shangul> It's a plotting library I think
<_death> yay redefinition.. I wrote some function to compute a result recursively and called it with a large problem, and it failed to return instantly with the result.. I noticed I could memoize based on some of the parameters, so while it was running, I added some hash table cache.. as I redefined the function, the call I made instantly returned with the correct result..
<phoe> shangul: bind against mpl, https://github.com/koji-kojiro/matplotlib-cl
<shka_> oh
<shka_> phoe: nice, didn't knew about that
<phoe> shka_: google just told me that
<shangul> phoe, Excuse me
<phoe> shangul: or do you want a portable solution in CL?
<phoe> I don't know if one exists, perhaps #clim is aware of something like that
<shangul> phoe, a portable one. thanks
<shangul> phoe, tell me what to do
<shangul> phoe, tell me where to search
<phoe> I'd possibly start with #clim on Freenode
<shangul> How is that related to plotting?
<phoe> I remember someone over there working on plots recently - they could be able to help you better than me
<phoe> or this
glv has joined #lisp
Arcaelyx has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
wigust has quit [Ping timeout: 248 seconds]
wigust has joined #lisp
sz0 has quit [Quit: Connection closed for inactivity]
Krystof has quit [Ping timeout: 258 seconds]
FreeBirdLjj has joined #lisp
jprajzne has quit [Quit: Leaving.]
FreeBirdLjj has quit [Ping timeout: 272 seconds]
warweasle has joined #lisp
libertyprime has quit [Ping timeout: 244 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
crystalball has quit []
donotturnoff has joined #lisp
nimiux has joined #lisp
nimiux has quit [Client Quit]
<Kabriel_> shangul: some on this channel use gnuplot; I think sjl has a lisp utility function to interface with an external gnuplot process.
v88m has quit [Ping timeout: 245 seconds]
<karayan> Hello all, Lisp beginner here, please let me know some good Lisp projects to read source code. Thanks.
<phoe> karayan: anything in particular you'd like to read?
warweasle has quit [Quit: meeting]
<Kabriel_> I went through a lot of the projects on cliki a few months ago, but most seem abandoned. I tried using vgplot and http://quickdocs.org/eazy-gnuplot/ with limited success.
<karayan> @phoe anything beginner friendly
<phoe> I'll do a shameless plug here and offer you https://github.com/sharplispers/split-sequence - the library was mostly rewritten by me some time ago and then heavily reviewed by other people
<phoe> I think it's a decent starting point - the library is relatively small
<karayan> Thanks, how did you all learn programming.. Reading a lot of source?
<Bike> writing more than reading
<Kabriel_> shangul: I have currently resigned myself to using an external plotter for data, with the hope that someday I can write something in McCLIM (https://common-lisp.net/project/mcclim/excite.html)
<phoe> karayan: read some books and other code, write some code, post it to #clschool and/or #lisp for review, modify it accordingly, loop in some way
<phoe> but basically
<Kabriel_> shangul: I would be very interseted if you find something better
<phoe> try to solve some problem using what you already know, post a solution to get it reviewed, get comments about code style/efficiency/algorithmics/idioms/everything, implement them in your code, move on to the next problem when the reviewers are satisfied
<phoe> repeat as you learn new parts of the language and/or libraries and/or frameworks and/or ...
<phoe> that's how I started and got to where I am now
rdh has joined #lisp
<karayan> phoe: Thank you..
<phoe> karayan: no problem, and good luck
<phoe> and whenever you get stuck, ask for help
p9fn has quit [Quit: .]
<phoe> #clschool and #lisp are built for that purpose
dale_ has joined #lisp
dale_ is now known as dale
<karayan> Sure
khisanth_ has quit [Ping timeout: 248 seconds]
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
clothespin has quit [Remote host closed the connection]
<pjb> karayan: you might have fun reading the sources of gsharp.
khisanth_ has joined #lisp
glv has quit [Remote host closed the connection]
ravenousmoose has joined #lisp
<karayan> pjb: Thanks, I will check
rumbler31 has quit [Remote host closed the connection]
ikki has joined #lisp
cosimone has joined #lisp
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FreeBirdLjj has joined #lisp
sjl_ has joined #lisp
Krystof has joined #lisp
varjag has quit [Ping timeout: 248 seconds]
ravenousmoose has joined #lisp
ikki has quit [Ping timeout: 272 seconds]
varjag has joined #lisp
warweasle has joined #lisp
fortitude has joined #lisp
q9929t has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
milanj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 268 seconds]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
ebrasca has quit [Remote host closed the connection]
pierpal has quit [Quit: Poof]
cosimone has quit [Ping timeout: 258 seconds]
pierpal has joined #lisp
cosimone has joined #lisp
FreeBirdLjj has quit [Ping timeout: 246 seconds]
Kabriel_ is now known as Kabriel
ricekrispie2 has joined #lisp
Roargh has quit [Quit: Leaving]
ricekrispie has quit [Ping timeout: 245 seconds]
Nilby has joined #lisp
cracauer has joined #lisp
v88m has joined #lisp
nowhereman has joined #lisp
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhere_man has quit [Ping timeout: 258 seconds]
rixard has joined #lisp
rippa has joined #lisp
shifty has quit [Ping timeout: 245 seconds]
hhdave has quit [Quit: hhdave]
iovec has joined #lisp
rixard has quit [Quit: rixard]
q9929t has quit [Quit: q9929t]
cosimone has quit [Quit: WeeChat 2.3]
mikecheck has quit [Remote host closed the connection]
leb has joined #lisp
Necktwi has joined #lisp
mhd2018 has joined #lisp
lucasb has joined #lisp
leb has quit []
m00natic has quit [Remote host closed the connection]
manualcrank has joined #lisp
DGASAU has joined #lisp
q3d has joined #lisp
cosimone has joined #lisp
nanoz has joined #lisp
q-u-a-n2 has quit [Ping timeout: 245 seconds]
gravicappa has joined #lisp
keep_learning_M has quit [Quit: This computer has gone to sleep]
pfdietz_ has joined #lisp
p9fn has joined #lisp
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
Nilby has left #lisp ["👽愛🆑"]
milanj has quit [Quit: This computer has gone to sleep]
amerlyq has quit [Quit: amerlyq]
meepdeew has joined #lisp
cosimone has quit [Quit: WeeChat 2.3]
polezaivsani has joined #lisp
elinow has joined #lisp
lavaflow has quit [Read error: Connection reset by peer]
lavaflow has joined #lisp
dacoda has joined #lisp
meepdeew has quit [Remote host closed the connection]
vlatkoB has quit [Remote host closed the connection]
gravicappa has quit [Ping timeout: 248 seconds]
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
cosimone has joined #lisp
dacoda has quit [Read error: Connection reset by peer]
cosimone has quit [Client Quit]
cosimone has joined #lisp
_leb has joined #lisp
dacoda has joined #lisp
donotturnoff has quit [Remote host closed the connection]
meepdeew has joined #lisp
donotturnoff has joined #lisp
_leb has quit []
donotturnoff has quit [Remote host closed the connection]
dacoda has quit [Ping timeout: 272 seconds]
terpri has quit [Ping timeout: 248 seconds]
elinow has quit [Read error: Connection reset by peer]
randyjohnson86 has joined #lisp
<randyjohnson86> good afternoon everyone
<randyjohnson86> could one of you kind folk look over this little snippet? https://pastebin.com/yBSKFAAs
<Xach> hi randyjohnson86
<Xach> randyjohnson86: it would be helpful to include a remark about what it is meant to do.
<Bike> you should indent the branches of the if. but yeah, i don't know what this does.
<randyjohnson86> my apologies, the intended output would be the calculated result but as of right now, it simply converts traditional mathematic notation into lisp s expressions
<Bike> (arith-eval '((3 + 7) * 6)) => (* (+ 3 7) 6), i see
<Bike> i think you should allow (arith-eval 4) => 4. this would simplify the cond
<randyjohnson86> I thought it would be lazy to actually include the eval function within my function, but eventually just got stuck; I thought perhaps a funcall or apply would be the right way to go, but as of right now, the final result isn't conducive to either of those functions
<Xach> randyjohnson86: i think it might help understanding if the names were something like left-operand operator right-operand instead of x y z.
polezaivsani has left #lisp ["ERC (IRC client for Emacs 26.1)"]
<randyjohnson86> yes, you are right; that is definitely more clear than x,y,z. bike: could you provide a picture/pastebin of how the if should be indented?
<Bike> generally the branches start where the condition does. so the (list x y z) would line up with the (and (not (listp x)) (not (listp z)))
<Bike> are you using an editor? should take care of that boring stuff for you
<randyjohnson86> currently using emacs
<randyjohnson86> oh, how interesting; so you mean the actual test condition would line up vertically with the 'then' and 'else'?
<Bike> right.
<randyjohnson86> how would you know where the test ends and the then begins?
<pjb> randyjohnson86: I cannot: This page is no longer available. It has either expired, been removed by its creator, or removed by one of the Pastebin staff.
ggole has quit [Quit: Leaving]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
ravndal has quit [Quit: WeeChat 2.4]
<pjb> In: (arith-eval '((3 + 7) * 6)) => (* (+ 3 7) 6) ; the name of the fonction is wrong. It doesn't eval, t converts from infix to prefix.
<Bike> because they're on different lines?
<aeth> pjb: randyjohnson86 uses a timeout of 10 minutes iirc from last time
<pjb> His loss.
<Bike> timeout?
<Bike> oh, the pastebin
<aeth> randyjohnson86: based on your description, it's very similar to what I wrote before in a style similar to my answer yesterday
<aeth> Bike: expiration, I guess
ravndal has joined #lisp
<aeth> I couldn't think of the word
<aeth> randyjohnson86: I solved it basically the same way as my simple-mapcar except I iterated two at a time and special cased the first item. It's only infix that way, though. No - 4 supported.
<randyjohnson86> I apologize for the short pastebin time; here is the revised one with your suggestions: https://pastebin.com/5HbMifzg
cosimone has quit [Quit: WeeChat 2.3]
<aeth> oh, I see, you only go three at a time.
<aeth> I supported 3 or 5 or 7 or ... as long as they used the same operator, e.g. (1 + 3 + 5 + 7)
<Bike> i don't want to harp on the indentation, but i don't get why you'd ask me specifically what i meant, and then ignore it
<randyjohnson86> perhaps I misunderstood, but I thought the revised snippet is the way you suggested. to me, it looks more complicated than my initial attempt as you cannot reasonably discern where the test concludes and the rest of the if begins
<randyjohnson86> if I am mistaken, please correct me as to where I went wrong
meepdeew has quit [Remote host closed the connection]
barrybridgens has joined #lisp
<Bike> the test is "(and (not (listp lh-operand)) (not (listp rh-operand)))", right?
<Bike> and it starts on column, like, eight
<Bike> the then branch is "(list operator lh-operand rh-operand)" and it starts on column four
<Bike> i meant have them both start on column eight
<Bike> or the same column, anyway
<Bike> oh, wait. pastebin's fucking it up
<Bike> you did do what i said, yes
<Bike> sorry for noise
<Josh_2> how do I convert (let* ((x 6)(y (* x x))) (+ x y)) Into lambdas? It's q 3.1 in PAIP
<Josh_2> I tried lots of things but keep getting it wrong
<Josh_2> obv I'm missing something
<Xach> Josh_2: what is one thing you tried?
<Josh_2> I tried more than one thing
<Bike> what is an example of a thing that you tried.
<Josh_2> uuuuhm
<Josh_2> most recent
<Bike> randyjohnson86: the problem with starting the then/else on the same line as the if is that you might have more expressions before or after the if, see.
<Josh_2> ((lambda (x) 6 (lambda (y) (* x x))) (+ x y))\
<Bike> you're mixing up the values with the bodies
<Bike> do you know how you'd do (let ((x 7)) x) as a lambda form?
telnet is now known as uplime
meepdeew has joined #lisp
<Josh_2> ((lambda (x) x) 7)
<Bike> Right. Now, you see how "x" was the body of the original let and now it's the body of a lambda, and 7 was a value and now it's an argument to a lambda.
<Bike> same thing goes for the let*.
<Bike> it might be easier if you convert the let* to nested lets first.
abarbosa has joined #lisp
<moldybits> randyjohnson86: might want to consider not using tabs for indentation
<Josh_2> oof I don't know I will try again when I get back from the gym
<Josh_2> Once I get it it'll be easy xD
<Josh_2> Bike: thanks for the help
meepdeew has quit [Ping timeout: 245 seconds]
<Bike> np
Bike has quit []
<randyjohnson86> thank you all for the help.
randyjohnson86 has quit [Quit: Leaving]
meepdeew has joined #lisp
nckx is now known as god
god is now known as nckx
jmercouris has joined #lisp
meepdeew has quit [Remote host closed the connection]
meepdeew has joined #lisp
barrybridgens has quit [Quit: leaving]
nanoz has quit [Ping timeout: 248 seconds]
notzmv has quit [Ping timeout: 268 seconds]
troydm has joined #lisp
troydm has quit [Client Quit]
meepdeew has quit [Ping timeout: 246 seconds]
troydm has joined #lisp
q3d has quit [Ping timeout: 256 seconds]
kajo has joined #lisp
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
mercourisj has joined #lisp
<mercourisj> is there a way to specify a directory for uiop:run-program? I want to execute 'git show master:file.txt' from a particular dir
jmercouris has quit [Ping timeout: 248 seconds]
<mercourisj> apparently you can specify a path in git show
<mercourisj> so you can say 'git show master:file.txt /path/to/repository'
<Xach> sbcl's run-program supports it but i don't think uiop exposes it.
<mercourisj> probably because it is not available in every implementation
<mercourisj> at least that is why I assume fare would do it
abarbosa has quit [Remote host closed the connection]
<mercourisj> well, here's a problem, git show will always prefer to show the directory that it is instead of accepting a path, maybe I'm doing something incorrect syntactically
<grewal> Could you execute sh -c "cd dir && git show"
Bike has joined #lisp
<mercourisj> grewal: that seems to work indeed!
<mercourisj> thanks
troydm has joined #lisp
meepdeew has joined #lisp
abarbosa has joined #lisp
igemnace has quit [Quit: WeeChat 2.4]
meepdeew has quit [Remote host closed the connection]
sjl_ has quit [Ping timeout: 272 seconds]
<moldybits> how can several quicklisp projects share the same directory? most files are shared between them.
<mercourisj> moldybits: what is the question exactly?
<moldybits> i have a game that supports several frameworks for drawing. they cannot be loaded at the same time, so i'd want (ql:quickload game/sdl) and (ql:quickload game/gamekit) but i don't want two separate directories for the projects since almost all files/resources are the same.
abarbosa has quit [Remote host closed the connection]
<moldybits> alternatively picking the framework to use after loading it
<aeth> moldybits: that would be one project, but multiple systems
<aeth> moldybits: you just want to make multiple ASDF systems
<moldybits> would they have to be defined in the same file?
<aeth> I'm not sure. When I want multiple ASDF systems, I use package-inferred-system. https://davazp.net/2014/11/26/modern-library-with-asdf-and-package-inferred-system.html
<aeth> That would almost certainly be overkill, though.
<aeth> It makes everything its own system.
<aeth> e.g. every file and directory
<moldybits> quicklisp and asdf seem so complex for some reason :(
<aeth> So I guess they can be defined in the same .asd file, since that's just an abstraction over asdf:defsystem
<aeth> moldybits: Building is always complex.
<aeth> (And unit tests are often harder than the program itself.)
<mercourisj> moldybits: they are compelx
kajo has quit [Ping timeout: 246 seconds]
<mercourisj> s/compelx/complex
kajo has joined #lisp
<White_Flame> moldybits: before loading, you could set something on *features*, then #+ that selection in your dependency list
<White_Flame> in the .asd file
<White_Flame> or your first loaded file could perform a runtime selection and do a ql:quickload itself
sjl has quit [Quit: WeeChat 2.2-dev]
<White_Flame> or you could just load your chosen drawing framework first, then your main project, which has no direct dependency on them but requires one of them be loaded first :-P
<aeth> Well, the way I'd do it is require game/backend1 or game/backend2 where game is just game/backend1 (which will be the default).
<aeth> s/require/require the user to load/
orivej has quit [Ping timeout: 258 seconds]
<White_Flame> if you change from the defsystem macro to the register-system-definition function, then your dependencies will be evaluated and you can do more normal inline tests there, too
Lord_of_Life_ has joined #lisp
<moldybits> :s
<aeth> moldybits: what makes this hard is that there's complex dependencies... and it's just the nature of the problem
<moldybits> i tried defining another system in the same .asd file, and now if i quickload the game first i'm then able to load the other system, which depends on it
<moldybits> (and this seems to "work" ...)
<aeth> Actually, now that I think about it, it's quite common to have two system definitions in a file, one for "regular" and one for tests.
Lord_of_Life has quit [Ping timeout: 246 seconds]
Lord_of_Life_ is now known as Lord_of_Life
makomo has quit [Ping timeout: 258 seconds]
<moldybits> game.asd: (asdf:defsystem #:game ...) (asdf:defsystem #:game/sdl :depends-on (#:lispbuilder-sdl ...) :components (...)) (asdf:defsystem #:game/gamekit ...)
<moldybits> wow, i don't even need to load the game itself first now
<moldybits> this is a lot more convenient than editing the .asd manually :)
<White_Flame> I tend to put scripts in my .sbclrc for loading stuff that isn't a simple quickload
<White_Flame> especially since it's appropriate to put hardcoded paths in there
milanj has joined #lisp
gareppa has joined #lisp
mercourisj has quit [Remote host closed the connection]
gareppa has quit [Remote host closed the connection]
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
wxie has joined #lisp
mhd2018 has quit [Ping timeout: 245 seconds]
wxie has quit [Quit: wxie]
nanoz has joined #lisp
_leb has joined #lisp
libertyprime has joined #lisp
quazimodo has joined #lisp
_whitelogger has joined #lisp
lnostdal has quit [Ping timeout: 246 seconds]
lnostdal has joined #lisp
_leb has quit []
Lycurgus has joined #lisp
_whitelogger has joined #lisp