Remix.run Logo
▲ Scubabear68 6 hours ago

From the article, "WRITING HTML AND CSS IN C ISN'T TOO BAD".

Um, any and all string handling in C is pretty miserable.

▲prophittcorey 6 hours ago | parent | next [-]

To be fair, the HTML and CSS in C wasn't too bad.. the Youtube scraper was also written in C and that was a lot more painful :)

▲sam1r 6 hours ago | parent [-]

I can empathize entirely. After writing a scraper for html in C, outputting html in C is a piece of cake.

▲feelamee an hour ago | parent | prev | next [-]

tell me where working with strings is not miserable? Practically, modern languages with RAII make it easy at the cost of perfomance (doing a lot of allocations). So, if you doing lot of string handling, you still need to think how to do it in performant way. If doing it a bit - why care about miserable.

▲PhilipRoman 6 hours ago | parent | prev | next [-]

Emitting strings is fine, it's the parsing that sucks.

▲Joker_vD 6 hours ago | parent | prev [-]

If you do it with the string functions from the standard library then yes, it is.

▲prophittcorey 6 hours ago | parent [-]

The standard string functionality is painful. I wrote my own string view and string builder that work with fixed size strings. No memory allocations, etc.