Better HN
topnewbestaskshowjobs
Log inSign up

phpnode

7,416 karma · joined Oct 23, 2009 (17y ago) · 1,582 submissions

Founder of https://codemix.com/ - authoritative product context which makes sure coding agents build the right thing and humans stay in control.

Email: charles@codemix.com

Submissions

comment 3y ago · link · parent

right, but they have a close association as OP says, and RDF is wrongly dismissed for similar reasons as XML (too complex, too much ceremony, too difficult, not enough value)

comment 3y ago · link · parent

That is definitely not the solely correct solution and I’m really curious to know what kind of punishment you think is appropriate here.

comment 3y ago · link · parent

Can you share a playground link? When I try I do get the suggestion, but that suggestion is coming from the list of words in the file, not from typescript's language service. In the playground you can see the difference because the the autocomplete entry for the suggestion has an abc icon rather than a cube icon.

comment 3y ago · link · parent

this is exactly what JSDoc is for, it's had these capabilities from the start.

comment 3y ago · link · parent

No, in this case the IDE won't help you. To make that happen you'd have to write this as:

    (keyof typeof someObject | (string & Record<never, never>))[]
which will give you autocomplete but still allow arbitrary strings. TS will still complain as soon as you use it as an object indexer though, defeating the point.

comment 3y ago · link · parent

This won't work - the code you've written here will forbid non string keys (i.e. symbols) but it won't allow arbitrary strings. If you changed it to a union rather than an intersection then that won't work either because the union of `"a" | "b" | string` is `string`. TS team made the correct call here, as annoying as it is.

comment 3y ago · link · parent

No, it’s more like ES4 which was eventually abandoned and never became part of ecmascript

comment 3y ago · link · parent

Title needs (2011). Not because that's when it was written but because that's when this technique was the future.

comment 3y ago · link · parent

Lexing separately is cleaner in that the lexer's only job is to produce tokens and then the parser's only job is to consume tokens and produce e.g. an AST. It also means that you can use that token stream for other things that don't require a full parse (e.g. for syntax highlighting). The disadvantage is that you're often doubling the allocations and increasing the memory footprint. I alternate between separate lexer, combined recursive descent parser and generated PEG parsers depending on what is more important: speed + maintainability, speed of execution or speed of development

comment 3y ago · link · parent

That’s a level of confidence, preparation and forward thinking that would be uncharacteristic. The reality is that everyone else is cutting staff so it’s become expected. And because it’s expected and happening throughout the industry it’s a lot easier to do a layoff or two now than it was a year ago

comment 3y ago · link · parent

we did aim for an achievable goal, and steamed straight past it with our fingers in our ears.

comment 3y ago · link · parent

Your biggest adversary, one that's cast a dark shadow over your country and it's allies, one that's consumed trillions of dollars of defence spending over the last 75 years, is now being ground down and exhausted with approximately zero of your countrymen's lives at risk and all for a mere few billion dollars. You're getting a bargain.

comment 3y ago · link · parent

Normal people just use the defaults, the idea of choosing a web browser or changing the default search engine is completely alien to most.

comment 3y ago · link · parent

that's ridiculous, most humans are natural centrists with very few people making up the extremes.

comment 3y ago · link · parent

when you do get over the learning curve it's really excellent though.

comment 3y ago · link · parent

There's many benefits in having a state machine configuration that can be serialized, especially if you can store that config in a database and load it at runtime. And actually xstate does allow you to pass the functions directly if you want to

comment 3y ago · link · parent

The details of the lawsuit can be found here: https://www.docdroid.net/60YAbCz/cftc-binance-pdf

comment 3y ago · link · parent

it's like a much more structured, and observable version of redux. observable in the sense that not only can you tell what has happened, you can also tell (and visualise) what can happen next

comment 3y ago · link · parent

that depends on how new the account is and how deeply downvoted the comment gets

comment 3y ago · link · parent

I'm not a natural Labour voter, but they have an approximately 25 point lead at the moment - they're very much getting their act together. I'm not sure where the "hating Israel" thing comes from, that talking point is several years out of date now.

comment 3y ago · link · parent

it's a totally different situation to Terra/Luna

262.

The bridge that crossed an ocean(bbc.co.uk ↗)

2 points · by phpnode · 3y ago · discuss

comment 3y ago · link · parent

`any` is infectious, a blackhole for type safety. You can accidentally pass values with `any` all over the place and TS won't complain, but it also won't catch any mistakes you make. `unknown` is much more restrictive and you can't accidentally pass those values around without refining the type, it's much safer.

comment 3y ago · link · parent

No one is pulling $100k profit from 100 acres, that’s basically impossible

comment 3y ago · link · parent

Would adding the ability to control altitude make it useful?

comment 3y ago · link · parent

he's in Russia, isn't this sanctioned?

comment 3y ago · link · parent

It's definitely time for him to let this project go, working on it is a literally thankless task and the level of entitlement shown towards his work has been infuriating to watch. The outrage towards him daring to ask the community for help, something done in an act of desperation, is a real wake up call for open source maintainers - the community doesn't give a fuck about you, they want your code and they want it free.

The psychological burden of carrying such an important but relatively unknown project has trapped him in this state of desperation for years now. It's tunnel vision and sunk loss thinking, time to quit.

comment 3y ago · link · parent

I think AI-assisted healthcare is inevitable and will probably offer the biggest improvement in the general population's health for decades, it will focus on disease prevention and flagging up those early warning signs that most people don't usually notice

comment 3y ago · link · parent

In which country is that true? In the UK for example venues need to be registered with the PRS (Performing Rights Society) but their fees are relatively low and the funds they collect are distributed based on surveys with the venues - once every year or two someone will come to the venue and ask them to write down the top 20 or so artists / tracks that they play. It's not very targeted or accurate.

https://www.prsformusic.com/

1
8910
53