Live data from Hacker News

Syntax Highlighting in a Webpage Without JavaScript

fctorial.github.io

31–40 of 44 posts

Re: Syntax Highlighting in a Webpage Without JavaScript

#31
post #23

It's funny to see us remembering that things can be done on the server. The trend to render everything client-side has always been troubling to me. Such a waste of resources (but it's not your resources, so developers don't care). Sure, things that are truly dynamic or are different for every user is probably usefully done on the client. But a static page with code samples can easily be rendered on the server, with s…

Css will work until a certain point. What do you do when css can't handle? Give up, do some super hacky unmaintainable css mess, or suck it up and use js...

The trouble generally is that JS is used despite the content being static, or independent of client behavior/usage.

That is, JS can be used to do everything but it is not optimal, or even near optimal (or even remotely close to) for many use cases. In terms of runtime or simplicity. But because it is capable and available, it has encroached into every niche (of html/css) until like any invasive species, it consumes and shreds through all available resources, collapses the whole ecosystem, and all complex creatures give way to a fresh start with new fairly rudimentary biology (wasm) trying to evolve towards and find a new stability point — hopefully one that does not invite a similar destructive species, but we’ll see how it goes

Re: Syntax Highlighting in a Webpage Without JavaScript

#32
post #23

It's funny to see us remembering that things can be done on the server. The trend to render everything client-side has always been troubling to me. Such a waste of resources (but it's not your resources, so developers don't care). Sure, things that are truly dynamic or are different for every user is probably usefully done on the client. But a static page with code samples can easily be rendered on the server, with s…

How is it a waste of resources?

Re: Syntax Highlighting in a Webpage Without JavaScript

#33
post #23

It's funny to see us remembering that things can be done on the server. The trend to render everything client-side has always been troubling to me. Such a waste of resources (but it's not your resources, so developers don't care). Sure, things that are truly dynamic or are different for every user is probably usefully done on the client. But a static page with code samples can easily be rendered on the server, with s…

The browser is just a generalised client implementation where the application is streamed and sandboxed. It's similar to a native app written on Kotlin/Swift or desktop application written in C#/wpf.

The same logic could be applied to those client application technologies, too.

Re: Syntax Highlighting in a Webpage Without JavaScript

#34
post #8
post #6

Earlier quoted context omitted.

What do you mean? Honestly interested

My take? In the beginning, we had to do everything server-side. Then, doing as much as possible client-side was all the rage. And now we are bringing these client-side libraries back to the server.

Classic advancement of things. It is full circle but not back to the begining, it's a level higher. It looks like you're doing the same but you now have all the benefits of server side rendering AND front-end frameworks.

Re: Syntax Highlighting in a Webpage Without JavaScript

#36
post #23

It's funny to see us remembering that things can be done on the server. The trend to render everything client-side has always been troubling to me. Such a waste of resources (but it's not your resources, so developers don't care). Sure, things that are truly dynamic or are different for every user is probably usefully done on the client. But a static page with code samples can easily be rendered on the server, with s…

The browser is just a generalised client implementation where the application is streamed and sandboxed. It's similar to a native app written on Kotlin/Swift or desktop application written in C#/wpf. The same logic could be applied to those client application technologies, too.

No. The browser is a document viewer, and that's what it's actually good at.

Re: Syntax Highlighting in a Webpage Without JavaScript

#37

Earlier quoted context omitted.

The browser is just a generalised client implementation where the application is streamed and sandboxed. It's similar to a native app written on Kotlin/Swift or desktop application written in C#/wpf. The same logic could be applied to those client application technologies, too.

No. The browser is a document viewer, and that's what it's actually good at.

The browser started as a document viewer. Nowadays it is much more than that.

Re: Syntax Highlighting in a Webpage Without JavaScript

#38
post #37

Earlier quoted context omitted.

No. The browser is a document viewer, and that's what it's actually good at.

The browser started as a document viewer. Nowadays it is much more than that.

It is not just a crappy "generalized client application".

Re: Syntax Highlighting in a Webpage Without JavaScript

#39
post #23

It's funny to see us remembering that things can be done on the server. The trend to render everything client-side has always been troubling to me. Such a waste of resources (but it's not your resources, so developers don't care). Sure, things that are truly dynamic or are different for every user is probably usefully done on the client. But a static page with code samples can easily be rendered on the server, with s…

> Such a waste of resources (but it's not your resources, so developers don't care).

I've always wondered if it wasn't intentional. Things running on the client means they don't have to run on the server, and you can save money this way.

Post reply on HN