freenode/#lisp - IRC Chatlog
Search
14:01:44
mfiano
Why must they be keywords? You can key by a gensym in a hash table for example and look it up with the same symbol pointer
14:26:34
moldybits
in the beginning of Object-Orient Programming in Common Lisp by Sonja Keene, her :after methods assume that :before and primary methods will throw exceptions on errors, so when you reach the :after methods the preceding methods can be presumed to have succeeded. is this the usual approach?
14:27:07
mfiano
warweasle: So if you just like keywords, nothing is preventing you from using a serial number affixed onto some prefix. That'll at least play nicer with editor completion than random symbol names.
14:27:27
mfiano
something like (let ((serial 0)) (defun make-serial-keyword (prefix) (alexandria:format-symbol :keyword "~a~d" prefix (incf serial))))
14:28:35
moldybits
i suppose in cl, you usually throw a condition on errors rather than returning some error value ...
14:29:08
moldybits
beach: but if you don't throw something, you can't abort the chain of methods, can you?
14:29:16
selwyn
warweasle: would you recommend unreal engine for indie development? Also we might continue our conversation at #lispgames it's a bit offtopic
14:30:26
selwyn
heisig: do your non-lispy colleagues use cl4py to experiment with lisp and petalisp?
14:30:43
dlowe
since pretty much every CL function signals on an error rather than throwing, I assume it was bolted on as a concession
14:33:09
Bike
one place throw/catch is used is the CMU definition of format, used by ecl and sbcl, to implement ~^
14:33:19
heisig
selwyn: Not yet. The cl4py project is just a few weeks old. But that is the reason why I wrote it.
14:34:47
heisig
I don't have any use for cl4py myself. I can't even understand why anyone would want to use Python :)
14:36:53
dlowe
There are some definite things I like about Python that I miss in CL. I'm not going to enumerate them here, however.
14:39:23
warweasle
selwyn: I like Unreal a lot. I think it's pretty solid. I don't know much about Unity, bucause I don't like C#.
14:40:25
p_l
from my understanding UE4 is the half-ton gorrilla which is however reliable base to build everything (even pseudo flight sim...)
14:41:09
dlowe
heisig: I'm curious as to what lisp library functionality isn't already implemented in python
14:42:05
warweasle
I gave a talk on a locomotion system (code) I bought. It's here if you want to see it: https://youtu.be/5ESXDHUMFsc
14:42:43
selwyn
i recall being tempted by Hy before deciding on Common Lisp, solely due to the comfort of having Python available. a great strength of cl4py may be that it leads python devs towards common lisp as opposed to settling at a lispy halfway point
14:43:18
p_l
dlowe: but pretty much, if your code starts being cpu-bound in any reasonable way (including "our I/O is fast enough to not wait on it") Python starts to stink badly
14:44:35
warweasle
selwyn: "And remember to slam that subscribe button. And the like button. And the bell! And the big "x" in the upper right corner!"
14:45:32
dlowe
p_l: sure, but I'm interested in the specific motivation, because there's probabably a C library out there too that does most everything currently implemented lisp libraries are doing
14:45:33
p_l
this got hammered into me when troubleshooting an issue in production system let me down the rabbit hole of how the processing script that was slowing us down (but maxing single core), which was essentially scapy parsing a pcap file into CSV, spent pretty much all the time in Python bytecode interpreter
14:46:12
p_l
dlowe: while Pyrex (or whatever it's called now, Cython?) helps with integrating C libs, it's not trivial from my memories
14:46:42
dlowe
this got hammered into me with Ruby, when I made a 3d engine intended to use Ruby scripting, and adding acceleration to the velocity in Ruby took more time than the rendering and sorting back-to-front of >100k polys
14:49:18
selwyn
dlowe: a python fanatic tells me that Python lacks adequate symbolic computation libraries (sympy is not good enough apparently)
14:50:23
heisig
dlowe: Python is not well suited for anything that needs to run fast (or reliable). Python C extensions are ... ugly. So cl4py certainly has its use.
14:50:58
heisig
dlowe: Funny example - you can call cl.compile from Python to have JIT compilation and cl.disassemble to inspect it.
15:56:20
fivo
Is it possible in CLOS to instantiate an instance of subclass B from an instance of superclass A.
16:05:08
shka_
fivo: not really, you can add defgeneric cloning-information to make it less annoying
16:08:55
Bike
which, what, you'd provide multiple superclass instances and get a copy combining all of them?
16:10:20
Bike
you'd have to specify some stuff, like what to do if the superclasses share a slot but have different values in it.
16:16:12
scymtym
this sounds like a prototype-based object system. maybe https://github.com/sbcl/specializable/blob/master/examples/prototype-specializer.lisp is relevant
16:16:44
jackdaniel
can anyone suggest some resource which provides some background knowledge about writing benchmarks?
16:20:00
selwyn
on that note, can someone suggest a resource that provides background knowledge about writing unit tests
16:21:43
Fade
richard gabriel wrote an article some time ago about implementing his benchmarks, but I"m having trouble finding it.
16:24:12
housel
Namely https://stefan-marr.de/downloads/dls16-marr-et-al-cross-language-compiler-benchmarking-are-we-fast-yet.pdf
18:21:59
moldybits
does this function have a name, and does it exist? (f '(1 2 3)) => ((1 2) (2 3) (3 1))
18:30:31
Bike
(let ((c nil)) (alexandria:map-combinations (lambda (x) (push x c)) '(1 2 3) :length 2) c)
18:32:34
pjb
Perhaps he's collecting successive pairs cycling back. (defun f (list) (loop for (a b) on list collect (list a (or b (first list))))) (f '(1 2 3)) #| --> ((1 2) (2 3) (3 1)) |#
19:14:50
sjl_
(defun f (list) (loop for (a . b) on list collect (list a (if b (car b) (first list)))))
19:29:07
flip214
warweasle: as long as you have some termination condition that triggers before the compiler stack is full...
19:33:14
warweasle
I'll be happy to share when I'm done. It's for the lisp jam...It take a dialogue tree and executes it.
22:03:49
gjvc
does anyone have any suggestions on getting SLIME working on Fedora 30 ? it can't find swank-loader.lisp