freenode/#lisp - IRC Chatlog
Search
15:26:56
oleo
weird, all of a sudden 2Gb dynamic space size does not suffice anymore and i get into the debugger telling the control stack overflow
15:28:22
oleo
and i'm running that and when i open some .lisp file to edit in climacs, i get thrown into the debugger with that control stack stuff
15:31:23
oleo
i didn't specify control stack size, neither at compile time of my local sbcl nor at the time of making the mcclim image
15:50:19
oleo
that's all i get, and it throws into the debugger obviously cause the file doesn't get displayed actually and it all goes unresponsive at that moment, so i don't get a real backtrace either
15:50:54
oleo
when i press C-c again a debugger frame pops up but then that's only because of my interrupt
15:52:08
beach
Watching drmeister struggle with debugging, I had an idea for a great project. The GraphViz algorithms are quite well documented. An implementation in Common Lisp of those algorithms would make it possible to whip up a CLIM window with some graphs corresponding to things like ASTs, HIR instruction graphs, discriminating automata, etc.
15:53:22
beach
Currently, we have to generate a dot file, then apply GraphViz to it, and finally, start some image viewer to view it.
15:54:16
Shinmera
beach: Writing a native flow chart editor has been on my "not so far in the future" todo. I don't think I'm going to emulate graphviz, but that could be used instead too for your purposes.
15:54:42
Shinmera
Well, I already have a prototype, but it doesn't draw connections between elements nicely or know how to distribute nodes automatically.
15:54:52
beach
I was just thinking of GraphViz because it is well documented, and they did the required research.
16:00:55
Shinmera
The domain may also be different for my application (flow charts) than for graphviz (general graphs)
16:06:22
Shinmera
You could probably get pretty far by doing a primitive thing like: on split, move one line down by the height of an element and continue the other on the same line. Would just have to know at which point a loop happens so you can avoid the recursion.
16:10:34
Xach
I think Luke Gorrie uses a smalltalk environment to visualize things like that in his language development.
16:11:41
Xach
beach: I think the environment he uses lends itself to developing new visualizations. That is just a guess, though.
16:18:55
Xach
alvy ray smith has a nice set of memos and papers that are kind of about the sprite model of compositing graphics, but indirectly illustrate the power of carefully-chosen primitive data structures and operations as a solid foundation for efficient work
16:20:58
Xach
Yes...I guess the connection there is that a good foundation allows you to experiment with different layout algorithms quickly rather than a slow batch process where you are reluctant to discard the (unnecessarily) hard work that got you to an unsatisfactory solution
17:43:08
beach
It is not clear what you mean by "printing back the defclasses". There is no such thing as "a defclass". There is such a thing as "a class" and such a thing as "a DEFCLASS form".
17:43:50
beach
There are a bunch of problems with the code you pasted, and it is not clear how it is related to your question either.
17:44:12
beach
Is this the code you would like to see "printed back"? Is it code that you think might do the "printing back"?
17:44:20
pjb
Anyways, the MOP provides all the information. You can extract it and build a defclass form.
17:44:48
dmiles
i am looking to print out the defclass forms.. even if they are not perfect or complete
17:51:15
ebdreger
I mean... someone could use some MOP-fu to build a metaclass that stores * in some special location... but... why?
17:51:41
dmiles
why: at that point i wrote that I was translating some things to another language.. now that i have my class compiler working .. i am going back to grovel the defclass forms
17:53:18
ebdreger
invoke cl:defclass as appropriate, but munch on the form as you see fit from within your local DEFCLASS
17:55:06
ebdreger
(errr... dangling modifier in my wording above... "use your local DEFCLASS to munch on the form as you see fit")
17:55:42
dmiles
right now there are not classes defined in my lisp impl.. well except for a could few builtins
18:11:40
Bike
dmiles: you can use mop accessors to get information directly, rather than reproducing a defclass form.
19:11:47
Bike
i mean, you don't need defclass forms at all. if you want, like, the list of valid slot initargs, you can just get that directly.
19:13:30
dmiles
Bike: *nod* thats is exactly what my orignal code did.. but i forgot to glean out initarg and initforms
19:21:40
ebdreger
ACTION nods at Bike. Unless dmiles has need for :metaclass and specific :metaclass-option forms, it sounds like a few quick MOP queries can answer the questions.
19:32:18
dmiles
ebdreger: yep tyhat is what i did to generate https://github.com/TeamSPoon/wam_common_lisp/blob/24c112af9edb97c0a5033d35dd369f876725fa9d/prolog/wam_cl/clstructs.pl#L283-L551 (from https://github.com/TeamSPoon/wam_common_lisp/blob/24c112af9edb97c0a5033d35dd369f876725fa9d/t/reference/clisp.info )
19:34:45
dmiles
which ends up making https://github.com/TeamSPoon/wam_common_lisp/blob/master/prolog/wam_cl/ci.data
19:46:14
dmiles
not that it was too big, i just seek to define what a minimum will be for bootstrapping
20:28:47
ebdreger
dmiles: Meh. Sounds like you just want your Lisp environment to be fully reflexive. ;-)
20:31:42
dmiles
that was supposed to be a /msg to friend .. and what is funny is it applies much better for my channel history in #lisp
20:34:48
dmiles
but yeah, i am working on making sure in my impl that whatever datastructures are there that they can be viewed and altered from multiple programing paradymns (either by prolog predicates/assertions or by MOP)
20:37:52
dmiles
(as in, right now, the class system is based on what the predicates had "asserted" (which created the data at the last link))
20:59:28
jmercouris
Bike: beach said there were some issues with ironclad and you might be able to shed some light on that, do you know anything about that?
21:02:14
jmercouris
While you are here, do you know what it would take to integrate GPG into something like ironclad?
21:02:29
jmercouris
I don't know much about the technology, but I assume it's probably a big project
21:02:31
Shinmera
ironclad does some heavy macro optimisation stuff that clasp & cleavir choke on because they're pretty new compilers.
21:03:25
Bike
do you mean the actual software gpg, or just whatever it does? i don't think ironclad does foreign calls.
21:16:04
shrdlu68
jmercouris: Almost as long as the TLS 1.2 RFC. Shouldn't be too hard too implement GPG from scratch, though.
21:39:29
jasom
One should also be suspicious of ironclad for online encryption and hashing, since making algorithms with data-independent is hard, and I don't know how much effort was put into it
21:44:54
rme
crypto operations need to take the same time to complete no matter what the input data is. otherwise information can be leaked via side-channel attacks (cf. spectre)
21:48:03
shrdlu68
i.e does it take special effort to prevent side-channel attacks in CL than in, say, C?
21:48:41
aeth
Afaik SBCL should be perfectly capable of doing the same crypto that C can do, even with 64-bit integers (put them into arrays).
21:51:25
Bike
garbage collection would be one with certain algorithms, though it doesn't seem like it would usually be important
21:55:38
aeth
CL does not yet have compilers that do advanced optimizations to the degree of C compilers afaik. A lot of the time people assume optimizations that don't happen, just disassemble with (speed 3) or even disassemble with all the optimizations set in favor of speed over everything else (but safety at 1) to see a lot of optimizations that don't happen
21:58:10
aeth
e.g. this is not optimized to constantly return NIL in any implementation afaik: (defun foo () (declare (optimize (speed 3))) (dotimes (i 100) (+ 1 1)))
21:58:39
shrdlu68
Even in C, it takes special effort to prevent side-channel attacks sometimes. Blinding is one such technique.
22:00:45
shrdlu68
One could say that Ironclad's implementation of RSA is vulnerable to side-channel attacks, but all it takes to mitigate this is implement blinding. Same thing Openssl does: https://wiki.openssl.org/index.php/Manual:RSA_blinding_on(3)
22:02:11
aeth
(what I mean is constantly return NIL while skipping the loop that does nothing, both SBCL and CCL do the loop and they're considered the most optimized compilers)
22:03:23
shrdlu68
I doubt anyone is doing serious crypto in CL anyway, even the few that are are using Openssl bindings.
22:07:28
aeth
Yes, and probably 100% of the non-accidental uses of dotimes that does not fill in the optional return form
22:07:37
dmiles
heh Bike has a good point, it it should be optiizaed away, the programmer should have not written it
22:08:20
aeth
dmiles: yes, although to be fair, SBCL *does* warn me about "deleting unreachable code" a lot of the time, and with the exception of some local functions (flet or labels) it's always an error and I'm always glad to have been notified
22:09:18
Bike
the fact that it's unreachable code deletion doesn't mean that it's another case, ie that the compiler would do the same thing either way
22:10:07
aeth
I guess what's different here is that it's reachable, just useless (unless it's being done for timing for some reason... although simply setting speed 0 and debug 3 would probably reenable that if the compiler optimized it away... and why do that for timing?)
22:11:42
aeth
Bike: brief depends on the duration, e.g. change the dotimes to 100000000 and to me it takes 45175.404710144925d0 times as many cycles as a function that just returns NIL
22:14:30
Bike
all i'm saying is that eliminating side-effect-less code is one thing, but eliminating an empty loop is another matter. you'd have to search for basic blocks that immediately reenter themselves based on a condition, determine that the condition can't be affected by other threads etc. it is not really "another case" of other dead code elimination
22:14:58
Bike
and, for real code it doesn't seem very useful. it could come up with a dumb code generator, i guess, but then it would probably be able to special-case.
22:15:10
aeth
Bike: I was bringing it up as an example of an advanced optimization that people might assume that compilers already do
22:16:47
aeth
I'm not aware of anyone who uses CMUCL. I'd be interested in hearing from people who use CMUCL instead of SBCL.
22:21:36
aeth
The table does match my own experience, though. The only two additional entries I track are Clasp (still incomplete so I understand why it's not in that table) and Mezzano (afaik, that is its own implementation as well as an OS)
22:24:29
aeth
I use roswell to get access to the most recent versions of ABCL, CCL, CLISP, CMUCL, ECL, and SBCL. (I develop on an older version of SBCL outside of Roswell, and I also have access to several other CLs outside of Roswell.)
22:26:46
aeth
Commercial implementations are more difficult to decide if they're alive. Allegro and LispWorks are obviously alive. Scieneer is and mocl are probably alive. I think even Genera is "alive" because some entities have support contracts with Symbolics or something? I could be wrong, though.
22:28:30
Shinmera
Anyway, I'm not surprised Roswell's Clasp script fails. It's probably out of date and even if it weren't, Clasp is kinda difficult to get compiled still.
22:29:26
aeth
Shinmera: What I think is happening is that the make file is failing (not surprising; fail, install another dependency, retry is a common workflow) and then all I'm getting is the Lisp backtrace instead of something useful
22:30:54
aeth
I primarily am trying to track living implementations for this table: https://gitlab.com/zombie-raptor/zombie-raptor/blob/11f211c812a396e5e05bcd27a900995ddd68c586/INSTALL.md#cl-implementations
22:31:46
aeth
Obviously, the specifics on that table are just me trying to get my engine to work on other implementations. I want to have all relevant implementations as rows, though.
22:32:49
aeth
I cannot get cl-sdl2 to work on ABCL (not surprising), CLISP (not surprising), and CMUCL (fairly surprising). I don't think cl-sdl2 officially lists what it supports or doesn't support, though.
22:36:36
aeth
I will probably put together similar implementation support tables on everything I write. I'm tired of having to go through the ASDF and source files and hoping to find out what something supports.
22:46:20
wladz_
Does anybody use Roswell? I'm trying to figure out how to evaluate an expression from command line arguments
22:46:54
Xach
wladz_: My impression is that the main body of people using roswell aren't here, but there are a not-small number of users out there.
22:48:14
aeth
I don't know of any advanced uses of Roswell, I mostly use it for "ros use foo && ros emacs &", where I then run tests in SLIME. I think it can run tests in a more automated way, though, so I don't even use Roswell to its full extent for my use case.
22:52:25
Xach
Shinmera: Interesting backtrace today: http://report.quicklisp.org/2018-01-11/failure-report/qtools.html#qtools-titter
23:13:40
bms_
I've set up StumpWM, Emacs, and nEXT-Browser on Arch Linux and I'm loving it. The last piece I need is a Lisp-based IRC client.
23:18:56
Shinmera
Maiden has an example that uses IRC and presents a rather shitty REPL client. https://github.com/Shirakumo/maiden/tree/master/examples/circ
23:19:23
Shinmera
And at some point I'll hopefully finally manage to motivate myself enough to rewrite Lionchat to use Maiden and thus be protocol-agnostic.
23:21:12
Shinmera
Alternatively if you're impatient you can write your own. All the pieces are there.
23:21:23
bms_
I know about ERC and I think I might switch from Hexchat to that, I was just wondering if anyone knew of others. I found Beirc on Github, but it doesn't like to find my init-file and it breaks easily. Then there's KIRC on Github, which is more recent, but less full-featured.
23:22:45
bms_
Also, by less full-featured, I mean completely unsatisfactory. Like, worse than the Mezzano IRC client (which didn't even have /msg functionality until I added it last year).
23:23:20
Shinmera
Well, if you're interested, /I/ would be very interested to find someone else to either change or rewrite Lionchat to Maiden.
23:28:34
Shinmera
Maiden is a bit of a big thing to get into. If you have any questions, I'd be happy to try and address them.
0:03:21
mfiano
jasom: You can connect to a weechat relay with weechat.el if you want to use/configure it with _a_ lisp.
0:39:28
Xach
http://report.quicklisp.org/2018-01-04/failure-report/cepl.html#cepl.perf is old and http://report.quicklisp.org/2018-01-11/failure-report/cepl.html#cepl.perf is new
2:22:38
bms_
Oh, jmercouris, after a day or two of work, I got nEXT running on Arch Linux. Most of that time was consumed by the Webkit2GTK build, which I later discovered was unnecessary. Anyway, I like it very much so far.
2:24:19
bms_
I really am. It works perfectly with my current setup. I've never written a pkgbuild from scratch, only done some editing.
2:24:40
jmercouris
Well, just wait until the next release, there's a lot of quite cool things in the works!
3:10:36
jmercouris
I would like to adapt my build script to build differently on MacOS than on Linux
3:11:13
jasom
jmercouris: it's all in the docstrings for the functions, so it's doable if you have it in the repl
3:14:28
jasom
jmercouris: depending on what you're looking for, you may go with one or another of those
3:16:56
jmercouris
I don't ever remember having to install ASDF, does it just come with most implementations?
3:18:18
jmercouris
I've noticed a few people on this channel end sentences with "even", never heard anyone in real life say that
3:18:44
jmercouris
jasom: Hmm, so it's like an emphasis thing, ok, just sounds a bit strange out of place
3:20:33
jmercouris
Hmm, maybe I should listen more closely and see if I can pick it up in conversation- it's not like I don't ever interact with old people
3:23:44
bms_
It's more fun to talk like an early 20th century banker in a bowler hat anyway, old chap.
3:25:06
Timzi
anybody know a good way to time a function? I'm grabbing the *trace-output* with a `with-output-to-string`, around a (time ...) now