freenode/#lisp - IRC Chatlog
Search
15:02:14
Xach
I think I use it too little to solve printing problems and that is something to correct!
15:03:46
Shinmera
Xach: I think I found a quite nifty use case for it in my GLSL toolkit: https://github.com/Shirakumo/glsl-toolkit/blob/master/printer.lisp
15:04:14
Shinmera
Though I use a preprocessing step to turn ~o into ~/ORG.SHIRAKUMO.TRIAL.GLSL::%FORMAT-OBJECT/, since that's quite a mouth full.
16:10:09
bl1nd
I want to learn clojurescript. Should I learn clojure before? Should I even learn another dialect of lisp before Clojure?
16:12:11
Shinmera
This channel is for Common Lisp, so you will be told to learn Common Lisp, regardless of your interest in Clojure.
16:12:18
schweers
bl1nd: note that this channel is about common lisp, not the whole lisp family. Nevertheless I suppose learning clojure first will make your life easier.
16:21:22
schweers
not a problem. I guess there are channels dedicated to clojure and clojurescript. Maybe you should ask there
21:33:13
Shinmera
A text editor in a slide show because why not? https://www.youtube.com/watch?v=Or9zsq3iO7A
21:59:13
Xach
I've been trying to think of a way to add local package nicknames without adding any new packages or functions, only extending existing functions.
21:59:38
Xach
But I can't think of a place to put a way to map a package to a local name in effect for it
22:00:34
Xach
e.g. if you have a local nickname for "com.xach.mycoolpackage" as "mcp", (some-standard-function (find-package "org.xach.mycoolpackage")) => ("mcp")
22:02:01
sukaeto
jeosol_: I believe this is a minimal example nginx config: https://pastebin.com/pXx9U7nK
22:02:36
sukaeto
iirc, the round robin is the default (I couldn't find anything explicitly setting it). The stuff in fastcgi.conf is just the default that comes with nginx
22:07:31
sjl
could add a key parameter to package-nicknames: (package-nicknames "org.xach.mycoolpackage" :local-to (find-package "some-package")) => ("mcp")
22:18:31
jeosol_
sukaeto: you are using clack for this? anything else I need to use this nginx config file.
22:21:46
sukaeto
jeosol_: yeah, it's just clack. If you're not using docker, you'll have to come up with some scheme for assigning ports to the workers (and supervising them)
22:22:29
jeosol_
I haven't done anything, so I can use whatever works to get me to get an AWS instance working
22:22:35
sukaeto
(of course, replace "worker1", etc with the container names, or localhost if you're not using docker)
22:24:11
jeosol_
While I have used hunchentoot, have not used it with nginx. Haven't used Clack at all. So some learning to do on my end.
22:29:59
didi
So reading about dynamic extend, I got an idea: If, when using FFI, instead of messing with the GC, we declared the alloc'ed variables with dynamic extend and cleaned them just before leaving the block?
22:32:54
jeosol_
@sukaeto: you are saying with docker, the assignment of ports to workers is handled if I am using docker?
22:34:00
sukaeto
jeosol_: the docker containers themselves have their own own "port space". They're kind of like mini guests on the host
22:34:22
sukaeto
so yeah, you can have all the workers just listen on the same port and there won't be any collisions if they're each in a different container
22:35:55
jeosol_
I see, I admit I am not a docker expert. I will have to read up on this. Thanks for the explanations
22:36:54
didi
stacksmith: Well, many alien libraries have functions like `make-widget', which malloc memory.
22:37:42
stacksmith
didi: I have a macro "with-foreign-vals" that makes an environment with allocated foreign values. Like (with-foreign-vals (:int16 x :int16 y :int16 width :uint16 height) ...) I use it all the time for ad-hoc cffi allocations.
22:38:43
didi
stacksmith: Cool. I struggle with the idea of wrapping these variables because I want to feel like programming in lisp, even if I'm calling foreign functions.
22:41:47
stacksmith
didi: you could actually do what you described, but I prefer - at least during development - to be able to create a window with widgets, say, and return to REPL...
22:44:34
didi
stacksmith: I know what they are, but never used them. Well, except for non-local exits.
22:46:49
stacksmith
didi: I've never used any built-in ones, but sometimes it feels really great to turn a program inside out... Like say an image viewer that decodes as many bytes as you send it and returns instead of a loop that takes over and blocks...
22:50:06
didi
stacksmith: Well, you don't need continuations for that. You can use threads. Unless you want green threads, AIUC. I've being writing a library for concurrency programming for a while, that abstracts away from threads, but I've being stuck.
22:52:03
stacksmith
didi: I am always dealing with deeply nested trees, and I wind up wanting to do something deep inside on a branch. I could send a lambda, but it can only do so much. With continuations, I could make the code stop where I want and return. Then I can do things like bind some variables and go back in for the rest of the branch.
22:53:58
didi
Bike: I dunno. Good question. Maybe it can be used. But the more high level question is: Should the alien variables feel like lisp variables that can be GCed or not?
22:57:00
stacksmith
I thing by GC didi means just getting rid of it properly at some point in the fugure.
22:58:33
stacksmith
There was an idea of keeping foreign variables on the stack and having them go out of scope naturally, I believe.
22:59:31
didi
Maybe not in the stack. The "dynamic extent" has more to do with the idea of an object being valid just inside the block.
23:06:07
smokeink
jeosol: I'd recommend lighttpd over nginx (I had some issues in the past with its config files , its config script language it's one of the dumbest I've ever seen) . Some notes here: http://dpworks.net/miscellanea/mod_lisp-lighttpd.html , http://pastecode.ru/8d5d29/
23:09:17
stacksmith
Bike: I think the reason I wrote with-foreign-vals is because I allocate/free a single foreign object containing all the foreign values specified...