HNHacker News
TopNewBestAskShowJobs

_uhtu

1 karma · joined February 26, 2025

submissionscomments
_uhtu··on Announcing TypeScript 2.7
First of all you probably shouldn't complain about the JS ecosystem if you barely know anything about the JS ecosystem. This is evidenced by you bundling several things in your "amd vs esnext vs systemjs and Babel vs browserify vs requireJS vs webpack" which aren't directly comparable. Babel is a compiler, ESNext is a language specification (now ES6 since after being been finalized more than 2 years ago). amd, systemjs, requirejs, and browserify are all still supported and have not been "deprecated" as you say. However for the last 2 years Webpack has been the dominant module bundling system since it's incredibly powerful and extendable.

The standard for about 2 years now has been to use Babel + ES6 imports with Webpack. Babel lets you write ES6 code that compiles back to ES5, which means older browsers can run it. This means you can write modern code with patterns that will never get deprecated that works in older browsers. Webpack takes some configuration to fine tune it for large apps but getting it set up for a small app is pretty painless these days, and it continues to improve.

I'm honestly kind of sick of there being someone in every comment thread bursting through the door to tell everyone about all the bloat in the JS ecosystem. It's largely been solved and there's a lot of maturity in the libraries in use now. I think a lot of the frustration came from people who liked just pasting a script tag to add new libraries to their frontend, and any system which requires them to actually think and configure before pushing to production is considered too complicated.

_uhtu··on Dustin Moskovitz pours funds into high-risk research
No i know how antibiotic resistance works, i just haven't seen it have any effect on me or anyone I know, which makes the statement "we're rapidly running out" seem distant
_uhtu··on Concussion doctor says he found CTE in living NFL player
The bigger problem with helmets is that they feel like they protect you from concussions when in reality they don't at all. That makes people go out there feeling invincible and leading with the head.
_uhtu··on Dustin Moskovitz pours funds into high-risk research
I know that antibiotic resistance is a problem but can you elaborate on how were rapidly running out right now? I got strep last week and they prescribed me amoxicillin (or penicillin if i was allergic) which are both quite old and established, and still prescribed today.
_uhtu··on The Q# Programming Language
Fact: any time anything is discussed anywhere, it can never be discussed on any other forum ever again forever. Doing so would make the person who discussed it the second time be a smug prick for not checking to make sure his comment was wholly original.
_uhtu··on Facebook Will Introduce Ads as Videos Start, a Move Long Resisted
Delete it off your phone, ASAP. There is literally nothing to gain from having the Facebook app on your phone. The app doesn't positively help you with the one thing Facebook is really useful for - event planning.

Every once in a while i like to see what events my friends have invited me to, so I log on to facebook on my browser, check my notifications, and leave. How do I prevent myself from getting sucked in by the news feed? I block it, with News Feed Eradicator, a Chrome extension. If someone posted a picture of you or tagged you in some way, you know, the things that in your news feed that are actually useful/concern you, you get a notification without any clutter to block it up.

It's lowered my stress level and I still get to stay in touch with the things I care about.

_uhtu··on F.C.C. Repeals Net Neutrality Rules
Designated as Chairman by Donald Trump - https://en.wikipedia.org/wiki/Ajit_Pai

Obama Designated Tom Wheeler chairman, and he put in place the regulations that Pai dismantled today - https://en.wikipedia.org/wiki/Tom_Wheeler

_uhtu··on New Model Warns About Crispr Gene Drives in the Wild
No genuine scientific conclusion confirms this. It's a hypothesis and one we have no way of testing, but people think it sounds awesome so they spread it without a good understating.
_uhtu··on Millennials Are Screwed
Wait back up. That statistic used median values and quartile values to describe debt, and an average to describe income. This is how people mislead you with statistics. Average income is going to be higher than median if the highest earners earn several times more than the median (which they do).
_uhtu··on F.C.C. Repeals Net Neutrality Rules
Appointed by a candidate who lost by 3 million votes
_uhtu··on The Q# Programming Language
Of course, that's why I wonder if they really cared or if it was just a mistake.
_uhtu··on The Q# Programming Language
Anyone else notice how the <title> of this page is "Intent and product brand in a unique string of 43-59 chars including spaces | Microsoft Docs"?

Which is obviously a placeholder, so I wonder how much Microsoft really cared about this release.

_uhtu··on Currying is not idiomatic in JavaScript
Here's the simplest example I can come up with, and it's something I do all the time.

I have an array of objects in my state. For this example we'll say they are Todos, and each one has three properties, id, name, and checked. I have a function `checkTodo` with the signature `checkTodo(id: string, event: InputEvent)` that I want to call if one of those Todos is checked.

So say I'm using React. I can use arrow functions like this:

  todos.map((todo) => 
    <input type="checkbox" onChange={ (event) => checkTodo(todo.id, event) } checked={ todo.checked } />
  <label>{ todo.name }
  )
That's okay, but having arrow functions like that in JSX (which you'll have several of in a complex application) can get a bit unwieldy. Currying gives us another option that can be cleaner and avoids having to declare functions inside our render. If we change our method signature to this: `checkTodo = (id: string) => (event: InputEvent)` then we can write our JSX like this:

  todos.map((todo) => 
    <input type="checkbox" onChange={ checkTodo(todo.id) } checked={ todo.checked } /><label>{ todo.name }
  )
It's a bit cleaner, and can make certain patterns a lot easier in the long run. For example, say we make a shared <Todo /> component like the one above which can be rendered both in a list, as above, or on it's own. In that case, it would be bad for the method signature that the Todo component expects to be the id and event, as the id wouldn't be necessary when we're not working with an array.

Instead, currying means our Todo component can simply expect a function that takes in an InputEvent, and currying can move the other logic where it's needed.

Does that make sense? If you don't know React I could rewrite this using native DOM calls.

_uhtu··on “Follow-The-Workload” Beats the Latency-Survivability Tradeoff in CockroachDB
Sure!

Cockroach DB is a full SQL compatible, strongly consistent key-value store. This means you can get the scalability and performance of a key-value store alongside the comfortable SQL query language. You, and all the other developers who work with you who already know SQL, can do pretty much all the things you know and love from SQL like joins, secondary indexes, etc with full ACID compliance. This means that when you read data from the database you always know with 100% certainty you're going to get up to date values (no stale reads).

ScyllaDB is similar in that data is stored in tables with a defined schema, but it uses a different query language, CQL[1], which is often similar to SQL. You can't to joins but you can have secondary indexes. You can store most of the same data types that you know and love from a standard SQL store. Interestingly enough, you get to CHOOSE the level of consistency you get, so you can make your ScyllaDB strongly consistent or choose from an array of eventually consistent options[2]. Most people however go with one of the eventually consistent options, which allow Scylla to be insanely performant and scalable. At the cost of strong consistency, you get an extremely high performance at an almost infinite scale. CockroachDB, while performant and scalable, can't match it here. It stands almost on a tier of it's own in terms of scalability and performance.

So really, the choice is yours based on what you're looking for. I'd choose CockroachDB for my purposes since I'm not storing Apple levels of data and consistency is important to my work, but your specifications and needs may be different.

[1] http://docs.scylladb.com/getting-started/ddl/ [2] http://docs.scylladb.com/architecture/architecture-fault-tol...

_uhtu··on TerrariaClone – An incomprehensible hellscape of spaghetti code
Earlier today I wrote a ruby script to go through a JavaScript file, find all ocurrences where a method was written in a certain way, and convert it to a new format.

I realized before writing it that there I would never use this script after today, no one ever had to see it, and it would never get version controlled. So i just wrote it in the quickest "get it functional for 95% of cases and throw an error otherwise"

It was kind of fun. Multiple parts had godawful big-O run times, multiple anti patterns, etc. But none of that mattered since it would never be used on a massive file and would never be in production. It took me back to that phase where i was young and doing pet projects and i could be as selfish as possible.

_uhtu··on Tax Plan Punts on a Loophole for the Wealthy
They would also never be supported by the powers the lobby billions to congress. Nothing that negatively affects the assets of the people who give congresspeople billions will be enacted in the forseeable future.

Even if both houses switch heavily Blue/Red/Something else, lobbying touches all.

_uhtu··on The end of Framework Churn
This is an extremely short sighted article. It points out potential weaknesses of frameworks and then concludes unilaterally that they should never be used. This doesn't help anyone. Without the Rails framework my job would be significantly harder since I'd have to piece together several libraries for ORM, HTTP requests, DB Connections, etc. This would be significantly more cumbersome than just using a framework, since any one of those libraries could go defunct just like a framework could. My only other option if I can't use a framework is to write my own implementation of _every single core feature_ of rails. No thank you.

Use frameworks when they are appropriate, stand on the shoulders of others who have made significant contributions to the community.

_uhtu··on Practicing Elixir or any programming language
Yeah, in my opinion that's an important skill to have when learning a language. I already know how to write quicksort, writing it in Elixir will give me some sense of understanding of the language, but knowing how to find it in the standard library will make me more efficent of a programmer in Elixir.
_uhtu··on Practicing Elixir or any programming language
It's important to be able to look at a problem and think "i bet I could find a function in the standard library that could help me solve this problem" or "I should just solve this from scratch with the basic functions I know, like map/filter/reduce/etc. So I disagree somewhat here.
_uhtu··on Snap sold fewer than 42K Spectacles, down 35% in Q2
I think the parent would have drawn the same criticism if the exclusively marketed towards men.

I think his point was simply that their marketing misses 50% of the market. His point is not that it's wrong to only market towards women, his point was that it seems weird from a revenue perspective to only market to to half the population.

_uhtu··on Immutable Data Structures That Are Compatible with Normal JS Arrays and Objects
This is a neat idea, hadn't thought of this but it could definitely help me bring new developers into the immutable style more easily.

The only issue with it is, of course, the fact that Proxies are ES6 and everyone still has to deal with old browsers.

I know MobX does similar object observation, and they support IE, but I've never had the time to go into their codebase. Do you know if something like this could be written in a way that allows IE10/11 to support it?

Also, could you elaborate on why it's necessary to use a proxy at all, when in reality you could just do a copy of the object from the very beginning and allow them to do mutations on that?

_uhtu··on Internet Draft: Let 'localhost' be localhost
I remember this. Also, if I remember correctly, seamlessly integrating search and address bar was the thing that really made Chrome take off. Sure, it was an all around better product than IE/Safari, but to get people to actually download it over just using the default requires it to be significantly more convenient, and it sure was.
_uhtu··on Show HN: $200 Solar Self-Sufficiency  Without Your Landlord Noticing
Funny that we live in a world where one renewable energy source is powerful enough to (literally) blow away another.
_uhtu··on OpenGov Got Seat at White House Roundtable and Is Part-Owned by Kushner Family
This is generally called corruption, when a politician uses their political influence to give favors and influence to family and friends.

This kind of corruption is not necessarily illegal if you do it right, but it's looked down upon because it means you're using the office for personal gain rather than the gain of your constituents.

_uhtu··on Sweet.js – Hygienic Macros for JavaScript
Say you're creating a programming language and you know everyone is going to love it and use it. You add some nice features like if statements, switch statements, and for loops which allow the people that use your language to decide when certain code runs and shortens the syntax for common patterns.

Five years down the line your language is losing popularity fast, because all the hip new languages have an "unless" statement which is the opposite of an if statement. They have for-each loops, cond statements, and their if/else statements return values, so you can write less code to do those common patterns in those new languages than your language.

You rewind time 5 years using a time machine and this time, when you create your langauge, you add all those cool features, only to realize in another 10 years your language has lost popularity because there's a new set features they want, lambdas, argument piping, etc.

So this time when you go back in time, you add macros to your language. Macros are bits of code that allow people using your language to write code that produces more code. Now, you don't even have to write an unless statement, you can let the community write one for you and release it as a package. Anyone at any time can effectively add features to the language in their own project.

That sounds fantastic, and it often is, but macros need to not be abused. If a developer writes a bunch of code using lots of his own macros in your language, anyone reading that code later is going to be very confused seeing that many language features that aren't in the language docs, because that random developer wrote them himself. Functions are much more explicit than macros, so if you can write whatever you're trying to write as a function instead of a macro, you'll be better off. For every success story of a language becoming easier to use because of macros, there's another story of a different language becoming frighteningly complicated due to macro abuse.

_uhtu··on Why Not Have a Randomly Selected Congress?
Lobbyists already have enormous power. I think one thing we've learned over the past 20 years is that career politicians are just as susceptible to bribes as everyone else.

Though I do agree, this concept is pointless beyond a thought experiment.

_uhtu··on Reddit Is Raising Funds at a Valuation of $1.7B
1. This doesn't require developer talent, or any real expense at all, social media marketing interns will do the job at barely any cost.

2. They've had plenty of money from investments though, their dev team is reasonably sized.

3. This one seems pretty accurate.

_uhtu··on CouchDB vs. MongoDB
Mongo really isn't about storing JSON. At least that shouldn't be it's selling point. The selling point that is since it's basically just a glorified key value store it's very replicable and distributable. Postgres is very much not either of those things. The JSON is nice for a few things and I use it sometimes but Postgres is and will always be extremely difficult to cluster and replicate.
_uhtu··on U.S. may put emergency tariffs on solar imports
It's not because they want to annoy environmentalists, the republican party just receives a massive amount of campaign funding and lobbying from the oil industry. They do stuff like this and deny climate change because if they don't they'll lose a significant chunk of campaign funding and the oil Giants will just back another candidate in the primary. Democrats are guilty of this too, but oil primarily goes after Republicans.
_uhtu··on Tisp: Time is space programming language
Ah okay, makes sense.
← PreviousPage 5 of 8Next →