freenode/#lisp - IRC Chatlog
Search
22:41:00
aeth
Josh_2: An application is (probably too simply) a library with an entry point. In Lisp, you're free to ignore the entry point and directly access things, even private things. You could probably even do this on a saved lisp image that isn't tree shaken.
22:41:15
aeth
An application would have to be pretty fragile with globals everywhere, etc., to have nothing useful to someone else.
0:04:01
jmercouris
republican_devil: I don't know what Xach uses, but Shinmera has a framework called radiance, is quite nice
0:46:34
drmeister
I believe that ASDF is using the system clang compiler and I need it to use a different clang compiler
0:52:14
drmeister
ASDF does compile C source - correct? I see the pzmq library generates a grovel__grovel.c file - that is compiled somehow to a .o file.
0:54:32
jfe
drmeister: unfortunately i'm an amateur on asdf. but i had a question for you. the other day i asked why compilers aren't more frequently written in high-level languages like lisp. if i understand correctly, you wrote the clasp compiler in c++. why did you choose c++ instead of lisp?
1:02:13
drmeister
jfe: I did not write the clasp compiler in C++. Clasp has one interpreter written in C++ and two compilers written in Common Lisp.
1:05:56
jfe
drmeister: ah, i see. i listened to your presentation of clasp at google and must have misheard. thanks.
1:06:46
drmeister
Clasp interoperates with C++ (links with C++ libraries and C++ calls interleave with CL calls).
2:24:25
Xach
didi: i do it when i think someone might want to in-package to use no prefixes, but don't want to mess with implementation stuff. but it's also trivial to make a new package that uses PACKAGE
2:28:17
Ober
how do you get the line number of the offending error on sbcl when compiling and you hit the restarts/debugger?
2:30:46
didi
Oh, tip: it got nicer once I added (declaim (optimize (speed 0) debug safety)) to my ~/.sbclrc
2:37:59
Ober
rototilling a bunch of code back into a single file, but can't find the line where it's bombing on
2:54:07
loke
phoe: Seems to be as though he might be trying to redeclare a class from a standard class into a metaclass.
2:58:23
Ober
allegro built it fine, lw gave this error which seems more useful. Layout for class #<MANARDB:MM-METACLASS FILES 41B0C43E23> has changed from ((VALUE 0 8 MMAP-POINTER T) (IDX 8 8 MMAP-POINTER T))
3:12:23
drmeister
Ironclad generates a different MD5 digest than C++ code that I have and MD5 hash generators on the web - what am I doing wrong?
3:14:57
drmeister
The C++ code (My md5) and the MD5 calculator generate the same result. Ironclad - something different.
3:18:36
froggey
drmeister: I had a similar problem, it turned out my sin implementation wasn't accurate enough to build a table MD5 needed
3:28:16
phoe
drmeister: https://en.wikipedia.org/wiki/MD5 has the precomputed values, you could perhaps check if your sine gives you same hex numbers
3:38:23
drmeister
It's weird though - when calculate the integer value - it's fine. It's just when I convert it to a hex string that it zeros the last digits.
3:47:27
phoe
AFAIK you need to explicitly pass double-floats to sin, otherwise it pops out single floats that are not precise enough.
3:48:32
phoe
drmeister: (format nil "~x" (floor (* (expt 2 32) (sin (coerce 1.0 'double-float))))) ;=> "D76AA478"
4:02:13
drmeister
I wrote a function to generate the table and ran it in Clasp and Sbcl - I get the same results.
4:04:56
drmeister
(defun ccc () (let ((*print-base* 16)) (print (loop for i from 0 below 64 collect (truncate (* 4294967296 (abs (sin (float (1+ i) 0.0d0)))))))))
8:35:54
xificurC
when running a script with #!/usr/bin/sbcl --script is there a way to drop into a repl?
8:46:40
pjb
xificurC: so you have two choices: either call the repl toplevel at the end of the script (and use --script), or write a script to run sbcl without --script, but loading and running your lisp script.
8:54:29
pjb
it might be a good idea to wrap it in a handler-case if you want the script to keep control, and to redefine quit to exit sb-impl::toplevel-repl instead of killing sbcl if you want to take over after the repl.
9:03:37
easye
Lisp 101 question: how do I distinguish between a reference to proper list and a dotted list? The form (not (consp (cdr reference))) seems ridiculously non-terse, so I fear I am missing something basic.
9:05:12
pjb
You may use com.informatimago.common-lisp.cesarum.list:proper-list-p alexandria.0.dev:proper-list-p #+ccl ccl::proper-list-p
9:05:57
easye
pjb: ok, I guess that makes sense. Just thought there should be something in ANSI to do this. I was a bit surprised that LISTP acts as a complete synonym for CONSP.
9:06:36
pjb
Remember, lisp was implemented in 1960 on computers that were barely able to perform 1 million operations a second.
9:17:32
tfb
easye: distinguishing a proper list from something that isn't is non-trivial in general: is #1=(a b #1#) proper (no, but knowing it's not requires an occurs check)
9:20:06
easye
tfb: Yeah. I'm just having one of those moments of realizing my internal model of CONS structures needs some refreshing.
9:22:58
tfb
I spend my working life looking at a million lines of fortran and wondering much the same
9:24:52
easye
FORTRAN was my first language: studying a Decwriter printout of Colossal Cave and some of the Hollerith cards. Real fun for a pre-teen.
10:35:56
schweers
I have code which passes double-floats and '(unsigned-byte 64) values to helper functions and recieves them back. After reading about block compilation in the CMUCL manual I wanted to try it, but SBCL (which I use) removed support. So I put my helper functions into a LABELS form and put both DECLARE forms and defuns (which have preceding toplevel DECLAIM forms) into the LABELS form. I still get efficiency notes like th