freenode/lisp - IRC Chatlog
Search
17:00:57
beach
It doesn't seem worthwhile to undo insertions, I think. And, on the other hand, it would be good to be able to insert deleted code anywhere.
17:02:38
splittist
beach: but if I'm replacing some text, the insertion and deletion are inextricably linked. Or am I thinking at the wrong level.
17:03:37
beach
You may very well be right. Like I said, I haven't thought it through completely. It's a complex issue. I know I don't want something like what GNU Emacs does.
17:03:42
beach
I am currently trying to improve the CLX backend of McCLIM. In order to do that, I consult the CLX documentation. As it turns out, there are lots of undocumented (but exported) symbols. In fact there is even a section in the manual named "Undocumented".
17:03:43
beach
It would be good if people who know something about X11 and/or CLX could help improve the CLX documentation by (say) adding documentation for a symbol from time to time. I would be particularly interested in a more complete section on the Render extension.
17:05:00
beach
I really hate it when, in order to use some Common Lisp software, I need to consult some documentation written for a different language, or in this case the X11 protocol specification.
17:06:24
beach
splittist: I am thinking like this: If I deleted some text that I shouldn't have, then I insert some text (that I want to keep), it seems backward that undo would first delete the inserted text that I want to keep before I get the deleted text back.
17:08:55
rpg
beach: speaking of clx, seems like there's a backlog of fixes that need applying to sharplispers clx....
17:08:58
beach
splittist: And if I inserted some text that I do NOT want to keep, I can just delete it. It seems backward to rely on undo to delete the inserted text.
17:09:23
splittist
beach: understood. But if I've search-and-replaced all my 'cluffer:' to be 'clutter:' and decide that was silly, I would like to atomically undo that.
17:09:46
rpg
beach: I know I had to make some changes (in a pull request) to make CLX able to open a display on Mac.
17:11:07
splittist
beach: perhaps some kind of 'markup mode' display (strikeouts showing deleted text, underlines showing inserted text) and a way to accept or reject individual edits. Not sure how that works with an extended history of changes...
17:13:21
beach
rpg: This morning (UTC+1), jackdaniel mentioned that Xach has been committing not too long ago.
17:14:19
beach
rpg: I submitted a pull request for my improvements to the manual, and I hope to have energy to continue with more improvements.
17:25:43
Xach_
The only membership requirement is the ability to feel creeping guilt as you assume the others will attend to bug reports and patches that slowly get older and older
17:25:52
beach
Xach: I need to go fix dinner shortly, but I'll act upon that soon, I guess tomorrow morning (UTC+1).
17:27:23
moore33
beach: Btw, I've been using glop, which has its own ffi to xlib. It's not quite complete enough to support McClim, IIRC.
17:28:03
moore33
Actually, that comment refers to input and event processing. It probably has very little for X drawing.
17:29:02
beach
moore33: I am trying my best to move away from FFI as much as possible, so I am not jumping with enthusiasm to convert.
17:29:22
beach
moore33: You know things about X11 and CLX, right? How about you help out with a paragraph per week or so?
17:30:45
moore33
Years ago I figured out how to use direct rendering with OpenGL and CLX together, but it is very unpleasant.
17:32:07
beach
Is that where you created resources both from CLX and from Xlib and they were unaware of each other?
17:33:12
jasom
I made an xrender based compositor in clx as an excercise. It was also not particularly pleasant
17:34:08
beach
jasom: I can't for my life understand the Render protocol documentation. I would love to have an understandable section for it in the CLX manual.
17:34:11
moore33
beach: I think I had to create two connections to the X server: one via CLX and one via the X C library. Then, using the XID of the window, I was able to receive events for it in CLX.
17:34:47
moore33
beach: But I've seen evidence from forum posts that this doesn't necessarily work anymore.
17:34:53
jasom
beach: yeah, I had to find a program that used xrender and then use that as a rosetta stone for the docs
17:39:25
beach
Anyway, I am already running late for fixing dinner for my (admittedly small) family. I should go. Talk later.
17:42:28
jasom
beach is gone, but for those who haven't been following it, Wayland basically completely eliminates X; they noticed that KMS was handling the video, compositing WMs were handling the drawing, evdev was handling the input, and xft/cairo were handling fonts. If X11 isn't doing video, input, fonts, or drawing windows, then what is it used for?
18:11:24
luis
"Wayland is a protocol for a compositor to talk to its clients as well as a C library implementation of that protocol."
18:11:32
mordocai
Anyone here have any experience trying to use https://github.com/AlexCharlton/site-generator? I'm thinking about switching to it from a clojure site generator but don't want to waste my time if it just doesn't work or something.
18:53:01
warweasle
What is the proper way to conditionally remove code? Is it defconstant and #.#(cl:if (cl:boundp '*constant*) ...) ?
19:02:50
warweasle
isoraqathedh: Yes, but I'm adding package dependant information to a global variable. It seems...wrong.
19:03:01
isoraqathedh
My main concern is that it seems like *features* is mainly used for smoothing over implementation things.
19:05:20
isoraqathedh
What I would do is to simply just use a config package with a variable that holds the whether-or-not-you're-in-debug-mode, and then wrap anything you want to run only in debug mode with something like (eval-when-debug …).
19:56:20
warweasle
jasom: Yes, but you can remove packages. Adding items to *features* will leave something laying around.
20:15:21
mood
PuercoPop: Thanks :D It's still in pretty early stages and, well, I haven't worked on it for a while, but I plan to continue some time soon
20:19:09
PuercoPop
yeah I saw most of the code was written in October. But the project structure also invites collaboration as it is clear how to extend for another language.
20:23:26
mood
Perhaps I should've posted the link here instead of in #lispgames: https://github.com/jorams/crylic
20:26:18
PuercoPop
I remember that a while back you created a repo for some sort of CSS dom model from the WebIDL specification as well?
20:30:54
sebboh
Bicyclidine: it's related to a link you provided yesterday, something called cellmatrix. Which you provided because I was looking for a CA-like computing device.
20:31:03
PuercoPop
mood: if you want practice you could try rewriting djula's one. It is a mess. I started to a while back.
20:32:05
sebboh
Bicyclidine: I guess it's much more closely related to my request than it is to cellmatrix.
20:33:41
mood
PuercoPop: I looked at it a while ago. There is certainly room for improvement in Djula, starting there. Sadly, time and motivation aren't infinite.
20:36:14
Bicyclidine
making a computer out of wire world doesn't make a whole lot of sense; its turing equivalence is based on gates, and you can just make those out of CMOS
20:37:08
mood
jasom: About rerout: I kind of want a URL router that isn't based on regexps, but I needed something simple quickly.
20:37:48
PuercoPop
mood: yeah. One of the things I admire in Mariano is he takes time to polish and improve other peoples projects. Like djula or burgled batteries.
20:40:19
sebboh
Bicyclidine: right. You'd probably want to change the CA rules so that it was possible for the "copper" or "wire" cells to change ever--so you could make different circuits. In the default Wireworld rules, that can't happen. anyway, just thought you might find it interesting, no worries.
20:42:52
PuercoPop
mood: for a router that is not based on regexps something like puri-templates is needed at the very least. Or one wants a more powerful router, that can dispatch on stuff like method or content-type, one has to tie itself to an specific request 'spec', like clack. What do you have in mind?
20:43:41
Bicyclidine
sebboh: if you haven't already, install golly and flip through the million CA rulesets it has
20:46:26
TruePika
Corrupting the machine instance, and I saw a double free from one crash (where glibc reported it, instead of SBCL)
20:46:53
TruePika
glibc reported it being readline, but it might be a bug in cl-readline calling some function extra times
20:47:43
TruePika
I really don't want to have to rewrite this in C++ or something (part of the reason why I choose Lisp is the existance of the REPL)
20:48:10
sebboh
Bicyclidine: I already had Golly installed and now I see that there is something called RuleLoader, though which I can define a variety of CA. Dunno if 'arbitrary' is the right adjective.
20:49:40
sebboh
TruePika: Rosettacode has various toy implementations of game of life and other CA for common lisp.
20:50:08
TruePika
jasom: Arbritrary tab completion, history, and the ability to act on stuff like F1..F12 keys
20:51:02
TruePika
linedit only appears to complete to symbols in the package, and doesn't appear to have support for F1..F12
20:52:38
TruePika
Technically, this is a collection of programs, and only one uses readline or any other sort of terminal interaction
20:53:32
TruePika
my current idea of a solution is to rewrite everything the readline program needs in C++, and try to make a wrapper to access the library calls through Lisp (but this will be a lot of work)
20:53:58
TruePika
jasom: didn't see anything in linedit's package to that extent, IIRC, so it doesn't seem exported
20:54:47
TruePika
(and I can't easily switch to something like clisp without macroing a lot of stuff I'm using to allow multiple implementations)
20:54:57
mood
PuercoPop: I'm not sure, really. I want something performant that doesn't rely on walking trough a list of regexps and checking each one, but I also want the matching to be very flexible. I would like, basically, the ability to specify requirements for whatever values you want to throw at the routing function. Vague, I know.
20:55:02
mordocai
TruePika: It actually has one of the better debugging experiences in my experience, especially if you use it with SLIME/Sly
20:55:46
mordocai
TruePika: So? You have to have a separate repl anyway, do it with emacs + slime instead of raw terminal
20:55:53
jasom
TruePika: if you're using sbcl without slime, then it's like debugging with a hand tied behind your back
20:56:27
jasom
I did what mordocai suggests for several years, and now use emacs with evil-mode (which is a vim emulation layer for emacs)
20:58:49
mordocai
Yeah so far the only repl experience worth anything for me has been Slime and its fork Sly
21:00:09
mordocai
TruePika: Yeah, I mean you don't have to use it for anything but the REPL if you don't want to. And getting just slime setup is pretty easy (do it through quicklisp's slime helper)
21:00:51
TruePika
my host OS is Windows, I do all my coding work in a Linux VM since MS's tools are terrible
21:01:19
TruePika
well I also have a much newer SBCL than Debian provides...still need to fix the old ASDF also
21:01:38
jasom
https://phab.jasom.org/F10 <-- there's a script that will install the quicklisp slime (and install quicklisp if not present) and setup the .emacs to load it
21:01:40
TruePika
(I compiled the newest, to see if it was an issue with SBCL; it doesnt appear to be)
21:03:17
jasom
mordocai: note it will cowardly refuse to modify the .emacs if the regex "slime" matches anywhere in the regex
21:03:35
jasom
mordocai: note it will cowardly refuse to modify the .emacs if the regex "slime" matches anywhere in the .emacs file
21:07:38
hiroakip
hi there, i want to append a list to a list of list without losing the single list structures, how do i do this?
21:09:54
hiroakip
TruePika, not really see: (some-function '((1 1 6 -25) (0 1 25 6) (0 0 331 0)) (0 0 0 331 0)) --> (0 0 0 331 0) ((1 1 6 -25) (0 1 25 6) (0 0 331 0) (0 0 0 331 0)))
21:10:56
hiroakip
(some-function '((1 1 6 -25) (0 1 25 6) (0 0 331 0)) (0 0 0 331 0)) -->((1 1 6 -25) (0 1 25 6) (0 0 331 0) (0 0 0 331 0))
21:11:58
hiroakip
i think (reverse (push (reverse ... would do it, but this isn't very nice, i think
21:12:19
TruePika
I would think (without messing around in REPL) that (concatenate 'list ...) might work
21:12:24
Bicyclidine
you need to quote the second list too... but, in that case the fact that the elements are lists isn't really relevant
21:13:36
Bicyclidine
TruePika: there's an issue for that from july 2014 relating to version incompatibilities
21:15:04
sebboh
hiroakip: that's what I came up with. The push+reverse thing. Can anyone speak to our presumption of performance penalties for doing that? In my own code, it works fine with tens of thousands of integers--no perceptible performance problems.
21:17:04
mtl_
sebboh: I think maybe the length of the list you're adding to is more relevant than the amount of integers in the list you're adding to it
21:19:17
TruePika
so something like adding the new list on as the cdr of the last element of a possible copy of the first list?
21:22:19
sebboh
mordocai: I have some quicklisp slime-emacs-swank version sync thing.. is that what you're talking about?
21:22:48
TruePika
and evil looks like it might have an issue of its own, deactivate-current-input-method-function
21:27:47
jasom
but I had been using emacs for a while at that point (was just using emacs as a better repl/debugger before evil existed)
21:28:16
sebboh
I use Debian unstable, and ever since around emacs 25, I've been able to pretty easily just git clone emacs itself and compile it. Then I symlink ~/bin/emacs to ~/src/emacs/whatever/whatever/somebinarywithemacsinthename and then everything Just Works.
21:28:34
TruePika
I have 3.1.5 working from SBCL, but a very old one at /usr/share/common-lisp/source/cl-asdf
21:30:26
sebboh
why would clisp depend on cl-asdf? ugh... just manually, physically delete most of the files you see if you do dpkg -L cl-asdf. I presume you know this breaks your warranty, but ffs debian, you have BEEN asking for this...
21:30:27
jasom
well you can at least modify your lisp init files to not opt into any of the common-lisp-controller stuff (IIRC, I haven't used deb in about a decade)
21:31:21
jasom
TruePika: don't do what sebboh said, just make sure /etc/sbclrc doesn't load any of that stuff
21:48:44
TruePika
I tried dropping it into a /etc/common-lisp/source-registry.conf.d/ file, but that just caused SBCL to error out on startup
21:49:59
TruePika
Invalid source registry (:IGNORE-INHERITED-CONFIGURATION) in #P"..." (will be skipped)
21:56:23
feep
I'm trying to do a thing where I take lambdas inside other lambdas and move them to the top-level, turning their context into a pointer to an allocated data structure that's passed in as an implicit parameter
21:57:38
TruePika
anyway, if anyone's curious, I need clisp in addition to sbcl because a different system I have, which runs on an even _older_ version of Debian, runs clisp
21:58:27
TruePika
putting long-running code on a low-power-consumption system that actually tolerates brownouts FTW
22:00:37
Bicyclidine
wikipedia makes it seem like it might "actually" be "closure conversion", but they seem pretty similar...
22:31:30
pjb
jackdaniel: (defstruct (point3d (:type list)) x y z) (mapcar 'print (make-point3d :x 1 :z 3 :y 2)) s/list/vector/ s/mapcar/map 'nil/
22:48:44
TruePika
(CFFI::FL-ERROR "Unable to load any of the alternatives:~% ~S" ("libreadline.so.6.3" "libreadline.so.6" "libreadline.so"))
22:49:37
TruePika
though that merge-pathnames thing is nice to know, I've always been specifying the absolute path to quicklisp/setup.lisp
22:53:25
TruePika
yeah dbi works, this one program (that doesn't touch readline) worked successfully
22:54:49
TruePika
now I'm wondering if there is any chance at all that it can't load the libs because there is something wrong with them
22:55:39
pillton
Well the only thing I can think of is that there is an architecture mismatch. e.g. 64bit lisp implementation loading a 32 bit library. ii)
23:10:41
Guest59804
TruePika: I'm not sure how SLIME would associate source code buffers with one inferior lisp or another.
23:13:12
TruePika
Okay, so I don't get that error out after I 'make uninstall'ed readline and went with the distro one
23:13:37
attila_lendvai
Guest59804: there's a default connection where most requests go (except repls, debuggers, etc that are tied to a specific lisp vm connection)
23:34:56
Bike
there is. iirc it indicates a bell pictogram, unlike bel which is a control code to ring a bell
23:36:32
Bike
oh. well, does your terminal crash or just ignore it, cos i'd expect the latter at worst
23:39:22
dwchandler
TruePika: https://github.com/nikodemus/linedit/commit/bb35a200775802bd63ae42356f17b2db237180d0
23:42:29
TruePika
https://github.com/nikodemus/linedit/commit/da525f0d1666ef33f6c880a2876fccf23ec00899 fixed it
23:43:32
mood
Dangit, c-l.net being offline is really inconvenient. Quicklisp pulls its linedit from gitlab.common-lisp.net
23:54:56
mood
TruePika: "wrapping sbcl" is easy using rlwrap, but you can't control that from the CL side
23:56:59
mood
Yes, but rlwrap is a command you call like 'rlwrap sbcl' and it automatically wraps the thing in readline
1:29:20
TruePika
in fact, right now I'm not sure it can work with F1..F4 directly, since it sees them as M-O followed by P..S
2:29:41
Kundry_Wag
http://stackoverflow.com/a/18391103 -- is anything in this answer different in Common Lisp?
2:53:13
mordocai
I'm using CL-HEAP and getting http://pamrel.lu/282e3/. I've tried proclaiming inline for those functions in my package files but that doesn't help. The author of CL-heap does declare infline for them in his/her package. How should I fix these warnings?
2:53:35
mordocai
I don't particularly care in this case if the functions end up inlined, as long as I stop getting the warnings somehow without having to fork cl-heap