Yes, I program in HTML

392 points · 38 comments · view on lemmy.world

38 Comments

squaresinger@feddit.de · 75 pts · 2y (8 replies)

I recently had to work with XSLT (may it's inventor burn in hell for their crimes).

That's pretty much programming in XML. It's probably the worst possible thing.

LukeChriswalker@feddit.de · 30 pts · 2y (2 replies)

XSLT is fine

If you have a program generate it

squaresinger@feddit.de · 24 pts · 2y

Sadly, it was done manually. I had to migrate it to this brand new bleeding edge technology, Apache Velocity. That's not great either, but it's much less terrible than XSLT.

For that task I had to learn two templating languages at the same time to port it from one to the other. Wasn't an easy task.

aksdb@feddit.de · 2 pts · 2y

Pff. I know someone who generated programs using XSLT.

GigglyBobble@kbin.social · 8 pts · 2y (2 replies)

Can't even imagine. I've got fed up by the short time I had to configure Maven in plain xml...

shasta@lemm.ee · 2 pts · 2y (1 reply)

Is there another way?

squaresinger@feddit.de · 1 pts · 2y

Yes, there is: https://github.com/takari/polyglot-maven

I am just not sure if that's much better. Maven is just a huge pain in the rear.

Hazzia@discuss.tchncs.de · 4 pts · 2y (1 reply)
[ removed ]
squaresinger@feddit.de · 3 pts · 2y

I totally know that feeling :)

Well, in the 90s, XML was the future. Luckily, not a lot of this future remains.

Just imagine what HTML would be like if JSON had been available back then.

bjoern_tantau@swg-empire.de · 60 pts · 2y (9 replies)

This is not HTML. It isn't even XML. It's not as bad as designers putting "code" into ads, but it's close.

Also, ever heard of XSLT?

LukeChriswalker@feddit.de · 26 pts · 2y (8 replies)

I mean it's valid XML

It's just not useful

bjoern_tantau@swg-empire.de · 36 pts · 2y (7 replies)

It isn't valid XML. No root node.

LukeChriswalker@feddit.de · 23 pts · 2y (4 replies)

We may just not see it but fair point

0x0@lemmy.dbzer0.com · 16 pts · 2y

The editor would need to start counting lines at zero.

bjoern_tantau@swg-empire.de · 14 pts · 2y (2 replies)

The line numbers show us that we're seeing the whole file.

LukeChriswalker@feddit.de · 8 pts · 2y

Oh ur right

Ew I didn't notice

That's awful

Joe_0237@lemmy.ml · 1 pts · 2y

They only (probably) show us that we are seeing the begining of the file. Also relative line numbing is a thing in vim for example.

jaybone@lemmy.world · 1 pts · 2y

Could it be an xml entity (or whatever it’s called) that you reference from another xml file? Do those require root nodes?

qaz@lemmy.world · 1 pts · 2y
[ removed ]
skullgiver@popplesburger.hilciferous.nl · 47 pts · 2y (3 replies)
[ removed ]
ram@bookwormstory.social · 1 pts · 2y
[ removed ]
HardlightCereal@lemmy.world · 1 pts · 2y
[ removed ]
themusicman@lemmy.world · 1 pts · 2y
[ removed ]
dan@upvote.au · 21 pts · 2y (6 replies)

This reminds me of Apple plist files, which appear to have been invented by someone that doesn't know how XML works.

SubArcticTundra@lemmy.ml · 8 pts · 2y

What even are those?

Diplomjodler@feddit.de · 8 pts · 2y (4 replies)

Which is true for the majority of all XML files I've ever come across in the wild.

SubArcticTundra@lemmy.ml · 3 pts · 2y (3 replies)

I think XML only makes sense if your data is heavily tree-like

misterzero@lemmy.world · 5 pts · 2y (2 replies)

In that case, why not use JSON?

SubArcticTundra@lemmy.ml · 1 pts · 2y

JSON spreads out tree nodes vertically (with all the attributes), whereas in XML it's usually one node per line, ie. more compact I suppose. This is just my very niche opinion though

Joe_0237@lemmy.ml · 1 pts · 2y

because you have a thing against solutions that are both beter and easier

Presi300@lemmy.world · 19 pts · 2y
[ removed ]
walter_wiggles@lemmy.nz · 15 pts · 2y (1 reply)

You should check out this new project, supposed to be twice as fast as HTML. It's called XHTML.

LinuxSBC@lemm.ee · 3 pts · 2y

I thought that was the HTML used by Twitter.

macumbamacaca@feddit.nl · 11 pts · 2y
Loudambiance@kbin.social · 10 pts · 2y (1 reply)

Is it just me, or does the append statement not indicate where you are appending the "number" element to?

TheLurker@lemmy.world · 0 pts · 2y
[ removed ]
mathemachristian@lemm.ee · 10 pts · 2y (4 replies)

I will never understand how XML came into being when lisp already existed.

alokir@lemmy.world · 28 pts · 2y (3 replies)

I don't either)))))))))

xmunk@sh.itjust.works · 13 pts · 2y

(reminds (it (of (story me))))

Hupf@feddit.de · 10 pts · 2y
Pipoca@lemmy.world · 1 pts · 2y

Would you really rather see <\Foo> than )?

There's a reason why most popular languages use } rather than end if or fi. The added verbosity doesn't actually help people read your code more than e.g. indentation or editors with paren matching or rainbow parens.

simonced@lemmy.one · 8 pts · 2y

Meanwhile in APL, you just 20 50 60 90, 10

DylanJava@sh.itjust.works · 5 pts · 2y

Who ever designed this deserves to be killed.

Joe_0237@lemmy.ml · 3 pts · 2y

someone should make lisp but with html syntax

InFerNo@lemmy.ml · 3 pts · 2y (1 reply)

What color theme is that?

Anticorp@lemmy.ml · 2 pts · 2y

Looks like Vampire.