jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | offtopic --> #lispcafe
phantomics has joined #lisp
lotuseater has joined #lisp
kaftejiman__ has quit [Ping timeout: 240 seconds]
jprajzne1 has quit [Quit: Leaving.]
surabax has quit [Quit: Leaving]
jeosol has quit [Remote host closed the connection]
Necktwi has quit [Ping timeout: 264 seconds]
lotuseater has quit [Remote host closed the connection]
momus has quit [Read error: Connection reset by peer]
EvW has quit [Ping timeout: 264 seconds]
momus has joined #lisp
Jeanne-Kamikaze has joined #lisp
EvW has joined #lisp
Necktwi has joined #lisp
IPmonger_ has joined #lisp
IPmonger has quit [Ping timeout: 260 seconds]
macdavid313 has quit [Remote host closed the connection]
shifty has quit [Ping timeout: 260 seconds]
cosimone has joined #lisp
asdflkj has quit [Ping timeout: 260 seconds]
IPmonger_ has quit [Ping timeout: 264 seconds]
lotuseater has joined #lisp
momus has quit [Ping timeout: 256 seconds]
<lotuseater> how and when do you use DYNAMIC-EXTENT ? :)
<save-lisp-or-die> there's a cool use for when you want to stack allocate a value http://www.sbcl.org/manual/#Dynamic_002dextent-allocation for efficiency reasons.
<lotuseater> yes I first read about it in the Google CL Style Guide
johnjay has quit [Ping timeout: 272 seconds]
<save-lisp-or-die> So if you're consing a tonne of memory in a hot loop that the garbage collector is hiccuping to free, stack allocation might be useful there.
<save-lisp-or-die> (but i'm just talking out of my ass. and I defer to wiser typers)
johnjay has joined #lisp
<no-defun-allowed> Well, allocation with a moving GC is almost comparable to stack allocation. It's sometimes useful, but I don't bother with dynamic-extent.
<save-lisp-or-die> does ECL respect it? I could see maybe on resource constrained devices it might be useful.
tempest_nox has quit [Remote host closed the connection]
<no-defun-allowed> Some testing at the REPL says there's no performance benefit.
<save-lisp-or-die> ah well, just a thought.
<no-defun-allowed> I am not sure if ECL is the right implementation with small resources; don't you either need a C99 compiler or bytecode interpreting?
<mfiano> The standard doesn't concern itself with stack-allocation.
Demosthenex has quit [Ping timeout: 260 seconds]
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 256 seconds]
<no-defun-allowed> Also, see "Garbage collection can be faster than stack allocation" <ftp://ftp.cs.princeton.edu/reports/1986/045.pdf>. That should be read with heavy emphasis on "can".
<mfiano> Additionally, implementations need only to honor NOTINLINE, and SPECIAL declarations, and conform to the safety rules for OPTIMIZE
Demosthenex has joined #lisp
<no-defun-allowed> If you can free enough in one GC cycle, it eventually becomes faster to not un-bump the stack pointer.
<save-lisp-or-die> no-defun-allowed cool paper, thanks for digging it up.
<no-defun-allowed> But really, the memory overhead for that to happen is ridiculous. The moral of the story is everthing is a time-space-sanity tradeoff.
<lotuseater> what SPECIAL declaration for a parameter fully means I'm also not aware of yet
<lotuseater> but sorry if my questions seem silly to you :/
<no-defun-allowed> (And Firefox crashed after sending that. I'm not one for conspiracy theories though.)
<no-defun-allowed> No, they're not silly.
<save-lisp-or-die> lol
<save-lisp-or-die> (lol was re: firefox conspiracy)
<no-defun-allowed> The SPECIAL declaration means that variable will use dynamic binding, instead of lexical (like you usually expect, and is default in Common Lisp). I usually prefer to write (defvar *foo*) to make *foo* a special variable though.
<lotuseater> so it can't be shadowed in a LET statement?
<no-defun-allowed> It can be shadowed in a LET form, but the way it shadows is different.
<lotuseater> ah okay
<lotuseater> I also look to use earmuffs for parameters
<no-defun-allowed> Usually people write a program like this to demonstrate: (let ((x 3)) (defun g () x)) (defun f () (let ((x 2)) (g)))
<lotuseater> let me try ...
<no-defun-allowed> If X is lexically bound, then (F) returns 3. If X is dynamically bound, it returns 2.
<lotuseater> phew
<no-defun-allowed> Dynamic binding will give you the last value bound, no matter where it's bound; and lexical binding will give you the last binding you can see where the variable is used.
<lotuseater> okay good to know
<no-defun-allowed> For example, *standard-output* is a special variable. If I evaluate (with-output-to-string (*standard-output*) (room)), it will be bound to the string output stream WITH-OUTPUT-TO-STRING makes, and ROOM will write to that.
wglb`` has joined #lisp
<lotuseater> yes I used that some times to write outputs to files
<lotuseater> or if you do something like (let ((*print-base* 16)) ...) or (let ((*gensym-counter* 1)) ...)
devon has quit [Remote host closed the connection]
wglb` has quit [Ping timeout: 264 seconds]
Necktwi has quit [Ping timeout: 256 seconds]
EvW has quit [Ping timeout: 260 seconds]
wxie has joined #lisp
toorevitimirp has joined #lisp
kir0ul_ has quit [Ping timeout: 256 seconds]
PuercoPop has joined #lisp
Necktwi has joined #lisp
woudshoo has joined #lisp
jeosol has joined #lisp
woudshoo has left #lisp ["ERC (IRC client for Emacs 27.0.50)"]
Stanley00 has joined #lisp
matta has quit [Remote host closed the connection]
rpg has joined #lisp
dbotton has quit [Quit: Leaving]
tempest_nox has joined #lisp
shifty has joined #lisp
zcheng3 has quit [Ping timeout: 260 seconds]
dilated_dinosaur has quit [Ping timeout: 256 seconds]
yokan has joined #lisp
yokan has left #lisp [#lisp]
Necktwi has quit [Ping timeout: 264 seconds]
Necktwi has joined #lisp
dilated_dinosaur has joined #lisp
wxie has quit [Ping timeout: 246 seconds]
torbo has quit [Remote host closed the connection]
torbo has joined #lisp
wxie has joined #lisp
torbo has quit [Remote host closed the connection]
Alfr_ has joined #lisp
<beach> Good morning everyone!
<lotuseater> ohai beach here it is 5am :)
Alfr has quit [Ping timeout: 260 seconds]
<phantomics> Morning beach
quazimodo has quit [Read error: Connection reset by peer]
<phantomics> A question about SICL: what kind of support will it have for ASM generation? Anything like define-vop in SBCL?
<beach> phantomics: Tough question. I don't know what DEFINE-VOP does in SBCL.
<beach> phantomics: Since all the stages are programmable, it should be possible to customize at will.
<phantomics> Lets you implement functions in assembly: https://pvk.ca/Blog/2014/08/16/how-to-define-new-intrinsics-in-sbcl/
<beach> Let me read that...
<lotuseater> ah that blog has nice articles, eg "all you need is call/cc"
<phantomics> I'm looking into it to optimize my project; unfortunately, it will only work under SBCL and there's no ASM generation faculty that works across implementations
<beach> phantomics: I have not thought of a similar way in SICL. However, since code generation is done with generic functions that take a CLIENT object that can be specialized to, then code generation is very easy to customize.
<phantomics> Excellent
<beach> phantomics: It is also easy to define new IR instruction classes, new AST classes, and new primitive operations (primops) to use at the source level. I do that all the time.
<beach> Since SICL uses the Cleavir compiler framework, and Cleavir was designed to be implementation independent, we designed it from the start to be extremely flexible and adaptable to different implementations.
<beach> That same feature makes it easy to customize for other purposes.
<beach> But I haven't given enough thought to a consistent protocol for tweaking code generation within an implementation.
<Bike> right now cleavir doesn't really cover any equivalent to the VOP stage, i don't think
<beach> True, Cleavir kind of stops at the HIR level.
Bike has quit [Quit: leaving]
cosimone has quit [Quit: cosimone]
kir0ul_ has joined #lisp
<lotuseater> so with this DEFINE-VOP i can control compilation down to assembly?
wxie has quit [Ping timeout: 272 seconds]
<phantomics> Yes, although documentation is sparse
<phantomics> You can see a lot of define-vop examples in this directory: https://github.com/sbcl/sbcl/tree/master/src/compiler/x86-64
<phantomics> You can see optimized functions for handling arithmetic, arrays, etc. It's the x86-64 specific stuff, in the neighboring directories you can see implementations for ARM, Power, RISC-V, etc.
<lotuseater> the more I get to know the less it seems to be I know o_O
<lotuseater> and internet is slow again at the moment ...
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<pillton> I need help figuring out the noun for something. Assume X is an instance of the class C. (apply #'F X args) returns Y and (funcall (apply #'F C args) X) returns Y. Is there a noun which describes the function F?
<pillton> The closest thing I have found is lazy evaluation but I am not sure if that is correct.
<beach> Yeah, that's not quite right.
<lotuseater> ok hm I associate lazy evaluation with stuff not done until needed
<beach> pillton: It looks closer to currying to me.
<beach> The function F is a bit strange since it can take arguments of different "meta" levels.
<pillton> Knowledge of the class C is important. I was wondering if Cleavir would be useful for optimising the graph generated by successive compositions e.g. (funcall (optimize-computation (apply #'G (apply #'F C args) args2))).
<pillton> Sorry. Knowledge of the class C and the args is important.
<beach> I have no idea. I haven't even finished my morning coffee yet.
<pillton> No worries. I have lost track of the time and I need to pick up kids. I'll be back in a bit.
<beach> Take care.
<lotuseater> speaking of currying and nouns, did you know, another noun for it is Schönfinkeln :)
<lotuseater> yes please stay healthy
bilegeek has quit [Quit: Leaving]
quazimodo has joined #lisp
wxie has joined #lisp
Krystof has quit [Ping timeout: 240 seconds]
galex-713 has quit [Ping timeout: 272 seconds]
galex-713 has joined #lisp
Jeanne-Kamikaze has quit [Quit: Leaving]
PuercoPop has quit [Quit: WeeChat 2.8]
gzj has joined #lisp
janislago has joined #lisp
<janislago> evening
<beach> Hello janislago.
<janislago> hows this evening been yall
<beach> Strange question since not everyone is in the same time zone.
<janislago> kind of a slow hour i guess
<beach> janislago: Are you new here? I don't recognize your nick.
<janislago> yeah im quite new here
<beach> Great! Welcome!
<janislago> only been programming cl for a month or so
<janislago> i joined recently nicknamed janis
<beach> Oh, OK.
<janislago> but im doing this just for clarity and to give myself a readily identifiable name i suppose
<janislago> thats the idea
<janislago> i also make music as janis lago
<janislago> hence the choice
<janislago> im also new to irc as a whole
<janislago> like right now im chatting from emacs LOL
<beach> I think using an Emacs IRC client is a good idea.
<beach> That way you have your usual abbrevs, spell checker, whatever.
<janislago> yep!
<janislago> im also relatively new to emacs but im getting the gist
<janislago> its very late where i live
<janislago> midnight-y
<janislago> 00:57
<lotuseater> janislago I'm also very fresh joined here :)
<janislago> wo you reminded me of someone for a second
<janislago> im sure youre not them though
<janislago> nice to meet ya
<lotuseater> no i don't think so
<lotuseater> the nick is also "new" since half a year
<janislago> aye
<janislago> youre definitely not the one i was thinking of then
<lotuseater> oh noez I meant "for half a year"
<janislago> i understood what you meant dw
<janislago> hope we see each other often here
<lotuseater> yes why not? :)
<lotuseater> and if you have questions you can also query
<beach> You should know that #lisp is fairly strict with staying on topic. There is #lispcafe for idle chatting.
<beach> Just saying...
<janislago> i gotcha
<janislago> was just about to mention that emacs lisp is a little weird when youre adjusted to cl
<janislago> like having no loop macro
<beach> We don't care. :)
<janislago> i'll head to lispcafe
<janislago> ah and i dont have registration
<janislago> i'll just head someplace else fttb
<beach> janislago: So what material are you using for learning Common Lisp?
<lotuseater> ah that interests me too
<janislago> mostly teaching myself from trial and error honestly
<janislago> i learned ableton live that way
<beach> janislago: You need to be a little bit careful with that approach. Common Lisp has several implementations that behave differently, and lots of behavior is unspecified by the standard, so you may accidentally produce non-conforming code without knowing it.
<janislago> yeah LOL
<janislago> ive mostly been working with ecl and mkcl
<janislago> need to try out installing some other implementations that are more supported
<beach> ECL is supported.
<janislago> true but it bugs out on windows
<beach> In fact, the maintainer is very present here.
igemnace has quit [Remote host closed the connection]
<janislago> could you relay to them that on windows 7 and probably later versions, there is an error with attempting to access files via (load) where an error signals for "the operation completed successfully." this occurs both when running as admin and running as a normal user
<beach> I think jackdaniel will read it himself when he wakes up.
<janislago> alright thank you very much
<beach> Though, I am always surprised to learn that there are still people using Windows.
<janislago> yeah its not my first choice for programming but win7 runs incredibly well even in 2020
<janislago> the same cannot be said for win10
<phantomics> Windows 7 is still usable? Do you have to stick to old hardware?
<janislago> im on a dell latitude e5500
<phantomics> Dunno how new that is
<lotuseater> Bill Gates still gets updates for Windows XP.
<janislago> its utterly ridiculous how usable win7 is
<janislago> in 2020
<phantomics> What, is that what he uses on his PC?
<janislago> youre joking
<janislago> he so doesnt use winxp
janislago has quit [Quit: ERC (IRC client for Emacs 27.1)]
<lotuseater> phantomics no, Win 3.1 for playing DOOM
zagura has quit [Ping timeout: 246 seconds]
zagura has joined #lisp
skapata has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 246 seconds]
andreyorst has joined #lisp
andreyorst is now known as andreyorst_
aartaka_d has joined #lisp
Cymew has joined #lisp
supercoven has joined #lisp
aartaka has quit [Ping timeout: 240 seconds]
gioyik has quit [Quit: WeeChat 3.0]
zagura has quit [Ping timeout: 272 seconds]
zagura has joined #lisp
narimiran has joined #lisp
epony has quit [Ping timeout: 240 seconds]
momus has joined #lisp
aorst has joined #lisp
<exit70[m]> core 2 duo is still kinda usable today
<exit70[m]> someone sold me core 2 duo mobo+cpu+ram for 10 bucks awhile ago
<lotuseater> yes and with SSD much better
kir0ul_ has quit [Ping timeout: 256 seconds]
rippa has joined #lisp
gaqwas has joined #lisp
treflip has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rippa has joined #lisp
karlosz has quit [Ping timeout: 264 seconds]
shka_ has joined #lisp
random-nick has joined #lisp
aorst is now known as andreyorst`
andreyorst` has quit [Quit: andreyorst`]
andreyorst` has joined #lisp
tempest_nox has quit [Remote host closed the connection]
andreyorst` has quit [Client Quit]
aorst has joined #lisp
aorst is now known as andreyorst`
andreyorst` has quit [Read error: Connection reset by peer]
andreyorst` has joined #lisp
andreyorst` has quit [Read error: Connection reset by peer]
andreyorst` has joined #lisp
hiroaki has joined #lisp
Krystof has joined #lisp
liberliver has joined #lisp
zagura has quit [Ping timeout: 246 seconds]
zagura has joined #lisp
momus has quit [Read error: Connection reset by peer]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
gzj has quit [Remote host closed the connection]
jeosol has quit [Ping timeout: 245 seconds]
momus has joined #lisp
leo_song_ has joined #lisp
leo_song has quit [Ping timeout: 240 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
jprajzne has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
gproto23 has joined #lisp
gproto23 has quit [Client Quit]
gproto23 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
epony has joined #lisp
gproto23 has quit [Remote host closed the connection]
gproto23 has joined #lisp
gproto023 has joined #lisp
gproto23 has quit [Ping timeout: 240 seconds]
leo_song has joined #lisp
leo_song_ has quit [Ping timeout: 260 seconds]
gproto023 is now known as gproto23
gaqwas has quit [Remote host closed the connection]
pve has joined #lisp
momus has quit [Quit: Lost terminal]
<phoe> good morning
<beach> Hello phoe.
<phoe> hey Robert
<no-defun-allowed> Hello phoe.
hendursa1 has joined #lisp
ljavorsk has joined #lisp
hendursaga has quit [Ping timeout: 240 seconds]
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
pankajsg has quit [Ping timeout: 272 seconds]
gproto23 has quit [Ping timeout: 256 seconds]
treflip has quit [Quit: WeeChat 2.6]
dreamcompiler_ has joined #lisp
dreamcompiler has quit [Read error: Connection reset by peer]
dreamcompiler_ is now known as dreamcompiler
surabax has joined #lisp
datajerk has quit [Ping timeout: 260 seconds]
datajerk has joined #lisp
pankajsg has joined #lisp
ebrasca has joined #lisp
ldbeth has joined #lisp
<ldbeth> doog evensing
<phoe> Doog Evensing sounds like a shady background character in some pulp fiction novel
wxie has quit [Ping timeout: 240 seconds]
gzj has joined #lisp
shifty has quit [Ping timeout: 256 seconds]
andreyorst has joined #lisp
ldbeth has quit [Ping timeout: 260 seconds]
ldbeth has joined #lisp
pankajsg has quit [Ping timeout: 240 seconds]
ldbeth has quit [Ping timeout: 246 seconds]
imode has quit [Ping timeout: 240 seconds]
ldbeth has joined #lisp
pankajsg has joined #lisp
ldbeth has quit [Ping timeout: 260 seconds]
andreyorst has quit [Ping timeout: 264 seconds]
ldbeth has joined #lisp
lotuseater has quit [Ping timeout: 245 seconds]
<beach> Wow, that was a scary bug. In SBCL I did (make-instance 'standard-generic-function :lambda-list '(x)) and initialize-instance signaled an error that the value of the :METHOD-COMBINATION initialization argument had to be a method-combination object, but that instead it was... the STANDARD method-combination object. Restarting SBCL made the problem go away.
andreyorst_ has quit [Ping timeout: 256 seconds]
andreyorst has joined #lisp
<beach> The combination of bugs like this (SBCL or my code, doesn't matter much) and inadequate tools for finding the problems makes the task of development less pleasant than it could be, and certainly way more time consuming.
ldbeth has quit [Ping timeout: 240 seconds]
andreyorst has quit [Ping timeout: 240 seconds]
andreyorst has joined #lisp
<ck_> Were these types of one-off mystery bugs always around like that, or do you think these situations have become more frequent?
ldbeth has joined #lisp
<beach> I have no reason to believe that they are more frequent now than before.
<ck_> Increased project size that comes with more powerful environments and more people with access to them might be a conceivable reason
<beach> Sure. I have no hard evidence that it is a problem with SBCL. But I couldn't guess what I could have done myself to make it happen.
notzmv has quit [Remote host closed the connection]
<beach> My favorite reason is to blame too complex code, due to many decades of modifications.
andreyorst has quit [Ping timeout: 240 seconds]
yitzi has quit [Quit: yitzi]
<beach> Time for a lunch break to contemplate these things.
ldbeth has quit [Ping timeout: 256 seconds]
<ck_> Oh I see, the question wasn't meant to be sbcl specific. Bon appetit.
ldbeth has joined #lisp
aeth_ has joined #lisp
Aurora_v_kosmose has quit [Remote host closed the connection]
Aurora_v_kosmose has joined #lisp
aeth has quit [Disconnected by services]
aeth_ is now known as aeth
ldbeth has quit [Ping timeout: 240 seconds]
aartaka_d has quit [Ping timeout: 256 seconds]
lotuseater has joined #lisp
notzmv has joined #lisp
andreyorst has joined #lisp
vegansbane has quit [Quit: The Lounge - https://thelounge.chat]
gzj has quit [Remote host closed the connection]
gzj has joined #lisp
gzj has quit [Remote host closed the connection]
gzj has joined #lisp
shifty has joined #lisp
aartaka has joined #lisp
Necktwi has quit [Ping timeout: 240 seconds]
<shka_> mysterious bugs
<jmercouris> as mysterious as the night
kaftejiman has joined #lisp
shifty has quit [Ping timeout: 260 seconds]
Necktwi has joined #lisp
Codaraxis has quit [Ping timeout: 240 seconds]
vegansbane has joined #lisp
Codaraxis has joined #lisp
<flip214> Is there a macro like DESTRUCTURING-BIND that takes an alist in instead of a plist?
<phoe> I'm not aware of one; plists are convenient because they map to &key
<phoe> but there's no equivalent for alists
<phoe> s/equivalent/equivalent lambda list keyword/
<jmercouris> I guess one could transform them
* phoe waits for someone to suggest adding &assoc to the language
zaquest has quit [Quit: Leaving]
<jackdaniel> otoh alists are easier to access with functions like find (thanks to the key argument)
<flip214> well, it's a simple macro to convert into a set of LET bindings with CDR ASSOC...
Codaraxis has quit [Remote host closed the connection]
Codaraxis has joined #lisp
<phoe> that only works if keys are symbols adequate for binding
<phoe> and that means that you want a particularly specialized alist
<phoe> in plists, keys are traditionally symbols; that's not the tradition in alist
<phoe> s/alist/alists
<jackdaniel> flip214: for matching alists you probably want a pattern matcher
<jackdaniel> like trivia/optima
<flip214> jackdaniel: not matching, just (destructuring-alist (foo bar baz) (function-returning-an-alist) ....)
<jackdaniel> could you elaborate? (destructuring-alist (foo bar baz) '((foo bar baz)) ...) ;?
<jackdaniel> because I'm not sure what foo bar baz are bound to
Codaraxis has quit [Remote host closed the connection]
<jackdaniel> or '((foo 1 2 3) (bar a b c) (baz x y z)) ;?
<jackdaniel> and foo is bound then to (foo 1 2 3) etc
<phoe> should foo bar baz be evaluated or taken as literals? (I assume the latter)
<phoe> I understand the syntax to be like (d-a (foo bar baz) '((foo . 1) (bar . 2) (quux . 42) (foo . :one) (baz . 3)) ...)
Codaraxis has joined #lisp
Codaraxis has quit [Remote host closed the connection]
<jackdaniel> http://turtleware.eu/static/paste/8fd194b3-foo.txt (to render in the browser)
<jackdaniel> I don't think that destructuring is a good name though
<jackdaniel> unsplicing-alist ;? exposing-alist ;?
<jackdaniel> unrolling! :)
<phoe> dissociating
<lotuseater> so alists were for example like '((1 . #\a) (2 . #\b) (3 . #\c))
<jackdaniel> things are still associated, but they are not in a list
<jackdaniel> lotuseater: then you would need a better means to provide names for variables
<jackdaniel> (and to signify, what should be bound to each)
gproto23 has joined #lisp
<flip214> well, I guess the name syntax could be extended, again in analogy to lambda parameter lists...
<flip214> (whatever-its-called ((foo 1) (bar "aa")) '(("aa" . 7) (1 . :none)) ...)
<flip214> would get me foo as 7 and bar as :none
<phoe> (let ((foo (assoc-value alist 1)) (bar (assoc-value alist "aa" :test #'equal))) ...)
<jackdaniel> I don't understand the example above (nor why bar would give you :none)
<phoe> jackdaniel: test was eql
<jackdaniel> (eql 'bar 'bar) ;- T?
<phoe> jackdaniel: (eql "aa" "aa")
<jmercouris> (equal "aa" "aa")
<phoe> bar is the bound variable, "aa" is the intermediate key, 7 is the value
<jackdaniel> ah, there was a closing paren
<phoe> flip214: you can already get what you want with LET over ASSOC-VALUE; I guess you can write a tiny macro to abstract the syntax
<phoe> s/abstract/abstract away/
<phoe> but I don't really see the point because you will still need to provide both the variable and the alist key
<phoe> and, in the worst case, the test
<phoe> so LET over a list of explicit ASSOC-VALUEs might still be good enough in the general case
Stanley00 has quit [Remote host closed the connection]
iskander has quit [Quit: bye]
<flip214> phoe: but at least I don't have to write assoc, the test, etc., N times (for each binding!)
<flip214> never mind
<phoe> flip214: if the test is the same then it can be provided only once
<phoe> ...if you write a macro, that is
<flip214> yeah, right ;)
iskander has joined #lisp
galex-713 has quit [Ping timeout: 272 seconds]
orivej has joined #lisp
galex-713 has joined #lisp
iamFIREc1 has quit [Quit: WeeChat 2.9]
EvW has joined #lisp
ebrasca has quit [Remote host closed the connection]
varjag has joined #lisp
ebrasca has joined #lisp
dyelar has joined #lisp
tfb has joined #lisp
Bike has joined #lisp
gko has joined #lisp
EvW has quit [Quit: EvW]
gko`` has joined #lisp
EvW has joined #lisp
Cymew has quit [Quit: Konversation terminated!]
FreeBirdLjj has joined #lisp
gko` has quit [Ping timeout: 264 seconds]
Cymew has joined #lisp
gareppa has joined #lisp
scymtym has quit [Ping timeout: 260 seconds]
gko`` has quit [Ping timeout: 264 seconds]
gko```` has joined #lisp
kaftejiman_ has joined #lisp
kaftejiman has quit [Ping timeout: 246 seconds]
supercoven has quit [Ping timeout: 240 seconds]
galex-713 has quit [Quit: No Ping reply in 180 seconds.]
galex-713 has joined #lisp
gko```` has quit [Ping timeout: 264 seconds]
gko`````` has joined #lisp
zaquest has joined #lisp
leo_song has quit [Ping timeout: 256 seconds]
gareppa has quit [Quit: Leaving]
Cymew has quit [Ping timeout: 256 seconds]
gko`````` has quit [Ping timeout: 264 seconds]
Cymew has joined #lisp
scymtym has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
cosimone has joined #lisp
gzj has quit [Remote host closed the connection]
gzj has joined #lisp
gzj has quit [Remote host closed the connection]
gzj has joined #lisp
gzj has quit [Remote host closed the connection]
gzj has joined #lisp
gzj has quit [Remote host closed the connection]
gzj has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
gzj has quit [Remote host closed the connection]
hendursa1 has quit [Quit: hendursa1]
tfb has quit [Remote host closed the connection]
hendursaga has joined #lisp
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
ooEld has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
EvW has quit [Ping timeout: 260 seconds]
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
kir0ul_ has joined #lisp
tfb has quit [Remote host closed the connection]
tfb has joined #lisp
tfb has quit [Ping timeout: 264 seconds]
supercoven has joined #lisp
supercoven has quit [Max SendQ exceeded]
supercoven has joined #lisp
supercoven has quit [Max SendQ exceeded]
dbotton has joined #lisp
supercoven has joined #lisp
supercoven has quit [Max SendQ exceeded]
supercoven has joined #lisp
supercoven has quit [Max SendQ exceeded]
supercoven has joined #lisp
supercoven has quit [Max SendQ exceeded]
EvW has joined #lisp
bitmapper has quit [Quit: Connection closed for inactivity]
dbotton_ has joined #lisp
gproto23 has quit [Ping timeout: 240 seconds]
dbotton has quit [Ping timeout: 256 seconds]
tfb has joined #lisp
pankajsg has quit [Remote host closed the connection]
pankajsg has joined #lisp
dbotton_ has quit [Ping timeout: 272 seconds]
chrpape has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
galex-713 has quit [Ping timeout: 272 seconds]
chrpape has joined #lisp
ljavorsk has quit [Ping timeout: 240 seconds]
kaftejiman_ has quit [Quit: Leaving]
ooEld has left #lisp ["ByrdIRC"]
EvW has quit [Ping timeout: 240 seconds]
aartaka has quit [Read error: Connection reset by peer]
galex-713 has joined #lisp
Fare has joined #lisp
<Kabriel> flip214: Touretzky's book gives an example macro destructuring (like I think you are talking about) on page 431.
<Kabriel> He uses nested lists, but the destructuring works with dotted lists as well.
<Kabriel> like this https://dpaste.com/88433HBVM
<Kabriel> Sometimes I use destructing in the loop macro as well, with either local variable initialization (loop with (x . y) = (first alst) ...) or stepping (loop for (x . y) in alst ...) etc.
nkatte has joined #lisp
<Kabriel> CLHS 6.1.1.7 talks about it a little bit.
aartaka has joined #lisp
gko` has joined #lisp
ebrasca has quit [Remote host closed the connection]
nkatte has quit [Ping timeout: 272 seconds]
gko_ has joined #lisp
nkatte has joined #lisp
gko has quit [Ping timeout: 260 seconds]
toorevitimirp has quit [Remote host closed the connection]
gko_ has quit [Ping timeout: 272 seconds]
neirac has quit [Remote host closed the connection]
rpg has joined #lisp
sjl_ has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
tfb has quit []
amb007 has joined #lisp
<eta> what happened to quickdocs.org?
<jackdaniel> some people complained that it is very outdated and convinced the author to take the website down afaik
<eta> hrm, sounds like a net loss
<phoe> eta: quickref
amb007 has quit [Read error: Connection reset by peer]
<nkatte> Drama thread btw
<eta> nkatte, yeah I just realised that thread has been hexstreamed (tm)
<eta> phoe, cheers
amb007 has joined #lisp
__jrjsmrtn__ has joined #lisp
<eta> phoe, (also wrt hexstream, he's definitely violating most of https://docs.github.com/en/free-pro-team@latest/github/site-policy/github-acceptable-use-policies if that's useful)
_jrjsmrtn has quit [Ping timeout: 260 seconds]
zcheng3 has joined #lisp
saganman has quit [Ping timeout: 256 seconds]
<phoe> eta: I'm aware.
miasuji has joined #lisp
Steeve has joined #lisp
andreyorst` has quit [Quit: andreyorst`]
Stanley00 has joined #lisp
aeth_ has joined #lisp
aeth has quit [Disconnected by services]
aeth_ is now known as aeth
gproto23 has joined #lisp
Stanley00 has quit [Ping timeout: 246 seconds]
<jmercouris> I'm trying to remember in the loop macro how to conditionally collect
<jmercouris> is there a collect-if or something?
<beach> when ... collect
<easye> :when something :collect this
<jmercouris> I wrote: (loop for i in (list 1 2 3) when nil collect i)
<jmercouris> isn't there collect-if though?
<beach> No.
<jmercouris> or am I just imagining that it existed
<jmercouris> hm.. :-D
<jmercouris> thank you
sjl_ has quit [Quit: WeeChat 2.3-dev]
<beach> Sure.
<easye> Not in any standard LOOP
<phoe> jmercouris: when ... collect ... is the idiom
<phoe> there's nothing else
loli has quit [Quit: WeeChat 2.9]
loli has joined #lisp
<jmercouris> here's another question
<jmercouris> better to use WITH
<jmercouris> or to use a let around the loop?
<beach> They are equivalent.
<beach> WITH saves an indentation level.
<beach> Horizontal whitespace can be a precious resource.
<phoe> I usually go with WITH, but there's no semantic difference
<_death> there is a COLLECT IT though
<phoe> _death: oh no, anaphora
<jmercouris> hm, I see
<jmercouris> speaking of which, what are anaphoric macros
<jmercouris> I've read several descriptions, but still don't quite get it
<jmercouris> maybe what confuses me about it is the usage of the word "anaphora"
<jmercouris> which seems to be used incorrectly by english speakers
<jmercouris> perhaps I should ignore this word and pretend I don't know it
surabax_ has joined #lisp
<beach> "the use of a word referring back to a word used earlier..."
<beach> Seems right to me.
<jmercouris> it certainly isn't
<jmercouris> it mostly means "in direction", I can't really translate it
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
<jmercouris> like "in this vein" almost
ghard has joined #lisp
<beach> Are you saying that my quotation is wrong?
Lycurgus has joined #lisp
<beach> I typed "define anaphora" to Google.
<jmercouris> that's exactly what I'm saying
<jmercouris> some things cannot be translated
<beach> "translated"?
<beach> I'm confused.
<jmercouris> anaphora is a Greek word
<jmercouris> of which I know the meaning, because I learned it as my first language
<Bike> well, it's also an english word, cos we borrowed it from greek.
<jmercouris> the way english speakers are using it is nonsensical
<beach> Oh, but words change their meanings all the time.
<Bike> and maybe distorted the meaning? i don't know. that happens sometimes.
<jmercouris> it certainly confuses me to no end
<jmercouris> so I am saying, best I pretend I don't know the meaning of the true word
<beach> Take "eventually" in English.
<jmercouris> if I take your translation, it makes sense
surabax has quit [Ping timeout: 260 seconds]
<jmercouris> if I take the real meaning of the word, it makes no sense to me
<beach> If you did that with all imported words, no text would make sense to you.
<_death> so you're saying it's a false friend?
<jmercouris> you could reasonably say it is a false friend because the meaning is too distorted
<jmercouris> this happens often with ancient greek words
<jmercouris> consider the word 'siren'
<beach> _death: It is just that the meanings of words change over time after they have been imported.
<Bike> yeah, it must be confusing with greek, since english uses a lot of words taken from greek
<Bike> but that kind of things happen a lot. my favorite is that "marshal", an extremely high military rank, literally means "horse servant" or "horse keeper"
<jmercouris> lol, that's great
<jmercouris> that and the fun colonel, kernel debacle
<phoe> jmercouris: anaphoric macros are basically macros that define their own inner context for you to use
<_death> "virus", "vagina", etc.
<jmercouris> phoe: I see, I think it has finally clicked, thank you
<beach> Bike: Yeah, there are tons of such examples in every language I know.
<mfiano> I think in Greek it means to repeat the same thing, being a word of multiple words in succession, rather than using "it" etc
<phoe> if we are talking about some sort of programming language, then "it" in such a context will refer to that language
surabax_ is now known as surabax
<phoe> "this programming language, I really like it"
<phoe> "when this number is even, collect it"
<phoe> as opposed to "when this number is even, collect this number"
<phoe> both are equivalent but the former is something some people consider nicer to read
<_death> this conversation incl. phoe's example highlights issues with anaphora
<phoe> ...and what some people consider troublesome because of lack of explicit context
<_death> phoe: the IT there will collect the result of the predicate, not the number
<phoe> most importabtly, the variable IT is completely unbound lexically
<phoe> ...unless you macroexpand
<phoe> oh, yes
<phoe> that's one more issue
<phoe> (loop ... when x collect it) - IT refers to X
<phoe> (loop ... when (oddp x) collect it) - IT refers to the value returned by ODDP
<phoe> and in the general case it cannot be any other way, really
<phoe> because then you run into (loop ... when (foop x y) collect it)
<jmercouris> hm, you've convinced me not to use them
<phoe> what do you collect?
<ck_> was it yesterday or the day before that someone said, not verbatim, "[something like arrows] seems like a a source of confusion when reading other people's code" ?
<jmercouris> it was yesterday
<jmercouris> are we getting into that again?
<ck_> I see some similarity
<phoe> anaphoric macros are similar to arrow macros in that it binds variables
<phoe> arrow macros implicitly bind anonymous vars, whereas anaphora implicitly bind named vars
<jmercouris> yesterday all my troubles so far away, now it looks as though they are here to stay, oh I believe, in yesterday...
<ck_> I don't, because it is not reproducible
<jmercouris> ah, here is a tough question I was having
<jmercouris> what about algorithms with inherent randomness in their definition
<jmercouris> these cannot be made "reproducible" can they?
<jmercouris> for example, genetic algorithms contain EXPLICIT requirements of randomness
<ck_> Anyway on the topic of any sort of 'dsl' like look or arrows, I think it is all right to require consistency of usage inside a codebase, and not to try achieving some general overarching coding standard
<ck_> like loop*
andreyorst_ has joined #lisp
iskander has quit [Ping timeout: 240 seconds]
iskander has joined #lisp
<ck_> jmercouris: well, you could achieve that by fixing the randomness seed. Or, if a 'true' source of randomness is used, by relaxing the requirements
<ck_> (passing a statistical test, for example)
<jmercouris> so it is not truly possible without making the source of randomness fixed?
<phoe> jmercouris: stochastic algorithms can be still well-defined
<jmercouris> that is the conclusion I came to as well
<phoe> e.g. see the general Monte Carlo approximation method
<phoe> or do you mean verifying them in some way?
<phoe> like, for testing purposes, or something?
<jmercouris> well, Pierre and I were having a discussion about reproducibility
<jmercouris> I want to create models utilizing genetic algorithms to include in Nyxt
<_death> generally you want different seeds only for particular fields like games or cryptography
<jmercouris> and Pierre was saying, they have to be reproducible so that they can be trusted by the end-user
<jmercouris> I was trying to tell him, that I do not believe we can make them reproducible
<phoe> as long as you can represent the complete state of your algorithm in a reproducible format, you will have reproducible results
<phoe> clhs random-state
<phoe> that's one example.
<jmercouris> how do the users know that we used our algorithm to produce the model we ship with Nyxt?
<phoe> they must be able to reproduce it from scratch
<jmercouris> therefore we would need a way to collect and pipe in randomness
<save-lisp-or-die> jmercouris If you're interested in where the English word 'anaphora' came from (that is, how it came to be an English word), you have to look to the study of Rhetorical Figures in Classical Greek and Latin poetry by classicists and other folks to study rhetoric in (mostly ancient) literary works.
<phoe> jmercouris: sure, yes
<phoe> if you control the seeds of your randomness, or if you can collect all random input passed to your algorithm, then you can win
<jmercouris> seems a pain in the popo
<phoe> depends on what you are doing
<jmercouris> what we do for the users...
<phoe> a random state is usually a short value
<phoe> like, not kilobytes of text
<jmercouris> I know, but I will have to make the algorithm accept a list of 'random' inputs
vhost- has quit [Ping timeout: 240 seconds]
<jmercouris> I guess I could make our own 'random'
<jmercouris> (defun my-random ...) that can optionally accept a sequence of 'random' values
<jmercouris> so that I need not taint the actual algorithm with this
<phoe> a wrapper around randomness functions, sure
<jmercouris> I can sleep better now
<jmercouris> thanks phoe
<phoe> if you provide predefined data, it uses this; otherwise, it employs the RNG
Lycurgus has quit [Quit: Exeunt]
<jmercouris> save-lisp-or-die: that is very outside of my scope of knowledge I am afraid :-D
<jmercouris> phoe: yeah, that's what I will have to do
<jmercouris> and I'll have to publish the sequence of 'rng' used in our image
<easye> "Anyone who attempts to generate random numbers by deterministic means is, of course, living in a state of sin."
<save-lisp-or-die> jmercouris: indeed - I think I meant to suggest that it is a piece of technical jargon in a small constellation of abstruse academic fields, and hence, is perhaps a little perverted from any "original" meaning it ought to have had. I agree that it is literally a little confused. Anyway, sorry to be OT.
codewaffle has joined #lisp
<easye> Knuth's chapter on random algorithms in _The Art of..._ really helped me understand the subject.
<easye> err "chapter on algorithmic random number generation"
<ck_> easye: ah right, especially his tale about the "super randomness" algorithm of his college days :)
vhost- has joined #lisp
<easye> Yep. It was great to read Knuth talk about his own mistake. Made him even more approachable for the "tall Yoda" that he is.
wsinatra has joined #lisp
EvW has joined #lisp
hnOsmium0001 has joined #lisp
skapata has joined #lisp
aeth has quit [Ping timeout: 246 seconds]
aeth has joined #lisp
zagura has quit [Ping timeout: 246 seconds]
jeosol has joined #lisp
Cymew has quit [Ping timeout: 240 seconds]
skidd0 has joined #lisp
<skidd0> i'm struggling to figure out how to resolve a permissions error
<skidd0> hunchentoot needs to access a privkey.pem i have from letsencrypt
<skidd0> error i get is "Failed to find the TRUENAME of [path]: Permission denied"
zagura has joined #lisp
<skidd0> the lets encrypt docs mention using chgrp and chmod 0640 "to allow the server to read /etc/lectsencrpy/live/$domain/privkey.pem"
<skidd0> i have tried chgrp and chown to my linux user and group on that file
<skidd0> but i still get the permission denied
<phoe> oh wait a second
<skidd0> something with SB-IMPL::RESOLVE-PROBLEMATIC-SYMLINK
<phoe> which pathname do you provide?
<phoe> like, what's the pathname literal? or string?
<skidd0> for the ssl-key?
<phoe> yes
<phoe> if it includes any kinds of environment variables then they must be first resolved and spliced in
<phoe> AFAIK SBCL pathname engine does not perform this on its own
<skidd0> #P"/etc/letsencrypt/live/www.skidd0.com/privkey.pem"
<skidd0> their docs use the $domain
<phoe> hmmm
fitzsim has quit [Ping timeout: 240 seconds]
<skidd0> it can read the fullchain.pem file just fine
<phoe> what happens if you PROBE-FILE on that pathname? still permission denied?
<skidd0> let me try
<phoe> maybe it's some sort of a unix permission issue
<phoe> is the user SBCL is running under allowed to read from that file? try with standard unix utils like cat
<jackdaniel> or it is some kind of selinux/systemd mumbo jambo
<skidd0> NIL
<phoe> or selinux, yes
<phoe> at which point I cannot help you because the last time I used selinux I ended up uninstalling it out of frustration
<skidd0> so i'd need to su SBCL first right
<phoe> uh
<phoe> no, not really
<phoe> don't run it as root
<phoe> just make sure that your local user can read that file.
<skidd0> oh wait i misread
<jackdaniel> you may patch the kernel to update each user uid to 0
<phoe> jackdaniel: that's dangerous as fuck
<phoe> why would you give root to everyone
<jackdaniel> that's also silly, still sounds like fun
<skidd0> oh. hmm. my user cannot cat the file
<phoe> there!
<phoe> that's the issue
<skidd0> so my chown and chgrp didn't work as expected
<phoe> make the file available to your user, and SBCL will read it.
<_death> I'd recommend using nginx and a reverse proxy for hunchentoot
<skidd0> ls -la shows the owner and group of that line (live/$domain/privkey.pem -> archive/$domain/privkey1.pem)
<skidd0> as my user
<skidd0> yet i cannot read it
<skidd0> i already have it behind nginx
<skidd0> but hunchentoot still needs to be set up for the ssl-acceptor, right?
<skidd0> not just nginx
<_death> no.. you don't need to use ssl-acceptor that way
<skidd0> oh
<phoe> skidd0: you can have nginx as the proxy that communicates with external world via HTTPS
<skidd0> right
<phoe> and use HTTP for internal traffic.
<skidd0> i assumed internally would need to stay https too
<skidd0> silly me
<phoe> I've done that setup a few times except, but with haproxy instead of nginx; it's really nice to use.
<skidd0> well i'll end up going that route then
EvW has quit [Ping timeout: 260 seconds]
<skidd0> but i'd still like to figure out this permissions thing for my own education
<skidd0> it's curious that my user owns the link but can't read the file
<_death> does the file have correct permissions?
<phoe> do you own the directory?
<phoe> like, can you read inside it or something
<skidd0> ah that might me it
<phoe> maybe it's the dir permissions.
<skidd0> my user and user's group are set for the directories but i still can't read it
<skidd0> read permissions for owner, group, and everyone are set
<skidd0> for the dirs
<skidd0> and the link
<skidd0> and the file the link points to
_oldtopman has quit [Ping timeout: 256 seconds]
<ck_> skidd0: is the x bit set for the directory as well?
<_death> can you cat the symlink target?
<skidd0> no
<skidd0> no to ck_
<skidd0> no to _death
<_death> skidd0: so likely it's either (i) it's not group readable or (ii) you're on in the group
<ck_> skidd0: for example: mkdir -p foo/bar; echo "baz" > foo/bar/baz; chmod 440 foo/bar; # ==> cat: foo/bar/baz: Permission denied
<skidd0> i can now cat the target file
<skidd0> but not the link
gxt has quit [Remote host closed the connection]
nkatte has quit [Ping timeout: 260 seconds]
gxt has joined #lisp
fitzsim has joined #lisp
<ck_> skidd0: failed to put the cat command before the output, but you can hopefully see what I meant
<skidd0> you need x perms for cat?
<ck_> like to cd into a directory, yes.
nkatte has joined #lisp
miasuji has quit [Ping timeout: 260 seconds]
<skidd0> i gave up and just set up nginx :/
<skidd0> but that works
<skidd0> the permissions down the dirs for the target are the same as for the link
davisr_ has quit [Remote host closed the connection]
<skidd0> i can cat the target. not the link.
davisr_ has joined #lisp
<skidd0> i really appreciate all the help ck_ , phoe and _death
EvW has joined #lisp
Jeanne-Kamikaze has joined #lisp
dbotton has joined #lisp
clicat has joined #lisp
ghard has quit [Ping timeout: 240 seconds]
clicat has quit [Quit: Lost terminal]
<pve> Hello! If I have a function, say "parse-token", that contains a bunch of local functions defined with "labels", can I assume that no memory is allocated at runtime for the labels (i.e. "defining" them) when parse-token is called?
wayneeseguin has joined #lisp
<_death> if you don't pass them around..
<pve> _death: I don't, they are just helper functions used in parse-token
<pve> but ok, thank you
liberliver has quit [Ping timeout: 240 seconds]
Jonatha54 has joined #lisp
<Jonatha54> hello. is there some irc client based on lisp?
Steeve has quit [Ping timeout: 240 seconds]
<wayneeseguin> ?
<Jonatha54> let me see. thanks
<lotuseater> Jonatha54: yes, I currently write out of emacs
<_death> there are a bunch, some in elisp like erc or rcirc.. other in CL like beirc
cosimone has quit [Remote host closed the connection]
<pve> _death: Hmm actually some of them are predicates that get passed to some of the labels in the function, but none of them ever leave the scope of parse-token. Does that change the situation?
<Jonatha54> thanks wayneeseguin It does look good.
cosimone has joined #lisp
<_death> pve: you may want to read about the dynamic-extent declaration then
<pve> (and they don't capture any bindings)
<pve> _death: alright, will do
<Jonatha54> Pico lisp does look look but I guess it's for Linux. am not using linux although I would love to try
<Jonatha54> lotuseater thanks for sharing. I read whole erc page today
skidd0 has left #lisp ["WeeChat 2.9"]
<Jonatha54> as the author describes in Picolisp am also not satisfied with most irc clients
grumble has quit [Quit: CHANGE MY MIND: Excel is a functional programming language]
<Jonatha54> erc does look promising.
<lotuseater> but just as I used erc-tls it worked for here
<Jonatha54> I tried to connect to my znc account using erc-tls but couldn't
<lotuseater> hmmm
<Jonatha54> do I need to do something extra to connect?
aeth has quit [Ping timeout: 256 seconds]
grumble has joined #lisp
<Jonatha54> server: us4.ircnow.org:+31337 (SSL)
<Jonatha54> these are my server details
aeth has joined #lisp
<lotuseater> i use the port 6697
<wayneeseguin> Also due to history I definitely second the motion that native Emacs modes should do well.
<wayneeseguin> @Jonatha54 I'm on Windows 10 :)
amb007 has quit [Read error: Connection reset by peer]
<wayneeseguin> I'm using WSL2/Ubuntu + WeeChat
<Jonatha54> do you use pico lisp wayneeseguin
<wayneeseguin> No, just know of it, I'm using the configuration above
<Jonatha54> oh. okay.
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
<Jonatha54> I was expecting some common lisp irc client. if it exists
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
<phoe> Jonatha54: there is one
<phoe> beirc, based on McCLIM
<Jonatha54> oh. yes. let me check
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
<Jonatha54> I read about it. I guess I'll try erc or rcirc
<Jonatha54> thanks all...
<phoe> no problem
<phoe> feel free to hang around and ask questions too
<Jonatha54> appreciate.
<phoe> <3
<Jonatha54> to hack erc, I need to learn elisp ?
<phoe> hmmm
<Jonatha54> or can common lisp do
<Jonatha54> ?
<phoe> erc is the emacs lisp client, right? in this case, yes, it might be necessary
<phoe> emacs is written in elisp, not Common Lisp
<phoe> these two are similar, but not identical
<Jonatha54> I was told they're similar. yes
<_death> both are worth learning, in my experience
amb007 has quit [Read error: Connection reset by peer]
<aeth> Both share a common origin (historic Lisps), but elisp was far more conservative.
<aeth> This gives elisp an archaic feeling.
<lotuseater> yes Richard Stallman doesn't like some stuff from CL
amb007 has joined #lisp
<aeth> It's almost like C vs C++. C's way more conservative than modern C++.
<White_Flame> plus wanted it easier to implement
<Jonatha54> can I ask a question?
<lotuseater> of course
<lotuseater> and *urgs* C++ :D
<phoe> Jonatha54: just ask away!
<phoe> no need to ask about asking
<Jonatha54> why do people write irc clients in one language and it's scripting language in other?
<phoe> any concrete examples?
<lotuseater> yes leave the metaactivities for programming :3
<Jonatha54> irssi is written C. scripting language is perl
<phoe> oh right; #lispcafe might be better for this question
<phoe> #lisp is mostly on topic to Common Lisp
<White_Flame> it's hard to script in C
<Jonatha54> oh okay. I will join that
<lotuseater> because scripting is just "frontend" and easier to adapt for other people?
<aeth> Jonatha54: This false dichotomy was pretty common in the past, especially on Unix-like OSes. CL has always violated this false dichotomy, of course. https://en.wikipedia.org/wiki/Ousterhout's_dichotomy
<White_Flame> the question is really "Why do C/C++/Java/etc programmers choose a different language for scripting?"
<White_Flame> and the answer is that those languages don't deal with source code at runtime very well
<lotuseater> I now have to mention Greenspun's tenth rule.
<phoe> nor is their runtime capable of compiling stuff at, well, runtime
<aeth> White_Flame: Right, people see "this compilation takes forever" and then they think "I should embed an interpreter"
<Jonatha54> White_Flame that sounds fitting
<White_Flame> phoe: technically it can be done, and has been done. it just sucks and usually is not portable
<Jonatha54> that's why I am attracted to erc / rcirc after using all clients. it's source and scripting language are same
<aeth> It's often advertised as a(n application!) feature. Iirc, "hot reloading".
<phoe> White_Flame: yes; I'm talking about the general case
oldtopman has joined #lisp
<White_Flame> eg, generate a C file, call the c compiler to make a dll/so, and link that at runtime, etc
<phoe> ECL works like that :D
<White_Flame> yep
<phoe> if you use the C compiler, that is
<White_Flame> java is slightly more complete in those features, but it's still a huge ball of wax that's not done that often either
<lotuseater> and you can't control how C compiles stuff
<phoe> lotuseater: uhhhhh what exactly do you mean
<lotuseater> yes I wondered when first get to know Guy Steele also worked on Java
<White_Flame> and this is why people are so unfamiliar with metaprogramming, or consider it to be unworkable, while Lisp makes it nearly transparent and common
<phoe> gcc has a truckload of flags
<lotuseater> phoe: ehm ... *sweat*
Jonatha54 has quit [Changing host]
Jonatha54 has joined #lisp
Steeve has joined #lisp
<lotuseater> phoe: compiler macros for first :P
<phoe> oh
<phoe> that's not really a compiler thing; it's a language thing
<phoe> and I wonder if you can instrument a C compiler to choose one implementation of a function over the other at compilation time... #if and #ifdef come to mind
<lotuseater> hehe okay ^^
amb007 has quit [Read error: Connection reset by peer]
<phoe> these are primitive but kinda work
amb007 has joined #lisp
<lotuseater> hm it would be possible to choose special functions like in erlang with foo/1, foo/2, ...
amb007 has quit [Read error: Connection reset by peer]
<phoe> not in CL
<lotuseater> or like in Haskell monomorphing with SPECIALIZE pragma
<lotuseater> why not?
<phoe> a function named by a symbol must have a constant lambda list
<phoe> if anything, you can use &optional and check whether optional args were provided
<phoe> this way you can emulate this sort of behavior.
amb007 has joined #lisp
<dim> defmethod?
<lotuseater> nono, I mean the special functions have the symbols with slash and number of args
<phoe> so like (defun fn (foo &optional bar baz quux) ...)
<phoe> oh!
<iarebatman> Casey (hand made hero) does an interesting thing in his game engine near the very start of his efforts. He goes through the effort to isolate his game engine code from his actual game logic code. He declares all of his game logic code as function pointers that his game engine uses - then he is able to on-the-fly swap out his game logic DLL with a new version..
<phoe> (defun foo/1 (bar) ...) (defun foo/2 (bar baz) ...)
<lotuseater> and then there is macro FOO which looks how many args and chooses right function
<phoe> you can do that, foo/1 is a legal symbol
<lotuseater> dim: no defmethod will not this way
<lotuseater> it just dispatches on arg classes
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<phoe> dim: defgeneric has the same limitation, it more or less fixes the lambda list
<dim> okay, I must admit I didn't read the backlog, that was just a shot in the dark ;-)
<phoe> :D
<phoe> you missed
<lotuseater> cbaggers also explains that in his 2h macro video
<dim> that's only fair, I should open my eyes now maybe...
decent-username has joined #lisp
<_death> lotuseater: something like https://plaster.tymoon.eu/view/2173#2173 ?
aartaka has quit [Read error: Connection reset by peer]
aartaka has joined #lisp
<lotuseater> yes seems so
<lotuseater> hehe "defprologish"
<decent-username> Hi, I'm having trouble loading SDL2 via quicklisp on OpenBSD. Here's the error: https://paste.gnome.org/pv8qypcev/csrxin/raw . I've already installed c2ffi, but that's apparently not enough. Can anyone maybe help?
<phoe> uh wait a second, this comes from autowrap
<decent-username> A lot of fun libraries depend on SDL2. lispbuilder-sdl works fine though. :^D
<phoe> the REPL will show the real error.
<decent-username> phoe: alright, I'll take a look
<phoe> like, ASDF's "COMPILE-FILE-ERROR while compiling ..." is not the real error we are looking for
<phoe> it will print the real error to the REPL before going debugga on you
<_death> lotuseater: wrote this some 10 years ago so may be buggy ;)
<lotuseater> _death: but it's cool
<decent-username> phoe: Here's the actual error output: https://paste.gnome.org/ppjaasexj/lrstnr/raw
<phoe> decent-username: "-A" "x86_64-unknownNIL"
<phoe> this seems troublesome
<decent-username> yeah
<decent-username> just read that.
<decent-username> uhh
<phoe> can you open /home/user/quicklisp/dists/quicklisp/software/cl-sdl2-20201016-git/src/autowrap.lisp in emacs and try to C-c C-k this file?
<phoe> slime will tell you which exactly form fails to compile
<decent-username> roger that
<phoe> ...oh wait a second
<phoe> we know the form
<phoe> AUTOWRAP:C-INCLUDE
<wayneeseguin> lotuseater: URL for cbaggers video?
<phoe> maybe it does not support openbsd
<wayneeseguin> Thanks!
<decent-username> phoe: yeah, it errors out when compiling autowrap:c-include
<phoe> likely it doesn't know what to expand into on BSD
<decent-username> yes
<phoe> it should signal a more meaningful macroexpansion error rather than just going NIL on you
<phoe> file an issue!
<decent-username> But I don't have an github account. :D
amb007 has quit [Read error: Connection reset by peer]
<phoe> well then
<decent-username> I could mail an issue
amb007 has joined #lisp
ealfonso has joined #lisp
Jonatha54 has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
<decent-username> I guess I could create a github account over Tor. Connecting to the web with javascript enabled and over the clearnet is spooky.
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
<wayneeseguin> lotuseater: ZOMG <3 thank you so much for this, I've been reading ancient posts and code to learn, these videos appear to be exactly what I have been looking for <3
amb007 has joined #lisp
<lotuseater> you're welcome :3 but the documentation for his CEPL is not new enough :/
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
<wayneeseguin> oh :(
<wayneeseguin> That's a challenge with OSS efforts, time drift :)
cosimone has quit [Quit: cosimone]
andreyorst_ has quit [Ping timeout: 240 seconds]
kiroul has joined #lisp
aeth_ has joined #lisp
aeth has quit [Disconnected by services]
aeth_ is now known as aeth
amb007 has quit [Read error: Connection reset by peer]
kir0ul_ has quit [Ping timeout: 246 seconds]
amb007 has joined #lisp
andreyorst_ has joined #lisp
andreyorst_ has quit [Read error: Connection reset by peer]
karlosz has joined #lisp
iskander has quit [Ping timeout: 256 seconds]
amb007 has quit [Read error: Connection reset by peer]
iskander- has joined #lisp
<pve> lotuseater: it's a bit of a joke, but I made this a long time ago: https://github.com/pve1/incongruent-methods
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
daphnis has joined #lisp
amb007 has joined #lisp
<lotuseater> pve: :3
rippa has joined #lisp
<daphnis> i have a function that takes symbols as arguments that i want to export; but when i call it from another package, the symbols passed to it are from that other package .. what's the normal way to solve this?
rippa has quit [Client Quit]
wsinatra has quit [Ping timeout: 272 seconds]
<Bike> you should indicate the package the argument symbols are in.
<Bike> sometimes it's convenient to use keyword symbols for this
<Bike> like, if your package is foo, you can do (foo:my-function 'foo:symbol)
<Bike> or with keywords, (foo:my-function :symbol)
<daphnis> keywords seem less cumbersome
<Bike> it depends on the nature of the function. sometimes it's nice to allow multiple namespaces
aartaka_d has joined #lisp
<Bike> if the set of allowed symbols is fixed, keywords are generally good
<phoe> daphnis: why do you want to export symbols in package A from inside package B?
<phoe> this sounds somewhat weird
aartaka has quit [Ping timeout: 240 seconds]
<phoe> this changes the interface of that package, and I have no idea why you would like to modify it as a part of standard program operation
dbotton has quit [Quit: This computer has gone to sleep]
<phoe> it is possible, just the "why" you have is puzzling to me
iskander- has quit [Ping timeout: 240 seconds]
iskander has joined #lisp
rippa has joined #lisp
rippa has quit [Client Quit]
rippa has joined #lisp
<daphnis> phoe: say i have a function #'foo in package A that returns a list of entities to which the symbol names given as arguments pertain. f.ex., (foo 'berries) returns a list of berries and (foo 'fruits 'berries) returns a list of fruits and berries. this function can't be exported, it seems
shifty has joined #lisp
<daphnis> since 'berries in A and 'berries in B are different symbols
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
narimiran has quit [Ping timeout: 272 seconds]
dbotton has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
gproto023 has joined #lisp
dbotton has quit [Client Quit]
amb007 has quit [Read error: Connection reset by peer]
gproto23 has quit [Ping timeout: 256 seconds]
<pve> daphnis: the symbol "FOO" can surely be exported
amb007 has joined #lisp
wsinatra has joined #lisp
<Kabriel> Is there an easy way to replace a symbol in the restvar (e.g. &body) in a macro definition so that you can provide that symbol to the user?
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
<Kabriel> Not provide, but allow them to use it in the body, like loop allows you to use "it".
EvW has quit [Ping timeout: 240 seconds]
<phoe> Kabriel: bind it
<phoe> `(let ((my-symbol ,...)) ...)
<phoe> or symbol-macrolet since that is also useful
<phoe> daphnis: actually
<phoe> you might want to use qualified package names then
<phoe> (foo 'a:apples 'b:bananas 'c:cucumbers)
<phoe> you can use package-local nicknames to make package names bearable and customizable
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #lisp
iskander has quit [Ping timeout: 272 seconds]
iskander has joined #lisp
dbotton has joined #lisp
<Kabriel> So here is an example to help explain: https://dpaste.com/HL43LN7VP
<Kabriel> I have a macro in another package that loops over the lines of the file.
<Kabriel> I would like to use it in a function in a second package, where I can actually use the symbol "line" defined in the macro.
<Kabriel> because the packages are different, I have some-package-1::line vs some-package-2::line.
<Kabriel> Is there an easy way to replace the symbol in the &body, so that the user of the macro does not have to specifiy the symbol.
<pve> Kabriel: you should import the symbol LINE
<Kabriel> That would be one way.
<pve> or better yet, let the user choose the the name
<Kabriel> And another.
<iarebatman> Any ECL people on that can help me out? Whenever I try to load cffi on ECL (on windows..sorry....) - I get an error because cffi/toolchain/c-toolchain.lisp is trying to access C:*CC* - which doesn't appear to be set to anything by default in my ECL session
EvW has joined #lisp
<daphnis> pve: yeah, sorry, i meant: it can be exported, but it won't function the same way in B as in A.
<iarebatman> I just managed to compile ecl 20.4.24 x64 via msvc compiler as specified in the docs finally. I tried switching to :C and (setf *CC* "gcc") for example, but that doesn't seem to matter.
<Kabriel> There must be some way to do it, because loop can figure out what some-package-1:for is.
johnjay has quit [Read error: Connection reset by peer]
johnjay has joined #lisp
<daphnis> since i only use the symbols as names, i don't want to have to specify their package. maybe keywords are the answer to this, as Bike suggested
<Bike> LOOP looks at the symbol names
shka_ has quit [Ping timeout: 264 seconds]
aartaka has joined #lisp
gproto023 has quit [Ping timeout: 256 seconds]
aartaka_d has quit [Ping timeout: 272 seconds]
random-nick has quit [Quit: quit]
random-nick has joined #lisp
<Kabriel> Bike: so basically, have to walk all the forms in the restvar list and replace.
<Bike> it's just that when the loop macro does its parsing, it looks for loop syntax based on symbol names rather than comparison with a symbol.
<Bike> (string= (symbol-name s) "WHEN") rather than (eq s 'when)
iskander has quit [Ping timeout: 272 seconds]
iskander- has joined #lisp
izh_ has joined #lisp
<Kabriel> That makes sense.
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
johnjay has quit [Ping timeout: 240 seconds]
jeosol has quit [Remote host closed the connection]
rumbler3_ has joined #lisp
frgo has joined #lisp
devon has joined #lisp
frgo_ has quit [Ping timeout: 260 seconds]
aorst has joined #lisp
<Kabriel> Bike: so I guess the way to do that is to parse the body forms; i.e. there isn't some facility in language to do this easily.
<Kabriel> Thanks.
wayneeseguin has quit [Ping timeout: 240 seconds]
andreyorst has quit [Ping timeout: 246 seconds]
karlosz has quit [Quit: karlosz]
scymtym has quit [Ping timeout: 264 seconds]
dbotton has quit [Quit: Leaving]
wayneeseguin has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
wsinatra has quit [Quit: WeeChat 3.0]
lotuseater has quit [Remote host closed the connection]
izh_ has quit [Quit: Leaving]
wayneeseguin has quit [Ping timeout: 240 seconds]
scymtym has joined #lisp
lotuseater has joined #lisp
cosimone has joined #lisp
imode has joined #lisp
wayneeseguin has joined #lisp
Necktwi has quit [Ping timeout: 264 seconds]
aorst has quit [Quit: WeeChat 3.0]
pillton has quit [Read error: Connection reset by peer]
pillton has joined #lisp
random-nick has quit [Ping timeout: 240 seconds]
Fare has quit [Ping timeout: 264 seconds]
decent-username has quit [Ping timeout: 256 seconds]
daphnis has quit [Ping timeout: 246 seconds]
luckless_ has quit [Ping timeout: 240 seconds]
cosimone has quit [Read error: Connection reset by peer]
luckless_ has joined #lisp
cosimone has joined #lisp
leo_song has joined #lisp
Fare has joined #lisp
nkatte has quit [Remote host closed the connection]
nkatte has joined #lisp
karlosz has joined #lisp
imode has quit [Quit: WeeChat 2.9]
torbo has joined #lisp
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
iskander has joined #lisp
Steeve has quit [Quit: end]
iskander- has quit [Ping timeout: 265 seconds]
wayneeseguin has quit [Ping timeout: 264 seconds]
wayneeseguin has joined #lisp
karlosz has quit [Quit: karlosz]
miasuji has joined #lisp
daphnis has joined #lisp
nkatte has quit [Ping timeout: 272 seconds]
pve_ has joined #lisp
pve has quit [Ping timeout: 246 seconds]
pve_ has quit [Ping timeout: 240 seconds]
torbo has quit [Remote host closed the connection]
karlosz has joined #lisp
karlosz has quit [Remote host closed the connection]
karlosz has joined #lisp
gioyik has joined #lisp
daphnis has quit [Ping timeout: 240 seconds]
zaquest has quit [Read error: Connection reset by peer]
Josh_2 has joined #lisp
zaquest has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
<Josh_2> just got done with a pretty trivial but very extensible blogging library for hunchentoot https://github.com/K1D77A/cl-bloggy if anyone is interested, i'd appreciate the feedback
<shinohai> ty Josh_2 will read.
ape666 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
<Josh_2> shinohai: awesome