freenode/#lisp - IRC Chatlog
Search
23:21:48
fiddlerwoaroof
Has anoyone run into an issue with static-program-op from cffi being unable to find main?
23:22:56
fiddlerwoaroof
(my "build script" is here: https://github.com/fiddlerwoaroof/daydreamer/blob/master/build.lisp#L35 )
0:15:55
void_pointer
jasom, pjb, and Bike: found a decent way to do it that isn't too much of a hack with an :after method for initialize-instance. assert takes places, so it isn't limited to just variables. So one just uses with-slots for the slots and then uses asserts on the various slots which will do the checks and allow the user to input new values for any that fail while updating the slots to the user given values.
0:43:05
jcowan
void_pointer: that would only work if all the asserts are done all over after the restarts, no?
0:46:14
void_pointer
jcowan: depends on how coupled the asserts are. If the coupling is only mild, then it would be possible to have an assert handle two or three coupled parameters together
3:07:02
fiddlerwoaroof
PuercoPop: interesting, I came up with a more complicated solution involving output-files
3:15:11
fiddlerwoaroof
If you're on a platform that clisp supports but sbcl doesn't, you don't have a choice, really
3:20:25
PuercoPop
fiddlerwoaroof: build-pathname worked for me, but I've only used it twice. I don't remember where I cargo culted it from though
3:33:43
fiddlerwoaroof
PuercoPop: cool, I'm just trying to figure out how I can get travis to build a binary with no dependencies on the system so I can upload it to github
3:34:26
fiddlerwoaroof
I've figured out how to get the static-program-op thing that CFFI provides working, but I'm still working on not depending on osicat's shared library
3:50:13
redrapscallion
If I want to turn a list like (( (1 2 3) (4 5 6) (7 8 9) )) into (( (7 1 2 3) (7 4 5 6) (7 7 8 9) )), so just adding a 7 in front of each of those nested lists, is there any easy way to do this?
4:06:06
fiddlerwoaroof
Does anyone have any tips about making redistributable images that depend on shared libraries?
7:09:33
pjb
no-defun-allowed: loop is nice, but: (list (mapcar (lambda (list) (cons 7 list)) (first '(( (1 2 3) (4 5 6) (7 8 9) ))))) #| --> (((7 1 2 3) (7 4 5 6) (7 7 8 9))) |#
7:10:34
pjb
no-defun-allowed: You can also use curry: (list (mapcar (curry (function cons) 7) (first '(( (1 2 3) (4 5 6) (7 8 9) ))))) #| --> (((7 1 2 3) (7 4 5 6) (7 7 8 9))) |#
7:11:19
pjb
no-defun-allowed: in any case, this lets you see more easily that we just add 7 to each sublist.
8:34:36
no-defun-allowed
cl-yacc seems the nicest so far, but i still have to write the lexer myself.
8:35:44
no-defun-allowed
i'd like to write an editor which basically runs on ASTs instead of text, but i'd like to handle languages other than lisp
8:37:30
no-defun-allowed
the next simplest syntax i can think of which is somewhat irregular would be smalltalk, so i'll have a go writing syntax for that
8:58:14
pjb
no-defun-allowed: why your first step wasn't to ask cliki? https://cliki.net/site/search?query=parser+generator
9:04:40
no-defun-allowed
also beach is on the second page so i'm not sure if the other four pages are any good
9:04:58
pjb
Of course you must refine, asking for a specific kind of parser generatlr, like, LR, LALR, RD, Earley, etc.
9:05:55
pjb
no-defun-allowed: Zebu is nice because it uses itself to parse the grammar. So if you want strict BNF grammar, you can define the parser to parse it, and then use it to write the grammars of the languages you want to parse.
9:20:36
fiddlerwoaroof
Anyways, I've figured out how to use static-program-op to remove the dependency
9:29:27
pjb
Post bug reports to the authors' of the library, because they didn't use logical pathnames and give a chance to the user you are.
9:50:34
flip214
fiddlerwoaroof: in one of my projects, just before writing the core I do (cffi:close-foreign-library :libosicat)
9:54:33
jackdaniel
hint: if you do the same trick with cl+ssl you also need to call cl+ssl:reload after loading all ffi libraries anew
9:56:54
fiddlerwoaroof
If I build sbcl with the linkable runtime, etc, I can statically link osicat into the dumped image and not depend on the shared object at all
9:59:32
luis
fiddlerwoaroof: static-program-op is undocumented isn't it? If you'd like to submit some documentation for it that'd be great, even if it were just a draft
10:02:32
fiddlerwoaroof
It forks a second sbcl, but passing *features* from the parent to the child doesn't happen, which breaks ASDF's conditional compilation features
10:03:04
fiddlerwoaroof
And then, on OSX, I think you basically have to use libtool to build .a files and not ar
10:05:04
luis
Sounds good. I'm not terribly familiar with static-program-op, it was submitted by Fare. The more context you can provide in a future pull request the better.
10:09:00
beach
Hmm. ENSURE-GENERIC-FUNCTION takes a METHOD-COMBINATION metaobject as one of its keyword arguments. So DEFGENERIC must convert the :METHOD-COMBINATION argument to a METHOD-COMBINATION metaobject before calling ENSURE-GENERIC-FUNCTION. But this can not be done by calling FIND-METHOD-COMBINATION, because FIND-METHOD-COMBINATION takes a generic function as its first argument, and we don't have one yet.
10:09:26
fiddlerwoaroof
luis, jackdaniel: It saves a runtime image with stuff statically linked in and then uses that to rebuild the system
10:12:18
fiddlerwoaroof
This also seems to have the side-effect of losing the output file defined in the system definition of the system being dumped. and putting the binary in ~/.cache
10:15:00
luis
fiddlerwoaroof: it seems to propagate asdf:*central-registry*, so maybe it needs to propagate more stuff. Seems brittle, though. (I'm reading the code from my phone, which is not ideal.)
10:23:48
Lycurgus
ACTION is suddenly curious of any package does do a full fork as opposed to threading
10:26:27
Lycurgus
see that a host of them would in an idiosyncratic way, e.g. gbbopen's module system
10:26:44
jackdaniel
marking it as "experimental" in potential manual (or even issuing a warning) might be a good idea
10:28:23
Lycurgus
is that gonna be a thing, people talking across each other like that (experimental/experiential) ?
10:55:28
adlai
Lycurgus: sometimes a joke requires recalibrating the humors, or at the very least, careful rereading.