Readit News logoReadit News
MrJohz commented on Equal Earth – Political Wall Map (2018)   equal-earth.com/index.htm... · Posted by u/bjelkeman-again
fph · a day ago
The Greenwich meridian is not actually 100% arbitrary. It is a convenient location that does not split into two any significant landmasses.
MrJohz · a day ago
It does split off part of Russia, I believe. The Florence meridian works slightly better for avoiding splitting any landmasses.

As I understand it, it's not the best location, it's just good enough and was very popular for historical reasons.

MrJohz commented on Good EU regulations   actuallygoodregulations.e... · Posted by u/saubeidl
arp242 · a day ago
Everything seemed to have been moving towards USB-C regardless for a few years now, so it seems somewhat superfluous at this point in time? Apple was a major holdout though, due to Apple reasons.

Not strongly against it as such, but also not entirely convinced it's needed either.

MrJohz · a day ago
That sounds like it wasn't superfluous, because it convinced s major holdout to change, no?
MrJohz commented on Show HN: JavaScript-free (X)HTML Includes   github.com/Evidlo/xsl-web... · Posted by u/Evidlo
simpaticoder · 2 days ago
It's kind of too bad XSLT didn't take off. It is quite complex, until you compare it to the complexity of what now solves this problem (e.g. a build step with React and webpack and javascript absolutely required on the client-side). As the OP ably demonstrates, XSLT provides a declarative, non-javascript, non-build way to solve the basic HTML component problem. Perhaps a devastating 0-day in V8 will make us really, really want an alternative to the current best practice.
MrJohz · 2 days ago
I think the big difference there is that browsers are only responsible for Javascript, which is a big general purpose solution that solves a lot of problems and not just templating/styling XML. Everything else either happens server-side (build steps and webpack) or is userland code that lives inside the sandbox. So there's one task for browsers to do (make a fast and secure Javascript sandbox), and if that works that developers can do whatever they want. Whereas XSLT is not a general purpose tool in the same way, and so needs to be maintained in addition to Javascript and anything else that exists.

If course XSLT can also be used server-side (which is probably a good idea if you want access to the latest features and not some ancient, frozen version of the spec), but browsers aren't the reason that that didn't take off. My guess there is that it's just not an intuitive way of manipulating and templating data in comparison to more traditional HTML templating libraries.

MrJohz commented on Show HN: Bizcardz.ai – Custom metal business cards   github.com/rhodey/bizcard... · Posted by u/rhodey
MrJohz · 5 days ago
> We need to show dozens of things at once and this won't fit on a phone. Switch to desktop.

Scrollbars can help!

I really like the idea, although the designs are a bit limited and I don't know that I'd use this tool if I did want to make this kind of business card. But looking at the UI, this is all stuff that would be pretty easy to make responsive, and would work fairly well on mobile. It's a bit of a shame to add an arbitrary limitation like this.

MrJohz commented on "Remove mentions of XSLT from the html spec"   github.com/whatwg/html/pu... · Posted by u/troupo
LegionMammal978 · 6 days ago
> Sure, but this requires [...] maintaining it indefinitely.

Does it, though? Browsers already have existing XSLT stacks, which have somehow gotten by practically unmodified for the last 20 years. The basic XSLT 1.0 functionality never changes, and the links between the XSLT code and the rest of the codebase rarely change, so I find it hard to believe that slapping it into a sandbox would suddenly turn it into a persistent time sink.

MrJohz · 5 days ago
Wasn't this whole discussion sparked by a fairly significant bug in the libxslt implementation? There's also a comment from a Chrome developer somewhere in this thread talking about regularly trying to fix things in libxslt, and how difficult that was because of how the library is structured.

So it is currently a persistent time sync, and rewriting it so that it can sit inside the browser sandbox will probably add a significant amount of work in its own right. If that's work that nobody wants to do, then it's difficult to see what your solution actually is.

MrJohz commented on "Remove mentions of XSLT from the html spec"   github.com/whatwg/html/pu... · Posted by u/troupo
LegionMammal978 · 6 days ago
> It is a balance (compatibility vs attach surfaces).

What I'm trying to say is that it's a false dichotomy in most cases: implementations could almost eliminate the attack surface while maintaining the same functionality, and without devoting any more ongoing effort. Such as, for instance, JS polyfills, or WASM blobs, which could be subjected to the usual security boundaries no matter how bug-ridden and ill-maintained they are internally.

But removing the functionality is often seen as the more expedient option, and so that's what gets picked.

MrJohz · 6 days ago
Sure, but this requires someone sitting down and writing the JS polyfill, and then maintaining it indefinitely. And for something as complicated as XSLT, that will surely be indefinite maintenance, because complicated specs beget complicated implementations.

In the absence of anyone raring to do that, removal seems the more sensible option.

MrJohz commented on Why Nim?   undefined.pyfy.ch/why-nim... · Posted by u/TheWiggles
mixmastamyk · 7 days ago
Select-lines-(shift)-tab when needed is quite easy. Often that’s not needed either because moving from one function to another is the same level.

The benefit is not having to constantly read/write delimiters. Imagine a shell where all arguments had to be delimited by , or | chars instead of whitespace.

MrJohz · 7 days ago
It's harder when the source or the destination isn't all indented in quite the same way, which happens often if you start a block, press enter and end up on an indented line, and then paste the code.

I don't really get the readability argument - like the lisper I was replying to said, it's all much of a muchness. A shell where arguments are delimited by commas is a function call in most programming languages, and people don't struggle with readability there. If anything, I find having an explicit "close block" symbol a useful visual marker on the page, but I write Python fairly regularly and don't really notice much readability differences compared to any of the brace-using languages I work with.

MrJohz commented on Why Nim?   undefined.pyfy.ch/why-nim... · Posted by u/TheWiggles
zahlman · 7 days ago
> Every time I pause, I press ctrl-S or an equivalent.

I use Vim, so that would be really unnatural and disruptive.

MrJohz · 7 days ago
I actually use Helix so I don't use that either, but I figured ctrl-S would be the more well-known shortcut for communicative purposes.
MrJohz commented on Why Nim?   undefined.pyfy.ch/why-nim... · Posted by u/TheWiggles
zahlman · 7 days ago
> Most people who write code in these languages rely on them!

I find that a little hard to believe. There is a universe of programmers out there who are basically invisible to you.

> I just don't think about it. I write my code in whatever way is easiest to type - including letting the editor auto-insert closing braces - and then hit save to format.

Don't you want to see neatly formatted code while you're writing it?

MrJohz · 7 days ago
For Go, they have a statistic from a few years back that suggests about 98% of a cross section of real-world Go projects are formatted according to gofmt. (https://jmoiron.net/blog/fmty-dmpty) I can believe Rustfmt and other tools not having quite the same reach, but I would guess that the proportion is still pretty high.

These tools are very standard and very widely used.

> Don't you want to see neatly formatted code while you're writing it?

Every time I pause, I press ctrl-S or an equivalent. So I really am seeing neatly formatted code while I'm writing it. I would guess that 90% of the time, if my code is syntactically valid, it's also neatly formatted. And even if it's not valid code, it's probably very close to being neatly formatted.

MrJohz commented on Why Nim?   undefined.pyfy.ch/why-nim... · Posted by u/TheWiggles
HiPhish · 8 days ago
I could never understand why people care this much about significant whitespace of all things. This seems like such a non-issue, it should be a minor annoyance at worst. Then again my favorite language is Lisp, so maybe I'm just too much beyond caring about syntax. The only annoying thing about significant whitespace is having to escape a new line sometimes.

But significant whitespace has always made sense to me. You are going to indent your code anyway, so you might as well give the indentation some meaning. I write Python, JavaScript and Lua most of the time, and I never waste any thought on whitespace VS braces VS keyword delimiters.

MrJohz · 7 days ago
The biggest advantage if you can avoid significant whitespace is that it's usually a lot easier to manipulate text if you don't have to worry about the whitespace being correct. For example, when I'm copying and pasting Javascript code from somewhere else into a file, I don't need to worry about getting the indentation right, I just paste it into the right location, press format, and it does what I want. This is often nontrivial in Python, where both the source and the destination may have existing (invisible) whitespace. Worse, leading whitespace characters are often trimmed on copy or select, which often makes the resulting paste even more chaotic.

This is a minor inconvenience, and I still use Python regularly when it makes sense, but from a language design perspective, I think it's one of those decisions that makes your users' lives that slight bit harder with no real upside.

u/MrJohz

KarmaCake day2382February 14, 2022
About
https://jonathan-frere.com/

I write software and haven't come up with a great bio description yet.

View Original