Better HN
topnewbestaskshowjobs
Log inSign up

zero_shift

4,017 karma · joined Mar 10, 2017 (9y ago) · 930 submissions

I really like computers!
Submissions

comment 4y ago · link · parent

> We'll be free from having to learn a new JS framework every 6 months

The de facto starting point for writing browser applications is React, and that came out almost nine years ago.

comment 4y ago · link · parent

Couldn't you have pinned your dependency and / or installed from a lockfile?

comment 4y ago · link · parent

Counterpoint: for a long time, the convention was to store test files in a structure that 'mirrored' the source files. I never had a problem with this, and personally I don't know why it fell out of favour.

comment 4y ago · link · parent

You see, this is a design that's taken hold of a lot of codebases, and I don't think it works. I see a lot of projects with big folders mixing top level exports, implementation files, tests, test utils, fixtures and the like.

I'd much rather see the 'mirrored' approach.

> Random thought: Can the IDE recommend next file to work on

I'm _sure_ I've seen something like this in IntelliJ.

EDIT: I did! It's in the changes tab > the eye icon > 'show files related to active changelist'. It then sometimes will make suggestions based on project history.

comment 4y ago · link · parent

I love this kind of 'alternate history' computing - OS concepts that could have been, should have been.

It makes me wonder about what aspects of modern systems we take for granted. And also what kinds of OS research are going on today, the kinds of systems we might see in the future. Does anyone have any resources to help stay abreast of that?

comment 4y ago · link · parent

No, you cannot.

I'd advise you to fixup any forks on GitHub, e.g. https://github.com/fiatjaf/jiq/blob/master/LICENSE, which are currently in breach of license.

You'll need to inform anyone who forked your code, too.

This is something you agreed to in the following part of the license:

> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

comment 4y ago · link · parent

Animations like this shouldn’t require much CPU load. The actual 2D translation can be done on hardware providing no reflow occurs.

698.

Wild boar rescue demonstrates signs of empathy, prosocial behaviour(bigthink.com ↗)

2 points · by zero_shift · 5y ago · discuss

comment 5y ago · link · parent

Part of it may be the same reason that developers love to rewrite code: all creative works over a certain age accumulate compromises, and newcomers don't understand the reason for those compromises. So a new set of designers, like a new set of developers, feel compelled to "rationalise" what they've inherited.

Sometimes they succeed, and build a much more logical information architecture... but many times the new design succumbs to the same entropy that that the original one did.

comment 5y ago · link · parent

I suspect that orgs perform arbitrary UI redesigns for the same reasons supermarkets occasionally reorganise their product layout. It stops customers getting too efficient at extracting only the value they think they want.

701.

Ask HN: Is my repository analysis framework a good idea?

2 points · by zero_shift · 5y ago · 2 comments

702.

Power to the People: Reducing Datacenter Carbon Footprints(queue.acm.org ↗)

1 points · by zero_shift · 5y ago · discuss

comment 5y ago · link · parent

Is there a good place I can read about all this?

comment 5y ago · link · parent

> What astonishing progress! It's almost as fast of a feedback cycle that you would have had working in Lisp at a REPL 30 years ago!

Indeed - I chose the word REPL for a reason.

> Javascript is popular, but in most ways it's actually a much worse language than PHP, especially for new learners. The package ecosystem is a pigsty. It only exists because of legacy.

Agreed.

> I would hate to send some shiny new university grad down the route of learning that stack in depth when eventually, inevitably, it will be pushed out by something that sucks less. As soon as WASM matures to the point where in-browser UI that is NOT javascript/DOM powered is feasible on most devices, we're going to see a spate of new frameworks, new / repurposed languages on the client, etc. and the big advantage of "JS on both frontend and backend" will go away.

Hard to say. JS has a powerful incumbent factor, and a lot of the difficulties in browser dev are less down to JS-the-language than asynchronous programming in an actively hostile runtime (web browsers). I think there will be a trough of disappointment when the e.g. Java devs realise that crossing the gulf between systems and UI dev is much bigger than just the programming language.

Right now the big movement for WASM is to do high performance frontend work in it. I have had some experience in this domain - e.g. zero GC webVR apps - and it's probably the area where WASM will initially bring the greatest benefits. That means that initially the best supported WASM toolchains will likely be for systems languages like C++ and Rust.

So I think it's likely that JS will be killed by a WASM targeting language, but that this language will be selected for its near term benefits on the web. And right now the momentum seems heaviest behind Rust.

comment 5y ago · link · parent

Relevant for what? The question isn't really complete.

Is PHP still a language in use, should I support it if I build tools or platforms for programmers? Sure. It's in use in many places.

Is PHP still a language worth learning if I intend to do agency style web development? Probably yeah. It still has a high showing in that domain.

Is PHP relevant for someone writing brand new distributed systems? Probably not. It has poor ergonomics and a bad concurrency story, and there are better languages for any criteria you care about.

Is PHP relevant outside of backend web services? No, and it never has been.

Is PHP relevant for PL research? Absolutely not. PHP's language design is almost wholly parasitic. It has few ideas of its own.

But... that's not really what we're writing about, when we're writing about relevance. Relevance here is a value judgement. But it's not PHP's quality as a language that makes it so ubiquitous. PHP is largely widespread because for a long time it had by far and away the best deployment story. You could get a LAMP server provisioned and be up within minutes.

I think the really interesting question is, "based on what made PHP so ubiquitous, what's the next PHP?". And I think the answer is JavaScript.

JS is quickly becoming the platform of least resistance. I can write a script and have it served on AWS Lambda within seconds. I can go into my function code and add logging on the fly. I have the same fast feedback cycle, in other words, that I would have had with PHP fifteen years ago.

I'm becoming more and more convinced that the most powerful tool a language can provide is a REPL. The faster I can turn abstract ideas concrete, the better. And the next generation of programming languages will live or die on their "playability".

comment 5y ago · link · parent

Same. I gave it access to my data, it spat out a bunch of vague insults that just... didn’t mean anything.

It called me a “manic pixie dream girl” - I’m male.

It said I was “local-talk-radio-bumper-sticker-bitch“, which isn’t even an adjective.

I revoked access afterwards but like you I felt a bit conned.

comment 5y ago · link · parent

This would be one of mine too.

I remember reading a (speculative) argument that the earliest gospels were much more ambiguous about the "miracles" and exactly what happened after Jesus' death. Was the account of seeing him rise to heaven a later addition?

Likewise I'd also like to see what the real Christ had to say (if he did in fact exist - that's still disputed AFAIK). I've always liked to imagine he was much less spiritual and more political. I imagine there were a few other would-be messiahs doing the rounds, I wonder what they were up to, and how similar they were (I think we can be confident they were about because the New Testament does mention them - albeit very unfavourably).

Another time / place to go would be when the first books of the Old Testament were written. There's a theory doing the rounds that the first book written was Leviticus, which acted as a kind of early legal code. Then the theology was added later as a means of justifying the law and marrying it to a religion rather than just a city state. There are also arguments that early Judaism was polytheistic and Yehova was a god of a city rather than "the god" in the original conception.

I've always been curious about the origins of those belief systems and how close our Bible reflects the actual beliefs and cosmology of Iron Age proto-Israelite society.

708.

Show HN: An opinionated architecture for Node/TypeScript apps(github.com ↗)

1 points · by zero_shift · 5y ago · discuss

comment 5y ago · link · parent

Get React to give you a DOM reference and then run the D3 code with it during a post render callback or effect.

comment 5y ago · link · parent

Graphing and charting are quite different things. Charts are things like bar and pie visualisations. Graphs are networks of connections, like family trees or sequence diagrams.

If you want to visualise graphs, I have had good experiences using d3-graphviz, which can consume GraphViz DOT files - DOT is an excellent and well supported DSL for this job.

DOT lets you specify nodes and their edges quite concisely, apply positioning and ranking hints, and the d3 visualiser does a great job usually of laying out the nodes with minimal path crossover. You can then hook into the d3 selections to render however you please, generally in SVG.

A nice thing about having an SVG render is that it's very easy to attach events, and inline SVGs can be styled with CSS. So you could plot e.g. a network of CI tasks and set up a click to take you to a job summary, just like the CircleCI UI. Or visualise step functions, sagas or state machines in similar wise.

There is an actual WASM build of GraphViz compiled from C++ (you can find it on NPM) but the bundle is enormous - over a megabyte of data.

I suspect, however, that what you are really looking for is a charting library. In that case my suggestion is to purchase a license for HiCharts or another commercial product, rather than assemble something yourself through D3.

comment 5y ago · link · parent

> having a private company control what information people are allowed to see & hear is also dangerous. YouTube has the right to do this as a private company, but it's also a dangerous precedent.

Before YouTube, media was controlled by television channels, private companies who decided what they wanted to show.

Before TV, media was controlled by radio broadcasters, private companies who decided what they wanted to air.

And before that was print media, private companies who decide what is published.

So that ship has sailed. In fact it has been the norm for 99% of history. You can argue over whether we want to go back but you can't say this is some slippery slope to a dangerous future; that danger has arrived, and if anything it seems to be fuelled by the hyperdemocratisation of media.

comment 6y ago · link · parent

True. I've even had the "interesting" experience of writing low-allocation JavaScript (for 3D mostly).

comment 6y ago · link · parent

Also GC is a real no-no for real-time.

comment 6y ago · link · parent

> so you wrote one micro-service and came to that conclusion?

To be fair, that's a lot more empiricism than some teams use.

1
232425
31