Tuesday, April 09

Geek

Daily News Stuff 9 April 2019

This Means You Edition

Tech News

  • Well, yeah, sure the First Amendment says "Congress shall make no law" but it doesn't say "this means you".  (TechDirt)

    Republicans this time, because the urge to control what people say is not just bipartisan but almost omnipartisan.

  • Netgear's new Nighthawk AX4 range of WiFi-6 routers shows the current problem with consumer and SMB networking: All but one model has significantly more WiFi bandwidth than wired bandwidth.  (AnandTech)

    So in theory you can do 6Gbps of WiFi, but you only have 1Gbps upstream to the internet or corporate network.

  • Dell's Precision 7000 workstation supports up to 56 cores, three Nvidia Quadro RTX graphics cards, 3TB RAM, 16TB NVMe SSD, and 120TB of local hard disk.  (AnandTech)

    I'll take two.

  • Has Google stopped indexing old web pages?

    Well, let's see.  I conveniently have a 16-year archive of stuff I can search for right here.

    https://ai.mee.nu/icons/PenguinInfestation.PNG?size=640x&q=95

    It found the current live archive page and direct link, and also the original post from Blogspot before it got imported first into Movable Type and then into Minx.

    Analysis: False.

Crystal Ballroom

  • Crystal is fast, but it's not C++.  Two years ago I experimented with building a runtime for a new programming language (because at the time Crystal wasn't really ready for production) and I was getting 500 million instructions per second on my iMac.  That's not bad for a simple implementation of a register-to-register bytecode interpreter.

    I did a (very) quick rewrite in Crystal and it looks like it's trending towards ~100M ops per second as I implement more opcodes.  Now, I am running the tests on Tohru (3.7GHz Ryzen 1700) rather than Taiga (4.2GHz i7 6700k) which accounts for some of the difference, but that's 15%, not 5x.

    On the other hand, that's plenty fast for an embedded scripting language that runs inside a statically compiled application.

    It might mean I need to use an array of pointers to inline blocks or something like that.  Let me see...

    Update: No, I think what's going on is that everything is bounds-checked (except, as my latest benchmark run just showed, integer overflow) where of course C/C++ says "You're on your own, mate.  Good luck."

    I've worked with Ada previously, years ago, and saw similar 5x performance differences between that and C.

    5x slower is a lot.  But: 

    • Crystal makes it 10x easier to write this code, which means that it might actually get done.  Code that exists is almost infinitely faster than code that doesn't.

    • Crystal itself provides the fast language I need - more than twice as fast as the best case for my C++ based interpreter - so this is just an engine for run-time features like scripts and templates.

    • I can trivially spit out the bytecodes as compilable Crystal code and it gives back that 5x performance and then some.  I got around 900M ops in a test run just now.  (And a faster CPU would easily exceed 1B.)  

      And that is still using the generic data structures of the bytecode engine.  So if you find yourself with a big piece of code that you need to speed up you can compile it and link it in to your binary, and mix and match Crystal, statically compiled bytecode, and dynamic bytecode however you want.

      Side note: If I translate my bytecode to use named variables rather than the bytecode engine's indexed register files, the Crystal compiler optimises it down to a constant and runs in zero time.  And if I turn off the optimiser, the named variable version of the code runs slower than the optimised register file version.

      So I'm not sure exactly how fast that would be in a general case.  The unoptimised named variable code is 15x faster than the unoptimised register file code, but that ratio would be impossible for the optimised version; the Ryzen CPU core can't actually issue that many instructions per second.

    • I'm installing Crystal on my iMac.  A little after midnight, and I hear this sound.  What is that?  It's the fan in my iMac, because the Homebrew install for Crystal builds the entire LLVM compiler framework from source.  That fan never, ever spins up.  I've had this iMac for three years and I don't think I've heard it before.

    • Crystal has a port of the Ruby Language Toolkit, which includes all the stuff you need to build lexers and parsers and compilers, and has a fully worked example of simple language somewhere between Ruby and Python in syntax.  So I can leverage all of that and don't need to start from scratch.

    • Oh, there's a thought.  Crystal is built on LLVM, as my iMac has pointed out rather volubly.  But apart from that, Crystal is written in Crystal (though the very early versions were written in Ruby) so Crystal needs an interface to LLVM, and it has one.  A very extensive interface.  And LLVM has a JIT compiler.  Only problem is reading through a couple of thousand pages of documentation.  Well, something for v2 if v1 ever sees light of day.


Disclaimer: 0th Amendment: This means you.

Posted by: Pixy Misa at 11:26 PM | Comments (5) | Add Comment | Trackbacks (Suck)
Post contains 855 words, total size 7 kb.

1 RE: The Journalism Ethics Board
The sanctions part is definitely Constitutionally suspect  and likely won't pass muster.  
On the other hand, given how much of 'journalism' today is really Political Action Committees (PACs) hiding under a thin facade of historical journalistic integrity, something has to give.  That's why it doesn't surprise me at all to see something like this.  Frankly it's milder than I expect we'll ultimately end up with, much to our detriment.

Posted by: StargazerA5 at Wednesday, April 10 2019 03:45 AM (jl9eJ)

2 Well, why DOES everything taste like chicken?

Posted by: The Brickmuppet at Wednesday, April 10 2019 04:23 AM (xOgT9)

3 Evolution, basically.  It's not so much that everything tastes like chicken, it's that chickens are dinosaurs and everything tastes like dinosaur.  Or at least everything from amphibians through to monotremes.

There's some more detail here but the flavourogenetic diagram shows kangaroo as tasting like chicken which is categorically false (it tastes like beef) so I'd take it with a pinch of salt.  And some garlic and olive oil.

Posted by: Pixy Misa at Wednesday, April 10 2019 12:02 PM (PiXy!)

4 But pigs don't taste like chickens, they taste like peop....they taste different.

Posted by: The Brickmuppet at Wednesday, April 10 2019 12:44 PM (xOgT9)

5 Pigs aren't dinosaurs though.  Pigs are turtles, or possibly frogs.

Posted by: Pixy Misa at Wednesday, April 10 2019 04:32 PM (PiXy!)

Hide Comments | Add Comment




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




56kb generated in CPU 0.0149, elapsed 0.1134 seconds.
58 queries taking 0.1048 seconds, 345 records returned.
Powered by Minx 1.1.6c-pink.