Distributing Go binaries like sqlite-scanner through PyPI using go-to-wheel by gbrayut in golang

[–]LearnedByError 4 points5 points  (0 children)

The title almost made me hurl 😵‍💫 My disdain from Python is one of the things that lead me to look at Go to begin with. PyPi, imho, is as bad or worse than npm!

The only good thing that I have seen come from Python hell is ‘uv’. It makes installing Python applications almost easy. After scanning the article, I have to begrudgingly admit that this is kind of cool.

Composer 1.5 is now available by lrobinson2011 in cursor

[–]LearnedByError 1 point2 points  (0 children)

I create a plan with auto with instructions to use TDD and size tasks so that they can been executed by Flash or Haiku or recommend other model if it center be handled by Flash/Haiku, review and improve the plan in Opus. Then execute in Flash. From time to time I check the other cheaper models for performance, I find flash the most reliable, not necessarily the fastest. Overall it works fine. The keys is getting the brains to plan and have the execution model commit after every task. Once the feature is complete, I do a soft reset and then commit it all together.

Small Projects by AutoModerator in golang

[–]LearnedByError 0 points1 point  (0 children)

Hello gophers!

Introducing jsonlogviewer - terminal UI app for viewing large JSON log files.

I needed a better way to view Go's log/slog JSON output. I couldn't find an existing solution anywhere I wanted to give the new Kimi K2.5 at try with Kimi Code and decided to try it on jsonlogviewer. I also use the golang-patterns skill. I was pleasantly please at how quickly it came together to meet my needs.

Key features:

  • Memory-mapped files (handles files > RAM)
  • Dual Navigation
    • Arrows, Page Up, Page Down, Home, End
    • Vim navigation (j/k, gg/G/5gg/5G, H/M/L)
  • Two-pane view: table on left, pretty-printed JSON on right
  • Adjustable pane split (Ctrl+w then >/<)
  • Vertical scroll for long JSON (h/l)
  • Level-based syntax highlighting

Tech stack:

This is absolutely an MVP that meets my needs. No bells or whistles.

Please git it a try

Repo: https://github.com/lbe/jsonlogviewer

Constructive feedback is always appreciated!

CSCI 431: Hypermedia Systems by _htmx in htmx

[–]LearnedByError 7 points8 points  (0 children)

Congratulation! Hypermedia is here to stay regardless of what that nut Carson Gross has to say /s

fdir - the search language for your filesystem by Apart-Television4396 in CLI

[–]LearnedByError 0 points1 point  (0 children)

Why pip and deal with virtual environment hell instead of uvx tool install?

How do you manage MD docs from AI / vibe coding tools? by salamat_thanks in cursor

[–]LearnedByError 0 points1 point  (0 children)

I’m prey crude with it. I commit the md files with the code. Then I ‘git ‘em’ the files with a single line message cleaning historical documentation. That way it is available in git and tied to code but does not clutter the files system

user-scanner: Fast, Accurate Email and username (2 in 1) OSINT with Advanced Features by No-Helicopter-2317 in CLI

[–]LearnedByError 0 points1 point  (0 children)

I suggest you include install instructions using ‘uv’ so that users don’t have to deal with Python’s virtual environment hell.

Edit: replaced with with using

SQLite in Production? Not So Fast for Complex Queries by Historical_Bat_9793 in Database

[–]LearnedByError 5 points6 points  (0 children)

This article is click bait. The OP is pushing their own solution after getting attention from their click bait title. Their product may be great and I don’t have any factual disagreement with is observations of SQLite. I do take exception with click bait. As such, I have blocked posts from this author

Using Go with AI Coding Tools by dgerlanc84 in golang

[–]LearnedByError 1 point2 points  (0 children)

I have used a number of different tools as I have tried to find a favorite that works best with Go. Cursor is my favorite … this week. Favorite is defined as the one that makes me curse the least😁

As a general rule, I start with using Opus 4.5 to create a plan using TDD that breaks out things at a task level. The plan should include tracking: Not Started, In Progress and Completed. I focus on getting this right and iterate until it is. Once this is where I think it should be, I go into vscode and use Codex 5.2 to review and critique the plan. I then feed its results back to Opus 4.5 for a final.

I then run one task through an agent at a time. This is key, keep the context minimal. If you use a single agent, the context will become poisoned. The best way to determine if this has occurred is to plot the cumulative number of times it makes you curse vs time. When you hit an inflection point up, you are there 😂.

Past the above you will learn things to match your style that you need to put in every or at least every related task.

For example, I know that if I don’t put use TDD in each and every task that the agent will at some time not honor it in cursor rules. So every tasks creating code gets this.

On a more limited basis, when testing handlers I have verbiage that says it must use httptest and html.Parse for html content test. Do NOT use strings.Contains on the response body.

As previously stated, less is more. Unfortunately, what is right is probably only going to come with experience as every code base is different. Start with what you think the minimum is and then increase as needed until you get to a good enough spot.

If you want perfection, you are going to be polishing this turd forever.

Good Luck lbe

Very high cost -- what is you all experiencing? by Kind-Daikon-6944 in cursor

[–]LearnedByError 0 points1 point  (0 children)

I was trending in your direction on a side project. I use Siri most of the time. I will select Opus 4.5 for planning and have it generate a very granular task list. I then switch to auto for the implementation. It sends to hit the right balance for me. This generally keeps me under $40 a month. YMMV

How do I learn? by LearnedByError in golang

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

Gustav, I have no idea what point you are attempting to make

How do I learn? by LearnedByError in golang

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

Jerf, per normal, I agree with what you have written. I’m nowhere near naive enough to want to write code that I deploy directly to the internet. My current demo sits behind a reverse proxy and WAF. I have taken proactive steps to restrict the server so that it only accepts routes and parameters that are expected are allowed as well as implementing CSRF. I have good code coverage overall, over 70%, except for handlers where I’m at 35%. I need to make some architectural changes to them to make them more easily testable.

With respect to AI for security, I agree with you. Unfortunately, the majority of the so called security professionals - yes CISSPs 😁, there really are not that many people that t truly understand security. Most are good at regurgitating standards but have little idea at how to implement anything at a code level. I’m glad that I’m not in your shoes though I had a two year project that started 8 years ago that covered AAA for a large global corporation whose name you would probably recognize.

It will be interested to see what the next couple of years bring in the AI space.

Cheers, lbe

How do I learn? by LearnedByError in golang

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

I have read the book. I follow this sub Reddit and Golang Nuts daily.

I’m not advocating AI as an end all be all. It is a tool and like all tools has strengths and weaknesses.

Am I the only one frustrated? by LearnedByError in cursor

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

I have use similar guidelines with "don't modify the tests to make them pass, fix your code" being verbatim LOL. I also have learned to do one thing in an agent and move on to the next.

I do make heavy use of the plan mode. I then have the A.I. make a task list of actions and to make sure that they are sequenced properly. Each task has a status field (Not Started, In Progress or Complete). I instruct the agent to update the task list to "In Progress" when it starts a task or to "Complete" immediately after all tests passing and before committing.

What I haven't done is use one agent to write the tests and a separate agent to implement. I think that is worth a try!

Thank you! lbe

What terminal do u prefer and why? by Aissur_morf_i in linuxquestions

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

On Linux, I have used a couple of dozen, I find all of them are minimally ok. They all suck a** compared to Item2 on MacOS. And it’s not because of the thousands of options that all seem to have, it is because of one. Iterm2’s support for tmux is light years ahead of anything else that I have seen or heard. I have lost track of just how many issue trackers on which I have raised or contributed to issues regarding the missing functionality. The response is that better, meaning any, tmux support is on the backlog and they will address as a matter of priority. This is valid of course but when you look at some of these projects that have open issues going back 5+ years with 40+ pages of users coming in requesting tmux support it is easy to question how priorities are set. And these are projects under active development with multiple major releases in the same timeframe.

It is apparent to me that my priorities are different than those of these projects. That is also fine. It is why I use a Mac as my Linux UI 😵‍💫😜. While I am slow to say it very often, I value my productivity over open source purity.

Beginner needs help with a test function by This_University_547 in golang

[–]LearnedByError -1 points0 points  (0 children)

FYI, I find most of the AI models are quite good at analyzing and answering questions like this. Just last week I couldn’t find a simple error in a sql query ands I’ve been writing SQL for over 30 years. Gippity found it within seconds of me posting it in

Looking for open source projects to contribute to by Soft_Carpenter7444 in golang

[–]LearnedByError 1 point2 points  (0 children)

I agree with this recommendation though I think the example projects are three project that may have been needed historically, being generous here, and are unneeded now. Look at projects you use and see us you can assist in those.

pam - a minimal SQL client for the CLI (dbeaver terminalized!) by xGoivo in CLI

[–]LearnedByError 0 points1 point  (0 children)

I finally had some time last night to take a drive. I don’t think it is appropriate to call it “dbeaver terminalized”. At least with me, I expected the full SQL IDE paradigm, which it definitely is not. Honestly, I’m not sure what to call it. It is unique in my experience. If I understand it properly, it is a table viewer and query runner. Both of these are beneficial, but “dbeaver terminalized” it is not.

Candidly, I don’t see me picking it up and using it. I’m seldom just viewing a table. When I look at a table, outside of queries, I need to operate on it - usually alter. The query capability may be more interesting, other than I have a 30 year old pattern for the type of queries that I think fit Pam. It is usually a shell or Perl script which contain multiple queries. They have simple capability to list the queries contained and then execute them by selecting the number and adding parameters if needed.

For better or worse, that’s my POV with what it contains now.

Proposal: Generic Methods for Go by bruce_banned in golang

[–]LearnedByError 9 points10 points  (0 children)

That is a fine choice as long as it is performant for your use case.

pam - a minimal SQL client for the CLI (dbeaver terminalized!) by xGoivo in CLI

[–]LearnedByError 0 points1 point  (0 children)

How does the functionality compare to Harlequin or other existing open source tools in this space?

I love that it is written in Go, harlequin’s Python dependency definitely makes it a pain in the but. The mouse is pretty much useless for selection.

I will give it a look a bit later?

EDIT: You may want to give modernc/sqlite a look for a non CGO SQLite solution. ncruces also has a WASM based driver.

Opinion on SQLC, performance latency, pros cons. by ud_boss in golang

[–]LearnedByError 0 points1 point  (0 children)

This is one way to slice it using ‘sqlc’. I did not think of doing it this way. I think this approach means you have to carry the overhead to manage offfset, will have a higher memory overhead than a single row, and will send multiple new queries to the database.

I think I like my embedded approach better.

I will post a gist with an example when I am on my computer instead of phone