freenode/#lisp - IRC Chatlog
Search
1:24:41
fiddlerwoaroof
lukego: I'm not sure if this goes best here, in #slime or in #clim :) but I now want a little widget area in my repl I can draw to with CLIM
1:25:52
fiddlerwoaroof
Like a toolbar or something, so that when do something like (+ (accept 'integer) (accept 'integer)), there's presentations "pinned" somewhere in my repl for quick access
1:30:48
fiddlerwoaroof
Also, interesting feedback about the macos situation: my work mac (x86,emacs 28) displays things correctly; my personal mac (arm64, emacs 27) doesn't
1:48:19
pjb
White_Flame: it's difficult to collect the tests, since #+/#- tests are performed at read-time (of compilation-time). Furthermore, some other tests of *features* could be performed explicitely in eg. eval-when at compilation-time or load-time.
1:49:07
pjb
White_Flame: in my build processes, notably for production, clearing the cache and compiling everything from scratch is usual.
1:49:49
White_Flame
right, I mean that the #+/#- readers need to notify their context of the test, and teh fasl file format might store the subset of tested symbols that are present/missing
1:50:14
White_Flame
it wouldn't work to store the entire features list, as only the tested ones matter for the building of that file
1:50:31
White_Flame
but yes, that detection can be foiled, but at least the standard boolean feature usage would be tracked
1:53:02
pjb
I don't see how it could be implemented conveniently in a conforming way (the dispatching reader macros could be substituted, but it would be more difficult for explicit tests that can use a number of different operators). The implementation could detect that *features* is passed as argument to certain functions, and record the test results.
1:54:07
White_Flame
yeah, my idea would simply be that the default reader macro implementations implicity perform the recording
1:54:23
White_Flame
if the info isn't known to the fasl, then it won't make any decision on that particular feature flag
1:54:32
pjb
White_Flame: well, I'm thinking about explicit tests too because we have a featurep CDR…
2:16:37
stylewarning
CDRs should be rejuvenated and a committee of lisp implementer representatives a should be formed imho
2:48:33
lukego
fiddlerwoaroof: pinned presentations are exactly what I'm about to hack! :-) I was thinking about this while walking the dog too. I'm thinking or now a `slime-clime-remember' command that just appends an image to some buffer, e.g. *clim remembered*, which you can then select from alongside the REPL. This should be easy and work well because in Emacs it already works to copy-paste the images anywhere you like
2:58:29
pjb
lottaquestions: #clschool also have a look at http://cliki.net/IRC http://cliki.net/Getting+Started http://cliki.net/Online+Tutorial
3:02:59
ahungry
I've always hated that that domain is very unfortunately named - what you would think it would be is not CL related at all - was the thought process, "Hey, this domain is taken, so drop the w and let many confused users hit the wrong site?"
3:04:42
lukego
I'm not really feeling an urgent need for CLIM "Commands" yet. Seems like if I have a REPL somewhere then I can get a lot of mileage out of just calling (ACCEPT 'FOO) and then manipulating it using code like (describe *) etc.
3:04:50
ahungry
thats not a bad idea, although all the literature has cliki.net propagated out there, and if someone goes to type it from memory, its very easy to incorrectly remember
3:06:37
ahungry
Hm, I'm not gonna try to visit it, but it looks like the missing 'w' domain isn't registered on whois anymore
4:16:24
fiddlerwoaroof
White_Flame: I put a little thing together with eclector that re-implemented those sharp sign macros
4:22:48
fiddlerwoaroof
I think it'd be nice to have a standardized IR for READ that's equivalent to the textual syntax that is then macro-expanded to the conforming behavior
4:25:15
fiddlerwoaroof
Although, this is probably impossible without forcing everyone to rewrite their reader macros :)
4:27:31
White_Flame
(btw, after entirely too long did I (presumably) parse your handel correctly, assuming the "wo" stands for "without" :) )
4:27:33
fiddlerwoaroof
Isn't the issue figuring out how much of the file a macro function will consume?
4:28:33
White_Flame
a reader macro is just given the stream; are there other things involved that need to predict the length that it will consume?
4:30:15
fiddlerwoaroof
White_Flame: no, but I think that makes it impossible to go from Text -> IR -> the conforming return value for read, right?
4:30:43
fiddlerwoaroof
Unless you do something like record what text was read and then pass it as a string to an intermediate reader-macro function
4:31:02
White_Flame
oh, you mean if #+ etc generated source that performed the test in the expanded code
4:32:23
fiddlerwoaroof
You can do this by re-implementing all the reader macros to be aware of the IR step
4:33:28
fiddlerwoaroof
Yeah, you could cheat by tracking the string position and passing the string contents as a string
4:33:38
fiddlerwoaroof
Or do something like this: https://github.com/fiddlerwoaroof/lisp-sandbox/blob/master/eclector-test.lisp
5:00:24
lukego
Is there a kind of wrapper stream that adds indentation? I'm writing some recursive DESCRIBE-OBJECT methods and I'd like to have the inner ones indented more but I don't think there's a standard printer variable to look at for this
5:08:00
lukego
Every time I try to do this via the pretty printer I end up failing :-| and doesn't it require every method at every level to use pretty printer directives? Or does it "just work" with normal code doing format with ~& and ~% ?
5:09:06
White_Flame
yeah, I've had custom print-object methods that I wanted to be included in with the pretty-print indentation, but never got far
5:22:11
fiddlerwoaroof
I've thought that a bunch of this stuff in CLIM should be extracted into standalone libraries
5:23:23
beach
That's a very good idea. Doing so will put pressure on the extractor to design a clean protocol for it.
5:28:39
slyrus
yeah, I had a hell of a time trying to get indented text with the pretty printer. I could never get it to not add an extra indented line at the end of my output. Unclear if that was my operator error or a bug in the pretty printer.
5:36:13
lukego
fiddlerwoaroof: first demo of pinned CLIM images! https://www.youtube.com/watch?v=ZTO4fwba4i0
5:37:02
lukego
I'm writing a command to do the pinning, but all it actually does is copy-paste the image to the end of a buffer. you can also do that manually. (but if the point is right *on* a CLIM image then keyboard events get screwed up at the moment, workaround is to click somewhere else to escape)
5:39:02
lukego
I'm noticing now that ACCEPT seems to be laggy, about one second to get a result, and I hear my laptop fan
5:39:27
fiddlerwoaroof
Sometimes something like (+ (accept 'integer) (accept 'integer)) will use the first click twice and never prompt for a second one
5:40:07
lukego
maybe it's related to having 1519 presentations in each image. but it's no sweat with mouseover tooltips so Emacs seems to handle the "find where the pointer is" problem fine
5:41:18
lukego
maybe both click and release events are being used. I don't have the event handling right. I really don't like having a [t] default handler that's also screwing up keyboard input etc. need a better solution.
5:42:45
lukego
I wanted to just bind a command on mouse-1 but didn't figure out how to do that since Emacs seems to insist on putting the "area id" into the event, e.g. [:72 mouse-1] if you click on presentation number 72, and I don't want to have thousands of separate key bindings for every area that might be clicked
5:43:20
lukego
but I haven't used Emacs images before and might be missing something. I tried asking #emacs but got snarky "this is not how you are supposed to use emacs" answers and gave up there.
5:45:00
Nilby
There's a long history of "this is not how you are supposed to use emacs" being proved wrong.
5:52:09
lukego
The answer to most of my questions on internet forums is "you are not supposed to do that" so I am used to it :) but exhausted with the process of trying to negotiate and establish enough credibility to have questions taken at "yes this is exactly what I want to do" face value.
5:56:14
jackdaniel
fiddlerwoaroof: it is hard to improve it as it is, managing multiple libraries would be even harder. also you may simply load the system clim and you basically have a headless clim (i.e only backend-independent abstractions)
5:58:06
beach
jackdaniel: Still, if someone wants to extract some stuff and create a good protocol for it, I think that should be encouraged.
5:58:14
jackdaniel
(and for even lower level primitives without presentation stuff, depend on clim-basic)
5:59:07
jackdaniel
beach: if they want to - sure. that said this strangely resembles: I want a CL standard but without deprecated features (i.e CL without remove-if-not)
5:59:45
jackdaniel
fiddlerwoaroof: yes, afaik the original bordeaux threads code was based on it. that said, the history made a leap and now these abstractions are implemented in terms of bordeaux threads
6:00:06
fiddlerwoaroof
It seems to me that at least some of this maintenance burden could be reduced by extracting stuff that really isn't directly GUI-related
6:00:18
jackdaniel
beach: you didn't see people asking for modernizing CL standard to remove "unnecessary" features?
6:01:33
jackdaniel
isn't "let's take CLIM extended streams and make them a standalone library" something in this spirit?
6:03:56
Nilby
BTW, here a thing to indent code to a string with the pretty printer: https://plaster.tymoon.eu/view/2439#2439 Of course it assumes you want/like/have tweaked the way the pretty printer indents.
6:04:06
jackdaniel
as I said, I'm all for people hacking however they want with the code; until I'm made to maintain two separate libraries instead of one ;)
6:06:25
jackdaniel
I'll better go carry on with my day before I'll be dubbed as a "this is not how you are supposed to hack things"-saying person :)
6:45:19
lukego
Nilby: Thanks for sharing. doesn't apply in my situation because I'm recursively calling functions that print arbitrary text to an output stream and I want to indent some of the inner calls. (It's not code so I can't READ and PRINT it.) I could do this at the string level - capture recursive call output to string, replace newlines with indented versions, output again - but that sounds a bit kludgy.
6:50:57
fiddlerwoaroof
But it has the typical "make arbitrary strings valid programs" characteristic of operator-heavy Haskell libraries
7:03:01
lukego
Hey CLIM is pretty great :). I'm more confident that I can use it to do a bunch of other related tasks now e.g. creating circuit board descriptions that can be translated from output records into Gerber manufacturing data, and defining the "land" patterns for ICs showing the exact size/shape/position of pads for soldering things onto.
7:03:51
lukego
The fact that CLIM APIs are high-level enough that the source code can act as a nice abstract description, and output records capture enough transformations to easily do things like detect overlapping bounding boxes, and that output records are also abstract enough to translate into other formats like SVG/Gerber, really adds up to an awesome framework
7:04:42
phoe
I am now tempted to ask someone for an Online Lisp Meeting showing the basics of creating a CLIM application from scratch
7:04:53
lukego
especially so since the output records can contain arbitrarily much metadata in the form of presentations e.g. that I can use to partition the final designs into different layers for the PCB and so on
7:05:14
beach
I obviously knew that CLIM is great, since I started working on McCLIM more than 20 years ago, but it is good that this positive information is coming from someone other than me from time to time. :)
7:09:51
lukego
beach: I guess that CLIM has always presented itself as an all-or-nothing proposition to me. I'm much happier to see it as a collection of protocols for rich geometric drawing.
7:10:52
lukego
and really better than e.g. SVG which puts too much smarts into the renderer -- if I'd be generating SVG directly, using transformations etc that go straight into the output, then I wouldn't know things like the bounding boxes of my output and that would be a bit blinding.
7:35:33
flip214
but I get lots of WARNING: Dropping #S(EVENT :KIND ENTER/UNBLOCK :NAME RELEASE-MUTEX :TIME 1620891298144560 :VALUES GRAB-MUTEX) event since there is no corresponding enter event on the stack.
9:20:59
flip214
scymtym: runnning hunchentoot I tried (clim.flamegraph.examples.recording:with-recording () (sleep 10)) and using external tools to provide traffic; but there's no recorded run visible.
9:21:39
flip214
If I use (w-r () (dotimes (i 500) (...))) I can see and select all threads in the flamegraph; what's wrong in the HT case?
12:29:09
nij
Hello! Anyone knows any good example to use sbcl's local-socket class? It doesn't say much in its manual.. http://www.lichteblau.com/sbcl/doc/manual/sbcl/Local-_0028Unix_0029-Domain-Sockets.html
12:29:51
nij
In particular, I'd like to let my lisp repl and my terminal talk to each other through a unix domain socket.
12:37:11
nij
jackdaniel: I'm actually looking at slynk server and trying to extend. Does swank server talk through local socket already?!
13:03:29
jdz
nij: Also, the document you linked seems to be for SBCL 0.9.8.6. Why? There's SBCL documentation on sbcl.org (http://sbcl.org/manual/index.html), and, depending on how and where you've installed SBCL, it could also be available locally (like /usr/local/share/doc/sbcl/sbcl.html).
13:14:32
CL-ASHOK
Is there a way to 'call' a function from a .lisp file without having to type and run (function-name ...)
13:14:59
CL-ASHOK
For example, I can C-M-x or C-x C-e on a (defun ...) but that just evaluates the defun - I want to be able to quickly run the function without having to type it out
13:16:43
jdz
CL-ASHOK: If you want to do it from Emacs (similar to C-M-x), then you just define an interactive function in Emacs that does what you want. Try C-h k C-M-x.
13:20:31
CL-ASHOK
jdz: Thanks. Would be for a specific function that I have defined? Or can I make it work on all functions (basically everytime I have my cursor in a defun form, I want to be able call the function being defined there?)