1. 9

    The NVIDIA Jetson Nano? It is used in projects like “Donkey Car”, to control self driving robots.

    1. 3

      Supports Cuda, 4GB of ram, 128 GPU cores. The only way you could get close to this would be to repurpose a laptop which is gonna be way heavier and bulkier. The nice thing with the Jetson, is that you can code directly on the device, cross compilation and cross dev can be painfully slow.

      https://www.nvidia.com/en-us/autonomous-machines/embedded-systems/jetson-nano/

      1.  

        The dev environment is quite sweet if you’re used to Linux stuff … it’s just a Ubuntu install with a bunch of tools already installed, you can plug it into a monitor / keyboard or use it headless. The devkit includes digital I/O, USB, HDMI. Ethernet and a camera port. I think it’ll take a PCIe wifi card or just use a wifi usb dongle.

        Some notes at https://nick.zoic.org/art/nvidia-jetson-nano-experiments/ although I haven’t actually got the IDE working yet … I’ll come back to it sooner or later …

    1. 7

      In some languages, you can turn the GC off in the fast path or tell it when to collect garbage. That might have solved this problem. Does Go lack that feature?

      1. 3

        You can’t disable it I think, but you can tell go to run a GC (with runtime.GC()). If you don’t create a lot of garbage, and find an opportune time to collect garbage not too infrequently, you shouldn’t see unwanted GCs.

        However, in a server situation, when do you have the opportunity to pause to collect garbage? It’s not like you can just say, “collect if the user hasn’t interacted for some seconds”; the service is probably always busy.

        1. 5

          Literally the first result for “golang disable gc” on either DDG or google indicates that turning the GC off is as simple as setting an environment variable, and that it can be manually invoked.

          I’d wager writing a post based on a guess took longer than finding out would have.

          1. 3

            Oh, that’s very interesting. Running with GOGC=off, manually monitoring the process’ RSS and running a GC only when it gets too high would probably have almost solved Discord’s problems then.

            Still, writing services in Rust (or even C++) just to not have to bother with memory management minutia seems like a good idea for services with high performance requirements.

            1. 3

              Rust and C++ don’t absolve you from dealing with memory management minutia; they obligate it. This might make sense if your application has some critical mass of code that requires careful, explicit memory management, but I would put that threshold somewhere above 90%. The more compelling reason to use Rust or C++ is that you need a mature compiler with lots of optimizations, not the memory management considerations. Of course other requirements (e.g., safety, obscure target architecture, etc) might also prompt you to choose Rust over Go.

          2. 2

            In a server situation, there’s a few things you might do:

            1. No GC at all in the hottest path. Do that one manually.

            2. Memory pools or reference counting if they have less performance impact.

            3. Activate GC after the hot path of the service call.

            4. If there’s ups and downs, do the GC’s on the downs. A load balancer or monitor might even tell it to.

            5. If load balancing w/ multiple nodes, create enough downtime periodically to force a GC.

            6. If garbage builds slowly, then don’t activate the GC at all. Use a cluster setup, eventually fail-over to another node, and restart the one full of garbage. That flushes out lots of problems for reliability, too.

            1. 3

              That last one actually sounds eminently sensible if your application really has that characteristic.

              Or combine 5 and 6: For each node, when the garbage gets over a threshold, set its health to ‘unhealthy’, wait until connections from the load balancer drain down, run a GC, set health back to healthy.

              The other thing which comes to mind is they have a massive LRU cache full of teeny counters: perhaps this would be better as an array of bytes instead of an array of garbage-collected number thingies. Or maybe I’m just thinking like a C programmer still :-P

        1. 1

          Work: trying to work out what’s next, a few cool things on the horizon but nothing concrete yet.

          Not-work: trying to deal with Melbourne’s air quality.

          1. 1

            QR codes really are the wild west of identifiers: is this a serial number, a url, a business card, a wifi password?

            Barcodes in general really. Yesterday I was at a hardware store where the POS terminal wanted me to enter a phone number but I’d left a cardboard box sitting on the scanner and it kept spontaneously entering the UPC code (with weird prefixes) into the phone number box.

            1. 7

              A little side note: https://nick.zoic.org/art/doom-git-gud/ inaccuracy is important :-)

              1. 2

                Finishing up the last 2 days of my current contract and looking forward to a summer holiday: I’ll get on with looking for something new in January.

                In the meantime, this: https://nick.zoic.org/art/saturnalia-a-rotating-christmas-tree/

                Happy holidays, Lobsters.

                1. 5

                  I use Jekyll and while there are some annoyances (posts must have a date in the name), it gets the job done. There’s a lot of support and templates and themes. Applying a new theme is really convenient.

                  The upside is that the strict post structure helps with other collaborators who would otherwise mess it up.

                  My last few sites, I’ve finally been disciplined enough to not start hacking on the template so I can get updates from the author.

                  Another upside is that GitHub uses Jekyll for its default pages, so while I don’t host through GitHub, it increases the volume of decent work on Jekyll.

                  edit: added in this stuff because I forgot that I recently had to make this decision and chose Jekyll.

                  I first started using Jekyll at work to try to encourage people to spend less time on web/SharePoint/whatever “collab” someone bought and more time on the content and knowledge.

                  I recently was bored at a conference and converted my ancient blog from blogger.com to Jekyll. I ended up spending about 8 hours browsing through themes and an hour maybe actually implementing.

                  If anything Jekyll is too popular so just a simple blog/list desire was not complicated enough for all the neat templates for businesses. It reminded me of WordPress themes. I also help a few people with WordPress for their business and will eventually try out an SSG on top of the WordPress editor because the people with WordPress will never hand edit a markdown file.

                  1. 1

                    I use Jekyll as well and I agree with all the items that you mentioned.

                    1. 1

                      Jekyll is sufficiently flexible that you can get rid of stuff like dates in URLs so long as you write your own templates. But then you can’t really use templates/themes. I rarely change that sort of stuff so it works for me.

                      1. 1

                        It’s possible, but using the functionality around posts is really helpful. I couldn’t figure out how to get past the _posts folder and yyyy-mm-did file name prefix.

                        1. 1

                          Yeah, unfortunately it’s a bit “all or nothing”.

                          If you’re interested my blog source is at https://github.com/nickzoic/nick.zoic.org/ (specifically _layouts/article.html and _layouts/everything.html and _includes/sidebar.html )

                    1. 1

                      https://nick.zoic.org/ uses github pages (jekyll) but not in a purely jekyll-y way, eg: there’s no dates in URLs and so on. I found it pretty easy to work out how to do this, and I like that I can just push minor changes with not local toolchain. It’d be pretty easy to drag this over to some other provider or a raw bucket of files if I needed to leave github.

                      Previously it’d been running under Pelican and S3, and before that it was running on a Makefile and rst2html based script I wrote back before static site generators were a big thing …

                      1. 5

                        Best: Seek … we reached a verbal agreement on the contract on the phone on Thursday evening about 6pm and they asked me to come in Friday morning to meet the team, I figured it’d be a brief hello but when I got in there was the filled in contract, an access card and a map of how to find my desk waiting for me at reception. On my desk was a newly imaged workstation and a note to let me know that if I didn’t like the keyboard or mouse there was a big box of various spare keyboards in the store room (see map provided).

                        Worst: Telstra.

                        1. 9

                          I can’t really understand why “not constructed in academia” is right up there at the top of the list. Is academic research being held back by some kind of Knuthist orthodoxy?

                          1. 2

                            Most academic research is impractical in some shape for form. Some of it is good. I always distinguish between the two to be fair to those building useful or potentially-useful stuff. You could actually corroborate this with just one example that boosted productivity worldwide, paying for itself and many others in the big picture. It started there followed by what the business did.

                            RISC CPU’s, ARM and MIPS empires, came out of academia, too. MATLAB was started by researchers. Coverity started as a way to make compilers do checks on code. In formal verification, CompCert compiler sold commercially started as academic research. Note that I’m excluding research by companies since I think that might get dismissed as more productized focus. Just folks at research organizations whose research proved enormously useful. In CompCert’s case, more practical than most thought it would get.

                          1. 2

                            At the meeting, the two leads will present the one, correct decision that they have agreed upon. The executive will sit there, listen, and ratify it.

                            The obvious next question being: why are executives paid so much to play this role?

                            1. 1

                              Now you’re getting to the important stuff this article dodges. ;)

                            1. 3

                              A couple of my favourite projects have been python scripts spitting out a bunch of static assets, and a static HTML5 frontend to make them look nice and interactive.

                              1. 9

                                Perl: it really pioneered the idea that a language needed libraries, and CPAN delivered on it’s promise.

                                LaTeX: getting it right is an epic pain in the arse but once it’s right it stays right even as you hack your formatting and rewrite your conclusions.

                                SQL: has saved me more times than I can enumerate when hit with urgent businessy questions.

                                C: Hello darkness, my old friend.

                                1. 2

                                  Too bad the modulus operation via truncation isn’t faster than the native divide instruction.

                                  1. 2

                                    I think the thing that’s mentioned up the top but missing from the discussion further down is that these operations are likely to be a lot faster on architectures which don’t provide good native divide instructions … ARM for example.

                                    1. 1

                                      The way it’s mentioned at the top is a bit misleading but I see what you mean. Makes a lot more sense for resource-constrained hardware.

                                    2. 1

                                      The problem is that there is only one divisor per code (at least in x86-64) and it is not fully pipelined, so instead the compiler does the magic for you. It also uses slightly different way of doing that than the article proposes.

                                      1. 1

                                        I think you mean “per core.” But I see, the compiler uses integer multiply + some fixups to generate the remainder, not the divide instruction. I remember looking this up once, but I wonder if there is a primer on that method.

                                        1. 1

                                          Yes

                                    1. 1

                                      I’ve messed around with some similar ideas here: https://nick.zoic.org/art/flobot-graphical-dataflow-language-for-robots/ . Other examples include LabView and Node Red …

                                      i can’t help thinking that these might finally become practical as monitors are getting huger and higher resolution: using all that space for a 80 column terminal seems a little wasteful :-)

                                      1. 1

                                        If numeric type in PostgreSQL can go up to 16383 digits after the decimal point, how many comments can I store this way?

                                        1. 4

                                          If we’re taking Postgres, might as well have parents INTEGER[] and save yourself a lot of messing about.

                                          1. 2

                                            Or just use a recursive CTE

                                        1. 1

                                          I like the idea of this comp but honestly have seen worse … quite a lot worse … in the field.

                                          1. 1

                                            We’re hoping the teardowns egg people on to submit worse entries every month. If you have any suggestions how we can improve, I’m happy to hear them! :)

                                          1. 31

                                            Quoting for emphasis:

                                            A standard workweek in the US is 40 hours a week; elsewhere it can be a little less. Whatever it is, outside those hours you shouldn’t be working, because you’re not being paid for that work. Your evenings, your weekends, your holidays, your vacations—all of these belong to you, not your employer.

                                            Every minute you give your employer serves to devalue your time. If you work even an extra couple of hours each day (say, commuting and taking lunch at your desk while working) you have effectively given your employer 10 extra hours a week for free, for an effective pay cut of 20%.

                                            1. 9

                                              Yep! One of the best things I heard regarding this was from a programmer friend of mine who is also a professional music producer. He said:

                                              I consider the time I spend commuting to work to be work time, because every hour I give to my employer is an hour I’m not spending making music. If my employer is gonna take time from my passion, they’re gonna have to pay for it.

                                              1. 3

                                                I can only speak for the US, but I feel like I have to comment on this:

                                                I consider the time I spend commuting to work to be work time

                                                I understand and support the sentiment. But if you’re literally counting your commuting time as chipping away at your 40 hours a week (or whatever it is), you should be prepared to explain to your manager how whatever you’re doing on the commute counts as bona fide work or else you’re going to be having a very unpleasant conversation with them.

                                                If you’re fortunate enough to commute on a bus that offers wi-fi, then it’s easy to justify counting that as work time. But if you don’t have a computer in front of you (in the case of jobs like programming that require a computer), you should be circumspect about counting that as “work.” If you’re thinking about work in that time, and your boss is okay with that, then great, but counting commuting time as work is not the norm in the US.

                                                1. 4

                                                  but counting commuting time as work is not the norm in the US.

                                                  Well, perhaps it should be.

                                                  They pay you for the time spent walking to meetings, walking to get a smoke, navigating internal documents–and I’d bet my hat that management gets paid the same on golf games, “executive retreats”, “networking”, and other events.

                                                  There’s no moral reason not to count time spent commuting as work–it benefits the company, doesn’t benefit you, and is required for the other work to get done.

                                                  1. 4

                                                    I’ve happily taken a nominal pay cut to work from home - I don’t spend that time or money commuting.

                                                    Compensation is a negotiation - typically an experienced programmer has several options available. If you want me to work for you and you insist I show up in person, I’m going to demand an extra 20% or more to cover the time I spend traveling and the inconvenience of being out.

                                                    1. 3

                                                      It’s not just in the US. I have yet to discover a place in the world where commuting by car can be considered work.

                                                      1. 5

                                                        It’s unlikely you’ll get paid for it. But when deciding between a nearby job which pays $X and a job an hour further away which pays $X+15%, it’s worth factoring it in to your decision.

                                                      2. 1

                                                        I understand and support the sentiment. But if you’re literally counting your commuting time as chipping away at your 40 hours a week (or whatever it is), you should be prepared to explain to your manager how whatever you’re doing on the commute counts as bona fide work or else you’re going to be having a very unpleasant conversation with them.

                                                        Yes you definitely need to be ready to explain it. One way to look at it is this: businesses charges their customers for every single thing (including delivery). If I’m offering the business my services as an employee, then in a way I’m the business and they’re the customer, thus I’ll charge for delivery just like they do with their customers. Sure business people would argue differently, but business people would also argue that full-time exclusive workers can still be contractors that don’t get paid insurance or what ever it is in your country that they love to not pay for.

                                                  1. 1

                                                    An HTML5 logistics app I wrote a few years ago, which runs on scanning guns and touch-screen PCs and interfaces to SAP, is still apparently running unmodified and shuffling around >$1M of stock a day all around Australia … kinda proud of that one.

                                                    1. 6

                                                      Interesting that this same thing happened 20 years ago, in 1999, when consumer GPS systems, while not as popular and prevalent as they are today, did exist. I don’t remember hearing anything about a GPS rollover at the time, even though the vaguely-similar Y2K bug was all over the news and pop culture.

                                                      1. 4

                                                        Back in 1999 consumer GPS units were pretty rare eg: Garmin 12 and similar. Selective Availability severely limited their accuracy so they weren’t much use in town but they were still useful for eg: offroad motorcycling in remoter parts & doing daft things like finding confluence points: http://confluence.org/photo.php?visitid=4068&pic=3 But GPSes were pretty rare and not really thought of as a “computer thing” … I was involved in Y2K planning & testing but don’t remember this being discussed at the time.