freenode/#lisp - IRC Chatlog
Search
10:14:01
no-defun-allowed
But I suppose the synchronous requirement can be worked with, it's easy to hack on to the other.
10:14:31
no-defun-allowed
There was some kind of fast-io which used static vectors which used CFFI, which I can't disable.
10:16:02
no-defun-allowed
Maybe I need to update the buildpack, since there is an issue with a uiop macro from what I remember.
10:16:24
no-defun-allowed
>i got a very, very weird error using websocket-driver on heroku: https://pastebin.com/4XjhbYQ4
10:18:45
no-defun-allowed
Would that come with sbcl? I think asdf did and they're fairly related libraries.
10:20:25
no-defun-allowed
I don't know, honestly. Heroku does not let you get at a remote repl too easily.
10:21:20
phoe
Though by now I expect it to ship ASDF2 which is ancient as well and many modern libraries refuse to run on it.,
10:26:38
no-defun-allowed
I suppose the SBCL developers have forgotten to add the finewine(tm) program longevity improving libraries.
10:35:23
phoe
So, not SBCL's fault either. Complain to CFFI maintainers that they dropped support for earlier UIOP versions.
12:05:04
dimpase_
their FAQ is rather unclear on it, and in my setup (require :ecl-quicklisp) starts installing things into ~/quicklisp straight away.
12:11:19
dimpase_
one does not want 100 students creating ~/quicklisp and downloading stuff there...
12:13:52
phoe
quicklisp operates with the assumption that users can download arbitrary stuff into the Quicklisp directory
12:15:00
phoe
if you want read-only access to systems, you can run Quicklisp as a privileged user, download the packages from the Internet into a directory that is read-only by other users
12:15:35
phoe
then other users add that directory to their ASDF registry so they can (asdf:load-system :foo) from it.
12:15:56
Inline
like a main base on some dir then everyone with his own clutter of their own quicklisp dir
12:16:52
phoe
you have a system-wide registry (Quicklisp mirror) that is scanned first, and if a system is not found there, then QL/ASDF can search for it
12:18:32
dimpase_
in fact, it's about adding a package into ECL embedded into SageMath... (http://sagemath.org)
12:21:11
Inline
phoe: i.e. installing some libs to arbitrary paths, and keep the pointers in the registry ?
12:24:22
phoe
so: use an external ASDF registry, and Quicklisp on the clients, while making sure that QL is aware of the external registry.
14:32:01
jackdaniel
I've answered this question on the mailing list (about ecl-quicklisp contrib). To sum up: 1. ql should be installed from quicklisp.org (ecl-quicklisp is a conveniance hack), 2. to customize location for ecl-quicklisp contrib do something like: (push '("HOME:QUICKLISP;**;*.*" "/tmp/quicklisp/**/*.*") (logical-pathname-translations "HOME"))
14:33:48
Xach
i get frustrated sometimes when the same question is posted to irc, mailing list, reddit, stack overflow
17:22:00
phoe
What condition type would be the best for the kind of error "START is greater than END"?
18:50:51
pjb
(let ((sequence #(0 1 2 3 128 129 130 254 255))) (format nil "~{~2,'0X~}" (coerce sequence 'list))) #| --> "00010203808182FEFF" |# ; sorry, missed a ~
19:45:06
tempate
Hello. I'm reading Practical Common Lisp and I am kind of stuck. For some reason https://bpaste.net/show/6a504c25c54d isn't working as it should. When running (test+-) I should be getting T if all tests are passed. Instead, it's just returning nil every time.
19:46:59
tempate
Also, for some other reason, when compiling the first time (fyi, using Portacle) I get 1 Error 1 Warning and 3 Style-warnings. But, when compiling for the second time, it all works out just fine.
19:57:56
tempate
the thing is I don't know where I've gone wrong, as much of the code is just copied from the book
20:01:51
tempate
_death: yes, it's that section I just finished reading and updating the code, which is the one I send
20:02:26
shka_
so they have java, C++ and go, i suspect that C++ would be rewritten if not for the size of the code base
20:06:45
_death
tempate: there are many sites for programming "challenges".. lisp specific ones are http://www.ic.unicamp.br/~meidanis/courses/mc336/2006s2/funcional/L-99_Ninety-Nine_Lisp_Problems.html and https://github.com/google/lisp-koans I guess
20:07:38
_death
tempate: books like ANSI Common Lisp, Paradigms of AI Programming, Structure and Interpretation of Computer Programs also have exercises
20:08:28
tempate
Fade: I've checked that one already, but the problems require a level which I don't yet have
20:44:06
fe[nl]ix
git reset origin/master, then use Magit or something similar to split the changes in 3-5 commits
21:14:38
phoe
fe[nl]ix: though, honestly, I do not know how to organize these commits within these 3-5 ones - I literally completely reorganize the code in there.
21:22:21
phoe
a macro generates code. the compiler that compiles a function must know what kind of code it contains in order to compile it.
21:22:58
phoe
so, if the compiler encounters a function that contains a macro call, that macro must be defined right during that moment of compilations (unlike functions, which may be defined later).
21:23:45
tempate
but if a function is not calling a certain macro, it doesn't matter if it's defined before or after, right?
21:24:41
aeth
Afaik, defmacros and defuns are generally mixed, unlike globals/constants, which should go at the top by convention.
21:24:50
phoe
if a function doesn't use a macro, then it doesn't care if or when that macro is defined
21:25:51
phoe
as for when macros/functions should be defined in the code: anywhere as long as it's logical
21:26:22
tempate
ok. I wasn't sure if it was good practice to define macros before all else or not. That sorts it out, thanks
21:42:44
_death
also define the functions that a macro uses before use of the macro.. one way to do it cleanly is to separate macro definition from use, for example by placing them in different files
21:45:37
aeth
Usually, I wrap the functions in eval-when until they get too long. After a few hundred or so, then a separate file becomes the clear answer.
21:47:37
aeth
The options are (a) put the functions in a separate file or (b) wrap the functions in eval-when. This is only necessary for functions called *while the macro is expanding*, not called in the final expansion result. i.e. (defmacro foobar () (foo 42)) requires this workaround but (defmcaro foobar () `(foo 42)) does not.
21:50:03
aeth
These functions usually return lists acting as Lisp syntax. e.g. (foo 42) in the first example might return `(make-array 42 :element-type 'single-float :initial-element 0) but (foo 42) in the second example if doing the same functionality shouldn't do that because it's being called at runtime.