freenode/lisp - IRC Chatlog
Search
17:30:29
beach
You should start respecting the accepted Common Lisp style if you want to submit code for others to read.
17:35:56
nyef
Also looks like it might still behave as a program if it were compiled as C++ rather than as C?
17:48:50
nyef
Yeah, I don't know why "holy" has a long o and "holly" a short o, but that seems to be the primary difference in pronunciation.
18:05:03
nyef
Yeah, the code in the paste that you gave above, even (or especially) uncommenting the LOOP form, isn't exactly optimal in terms of declared types, and plausibly doesn't even do what you think it does.
18:36:22
didi
I don't understand the results of https://paste.debian.net/hidden/1f7b83dd . When I run the program with `'negate' I get an undefined function error, but when I run it with `#'negate', I get the result I expected, i.e. (-1 -2 -3).
18:37:29
Bike
(mapcar 'negate ...) is short for (mapcar (symbol-function 'negate) ...), and symbol-function looks up global functions only
19:20:32
borei
http://pastebin.com/uktkvHvz - can somebody take a look, am i getting maximum that i can i get, of there is more room to optimize ?
19:22:59
jackdaniel
sufficiently smart compiler™ doesn't need declaration inside lep about step and I
19:23:35
jackdaniel
if you are sure about data correctness etc, you may skip safety checks with (safety 0) – for benchmark purposes, not for production code
19:25:12
borei
without declaration for I and step i have not so good result - 12 seconds agains 4 seconds
19:58:38
circ-user-cEMst
I'm curious: Has there been any prior work for making a Lisp (say SBCL) run as a unikernel on the Xen hypervisor? (like MirageOS) Would it be a difficult task?
20:01:52
rpg_
fourier: I forget -- do you need to use "of-type" (or am I confusing that with iterate?)
21:07:32
auser1234
is mezzano a new common lisp from the ground up? does it have some kind of lineage?
21:55:44
_death
I thought it's funny that it tries to resolve google.com to check for connectivity.. I have it as 127.0.0.1 in my hosts file
22:17:17
angular_mike_
on demand increment the integer attribute for entry with specific string attribute value
22:25:20
fourier
angular_mike_: probably you can use hash-table and package cl-store to serialize-deserialize them
22:36:26
pillton
Bike: Have you ever tried implementing a "typed-lambda" where the type arguments can be operators? I think such a system is called F_{\omega} in the Types and Programming Lanagues book.
22:41:26
pillton
Every time I write an operator which is specialized to an array type I think of that system.
22:42:42
Bike
you mean something that works on a particular array type but you'd like it to work for every array type?
22:43:17
Bike
but those are just different types. taking a type operator would be more like something that can work on either lists of X or arrays of X.
22:44:44
pillton
Take performing a geometric transform of an image. The operators involved when the source is a floating point array and the destination is an integer array is different to when both source and destination are floating point arrays.
22:47:50
Bike
that sounds more like varying on the type of an argument which is a function, really. like (ΛA:*. ΛB:*. λf:A->B. λsource:[A]. ...) Float Int
22:52:54
pillton
No, but they the still need to be "evaluated" or unified in some way so I was just speaking generally.
22:56:01
pillton
I forgive you. Every time I look at the book I have to spend 20 - 30 minutes refreshing my memory on the syntax.
23:01:40
Bike
i mean, with type-level operators as type-level arguments, not system f omega obviously.
23:08:41
Bike
no, no, not like that. stuff like monads is just a way to organize things that happens to be convenient for haskell's purposes.
23:16:52
pillton
Well, system A has an operator which is defined for arguments of type (array * (* *)). System B uses this operator only for (simple-array single-float (* *)). What is retained when system A is compiled independently of system B?
23:18:59
pillton
There is that or hardware support for CL numbers. I'm guessing there is something in between.
0:00:16
nyef
So, I have a three-button mouse for my IIfx. And then it turns out that it needs a special driver to work properly... Except that the last version of the driver that is supported by Genera doesn't recognize my mouse, either because I'm running too new a version of MacOS or because the mouse itself is too new a model.
0:44:50
nyef
Right, it's the mouse. The 2.0 driver "works", but is known to be incompatible with Genera. /-:
0:58:36
nyef
This doesn't mean that I won't be able to get it working, it just means that I may have to get creative about it.
1:09:44
krwq
I was thinking about &experimental - to mark the function as experimental so that i can autogenerate two packages: foo and foo.experimental
1:11:39
krwq
yes - basically something like that. for only experimental i could add macro but if i come up with other tag/keyword then it will start becoming complicated
1:11:40
Bike
i'd have it as a separate form. it's not like it actually controls anything for the defun
1:15:06
aeth
Emacs+SLIME manages to handle the indentation of define-foos fine as long as the package is loaded, if that's what you mean by detect.
1:15:55
Bike
since it has nothing to do with the function. it's not like i want a separate thing for marking variables experimental.
1:16:21
Bike
mark just throws stuff on the symbol-plist, and then the package generator uses get to see which package should have the symbol.
1:16:56
aeth
krwq: if you're going to do the keyword thing, I'd (1) put them after the name and (2) put them all in one list, like this: (defun+ foo (:experimental) (x) (format t "Hello, ~A!~%" x))
1:17:50
aeth
krwq: The difference is that you could add new flags without having to update every user of defun+
1:18:50
Bike
and i'd implement mark like (defmacro mark ((&rest plist) &rest syms) `(eval-when ... ,@(loop for (k v) on plist by #'cddr append (loop for s in syms collect `(setf (get ',s ',k) ',v)))))) mod actually trying it
1:19:54
aeth
krwq: It'd be defined like this, except you'd also check the flags list as well (with member perhaps?): (defmacro defun* (name flags lambda-list &body body) `(defun ,name ,lambda-list ,@body))
1:20:35
aeth
krwq: I'm not sure how you'd implement an arbitrary number of flags outside of a flag list.
1:22:43
krwq
aeth: i don't think of it as flag list, it is just a list which happens to contain flags, name args and body
1:22:45
aeth
krwq: you could have them at the top level but then they'd be boolean and it'd be hard to update the macro... like: (defmacro defun* (name experimental-p lambda-list &body body) ...) where experimental-p would be by convention :experimental or nil
1:25:31
aeth
krwq: (defmacro defun* (&rest name-args-body-and-flags) ...) would be seriously overcomplicating things, if that's what you mean. And SLIME wouldn't indent the body properly.
1:26:18
krwq
aeth: emacs is modable - i chose lisp so i can be flexible and not because i like parentheses
1:27:47
aeth
Both my solution and Bike's require considerably less work for essentially the equivalent effect.
1:29:14
krwq
Bike: aeth: i like having options - i need to consider if i prefer clumsy syntax with easy implementation or better syntax with PITA to manage implementation
1:29:27
aeth
The difference in implementation effort between (defun* :keyword1 :keyword2 ... name args &body body) and (defun* name (:keyword1 :keyword2 ...) args &body body) is very significant.
1:30:13
Bike
i like mine because it works for non-functions no problem, values are arbitrary, use is arbitrary, easy to remove and edit...
1:33:20
krwq
nyef: so i'd need to i.e. add a file to a system which reads asd and then all the files and finds it?
1:47:50
fiddlerwoaroof
Is there a way to make sure that a class is finalized? ensure-class doesn't seem to do it.
1:57:35
fiddlerwoaroof
Anyways, I'm working on a slackbot that reacts to commands embedded in messages (where a command is a white-space delimited sequence of characters beginning with ;)
1:58:19
fiddlerwoaroof
I'm trying to figure out the best way to encode the command tabl: right now, I just have a global hash-table, but I'm starting to wonder if it'd be better to have a class-allocated slot with a hashtable
1:59:23
fiddlerwoaroof
Or just define a generic function with an around method that determines if the string is valid command, and then converts it to a symbol
3:22:20
treexform
I've been trying to find some reference tree pattern matching and subtree replacemente code for an hour now... can anyone help me find it?
3:23:02
treexform
something like BURS but without the tile-matching if that makes sense... I just want to see one implemented, the matcher and the recursive replacement function for tree nodes.