Better HN
topnewbestaskshowjobs
Log inSign up

kortex

8,487 karma · joined Feb 1, 2017 (9y ago) · 2,549 submissions

Submissions

comment 5y ago · link · parent

"Two is one, one is none" with a silhouette of both planets behind it.

comment 5y ago · link · parent

I'm not even front end and I spotted that SQL injection vulnerability in like 4 seconds. That is like 101 stuff.

comment 5y ago · link · parent

This tool is amazing! Nice job, and keep up the excellent work!

comment 5y ago · link · parent

Touché! Although if you are referring to the the great housing bubble, I think a big contributing factor was financial instruments and practices which enabled more "bubbly" behavior. Giving people access to mortgages that historically would likely not have been given, and in hindsight absolutely should not have been given, injected a ton of cheap and easy money into the system. The more degrees of indirection, the more unhinged it can become.

Concrete to abstract:

- make a house yourself

- buy a house with cash

- buy a house with a mortgage with a large down payment (low risk, easy to back)

- buy a house with good credit and less down payment but PPI (riskier, the bank needs to hedge more)

- no down payment, less than stellar credit, more house than you need, etc.

The latter is super high risk and normally would not be underwritten. But someone figured out you could bundle the risk in order to distribute that risk, surely only a collapse of the whole housing market could make them massively default! Oops.

comment 5y ago · link · parent

Neat! That is exactly what I am looking for!

comment 5y ago · link · parent

One great life pro tip is to reward Good Dog paired with a sign, e.g. "jazz hands", so if they start going deaf, they still know they are being praised.

comment 5y ago · link · parent

I feel this in my bones. Some part of this is not new - from the tulip mania to beanie babies - but there definitely feels like more abstraction creeps in every year.

I like concrete things. Rugged tools, reliable cars, but these are boring. You can't build a bubble on boring, moored ideas, you need hype.

comment 5y ago · link · parent

This looks great! Might not even wait till Monday to give it a shot.

What does auto FF mean? I notice myself using a very streamlined dev/rc/main approach, favoring rebase over merge, with lots of linear commits to rc, move the puck ahead, then move master, using merge --ff-only.

comment 5y ago · link · parent

> Another significant new feature in NumPy 1.20 is the type annotations.

Fantastic! I look forward not just to stronger typing, but also the opportunities to optimize based on stronger type information through a numpy heavy workflow.

Also the stride tools are nice.

comment 5y ago · link · parent

Neat, thanks!

comment 5y ago · link · parent

It's 121 TWh/y, world total is on the order of 160,000 TWh/y (primary energy supply), so crypto is less than 1 part per thousand.

It's huge for pushing numbers around, but hardly "one of the biggest contributions".

https://www.bbc.com/news/technology-56012952

https://en.m.wikipedia.org/wiki/World_energy_consumption

comment 5y ago · link · parent

Proof of stake is the fusion power of crypto. It's been 6-24 months away since what, 2016? I toured Consensys a few years back and at the time it seemed PoS was right around the corner.

OTOH, it could be cracked tomorrow and value of dedicated silicon will go off a cliff. So I don't blame the GPGPU crowd for that, before even considering the engineering challenges of silicon/FPGA for eth.

comment 5y ago · link · parent

Those were some of the most memorable sections for me. I never really thought about the other side of monomorphizing. It made it really obvious where "zero-cost abstractions" start to fall short.

comment 5y ago · link · parent

I largely agree and personally hate working with dynamic linking, but ultimately it depends on your architecture model - to share memory, or not to share memory. If you've already decided you don't want to share memory, and you don't want to use system IPC, that leaves you with sockets (network/unix/fifo), which are all just byte streams. If you have byte streams, then you gotta use (de)serialization (serde) on either end, so effectively there is one ABI: {uint8[], size_t}. This is the microservices/docker/cloud model, and it's great. For many purposes.

But if you are dealing with OS level stuff, talking directly to hardware, in the embedded space, etc, now you care about different ABIs for performance reason. Now you decide, do I want static linking or dynamic linking? The only place I see dynamic linking really being a feature is when you have to link against the kernel, drivers, or proprietary subsystems (e.g. CUDA). IMHO, most userspace application layer stuff shouldn't be sharing memory, it should be communicating, again using byte streams and serde.

So that basically leaves the hardware/software interface: kernel APIs, drivers, etc. If you're in this space, great, it makes sense to use dynamic linking with very stable ABIs with no generic shenanigans, you don't need them. I think a lot of pain of DLL hell comes from using dynamic libs when you really should be statically compiling if it's a library, and IPC if you need to communicate.

comment 5y ago · link · parent

Likewise. I have ADHD and even with treatment, I feel more like a GPU than CPU. Small functions, lots of static typing, IDE for autocomplete, and lots of FP style patterns.

When I get thrown into an un-typed python codebase, my productivity grinds to a crawl, and I start having to do things like have a scratch pad with various versions to copy paste.

comment 5y ago · link · parent

There is absolutely enough methanol in badly distilled hooch from high pectin mash to cause organ damage and death. Yes, even in this day and age.

Sauce: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5028366/

comment 5y ago · link · parent

Well, this article helped me understand monads better than any of the other articles (though they provide important pretext).

comment 5y ago · link · parent

Probably. The ratios are well known and easy to compute but it gets interesting with upgrade modules and effect transmitters. So you can for example trade power consumption for higher throughput. But belts only support so much throughput so you can only feed an area with so much resources, so you chain assemblers with direct insertion.

This would be a great application for ML or genetic programming.

comment 5y ago · link · parent

Well for one, giant repos from folks who don't understand why you shouldn't commit and push your 1 GB pytorch model.

Yay working with academic researchers.

comment 5y ago · link · parent

This is brilliant. One of the best things I've read in a while.

I find it striking that the author's 7 rules (at about 3/4 of the scrollbar on desktop) read much like a manifest on functional programming. In particular:

> The operations are the data.

That strikes me as a sword to the Gordian Knot of distributed state. Data isn't some mutable black box you poke mutations into and prod and read. Data is the set of operations used to construct it. This feels to me like the principle underlying FP in general, event sourcing, reactor pattern, and of course these RDTs. Of course, this implies a chunk of Data is the causal history of the data (which in the physical world is strictly true).

C'est ne pas un byte[].

The fun part comes in all the different ways to optimize going from the territory (all the operations on a data blob) to the map (the "realized" data blob, or view into the system).

This also has flavors of quantum mechanics to me. Causality is anything you can get away with mutating before a meaningful observation occurs.

comment 5y ago · link · parent

I've actually experienced both sides of this in a way. Usually when I go camping, I have the mentioned brain-half-tuned-in effect. However the first time I went to a Regional Burn (a mini-Burning-Man-esque offshoot event) and camped right in the middle of Tent City, I felt completely at ease. I was quite literally surrounded by my tribe, and it was a really comforting effect.

It definitely made me ponder about Dunbar's number and what tribal life must be like.

Coincidentally, the three demarcations at this particular burn, the theme camp (~30 people), the field/block (~100), and the whole burn (~500), correspond to the lower end of the types of groupings Dunbar observed.

> Dunbar noted that the groups fell into three categories—small, medium and large, equivalent to bands, cultural lineage groups and tribes—with respective size ranges of 30–50, 100–200 and 500–2500 members each.

comment 5y ago · link · parent

Any editor worth it's salt will indent with tab and de-indent with shift tab with the cursor at the first non whitespace. Any good editor will de-indent with the cursor anywhere on the line.

comment 5y ago · link · parent

> They're glorified comments

This was always kinda false (type hints can be composed unlike eg docstring param @type). But with the introduction of dataclass, this is empirically false. You can readily hook into the type hints, reflect on them, use it to marshal data, etc. Using __post_init__, you can leverage any kind of runtime checks you want to enforce invariants.

Also type hints greatly help transpilation.

You don't need 100% to reap the benefits. In fact I will annotate small bits of un-typed code and it makes it way easier to reason about.

comment 5y ago · link · parent

Bingo. I think a big explanation of the wide variance on opinion about type hints is due to reliance on tooling, or lack thereof.

Writing type hinted python in Pycharm or Ipython feels like racing in a sports car. Without it, feels like stop and go traffic with the occasional car accident.

I can see how if you are using a WYSIWYG editor, type hints feel like more text for little gain. But even then, it really helps document intent. In fact switching to IDEs is partly what made me go from someone who hated static typing to loving it.

comment 5y ago · link · parent

I use an ergodox keyboard with a custom Dvorak based layout. Underscore is pretty prominent, analogous to the 4 key with no modifiers.

It makes a huge difference, so much so that using camelCase feels like a huge drag.

Qwerty is frankly awful for programming. I encourage everybody to look into alternate layouts.

comment 5y ago · link · parent

This just kind of proves GP's point. Random APIs usually tell you what the RNG is, but not the why/how. Most people don't care if it's /dev/(u)random, Mersenne twister, PCG, LFSR, LCG, RDRAND, etc. They care about roughly 4 attributes:

- Is it good for crypto

- Is it fast

- Is it reproducible

- Is it portable

But fundamentally, it's about the use case and interface:

- I need secure random (strong, slow, secure)

- I need Monte Carlo (good enough, fast, reproducible)

- I need chaotic behavior for my game/stress test/back off protocol (usually can be barely random, fast, reproducible)

I think calling the last case InsecureRandom or RandomEnough is reasonable to convey "don't use me for secure purposes".

comment 5y ago · link · parent

This is glorious and just the thing I was looking for. I am trying to move towards an even more container based dev environment, basically shell into long running containers. Maybe even window manager in docker .

Totally eliminates dependency hell, e.g. ROS heavy workflows where it wants to control every part of your environment.

comment 5y ago · link · parent

Sometimes it's also helpful to use beautiful soup to isolate the elements you want, feed the text of the elements into StringIO and give that to read_html.

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.
1
616263
85