freenode/#lisp - IRC Chatlog
Search
5:09:26
lisbeths
It seems to me that common lisp is the most superior programming language on the planet.
5:11:14
lisbeths
It seems to me that if my previous claim is true that it makes sence for the common lisp community to better advocate for lisp.
5:11:30
lisbeths
If it were in fact the most superior or best current available language then advocating for it would help humanity.
5:11:42
lisbeths
If it were not the best or most superior then advocating for it would reveal that it is not the best or most superior.
5:13:23
lisbeths
It seems to me that if my belief that common-lisp is the most superior langauge is true, then if the industry used common-lisp as a whole then they would not be able to then kick the habit of it, because each time they did so they would benefit negatively.
5:14:10
lisbeths
Thus, I predict that if the industry at large were comitted to lisp it would be so comitted indefinitely.
5:14:30
lisbeths
Therefore, I consider a good way to advocate for common-lisp should be to convince the industry to use it at large.
5:15:47
lisbeths
It seems to me that a good way to convince the industry to try using common lisp at large is a giant marketing campaign.
5:18:09
lisbeths
We can have a bot written in portable common lisp which accepts data as input, expects that data to be an image macro, and which produces memes.
5:18:35
lisbeths
this bot can be rewarded or punished based on how good the user thinks it's memes are
5:18:48
lisbeths
This bot can also be reward or punshed based on the number of google searches for lisp and common lisp
5:21:27
lisbeths
common-lisp programmers can additionally make an effort to promote lisp verbally and on thier online blogging platforms
5:21:48
lisbeths
Since common-lisp is a prefix language, I declare january to be lisp history month.
5:22:50
lisbeths
The first day of january is lisp week and the first day of that week, whenever january first is, is lisp day.
5:23:01
lisbeths
And the first hour is lisp hour and the first minute is lisp minute and the first second is lisp second and so on and so forth.
5:24:22
lisbeths
Lisp history will be for: enjoying common-lisp and lisp history, shaing lisp songs, sharing lisp image macros, lisp poems, and of course, writing and sharing and peer reviewing lisp code.
5:24:36
lisbeths
During lisp month it is traditional to read other peoples lisp code and rate it on github and comment on it.
5:26:45
lisbeths
Another ritual during lisp month is to completely re-read Practical Common Lisp or Gentle introduction to Symbolic computation (which is a beginner's lisp book)
6:04:47
aeth
to get things back on topic again, for anyone who hadn't ignored lisbeths, I'll repeat what I said earlier.
6:04:50
aeth
It's Friday in most of the world. Has anyone started/continued any interesting projects this week?
6:07:49
beach
I collaborated with jackdaniel on Clostrum, which is an extraction of SICL first-class global environments to a separate repository.
6:08:21
beach
And I am working on an "AST evaluator" that will be the basis of a general-purpose cross compiler.
6:09:29
beach
And jackdaniel will create a bunch of macros that are adapted to use Clostrum for ECL.
6:09:53
aeth
Will we see it in all of the major implementations, like with package-local-nicknames last year, or are there significant barriers to implementing it?
6:10:03
beach
Then, Clostrum plus those macros, plus Eclector, Cleavir, Trucler, can be used to cross compile ECL code.
6:10:59
beach
The main barrier is that macros with compile-time side effects, like DEFUN, DEFGENERIC, DEFVAR, etc. must be adapted to use Clostrum.
6:11:38
beach
On the other hand, while I said it can be used as a cross compiler, nothing prevents its use as a native compiler.
6:12:08
beach
And then, it would be normal for an implementation to replace its existing macros with Clostrum versions.
6:12:51
beach
I myself am doing the same work as jackdaniel, but for SICL, since SICL did not use Clostrum in the past.
6:18:57
beach
And the interesting part about the AST evaluator (if it works, which seems to be the case) is that it translates Cleavir ASTs to host Common Lisp code in a way that the resulting code accesses the Clostrum environment.
6:18:58
beach
That way, the host global environment is not involved, but the code can still be compiled by the host compiler, so execution should be fast in most host Common Lisp implementations.
6:20:47
beach
ldb: A single generic function TRANSLATE-AST with a method for each type of AST class.
6:21:09
aeth
beach: so if SBCL were to adapt to support it, then it would compile code as fast as "normal" SBCL?
6:21:55
beach
aeth: A bit slower because it needs to go though generic functions to access the global environment.
6:22:24
aeth
beach: ah, so the dynamic variables would be a bit slower, but the lexical ones (and functions) wouldn't?
6:23:15
aeth
sounds like a reasonable sacrifice to me... the only place where there are tons of dynamic variables is the IO streams
6:24:04
aeth
(dynamic as in dynamically scope... technically "special variables" in CLHS terminology iirc, in case anyone was confused)
6:24:08
beach
Maybe so, yes. But the main interesting aspect of this thing is that it could be used for bootstrapping a Common Lisp implementation like ECL.
6:24:43
beach
You could potentially compile system code on the cross compiler, say to C, and then build the system that way.
6:25:33
aeth
beach: Could it be used to provide a global lexical environment for languages that compile to CL that have lexical globals? (Even though CL itself doesn't.)
6:26:58
beach
Well, every aspect of every ingredient (Clostrum, Cleavir, Trucler, Eclector, AST evaluator) can be customized, so there is great flexibility for these things.
6:30:36
aeth
hmm, so if this was standard "middleware" of sorts, we could "fix" the underspecified nature of DECLARE, at least to some extent
6:32:18
aeth
At the very least, there could be more control. e.g. maybe the user could choose to ignore the (safety 0) ignore of type checking in e.g. SBCL
6:32:42
aeth
while on the other hand, implementations that just ignore DECLARE altogether could have this middle layer insert type checks
6:33:48
aeth
and in particular OPTIMIZE is allowed to have extra optimize qualities, so this could insert new ones, perhaps even programmatically by a library!
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)