• 0 Posts
  • 62 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle






  • I once developed an electronic program guide for a cable TV company in New Zealand and I’d lose my mind if I had to use timezones. The basic rule of thumb was:

    a) Internally you use UTC religiously. UTC is the same everywhere on Earth, time always goes forward, most languages have classes that represent instants, durations etc. In addition you make damned sure your server time is correct and UTC.

    b) You only deal with timezones when presenting something to a user or taking input from a user

    Prior to that I had worked for a US trading company that set all their servers to EST and was receiving trades through the system which expressed time & date ambiguously. Just had to assume everywhere that EST was the default but it was just dumb programming and I bet to this day every piece of code they develop has time bugs.


  • arc@lemm.eetoMemes@lemmy.mlEven paper glows
    link
    fedilink
    arrow-up
    57
    arrow-down
    1
    ·
    3 months ago

    The EFF has some info about the practice - https://www.eff.org/pages/list-printers-which-do-or-do-not-display-tracking-dots.

    I imagine there are ways and means of obfuscating / anonymizing the dots such as blocking the printer from emitting them (e.g. an empty yellow cartridge that the printer perceives as full), modifying the firmware, using a burner printer, or using a mono laser jet.

    As a side issue, most modern bank notes have a bunch of yellow circles integrated into the design on each side. They look random but they’re in a recognisable pattern called a constellation that enables devices like copiers / scanners to recognize when people are trying to copy money or other financial instruments like checks.


  • arc@lemm.eetoProgrammer Humor@programming.devIs this a Nut?
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    4 months ago

    The only reason people use JS is because it’s the defacto language of browsers. As a language it’s dogshit filled with all kinds of unpleasant traps.

    Here is a fun one I discovered the other day:

    new Date('2022-10-9').toUTCString() === 'Sat, 08 Oct 2022 23:00:00 GMT'
    new Date('2022-10-09').toUTCString() === 'Sun, 09 Oct 2022 00:00:00 GMT'
    

    So padding a day of the month with a 0 or not changes the result by 1 hour. Every browser does the same so I assume this is a legacy thing. It’s supposed to be padded but any sane language would throw an exception if it was malformed. Not JavaScript.



  • Yuzu gave them the opening to sue though. If they had been more circumspect - “Oh this is to develop homebrew / indie games nudge nudge” then maybe Nintendo wouldn’t have unleashed the lawyers or done so ineffectively. After all it wouldn’t be Yuzu’s fault if some wicked website corrupted their pure intentions by releasing device keys or patches that allowed their emulator run commercial games. But they were more blatant than that.

    Also from an empathic perspective, of course Nintendo were going to sue. Yuzu should have known they would since that’s what console platforms do when something interferes with their profits. Yuzu is doubly bad since it interferes with hardware sales and game sales unlike custom firmware / cartridges which only affect game sales.

    Of course the genie is already out of the bottle. Yuzu’s source code and binaries were on github for anyone to clone / fork. All the games are out in the wild. The piracy will carry on. I think it’s fair to say the NSP is effectively dead as a platform at this point. If a NSP2 turns up this year, as rumored, then I expect it will have revised anti-piracy measures and potentially a heavy online service aspect to go with it - it’s far easier to detect pirates and wield the banhammer when a device is online.


  • The problem is, that most languages have no native support other than 32 or 64 bit floats and some representations on the wire don’t either. And most underlying processors don’t have arbitrary precision support either.

    So either you choose speed and sacrifice precision, or you choose precision and sacrifice speed. The architecture might not support arbitrary precision but most languages have a bignum/bigdecimal library that will do it more slowly. It might be necessary to marshal or store those values in databases or over the wire in whatever hacky way necessary (e.g. encapsulating values in a string).


  • It probably wasn’t a big deal when it was a niche project until Twitter imploded. Then all the public instances got overloaded with new users and the limits became obvious.

    A better design is Lemmy which is written in Rust so it has far more scalability. It’s compiled and because it’s tokio / actix based, it can also do a lot more stuff asynchronously so it’s not spawning thousands of threads to cope with concurrent requests.


  • There is a lot of magic in Java. Try Spring Boot for example, and things magically connect together with annotations, or somehow methods get injected onto interface on the fly, or an http interface maps onto a function with parameters because the runtime is doing it. This is most evident when you set a break point in some class and there might be 4 or 5 mystery functions it passed through between it and where you thought it was calling from. Sl4j, Lombok, Hibernate are doing the same kind of thing.


  • I wrote extensively in Ruby but for Rake - using Ruby as a build system. Can’t say I liked the language although it was okay for how we used it. We have 20 sub projects with some very complex build targets and dependency scanning going on and the Rake syntax was okay. Personally I think its biggest shortcoming was the documentation was very poor and stuff like gems felt primitive compared to other package management systems. One thing I liked from the language was blocks could evaluate to a value which I really use a lot in Rust too.

    I think if I were doing an acyclic dependency build system these days I’d use Gradle probably.

    As for Rails I expect failed to catch on because even compared to Python, Ruby is a slow language. And Python isn’t fast by any stretch. Projects that started with Rails hit the performance brick wall and moved to something else.






  • Breivik is the sort of murderer, where there is absolutely zero doubt about his guilt, where the crimes themselves are heinous, and where he should never see the outside of a jail cell ever. If Norway had voted to throw him down a mineshaft, or imprison him in a windowless cell where he was fed slops for the rest of his life I couldn’t care less.

    But Norway isn’t like that and he is being treated exceptionally well by any standard for his category of offence. His pathetic narcissistic legal whining to the courts will go nowhere and he’ll stew in prison for as long as they can legally hold him. I think authorities would be relieved if he made good on his threats since it spares them the concern of what happens if he is eventually released.