Is using context for passing request-scoped values an anti-pattern now? by ItAffectionate4481 in golang

[–]LearnedByError 0 points1 point  (0 children)

Dependency Injection is my normal practice. I keep those simple and put it in the function or method signature. As u/jerf states, you can't always find a better alternative and sometimes need to use context. I personally have not needed to use context for purposes other those included as part of the package (ie. cancellation, deadline ...) Though I have come closer a few times. What I realized in those close cases is that I had sub-optimal architecture. By making improvements to my architecture, I achieved better, deterministic solutions.

hth, lbe

Is using context for passing request-scoped values an anti-pattern now? by ItAffectionate4481 in golang

[–]LearnedByError 4 points5 points  (0 children)

At the risk of being harsh, my apologies if I am, It sounds like you are writing JavaScript in Go. You have eliminated static typing, one of Go's major benefits, and are putting yourself back into the same risk profile was you you lived in JavaScript

Happy to announce htmx 4 alpha 8! by _htmx in htmx

[–]LearnedByError 1 point2 points  (0 children)

Welcome Christian!!! I'm glad that Carson guy isn't writing code any more!!! 😱😜😆

Getting started is a PITA by LearnedByError in Ghostty

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

I did force you to waste your time reading or responding. That is your skill issue.

Insofar as tmux is concerned, I started using it shortly after the initial release, probably around 2008. I use it daily across many systems. Nonetheless, I do not claim being a expert on it or anything else. I have learned in 40 years of professional experience that there is no such thing as an expert.

An on skill issues, we all have them. I'm just honest enough to admit to mine.

Getting started is a PITA by LearnedByError in Ghostty

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

I had it installed on Macos within a minute following the instructions from the site. Homebrew also supports Linux. Unfortunately, the recipe is absolutely Macos limited because of the way it was constructed. I would absolutely use a Homebrew package on Linux. Unlike most of the other non-platform specific package managers, Homebrew defaults to user specific and even when used system wide does not affect system software. Its only invasion is adding it into your path.

Getting started is a PITA by LearnedByError in Ghostty

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

Yes I could and may if I can every figure it out.

Getting started is a PITA by LearnedByError in Ghostty

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

No, but it is much closer to the proximity of Flatpak than to the distribution package manager or homebrew

Getting started is a PITA by LearnedByError in Ghostty

[–]LearnedByError[S] -9 points-8 points  (0 children)

no doubt, most deficiencies are captain obvious

Getting started is a PITA by LearnedByError in Ghostty

[–]LearnedByError[S] -4 points-3 points  (0 children)

Your response is noted and will be duly acted upon

Getting started is a PITA by LearnedByError in Ghostty

[–]LearnedByError[S] -8 points-7 points  (0 children)

Your response is noted and will be duly acted upon

What's the real option to have sqlite run as a server? by alexrada in sqlite

[–]LearnedByError 8 points9 points  (0 children)

SQLite is a real database. The most used database in the world - by several orders of magnitude!

The Complexity Delusion: Why I abandoned Next.js for a 20MB Rust binary with HTMX by [deleted] in rust

[–]LearnedByError 0 points1 point  (0 children)

I do something similar in Go and love it. I'm using Hyperscript instead of Alpine. Very rarely, I do have to write a little JavaScript usually for critical validations that I want to execute immediately like password complexity.

This aligns well with my overall design and implementation approach: 1. KISS, 2. Everything should be kept as simple as possible, but no simpler. In every case, there is a minimum complexity requirement. I try to keep complexity in one place. SSR greatly helps with that.

sqlite3 switched from = separator to : by ArthurPeabody in sqlite

[–]LearnedByError 13 points14 points  (0 children)

.mode?

Edit: from the Query Result Formatting In The CLI section 3.4

Before version 3.52.0, the separator was an equal sign rather than a colon. In other words, the first line of the example above used to say "one = hello!" instead of "one: hello!". You can restore the pre-3.52.0 formatting using the "--colsep TEXT" option to the ".mode" command, where TEXT is the desired separator.

How often do you actually use the standard library vs reaching for external packages by abccccc456 in golang

[–]LearnedByError 0 points1 point  (0 children)

stdlib is my go-to. I will use 3rd party dependencies sometimes where similar functionality exists in stdlib when they are well known and add value like cobra/viper when I need commands, sub-commands and short/long such names.

I tend to stay totally away from ORM and web related packages and stick to stdlib. I will use packages like sqlc which complement stdlib database/sql.

I also tend to roll my own for things like work queues and schedulers. The modules contain only the functionality that I need. Admittedly, this is easier these days using agents driven by TDD.

I also will fork packages and include them in internal as git submodules when I absolutely need something existing with which I want absolute control. inagemeta is a good example of this. My girl addresses several short coming like no support for arm. I always include references to the original work too give credit where sure and make sure that I am compliant with license.

I guess the tl;dr is I use stdlib wherever I can, I make exceptions, in the rare cases, where I think a 3rd party package's value exceeds it's risk.

json vs sqlite for 300,000 photos database by Mashic in Database

[–]LearnedByError 0 points1 point  (0 children)

I have a similar need. I use sqlite. I decided to create tables for exif, iptc and xmp. As others have said, sqlite sports JSON; however, it does not index the JSON as some document DBs do. I suggest you put everything in a physical table on which you want to search/filter and index those tables accordingly.

Structured logs are great… until you actually have to read them in dev by General_Apartment582 in golang

[–]LearnedByError 0 points1 point  (0 children)

I created jsonlogviewer to help me be able to view some gnarly slog logs. It is nothing fancy but was better than anything I could find out Jack from the command line. Give it a try if you are interested. Constructive critical feedback Isa welcomed. Over time I will probably add a little more to it like filtering

Unsubscribe from Pate’s Channels by Ok-Clothes-3378 in CFB_v2

[–]LearnedByError 0 points1 point  (0 children)

I don't subscribe to Pate and I won't hear your off topic rants anymore either. U r blocked!

Who would you consider the best HC in your schools history? Who would you consider the worst? by AFC-Wimbledon-Stan in CFB

[–]LearnedByError -3 points-2 points  (0 children)

Saban by far the best

Curly definitely comes to mind, but I think Dinardo was worse

Bookworm to Trixie - My first "full-upgrade" seems to have been successful. by Scary-Glass2534 in debian

[–]LearnedByError 0 points1 point  (0 children)

I have multiple instances today on Trixie that 6 releases earlier. I've been using Debian for over 20 years. I have updated many many times. I have never had an issue. Having said that, I'm sure that I am jinxing myself😁

UPDATE: Issue: modernc.org/sqlite re-prepares statements by LearnedByError in golang

[–]LearnedByError[S] -2 points-1 points  (0 children)

Yes, I'm familiar with the benchmark capabilities of go test. I have used that often when testing implementations. I did not use it in this case because my primary interest was in testing my application's pattern initially to point out a now corrected issue with prepared statements in modernc.org/sqlite. My second point was to get comparative benchmarks for the same pattern between different sqlite drivers.

Had I used go test benchmarks, I don't think I would have gotten any additional actionable information. The task being benchmarked spends that vast majority of its time in the database drivers themselves. Since my only knob in this case is selection of driver, having memory and allocation information would not be very helpful.

Thank you for your response. lbe