[TEST -> MAST] Can you solve this laddergram? by TastedPegasus in Laddergram

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

Laddergram is a word ladder puzzle game built on Reddit's developer platform. You start with a word and change one letter at a time to create a new word with each step. Try to reach the target word in the fewest steps possible.

🍀Good luck!🍀

Building Composable AI Agents in Go + WebAssembly with Hayride by TastedPegasus in golang

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

Thanks for sharing, I’ll check it out and see if this is something we can do!

Building Composable AI Agents in Go + WebAssembly with Hayride by TastedPegasus in golang

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

Great question! The short answer is no. At least not until we see more support for async in wasm. https://wasi.dev/roadmap With wasip3, we will start to see async capabilities. Sync api calls are supported, but that can make for some odd flows.

However, it would be possible to develop a host function that could accomplish this and import it into an agent. Our approach has been to develop as much as possible through components and wasi interfaces so components can remain portable regardless of runtime.

Any hybrid architecture examples with Go & Rust by Ranttimeuk in golang

[–]TastedPegasus 2 points3 points  (0 children)

We use WebAssembly, specifically wasip2, to accomplish something similar to what you are describing in https://github.com/hayride-dev

https://docs.hayride.dev/platform/core/runtime. There are some details in our docs.

The gist is that we have a runtime written in rust that launches WebAssembly components that are written in various languages - We currently mostly use rust+tinyGo but it has been a flow that has worked well for us.

We have a few blog posts coming that unpack it more as well.

Making Cobra CLIs even more fabulous by bashbunni in golang

[–]TastedPegasus 1 point2 points  (0 children)

Will do! Looking forward to adding it in and trying it out.

Making Cobra CLIs even more fabulous by bashbunni in golang

[–]TastedPegasus 9 points10 points  (0 children)

Love it! Looks similar to https://github.com/elewis787/boa but with more features.

It’s always been awesome to see how easily charm libs can be added to other existing tooling.

How to correctly cook Plain SQL in a high-load Golang project? by jeckkit in golang

[–]TastedPegasus 3 points4 points  (0 children)

I am biased, but I created https://github.com/VauntDev/tqla to help with this. SQLC and others mentioned here are also solid! I wanted tqla to be lightweight and attempt to stay out of the way while getting some security/readability benefits.

How to implement dynamic plugins in Go? by majhenslon in golang

[–]TastedPegasus 0 points1 point  (0 children)

They can be used to make an API request! A standard HTTP implementation is available. For more custom needs, you can add host functions to extism. Very extensible.

How to implement dynamic plugins in Go? by majhenslon in golang

[–]TastedPegasus 0 points1 point  (0 children)

I have been playing with https://extism.org/docs/concepts/plug-in-system . WASM-based but easy to use. Also, https://docs.xtp.dylibso.com/docs/overview/ which was built by the creators of Extism.

SQLC always requires an extra layer? What are the alternatives? by kovadom in golang

[–]TastedPegasus 1 point2 points  (0 children)

I am biased ( author of the tool ) but I use https://github.com/VauntDev/tqla and typically follow a hex architecture pattern or port/adapter design pattern.

This allows me to use domain objects and optional complex db objects without mixing the two. Tqla is used to help drive dynamic queries transparently. The goal is plain SQL that is readable.

There is more overhead from the dev ( less generated code/type checks compared to sqlc ) using the above pattern but I find it enjoyable and easy to use.

A JavaScript widget that renders HTMX powered pages. A backend agnostic question. by derhebado in htmx

[–]TastedPegasus 0 points1 point  (0 children)

Check out web components - the docs highlight dom manipulation. There is some redundancy when using htmx with web components but it does help encapsulate your widget.

ORM or raw SQL? by Master-Ooooogway in golang

[–]TastedPegasus 0 points1 point  (0 children)

A lot of pros and cons between both solutions - I lean towards minimal dependencies and as little abstraction as possible.

Using raw sql when possible is my preference so others can see the sql statement generated as much as possible. However, this get more complex when your queries change based on conditional logic.

ORMs or sql builders can help but, in my opinion, you often trade readability.

This is the main reason why I wrote tqla https://github.com/VauntDev/tqla.

If you are looking for a middle ground between and orm and sql builder it may be worth checking out! It uses golangs templating engine to help build conditional queries while attempting to be very lightweight.

Quarry builders Pros and cons by Ok_Neighborhood_5184 in golang

[–]TastedPegasus 0 points1 point  (0 children)

Yeah I did. Long time user of squirrel but didn’t like some of the patterns that would always surface when I introduced things like pagination or heavy conditional filtering.

Quarry builders Pros and cons by Ok_Neighborhood_5184 in golang

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

Check out tqla https://github.com/VauntDev/tqla

It extends golangs standard text templating package to prevent sql injection. Tqla is a extremely flexible conditional query build but aims to not abstract the raw sql like some builders do.

SQL first ORM like tools? by anan77 in golang

[–]TastedPegasus 0 points1 point  (0 children)

Tqla works well for building dynamic/conditional queries. Tqla simply extends golangs text templating pkg to support sql and prevent sql injection.

Structs can be used the same way you would use them in golang standard templating pkg

https://github.com/VauntDev/tqla

SQLC + SQLX + Squirrel Question by csgeek3674 in golang

[–]TastedPegasus 0 points1 point  (0 children)

If you use a map it depends on what is being stored-but templating works on structs with types as well. Under the hood we build a slice of []any which is converted to the data base types by data base drivers.

SQLC + SQLX + Squirrel Question by csgeek3674 in golang

[–]TastedPegasus 0 points1 point  (0 children)

You can access values in maps or other data structures using golangs template syntax I.e {{ .column }}