brassica
intercooler-js
brassica | intercooler-js | |
---|---|---|
7 | 12 | |
21 | 4,727 | |
- | 0.0% | |
8.2 | 0.0 | |
30 days ago | over 1 year ago | |
Haskell | HTML | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
brassica
-
Calling Haskell from Swift
I’ve done something like this before to call Haskell from C++ (in [0]), so that I can build my GUI using Qt. It worked pretty well, except that I ran into various difficult-to-resolve linking problems on both Windows and Linux. After a year or two of trying to maintain it, I gave up and switched to a protocol where both sides pass JSON over stdin/stdout. This particular piece of software doesn’t require a huge amount of communication or shared data, so it works well enough.
The really nice thing about the original interop code, though, is that GHC’s new WASM backend uses essentially the same foreign function interface to export functions to JavaScript. So with only some minor modifications, I was able to get the same program working on a webpage [1], which I think is pretty cool.
[0] https://github.com/bradrn/brassica
[1] At the risk of DDOS’ing my poor little home server: https://bradrn.com/brassica/
-
Haskell WebAssembly in the Browser
GHC’s WASM backend is already really useful! I also used it to port one of my own programs to the browser [0], albeit not using the DOM as this person did. Documentation is still sparse, but it’s a very similar process to creating a shared foreign library.
[0] https://github.com/bradrn/brassica
-
GUI development with Rust and GTK 4
No experience with Rust, but for a couple of personal projects I’ve written the logic in Haskell and the GUI in C++ (e.g. https://github.com/bradrn/brassica/blob/master/ARCHITECTURE....). It works pretty well, at least for smaller projects — the basic idea is that the Haskell code gets compiled into a library (static on Windows, dynamic on Linux) which the C++ side can link to. I’d imagine doing the same with Rust would be even easier, since it’s less of a pain to marshal stuff across the language barrier.
-
Ask HN: What are your “scratch own itch” projects?
The biggest one for me is undoubtedly my custom keyboard layout Conkey [0], which I use constantly (including for typing this very comment). I hate the way the base US layout tends to get distorted in other keyboard layouts with good support for non-ASCII characters, so Conkey had the explicit goal of retaining that basic unshifted layout. I’ve also ended up porting Conkey to Mac and Linux — and given that I’m slowly switching from Windows to Linux, at least the Linux ports have ‘scratched my own itch’ too, which is nice.
Also, I made a utility to archive the full text of every website I view and store it in a SQLite database for searching. It’s proven pretty useful when I want to find something I saw a while ago and then forgot. (I haven’t attempted to open-source it, though — it consists of three entirely separate components, two of which were a pain to set up. I must try to get it into a more usable state one of these days.)
What else… my sound change applier [1], perhaps? Not that I use it very much, because I only need it on those occasions when I want to do some conlanging, which I haven’t had much time for recently. Actually, sound change appliers strike me as being very much a ‘scratch own itch’ type of project in general… sometimes it feels like every conlanger has written their own, and no two can agree on a nice design. Everyone just has their own unique preferred way of doing things.
[0] https://github.com/bradrn/Conkey
[1] https://github.com/bradrn/brassica
-
‘Missing C libraries’ when compiling haskell-gi-base on Windows
Recently I’ve been trying to do some GTK+ programming again, as a change from my more recent attempts to use Qt with Haskell. Alas, when I try to build the example application from the documentation, I get an error:
- Brassica architecture (plus some general advice on calling statically linked Haskell from C)
- Rustdoc Résumé
intercooler-js
-
Htmx and the Rule of Least Power
An early version of Htmx was in fact based on jQuery (https://intercoolerjs.org).
-
Rage: Fast web framework compatible with Rails
I used HTMX since the intercooler days [0] but the stuff you can make is rather limited. Also you still need the JS to deal with a11y things like expanded state (or hyperscript, apparently).
If you have a lot of components to implement, everything requires thinking.
I really love it for simple applications though. Resist implementing a complicated menu, live notifications, an editable data-table and such non-web-native things and you can create the fastest CRUD app ever.
And you will need another client, but that's not really an issue if your view model does not contain non-public data (it shouldn't), as you can convert it to JSON at the same endpoint and call it an API.
[0]: https://intercoolerjs.org/
-
Htmx is part of the GitHub Accelerator
to an extent, there was `jQuery.get` but it wasn't tightly integrated with HTML
the original version of htmx was intercooler.js:
https://intercoolerjs.org
released in 2013, and that version depended on jQuery
- Writing JavaScript without a build system
- We're breaking up with JavaScript front ends
-
Ask HN: What are your “scratch own itch” projects?
You asked for it:
https://htmx.org
https://hyperscript.org
I hated angular when it first came out and couldn't believe what insanity people were willing to come up with, so long as it came from google. (e.g. GWT) I created https://intercoolerjs.org out of frustration with that, and the lack of progress in HTML/hypermedia in general, so I could build a web application I was working on (https://leaddyno.com, since sold).
When covid hit I took a look back at intercooler and decided that it was really two things: HTML++ and a scripting language, so I split it up into htmx, focused just on the hypermedia angle, and hyperscript, the scripting language I wanted for the web (derived from HyperTalk, and old scripting language from HyperCard on the mac).
I know use them both professionally (email me if you want to use them too.)
- Stop submitting to social conformity and use your brain instead
-
Ask HN: What are some tools / libraries you built yourself?
I created intercooler.js in 2013 so I could do AJAX in HTML:
https://intercoolerjs.org
Last year I removed the jquery dependency and cleaned it up based on a lot of lessons that I learned, renaming it to hmtx:
https://htmx.org
Same idea: extends/complete HTML as a hypertext so you can build more advanced UI within the original hypermedia web model, and cleaner implementation.
Part of that cleanup involved me pulling out some functionality around events and a proto-scripting language (ic-action), and I enjoy programming languages, so I created a front end scripting language to fill that need:
https://hyperscript.org
It's based on HyperTalk and has a lot of domain specific features for lightweight front end scripting, kind of a jQuery or AlpineJS alternative.
-
Ask HN: I feel my career is at a dead end. Any advice on what could I do?
This is my experience, and your mileage may vary:
Multiple times in my coding career I have felt stalled and/or like I was regressing.
Early on, I worked on a programming language, gosu (https://gosu-lang.github.io/) which ended up not really going anywhere. Once the work on it was done, I returned to more mundane web programming for a while. A long while after that, and unexpectedly, I turned a jQuery function I was noodling on into intercooler.js (https://intercoolerjs.org/). After a year of that I returned to mundane web programming for quite a while. Unexpectedly, a year ago, the country shut down. I was at home and decided to see if I could remove the jQuery dependency in intercooler.js, and so created htmx (https://htmx.org/). When creating htmx and removing some attribute/functionality, I realized that a small programming language would be the ideal replacement, so I created hyperscript: https://hyperscript.org/. I had not expected to work on a programming language again, but now I am.
So my career has been some very exciting technical projects punctuating long stretches of pretty basic web development, where the most exciting thing is me wondering if I can figure out what the deuce is wrong with my CSS. My takeaway here, at least in my career, is that patience is a virtue, and the interesting stuff tends to come up at irregular intervals and in unexpected moments and ways.
-
HTML over-the-wire is the future of Web Development
htmx is the successor to intercooler.js. It swaps parts of the page, not the whole page like Turbolinks. htmx allows you to access AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypertext
What are some alternatives?
kn - kn — nvgt/fldrs/qckly
htmx - </> htmx - high power tools for HTML
PoC_CVEs - PoC_CVEs
morphdom - Fast and lightweight DOM diffing/patching (no virtual DOM needed)
FeedTheMonkey - Desktop client for the TinyTinyRSS feed reader.
html-over-the-wire - HTML over the wire: List of frameworks which receive HTML snippets from the server.
floem - A native Rust UI library with fine-grained reactivity
vaku - vaku extends the vault api & cli
files_reader
Tabula - Extract tables from PDF files
gvsbuild - GTK stack for Windows
GoJS, a JavaScript Library for HTML Diagrams - JavaScript diagramming library for interactive flowcharts, org charts, design tools, planning tools, visual languages.