freenode/#lisp - IRC Chatlog
Search
6:20:13
dmiles
but it is at least helpfull as i looking at https://www.dropbox.com/s/ulpiwmqs7p2ht80/Screenshot%202019-05-02%2023.19.43.png?dl=0
6:46:40
dmiles
putting in the things that made SBCL happier: https://github.com/TeamSPoon/CYC_JRTL_with_CommonLisp/commits/larkc
8:40:51
gjvc
/usr/lib64/clisp-2.49.93+/base/lisp.run: initialization file `LISPINIT.MEM' was not created by this version of CLISP runtime
8:44:06
dmiles
(the error only happens when the code tries to update the postioning of items in the world)
8:44:45
dmiles
"Grasp the pyramid." give no error due to it replying it donet know as to which pyramid you menat
8:47:32
dmiles
the main problem is it is using REST as a special variable.. its hard ot just blanket rename that throuought the files
8:48:29
dmiles
since i think that there are a couple occurences (not the &rest) that it is not supposed to be spcial *yet*
8:49:53
dmiles
well heres a question (defun foo (bar) (declare (special bar) ) ... just how special is bar here?
8:56:13
dmiles
(defun foo (bar) (print `(foo ,bar)) (declare (special bar) ) (set-bar 2) (print `(foo ,bar)) )
8:59:23
dmiles
(defun foo (bar) (declare (special bar) ) (print `(foo ,bar))(set-bar 2) (print `(foo ,bar)) )
9:00:19
dmiles
the question i have next is if there was a new call to (foo 3) if that changes it again?
9:07:03
dmiles
G:\opt\CYC_JRTL_with_CommonLisp\platform\e2c\shrdlu\src>clisp -M lispinit.mem --version
9:07:46
aindilis
somewhere someone should be interested in keeping old software running, I find I need this quite a lot
9:08:22
dmiles
searching clisps bug database i see that 2.27 has some of the same bugs as the windows version..l that was why i assumed it was 2.27
9:11:24
dmiles
> also won't the sources not compile due to bitrot? (I think you have to use a differnt version of GCC)
10:57:59
xkapastel
http://okmij.org/ftp/continuations/undelimited.html argues that delimited continuations are "more expressive" but that seems misleading, it's precisely because undelimited continuations are like `goto` that you can do weirder stuff with them
13:29:25
phoe
sjl: your keyboard-binding trick doesn't really work for me. There is a very short delay between pressing l-shift and it typing a paren. I can't really stand it.
13:37:15
phoe
Also, I come back to a question - is it an error to call (find 1 '(1 2 3) :test nil) ?
13:39:20
phoe
so I assume that (split-sequence 2 '(1 2 3) :test #'eql :test-not nil) should similarly blow up
13:40:10
phoe
so I am puzzled whether I should go "let's pretend the user didn't pass NIL in there" like SBCL does or signal an error which is the formal approach
13:40:29
jsjolen
phoe: No. "The consequences are unspecified if both a :test and a :test-not argument are supplied in the same call to F. "
13:42:03
jsjolen
Bike: That was more difficult to find out. Typically a function can know if it actually was supplied with an argument in &key-position or not
15:31:33
vms14
I try to make some sort of html generator, but I've ended realizing the best I could do is to create a dom
15:32:50
koenig
Here's a thought question: could you pass in the nesting-value as an argument to the render function and change how some of the recursion works?
15:34:18
koenig
Any implementation that you've done is good. I rarely or never discourage people from writing code and trying. :)
15:34:46
vms14
koenig: not really, I was very disappointed with the other versions until I've moved to oop
15:35:16
pjb
vms14: really, using a global (special variable) or a value in the closure are bad solutions, because they break with threads.
15:35:17
koenig
What I'd suggest is that you keep the current implementation and try to make a new implementation of the same functionality and see how the two compare.
15:36:13
pjb
vms14: ~T is implementation dependent, so it's better to use (format nil "~VAfoo" 4 "") #| --> " foo" |#
15:41:31
pjb
(dotimes (i 10 (format t "~9A||~%" "")) (format t "~VA~V,,,'*A~%" (- 10 i) "" (* 2 i) ""))
15:46:27
asarch
From https://stackoverflow.com/questions/39133421/how-to-properly-save-common-lisp-image-using-sbcl
15:46:45
asarch
I have: (sb-ext:save-lisp-and-die "tigger" :compression t :toplevel (lambda () (gtk-demo:main)) :executable t)
15:50:47
asarch
Well, it has the Unix permissions: -rwxr-xr-x 1 asarch 1000 18235904 May 3 10:45 tigger
15:51:25
sjl_
sbcl always sets the executable bit for me automatically every time I've done that. Does it work if you turn off compression?
15:58:43
sjl_
And you're doing something like `sbcl --load foo.lisp` and then `./tigger`? Doing that runs the hello, world for me.
15:59:54
sjl_
Oh, I wonder if it's something in the CFFI/GTK that's causing problems. Does it work if you comment out the quickload line?
16:01:27
sjl_
That's very strange. It's not something silly like you're running the thing in a separate terminal window that's cd'ed to a different directory or something, right?
16:02:45
katco
is there a better way to do this? `(let ((v (or (gethash 'foo bar) 0))) (setf (gethash 'foo bar) (+ v 1)))`. i.e. i can't use `incf` because the value in the hashtable is `nil` at first
16:03:08
asarch
I built this SBCL (the newest release) using the binary package from the OpenBSD 6.5 for AMD64 binary ports, and this was the compilation log if it helps: http://paste.scsys.co.uk/584312
16:03:08
pjb
Yes, since there's no comma, `(let ((v (or (gethash 'foo bar) 0))) (setf (gethash 'foo bar) (+ v 1))) is better written '(let ((v (or (gethash 'foo bar) 0))) (setf (gethash 'foo bar) (+ v 1)))
16:04:34
sjl_
asarch: I mean, if just the basic (sb-ext:save-lisp-and-die "tigger" :toplevel (lambda () (format t "Hello, wold!~%"))) doesn't work something seems pretty wrong. Maybe #sbcl would know more.
16:05:39
vms14
asarch: if I run sbcl and type your pasted line (sb-ext:save-lisp-and-die "tigger" :toplevel (lambda () (format t "Hello, wold!~%")) :executable t)
16:06:46
asarch
In OpenBSD you need to enable the wxallowed flag to the partition in order to run SBCL
16:08:21
sjl_
Oh yeah, a lisp image almost certainly needs to be able to write and execute memory, to compile and evaluate functions.
16:08:46
vms14
Processes that ask for memory to be made writeable plus executable using the mmap(2) and mprotect(2) system calls are killed by default. This option allows those processes to continue operation. It is typically used on the /usr/local filesystem
16:09:08
asarch
katco's facepalm reminds me that problem when I was trying to compile it two releases ago
16:12:17
asarch
Ok. Problem fixed. Next one: using (ql:quickload 'cl-cffi-gtk) (sb-ext:save-lisp-and-die :topleve (lambda () (gtk-demo:main)) :executable t) I get this: http://paste.scsys.co.uk/584313
16:13:12
asarch
Is it because of "Declared GType name 'BloatPad' for class 'BLOAT-PAD' is invalid (g_type_name returned 0)"?
16:13:37
sjl_
that one seems like the CL GTK thing you're loading is maybe not playing well with whatever version of GTK it's finding from your system
16:14:24
sjl_
I don't know for sure though. I've never used lisp+gtk before, and definitely not on a BSD
16:22:12
vms14
asarch: you can load that library without problems in openbsd + sbcl by using quicklisp?
16:24:06
vms14
NetBSD vms 8.0 NetBSD 8.0 (GENERIC) #0: Tue Jul 17 14:59:51 UTC 2018 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
16:29:15
vms14
now nesting-value is an argument, I just need to change ~vt for ~va "" if I want to make it "portable"
16:32:53
nirved
vms14: why not use (defun render (element &optional (nesting-value 0)) ... (render current (1+ nesting-value)) ...)
16:34:16
pjb
I prefer to use (defun render (element &optional (indent "")) ... (render current (concatenate 'string " " indent)) …)
16:36:18
liambrown[m]1
Hey peeps. Trying to install cl-rabbit via quicklisp using the following command:
16:39:18
pjb
On Darwin 18.5.0 cc -o /Users/pjb/.cache/common-lisp/ccl-1.12-f98-macosx-x64/Users/pjb/quicklisp/dists/ultralisp/software/lokedhs-cl-rabbit-20190319101258/src/grovel__grovel-tmpB5GEVTOQ.o -c -m64 -I /opt/local/include/ -fPIC -I/Users/pjb/quicklisp/dists/quicklisp/software/cffi_0.20.0/ /Users/pjb/.cache/common-lisp/ccl-1.12-f98-macosx-x64/Users/pjb/quicklisp/dists/ultralisp/software/lokedhs-cl-rabbit-20190319101258/src/grovel__grov
16:40:12
liambrown[m]1
Is there an alternative for RabbitMQ? This is the one recommended in their official docs.
16:40:58
Bike
the cffi-libffi github has a commit "Add support for libffi.so.7" as of four days ago.
16:41:31
liambrown[m]1
I can scour around for other options later, too. The wall I'm hitting is that I don't know how to provide the alternative value to the debugger.
16:42:02
Bike
https://github.com/cffi/cffi/commit/ffbeaf78de8e9659ef159101b125253a04243581 look, here.
16:43:59
liambrown[m]1
I have the sinking feeling that talking to Rabbit is not going to be as simple as I thought.
16:44:30
Bike
i don't know about that, but you can fix your particular problem here just by getting a newer version of cffi-libffi.
16:52:31
liambrown[m]1
cffi-libffi, is that a library specific to the Lisp implementation, or are we talking about something like the libffi I have installed?
16:57:15
Bike
liambrown[m]1: it is a lisp library that cl-rabbit depends on. it is the one looking for libffi.so.
18:11:10
sjl_
I'd try using run-program with :output and :error-output set to :string, instead of launch-program, until you debug what's going wrong. then switch back to launch-program if you want the asyncness