18
AlgoRythm
164d

Just got a basic HTML parser written in c++. Uses state machines. Should be pretty efficient considering the lack of backtracking or looking forwards. Still lacks a bunch of features, but works, so I am pretty darn stoked.

Pic attached is output, not input. I also wrote an HTML pretty-printer.

Comments
  • 5
    Now you be programming your code to program in HTML. Code writing code!

    Skynet detected!
  • 4
    I hope the uniformity of your monitor doesn't look this bad in real life
  • 3
    @electrineer It's Windows Acrylic, not a fucked up image. I like it quite a lot and it looks nice in context. Apple did it first and maybe does it better, though.

    Even Manjaro has a similar effect so don't linux desktop fanboy on me.
  • 2
    @AlgoRythm lol, I mistook it for a broken monitor
  • 0
    It actually has a use case. I implemented code highlighting as a jinja2 plugin and rendered 3000 messages on dem screen. The performance was terrible. So if you write a highlighter - use case
  • 1
    @retoor maybe we can work together
  • 4
    is it just me, or are you missing the <HTML> tags?
  • 0
    Now make it spec compliant and end up going insane
  • 1
    @Demolishun dude... if only i could show you my networking scripts without an nda... i basically css'd network scripting
  • 1
    @tosensei html (and php) tags are amoung the many reasons chatgpt has called me legacy... apparently they arent required by current browsers because *something involving rampant ineptitude amoung humanity*.
  • 2
    @awesomeest soo you're not just validating your code, but your understanding of long-defined standards by a bunch of bits arranged to emulate the typical output of a college student that has knowledge about everything, but understanding about nothing...?
  • 0
    @tosensei i tried. I really tried, to understand your comment... i just dont.

    To validating my code... i only mentioning html and php... aside from not writing php in a way that leaves security flaws... can you really have valid html and php standards if it works? Sure it can be shitty for another person to understand/update... but what other standards are there for a markup language, or basic php?

    I certainly will never attempt to validate my formatting/readability/ease for others to update of any code (any language) ive written up to this point in my life. Im shitty af when it comes to those standards; trying to fix that since i need to now.

    But to whatever else you said... still no clue what you meant. Please reiterate.
  • 0
    @tosensei also, i tried the college thing over a decade ago... encountered some shitty teachers, got great grades... then realised it was illogical for me to be wasting time going through the college track, so stopped. Certainly didnt learn anything there.
  • -1
    @awesomeest to simplify:

    you let a LLM tell you that HTML-tags aren't required in an HTML-document.

    that doesn't indicate a high level of skill.
  • 0
    @tosensei i didn't say i stopped using tags. I ask chatGPT things primarily to figure out what types of questions i should prepare for from newbie devs. I also ask it things out of simple curiousity as to how it works. I certainly don't do as it says... pretty sure nothing would work if i did lol

    Only times ive actually used what chatgpt spews out in programming is reeeeally basic shit like an html form that i just want to pull the variables from or commenting code... ive stopped the latter because it kept changing shit like my if/if/if/else to if/elif/elif/else... or making up new variables or some lambda nonsense(i really dislike lambdas).

    Idk what i said to give you the impression that im so braindead id take advice from a chat AI... but im not. Even when i try to use it for basic double checking the syntax of some cli... it's basically a wash if it gives valid info or not. Trying to get a straight answer out of it isnt helpful for sanity.
  • 0
    @tosensei also, whether html, or php, tags are required or not, wont change the fact that im gonna put them there. Im a dinosaur when it comes to code. Ive been writing html and php (and a few others) since <7yrs old... im 31 now. 24 years later and i still prefer notepad.exe (or sublime text with basically anthing starting with 'auto' off).

    My comment on chatGPT was relative to this. Many of my methods are legacy nowadays... it's not that i dont know/understand current shit... im just a creature of habit unless i have a valid reason to change.
  • 0
    @awesomeest are your scripts like the guy in this story:

    https://github.com/NARKOZ/...
  • 1
    @Demolishun not really lol
Add Comment