libera/#commonlisp - IRC Chatlog

Search
6:46:33 splittist I don't see any need for a 2e of TCLCS (I don't have any problems with the style). Perhaps a companion volume in a few years: ITCLCSB - Implementing the Common Lisp Condition System in Blub
7:18:22 phoe splittist: I actually thought that a second edition of TCLCS could include such a chapter - e.g. a description of implementing a CS in Java (see cafe-latte), and maybe in a non-memory-managed language too if we want to be extra risky
7:18:35 phoe but just Java should be enough, too
7:21:41 phoe and there is still stuff that needs to get integrated into the main body from the appendices
7:22:06 phoe and with that, we need to fix the fact of lack of hyperlinks/footnotes.
7:27:12 phoe I don't think that a ITCLCSB would be large enough to warrant its own existence, unless we actually do the work and implement those in multiple distinct languages, noting the quirks everywhere
7:33:53 splittist phoe: I was thinking of your next N papers (as co-author as necessary) as Implementing TCLCS in X, and then the book as a compendium (:
7:34:56 beach Oh, like Appel's compiler books.
7:35:07 phoe hm
7:35:10 phoe maybe
7:43:50 splittist or just have others write the papers and you can be the editor of the book - "Phoe on Condition Systems" ...
7:45:50 splittist ACTION imagines the "International Condition Systems Conference" co-located with ELS
7:48:15 no-defun-allowed "Here we have phoe representing the Common Lisp condition system, and here is psoe representing the Dylan condition system."
7:49:30 p_l no-defun-allowed: and ploe on "adventures in mandatory stack unwinding land - systemwide exception and condition system in NT"
7:49:53 phoe gosh that's already a lot of different people
7:51:30 no-defun-allowed ACTION was expecting phoe's alter egoes to be other Greek letters
7:52:07 splittist Isn't Success (TM) in Academia (TM) mainly about gaming the system? (As opposed to excellence in being an academic, which doesn't seem to be particularly valued.)
7:52:12 p_l ... ok, wtf, windows has continuable exceptions
7:52:50 p_l splittist: non-academic management definitely pushes that mode
7:53:10 p_l > The machine state of the thread in which the exception occurred is saved in a CONTEXT structure. This information (called the context record) enables the system to continue execution at the point of the exception if the exception is successfully handled.
7:53:35 p_l so... I can do CL-like conditions in C, so long as it's WinNT and preferably compiled with MSVC
7:54:09 splittist which is a awful lot of software, to be fair
7:54:55 no-defun-allowed We also have xoe with the intermediate Ralph condition system in the middle.
7:54:58 p_l also, iirc, MSVC++ automatically compiles C++ exceptions to SEH
7:54:59 Nilby Some of the NT kernel is actually no so bad design, it's just the rest that sucks.
7:55:08 Krystof There Are Many Academias
7:55:11 p_l Nilby: design wise it's IMO very good
7:55:28 p_l Nilby: the problem is more in management of development
7:55:53 p_l so you get cases like ReFS "forking" NTFS driver because of fear of modifying working code
7:56:22 moon-child nt has essential issues
7:56:31 moon-child like i/o and process init being slow
7:56:54 p_l despite how NTFS logical structure makes it easy to extend (just like ZFS) while most FFS derivatives are hard
7:57:26 phoe this is what we get for mentioning WinNT at all
7:57:37 phoe we have somehow strayed from the true path of #lisp on-topic onto the paths of windows kernel quirks
7:57:40 p_l moon-child: I/O can be plenty fast, especially when you go native, process init is due to different ideas on handling things in NT/VMS vs Linux, which don't really matter for lisp programs
7:59:24 moon-child 'go native'?
7:59:46 moon-child my understanding is that nt's i/o is modular in a way that prevents effective caching
7:59:48 splittist lukego: for playing with CLIME, one would work with your forks of McCLIM and SLIME?
8:01:24 p_l moon-child: nothing prevents caching, native referred to async I/O instead of sync wrappers, and modularity is problem mainly in the form of annoying other crap injecting itself between cache and your program
8:01:53 p_l btw, anyone working on somewhat more universal async io for CL (preferably portable)?
8:02:11 p_l or is that an open research question? :)
8:05:51 no-defun-allowed I want to implement green threads in SICL. It's not portable across implementation-space, but you can make all your synchronous code "asynchronous" enough.
8:08:12 no-defun-allowed For now, what about ABCL on the Java 17/Loom preview?
8:12:25 lukego splittist: Right. If you check them out and e.g. link the McCLIM into your ~/quicklisp/local-projects/ and put (load "~/git/slime/slime.el") into your .emacs then you should be in business
8:13:34 lukego (the idea is very much to upstream all this ASAP but I haven't really engaged with that problem yet)
8:15:42 splittist ACTION brings out his development laptop...
8:18:36 lukego ACTION pushes a few updates on his disk.. done
8:18:48 lukego thank you o brave first user :)
8:19:24 lukego I've finally (?) fixed some weirdness in Emacs ignoring properties that I put onto images like mouse regions for presentations, the workaround is bizarre but it seems to work now.
8:20:17 lukego I've also implemented like 80% of ACCEPT now. On the Lisp side you can call the CLIM ACCEPT function and it will bounce that over to Emacs and back to get you an object. the only catch is that Emacs will currently choose that object arbitrarily :). I'm looking at how to do Emacs mouse events now...
8:20:28 splittist ACTION hopes lukego's clime github name won't be flagged as pron
8:21:21 lukego Maybe 80% is a stretch, depends how Emacs will feel about me updating the list of mousable regions on images. maybe I could look at that right now
8:21:26 lukego yeah..
8:24:53 lukego that handle is meant in the spirit of carefree innocent hackery, as depicted by e.g. https://www.shutterstock.com/image-vector/two-funny-cheery-exuberant-characters-dressed-114750592, but is probably a poor choice :)
8:25:53 splittist lukego: what's the hello world to try it out from the repl?
8:25:56 lukego (back soon, dog beckons)
8:25:59 lukego sec
8:26:32 lukego (with-output-to-emacs (s) (draw-circle* s 0 0 50 :ink +red+))
8:27:26 lukego ACTION is back in ca 30 mins
8:27:45 lukego (in-package :clim-emacs)
8:28:49 splittist have a call. Still compiling McClim...
8:30:29 waleee-cl does anyone know how to explicitly select the gtk3-namespace with https://github.com/andy128k/cl-gobject-introspection ?
8:32:11 waleee-cl (gir:ffi "Gtk") has the sad property of returning the namespace for gtk4 on my gtk4-recently-added linux distro
8:38:19 waleee-cl ... and (gir:ffi "Gtk" "3.0") fails for reasons. While (gir:ffi "Gtk" "2.0") works peachy
8:43:01 waleee-cl Ah, my distro didn't link gobject-3.0 explicitly
9:27:20 splittist lukego: I'm getting "CLIME-ACCEPT-IN-EMACS" not found in SWANK package. (And swank-clime.lisp is essentially empty.) I'm sure it's user error...
9:33:24 lukego Maybe you pulled the clime branch before I pushed that? it went in here: https://github.com/nuddyco/slime/commit/f930f6473b1f4af57d561d62d6cbefd4492015a9. But ahem I see a typo in that commit so let me check and fix that now.
9:34:20 lukego try pulling slime again now?
9:35:18 lukego (yeah swank-clime is basically empty, I just cargo-culted swank-media.lisp)
9:38:08 splittist lukego: same thing. I feel I should be loading the clime contrib somehow (but I'm not)
9:38:21 lukego oh! yes I completely forgot that part. sec.
9:40:24 lukego (push 'slime-clime slime-contribs) (slime-setup)
9:41:11 lukego Sorry this is horrible for of me to have not tried it on my other computer or at least in a fresh emacs :(
9:41:29 lukego ACTION does so now
9:43:43 lukego splittist: okay I tried this in a fresh Emacs now and it worked - got the red circle in the repl - but also an error message that I'll take a look at
9:44:47 lukego (there's something funny happening where the shape is drawn after the new REPL prompt rather than before it. must be a recent goof. fixing.)
9:57:52 lukego I pushed a minor fix for that now to the slime branch, it's optional
10:07:16 splittist lukego: On the red circle example I get "error in process filter: Text is read-only", but also a black circle (and a giant cursor afterwards). So I'd call that a qualified success (:
10:07:26 lukego hah :)
10:07:51 lukego great perseverance! thanks and congrats! :) the fix I pushed is for that "error in process filter" glitch
10:08:03 lukego and to make the circle appear in the right place (and not make the cursor so big)
10:08:16 lukego can pull slime and `M-x eval-buffer' in slime-clime.el if you want that
10:08:49 lukego black instead of red... haven't seen that one yet :)
10:10:25 lukego which is supposed to look like https://twitter.com/lukego/status/1389180878757273602/photo/1 including the tooltips over the presentations
10:14:22 splittist lukego: much nicer. But still black (:
10:15:35 lukego if you hop into *slime-events* and search backwards from the end for :write-clime you can see the SVG code that came over. (Or indeed if you place the Emacs cursor on the image and eval '(text-properties-at (point))'.) but as you say this is already a qualified success :)
10:16:02 lukego I'm always using absolute RGBA values so there shouldn't be any funny business about color names missing from one side etc.
10:18:06 splittist lukego: the svg looks right (the 100% is first for +red+, second for +green+ etc.). I'll look at the state of svg support for Windows emacs.
10:18:29 lukego oh you're on windows? then I'd call it a major success :)
10:19:19 lukego in the sense that this is covering quite a lot of untested ground and one might have expected much more to have gone wrong :)
10:19:30 lukego thanks for taking this for a spin!
10:21:31 splittist lukego: I want it to work - it would make development of all sorts of things (including McClim) really interesting.
10:21:51 lukego *nod* glad it's not just me thinking that
10:22:49 lukego btw if you want to experiment you can try pasting that SVG into a file and opening that with `C-x C-f` find-file. Emacs should default to rendering it as an SVG and then you can toggle to editing mode with `C-c C-c` to tweak and then again to see the result.
10:23:55 lukego I've been getting all kinds of surprising results from my calls to create-image in elisp that don't make much sense so spending a lot of time looking for examples that work and trying to compare what I have to those.
10:40:07 p_l no-defun-allowed: green threads are a bit problematic if the system thread executing them is stopped on an external lock
10:42:01 splittist lukego: you need rgba, not rgb
10:42:14 splittist (in svg-color)
10:43:02 lukego oh! that makes sense. wanna send a PR? :)
10:54:13 fox_ ** NICK silasfox
11:02:53 splittist ACTION successfully sends a PR to himself...
11:10:16 no-defun-allowed p_l: Let's hope you don't have external locks :)
11:11:10 no-defun-allowed You could have a relatively not-useless all-Common Lisp networked program, I believe. The only tricky part would be putting your faith into CL-TLS into CL+SSL/OpenSSL.
11:12:05 aun can someone give a short intro to usocket?
11:12:17 aun I m trying to do thigns with it, but cannot do even simple stuff
11:13:18 jackdaniel aun: fwiw this has "How do I..." section https://common-lisp.net/project/usocket/api-docs.shtml
11:14:53 aun this is has simple parts that I already figured out and too advanced parts that I m not ready for unfortunately)
11:15:28 aun I guess the important question is -- whenever it starts listening by default it cannot do anything else (including prints) cuz its all single threaded?
11:15:48 jackdaniel speaking of encryption, I've always wondered how much of the complexity is due to superficial requirements and how much is required to cover all bases
11:17:15 jackdaniel aun: you could provide some minimal example that illustrates what you are doing
11:17:30 jackdaniel when you wait for input, you may specify the timeout (i.e 0 for non-blocking operation)
11:17:55 MichaelRaskin jackdaniel: there is some inherent complexity of needing to move forward all the way becuase of new kinds of attacks considered. Also a lot of coordination complexity because some systems won't allocate resources to use keys that are not on the edge of being too weak. And it is so much you need a kinf of sliding-window upgrade. And then it's horribly complex.
11:18:59 MichaelRaskin aun: accept on a socket without timeout or explicit threading is expected to be blocking.
11:19:00 jackdaniel MichaelRaskin: sure, I'm not saying that encryption is easy, I'm wondering how much complexity comes from quite uncommon requirements
11:19:33 jackdaniel like this horrible push to new http protocols to gain 0,01% performance bump (which doesn't matter for folks who are not running server farms like google :)
11:19:50 jackdaniel but I've ended starting an offtopic, my apologies
11:21:00 no-defun-allowed There's also something about dropping connection latency by sidestepping TCP handshakes, but that's silly and indeed off-topic.
11:21:28 aun jackdaniel MichaelRaskin okay, does IRC have code highlight or should i do pastebin or whatever
11:21:34 aun oh no wait I know a better one
11:21:47 jackdaniel aun: try plaster.tymoon.eu
11:22:40 aun theres this fancy thing https://codeshare.io/5DLXgW
11:23:12 waleee-cl aun: usually it's considered bad etiquett to paste a blob directly in irc
11:23:38 aun whats a blob?
11:23:53 no-defun-allowed Does IRC require newlines at the end of each message? I don't know too much about it.
11:23:54 waleee-cl large amount of lines in sequence, in this case
11:24:17 aun you mean a codeblock?
11:24:36 waleee-cl or anyother large amount of text
11:24:58 jackdaniel aun: instead of calling receive right away, check first whether there is input available
11:25:05 no-defun-allowed i.e. write (write-line "PASS <password>" stream) or (format stream "PASS <password>~%")
11:25:17 jackdaniel (listen (usocket:socket-stream your-socket)) ; will return T if there is available input
11:25:40 jackdaniel it is in that "How do I ..." FAW I've mentioned earlier under "... check whether reading from a socket stream will block? "
11:25:45 jackdaniel s/FAW/FAQ/
11:26:44 aun jackdaniel it returns NIL so I assume there's not? Should there be always?
11:27:15 jackdaniel if it returns NIL, then there is no input indeed
11:27:19 jackdaniel so calling receive wil lblock
11:28:47 jackdaniel (loop repeat 5 (if (listen …) (return (receive)) (progn (print "Retrying") (sleep .5)))
11:29:06 jackdaniel is one way to print something while waiting
11:29:43 jackdaniel also, you want finish-output here, not force-output
11:30:03 jackdaniel the latter will initiate flushing buffers and carry on, while the former will wait until all data is send
11:30:47 jackdaniel oh, you have there finish-output, I'm not sure where my eyes were looking :c
11:31:34 aun nono, I fixed it right there
11:31:44 aun in your loop what is `recieve`
11:32:51 jackdaniel it is a pseudocode, receive is your call to socket-receive
11:33:03 jackdaniel and listen is the previous call I've mentioned
11:35:40 aun I changed it https://codeshare.io/5DLXgW -- and I think if i dont send anything it doesn't send me anything either. Also, I m getting a no-applicable-method error now on my send
11:35:54 aun which is weird since I didn't change it and it didn't happen before
11:37:16 jackdaniel and where is your call to finish-uotput?
11:37:22 jackdaniel s/uotput/output/
11:38:44 aun Fair! But the no-applicable method problem still stays. I posted it there as well
11:39:43 jackdaniel I'm not sure if previously I saw the call to a macro with-client-socket
11:41:17 jackdaniel also previously you've used format, now you try to use socket-send
11:41:40 aun Yeah, I m a but confused about what is the correct way tbh)
11:42:41 jackdaniel socket-send is meant for datagram sockets (same socket-receive)
11:43:02 jackdaniel with a "normal" socket you probably want format and read-line
11:43:55 jackdaniel and stream-usocket is created when the object is a stream (tcp) socket
11:44:57 jackdaniel I'm not sure where with-client-socket is documented
11:45:24 jackdaniel ah, I have it
11:45:44 jackdaniel instead of read-line you may of course go by char
11:45:47 jackdaniel with read-char
11:46:31 aun okay, with char it just tries and seems nothing happens
11:46:44 aun but at least no errors, as before)
11:47:04 aun Look....what are the chances you know F#?)
11:47:28 jackdaniel my former co-worker was in ave of it, that's all I know about it :)
11:48:10 no-defun-allowed F# G# A# B C# D# F F#
11:48:46 no-defun-allowed Nope, I'm supposed to write E# instead of F natural.
11:49:22 aun see,like, you know about usocket and a friend who "explains" web to me knows F# and has a small snippet of F# code that I m trying to roughly translate)
11:53:40 nij Hello! Anyone knows how MOP allow us to "hack" defclass, in the sense that you can put more things in it? For example, in the class in the link, there's something called :invariants - https://bpa.st/USJQ
11:55:08 jdz nij: The hacking is done by providing a metaclass.
11:55:30 jdz minion: tell nij about amop
11:55:30 minion nij: look at amop: AMOP: The Art of the Metaobject Protocol, an essential book for understanding the implementation of CLOS and advanced OO. See <http://metamodular.com/CLOS-MOP>
11:57:07 nij When, defclass "sees" a nonstandard metaclass, it starts following different instructions?
11:58:43 no-defun-allowed DEFCLASS expands to MOP:ENSURE-CLASS, which will then call MAKE-INSTANCE on the metaclass with some parameters based on the superclass list and slot list and then the rest of the arguments.
11:59:03 jdz CLOS follows a protocol (described in AMOP), so in a sense, yes, by providing a custom metaclass (not STANDARD-CLASS), CLOS uses different implementations of generic functions used in CLOS machinery.
11:59:43 nij Very cool! Sure, I put amop in my reading list :) Thanks
12:00:58 aun jackdaniel anyway, this is how it looks like, https://codeshare.io/5DLXgW   if you have time/interest to look at it, I ll appreciate it. Its fine anyway, maybe someone else will help, so dont worry too much)
12:01:16 no-defun-allowed Look at the shape that <https://github.com/robert-strandh/SICL/blob/master/Code/CLOS/defclass-support.lisp#L279> generates from a DEFCLASS form.
12:01:35 nij jdz: By the was, do you recommend me read CLOS (Keane's?) and then amop? It sounds like a larger topic.
12:02:10 no-defun-allowed aun: Note that the F♯ code uses WriteLine but you haven't generated any newlines.
12:02:39 jdz I did not get much value out of Keene's book, but that was a very long time ago, and maybe I just was reading it wrong, or had preconceptions. AMOP, on the other hand, was an eye opening experience for me.
12:02:46 aun I have...print.Should I also use write-line?
12:03:08 no-defun-allowed Just write (write-line "PASS <password>" stream) or (format stream "PASS <password>~%")
12:03:30 jimka2001 The first lisp book I read was Common Lisp by Paul Graham, the 2nd was Keene
12:03:41 jimka2001 the third was AMOP
12:03:52 nij jdz: How about this.. How much CLOS do I need to know before jumping to AMOP? I can write simple programs, know gen.fun and methods, know some basics combination of methods.
12:04:27 jackdaniel amop basically explains clos, so you don't need to know it by heart to read the book
12:04:53 nij jackdaniel: That's uplifting to know!!
12:04:58 jackdaniel jimka2001: clos-wise it is strictly monotonic :-)
12:05:08 nij no-defun-allowed: sorry.. I cannot understand what that expander is doing.
12:05:16 jimka2001 Keene was my first organized introduction to OO.. Prior to that I was really confused by using an object system in a different lisp, which was heavily influenced by CLOS but was a partial implementation which supported single inheritance and single dispatch.
12:05:26 beach nij: Expanding the macro.
12:06:03 jackdaniel aun: no-defun-allowed is right
12:06:18 jackdaniel I've tried your snippet with dummy data and adding newlines makes the server answer with something intelligible
12:06:24 aun YES HE IS, thanks a lot
12:06:25 jackdaniel like ":tmi.twitch.tv NOTICE * :Improperly formatted auth
12:06:30 nij jimka2001: Thanks for sharing. I will also keep Keene's book in mind.
12:06:38 nij beach: @_@
12:06:46 aun that is such a dumb mistake especially considering that was my first thought when I saw that code
12:06:52 no-defun-allowed *she
12:06:52 no-defun-allowed nij: What I am saying is to look at the general shape of the call to ENSURE-CLASS generated. That is how DEFCLASS ends up making an instance of a metaclass
12:08:40 nij I see... a bit. Thanks!
12:08:54 no-defun-allowed Some form like (defclass foo (bar baz) ((foo)) (:metaclass metaclass) (:random-initarg this)) ends up calling something like (make-instance 'metaclass :name 'foo :direct-superclasses (list (find-class 'bar) (find-class 'baz)) :direct-slots '((foo)) :random-initarg '(this)) from memory.
12:09:02 no-defun-allowed Though I think I missed a step with how slots are handled. Oh well.
12:10:16 pjb There's cl-irc implementing the IRC protocol…
12:11:30 nij * (join connection "#lisp") * (read-message-loop connection) .. wow
12:11:49 Duuqnd cl-irc is pretty good. I've never had any problems with it.
12:12:15 Duuqnd I use it in the bot that was used as a Twitch-IRC bridge during ELS
12:12:40 nij Dunno how it sends message though. Not in the sample at least.
12:12:40 aun okay to make it parallel now...
12:17:07 Duuqnd nij: If I remember correctly I think the method IRC:PRIVMSG sends messages to channels
12:18:32 pjb (botihn botil botvot)
12:24:00 nij I can't figure out why a stream is closed when I create a thread.. could someone helpout? https://bpa.st/L36A
12:24:45 nij Do I have to add with-open-file again in the lambda in the thead I create?
12:26:37 jdz nij: WITH-OPEN-FILE will close the file.
12:27:11 nij jdz I put the bt:make-thread in the form of the first (and the only one, currently) with-open-file form.. so I don't see why it's closed.
12:27:51 jdz You create a thread, and by the time thread runs the DISPATCH method is done, and the file is closed.
12:28:47 jdz The solution is simple: if you want to have the file open in your thread then don't close the file.
12:29:25 nij I didn't close the file @_@.. manually. So you mean I shouldn't use WITH-OPEN-FILE?
12:29:51 jdz I mean you should understand why the file is closed, first.
12:30:41 nij Is it because the thread isn't fired immediately?
12:31:06 no-defun-allowed You can't depend on when the thread will start relative to when the file is closed.
12:31:10 nij And within that 0.1~0.2 sec delay, DISPATCH has ended; in particular, the form WITH-OPEN-FILE has ended.
12:31:21 jdz That's the problem with threads: you don't control when they run. So you must ensure that your code works in all kinds of situations.
12:31:43 nij I see. So I have better put another with-open-file form in that thread.
12:31:48 no-defun-allowed In my opinion you should do the writing in one WITH-OPEN-FILE form, then have the thread re-open the same pathname - yes.
12:33:16 nij That would repeat myself.. hmm lemme think is there other way then macro.
12:33:16 nij no-defun-allowed: Ah! I didn't know you can reopen a file. Lemme see how to do it. Thank you!
12:33:16 no-defun-allowed You could write a CALL-WITH-LOG-FILE function, then if you so please implement WITH-LOG-FILE from that.
12:33:16 jdz nij: You're already re-opening the file. You have :if-exists parameter.
12:34:27 jdz Also, yes, you should be able to use the closed stream with WITH-OPEN-FILE.
12:34:39 ldbeth good evening
12:34:45 beach Hello ldbeth.
12:34:53 no-defun-allowed (For your mis-information, I find thread creation and joining to take about 55µs on my laptop.)
12:35:12 nij :-O
12:36:25 no-defun-allowed But I would ensure the log is closed before the thread is started, and then have the thread open a new stream. Or even have the thread do all of the work!
12:37:01 flip214 hunchentoot even opens/closes the file each time.... so that it can be renamed (eg. via logrotate)
12:39:53 nij I see. Thank you no-defun-allowed jdz :)
13:15:41 pjb nij: the closed stream still carry some information you may want to use, notably the pathname (pathname closed-stream).
13:16:19 pjb nij: you can just use OPEN in dispatch and close the stream in the thread (but use an unwind-protect to ensure you will close it!)
13:17:04 pjb nij: however, some impementations have protections against sharing streams in threads. notably ccl. You may want to read the implementation documentation about opeon and see if there's an option to deal with those cases (cf :sharing option in ccl OPEN).
13:18:36 pjb nij: therefore it may be better, easier and more portable to open and close the stream in the thread that uses it.
13:22:48 nij I see :-) Thank you!
13:43:38 notzmv ** NICK Guest39486
13:47:13 notzmv- ** NICK notzmv
14:22:47 jcowan beach: You asked about how C++ compilers do multiple inheritance. The answer is in Stroustrup's book, but more accessibly at https://shaharmike.com/cpp/vtable-part2/ (which is about clang, but gcc uses the same strategy)
14:31:11 beach That must have been some time ago, no?
14:31:33 beach But I seem to recall having read about a two-level vtable at some point.
14:32:41 beach What I do remember asking is whether the C++ standard requires a particular implementation. If not, they should replace their vtables and use my generic-dispatch technique instead. :)
14:36:44 pfdietz I really liked the code snippet idea for SICL presented at ELS.   This should make  SLOT-VALUE as fast as struct field access in common cases.
14:43:42 beach pfdietz: Thanks! I do think it has great potential.
15:13:57 jmercouris hello everyone, Nyxt 2, pre-release 7 is now available: https://nyxt.atlas.engineer/article/release-2-pre-release-7.org
15:14:11 jmercouris I would appreciate any feedback about bugs since this is the final release we'll do before 2.0.0
16:01:27 frgo Hello all. I have that question again ... Yes, I know out there are thousands of Lisp interpreters written in C. But ... I am looking for recommendations from you people. I can use C or C++ - on ARM (this is going to be deployed on a XILINX ZYNG FPGA). So - anyone recommend a specific one? Big thanks!
16:02:37 jcowan you might want to use a smaller Lisp or a subset of Common Lisp.
16:03:29 jmercouris Perhaps uLisp
16:06:54 frgo jcowan: Yep. True.
16:07:13 frgo jmercouris: Thx for the pointer.
16:07:30 jcowan uLisp looks very nice
16:08:11 frgo Indeed!
16:13:12 jcowan There are some choices I would have made differently, like using defparameter rather than defvar, though in the environment they are the same thing.
16:13:33 jcowan It is also a Lisp-1 (FEEL THE BURN), although #' is ignored.
16:14:48 frgo jcowan: Yeah - that actually is acceptable for my pruposes.
16:21:13 scymtym does anybody know whether the sources of the X3J13 cleanup issues which are referenced in dpANS and included in CLHS are available anywhere and if so under which terms? the "X3J13 document archives" link on http://www.nhplace.com/kent/CL/ looks promising but seems dead
16:23:43 edgar-rft frgo: Tom Almy's XLISP-PLUS interpreter (original author is David Betz) is a Lisp-2 written in C -> https://almy.us/xlisp.html
16:29:07 theothornhill scymtym: I've been looking around as well, but couldn't find it either. Are you working on the dpANS now?
16:30:09 scymtym theothornhill: yes. did you already ask kmp about the issues?
16:31:09 theothornhill No, not yet. We've only been chatting about what to do with the dpANS itself. Still struggling a little with how to parse the thing "easily". Did you work on that, and if so, any progress?
16:31:32 phoe AFAIK the issues were collected by kmp himself and were posted into CLHS
16:31:36 phoe but they were not a part of X3J13
16:31:40 phoe so if anyone has it, then he has it
16:31:58 theothornhill I'll ask him then. Need to follow up his last mail anyways.
16:32:32 nij How to hack the reader or by handling error for #'read-from-string to return (1 (:unreadable "#<:abc>") (2 (:unreadable "#<:def>"))) while reading "(1 #<:abc> (2 #<:def>))" for example?
16:33:04 Bike you could change the reader macro on #< i guess
16:33:07 nij Namely, I want to replace each unreadable block by a plist (:unreadable STR-OF-APPEARANCE").
16:33:08 phoe !!
16:33:16 phoe theothornhill: scymtym: is this what we are looking for?
16:33:33 theothornhill phoe: scymtym at least I've found a million and two ways to parse the spec into unusable html...
16:33:36 Bike nij: that said, in general there is no way tell where to continue after a reader error
16:34:23 nij Oh.. I should really hack the reader macro < then :(
16:34:33 theothornhill phoe: That looks really interesting. I'll note down that link
16:34:40 scymtym phoe: possibly. i don't know about the legality of just taking it from there, though
16:35:02 phoe afaik they're in the same copyright state as dpans3, which is public domain
16:39:07 theothornhill phoe: Thats what I understand as well. And if not, a suit seems very unlikely, given that most lisp vendors probably would want this to live on
16:40:43 scymtym phoe: looks very good. briefly comparing with CLHS, i didn't spot any differences so far
16:40:49 phoe perfect
16:41:01 frgo edgar-rft: Thx for that pointer!
16:44:02 pjb frgo: depending on the capacity of your target, you may use ecl (which uses gcc to compile to binary). An alternative for smaller targets could be clicc, which is a CL translator to C, so you get C sources that you can compile on the target. A commercial product is MoCL (which targets Android and iOS, but C code is C code, you could use with other targets, if you provide the run-time library).
16:44:49 pjb clicc could do with some love.
16:45:54 frgo pjb: Thx! So many things to explore ...
16:46:02 pjb frgo: another alternative, is to do something similar to GOAL: use Common Lisp to generate the program for your target. Basically, you define your DSL, and write a translator or a compiler for your target.
16:47:13 pjb frgo: notably, writing a LAP assembler in lisp (ie. an assembler that takes sexps as input), lets you use then the lisp macro system to define a higher level language (you get the macro assembler for free from the assembler).
16:47:43 pjb this can be a good solution if you need to go low-level, but you want to retain some abstraction.
16:49:50 frgo pjb: Currently, we are exploring what we need - hence the requirement to have a REPL into a predefined set of primitives (those are generated by the platform definition file generated by XILINX Vivado when the bitstream is exported).
16:53:00 pjb frgo: it's mostly a matter of memory. For a usable CL system, you would need at least 512 MB.
16:53:37 pjb But you can use a CL as a development environment to generate code for very small microcontrollers.
16:54:06 pjb You can implement in CL emulators, debuggers, generators, program provers, etc.
16:54:07 frgo Yep. We have 1 GB of flash and 4 GB of DDR3 RAM available on the board.
16:54:29 pjb Then you should be able to run a CL.
16:56:28 pjb ecl needs a unix system below to fork gcc, but it can also work without gcc, it has a byte compiler like clisp. You could use ecl/gcc to cross compile binaries, and use ecl without gcc on the board for the REPL and "scripting". clisp could be an alternative. But in anycase, you'd need to port the implementation to the target.
16:57:17 edgar-rft frgo: If I remember right then gilberth had a stripped-down XLISP interpreter suitable for running on microcontrollers, I don't see him here in the #lisp user list, but he's in #lispcafe
16:57:24 frgo uLisp seems to be something I want to try. I need to do some more reading... ;-)
16:57:39 pjb frgo: Marc Battyani at fractal concept uses CL to program FGPAs: http://www.fractalconcept.com/asp/JhHu/sdataQ0rXCq7mNwE1DM==/sdataQuEY-NQ=
16:58:51 frgo Ah - Marc yes. I already forgot that - Thx!
17:27:37 nij How do I ":use" an un-exported symbol from #:cl in a package? (defpackage nij.service (:use :cl) (:import-from :cl :print-backtrace)) ;; <= this doesn't work