freenode/#lisp - IRC Chatlog
Search
21:55:30
Shinmera
fiddlerwoaroof: Though I'm not sure myself, hence why I haven't resolved the issue yet.
21:57:07
fiddlerwoaroof
Yeah, I don't really want to depend on the server's configuration for proper operation. It might be a good idea to add an optional serializer argument to the serialize function?
21:57:21
Posterdati
I do not know why lispers don't like openbsd as develop platform... For certain things is far superior to linux
21:57:45
fiddlerwoaroof
That way, if you defined a protocol for such objects, users could add whatever features they need.
22:00:36
fiddlerwoaroof
Also, I don't know if anyone here is in the LA / Santa Barbara area, but it would be great to have some more lispers at https://www.meetup.com/codecraftgroup/events/242348019/
22:13:19
fiddlerwoaroof
Every once in I while, I wish I had the ability to create anonymous generic functions
22:17:09
fiddlerwoaroof
I don't know :) I suspect one could create a generic function metaobject and then add methods to it using the MOP
22:46:35
Bike
usually you use defgeneric, and that's kind of oriented in a different way since it can reinitialize existing functions.
22:47:53
phoe
I kind of wish there was a (make-generic) that creates a new generic function object, ready to funcall
22:48:42
phoe
that you can then extend with (add-anonymous-method generic-instance ((foo string) (bar integer)) (print string) (* 2 integer))
23:12:09
dim
with SLIME it's really easy to type in a .lisp file and C-M-x your expressions to load them in the running image
23:12:36
dim
you even have C-c C-y to write a function call on the REPL for you from your source file
23:15:23
fiddlerwoaroof
Think of a generic function that maps a callback over a tree containing nodes of different classes: the callback could be something you define with defgeneric but, in some cases, but (a) that requires giving the generic function a name, which isn't always easy and (b) it adds a lot of boilerplate for a "throwaway" function
23:15:41
fiddlerwoaroof
But, also, (c) anonymous generic functions are a great excuse to play with the MOP
0:09:25
schoppenhauer
is anyone using quicklisp on nixos? is it possible to have an isolated quicklisp-install for a nix-shell?
0:10:57
Fare
I'm pretty sure MichaelRaskin has some helpers to import quicklisp packages into nixos already
0:21:10
schoppenhauer
I found https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/lisp-modules/from-quicklisp
0:22:18
fiddlerwoaroof
I've done a bit of work to prevent asdf/quicklisp from writing to standard directories
0:23:47
fiddlerwoaroof
jasom: that's too bad, Codecraft generally happens the last Wednesday of every month
0:24:32
schoppenhauer
https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/lisp-modules/README.txt i don't really get this file
0:25:46
fiddlerwoaroof
schoppenhauer: here's a builder I've used with some moderate success (Nix / OSX): https://github.com/fiddlerwoaroof/uclip/blob/master/builder.sh
0:25:55
jasom
plus, getting to Thousand Oaks by a reasonable time in the evening is ... not so easy.
0:25:59
fiddlerwoaroof
Here's the nix file: https://github.com/fiddlerwoaroof/uclip/blob/master/uclip.nix
0:26:47
jasom
oh, I don't have my laptop with me, but I have a reasonably complete program to generate nix exrpessions from quicklisp
0:29:38
jasom
Fare: it greps the output of the failure to load; I have manual rules for determining which nix package is needed to resolve the dependency
0:30:45
fiddlerwoaroof
schoppenhauer: the second link is the builder, the first is a shell-script that actually does things
0:31:12
Fare
jasom: does your script deal with executables made with e.g. cl-launch or xach's equivalent?
0:31:21
fiddlerwoaroof
I just read a bunch of stuff about nix and this was the shortest path to victory.
0:31:23
jasom
here's an autogenerated list of packages that failed to load: https://paste.pound-python.org/show/YqxSEXWKVP0rRoRD6XAw/
0:32:10
Fare
jasom, cool I don't see workout-timer there -- does that mean you succeeded at loading it?
0:32:55
fiddlerwoaroof
fiddlerwoaroof: if you have a shell script that does what you want named "builder.sh" that nix expression might do the right thing :)
0:37:15
fiddlerwoaroof
If I have a macro that creates a generic function object, will that cause problems at load time?
0:38:37
Fare
jasom, schoppenhauer does either of you know how to make nix-copy-closure work between two machines?
0:40:41
jasom
cl-sat.glucose.build #Invokes curl during build <-- here's a line from the blacklist that is fun...
0:49:25
jasom
https://paste.pound-python.org/show/WvGieEO57Ptr3qFHi6aN/ <-- here's my builder.sh; haven't looked at it since September, so I'd have to read it myself to remember how it works
0:49:46
fiddlerwoaroof
My impression was that a conforming program requires that all the literals be externalizable
0:51:07
jasom
but each lisp dependency has .conf file that adds its input/output rules, so you include those as part of any system that will depend on that one
0:52:03
fiddlerwoaroof
Boke: my chain of thought was that my macro is producing a generic function object rather than a literal
0:52:03
jasom
I had something working that didn't cache the build outputs, but that seemed not nixy enough, so now there are system-wide caches, though IIRC it fallsback to using your home directory if the system-wide caceh fails
0:52:39
fiddlerwoaroof
This means that the gf object is a "literal" .: it needs to be externalizable
0:52:41
Boke
fiddlerwoaroof: i would assume the macro is expanding to a form that will produce a generic function when evaluated
0:54:31
fiddlerwoaroof
I've fixed that on my version, I just removed the l-t-v call and quasiquote the call to make-anonymous-generic-function
0:56:02
fiddlerwoaroof
http://metamodular.com/CLOS-MOP/initialization-of-generic-function-and-method-metaobjects.html
0:59:38
fiddlerwoaroof
It's a bit like using class-prototype to get the value of a :class allocated slot
1:00:02
pillton
Couldn't you do (defmethod make-method-lambda ((gf standard-generic-function) (m standard-method-class) form))?
1:00:40
fiddlerwoaroof
I have one generic function that maps over a tree of objects and applies a callback to each
1:01:10
fiddlerwoaroof
The anonymous gf provides a nice-ish syntax for dispatching on the class of each object in the tree
1:08:01
pillton
Sure. That is why I like common lisp i.e. there is no god group to stop you from blowing your feet off.
1:42:13
fiddlerwoaroof
e.g. something like (with-imported-symbols (packag:symbol1 package:symbol2) (+ symbol1 symbol2))
1:42:44
Boke
macros affecting how forms in them are read doesn't make sense with the reader separation that exists
1:45:23
pillton
There are package local nicknames: http://www.sbcl.org/manual/index.html#Package_002dLocal-Nicknames
1:47:18
aeth
What about CCL? If something is supported by SBCL, CCL, and ECL it's practically a standard.
1:54:17
vtomole
How strict is clhs on what counts as a standard? What I'm trying to ask: when is a implementation not considered to be common lisp?
2:03:24
vtomole
So if *theoretically* There was a set of procedures that CL programmers used a lot. Now if these programmer were tired of doing (load "utilities.lisp") on all their programs; if this utilities.lisp was added to SBCL. Will SBCL still be conforming?
2:04:39
aeth
A lot of de facto standards already exist, generally handled by portability libraries like cffi, bordeaux-threads, closer-mop, etc.
2:05:23
Boke
the point of the standard is to let programs run across implementations. an implementation having extra stuff doesn't mess w/that.
2:05:31
aeth
That's what i mean by 'practically a standard". Things that are supported by most if not all of the popular implementations are de facto standards.
2:19:34
PuercoPop
in sb-int: there are also some utility functions that you can find elsewhere, like with-unique-names and binding*, which is in the spirit of metabang-bind
2:25:48
PuercoPop
Fare: uiop:nest was about reducing the nesting so the code only right? TBH I just use vanilla constructs, never bothered me enough to load something like metabang-bind
2:49:34
aeth
The only thing that really bothers me is multiple-value-bind. I don't feel like adding a whole library to deal with it, though.
3:52:28
Fare
PuercoPop, yes: instead of reinventing all the binding forms, badly, to fit them into a mother-of-all form bind, just use the actual form, inside a nest.
3:57:53
fiddlerwoaroof
Clojure tried this with the threading macros and, all they do is obfuscate the structure of your code
4:07:50
jasom
so apparently I had left my ql2nix script in a state where I had just added support for lisps other than sbcl ... A quick 1 line change and it can handle systems that pass on some, but not all implementations. Still running now with 365 systems generated (it's *very* slow).
4:46:07
fiddlerwoaroof
The difference is that (->> (a b c) d (e f g)) turns into (a b c (d (e f g)))
4:49:20
jasom
also it looks like my dependency calculation needs improvements; I seem to miss dependencies in some projects (all of which so far appear to be using package-inferred systems)
4:51:18
jasom
ah, I'm just reusing ql's DB which doesn't handle package-inferred systems, but rather resolves those at runtime... I can do the same I suppose.
5:22:32
fiddlerwoaroof
PuercoPop: (uiop:nest (a b c) (d e f) (g h i)) turns into (a b c (d e f (g h i)))
5:27:55
fiddlerwoaroof
Still, I have the same problem with both: they obscure the structure of the code
7:57:58
malice
Is there a way to see how many times has a concrete quicklisp project been downloaded?
7:59:13
phoe
malice: I think you need to poke him directly. He always only uploads information about the top 100.
8:06:27
phoe
anyone up for cooperatively making a set of CL solutions to https://github.com/iiitv/algos ?
8:11:50
beach
They all start by testing for equality with the middle element. That increases the number of tests by (as I recall) 20% on the average.
8:12:36
beach
This is a very good example of the fact that 75% of the algorithms published in literature are wrong.
8:16:39
phoe
It wouldn't be an exercise if, speaking Python, you could just do "from future import antigravity".
8:18:27
malice
And if you want to make some things the right way, you need more code. cl-trie has more than one file, so that it's organized properly.
8:21:03
malice
Though if you need something, like BST or Trie or anything, feel free to implement yourself or contribute to existing projects.
8:22:25
beach
malice: I totally agree. But it's worse, because it is risky. If a Lisper who has insufficient knowledge about algorithms contributes a bad solution, Common Lisp will look even worse.
8:23:42
malice
I've seen some repo which had code to parse json data, and CL was there too - I believe it was written by pjb, but I might be wrong.
8:24:10
malice
I really liked the fact that CL was not only fast, but used reader macros to bring json to language and then just READ it :)
8:24:44
ecraven
Shinmera: of course, but if someone has actually used it and there were really obvious problems, that's saying something.
8:29:03
malice
pjb: I believe it might have been some benchmark, because there were many languages available. It wasn't library by all means. Also sorry for being wrong.
8:29:23
beach
I can only imagine in how many ways and by how many people more complicated algorithms are wrong.
8:31:10
jasom
beach: 2 out of top 3 hits on google for binary search get it wrong (wikipedia gets it right)
8:31:18
Shinmera
beach: There's more to get wrong if you use a language with restricted counter indices (eg int). See https://research.googleblog.com/2006/06/extra-extra-read-all-about-it-nearly.html and others.
8:32:24
malice
I don't remember, the story was quite famous for some time, but I believe that it didn't work for some big numbers?
8:33:16
jasom
beach: I checked more pages, I ony found 2 on the first page of results that both 1) show code or pseudocode and 2) don't start by comparing for equality
8:36:22
beach
Shinmera: It would be very surprising if the addition would overflow on a 64-bit machine with 0-based arrays.
8:41:08
TMA
[in a sense, having the bounds stored in an int and not in a size_t is an error in itself -- so common an error that it is almost invisible]
8:56:08
Shinmera
I just always think back to the apparent law of "90% of any category is shit" and then settle for it not really mattering all that much.
9:04:15
kora9
And threadripper, and VR is getting off the ground! Hard to not be giddy about that :)
9:11:47
beach
kora9: Are you trying to cheer me up? I am afraid that won't work. At least not for the next 12 hours or so.