freenode/#lisp - IRC Chatlog
Search
19:58:52
sjl
gremdrus: it would help if we had the full error, like where is it complaining about an odd number of key args?
20:18:12
phoe
and the first thing I'll do after publishing it is posting it to /r/lisp and hackernews
20:37:44
phoe
There: https://gist.github.com/phoe/d93f968f22bbcc87070cdc5831762021 <- this is a non-public preview.
20:38:14
phoe
tl;dr: I grabbed all the comments I found and reparsed them into something more readable, and also added mine.
20:50:01
pjb
phoe: re: github, one problem is that github is github.COM and is located in the USA ; gitlab on the other hand was gitorious.ORG and was located in Europe. At a time when network or github failures meant that European workers were stuck half a day without being able to push to the central repository, and considering that most CL libraries are freedom software, and not privative COMmercial software, it would seem more logical to
20:50:28
pjb
phoe: on the other hand, nowadays, gitorious has been bought by gitlab.COM, but there's framagit.ORG which is located in France.
20:51:46
pjb
phoe: there are also licensing restrictions that were imposed by github with some self generated FUD. (It seems they're cleared it up, but still, the point remains that if you use only one such repository, you're at the mercy of the US enterprise and their shareholder).
21:02:56
phoe
(I'll gladly accept some HN upvotes, too. https://news.ycombinator.com/item?id=15012678)
21:15:43
fiddlerwoaroof
This is a bit naïve, but I think it solves most of my html sanitization problems:
21:17:03
fiddlerwoaroof
Shinmera: I'm using a variant of TeMPOraL's code in this issue: https://github.com/Shinmera/plump/issues/7 I'm not sure what the best way to add an html-compliant serialization mode is.
21:17:10
fiddlerwoaroof
https://github.com/fiddlerwoaroof/html-sanitizer/blob/master/html-sanitizer.lisp#L6
21:20:28
sukaeto
fiddlerwoaroof: fwiw, that looks similar to approaches I've applied in the past (except I just changed tags not on the whitlelist into <div>s or some such)
21:21:12
sukaeto
just in case validation from some dude on the internet, who's presented no credentials, and who hasn't particularly considered/researched in depth the security implications of such an approach means anything to you at all :-D
21:21:56
fiddlerwoaroof
Yeah, with this sort of things the best thing is to get a bunch of eyes on it
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?