freenode/#lisp - IRC Chatlog
Search
18:38:07
fourier`
does anyone know if the Prime Time Freeware for AI software collection is available anywhere?
19:49:51
beach
ACTION strongly recommends that people program in Common Lisp rather than in some other language.
19:50:32
fiddlerwoaroof
beach: I agree generally, but sometimes one has to interoperate with libraries/systems that are impractical to duplicate
19:51:16
beach
ACTION also thinks that a way-too-high fraction of the utterances in this channel are about languages other than Common Lisp.
19:52:39
beach
fiddlerwoaroof: I think there is way too much activity aimed at satisfying individual needs for immediate solutions, rather than implementing Common Lisp equivalents for the common good of everyone.
19:53:51
jackdaniel
interoperability between Common Lisp and other languages fits the channel topic, doesn't it?
19:56:12
fourier`
its fun since just today I've read an article by Richard C. Waters "The Survival of Lisp: Either We Share, Or It Dies" dated 1994 where he stated about C taking ground and importance of interoperability with it :)
19:56:19
beach
I just think it is sad that so many people just seem to want to further their personal goals when there is so much work to do for the common good. It would be way much more productive to target common goals first.
19:58:56
beach
fourier`: I think Common Lisp is doing very well now, compared to a few years ago. But more work is needed. That's why I am sad that so much energy is spent on other things.
20:00:08
fourier`
interoperability is not other thing, is one of the key things to survive. CL community is too small to implement everything on its own, therefore interoperability with languages with bigger ecosystem is crucial for any projects to take off.
20:01:35
fourier`
nah major CLs are good with it now - abcl with java, others with C, LW with both C and Java (and obj-c on osx), ccl with c and obj-c, so we are quite good now ;)
20:01:37
fiddlerwoaroof
The other thing is that, if you want convince people to adopt common lisp, you have to provide them with a low-cost way to integrate their lisp code base with their existing software
20:02:06
fiddlerwoaroof
fourier`: there's also jfli which, I think, provides portable cl<->jvm interop
20:02:12
beach
fourier`: Indeed. I think that's what I just said. Most people spend most of their energy on things other than Common Lisp.
20:02:40
jackdaniel
diverse tactics to advance CL sound like a good strategy, I don't think any particular tactic could win on its own
20:03:01
akkad
beach is right. we need to force these other implementations to divert their time and energies to sbcl. the one true lisp :P
20:04:04
fourier`
i barely use sbcl (only test with compatibility with it), and mainly use LW and CCL which both are real good
20:05:29
fourier`
i did this small tool i'm using on a vacation-per-vacation basis https://github.com/fourier/mediaimport
20:06:11
fourier`
but generally all other cl development I do in LW since IDE is so nice (but editor is so terrible so quite often I revert to emacs)
20:06:48
fouric
ACTION tried to use lw through the student license but couldn't actually get the dang thing to *run*
20:06:49
fiddlerwoaroof
fourier`: have you noticed that slime is a bit slow to respond when connecting to lispworks?
20:07:30
fiddlerwoaroof
If I build a console image, it works fine, but if I connect to swank running in the ide, it takes a while to respond
20:12:08
akkad
evil-mode is like convincing your new gf, that she should let you call her by your ex-wife's name.
20:12:46
fiddlerwoaroof
I like telling people that the best vi implementation is written in emacs lisp ;)
20:14:15
akkad
fiddlerwoaroof: the 32bit version of lw is sure a bit slower starting up for me than 64bit was
20:16:20
fiddlerwoaroof
my issue is that when I try to use completion, it takes a significant amount of time for the completion list to appear
20:19:08
akkad
is there a good multithreaded cl benchmark? lparallel-bench seems close, but not quite
20:25:06
fouric
(it's still an emacs-only script, but it ships as the spacemacs default for some reason, and i'm trying to figure out why)
20:26:25
fiddlerwoaroof
I think it didn't behave like I expected it to, so I switched back to paredit, with some custom keybindings for evil-mode
20:34:37
aeth
paredit itself doesn't behave how I expect it to. Its author has something against using # or something. I have to (setq paredit-space-for-delimiter-predicates '((lambda (endp delimiter) nil))) so it won't break dispatch reader macros, e.g. #foo() becomes #foo () without it. In fact, I think there's a hardcoded workaround for #() and all other #...() will insert a space before the parens in a very non-idiomatic way.
20:35:16
aeth
e.g. If someone writes #h(...) they're probably using a reader macro literal notation (in this case, probably for hash tables)
20:36:22
aeth
iirc, it treats ` as if it's quoted source and ' as if it's quoted data. So if I do macroexpand or macroexpand-1, I actually use ` even though I'm not unquoting, so it's properly indented as quoted source
20:36:23
fiddlerwoaroof
if I have `(1 2 3) and I hit paredit-wrap-sexp, it puts the new parens around the backquote, when I'd prefer it to go inside the backquote
20:37:06
fiddlerwoaroof
Because, usually, I'm trying to change the quasi-quoted data rather than the macro
20:42:58
rme
Murii: I'd say forget dotimes in the counting down case. Even if you're a loop hater, (loop for n from 5 downto 0 do (print n)) is pretty clear.
21:03:04
jackdaniel
https://stackoverflow.com/questions/869529/difference-between-set-setq-and-setf-in-common-lisp ← this talks about history
21:17:59
malice
Hi! Is there some way to *enforce* the type of certain slot, other than adding before/around methods for initialize-instance/setters/etc. ? :type specifier doesn't force implementation to check for the type...
21:47:26
aeth
My approach is different. When I want to force the type (which still isn't entirely portable), I use structs, which tend to be better at doing that. When I want to force the types and still use standard-objects, I usually can get away with embedding a struct as a slot in a standard-object. Depending on what you're doing, that might be better or worse.
21:47:58
aeth
iirc, type-checking is done in CCL for CLOS standard-objects iirc. So it can be used, it's just not standard to check.
21:48:44
fiddlerwoaroof
aeth: I think you could use the mop to define your own semantics for slot-types, though
21:49:40
aeth
But if the struct approach is good enough (i.e. the typed thing can easily be thought of as a sub-object) then that saves having to mess with the MOP
21:50:24
aeth
I tend to think of struct objects as static objects and CLOS standard-objects as dynamic objects.
21:52:33
aeth
So structs are good for storing well-defined data that's mostly numbers that's sent to some C library over CFFI (e.g. various OpenGL things) or for a hot loop of things of well-defined and hopefully-optimized types.
21:53:34
aeth
And then there's a second, basically different (e.g. if you want the type, you have to deftype the array manually), struct that's used to define convenience accessors on top of a sequence. CL's complicated like that.
23:03:05
malice
I'm trying to get it to work by copying typed-slot-class and conditions, but my instance raises incompatible type due to the type being NIL, even though I supplied a type.
23:03:22
Shinmera
Just look at the files my dude. https://github.com/Shirakumo/lichat-protocol/blob/master/protocol.lisp#L158
23:04:06
Shinmera
It doesn't use :type to avoid clashing with whatever the implementation does with :type
23:54:03
Shinmera
By nature of the flets being lexical, and thus compile-time, there is no fdefinition to retrieve it at run-time.
23:54:35
Shinmera
You can just use #'foo to get the function object if you know the name at compile-time, though.
0:00:10
malice
I was wondering whether you could do something like (flet <definition of function X> (setf (<value of local function> X) <other function>)), but you can't.
0:06:07
pjb
malice: (let ((f (lambda () 1))) (flet ((f () (funcall f))) (list (f) (setf f (lambda () 2)) (f)))) #| --> (1 #<Anonymous Function #x302006D189BF> 2) |#
0:06:39
malice
Riiiiight. I was thinking of setf though. Someone asked about defun = setf fdefinition, and I was thinking of ways of rebinding local functions
0:15:01
aeth
Imo, if you don't actually need the features flet offers, consider defining separate functions just for debugging and clarity. e.g. (defun %foo (x y z) "something-internal") or even (declaim (inline %foo)) (defun %foo (x y z) "something-internal")
0:15:24
aeth
Pretty much every time I've started with a flet, I wound up later refactoring it out of the function for clarity.
0:16:01
aeth
%foo is usually local enough. If people use it, it's their fault, the % is warning them not to use it.
1:09:22
Xach
i mainly stop with flet when there's only one local function. but even then sometimes it gets recursive and needs a labels.
1:43:03
dmiles
can someone share with me a test case that is an example where alpha renaming is required to make something work?
1:46:25
dmiles
often times i notice macros will use a gentemp to avoid problems when used recursively.. i've assumed that was to avoid some renaming that work automatically happen
1:57:17
resttime
Any resource/tutorial out there for working with the bytes/bits for numbers like C? I dunno a good way of getting two bytes high/low and combining them to make a signed 16bit integer (short) and vice versa.
1:57:45
resttime
I can think of an explicit solution jsut by reading bits but I'm wondering if there's something more 'built-in'
2:08:01
resttime
That works, I can (ldb (byte 15 0) (logior (ash #xFF 8) #x01)) then read the MSB to for the sign