freenode/#lisp - IRC Chatlog
Search
5:32:43
beach
SaganMan: I am fine, thank you. I have been making excellent progress on bootstrapping the past few days. What about you?
5:34:38
SaganMan
beach: I'm in my family business. It's real estate and construction. We take land for development and construct apartments.
5:37:38
SaganMan
beach: We don't usually do projects on that grand scale. That is the biggest investment in mine and my father's life. It looks impressive but it's great risk and stress.
6:20:48
no-defun-allowed
well my ffmpeg interface is still shitslow at 4fps but the videos aren't broken now
11:26:09
makomo
pjb: i managed to find one occurence of the (4) (3) ordering, https://www.hexstreamsoft.com/libraries/place-utils/#funcallf-applyf
11:26:38
makomo
granted, funcallf is just _f in disguise, but the evaluation order has been explictily documented (and therefore thought through)
12:14:41
adlai
"risk and stress" ... yep, that sounds like components of the construction Hamiltonian. story checks out!
12:48:12
phoe
I'm running code that's fifteen years old and the only thing that was really required is fixing it to use ASDF.
12:52:05
_death
phoe: check copyright date range @ https://bitbucket.org/dfmorrison/roan/src/e43b5ae8af0aba6930f0183a4afbc7e3e004da1e/roan.lisp?at=master&fileviewer=file-view-default
13:10:18
pjb
phoe: https://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/wang.html if you can run that, then wordnet!
13:12:10
pjb
smokeink: have a look at https://www.informatimago.com/articles/usenet.html#C-like-pointers-in-Lisp
13:15:19
pjb
smokeink: your code is full of bug, that's why I cannot say anything consistent about it.
13:17:24
smokeink
pjb: ignore f, I first typed that f function to specifically ask whether myvar can access that a in some way or not
13:18:59
smokeink
I just wrote a snippet, I didn't paste my actual code because the actual code has other unnecessary details
13:21:49
phoe
(get-synonyms "horse" :noun) ;=> (("horse" 0) ("horse_cavalry" 1) ("cavalry" 1) ("horse" 0) ("Equus_caballus" 0) ("horse" 3) ("gymnastic_horse" 0) ("sawhorse" 0) ("horse" 1) ("sawbuck" 0) ("buck" 0))
13:22:58
pjb
smokeink: you test for (functionp myvar) and then in the case you test for symbols. Therefore the case will always return nil, if myvar is bound to a function, and the IF will return nil if not.
13:23:38
pjb
smokeink: a compiler can detect that at compilation time, so it can generate (lambda (a b) (declare (ignore a b)) nil) instead.
13:27:09
smokeink
no question for now, I'll first try to see if declaring vars special will work well or not
13:35:31
phoe
But it would be bold for me to assume any license at all if the author put none on it.
13:36:48
phoe
pjb: I did. All I have is the email address @ai.mit.edu which might or might not work after all these years.
13:51:05
phoe
pjb: there's no mailserver at ai.mit.edu. I have no direct means of contacting the author.
13:58:05
pjb
phoe: since it comes from the MIT, it might be under the MIT license. But you'd need confirmation.
14:10:47
oni-on-ion
aeth: check out recent release notes if you havnt already, http://www.sbcl.org/all-news.html , like 1.4.10 adding or subtracting 1 from a fixnum does not cons. =)
14:13:15
pjb
smokeink: I wouldn't worry about that for now. Just build your system, and make it work. If there remain time then, you will be able to have more philosophical questions…
14:13:24
smokeink
Since my code is a bit complicated than this snippet, it might result into many ifs and cases , and that's not very nice. Just wondering if you guys can spot a different solution
14:14:14
phoe
if yes, you might want to instead go CLOS and use a generic function; this will move the dispatch from a massive CASE into individual methods
14:15:05
phoe
(defclass apple ...) (defclass banana ...) (defgeneric frobnicate (fruit)) (defmethod frobnicate ((apple apple)) ...) (defmethod frobnicate ((banana banana)) ...)
14:15:21
pjb
You could have a table of predicate and functions to generate the code, so you'd just write (funcall (optimization-generate (find-if (lambda (predicate) (funcall predicate myvar)) table :key (function optimization-predicate))))
14:16:37
jackdaniel
the question is: what is easier to optimize: a few symbols + typecase or a few classes + gf dispatch
14:18:56
jackdaniel
clos might be but doesn't have to be cleaner. it is easy to do a mixin spaghetti with unobvious method invocation structure
14:18:56
phoe
as for performance, a typecase might be faster if all of your types are classes and therefore type comparison is going to be pointer equality
14:25:16
pjb
smokeink: for example, a given optimization may need to do things or generate expressions at several places, to prepare the optimization or complete it. You may need temp variables, initializations, cleanup, in addition to the code generated at the place of interest. Then you will need several functions (or methods) for a given optimization. This would exclude the typecase solution. (CLOS methods or a table managed by yourself w
14:25:38
pjb
smokeink: but what is "better" depends on whether you have such needs for your optimizations.
14:26:28
oni-on-ion
"what is easier to optimize" seems a clear question to me. CLOS is slower for GF because classes can change in runtime. as opposed to say julia where all code paths are decided before runtime
14:27:43
pjb
oni-on-ion: CLOS can reach the 2 JSR on GF calls. Just like Objective-C. Can julia dispatch in less than 2 JSR?
14:33:38
oni-on-ion
i think often julia does not do any jumps, when the code is called "type stable" the compiler can already know the code path and lay it out before eval (all code is compiled with llvm) with or without declaring inline
14:34:38
oni-on-ion
this feature of clos is exactly why i need lisp right now though (to update code in a live server)
14:55:17
francogrex
but then aside from this chat here, what is the goto forum to post cl related messages? don't tell me it's stackoverflow now!
15:12:18
francogrex
I wonder how come almost all implementations still fail a good chunck of the ansi-tests? does that mean those tests are bollocks?
15:32:00
loke
pjb & Bike: Oddly enough, wj doesn't seem to have posted his usual garbage for over a week?
15:36:18
loke
shka_: I'm checkin gon Google Reader, which to my knowledge doesn't filter spam at all.
16:05:44
francogrex
in sbcl when you disassemble you get the mem address of the function in the output. in ccl it's not output but does anyone recall how to get the memory address otherwise?
16:28:19
drmeister
All the most popular ones. I'm building a web based scientific programming environment and I'd like to be able to transcribe equations without converting them into s-expressions.
16:29:05
drmeister
I recall looking into this a year ago and I thought I was working with a different library.
16:29:22
phoe
if someone inputs "2 + 2" you could (eval (cons $ (read-from-string (concatenate 'string "(" "2 + 2" ")"))))
16:30:52
phoe
I wonder if $ errors on unknown operators; if yes, then it would solve a part of input sanitization problem
16:33:40
oni-on-ion
https://stackoverflow.com/questions/25434538/define-function-for-evaluating-infix-expressions-in-lisp ~
16:37:59
_death
I thought lobste.rs might be interesting because it exposes a mailing list format, which can then be fed to gmane and read using gnus.. but I've no lobste.rs account