Pricefield | Lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
@[email protected] to Programmer [email protected] • 2 years ago

Yes, I program in HTML

lemmy.ml

message-square
41
fedilink
420

Yes, I program in HTML

lemmy.ml

@[email protected] to Programmer [email protected] • 2 years ago
message-square
41
fedilink
alert-triangle
You must log in or register to comment.
  • @[email protected]
    link
    fedilink
    2•2 years ago

    someone should make lisp but with html syntax

  • @[email protected]
    link
    fedilink
    24•2 years ago

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

    • @[email protected]
      link
      fedilink
      8•2 years ago

      What even are those?

    • @[email protected]
      link
      fedilink
      9•2 years ago

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

      • @[email protected]
        link
        fedilink
        4•2 years ago

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

        • @[email protected]
          link
          fedilink
          4•2 years ago

          In that case, why not use JSON?

          • @[email protected]
            link
            fedilink
            1•2 years ago

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

          • @[email protected]
            link
            fedilink
            1•
            edit-2
            2 years ago

            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

  • @[email protected]
    link
    fedilink
    17•2 years ago

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

    • @[email protected]
      link
      fedilink
      3•2 years ago

      I thought that was the HTML used by Twitter.

  • Square Singer
    link
    fedilink
    75•2 years ago

    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.

    • GigglyBobble
      link
      fedilink
      9•2 years ago

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

      • shastaxc
        link
        fedilink
        2•2 years ago

        Is there another way?

        • Square Singer
          link
          fedilink
          1•2 years ago

          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.

    • @[email protected]
      link
      fedilink
      3•
      edit-2
      2 years ago

      Bro the project I’m on uses XSLT and the first time I saw it I legitimately thought I was having a stroke because I could not accept that anybody would be stupid and/or masochistic enough to actually want something like that.

      However, I’ve now made it my mission to master it because it makes me feel like a high-born wizard speaking of ancient secrets in a tower high above humanity

      • Square Singer
        link
        fedilink
        3•2 years ago

        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.

    • Leeennaaaaa
      link
      fedilink
      31•2 years ago

      XSLT is fine

      If you have a program generate it

      • @[email protected]
        link
        fedilink
        2•2 years ago

        Pff. I know someone who generated programs using XSLT.

      • Square Singer
        link
        fedilink
        24•2 years ago

        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.

  • Skull giver
    link
    fedilink
    49•
    edit-2
    2 years ago

    No, that’s not valid HTML, but to the annoyance of pedants and purists everywhere, this is spec-compliant HTML that doesn’t even generate a warning in the validator:

    〈!doctype html>
    〈html lang="en">
    〈title>Hello〈/title>
    〈p>world
    

    Always remember to save dozens of bytes by ignoring optional closing tags and unnecessary opening tags! You’ll save microseconds of network transfer time and piss off dozens of people who inspect your HTML!

    Edit: damn you, Lemmy, stop stripping my tags! Just pretend 〈 is the real less-than character because Lemmy strips it out.

    • @[email protected]
      link
      fedilink
      English
      1•2 years ago

      deleted by creator

    • @[email protected]
      link
      fedilink
      1•2 years ago

      deleted by creator

    • ram
      link
      fedilink
      English
      1•2 years ago

      deleted by creator

  • Presi300
    link
    fedilink
    English
    17•2 years ago

    No.

  • mathemachristian[he]
    link
    fedilink
    13•2 years ago

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

    • @[email protected]
      link
      fedilink
      25•2 years ago

      I don’t either)))))))))

      • @[email protected]
        link
        fedilink
        13•
        edit-2
        2 years ago

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

      • @[email protected]
        link
        fedilink
        10•2 years ago

        https://xkcd.com/297/

      • @[email protected]
        link
        fedilink
        1•2 years ago

        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.

  • Loudambiance
    link
    fedilink
    10•2 years ago

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

  • @[email protected]
    link
    fedilink
    3•2 years ago

    What color theme is that?

    • SokathHisEyesOpen
      link
      fedilink
      English
      2•2 years ago

      Looks like Vampire.

  • @[email protected]
    link
    fedilink
    English
    9•2 years ago

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

  • Björn Tantau
    link
    fedilink
    63•2 years ago

    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?

    • Leeennaaaaa
      link
      fedilink
      26•2 years ago

      I mean it’s valid XML

      It’s just not useful

      • Björn Tantau
        link
        fedilink
        36•2 years ago

        It isn’t valid XML. No root node.

        • Leeennaaaaa
          link
          fedilink
          23•2 years ago

          We may just not see it but fair point

          • Björn Tantau
            link
            fedilink
            14•2 years ago

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

            • @[email protected]
              link
              fedilink
              1•2 years ago

              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.

            • Leeennaaaaa
              link
              fedilink
              8•2 years ago

              Oh ur right

              Ew I didn’t notice

              That’s awful

          • Trailblazing Braille Taser
            link
            fedilink
            16•2 years ago

            The editor would need to start counting lines at zero.

        • qaz
          link
          fedilink
          1•
          edit-2
          2 years ago

          deleted by creator

        • @[email protected]
          link
          fedilink
          1•2 years ago

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

  • @[email protected]
    link
    fedilink
    5•2 years ago

    Who ever designed this deserves to be killed.

  • Macumba Macaca
    link
    fedilink
    12•2 years ago

    Which of these wonderful languages is this? https://en.wikipedia.org/wiki/Category%3AXML-based_programming_languages

Programmer [email protected]

[email protected]
Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 4 users / day
  • 121 users / week
  • 457 users / month
  • 1.56K users / 6 months
  • 4 subscribers
  • 1.82K Posts
  • 38.5K Comments
  • Modlog
  • mods:
  • @[email protected]
  • @[email protected]
  • UI: 0.18.4
  • BE: 0.18.2
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org