368 karma · joined Apr 21, 2014 (12y ago) · 157 submissions
comment 1mo ago · link · parent
You can totally be friends with a chicken, and still eat chicken eggs, they don't mind. Most chickens have been bred to have little interest in incubating the eggs. Not sure how a crow would react...
Side note, I saved a few Guinea Fowl chicks from the road the other day. When I put them down next to the parents and the other chicks, one of the parents launched at me and tried to claw out my eyes. My eyes survived intact, but I had a few scratches on my ears and arms
2.
Large language models take the original politicalcompass.org test(aipolcom.net ↗)
3 points · by mozey · 2mo ago · discuss
comment 1y ago · link · parent
1. With go-app
func (h *hello) Render() app.UI {
return app.Div().Body(app.Text(fmt.Sprintf("Hello %s", h.name)))
}
2. Compared to using templ templ Hello(name string) {
<div>Hello, { name }</div>
}
For me personally, the latter seems nicer- I can see at a glance the structure of the HTML
- Completion on the HTML tags, attributes, etc
- Completion on CSS (TailwindCSS LSP for VSCode)
- Logic can still be shared with other types of UIs (e.g. CLI, Native Apps, Webkit, gRPC)
If what you want is option 1, isn't this solution incomplete. That is, the fully realised vision would be a native component / widgets API (e.g. Fyne, QT, GTK), and then generate HTML from the components?
However, "since Dagger Cloud is built as a PWA, it can be installed as a desktop or a mobile application. This makes it possible to launch Dagger Cloud like a native application and get a full-screen experience without needing to open a browser first, or just have a dedicated icon in your desktop taskbar/dock", so it sounds like the "Native App" is using a Webkit (e.g. Wails, Tauri, Electron)
Anyway, congrats on having commercial users building stuff with your project!
comment 2y ago · link · parent
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/412
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
I know this is not the same UX as installing an app. But why isn't this technique more standard?
Besides more efficient resource usage, another benefit is that it keeps the client/server architecture.
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
In an MPA, modules https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guid... can be included on the pages that require them with a script tag. Errors (and new features) are limited to a specific page, and the rest of the site remains unchanged.
> suspense (or another form of components loading their own data)
The htmx lib https://htmx.org/ mostly takes care of this: "gives you access to AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML". The hx-boost tag can also be used for progressive enhancement.
> as soon as you need the bloat you’re just reinventing a wobbly wheel without one
When building a rich client, using a framework could be productive. For example a photo/video editor app. For a news site and CMS I would probably stick to the approach I've described above.
comment 3y ago · link · parent
This is the key to making framework churn go away. The DX of using vanilla JavaScript is getting better every day. And is a much better experience than it was a decade ago.
> Islands architecture and partial hydration can help you render static HTML with just a small portion of JavaScript for those components who need it
I'm doing this with Hugo for rendering the static parts, and htmx for loading hydrated partials. The HATEOAS approach simplifies state management in the application. There is no client side "routing", just links and the back button.
In addition to vanilla libs, I include one "app.js" bundle. This file is created with esbuild and linted with deno. My "business logic" can be written in TypeScript in VSCode with the Deno extension and LSP server.
comment 3y ago · link · parent
Conveying and interpreting "mood" correctly is the most difficult part of human to human conversation. It has a huge impact on how efficiently "the message" is communicated.
comment 3y ago · link · parent
There are tools for creating stand-alone executables from PHP source code, but they're not as nice to use, compared to languages that were designed for this. By distributing software I also mean making your latest code live in prod.
I suppose the benefit of using PHP (or other interpreted languages) is that it's easier to create "plugins", just copy the new source files to the server.
comment 3y ago · link · parent
The benefits of doing this are:
- Standard elements that work everywhere
- Easy to refresh the available options after a date change
- Mimics the "rolodex" behaviour to quickly find any date/time
The libs I used are arbitrary, won't be hard to rewrite using only built-in Javascript, or any library / framework