[-] cgtjsiwy@programming.dev 10 points 7 months ago

I wonder when Firefox is going to add a configuration menu for keybinds.

[-] cgtjsiwy@programming.dev 11 points 8 months ago

all of these are different ways to say “firefox account”?

Basically yes. The idea is that each suffix represents something that's typically a separate word in English, and you can mix and match suffixes just as you'd mix words.

  • my account -> tilini
  • to an account -> tilille
  • to my account -> tililleni
  • to my account too -> tilillenikin
[-] cgtjsiwy@programming.dev 12 points 8 months ago

As a Finnish speaker, I just can't see generic localisation systems like Fluent working with agglutinative languages. For instance, consider the Polish example for Firefox Account from Fluent's front page:

-sync-brand-name = {$case ->
   *[nominative] Konto Firefox
    [genitive] Konta Firefox
    [accusative] Kontem Firefox
}

In Finnish, this would be called Firefox-tili. Tili means account and belongs to the Kotus type 5 words, which specifies how the word is inflected with various suffixes. Fluent doesn't support agglutination, so you'd have to specify every form of the word separately:

-sync-brand-name = {$case ->
    [nominative] Firefox-tili
    [partitive] Firefox-tiliä
    ... 10ish more inflections
    [nominative first person] Firefox-tilini
    [partitive first person] Firefox-tiliäni
    ... 10ish more inflections
    ... the above inflections but for 2nd and 3rd persons
    [nominative first person plural] Firefox-tilimme
    [partitive first person plural] Firefox-tiliämme
    ... 10ish more inflections
    ... the above inflections but for 2nd and 3rd persons plural
    [nominative first person questioning] Firefox-tilinikö
    [no idea what this is even called] Firefox-tilittömänäkin
    [no idea what this is even called 2] Firefox-tililleensäkään
    ... lots more
}

Ideally, you'd only specify that Firefox-tili is a type 5 word and the system generates all of that boilerplate.

[-] cgtjsiwy@programming.dev 14 points 8 months ago

Teams does actually have a sound cue when people join calls: high-pitched repeated beeps that most people can't hear due to presbycusis, and the few who do hear it think they're going crazy.

Related reddit thread.

[-] cgtjsiwy@programming.dev 6 points 1 year ago

Regular expressions are great and can always be matched in linear time with respect to the input string length.

The problem is that JS standard library RegExps aren't actually regular expressions, but rather a much broader language, which is impossible to implement efficiently. If RegExp switched to proper regular expressions, they would match much faster but supporting backreferences like /(.*)x\1/ would be impossible.

[-] cgtjsiwy@programming.dev 12 points 1 year ago

It would be much easier to read if it was actually table, i.e., if hex codes and the characters were separated into their own columns.

[-] cgtjsiwy@programming.dev 58 points 1 year ago

My workplace has the opposite problem.

The company has been in dire need of programmers for years, so they hired people (including myself) without tests. However, the work involves lots of custom iterators and the occasional handcrafted parser, which most of the company is incapable of writing. The bright side is that management has their metrics mostly right, so I'm getting lots of raises for solving fun problems.

[-] cgtjsiwy@programming.dev 3 points 1 year ago

Agreed. I think operator overloading is a necessary feature in any math-oriented or general-purpose language. Being able to write formulae the same way as they're written in the source paper is a huge boon to readability.

[-] cgtjsiwy@programming.dev 3 points 1 year ago

What is the median amount of times you end up shuffling the array before it is sorted?

The answer is n! where n is length of the array.

I assume you meant mean instead of median. The median of a geometric distribution with parameter p is ceil(-1/log~2~(1-p)).

[-] cgtjsiwy@programming.dev 5 points 1 year ago

The author wanted "a more powerful type of inference that can actually infer the whole type of a function by analyzing the body of the function", which Rust doesn't have by design.

[-] cgtjsiwy@programming.dev 3 points 1 year ago* (last edited 1 year ago)

Another point in favour of databases is simplicity of client-server communication and data models.

Many objects in WoW (not too sure about spells, but most likely them too) work such that the client asks the server for the related DB rows when it sees an object for the first time. So instead of sending code across the wire, which would be a bad idea for many reasons, you instead send structured data that the client interprets.

Of course, you could just bake the spell code into the client at compile-time, but then dataminers will take it apart on day 0. WoW datamining mostly works such that you play the game normally and see what data the server gives you.

[-] cgtjsiwy@programming.dev 3 points 1 year ago* (last edited 1 year ago)

Although I’ve used a number of languages including Python, Javascript, and Go to build software, the bulk of my experience is working in Java.

Notably, Python's type annotations are extremely similar to Typescript. I guess the author hadn't used Python's type annotations very much (which is understandable considering they're often missing from libraries and the implementations are buggier than Typescript).

view more: next ›

cgtjsiwy

joined 1 year ago