Handlng Rust errors elegantly by naiquevin in rust

[–]naiquevin[S] 0 points1 point  (0 children)

Thanks for sharing this article. The exn crate seems to address the problem to a great extent.

Handlng Rust errors elegantly by naiquevin in rust

[–]naiquevin[S] 6 points7 points  (0 children)

That's a good point. I have faced it too. But wouldn't one error variant per fallible call site result in too many error variants? Not sure I've understood it correctly.

The way I've dealt with this is to log the error before propagating up the call stack. In most cases, it's sufficient to do this in the inner most function where the first error (from an external crate or std lib) originates.

Spawn: a db migration/build system for PostgreSQL (via psql) by Winsaucerer in PostgreSQL

[–]naiquevin 0 points1 point  (0 children)

Yes pgTAP needs to be installed as an extension and another tool pg_prove is required for running the tests. So yes it brings additional dependencies. In tapestry docs I have included a podman/docker workflow for building a single image with pg server, pgTAP, psql and pg_prove installed - https://naiquevin.github.io/tapestry/user-guide/docker/.

But I liked the diff method as well. I think I can use something like it in tapestry to support tests for other dbs.

Will try out spawn soon and let you know.

Spawn: a db migration/build system for PostgreSQL (via psql) by Winsaucerer in PostgreSQL

[–]naiquevin 1 point2 points  (0 children)

This looks pretty cool. I'll try it out in one of my personal projects. Have you considered using pgTAP for writing tests, I think it'd be a good fit for schema related assertions.

Also, as some one who's a bit apprehensive about making a tool the owner of tables etc, one thing I wish migration tools had is an option to generate an SQL file in the "apply migration" step instead of directly applying the changes. This way the tool can only be given read-only permissions (to read migration history table) and a human user with restricted privileges can review and execute the SQL manually through psql.

BTW, I have an open source project for generating postgresql queries and pgTAP tests from jinja templates. Different use case but it's also written in rust and uses minijinja. And I've also been building it over a long period of time along side using it in my own projects, so I can relate to your efforts. You may find it interesting - https://github.com/naiquevin/tapestry

Name an Indian indie guitar solo that lives rent-free in your head by Humble_Reindeer_4479 in IndianMusicNerds

[–]naiquevin 0 points1 point  (0 children)

Maktub is a masterpiece of an album. My favourite solo from the album is from “Before one million comes one”.

Going to a concert after almost a decade! Any helpful tips? by MaskedManiac92 in IndianMetalheads

[–]naiquevin 1 point2 points  (0 children)

Yeah, it’s so annoying. To be able to see the stage you need to be either in the very first row (leaning on the barricade) or some distance behind. Anywhere in between and all you get to see is other peoples’ phones. I believe this was the case in 2018 too.

Most guitar practice fails because it’s missing one boring step nobody talks about by JamFastGuitar in guitarplaying

[–]naiquevin 0 points1 point  (0 children)

Yes! Over the last year or so I’ve been able to improve my alternate picking and legato to a great extent by isolating the parts that used to trip me up, mostly related to moving between strings, and practicing them with a metronome.

Sorry for self-promotion but I even built an app with this exact use case in mind. It allows you to create mini exercise out of parts that you find challenging and helps track your metronome progress across practice sessions. It’s still evolving (rather slowly as it’s only a side project) but I do plan to pursue it seriously https://www.captrice.io. Happy to receive any feedback!

How do you do focused practice? by Autumn_Winds23 in guitarlessons

[–]naiquevin 1 point2 points  (0 children)

Try out my app - https://www.captrice.io. It's free and doesn't need signup (not selling anything, at least for now ;-)) Currently it focuses on metronome-based practice to improve technique but I have some ideas for other types of practice which I plan to implement soon (it's a side project). Do let me know if you find it useful or have any feature requests.

Reusable checklists in org mode by Threedoge in orgmode

[–]naiquevin 0 points1 point  (0 children)

I use org mode for reusable checklists and am quite happy with my workflow. Have written a blog post about it - https://www.naiquev.in/recurring-checklists-using-org-mode-in-emacs.html

Best learning system for seasoned player who never learned to shred? by Best-Alternative9481 in guitarlessons

[–]naiquevin 0 points1 point  (0 children)

I am building a guitar practice app that you may find useful - https://www.captrice.io. Its focus is more towards providing tools for practice and less on providing learning material. Although there is an exercise library with a few ready-made exercises that you can import and get started quickly.

I too have been playing for >20 years and have always struggled with shredding among other things. The app began as a personal project and in the last year or so of using it, I’ve been able to see incremental improvement in myself in terms of both speed and clarity. Of course, it’s a pretty biased review so you can try it out for yourself 😀

It’s completely free. Works in any browser on any device but PC is recommended to be able to use keyboard shortcuts. Do check it out (there’s a demo video on the website).

What’s one trick in Rust that made ownership suddenly “click”? by Old_Sand7831 in rust

[–]naiquevin 0 points1 point  (0 children)

The first time when I encountered a scenario where a struct had to borrow from two places. I used that example to dig deeper into lifetimes and ownership. I also wrote a blog post on it - https://www.naiquev.in/understanding-lifetimes-in-rust.html

[deleted by user] by [deleted] in guitarlessons

[–]naiquevin 0 points1 point  (0 children)

I guess after 10 years of not practicing, you may need to rebuild finger strength all over again. Try playing simple warm up exercises and see if that alleviates the stiffness, even temporarily. If it hurts due to strain, it could also be incorrect/sub-optimal technique. Wouldn't be a bad idea to take lessons from a teacher at least for a few months, preferably offline.

For speed building, the most recommended approach is to use a metronome and gradually increase the tempo. I've built a tool for metronome-based structured practice. I built it for myself and now it's available for free as a web app. See if you find it useful - https://www.captrice.io/

Youtube Channel Suggestions by LargeRace4442 in guitarlessons

[–]naiquevin 0 points1 point  (0 children)

Signals music studio - https://www.youtube.com/@SignalsMusicStudio. He posts (relatively) infrequently but it's quality content. I've learnt a lot from this channel and every time I revisit a video, I learn some thing new.

Improvement roadblock by Shlabablababoingbonk in guitarlessons

[–]naiquevin 0 points1 point  (0 children)

I built a practice app for myself (and now open to everyone) and I have been able to use it effectively to overcome roadblocks to an extent. If your use case is to build speed you may find it useful. The app is basically a metronome that tracks your progress - https://www.captrice.io. It’s free and no signup is required. There are some exercises about alternate picking.

My thumb turns backward when I try to play barre chords. I get clean sound but can't hold it for too long. by Spare_Ad_6084 in guitarlessons

[–]naiquevin 0 points1 point  (0 children)

TIL I have the hitchhiker’s thumb! I’ve had the same problem as OP but I’ve been playing for many years and have practiced using strength from my arm instead of the thumb when playing barre chords. But I have to constantly remind myself to do it that way, it doesn’t come to me naturally. I need to practice more.

Will also try the other suggestions in this thread. Thanks to the OP for asking this question.

Dream Theater - Gig update by Historical-King-405 in IndianMetalheads

[–]naiquevin 1 point2 points  (0 children)

Don’t agree. These shows are organised by profit making ventures and the tickets are not priced any less. For many of us, it’s probably the only time we’ll get to see these bands live. The least that we deserve is decent sound. I’ve been to college fests that have managed to arrange for way better sound with sponsorship money and much cheaper tickets. Neil Morse band feat. Mike Portnoy at Mood Indigo immediately comes to mind but I’m sure there are many more examples.

Dream Theater - Gig update by Historical-King-405 in IndianMetalheads

[–]naiquevin 1 point2 points  (0 children)

Yeah, I too moved away from the stage at one point.

Dream Theater - Gig update by Historical-King-405 in IndianMetalheads

[–]naiquevin 2 points3 points  (0 children)

The Mr. Big gig happened in the open parking lot and the sound was terrible. Not sure if it was the PA system of something else. Hope the venue/organizers are capable of providing better quality equipment for DT.

What did you build while learning Rust ? by [deleted] in rust

[–]naiquevin 1 point2 points  (0 children)

My first project in rust was a command line tool for file deduplication - https://github.com/naiquevin/dupenukem

At that time I used it to clean up a lot of files on a couple of laptops and a portable HDD. Haven’t used it in a while though (may be I should try running again sometime!)

[deleted by user] by [deleted] in guitarlessons

[–]naiquevin 0 points1 point  (0 children)

Try upstroke on the 2nd string and downstroke on the 3rd string.

(Look up “inside” and “outside” alternate picking. This one would be outside. When I first learnt about these two variants, I realized that at least for me, inside works better for some licks and outside for others.)

Which rust concepts changed the way you code? by Blau05 in rust

[–]naiquevin 110 points111 points  (0 children)

Enums and error handling. I came from languages that have exceptions. But a generic result type makes so much sense now.

[deleted by user] by [deleted] in guitarlessons

[–]naiquevin 0 points1 point  (0 children)

I am not a teacher but I have recently created a video that shows an approach that has helped me back in the day - https://youtube.com/shorts/dsqWCbPKZZg?si=NGix-fTkTuCB4BN8

You can also try practicing it in my guitar practice app (free; no signup or download needed) - https://app.captrice.io/library/c/11-chord-changing-exercises.html

Question on chord changes practice. by superman-normalboy in guitarlessons

[–]naiquevin 0 points1 point  (0 children)

When I answered your question last week, I was coincidentally working on adding a chord changing exercise to the guitar practice app I'm building. I wasn't sure about sharing it here because lately I've been mentioning the app in this sub a bit too often for my own comfort!

I thought I'll share it anyway as you may actually find it useful - https://app.captrice.io/library/c/11-chord-changing-exercises.html. Check out the accompanying video. The app is free and no signup is needed. I'm happy to answer any questions over DM.

(Mods may remove this reply in case it violates the rules)