HNHacker News
TopNewBestAskShowJobs

justsomeuser

396 karma · joined June 20, 2019

submissionscomments
justsomeuser··on Four Eras of JavaScript Frameworks
I still have the jQuery APIs memorised, it’s often easier and more concise than the standard web APIs.
justsomeuser··on Ask HN: Have you used SQLite as a primary database?
So you were using an HDD, not an SSD?

Would an SSD in production have solved the timeouts by increasing your write throughput?

justsomeuser··on I Avoid Async/Await
I don’t think of async await as “making async code act like sync code”.

I see it as adding meta data to a function type (async) and allowing you to attach the result to a given function scope (await).

The key utility of this is to allow you to use functions as a unit of composition, allowing you to leverage their already built tooling (IDE jump to function, stack frame based debugging, input and output types (in:args -> out:return).

Messaging runtimes like Golang and Erlang use an additional composition unit (channels and mailboxes), and do not allow you to follow the “tree of functions” paradigm like async await does. These result in having to follow a network graph of messages and nodes to find out what will happen.

You need to understand you are dealing with an event loop before you use async await. I think this is the issue the author is raising.

justsomeuser··on Postgres wire compatible SQLite proxy
I normally scp the db files down to my machine and use Table Plus locally.

Works well if you are not trying to watch real time processes as they write to the db.

justsomeuser··on Show HN: Smort.io – Edit, annotate and share articles easily
Do you plan to charge in the future?
justsomeuser··on My Stripe Tax Story
Support has never solved any of the issues I have brought up either.

They will relay some unrelated bit of documentation and then immediately try to close the issue as solved.

It is like “Step 1: Understand the problem” and “Step X: Validate it solved the customers problem” isn’t even on the checklist.

Just “reply something technical, close ticket, repeat”.

justsomeuser··on Moving money internationally
Assuming the amount of a given currency does not decrease or leave its country, does this mean that when you “send money internationally” it is just switching owners in the same country?

So the money does not leave, new owners come into the country and control its flow?

justsomeuser··on Write plain text files
Yeh I agree, it’s write once read everywhere.

But if you need rich text and images, it seems like the only alternative to plain text.

justsomeuser··on Write plain text files
What about PDF/A?

Considering that every browser, OS and printer has a reader implementation, and there is a spec defined, surely this makes it on par with plain text?

You could use any document editor (Word, Pages, Apple Notes etc), and as long as it can export to PDF you are no longer tied to the note taking companies proprietary software for reading and writing. Future indexing systems will surely support PDF.

justsomeuser··on Launch HN: Drifting in Space (YC W22) – A server process for every user
So it is kind of like server-less, but each instance:

- Persists for the lifetime of the user session.

- Only processes a single user session.

- Has large amounts of CPU/RAM and writable disk to handle large datasets.

justsomeuser··on Launch HN: Drifting in Space (YC W22) – A server process for every user
Looks like a cool project, but I am not sure I understand the need for one process per user.

Some questions:

- Why do you need one process per user? For low latency, would you just need to make sure you have idle CPU to serve their request, even if that CPU time is multiplexed onto an event loop (one event loop serves many users)?

- Wouldn't this "event loop" actually be more efficient that one user/process, as there would be less context switching cost from the OS?

- Can I just keep a map of (connection, thread_id) on my server, and spawn one thread per user on my own server?

- Could I just load up my server with many cores, and give each user a SQLite database which runs each query in its own thread?

- This way a multi GB database would not be loaded into RAM, the query would filter it down to a result set.

justsomeuser··on Use spacer components instead of CSS margins (2020)
I use <br> to get a “one line height sized” spacer all the time.
justsomeuser··on Self-Hosting Dozens of Web Applications and Services on a Single Server
I do something similar:

- GCP VM with “Google Container OS”.

- “Cloud init” config set on the VM metadata (can easily recreate the VM; no snowflake config via SSH mutations).

- My service runs in a docker container, reads/writes to a SQLite file on the host disk.

- GCP incrementally snapshots the disk every hour or so, and makes copies to different region. Any disk writes are copied instantly to another zone.

- Lets encrypt cert is read from the host disk and the docker container serves HTTPS directly (no proxy). Certificate is renewed with the LE CLI.

- The service logs to standard out, this is collected by the Google logs daemon which I can view with the web UI.

- Google have their own HTTP uptime monitoring and alerting which sends you an SMS.

justsomeuser··on Consider SQLite
It's no problem, just a different way of doing the same thing really.
justsomeuser··on Consider SQLite
There is a key difference. With the JSON version you are constantly serialising and parsing the entire file, even if you need to write just a single byte.

With SQLite, you can read or write a few bytes without having to process the others.

Also, SQLite would allow observing the current state by querying the file, with the JSON version you would need to keep dumping the state every few seconds.

But I agree with you that most languages have solid support for JSON and it prevents you having to break down those tree structures into rows and then back again. For typed languages the struct becomes the schema.

SQLite indexes and joins also would not be a benefit if your state is small enough that queries are just filter functions with “full table scans”.

justsomeuser··on The Sucker Complex
I agree, I would think the same too.

But I think the combination of a social environment where none of your peers have that thought, and being too young/not trained to think critically results in large groups of people just following their animalistic instincts.

justsomeuser··on My productivity app for the past 12 years has been a single .txt file (2020)
Same here, native Evernote has worked fine for me, but the Electron version adds too much latency, and the writing/reading of notes feels different in a worse way.

Apple Notes will let you import directly from an Evernote export, but it is missing some features (no note links, no quick search/jump, hard to navigate nested folders as notes are hidden by default, no export).

justsomeuser··on NewLimit: a company built to extend human healthspan
How do you know what their inner thoughts and motives are?

Unless they explicitly communicate this, you are just guessing.

justsomeuser··on Ask HN: Favorite Thing Built to Last?
Stainless Steel electric steamer, Magimix:

https://www.amazon.co.uk/Magimix-11581-Multi-Functional-Brus...

I had around 3 plastic ones before this, which last about a year or two.

I have had this around 10 years.

justsomeuser··on Portable and Interoperable Async Rust
The issue is that the async await keywords are part of the standard language but then you are forced to pick an non-standard runtime.

Your Go example is not quite comparable:

Go: (Lang, libs)

- You can mix and match any libraries.

Rust: (Lang, runtime, libs)

- Now you can only choose the libraries for your runtime. This dilutes the time investment of crate developers and the utility of Cargo crates, as you want a general async thing but it is tied to a specific runtime.

I think the Rust team should of included a solid zero config runtime but allow it to be replaced.

justsomeuser··on Ask HN: Why is everything changing too fast?
There is a meme, “haters gonna hate”.

In this case, I think the same principle holds: “software developers gonna develop”!

Meaning that I feel businesses would prefer to see developers working as hard as possible and just assume their output is always an improvement over the current product.

At the level of competing businesses 90% of effort goes to waste due to failing software businesses, as the winner takes all.

At the internal business and team-of-employees level, if time was spent it is assumed that it is always useful and pushed to the end users (instead of allowing the environment to kill the worst 90%).

justsomeuser··on YouTube deleting comments who criticize their hiding of the dislike count
I agree. I think the most valuable comments are the ones which have a balance of a large amount of "up" and "down" votes.

Those are not just "upvote if you agree with this positive sentiment", but often giving valid reasons against someones opinion.

justsomeuser··on Notes on Writing Web Scrapers
I would use SQLite between each of the stages so each process can be restarted, run concurrently and observed with queries.
justsomeuser··on Apple Music is the last library focused music service
Reminds me of my WinAmp playlist
justsomeuser··on Tools I use: PyCharm / Idea plugins
I'm with you faizshah!

I like WebStorm just because they have a team working on making things work out of the box instead of a group of plugins. When I switch languages, everything is exactly the same.

justsomeuser··on Goodbye CSS Modules, Hello TailwindCSS
I can work with or without Tailwind to be honest, I was commenting on the principles that are making Tailwind popular.

> The alternative is jumping from your IDE to Tailwind docs unless you are a tailwind expert no

No, as the class names directly map to CSS key/values and the IDE auto-completes the classes. If you know vanilla CSS, you would pick up the Tailwind classes quite quickly.

> "CSS should interact with a component's private structure only"

> "that is a drawback only to Tailwind"

CSS specificity/cascading is part of vanilla CSS.

And what happens to deeply nested components? Are you are using your build step to prevent CSS cascading, giving each of your component classes a UUID?

Instead of using the Chrome dev tools, I am currently using live reload to refresh the page after any HTML/CSS changes.

When you edit your HTML + CSS in the dev tools for fast feedback, are these edits written back to your CSS source files (I assume this is not possible, as they are part of the build process)?

What's your CSS build set up?

justsomeuser··on Does ES6 make JavaScript frameworks obsolete?
Seems like they do not have a lot of experience actually using JS.
justsomeuser··on Goodbye CSS Modules, Hello TailwindCSS
It’s not just the “jumping between files” that takes longer.

It is also mentally computing the “CSS cascade” to determine the final rules for a given DOM element, and keeping in mind all classes that apply.

The dev tools often cannot save styles back to your source code when you use a build step.

Even if I get my file switch down to 16ms, it is 16ms more than 0.

If I can view the JSX and see all the final styles on the element or on a nearby parent, it results in a faster feedback loop.

I am not for or against Tailwind, as I have mentioned this directness causes a lot of classes on single elements which can be hard to read later, but is often faster to edit whilst you are writing it.

justsomeuser··on Relational Database Connectors for Cloudflare Workers
If one HTTP request is split into many serial database queries (E.g 1:10, request:db-queries), it doesn’t make sense to have the request hit the low latency edge worker, and then send 10x the queries to a faraway database server as you are incurring the cost of latency for each db query.

In this case you may as well run an HTTP server next to your database and incur the high http request latency once, and have < 1ms latency for each of the 10 queries.

Is this correct?

justsomeuser··on Relational Database Connectors for Cloudflare Workers
If they add TCP support you can use any existing distributed SQL as a service product.
← PreviousPage 3 of 9Next →