freenode/#lisp - IRC Chatlog
Search
10:15:16
ym
I got what bothered me. I want lisp machine reimplemented for FPGA board and able to self-modification. In that way I could build "hardware"-optimized ring buffers.
10:20:19
FareTower
ym: with two FPGA chips, you could have a duo-processor where one updates the other at a time.
10:22:45
ym
Or many such machines could be implemented with 9p support and distribute computing power via network for example.
10:23:00
FareTower
ym: for extra fun, read my essay "who (p)owns your computer" http://fare.tunes.org/computing/reclaim_your_computer.html
10:45:19
Shinmera
For those with a raspberry pi, here's a preview build of Portacle: https://twitter.com/Shinmera/status/945243615021977600
11:46:08
shka
i actually starting to write my own implementation of double ended queue before i reminded myself that there is very decent implementation just lying around
12:29:24
loke
shka: If you need a red-black tree, watch out though. Out of the ones I tried (3 different ones?) none of them were correct.
12:29:49
loke
I ported one myself from a reference implementation, and for the longest time it too had a bug (typo on my part), but now I think it's stable.
12:31:08
TMA
red-black trees are notorious for being easy to get wrong, especially when deletion is involved
12:33:49
loke
TMA: True. I was runnin gbroken implementations for months without really noticing the issue, other than random errors at times that I attributed to a broken red-black implementation. Finally, I added code to record every single addition and removal to the tree and stored it in a log so that I could replay it to prove there was a problem.
12:34:58
loke
I then utterly failed to fix it, because I didn't understand the implementation. So, I deicded to port my own, it worked... Until it didn't. Rinse and repeat and this time I was abel to fix the bug, which was a simple transcription error.
12:35:22
loke
But now it's run for well over a year without a single problem, on a heavily modified tree, so I think it works.
12:35:59
loke
Here's my implementation by the way: https://github.com/lokedhs/containers/blob/master/src/rbtree.lisp
12:36:35
loke
If anyone wants to adapt it into their own library so it can make its way to QL, I'd be pleased.
12:37:39
makomo
when you redefine a function that was previously loaded using Quicklisp in SLIME, how does it know which package it came from (and which definition to update) if you're not in that particular package (i.e. the current package is CL-USER)?
12:38:23
loke
makomo: SBCL tracks where a function was defined, and SLIME (SWANK, actually) uses that information for code navigation.
12:39:01
makomo
loke: hm yeah, but how does it know i don't want to maybe make a new function with the same name but in a different package
12:39:17
TMA
My RB-tree was ok until deletion, after spending a whole day debugging that I have made an AVL tree instead in about an hour
12:44:00
loke
TMA: I'd like mine to become available on QL. It's currently part of my own container library, but I'm considering extracting it out into its own library.
12:55:47
loke
I don't think the world need my container library. The red-black tree is the only newish part of it anyway
12:56:45
loke
shka: If you look at the code from line 302 and below, there is the code that adapts it for my container library. That's the only code you'd need to rewrite:
13:45:07
dmiles
oh crud this " (defmacro incf (place &optional (delta-form 1)) `(setf ,place (+ ,place ,delta-form)))" is broken in "(incf (aref *vector* (incf *special*))) " ?
15:36:31
_death
for incf you can just use define-modify-macro, but in general you want get-setf-expansion
15:39:13
dmiles
(will use it for incf/decf but if it gets complicated they reather write it out all by hand)
15:42:12
dmiles
*nod* i sorta even lumped define-setf-expander into the underutilized category but hadnt get to straight defsetfs
15:44:05
pfdietz
As I recall, ansi-tests has tests that things like INCF don't evaluate things more than once, and also in the right order.
15:48:29
dmiles
looking at some REF POP etc they do start out as if somone macroexpand-1 on define-modify-macro then finish it out
17:27:57
asarch
1) Can you define a function inside the body of a function? 2) If yes, how? 3) Can you return a function a la JavaScript: function point() {... return () => {}};?
17:31:31
beach
Since I don't know JavaScript, I don't know whether this is an answer to question number 3.
17:43:00
beach
asarch: It is customary to provide some kind of feedback, indicating at least that you received the message, and even better to tell us whether you understood it.
18:18:14
Th30n
I've come to bring presents... erm I mean, ask questions with lisp related problems :)
18:19:59
Th30n
For anyone testing qt, qt-libs and qtools on Windows. Did smoke generation somehow break? It appears that calls for QString related stuff aren't wrapped. All calls to QT API which requires coercion from lisp string to qstring fail.
19:08:20
beach
peterppp: Why would you use an implementation-specific one, when you can use a portable one?
19:09:21
pjb
peterppp: in clisp, you compile it with the regex module, and the REGEXP pacakge is always available. No need for require.
19:15:26
peterppp
I didn't know that 'clisp' refers to the gnu lisp implementation as is the case apparently?
19:17:39
pjb
Then he got multi-millionnaire, so he started to write his own lisp named arc, and implemented ycombinator.com with it, and is in the way of becoming billionaire by helping startups.
19:21:38
_death
peterppp: https://www.cs.northwestern.edu/academics/courses/325/readings/graham/graham-notes.html
19:25:19
_death
peterppp: have fun.. ACL was my first Lisp book as well.. do all the exercises, preferably in emacs with slime
19:36:09
alecigne
Is there some kind of "C for Lisp programmers" book or ressource out there? Maybe knowing Common Lisp is enough to dive in C
19:37:16
Bike
i suppose it might help you get a clearer idea of C's scoping, which is badly explained by the average tutorial
19:41:16
alecigne
Bike: so in your opinion there is no good way to capitalize on my CL knowledge to learn it more easily, the "programming" knowledge by itself is enough
19:42:27
Bike
just understanding the basics of programming, you know, the machine does what you tell it too but in a really specific way, what syntax is, stuff like that, is most of what you need to learn a programming language, and passed that the returns diminish pretty fast, imo
19:42:27
beach
alecigne: The programming style is completely different, unless you do what I do if I have to program applications in C, namely do everything with pointers and stick the Boehm GC in your application.
19:42:55
_death
best to learn each language on its own terms.. after you do that, you can move to comparisons and critique
19:58:49
Shinmera
Th30n: Nothing has changed about it on Windows in recent weeks, so I wouldn't know about it breaking either.
20:06:16
Th30n
Shinmera: Basically the problem is, if I try to do to something like (q+:make-qstring "bla") it fails to compile, complains about the function missing. Same thing with (q+:qstring-from-utf-8 "blah"). On the other hand (q+:qfiledialog-get-open-file-name window "blah") crashes when trying to marshal the string to qstring. SBCL reports an error - exception code 0xE06D7363, which signifies that an exception is thrown in C++ code.
20:14:31
Shinmera
As for the error, that's outside my realm and a CommonQt issue rather than a Qtools one
20:15:32
Th30n
Shinmera: auto conversion used to work. Perhaps it may even be related to cffi, because the call does end up in the C function which returns a QString.
20:16:28
Th30n
Shinmera: Yeah, no problem, don't bother. It's Christmas, you deserve at least some break :)
20:17:04
Shinmera
But if you can open an issue ticket with a minimal snippet to reproduce on https://github.com/commonqt/commonqt/issues I can see what I can do myself (probably not much) or if I can bother Stas about it.
20:28:44
asarch
https://www.google.com.mx/search?q=santiago+matatlan&client=firefox-b&dcr=0&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjYr_mSgKbYAhXL54MKHZFJAPYQ_AUICygC&biw=1366&bih=599
20:31:20
antoszka
Well, I'd love a trip, but won't be able to affort one anytime soon. I love the cuisine too (as much as I know it). Really a place I want to visit. Let's take this off channel to #lispcafe.
21:42:32
pjb
stylewarning: wrong. You have to do something like: (let ((lisp-channel (find "#lisp" (channels *connection*) :key (function name)))) (mapc (lambda (user) (privmsg *connection* lisp-channel (format t "Merry Christmas ~A!" (name user)))) (users lisp-channel)))
21:43:17
pjb
with (ql:quicklisp :cl-irc) (use-package :cl-irc) and establishing a (defparameter *connection* (connect :nickname "xmasgreater" :server "irc.freenode.org"))
21:43:22
stylewarning
Do you have a GPL library for me to run your code with, with a package name that’s ~4,000 characters long
21:44:01
pjb
stylewarning: check https://gitlab.com/com-informatimago/com-informatimago/blob/master/small-cl-pgms/botihn/ or https://gitlab.com/com-informatimago/com-informatimago/tree/master/small-cl-pgms/botil
21:45:22
Shinmera
pjb: With Maiden it would be something like (loop with c = (find-channel "#lisp" (consumer "freenode" *core*)) for u in (users c) do (reply c "~a: Merry Christmas!" (username u)))
22:00:22
aeth
Use abstractions! It should be something like this: (do-users (user (users freenode "#lisp")) (message-user user "Merry Christmas!"))