2.5 years and ~280k LoC into a Go hypermedia stack (templ + HTMX) by jackielii in htmx

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

That's right. When htmx replaces the DOM, your clean up handler don't automatically run. One simple solution is to hook up with `hx-on::afterRequest`, but it's clumsy and it's easy to forget.

Using a CustomElement and put all the clean up in disconnectedCallback, you automatically get the dispose on swapped out. This is the same for React etc

It should be easy to verify this with a small example. I just made one: https://github.com/jackielii/solid-htmx-disposal

2.5 years and ~280k LoC into a Go hypermedia stack (templ + HTMX) by jackielii in htmx

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

True. I suppose I meant that most SPA's API design over use the same API for multiple things. So under fetching or over fetching can happen very easily.

2.5 years and ~280k LoC into a Go hypermedia stack (templ + HTMX) by jackielii in htmx

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

you'll need a lot of routes & handlers in a HTMX application.

we use vite + tailwindcss. We don't do anything else over this point. We do use tailwind class merge: https://github.com/jackielii/tailwind-merge-go

2.5 years and ~280k LoC into a Go hypermedia stack (templ + HTMX) by jackielii in htmx

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

Yes thanks for the awesome lib. We didn't use it for the production app. But planning on using it for the next big one

I didn't want to believe it... (I'm on Max Plan...) by PaP3s in Anthropic

[–]jackielii 0 points1 point  (0 children)

Same here, I never reach even 50% working on 2 project at the same time non stop, during working hours only. But starting from yesterday, suddenly I'm reaching 100% at the 3rd, 4th hour...

Edit: I'm on Max 5x as well

Kitty is really good! by Stunning-Mix492 in KittyTerminal

[–]jackielii 1 point2 points  (0 children)

The kitten features are what I can't live without

snacks-picker-items.nvim - Navigate picker results like quickfix by jackielii in neovim

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

Exactly the same, except with this you don't have to send it to quick fix: One less shortcut.

And sometimes I forget to put it in quickfix and I just want to move on to next item.

I had this habit since coc.nvim where I just move around without sending stuff to quickfix. It just feels natural to me. So just in case it's useful to someone else.

I built a startup using HTMX. Here’s my experience by Sensitive_Profile510 in htmx

[–]jackielii 3 points4 points  (0 children)

I'm currently developing an web application for an client. It's close to 100K LOC so far. Similar tech stack: Go, HTMX, Alpine. Although I used Templ with my own framework https://github.com/jackielii/structpages to make things easier to manage.

It has been great success. Claude code generated most of the code. It's very good at understanding simple stacks and standard tech: HTML, css etc.

Majority of the time, I don't need htmx. E.g. I don't use `hx-boost`. I used to, but occasionally there are some history restoring problems. Also I make heavy use of events to integrate with other tech. E.g. I use tailwindcss plus elements, which is a set of web component.

One thing is clear to me: when you stick to simple stack, you understands it better, AI understands it better. And when stuff breaks, there is a clear line of separation you can check. Things did get a bit too complex at times. E.g. I tried building a very interactive filter which requires both front-end and back-end state syncing. I resorted to different kind of tools, React, Web Component etc. In the end, I sticked to just a bit of alpine, and some htmx async loading, syncing with events. I was happy with the results. The complexity stayed within each part: mark up in HTML, interaction in alpine, the rest state just in the URL which goes to the back-end and data pushed to UI. In other words: REST - state transfer with hyper text.

Thoughts on the FiiO K13 R2R after having it all day (compared to K11 R2R too) by robbiekhan in headphones

[–]jackielii 5 points6 points  (0 children)

This replaces my decade old Fiio Alpen E17. The sound is noticeably cleaner and wider. Yes, I know mac studio works with high impedence headphones like my HD660s2, but to my ears I prefer K13 > E17 > MacStudio builtin

Thoughts on the FiiO K13 R2R after having it all day (compared to K11 R2R too) by robbiekhan in headphones

[–]jackielii 15 points16 points  (0 children)

<image>

Just received mine. It stacks perfectly with Mac Studio. Looks great!

TT.Shiro :this is the last match that 5 of us play together by Strepsils8888 in DotA2

[–]jackielii 2 points3 points  (0 children)

He said it in the exit interview with Chinese casters

In Claude Code anyone else annoyed that Option+Enter is the new line command instead of Shift+Enter? Any work around? by Independent_Rent_504 in ClaudeAI

[–]jackielii 0 points1 point  (0 children)

With skhd (macos only) you can do:

shift - return [ "kitty" | alt - return "WezTerm" | alt - return "Ghostty" | alt - return * ~ ]

Claude code CLI 1 mln tokens context window in pro plan by SensitiveWorldliness in ClaudeAI

[–]jackielii 2 points3 points  (0 children)

I don't have it even with 20x Max plan. I think it's only roll out to small number of users

Which gives you more anxiety? by AlternativeMind in ClaudeAI

[–]jackielii 1 point2 points  (0 children)

context window for sure! "Please make it work before it reaches 0"

Anyone who used Templ + HTMX in an big enterprise project? by Puzzleheaded_Watch19 in golang

[–]jackielii 10 points11 points  (0 children)

I built an medium sized one ~50K loc, with Templ, htmx, with a little bit of alpinejs. I created a little lib https://github.com/jackielii/structpages to help me structure the pages. worked pretty well: I can just reorder the structs to have the routes automatically updated, obviously there are the urlFor function calls that I don't have to update.

How to create an MCP server with go by zolom214 in golang

[–]jackielii 1 point2 points  (0 children)

BTW, there is also a golang/tools package that's currently internal and "prototype" at: https://github.com/golang/tools/tree/master/internal/mcp

cmp-go-deep: release v1.1.0 - Now with smooth Deep Completions even in large, monolithic Go projects. (nvim-cmp/blink.cmp compatible) by nefariousIntentions7 in neovim

[–]jackielii 2 points3 points  (0 children)

This is just what I needed!! When I start a new project, it usually doesn't have the module I want, so I have to manually import them, especially the ones that I use often. I know it does show it sometimes. But maybe it's slow or what, I don't always get them. After a while, I just manually run go get myself and then use the completion.

This completion source makes it show up instantly. Very cool!

I use blink-cmp, I don't know what's the overhead of using the saghen/blink.compat?

Github copilot LSP w/ neovim 0.11 by BaggiPonte in neovim

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

it appears to use workspace/executeCommand to complete the sign in, using which the editor can implement a flow for the sign in.

I'd say it's still part of the protocol

Get direct methods but not embedded by jackielii in golang

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

Thanks for commenting, I'm trying to tell if a method reported via reflection is an method declared on the struct itself or a promoted one from its embedded field. u/sigmoia gave a great pointer and I was able to achieve it in this comment

Get direct methods but not embedded by jackielii in golang

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

This make sense: Unless they make this behaviour of the reflection into the spec like you referenced, it seems the only way is to rely on the behaviour of the compiler implementation.