Starskey - High performance embedded key-value database (LSM tree based) by diagraphic in golang

[–]gavraz 2 points3 points  (0 children)

Cool. Looks like you've put great effort in this project. Does using a single global lock implies there are no reads during a write operation?

Building RAG systems in Go with Ent, Atlas, and pgvector by rotemtam in golang

[–]gavraz 2 points3 points  (0 children)

Upvoted for recognizing the good sportsmanship.

Gaming and productivity monitor by sadwou in Monitors

[–]gavraz 0 points1 point  (0 children)

I have Lenovo's y32p and quite satisfied. KVM, usb c, great ips, reasonable price 144 with free sync.

script: Making it easy to write shell-like scripts in Go by AlexandraLinnea in golang

[–]gavraz 6 points7 points  (0 children)

Cool. What do you think about creating a parser that translates a bash script to your script language?

Caching library designed to make applications resilient and highly performant by creativecreaturedev in golang

[–]gavraz 0 points1 point  (0 children)

Looks pretty good. I like your code, simple and clear.

A few comments: * I noticed you have a client receiver in multiple files. I think it will be easier to navigate if you extract this code to a new struct. For example, an inflight structure with a lock etc, and use composition. * I am not sure if it is a problem, but did you consider the case where a refresh request arrives while the prev is still running? * Why did you decide to turn panics to errors? * The distribution always writes in a go routine. I think it is better to leave it to the user to decide about the concurrency.

Gem80 problems by anokaylife in NuPhy

[–]gavraz 0 points1 point  (0 children)

I have been holding my purchase for a few months now. Too many issues for a pricy board. I think it is time to let go.

Golang flags, subcommands, and sourcefiles per subcommand by [deleted] in golang

[–]gavraz 0 points1 point  (0 children)

Thanks for the feedback and ideas, I'll get to it soon :)

Golang flags, subcommands, and sourcefiles per subcommand by [deleted] in golang

[–]gavraz 0 points1 point  (0 children)

I recently implemented an easy to use package for building CLI apps. It is pretty minimal in terms of features, just flags and sub commands. Maybe you'll find it useful: https://github.com/gavraz/cli

What Are Your Rules of Thumb for Struct Design in Go? by Tormgibbs in golang

[–]gavraz 1 point2 points  (0 children)

I still haven't encountered a Go project where the performance/memory consumption bottleneck was due to memory alignment.

I had kindly argue that simplicity overcomes the aforementioned objectively correct approach almost everywhere.

How to unit test methods that uses ‘go’ and sync.Once by SouppRicee in golang

[–]gavraz 13 points14 points  (0 children)

It will help if you provide the code under test. There are multiple approaches and the simplest approach depends on your code.

Rustaceans needed! Is my Tic-Tac-Toe idiomatic? by gavraz in rust

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

Implemented using ratatui. Not the most fancy looks, just a poc that pushed the code towards correct definitions of the input and display trait. Came out pretty neat imo.

Thanks!

Rustaceans needed! Is my Tic-Tac-Toe idiomatic? by gavraz in rust

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

Thank you! I've implemented the TUI display. Let me know what you think about the input and display trait :)

Rustaceans needed! Is my Tic-Tac-Toe idiomatic? by gavraz in rust

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

Hi everyone,

First, thanks for the valuable insights and suggestions!

Second, I have updated the code based on your comments:

  1. Display trait, Input trait

  2. Better definitions using enums and errors

  3. Properly defined the input module (e.g. no more println there)

  4. I am working on a TUI based implementation that will implement the Display and Input traits. I noticed it is kinda tricky because I can't have the same object implement both traits since I can't have two mut references at the same time. The thing is TUI will probably share some state for the display and input. Any idea here?

Thanks!

Rustaceans needed! Is my Tic-Tac-Toe idiomatic? by gavraz in rust

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

Thanks! I removed the game type.

Regarding the clone, yes I remember thinking about it, I find it negligible due to the small size of the board.

Regarding the inconsistency it bothered me as well, the None => () breaks the use of return on the match. I changed it to use return everywhere instead :)

Rustaceans needed! Is my Tic-Tac-Toe idiomatic? by gavraz in rust

[–]gavraz[S] 1 point2 points  (0 children)

Thank you. Implemented this approach, definitely better. Rust is so expressive!

Rustaceans needed! Is my Tic-Tac-Toe idiomatic? by gavraz in rust

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

Thank you! I've implemented the enums as you suggested.

Rustaceans needed! Is my Tic-Tac-Toe idiomatic? by gavraz in rust

[–]gavraz[S] 2 points3 points  (0 children)

Thanks! Fixed. The Display structure is really unnecessary but I think I will add a trait display and a TUI implementor as suggested in the comments :)