191 karma · joined October 31, 2022
This also eliminates some of the boilerplate nesting/dispatching you would otherwise need between different Elm models for the price of a very slight increase in the risk of seeing runtime decoding errors.
Maintaining a redundant IR just to be able to transform attributes wasn't a price I was willing to pay for a fun side project so since Elm really didn't want me to work with the generated html the way I wanted to I looked around and decided to give Yew a try. Unlike Elm, Yew gives you a way to include arbitrary html in the rendered output. Accessing third party javascript with wasm-bindgen is also much simpler than using ports or custom elements in Elm.
Well after playing around with Yew a bit I found myself missing the effortless refactoring experience I had working in Elm so I decided to come back to Elm and go with a hybrid approach. Now I have static html/css with small Elm modules for forms and simple views and a completely separate app does the transformation. This wasn't the architecture I originally had in mind but overall I like it better.
Having said all that I can sympathize with the author's frustration. It's really really irritating when you encounter something that you think should have a trivial solution but turns out to be hard in Elm because of the choices the Elm developers made. In my case I felt like I was on a luxury cruise that was fun 99% of the way until finding out their policy was that I had to swim the last 1% on my own.
Allow me to repeat my plea for CLI developers to take a little time to read https://no-color.org and ensure their programs honor things like NO_COLOR, npm config set color false, TERM=dumb, INSIDE_EMACS etc.
¹ https://en.wikipedia.org/wiki/Stac_Electronics#Microsoft_law...
But in the past few years I've noticed more and more nodejs and python programs insist on providing "enhanced" output which do not work well in shell-mode. Things like little multi-line progress bars with colors, checkboxes, weird unicode spinners, etc. Most of those depend on cursor motion and ANSI sequences not supported in shell-mode so when I run those I often end up with junk. Setting various recommended environment variables to prevent this rarely works. For example here's what I get if I run a node app that uses a vorpal.js-based REPL in a shell-mode buffer:
myapp$ ^[[7D^[[7Chelp
^[[1000Dmyapp$ h^[[8D^[[8C^[[1000Dmyapp$ he^[[9D^[[9C^[[1000Dmyapp$ hel^[[10D^[[10C^[[1000D
myapp$ help^[[11D^[[11C^[[1000Dmyapp$ help^[[11D^[[11C
Here vorpal's attempt to enhance my terminal experience by colorizing the command I typed effectively ruined my ability to use it in shell-mode. Having to shift out of emacs shell-mode to run these commands is a huge pain but I haven't found a very good solution for this. The ansi terminal emulation emacs provides with things like vterm partially address his but they have their own problems and don't provide the search features shell-mode does.I suspect few enhanced output terminal CLI developers care about emacs shell-mode users, but I'm hopeful some of them might read this and take a little time to read https://no-color.org and ensure their programs honor things like NO_COLOR, npm config set color false, TERM=dumb, INSIDE_EMACS etc.
But I hit a wall when I wanted to use some templating and communication modules written in Javascript. Working with things like protocol buffers and externally generated html through ports was very frustrating. As I kept working around Elm's limitations I began feeling this wasn't a language I could use part-time. I either needed to go "all in" or find something that made it easy for me use external Javascript. Looked at giving dillonkearns' Typescript api product a try but his e-commerce site crashed...
So now I'm trying out Yew, Rust and WebAssembly. I miss Elm's compiler but wasm_bindgen is way easier to use than Elm ports.
In Walden, Thoreau encourages readers to explore their own inner depths and to strive for truth and simplicity. He argues that material wealth is not as important as the wealth of the mind, and that true happiness comes from within. He also encourages readers to be independent and to take risks, and to not be afraid to explore the unknown. He compares the courage of a soldier to that of a footpad, and suggests that it is nobler to explore one's own inner world than to chase after material possessions. He also suggests that it is better to be content with what one has than to strive for superfluous wealth. He concludes by encouraging readers to strive for truth and to not be afraid to explore the unknown.
I think shows the limits of these kinds of statistical word approaches. They aren't necessary "wrong" but they fail to give any sense of the spirit of optimism in the original. I would have been far more impressed if it just quoted the ending:
The life in us is like the water in the river. It may rise this year higher than man has ever known it, and flood the parched uplands; even this may be the eventful year, which will drown out all our muskrats. It was not always dry land where we dwell. I see far inland the banks which the stream anciently washed, before science began to record its freshets. Every one has heard the story which has gone the rounds of New England, of a strong and beautiful bug which came out of the dry leaf of an old table of apple-tree wood, which had stood in a farmer's kitchen for sixty years, first in Connecticut, and afterward in Massachusetts -- from an egg deposited in the living tree many years earlier still, as appeared by counting the annual layers beyond it; which was heard gnawing out for several weeks, hatched perchance by the heat of an urn. Who does not feel his faith in a resurrection and immortality strengthened by hearing of this? Who knows what beautiful and winged life, whose egg has been buried for ages under many concentric layers of woodenness in the dead dry life of society, deposited at first in the alburnum of the green and living tree, which has been gradually converted into the semblance of its well-seasoned tomb -- heard perchance gnawing out now for years by the astonished family of man, as they sat round the festive board -- may unexpectedly come forth from amidst society's most trivial and handselled furniture, to enjoy its perfect summer life at last!
I do not say that John or Jonathan will realize all this; but such is the character of that morrow which mere lapse of time can never make to dawn. The light which puts out our eyes is darkness to us. Only that day dawns to which we are awake. There is more day to dawn. The sun is but a morning star.
Compared to make, one thing I like about cargo is I don't need to worry about the current directory as much. e.g. "cargo check" works from anywhere in my workspace but something like "make check" will fail if the Makefile isn't in the current directory.
Yes I know I could probably create an alias, direnv or something to improve make's behavior but I'd rather not have more things to manage. All this stuff is too complicated as it is. Overall the cargo defaults are much more ergonomic.
Google Sheets, Zoho Calc, Airtable and Streamlit offer functionality I like but I want something that will work in a local browser without a cloud link. Ideally something that could be served statically as you describe from Vercel or perhaps a webserver on the user's local machine.
I couldn't find anything so I started playing around with Pyodide, Elm, Typescript, XState and Tauri before discovering Yew and WebAssembly. I like the idea of a small interactive calculation engine in Rust with a customizable table/spreadsheet interface that a user could load and run entirely in their browser.
CSS is indeed a beast. I tried avoiding it but eventually decided to see how far I can go with just Bulma, CSS media queries and CSS grid-template-areas. I've started making mockups with Zola to figure out the subset of CSS that will work for me. Then I hope to port or incorporate the Zola templates in my Yew application.
Git Command Explorer
- https://gitexplorer.com/ - https://news.ycombinator.com/item?id=28888763
Learn Git Branching
- https://learngitbranching.js.org - https://news.ycombinator.com/item?id=18504948
Git from the inside out
- https://codewords.recurse.com/issues/two/git-from-the-inside... - https://news.ycombinator.com/item?id=9272249
Python shops weren't much better. Enormous products of complexity, plugin frameworks to config other plugins...
Go is not without its problems but at least it reins in much of the dynamic complexity (although systems like K8S built above it seem to add it back). For a lot of things it's better than Java or Python.
I haven't yet worked at a Rust shop but I've used it on a few small things of my own and it seems to strike a good balance and Rust/Wasm looks really promising.
So if I have the choice I'll go with a Rust startup, a Go startup, a Python/Java startup in that order.
1- e.g as Jamie explains here https://www.scattered-thoughts.net/writing/materialize-decor...
> We will exercise discretion when applying this rule. If you believe that your use-case for cryptocurrency or blockchain is not plagued by these social problems, you may ask for permission to host it on SourceHut, or appeal its removal, by contacting support.
looking forward to seeing what (if any) crypto projects there manage to meet this standard.