HNHacker News
TopNewBestAskShowJobs

rkwz

2,909 karma · joined October 8, 2010

sheshbabu.com
submissionscomments
rkwz··on Rust: The Error Handling Project Group
For beginners who are struggling with Rust's error handling, I wrote a post that goes through common use cases such as:

* Ignoring the error

* Terminating the program

* Using a fallback value

* Bubble up the error

* Bubble up multiple errors

* Match boxed errors

* Libraries vs Applications

* Create custom errors

* Bubble up custom errors

* Match custom errors

http://www.sheshbabu.com/posts/rust-error-handling/

rkwz··on Storybook 6.0 your new favourite tool for front-end development
Yes, that would be awesome!

I wonder how they render the components - I see that the the component previews [1] are rendered inside an iframe, maybe they render the component to string and insert it into an iframe? If so, should be straightforward to implement if the wasm frameworks support render-to-string or equivalent apis.

[1] https://5d28eb5ee163f6002046d6fb-paaagcevde.chromatic.com/?p...

rkwz··on Storybook 6.0 your new favourite tool for front-end development
Can you elaborate on the workflow you use? The web storybooks can be hosted which makes it easily shareable with anyone but the RN version cannot be shared easily - we need to build the storybook and run it inside the simulator.
rkwz··on Storybook 6.0 your new favourite tool for front-end development
Storybook is a tool for organizing UI components. It displays the different components and their variants in a easy to glance UI. Highly recommended if you're working with React, Vue etc

Here's a post I wrote about how my team uses it - http://www.sheshbabu.com/posts/how-we-use-storybook-for-docu...

rkwz··on Single Page Applications using Rust
Thank you! The sharing common types and logic is pretty easy using cargo workspaces, will include this in future posts :)
rkwz··on Golang Desktop App with Webview/Lorca, WASM and Bazel
I wrote a simple webapp using Rust (Wasm, Yew) and the payload is 130KB gzipped - https://rustmart-yew.netlify.app/

Repo: https://github.com/sheshbabu/rustmart-yew-example

rkwz··on Clear explanation of Rust’s module system
> There is a mistake in the screenshots: filesystem view doesn't show `mod.rs`.

Yes, didn't realize it would be confusing. I've fixed the diagrams in examples 2 & 3 to include mod.rs in filesystem tree :)

rkwz··on Moving from TypeScript to Rust / WebAssembly
Love the analogy!

I think there's value in mixing Rust with languages with mature libraries like JS/Python/etc to optimize performance critical code paths - basically for things we've been using C/C++ so far.

There's also a lot of progress in Rust community, I believe it'll get mature libraries very soon in future.

rkwz··on Moving from TypeScript to Rust / WebAssembly
> Webassembly Is Faster Than Javascript

Just curious, how's the OP measuring this? Also, would be very interested in the stack - is OP using Yew/Seed/etc or server rendered pages with Rust?

rkwz··on Rust for JavaScript Developers – Functions and Control Flow
Thanks for reading! Will mention this in future chapters :)
rkwz··on Rust for JavaScript Developers – Functions and Control Flow
This SO answer explains the reasoning - https://stackoverflow.com/questions/54100030/why-do-i-need-t...

:)

Edit: On hindsight, I should've picked a simpler example that doesn't deal with references.

rkwz··on Entr: Rerun your build when files change
Cargo Watch is something similar in the Rust ecosystem - https://github.com/passcod/cargo-watch
rkwz··on Show HN: Node.js CRUD template with users, password resets and permissions
You can look at https://github.com/sheshbabu/freshlytics for database migrations :)
rkwz··on Ask HN: Tips for students before starting their first job
I wrote about this topic based on my own experiences - https://medium.com/temasek-root-access/career-advice-for-new...
rkwz··on We ditched Google Analytics
Yes, I'm relying on the "continuous views" feature of PipelineDB which is like autorefreshing materialized views. I'm planning to swap PipelineDB with TimescaleDB in near future

Most of the heavy lifting is done by Postgres/PipelineDB with Node.js as a simple wrapper so it's both performant and consumes less resources.

http://docs.pipelinedb.com/continuous-views.html

https://docs.timescale.com/latest/using-timescaledb/continuo...

rkwz··on We ditched Google Analytics
Thanks!

> Is there any documented way to let users opt-out sans ublock:o (or other)? Or configure it to respect "Do Not Track"?

I initially wanted to implement DNT but there's a lot of confusion about whether it's useful or not. I'm not sure if there's a standardized way for users to opt-out.

rkwz··on We ditched Google Analytics
Yes, it doesn't actually track individual visitors as we can't use cookies or any fingerprinting methods.
rkwz··on We ditched Google Analytics
Freshlytics - https://github.com/sheshbabu/freshlytics

* Cookies are not used

* Personally identifiable information (PII) is not collected

* See the pageview in different dimensions like page urls, referrers, browsers etc

* Supports multiple projects

* Supports RBAC

Screenshots - https://github.com/sheshbabu/freshlytics/blob/master/docs/sc...

rkwz··on Announcing TypeScript 3.9
> This is a heretic/unpopular opinion, but I think especially for existing JS/React projects, the laxest possible TS setting is the way to go.

Not sure why you think it's "heretic/unpopular", but I think it's the only reasonable way to incrementally migrate an existing codebase to TypeScript.

rkwz··on Hello, World – Zerodha, India's largest stock broker
Thanks for the response!

Flutter sounds like a good compromise between Native code (Swift/Kotlin) and React Native then.

If you need high performance but no code sharing - use Native code (Swift/Kotlin)

If you code sharing but okays performance - use React Native

If you need both high performance but code sharing - use Flutter

rkwz··on Deno 1.0: What you need to know
This looks absolutely fantastic!!

For some reason I assumed Deno was an "experimental" project, didn't realise it would be released so soon.

* Use TypeScript without transpilation

* Need explicit permissions for filesystem, network etc

* Extends JS standard library with useful modules like fetch, logging etc

* Builtin tooling like test runner, formatter etc

rkwz··on Show HN: News Extract API – Pull structured data from online news articles
I worked on something similar using a different approach:

Fetch the article

=> Run it through Mozilla Readability library

=> Extract plain content

https://github.com/sheshbabu/readable-scraper/blob/master/in...

rkwz··on Gresham’s Law: Bad Drives Out Good as Time Passes (2009)
We can adapt the Gresham’s Law for Software Development:

Project [A] is built within "x" months with lot of tech debt, crunch time and stressed out employees

Project [B] is built within "x+y" months with sane architecture and healthy working hours

If management doesn't understand the benefits of good architecture and employee well being, [A] will become the baseline against which all future projects get measured.

The software system gets messier and messier => resulting in more bugs => resulting in working weekends and late nights => employees make poor decisions because of mental fatigue => resulting in more bugs => ...

rkwz··on TablePlus – Modern, Native Tool for Database Management
I've been using it for the past year and it's my go to app for managing PG databases. As much as I love SQL, TablePlus makes certain actions like inserts/updates/import really convenient especially when you're working with dev databases.
rkwz··on Ask HN: What did you build in 2019?
Freshlytics - self-hosted open-source privacy-friendly analytics software - https://github.com/sheshbabu/freshlytics

react-frappe-charts - lightweight (~17KB) React charting library with TypeScript definitions and Storybook playground - https://github.com/sheshbabu/react-frappe-charts

airhealth - mobile webapp to check air quality - https://airhealth.now.sh / https://github.com/sheshbabu/airhealth

rkwz··on The front end of an example full-stack app built using Vue and Node
I created something similar to what you described but using React - https://github.com/sheshbabu/starterkit

Real app built using this - https://github.com/sheshbabu/freshlytics

rkwz··on Show HN: A searchable list of self-hosted software with screenshots
I recently launched freshlytics - selfhosted privacy respecting analytics.

Let me know if you’re interested in onboarding it into Cloudron :)

https://github.com/sheshbabu/freshlytics

rkwz··on America’s Air Quality Worsens, Ending Years of Gains, Study Says
I made something similar - https://airhealth.now.sh/
rkwz··on Show HN: Freshlytics – Self-hosted analytics that respects user privacy
Yes, it’s possible since it’s just a Nodejs and PipelineDB (Postgres) application :)
rkwz··on Show HN: Freshlytics – Self-hosted analytics that respects user privacy
Thanks for the kind words! It was definitely inspired by SimpleAnalytics and Fathom :)
← PreviousPage 5 of 12Next →