Better HN
topnewbestaskshowjobs
Log inSign up

kortex

8,495 karma · joined Feb 1, 2017 (9y ago) · 2,551 submissions

Submissions

comment 5y ago · link · parent

That works too but I guess I am still getting used to the walrus operator. What really bugs me about this PEP is they are going through all this effort to introduce match but they don't have match assignments, which is personally one of my favorite things about match.

comment 5y ago · link · parent

I dig it. 'as' primes my brain to something going into a scoped context.

comment 5y ago · link · parent

I learned VB, Java, python, "C++", C, JS, go, rust, "Real" C++, in roughly that order. The first c++ is basically writing c with classes. Enough to write Arduino stuff. The latter is learning modern ish c++14. Smart pointers, copy and move constructors, lots of boost, move semantics (I still don't grok &&). Also, interfacing with c++98 and C drivers. On top of that, Cmake for building complex c++ projects.

I thought rust had a steep learning curve and borrow mechanics were hard. Boy howdy, "Real" c++ makes rust look like a cake walk. C++ has basically all the borrow mechanics of rust, it's just verbose, tedious , idiosyncratic, and bolted on. Plus umpteen other ways to pass data around.

The package and build system just works.

IMHO The "only" real advantages c++ has over rust are momentum, availability, and the ability to natively use C can code. The mind share, library ecosystem, and ubiquity are unmatched. However I see a point where wrapping FFI becomes easy enough that this last advantage becomes a draw. The second is fixed by more compiler support.

Compared to Java, rust is less verbose, faster, less memory, and better abstractions, though I haven't touched Java in 5 years.

The rust experience is so much better than C++ that I see it continuously eating into mind share. I think the joy comes from the relief of frustration of working with automatic foot guns for years.

comment 5y ago · link · parent

My favorite dive is in that category, a goth industrial club in a former hole in the wall burger joint. The front is retro diner, the dance hall is cramped, filled with psychedelic art, and sports three giant paper maché tentacles emerging from an octopus mural from an undersea theme night five years back. The alley where everyone smokes is covered in graffiti. The sound system has gremlins and the speakers distort, arguably improving the harsh industrial tracks. It's the most welcoming place in the whole city (except for that one time a volatile neo-nazi showed up - he got literally thrown out the door, we don't tolerate intolerance). Ultra LGBTQ friendly.

I have no idea how they stayed afloat during the best of times and I'm not sure it's going to open up once covid is gone. But the community itself has been around since the 70s, hopping from one seedy joint to the next as they got shuttered, demolished, turned into swanky gastropubs and hospital parking lots. Something will arise from the ashes.

comment 5y ago · link · parent

This process is absolutely scalable. Chemical process scaling is all about thinking outside the box for ways to achieve rearranging atoms.

Nay-Sayers should see the way we used to make formic acid (literally distilling formicae, ants) vs now (massive petrochemical plants).

Bleaching can be done with gas phase or supercritical peroxide in giant autoclaves like those used to make treated lumber.

You scale up the end result, not each individual step.

comment 5y ago · link · parent

Wood has fantastic mechanical properties. It's also renewable to produce. I would gladly take a piece of half renewable transparent sheet vs a 100% petroleum acrylic sheet.

The normal bleaching process is quite energy intensive, so that is also a win.

No. If it's not 100% all natural it's green-washing.

comment 5y ago · link · parent

I have negative patience for null, None, nullptr, etc sort of errors after working only briefly with rust's options and results.

It's the one thing that I think really holds back go from being phenomenal (I still love it), and I hope generics help with that.

comment 5y ago · link · parent

This happens all the time. Usually at api intersection boundaries. I do this a lot interfacing camera drivers in some flavor of C with C++ run times, so most gets passed through, but char* goes to string, pointers go to shared_ptr, etc.

I also use it a lot at boundaries where the modality changes, eg going from local data structures to RPC, where the data shape is the same, but there is io and fault tolerance to deal with.

comment 5y ago · link · parent

This is absolutely true. If I paste some c++ into my IDE with unbalanced braces, it can throw the whole file off.

The real key is: treat excess indentation and nesting as a code smell. Python should aim for 5 tabs deep max, imho. Anything else should be refactored into functions.

comment 5y ago · link · parent

Jokes on you, my coworker still obsessively uses % args syntax.

comment 5y ago · link · parent

The article mentions rendering only the fovea in high resolution. The key advantage is it does not need to render all 33Mpx equally well.

comment 5y ago · link · parent

I do most of my development in docker. It's tricky to start but once you get the hang of it, it's fantastic. My goal is to one day roll something like RancherOS and provision my entire desktop environment in containers. Then you can just pick up and move it to whatever machine you wish.

comment 5y ago · link · parent

Algicide also works. Benzalkonium chloride. You can get it as a 60% solution as a pool chemical and that will last forever. I use like 0.005% iirc. I make a 1% stock and dose that in, but I haven't used a humidifier in a while (prolly should)

comment 5y ago · link · parent

C++ tries to gently dissuade the user from making memory errors and still often fails. See: unique_ptr, std::move, ctors, dtors, move mechanics, rule of 0/3/5, etc, It's just more complicated, less elegant, and a pain in the ass.

Rust is all around better of an experience.

comment 5y ago · link · parent

There are huge differences between running with user as sudo and running as root itself. Much more of an audit trail with sudo. You can trace which account ran which command. Sure you can cover your tracks with sudo but it's far harder than with bare root, even more so with shared accounts.

comment 5y ago · link · parent

> e.g. code that uses funky casts, code that makes assumptions about data layout

Maybe it shouldn't be doing that? Isn't that the whole point of something like a -safe flag? Increase security as you go along. Yes it is going to take time. The best time to plant a tree is 20 years ago, next best is today.

comment 5y ago · link · parent

All very good points!

> you can put whatever dependencies you want on your NFS (or copy them to your node).

This is exactly what we do currently. For non controlled data, this works. However this gets really thorny when you involve CUI (confidential unclassified information), precisely because of mentioned shared fs.

Both SLURM and Kube let you write schedulers but just getting SLURM to talk to the DB was a tough affair, some very poorly documented bugs were at play.

I haven't been on this project in a bit so I don't recall the exact details. And maybe it's lack of familiar with SLURM. But I definitely felt hobbled by it. We are probably going to something based off of Hashicorp stuff.

comment 5y ago · link · parent

It's usually a straight dead shot. With optical fiber and any land based radio, there is always obstructions to bend around, physical loses, ground clutter. Basically signal to noise is way higher with line of sight.

Higher SNR means lower bit error rate means deeper modulation (cutting edge is like 65536-QAM and maybe higher). Noisy channel coding theorem and all that.

comment 5y ago · link · parent

SLURM hits a nice sweet spot when you have a very traditional cluster: very homogeneous nodes (both hardware and software), standard logins (eg some kind of LDAP/AD), shared NFS files, trusted code. It's an absolute pain when:

- Lots of different kinds of nodes

- anything more complex dependency wise than a handful of shared Conda envs

- anything involving docker

- anything vaguely untrusted

- any kind of partitioning worse than 3 nines e.g. connectivity or uptime instability

- anything more complex than 3-5 priority levels of scheduling

It's great if you hit that niche but it frankly struggles with the complexities of even moderately heterogeneous work loads.

It's also just a bit dated feeling. Even though kube is complex, it's a joy to work with compared to SLURM. Hashicorp is even better imho.

comment 5y ago · link · parent

Soooo...golang?

I write python kinda like go. So easy to debug and refactor. It's quite nice.

comment 5y ago · link · parent

I never understood this logic. It's two characters, and it's a pain to port once you go from print statements to actual logging. Also coming from C I'm used to print functions.

comment 5y ago · link · parent

You can, it's called use __future__, six, and 2/3 compatible idioms. I've been writing code (begrudgingly) like this for years. Test suite runs on 2.7-3.6 no problem, albeit annoying to write vs pure py3.

comment 5y ago · link · parent

Docker is the best thing to ever happen to scientific computing yet there is so much griping from the old guard. Trying to make a hermetic, CI/CD, within-machine-epsilon reproducible computer vision pipeline opened my eyes to just how un-reproducible your average machine learning project really is. Especially those coming from academia.

"Oh the PhD pinned to a nightly version of some dep and the AUC score plummets when you try to upgrade and customer wants this latest model in production on airgapped machines last week? Aight, stick their Conda env in a container, call it with `docker run`, and sort it out later"

Horrifying? Yes. Solving the problem on short notice? Also yes.

Plenty of more pedestrian uses but that was an actual situation where docker's reproducibility saved my bacon.

comment 5y ago · link · parent

I've found 3 broad classes of code bases when migrating:

1. Trivial or easy. Probably started using best 2/3 compatibility practices easily on, or the nature of the code lends itself to 2to3.

2. Not able to switch without effort, but able to be slowly ported to 2/3 with six and the like.

3. Hopelessly intractable. Either too much bad practices in string handling, or tied to a legacy system. No way to port it without risking subtle bugs. Usually this is due to playing fast and loose with string types, even though we have known better since well before python 3.

comment 5y ago · link · parent

> As per the creators, the OpenAI GPT-3 model has been trained about 45 TB text data from multiple sources which include Wikipedia and books.

It's about 400 B tokens. Library if Congress is about 40M books, let's say 50K tokens per book, or about 2T tokens. Not necessarily unique.

I would say it's plausible that it was a decent percent of the indexed text available, and even more of the unique content. GPT2 was 10B tokens. Do we have 20T tokens available for GPT4? Maybe. But the low hanging fruit are definitely plucked.

comment 5y ago · link · parent

Yes, kinda, with a few small exceptions. Exothermy and being thermodynamically spontaneous are strongly correlated, but you can have endothermic spontaneous reactions, such as dissolving urea in water in those instant ice packs.

You can also drive reactions by removing the end products in lieu of providing external energy.

comment 5y ago · link · parent

Right. If you increase the surface area or add more oxidizer, iron quite readily burns, see thermic lances, ferrocerium, metal powder explosions etc. But that is different than rusting.

comment 5y ago · link · parent

Do you notice your musical tastes at a given moment are modulated by Vyvanse levels? I find as I ratchet up the dose, or get very deeply focused on a task, the complexity of the music I listen to goes down. Morning, before the meds kick in, I like high-complexity high-energy stuff: eurobeat, electroswing, hard bop. That gives way to psytrance, then house, then techno, with high-tech minimal being my go-to when I am really firing on all cylinders. Then into lofi, downtempo, ambient, then silence for when I'm overstimulated.

comment 5y ago · link · parent

Hydrogen smelting.

http://www.fchea.org/in-transition/2019/11/25/hydrogen-in-th...

comment 5y ago · link · parent

Kinda. It's the difference in entropy, mostly driven by electron affinity. In the thermite reaction, the Fe-O bond is fairly strong - rust is quite stable. But the Al-O bond is stronger. Hence once you kick it hard enough to break that FeO bond, it drives the reaction.
1
626364
86