[HN Gopher] HTML, the Programming Language
___________________________________________________________________
HTML, the Programming Language
Author : recursivedoubts
Score : 184 points
Date : 2023-12-04 16:57 UTC (6 hours ago)
(HTM) web link (html-lang.org)
(TXT) w3m dump (html-lang.org)
| recursivedoubts wrote:
| i made this
| jakelazaroff wrote:
| extremely cursed. great job
| arp242 wrote:
| How many people have bought the shirt?
| recursivedoubts wrote:
| looking now... so far 0 (zero) people
|
| still optimistic!
| scop wrote:
| It's my birthday today so I might just not buy myself a
| little something.
| toasterlovin wrote:
| should be at least 1 now
| arp242 wrote:
| Hm, I'd order one, but unfortunately your form doesn't use
| proper ISO-8859-1 encryption so I'm a bit wary. It's always
| best to use ISO standards.
| recursivedoubts wrote:
| update: 4 (four) people!
| arp242 wrote:
| So how high is my sales commission?
| krapp wrote:
| Thanks, I hate it.
| recursivedoubts wrote:
| :heart-hands:
| protopete wrote:
| Hey I noticed that the division code example is using the "ul"
| tag instead of the "div" tag. Thanks!
|
| Edit: nevermind, but the comment still says "This ul tag"
| recursivedoubts wrote:
| just pushed another fix!
| dullcrisp wrote:
| In the setting properties example I think it should be
| <rp>body</rp> rather than <cite>body</cite>.
| chubot wrote:
| Uh, why call it HTML? Why not call it HTML-Stack or something?
|
| It's not HTML, but a language using HTML syntax.
| recursivedoubts wrote:
| it's not called HTML
|
| it's called HTML, the programming langauge
|
| (sometime I use "HTML" just to keep things shorter)
| jakelazaroff wrote:
| How about HTML: Turing-complete Machine Language
| recursivedoubts wrote:
| HTMLTML has a nice ring to it!
| chalsprhebaodu wrote:
| I'd shorten it to just HTML at that point, where the H is
| short for HTML:
|
| _H_ TML: _T_ uring-complete _M_ achine _L_ anguage
| recursivedoubts wrote:
| ah, a good idea
|
| i mean, who knows, maybe that's what HTML in HTML, the
| programming language stands for!
| alexpetros wrote:
| I think we need to save that for HTML, The Markup
| Language
| PrimeMcFly wrote:
| So, HTPL then.
| syndicatedjelly wrote:
| It's web dev, the best way to get adoption is to trick people
| into using your stack
| scop wrote:
| Is this "HTML-based" or "HTML, based"?
| moritzwarhier wrote:
| <output> is an obscure tag that I think allows to exploit
| accidental turing completeness similar to the checkbox hack.
|
| Or is it? I once considered using that tag for some price
| calculator widget, but it couldn't even replace a div because
| of styling issues or something.
|
| That being said, I spent like half a minute trying to figure
| out the point of this post and then lost interest...
|
| Will try again, was hoping for a funny Rube Goldberg machine
| instead of T-shirt merchandise.
|
| So nah, it's about as "based" as blogging about JS frameworks
| IMO.
| 51Cards wrote:
| Giving me memories of tag based Coldfusion days.
| SpaceL10n wrote:
| Same. I liked ColdFusion for what it was, but I also don't miss
| it. The spaghetti code I had to fix is what I remember most.
| While spaghetti code isn't a unique problem to CF, it is made
| so much harder to fix when you don't have a debugger and you
| can't right-click to find references. The horrors of endlessly
| nested cfloops inside cfifs with cfaborts and cflocation tucked
| away wherever the programmer needed it. never again!
| IroncladDev wrote:
| Extremely based
| asplake wrote:
| I thought the s tag was for sarcasm
| xnx wrote:
| As long as we're creating confusing names, are there any
| Hypertext Machine Learning projects (HTML)?
| laurent_du wrote:
| Finally I can use html on the frontend and the backend! I am
| adding a "full-stack html" badge to my Linkedin account right
| away.
| dexwiz wrote:
| Would an HTML template system written in HTML lang be
| considered bootstrapping?
| rob wrote:
| Personally I'm using CSS [0] on the backend, but might switch
| it out for HTML. It'd be cool to use the same technology for
| both. The CSS+HTML combo has some big limitations.
|
| [0] https://dev.to/thormeier/dont-try-this-at-home-css-as-the-
| ba...
| xupybd wrote:
| Now the discussion around HTML being a programming language gets
| really muddy.
|
| Thanks to "a slightly unhinged man living in montana"
| TremendousJudge wrote:
| Reminds me of xkcd's Frankenstein: https://xkcd.com/1589/
| MikeTheGreat wrote:
| The best part is how they have to keep repeating "HTML, the
| programming language" or "HTML, the markup language" everywhere
| in an attempt to keep things clear :)
|
| It would be awesome if they were using some sort of macro system
| / templating engine to consistently expand {{html_prog}} and
| {{html_markup}} just to keep it straight while they're writing
| it.
|
| Thank you for posting this, it made my day a bunch brighter!
| jraph wrote:
| > It would be awesome if they were using some sort of macro
| system / templating engine to consistently expand {{html_prog}}
| and {{html_markup}} just to keep it straight while they're
| writing it.
|
| You could use the <template> tag. <template
| id="my-macro-name"> <!-- some operations -->
| </template>
|
| To use it: <source src="my-macro-name"/>
|
| Using source to look familiar to bash users because why not.
| recursivedoubts wrote:
| By the way, you can implement in HTML, the programming
| language, because it is extensible!
|
| https://html-lang.org/#extending
| paulddraper wrote:
| Maybe even <script src="my-macro-name"
| type="macro"></script>
| gorgoiler wrote:
| HTPL?
|
| I appreciate their joke, but "HyperText Markup Language, the
| markup language" is a little redundant.
|
| Some of us have had to include XSLT programming in our careers.
| We have seen into the dark abyss... and been paid to do it!
| paulddraper wrote:
| It's "HTML" aka "HTML Turing-complete Markup Language"
| droptablemain wrote:
| Meme languages are getting out of hand.
| dexwiz wrote:
| Why is the iterator implemented as a GOTO instead of something
| like the following? Genuine question, I don't use stack based
| langs. <loop> <loop-statement></loop-
| statement> </loop>
| recursivedoubts wrote:
| in designing HTML, the programming language, i tried to stay as
| close as possible to existing semantics in HTML, the markup
| language, as I could, so that HTML, the markup language,
| developers would be comfortable with it in a minimum amount of
| time
|
| most HTML, the markup langauge, developers are used to anchor
| tags (i.e. the <a> tag) with an href that begins with a hash
| "jumping" to that element. Therefore I decided to take that
| well known semantic and integrate it into HTML, the programming
| language.
|
| there are multiple examples of loops using this (as well as the
| <i> "if" conditional) tag that I think show how intuitive this
| will be for most HTML, the markup language, developers, but of
| course research is ongoing in this and other matters
| dexwiz wrote:
| I guess I don't really think of HTML as "sequential" but I
| definitely do think of it as "composed." Meaning I don't
| often consider siblings elements, but I often do consider
| parent/child elements. Anchor tags that link to other parts
| of the doc are relatively rare compared to links to other
| docs. The only exception is stuff like schema definitions or
| reusable shapes in SVGs.
|
| Either way, fun project!
| recursivedoubts wrote:
| research ongoing!
| PrimeMcFly wrote:
| > Genuine question, I don't use stack based langs.
|
| How and why not? What languages do you use?
| dexwiz wrote:
| Common ones like JavaScript, Java, C#, etc. They all have a
| stack, but aren't stack oriented like Assembly or Forth. The
| stack in modern languages is abstracted so you don't have to
| worry about pushing/popping values in a specific order, and
| you can't explicitly reference it. C and Rust is probably the
| closest I get with Heap v Stack memory, but even that is not
| truly stack oriented.
|
| https://en.wikipedia.org/wiki/Stack-oriented_programming
| PrimeMcFly wrote:
| Ah gotcha. Thanks.
| toasterlovin wrote:
| Was literally reading that wikipedia page last night before
| bed, so this is all very timely for me.
| wds wrote:
| Everybody's so creative!
| pier25 wrote:
| > _This was revealed to me in a dream_
| toddmorey wrote:
| I'm going to make it my career mission to build something on this
| that you have to maintain, recursivedoubts
| recursivedoubts wrote:
| based
| jawerty wrote:
| Super fun! Great work.
| layer8 wrote:
| Should have called it HTPL.
|
| That already exists, though: https://esolangs.org/wiki/HTPL
| pvcsd wrote:
| This is the programming language of the century
| recursivedoubts wrote:
| btw, this is a working programming language and there is an
| example of fib()
|
| https://html-lang.org/#example
|
| and live demo at the bottom:
|
| https://html-lang.org/#live-demo
|
| that runs disturbingly fast given the implementation is an
| inefficient recursive algo
|
| computers are fast
| owenpalmer wrote:
| JavaScript, the Markup Language
| lioeters wrote:
| div({ class: 'example' }, [ p('Hello, ', [
| b('world!) ]) ])
| hoosieree wrote:
| Still better than YAML.
| gemstones wrote:
| One suggestion - it would be really cool to allow FFI. Something
| like <script type="text/javascript">
| const foo = (bar) => { document.getElementById('my-
| element'); // More here! };
| </script>
|
| That way you could really leverage the full power of HTML, the
| programming language!
| cantSpellSober wrote:
| The contents should be wrapped in a dangerouslySetInnerJS attr
| to prevent XSS
| _a_a_a_ wrote:
| "... the html.js file ..."
|
| Jesus. As a lover of plain HTML and a hater of JS, my head just
| burst and painted the walls.
| makach wrote:
| ...what in the befunge?
| 3cats-in-a-coat wrote:
| HTML is nested lists of named nodes with attributes... well.
|
| LISP has done more, with less.
| notnmeyer wrote:
| who can i sue over this? im outraged
| culi wrote:
| eychtee emel
| klibertp wrote:
| ...now I'm starting to wonder whether htmx and _hyperscript are
| similar to this, just disguised better...? And I was seriously
| considering using htmx for one thing, too.
| fabiancook wrote:
| > Footnotes: > This was revealed to me in a dream. > HTML: the
| programming language is brought to you by big sky software
|
| Is the same big sky software :)
|
| Had seen this pop up on github.. https://github.com/1cg/html.js
| dewey wrote:
| Look at the footer, the site is connected to htmx
| ivanjermakov wrote:
| I did something similar for fun in uni: HTPL[1].
|
| Basically, HTML->Python transpiler.
|
| [1]:
| https://github.com/Koous61/htpl/blob/master/example/scratch....
| GuB-42 wrote:
| Interestingly, since it is actually XML, you could take advantage
| of all the XML features. A XSD may be able to encode the language
| grammar, and with XSLT, get some nice rendering.
|
| Of course, the parser is just a DOM parser, which is built in
| browsers and that's what the interpreter is using. But if you
| want to write a standalone compiler for it, just take an off the
| shelf XML DOM parser and you have your AST.
| dejawu wrote:
| This almost reads like a deconstruction of my favorite
| explanation of Lisp: https://www.defmacro.org/ramblings/lisp.html
|
| The explanation basically uses an AST that's apparent to the user
| to explain the language - and this is a language built on an AST
| whose structure is apparent to the user. I love it and will
| definitely be turning the idea over in my head for the next few
| days.
| mrighele wrote:
| Maybe I am mistaken but it seems to me that the stack is
| implemented with a Javascript. I am a bit disappointed, in the
| sense that the stack too could have been implemented as a a list
| of tags in the containing document.
|
| This would enable interesting features such as visual debugging
| (you just check the document to see the status of the program)
| and more importantly would enable the "code as data" paradigm,
| giving us easy metaprogramming and essentially a "lisp with
| brackets"
|
| (Yes, I am not being completely serious)
| hardkorebob wrote:
| Lets keep filling the internet with .....
| DistractionRect wrote:
| It's too early in the week, and I'm too sober for this.
|
| My one nit, is the lack of static typing. I'm not a fan of
| radically changing the direction of a project, so instead of
| baking it into HTML, the Programming Language I suggest the
| TypeScript route. Something like a hypertext typed programming
| syntax, HTTPS, to compile to HTML, the Programming Language.
| imhoguy wrote:
| The next challenge - let it run itself: <script
| src="html.html"></script>
| objektif wrote:
| Not enough. Wake me up when I can rewrite my C code in XML.
| g9yuayon wrote:
| I remember in the hay days of XML, someone made an article that
| discussed why XML is really just a language of S-expressions.
| This article seems argue something similar.
|
| P.S., S-expression or not, XML-based DSLs are horrible. I don't
| know how many people have PTSDs using ANT or a slew of commercial
| "user-friendly" DSLs for test automation, process automation, and
| etc. It turns out the companies just didn't know how to design
| small programming languages and certainly lacked of compiler-
| writing skills.
| k__ wrote:
| I remember JSX examples that went in this direction.
| xtagon wrote:
| Yes but how do I use WebAssembly as a markup language?
| eagle2com wrote:
| How am I supposed to complete the LinkedIn quizz for HTML (the
| programming language) when the documentation states that <bdo>
| will result in values "anded" together >:(
| jayknight wrote:
| Ok, I guess I'll do Advent of Code in HTML, the Programming
| Language this year...
___________________________________________________________________
(page generated 2023-12-04 23:00 UTC)