Programming thread

  • 🐕 I am attempting to get the site runnning as fast as possible. If you are experiencing slow page load times, please report it.
Self-closing tags are deprecated and, at best, syntactic sugar. The slash is technically still allowed (on void elements* - anywhere else it is an error), but meaningless. I'd personally discourage using it but it's a possibility that some validator is still expecting you to follow that old standard.

As a general rule it's simply ignored - <br/> is exactly the same as <br>, and <div/> (valid under HTML4) is technically illegal but will be treated exactly the same as <div>... i.e. a subsequent matching </div> is still expected.

The question really isn't clear on what the problem is though. I thought he was saying it was adding a line break when it shouldn't be.

*<br>, <img>, <hr>, etc... these elements cannot have any child nodes
Kiwifarms was not the place I thought I'd discover that I've been generating thousands of emails with a bunch of deprecated HTML.
 
Self-closing tags are deprecated and, at best, syntactic sugar
Presuming we're talking about HTML5, they're optional, yes, but officially deprecated, no. Personally I still use them everywhere since it's an easy visual cue that the tag doesn't have a close tag anywhere. Yes, I could tell that by reading the tag name, but just seeing the slash makes it all the more explicit and easier to spot. I'd encourage people to keep using them.

Anyway, if the tool is still complaining the code is incorrect, maybe it wants a doctype? Try adding <!DOCTYPE html> as the very first line.
 
I'd sooner replace xml and html with some s-expression based syntax.
Ordinarily I'd disagree and say that we need a human-readable format, but HTML (or as I prefer to call it, the Javascript/CSS+HTML operating system) is pretty much a compiled language at this point anyway. So you know what, go nuts.
 
Ordinarily I'd disagree and say that we need a human-readable format, but HTML (or as I prefer to call it, the Javascript/CSS+HTML operating system) is pretty much a compiled language at this point anyway. So you know what, go nuts.
What can I tell you, it would be terrible, just terrible to have a uniform syntax for the code and markup language. Who needs that anyway? You know what I need? Tags. I need tags everywhere. The more visual noise, the better. I'm not generating data, I'm a fucking code artisan and get paid by the isOdd
 
I'd sooner replace xml and html with some s-expression based syntax.
I want this just so we can give front end devs macros that they will poorly implement. The more chaos the better.

Just wait and see. In months time we'd get medium articles saying shit like "Polish notation is an outdated practice! Use this macro and implement reverse polish notation across all of your forms today!" And you'd see thousands of people starts using it.

ETA: I actually love RPN on my HP calculator but please for god's sake don't do this with s-exps.
 
  • Feels
Reactions: ditto
Too real

1633151883826.png
 
Still a better commit message than "asdf" or "x".

But yeah, git commit --amend (and not pushing after every goddamn commit) is your friend.
Or work on a branch, commit, push, amend, force push, who cares?
Then merge without using github because fuck that.
I think the height of coomitter is git add . then pushing a 450MB binary blob by accident.
 
Work in progress.

Also fuck around with all the throwaway commits you want. Just squash them into one logical unit before spamming them to the world at large.
That's what I do. I usually have WIP commits when working on something new or just want to save my progress.
 
  • Like
Reactions: Marvin
Back