dhruvrajvanshi

Joined 10 years ago

Karma
115
Submissions
58
Member since
Nov 19
View on Hacker News

Recent submissions

Comment · 1 year ago
That hasn't been my experience at all outside the opinion section, which is precisely what you described.

The main section feels pretty anti Trump, actually. Not by choice but reality has an anti Trump bias ;)

They are also quite good at labeling their opinion sections clearly, which I think a lot of other papers aren't doing. Their news section is basically Reuter's.

Comment · 1 year ago
With all due respect, have you read it regularly?

In my experience, WSJ just reports what happened and who said what in a very dry way.

My impression is that their news section provides a very anti Republican party view. Note that this is my impression, not the paper's stance. They don't really take any, apart from the opinion section, which I ignore. The opinion section has a massive pro republican bent.

> Lying by omission

I'll admit, I might have a blind spot here because I'm only reading 2 newspapers. That being said, I'm not sure of any stories reported by the other news outlets which were ignored/downplayed by WSJ.

> apologies and retractions

Happen when they happen. I remember a few per month. But since they're so dry, there's very little scope for major corrections. If they say, "this guy said that", there's very little to correct there. Occasionally, they mis-paraphrase someone and have to correct their report. Most sound like honest mistakes to me.

EDIT:

> You aren't getting any sort of counterpoint you are getting whatever supports his world view.

Fair enough, but you mostly don't get any points to counter in the first place. Only plain dry facts. I go to the Economist for opinions and counter opinions. (*side note, the Economist should publish more counter opinions IMO)

Comment · 1 year ago
I would love this in modern languages.

For dev builds, I see JIT compilation as a better deal than debug builds because it's capable of eventually reaching peak performance. For performance sensitive stuff like games, it really matters to keep a nice feedback loop without making the game unusable by turning off all optimizations.

AOT static binaries are valuable for deployments.

No idea how expensive it would be to develop for an existing language like Rust though.

Comment · 1 year ago
I think WSJ is a good complement to the Economist. They have good, unsensationalized coverage of the facts. I ignore their opinion columns as they don't seem very serious.
Comment · 1 year ago
I also read the Economist. Other than that, Wall Street Journal is quite good at purely factual, unopinionated coverage. Note that their Opinion section is heavily biased towards the American right, but I mostly ignore it. It's clearly labeled as Opinion.

Between the Economist and WSJ, I get a good overview of opinions and facts.

Comment · 1 year ago
> I also make unit test runner play sound for success and failures.

This is brilliant! Such simple change but a massive qol improvement.

> Test runner

Node has one built-in these days. Haven't tried it yet but would be nice to get rid of the vitest dependency. Mostly because it makes my dependabot noisy for no apparent benefit.

Comment · 1 year ago
> Has emacs reinvented itself to incorporate the best ideas of being very performant, allowing better languages for extensions, replacing health-hazardous default keybinds with something ergonomic, using commonly understood terms for its interface?

Yes! It's called Evil mode. It emulates vim keybindings.

In terms of "normal" keyboard shortcuts, it could but no one who uses Emacs is asking for it. Mind that ergonomics is also very subjective. You might not find lisp very ergonomic, but Emacs users do. They find other languages unergonomic.

Other ways Emacs has borrowed ideas from other editors.

It now has first party tree sitter integration for better syntax highlighting. I believe this was borrowed from the neovim world.

It has plugins for LSP...borrowed straight from the VSCode world.

If it matters, I've never used Emacs in my life, so I'm not a part of their weird cult. But i can see that they do things the way they do for a reason. They're not a bunch of morons.

Comment · 1 year ago
A very simple way to think about is that if an intrinsic is written in C, the JIT can't easily inline it, whereas all ruby code can be inlined. Inlining is the most important optimization that enables other optimizations.

It's not necessarily the fact that C doesn't have enough information, it's just that the JIT can reason about Ruby code better than it can about C code. To the JIT, C code is just some function which does things and the only thing it can do with it is to call it.

On the other hand, a Ruby function's bytecode is available to the jit, so if it sees fit, it can copy paste the function body into the call site and eliminiate the function call overhead. Further, after the inlining, it can apply a lot of further optimizations across what was previously a function boundary.

In theory, you could have a way to "compile" the C intrinsics into the JIT's IR directly and that would also give you similar results.

Comment · 1 year ago
I suppose it's a matter of perspective but I don't see returning a 500 as "Recovering from the error". The user's request has still failed. It just hasn't taken down the server. IMO this is still fine.
Comment · 1 year ago
> manually pass around JSON objects and continually checking their shape

Well Zod is a library that's typically used on the boundary.

I don't know why you're assuming stuff about a library that you've never used. No one would continually check their shape once it's validated at the api boundary.

Comment · 1 year ago
> So I try to make the ones that seem the most likely impossible.

Yeah this is a very key point to reflect on. Is this stricter type actually catching a bug that's easy to make? Or is it just giving you more satisfaction of more precise typing? It takes time and practice to make that distinction.

Similar things can also be said about automated tests. I've written too many of them that end up being written for a mistake that never gets made.

Comment · 1 year ago
There is something to be said about pushing such things to runtime checks.

I'm not arguing for giving up type systems in general, but I'd rather read something like `class VersionString` that asserts the requirements in the constructor. If it really matters, you can check this at run time but before releasing using a test.

Like what exactly are you trying to get from autocomplete in a version string literal?

Comment · 1 year ago
> Im not worried about new code. Im worried about stuff written 15 years ago by a monkey who had no idea how threads work and just read something on stack overflow that said to use threading. This code will likely break when run post-GIL. I suspect there is actually quite a bit of it.

I was with OP's point but then you lost me. You'll always have to deal with that coworker's shitty code, GIL or not.

Could they make a worse mess with multi threading? Sure. Is their single threaded code as bad anyway because at the end of the day, you can't even begin understand it? Absolutely.

But yeah I think python people don't know what they're asking for. They think GIL less python is gonna give everyone free puppies.

Comment · 1 year ago
> Oracle doesn’t make little mistakes that accidentally harm the competition while helping themselves. No, they’ll look you in the eye and explain that they’re mugging you while they take your wallet. It’s kind of refreshingly honest in its own way.

Fucking hell bud :D

Comment · 1 year ago
> I wonder why people never complained so much about JavaScript not having shared-everything threading. Maybe because JavaScript is so much faster that you don't have to reach for it as much. I wish more effort was put into baseline performance for Python.

This is a fair observation.

I think a part of the problem is that the things that make GIL less python hard are also the things that make faster baseline performance hard. I.e. an over reliance of the ecosystem on the shape of the CPython data structures.

What makes python different is that a large percentage of python code isn't python, but C code targeting the CPython api. This isn't true for a lot of other interpreted languages.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton