Earlier quoted context omitted.
I mean... isomorphic code isn't unique to Clojure & is how many JS/NodeJS apps work...
Of course. But I'm a Smug Clojure Weenie, so. :-)
Easy SVG sparklines
101–106 of 106 posts
Re: Easy SVG sparklines
#102Earlier quoted context omitted.
Noticable differences between rendering engines for what? Sometimes type can be janky, but no moreso than in html/css, and in SVG you're generally turning type into vector outlines. For graphics rendering, it's completely accurate in any environment I've used it in, and that's working with very very fussy brands.
I mean I'd say this is pretty noticeable: https://imgur.com/e6TbXFj Same screen, same zoom levels. Viewbox properly set, height/width set, confirmed compliant units. Switching between img/object would get it unblurry but then lose the embedded image data. Switching to inline-svg would in turn get the image data working but the drop shadow was completely broken.
Re: Easy SVG sparklines
#103Earlier quoted context omitted.
How was it made?
Figma, and I got to the point of running it through SVGO and hand patching any constructs that had known issues with Safari. Going based off the types of bugs I was seeing alone I wouldn't trust SVGs for anything but the most basic shapes.
Re: Easy SVG sparklines
#104Re: Easy SVG sparklines
#105I'm going to be the Smug Lisp Weenie here (I wonder who gets the reference), and comment on this: > One of my favourite things about creating sparklines like this is that I can create the SVGs entirely on the backend. I don’t need to worry about using a JavaScript charting library, or sending the “points” data to the frontend. The browser requests an SVG. The server returns it. Simple! Me, I don't care where I create…
https://news.ycombinator.com/user?id=kennytilton sure does. :D
Re: Easy SVG sparklines
#106I'm going to be the Smug Lisp Weenie here (I wonder who gets the reference), and comment on this: > One of my favourite things about creating sparklines like this is that I can create the SVGs entirely on the backend. I don’t need to worry about using a JavaScript charting library, or sending the “points” data to the frontend. The browser requests an SVG. The server returns it. Simple! Me, I don't care where I create…
What's Clojure's WASM story like? That would be much more exciting than having to transpile to JS.
(That's why for example Python works well on WebAssembly - it comes with its own interpreter written in portable C that compiles nicely to WebAssembly, and uses reference counting for GC instead of a fancy GC).
Since Clojure is mainly a hosted language, a more likely avenue would be one of its current platforms gaining WebAssembly support. A Wasm JVM, or Wasm GraalVM target, for example.