HNHacker News
TopNewBestAskShowJobs

thanhnguyen2187

25 karma · joined April 30, 2020

submissionscomments
thanhnguyen2187··on A DuckDB-based metabase alternative
Thanks for the cool tool! I think it's worth mentioning SQLPage, which is another tool in similar vein, to generate UI from SQL. From my POV:

- SQLPage: more on UI building; doesn't use DuckDB

- Shaper: more on analytics/dashboard focused with PDF generation and stuff; uses DuckDB

https://github.com/sqlpage/SQLPage

thanhnguyen2187··on Rust × Algotrading
I’ve been pursuing a Master of Finance Engineering degree, and also been playing with Rust for a while, so I figured: why don’t I try to combine both by implementing an algotrading (short for algorithmic trading) bot? I eventually implemented some strategies and backtesting from scratch (spoiler: the result is worse than just holding, not counting trading fee). I’m on my way improving the result, and putting it into paper trade. This post is a nice distraction from that, where I’ll show you some code, then go with some thoughts on Rust.
thanhnguyen2187··on Using Rust Back End to Serve an SPA
Thanks for the suggestion! I did not consider Tauri as it seems to be one machine only, while I'm developing my project to be a web app for multiple local machines.
thanhnguyen2187··on Using Rust Back End to Serve an SPA
There are some comparisons at their repository

> Dioxus vs Leptos

> Leptos is a library for building fullstack web-apps, similar to SolidJS and SolidStart. The two libraries share similar goals on the web, but have several key differences:

> Reactivity model: Leptos uses signals to drive both reactivity and rendering, while Dioxus uses signals just for reactivity. For managing re-renders, Dioxus uses a highly optimized VirtualDOM to support desktop and mobile architectures. Both Dioxus and Leptos are extremely fast.

> Different scopes: Dioxus provides renderers for web, desktop, mobile, LiveView, and more. We also maintain community libraries and a cross-platform SDK. Leptos has a tighter focus on the fullstack web with features that Dioxus doesn't have like islands, <Form /> components, and other web-specific utilities.

> Different DSLs: Dioxus uses its own custom Rust-like DSL for building UIs while Leptos uses an HTML-like syntax. We chose this to retain compatibility with IDE features like code-folding and syntax highlighting. Generally, Dioxus leans into more "magic" with its DSL including automatic formatting of strings and hot-reloading of simple Rust expressions.

For Go, sadly I don't know any framework in the scope of Rust land's Dioxus/Leptos. You continue to have two choices:

- Either to go down the SSR route (and add HTMX for a more SPA-like experience, and use Templ for HTML templating)

- Or to use Go in the backend and something else for the frontend (NextJS or SvelteKit or React Router, you name it; I went with SvelteKit as it fits my needs well, and seems to be "the most popular niche" frontend framework)

Hope it helps

thanhnguyen2187··on Using Rust Back End to Serve an SPA
I think there is Dioxus and Leptos if you want full-Rust solutions for SPAs. You're right that CDN is another thing that I forgot considering, too. Can you elaborate more on "coupling deployment of both BE and FE with no resource optimization"
thanhnguyen2187··on Going Mouseless, or Using the Computer Without a Physical Mouse
I've gone mouseless, or using the computer without a physical mouse, for around 2 months. The supporting tools I used are:

- Vimium: a browser extension for interaction (mainly navigation/links following) while browsing the web

- `warpd`: a program to control the mouse in other cases

- A drawing tablet: the last resort if `warpd` cannot make it

To be honest, I don't think there is a huge boost in productivity, but it helps with concentration as I don't have to move my hands that often anymore. Going mouseless might aid in preventing common pains and injuries of software engineers (namely RSI and carpel tunnel) as well. In this post, I'll try to get into each tool I used and my thoughts about them.

thanhnguyen2187··on Datastar: Web Framework for the Future?
Really well-written and well-structured post! I'll seriously evaluate Datastar in my next toy project because of the author's praises!

For people who are looking for HTMX alternatives, I think Alpine AJAX is another choice if you are already using AlpineJS

thanhnguyen2187··on Having Fun with a Scamming Crypto Job
I’m going to cover what happened and the technical details of a crypto job scam that I’ve avoided. Let’s hope that it can be both entertaining and informative.

It’s my second time encoutering this kind of scam. In the first time, I just ignored it as the sign is too obvious: a non-fitting job (frontend heavy job for a backend guy) where the recruiter is “impressed with my technical skills” and think that I’m “an exellent fit”. For this second time, I got fooled at first as it is too good, and after I realized it’s too good to be true and likely a scam, instead of stopping early, I just got… more patient and curious about what’s behind.

thanhnguyen2187··on Show HN: Triplit – Open-source syncing database that runs on server and client
Hi Triplit's team,

Congrats on the launch and thanks for the awesome product! I've been using Triplit in one of my projects [1], and it do work as expected. In my self-promotion on Reddit [2], I posted about Triplit as well:

> I think Triplit is a nice database and works as expected. It's data model fits well with what I have in mind (more decentralized/P2P instead of having a single centralized database as the source of truth), but there are 2 areas I find lacking:

> - Server side/self-hosted: Triplit server requires a token for authentication. Triplit's documentation has a section about how to start the server without explicitly showing how to generate the token, which is mildly inconvenient. Therefore, on self-hosting the server, I opted for using their CLI command dev since the command has the token generation that I needed. I know it is not a good security practice as when the command is used as a system service, the token will be logged in plain text, but I have a bigger problem when someone can access that anyway.

> - Query language: I find their custom query DSL not as expressive as a full-fledged query language (lacking UNIQUE and COUNT like SQL is on the top of my mind). You'll have to do a bit of data aggregating yourself.

Recently, I found Evolu [3], which is quite similar to your project in terms of scope and functionalities as well. From a quick skim of their documentation, I think the differences are:

- Triplit have `.subscribe()`, while Evolu don't

- Evolu's querying is more familiar/advanced (typed SQL via Kysely)

- In the browser, Evolu seems to use SQLite on top of OPFS, while Triplit uses IndexedDB

I think there are more intricacies on the way Triplit differs from Evolu, so can you enlighten me on that?

Really appreciate your comment! Thanks!

- [1]: https://github.com/thanhnguyen2187/cryptaa

- [2]: https://www.reddit.com/r/sveltejs/comments/1dndpj8/cryptaa_a...

- [3]: https://www.evolu.dev/docs

thanhnguyen2187··on Show HN: Offline-first note-taking web application
Thanks for trying it out. About your questions:

1. You can click on the tag itself to filter

2. I suspect you did try locking it and made the password prompt opened, but did not click submit to make it encrypted (please take a look at this sample encrypted note: https://i.imgur.com/CvVwG6W.png).

thanhnguyen2187··on Ask HN: What should I do to land a “non-trivial” remote job?
Thanks for the reply. I had no success with Wellfound (formerly AngelList Talent) and WorkAtAStartUp, and Monthly HN Hiring. I cannot be sure if /jobs is going to be different, but I will have a look anyway.
thanhnguyen2187··on Ask HN: Please help I could not find a drawing tool that was submitted to HN
Thanks a lot for this! I did not find it and almost lost my hope. Again, thank you very much!