Better HN
topnewbestaskshowjobs
Log inSign up

jestar_jokin

305 karma · joined Feb 8, 2010 (16y ago) · 153 submissions

Submissions

comment 4y ago · link · parent

As you say, it's just a matter of familiarity. Sounds like you just need exposure to more programming languages/paradigms, as it's a pretty common convention. I believe it comes from the ML family. OCaml[0] springs to mind. As others have mentioned, Rust[1], Kotlin[2], Haxe[3], Nim[4], Swift[5], Elm[6], Dhall[7], and Scala[8] all use this convention.

The current syntax seems better for type inference and gradual typing.

[0] https://learnxinyminutes.com/docs/ocaml/

[1] https://learnxinyminutes.com/docs/rust/

[2] https://learnxinyminutes.com/docs/kotlin/

[3] https://learnxinyminutes.com/docs/haxe/

[4] https://learnxinyminutes.com/docs/nim/

[5] https://learnxinyminutes.com/docs/swift/

[6] https://learnxinyminutes.com/docs/elm/

[7] https://learnxinyminutes.com/docs/dhall/

[8] https://learnxinyminutes.com/docs/scala/

comment 4y ago · link · parent

Sounds like a problem with some API trying to make everyone happy.

Could be avoided by having more functions, one for each case.

(Only if you control the code, of course.)

comment 5y ago · link · parent

I know Tom Scott, known now for his YouTube videos, was on the forums (I produced a remix for a charity single he made). He's turned out overwhelmingly wholesome and level-headed.

comment 5y ago · link · parent

There's libraries that let you define a schema programmatically, and then infer the types.

https://github.com/sinclairzx81/typebox

comment 5y ago · link · parent

So a candidate has to know someone who's already in the company? Which means they probably went to the same school/uni. Rough for anyone outside your bubble.

Or they cold-call people at the company, hoping to get the goss. Staff knowing about the candidacy should not respond. Others would hopefully be suspicious - how can you trust staff who tell company problems to any old "candidate"?

comment 5y ago · link · parent

Are they also going to remove Python, Ruby, NodeJS, PHP, and every other programming language runtime? Why not?

Hopefully Graal gets more traction, so these Java (and Ruby, NodeJS, Python etc) apps can be compiled to native code, if just to bypass odd decisions like this.

comment 5y ago · link · parent

Libs provide something out of the box to do this, e.g. `ts-essentials` provides `Opaque`, so you just write `type DateString = Opaque<string, 'DateString'>`

comment 5y ago · link · parent

No good if you need to convert between time zones, IME.

comment 5y ago · link · parent

date-fns does not support time zones, so it's not really comparable.

(Although it looks like `js-joda` doesn't contain the time zone database, for that you also need `@js-joda/timezone`, and the IANA TZ DB as generated by `moment-timezone`. Oh boy!)

comment 5y ago · link · parent

Windows 8 really broke the UI, to support tablets, and the OS has never recovered. :(

comment 5y ago · link · parent

Doesn't Flutter fail point 1: all widgets are custom rendered (OpenGL) things? So integration with the host OS's capabilities may be lacking (e.g. accessibility features).

comment 5y ago · link · parent

What "prevailing socialist false narrative" are you talking about?

I don't see how print media, owned 62.4% by Fox News/Murdoch and 26.4% by Nine (chaired by Peter Costello, former treasurer for the conservative Liberal government), can be considered anything _but_ "prevailing".

Is there some other definition of "mainstream media" I'm not aware of?

Perhaps there is a false narrative, but it may not be the one you're thinking of.

comment 5y ago · link · parent

South Australia has been doing pretty well with a renewables-backed grid.

There was a smear campaign in 2016 regarding a state-wide blackout, caused by severe weather affecting the distribution & transmission infrastructure. [see #1] The incumbant political party used this as an opportunity to blame the renewable generators (and state government, from the "opposite side" of politics). [see #2]

The same severe weather event would have affected any power generator.

[1] https://www.aer.gov.au/wholesale-markets/compliance-reportin... [2] https://en.wikipedia.org/wiki/2016_South_Australian_blackout...

comment 5y ago · link · parent

A forward-thinking government would be incentivising a diverse economy, subsidised by the windfall from the currently profitable industries.

Instead, the incumbant governments just subsidise the inumbant industries; or rather, the existing "winners". (E.g. subsidising Murdoch media, mining companies, all pulling in millions/billions in profit.)

Australia has one of the lowest rankings in terms of economic complexity [see #1]. Until the government can subsidise emerging markets, there's no reason for businesses to take risks - the low population can't support it.

Propping up existing industries will eventually be a failing strategy. When Australia's "luck" (exploitable resources) runs out, "what comes after will not be so comfortable". But there's still time to steer away from that discomfort. (Unlike the imminent ecology collapse...)

[1] https://www.aumanufacturing.com.au/astralias-low-economic-co...

comment 5y ago · link · parent

I think this article misunderstands the list of supported processors. The Microsoft page is for hardware developers, e.g. laptop and desktop manufacturers. They shouldn't be using CPUs that aren't currently manufactured/supported anyway. I don't think it restricts anyone running Windows on their existing older hardware.

I'm still on an i7 4790K, and it's not listed as a supported CPU in the lists for Windows 10.

comment 5y ago · link · parent

It's German punctuation.

https://www.thoughtco.com/german-zeichensetzung-punctuation-...

comment 5y ago · link · parent

The danger is that a developer will use `svelte.each()`, thinking it uses the same rules as normal JS syntax, but it turns out Svelte applies its own rules which _are_ slightly different (hypothetically).

So the developer must remember a new rule: "JS rules when calling foo.each(), Svelte rules when calling svelte.each()". A little harder to remember. Having a unique non-JS syntax makes the distinction obvious.

(Just playing Devil's Advocate here)

comment 5y ago · link · parent

> the algorithm has transformed our world in its image

So it is, and so it will ever be.

https://en.wikipedia.org/wiki/Historical_materialism

> history is the result of material conditions rather than ideals

comment 5y ago · link · parent

I remember it from 2001...! It was very helpful in exposing me to genres I would never have otherwise known about from my semi-rural upbringing.

comment 5y ago · link · parent

I've got a team that insists all types go into `.d.ts` files. For every type internal to the app (an API backend). The types are never exported, not even to the frontend. Apparently because the tech lead thinks importing types is noisey.

My pleas, of "just fold the imports in your editor" and "it makes the types globals, so it's not modular" and "interface /declaration merging becomes an issue" all fell on deaf ears.

Some people like their bad habits because it makes sense to them, I guess.

comment 6y ago · link · parent

I evaluated formats for online docs for a Node.js library I was writing. Asciidoc(tor) was the only one I found that was available as JS lib (thanks to Asciidoctor.js), but more importantly, it could include marked sections from external code files within the docs.

This meant I could write code examples within unit tests, and include sections of those tests in the docs, keeping the docs in sync with the actual code and making sure the examples are still valid.

Does anyone know another doc format that supports this?

comment 6y ago · link · parent

The Competitive Enterprise Institute is an industry advocacy group, with ties to Koch, coal, tobacco.

https://www.sourcewatch.org/index.php/Competitive_Enterprise...

Their "scientists" have no relevant credentials and are actually "public policy advisors", and usually spread their opinions across multiple unrelated fields (which happens to coincide with whatever disinformation they're trying to spread).

I recently encountered them on Reddit, where people were trying to say the Australian bushfires were just caused by arsonists; these people are from the US and have no idea what's going on in Australia (how did they uncover evidence of arson before the local police?), there was absolutely no evidence for arson, and it didn't explain why it spread so far & rapidly.

Please make sure you get your information from credible sources; as in, sources without a vested interest in industries that have a long history in disinformation campaigns.

comment 6y ago · link · parent

A MIDI sequencer just outputs MIDI instructions, it doesn't generate sound unless it implements a synth (sound generator) of some sort.

You'd need to install something like loopMIDI, and direct the output of the sequencer to the input of a VST host, where you can load whatever synths you want.

comment 8y ago · link · parent

Right, because managers never need feedback on how well they're managing their staff...?!

Some shops have "360 degree reviews", where you need to get reviews from your colleagues and people you serve (or to use an ungenerous phrase, your underlings), not just your boss.

comment 8y ago · link · parent

As a low-cost option, maybe Google Forms? You could define it as a survey, defining your "process" and "signoff" fields. The results can be automatically recorded into a "Google Sheets" document, for easy reporting and analysis.

comment 8y ago · link · parent

I don't think renewable energy will solve all our upcoming issues, trying to keep our current global population fed and living nicely. (Plastic contamination of the biosphere, food production capabilities, deforestation for farmland & renewable crops, climate migration, etc.)

comment 8y ago · link · parent

Given the uncertain business direction, you will definitely need to make the code easy to change. Low quality code inhibits that.

comment 8y ago · link · parent

In programming, type contracts are not. Wouldn't it be nice if we had some sort of infallible static analysis tool that absolutely determines what constitutes a breaking change in your codebase?

comment 8y ago · link · parent

The issue is that because not everyone follows SemVer, you have to assume that no-one follows SemVer and act defensively, otherwise you will have problems.

Ideally, there would be a tool that can inspect your entire codebase and determine if the change is "breaking". This still has issues if the change lies outside of your codebase (perhaps such as changing the configuration of your AWS services).

comment 8y ago · link · parent

I've noticed the UI to be a bit schizophrenic. The list view has one way of displaying a ticket, but a ticket's details has another way of displaying the ticket. It's slowly becoming standardised, but I always have to hunt around to find the fields I'm looking for (often having to go into the details view).
123456