freenode/#lisp - IRC Chatlog
Search
15:45:30
dim
I want to ask if it works in CCL, as a reference point, but it might be that you're working on something that is tightly coupled with SBCL at the moment?
15:47:14
dim
my current trick is to develop interactively using one and build images and run tests with the other, and I've got used to using CCL interactively in the SLIME REPL by default, and SBCL for saving images and running tests
15:48:12
dim
of course using (sb-ext:restrict-compiler-policy 'debug 3) in ~/.sbclrc makes the experience of interactive development almost the same using either one of those, I still have a slight preference for CCL in interactive mode
15:48:42
dim
I like using defstruct, for instance, because I'm lazy, and CCL knows how to redefine them on the fly in a way that mostly works
15:52:26
dim
v1.11.5 from memory, unless you're using Macos Mojave, then v1.12-dev.4 as published on https://github.com/Clozure/ccl/releases
16:05:33
beach
With CCL I get an error that I am calling a standard reader method with one argument, but it requires two. :(
16:10:58
dim
I've read that rebuilding CCL from sources is fast and easy, all done from the CCL REPL ;-)
16:13:33
dim
rme from CCL mentionned that they have projects to make their compiler smarter, because it's quite dumb to this day, and maybe, maybe SICL would help, longer term
16:14:35
dim
anyway I'm having too many ideas, and I'm playing with your time here, sorry about that, I'll go back to fixing bugs in my job's software written in C now :/
16:18:33
dim
yeah I know... I don't think that in this instance I could have convinced the team to use CL instead, even Python was out the picture because not everyone there knows how to program in Python... and in truth our main software (an extension to PostgreSQL, named Citus, providing distributed query planning etc) has to be written in C anyway
16:20:01
dim
I considered building PL/CL (we have PL/Python, PL/C, PL/...) a couple times, but I'm not knowlegeable enough yet to make that happen: we would need a background worker running the CL image and then lighter CL processes in the PostgreSQL backends where you could run local things and communicate with the central image, I guess
16:27:02
ogamita
I don't think you'd need a backgroud worker (unless that's how pl languages are made).
16:35:46
dim
yeah a PL doesn't need that, I was more thinking in terms of the developer experience of running CL code, usually you expect a long-lived CL image where you can host things that outlive a PostgreSQL transaction
17:33:18
elderK
ogamita: I wish there was like, an embeddable CL where it was easy to like, disable certain functionality. Not just by say, providing a REPL that itself provided less functionality but by actually fundamentally disabling certain stuff.
17:33:51
elderK
My inexperience is showing here, as I imagine you can achieve the same without actually requiring the ability to like, "disable parts of CL"
17:42:30
dim
sandboxing CL might be a nice byproduct of beach work of first class environments, if I'm following/understanding correctly what he's doing here
17:44:38
pjb
elderK: I guess you could take ecl sources, and #ifndef each functionality you want to be able to disable.
19:09:45
meepdeew
Most seem to "specify font changes in the printed manual and (where possible) in the HTML output."
19:11:15
meepdeew
I know there's @emph, which surrounds text with underscores, which I am using, but I'm looking for an alternative to @strong{..}, which puts asterisks around text because it could collide with ear-muffed CL variable names.
20:24:05
dim
yeah exactly, it's pretty visual, and I'm playing around with McCLIM these days, so I though I would do something
20:36:57
dim
yeah sorry not there yet, I like the idea of distributed social networks though, so someday I'll have a deeper look at it
20:37:36
jackdaniel
no-defun-allowed: I find central entities processing my data way more exciting too :)
20:38:24
dim
jackdaniel: thanks! well (clim:compose-in clim:+green3+ (clim:make-opacity 0.3)) is doing the trick for me, overlapping is pretty obvious given that
20:39:14
no-defun-allowed
Mastodon is about as distributed as email is. You can send a message from server A to server B but if you only have an account on A and A goes down you can't transfer it to B.
20:39:19
jackdaniel
no-defun-allowed: me niether, just saying it is more exciting (like plain email is boring but gmail is exciting etc)
20:39:59
dim
jackdaniel: the code for the presentation is at https://github.com/dimitri/AdventOfCode/blob/master/2018/d03viz.lisp if you want to play with it / improve it / optimize it (it's a tad slow, like more than a second to reach full display for me)
20:46:53
phoe
Sigh - I really "enjoy" the feeling that I finally sit down to write some Lisp again, start tweaking my old game project again, and I end up noticing that I need to yak shave again to get that one more thing from the language that I need.
20:47:56
dim
well stupid me it takes about that time to compute the numbers that are displayed, so I don't think the drawing actually has anything to do about the lag here, sorry about that jackdaniel
20:59:49
phoe
MOP question: I have a method and a list of arguments. How can I check if the list of arguments I have suits the method specializers?
21:02:03
Bike
probably something annoying then. i don't think mop exposes a "does this method work" function for you.
21:02:37
phoe
Well, that behavior is a required part of generic function dispatch, so I expect it would be available somewhere.
21:02:58
fortitude
phoe: what about using COMPUTE-APPLICABLE-METHODS and seeing if the method in question is a member of the result?
21:03:18
Bike
compute-applicable-method is what does it. that particular solution sounds mildly annoying though.
21:04:04
Bike
(every (lambda (arg spec) (etypecase spec (eql-specializer (eql arg (eql-specializer-object spec))) (class (typep arg spec)))) args specs)
21:10:54
phoe
I've made a moptilities ticket for including that predicate. I think it's a good idea to add it there.
21:11:52
Bike
there's also a small possibility of other kinds of specializers. someone was working on that in sbcl i think.
21:16:22
phoe
I think I might safely treat these as very implementation-defined experimental stuff then.
21:24:17
eminhi
Are there any style rules for using check-* and assert-* for naming? They are very visibly highlighted.
21:26:20
phoe
eminhi: a common rule I've found is to place them as high in function bodies as possible.
21:26:47
phoe
They are used for validation of function inputs, and are often also used as typechecks in modern implementations.
21:27:43
phoe
Or even (defun foo (x) (assert (typep x 'integer)) ...) that is very roughly equivalent to the former.
21:28:39
phoe
The compiler can infer that if control reaches ..., it must have been because X was an integer, so it can generate code optimized for integers.
21:29:39
fortitude
phoe: AMOP has SPECIALIZER-DIRECT-METHODS/ADD-DIRECT-METHOD & co defined for specializer metaobjects
21:30:24
pfdietz
Internally, SBCL uses "aver" instead of assert. The difference is assert has some baggage involving restarts that imposes an implementation overhead.
21:31:28
pfdietz
I think. The condition had better be there so the compiler can propagate it forward.
21:35:58
Bike
fortitude: there's not enough to use them widely. things in mop that are based on specializers are like that just so classes and eql specializers both work.
21:36:41
pfdietz
And sb-impl::%failed-aver has return type NIL, which means it cannot return, and the compiler takes advantage of that.
22:03:50
emaczen
I can't remember 100% if it was just disabling the low level debugger or if it was completely removing immobile code
22:25:54
v0|d
dim: (car (reduce (lambda (acc atom) (if (> (cdr atom) (cdr acc)) atom acc)) lst :initial-value '(not-found 0)))
22:41:49
pjb
(let ((transposed-list '(((nil . 1) . 4) . 2))) (loop :for current = transposed-list :then (car current) :while current :maximize (cdr current))) #| --> 4 |#
0:09:43
aeth
A lot of good discussions in https://old.reddit.com/r/lisp/comments/a2yvuz/5_reasons_why_lisp_games_suffer_and_proposed/
1:18:22
aeth
no-defun-allowed: Well, I said the discussion (in the reddit comments) was good, not the OP article.
1:19:16
aeth
It's the most popular thread since yesterday's discussion of ITERATE in the LOOP thread, but I suspect it'll pass it very soon.
1:21:06
aeth
With 43 comments already the gamedev thread is well on the way to be the most commented. 60 might do it, at least sorting by top all time and looking at the comment count (and, hey, unlike the Arc forums, I don't get banned for quickly going through thread listings!)
1:24:51
no-defun-allowed
i probably should, i like that as a compromise between "i hate typing" and "oh god not another symbol collision"
1:26:27
no-defun-allowed
iirc in netfarm there's some packages required that do collide so i'll clean that up soonish
1:34:32
PuercoPop
no-defun-allowed: yeah, I though of beach as well when they mentioned don't use :use, but the only package-per-file style also advocates for explicit import statements
1:55:06
aeth
no-defun-allowed, PuercoPop: Package per file works best when the project is very, very, very large. Most Lisp libraries and applications aren't like that, and the largest ones are probably Lisp implementations, which probably can't use that style while implementing the things that defpackage requires.