Tuesday, August 25

Geek

Daily News Stuff 25 August 2020

Multiple Dispatch Edition

Tech News

  • Implemented a full set of instructions in the experimental VM in Nim - though three quarters of them are just dummies cut-and-pasted to fill out the case statement.

    Performance dropped from 80 MIPS with one instruction implemented to 72 MIPS with 32 instructions.  And that's without using the pragma options to optimise the case statement.  Also using an array for the registers rather than individual variables, which simplifies the instruction dispatch but generates less efficient code.

    So it seems to be safely past the point where PyPy had its nervous breakdown.

    I might go with a default configuration of 128k each of system RAM and video RAM rather than worrying too much about squeezing things into 64k.  The point of an imaginary 10-bit computer is, after all, that you can have more than 64k of linear address space.

    I remember thinking about how nice it would be to have a whole 128k of RAM back then.  Then of course I got an Amiga and skipped the entire late-8-bit generation.


  • Nim imports all the methods of a module when you import a module.

    That is, with Python, if you import the time module you get the time by calling time.time() but with Nim it's just time().

    Python needs to do this because if you import a bunch of modules and they use the same name for some of the methods, it can't tell which version you mean.

    Nim, though, uses multiple dispatch.  If you have a save function that saves image data to a JPG file, and a save function that saves a record to a MongoDB database, they have completely different parameters and return types.

    Python is dynamically typed so that's not a lot of help.  Nim though is statically typed, so it knows which one you mean from the code that calls it.

    This makes code less verbose, and makes using modules a more natural part of the language.  I'll have to see how it works out in practice.

    Also, JetBrains, makers of IntelliJ and PyCharm, are planning to release the first version of their official Nim plugin next month.  I've been programming Crystal in VS Code and it is awful.


  • TSMC's 5nm node is in production and 3nm is due in 2022.  (AnandTech)

    Which we basically knew already, but there is new data here as well.  The figures given for transistor density - 1.8x going from 7nm to 5nm, and a further 1.7x from 5nm to 3nm - are for logic functions.  SRAM scaling is significantly worse.

    I originally suspected that the first use AMD would make of 5nm would be to implement even larger caches for their server parts, while another doubling of core counts would be further off.  Instead it seems the reverse is more feasible.

    That's not until next year at the earliest, anyway.  Zen 3 is 7nm.


  • And Zen 3+ may also be 7nm.  (WCCFTech)

    Or on the other hand it may not exist even as a box on a roadmap.  Zen was followed by Zen+, but Zen 2 will be followed by Zen 3.  People who know aren't talking and the people who are talking don't know.


  • Is your Python application too stable?  Don't have anything to keep you up at night?  Why not write your configuration files in JavaScript?  (GitHub)

    You can thank me later.


Disclaimer: I accidentally unlocked my modron core.

Posted by: Pixy Misa at 11:34 PM | No Comments | Add Comment | Trackbacks (Suck)
Post contains 571 words, total size 4 kb.




Apple pies are delicious. But never mind apple pies. What colour is a green orange?




49kb generated in CPU 0.09, elapsed 0.246 seconds.
56 queries taking 0.172 seconds, 316 records returned.
Powered by Minx 1.1.6c-pink.