Better HN
topnewbestaskshowjobs
Log inSign up

kortex

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

Submissions

comment 6y ago · link · parent

Edit: just learned about OffsetArrays.jl - ok now that's really cool. Keeping comment for context.

> - Arrays start at one

Oof. Big turnoff for me. For some reason, this particular context switch really grinds my gears. All languages I use (except bash, which grinds my gears) use Dijkstra-style array slices: python, go, c/++, js. I'm sure it makes it easier for Matlab converts.

This, plus the mentioned weaknesses with libs like http, grpc et al, IMHO will relegate Julia to many years of just being wrapped by other languages. To avoid that, I think they should be thinking about continuing to woo more of the engineering crowd - which to their credit I think they've done pretty well so far.

https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/E...

https://github.com/JuliaArrays/OffsetArrays.jl

comment 6y ago · link · parent

That was neat! Next, maybe you could do ones on URNs. They are much rarer in the wild, compared to URLs, but you can find them in torrent magnet files, isbn: numbers, etc.

They are a powerful concept - give a resource a universal name, regardless of how you locate it. I'm surprised this hasn't taken off as a way to universally point to assets (outside bittorrent), but I guess the challenge there is the resolver, and the lack of a pressing need when URLs do most of what you want.

I just want a way to refer to a file that might be local, http, s3, what-have-you, and always refer to it with the same string, regardless of where it's located.

There's XRIs, but there's, erm, some drama going on there.

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

comment 6y ago · link · parent

> In economics, the Gini coefficient is a measure of statistical dispersion intended to represent the income inequality or wealth inequality within a nation or any other group of people.

I'm guessing this is their metric.

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

comment 6y ago · link · parent

Any time you want some specific even with very high accuracy. Shortcut combos don't always work/trigger at the right time/in the right focus context. Or if you have a QMK with altogether too many virtual keys - I have like 60 x 7 layers = 420 possible two-thumb-one-finger events, I don't use them all but I still lose track. I'm thinking of building one of these for things like "jump focus to chat window and mute".

Also it saddens me we have a speaker mute keycode but no system-wide mute mic.

comment 6y ago · link · parent

This really only works in the most trivial of cases. There just isn't enough symbol-space information in a basic keyboard to be able to implement many QMK hallmarks like level shifting, chords, momentary hold effects, and taps.

I have thought about custom in-line hardware but that's honestly as complicated as QMK. Plus latency.

What I would love however is an inline monitor to see what keycodes I'm issuing. It gets...zany.

comment 6y ago · link · parent

Reminds me of my visit to the Museum of Torture in Italy. Quasi-NSFW-ish but nothing gory, still, proceed with caution if you are squeamish.

http://www.torturemuseum.it/en/

comment 6y ago · link · parent

Until a sizeable chunk of the world's workforce is erotically DDOS'd into blissful oblivion.

Mmm cyberpunk.

comment 6y ago · link · parent

Are "protocols" the python term for what Go (and I guess java but I'm way rusty at java) calls "interfaces"? eg the set of methods exposed by an object.

comment 6y ago · link · parent

Interface typing > duck typing. With any sort of code completion, it's 1000x easier and more productive to figure out what goes where when the computer has some idea of the types of a given varaible, and hence what operations you can do to it.

It's like duck typing with a built-in Audubon society taxonomy chart.

You can always do whatever you want at runtime, it's still python.

IMHO, duck typing is strictly inferior to interface typing. You'd define a `Number` interface which `int`, `float`, ect all implement.

comment 6y ago · link · parent

Oh good, my incessant squirming, leg-bouncing and position-shifting has some benefits!

comment 6y ago · link · parent

Float glass gets you a fairly flat (+/- 0.001"-0.0001") surface, but it's kinda fragile and bendy. You need something sturdy and flat underneath it, which sort of begs the question.

A good surface plate will get you 0.000001"-0.000005"

comment 6y ago · link · parent

I totally get your point, but that's still below the level of abstraction I'm talking about. Basically it boils down to, python's main trick is metaprogramming. If your interprocess optimization is a bottleneck, then write a framework which lets you put those pieces together under the hood.

> Furthermore, Julia has much power powerful metaprogramming facilities than Python does.

Until someone writes a way to import julia code directly into python/autogenerate it from python. Anyone who says "well then you're not really writing python" is missing the whole point: writing python is all about exactly this sort of tip-of-the-abstraction-iceberg trickery.

Sure, you can call python from Julia as well. So it boils down to "which is the better glue language?" This isn't a competitive thing, it's just literally what Python is meant to do.

https://pyjulia.readthedocs.io/en/latest/usage.html

comment 6y ago · link · parent

Wait, really? scrambles to check woah...

I've never seen typed yaml, this is wild.

    negative: !!int -12
    zero: !!int 0
    positive: !!int 34
Can't say I love the notation, but indeed that is type annotations. I guess neither "yaml type hints" nor "yaml type annotations" are the right query. Had to search explicitly for "yaml tags".

comment 6y ago · link · parent

Have you tried writing python as if types were mandatory? It takes a lot of discipline but it's a totally different beast with strict mypy checking.

comment 6y ago · link · parent

I want a modern C. I love/hate C. I mostly love Go. It has warts, but the philosophy works _for my brain_.

Python will gain usecases as a meta-language as the ability to automatically wrap lower abstraction libaries improves. I see Julia eating much of Python's lunch, then python abstracting its way over julia, just because it can.

comment 6y ago · link · parent

Huh, I had no idea, thanks for the heads up!

comment 6y ago · link · parent

I work on a system for remote sensing and automated marine mammal detection. I may not need contingencies for - but I have reckoned with - the full gamut of time deltas from seconds to microseconds. Maybe I've not had to deal with L1 cache misses, but at times memory fetch vs in-pipeline has come up when it comes to image processing choices.

I'm kind of in an odd niche, so maybe your last sentiment applies. But it strikes me as very un-hacker-mindset to be like, "no one _needs_ to know X". it's curiosity.

comment 6y ago · link · parent

This is the best criticism of this entire thread.

It'd be easy to employ ... as a document separator / end indicator that could be checked for.

comment 6y ago · link · parent

Wow, I use pb's a ton and didn't know this. I'd upvote this twice if I could!

It looks oddly like HCL. I wonder...

comment 6y ago · link · parent

Except YAML is straight-up wrong at times, unless you know all the edge cases. I just learned unquoted NO is coerced to False. A classic case of leaky abstraction/"bad magic".

Unless you have actual type annotations/tags (eg xml, jsonld, graphql), everything IS a string. There's no assumptions otherwise.

comment 6y ago · link · parent

I like this quite a bit. Keep stringly-typed text files as strings; let code sort it out.

Pydantic would work great in conjunction with this to coerce types.

comment 6y ago · link · parent

There is also plumbum for more ergonomic pipelines in python:

https://pypi.org/project/plumbum/

comment 6y ago · link · parent

I've been in a similar boat, yet despite as my experience with it grows, bash just wears on me. Everything feels like a hack. Sure, piping is easy, but if statements are atrocious.

Starting to get into Xonsh. Still a learning curve, cause it's neither bash nor python, but it's really refreshing.

comment 6y ago · link · parent

Shellcheck (https://www.shellcheck.net/) is essential, with or without IDE.

Pycharm has it built in or as a plugin now too.

comment 6y ago · link · parent

I got bit by a Bash-ism late last night (-ne vs != causing a CI test to silently fail) and that was kind of the last straw for me.

I drive zsh but still use bash scripts a lot cause "portability" and "it's available everywhere" but that argument just doesn't hold up when I'm already in control of most of my stacks and have docker access on pretty much every host I'm in.

I'm forcing myself to use Xonsh more, which despite having all its own quirks, is so much less mental overhead going between Python development. Yeah maybe it's a few more steps (than zero for bash) to provision, but it's worth it.

comment 6y ago · link · parent

I'd look at the graph, cause sometimes you end up with a stale master/main and everyone pushing to "develop" and cutting releases from that.

Heck, I worked on a repo where "master" was 2 years untouched, "rc" was like 8 months untouched and effectively deployment, "next" was effectively the release candidate but also used in production elsewhere, so it was gated like it was a master branch, and everything else was dev. Yeah.

comment 6y ago · link · parent

I don't think main is as fraught, see the AAVE/historic dialect pronunciation of master "massa" and the baggage therein.

Master much more clearly implies the antonyms "slave" "servant" "underling". to me, "main" doesn't have one single strong antonym, it's more contextual, but could be side, alternate, aux, etc.

comment 6y ago · link · parent

I've read this is bad for the seals. Use citric acid (the main component of jetdry) dissolved in water instead. Haven't tested this effect but it's plausible, given that acetic acid is itself a solvent and can diffuse into some rubbers.

comment 6y ago · link · parent

100% agree. Automation is a force multiplier. It means each human can build more widgets, travel farther and faster, harvest more crops, and also snitch on a neighbor, enforce traffic violations, and cast a chilling effect over any behavior outside social norm.

comment 6y ago · link · parent

Except SCS is all about "fearing the other".

Ex. A: China's singular party has implemented a surveilance dragnet and social tattling ideology with vast repercussions on freedoms and censorship. Features include forced assimilation until it is "voluntary" (re-education), measures that encourage ratting out dissidents, a leader with near mythical status, and a technical panopticon.

Ex. B: HN commentor warning about just such a system.

I get your point, but GP is hardly "spreading fear about the other" when saying "hey we need to pay attention to this if we care about liberty"

1
686970
86