freenode/#lisp - IRC Chatlog
Search
7:16:40
no-defun-allowed
What does the Railway Recruitment Board of Mumbai have to do with Common Lisp?
7:46:21
jackdaniel
ACTION never heard of such implementation despite doing a research for a graph showing CL implementations a few years ago
7:48:42
remexre
eh, might write an ad-hoc, informally-specified, bug-ridden, slow implementation tomorrow, if none exists :P
7:49:37
jackdaniel
I find it funny that I've made that mistake, I'm sure it would not be possible for me outside lisp community -- implementation is more tied to the compiler+runtime than to libraries in my mind
7:55:43
remexre
Lisp is also one of the relatively few languages where "compiler" isn't a sufficient descriptor, and where multiple implementations exist; only non-Lispy non-compiled language I can think of that has no consensus on a "default implementation" is JS
7:58:34
beach
There is no such thing as a "compiled language" or a "non-compiled language". Whether a compiler is used is a characteristic of the implementation, not of the language.
8:02:31
remexre
I guess I could rephrase my point more precisely as "among languages I know of, it seems to me that either a language has a single community-standard implementation, or all of its implementations are AoT compilers, and are simply called 'the compiler' rather than 'the implementation' as a result"
9:33:03
p_l
remexre: varlink is very, very new, and past track record suggests that implementing it from description will be futile
9:33:50
p_l
remexre: there's no "standard" implementation for C, C++, Java, Ada, Fortran, Pascals, pretty much all "older" languages
9:39:02
White_Flame
another thing about older languages is that hardware was wildly varying. nowadays it's become possible to have a singular environment that generally works the same cross-platform
9:40:51
p_l
White_Flame: Perl afaik is implementation-defined like Python and doesn't have other spec
9:43:47
jackdaniel
perl6 unlike earlier version has started from the specification, that said it is very different language
10:01:00
Nilby
Based on the amount of perl I've converted to CL, without understanding perl, I reason that perl implementation doesn't understand perl.
10:09:35
pjb
At its core, varlink is simply a JSON-based protocol that can be used to exchange messages over any connection-oriented transport.
10:35:01
beach
ACTION wonders whether we are going to get an extension of the deadline for ELS submissions.
11:39:20
jmercouris
beach: interesting read, is your source implemented as such that it can easily be ported to different implementations?
11:45:13
jmercouris
amerlyq: you can see them here: https://github.com/robert-strandh/SICL/tree/master/Papers/Global-environments
11:48:01
jmercouris
beach: I'm assuming it is portable since I take it this one of the things SICL brings to the table
12:55:39
jmercouris
can someone please help explain some unexpected behavior, I have this simple file I am loading: http://dpaste.com/0FRTE2V
12:55:53
jmercouris
in the SLIME REPL I do: (trivial-main-thread:call-in-main-thread #'gtk-tutorial::start)
12:57:43
jmercouris
I tried to change my .swank.lisp to: (setf swank:*communication-style* :fd-handler), but then it is impossible to quickload cl-cffi-gtk
13:01:56
Nilby
This is one of the reasons I don't use slime for this kind of thing, but maybe if you start gtk first, and then start swank and connect to it?
13:02:35
jmercouris
Nilby: what do you mean? start SBCL in a terminal, quickload cl-cffi-gtkk, load swank, start a swank server, and then connect slime to it?
13:03:21
jackdaniel
Nilby: do you have backdoor in your head? people peek into it to answer instead of you ,)
13:06:59
decent-username
If people are already talking about GTK. What's a good library to use for writing GTK-3 GUIs?
13:09:04
jackdaniel
(and provide some small bindings which are needed for my lisp app via callbacks or whatever)
13:10:34
decent-username
The issue I'm currently having with CL it's missing libraries. In order to write those libraries I need to really know C.
13:11:03
decent-username
The GTK discussion shows, that there's apparently no solid GTK library for CL.
13:11:11
jmercouris
OK, so to use SLIME AND get proper widget rendering I've appended: (swank:create-server :port 4006 :dont-close t) to the bottom of my file for convenience, I load it in a terminal, then slime-connect
13:11:37
jmercouris
You don't need to know C to write Common Lisp libraries, not even ones that utilize CFFI
13:11:58
decent-username
jackdaniel: Because one needs to understand what's going on under the hood, to write good libraries.
13:12:04
jmercouris
CFFI is hard to learn since I couldn't find a good tutorial, but technically speaking it is straightforward
13:12:17
jackdaniel
decent-username: do you mean that you want to write clones of C libraries? or that you want to write bindings?
13:12:42
jackdaniel
because if you write bindings, then you are not writing Common Lisp library but rather a wrapper over C library (meaningful difference)
13:13:18
jmercouris
all of this said, now that you know my solution, how can I do this in Emacs to avoid having to spawn a terminal and load SBCL and perform some operations
13:13:22
jackdaniel
hm, then I don't think that peeking how C library works will give you much advantage
13:13:41
Nilby
jmercouris: Your paste worked for me, running it outside of emacs in the main thread. But when I tried it in another thread I got sbcl to SIGABRT, which leads me to believe that it tries to create it's own threads from C libraries.
13:14:05
jmercouris
Nilby: yes, it does try to make its own threads, it tries to make a GTK main thread
13:14:26
jackdaniel
hence "underhood workings" also will be very different -- unless you want to write C in Common Lisp
13:14:40
decent-username
jackdaniel: I for my part want to write a CL game engine as a learning project. But basically all tutorials for these kind of things are in C. I'm not sure if there's an official OpenGL API for CL.
13:15:42
jackdaniel
cl-opengl gives you bindings, but yes, shared objects which export the api exhibit C ABI
13:16:11
jmercouris
I think the real statement is this: a lot of the world runs on C or CFFI, in order to be effective you should know C
13:16:27
jmercouris
because you will want to leverage existing libraries to avoid having to write everything down to assembler
13:17:11
jackdaniel
this statement is not very compelling, and the assembler remark is plain inadequate, why would you want to write everything down to assembly? doesn't CL implementations compile things to assembly?
13:17:55
jmercouris
for example, I'm using CFFI for Next, because writing a web engine that meets modern web standards and performance would take me tens of thousands of man-hours
13:18:27
jmercouris
it is intellectually flawed, but this is a casual conversation, not an academic debate :-D
13:20:02
decent-username
Does someone of you have a roadmap for someone who sees that there aren't any good GTK libaries for CL, and who wants to write a good one.
13:21:31
jmercouris
Qt is not slow, the implementation of the renderer on your port may be slow, and on every port, but Qt itself, no not slow ;-)
13:21:38
jackdaniel
you need to back up this statement with benchmarks, because its memory footprint is very small lately, and I don't remember it being slow
13:23:33
decent-username
jackdaniel: The main reason I prefer GTK over QT, is that GTK feels more native to UNIX-like OSs. Themes are automatically inherited and other things like that.
13:24:21
jmercouris
This feels a little bit off-topic now, let's please not discuss the merits of Qt vs GTK
13:44:27
jmercouris
so I ended up making a simple file, then I open up eshell sbcl --load my-loading-file.lisp which loads cl-cffi-gtk on the correct thread, then I slime connect, etc
13:44:36
jmercouris
I'm sure I could make an elisp function to do this, maybe I will in a little bit
13:44:49
Nilby
But it seems to work consistently not under slime. I think there's probably a way to get slime to run it in the main thread.
13:45:01
decent-username
jmercouris: I've just downloaded Next. I had it bookmarked from a year ago or so. I've wanted to change my setup to GNU GuixSD + StumpWM. I might also change my default browser while I'm at it.
13:45:38
jmercouris
Nilby: quickloading on the main thread is not the answer though, and neither is modifying swank init to use fd-handler
13:49:33
Nilby
It doesn't create threads when loading this example, only after calling (start). Also since swank uses a socket, if I remember correctly gtk usually needs you to register sockets with it to work. But then it probably won't know how to hand off to slime.
13:51:34
jmercouris
sbcl --load file.lisp, then (trivial-main-thread::call-in-main-thread #'gtk-tutorial::start)
13:51:57
jmercouris
then try the same thing, by starting slime and just loading that file with C-c C-l
13:52:55
jmercouris
In the first example, I forgot to mention that you slime-connect to localhost:4006 before running the trivial-main-thread code
13:52:56
Nilby
Maybe one would want it to work like emacs works with gtk, by having it's own event loop and handing off some events to gtk.
13:53:38
jmercouris
yeah, that is how it is usually done with this library there is a (within-main-loop) macro that does that
13:53:54
jmercouris
however, I cannot use that, as it breaks rendering for some special widgets on macOS (as we discussed earlier)
15:00:42
Xach
it looks like cl-dbi recently dropped its use of cl-syntax (which is nice) but it does break dbd-oracle
15:01:04
Xach
cl-syntax is the thing that prompted people to use @export (defun foo ...) rather than putting exports in defpackage
15:08:42
beach
minion: memo for jmercouris: Yes, the code for first-class global environments is written in entirely portable Common Lisp. But, of course, compilers of existing Common Lisp implementations don't use them, so you need a Cleavir-based compiler for that.
15:09:51
minion
jmercouris, memo from beach: Yes, the code for first-class global environments is written in entirely portable Common Lisp. But, of course, compilers of existing Common Lisp implementations don't use them, so you need a Cleavir-based compiler for that.
15:10:50
jmercouris
is SICL just a technology demonstrator, or do you eventually plan to make it a complete implementation that one can download and use?
15:13:13
beach
I have been busy with ELS submissions, but otherwise, I am working on code generation.
15:13:36
jmercouris
what percentage of the way is the task complete would you estimate? (making SICL a complete implementation)
15:14:32
beach
I don't think there is much left in order to make it work, but then there is a lot of work left to make it fast.
15:16:11
beach
I am secretly hoping that, once I have an executable, I will get a bit more help with the tedious work.
15:27:52
jackdaniel
ebrasca: do you mean why the name is "sicl"? afair beach said that there is no particular reason and it is not an acronym of anything (except of the CL suffix of course)
15:29:46
jackdaniel
ebrasca: my answer would be "why not?". that said sicl is implemented from scratch in full Common Lisp - luxury other implementations did not have - they have grown from previous lisp incarnations or are bootstrapped from other languages
15:30:38
jackdaniel
and using full Common Lisp instead of i.e subset gives you cleaner code; moreover some hardware characteristics has changed and they are taken into account when it is designed
15:32:18
jackdaniel
afaik sicl project has its own assembly emitter, I don't remember its name. I'd suspect that it is up to the cleavir's lir implementer to use it or to use some custom "LAP"