freenode/#lisp - IRC Chatlog
Search
21:40:02
pjb
puchacz: yes, I would expect some implementation to return something strange for (+ 5 nil) with (optimize (safety 0)). Happily, abcl, clisp, ccl, ecl or sbcl still signal a type error. But ISTR that some commercial implementation would just crash or return garbage.
21:50:13
aeth
pjb: (+ 5 nil) will probably be an error. (defun foo (x) (declare (optimize (speed 3) (safety 0))) (+ 5 x)) (foo nil) might not be an error. Looks like it is still an error in SBCL, though.
21:50:41
aeth
I suppose it's a matter of if it can be detected at compile time or not. safety 0 is probably more about runtime safety.
21:51:30
aeth
Oh, okay, I simply didn't tell it to trust x. (defun foo (x) (declare (optimize (speed 3) (safety 0))) (declare (fixnum x)) (+ 5 x)) (foo nil) => 268959760
21:53:17
aeth
Surprisingly, this also is unsafe even though bar isn't safety 0 and SBCL knows the function signature of foo requires a fixnum: (defun bar () (foo nil))
21:53:40
frgo
Hpwdy. Q for the gurus here: Does anybody know the state of affairs of xcvb (https://common-lisp.net/project/xcvb/doc/README.html)? Thanks a bunch for feedback.
21:56:28
aeth
What I'd like to see in a build system is a build system that can put everything into one compilation unit (which is typically one file) for a final executable distribution. There seems to be three levels of compiler information: internal to a function, internal to a compilation unit (normally a file), and everything else. One compilation unit might generate more efficient *and* safer code.
21:56:56
scymtym
frgo: iirc, for the parallel build component mentioned there, poiu, some work has been done relatively recently to integrate it into asdf. i don't remember the outcome, though
21:57:31
Shinmera
aeth: Not for an executable, but for things that should be shippable as source I do.
21:57:35
random-nick
a part of sqlite3's build process is merging all of the files into one big file
21:58:12
aeth
It might make a big difference in my game engine, which for practical purposes is split into many files that aren't that big
21:58:13
Shinmera
This is all that's required: https://github.com/Shinmera/ubiquitous/blob/master/ubiquitous.asd#L22-L23
22:03:56
aeth
I see. It was probably instant because I have an SSD. The expected delay is when compiling that new, large file.
22:31:39
pjb
drmeister: in the unix philosophy, you would use something like: tty-rec clasp ; but in the lisp philosophy, it's batteries included ;-)
22:34:08
pjb
drmeister: slime runs the commands in separate threads, it doesn't use the implementation REPL. To provide a conforming REPL, slime would have to implement its own dribble mechanism.
22:35:17
pjb
drmeister: I don't think it's obsolete. It's useful for example, when you develop. You will keep trying your code at the REPL. If you took care to call dribble to save it to a file, you can then take this file and extract from it your tries to write a test for your new code.
22:35:56
pjb
It's also like .bash_history. Sometimes you want to check out what you did back in time.
22:58:57
pjb
equwal: before slime, I used it with inferior-lisp and my own emacs commands for C-x C-e.
22:59:42
pjb
equwal: there was also ilisp; in both cases, inferior-lisp uses the native repl directly, so dribble works.
23:24:21
z3t0
can someone point me to some source code for a fairly small project that demonstrates recommended ways for organizing projects?
23:28:05
pjb
z3t0: there's no recommended way, no straightjacket. Small projects can be stored in a single file. Bigger projects need more organization, that will depend on the size and structure of the project.
23:28:40
pjb
z3t0: the only thing nowadays, is that it's convenient to provide an asd file so that we may easily compile, load and test your project.
23:29:45
z3t0
currently I have two slime repls open in emacs, however my commands are going to the wrong one (such as compile)
3:53:34
Fare
puchacz, I never used LispWorks much. LispWorks 6 didn't support Unicode codepoints > 65535
6:16:00
drmeister
I'm just becoming hip to how well docker works with Common Lisp. Say you have a lot of ASDF systems and you have a slowish compiler - just build everything in a docker container and ship it. Compiled asdf systems are all bundled up with it.
7:31:58
fourier
probably you can roll out something on basis of c-mera for C. otherwise maybe SWIG could help, design API in C and generate all bindings for all languages you want via SWIG
7:35:32
fourier
why limit yourself, there are tons of corner cases which were already solved in swig. and to prepare truly portable api better to start with C anyway I believe
7:36:27
fourier
but it would be awesome to have some generator in CL I must admit.. c-mera is a good step forward but to low-level imho
7:37:03
jmercouris
definitely, lots of corner cases, and supporting each language will be a huge pain for sure
7:40:17
jmercouris
admittedely, the domain I'm trying to solve is far simpler and would be something like what swagger provides
7:43:43
jmercouris
anyways, generating the classes, functions, etc for the API will still not be trivial, but at least easier than library APIs