freenode/lisp - IRC Chatlog
Search
6:54:09
jackdaniel
if you are lazy and not overly attached to ANSI CL standard use package local nicknames
6:55:12
jackdaniel
given ideal world where everything is implemented the moment you think about it, how do you imagine this working?
6:57:23
pjb
seok: then modify one package to rename the symbol in collision. FOr eaxmple, you could prefix them with the name of the package and a dash.
6:58:47
pjb
just use the colon: (iterate:while more-to-do-p (parenscript:while more-dom-objects-p …))
7:01:41
pjb
(defpackage "YOUR-PACKAGE" (:use "CL" "PARENSCRIPT" "ITERATE") (:shadowing-import-from "ITERATE" "WHILE")) ; or the other, depending on which you use more.
7:08:00
pjb
If you correct the typo, and if the macro aliased don't use the form name to compute their expansion. (That's usually the case).
7:08:56
pjb
You could write a bunch of macros as (defmacro foo (&whole form …) (expand form)) where the function expand use (first form) to generate different expansions. In that case, the aliasing would break it.
7:12:05
gilberth
It does not. WHILE in parenscript is both a CL macro and a keyword to the Parenscript language.
7:13:55
gilberth
Yes, but what does (ps (jwhile foo bar)) yield? In contrast to (ps (ps:while foo bar))?
7:16:40
gilberth
pjb: Point is: Both span new name spaces and you cannot just copy _every_ meaning of a symbol in every namespace.
7:22:35
gilberth
pjb: And SYMBOL-FUNCTION does not need to return a function. Yet (SETF SYMBOL-FUNCTION) wants a function.
7:23:19
pjb
One can hope that if SYMBOL-FUNCTION doesn't return a function, (SETF SYMBOL-FUNCTION) will accept it.
7:24:30
pjb
Granted, it could be an internal setter, and (setf symbol-function) could have conforming checks.
7:26:37
gilberth
So you'd need to figure out if it is fbound and if it is a function at all. Then what about compiler macros? And all the other name spaces? That'll never work.
7:27:16
pjb
gilberth: 1- the use case is not CL symbols. 2- it's true that for CL symbols, it would be more complicated.
8:56:13
splittist
No. I can't really justify the 3 days of leave I would have to take (vs taking it with my family).
8:58:10
jackdaniel
splittist: the trick is to take your family to Genua! we aren't comming this year because the little one is too little, but next year we're definetely going
8:58:58
splittist
Well, the kids have school. Eventually they'll be embarrassed to be seen with their parents, then I can go (:
9:01:25
phoe
beach: I'm also skipping ELS this year. I unexpectedly developed an instance of pneumonia, and I'm staying home to make sure it's collected.
9:03:10
beach
phoe: I should thank you for not coming then. If I get pneumonia, with my asthma, it could be fatal.
9:03:49
phoe
beach: this is another reason. My conscience wouldn't let me live if I accidentally shrunk the Lisper population even further. :(
9:07:11
jackdaniel
I don't think this is true (not to mention offtopic with which I play along apparently): depressing environment may induce depression (and vice versa, optimistic one may mitigate it)
9:09:42
jackdaniel
agreed, just saying that having depressed people around may induce depression; so in some sense it is contagious
12:09:19
schweers
Is anyone aware of documentation on how to interpret the :graph report of sbcl statistical profiler?
12:18:04
heisig
schweers: Do you know about clim.flamegraph? It is great for visualizing the output of sb-sprof.
12:18:21
heisig
The url is https://github.com/scymtym/clim.flamegraph/tree/future (the good stuff is on the future branch)
12:39:03
schweers
heisig: thanks a lot for that tip. It’s a bit buggy, but the tool is really awesome and gave me at least one valuable insight!
12:44:18
heisig
schweers: Great to hear you like it, too! I think it is relatively stable for a not-yet-announced tool from a branch labeled 'future' :)
12:44:59
schweers
also, the only buggyness I’ve encountered, is that it lands in the debugger on redisplay. skipping redisplay works fine
12:48:12
schweers
Sadly I have no idea how [mc]clim works, so I’m afraid I won’t be able to contribute.
12:48:56
jackdaniel
snarky part of myself feels the urge to say: it doesn't (but that would be a lie :)
14:42:16
phoe
Is there some sort of mechanism in ASDF that would prevent an arbitrary symbol from being used?
14:43:26
phoe
I could achieve a similar behavior with a git grep pre-commit hook, but I wonder if it's possible on the Lisp side.
14:50:09
pjb
phoe: you could write a reader macro that would read the symbols, and reject the forbidden symbol. However, there's no link between reading symbols and system. You would have to define such a link, probably dynamically.
14:51:45
pjb
phoe: you could also do it post-hoc, using find-symbol; but again, this would check the symbol is interned in a package, but symbols can be interned in the same package by different systems!
14:54:40
heisig
phoe: Would SBCL's package locks help here? Alternatively, you could preprocess all source files with a suitable Eclector client.
14:55:18
pjb
New O(nlogn) multiplication algorithm: https://hal.archives-ouvertes.fr/hal-02070778/document
14:55:40
phoe
heisig: hmm. Eclector sounds like an option. Can I make it run before ASDF loads a file of a particular system?
15:00:19
heisig
phoe: Sure, ASDF is extensible. It is probably easiest to provide your own system subclass.
16:48:24
selwyn
today i noticed that (make-array '(0 0)) and (make-array '(0 1)) are not eq, or even equalp. yet they have the same printed representation #2A()
16:49:08
selwyn
but i vaguely recall reading somewhere that having two objects that are not 'eq' to each other having the same printed representation in CL is asking for trouble
16:49:47
vsync
I remember PostgreSQL has a way to subscribe to updates - anything in e.g. CLSQL to support? and maybe graph DBs (allegro) have something nice?
16:49:53
selwyn
my question is 1) do i in fact recall correctly and 2) if this is indeed received wisdom how seriously should i take it considering that the language itself does not appear to
16:55:05
phoe
so (make-array '(0 0)) and (make-array '(1 0)) are not going to be equalp because of that.
17:03:13
Bike
in my sbcl, arrays with dimensions (0 0) (0 1) and (1 0) actually all have different readable printed representations.
17:05:53
Bike
this doesn't alter beach's point or anything, i just wanted to say that *print-readably* is important. without it the printer can pretty much do whatever, since it's intended for humans rather than toasters.
17:07:06
selwyn
i am using 1.4.14. no i did not specify *print-readably* -> t , now I do i get the same results as bike.
17:08:16
Bike
the rule you are probably thinking of, selwyn, is that if you read a readably-printed object, you get an object that is "similar" to the original object.
17:36:06
pjb
There are serveral kinds of objects that have the same printed representation. For example, simple-vectors vs. vectors; pathnames, empty arrays, etc. round-trip print/read has been broken by those modern data types…
17:37:19
pjb
(values (make-array '(0 0)) (make-array '(0 1)) (make-array '(1 0))) #| --> #2A() ; #2A() ; #2A(()) |#
17:51:08
jsjolen
stylewarning: Hey, is this stylewarning of cl-a-d-t? If so: I'm using cl-a-d-t to write a compiler (just toy stuff for university) and I got into the situation that I want tests on the output of my AST -> AM compiler. So I want tests like (compile (+ (num 1) (num 2))) == (list (push 2) (push 1) ADD). That means that I need to check for 'shape equality' (structural induction) and that means I need some sort of fold for that to happen
17:51:08
jsjolen
(probably a catamorphism). This would be nice to generate through some macro (DEFINE-FOLD adt) and I know that Haskell can at least generate functors for their ADTs automagically. SO, HERE'S THE POINT TO IT ALL: If I write this, would you like a pull request to the algebraic-data-library?
18:18:54
pjb
(bt:make-thread (lambda () (loop (sleep 3) (update)))) ; more or less precisely regular…
18:21:33
phoe
execute (update) in a separate thread that sets some sorta variable when it's starting, and then sets it again when it's done
18:21:48
pjb
(defmacro on-overtime (time exception &body body) `(let ((start (get-universal-time))) (multiple-value-bind prog1 (progn ,@body) (if (< time (- (get-universal-time) start)) ,exception))))
18:26:03
pjb
I saw people using MacLisp at the university on a Macintosh in 1985, and I couldn't understand then why. Later I could beat me for not having started using lisp in 1986 (ten years earlier!)
18:29:14
pjb
Teach them to read and write with a keyword: HA-NEUL ; then: (loop (print '(annyeonghaseyo ha-neul)))