thanhnguyen2187

Joined 6 years ago

Karma
25
Submissions
27
Member since
Apr 30
View on Hacker News

Recent submissions

Comment · 8 months ago
Comment · 1 year ago
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.
Comment · 1 year ago
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.
Comment · 1 year ago
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

Comment · 1 year ago
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"
Comment · 1 year ago
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.

Comment · 1 year ago
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

Comment · 1 year ago
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.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton