freenode/#lisp - IRC Chatlog
Search
18:01:05
phoe
https://github.com/hawkish/common-lisp/blob/c477637b16d91b255284289d4dad8a7cb5fc929e/pattern/src/mycin.lisp#L49
18:27:30
momozor
I checked the ASDF documentations, but I can't find anything that do something like that.
18:28:32
phoe
(defpackage #:my-package (:use :cl) (:local-nicknames (:p :cl-ppcre))) (in-package #:my-package)
18:29:43
momozor
https://lispcookbook.github.io/cl-cookbook/packages.html#give-a-package-a-local-nickname
21:08:13
drmeister
Does anyone know how the precedence works when you have additional dists in quicklisp?
21:09:59
drmeister
I'm asking because some of us think that they are getting a different precedence than others.
21:10:27
drmeister
It was a big deal a couple of days ago when quickclasp was serving clasp specific systems for bordeaux-threads, trivial-garbage and trivial-backtrace.
21:13:58
drmeister
Why would mine be different and quickclasp has a higher value (3800557960) while quicklisp has a lower one (3800557960).
22:38:27
Josh_2
Lisp images so tough despite my error-error being 3 levels deep It's still serving my site just fine
22:56:10
Josh_2
https://plaster.tymoon.eu/view/1912#1912 can someone help me with this error? It's clearly to do with my macro, I'm guessing if I put the (defparameter .. ) into (eval-when ..) It would fix the error
22:56:39
Josh_2
but why am I getting this error? I had two others about how two of the functions used in my macro were not available at compile-time
22:59:05
drmeister
Xach: Thanks - then we are installing quicklisp and adding quickclasp too quickly after that.
23:07:05
Josh_2
I think I understand, the macroexpansion is attempting to call a function that doesn't exist when it needs it
23:19:24
matzy_
could anyone help me understand why my super, super simple webserver project refuses to be compiled by asdf? I've been searching for hours and hours and can't figure out what i i did wrong
23:22:53
drmeister
Xach: That's what I think we will do, rather than playing Russian Roulette with installation timing.
23:23:11
matzy_
ugh github is being super annoying, but here's the link - https://github.com/cmatzenbach/conway-ff -- the only difference is i moved everything from the /api folder to the top level and deleted the folder to hopefully make asdf happy, but no
23:24:14
drmeister
Funny thing though - I swore to Martin up and down that quickclasp shadowed quicklisp while he said that he was seeing it the other way. In my case I was installing quickclasp by hand and he was using a script that we are developing where the two are installed in rapid succession.
23:24:56
drmeister
In his case they both had the same value so it was a coin toss which one shadowed the other. It's kind of fortunate that we hit this - because now we can take control.
23:25:27
matzy_
the thing is, i got it to compile once, and then i made a couple menial changes and it has never worked since then
23:25:29
drmeister
quickclasp isn't currently shadowing any quicklisp systems - but it may in the future. So it was a logic bomb waiting to happen.
23:26:26
matzy_
i've even restored back to the initial commit and it still wouldn't compile from that
23:33:21
matzy_
it keeps error out after the (defvar *acceptor*) and saying "Package HUNCHENTOOT doesn't exist)
23:37:52
matzy_
All I do is make a package for server.lisp, :use cl, and export the start-server and stop-server functions. in main.lisp all I do is call (in-package :server) and then call (server:server-start)
23:40:41
no-defun-allowed
What will happen is, that when ASDF goes to compile your file, it'll read it without running the QUICKLOAD forms, and will get confused when Hunchentoot isn't present.
23:40:44
matzy_
oh yeah i also install the four dependencies i need in quicklisp after my (defpackage :server) and (in-package :server) which was loding fine at one point
23:41:26
no-defun-allowed
Instead, add a :depends-on argument to your DEFSYSTEM in the asd file, like :depends-on (:hunchentoot :easy-routes :jonathan)
23:41:43
no-defun-allowed
(I don't think you need hunchentoot-test to write programs using Hunchentoot.)
23:42:42
matzy_
see, i was thinking about that, but i read a blog post on asdf 3 and he says that was dumb for some reason
23:43:29
no-defun-allowed
That's what I always do, and I don't think trying to QUICKLOAD from the source file would be the non-dumb solution though.
23:51:42
matzy_
i have one other general question if you have a second - when i run (asdf:load-system "my-system") is it 1. generating a binary and 2. re-compiling every time? What if I have a stable compiled version and want to run that one? Would I still use (asdf:load-system "my-system")?
23:53:22
no-defun-allowed
ASDF will always load the version of a system as it exists in the source code, which may involve recompiling changed files.
23:53:54
matzy_
unfortunately i've just started using aws this past week :( but let me think, cause i just had to do a bunch of configuring as i've been learning docker
23:55:15
matzy_
no-defun-allowed so it's re-compiled every time, but only compiles files that have changes made to them? is this a binary you can run outside of that asdf function?
23:56:37
no-defun-allowed
No, it will generate one FASL file per Lisp source file. You could load those with LOAD, but you would need to ensure everything each file depends on is loaded before loading it; which is basically just doing what ASDF would do for you.
23:59:49
seok
and get this error File is missing: Cannot open load file, No such file or directory, slime-autoloads
0:00:51
matzy_
it was so frustrating because it worked ins slime but wouldn't compile, and now it all make ssense :)
0:06:28
matzy_
seok so find ";; ======== COMMON LISP ========" in my init.el file in my init.el file:: https://github.com/cmatzenbach/emacs-config/blob/master/init.el
0:08:24
matzy_
there's some trial/unnecessary stuff in there, i assume you understand enough about emacs to but out the stuff you don't need, but it works just fine
0:10:17
seok
(load (expand-file-name "/myplink:ubuntu@ec2-107-22-143-36.compute-1.amazonaws.com:.quicklisp/slime-helper.el"))
0:15:31
no-defun-allowed
Josh_2: Use (hunchentoot:send-headers) to send off the headers and get a binary stream, then WRITE-SEQUENCE a byte vector to that stream.
0:19:16
matzy_
seok yeah, i'm trying to deploy a docker container to aws with a minimal webserver for a pro bono project i'm doing. you should check out this container, it has everything we need: https://hub.docker.com/r/madnificent/lisp-webservice
0:19:54
Harag
maybe look at this https://github.com/shassard/sbcl-ql-swank learn how to set up your Dockerfile correctly
0:22:19
matzy_
i just wan't figure out how to get it running. i think it was because i had always been running my server locally with slime and have never used asdf to build the package. i'm hoping now I can just specify the system no-defun-allowed helped me compile/load/whatever and it will work
0:23:54
matzy_
The "Idiomatic Use" section of his docs says "Ideally, your webservice has the same name as its main package, and the main package should contain a boot command which launches the web service". I'm just confused of his wording of "package" and "webservice" there
0:25:23
matzy_
I think "main package" refers to the system no-defun-allowed just helped me compile but I still don't know what he means by "package"
0:28:22
no-defun-allowed
I haven't used Docker or that configuration before, but I guess the expected use is that you have a file that loads your system and calls some function to start the server.
0:29:06
no-defun-allowed
Or you use `docker run` arguments to tell it what system to load, and what to run to start it? I'm not sure.
0:30:53
Harag
you install what you need on the docker with RUN commands and then usually the last thing in the Docker file is a CMD that you start lisp with loading your package or source file which should contain the code that starts your webserver etc
0:35:52
seok
wouldn't you need to change settings of you application once you upload your container to a cloud?
0:40:22
Harag
the jist of it is that you need to tell docker which ports to open with EXPOSE, and to be able to test on your local machine when you run you have to map the docker port to a port on your local machine
0:41:11
Harag
internally docker uses 0.0.0.0 for localhost and not 127.0.01 ... or something like that.... i am not to hot networking
0:46:18
matzy_
seok if you use the image i provided it takes care of the networking (or rather, shows you the commands to in the docs)
0:50:02
matzy_
there's also a github with the same README if you go to https://github.com/madnificent/lisp-webservice-docker
0:51:59
matzy_
you can also try going to hub.docker.com and searching for "lisp-webservice" till you find his
0:53:39
matzy_
just do what i said above and go to dockerhub and search for that image name and looks for the one with his username
0:55:37
matzy_
so Harag would I load the quicklisp repos through his command in the docker image and remove them from the :depends-on section of my .asd file?
0:58:14
Harag
matzy_: that docker image really cool but really complicated I would start with a simple Docker file form scratch which will teach you the basics after that you can get fancy
1:04:57
matzy_
Harag yeah that's the one thing I was worried about, it's taking a docker image and then adding more stuff onto it for convenience, but if I could get it to work....i do understand almost all of the commands in the Dockerfile
3:57:34
PuercoPop
What are the consequences of (declare (ignore foo))? If I declare a keyword arguemnt as ignored in one method and then (call-next-method). Should the next method be able to use the keyword argument?
3:59:35
beach
It is just to inform the compiler that in that particular scope, you don't intend to use the variable, so the compiler should not warn if the variable is not used.
4:00:27
beach
And by "lexical scope" is meant the text that covers the declaration. The next method is not in that scope.
5:34:40
no-defun-allowed
ql-setup::asdf-fasl-pathname appears to use it. That seems to used to name the FASL file for ASDF.
5:55:22
no-defun-allowed
I'm not sure, but it basically rotates (not shifts; rotation causes the most significant bits that get pushed off to the left to cycle back into the least significant) the hash by 5 bits and XORs in the next character code. Nothing really too fancy, so I don't know if it's really inspired by anything.