binghe changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language <http://cliki.net/> logs:<https://irclog.whitequark.org/lisp, http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.0, CMUCL 21b, ECL 16.1.3, CCL 1.11.5
rumbler31 has joined #lisp
Rawriful has quit [Quit: WeeChat 1.4]
rumbler31 has quit [Ping timeout: 256 seconds]
varjag has joined #lisp
rumbler31 has joined #lisp
Amplituhedron has quit [Ping timeout: 276 seconds]
varjag has quit [Ping timeout: 260 seconds]
rumbler31 has quit [Ping timeout: 264 seconds]
orivej has joined #lisp
python476 has quit [Ping timeout: 248 seconds]
pmc_ has joined #lisp
markong has quit [Ping timeout: 252 seconds]
Kundry_W_ has quit [Remote host closed the connection]
JuanDaugherty has joined #lisp
kundry_wag has joined #lisp
kundry_wag has quit [Ping timeout: 255 seconds]
damke_ has joined #lisp
thallia has quit [Ping timeout: 256 seconds]
thallia has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
justinmcp has quit [Remote host closed the connection]
justinmcp has joined #lisp
damke_ has quit [Ping timeout: 260 seconds]
z3t0 has joined #lisp
fikka has joined #lisp
Oladon has quit [Quit: Leaving.]
thallia has quit [Ping timeout: 256 seconds]
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thallia has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
milanj has quit [Quit: This computer has gone to sleep]
<aeth> Is there any unit test framework specifically aimed at handling floating point tests?
<aeth> i.e. where = isn't good enough
<aeth> Or do people tend to work around that on their own?
fikka has joined #lisp
<whoman> razzy, oh ? that is very good advice
<whoman> aeth, i would think that CL tests of any kind would be kind enough to consider the awesome pantheon of CL numbers
<JuanDaugherty> i sm not sure what people do do but am sure what they should do
<JuanDaugherty> and it would not be to test numerical results but to test that the code reflected the proper understanding of mapping of floats to reals
<JuanDaugherty> i.e. the gap functions and that the proprer representation was used
<aeth> Apparently you can fairly quickly brute force test *all* (single?) floats fairly quickly. https://randomascii.wordpress.com/2014/01/27/theres-only-four-billion-floatsso-test-them-all/
fikka has quit [Ping timeout: 248 seconds]
<aeth> I'm guessing it'd be slower in CL and could be exponentially slower as you require more floats (matrix multiplication or something?)
<Xach> attila_lendvai: apparently https://github.com/quicklisp/quicklisp-client/commit/207e7498b71d51cbe3d17a752b61800753531adf can break on windows as it tries to rename an open file
Kaisyu has joined #lisp
<pierpa> there are (expt (expt 2 32) (* m n)) single float m x n matrices, so yes, it will be slower (a lot)
dieggsy has joined #lisp
<attila_lendvai> Xach: ouch, sorry for that! I looked at it just now briefly, but I don't see any obvious and trivial fix
<attila_lendvai> although... moving the probe-file and the recursion outside of the loop is reasonably non-intrusive
<attila_lendvai> I mean outside of w-o-f
<JuanDaugherty> also, i'd expect there to be existing tools to check data flow, possibly internal to a compiler
<Xach> attila_lendvai: yeah
fikka has joined #lisp
<attila_lendvai> Xach: maybe it's also better to put the search logic into an flet, and then call it twice. then it won't end up in an infinite recursion in case of [insert something we don't know yet]
<attila_lendvai> Xach: do you want me to send you a version quickly in an email?
dddddd has quit [Remote host closed the connection]
<Xach> ok
fikka has quit [Ping timeout: 240 seconds]
stacksmith has joined #lisp
fikka has joined #lisp
openthesky has quit [Quit: Leaving.]
pagnol has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 268 seconds]
porky11 has quit [Ping timeout: 265 seconds]
* JuanDaugherty had jemais vu about the response to the common query
<JuanDaugherty> *jamais
<z3t0> How would I go about writing a macro to traverse a property list
<pjb> Well, usually it's good to have jamais vu the response to a question. This is the way you get the most information from the question. On the other hand, if you have déjà vu the response, why did you ask the question?
<z3t0> sort of like this where (get-data data :a :b) would generate (getf (getf data :a) :b)
<pjb> z3t0: there's already one. Why do you want to write another one?
<z3t0> pjb: which one?
<pjb> loop
<pjb> (loop for (k v) on p-list by (function cddr) do (something-with k v))
zooey has quit [Ping timeout: 255 seconds]
<z3t0> i dont think that achieves what I am looking for
<pierpa> why you want to do it with a macro, when a function would do?
<pierpa> the performance difference would be insignificant
aindilis has quit [Ping timeout: 256 seconds]
Oladon has joined #lisp
zooey has joined #lisp
<z3t0> i can't figure out how to write it as a function either
<aeth> Generally, people prefer inline functions over macros when it can be written as either.
<White_Flame> z3t0: what do you mean? in order for the macro to read the property list, it would have to be a plist literal being passed in as a parameter
<aeth> z3t0: why doesn't doplist work for you?
fikka has joined #lisp
<z3t0> Because I am not trying to iterate over the entire list
whoman has quit [Ping timeout: 264 seconds]
<z3t0> just walk through a specific path
<pierpa> (defun get-data (data keys) (if (null (cdr keys)) (getf data (first keys)) (get-data data (getf data (first keys)) (rest keys)))) ;; not tested
terpri has quit [Ping timeout: 255 seconds]
whoman has joined #lisp
<pierpa> do you want this: (get-data '(a 1 b (c (d 3))) '(b c d)) ===> 3 ?
fikka has quit [Ping timeout: 256 seconds]
<pierpa> in the DEFUN above there's a superfluous DATA
<z3t0> yes that is what I am trying to achieve. Thanks, I will take a look
<pierpa> then, remove the last occurrence of DATA in the defun abocve
<pierpa> and you can improve the handling of boundary cases, of course :)
fikka has joined #lisp
<Zhivago> Always implement it as a function first -- consider macros to be for translating new syntax into calls to functions. :)
troydm has quit [Ping timeout: 256 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 240 seconds]
aindilis has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
<z3t0> Got it thanks
fikka has joined #lisp
<pierpa> good ;)
igemnace has joined #lisp
d4ryus1 has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
pmc_ has quit [Quit: Leaving]
Pixel_Outlaw has joined #lisp
d4ryus has quit [Ping timeout: 264 seconds]
troydm has joined #lisp
attila_lendvai has quit [Quit: Leaving.]
wxie has joined #lisp
wxie has quit [Ping timeout: 256 seconds]
trocado has quit [Ping timeout: 248 seconds]
<stacksmith> Greetings... Am I correct that ordinary lambda-lists do not allow destructuring lambda-list components anywhere? That is, conceptually, arguments are supplied to a function as a flat list?
<pjb> z3t0: isn't (get-data '(a 1 b (c (d 3))) '(b c d)) == (get-data '(c (d 3)) '(c d)) ?
<pjb> z3t0: isn't (get-data foo '()) == foo ?
fikka has joined #lisp
<White_Flame> stacksmith: correct. Macro parameters can destructure, and destructuring-bind can
<pjb> stacksmith: yep.
<pjb> stacksmith: notice that if you want to use destructuring-bind on a function parameter, then this argument will have to be built, at run-time, using consing functions…
<pjb> Perhaps there's no point.
<White_Flame> or destructure a &rest parameter which might be a bit cheaper
<stacksmith> As for macro lambda-lists... Are macro-functions different from regular functions in terms of destructuring?
<White_Flame> yes
<White_Flame> probably because it happens at compile-time, so they were willing to do more work there than add per-call overhead
fikka has quit [Ping timeout: 276 seconds]
<pjb> macro functions work on literal data, present in the lisp source!
<pjb> (unless you use #. to compute "read-time" objects that will become "compilation-time" objects, ie. "macroexpansion time" objects.).
<stacksmith> CLHS mentions that a macro-function accepts two arguments - the entire macro call and the environment... So the 'macro call' is the entire argument list of the macro invocation, and the macro-function does the destructuring?
<pjb> Notice that macros are specifically forbidden to try to access, at macroexpansion time the lexical environment of the macro call!
<pjb> stacksmith: yes.
<pjb> The macro function receives the &whole.
<stacksmith> And the environment it receives is what?
<pjb> implementation dependent.
<pjb> Only useful to functions such as macroexpand and find-class.
<pjb> It's opaque to the user's program.
<pjb> stacksmith: it abstracts the lexical environment where the macro call occurs, but only gives access to macro-like stuff: macros and macrolets.
<pjb> plus classes!
<stacksmith> I mean, it is not the lexical environment of the macro call - as I presume it is established at runtime - but what is the environment at expansion-time?
<pjb> So you can write a macro that defines lexical classes :-)
<pjb> Yes, it's only a part of the lexical environment of the macro call.
<pjb> It's established at macro-expansion time, which occurs at compilation time usually. It has nothing to do with the runtime.
<pjb> Macroexpansion doesn't occurs are run-time, since there's a minimal-compilation that should occur.
<stacksmith> Forgive me, I need to run out for a few minutes as my dog is getting dangerously flatulent... I would love to finish up in a few...
<Zhivago> It allows the compiler to pass stuff through your macro back to itself.
<pjb> ie. even interpreters usually apply minimal compilation to avoid expanding macros again and again at run-time.
fikka has joined #lisp
damke_ has joined #lisp
eschatologist has quit [Ping timeout: 264 seconds]
eschatologist has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
wxie has joined #lisp
arescorpio has joined #lisp
fikka has joined #lisp
wxie has quit [Ping timeout: 265 seconds]
<stacksmith> I am back... So the macro-function has access to a subset of the lexical environment of the expansion site... At that point the compiler knows things like names of lexical bindings but the macro-function cannot use these in the macroexpansion, as they do not belong to the lexical environment of the macro definition? Thus a macro cannot 'capture' a lexical binding at the invocation site as it would make these bindings no longer lexi
fikka has quit [Ping timeout: 248 seconds]
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<stacksmith> pjb: could you explain what you mean by lexical classes?
<Bike> your message cut off at "these bindings no longer lexi"
<stacksmith> "cal?" was the remaining text...
<Bike> how simple.
<pillton> stacksmith: You cannot evaluate lexical variables which were introduced outside of the scope of a macro.
<stacksmith> Right.
<pillton> stacksmith: This is illegal: (let ((x 1)) (macrolet ((example () x)) (example)))
<stacksmith> I found that the hard way, and of course, it makes sense.
<pillton> stack: Though a reading of 3.1.2.1.1 would suggest it was legal.
<Bike> clhs 3.1.2.1.1
<pillton> stacksmith: It is only by reading the section on minimal compilation that it becomes illegal.
<Bike> well, the current lexical environment doesn't include the value, i guess.
<stacksmith> There was a place that made clear that macrolets do not get access to that environment...
troydm has quit [Ping timeout: 240 seconds]
<Bike> yeah, clhs macrolet has it.
<pillton> Which is unfortunate, because section 3.1 is pretty awesome.
<stacksmith> So please clarify what it means to have access to macros, macrolets and classes in the macro-function as it expands.
<Bike> well, you can have an &environment parameter, right.
<stacksmith> yes
<Bike> if you call macroexpand etc with the environment argument, it'll deal properly with the local macros.
fisxoj has joined #lisp
<Bike> (defmacro foo () 17) (macrolet ((foo () 19)) (macrolet ((test (&environment env) `',(macroexpand-1 '(foo) env))) (test))) will be 19, kind of thing.
<stacksmith> So macroexpand sees the macros that are lexically in scope at the expansion site?
<Bike> if - IF - you pass it this environment argument
<Bike> otherwise it uses the global environment.
<stacksmith> ah.
<Bike> macroexpand is just a function. functions "know" nothing about the lexical environment they were called from.
<stacksmith> That is limited to macroexpand?
<Bike> no, some other functions take environment arguments.
<stacksmith> OK.
<Bike> but macroexpand, macroexpand-1, and macro-function are the main ones people use.
<Bike> other things (e.g., classes) don't usually have lexical shadowing.
troydm has joined #lisp
<stacksmith> But not a macro-invocation inside the macro being expanded, as that is lexically restricted to the macro definition...
<Bike> i'm not sure what you mean.
<stacksmith> I mean that just like I have no access to the lexical bindings at the expansion site, I similarly have no access to the macrolets or anything else...
<Bike> No access in what? Perhaps you could express this with code?
<pillton> stacksmith: A macro can return code which contains forms that use lexically defined macros.
fikka has joined #lisp
<stacksmith> Bike: sorry, my terminology is not clear. I am just regurgitating what was clarified above, in pillton's example with macrolet. There, x was inaccessible. I was trying to extend that to not just lexical bindings, but also to any names of macrolets and really anything else that constitutes the so-called environment at expansion site.
<Bike> well, in that case it's not about the expansion site but rather the macro function itself
<stacksmith> yes.
<Bike> essentially, it has to be possible to make the macro functions at compile time
<Bike> since at compile time it won't actually bind x to 1, no dice
<Bike> a lexical macro function referring to outer macro functions is okay, though
<Bike> (macrolet ((foo ())) (macrolet ((bar () (foo))) ...)) kinda thing
Oladon has quit [Quit: Leaving.]
<stacksmith> Hmm..
fikka has quit [Ping timeout: 240 seconds]
<stacksmith> And that is restricted to macrolets and symbol-macros?
<Bike> those are probably the only lexical ones, yeah.
<stacksmith> That is a little confusing, although I suppose it makes sense since these are not real bindings, but just stand-ins for some expansion tasks to be performed...
<Bike> that's a decent way to think of it.
<Bike> though note that an evaluator might choose to be very basic, and have "actual" runtime bindings for macros.
<stacksmith> Although, in a similar vein, a macrolet could theoretically have access to the binding names in the environment (not the values, of course)...
<pillton> Yes! People use that all of the time.
<Bike> Yes. Actually, in a previous revision of the language that information was accessible.
<Bike> I don't know if i'd say that it's used all the time though.
<stacksmith> Thank you.
<pillton> Well, I use it all of the time.
<stacksmith> pillton: what are you referring to?
fikka has joined #lisp
<pillton> The function variable-information in the link I sent allows macros to test for the existence of a lexical variable and get information about it.
<stacksmith> Which implementations support that?
<pillton> SBCL, CCL and CMUCL. I am not sure about the others.
<Bike> none of them support everything in the page completely, but some do ok.
<Bike> i think lispworks has its own api that gives you similar information.
<pillton> It is best to use Bike's introspect-environment system.
<stacksmith> Great. I will look into that.
<Bike> it's pretty rare for macroexpanders to need this information, though
<Bike> it's pretty rare to need an environment parameter at all
<stacksmith> I noticed.
z3t0 has quit [Remote host closed the connection]
* pillton wonders why he is always in rare areas.
<Bike> exploratory spirit?
damke has joined #lisp
<pillton> Quite possibly.
<stacksmith> Some people invariably wind up under the car, looking at the innards, while most just look at the shiny side...
fikka has quit [Ping timeout: 248 seconds]
<Bike> well, and some people do that while others hack the ECU
arescorpio has quit [Excess Flood]
terpri has joined #lisp
<Zhivago> ... while the life is slowly crushed out of them by an inexorable pressure due to having failed to correctly secure the wheel chocks.
<Bike> geez, mon.
shka has joined #lisp
<pjb> stacksmith: you can define classes that are visible only in lexical scopes, using (setf find-class) with a local environment.
<pjb> stacksmith: this is a very powerful tool in CL. I don't know if it has ever been used.
damke_ has quit [Ping timeout: 263 seconds]
<stacksmith> pjb: thank you. I was about to ask about that.
<Bike> i don't think there's any guarantee that it wouldn't just alter the global environment (so like a dynamic binding)
smokeink has joined #lisp
<pillton> stacksmith: It is good that you encountered this issue. It is an important topic.
<Bike> stacksmith is certainly being unusually scrupulous
<stacksmith> I am very satisfied with this discussion.
<Bike> you should try writing an evaluator, it makes things clearer than almost any amount of talking
<pillton> The "Macros" chapter in the book Lisp in Small Pieces touches on other related issues.
<stacksmith> Bike: I've been writing something close to an evaluator...
damke has quit [Ping timeout: 264 seconds]
<Bike> close to?
* pillton has been meaning to follow the references in that book.
damke has joined #lisp
<stacksmith> Well, it stops short of evaluating; it checks lists for lambda-list correctness, when possible. Kind of a level above, or below, an evaluator.
Oladon has joined #lisp
Pixel_Outlaw has quit [Quit: Leaving]
<beach> Good morning everyone!
damke_ has joined #lisp
<stacksmith> Another question. Macro lambda-list keywords, when keyword checking is disabled by &allow-other-keys. I assumed that no checking is done. However when keywords use destructuring syntax, such as ((:x (a b))) SBCL actually checks arguments and flags destructuring mismatches...
<Bike> er, what?
<Bike> allow-other-keys just means other keywords are allowed
<Bike> it doesn't say not to destructure specified parameters
damke has quit [Ping timeout: 264 seconds]
<stacksmith> There is a chapter on &key and allow-other-keywords disabling keyword checking... I am looking for it.
Bike has quit [Quit: Lost terminal]
<stacksmith> clhs 3.4.1.4.1
<specbot> Suppressing Keyword Argument Checking: http://www.lispworks.com/reference/HyperSpec/Body/03_dada.htm
damke has joined #lisp
fikka has joined #lisp
nowhere_man has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
<stacksmith> Is keyword argument checking defined anywhere in CLHS?
<beach> It is. But I don't remember where by heart.
<beach> What is it that you need to know.
<beach> Multiple occurrences of a keyword/value pair are allowed, and it is the first one that is used in that case.
nowhereman_ has quit [Ping timeout: 276 seconds]
fikka has quit [Ping timeout: 265 seconds]
<stacksmith> I was assuming that when keyword argument checking is suppressed, no such checking takes place and any keyword may have any value in the argument list. However it appears that even with checking suppressed, specifying a key that has a destructuring lambda-list associated with its value, requires a value that will destructure correctly. So some checking does take place.
<pjb> yes. And that keys shall be symbols.
<pjb> (defun foo (&key &allow-other-keys) (values)) (foo 42 0) ; but only clisp signals the error: CLISP FOO: &KEY marker 42 is not a symbol
<pjb> Good old faithful clisp!
fikka has joined #lisp
<beach> stacksmith: Yes, checking suppressed only makes it possible to supply keyword arguments that have no corresponding parameter definitions. It doesn't give you any additional rights about explicit parameter definitions.
<stacksmith> OK. Argument checking suppression is somewhat misleading, and I am still unable to find what CLHS means by it.
z3t0 has joined #lisp
dieggsy has quit [Remote host closed the connection]
<beach> clhs 3.5.1
<beach> maybe?
dieggsy has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
<pillton> stacksmith: Have you specified a correct initial value?
<pillton> s/initial/default/
<stacksmith> Yes, and not using the argument is fine.
z3t0 has quit [Ping timeout: 252 seconds]
JenElizabeth has joined #lisp
schoppenhauer has quit [Ping timeout: 256 seconds]
z3t0 has joined #lisp
schoppenhauer has joined #lisp
<stacksmith> I am still not clear on what argument checking suppression means, and if it's done at runtime or compile time. When does destructuring happen? I suppose it never happens at runtime because it is limited strictly to macro lambda-lists. But is it possible to replace an argument with a function call that returns a list that matches the destructuring requirements? Or do destructuring arguments require a literal list in the value po
<beach> Yes, destructuring only happens at macro-expansion time.
<beach> Keyword argument matching for functions is done at runtime of course.
z3t0 has quit [Ping timeout: 260 seconds]
<beach> All function arguments are evaluated, so an argument can be any form.
fourroot has joined #lisp
<fourroot> hi
nika has joined #lisp
<fourroot> why is lisp so undervalued ?
<stacksmith> OK, in SBCL: (defmacro foo (&key ((:a (b c)) '(9 10)) &allow-other-keys) `(values ,b ,c))
<aeth> fourroot: network effects
<fourroot> is it really better than python ?
<beach> fourroot: Because most people in charge are uneducated and ignorant.
fikka has joined #lisp
<stacksmith> Now: (defun bar () (list 99 100))
<beach> fourroot: A good Common Lisp is about 50 times faster than Python for starters.
<beach> fourroot: And Common Lisp can do almost everything Python can, and lots of things that Python can't.
<pjb> fourroot: basically, each 5 years, the programmer population doubles. That means that at any time, there are always 50% of the programming population that is newbie.
<stacksmith> (foo :a (bar)) provides foo with :a '(99 100) and yet it SBCL does not allow it.
<pjb> fourroot: when we'll reach peak programming population, this percentage will improve, and things hopefully will improve too. This will be the dawn of lisp!
<beach> stacksmith: Why do you mix up keyword matching and destructuring.
<beach> stacksmith: They are unrelated.
fisxoj has quit [Ping timeout: 260 seconds]
<fourroot> hmm guys and how long is it gonna take to learn it ?
<pjb> ten years.
<beach> fourroot: Same as any other endeavor. Not long to get started. Ten years to become an expert.
<aeth> fourroot: You have to balance a better language against (1) most potential hires (or contributors if FOSS) using other languages and (2) the availability of libraries in other languages. Also, Lisp was traditionally associated with symbolic AI, while machine learning is what's in style in AI these days.
quazimodo has joined #lisp
<beach> fourroot: Provided you do the work required of course. In software development, it is common to not have ten years of experience, but one year of experience ten times.
<stacksmith> beach: because I was assuming keyword argument checking has to do with checking keyword arguments - in my mind, including the values. However my assumption may not be correct.
<pjb> (+ 2014 (* 5 (log (/ 8e9 18.5e6) 2))) #| --> 2057.7817 |#
<aeth> fourroot: The libraries issue is increasingly false, but the perception is still there, unfortunately. Also the "Lisp is for symbolic AI" perception is definitely still there. It's an image issue now, rather than actual difficulties imo.
<fourroot> even the top companies are not supporting lisp
<fourroot> like google, they haven't made tensorflow library for lips
<beach> fourroot: Popularity and quality are orthogonal, and sometimes contradictory concepts.
<pjb> so basically, lisp will start to rise in popularity in 2057 and soon after, it will establish itself as the standard programming language for all software. Then singularity will occur.
fikka has quit [Ping timeout: 256 seconds]
<beach> fourroot: If you want a job, use what others use. If you want good stuff, your criteria should be different.
<stacksmith> fourroot: if you spend some time with Lisp, you will laugh at the idea of using anything else.
<aeth> fourroot: Another problem is that a lot of people learn Lisp superficially, thinking that it's all about list processing, when lists really aren't that important in modern Lisp except for macros. There's a lot of alternative data structures in modern CL available. Hash tables, (multidimensional) arrays, etc. Most tutorials are about how to do practical things, except Lisp. Those are about how to do esoteric recursive list processing.
<beach> stacksmith: The Common Lisp HyperSpec is explicit about it. Suppressing keyword argument checking means that you can supply a keyword argument that does not have a corresponding parameter definition. And that's all.
<pjb> Just in time to transfer the mind of all of you future old programmers into the universal computer system :-)
<fourroot> THANK YOU SO MUCH GUYS
<fourroot> THANK YOU !!
<stacksmith> beach: thank you.
<pjb> beach: a symbol &key argument.
<beach> fourroot: Anytime. Good luck.
<pjb> any symbol can be a &key argument.
<fourroot> im going to start learning lisp from now
<fourroot> can you guys suggest me some good resources
<beach> pjb: Right.
<pjb> fourroot: http://cliki.net
<stacksmith> fourroot: what languages are you familiar with?
<beach> fourroot: The book Practical Common Lisp is good and online.
<fourroot> stacksmith: c,c++, python ,php, bash
<beach> fourroot: PCL should be fine then.
wxie has joined #lisp
<beach> pjb: They are still called "keyword arguments" in the Common Lisp HyperSpec.
<pjb> Ah, ok. Sorry.
<beach> It's a bit confusing I admit.
fikka has joined #lisp
<stacksmith> fourroot: you have a fun road ahead of you. Lisp will completely rock your world, if you push through the immediate hump in the learning curve.
<fourroot> thank you so much guys
<fourroot> can you suggest me some videos on youtube ?
<beach> fourroot: I agree with stacksmith. Plus, it is risky. You might never want to return to any of your previous languages.
<beach> fourroot: The author of PCL has a few videos I believe.
<beach> fourroot: This one for instance: https://www.youtube.com/watch?v=VeAdryYZ7ak
<stacksmith> If you do it right, you _will_ never want to return to any of your previous languages. There is simply no possible good reason, other than I suppose someone giving you large sums of money. Although I've turned down many such offers.
<pjb> fourroot: and of course, sicp and https://www.youtube.com/watch?v=2Op3QLzMgSY&list=PL8FE88AA54363BC46 ; but this course uses scheme instead of Common Lisp (still very useful and mind blowing).
fikka has quit [Ping timeout: 256 seconds]
<aeth> CL is an incredibly multiparadigm language. It can do a large number of programming paradigms out there, much more than something like Java or Haskell that tries to dogmatically push one paradigm.
<aeth> You can't really put CL in a nice little categorization like you can with most popular languages.
<pjb> fourroot: there are not that many books that have a manga fanclub following: https://www.youtube.com/watch?v=rdj6deraQ6k
<aeth> You can port your GOTO-filled BASIC program from the 1980s to CL without really changing much. Because CL supports so many different styles. You don't even need to port it if you write a reader macro.
<beach> I suspect fourroot has enough material to get started.
<beach> And the enthusiasm of #lisp participants has been made clear.
<fourroot> haha yes now im kinda confused to select which one to start
<beach> fourroot: Well, this being IRC, it was to be expected.
<pjb> bookmark, browse and select what rings a bell to your ears.
<fourroot> i will watch some videos on youtube then go with PCL's pdf
<beach> Good luck!
fikka has joined #lisp
<beach> fourroot: And you are welcome to come back and ask specific questions.
<fourroot> im saving all of these links, thank you. I'll come back soon with a lot of questions :)
Kristof_HT has joined #lisp
<beach> Great!
<stacksmith> fourroot: #lisp and especially #clnoobs are really good places for help. Contrary to popular myth, Smug Lisp Weenies are very generous with help, especially if you do a little homework before asking questions and make an effort to use reasonable terminology.
z3t0 has joined #lisp
<fourroot> okay
<fourroot> i like this group
pierpa has quit [Quit: Page closed]
<fourroot> what are your views on HASKELL ?
<beach> fourroot: We try to avoid having opinions about languages other than the one that is on topic.
<stacksmith> Or any religious topics, for that matter.
<beach> fourroot: It is a completely different language, so people who prefer a particular paradigms may like it or not.
<fourroot> should i start with IDE or normal VIM editor
<beach> We recommend using SLIME.
fikka has quit [Ping timeout: 276 seconds]
<beach> In fact, the best way to get started these days seems to be to use Portacle.
orivej has quit [Ping timeout: 265 seconds]
<stacksmith> With portacle you will be up and running in under a minute.
<beach> Portacle packages up Emacs, SLIME, and SBCL in a convenient way.
<stacksmith> If you are not used to Emacs, prepare to spend a few days learning your way around.
z3t0 has quit [Ping timeout: 268 seconds]
<stacksmith> fourroot: Lisp is fantastic as almost all aspects of Lisp are programmable in Lisp. The way it looks largely has to do with the fact that Lisp programs can be manipulated by Lisp. The parentheses are not just someone's idea of syntax - they are extremely meaningful.
alexmlw has joined #lisp
<drmeister> Are there any Javascript programmers online who have time to give me a little off-line advice? I'm running a jupyter notebook kernel written in Common Lisp and I am trying to run some Javascript code within it.
z3t0 has joined #lisp
<drmeister> I'
<drmeister> I
<drmeister> Grrr
<Zhivago> I've done a bit with Javascript, but not jupyter.
<drmeister> I'm evaluating this code in a notebook cell using the HTML function
<drmeister> My second question will be "how do I get draw() to evaluate once the javascript is loaded from line 2"
quazimodo has quit [Ping timeout: 256 seconds]
<drmeister> My first question is, when I evaluate 'draw()' in the Javascript console the message "Logging" shows up in the console (yay)
<drmeister> But I get the following error - why?
<drmeister> ReferenceError: Can't find variable: Dracula
fikka has joined #lisp
<drmeister> Dracula is supposed to be defined by the code in: https://cdnjs.cloudflare.com/ajax/libs/graphdracula/1.0.3/dracula.min.js
<Zhivago> Yeah, but it hasn't loaded yet.
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<drmeister> Ok - good - why not - and how do I get it to load?
<drmeister> smokeink: Thanks, but this isn't an HTML page loading - it's displaying html for a single cell.
<Zhivago> There's an onload event you can catch for the individual script dom element.
<drmeister> I'll post a picture
<Zhivago> But that might require restructuring the code, hmm.
<Zhivago> There's also a document level onload which might be suitable.
<Zhivago> Otherwise follow the trying-to-fire-the-onload-event-on-script-tag and add the script element dynamically, I guess.
fikka has quit [Ping timeout: 248 seconds]
<Zhivago> And it's this way so that people can micro-optimize insanely for load-times, if you were wondering -- since those can be crippling.
mjl_ has joined #lisp
<drmeister> If I wait a while -doesn't the script load?
<smokeink> well, ,it should
stacksmith has quit [Remote host closed the connection]
<Zhivago> For the appropriate value of 'a while'.
<Zhivago> But you can't wait inside the javascript code, since javascript has an algorithmic evaluation model.
stacksmith has joined #lisp
fikka has joined #lisp
Kevslinger has quit [Quit: Connection closed for inactivity]
z3t0 has quit [Remote host closed the connection]
red-dot has joined #lisp
Oladon has quit [Quit: Leaving.]
fourroot has quit [Read error: Connection reset by peer]
wxie has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 260 seconds]
mjl_ has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
Karl_Dscc has joined #lisp
mishoo__ has joined #lisp
orivej has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
dieggsy has quit [Remote host closed the connection]
wxie has joined #lisp
dieggsy has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
wxie has quit [Ping timeout: 260 seconds]
wxie has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
fikka has joined #lisp
vlatkoB has joined #lisp
dieggsy has quit [Ping timeout: 276 seconds]
fikka has quit [Ping timeout: 265 seconds]
AxelAlex has joined #lisp
Tobbi has joined #lisp
fikka has joined #lisp
damke_ has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
damke has quit [Ping timeout: 264 seconds]
flamebeard has joined #lisp
heisig has joined #lisp
fikka has joined #lisp
shrdlu68 has joined #lisp
pjb has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 268 seconds]
pjb has joined #lisp
scymtym has quit [Ping timeout: 260 seconds]
wigust has joined #lisp
madmalik has joined #lisp
wxie has quit [Quit: AtomicIRC: The nuclear option.]
JuanDaugherty has quit [Ping timeout: 268 seconds]
daniel-s has joined #lisp
wxie has joined #lisp
fikka has joined #lisp
asarch has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
<asarch> From PCL, chapter 8, footnote #1: "As with functions, macros can also contain declarations..." <- What are these "declarations"?
<pjb> asarch: things that come after the lambda-list.
<pjb> (defun foo (x) (declare (type integer x)) (+ x 42))
<asarch> Thank you!
<asarch> Thank you very much pjb :-)
<pjb> (defmacro moo (x) (declare (type symbol x)) `',x)
<pjb> Those are not good examples, because type declarations are promises you make to the compiler, and there's no way you can ensure you will keep those promises, so it will break. But other declarations may be ok, such as special declarations, inline declaration, or custom declarations.
<asarch> Ok
<pjb> asarch: notice I said "things" because declarations are not forms. They're interpreted specially by the defun, defmacro, defmethod, lambda, flet, labels, and locally operators. (I may have missed a few).
fikka has joined #lisp
makomo_ has joined #lisp
jack_rabbit has joined #lisp
<asarch> Thank you very much once again
<asarch> Now I can get back to the bed
<asarch> Have a nice day
<asarch> See you later :-)
<asarch> Tchuss!
asarch has quit [Quit: leaving]
fikka has quit [Ping timeout: 276 seconds]
Chream has joined #lisp
Murii has joined #lisp
fikka has joined #lisp
easye has joined #lisp
_main_ has joined #lisp
__main__ has quit [Ping timeout: 276 seconds]
_main_ is now known as __main__
fikka has quit [Ping timeout: 248 seconds]
wxie has quit [Quit: AtomicIRC: The nuclear option.]
__main__ has quit [Read error: Connection reset by peer]
__main__ has joined #lisp
solyd has joined #lisp
wxie has joined #lisp
rumbler31 has joined #lisp
solyd_ has joined #lisp
varjag has joined #lisp
shka has quit [Ping timeout: 248 seconds]
fisxoj has joined #lisp
solyd has quit [Ping timeout: 276 seconds]
rumbler31 has quit [Ping timeout: 256 seconds]
ludston has quit [Remote host closed the connection]
fikka has joined #lisp
_cosmonaut_ has joined #lisp
scymtym has joined #lisp
wxie has quit [Quit: AtomicIRC: The nuclear option.]
Kristof_HT has quit [Remote host closed the connection]
CEnnis91 has quit []
mlf has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
CEnnis91 has joined #lisp
BitPuffin has joined #lisp
jantar-tobak has joined #lisp
JuanDaugherty has joined #lisp
hhdave has joined #lisp
damke__ has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
SuperJen has joined #lisp
milanj has joined #lisp
hhdave has quit [Ping timeout: 256 seconds]
JenElizabeth has quit [Ping timeout: 252 seconds]
solyd_ has quit [Quit: solyd_]
mingus has joined #lisp
cpape has quit [Ping timeout: 256 seconds]
solyd has joined #lisp
Cymew has joined #lisp
SuperJen has quit [Remote host closed the connection]
SuperJen has joined #lisp
SuperJen has quit [Remote host closed the connection]
SuperJen has joined #lisp
SuperJen has quit [Remote host closed the connection]
SuperJen has joined #lisp
SuperJen has quit [Remote host closed the connection]
SuperJen has joined #lisp
scymtym has quit [Ping timeout: 260 seconds]
Kaisyu has quit []
Kaisyu has joined #lisp
SuperJen has quit [Remote host closed the connection]
scymtym has joined #lisp
JenElizabeth has joined #lisp
JenElizabeth has quit [Remote host closed the connection]
pagnol has joined #lisp
JenElizabeth has joined #lisp
jyc has quit []
jyc has joined #lisp
hhdave has joined #lisp
ninegrid has joined #lisp
drmeister has quit []
angular_mike_ has quit []
drmeister has joined #lisp
pagnol has quit [Quit: Ex-Chat]
angular_mike_ has joined #lisp
damke has joined #lisp
daniel-s has quit [Remote host closed the connection]
damke__ has quit [Ping timeout: 264 seconds]
dddddd has joined #lisp
ku has joined #lisp
damke_ has joined #lisp
scymtym has quit [Ping timeout: 255 seconds]
scymtym_ has joined #lisp
JenElizabeth has quit [Remote host closed the connection]
damke has quit [Ping timeout: 264 seconds]
k-hos has quit [Ping timeout: 260 seconds]
damke has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
angelo has joined #lisp
<angelo> hi
damke_ has joined #lisp
<Cthulhux> .
<angelo> please help is there anyone using cl-plplot, I need help in using cl-plplot-system:pllegend - I couldn't find any example on the net! Thanks
markong has joined #lisp
damke has quit [Ping timeout: 264 seconds]
fisxoj has quit [Quit: fisxoj]
Josh_2 has joined #lisp
<Josh_2> gonna take another crack at figuring out CFFI today.
<beach> Sorry to hear that.
nika has quit []
<JuanDaugherty> in sbcl?
<beach> Isn't CFFI a compatibility package that works in several implementations?
<JuanDaugherty> yes but I would assume it's different in each
<JuanDaugherty> on the lisp side
porky11 has joined #lisp
<JuanDaugherty> it isn't?
<beach> Hmm, really? It seems that would defeat the purpose. But what do I know.
<jackdaniel> JuanDaugherty: it isn't
<jackdaniel> API is the same for each implementation
<JuanDaugherty> ah, good to know
<JuanDaugherty> if true
<jackdaniel> that's why it was written, as beach said - why bother writing compability layer otherwise?
<JuanDaugherty> then FFI'ed things should be portable on their cl sides
<jackdaniel> each implementation has its own ffi primitives, so if you already need to know them, why writing yet another ffi abstraciton layer
<JuanDaugherty> if true in fact as well as formally
dddddd has quit [Remote host closed the connection]
<JuanDaugherty> sbcl is the only cl I want to use anyway though so ... .
rumbler31 has joined #lisp
<beach> That's a strange attitude.
<JuanDaugherty> really why do you think so?
<beach> Because if you write software for others to use (which is why we are on freenode), then it would be advantageous for your users to be able to choose.
<jackdaniel> JuanDaugherty: also mixing medium with the information isn't good for your program
<JuanDaugherty> that's not why I am on freenode
<jackdaniel> sbcl is a medium, your program is the information
Chream has quit [Ping timeout: 248 seconds]
<JuanDaugherty> ah, well I assume cl carries the implementation independence
<beach> So why are you on freenode?
<JuanDaugherty> to gather information, interact
<JuanDaugherty> also share information, ofc
<beach> So you are saying that you write Common Lisp code, but you don't share it?
<JuanDaugherty> not quite
devlaf has quit []
<JuanDaugherty> i'm saying that I would only be doing end use, image level apps and not reusable libs
devlaf has joined #lisp
<JuanDaugherty> and for a living
rumbler31 has quit [Ping timeout: 248 seconds]
<JuanDaugherty> but the sources would be made available free to peers
<beach> I don't see how there is a difference between an application and a library when it comes to making it work on several implementations.
milanj has quit [Quit: This computer has gone to sleep]
python476 has joined #lisp
<shrdlu68> Is there a pre-existing solution to the problem of finding the longest repeating subsequence in a sequence?
<JuanDaugherty> prolly, saw your twitter page btw yesterday
<JuanDaugherty> (if ur etaion)
<shrdlu68> Nope.
<JuanDaugherty> oh, there's another shrdlu then
<beach> Not surprising.
<JuanDaugherty> nope
trocado has joined #lisp
milanj has joined #lisp
scymtym__ has joined #lisp
scymtym_ has quit [Ping timeout: 248 seconds]
<Josh_2> CFFI works on most implementations but some features are not available on some
<jackdaniel> could you name an example?
<jackdaniel> Josh_2: ↑
<jackdaniel> mgsk: this is the address now: http://www.sbcl.org/manual/#Statistical-Profiler
<jackdaniel> uhm, thanks
<mgsk> jackdaniel: cheers
<beach> I think I have decided that computing indentation of sub-forms of compound forms Common Lisp programs can not be based on the symbol of the operator in the compound form, simply because it is useful to be able to edit code before it is compiled.
<beach> So I think I need to use a hash table with the pair (<package name> . <symbol name>) instead. Now here is a problem. I also need for client code to supply new indentation functions, specific to that client.
<beach> In a solution with symbols, I could have a generic function with EQL specializers on the symbol and class specializers on the client instance. But what is the best way of allowing some default indent function at the same time as making it possible for client code to override it and/or supply additional indent functions?
<beach> I guess I could add the client to the key and then search the client class hierarchy explicitly.
<Josh_2> beach: what are you doing?
<Josh_2> Or making
<beach> I am writing an editor for Common Lisp code, and I want to compute indentation at after each keystroke.
m00natic has joined #lisp
<Josh_2> Wouldn't that be slow if you have lots of SLOC?
<beach> But the important aspect here is how to handle the CLIENT class hierarchy so that I can have default indent functions and client-specific ones.
<beach> Josh_2: No, I have taken care of that part.
<Josh_2> 1 million threads and a 7th gen Xeon
<beach> Smart algorithms and data structures.
<beach> Plus, Common Lisp code files are usually not that big, at least not compared to the power of today's processors.
fikka has quit [Ping timeout: 255 seconds]
damke has joined #lisp
<Josh_2> Do you check incrementally because the previous code should have already been checked? Like only checking the current (defun .. etc
<beach> Yes, I only check top-level forms that have been modified between keystrokes.
<beach> ... roughly speaking at least.
<scymtym__> beach: maybe provide something like (intern-token PACKAGE-NAME SYMBOL-NAME) => TOKEN-OBJECT. clients can then do (defvar *do-foo-token* (intern-token "MY-DO-FOO-PACKAGE" "DO-FOO")) (defmethod compute-indentation ((operator (eql *do-foo-token*) …)) …) and the automatic indentation would call (when-let ((token (intern-token package-name-string symbol-name-string))) (compute-indentation token))
<scymtym__> well, the second call would be FIND-TOKEN instead of INTERN-TOKEN
<beach> That's not a bad idea. Thanks!
damke_ has quit [Ping timeout: 264 seconds]
<beach> I will contemplate it over lunch. :)
fikka has joined #lisp
igemnace has quit [Quit: WeeChat 2.0.1]
fikka has quit [Ping timeout: 240 seconds]
<shrdlu68> Running (gc) then (gc :full t) after running a memory-greedy function works.
<shrdlu68> But just (gc :full t) exhausts heap.
fikka has joined #lisp
<flip214> shrdlu68: because the GC tries to copy objects that are still alive around, and with just a :full T there are too many.
fikka has quit [Ping timeout: 240 seconds]
trocado has quit [Ping timeout: 255 seconds]
nirved has joined #lisp
fikka has joined #lisp
Chream has joined #lisp
ludston has joined #lisp
damke_ has joined #lisp
shifty has joined #lisp
fittestbits1 has left #lisp [#lisp]
damke has quit [Read error: Connection reset by peer]
kundry_wag has joined #lisp
cpape has joined #lisp
kundry_wag has quit [Ping timeout: 256 seconds]
<shrdlu68> I'm using bit vectors as the keys in a large hash-table. All the bit vectors are displaced to a source bit vector, which is around 140kb, but I'm still exhausting the heap.
<shrdlu68> with --dynamic-space-size 6000
_cosmonaut_ has quit [Ping timeout: 255 seconds]
Chream has quit [Ping timeout: 256 seconds]
<|3b|> how large is the hash table?
Josh_2 has quit [Ping timeout: 265 seconds]
fittestbits has joined #lisp
<|3b|> and what does (ROOM) say about what is taking up most of your heap?
<ludston> How do you know that you are exhausting the heap?
<pjb> shrdlu68: what's the size of your bit vectors?
<shrdlu68> I'll take a closer look at the output of (room), I've momentarily switched to ccl to compare the performance.
<shrdlu68> ludston: SBCL tells me so, very clearly.
<shrdlu68> pjb: 0-300
<pjb> Well, bad.
<shrdlu68> * 1-300
<|3b|> looks like displaced arrays take up about 80 bytes each on 64bit sbcl, "array-header objects" in ROOM output
<pjb> A displaced bit vector on a 64-bit architecture will require a pointer to the original vector, a start offset, a length THat's 192 bits already. And probably more, like type tag or even type.
dcluna has quit [Ping timeout: 264 seconds]
<ludston> shrdlu68: Programming languages can lie to you :(. e.g. C# will throw an out of memory exception if you allocate an array of over 32 bits length (even if there is heap-space to spare)
<pjb> So you would use less space by copying your bits.
<|3b|> pjb: still a lot smaller than 140k, so back to defining 'large' :)
<pjb> Also it would be faster.
<|3b|> never mind, misread :/
<|3b|> yeah, probably smaller to copy most of them
<pjb> shrdlu68: and also, using integers would probably be faster and use even less memory.
<pjb> and play much nicer with hash-tables.
<|3b|> depends on whether you want to modify them in both cases though
dcluna has joined #lisp
<shrdlu68> I have to operate on bit-strings, unfortunately. I'm implementing dynamic markov compression.
<pjb> dpb and ldb work nicely too.
<shrdlu68> Hmm, so represent the bit vector as a sequence of uint64?
<pjb> no as a bigint.
<shrdlu68> That would be an extremely large bignum.
<pjb> Check how your implementation computes the hash of a vector (even bit-vector), it's probably horribly complicated, and with a lot of collisions.
<pjb> shrdlu68: nope, a 300-bit bignum is nothing.
<|3b|> shrdlu68: large numerical value, but same # of bits
<pjb> 5 words.
<|3b|> (and probably fewer bits of overhead)
<shrdlu68> On SBCL, the hash-table is surprisingly efficient with bit-vectors as keys.
<|3b|> hash table size won't depend on key type
<shrdlu68> Much less so on ccl. Hasn't finished running, think I'll have to kill it.
_cosmonaut_ has joined #lisp
<|3b|> performance will depend on hash test
smasta has quit [Ping timeout: 252 seconds]
<pjb> shrdlu68: nice.
<|3b|> so EQ/EQL might be faster for bitvectors
kundry_wag has joined #lisp
<ludston> You could always use a tree? (with each bit pointing at either nil or another bit/a pair of bits/or an address)
<pjb> shrdlu68: also, depending on the bits in your vectors, your application, I would suspect that using your own data structure would be more efficient.
<ludston> Actually don't do that. That would explode :P
<shrdlu68> So if I used bignums instead, the bottleneck would shift from hash test to bit-vector->integer conversion
<|3b|> what hash test are you using?
<shrdlu68> #'equal
* |3b| expects that would be comparable for bignums or bitvectors
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
kundry_wag has quit [Remote host closed the connection]
Kundry_W_ has joined #lisp
rumbler31 has joined #lisp
<shrdlu68> I like how statistical modelling is separated from coding when using arithmetic coding. I think I'll release this code as an "extensible" arithmetic coder.
<shrdlu68> Where modelling is simply a function tha returns the odd of the next bit being 0, given a bit vector of thus-far-seen bits.
<shrdlu68> *the odds of
<|3b|> one problem with bignums is distinguishing something like #*0 from #*00, if that matters
<shrdlu68> It does!
rumbler31 has quit [Ping timeout: 256 seconds]
<shrdlu68> Gee, I hadn't thought of that.
nowhereman_ has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
EvW1 has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
nowhere_man has quit [Ping timeout: 265 seconds]
<flip214> re ELS2018 -- are there any recommended accomodations?
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
attila_lendvai has quit [Client Quit]
attila_lendvai has joined #lisp
attila_lendvai has quit [Client Quit]
Kevslinger has joined #lisp
<ludston> shrdlu68: This article seems pretty relevant to what you are doing https://lisp-univ-etc.blogspot.com.au/2018/01/minimal-perfect-hash-tables-in-common.html
<shrdlu68> ludston: "the table should be filled with a keyset known ahead-of-time" - that constraint makes such hash-tables inapplicable in my case.
<shrdlu68> Fascinating article though.
antgreen has quit [Ping timeout: 260 seconds]
<pjb> shrdlu68: I'd tend to believe that in your case, using a tree or some other custom data structure would be better than a hash-table.
gabiruh_ has quit [Quit: ZNC - 1.6.0 - http://znc.in]
porky11 has quit [Ping timeout: 265 seconds]
<ludston> Are bit vectors pass-by-value in SBCL?
<beach> Everything is pass by value in every Common Lisp implementation.
<beach> But, the values are references.
<ludston> beach: The alternative to pass-by-value is pass-by-reference
<ludston> beach: either the entire bit-vector is copied each time it is passed as a parameter to a function, or a reference is passed to a memory address in the heap
<beach> ludston: (defun f (bit-vector) (setf bit-vector (make...))) then (defparameter *bv* (make...)) and (f *bv*)
<beach> ludston: *bv* is not altered by F, so it is pass by value.
rumbler31 has joined #lisp
<beach> But if you modify OBJECT as opposed to the binding, then the value of *bv* is modified.
<beach> ludston: There is never any implicit object copying in Common Lisp.
<beach> ludston: That does not mean it is pass by reference.
<beach> What I described when the value of the variable *bv* is altered by F is pass by reference. Common Lisp does not do that.
<pjb> ludston: there are other way to pass arguments. pass-by-name for example.
<beach> ludston: If you know Pascal, it is what you get when you declare your parameter VAR.
<Xach> It is a system that quickly becomes second nature and not something you think about.
raynold has quit [Quit: Connection closed for inactivity]
shrdlu68 has quit [Remote host closed the connection]
xrash has joined #lisp
shrdlu68 has joined #lisp
<ludston> beach: That is lexical scoping, yeah, i.e. modifying the the value of bit-vector does not modify *bv*
<beach> No, that's call by value.
<Xach> The way I tend to think of it is that objects with "internal" state that can be changed (conses, arrays, structs, instances, etc) will be changed if you modify them in a function.
<Xach> Also keeping in mind that extending a list from the front with a fresh cons doesn't modify an existing cons's state
<beach> "mutated" is better than "changed" I think.
olaf` has joined #lisp
<ludston> beach: Ok we are on the same page.
<beach> ludston: Sure, you just need to get your terminology right.
<Xach> But however you think of it, it certainly isn't something CL hackers spend much time thinking about in practice.
<Xach> It is automatic
<ludston> beach: Absolutely, and I'm happy to be corrected on it
<beach> ludston: Let me summarize: how things are passed is not specific to SBCL. It is in the Common Lisp standard. The way Common Lisp does it is best described as call-by-value where the values are references.
<beach> It is call-by-value, because arguments are evaluated before they are passed to the function being called. It is not call-by-reference because then a function would be able to alter the value of a variable in the caller by affecting the parameter.
<ludston> beach: But what I am really asking, is whether or not it is if bit-vector is a value type or a reference type
<ludston> beach: And you have said that it is a reference type
<Xach> that is not terminology you ever think about in common lisp.
<beach> ludston: Like I said, all Common Lisp values are references.
<beach> ludston: At least semantically.
<ludston> Xach: It is only terminology not to be thought about in common lisp because common lisp doesn't seem to have value types
<beach> ludston: No Common Lisp object is ever implicitly copied, unless the programmer is unable to verify that fact, simply because the object is not mutable.
<ludston> Which is fine.
<pjb> ludston: only numbers and characters can be implemented as values that can be copied (since they're immutable). But also, since they're immutable, it doesn't make any semantic difference if a reference to them is copied or if their value is copied.
<pjb> ludston: and you cannot even test it with EQ, since if a copy is made, EQ may or may not return T, at the implementation will.
<beach> ludston: And as Xach pointed out (perhaps not in so many words), this is the only sane semantics for function calls, which is also why most other languages get it wrong.
<Zhivago> And why you should consider EQL to be the identity test. :)
rumbler31 has quit [Remote host closed the connection]
<ludston> I see that. It doesn't make sense for the programmer to opt in to 'value' types in order to avoid allocating things that will be garbage collected
<beach> ludston: Many newbies ask why this function doesn't "work": (defun maybe-push (element list) (when ... (push element list))) because they expect a list that is passed to maybe-push to be altered.
<ludston> Yes, but push is only affecting 'element'
<ludston> *list
<beach> Because it is call-by-value.
nika has joined #lisp
<beach> ludston: That's the wrong way to view it. If you could do what you call a "value type", you would make a copy for each call. In Common Lisp no such copy is made unless you explicitly make one.
<ludston> beach: I'm not being clear. I do understand that the value of 'list
<beach> ludston: And that is why Common Lisp is much faster with assignments and parameter passing than you would get in, say, C++ if you pass any non-trivial object by value.
<ludston> is being overriden by a new cons cell, of which the cdr refers to the previous value of 'list'
_cosmonaut_ has quit [Ping timeout: 276 seconds]
<ludston> (without affecting the original list)
<pjb> Well, C++ is the most ridiculous programming language, doing everything wrong…
<Zhivago> Hmm, I'm not sure that I'd make that claim. I'd expect C++ to be about on par, providing passing a reference or pointer -- otherwise the semantics wouldn't be comparable.
<beach> pjb: Well, they kind of had no choice, given the initial requirement to avoid automatic memory management. Everything else follows.
EvW1 has quit [Ping timeout: 260 seconds]
<Zhivago> Using const & for parameters pretty much makes that issue disappear.
<beach> Zhivago: But ludston specifically wanted things to "avoid GC" by not using references.
<ludston> In theory, lisp ought to be able to avoid allocating objects on the heap in many circumstances, but I have no idea if any lisp implementations do this
<Zhivago> If I were to complain about C++ it would be on the other end of the problem with the 26 different kinds of move semantics required to make returning stuff efficient.
<beach> ludston: SBCL does a pretty good job if you use the DYNAMIC-EXTENT declaration.
<Zhivago> Well, the key to avoiding GC is to use linear references.
<pfdietz> You scooped what I was about to say, Zhivago.
<Zhivago> And that's an area where CL doesn't do very well.
<beach> ludston: In fact, it does too good a job, as I recall, because it believes the declaration even when it is false.
<ludston> beach: Serves you right for lying to the interpreter
<beach> The compiler, yes.
<pfdietz> If you lie to the compiler, it will have its revenge.
<beach> ludston: SBCL compiles by default.
<beach> ludston: I am sorry, but I have to correct some more terminology. Many people avoid interactive (or dynamic) languages such as Common Lisp, because they think it is implemented as an interpreter, and therefore think the generated code must be slow.
<beach> ludston: But a modern Common Lisp implementation would compile on the fly, generating native code before executing it.
<pfdietz> About the only important user-visible difference is whether dynamic variable bindings are visible at macroexpansion time.
<Zhivago> Heh, with Javascript clocking 25% of C speed, last I looked, that's a harder claim to make.
<ludston> beach: I don't mind it at all. I am thankful to be corrected to be honest. I am not so egoic about what I know about lisp
jstypo has quit [Read error: Connection reset by peer]
<pfdietz> (let ((*foo* 'bar)) (declare (special *foo*)) (macro-that-refences-*foo*))
<beach> ludston: So to avoid putting off ignorant programmers by making them think that all dynamic languages must be implemented as an interpreter, it is best to use some neutral language like "the evaluator" or "the REPL".
fikka has quit [Ping timeout: 256 seconds]
<ludston> beach: Ok, haha, I will use "the evaluator" in the future when describing lisp code being evaluated
<beach> ludston: Good. It may sound silly, but that's unfortunately the level of knowledge of many professional programmers, so you have to be careful with what you tell them.
EvW has joined #lisp
<ludston> The eternal pain of using more and more precise language is needing to explain why your choice of wording matters in comparison to different words that the person you are talking to is unfamaliar with anyway
<ludston> Haha
<beach> I see your point. But explaining things is part of my job. Perhaps you guessed.
<ludston> beach: I am familiar with this problem, certainly. It is a vertically integrated problem. (e.g. "You ought to use snapshot protection, and no that word was 'snapshot' and not 'transactioned' because blah blah blah)
<beach> I see, yes.
_cosmonaut_ has joined #lisp
<flip214> correct terminology matters _a_lot_ ... even more if the recipients don't even know the differences in meaning
fikka has joined #lisp
<beach> Well said.
<ludston> Since it's 1am, I am off to bed. Thanks for your time and wisdom :).
<Zhivago> 'differences in meaning [yet]' :)
LiamH has joined #lisp
<jackdaniel> sleep well \o
fikka has quit [Ping timeout: 276 seconds]
asedeno has quit []
orivej has quit [Ping timeout: 264 seconds]
asedeno has joined #lisp
Bike has joined #lisp
fikka has joined #lisp
olaf` has left #lisp ["ERC (IRC client for Emacs 25.2.2)"]
_cosmonaut_ has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 260 seconds]
l1x has quit []
l1x has joined #lisp
ludston has quit [Quit: Leaving]
ludston has joined #lisp
shrdlu68 has quit [Ping timeout: 268 seconds]
shrdlu68 has joined #lisp
MrMc has joined #lisp
_cosmonaut_ has joined #lisp
shifty has quit [Ping timeout: 276 seconds]
fikka has joined #lisp
<beach> scymtym__: I'll go with that idea. There is a minor problem (that I think I have a solution to) which is that the generic function might accumulate "garbage" methods that can no longer be called. But I think I can solve it by using a subclass of standard-generic-function and use a :BEFORE method on ADD-METHOD (or is it ADD-DIRECT-METHOD?) that cleans up garbage methods.
wxie has joined #lisp
wxie has quit [Client Quit]
wxie has joined #lisp
rumbler31 has joined #lisp
Murii has quit [Remote host closed the connection]
fisxoj has joined #lisp
rumbler3_ has joined #lisp
kobain has joined #lisp
kilimanjaro has quit []
kilimanjaro has joined #lisp
fisxoj has quit [Quit: fisxoj]
zkat has quit []
zkat has joined #lisp
rumbler3_ has quit [Ping timeout: 240 seconds]
mnoonan has joined #lisp
moei has joined #lisp
banjiewen has quit []
igemnace has joined #lisp
banjiewen has joined #lisp
Cymew has quit [Read error: Connection reset by peer]
Cymew has joined #lisp
wxie has quit [Ping timeout: 276 seconds]
Chream has joined #lisp
dieggsy has joined #lisp
warweasle has joined #lisp
ckonstanski has quit [Remote host closed the connection]
rumbler3_ has joined #lisp
Cymew has quit [Read error: Connection reset by peer]
Cymew has joined #lisp
rumbler3_ has quit [Remote host closed the connection]
rumbler3_ has joined #lisp
rumbler3_ has quit [Remote host closed the connection]
rippa has joined #lisp
<flip214> Zhivago: there's hope, at least for some, right.
<Xach> Hmm, I think either my broken understanding of ptys matches linux's broken behavior (on sbcl), or something related pty stuff is really broken on macos.
m00natic has quit [Ping timeout: 260 seconds]
AxelAlex has quit [Quit: AxelAlex]
<flip214> beach: scymtym__: the (EQL *token*) is taken at _compile_ time though, so re-registering should better return the same token!
<flip214> you will already know that, I guess - but I got bitten by exactly that, so I'm mentioning it.
orivej has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
Murii has joined #lisp
fikka has joined #lisp
<ym> Is there a modern alternative to PaiLisp?
<ym> Maybe in form of extension to sbcl?
nika has quit [Quit: Leaving...]
<ym> I can see lparallel only.
<beach> flip214: I promise to be careful. :)
safe has joined #lisp
<Xach> ym: what is PaiLisp?
<ym> Lisp made for parallel computing.
<jackdaniel> is there something wrong with lparallel?
<jackdaniel> (btw check out also lfarm, library with similar API for them same author for distributed computing)
fikka has quit [Ping timeout: 260 seconds]
<ym> I'm not sure how it works and how it corresponds to SBCL's SIMD-pack, which I like very much.
dddddd has joined #lisp
pjb has quit [Ping timeout: 256 seconds]
KZiemian has joined #lisp
<heisig> ym: lparallel is pretty amazing. What application do you have in mind?
<KZiemian> CLUS news and advertisement
<KZiemian> GitHub reviewers needed. My thread of CLUS project is working now on reading source code of CCLDoc, trying to understand it and producing appropriate documentation.
<KZiemian> I will push my attempts to make this documentation to GitHub repository. CCLDoc community should check if my understanding of code is correct (I know that I don't get it now, is just to big for understand at once).
<KZiemian> In mean time reviewers are needed to check if English of it is correct and most important, if this documentation is understand for someone outside CCLDoc project. If not I must changed it.
orivej has quit [Ping timeout: 248 seconds]
<KZiemian> There is already first humble pull requesthttps://github.com/Clozure/ccldoc/pulls
nowhere_man has joined #lisp
nowhereman_ has quit [Ping timeout: 265 seconds]
fourroot has joined #lisp
<fourroot> lisp has terrible syntax
<dlowe> no one is making you use it
<dlowe> *no one here is making you use it
pjb has joined #lisp
<Shinmera> Fourroot: If you want to troll you'll have to try harder than that.
<fourroot> Shinmera nooo
<fourroot> im not here for trolling
<fourroot> i just started learning lisp today
<dlowe> if you show up to a dog show and start conversations with "Dogs are terrible," you might not be taken seriously.
<fourroot> dlowe, Don't reply me if you dont want to answer
<dlowe> Fourroot: don't say anything if you don't expect a reply
<dlowe> anyway, there wasn't a question
makomo_ has quit [Ping timeout: 252 seconds]
fikka has joined #lisp
<beach> Yeah, it is interesting how a fixed mindset can make people spend a lot of energy to do stupid things. I once had a student who had moved to a different city just to avoid going to a university that taught a programming language he didn't like, but that in fact he knew nothing about.
pjb has quit [Ping timeout: 256 seconds]
sjl has quit [Ping timeout: 256 seconds]
<beach> But this is a classic; being new to a field, but then lecturing to the experienced participants in this field that they have been wrong all along.
<beach> I think Carol Dweck would recognize it instantly.
<TMA> arguably doing stupid things is essential to freedom, as is lecturing the experts essential to newbism (which might be an instance thereof)
<beach> TMA: Sure. That's why I used the word "interesting", rather than something else.
<jackdaniel> all syntax is awful, I feel lucky that lisp has almost no syntax
<jackdaniel> (semi-serious ↑)
fikka has quit [Ping timeout: 256 seconds]
igemnace has quit [Quit: WeeChat 2.0.1]
<beach> jackdaniel: About Lisp syntax, I think Paul Wilson put it well: It has a two-level syntax. The low level is very simple as you point out. But then there is the syntax of every special form, not specified as sequences of characters, of course.
<jackdaniel> tell me about it, I'm fixing closures in ECL's bytecodes compiler right now :)
<jackdaniel> (namely - compilation of such closures with c compiler)
<beach> Hmm, good luck.
<jackdaniel> thanks
<phoe> Is there a utility function equivalent to (setf place (not place))?
<phoe> Or rather a utility macro.
<beach> Don't think so. But that one could be worthwhile so as to avoid multiple evaluation of the sub-forms of the place.
<phoe> I ask because (setf (left-now-p (walk-parent shape)) (not (left-now-p (walk-parent shape)))) is pretty long for me.
<phoe> Also what you just said.
<beach> Especially what I just said! :)
nullman has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
<phoe> (:
fourroot has quit [Read error: Connection reset by peer]
wigust has quit [Quit: ZNC 1.6.5 - http://znc.in]
papachan has joined #lisp
<KZiemian> jackdaniel: how ECL is going?
<KZiemian> jackdaniel: I last heard about it in ELS in 2016
smokeink has quit [Ping timeout: 248 seconds]
mishoo__ has quit [Ping timeout: 255 seconds]
fikka has quit [Ping timeout: 276 seconds]
nullman has joined #lisp
fikka has joined #lisp
Josh_2 has joined #lisp
flamebeard has quit [Quit: Leaving]
<jackdaniel> well, it works :-)
<jackdaniel> and we are working on new release
<jackdaniel> not something what will happen before ELS'18 though
nullman has quit [Ping timeout: 265 seconds]
fikka has quit [Ping timeout: 240 seconds]
nullman has joined #lisp
<KZiemian> jackdaniel: good to here
ckonstanski has joined #lisp
nsrahmad has joined #lisp
makomo_ has joined #lisp
fikka has joined #lisp
nullman has quit [Ping timeout: 240 seconds]
<KZiemian> phoe: commenting CCLDoc is slowly going on, but I don't make commits to GitHun
<phoe> KZiemian: why?
<KZiemian> phoe: I don't want to do it befeor current pull request get reviewed by CCLDoc man
<phoe> okay, no problem.
<phoe> rme: ^
nullman has joined #lisp
<KZiemian> phoe: I anticipated that correction will be needed to recent documentation after finall reviews and changes in first pull request
zazzerino has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
dan64 has quit [Ping timeout: 256 seconds]
dan64- has joined #lisp
al-damiri has joined #lisp
<beach> GitHun, the friendly site for GIT repositories from Baltimore.
<Xach> i thought it was a service of dwim.hu
<beach> ("hun" is the default word for addressing people, rather than "sir", etc)
<beach> in B-more.
rumbler3_ has joined #lisp
fikka has joined #lisp
<shrdlu68> It's one Levenshtein distance from GitHub, probably a typo...
<KZiemian> beach: yes I make a typo, but there is another joke to it?
tfb has quit []
tfb has joined #lisp
Cymew has quit [Remote host closed the connection]
<beach> KZiemian: Not worth repeating. I should have kept it to myself.
rumbler3_ has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 256 seconds]
nowhereman_ has joined #lisp
arbv has quit [Ping timeout: 276 seconds]
nullman has quit [Ping timeout: 256 seconds]
nullman has joined #lisp
nowhere_man has quit [Ping timeout: 260 seconds]
<ym> heisig, I'm trying to develop physics sandbox, but my interest in computing technique a bit more common, since I curious if I can build reconfigurable MIT CADR on FPGA.
fikka has joined #lisp
Cymew has joined #lisp
nsrahmad has quit [Quit: Leaving]
heisig has quit [Quit: Leaving]
zazzerino has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 240 seconds]
<rme> KZiemian, phoe: Thanks for making a PR. I just reviewed it.
Cymew has quit [Ping timeout: 256 seconds]
KZiemian has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
warweasle has quit [Quit: working...sucks...]
jerme_ has quit []
jerme_ has joined #lisp
PuercoPope has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
<scymtym__> beach: how is the accumulation of garbage methods different from (defmethod foo ((c my-class)) …) (setf (find-class 'my-class) nil)?
<beach> The same I guess.
<scymtym__> i wouldn't bother, then
<beach> Yeah, maybe so.
fikka has joined #lisp
Bike has quit [Ping timeout: 260 seconds]
<beach> ym: What advantages do you expect from an FPGA compared to (say) a software emulator?
<jackdaniel> what I like about fpga is that you may create your own hardware devices
Bike has joined #lisp
terpri has quit [Ping timeout: 248 seconds]
fikka has quit [Ping timeout: 264 seconds]
<jackdaniel> for instance parallella (embedded computer with 16 cores, second version had planned 64 cores in a separate chip epiphany) had all the interfacing with arm processor programmer over fpga (on zynq chip, which has both a small fpga and an arm processor connected to the same busbar)
<jackdaniel> s/programmer over/programmed over/
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
<ym> beach, I'm sick of kludges.
<ym> And I have a decent FPGA-board, I also know about CADR porting attempts and I just can't stay out of this idea.
<beach> Fair enough.
fikka has joined #lisp
weltung has quit []
weltung has joined #lisp
khisanth_ has quit [Ping timeout: 276 seconds]
Josh_2 has quit [Ping timeout: 255 seconds]
fikka has quit [Ping timeout: 260 seconds]
makomo_ has quit [Ping timeout: 256 seconds]
EvW has quit [Ping timeout: 265 seconds]
khisanth_ has joined #lisp
arbv has joined #lisp
fikka has joined #lisp
solyd has quit [Quit: solyd]
Josh_2 has joined #lisp
zaquest has quit [Ping timeout: 256 seconds]
Baggers has joined #lisp
hhdave has quit [Ping timeout: 255 seconds]
Baggers has quit [Remote host closed the connection]
<thodg> When were introduced Common Lisp streams ?
<thodg> The CLHS truly has no historical information
MrMc has quit [Remote host closed the connection]
raynold has joined #lisp
<thodg> same question for Gray streams ?
<thodg> Simple streams ?
<thodg> or are we ungrateful devs for these bad interfaces
<thodg> not incompatible I guess
Baggers has joined #lisp
Baggers has quit [Remote host closed the connection]
_cosmonaut_ has quit [Ping timeout: 248 seconds]
<thodg> or maybe just users, one might program without streams or queues at all
<thodg> they might just be a part of the CL implementation
Baggers has joined #lisp
<thodg> in which case it would be possible to entirely do without them in the lisp image
<beach> thodg: Read CLtL and CLtL2.
<thodg> beach: right on my shelf =)
<beach> What do you have against streams?
Baggers has left #lisp [#lisp]
JuanDaugherty has quit [Ping timeout: 256 seconds]
<beach> I am pretty sure the predecessors of Common Lisp had streams, so there were probably in the language from the start.
<thodg> CLtL ⊂ CLtL2 ?
zaquest has joined #lisp
<beach> Common Lisp the Language, edition 1 and 2.
<beach> by Guy Steele.
<beach> Yes, the first is a subset of the second.
<beach> Well, maybe not entirely. But largely.
<thodg> first time i open the book =)
<beach> In fact CLtL2 has specific annotations for what changed from CLtL.
<beach> So you can just see of there are any change bars for streams.
<beach> see if
Jesin has joined #lisp
mlf has joined #lisp
<thodg> ok i guess it does not talk about gray streams or simple streams though
<beach> thodg: There are no simple streams or Gray streams in the Common Lisp standard.
<thodg> so Gray streams are based on CLtL edition 1 only.
Karl_Dscc has joined #lisp
smasta has joined #lisp
<thodg> they immediately specify that a stream is operating on integer or character data
<thodg> i dont get it how they identify these data types amongst all data types
SlowJimmy has joined #lisp
<thodg> it makes no sense, stream primitives are the same for integer, characters, structures, lists, strings, streams
Kaisyu has quit [Quit: Connection closed for inactivity]
<thodg> if i want a stream of stream of structures containing integers, floats, and text it should be the same stream interfaces all along
<thodg> each stream in blocking or non-blocking mode
<thodg> the integer character limitation seems very artificial
<thodg> however the standard reserves all implementation and public interface symbols like STREAM, READ, WRITE to these artificially limited concepts vaguely related to streams
<thodg> and i can find no rationale for it either
<thodg> they present it as a good thing (tm)
<thodg> i think it sucks
<Xach> thodg: I think one possible answer when it comes to the CL standard is it would be a lot of complexity to get right and not standardizing any widespread common existing system.
<Xach> thodg: whereas character and binary streams were in widespread use at the time of standardization
Josh_2 has quit [Ping timeout: 264 seconds]
<thodg> well they only give the bare minimum to build another lisp system and maim the stream interfaces for doing anything beyond, though CLOS being part of the system and providing perfect subclassing abilities
<thodg> it fails to reinject CLOS functionalities back to the primitive stream systems code
<Xach> thodg: I am referring only to the rationale, which is discussed early in the standard if you'd like to read it.
damke_ has quit [Ping timeout: 264 seconds]
<Xach> thodg: I think it would be nice to have higher-level interfaces atop streams, too. But I understand why they are the way they are, mostly.
<Xach> higher-level in the sense of beyond character and integer.
<thodg> Xach: I wonder about these widespread common existing systems, I thought SICP was a good read on streams
<Xach> thodg: No. SICP does not have anything to do with Common Lisp and common lisp streams.
<Xach> What they call streams is something else entirely.
<thodg> Not entirely : CL streams are a maimed version of SICP streams
<thodg> with a few extra features
<thodg> but the programming intent is the same
<thodg> you want to push and pull data in order
<thodg> not in order is an unordered queue
<thodg> should be right along
<thodg> on all data types
<thodg> blocking or non blocking
<jasom> thodg: for the most part, the underlying OS streams are either character or integer based (with unix winning, they are all integer based now), so you can build higher level functionality on top of those
<thodg> well in C integer is cast to structured instantly
<thodg> or every compiler with an ABI
<thodg> lisp fails at doing that
<thodg> mostly
<fe[nl]ix> thodg: that's enough
<fe[nl]ix> you can go vent somewhere else
<thodg> being an exception in regard of everything else CL does compared to other languages
damke_ has joined #lisp
rumbler3_ has joined #lisp
<thodg> but I understand these concern sensible parts about when we learned to become compatible with a computer system so these are rarely criticized or even talked about
<thodg> fe[nl]ix: sorry if I offended you ??
<thodg> I really feel on topic
<thodg> I would not let CL fall behind other languages like NodeJS or even Ruby because of prevalence of archaism
<jasom> thodg: I can think of 3 different CLOS friendly ways of serializing objects in common lisp; I don't see the problem.
panji has joined #lisp
<thodg> jasom: do they provide common lisp streams for multi agent message passing programming ?
<fe[nl]ix> thodg: you're endlessly ranting about the suboptimality of the standard. I've seen that a hundred times
<fe[nl]ix> if you're unsatisfied go implement someting better
<thodg> fe[nl]ix: I did
<jasom> thodg: why wouldn't they?
<thodg> though you do not seem very keen on reading it : http://github.com/cl-stream/
rumbler3_ has quit [Ping timeout: 276 seconds]
<thodg> for instance write means add one (element-type) onto stream, implemented though stream-write
<thodg> there are classes and generics for buffered streams
<thodg> you can implement and use streams of every lisp data types in blocking or non-blocking mode
<thodg> and it is compatible with CL streams
<thodg> for the non-blocking parts
<thodg> uh blocking i mean
<thodg> so if stream type is T you have a real common lisp stream
<thodg> element-type *
damke_ has quit [Ping timeout: 252 seconds]
<thodg> so the compiler can be parallelised
<thodg> and distributed
<thodg> using typed stream paradigms
<thodg> why not plug user trust and permissions at the streams level, like unix
<scymtym__> how does (cl-stream:write stream (lambda (x) x)) work?
mjl_ has joined #lisp
<thodg> it provides an interface for you writing an implementation of it, unlike CL stream API
<thodg> you or others
shka has joined #lisp
<thodg> as a package
<thodg> see unistd-stream for instance
<thodg> it gives concurrency of implementation as well as concurrency of users
<thodg> for the devops or system integrator
ku is now known as k-hos
fikka has quit [Ping timeout: 265 seconds]
Chream has quit [Ping timeout: 255 seconds]
<shka> good evening
<scymtym__> i wanted to remark that UNISTD-OUTPUT-STREAM seems to write the element into a foreign ub8 array but i guess the mention of "concurrency" and "devops" explains it
<shka> Shinmera: hello!
<thodg> why not have a real on disk filesystem implementation of streams and be able to switch between implementations
Cymew has joined #lisp
<thodg> it has no reason for this to be left to implementors
<thodg> of the compiler
<thodg> streams and filesystems are orthogonal to CPU and computing architectures
<thodg> except maybe considering opcode streams
<thodg> much like CLOS
Cymew has quit [Ping timeout: 240 seconds]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
Jesin has quit [Quit: Leaving]
Cymew has joined #lisp
<thodg> this would give CL very good distributed computing capabilities
<thodg> works well with threads
Cymew has quit [Ping timeout: 252 seconds]
wigust has joined #lisp
fikka has joined #lisp
Cymew has joined #lisp
<shka> thodg: what it has to do with anything?
mishoo__ has joined #lisp
<shka> especially with distributed computing?
aindilis has quit [Read error: Connection reset by peer]
terpri has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
Cymew has quit [Ping timeout: 260 seconds]
Cymew has joined #lisp
<thodg> scymtym__: I do not get the reference of your comment ?
<thodg> where does it write a ub8 array ?
fikka has joined #lisp
<thodg> scymtym__: it's called WRITE-ELEMENT-TO-BUFFER for a reason
<thodg> but the stream implementation actually provides the buffer
<thodg> so as to be the most non-copy data type possible
<thodg> as possible*
Cymew has quit [Ping timeout: 260 seconds]
<thodg> also the buffer is lazily created
<thodg> not consing any memory if the stream is not actually used
<thodg> by default, for all buffered streams of any data type including unsigned-bytes, characters, symbols, lists, hash-tables
fikka has quit [Ping timeout: 256 seconds]
damke_ has joined #lisp
jmercouris has joined #lisp
Cymew has joined #lisp
fikka has joined #lisp
Cymew has quit [Ping timeout: 240 seconds]
razzy has quit [Read error: Connection reset by peer]
Cymew has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
SlowJimmy has quit [Quit: good bye cruel world]
warweasle has joined #lisp
kobain has quit [Ping timeout: 256 seconds]
DrPete has left #lisp [#lisp]
Cymew has quit [Ping timeout: 240 seconds]
<jmercouris> any mailing list software out there written in common lisp?
<Xach> jmercouris: no
<jmercouris> Xach: Thanks for quick answer
<jmercouris> having said this, any suggestions for mailing list software?
Cymew has joined #lisp
<thodg> jmercouris: i remember hacking q-encodings
<thodg> and mime-types
<thodg> there are libs to do it yourself
<thodg> including smtp
varjagg has joined #lisp
<Xach> jmercouris: i used google groups. i don't like it much but it works ok.
<jmercouris> I don't want to have to build my own mailing list software, from what I understand it is way more complex than it appears on the surface
<jmercouris> Xach: I was using that as well, but I don't like the fact that 1. it is run by google 2. the interface is terrible
<thodg> you'd have to make it less complex to us, yes
<jmercouris> The only thing I really see is Mailman or Groupserver
<jmercouris> I've had bad experiences with Mailman so far, so maybe I can just try Groupserver
<rme> I've run Postfix and Mailman for a long time. But there is a certain amout of trouble involved in keeping up with all that.
<thodg> i might write it in lisp by the time a qmail installation would complete
<thodg> but that would not include much testing
<jmercouris> I wish I could find a puppet or chef recipe that just provisions everything, and it "just works"
<jmercouris> rme: If I develop a salt recipe or something to provision this server, I'll ping you
<jmercouris> or maybe even just a shell script...
<thodg> jmercouris: well "everything" might be bound to having a grammar
<jmercouris> thodg: :D
<rme> I always think that I'm going to make an ansible playbook (or whatever the currently-fashionable tool is), but then I always end up doing it by hand in order to quickly put out some fire or deal with some other trouble.
<jmercouris> I'm looking at the groupserver installation documentation, looks way simpler and better than mailman
attila_lendvai has quit [Read error: Connection reset by peer]
<thodg> sysadmins were not shy to do it in C
<jmercouris> at least from strictly that perspective
<thodg> closely following RFCs
<rme> I just happen to be familiar with my particular setup after managing and running it for years.
<thodg> and sometimes bringing their own on-disk queue systems
fikka has joined #lisp
Cymew has quit [Ping timeout: 264 seconds]
<thodg> as more than just a text file
<thodg> and a smtp forwarder
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
<thodg> that's the most of it
<thodg> i could do it in a week
<thodg> would..
smasta has quit [Ping timeout: 256 seconds]
jmercouris has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 264 seconds]
Sauvin has quit [Read error: Connection reset by peer]
fikka has joined #lisp
SlowJimmy has joined #lisp
u0_a193 has joined #lisp
SlowJimmy is now known as NotSoFastJames
lnostdal has quit [Remote host closed the connection]
Cymew has joined #lisp
u0_a193 has left #lisp [#lisp]
<thodg> it might exist on github without having registered itself on wikis and such
lnostdal has joined #lisp
Cymew has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 248 seconds]
Cymew has joined #lisp
Cymew has quit [Ping timeout: 240 seconds]
Cymew has joined #lisp
Cymew has quit [Ping timeout: 248 seconds]
Cymew has joined #lisp
fikka has joined #lisp
Cymew has quit [Ping timeout: 268 seconds]
Cymew has joined #lisp
fourier has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
solyd has joined #lisp
Cymew has quit [Ping timeout: 255 seconds]
nowhere_man has joined #lisp
nowhereman_ has quit [Ping timeout: 268 seconds]
Cymew has joined #lisp
Cymew has quit [Ping timeout: 240 seconds]
fourroot has joined #lisp
smasta has joined #lisp
Cymew has joined #lisp
smurfrobot has quit [Remote host closed the connection]
makomo_ has joined #lisp
Cymew has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
Cymew has joined #lisp
makomo_ has quit [Ping timeout: 256 seconds]
rumbler3_ has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
tripty has quit [Remote host closed the connection]
Cymew has quit [Ping timeout: 240 seconds]
vlatkoB has quit [Remote host closed the connection]
Cymew has joined #lisp
panji has quit [Ping timeout: 240 seconds]
rumbler3_ has quit [Ping timeout: 255 seconds]
shka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
Cymew has quit [Ping timeout: 255 seconds]
parjanya has quit [Remote host closed the connection]
BitPuffin has quit [Remote host closed the connection]
Cymew has joined #lisp
jmercouris has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
makomo_ has joined #lisp
Cymew has quit [Ping timeout: 256 seconds]
smurfrobot has joined #lisp
Cymew has joined #lisp
fikka has joined #lisp
jmercouris has quit [Ping timeout: 255 seconds]
solyd has quit [Quit: solyd]
Cymew has quit [Ping timeout: 268 seconds]
smurfrobot has quit [Ping timeout: 268 seconds]
kdridi has joined #lisp
Cymew has joined #lisp
fikka has quit [Ping timeout: 276 seconds]
orivej has quit [Ping timeout: 268 seconds]
Cymew has quit [Ping timeout: 248 seconds]
Cymew has joined #lisp
smurfrobot has joined #lisp
kdridi has quit []
pierpa has joined #lisp
aindilis has joined #lisp
Cymew has quit [Ping timeout: 248 seconds]
smurfrobot has quit [Ping timeout: 268 seconds]
Cymew has joined #lisp
fikka has joined #lisp
aindilis` has joined #lisp
smasta has quit [Ping timeout: 256 seconds]
aindilis has quit [Ping timeout: 265 seconds]
Cymew has quit [Ping timeout: 256 seconds]
smasta has joined #lisp
Cymew has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
EvW1 has joined #lisp
aindilis` has quit [Ping timeout: 240 seconds]
Cymew has quit [Ping timeout: 260 seconds]
Cymew has joined #lisp
fikka has joined #lisp
wigust has quit [Quit: ZNC 1.6.5 - http://znc.in]
Cymew has quit [Ping timeout: 248 seconds]
Murii has quit [Quit: WeeChat 1.4]
fikka has quit [Ping timeout: 248 seconds]
Cymew has joined #lisp
mjl_ has quit [Ping timeout: 255 seconds]
Cymew has quit [Ping timeout: 256 seconds]
dTal has joined #lisp
kobain has joined #lisp
Cymew has joined #lisp
scymtym__ has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
Cymew has quit [Ping timeout: 256 seconds]
dTal has quit [Changing host]
dTal has joined #lisp
tripty has joined #lisp
Cymew has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
Cymew has quit [Ping timeout: 276 seconds]
fikka has joined #lisp
NotSoFastJames has quit [Quit: good bye cruel world]
fikka has quit [Ping timeout: 240 seconds]
fourroot has quit [Read error: Connection reset by peer]
smasta has quit [Ping timeout: 240 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
fikka has joined #lisp
Cymew has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
smasta has joined #lisp
jmercouris has joined #lisp
madmalik has quit [Quit: Connection closed for inactivity]
Cymew has quit [Ping timeout: 264 seconds]
Cymew has joined #lisp
makomo has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
fikka has joined #lisp
makomo_ has quit [Ping timeout: 255 seconds]
Cymew has quit [Ping timeout: 255 seconds]
shifty has joined #lisp
Cymew has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
dieggsy has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
fourier has quit [Ping timeout: 268 seconds]
varjagg has quit [Quit: ERC (IRC client for Emacs 25.2.1)]
Cymew has quit [Ping timeout: 256 seconds]
dieggsy has joined #lisp
Cymew has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
ludston_ has joined #lisp
attila_lendvai has joined #lisp
kdridi has joined #lisp
ludston has quit [Ping timeout: 248 seconds]
Cymew has quit [Ping timeout: 256 seconds]
Cymew has joined #lisp
porky11 has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<porky11> hi
attila_lendvai has quit [Quit: Leaving.]
Cymew has quit [Ping timeout: 265 seconds]
rumbler3_ has joined #lisp
Cymew has joined #lisp
<stacksmith> Greetings...
rumbler31 has quit [Ping timeout: 255 seconds]
xrash has quit [Remote host closed the connection]
rumbler3_ has quit [Ping timeout: 264 seconds]
Cymew has quit [Ping timeout: 265 seconds]
Cymew has joined #lisp
nydel has joined #lisp
Cymew has quit [Ping timeout: 248 seconds]
Cymew has joined #lisp
nirved has quit [Quit: Leaving]
rpg has joined #lisp
quazimodo has joined #lisp
Cymew has quit [Ping timeout: 248 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
Cymew has joined #lisp
Bike has quit [Ping timeout: 260 seconds]
mishoo__ has quit [Ping timeout: 248 seconds]
scymtym has joined #lisp
Cymew has quit [Ping timeout: 248 seconds]
Cymew has joined #lisp
Kundry_W_ has quit [Remote host closed the connection]
kundry_wag has joined #lisp
moei has quit [Quit: Leaving...]
smurfrobot has joined #lisp
Cymew has quit [Ping timeout: 248 seconds]
kundry_wag has quit [Ping timeout: 240 seconds]
smurfrobot has quit [Ping timeout: 248 seconds]
SlowJimmy has joined #lisp
Cymew has joined #lisp
SlowJimmy has quit [Client Quit]
pagnol has joined #lisp
Cymew has quit [Ping timeout: 276 seconds]
Cymew has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
dieggsy` has joined #lisp
sjl has joined #lisp
dieggsy` has quit [Remote host closed the connection]
Cymew has quit [Ping timeout: 260 seconds]
Cymew has joined #lisp
razzy has joined #lisp
Cymew has quit [Ping timeout: 260 seconds]
Cymew has joined #lisp
Bike has joined #lisp
safe has quit [Read error: Connection reset by peer]
Cymew has quit [Ping timeout: 260 seconds]
<jasom> jmercouris: lampson is the least-painful tool I've used for writing software with an e-mail interface, and there is an existing mailing list server program written on top of it...
<jasom> jmercouris: but that server is very minimal
smasta has quit [Ping timeout: 268 seconds]
Cymew has joined #lisp
Kaisyu has joined #lisp
Cymew has quit [Ping timeout: 240 seconds]
Cymew has joined #lisp
LiamH has quit [Quit: Leaving.]
<stacksmith> Could someone clarify: as a macro-form begins to be expanded, do its arguments get expanded first? CLHS 3.1.2.1.2.2 Macro Forms indicates that the entire macro-form is just handed over to the macro-function... Is the macro-function required to macroexpand the arguments prior to destructuring?
<Shinmera> The macro gets its arguments as literals
<Shinmera> There is no macro expansion of arguments.
Cymew has quit [Ping timeout: 268 seconds]
<Shinmera> However, the forms emitted by the macro are then further processed and macroexpanded as necessary.
Oladon has joined #lisp
arescorpio has joined #lisp
Cymew has joined #lisp
python476 has quit [Read error: Connection reset by peer]
makomo has quit [Quit: WeeChat 1.9.1]
<stacksmith> So the macro-form's arguments must literally comply with the corresponding macro's lambda-list?
<stacksmith> as far as destructuring goes...
nowhere_man has quit [Read error: Connection reset by peer]
nowhereman_ has joined #lisp
<Shinmera> Well yeah?
Cymew has quit [Ping timeout: 256 seconds]
<Bike> it's simple
<Bike> macro function just gets the form with no further processing
<stacksmith> Bike: Shinmera: thanks.
Cymew has joined #lisp
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<stacksmith> A part of me was hoping that the metaprogramming level followed the normal level's conventions; that is, macro arguments would get expanded first much like function arguments get evaluated...
<Bike> that would prevent a lot of things.
<Bike> you couldn't make a macro like LET.
<Xach> or like defclass
<Bike> in fact you couldn't make a macro that had very different syntax at all.
<stacksmith> Would it? You could still expand an argument to a destructuring list form prior to the macro's expansion.
<Bike> how would it know to stop expanding?
Cymew has quit [Ping timeout: 248 seconds]
<stacksmith> I suppose it would stop when the expanded form is no longer a macro? I am talking out of my butt however.
<Bike> like, take with-open-file. you write it like (with-open-file (stream ...) ...)
<Bike> it would have to treat stream as a macro
<Bike> and if by chance you used an actual macro name, shit would go pear shaped
rpg has quit [Quit: Textual IRC Client: www.textualapp.com]
Cymew has joined #lisp
eschatologist has quit [Ping timeout: 264 seconds]
eschatologist has joined #lisp
<stacksmith> My thinking was that in absence of a macro named stream, it would leave it alone to destructure as usual, but leave you with an option to define a stream macro and have it do something else...
mlf has quit [Ping timeout: 240 seconds]
<stacksmith> But yeah, never mind my foolish ideas..
jmercouris has quit [Ping timeout: 248 seconds]
Cymew has quit [Ping timeout: 260 seconds]
Cymew has joined #lisp
<jasom> stacksmith: some macros may expand macros that they encounter manually (this is one reason that macros may take the environment as a parameter)
smasta has joined #lisp
<jasom> stacksmith: code walkers may need to do this, and this is one reason that code-walkers can be hard to do right...
Cymew has quit [Ping timeout: 264 seconds]
Cymew has joined #lisp
aindilis has joined #lisp
<stacksmith> jasom: by the time the macro definition's code is executing, the macro-function is done destructuring. I suppose I am curious if there is a way to run code prior to that. Is macroexpand-hook the way to do that?
<jasom> stacksmith: what do you mean?
<jasom> stacksmith: you can use &whole to get the un-destructured lambda list
Cymew has quit [Ping timeout: 256 seconds]
<stacksmith> But I think the implementation will barf if the arguments are not matching the destructuring list before any of my code gets to process the &whole...
<jasom> stacksmith: so just use &rest and destructuring-bind?
Cymew has joined #lisp
<stacksmith> Duh. Of course.
<Bike> you can also set the macro-function directly, without going through defmacro, if you want.
<jasom> you get worse indenting in emacs then though, so specify as much structure as you can to the defmacro
<stacksmith> right.
<jasom> e.g. (with-foo (&rest args) &body b) is slightly better than (with-foo arg-list &body b)
<jasom> but then you can't have a non-list for the first parameter
<stacksmith> Yes, of course. Thank you.
manualcrank has joined #lisp
smasta has quit [Ping timeout: 248 seconds]