« first day (4441 days earlier)      last day (393 days later) » 

12:50 AM
@lyxal what am I looking at and why would it upset anyone?
 
> Rust free forever
 
1:03 AM
@Bbrk24 I mean, such sites usually are wikis (e.g. Wookieepedia)
 
 
6 hours later…
7:22 AM
Pain
 
8:14 AM
... au chocolat
 
That stuff is tasty af
 
 
4 hours later…
12:46 PM
LDQ Should iterables and iterators be different things?
 
1:07 PM
I think so. It'd be weird for a set/array/dict/string to have a .next() method
Swift calls the former "Sequence" instead of "Iterable," but it does have the distinction. The only real requirement of Sequence is the makeIterator method, which means it's very easy to make an iterator iterable: just add func makeIterator() -> Self { self }
JavaScript Generators are what TypeScript refers to as an IterableIterator -- that is, both Iterable and Iterator, in much the same way I just described.
I don't think it would be unreasonable for a language to have interface Iterator extends Iterable, but they should still be distinct.
Like if we just consider an array to be
struct Array<class T> {
  T* const buffer;
  const int count;

  T& operator[](int idx) {
    return buffer[idx];
  }
};
How could that implement next()? You'd need to add a third stored property, nextIdx or something. Which I don't think an array should have
 
@hyper-neutrino Yeah but the wiki- part has given its meaning to the -pedia part too through osmosis. Now that vyxalpedia exists, vyxal can be edited by any internet user as well.
 
Yes, that's how github works
 
ssshhh
Well I mean, not unless you want to make a lot of people mad
 
You'd have to fork it probably
 
Well I mean you can edit your own copy of like, anything lol
 
1:21 PM
but with github you can open a PR to get your changes back in the original
(granted, they're still free to say no)
 
laughs in required approvals
 
@RydwolfPrograms fair enough
 
I know some madlads who have a bot that automatically approves and merges PRs if they pass certain automated checks. That would create more the "wiki" idea
 
that just sounds like auto-merge with extra steps
 
It's literally auto-merge
 
1:26 PM
We should do that for OpenSSL and the Linux kernel
Sure some of the changes would be bad
 
@mousetail that's what I said
 
You can always revert them
 
@RydwolfPrograms I had a classmate who was convinced the entire Linux kernel should be thrown out and rewritten in Rust
 
...as it should?
 
unironically, I could not convince him otherwise
 
1:31 PM
Why would you want to
Every giant piece of software written in C is a ticking time bomb
 
At some point it's easier to use C than to keep writing unsafe everywhere
 
Or you could just avoid unsafe code
And put the necessary stuff in isolated places
Which is what having to write unsafe is meant to encourage you to do
 
@RydwolfPrograms ...you're being facetious aren't you
 
?
Vulns are discovered all the time from things Rust trivially prevents
In very very important software
 
('tism moment, I have no idea how to read your messages)
Sure but throwing the whole thing out and starting over from nothing?
 
1:35 PM
Sure
It'd take a while, but the kernel already supports Rust code, you could do it gradually
 
Also, aren't there some places where a pointer can be 0x00000000 and that's not nil, it's just, a valid pointer? Does Rust have any support for that? I know Swift doesn't
 
Kernel doesn't "support rust code", just modules
 
@Bbrk24 Rust is about as low level as C
(if you leave out the standard library)
 
@Bbrk24 That might break, since Option<&x> is guaranteed to represent None as just a null pointer
 
Yeah that's my point
 
1:38 PM
But you could also just not put it in an Option
 
Though you may be able to set some compiler functions to disable that feature
 
Or reimplement Option without that optimization
Which is all of four lines of code
 
@RydwolfPrograms That would mean you couldn't use any libraries at all, a Option<&X> is super common
 
Libraries? In a kernel?
I don't think that's a concern
 
Zig has different T.*.allowZero and T.*.? types iirc, they both have the same memory layout as T.*, but then if you have both allowZero and ? then it doesn't
 
1:39 PM
True you'd be using #[no_std] probably
 
I don't know about Rust, but if you reimplemented Optional in Swift, you'd lose massive amounts of syntactic sugar (e.g. if let)
 
You can use if let with custom types in rust
 
Swift lets you say if let foo as shorthand for if case Optional.some(let foo) = foo as a special case in the compiler
 
All you'd lose is ? I think
And some convenience things like Result::ok
 
1:41 PM
There is a experimental feature that allows you to implement ? for custom types, when that gets stabilized you'd be able to implement that too
 
But, you only need the special Option in the (likely pretty rare) cases where you're both storing a pointer, and one that could be all zeroes
@Bbrk24 Yeah looking at Redox (a kernel written in Rust), I don't see much unsafe
 
huh
 
Only ones I can find are in places where it's safely isolated and probably required, like Deref traits
 
Still, I feel like there are better things to do than throw the entire Linux kernel out and start over. It would be better to replace it piece by piece, as bugs are found and new features are added
 
For sure
 
1:48 PM
Well I mean that's probably what they mean
 
no it was not.
 
There's a wide range of opinions on this matter, there are for sure people who would prefer to shift+delete everything
 
Wait is shift+delete a thing
What's it do
 
No recycle bin, actually delete
 
Oh right
 
1:56 PM
conversation somewhere else reminded me of this diagram i made once
   C      ObjC     Java     Swift     Rust
 <----------------------------------------->
  struct           class             struct
composition      inheritance       composition
 
I mean ideally we'd burn every piece of software and hardware in existence and start from scratch
 
Rust is close to C in many ways actually
 
I don't think it's on the far side of Java in any meaningfull aspect
 
trait
 
1:57 PM
It's like C++ and JavaScript had a baby who against all odds went to Harvard
4
 
Java doesn't really have traits though right? Interfaces are very different
 
neither does C
 
Yeah traits are kinda a weird third thing, but most of its syntax and ideas come from C/C++
 
How does that make it more Java than Java
 
Make the diagram a circle then we'll talk
 
1:59 PM
Triangle might be more appropriate
 
@RydwolfPrograms I made this when the IQ bell curve meme was popular. I had more examples towards the middle (e.g. C++ at the same point as ObjC, JS at the same point as Java) in one version
 
ah
I mean IMO (early) C's a better language than Java. At least C was simple, and upfront about its flaws
 
@mousetail traits are interfaces you can implement on anything
 
Yeah but they'
 
idk about Rust traits, but Swift protocols let you require inits and static things
 
2:03 PM
@mousetail ofc
 
Java/C#/TS interfaces don't
 
Rust traits let you add static methods
Since a static method is just one that doesn't take a self
Traits don't really "require" things tho, they add them
 
@mousetail in kotlin, they are different, but you can iterate an iterator
 
I already left a long paragraph about iterableiterators
 
gotta add my own thoughts :P
 
2:05 PM
Yes thank you for that
Java-style interfaces are odd because the same function can implement different interfaces
 
Swift does that too with its protocols
 
@mousetail same... function?
 
Method
 
There's an experimental feature to prevent this though, @_implements
 
If 2 interfaces happen to have a method with the same signature the same method will implement both of them
 
Even if they have a entirely different purpose
 
that shouldnt happen. if 2 methods have the same signature then... they have same/similar purposes?
 
No mousetail's talking about a single method
 
yes ik, i meant the 2 methods in the 2 interfaces
 
Oh right
Yeah but what if they don't do similar things
 
2:08 PM
thats bad design
 
One concrete example: 2 libraries create a interface for a event handler. One method has a boolean parameter inverted though. You couldn't implement a method to implement both interfaces
 
@Seggan On whose part
 
the interface writer/implementer
 
Which one?
 
Even if both variations are entirely reasonable
 
2:09 PM
Both interfaces could make perfectly reasonable decisions
If they don't know the other exists, nothing they can do about it
 
then dont implement both interfaces
 
What if you need both?
Traits eliminate this problem entirely
 
What if you want to support both libraries?
A very common thing to do
 
have inner classes then
@RydwolfPrograms how
 
This is why Swift has @_implements
 
2:10 PM
how does the compiler know which function to call
 
You need to import traits to use their methods
 
interesting
 
Ah that's quite different from Swift
 
Of course you can work around it but it would be much more convenient if you needed to specify the interface you are implementing to avoid bugs and confusion
 
in Swift, you don't import individual types like in Java, you typically import whole libraries like you can in Python
 
2:12 PM
You can specify what you impelment in C#
Though in C# it's done in a weird confusing syntax
 
C# has weird and confusing syntax everywhere
 
True
also why name callbacks delegates? No other language uses that word
 
Yeah that confused me so much at first
 
Does anyone remember the name for types that are a subset of the values of another type
E.g., a char that can only be a lowercase letter
 
2:18 PM
oh thanks
Things like this really annoy me:
(..., char @ ('b' | 'n' | 'r' | 't')) => { string.push(match char { 'b' => '\x07', 'n' => '\n', 'r' => '\r', 't' => '\t', _ => unreachable!() }); ... }
 
I said float: right. Why has it gone to the top left corner
 
@RydwolfPrograms @?
 
@RydwolfPrograms I have to add that _ => unreachable!() to the match
Despite the fact that char can only be one of b, n, r, or t
Which hides possible bugs
@Seggan That assigns which variant of that list of possibilities is chosen to char
@Bbrk24 is there something forcing the parent to be wide enough?
Could be it collapses to 0 width once you make its child float
 
It was inside a flexbox and so it was following parent.alignItems instead
 
2:21 PM
@RydwolfPrograms like python case ['b' | 'n' | 't' | 'r'] as char?
 
I may have other layout difficulties as I'm trying to get this guy to occupy something else's margin
 
@Seggan Probably, idk Python's pattern matching syntax
I love how, since both Haskell and Curry are names for things, Haskell Curry seems like an obviously fake name
 
why are my buttons invisible
This div contains four buttons and the word "text" four times. I see the right fifth of a button, and the word "text" once.
 
they're shy
ask them nicely to come out
 
Code pls?
 
2:37 PM
<div id="menu">
  text text<br />
  <button type="button" onclick="setDarkMode(true)">Dark</button>
  <button type="button" onclick="setDarkMode(false)">Light</button><br />
  <button type="button" onclick="setHighContrast(true)">High-contrast</button>
  <button type="button" onclick="setHighContrast(false)">Low-contrast</button><br />
  text text
</div>
Plus a lot of sass
I tried again using grid layout and I actually see the right column now but not the left one
 
Well I mean the CSS is gonna be the issue, not the HTML
 
Oh I know what happened
I'm trying to make this wider than it has room to be
so the buttons are hidden behind <main>
I have the inspector panel on the right, and whether there's enough room depends on whether I have the inspector panel open
 
CSS is cursed
 
Apparently, 0 auto is valid for margin but not padding
 
2:54 PM
@Seggan what exactly is C# tho?
Microsoft's rival to Java?
 
pretty much
but its syntax is so bad i prefer java
im still trying to find a way to run kotlin in unity
or at least rust
 
I honestly prefer C# over Java
 
3:08 PM
i think unity used to support JS but they called it unityscript or something because it was a weird variant
 
i think it was a basic (the lang) variant, no?
 
idk sounds cursed tho
almost as bad as shudders actionscript
 
Aw, min(100%, max-content) isn't valid CSS
Oh, setting width: max-content; max-width: /* parent width */ does work though
wait, max-width: 100% works here? That's never worked for me before
 
3:49 PM
@Bbrk24 I think it's generally agreed that C# is better than Java in many/most ways. It was made later and they had a chance to improve on some of its mistakes
Although reification is really weird
 
@RydwolfPrograms it is pretty obvious that haskell is named after somebody, but it feels like way more of a last name
 
4:09 PM
@user tbh i dont see "many" differences
properties are nice ofc
 
The way you import namespaces instead of classes means fewer using/import statements, which is nice when autocomplete dies
The fact that generics actually exist means you can have classes with the same name but different number of generic arguments, which is useful in niche cases
 
@Bbrk24 when you use a good ide so autocomplete never dies
 
@Seggan Lots of QoL features
 
like?
 
I'm typing
 
4:14 PM
hrm chat got a new notification dot for pinned tabs?
its a much lighter blue
 
Getters and setters, ref parameters, that SQL-like syntax (idk why people use it but apparently they like it), reification (just looked it up and it's weird but also very useful)
Null safety
 
null safety? never seen it
 
I think you can make your own value types
 
refs shouldnt exist imo
@user yeah java getting those soon
reification too i think
 
@Seggan Older versions don't have it
 
4:17 PM
in any case, the syntax + MS casing/naming conventions just put me off
@user ig unity uses an older version then lol
 
I think it has covariance and contravariance too, unlike Java, where everything's assumed to be invariant
 
kotlin go brr
 
@Seggan Or perhaps they simply don't bother with it (it's an opt-in feature)
 
ah
 
4:18 PM
Yeah Kotlin's slightly better than C# but C# is slightly better than Java
Extension methods! I don't know how I forgot about those
 
The star board just disappeared for me??
 
@user Kotlin is much better than C# what are you talking about
 
How's that?
 
kotlins lambdas already make it better
plus java interop, not so jank naming/casing conventions
 
C# has lambdas too?
 
4:19 PM
but kotlin has better lambdas
 
I think Seggan's talking about syntax?
Which is subjective and a minor improvement imo
 
^^ + receiver types
 
Not a huge fan of receivers tbh
I get that they make DSLs much easier to make, but still
 
i love them
 
Some of these features I fluctuate between loving and hating
 
4:21 PM
I accidentally made a very strange-looking transition
* {
    background-color: inherit;
    transition: 0.2s;
}
Each element starts the transition after its parent finishes
 
Interesting, what's it for?
 
I'm trying to make it so that switching between dark and light mode isn't so sudden
but that's not it
 
@Seggan Wikipedia article if you want to see more about C#
 
ty
 
Even when I only put the transition on the body, the background-color: inherit makes it look broken
no transition then ig
 
4:23 PM
@user hrm apparently javas enums seem better than c# (no parameters accepted)
 
Yeah I like Java enums
They're not ADTs but they're nice
 
yeah Java's enums are its one good thing
Swift has Rust-like enums but sometimes I'd prefer Java-like enums
 
No, checked exceptions are also one amazing thing about it
I am prepared to die on this hill
 
@user then you will die
i dislike checked exceptions so much
mostly because of IOException being checked
 
4:34 PM
ObjC and by extension Swift use "Error" and "Exception" in the exact opposite way from Java
Generally, NSError is recoverable and NSException is not
 
lmao
If I make a language I'll be sure to have more descriptive names. Maybe Oopsie for a recoverable error and AAAHHHHHHHHH for an unrecoverable one
 
Or just don't do exceptions
 
Honestly if a language only had Result and not throw I probably wouldn't even be mad about it, it's a logical decision to make
 
Rust
Altho it still has a lot of flaws
 
4:49 PM
As long as you still have fatalError or panic! or whatever you want to call it
 

« first day (4441 days earlier)      last day (393 days later) »