« first day (4519 days earlier)      last day (620 days later) » 

00:27
@RydwolfPrograms what's wrong with grounding to power stations?
01:00
Sandbox posts last active a week ago: Print every finite string
@Neil Tbh I don't actually know, I've just heard several people knowledgable in electrical stuff alluding to it being bad :p
 
1 hour later…
02:28
"Ground" is not the same potential everywhere, and sometimes when you connect two different grounds you can get a spark
In sensitive equipment, that spark can crash the machine
shame malbolge isn't in the data
is there even *anyone* capable of actually writing it other than kamila szewczyk
isn't there a compiler that targets malbolge now
ooh is there
that sounds
interesting
Knowing her, probably
Oh wasn't it a Lisp?
02:33
oh yeah i think i remember now
and yeah i'm pretty sure she made it lmao
it was something really low level, I thought it was an assembly but I could be wrong
(using the compiler still wouldn't count as using Malbolge tho, I can't claim to know x86 machine code as a Rust user :p)
i think it may have used s-expression syntax but otherwise been low level? kinda like wasm
Oh speaking of, quick Rust question
In the statement let i = 1;, what's the inferred type of i?
i32 isn't it?
02:34
yeah i'd assume i32
Or possibly u32
I know it's 32-bit tho
ah okay
but it's probably liable to infer to something else depending on how it's used elsewhere
or maybe it's size actually
actually probably not
02:35
@UnrelatedString Wait, does it really do that?
I'd assume so
i'm just too haskell brained to imagine it not doing that :P
Swift only infers it based on declaration, not usage
Wait hang on
@UnrelatedString I kinda want to start using Haskell, but I have no idea what I'd use it for
02:37
I think it actually doesn't default to any type of int
@RydwolfPrograms the heck does it default to then, double?
It looks like it keeps track of it as just an int of an unknown type
E.g.:
It's trying all of the possible int types
what if you let mut i = 1 then?
Tho dbg!(i + 2) does compile, so it must be picking a default
02:39
but in the absence of any other type data whatsoever, what does it behave as when it is valid
yeah exactly
figures :P
This is coming from a conversation about reasonable defaults and integer types
in basic cases it assumes i32, but when you do stuff like call some non-trait method e.g. i.saturating_sub(j), it complains about i not having a concrete type
02:40
i32 is basically the default for the programmer too, so it checks out :P
@RydwolfPrograms Wait, does Swift beat Rust here? What if you let x: f64 = 1;? Does that just fail to compile?
Because let x: Double = 1 is valid Swift
02:42
you also can't pass int literals into function that expect floats, etc.
ExpressibleByFloatLiteral extends ExpressibleByIntegerLiteral in Swift
yeah, {integer} and {float} are strictly disjoint in rust
Actually a question on not allowing .less floats could be interesting
except 0f64 works
In theory I like the idea of forcing floats to use ., but it's kinda annoying in practice
02:44
yeah same lmao
@Bbrk24 wait there are dedicated traits for specifically if literals work? that's nice
Like I like using 1 / 2 instead of 0.5 in situations where a fraction makes more sense, and Rust makes me write 1.0 / 2.0
@UnrelatedString Yeah! And you can implement them yourself
in haskell integer literals are just straight up Num a => a
@Bbrk24 Rust needs something like this....to_bigint() gets sooo annoying
(if it doesn't have it already, idk)
There's Integer, Float, Array, Dictionary, Nil, UnicodeScalar, ExtendedGraphemeCluster, and String, off the top of my head
probably also Boolean
@Bbrk24 now where this bites you is that -0.0 and -(0) as Double are the same thing, but different from -0 as Double
02:47
LMAO
@RydwolfPrograms 1. / 2.?
is it because the as binds more tightly than unary minus but literal syntax also includes negation explicitly
You're right about the second part
so -0 as Double is effectively (-0) as Double but -(0) as Double is effectively -(0 as Double)
I can get how traits for literal translation can be useful, but it would have to work at like proc-macro level, and break existing literal inference unless you are forced to write 100000000000000000000BigInt or something
02:48
all unary operators are higher precedence than all binary and keyword operators, technically
@UnrelatedString but yeah that's exactly what it's doing
IMO as is bad, since there is no precedence it could be given that wouldn't cause confusion
Swift gives it the same precedence as is
@Bubbler Oh Swift has you here,
let x: UInt8 = 10 // fine
let y: UInt64 = 1000000000 // fine
let z: UInt8 = 1000000000 // doesn't compile
@UnrelatedString Strictly speaking it's doing (-(0)) as Double, but there's only one overload of func - that is (_) -> Double, which forces the literal 0 to be Double
@Bbrk24 so is that the integer literal -0 is always just treated as 0, but if you negate the polymorphic literal 0 it's been inferred as Double "before" that?
yes
02:55
Or you can just write -.zero for the same effect as -0.0
All numeric types are required to have a static var zero
This comes from AdditiveArithmetic, which has three requirements: zero, +, and -
oh, and the empty-left . infers the right type to take it from? whoa
zero being the name for the additive identity
@UnrelatedString It's my absolute favorite feature of Swift
You don't get the danger of C enum, but you don't get the redundancy of C++ enum class
does it only work for static constants of the same type that contains them
i was about to ask what the point is if it's so limited in scope but then you mentioned enums :P
that is so clean
02:58
also works for static functions! can't think of an example off the top of my head but .foo(bar) is allowed
you know what else this works for?
could be used for, like, factory kind of stuff maybe
.init(), equivalent to C# new()
ooooh nic
e
02:59
Combine this with the fact that traits "protocols" can require inits,
Okay I just realized something horrifying
and the implementation of numericCast is just .init(x)
. could be a valid identifier without property/method access being ambiguous
Even with a .. range operator
Swift requires that an operator that contains a . must start with a ., so .* is valid but *. isn't
03:01
Wait actually making the . property of any value its current owner could be interesting
The most feature of Swift is .self. Not the identifier self, the property
x.self is equivalent to x in 99% of cases
E.g., if you store a reference to the name property of a Dog in a separate variable, you could do dog_name.. to get a reference to Dog, with .. acting like shell ..
...what are the 1%
The fact that you can't just say Int to get the type object, you need to say Int.self
plain Int is ambiguous between Int.self and Int.init
Interesting
03:03
amazing
So the compiler simply forbids inferring Int as Int.self
@RydwolfPrograms Took me a moment to realize you meant the path component and not some obscure shell builtin
One time as a joke one of my coworkers wrote foo.self.self.self.self.self
The real use for .self is the identity key path \.self
Or it would be, if that weren't utterly broken
This is how you get "cannot convert 'T' to 'T'" errors
You think I'm joking? No, I'm not, and I'm mad about it
@Bbrk24 no? Why would I think you're JoKing?
you're Bbrk24
ugh
key paths are another one of the coolest things about Swift
still got it all these years later :p
Key path literals are implicitly convertible to functions, so \.foo is usable instead of { $0.foo } for shorter code in some cases
But they can do so much more than that. You can use it to find the offset of a property in a struct, for example
You can use them for dynamicMemberLookup which is huge in some cases -- example
03:46
I am definitely doing something wrong because there's no way this bugfix is
while (getchar() != EOF) {}
clearerr(stdin);
 
4 hours later…
07:32
What would be a valid use case for barriers? I don't see why you would want tasks to end at the same time at no specific order
07:43
Joining forked threads back into a single thread
Join waits by default though
Sorry guys, I just needed to get in a popular chat. I used to know a well-formatted document style alternative to Words or Docs. Does anybody remember what it was called? There was even a converter online.
Markdown?
It's latex
I foundi t
No and yes, it's easier to write in Markdown, but I don't have an editor for it that is not free on MacOS.
Why would you pay for a markdown editor?
08:08
There's no free editor for Markdown unless I use JetBrains Webstorm (paid editor)
I would say VSCode is probably your best bet
There are also plenty of free online editors
Latex is good though, looks better too
markdown is also trivial enough by design that you probably don't need much more than a plaintext editor gives out
A live preview is helpful but that's really all you need
Any other features just get in the way
08:20
@UnrelatedString GitHub gives a live preview
yeah as mousetail said that is basically all that you'd want :P
@UnrelatedString I also think it has a little syntax highlighting, which can be helpful.
it might be very helpful for se chat markdown
SE chat markdown is very non-standard, it would be very hard to find a external editor that matches it's syntax
i highly doubt one exists
08:25
There is one problem with modern golfing languages, even Vyxal: they use characters that aren’t on your keyboard.
Unfortunately keyboards don't have 256 characters
08:42
@mousetail external?
external to se
Like a third party previewing tool
Even SE doesn't have an editor for SE chat markdown (or for main-site markdown, for that sake).
They have preview for main-site markdown and have a full WYSIWYG editor as a experimental feature
I have it enabled on meta, it's not as bad as you'd expect
The preview for main-site markdown doesn't match main-site markdown syntax.
08:45
True, differences are usually quite minor though
@PlaceReporter99 that's why vyxal 3 has both a literate mode and sugar syntax for ascii only golfing
LaTeX always look better and more readable than Docs or Words :p
The markdown is more used for online purposes. I'm using Overleaf editor to create a LaTeX document for printing.
For printing laTex is better
100%
 
2 hours later…
10:35
@lyxal does it have that Charcoal feature where you can code up in verbose mode but it gives you markdown for the succinct code?
It does
11:06
real lambda calculus fanboy moment
will work on the backend until it can run stuff, and then will do a web frontend that takes care of golfed encoding
one big idea is that I can also write a golflangy lang on top of this backend too
 
1 hour later…
12:28
@lyxal why wouldn’t it allow you to just type in hex bytes like ff0da3b1?
because literate mode + sugar trigraphs have more semantic meaning than just hex bytes
(creepy silence)
@PlaceReporter99 [1, 2, 3] { 4 times } map is much more readable than 235b317c327c33235dd0347d4d
as is #[1|2|3#]#.{4#.*}M
#[1 | 2 | 3#] #.{ 4 #.* } M with better spacing
@lyxal I can interpret that it says #[1|2|3#]�4}M.
ah, but you've not used the right codepage
#[1|2|3#]λ4×}M is what it's supposed to be
so while hex bytes reflect how the program is stored (assuming no fracbyte shenanigans), the sbcs form and ascii stuff leads to a better user experience
and a good user experience is key to people wanting to use your golflang/esolang/praclang
12:44
maybe not esolang
I would say good ux would make people want to use an esolang
True but do you want people to want to use your esolang?
well yes
My esolangs are typically only used at gunpoint and I'm proud of that
 
6 hours later…
18:21
@mousetail cool, can you link them (I’ll search on GitHub in the meantime.)
@mousetail Note on this repository: If it’s really top secret, then make it a private repository.
18:59
0
A: Sandbox for Proposed Challenges

DadsdyPrint the input times infinity Make a program/function that prints the input of the function infinite times, separated be a line break. Do note that the output must be to stdout. tags: code-golf

@PlaceReporter99 It's not top secret, my top secret repos have boring names so nobody cares to look at them
@PlaceReporter99 This one: github.com/mousetail/celltail Despite the quality of life features making a functional program in this language is incredibly difficult. Computing the function is easy but halting is very hard.
> nubmers
Placing letters in a reasonable order has never been something I'm able to do
> attribibutes
19:51
I thought I remembered a way in python to abuse the interenting to change the value of integers so that 1==2 but I forgot how to do it. It involved abusing the fact that ints are pointers in python. Does anyone know how this was done?
20:03
I’ve seen this in Java but not python
20:27
The "make 2+2=5" pop con has an answer like that iirc
 
1 hour later…
21:49
0
A: Sandbox for Proposed Challenges

attCompute the maximal Ducci cycle length A Ducci sequence is an \$n\$-tuple sequence obtained by repeatedly applying \$(x_1,x_2,...,x_{n-1},x_n)\to(|x_1-x_2|,...,|x_{n-1}-x_n|,|x_n-x_1|)\$, taking the absolute differences between cyclically adjacent elements, to an initial tuple. When the initial t...


« first day (4519 days earlier)      last day (620 days later) »