freenode/#lisp - IRC Chatlog
Search
0:05:13
Mariaaa
Angel_Feroz(Humbert0@ferozmente.angelical.y.angelicalmente.feroz)- loca de mierda te jodiste te har la vida imposible te ir a buscar y probablemente te desaparezca!!!
0:05:13
Mariaaa
01:45 : Mariaaa 01:38:58 -Angel_Feroz(Humbert0@ferozmente.angelical.y.angelicalmente.feroz)- loca de mierda te jodiste te har la vida imposible te ir a buscar y probablemente te desaparezca!!!
0:16:16
gendl
Hi, I just started using paredit for the first time (after editing common lisp with emacs for 25 years). It seems pretty cool but I should probably read a manual or watch a tutorial - whenever I search for same (even specifying "how to use paredit for common lisp") i'm getting a bunch of nice looking directions on how to use it for clojure.
0:16:52
gendl
that's all well & good and i suppose most of that will apply to CL as well, but is there a nice "paredit for common lisp for dummies" somewhere?
5:09:56
mfiano
Hello all. If I want to sort a list of symbols such that they are sorted lexicographically and ascendingly on both PACKAGE-NAME and SYMBOL-NAME, is it enough to treat the elements as string designators using (sort some-list #'string<), or must I write my own predicate?
5:12:41
mfiano
Just to elaborate, the question is moreso about how a symbol is converted to a string designator, since I want '(mypkg::foo mypkg::bar cl-user::foo cl-user::bar) to be sorted as (cl-user::bar cl-user::foo mypkg::bar mypkg::foo)
5:16:17
White_Flame
but to sort by package, the :key would have to be (lambda (sym) (package-name (symbol-package sym)))
5:18:48
mfiano
I see. Thanks for the suggestion. I was about to resort to that, but was hesitant as while this doesn't occur frequently, when it is, it is being used in the context of a performance-sensitive event loop.
7:46:11
flip214
mfiano: group the symbols by package, then sort the packages and the symbols (per package) separately
10:45:05
ldb
is there any reason most programming langauges treats (expt x 0) const one rather than raise div by 0 error when x is 0?
10:49:51
jackdaniel
in algebra 0^0 usually is treated as 1, often it is left as undefined expression, but I've never heard an interpretation that it is division by 0
10:50:44
jackdaniel
here is even a section about software https://en.wikipedia.org/wiki/Zero_to_the_power_of_zero
10:51:55
jackdaniel
(and, from cl perspective, the answer would be: because it is specified to return 1)
11:03:35
jackdaniel
I mean, that I would find more inuitive that arithmetic-error is signalled, but not necessarily division-by-zero
11:04:23
jackdaniel
or rather, from the specification it seems to be, that division-by-zero shoudl be signalled
11:12:41
galex-713
Beside being older, more used, a lisp-2 (actually lisp-n, afaiu), not having continuation but having goto, and empty list/falsity equivalence, what are the other differences between common lisp and scheme?
11:13:54
jackdaniel
galex-713: common lisp has more predefined functions, longer standard which addresses many practical issues (which are undefined in scheme) and it is a language used by most people here ;)
11:14:52
galex-713
for me that comes with “older”, sorry, I should have been more precise: what are *fundamental* differences, preventing of implementing one in the other fully and respectingly
11:15:29
jackdaniel
galex-713: common lisp is actually "younger" than scheme, however it has lineage which dates before scheme was introduced
11:15:46
galex-713
White_Flame: as of macros, I just consider cl is lower level, I heard you can implement hygienism with defmacro, and can see how, and I saw several scheme implementation providing defmacro-likes
11:16:01
sm2n
I believe someone was talking about their scheme implementation in cl here just yesterday
11:16:52
jackdaniel
'hygiene' suggests something good, but I (as a common lisp programmer) consider it bad, so 'sterile'
11:17:14
galex-713
sm2n: because of lisp-1 that would require redefining eval, and then also compile, at least… so it wouldn’t be the same thing… common lisp just looks lower level
11:17:26
galex-713
I’ve also a friend who says continuation are terrible, in terms of general performance
11:17:50
jackdaniel
having some tool at your disposal does not mean that you have to use it, so it is not a problem that scheme has them
11:18:05
jackdaniel
one thing, which is not guaranteed by cl standard, but is guaranteed by scheme standard, is tail recursion
11:18:36
jackdaniel
otoh common lisp programs usually use iteration, not recursion (maybe because of that, but also iterative style is more plain imo)
11:18:55
galex-713
jackdaniel: to me it looks like a children toy, or a rounded knife for children, like it’s made so that you can cut yourself with it, which may be handy if you’re clumpsy, but you can do less with it
11:20:24
galex-713
jackdaniel: maybe iteration is also more culturally anchored… proper tail-recursion, if instead of reusing the name of current lambda function used something more akin to “return” but call “recurse” (or “repeat”) it would really look like a pascal/cobol/fortran (forgot which of those have that) “do … repeat”
11:20:26
sm2n
huh, I did not know that, I've never run into a stack overflow from writing tail recursive functions
11:20:59
jackdaniel
galex-713: continuations (and delimited continuations) are actually very cool concept, and the latter is quite practical and may be implemented efficiently
11:21:15
contrapunctus
Oh, speaking of recursion...is there a standard way or a library for named let in CL?
11:21:31
White_Flame
unless you can have 'repeat' in the middle of lexical bodies, and change a set of parameters inline with it
11:22:40
sm2n
though the latest iteration of continuation abstractions is effect handlers, which are quite cool and can be optimized away in certain cases
11:23:03
galex-713
White_Flame: well tco implies it’s somewhat near the end, so for variable binding/changing/conditions, I guess you can manage to do something which looks “almost the same”
11:23:47
galex-713
but to me it would then look uglier, and also it looks harder to modelize mathematically to prove stuff to me (but I’m not a math guy, many math stuff looks complicated too me, including formalizing behavior of an imperative loop)