freenode/lisp - IRC Chatlog
Search
7:36:56
MichaelRaskin
FCGE's as you actually do them in SICL are definitely great and whoever tunes in given the abstract is likely to recognise that. Sorry for not delineating clearly that I only reacted to the claim about likely costs of implementing FCGE's in arbitrary implementations
7:38:55
phoe
my worry is about some compilers that open-code some functions regardless of their actual fdefinition, cl:car being the prime example
7:39:55
phoe
obviously it would be weird to modify cl:car in a FCGE, but the compiler is pretty much allowed to do the same with all CL symbols, given that they are immutable
7:40:30
phoe
that sounds like work required to make these implementations play nicely with FCGEs integrated into them
7:41:27
beach
Not SICL. CAR is defined like this: (defun car (x) (if (null x) x (if (consp x) (cleavir-primop:car x) (error ...)))) And that definition is taken from the first-class global environment.
7:42:31
MichaelRaskin
phoe: even open-coding unrelated to definition _could_ be structured in a way that you could easily reconfigure it given an FCGE … or ti could be structured otherwise
7:43:08
phoe
https://github.com/Clozure/ccl/blob/c444e10120159f9b388eb087699a7c28f2c0e384/level-0/l0-utils.lisp#L194
7:43:11
phoe
https://github.com/sbcl/sbcl/blob/28ddc79abc9f119e3b0e0b5ec9b74222366303e5/src/code/list.lisp#L30
7:43:30
phoe
and work because the compiler transforms the seemingly endless recursion into an open-coded operation
7:43:31
beach
phoe: And comparing CCL's definition of symbols, here is the one in SICL (yes, it is in Common Lisp): (defclass symbol () ((%name :initarg :name :reader symbol-name) (%package :initarg :package :reader symbol-package)))
7:45:03
phoe
beach: bad idea unless you consider the standard, which implies that this is allowed; and that the implementations have used that for decades since portable bootstrapping is a very new idea and FCGEs is a very very new idea
7:46:26
phoe
the currently alive implementations simply assume that the global environment is a singleton and are structured fully around that idea
7:46:31
beach
I am not saying it is not allowed. Just that I think it is a bad way of structuring an implementation, first-class global environments or not.
8:20:35
pjb
beach: the problem is not the definition of CAR, but that of COMPILE. (COMPILE '(lambda (x) (car x))) may do the same as (compile '(lambda (x) (cleavir-primop:car x)))
8:21:16
pjb
phoe: this means that if you modify any function in CL you must also modify CL:COMPILE to ensure open-coding the new definition or no open-coding. Also the compiler-macros!
8:23:30
pjb
beach: the compiler may also not special case the CL functions, but just inline them all. Or have compiler-macros on them to special case them. etc.
8:24:31
pjb
Or, said otherwise, it's not because an implementation such as sicl allows you to mutate operators in CL, that the CL rules about them don't apply.
8:24:51
pjb
ie. it's implementation defined, what happens if you fmutate CL:CAR and (COMPILE '(lambda (x) (car x)))…
8:30:30
beach
I hope I didn't imply any such thing. All I said was that CAR is not primitive enough to be considered a primitive.
8:32:58
pjb
other implementations could use a different definition for different safety levels, and therefore consider it a primitive (at least in (safety 0)).
8:33:02
beach
Plus, the Cleavir compiler can be customized, so it does not have cleavir-primop:car hardwired in it. It is just a default thing. Client code can have other definitions of CAR and define compiler methods to deal with whatever it defines CAR to be.
8:34:50
beach
Contrary to apparent appearances, I am not particularly interested in discussions like this.
10:27:01
beach
phoe: I am reading your code for the portable condition system. It looks quite good. Later, I might suggest some changes to it so as to make it easier to adapt to different clients. I would much prefer to use it as is, with customizations, as opposed to using a modified copy of it.
10:29:16
beach
One immediate thing I suggest would be to use disembodied documentation strings in a separate file, so as to allow client code to modify them more easily.
10:34:55
beach
Disembodied documentation strings also make the code less "nosy" to the maintainer, who presumably already knows what these functions are supposed to do.
10:46:38
phoe
beach: I'll need to make branches in this code anyway. One version, with inline documentation strings, will be intended for readers of my condition book; the other will be useful for integrating into e.g. SICL with docstrings moved aside and generic hooks into macroexpansions available - in the way you described where GFs can be called with custom clients.
10:47:19
phoe
That's required since we have two possible groups of audiences for the condition system: one who wants to understand how it works, and the other who wants to use it in real-life projects.
11:26:41
jmercouris
anyone able to generate the documentation for: https://github.com/robert-strandh/Cluffer ?
11:28:04
jackdaniel
it builds without a problem, did you try to troubleshot your latex installation?
11:34:15
_death
the console window's title suggests that it's the tr program, and it's likely waiting for input..
11:35:45
jmercouris
that's very descriptive, but not very enlightening, another day :-) I am reading the manual now
11:37:09
jackdaniel
the point being made is that you can easily check what is the program tr instead of asking (given my understanding is correct)
11:58:28
jackdaniel
_death: tui project? I can't find it on your github account with simple looking for "tui" or "text"
11:59:42
_death
sure.. the code isn't hard to understand, and there's documentation.. there could be an operator to erase the buffer's contents (right now I create a new buffer instead)
12:01:40
jackdaniel
if you happen to publish it sometime let me know, I'm curious because I'm writing a similar thing right now
12:04:18
_death
for now I have a gist containing one module (text-display.lisp) https://gist.github.com/death/c08917417b7acef288dcd28e9eb2c440
12:07:50
_death
I still need to read your latest tutorial.. when I skimmed it it seemed to have some interesting keybindings mechanism
12:08:39
jackdaniel
the next part is about rethinking output and input, so some things will change. that said parsing will stay more or less the same
12:09:28
jackdaniel
if you just want to look at the code, here it is: https://turtleware.eu/static/misc/01-controlling-the-terminal.tar.gz
12:40:02
beach
jmercouris: I developed it for Second Climacs, but it is a general library, and it has been thoroughly tested. The documentation should be complete as well.
12:41:26
beach
jmercouris: I believe it is good in that it allows for several views into one buffer, and each view can have a different way of presenting the contents, including a different parser for the buffer contents.
12:41:57
jmercouris
I'm going to attempt to replace our own buffer implementation with one of the supplied ones
12:43:10
jmercouris
what's strange to me is that you can insert something like (cluffer:insert-item y "aj")
12:43:54
jmercouris
I don't fully understand the principles behind the implementation yet, but I at least can use simple-line so far :-D
12:46:50
jmercouris
maybe I will figure it out in time, anyways, with your blessing, i will try this
12:46:56
beach
Anyway, standard-line uses a gap buffer which is efficient. simple-line uses a list as I recall.
12:47:28
beach
Sure, I'll try to assist as much as I can. I may need some time to re-read the code to answer questions.
16:33:26
jackdaniel
hm, now that I think about these timeouts I think that we should not put a timeout in acquire-lock
16:39:01
jackdaniel
ralt: also, pointing out potential problems in the code is something to be thanked for, not to be sorry about, hence thank you! :)
16:39:46
ralt
It's more the "point out a problem, point out another problem in the next iteration" thing I'm apologizing for
16:41:35
ralt
jackdaniel: your argument probably works in the general case but starts failing in the case of under pressure environments
16:42:46
ralt
Well, if you do the timeout for lock, then every signature needs to have the timeout, including the count ones
16:43:58
ralt
Just spawn 1k threads reading the value, another 100 threads modifying it after taking a lock, and see if everything dies
16:44:59
jackdaniel
regarding timeout for count ones, why would that be necessary? if I call mailbox-empty-p I would assume, that it will wait until the lock can be taken
17:01:31
axion
I'm having a lot of fun working on a new library for a change for creating generative art :)
17:09:27
axion
Nah, though I started working on a port the same author's ConvChain a while ago, which can be guaranteed to terminate, unlike WFC :)
17:10:20
axion
Just doing basic noise algorithms and a composition pipeline https://gist.github.com/mfiano/0ae825095bd26c4b6eda3e203b38da7d