News for hackers. Stuff that matters.
Re:MDN converted to Markdown by swyx on Saturday November 05, 2022 @02:19AM (#33478500)
Markdown is "worse is better". AsciiDoc is more powerful, but has a steeper learning curve, therefore it lost.

tale as old as tech.

Re:MDN converted to Markdown by nerdponx on Saturday November 05, 2022 @02:46AM (#33478643)
> has a steeper learning curve

Does it?

I think Markdown "won" for a variety of reasons (Github? Slack? Pandoc?). I don't think AsciiDoc is so much more complicated than Markdown that people can't learn it quickly.

The reason Markdown is now standard is that people like standardized things. They want to use the same syntax in their chatroom, forum, ad-hoc readme filed, and doc comments in code. And if they're already using one markup language, why learn another? Why not use the same one everywhere?

It's not that AsciiDoc is complicated in general, it's that it's ever so slightly too rigid for "ad-hoc" markup in places like Discord and Hacker News. Thus people end up learning Markdown because it really is the best fit for those platforms, and then people don't want to learn another markup language, and so you get a snowball effect of implementation support and popularity. And thus we are stuck with Markdown everywhere.

This isn't necessarily a bad outcome. But that's how I see it. I still want AsciiDoc to gain more traction in technical writing!

Re:MDN converted to Markdown by smashed on Saturday November 05, 2022 @03:20AM (#33478808)
I think you are on the right track but may be over estimating the "average" internet user capabilities?

I had to migrate a couple of projects from awful, big ridden, wysiwyg editors to markdown and it's a huge challenge. Many people expect everything to work just as Ms Office/word does. Anything behaving in any way different than their benchmark is wrong..

Now, going from such a mindset to Markdown is a huge endeavour. You need to re-educate your user. Many will never appreciate the raw, code-like nature of markdown and will dread it the entire time they have to endure it.

Re:MDN converted to Markdown by andylynch on Saturday November 05, 2022 @06:05AM (#33479858)
I really don’t get the push for markdown etc over WYSIWYG for everyday people. The _very first_ web browser was also an GUI editor, and then you already had proper rich text editors since at least the Macintosh. Why should users not expect something as basic as formatting text to follow UI conventions established through what’s now forty-odd years of use by billions or people? It is akin to asking them not to complain when swapping a steering wheel for something like the tiller on 1880s cars.
Re:MDN converted to Markdown by rjsw on Saturday November 05, 2022 @01:51PM (#33483806)
Markdown works better in a VCS than WYSIWYG formats.
Re:MDN converted to Markdown by samus on Saturday November 05, 2022 @04:44PM (#33485491)
Technical users are an important user segment as well, especially those used to advanced text editors and IDEs. They don't have the patience to conform to the changing and often poorly thought-through user interfaces of text processors and want the flexibility to use more powerful tools if required.

Do it like JIRA: give them both. People used to GUIs can use the WYSIWYG interface, and power users can use Markdown.

Re:MDN converted to Markdown by Marta_B on Monday November 07, 2022 @10:18AM (#33506881)
CKEditor also gives that option – where you can type in Markdown if you prefer that over the rich-text UI. So both sides can be happy.
Re:MDN converted to Markdown by xigoi on Saturday November 05, 2022 @06:18AM (#33479947)
> The reason Markdown is now standard is that people like standardized things.

Can you think of anything less standardized than Markdown?

Re:MDN converted to Markdown by nullfield on Saturday November 05, 2022 @06:37AM (#33480091)
Without answering the question, it was the wrong answer, unambiguously and definitively.

No, I don’t have to have the correct, best answer to get this.

Re:MDN converted to Markdown by rrwo on Saturday November 05, 2022 @08:07AM (#33480674)
Markdown is appealing because you can read a markdown document without knowing markdown. It's intended to make sense on it's own.
Re:MDN converted to Markdown by whoibrar on Saturday November 05, 2022 @08:49AM (#33480909)
I agree with this. Reddit and Discord both use markdown and I've been using it for ages without ever knowing it's called Markdown.

I just thought it's a neat trick you can apply italics by underscore and make text stand out with back ticks around.

Even least technical people using bold/italics/indent on WhatsApp are using markdown in a way.

Re:MDN converted to Markdown by pantojax45 on Saturday November 05, 2022 @10:24AM (#33481754)
The bold/italics/indent syntax predates markdown. Markdown is great but the “*” / “_” / “>” were all in use before it (see Usenet emails for example)
Re:MDN converted to Markdown by rhaway84773 on Sunday November 06, 2022 @01:20AM (#33489747)
Well, that’s why Markdown was popular. It took existing conventions, codified them, and more importantly, crested a tool to convert them to HTML.

At its core, Markdown was little more than a perl script that converted a human readable doc written using many online conventions into HTML.

Others realized this was a brilliant idea and created their own supersets and/or alternatives of markdown. That’s why there’s so many flavors of markdown with little tweaks.

And that’s why Markdown is popular. Because it took advantage of convention built out of years of trial and error.

Re:MDN converted to Markdown by thayne on Saturday November 05, 2022 @10:48AM (#33481985)
The same is largely true of asciidoc. There are cases where you do kind of need to understand asciidoc, but mostly for features where in markdown you have to reach for the escape hatch of inline html.
Re:MDN converted to Markdown by thayne on Saturday November 05, 2022 @11:24AM (#33482330)
I think it has a higher learning curve if you include everything in the language, because asciidoc has so many more features than markdown. But if you limit asciidoc to the subset that is comparable to markdown, I don't think it has a higher learning curve.
Re:MDN converted to Markdown by nvrspyx on Saturday November 05, 2022 @02:30PM (#33484238)
In fact, most of markdown is compatible with asciidoc. The markdown syntax for headings, monospace, quotes, lists, code blocks, and section breaks all work.
Re:MDN converted to Markdown by gherkinnn on Saturday November 05, 2022 @04:05AM (#33479067)
- Javascript vs *

- English vs *

Both awful languages in many ways. And yet, here we are. Also who the fuck wants to speak Esperanto?

In some cases I don’t think it’s “worse is better”, much as “the flexible beats the over-designed ivory tower”.

Another way of looking at it is “capabilities matter, vulnerabilities don’t”.

Think of a river carving its way through a valley. It is terribly undesigned and messy but it flows exactly where it had to.

Re:MDN converted to Markdown by tgv on Saturday November 05, 2022 @05:17AM (#33479535)
English isn't a bad language; its spelling is highly inconsistent, but for the rest it's simpler than most other languages.

The only advantage Esperanto has is that it doesn't give (much of) an advantage to pre-existing native speakers. For the rest, it's perhaps even harder to learn than English, and --when hypothetically adopted on a large scale-- will develop into regional dialects.

Re:MDN converted to Markdown by iopq on Saturday November 05, 2022 @05:49AM (#33479748)
Spanish spelling is better, pronunciation is easier (no th, only 5 vowels, etc.), native speakers almost as numerable, allows you to understand Portuguese, Italian, etc.

It wasn't chosen, America just won

Re:MDN converted to Markdown by tgv on Saturday November 05, 2022 @07:13AM (#33480338)
Spanish orthography is pretty regular, but then you have 42 inflections per verb for three different patterns, and the most important verbs are of course highly irregular. Not to mention the fact that the difference between ser and estar isn't easy to learn. And there are a few more things that are hard (limiting to pronunciation: the guttural j/g, and the rr; counting syllables is a recurring question in quizzes).

> It wasn't chosen, America just won

That doesn't make English a bad language. Perhaps America (I guess you're referring to the USA) won because of English is so easy.

But cultural, financial and political influence obviously count.

Re:MDN converted to Markdown by samus on Saturday November 05, 2022 @04:55PM (#33485620)
Before English, French was the international language of diplomacy, and it was very influental in science and humanities. Spoken French is as simple as Spanish at a glance. The writing system is peculiar, but still much more regular than the English one.
Re:MDN converted to Markdown by salmo on Saturday November 05, 2022 @08:50AM (#33480918)
I think an appealing thing about English is the ridiculous vocabulary. When it doesn’t have a word, it just steals one from another language. We have a French-based word that’s a “fancy” way to say an English-based synonym from the court vs common language situation with the Normans. Then borrowed liberally from Greek and Latin during the enlightenment, and every other language when colonialism kicked in (including a lot of botched Spanish). That constant borrowing is partly why our spelling is insane.

Oh and add to the insanity that we’ll borrow the same French word twice, frozen in each time.

It’s fascinating to see the language evolve through eg India. It’s a secondary language that fills a gap to provide a commonly understood language in a region with massive linguistic diversity. But then it’s developed it’s own regionalisms that are bleeding back into regions where it is the primary language.

It’s kind of like shell scripting to me. It started simple, got random useful things tacked on over time. You can’t formally define it, but it’s pragmatically powerful. And there aren’t real rules despite people trying so hard over the years, just conventions that shift and change. And often the “rule makers” just make things more complicated in the end with only some of it sticking.

I highly recommend the English History Podcast for anyone interested.

Re:MDN converted to Markdown by bee_rider on Saturday November 05, 2022 @03:22PM (#33484705)
There's also the budding euro-English, which is kinda funny because it is to some extent the revenge of all the words we've stolen from other European languages and then slowly turned into false-friends.

https://en.wikipedia.org/wiki/Euro_English#Vocabulary

Anyway as an American I'm always in favor of just giving our language away to anyone to do whatever they want with it, really just go nuts, especially -- throw some z's in there, they really add some pizzazz to the language. (Just ignore the British, they will try to get you to change them back to s's... but you can see what that does to the pizzazz!).

Re:MDN converted to Markdown by salmo on Saturday November 05, 2022 @09:08PM (#33487679)
Totally agree. I love that it’s the gumbo of languages. Throw whatever you want in there. I’m down.

And as an American I reject the British pronunciation of “herb” and “lieutenant.”

Re:MDN converted to Markdown by rhaway84773 on Sunday November 06, 2022 @01:25AM (#33489778)
Every language steals words from other languages. Heck, eastern Asian languages have stolen an entire script from English (pinyin).

There’s nothing unique about English in this regard.

Re:MDN converted to Markdown by salmo on Monday November 07, 2022 @09:23AM (#33506106)
The stealing isn’t unique for sure. But most of the vocabulary in our language is borrowed words. Mostly just the “sight words” kids learn in early school is what remains of Old English. And many English words are the rougher equivalent of a borrowed, nicer words.

Most languages were pretty calcified by Old or Middle English, and English doesn’t seem to be letting up. But no language is static.

But with tech and mass communication, English is squeezing into many languages.

Pinyin is kind of weird. It’s not borrowing concepts, but lending itself to translation in and out. Based off prior western attempts and observation of Japanese success. Typesetting is more practical, and then computers really push it… the latter I feel awkward about. 1/2 is the typesetting benefit, 1/2 is eurocentrism. I dunno. Maybe I’m overthinking.

The vocabulary is more interesting to me because it’s importing ideas or nuances around ideas. It’s primarily nouns, though.

Learning other languages is great to see the world differently. Even in just French, which is fairly close: eg faire doesn’t have a real English equivalent, but makes total sense. It’s like how I learn programming languages I’ll never use for work, just to see things from their perspective.

I don’t know enough about Asian languages. Working on fleshing out my history knowledge now from Asian perspectives vs what I got in school. Maybe one day I’ll be brave enough to address a language.

Re:MDN converted to Markdown by hombre_fatal on Saturday November 05, 2022 @11:26AM (#33482357)
Spanish has its own obstacles. Like all the conjugations and the subjunctive. Or how verbose it is.

Meanwhile compare it to English tense grammar like I did run, I do run, I will run.

I don’t think technical language comparisons are all that enlightening about which one is “best”.

Re:MDN converted to Markdown by iopq on Saturday November 05, 2022 @01:14PM (#33483391)
I have been running, I had been running, I will have had run, I would have had been running

English has a large amount of tenses as well, and if I were you I wouldn't discount the English subjunctive either

Re:MDN converted to Markdown by klodolph on Saturday November 05, 2022 @03:11PM (#33484627)
"I will have had run" and "I would have had been running" are not sensible. Perfect tenses indicate completion. If you try to "stack" two copies the auxiliary verb "have" to make some kind of double-perfect tense, it doesn't make any sense--it makes no more sense than saying "I wented to the store" or "I ated the food." There are reasons you can have utterances like "had had" in English, but it typically involves the other meaning of the word "have" (the non-auxiliary meaning), like "I had had steak, and James had had lasagna, but we both were still hungry."

Subjunctive may be interesting to analyze, but it's not an additional form of the word.

By my count, English has 12 tenses. You cannot just invent new ones, because people won't be able to understand you. They are fairly regular: present, past, and future, which can be modified by making them perfect, continuous, or both.

Re:MDN converted to Markdown by iopq on Sunday November 06, 2022 @01:21AM (#33489328)
"By next month I will have had run 50 km" - is there a BETTER way to say this sentence? It refers to the past from the prism of next month, but also RELATES it to that point in time

"If I had continued boxing professionally, I would have been running 50 km a week" Here's it's a conditional, I think I stuck an extra had in there by accident.

By my English textbook there's 16 tenses, 4x4

Past, present, future, future-in-the-past (would) x Simple, continuous, perfect, continuous-perfect (have been V-ing)

Point being, English grammar is far from simple, as this conversation clearly demonstrated

Re:MDN converted to Markdown by klodolph on Sunday November 06, 2022 @01:48AM (#33489539)
> "By next month I will have had run 50 km" - is there a BETTER way to say this sentence?

By next month, I will have run 50km. This means that "I run 50km" completes first, and then next month arrives afterwards.

> By my English textbook there's 16 tenses, 4x4

Depends on how you count tenses. Different textbooks will give different counts, depending on what is considered a "tense". Which is not a reflection of the complexity of English, but a reflection of how hard it is to come up with definitions for terms in linguistics. "Would" is often not counted as a tense, but it may be counted as a tense, particularly if you are explaining English to speakers of a language which have a tense expressing something similar.

> Point being, English grammar is far from simple, as this conversation clearly demonstrated

Most languages are far from simple, I don't think English deserves special attention.

Re:MDN converted to Markdown by tgv on Sunday November 06, 2022 @10:45AM (#33493793)
Spanish has a similar amount of tenses, some expressed in inflections, others through auxiliary verbs. Spanish doesn't have the obsession with the gerund ("I go home" is fine), but has (im)perfect past, plusquam perfect, and future tenses, combinations (no habría pensado: wouldn't have thought) and conditionals in all, just like English. They just don't correspond 1-1.

The subjunctive in English is a bit of joke in comparison to the Spanish one.

Re:MDN converted to Markdown by hombre_fatal on Sunday November 06, 2022 @10:53AM (#33493860)
I'm not saying English has no nuance beyond my example.

But this relatively simple grammar is English's strength. Consider how you translate your examples into other languages, especially the future hypotheticals that aren't a trivial concept to communicate period yet the rules for producing them are still simple in English.

Re:MDN converted to Markdown by samus on Saturday November 05, 2022 @04:52PM (#33485573)
Spanish (at least some European variants) definitely has the "th-sounds" though. But similarly to English, it's not terribly important to get them right. The variants spoken in South America use sibilants instead.
Re:MDN converted to Markdown by iopq on Sunday November 06, 2022 @01:24AM (#33489346)
Oh yeah, I studied Latin American Spanish so I did forget that Spaniards do have these sounds. But the vowel number is clearly smaller. The hardest sound is probably the "rr" rolling r

In English it's probably distinguishing between a number of vowels like BAD/BED or PULL/POOL, and words like STRENGTH that really test the limits of Mandarin speakers

Re:MDN converted to Markdown by rrwo on Saturday November 05, 2022 @08:04AM (#33480664)
English has inconsistent spelling and pronunciation because it is a pigeon language, a mix of various Anglo-Saxon, Norse, Celtic, Dutch, and Norman French, then later with a lot of Latin and Greek words added.

The grammar is simpler (no gender and fewer inflections), but it has more phonemes than most other Indo-European languages, and has one of the largest vocabularies.

Re:MDN converted to Markdown by jcranmer on Saturday November 05, 2022 @08:55AM (#33480951)
The word you're looking for is "pidgin" language, not "pigeon," but no, English is not a pidgin language. An example of a pidgin language is something like Tok Pisin. Pidgin languages essentially start out life as a not-quite-language, with such restricted vocabulary and grammar that there are concepts that can't be uttered, and such languages tend to grow back a grammar on top of that as they develop into a full, proper language.

English is not a pidgin language because the grammar is very clearly identifiable as a Germanic language (albeit a clearly simplified form), but with substantial lexical borrowings from other languages. Grammatical simplification and lexical borrowing is not particularly unusual in language development--in fact, English may not even be the biggest offender in these departments (I believe Turkic languages borrowed more from Mongolian languages than English has from Romance languages).

Re:MDN converted to Markdown by radarsat1 on Saturday November 05, 2022 @11:16AM (#33482266)
I'm curious, given the proximity of England to the Celtic world, why did English not borrow more from Gaelic? Hopefully it's not a stupid question, I realize that the language probably largely developed in Saxony, but I don't know much about how it made its way to the British isles.
Re:MDN converted to Markdown by jcranmer on Saturday November 05, 2022 @01:00PM (#33483272)
There is a lot that is not clear about the Anglo-Saxon migration to Britain. The obvious archaeological evidence suggests a very abrupt shock that sees Roman Britain almost completely replaced by Anglo-Saxon migration in maybe a generation or two. This has traditionally been interpreted as effectively a complete population replacement, although this has been challenged in more recent archaeology.

Probably, I would say, the big reason for the lack of Celtic borrowings into English is the fact that, to whatever degree there was admixture between Celtic and Anglo-Saxon populations, English would have been the prestige language, and the prestige language tends to be little affected by borrowings compared to the non-prestige language. You see this with French borrowings: French was the prestige language of England for about 400 years or so, so English starts borrowing all sorts of things from French, but not vice versa. The existence of the Danelaw region--a part of England that was primarily Danish rather than English even when largely ruled by the English--provided a substantial contact region for Old English/Old Norse borrowing, which was helped by the very similar nature of the two languages.

Re:MDN converted to Markdown by radarsat1 on Saturday November 05, 2022 @02:25PM (#33484173)
Super interesting thanks, I'll have to read up on the Danelaw, first time I've heard of that!
Re:MDN converted to Markdown by mtts on Saturday November 05, 2022 @02:40PM (#33484329)
If I’m not mistaken the latest research on this topic incorporates the results of DNA studies that seem to suggest there was indeed a population replacement (made possible in part by the very large number of the Anglo-Saxon immigrants and the very much reduced, as a result of the upheavals after the departure of the Romans, number of Britons).

The linguistic evidence has always suggested complete replacement. Even with the prestige language of invaders taking over you would expect some geographical names, especially for small, insignificant and / or out of the way features to persist and yet in England there is pretty much not a single place name that has Celtic origins (outside of Cornwall of course)

Re:MDN converted to Markdown by rrwo on Sunday November 06, 2022 @05:40AM (#33491188)
There are a few placenames of Celtic origin, for example, Kilburn.
Re:MDN converted to Markdown by rhaway84773 on Sunday November 06, 2022 @01:24AM (#33489771)
The success of English is not the result of a “worse is better” situation. It’s the result of the fact that the English colonialists much of the world and then after colonialism ended and the world became more global through trade and communications, the biggest economy in the world with the biggest media industry in the history of the world spoke English.
Re:MDN converted to Markdown by nix23 on Saturday November 05, 2022 @04:58AM (#33479411)
>AC beat DC

Well that's not true, especially not in a data-center. It's just better for general long-distance energy transfer.

Re:MDN converted to Markdown by iamtedd on Saturday November 05, 2022 @05:09AM (#33479484)
In what way is DC better than AC?

To my knowledge AC rightfully won - much easier to transport over long distances, whereas DC required a generator nearly on every city block (among other reasons).

Re:MDN converted to Markdown by silvestrov on Saturday November 05, 2022 @06:08AM (#33479877)
From Wikipedia:

> High-voltage direct current (HVDC) is used to transmit large amounts of power over long distances or for interconnections between asynchronous grids. When electrical energy is to be transmitted over very long distances, the power lost in AC transmission becomes appreciable and it is less expensive to use direct current instead of alternating current. For a very long transmission line, these lower losses (and reduced construction cost of a DC line) can offset the additional cost of the required converter stations at each end.

https://en.wikipedia.org/wiki/Electric_power_transmission#Hi...

Re:MDN converted to Markdown by pletnes on Saturday November 05, 2022 @06:17AM (#33479933)
AC voltage can be changed up/down cheaply by making a couple of (relatively) simple wire coils. Also AC engines are simple, compact and reliable. Recall that the choice of AC was also taken over 100 years ago, before any electronics were around.
Re:MDN converted to Markdown by mananaysiempre on Saturday November 05, 2022 @07:08AM (#33480299)
AC is easy to change the voltage of with 20th-century tech (though, to be fair, high-power 21st-century tech for DC amounts to “convert to AC, change that, filter it back” with some—crucial—improvements), so it works reasonably well over moderate distances at moderate power if you shift down as late as possible, but it’s absolutely awful for transporting large quantities of energy over long distances, because of the skin effect.

Essentially, thick round wires are useless for AC because the current gets expelled to a thin layer on the surface (determined by the frequency and the properties of the material, roughly independent of how much you were trying to cram in there), thus the resistance goes down as the radius rather than the cross-sectional area, and you end up using absolutely asinine amounts of (nowadays very expensive) copper or (kind of expensive) aluminium in high-voltage lines. (Using flat buses instead of wires does work, but then sharp edges mean you get a lot more current leaking into the air.)

If you don’t have high-power semiconductor components you can use to convert to AC and back in order to shift voltages or to just convert to AC to power industrial motors, you will have to grit your teeth and bear it—it seems that mechanical motor-generators are simply too unreliable. But for the last twenty or so years we’ve had them, and I understand that people are once again looking seriously at high-voltage DC. Of course, grids are huge and expensive, so it may be some time until implementations become widespread.

I don’t think any of this counts as an instance of worse is better, though,—it’s just that the ease of building alternators changed dramatically over the last few decades.

Re:MDN converted to Markdown by javajosh on Saturday November 05, 2022 @09:09AM (#33481074)
>you end up using absolutely asinine amounts of (nowadays very expensive) copper or (kind of expensive) aluminium in high-voltage lines

I assume there's some reason big hollow wires don't work.

Re:MDN converted to Markdown by tekchip on Saturday November 05, 2022 @10:14AM (#33481658)
>I assume there's some reason big hollow wires don't work.

So pipes then. The internet really would have been a series of tubes. ;-)

Re:MDN converted to Markdown by mananaysiempre on Saturday November 05, 2022 @05:23PM (#33485950)
s/alternators/inverters/, d’oh.
Re:MDN converted to Markdown by chaosite on Saturday November 05, 2022 @07:13AM (#33480333)
And of course, AC didn't beat DC. DC is still widely used, for example in whatever device you're using to post this comment.
Re:MDN converted to Markdown by colejohnson66 on Saturday November 05, 2022 @12:14PM (#33482844)
AC is also used, in a sense, through every switching power supply. The phone you’re using that’s running on DC is actually taking the DC from battery, converting it to “AC” to buck it to the lower voltage, then rectifying it back to DC for the processors.

Wall outlet switchers are also the same. The incoming 120V AC is rectified and smoothed to 170V DC (240V AC goes to ~335V DC) before being chopped up back to AC to lower the voltage. After, it’s rectified and smoothed to the desired voltage. The USB outlet does that to 5V, your phone takes that down to 3.7V, then takes that battery voltage down even lower (1V or whatever)

Basically, AC is used everywhere DC is. People just don’t realize it. Everything runs on DC, but requires AC to change voltages.

Re:MDN converted to Markdown by nimish on Saturday November 05, 2022 @08:40AM (#33480848)
AC has to deal with reactance and those associated losses in addition to resistance. AC resistance goes up with frequency because of the skin effect too.

This matters for underwater lines especially.

Re:MDN converted to Markdown by kragen on Saturday November 05, 2022 @02:32PM (#33484259)
DC needs a substantially higher voltage to kill you than AC. You can hold 100VDC wires in your fingers and be fine, though if you try this, I strongly recommend doing it with the other hand in your pocket and no path to ground, in case your hand is sweatier than average.

The lower danger of transmission lines is less important once you're committed to stepping voltages up and down, because HVDC transmission lines can still kill you, and there's no real reason we couldn't be using 48VAC inside our houses instead of 120VAC or 240VAC, which would be a lot safer. Historically, though, AC came as a package with transformers and higher-voltage transmission/distribution to substations, and without such super low voltages in houses.

You're exaggerating the technical advantage of AC by a couple of orders of magnitude; you can reasonably transmit 100VDC power about a kilometer, and Edison did, so it's a generator on every 314 city blocks or so.

Re:MDN converted to Markdown by xdfgh1112 on Saturday November 05, 2022 @05:10AM (#33479491)
PHP
Re:MDN converted to Markdown by Lvl999Noob on Saturday November 05, 2022 @06:04AM (#33479853)
Isn't typescript better than flow? In what ways is flow better?
Re:MDN converted to Markdown by 0xfffafaCrash on Saturday November 05, 2022 @06:19AM (#33479952)
Yeah, TS isn’t just better than Flow. It’s vastly better in almost any way one can think of.

One of the few cases where the answer isn’t even “it depends.” I have to imagine swyx is either trolling here or has some very special contrarian opinion to almost anyone who has used these two technologies.

Re:MDN converted to Markdown by xwx on Saturday November 05, 2022 @07:35AM (#33480486)
The main advantage Flow has over Typescript is soundness. Neither language is sound, but Flow tries a bit harder, and so there are fewer cases where you write bugs that 'should' be caught by the type checker.

Here are a few examples of unsoundness in TS: https://www.typescriptlang.org/play?strictFunctionTypes=fals...

https://flow.org/en/docs/lang/types-and-expressions/#toc-sou...

Re:MDN converted to Markdown by sequoia on Saturday November 05, 2022 @10:09AM (#33481619)
Flow is not better than typescript. People who say it’s “better”, what they mean is it’s more strict, which really means more rigid. The rigidity is a complete pain in the ass that’s not well suited to web UI development and leads to all kinds of convolution.

To take one example: I use a Graphql to flow type generator for query fragment. That tool generates inexact types. So I’ll end up with an array of values of this type from a Graphql query, data objects with 10 keys for example.

Then I want to pass this to a charting library, but I need to add a “color” property to each data object for the charting library. This is not possible with flow. My options are:

- create a new type with color property and spread the existing type: this is not possible because the existing type is inexact and I have no way to convince flow it doesn’t already have a color property

- just add a color property: this won’t work because I get a flow error later when I try to read the property, plus I don’t get the type check I’d like

- create a new type plucking every other field from the existing type 1x1, then create a mapping function moving every property to the new type 1x1

- use $FlowFixMe to disable type checking altogether

The only options that work are the last two, and they either break typing altogether or require dozens of additional lines of code that serve no purpose but satisfying Flow. And or course you need a comment to explain why the hell you’re mapping properties over one by one.

I don’t need a type system that’s this “correct.” I’m not writing mathematical proofs, I’m writing web UIs, and this level of rigidity just gets in the way and leads to weird, overly verbose code.

Re:MDN converted to Markdown by juliendorra on Saturday November 05, 2022 @06:21AM (#33479961)
Love the idea of the list, the intro sets the context very nicely! Some suggestions: - HTML is a worse hypertext system (no typed links, no transclusion, no native index or versioning) and beat all the previous professional but centralized hypertext systems in just 3 years. It’s worse than HyperCard on the symmetrical authoring and viewing side, too. - json, from an historical perspective is really a worse xml (xml can serialize a much wider range of data structures and relationships, including circular ones, can be validated by schemas, etc.). But simpler to read, write and reason about. It limits ended up biting devs and it was extended in various, non standards ways
Re:MDN converted to Markdown by swyx on Saturday November 05, 2022 @05:40PM (#33486119)
thanks for the contributions!
Re:MDN converted to Markdown by gryn on Saturday November 05, 2022 @06:48AM (#33480178)
angular ? really ??? in what way is it better ?

I've used vue, angular, and react in different projects and honestly I'd take react with hooks every single time If I had the choice.

Re:MDN converted to Markdown by NoboruWataya on Saturday November 05, 2022 @07:31AM (#33480450)
> AsciiDoc is more powerful, but has a steeper learning curve

How does this make it better? Sounds like it makes it worse.

Maybe a better summation is "less is more".

Re:MDN converted to Markdown by remram on Saturday November 05, 2022 @11:42AM (#33482537)
GP seems to be using a definition of "better" that doesn't include difficulty. I agree that it's a bad decision when evaluating a markup language used in so many contexts as Markdown.
Re:MDN converted to Markdown by swyx on Saturday November 05, 2022 @05:42PM (#33486139)
literally just referencing richard gabriel’s use of the word thats all. each side has genuine champions but usually one side is more purist (however defined) than the other and they lose 80% of the time
Re:MDN converted to Markdown by talkingtab on Saturday November 05, 2022 @08:38AM (#33480840)
"Worse is better" is always true if you choose the criteria carefully. For example it is always worse to eat food because it might be poisonous. Markdown certainly has limitations, but it more people know it and people can and do use it.

More "powerful" is a good criteria, unless you have to pay the price.

I applaud the decision and the work by the authors. It worked.

Re:MDN converted to Markdown by photochemsyn on Saturday November 05, 2022 @10:23AM (#33481746)
As far as MDN Web Docs, what about variable declaration, i.e. deprecating the JS var in favor of let and const, universally? var has some weird behavior (hoisting) and it seems (no expert here) that only using let and const in code has many benefits. Is it historical inertia, backwards compatibility, preference?
Re:MDN converted to Markdown by wbamberg on Saturday November 05, 2022 @02:33PM (#33484273)
I'm not sure exactly what you're asking about, but if it's our use of `var` in code examples, we had a big project this summer to eradicate `var` in favour of `const` and `let`.

This started out as a project for the Writing Day at the Write the Docs Portland conference (https://openwebdocs.org/content/posts/writing-day-wtd-portla...). It then continued as a much bigger thing: https://openwebdocs.org/content/posts/2022-q3-report/#modern.... Much of the work was done by volunteers, and it's a great example of the kind of project that I don't think would have been possible back when MDN content was in a Wiki.

If you're asking about whether we should un-recommend `var` more strongly: looking at the page for `var` (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...) - well, maybe you are right...

Re:MDN converted to Markdown by appleflaxen on Saturday November 05, 2022 @11:01AM (#33482120)
I thought

Linux vs BSD

and

C vs Lisp

were traditional examples of this.

Re:MDN converted to Markdown by mdaniel on Saturday November 05, 2022 @12:55PM (#33483222)
> C vs Lisp

I wish there was a statically typed functional language on the right hand side, because `(defun take-action (thing) (format "ohgawd what type is thing?!"))` is for sure less powerful than `int take_action(struct foo *thing);`

Re:MDN converted to Markdown by sicp-enjoyer on Saturday November 05, 2022 @03:44PM (#33484878)
Also C vs pascal and ada.
Re:MDN converted to Markdown by radarsat1 on Saturday November 05, 2022 @11:09AM (#33482199)
what was the deal with Betamax though? was VHS actually easier or have any advantages, or did it just win due to marketing? (honest curiosity here, i don't know the technicalities)
Re:MDN converted to Markdown by urban_alien on Saturday November 05, 2022 @11:31AM (#33482411)
The porn industry adopted VHS and managed to make it the standard, basically
Re:MDN converted to Markdown by sli on Saturday November 05, 2022 @02:32PM (#33484253)
This is a myth. Porn was available on Beta and far more non-porn VHS tapes were being sold than porn. Porn only made up a small fraction of VHS sales. Even the idea that Beta was strictly better than VHS is mostly modern myth.
Re:MDN converted to Markdown by Karunamon on Saturday November 05, 2022 @12:04PM (#33482744)
One benefit I heard called out was that early Betamax capped the tape capacity to one hour, which meant you couldn't record things like full sports games and quite a few movies. Sony didn't change this until VHS came along with its slower tape speeds and more recording time, and by then it was too late.

Also, VHS was cheaper, and while Betamax was technically inferior, it wasn't inferior in a way that the average buyer would notice.

Re:MDN converted to Markdown by radarsat1 on Saturday November 05, 2022 @02:22PM (#33484154)
interesting thanks!
Re:MDN converted to Markdown by developerDan on Saturday November 05, 2022 @01:09PM (#33483339)
HDMI beat DP, it’s one that will always bug me.
Re:MDN converted to Markdown by swyx on Saturday November 05, 2022 @05:40PM (#33486124)
good suggestion ! why does it bug you?
Re:MDN converted to Markdown by bee_rider on Saturday November 05, 2022 @03:09PM (#33484604)
- Markdown vs LaTeX

- HTML vs LaTeX (ok maybe I'm being a bit silly)