« first day (4517 days earlier)      last day (622 days later) » 

00:54
> Learning your first language is the toughest. After that, it becomes "how do I do this in [language]" vs "wtf is a string".
why is this so true
> Until you need to use C and you still have to ask "wtf is a string"
idea: a language that compiles to github actions
The Above Idea™ has been copyrighted by Seggan Industries™ (All Rights Reserved™)
@lyxal also idea: a language where you have to ask "wtf isn't a string"
no rights reserved :p
(my idea is a bad one anyway; you can write actions in quite a few languages)
@lyxal JS
01:16
@lyxal tcl?
01:38
and probably most shell languages
 
7 hours later…
08:14
@Seggan copyright proof?
@Seggan YAML already exists
 
2 hours later…
09:46
possibly stupid question but how I can visualise LabColor(lab_l=65.0,lab_a=95.0,lab_b=119.0) ?
I just want to see what color it is
but super confusing. How can it be pure red??
lab is wacky like that
It does seem to be!
i think it goes slightly outside what rgb is considered to be defined as doing maybe
not that there's some perfect standard for how rgb comes out
2
09:56
yes it does. If you convert it to rgb you get something invalid!
I mean using the python module to do that
10:26
it isn’t. Wolfram alpha says there are minute parts of yellow and blue:

10 parts of (red) + 1×10^-15 parts of (yellow) + 1×10^-15 parts of (blue)
intriguing!
10:52
@PlaceReporter99 problem is, it "converted" it to RGB first, and ended up with LabColor(54.29,80.81,69.89)
11:42
well, it gave you a colour photo of a lab, what did you expect?
4
12:08
@Neil but it gave me a lab, not a Lab.
12:34
@PlaceReporter99 maybe that's its name too?
sit Lab, sit!
@UnrelatedString Yeah, if you've seen that curved color diagram, RGB can only ever cover a triangle within it
Usually (as depicted here) the red and blue are defined as the bottom corners of this diagram
@Bbrk24 so where is my value on there?
WolframAlpha actually draws it
If you scroll down to "Chromaticity diagram location"
12:52
that's pretty cool. Now I want to be able to do it in a free language :)
@PlaceReporter99 it's obviously a joke
@PlaceReporter99 but it's so hard to use
YAML > JSON for things like this, if nothing else because comments
I also like the bulleted list form for arrays
The one place that YAML sucks is that there's like seventy ways to do multiline strings (not exaggerating)
Okay 63, I was close
5481
A: How do I break a string in YAML over multiple lines?

Steve BennettThere are 5 6 NINE (or 63*, depending how you count) different ways to write multi-line strings in YAML. TL;DR Use > most of the time: interior line breaks are stripped out, although you get one at the end: key: > Your long string here. Use | if you want those linebreaks to be preser...

13:20
Things I like about YAML:
- Comments
- Unquoted keys
- Bullet-style arrays
Things I dislike about YAML:
- Everything about how it handles strings
13:48
@Bbrk24 but it's still drawing the RGB value though, isn't it?
@noodleman oh, there's a new strike.
isee
ugh, why does Firefox developer tools autocomplete trans to translate instead of transform?
14:07
@Neil because translate is more commonly used?
@Seggan does seggan industries have a GitHub repo or org?
14:45
No
Seggan Industries was a joke
@Bbrk24 noyaml.com
15:09
I got the Swift compiler to segfault
The repro is stupidly short
protocol P {
  associatedtype T
  var x: T { get set }
}

func foo(w: inout any P) -> Any {
    let value = w.x
    return value
}
 
1 hour later…
16:30
@RydwolfPrograms ... I don't, tho
17:30
oh right, you just get a cursed URI
But web-safe base64 looks more ✨aesthetic✨ anyway
@RydwolfPrograms Cursed b/c of slashes in the query string?
More because the +s are an encoding of spaces, but also that
@RydwolfPrograms Huh. But I don't recall seeing any +s
Base64 uses + and /
If you have never gotten any +s you've either gotten lucky, or happen to be encoding data in a form where the binary pattern behind + will never show up
¯\_(ツ)_/¯
17:33
Really I wish there was an additional character that counted as a word character
Since web-safe base64 has a much higher chance of you being able to double-click and highlight the whole thing, but -s still sometimes show up
I suppose you could do base 63, where A through 9 are their normal 6-bit codes, and _ is the five-bit code 11111
That does make the length of the data dependent on its contents tho, which can be a security risk
Fun fact: if you were to put raw %-encoded binary in a URI parameter (avoiding escaping characters that don't need to be escaped), you'd get slightly above 4 bits per character on average
@RydwolfPrograms Base85 ftw!
Base85 has that problem way worse doesn't it?
It's just less wasteful of bits
Yes, but once you don't care about the problem, you just get more data.
I mean I guess but in a URI base85 would be counterproductive, and URIs are like the one place where base64 is still useful
We use Base85 in TryAPL.
17:47
Plus base85 can encode illegal states, which is a minor issue but could be a security risk
(I guess base64 can too, tho)
@RydwolfPrograms Ooh, we might actually be vulnerable to that!
18:04
I got a Swift program to wholesale delete main — there’s not even a ret or ud2
18:44
@RydwolfPrograms just use unary… except the link would probably be unpasteable.
19:15
URLs are limited to 8kB regardless
19:36
That's browser specific
I know for sure I've gone to URIs in the megabytes
Mostly TIO-style data-in-the-# ones, and data URis
I believe IE used to have a 8kb limit
@Seggan Ooh are people finally starting to not like YAML
I've always hated it for reasons I could never figure out
Idk why people always talk about JSON like it doesn't have comments. This is America, you can do whatever you want
Just...put comments in your JSON
Even Microsoft does it
(somehow typed that as "Microsoggy" wth)
It's not like parsing JS-style comments is exactly hard
19:50
npm blows up if you have comments in your package.json
Blow NPM up, an eye for an eye
(Nobody would complain if NPM vanished overnight)
Yarn would, it relies on npm to host the packages
Or add a "comment" property that gets ignored
The other thing I don't like about JSON is that it's impossible to line-wrap long strings
Does it not keep the trailing \ on a line behavior from like, every language with strings?
Chat MathJax'd >:|
19:53
The opening and closing " must be on the same line in JSON
It is impossible to line wrap
JSON is purposefully very simple in order to make it easy to parse
@Bbrk24 I don't think that follows the spec
LF is a control character, technically
A newline is "any codepoint" after all
I suppose that doesn't exclude NEL, PSep, or LSep, but
19:55
It's a control character
Oh hang on, the chart's just wrong
According to the BNF it's not "any codepoint", it's a specific set of allowed characters
@mousetail A control character is still a codepoint no?
That is almost any codepoint
Any code point except control characters it says on the picture
"Any codepoint except " or \ or control characters"
WAIT
I'm just dumb
nvm
I can't read
One complaint I have with JSON is no hex/octal/binary
19:58
Again it's super simple
I also wish things like JSON and YAML (not sure if YAML has this or not) had a way to distinguish between floats and ints
In some versions of YAML, 07 is a number and 08 is a string
That one is pretty annoying, I guess that's what you get when you name something JavaScript Object Notation
I guess we need ES2020ON
tfw your only integer type is bigint
20:01
I mean Python's in that category too
There is uh JSON5 which supports single-quoted strings and comments, among other things
Please tell me the 5 isn't taken from HTML5
Okay phew
It's from ES5
{
  // comments
  unquoted: 'and you can quote me on that',
  singleQuotes: 'I can use "double quotes" here',
  lineBreaks: "Look, Mom! \
No \\n's!",
  hexadecimal: 0xdecaf,
  leadingDecimalPoint: .8675309, andTrailing: 8675309.,
  positiveSign: +1,
  trailingComma: 'in objects', andIn: ['arrays',],
  "backwardsCompatible": "with JSON",
}
Hex but no octal or binary :|
(which were more recent than ES5 tbf)
How often do you use octal on purpose? And no, chmod doesn't count
20:04
Well not the disgusting leading-0 version god no
The 0o one
While the only time I've actually had a good use case for it was, surprise surprise, Linux file permissions, it's still worth including
Oh I think I'm finally going to get around to setting up rto.community
It'll be a free hosting service that gives you a few gigs of RAM, a few gigs of disk, and an hour or so of CPU time a day, plus a subdomain and TLS
So e.g., you could register project.rto.community and you'd be given a small VM where you can host the server for it
@RydwolfPrograms JSON is a serialization protocol, not for user-friendly configuration
Says who?
Maybe it was intended as the former (if it actually was)
But no way is that a true statement today
I've never seen JSON for config
Do you live in a cave
It's like, the most common way to do config stuff
20:10
Off the top of my head, NPM crates, Microsoft Terminal, New Posts/Sandbox Posts
I don't really software very much tho
appsettings.json in .NET
I meant user friendly config
sure they use json as a object storage format
Unless people are out there with custom front-ends for NPM...
Oh also runc, that's a big one (tho tbf it is mostly serialization since people tend to use a higher level layer like Docker)
Yeah you need to write your scripts as string literals in JSON. Packages you can at least manipulate from the CLI
The simplest form of syntax highlighting for a VS code extension involves writing regexen in JSON string literals which is just. so many backslashes
I actually really like using runc directly, as long as I don't have to do shudders networking
20:13
I guess Cargo and some other things use TOML?
Yeah, Cargo's TOML
But yeah, JSON is used for literally everything
SPM just uses a Swift file for configuration
@RydwolfPrograms I'll add settings for VS Code and VS Code-related stuff to that list
TypeScript uses Microsoft's "JSONC"
20:14
I wish JSON itself allowed comments
Shouldn't need this JSONC thing
"__comment": "Deserializer ignores this"
@Bbrk24 Java/Kotlin mostly either use Groovy or Kotlin
I have seen VS code docs honest to goodness recommend this
._.
I'm honestly surprised YAML isn't more popular given how much more expressive and readable it is than JSON
For user-facing stuff, that is
Serializing stuff with indentation is probably a pain
It has so many footguns
20:16
But you can stay away from the footguns fairly easily
and sixty-three ways to do multiline strings
JSON may be more unwieldly but at least I know exactly what to expect when I write it
Fair enough
20:17
@user What about when your IDE's syntax highlighter uses a different YAML version than the library?
Aren't they all at 1.2 now?
not kubernetes
VS Code's syntax highlighter still shows no as a boolean
:|
YAML's also ugly
20:18
No.
@user i heard a quote somewhere that goes smth like "people will abuse every feature" even if you dont
I've heard one footgun (not in YAML) described as "more gun than foot"
I'm gonna be pedantic and point out that footguns are guns that love blowing feet off, not some combination of feet and guns, so all or most footguns are more gun than foot :P
Context: C++ -fno-exceptions / /EHa is meaningless if you don't also recompile your copy of the standard library with it first
teehee I just found a big problem
Spin up a Docker container
Make an empty file called .wh.mnt
Then docker commit the container and spin up a container of the image it results in
mnt is gone
Lemme try it with bin
20:24
Wait what
That seems like a uh bug
@Bbrk24 Prefixing .wh. is how OCI containers indicate a whiteout
So if you create a file that starts with .wh., it tricks Docker into thinking it was deleted
(or actually, it probably tricks runc)
I really hate that part of the OCI spec so much
20:26
Ronald's universal number kounter? /ref
Like it is entirely possible that a .wh.-prefixed file could show up in the wild
And there's no way to escape a .wh.
overlay2 is at least slightly less cursed, and uses a 0/0 block device for its file whiteouts
1. .wh.home 2. ??? 3. Profit
You could probably find a vulnerability in some software because of this
I mean I guess there's not too many ways this could be a security risk, but it still feels like it shouldn't be possible
This is a really inexcusable flaw in the OCI spec tho
Maybe not a security risk, but a DoS risk at least
You should definitely be able to escape the .wh., which would allow Docker to properly do so when commiting the container's filesystem into a layer.tar
An even worse version of this would be if you could create an overlay2 whiteout in Docker, but unfortunately it's able to stop you
20:33
How bad is .wh.tmp?
Will mktmp just die?
Looks like it
But like, of all the dirs to hit that's probably the most subtle when you can just nuke /bin or /usr
This isn't super likely to be exploitable since you have to:
1. Have permissions to create a file in the parent directory of the file/dir you want to delete
and
2. The container has to be saved as an image then spun up again
Ooh I wonder if you can do this with a Dockerfile
That might create a more risky scenario, depending on how docker build actually works
(Opinion: Filesystems and file archival formats should have dedicated support for potentially nested filesystem layers, with whiteouts)
20:49
Wait how is it already almost 5
Conservation of boredom. With the Reddit strike, tons of people are currently bored, so us non-Reddit-users will have time pass slightly faster
5
@Bbrk24 conversely, with a very exciting event coming up for me, for me time feels ssssstttttttrrrrreeeeeetttttcccchhhhheeeeeddddd
Oh man, I had that recently :/
Combo itt with timezones and it gets even more annoying
@cairdcoinheringaahing speed up or slow down?
Slow down
Was waiting to hear if I got into my uni for my year abroad, and between US dates and US timezones, it seemed to take wayyy longer than it should have
(I did get in, btw :D)
20:59
Nice!
 
2 hours later…
23:24
I've now visited the site for over 2000 days :D
23:47
nice

« first day (4517 days earlier)      last day (622 days later) »