freenode/#lisp - IRC Chatlog
Search
7:22:23
solrize
is there a way to set the maximum stack depth? in clisp if that matters i don't see anything about it on clisp.org
7:31:19
beach
solrize: But if you really want to execute it, use a different Common Lisp implementation that optimizes tail calls.
7:31:28
solrize
https://kate.hackyon.org/~phr/bellied.lisp yeah it's the one that the guy posted on comp.lang.lisp
7:33:37
no-defun-allowed
You could rewrite that as a loop, but if you're lazy, (compile 'bellied-checker) will compile that function and hopefully perform the tail call elimination.
7:34:12
phoe
so the fact that it works in SBCL doesn't say anything about it needing to work in CLISP
7:46:44
phoe
CL is a multi-paradigm language and iteration is best done in an imperative way rather than via tail calls
8:08:54
buffergn0me
I had to go to comp.lang.lisp to look this up, because I had no idea from the code what was going on
8:09:20
buffergn0me
This is a variation of the popular "longest consecutive sequence" interview question
8:11:23
buffergn0me
I read my news the old-fashioned way, from a Usenet server. Also I missed the link
8:13:42
buffergn0me
Fill a 1000 element array such that index i corresponds to i+1000 integer, the contents of index i is a boolean to indicate that i+1000 is bellied or not
8:15:30
buffergn0me
Then do the "longest consecutive sequence" algorithm the best way you know how. Should be linear time with constant space if I remember correctly from when I did it last time
8:16:19
solrize
i wrote the haskell version the simplest possible way. maybe the compiler can eliminate some consing
8:19:57
solrize
buffergn0me, it will make however many, but the thing is it's lazy evaluation, so they won't necessarily all be in memory at the same time
8:21:41
solrize
maximumBy reads them one at a time and keeps a running maximum. if nothing else needs them then they can be gc'd as it goes along
8:23:35
aeth
solrize: Imo, Common Lisp is more of a language for writing functional and/or declarative languages than it is one itself.
8:23:51
buffergn0me
I would be very surprised in this case, there are not many intermediate things to fuse
8:26:18
solrize
i know there's something called foldr/build fusion which is very good at eliminating intermediate lists, so you can often speed up code by writing in that style, but i've never really understood it
8:27:05
solrize
aeth i find CL pretty practical if a bit old fashioned, but if i were writing a compiler i'd almost surely use haskell
8:27:09
buffergn0me
Well, the problem is it can eliminate the intermediate steps, but not the produce-list consume-list on the ends
8:29:40
aeth
solrize: I suppose it depends on what kind of language you're writing and what languages you know. If you are writing a language in the Lisp family, then the easiest "compiler" would probably be to compile to CL or Racket.
8:31:12
buffergn0me
What I am wondering about is, is there a way to do longest consecutive sequence on bit patterns efficiently?
10:31:51
splittist
Silly question: I have an extended function name (i.e. it could be (setf foo) ) in a vrbl. I want to funcall (or equivalent) the function of that name. How do I do that?
11:34:59
phoe
Would there be interest in a CI service that runs tests on the Quicklisp-provided software?
11:36:22
phoe
Like, basically, a server that pulls bleeding-edge versions of software from the Quicklisp list and goes (asdf:test-system) on them
11:43:01
phoe
Xach: probably the biggest requirement for that is the thing we've discussed previously - a yes/no answer from ASDF:TEST-SYSTEM that tells us whether a test suite has succeeded or not
11:44:11
jackdaniel
phoe: cl-test-grid does that (it takes the last ql release though, you'd need to create a local "early" distribution)
11:44:56
Xach
taking the last ql dist has a huge amount of value too. i only test on sbcl on linux. more testing would help improve libraries and implementations.
11:48:13
jackdaniel
as some folks can see, I'm running it mainly for regression testing before a new release
11:52:01
pve
was there some conclusion in the discussion of getting a yes/no from asdf:test-system? (i missed it)
11:52:54
jackdaniel
it was implicit: I've tried to convey the information, that cl-test-grid gets the yes/no from the test-system
12:10:19
phoe
a daily test run on multiple implementation would likely spam the existing infrastructure with a lot of information
12:15:20
pve
am I wrong in thinking that the least amount of work would be needed if the major testing libraries were patched with a "we're running asdf:test-system now"-mode, which would result in them returning something like :success or :failure?
12:16:01
phoe
pve: depends on the systems' TEST-SYSTEM method - if they directly invoke the test framework, then that'd work
12:17:18
Xach
so when i was last thinking about this, i was thinking about something not directly inside the test framework
12:17:46
Xach
but that for each project, you could have a file to load. if the file loaded without a non-local transfer of control, things "passed"
12:18:06
Xach
that would allow people to add things that were important to them to third-party libraries that might not have the tests they wanted
12:59:49
_death
if you do that, why not unconditionally signal a condition that may contain more information about the run.. basically it's a hook
14:02:34
_death
use defun*/... directly into of this macro, whose sole purpose is to substitute names for other names
14:18:07
jmercouris
is there a difference between something in my sbclrc and something in my source?
14:18:23
jmercouris
for example: "(pushnew "/opt/local/lib/" cffi:*foreign-library-directories* :test #'equal)" in my sbcl rc vs. directly in the source
14:24:01
jmercouris
please note that I am pushing these paths because I am using Shinmera's deploy and trying to make an app bundle
14:25:29
jmercouris
Yes, I know, this is not my source code, I also was thinking what is the point of that
14:27:27
jmercouris
I'm not sure how to proceed from here, but cffi:*foreign-library-diretories* is normally NIL within the at-init body
14:34:33
jmercouris
it seems unless I add the foreign library directories WITHIN the at-init, it doesn't work
14:36:14
jmercouris
is there any logical reason why someone would load foreign libraries NOT at the top level?
14:38:17
jasom
I remember that some implementations will work fine without something like that, but others will not reload the library automatically when loading from an image
14:38:56
Bike
this at-init thing uses a lambda that's run at initialization time, and the forms in there won't be top level
14:39:35
jasom
also this may have changed. Also they shouldn't be doing a define-foreign-library in the at-init, just the loading of the foreign library
14:41:15
jmercouris
does exist: lrwxr-xr-x 1 root admin 16 Oct 28 2019 libcairo.dylib -> libcairo.2.dylib
14:47:20
phoe
I don't think I can write much myself - I suffer from a writer's block at the moment. I can't stand looking at my book anymore, and that's troublesome, because review PRs and issues are waiting to be merged.
14:47:44
phoe
And I have no idea how to proceed, since a deadline for passing it to Apress is already established. :(
15:02:10
luis
jmercouris: *foreign-library-paths* is a lousy mechanism because dlopen() doesn't know about it so libcairo.dylib can't find its dependencies
15:03:46
jmercouris
deploying it is a nightmare, even getting it to run properly on macOS took weeks
15:04:56
jmercouris
phoe: how about this, I go through and fix grammatical things, and you figure out cl-cffi-gtk issue for me :-D?
15:08:32
luis
jmercouris: hmm. interesting. didn't know about that mechanism, is there a man page describing it?
15:09:20
jmercouris
luis: not that I know of, but you can read more about it here: https://www.mikeash.com/pyblog/friday-qa-2009-11-06-linking-and-install-names.html
15:20:30
jmercouris
as far as I can discern the at-init is because: It is used to reinitialize the libraries when the dumped image is loaded. (Works only on SBCL for now).
15:20:49
jmercouris
however why this when-top level nonsense? the at-init macro ensures only calling after sb init hooks
15:28:17
jmercouris
"A list of function designators which are called in an unspecified order when a saved core image starts up, after the system itself has been initialized."
15:45:05
DavdL[m]
Hello ! I had a question about quicklisp. Is it possible to choose which version of a lib I want to use ? I think it's not possible, but then, why ? Could someone explain to me?
15:46:31
phoe
Quicklisp has a concept of a "dist" which is a whole snapshot of the Lisp world taken at a given time and distributed together
15:46:57
phoe
So if you are using a dist from e.g. December 2019, then you are using software as it was when the dist was created in Dec 2019
15:47:26
phoe
The easiest way to control versions of single libraries is to clone them into ~/quicklisp/local-projects/ - ASDF systems from there override the ones downloaded by Quicklisp
15:47:39
phoe
so you can download a bleeding edge FOOBAR and store it at ~/quicklisp/local-projects/foobar/
15:48:14
phoe
When you go (ql:quickload :bazquux) and system BAZQUUX depends on FOOBAR, it will use that newer version of the library, too
16:17:00
jackdaniel
oh oh, some polish words in unicode names: #\LATIN_SMALL_LETTER_S_WITH_OGONEK :-)
16:20:11
MichaelRaskin
I am not able to suppress perceiving it as «little fire/flame» instead of «little tail» anyway
17:48:03
theseb
Why is progn considered a special form? I don't see any deviations from the standard eval rules with it
17:51:50
specbot
Processing of Top Level Forms: http://www.lispworks.com/reference/HyperSpec/Body/03_bca.htm
17:53:16
Bike
i suppose that that's it, though. versus (defun progn (&rest args) (first (last args)))