« first day (146 days earlier)      last day (194 days later) » 

12:58 AM
Me: Hmm setting the table metatable to itself should fix this problem, what harm can it do?
My computer: No error
Also my computer: StackOverflowError
 
@user Carp & Coalton made a bit of a splash at one point, but "statically-typed Lisp" is one of those things that a lot of people have set themselves to so you will find plenty out there
 
@Seggan ooh are we posting instances of lang dev going goofy? Because I just got a NILIT: points despite there is no such NILIT node in the generated AST with the value "points".
 
@MichaelHomer Ooh, Coalton looks quite interesting, though newer than Carp
I'd run into Carp before but none of the examples seem to have type annotations, which is what I'm interested in (or at least, I couldn't recognize any type annotations). Coalton's examples do have things that look recognizably like type annotations
 
@lyxal ah i found the problem. A missing break in a switch statement
this is like the 4th time I've been gotten by a missing break in a switch statement
why did people think it was a good idea to have flow through switch statements?
 
It is convenient if you want multiple cases to have the same code
Though case 1 | 2 | 3: would've been a nicer way to do that
 
1:07 AM
@user surely there was a better way of doing this though
That didn't lead to forgotten break bugs
 
Yeah, I mean, new languages seem to prefer | (or is it just a functional programming language thing?)
 
at the assembly level, a switch is just a multiway jump, and break; is an opt-in jump to the end of switch
 
Actually, Ruby doesn't have cases that fall through either and it's pretty old
@Bubbler That makes sense
 
@Bubbler that doesn't mean that there can't be an implicit break at the end of a case though
 
It exactly does mean that, that's what "opt-in" means
 
1:11 AM
It's easier for people making C compilers
 
Then break on the next case
@MichaelHomer I would assume that starting a new case would be opting in
Assuming there's replacement syntax for bundling cases
 
This seems like an adventurous assumption in reference to compiling jump tables in assembly
 
mm yes OutOfMemoryError delicious
 
case Something:
    do stuff;
    // new case, so insert a break here
    // automatically
case SomethingElse:
    do more stuff;
How is that an adventurous assumption? A new case is turned into break; case internally, never seen by the end user programmer
 
Somehow the "opt-in" part of that has been dropped
 
1:22 AM
Only at the end of a case. You only ever not break at the end of a case for flow through (unless of course you forgot to). That can be fixed with having combined cases
 
sometimes people write fallthroughs intentionally. they can't do that with your syntax
 
And then why does it need to be opt-in in the first place? That's just bugs waiting to happen from forgetfulness
@Bubbler make it opt-out then at the very least
 
Again, it's not opt-in if you make it mandatory
 
Opt in is what I have a problem with
 
Rabbit's switches don't fall through by default, but you can explicitly trigger a fall-through with a continue statement
 
1:24 AM
yeah, break being opt-in is not a good design in modern views, I can agree with that
 
That's what I'm saying. How is it that no one managed to think of that back then? Like at the very least it should have been somewhat known that forgetting breaks would be a common problem
 
@lyxal This is likely a good objection, but the proposal you made was fundamentally incompatible with the thing you said it wasn't
Of course they thought of it
 
@MichaelHomer I didn't realise opt-in was a term originally
I'd update it to be opt-out in hindsight
 
But, at the same time, it's unlikely that it was somewhat known, given that they were inventing the construct for the first time and there wasn't any programming experience using it
When you write the assembly by hand you do have to put the unconditional jumps in yourself
So it's a fairly direct translation of the idiom
 
C is portable assembly with syntax sugar
 
1:32 AM
@MichaelHomer I doubt the people making Java were the first to implement switch cases
 
all languages are just unnecessary syntax sugar, why even bother with this site?
@lyxal afaik they wanted to stay true to C
 
Many arguably poor design decisions in C come from simple term-by-term compilation strategies, where "suppress the jump if the case is preceded by continue" was unworkably complex
 
@Seggan They could have changed that one thing though
 
"language design to reduce human error" wasn't a concept until then I guess
 
also apparently in C# fallthrough in opt-in (with goto, ugh)
I think that, in this particular instance, goto is not considered harmful. — Thomas Owens Oct 6, 2008 at 19:32
@TalEven-Tov What if the switch is inside a loop? — Rawling May 12, 2014 at 14:10
btw, hows rabbit coming along?
you writing the stdlib yet?
i just need to implement errors, ternaries, and evlises in Metis, and i think im good for the base language (for now)
 
1:38 AM
@Seggan wouldn't that be the same as opt-in breaking from a switch inside a loop?
Feel like that's a solved problem
 
?
 
Or at least something that's been explored a lot
@Seggan I don't see what the problem is with the continue method inside a loop
 
should the continue continue the loop or perform fallthrough?
 
Perform fall through
There's precedent for acting on the innermost continuable structure
 
if you want the programmer to select between the two, you can use labeled blocks
outer: while n < 10 {
    switch n {
        case 1:
            do1();
            continue;
        case 2:
            do2();
            continue outer;
        default:
            do3();
    }
}
 
1:53 AM
True
 
 
2 hours later…
3:47 AM
I have a survey question I'm interested in about an obscure paradigm (i.e. seeking instances of something in notable existing languages using that model), but because of the paradigm I'd like to include golfing languages in scope if they are notable within that context; I still don't want theorycrafting or people's pet projects. Is there a reasonable criterion I could specify that represents significant languages that people use, without creating a free-for-all?
 
@user no im an aussie we just have a very strict teacher (and i was laughing very hard to a fault) so it was probably justified
@Ginger you pronounce it 'reds' (take that L)
 
@Redz oi fair dinkum
 
also my name actually happens to be Red
(name slash nickname but whatever)
 
@MichaelHomer depends on the paradigm, but for golflangs, anything with a rating >1400 here could be a good criteria, combined with star count on github
the golfing language tag on github could also be of interest
note that the tag wouldn't show golflangs like Jelly though
because Dennis apparently forgot to add it
 
4:04 AM
It's not so much shortness that I care about as that many people are actually using them, but probably those do correlate pretty closely on codegolf
 
being on the list means there's at least 40 answers in that language
and that number can be increased/decreased as needed
I have the script that generates the rankings + all the answer data
 
Yeah, it looks like a pretty good starting point
The reason I want to include them is it's a prime market for specifically stack-based languages where programs are written by people and especially for exploratory ones
 
filtering by at least 200 answers gives the following list:
Jelly:            1988
Thunno 2:         1982
Vyxal:            1968
Nibbles:          1966
Husk:             1863
05AB1E:           1809
Stax:             1794
Pyke:             1794
MathGolf:         1790
MATL:             1769
Japt:             1727
Pyth:             1719
Brachylog:        1681
Pyt:              1637
APL:              1513
Dyalog APL:       1474
J:                1470
Burlesque:        1460
CJam:             1449
Pip:              1413
V:                1404
k:                1326
ignoring the praclangs, and filtering out langs like Jelly, Nibbles and Husk (not stack based) that gives you a mostly good representation
 
Is using an explicit break; instead of an explicit fallthrough (continue;) in switch statements considered old-fashioned now?
 
I am trying to crowdsource some of my literature survey and this is the perfect collection of people to know about the intricate details of them
 
4:09 AM
the stacklangs on that list are:
 
@user16217248 continue; has no meaning in switch statements, no?
 
Thunno 2
Vyxal
05AB1E
Stax
Pyke
MathGolf
MATL
Pyt
Burlesque
Golfscript
 
@user16217248 I would certainly have fully-delimited cases in anything being designed from scratch, rather than just keywords to determine behaviour, and I think that's much more common in anything new than C-derived switch
 
@DannyuNDos Apparently it does in the language discussed here
 
Oh, I was thinking of C.
 
4:10 AM
Often that means no fallthrough at all, though
 
 
7 hours later…
11:39 AM
@Seggan reviewing my specs, I believe I had planned to use proceed for switch fallthrough and continue for loops
 
@Ginger proceed?
ginger I remember you're programming languages
me omw to dereference a pointer I don't know
 
12:16 PM
me when the Δᚠ
 
@lyxal Hrm no Fig? It had a lot of answers last time I checked
@user16217248 that was a hypothetical language tho
 
@Seggan well uh you see
it hasn't, really :p
I haven't worked on Rabbit for months
been doing various other things
 
What's the last State of the Language speech you can provide?
 
> "it's a mess"
I've got like 2k SLOC and none of it works
 
 
3 hours later…
2:59 PM
@Ginger ive got 2.3k SLOC and it works very good :P
 
;-;
 
 
5 hours later…
8:11 PM
It is a great day
I have implemented errors in Metis
By far the hardest part was all the jumps I had to calculate for the handler blocks, followed by stack unwinding (aaaargh!)
 
8:25 PM
@lyxal I would guess that switch was invented as a slightly higher-level way of writing a computed jump. The "skip the other jump targets" part is a separate construct in assembly and isn't even always desired
 
 
3 hours later…
11:28 PM
CMP: Should Constant Folding respect number literal sizes? What should (255ub+3ub)/2ub resolve to? (Where ub means unsigned byte)
 
error: this arithmetic operation will overflow
 --> <source>:3:5
  |
3 |     (254u8 + 3u8) / 2u8
  |     ^^^^^^^^^^^^^ attempt to compute `254_u8 + 3_u8`, which would overflow
  |
  = note: `#[deny(arithmetic_overflow)]` on by default
Rust does this
 
Not a bad option
 
with #[allow(arithmetic_overflow)], it does wrapping arithmetic
so (255u8 + 3u8) / 2u8 becomes 1u8
 

« first day (146 days earlier)      last day (194 days later) »