I hate Scala


  • Banned

    @homobalkanus said in I hate Scala:

    @gąska said in I hate Scala:

    @homobalkanus said in I hate Scala:

    @gąska said in I hate Scala:

    @homobalkanus said in I hate Scala:

    @gąska then they reinvented the God class.

    It has nothing to do with God classes. Regular objects and classes also can be God classes. The problem is name aliasing: suddenly a single identifier is both an object and a package. For what?

    Another option for organising your code. It can also be a good place to store things that usually end up in a Utils class AKA RamdomShit/Other/Misc

    And the benefit of using package object over misc.scala is...?

    For you? None. I prefer it in a specific case because the code is clearer for me that way. Again, this is more a matter of preference and if you cannot find a benefit then you shouldn't use it. Talk to your team and try to agree on a way of work that actually works for you

    But why do you prefer it? What do package objects bring to the table that can't be done otherwise, that you like so much? Because it looks like they're absolutely equivalent of regular file with regular objects (and type aliases and whatnot) with the only difference being you can make it look like you're calling methods on the package itself - which, if I understood correctly, is not what you're doing.

    Yes, I can just not use features I don't like. But the point is, Scala made some absolutely pointless feature that doesn't bring any benefit to anybody.



  • @gordonjcp said in I hate Scala:

    @dfdub Okay, it's DSP, so there's a chunk of memory treated as an array, maybe a couple of hundred thousand bytes long, and the whole thing is read and updated maybe every couple of dozen microseconds. There are a couple of pointers to indicate where you're reading and writing within this buffer, and another couple of pointers to indicate where you're actually working.

    I take everything back. In that environment, you definitely don't want to use a functional language with a potentially huge runtime. Continue doing whatever you're doing.

    Otherwise, see Gaska's reply.


  • Banned

    @dfdub said in I hate Scala:

    @gordonjcp said in I hate Scala:

    @dfdub Okay, it's DSP, so there's a chunk of memory treated as an array, maybe a couple of hundred thousand bytes long, and the whole thing is read and updated maybe every couple of dozen microseconds. There are a couple of pointers to indicate where you're reading and writing within this buffer, and another couple of pointers to indicate where you're actually working.

    I take everything back. In that environment, you definitely don't want to use a functional language with a potentially huge runtime.

    On the other hand, a functional language with little runtime and minimal overhead would work great. The closest thing currently available is Rust, which, while being mostly imperative, implements many of the same principles through borrow checker.


  • Banned

    Oh, and

    @dfdub said in I hate Scala:

    Gaska

    Fuck you too.



  • @gąska said in I hate Scala:

    Fuck you too.

    I wrote this on mobile and I'm 99% sure that Gboard doesn't let you enter that character when set to English. I even long-pressed on "a" to look for it, but it wasn't available in that menu. So I suggest you tell the developers at Google to go screw themselves instead of me, you culturally insensitive prick!


  • Banned

    This post is deleted!

  • Banned

    @dfdub have you ever heard of copy and paste?



  • @gąska said in I hate Scala:

    @dfdub have you ever heard of copy and paste?

    Did you miss the part where I said I was on mobile? My finger are simply too fat for that and NodeBB not keeping the page still doesn't exactly help. If you can tell me a way to enter this character via my keyboard without changing language settings, I will happily do that from now on. Otherwise, stop being petty and swallow your pride because I'm not going to change my keyboard to Polish just for you.


  • Banned

    @dfdub we have suffered DECADES of cultural hegemony of USA in the IT world. We were denied using our own language because some sorry ass "developers" from the other side of planet couldn't be arsed to support more than 95 characters even though it would cost them nothing. UTF-8 took over ASCII only in the late 2000s, but there are still fucktards who don't care to implement it. For them, it's just fancy 'a'; for me, it's my national identity. My language has 32 distinct letters, and I want to use them all to full extent, because otherwise I can't write half the worlds correctly. I know Americans don't give a fuck about correct spelling, but is it really that hard to imagine some people do? Do you really think your fat fingers justify erasing my culture? You could have at least said you're sorry or something. But instead you called ME culturally unsensitive. Oh, the irony!

    Fuck technological imperialism.

    BTW, you can enable additional character sets quite easily in keyboard settings. You have to select English as your primary language and others as additional languages. Additional languages have no effect on anything whatsoever except available character sets.



  • @gąska said in I hate Scala:

    You could have at least said you're sorry or something. But instead you called ME culturally unsensitive. Oh, the irony!

    The joke: ------>
    Your head: o

    BTW, you can enable additional character sets quite easily in keyboard settings. You have to select English as your primary language and others as additional languages.

    I know this feature.

    Additional languages have no effect on anything whatsoever except available character sets.

    That's not correct since I use the language autodetection feature. I use more than one language already…


  • ♿ (Parody)

    @gąska said in I hate Scala:

    Fuck technological imperialism.

    In Trump's America, technological imperialism fucks you!


  • Banned

    @dfdub said in I hate Scala:

    @gąska said in I hate Scala:

    You could have at least said you're sorry or something. But instead you called ME culturally unsensitive. Oh, the irony!

    The joke: ------>
    Your head: o

    Culture erasure is no joke.

    BTW, you can enable additional character sets quite easily in keyboard settings. You have to select English as your primary language and others as additional languages.

    I know this feature.

    That makes you not just a racist asshole, but also a liar.



  • @gąska said in I hate Scala:

    That makes you not just a racist asshole, but also a liar.

    I guess I'm the worst of the worst, then? Shit, it didn't take you long to figure out I was a @mikeTheLiar alt…


  • Banned

    @dfdub it's not that hard when everyone's @boomzilla.



  • @gąska said in I hate Scala:

    Culture erasure is no joke.

    Tell me about it! It seems like I erased my own cultural heritage thoroughly enough that you assume I'm American. Racist!

    Also, I just realized that you can select which languages to include in autocorrect. I'm pretty sure this feature was added fairly recently, since I didn't see it when I last went into the Gboard settings. I've added Polish now. Happy?


  • ♿ (Parody)

    @gąska said in I hate Scala:

    That makes you not just a racist asshole, but also a liar.

    Alright, alright. Calm down guys. We already have a "silly examples of racism accusations" thread in the garage that was started by some guy with weird squigglies in his name.


  • Banned

    @dfdub said in I hate Scala:

    I've added Polish now. Happy?

    Well, it's not like I really care actually. We even made this @gaska group so people would have easier time without Polish keyboard.



  • @gąska said in I hate Scala:

    @dfdub said in I hate Scala:

    I've added Polish now. Happy?

    Well, it's not like I really care actually. We even made this @gaska group so people would have easier time without Polish keyboard.

    Well, but now you've made me care. You might regret teaching me how to mention you properly, @Gąska.


  • Banned



  • @dfdub I do get a bit more of an idea now about what one might use functional programming for, though.



  • @gąska said in I hate Scala:

    @homobalkanus said in I hate Scala:

    @gąska said in I hate Scala:

    @homobalkanus said in I hate Scala:

    @gąska said in I hate Scala:

    @homobalkanus said in I hate Scala:

    @gąska then they reinvented the God class.

    It has nothing to do with God classes. Regular objects and classes also can be God classes. The problem is name aliasing: suddenly a single identifier is both an object and a package. For what?

    Another option for organising your code. It can also be a good place to store things that usually end up in a Utils class AKA RamdomShit/Other/Misc

    And the benefit of using package object over misc.scala is...?

    For you? None. I prefer it in a specific case because the code is clearer for me that way. Again, this is more a matter of preference and if you cannot find a benefit then you shouldn't use it. Talk to your team and try to agree on a way of work that actually works for you

    But why do you prefer it?

    Because it's more intuitive for me what is the scope of these helpers and types.

    What do package objects bring to the table that can't be done otherwise, that you like so much?

    Nothing. It's a matter of preference and what looks right to you. Was it a worthwhile use of the developers' time to introduce this feature? Probably not.

    Yes, I can just not use features I don't like.

    Not entirely true. If the rest of the codebase uses them heavily then you have to deal with them.


  • Considered Harmful

    @dfdub
    0_1526494755537_Screenshot_20180516-111842.png
    It's right there.


  • ♿ (Parody)

    @pie_flavor æ ã å ā à á â ä
    Those were the only alternate a characters there for me.

    Too bad gäska.


  • :belt_onion:

    @boomzilla Yeah, same for me. I have to rely on autocomplete from one letter.



  • @boomzilla @heterodox
    The trick, apparently, is adding Esperanto to your list of languages. Who the hell except @pie_flavor uses Esperanto these days?


  • ♿ (Parody)

    @dfdub said in I hate Scala:

    The trick, apparently, is adding Esperanto to your list of languages.

    I don't know how one goes about adding languages to things but all my things come with English already so I don't have any reason to do that sort of thing.



  • @boomzilla
    With Gboard, the easiest way is to either long-press the space bar or use the gear icon, if enabled. That'll open a settings menu which will let you add more languages and also enable mixed autocompletion. You can even enable only some of the languages from the list per keyboard now, as I figured out upthread.


  • Impossible Mission - B

    @boomzilla said in I hate Scala:

    Too bad gäska.

    Gah! Don't say that. You want him to blow a gåsket or something?


  • Considered Harmful

    @dfdub wait, is that actually affecting it? Wow


  • Banned

    @masonwheeler said in I hate Scala:

    @boomzilla said in I hate Scala:

    Too bad gäska.

    Gah! Don't say that. You want him to blow a gåsket or something?

    A Gøøse once bit my sister...


  • Impossible Mission - B

    They say what's good for the gøøse is good for the gãnder...



  • @dfdub said in I hate Scala:

    I wrote this on mobile and I'm 99% sure that Gboard doesn't let you enter that character when set to English. I even long-pressed on "a" to look for it, but it wasn't available in that menu. So I suggest you tell the developers at Google to go screw themselves instead of me, you culturally insensitive prick!

    I installed PL keyboard just to be able to type that one ą. Now I get bombarded with autocomplete/autocorrect suggestions for words in weird moon language.



  • @dfdub said in I hate Scala:

    I'm not going to change my keyboard to Polish just for you.

    EN and PL coexist peacefully in the same keyboard. I even get most autocomplete/autocorrect in English.


  • BINNED

    @dfdub said in I hate Scala:

    My finger are simply too fat for that and NodeBB not keeping the page still doesn't exactly help

    QFFT



  • @dfdub said in I hate Scala:

    Who the hell except @pie_flavor uses Esperanto these days?

    More than use Logjam.


  • Considered Harmful

    @gąska said in I hate Scala:

    @dfdub said in I hate Scala:

    Gaska

    Fuck you too.

    I should have used ລາວສີ້ as a user name from the start, just to have you fumble with your keyboard settings for that one fucker in Laos :trollface:

    老子



  • @hardwaregeek said in I hate Scala:

    Now I get bombarded with autocomplete/autocorrect suggestions for words in weird moon language.

    If you use Gboard (which should be the default on all non-Samsung Android devices), go to the language settings in the settings menu and click on the English keyboard in the list. On that screen, you should be able to choose exactly what languages you want.

    The only negative side effect is that you'll have to manually switch the language to get to the ą, then.



  • @gąska said in I hate Scala:

    @dfdub we have suffered DECADES of cultural hegemony of USA in the IT world. We were denied using our own language because some sorry ass "developers" from the other side of planet couldn't be arsed to support more than 95 characters even though it would cost them nothing.

    I have two problems here. If you is Poland, it was illegal for the US manufacturers to sell you anything in the computer field until the end of the Cold War. Eastern European entities were copying Western software without permission; I think it their job, not the US's, to make sure it was fit for Polish purposes.

    In the 1970s, European countries standardized various 7-bit variations of ISO 646. In 1987, they standardized Latin-1. In 1998, after Unicode was out for seven years, Sweden registered a variant of ISO/IEC 8859-13 (Latin-7) that included the Euro sign for use with ISO 2022 In the 1980s, Japan and China had the closest thing to multilingual character sets, by adding Greek and Russian characters to their 16-bit character sets, and they seemed to lead the way to international character sets mainly because that was the way to get the rest of the world to get decent support for their languages. European countries, like everyone else, did the very minimum they could to support their languages and didn't worry about other languages, not even producing a pan-European character set. In the wave of 8-bit home PCs in the 1980s, you didn't see any European systems with amazing text processing ability. It's easy to blame someone else, but it was neither the US's fault or responsibility.


  • Considered Harmful

    @dfdub No, because I'm using Gboard, and I didn't switch my language to EO to get that symbol, and yet it's there.


  • Discourse touched me in a no-no place

    @david1 said in I hate Scala:

    n the 1980s, Japan and China had the closest thing to multilingual character sets, by adding Greek and Russian characters to their 16-bit character sets, and they seemed to lead the way to international character sets mainly because that was the way to get the rest of the world to get decent support for their languages.

    Only problem with that: the way they did it is horrific when you look at the details. They didn't use a variable width encoding with multiple shift states and… well, look up what ShiftJIS does and then take a short break to remember that not all standards are complete disasters after that horrible confrontation.


  • Banned

    @david1 what about 1990 onwards? In particular, what about 2003 - when both UTF-8 and UTF-16 have been standarized in their current form and have been supported by all major systems and programming environments, yet most brand new software still didn't handle non-ASCII correctly?



  • @pie_flavor said in I hate Scala:

    @dfdub No, because I'm using Gboard, and I didn't switch my language to EO to get that symbol, and yet it's there

    That's precisely because you didn't do what I described and have Esperanto included in your list of autocompleted languages. Your space bar wouldn't be showing the language code otherwise. Please read before arguing that I'm wrong.


  • ♿ (Parody)

    @dfdub said in I hate Scala:

    @boomzilla
    With Gboard, the easiest way is to either long-press the space bar or use the gear icon, if enabled. That'll open a settings menu which will let you add more languages and also enable mixed autocompletion. You can even enable only some of the languages from the list per keyboard now, as I figured out upthread.

    I DIDN'T ASK FOR HELP

    0_1485818111155_Flying_wharrgarbl.jpg



  • @dfdub said in I hate Scala:

    @pie_flavor said in I hate Scala:

    @dfdub No, because I'm using Gboard, and I didn't switch my language to EO to get that symbol, and yet it's there

    That's precisely because you didn't do what I described and have Esperanto included in your list of autocompleted languages. Your space bar wouldn't be showing the language code otherwise. Please read before arguing that I'm wrong.

    I did do what you described, and I no longer get autocomplete suggestions in Polish, but I also no longer have Slavic diacritics available unless I switch languages. Which is just as you described. Except that ą is sometimes shown as a suggestion because I typed it recently (unless I actually want it to be suggested, then of course it only offers other random suggestions).


  • Banned

    Back to topic. Today, I've discovered there's an implicit Option[String] flying around the codebase. I couldn't track down where it comes from because implicits are resolved by type, not by name. Who the fuck thought that's a good idea!?



  • @gąska said in I hate Scala:

    @david1 what about 1990 onwards? In particular, what about 2003 - when both UTF-8 and UTF-16 have been standarized in their current form and have been supported by all major systems and programming environments, yet most brand new software still didn't handle non-ASCII correctly?

    As I said, in 1998 Sweden insisted on encoding a new 8-bit character set. I have no idea what you mean by most brand new software still didn't handle non-ASCII correctly, but like I said, Europeans as a whole seemed to have settled on 8-bit character sets and have little interest as a whole in moving to UTF-8 and UTF-16.


  • Banned

    @david1 you know, I never really knew all that stuff. I assumed all the common codepages were made in 1985 or so, before the first Windows.

    And by new software not handling non-ASCII correctly, I mean software unbound by legacy stuff not being able to cope with diacritics in various ways - rendering them wrong, not finding files on disk, rejecting identifiers of various kinds containing funny letters. It was major PITA in 98 and early XP times.


  • Banned

    Fucking Retarder Feature of the Day: scanLeft.

    The concept itself is very sensible: there's some accumulator that holds state between iterations, and a mapper function that maps each element of a sequence making use of mutable state, producing new sequence.

    • The return value must be the same type as your accumulator. Why? Fuck you that's why.
    • The initial accumulator value is added at the beginning of new sequence. So scanning through an N-element sequence gives you N+1 elements. With the first element being the same regardless of what the sequence holds. I can't think of any situation where this might be useful.
    • The initial value is obligatory. This is the part that makes sense - it can't really be done otherwise, and you can always use Option with the initial value of None. What doesn't make sense is that - due to the WTF #1 - the resulting sequence of type Seq[T] now has to be of type Seq[Option[T]].
    • Using None for initial value doesn't actually work. You have to explicitly annotate the type: None: Option[ComplicatedType[(WithA, TupleInside)]]. And don't even think of using wildcard like this: None: Option[_] - yes, it's valid syntax; yes, it compiles; but it doesn't do what you want, since the type inference is non-backtracking, so None's type will get resolved to Option[Any], and your sequence loses all type information and becomes Seq[Option[Any]] - which is useless for anything except printing.



  • Banned

    @twelvebaud not quite - scanLeft returns Seq (think: Enumerable), not a single value. But yes, I agree that literally every other language has it better than Scala.


Log in to reply