freenode/#lisp - IRC Chatlog
Search
6:34:58
aeth
One thing that's currently lacking is the ability to mandate tail recursion in a DECLARE OPTIMIZE when required for the correctness of the function even when normally disabled e.g. (debug 3)
6:35:42
ldb
recently I read the documents of CamlP5 (formally known as CamlP4) and hopes to have such kinds of interface in CL, rather that the ad-hoc treatment of reader-macro
6:39:12
beach
Now, all this stuff requires a lot of work. It would be good if we could get some help with projects using this suite of libraries (Eclector, Cleavir, CST, Trucler, Clostrum, AST evaluator), at least once it is a bit more mature.
6:40:27
aeth
I, for one, would be willing to sacrifice a bit of special variable performance in order to "fix" (more like harmonize) the semantics of DECLARE. The only thing that would be a bigger deal afaik would be getting the implementations to agree on the names of conditions returned by certain errors (especially in destructuring-bind) so portable code could handle these.
6:43:31
loke
aeth: I think the world has pretty much settled on CHARACTER being a Unicode codepoint at this time. Only CLISP is the odd one out, but with it not having had an update in 10 years, I think we can ignore that one.
6:44:01
loke
That said, something analogous to SB-UNICODE should be standardised at least in a library. CL-UNICODE is kinda crap.
6:46:06
aeth
loke: yeah, sb-unicode needs to be turned into a portable thing that's exposed from implementations through a portable library. Perhaps also including string-to-octets and octet-to-strings (in sb-ext, but also in babel, but really it should be built in, at least for utf8)
6:47:26
loke
I think SB-UNICODE is mostly portable CL anyway. It was integrated in SBCL thanks to a Google of code things.
6:57:46
beach
loke: In what way is CL-UNICODE "crap"? I am not disputing it. But I would like to know. Since I know very little about the subject, I ignorantly decided to use it in SICL, but it sounds like I should use something else instead. If so, what would that be?
6:59:27
aeth
beach: e.g. in sb-unicode, to see if something is in a unicode general category I do (eql (sb-unicode:general-category character) category)
6:59:39
loke
beach: It's not maintained, for one. So it doespn't support newer Unicode versions (the readme says it's from january 2018)
6:59:47
aeth
beach: and in cl-unicode I think the closest equivalent is (eql (nth-value 1 (cl-unicode:general-category character)) (intern (symbol-name category) :cl-unicode-names))
7:00:03
loke
Also, it lacks a bunch of things, such as implementation of the the BIDI algorithm, and the word break stuff.
7:02:31
loke
That's not to say that SB-UNICODE is perfect. For example, SB-UNICODE:GRAPHEMES returns a list of the graphemes. It would be better to have some kind of iterator, or at least return a vector since it causes a lot of consing when working large strings.
7:02:57
beach
Correct me if I'm wrong, but this sounds like an excellent candidate for an implementation-independent library.
7:03:12
loke
In particular, when using it to do word-wrapping, you usually only want all the graphiemes leading up to the first newline, while the SB-UNICODE implementation will create a list out of all of them before you have a chance to search for a newline.
7:04:44
aeth
loke: oh, I see one of the core problems with sb-unicode:graphemes. It doesn't have a start/end, like most sequence/string-processing functions. If it did, you could (position #\Newline string) to get what you wanted.
7:05:04
aeth
Perhaps the author assumed you'd SUBSEQ, but that's just now how CL idiomatically does such things
7:06:14
loke
For word-wrapping you need a different algorithm, which SB-UNICODE implements in SB-UNICODE:LINES. This is also something missing from CL-UNICODE.
7:07:43
loke
But... To dig even deeper. SB-UNICODE:LINES is, again, limited to fixed-width grapheme clusters. For variable width, youy need to be able to provide a custom line width computation which I don't believe is implemented.
7:08:08
aeth
loke: Personally I'd start with sb-unicode, but I'm not sure which would be better: a portable library or porting sb-unicode to all of the implementations, to then expose in a library. I guess it depends on how sb-unicode works and how large its database is.
7:08:53
loke
aeth: I don't think SB-UNICODE has much paltform-specific stuff at all. I think it's mostly the assumptions of the behaviour of the CHARACTER datatype.
7:09:05
beach
loke: Good. I'll thing about ways that this could be done. Not by me, but by someone else.
7:09:22
loke
But if your CL implementation doesn't impleemnt CHARACTER as a single Unicode codepoint, a lot of CL libraries is going to fail on you anyway.
7:10:12
beach
ACTION needs to vanish for around 2 hours or so, and will read the logs upon returning.
7:10:36
aeth
SBCL is essentially the universal donor to any other implementation, assuming that it's portable enough
7:12:42
aeth
fwiw, I've very recently started doing #+sb-unicode instead of #+sbcl for unicode stuff (with an often-subpar fallback, of course)
7:13:19
aeth
code written in this way (instead of #+sbcl) should essentially have all of the sb-unicode extras "for free" for a portable sb-unicode
13:50:59
dim
ah nice it looks like I have managed to create an infinite loop in my esrap grammar for Oracle PL/SQL (including SQL and some of its crazyness)
15:17:15
dim
mmm, someone good with esrap? how do I express I may have a column-alias that can't be the reserved word "from"? (? column-alias) and then (defrule column-alias (... namestring (not kw-from)) and I don't know how to express that
15:19:57
scymtym
or more completely (defrule column-alias (and (esrap:! kw-from) proper-column-alias) (:function second))
16:45:46
thetabit
Hello all, quick question (maybe not, ha). How do I undefine a function name that is loaded up in a lisp instance. In otherwords, I would like to completely wipe out a reference to a function in the image instead of closing emacs and slime down
16:51:09
thetabit
that's good to know! lol I have been using on lisp for a lot of my studies, and symbol-function is used throughout the book
16:52:40
beach
Also the name SYMBOL-FUNCTION gives the impression that there is actually a function slot in the symbol.
16:54:54
phoe
beach: the same way PACKAGE-NAME gives the impression that there is actually a name slot in the package
16:55:44
phoe
I read PACKAGE-NAME as a mapping from a package object to a string of some sort, not as some sort of "this has a slot"
16:56:10
Bike
symbol-function is bad because it implies the function is a property of the symbol and not e.g. an environment
16:56:57
_death
Josh_2: I submitted a pull request to your repo.. we can play programmer ping-pong improving it
16:59:04
phoe
I mean, we have FDEFINITION but FIND-CLASS and they have somewhat distinct semantics when unbinding stuff
17:00:04
shka_
phoe: we can push this into the limbo of "we are not talking about that part of the standard" where it can hang out with symbol-plists and progv
17:01:12
phoe
progv is the only real way you can bind arbitrary dynavars at runtime without using the compiler or evaluator
17:02:03
_death
Josh_2: cool.. also feel free to discuss things in issues/todo file/pull request comments.. I guess irc too, though that has less value for archival purposes (and we may be busy at times)