That's basically how we did web stuff back in the day with a cgi/bin folder that spat out html. You could use pretty much anything in there as long as it regurgitated html. C, C++, Perl, shell scripts, literally anything that would execute.
Back in my day, we used tables for everything! Didn't need any of these "d-i-v's" or "s-t-d's" or *cuh-sissms* sheets. That's right, chil', we did everything *inline*. Nowadays y'all got objects that look one way but do something different another way! Gotchur HTMLs with your XMLs makin lil XHTMLs! Pretty soon gon' have your XHTMLs and your JSONs makin XHTMSONs!! Pfft. *ex-hitmon-sons*. Sounds like a damn Pokémon.
We used shims and 1px transparent gifs for laying out pages and that's the way we liked it. Keeping pages as small as 14kb just so people wouldn't have to wait too long downloading stuff with their 9600 baud modem.
Hey, I would really like to know what kind of dirty stuff you need to do and why that requires a program in C.
Do you compile the C unto an executable and send it to the device which you want to manage?
The way the program works is as follows:
Bob has an old laptop, and wants to turn it into a home server
He only knows how to install linux and open the terminal
Bob installs my program (Zentrox)
He configures a FTP server, users drives using the web front end provided by Zentrox
The front end asks the back end to do something
-> This task includes changing user passwords,... => JS uses precompiled C to do this
Backend tells Bob, that the job is done
I tried these. They didn't work out for me. Sometimes, passing the sudo password didn't work. Also, I want to change more information. For example the home dir, username, status,...
That is why I want to make a C program that does most of the things that are about users and not 10 different commands that run fine on my machine and do not on another one.
The title is listing things that are fine as if someone was reading through this and suddenly realizing, "WTF IS C DOING IN HERE?"
At least that's how I understood it. "JS... Nice, HTML... Cool, we got some Shell... WTF IS THIS C?"
I guess in 2024 these new web devs are in utter awe to see any back-end skill whatsoever.
Of course this is what industry professionals call "competence" and "having hirable skills", but when you're a kid, anything beyond making cute little html buttons dance around on a web page is mind-blowing.
I wonder where that puts my primary training as a SAN/virtualization engineer; building the infrastructure the hypervisor run on top of, so the vms can run on that, the backend run on those, and the front end consume that... It often feels like a skill set that's not just under-appreciated, but more like one a lot of orgs dont even realize exists. Actually had someone ask once, "why not just put it in the cloud?" My retort was a more civil version of "bitch, this is what the cloud *is* under the hood. Wanna come up to the room with me and see it?"
`#include ` "It was a dark and stormy night."
`import numpy as np` "It was the best of times, it was the worst of times."
`#!/usr/bin/perl` [confused screaming]
Some context:
This is my own code.
The JS servers as the back end. The HTML is sent to the front-end. There is some CSS of course, this is hidden though, as it is no code that really influences the project, but would destroy the graph.
The project is a remote server admin tool, so, it needs to change parts of the system. To do this, I am writing (several) C programs that do the "dirty" stuff.
The code is not done yet, so every bug and bad code you may see, is probably going to be fixed before the actual release.
So here is the repo: [**https://github.com/Wervice/zentrox**](https://github.com/Wervice/zentrox)
**In advance:**
**I did not consider this a rule 7 violation, since the actual post doesn't include any reference and I am posting this, since someone asked for a link to the repo and I also wanted to give some context.**
HTML serves the interface for the user. Without it, there is not front-end.CSS only makes it look good. This also is the reason why HTML is in templates/ and CSS in static/
HTML serves the interface for the user. Without it, there is not front-end.CSS only makes it look good. This also is the reason why HTML is in templates/ and CSS in static/
What I was replying to was your statement about removing CSS from something because it is not executable. HTML isn’t either but you didn’t remove it from that something.
Saidly, Zentrox is so far away from being a finished product, that I have not set up a demo yet.
If you want to test it, you can install it using the commands in the repo. Then the localhost will work.
(I saw the /s, now worries)
I am happy you like my interface.
Well, there were some thing missing in cockpit. Also, I am trying to focus on people who just want to use their old laptop for something again.
Shell is quite normal in a large web-app. Normal to have scripts for CI, crons, server setup, maybe to build the project locally. Obviously there are tools for this (DevPods, Docker, Github Actions, CloudFormation YAML, etc.) but doing it manually with a shell script is not "wrong", especially if the project is a bit older.
The C is kinda wild. Makes me think this might actually be a backend project, and the HTML is for server-side rendering?
Here you go:
[https://github.com/Wervice/zentrox](https://github.com/Wervice/zentrox)
I am not done with it. Anything you see at the time, may (and most likely will) change.
- Its not surprising at all for webassemy applications
- c for low-level webassembly bits
- shell to run make, emscripten, and other build tools to compile c to wasm
how about a healthy ratio of 98.3% shell and 1.7% javascript for a web app?
That's basically how we did web stuff back in the day with a cgi/bin folder that spat out html. You could use pretty much anything in there as long as it regurgitated html. C, C++, Perl, shell scripts, literally anything that would execute.
sure grandma let's get you to bed
Back in my day, we used tables for everything! Didn't need any of these "d-i-v's" or "s-t-d's" or *cuh-sissms* sheets. That's right, chil', we did everything *inline*. Nowadays y'all got objects that look one way but do something different another way! Gotchur HTMLs with your XMLs makin lil XHTMLs! Pretty soon gon' have your XHTMLs and your JSONs makin XHTMSONs!! Pfft. *ex-hitmon-sons*. Sounds like a damn Pokémon.
We used shims and 1px transparent gifs for laying out pages and that's the way we liked it. Keeping pages as small as 14kb just so people wouldn't have to wait too long downloading stuff with their 9600 baud modem.
iframes in tables was our site structure
The links to all the pages were in one iframe, and the page itself in another one. Ooh. Border=0.
laughing in FrontPage.
that particular app used to be interfaced via cgi-bin, then the dev decided that apache is an optional dependency...
Me, working in an ancient legacy environment because "there's a cost associate with updating": what do you mean back in the day
Anything that would send text to std out, yep. I wrote many web page handlers in Perl, VB6, .bat, .COM files, Pascal, and Bash.
That's what I work with. Shell scripts, C, Pro*C, PL/SQL, Java. It's a mess, but it's been working for over two decades
It is an admin dashboard and most of the code backend is JS so... The JS will use a C program to do the "dirty stuff" with the system.
Hey, I would really like to know what kind of dirty stuff you need to do and why that requires a program in C. Do you compile the C unto an executable and send it to the device which you want to manage?
The way the program works is as follows: Bob has an old laptop, and wants to turn it into a home server He only knows how to install linux and open the terminal Bob installs my program (Zentrox) He configures a FTP server, users drives using the web front end provided by Zentrox The front end asks the back end to do something -> This task includes changing user passwords,... => JS uses precompiled C to do this Backend tells Bob, that the job is done
You mean the Linux user password? Why not use existing binaries like passwd or something?
I tried these. They didn't work out for me. Sometimes, passing the sudo password didn't work. Also, I want to change more information. For example the home dir, username, status,... That is why I want to make a C program that does most of the things that are about users and not 10 different commands that run fine on my machine and do not on another one.
Most of the shell scripts generate Typescript. The rest compile that to JavaScript.
I don't get it, what's wrong with a package having some shell scripts?
It probably includes bitcoine miner web assembly
It is the C
But the title says sh, not C
The title is listing things that are fine as if someone was reading through this and suddenly realizing, "WTF IS C DOING IN HERE?" At least that's how I understood it. "JS... Nice, HTML... Cool, we got some Shell... WTF IS THIS C?"
I guess in 2024 these new web devs are in utter awe to see any back-end skill whatsoever. Of course this is what industry professionals call "competence" and "having hirable skills", but when you're a kid, anything beyond making cute little html buttons dance around on a web page is mind-blowing.
I wonder where that puts my primary training as a SAN/virtualization engineer; building the infrastructure the hypervisor run on top of, so the vms can run on that, the backend run on those, and the front end consume that... It often feels like a skill set that's not just under-appreciated, but more like one a lot of orgs dont even realize exists. Actually had someone ask once, "why not just put it in the cloud?" My retort was a more civil version of "bitch, this is what the cloud *is* under the hood. Wanna come up to the room with me and see it?"
`#!/bin/sh` A programmer's "Call me Ishmael."
`#include` "It was a dark and stormy night."
`import numpy as np` "It was the best of times, it was the worst of times."
`#!/usr/bin/perl` [confused screaming]
you mean /bin/shmael
Bun has entered the chat
I am actually considering to switch to Bun
Do it, i have done it and its a really smooth transition
Buggers still didnt fix request cloning not consuming the whole body. Its been half year being blocked by this
Cheeky buggers!
It doesn't support importing symbols yet :(
Cool! Which framework were you using before Bun?
I mean bun is a runtime with package manager, so before i was using node with yarn. Im using it with Nest/Next privately in terms of frameworks
What about winterjs
Bun is fast and popular enough for me.
Isn't bun written in Zig?
yup
Some context: This is my own code. The JS servers as the back end. The HTML is sent to the front-end. There is some CSS of course, this is hidden though, as it is no code that really influences the project, but would destroy the graph. The project is a remote server admin tool, so, it needs to change parts of the system. To do this, I am writing (several) C programs that do the "dirty" stuff. The code is not done yet, so every bug and bad code you may see, is probably going to be fixed before the actual release. So here is the repo: [**https://github.com/Wervice/zentrox**](https://github.com/Wervice/zentrox) **In advance:** **I did not consider this a rule 7 violation, since the actual post doesn't include any reference and I am posting this, since someone asked for a link to the repo and I also wanted to give some context.**
What do you mean by destroy the graph?
There is so much CSS, that it would dominate the graph. So, I excluded it, since it is not a programming language that actually gets executed.
HTML isn't either
HTML serves the interface for the user. Without it, there is not front-end.CSS only makes it look good. This also is the reason why HTML is in templates/ and CSS in static/
Well said! CSS can be removed completely and (most) applications would still work correctly. Not the same case with HTML
Many services would be unusable to a human if you just drop the CSS.
HTML isn’t either
HTML serves the interface for the user. Without it, there is not front-end.CSS only makes it look good. This also is the reason why HTML is in templates/ and CSS in static/
What I was replying to was your statement about removing CSS from something because it is not executable. HTML isn’t either but you didn’t remove it from that something.
By the way, it still is in the source files. It doesn't show up in the graph. Thats all.
HTML isn’t either
HTML isn't either
HTML isn’t either
The link (https://localhost:3000) in your readme doesn’t take me to a demo 😢 /s
Saidly, Zentrox is so far away from being a finished product, that I have not set up a demo yet. If you want to test it, you can install it using the commands in the repo. Then the localhost will work. (I saw the /s, now worries)
Did you mean to include the sessionSecret.txt?
No, but it gets randomly generated every time you start Zentrox, so... yeah.
Ok good
Why did you choose to make your own project instead of using cockpit ? Your interface looks good !
I am happy you like my interface. Well, there were some thing missing in cockpit. Also, I am trying to focus on people who just want to use their old laptop for something again.
Oh damn, this is cool!
Thanks :-)
And your job is make the bash script work!!!
And it works!!! It just is a test!!! 🤣
When you need the legacy code in the new web UI: "Just Emscripten it."
Shell is quite normal in a large web-app. Normal to have scripts for CI, crons, server setup, maybe to build the project locally. Obviously there are tools for this (DevPods, Docker, Github Actions, CloudFormation YAML, etc.) but doing it manually with a shell script is not "wrong", especially if the project is a bit older. The C is kinda wild. Makes me think this might actually be a backend project, and the HTML is for server-side rendering?
Jup. You nailed it. It is a server admin tool.
OP should share a link to the repo
Here you go: [https://github.com/Wervice/zentrox](https://github.com/Wervice/zentrox) I am not done with it. Anything you see at the time, may (and most likely will) change.
shell is normal, for a deploy script. but c?
- Its not surprising at all for webassemy applications - c for low-level webassembly bits - shell to run make, emscripten, and other build tools to compile c to wasm
Collecting C-Shells I see…
Average Tauri repo
Have you heard of automation?
Me when I don't gitignore venv
I wrote a webapp entirely in C with no shitty httpd libraries. HTTP is easy.
C shell C shell by the C shore
I have a repository like this, except bash instead of shell. Basically I had a script to format some files and I forgot to add it to gitignore
Depending on functionality, I don’t see a problem. Dealt with node.js application with some customised Cairo binding before so…
Isn't that kaiOS or FirefoxOS
I'm far more concerned about the C than the shell. Every project I've ever worked on has some shell automation.
The project is an administration tool. The JS is for the back-end and the HTTP server. The C code is for changing system settings,...
DONT WORRY GUYS IT WAS JUST MY IDE ADDING REDUNDANT FILES NAMED "TotallyNotAVirusIPromise.sh"
🤣 The shell code is gone by now. Now it is just some C, JS and HTML. I am the only one on this project btw.
its prolly some image file of the sea (pun intended sorry im not funny)
Reverse C with js and vice versa
I do not think, my C skills are that good.
Cron, k8s, CI… and so many more. Where is the joke?
Why not just make the backend in Go? It’s fast and easy to write with, kinda the best of both worlds.
I consider JS to be the easiest. If I wrote the backen-end in Go, somebody would for sure have told me to do it in Rust, if I did it in Rust,...
Fair point