freenode/#lisp - IRC Chatlog
Search
0:58:10
aeth
dlowe: I will probably use "true" and "false" in my SXP file format because dealing with t/nil vs. #t/#f/() is a mess and those are just the two languages where it's the most trivial to implement an SXP reader
0:58:54
aeth
No ()s at all. All lists will require a first element. That kills an ambiguity issue with e.g. using lists like JSON's [] and plists like JSON's {}
0:58:55
White_Flame
and then there's true/false/null/undefined, and zero vs non-zero, etc across other languages
1:00:09
aeth
I like how CL uses nil as false and as null, effectively meaning that there *is* no null, since it's more of a false than a null.
1:00:27
aeth
Using it as the empty list, too, can cause some ambiguity issues when serializing to/from a text-based format, though.
1:01:20
aeth
Your naive s-expression writer probably won't know when to print nil as () and as NIL and will probably err on the side of too many NILs
1:03:48
aeth
Too bad Advent of Code dropped at the wrong time for me. Well, I mean, it's not like it was going to appear at some other time.
1:04:50
aeth
I can tell when I'm too exhausted to have time for CL when most of my comments are things like comments and docstrings instead of substance. (It's still pretty useful to document code, of course.)
1:08:21
White_Flame
aeth: technically in the image (but usually not in serailized data), there's NIL, non-NIL, and unbound
1:11:08
aeth
I mean, general and portable. Images aren't even portable across versions typically afaik
1:11:32
White_Flame
but one could consider unbound to be a "special value" tested with unboundp (sort of like NaN tests need a different predicate), as that is also how it's often implemented
1:12:02
White_Flame
although I don't believe anything in the spec considers unboundness in that sense, especially with the history of a-list environments
1:13:54
aeth
White_Flame: The easiest way to handle serialization of an instance of an arbitrary class is to make the user deal with it
1:15:35
aeth
Some architectures are easier to serialize than others, e.g. the Entity Component System that's currently popular in game engine dev
1:26:59
pfdietz
I want serialization (in the sense of being able to put them in fasl files) of closures and lexical environments.
1:36:08
vsync
what's a good word for "I've completed the first pass over some work and there may or may not be more work to do after handing it off, which fact I may or may not actually already know"?
1:50:52
vsync
oh, slice because rather than a single-purpose "split this string into single-char strings", I made something to slice up a sequence into equal lengths and then defined string-char-strings in terms of that
1:51:33
vsync
unless this already exists I have plans to augment it with many lovely keyword arguments
1:52:00
vsync
could it be implemented in terms of split-sequence-if? perhaps, but this seems clearer and, I think, more performant
1:53:10
White_Flame
I've heard the notion that 10-12 list items is where it becomes faster to use a hashtable than searching the list. Has this been measured for Lisp implementations, or do you think it's more specific to other-language implementations?
1:53:56
vsync
mfiano: I thought I had seen that somewhere, but when I looked at util packages it seemed to be an alias for split-sequence
1:57:07
mfiano
vsync: actually partition is for splitting based on a predicate function. "batches" is what you want. It's found in a few libraries such as serapeum
2:00:16
vsync
tanagra, a function which takes a function designator and returns a meme reference if available
2:19:30
mfiano
White_Flame: Instead of emoji, just use combinations of unicode whitespace and non-printable character symbol names.
2:21:58
mfiano
You'd be left with a series of parens, and you could change the dispatching characters for them to be similar
2:31:21
kmeow
I have an array defined like (defvar arr #('(5 "David") '(3 "Sarah") '(2 "Alex"))), but doing a (car (elt arr 2)) gives me QUOTE, which is not what I was expecting [since (car '(3 "Sarah")) gives 3]
2:32:23
kmeow
I know how to get the numbers out of those lists in the array, but I don't understand what's going on exactly
2:34:44
White_Flame
try (vector '(5 "David") ...). That's a function that will evalate them as parameters.
4:48:15
no-defun-allowed
fengshaun: Wikipedia tells me the name beach had in mind "is the French certification granted to certain French geographical indications for wines, cheeses, butters, and other agricultural products."
4:55:26
fengshaun
I don't have any projects that lend themselves to high level languages, so AoC is a good place to do some lisp
4:56:01
beach
fengshaun: I have a web page of suggested project in case you are looking for something.
4:58:46
aeth
fengshaun: one of these days some unfortunate person is going to read 'a web browser' from the list, not realize how hard it is, and 5 years later actually have one written
5:14:52
beach
And "web browser" can be thought of as a collection of modules for displaying text, images, movies, PDF documents, etc.
7:26:35
mfiano
Is McCLIM usable on modern displays yet? I had tried a couple months ago and it was not.
7:31:38
mfiano
CLX does not properly consult the X resource database. As such, on a high DPI display, the cursor size is so tiny that you can barely see it, let alone accurately manipulate it. The same for font sizes, etc, although there are workaround hacks for them, unlike the cursor.
7:39:42
mfiano
CLX. X11 apps are to query the X resource manager for information such as the DPI. CLX does not
7:40:16
beach
It is true that CLX has not kept up with X11 evolution. An update is needed. I would like to see it use more generic functions as well.
7:47:14
MichaelRaskin
email client for the modern mess would probably be fine-ish, given it can just refuse to do any scripting. A Web browser nowadays is not a collection of modules for displaying sane documents, it's a damned operating system with API creep and compatibility expectations creeping apparently beyond the scope of POSIX…
7:48:38
beach
MichaelRaskin: Is your description of the current state of things a necessity, or just the result of the use of traditional language and linker technology?
7:49:23
MichaelRaskin
It is not a necessity for bulding a useful Web, but it is a necessity to use modern government Web services
7:49:26
mfiano
I did get a chance to learn McCLIM on a friend's computer, and it was nice. Although sometimes it would crash X11 completely with a memory error, so I'm sure CLX can be made more correct on multiple counts.
7:50:28
MichaelRaskin
(and many commercial services are worse, not better, than the government ones)
7:50:51
beach
mfiano: Some of those problems have been fixed by avoiding the execution of code that would make the server crash.
7:51:54
beach
MichaelRaskin: What I meant to ask was whether it is a necessity for a web browser to not be modular.
7:52:26
mfiano
I'm not sure whose fault it was, but I could reliably crash the X server by resizing a McCLIM window.
7:52:29
beach
I fail to see how such a property could be the fault of the particular web sites being consulted.
7:53:11
beach
mfiano: It is definitely a server problem, but like I said, things have been fixed with workarounds.
7:54:10
mfiano
I wouldn't know. I haven't had a computer where McCLIM renders visibly in about a year.
7:54:20
no-defun-allowed
A web browser is modular (one may decompose one into rendering engines, parsers and script interpreters/compilers, at least) but the stages one would also imagine (read the file from the server, read any dependencies like scripts and stylesheets, then render it) are expected to be very interleaved.
7:56:06
MichaelRaskin
Browsers are kind of modular, but in your classification most of the complexity is just one part, Web APIs. Then there is CSS. Then there are some small and nice additional modules.
7:56:52
MichaelRaskin
And of course modern browsers try to do Web API implementations kind of modular (however they are eventually brought together), but it is a huge mess just by size
8:01:10
MichaelRaskin
Well, CSS might just be a small number of huge modules that are hard to modularise further, and in Web APIs there are large chunks where Blink breaks the spec, and Gecko implements both the proper and Blink behaviour, and to test the result you need enough APIs to test against the trash-quality websites that actually use this API (and a ton of others)
8:03:56
beach
I shall have to take your word for it. I don't know enough of web technology to understand.
8:07:46
MichaelRaskin
I agree that Web APIs are just a large pile of kind-of-modularisable things with imprecise spec and compatibility concerns, so they can be written part-by-part. But for that level of modularity Object Pascal is enough.
8:08:23
MichaelRaskin
I guess adding just enough JavaScript support that Lobste;rs submission form works is nice and doable and modularisable
8:08:30
beach
I don't understand why you brought up Object Pascal. Is that what things are typically written in?
8:08:56
MichaelRaskin
Just to say that facilities for modularisation have not be a bottleneck in the last 30 years
8:09:36
MichaelRaskin
These things are written in C++, or in Rust nowadays. It looks like Rust has enough memory safety to be a fully sufficient choice for them
8:10:26
beach
I don't know Object Pascal, but anything with manual memory management or that does not use uniform reference semantics is going to be problematic for modularity.
8:13:40
Shinmera
Implementing an HTML renderer is a big task, but doable. Implementing an HTML5 renderer probably already not. Implementing a CSS renderer is a gigantic task not even the big players can keep up with.
8:16:58
MichaelRaskin
I think one can list «pretty damn bad» Web APIs for a long time without much effort…
8:18:51
no-defun-allowed
The part I dislike the most is that whitespace is significant. If I write <span>foo</span><span>bar</span>, it is different to <span>foo</span> <span>bar</span>, which is sometimes what I want, but also sometimes not.
8:20:01
no-defun-allowed
Or maybe that's a CL-WHO problem for not letting me choose in places where it matters, like disabling whitespace between elements which I use to create a bar graph, but keeping it everywhere else to make the source more readable.
10:53:55
edgar-rft
The funny thing is that HTML originally was meant to be a *simple* markup language.
10:56:19
no-defun-allowed
All of cl-who is compile-time, right? So I couldn't set some magic variable or something to change the whitespace mode?
10:57:22
no-defun-allowed
I could probably embed another with-html-output macro inside the body with different settings though.