freenode/#lisp - IRC Chatlog
Search
4:38:27
jasom
jmercouris: correction, nEXT is actually stable on sbcl, it's closing a window that causes everything to get corrupted
4:40:02
jasom
ACTION thinks it causes a window-destroy event in GTK, but I haven't touched GTK for a while so might be wrong
4:43:03
sigjuice
jmercouris I tried the nEXT gtk branch as well, but didn't get very far. I have ubuntu 17.10, Clozure Common Lisp Version 1.11.5/v1.11.5 (LinuxX8664). After (next:start), I got Error: null-pointer in parse-g-param-spec While executing: GOBJECT:PARSE-G-PARAM-SPEC, in process listener(1).
4:44:17
jmercouris
meaning it tries to set the visible view on the interface object which is not yet ready
4:44:57
sigjuice
jmercouris "git pull" says Already up-to-date. 7b0e6bedd7f14fc0fcbf6ae97a75ab57b4885a11 is the commit I'm at.
4:45:03
jmercouris
So I wrapped set-visible-view in gtk:within-main-loop so the interface would definitely be intialized before that could code run (as they would be running on the same thread)
4:47:04
jmercouris
jasom: I have considered that, I will probably wrap all interface calls in there, yes
4:47:52
jasom
The following is sufficient to reproduce for me: ccl -e '(asdf:load-asd "'"$PWD/next/next.asd"'")' -e '(asdf:load-system "next/gtk")' -e '(next:start)'
4:51:20
sigjuice
I tried (ql:quickload :next/gtk) and then (next:start). I'm not at all familiar with gtk, but I do get a tiny white window with the title nEXT
4:54:52
jmercouris
sigjuice: :\ hmm let me try running SBCL and see how many issues are maybe CCL specific to some lib interactions
4:56:22
sigjuice
I can try the latest sbcl too, with jasom's patch. What version of ccl and Linux are you running?
5:04:42
jasom
jmercouris: you're creating UI all over the place outside of the GTK main thread. That's totally bogus
5:07:46
sigjuice
Just got sbcl-1.4.3, but (ql:quickload :next/gtk) complains about Unable to load any of the alternatives: ("libsqlite3.so.0" "libsqlite3.so"). Weird that ccl didn't complain?
5:09:16
jmercouris
and yes, I need to list that as a dependency for linux at any rate, what should I put in the instructions?
5:11:04
sigjuice
trying the 64-bit version, which happens to be 1.4.2. I just clicked on the one that said "newest" here http://sbcl.org/platform-table.html assuming it would be the right one :p
5:11:24
jasom
jmercouris: e.g. (gtk:within-main-loop (foo)) (gtk:within-main-loop (bar)) either foo or bar could be called first
5:12:35
jmercouris
If you had foo, then bar, foo will begin execution probably some cycles before bar gets added to the stack
5:13:27
jasom
jmercouris: the usual way is to actually do the work inside the main loop rather than doing a bunch of asynchronous requests
5:13:58
jasom
jmercouris: you could write your own version of within-main-loop that queues up work and deschedules itself once the queue is empty I suppose
5:14:52
jmercouris
webkit2:webkit-web-view-run-javascript has a callback you pass that will get fired upon completion
5:15:26
jmercouris
my web-view-execute function needs to be synchronous though, so I have to set up some block that waits for that callback and retrieves the js return value
5:16:04
jmercouris
The problem is, the cocoa code is all synchronous, and the gtk code is not, I can't have two different models using the same interface, not easily at least
5:17:31
jasom
Zhivago: I'm not sure if the GTK main loop runs in a lisp thread; if so, lparallel to the rescue!
5:18:05
jasom
jmercouris: "dark dark road" you're controlling a GTK application from a separate thread, promises light up your road...
5:18:13
jmercouris
I like the idea of a within-main-loop work queue, I don't get a callback though for all GTK things I fire off
5:18:31
sigjuice
but I am seeing a bunch of messages like this. Memory pressure relief: Total: res = 13537280/11018240/-2519040, res+swap = 9592832/7073792/-2519040 and (sbcl:77596): Gtk-CRITICAL **: gtk_tree_path_to_string: assertion 'path != NULL' failed and libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
5:20:05
jasom
pseud-cl: (let ((x (promise)) (function-that-takes-callback (lambda () (fulfil x RESULT))) (force x))
5:20:06
Zhivago
But it should look something like (await (promise (lambda (done) (async-blah done))))
5:20:31
jmercouris
sigjuice: The path !=null assertion refers to a check I do when there are no completions, it can't find a path, therfore can't highlight the first elemtn
5:21:53
sigjuice
jmercouris calling it a night, but I will check back here for updates and be happy to test things out
5:32:47
jmercouris
jasom: just to confirm, you are referring to this: https://github.com/lmj/lparallel yeah?
5:39:59
jmercouris
jasom: It was being used also for some objc- %null-ptr% things in cocoa/utility.lisp
5:56:03
jasom
hmm libwebkit2 is listed twice on list-foreign-libraries I wonder if that's causing issues
6:08:16
jasom
ccl *is* slower which is why it was failing. Also there is a bug upstream in cl-cffi-gtk
6:18:05
jasom
minion: memo for jmercouris: https://github.com/crategus/cl-cffi-gtk/pull/56 <-- this fixes the ccl issue; I'll post my synchronous gtk solution later tonight
8:12:45
throwprans
But from that doc, it just says nothing about what t is? or am i missing something obvious here?
8:16:05
throwprans
"The symbol t is also sometimes used for other purposes as well. For example, as the name of a class, as a designator (e.g., a stream designator) or as a special symbol for some syntactic reason (e.g., in case and typecase to label the otherwise-clause)."
8:16:28
jdz
throwprans: T is for "true", and functions that accept stream designators treat T as *terminal-io*.
8:17:16
beach
Shinmera: I think FORMAT is different in that it doesn't take ordinary stream designators.
8:17:46
throwprans
Shinmera: Yeah, and looking at the FORMAT docs, I don't understand how to read it. -_-
8:19:47
throwprans
beach: That is much better, how do I make sure I land on the "extend" version of docs and not here http://www.lispworks.com/documentation/HyperSpec/Body/f_format.htm?
8:19:50
beach
throwprans: The only way to find out what T might mean, is to read the documentation for the function that you are wondering about.
8:19:58
jdz
That's why I was surprised to read T -> *terminal-io*, and not *standard-output*. Should pay more attention to my cognitive dissonance.
8:20:25
throwprans
I searched the web, I got here http://www.lispworks.com/documentation/HyperSpec/Body/f_format.htm
8:21:29
throwprans
Yeah, now I know that from 22.3 I can go to the f_format doc, still not sure about the other way around
8:21:50
throwprans
I am asking because I might end up the same place again and again for different functions
8:21:55
Shinmera
"For details on how the control-string is interpreted, see Section 22.3 (Formatted Output).
8:23:20
beach
throwprans: The Common Lisp HyperSpec is not meant to be documentation for the application programmer. For that, you are better off reading a book. The Common Lisp HyperSpec is a specification meant for people implementing Common Lisp systems.
8:23:55
Shinmera
Even despite that it is unfortunate that some of the links between pages are not well established
8:24:03
throwprans
But I like to understand how stuff works, so like to jump to the man/reference/whatever page when I can.
8:30:26
Fare
That ASDF bug blows my mind. I have to page back in all the ASDF call graph in this ugly ugly part of ASDF.
8:31:33
Fare
It's about the notion of primary-system not being a matter of name (since there are misnamed secondary systems) but of what asd file you were loaded in.
11:01:46
flip214b
there's an "libapache2-mod-lisp" package, does anybody have experience with it? is that better/faster than using mod_proxy and hunchentoot?
12:33:14
mgsk
What's the "best" / "lisponic" way to do the equivalent of (in python) `for idx, elt in enumerate(list)'?
12:36:20
Shinmera
Which is mostly irrelevant nowadays as the symbols are few and the memory is plenty.
12:45:33
KZiemian
JuanDaugherty: this is one year old, partly outdated manifesto https://github.com/phoe/clus-data/blob/master/paper.pdf
12:55:06
KZiemian
if we don't find more acctive contributors we need at least few months to end prepering new framework (in broad sens of word) to CLUS
13:37:23
francogrex
phoe and continue loading asdf as usual using for example: (asdf:operate 'asdf:load-op :ALEXANDRIA) ?
13:39:58
francogrex
because I use step afterwards. if i load the compiled I won't be able to single step unless....
13:44:40
francogrex
(declaim (optimize (debug 3))) I have that. but still if i only load-op it won't single-step unless load-source-op. however with SB-EXT:RESTRICT-COMPILER-POLICY maybe it will directly on the compiled allow me to single step
13:50:17
oleo
#.(declaim (optimize (safety 3) (debug 3) (space 0) (speed 0) (compilation-speed 0) (inhibit-warnings 3)))
14:27:11
phoe
that's where RESTRICT-COMPILER-POLICY comes in, as it's stronger than individual OPTIMIZE declarations.
14:27:34
phoe
so you restrict it in .sbclrc, recompile everything once just to be sure, and boom, debug 3 everywhere.
14:48:52
beach
KZiemian: Here is another item for CLUS: On the dictionary page for FORMAT, it doesn't say what stream is designated when T is given. It would be good to mention that.
15:47:17
flip214
Xach: in https://www.xach.com/naggum/articles/3179815377988891@naggum.net.html, I guess that the
15:48:12
flip214
I've seen a few more similar HTML "injections", but a few of them matched the content or tone so I didn't wonder that much
15:50:35
flip214
(as #:Erik is famous for not loving Perl, I can't resist the guess that this is some Perl-RE-blunder? ;)
15:56:10
Xach
That won't be fixed, sorry. That happens to a small number of articles with ambiguous date fields.
15:57:20
flip214
the number is not that small... from memory, I'd guess I've seen some 30 or 40 mixed up posts, and I'm in Oct 2000 right now... but never mind, I can manage.