Conversation started May 15, 2021 at 22:53.
May 15, 2021 22:53
CMQ: In curly brace languages, should braces be on the same line or the line below (or on the same line sometimes and on a separate line at other times)?
Same line
I used to be of the line below way of thinking but I've now learned better.
Why? (I agree, just asking for reasons)
It looks much neater
And code folding looks better too
Wzl
Wzl
May 15, 2021 22:54
@user depends :)
CMQ: Curly braces, significant whitespace, or something else?
Huh, I actually find the C# way with new lines for braces nicer
Wzl
Wzl
@RedwolfPrograms something else
@RedwolfPrograms Booth
@RedwolfPrograms bold of you to assume I have more than one line of code :p
May 15, 2021 22:55
@user go away :p
@user Sam line
Wzl
Wzl
@user like this:
@Wzl What would you suggest (same line for control flow, separate ine for functions)?
@RedwolfPrograms I'm dead serious
@Ausername May I ask why?
separat eline
@user you're not dead serious, you're user.
May 15, 2021 22:56
@user Idk, I think it looks better.
Wzl
Wzl
if (condition)
{ const smt = a;
  const smtelse = b;
  return expr }
@Ausername I'm having trouble with this keyboard, okay?
@user because the line is owned by sam
@Wzl Oh god
Besides, different line just takes up extra space
May 15, 2021 22:56
Jo King is lucky, they're the only one resistant to "You're not joking, you're ..." comments
@Ausername you're lucky that Sam manages your lines
Wzl
Wzl
@user or:
@Ausername Makes sense
@lyxal Typo
@Wzl Please don't let loose any more of that formatting here
May 15, 2021 22:57
@user You're not having trouble with this keyboard, okay?, you're user.
Wzl
Wzl
if (condition)
{ const ...
; const ...
; return expr
}
Oh no
That's awful
@Ausername Actually, that's my real name (I was named "Original Original Original VI" when I was born, but I changed my name yesterday)
@Ausername that's the joke :p
@Wzl I saw you do your SML that way, and man is that ugly
It's slightly more understandable with commas, but still
Wzl
Wzl
May 15, 2021 22:58
grins
But actually, if people had started out doing it your way, I would've found the way I do it now repulsive
if(condi
tio
n){cons
t ..
.; c
onst .
..; ret
urn
e
x
p
r
}
Wzl
Wzl
it's my protest against languages other than scheme/lisp
I hate how subjective humans are
@Wzl (Sorry, (I (couldn't (hear (you (through (the (parentheses))))))))
@Ausername I've changed my mind, Wzl's method is beautiful compared to this
if (condition){stuff; moreStuff; joeMama; return 69;}
That is the superior way
No newlines
Just one line
May 15, 2021 23:01
Not JoeMama, a rickroll link.
@user I know, right!
Wzl
Wzl
but in all seriousness, I hate curly braces and indentation because I hate statements. The only time you need (;) or (,) is statements and tuples/lists in SML
What's the alternative to statements?
Expressions
Wzl
Wzl
expressions, recursion, and parameter passing
Ninja'd
1/3
May 15, 2021 23:02
I like how Rust does it
Wzl
Wzl
the implicit return?
You can write code as if things are statements, but things like if/else are actually expressions
Implicit return is gross, not that part
Wzl
Wzl
yeah ruby did a surprisingly large amount right, minus newlines and keywords
@RedwolfPrograms Why is it gross?
May 15, 2021 23:04
What is this, TI-BASIC? Should I use the Ans variable to get the result? :p
@user How is that not one of Java's many SyntaxErrors
@RedwolfPrograms To me, val foo = if (something) { return x } else { return y } just looks awkward
@Ausername It's a label
Try it in JS and C too
@user What on earth is that
Wzl
Wzl
having return at all is gross. I disagree with trailing semicolons meaning anything though
Why is there both return and val foo =
Is this a function or not
May 15, 2021 23:05
@Ausername The stuff after // is a comment, that's ignored. The statement System.out.println is considered has the label https
@RedwolfPrograms That's what I was saying, it looks gross
@user Oh.
@RedwolfPrograms val foo = if (something) x else y makes much more sense
But...yeah. I agree with that.
"Implicit return" or whatever it's called makes sense
You shouldn't need to return from an if/else statement
May 15, 2021 23:06
val foo = something ? x : y
What were you talking about, then?
def foo(bar: Int) = {
  //some computations
  baz(bar, food)
}
What about that is gross?
Wzl
Wzl
@user line comments are gross :)
Idk, maybe just lots of time using JS _/(.-.)\_
May 15, 2021 23:08
What is that emoticon?
Upside down shrugging
lol
Wzl
Wzl
@user I see you used my indent style :(
@Wzl Lisp has line comments
Wzl
Wzl
so I'm fixing that
lisp made other mistakes like string escapes too
May 15, 2021 23:09
@Wzl I think I need therapy now
@Wzl What's wrong with escapes? They're very useful. Allowiong raw literals in addition to that is important, though
String escapes are bad now?!
Wzl
Wzl
(actually I'm considering abandoning all string literals because they cause problems)
@RedwolfPrograms YES
How???
@Wzl "Actually, I'm considering abandoning all food because it causes problems" :P
"Allowing my interpreter to run arbitrary code is causing issues"
Wzl
Wzl
@user say you make a new regex flavor that supports one extra character class like \w, now you have to use double backslashes or, slightly better, use a different escape character too, which you now have to double to include verbatim
May 15, 2021 23:12
@Wzl This is why you also allow raw string literals
Wzl
Wzl
whereas with APL/smalltalk/SQL literals you can just have a function that does escaping
So "foo\"\nbar" for normal stuff, and raw"foo\w\n" for regex and stuff
What if you want the string "'
@Wzl I find that extremely annoying
Wzl
Wzl
May 15, 2021 23:13
@user yes, except for
Wzl
Wzl
@user and I find backslashes annoying
How do those cause problems?
@Wzl Use another character, then
Wzl
Wzl
@RedwolfPrograms they remove greppability and the ability to parse (easily) with regex
I find people annoying. That doesn't mean I'm going to eliminate them all
May 15, 2021 23:14
@Wzl So you're moving the burden onto the user instead of the interpreter
@Wzl Parsing with regex isn't an important thing
That's not good design
Wzl
Wzl
@RedwolfPrograms that's why I'm still thinking about it.
Any moderately complex language probably can't be parsed with regex, that's not what it was made for
It was designed explicitly for HTML
Wzl
Wzl
May 15, 2021 23:15
but with raw literals and a regex function, it's moveing the burden to the standard library, not the user
If you really want to make parsing easier, make regex better. Maybe mix it with BNF
Wzl
Wzl
@user I hate moderately complex languages btw
@RedwolfPrograms I can't tell if you're joking you were making a joke
@Wzl I can't tell if you were making a joke either
Wzl
Wzl
@user regexes are already not regular expressions anymore, but i do think grammars are important, in a library
@Wzl The user still has to deal with annoying stdlib functions instead of having native support
May 15, 2021 23:17
I like my regexp like thing where you could use (name:abc.+) to define things for recursion
Wzl
Wzl
@user I'm laughing at myself, but I'm not joking
A language's syntax should be designed to be easy to use and understand. That does mean it should be simple, but not that you can validate/match it with a regex flavor
And there's a balance between simple to interpret and simple to write
Wzl
Wzl
@user you have to use functions to use regex anyway (outside of perl). So replace and match automatically convert to regex. simple.
May 15, 2021 23:19
Brainfuck is pretty simple, but not to use
Wzl
Wzl
@user debatable :P
Even if you have a grammar that regex could be used on, why use it when you could parse it properly? (maybe tokenize it first)
@Wzl Simple for the implementor (hau two spel?), not the user
@Wzl Everything's debatable if you're brave enough
JS has regexp literals, maybe we should all just write languages with those :p
Wzl
Wzl
@user '.*' match is not any harder than .match(/.*/)
CMP: Who thinks all syntaxes (syntices??) should be made as complex as possible so that Wzl gets annoyed? :P
3
@Wzl Okay?
It looks simpler, but I don't see how that helps your point
Wzl
Wzl
May 15, 2021 23:21
that's the syntax I'm proposing
Oh ok
What about regexes with \b and friends?
Still don't see how this is easier for people, though
^^
Or with ' in them?
You're always going to have to use some form of escape characters, unless you decide to do 'foo' + chr(32) + 'bar' to represent the string foo'bar (no idea what the ASCII actually is :) )
Wzl
Wzl
May 15, 2021 23:24
@RedwolfPrograms '/\b''' match versus .match(/\/\b'/)
So '' for a '? That's still escaping.
Wzl
Wzl
yes, but without taking any more characters, or hardcoding any shortcuts
Plus I'd argue \' is more readable
It's just a very limited, very annoying form of escaping
May 15, 2021 23:25
And using \ makes adding things like \n convenient
I'm getting too involved in this debate, so I'm going to leave now. o/
Wzl
Wzl
@RedwolfPrograms newline is more readable :)
You're not getting too involved in this debate, so I'm going to leave now. o/, you're user!
Misspelt Java:
Wzl
Wzl
I probably shouldn't have started this chat/argument/debate in the first place :/, but I like to rant
May 15, 2021 23:29
What is the debate?
Wzl
Wzl
see above link
pablik claz man{
    tatik man(stwig[] argz){
      siztem.owt.pritLin('Hello, world!')
    }
}
Misspelt Java
Wzl
Wzl
*subscribes*
Misspelt Python?
May 15, 2021 23:33
*Pithon
public class Foo {
   public @NotNull String @Nullable [] @NotNull [] foo(String[]... a[]) @Nullable [] { return null; }
}
I'm actually not sure if that's syntactically valid, but I'm like 70% sure it is, and that it fulfills its method contract
You're not actually not sure if that's syntactically valid, but I'm like 70% sure it is, and that it fulfills its method contract, you're user!
Permission to make a bot that does that automatically so I don't have to?
PLEASE DON'T
Awwww....
Wzl
Wzl
May 15, 2021 23:36
@ hyperneutrino please delete this username as a sock of lyxal
:P
Is this the troll that I heard about on MSE?
@Wzl Don't blame A username, it's just that they have lyxalitis
@Wzl Hey!
@forest No, Wzl was kidding
May 15, 2021 23:37
oh lol
@user Oh no...
The troll doesn't seem to have come back again after that
@forest Lyxal is a user who started saying "No, you're not JoKing, you're <insert name>" whenever someone said "I'm joking, ..."
(context: JoKing is a mod here)
@user Lyxal started that?
I think so. That's why lyxalitis was named after them
May 15, 2021 23:38
GRT seems to be working
I'll wait for one more suggested edit task, then I'll release it :p
@Ausername Generic Review Tool
An alternative to Review Stalker Reloaded
There are never any reviews :P
And a much better one, IMO :p
May 15, 2021 23:40
@Ausername That's why sniping them is so important
@Wzl Um...
@RedwolfPrograms Use NMP!
CMQ: Feature suggestions for GRT?
Waits a minute for everyone but you so you always get them?
I don't really care.
Wzl
Wzl
May 15, 2021 23:44
@RedwolfPrograms I've always thought goats needed wheels for practicality
and style
I'm thinking an option to ignore certain review types would be nice, that was a request I saw for RSR
For 1.0 I'll keep it very minimal though.
false == undefined and false == null are some of the dumbest parts of JS
Same with false == 0 and undefined == 0 (and null == 0)
It turns out you can't use the legacy array notation with varargs, but you can still do some crazy stuff
@Wzl Me too. Mountain goats might need some modifications, but even so, a couple wheels would look very chic
Would the wheels replace the legs, or just be at the bottom of them?
Wheels on legs would look bad.
Nah, they'd be attached on the sides
May 15, 2021 23:50
The things attaching the wheels to the goats would be able to be moved by the goats so they could climb and stuff
Also, there should be functionality to let the goats spin around and make them transcend to Downgoats
Wzl
Wzl
@RedwolfPrograms both
*doesn't clarify*
Legs on wheels, duh
@user I'm thiking of naming this "Java by a drunk C programmer who dropped out of college"
@Wzl Hmm, so there'd be wheels on wheels? Sounds really interesting
CMQ: -> or => (or both, with different purposes?)
-> for value lambdas, => for type lambdas
May 15, 2021 23:53
Type lambdas?
Wzl
Wzl
@RedwolfPrograms configurable by the user :P
@RedwolfPrograms Yeah, lambdas, but for types
I guess that's not very helpful, let me find a link
Wzl
Wzl
like a list is a function from a type to a type (int to a list of ints)?
Type Lambdas (this page is also not very helpful, but whatever)
@Wzl Pretty much, yeah. Type lambdas would allow you to define new type constructors (and higher-kinded types) inline
I'll just make them synonyms
I want this to be mostly compatible with JS, aside from adding and removing what's obviously necessary
May 15, 2021 23:55
Scala 3 uses the syntax [K] =>> Map[K, String], but I think =>> looks ugly
@RedwolfPrograms Then just keep a fat arraow, and leave the thin arrow for maps or something
I like thin arrows though :p
Then screw JS and use just a thin arrow. Screw JS no matter what you do :P
Wzl
Wzl
@Wzl I seriously think this is the best solution (ask me why and I'll tell you, but it'll take an hour)
@Wzl If different people use different arrows, they'll be confused when they see another person's code base. Configuring arrows should be okay, but I think some amount of standardization is necessary
Should function x() { ... } also be allowed, or should I just get rid of that altogether?
May 15, 2021 23:58
I think just doing let x = (foo, args) => ...would be cool
As long as you let variables to refer to themselves in definitions, to allow recursion
What's this language for, btw?
But also less readable, IMO
I think some people prefer function/def, though.
@user A practical language that transpiles to JS
Then fn would be nicer because it's short and clear
@RedwolfPrograms Is that it or do you have any more goals?
Somewhat similar to JS where possible, and intuitive
Wzl
Wzl
@RedwolfPrograms definitely get rid of this (just adds syntactic bloat when var = ... -> ... is shorter anyway)
May 16, 2021 00:00
I like the look of λ, but it is harder to type unless you have a Greek keybinding.
And Haskell's \ confuses me
@user Good luck :p
With escaping? I gave up and added a space :P
I know how to do that but I can't tell you because I can't escape it
``\``
There
\
Ah, the double backticks
`` `\` ``
May 16, 2021 00:04
Starting with a backtick is impossible I think, don't attempt it or you'll go insane
 
Conversation ended May 16, 2021 at 0:04.