HNHacker News
TopNewBestAskShowJobs

Simran-B

283 karma · joined February 18, 2016

submissionscomments
Simran-B··on Gojekyll: A fast, partially compatible Go clone of Jekyll
I second that the hackability of using a tool written in an interpreted language is a huge advantage, but Jekyll can be darn slow and with Hugo (written in Go), the need for plugins is actually quite low in my experience - thanks to "shortcodes", Go templating, and render hooks.

If you want to customize the Markdown parser or similar, it requires to change the Go code and compile everything yourself, which is not great especially from a maintenance perspective. But I wonder, would it be possible to add more extension points and then only compile plugins written in Go instead of the full source code of the tool plus your modifications? IIRC, Go does support something akin to shared libraries but not cross-platform.

Simran-B··on Modern CSV version 2
Depending on whether you open a CSV file with Excel or import it into it, different things work and don't work. This has been a problem especially on a Windows with a locale that uses a different separator, e.g. semicolon instead of comma on a German Windows because the comma is used in numbers as decimal separator.

Unicode encoding or rather anything non-ASCII is also prone to cause trouble. The automatic conversion of quoted(!) digit strings to numbers can be worked around by appending a tab character. Line breaks within a cell are a big headache, however, and I believe the U+2028 code point can still not be used instead.

Simran-B··on JJ: JSON Stream Editor
I agree that figuring out non-trivial jq expressions takes a lot of time, often accompanied with a consultation of the somewhat lacking docs, and some additional googling.

Nonetheless, it is pretty slow at processing data. For example, converting a 1 GB JSON array of objects to JSON Lines takes ages, if it works at all. Using the steaming features helps, but they are hard to comprehend. It gets memory consumption under control and doesn't take super long, but still way too long for such a trivial task IMO.

Simran-B··on TOML: Tom's Obvious Minimal Language
A number in JSON can have an arbitrary number of digits, i.e. it can represent any BigInt value.
Simran-B··on TOML: Tom's Obvious Minimal Language
I don't understand the appeal of TOML. Why not use YAML instead? Seems a lot more "obvious" to read and write to me. And it's the best I know that is strong in both, human and machine readability.
Simran-B··on First up-close images of Mars’s little-known moon Deimos
Wasn't The Expanse popular in the US, though? Deimos was destroyed by UN forces during the Earth-Mars conflict in the sci-fi series.
Simran-B··on Problems that attract smart people
I'm pretty sure that you get arrested quickly if you start to surveil random politicians even in very democratic states...
Simran-B··on Problems that attract smart people
Does enabling to run LLMs at home really strengthen democracy? People may believe that, but it potentially enables AI to run on any device with a low footprint for surveillance purposes as well, and governments don't even have to pay for the development...
Simran-B··on Is It Imperative to Be Declarative?
> For various reasons, Terraform was ditched in favour of a python-based boto3 solution, and one of those reasons was that the restrictions of a more declarative language produced more friction than the benefits gained.

I feel the same about CMake. It's horrendous and everything would be much simpler if you could use the full power of an imperative programming language. Conan on the other hand is Python-based and essentially a framework (though for a different purpose). With a nice set of built-in functions and a clean interface design, I believe that using a full programming language gives you many of the advantages of declarative languages without the oddities and an easy way to drop down to a lower level.

Simran-B··on Is It Imperative to Be Declarative?
But in many imperative languages you would equally use a ternary operator? c = condition ? a : b

And in Python at least, it would be:

    if condition:
      c = a
    else:
      c = b
(i.e. no upfront declaration of c)
Simran-B··on Build full “product skills” and you'll probably be fine
Wait until managers realize that their jobs are a lot easier to automate away with AI than the jobs of software developers.
Simran-B··on Docker is deleting Open Source organisations - what you need to know
Google's crane tool to efficiently copy images from Docker Hub to e.g. GitHub's Container Registry, in case you want to migrate: https://github.com/google/go-containerregistry/tree/main/cmd...
Simran-B··on AMD Zen2 ymm registers rolling back
> I find it astounding that it's possible to fix the behaviour a CPU instruction by changing code.

Sometimes, CPU vendors run out of space for such bug fixes. They have to re-introduce another bug to free up space to fix a more serious one. That one kinda blew my mind.

Simran-B··on Let's write a setjmp
Is it considered harmful, and if so, why?
Simran-B··on I wish Asciidoc was more popular
I don't like Asciidoc's ordered lists.

. Foo

. Bar

. Baz

Markdown is more intuitive to understand, and the idea is that it's human readable even if not rendered.

1. Foo

2. Bar

3. Baz

I'm not a fan of using 1. for each bullet point, as that takes away from the "readable source code" paradigm. On the other hand, it avoids a change in indentation if you have ten or more items.

Simran-B··on Forking Chrome to render in a terminal
This article might be helpful with regards to dithering: https://www.zephray.me/post/grayscale_lcd/
Simran-B··on A Perceptually Meaningful Audio Visualizer (2016)
I'd also like to know how it visualizes other music. The song seems like it was crafted specifically for the demo, or at least I think that sometimes it's too good with the spirals sitting still - but it may as well just be the combination of this brilliant visualization and the sine waves of whatever signal.
Simran-B··on Google to reduce workforce by 12k
Hadn't looked at it this way. I usually interpret it as a meaningless phrase that everyone expects to be made. How often does "taking the full responsibility" have a real consequence for the top-level management? I would expect several of them to resign and the salaries to be used to pay 5x the number of employees that are way more productive than management anyway.
Simran-B··on How to draw ideas
If you get an Internal Server Error like me: http://web.archive.org/web/20230114194140/https://ralphammer...
Simran-B··on Show HN: FixScript, an embedded/standalone language with custom syntax additions
> FixScript allows any syntax changes and it's done as a preprocessing step.

This kind of separation bothers me a lot in Markdown for static site generation. You typically use Jinja-like templating on top of regular Markdown, and there's a preprocessing step for the templating. This is sometimes limiting in my opinion, as there is a fixed order of operations (preprocessing, then Markdown parsing/rendering). And the two styles of markup are very different. reStructuredText / Sphinxdoc is nicer in that regard because there is a consistent syntax that is arbitrarily extensible.

Can you show some examples of FixScript's extensibility, ideally showing that it's better than a C preprocessor?

Simran-B··on High level mods/patches for console video games
Aren't XBoxes basically PCs these days?
Simran-B··on My bad habit of hoarding information
I sometimes check and close dozens of the old tabs because it turns out that my interests have shifted or that they lost their relevance otherwise. So it wouldn't be much of a loss. Most of the information I could still find again, given that I remember the right keywords.

I grew up with an OS clipboard that can hold exactly one item and can perfectly live without a clipboard manager. I guess it's mostly habits?

Simran-B··on My bad habit of hoarding information
I do have such mountains, too, plus a random collection of items that keep growing on my desk. Maybe I'm an "unorganizer"?
Simran-B··on My bad habit of hoarding information
I don't know about you, but my mobile browser hasn't display the number of open tabs in years because it displays :D (a smiley) if you exceed 99 tabs.

Half of these tabs are work-related, often to-do items, and the other half is things I have yet to read or that I don't want to forget about but was too lazy to create a bookmark. (FWIW, there is no way to store all tabs as bookmarks, unlike in the desktop version of the browser.)

One time, after a crash or accidentally closing all tabs and then restoring them, a toast message showed the tab count and it was around 750 back then. That was 2-3 years ago and I have left more tabs open since then than closed. I'm definitely a hoarder.

Simran-B··on The State of HTTP in 2022
As far as I know, GET and DELETE requests support a payload body as per one of the later specs, whereas an earlier version wasn't fully clear on this and people assumed it's forbidden. Unfortunately, there's still a lot of software conforming to the interpretation of the old spec, which means you cannot count on these HTTP verbs to be supported.

Given this legacy, QUERY seems like an adequate solution. However, it seems to me like it's only intended for read queries. Write queries are generally not cacheable semantically, at least not in my world. Was the naming influenced by GraphQL by any chance, which distinguishes between queries (read) and mutations (write)?

Simran-B··on The State of HTTP in 2022
The practical effect that my coworkers keep telling me about is that the client or an intermediary like a load balancer may retry the same request until it is successful, with the expectation that the resource (records or settings in a database system in our case) is only modified once. A database query that does something like value = OLD.value + 1 cannot be safely retried. There are circumstances under which the outcome of a transaction can be unknown but it might still succeed, and the client should be prevented from doing accidental changes. With read queries this should be rare, but even then there can be side-effects affecting the overall system state. There are of course solutions to this for the application side, like the usage of idempotency keys.
Simran-B··on The State of HTTP in 2022
WebSocket has a lot less fluff, but you could as well use a raw TCP socket and send JSON payloads over it with your own "protocol", e.g. with an op attribute for the action and an error attribute in responses. Another protocol that comes to mind is Apache Thrift.
Simran-B··on The State of HTTP in 2022
"Ease of use" is mentioned, and I suppose this refers to HTTP being text-based, pretty readable and intuitively understandable. HTTP/2 and later aren't like this anymore, for the sake of efficiency. It's a trade-off, but at this point I don't see much value in using it for APIs anymore. If you value efficiency and clean design, there are clearly better alternatives that aren't more complicated than what HTTP has become.
Simran-B··on The State of HTTP in 2022
The main focus of HTTP 2 and 3 was apparently performance, and hardly any of the other fundamental issues of the protocol. It's nice to see that some work is put into something like QUERY as well, which improves HTTP as an API protocol (REST) - although the motivation appears to be performance again and I always have mixed feelings when I see the term "idempotent" in a context that likely involves database systems. Too often, such requests do have side effects of some kind and preventing request retries throughout the stack isn't easy.
Simran-B··on Why I'm still using Python
> Methods-with-self-in-args-list isn’t the “weird” one?

I agree that it's uncommon, but I do like the clarity it adds compared to something like "this" which magically refers to the current instance. Hasn't C++ just added something like it with "deducing this"?

← PreviousPage 3 of 4Next →