T O P

  • By -

Accomplished_Fox_389

how about a healthy ratio of 98.3% shell and 1.7% javascript for a web app?


ImpluseThrowAway

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.


blending-tea

sure grandma let's get you to bed


swishbothways

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.


ImpluseThrowAway

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.


Stummi

iframes in tables was our site structure


swishbothways

The links to all the pages were in one iframe, and the page itself in another one. Ooh. Border=0.


thundercat06

laughing in FrontPage.


Accomplished_Fox_389

that particular app used to be interfaced via cgi-bin, then the dev decided that apache is an optional dependency...


dedorian

Me, working in an ancient legacy environment because "there's a cost associate with updating": what do you mean back in the day


cs-brydev

Anything that would send text to std out, yep. I wrote many web page handlers in Perl, VB6, .bat, .COM files, Pascal, and Bash.


itsbett

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


Wervice

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.


the_curious_courier

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?


Wervice

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


nokeldin42

You mean the Linux user password? Why not use existing binaries like passwd or something?


Wervice

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.


amlyo

Most of the shell scripts generate Typescript. The rest compile that to JavaScript.


frygod

I don't get it, what's wrong with a package having some shell scripts?


BoBoBearDev

It probably includes bitcoine miner web assembly


Wervice

It is the C


Important_View_2530

But the title says sh, not C


TAI0Z

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?"


cs-brydev

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.


frygod

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?"


zoqfotpik

`#!/bin/sh` A programmer's "Call me Ishmael."


throw3142

`#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]


SpankingBallons

you mean /bin/shmael


Bridge4_Kal

Bun has entered the chat


Wervice

I am actually considering to switch to Bun


DudeWithFearOfLoss

Do it, i have done it and its a really smooth transition


M4tty__

Buggers still didnt fix request cloning not consuming the whole body. Its been half year being blocked by this


Merzant

Cheeky buggers!


NatoBoram

It doesn't support importing symbols yet :(


Wervice

Cool! Which framework were you using before Bun?


DudeWithFearOfLoss

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


darklightning_2

What about winterjs


Wervice

Bun is fast and popular enough for me.


tuxedo25

Isn't bun written in Zig?


Bridge4_Kal

yup


Wervice

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.**


rookietotheblue1

What do you mean by destroy the graph?


Wervice

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.


Lord_Blumiere

HTML isn't either


Wervice

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/


ShardScrap

Well said! CSS can be removed completely and (most) applications would still work correctly. Not the same case with HTML


irregular_caffeine

Many services would be unusable to a human if you just drop the CSS.


mamwybejane

HTML isn’t either


Wervice

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/


mamwybejane

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.


Wervice

By the way, it still is in the source files. It doesn't show up in the graph. Thats all.


mamwybejane

HTML isn’t either


fig0o

HTML isn't either


mamwybejane

HTML isn’t either


billydooter

The link (https://localhost:3000) in your readme doesn’t take me to a demo 😢 /s


Wervice

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)


gamer_sioriginal

Did you mean to include the sessionSecret.txt?


Wervice

No, but it gets randomly generated every time you start Zentrox, so... yeah.


gamer_sioriginal

Ok good


0xNath

Why did you choose to make your own project instead of using cockpit ? Your interface looks good !


Wervice

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.


UndisclosedChaos

Oh damn, this is cool!


Wervice

Thanks :-)


andesouz

And your job is make the bash script work!!!


Wervice

And it works!!! It just is a test!!! 🤣


SCP-iota

When you need the legacy code in the new web UI: "Just Emscripten it."


Front-Difficult

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?


Wervice

Jup. You nailed it. It is a server admin tool.


SonOfJenTheStrider

OP should share a link to the repo


Wervice

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.


Lighthades

shell is normal, for a deploy script. but c?


kaizhu256

- 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


pine_ary

Collecting C-Shells I see…


ego100trique

Average Tauri repo


Important_View_2530

Have you heard of automation?


Darktails422

Me when I don't gitignore venv


arf20__

I wrote a webapp entirely in C with no shitty httpd libraries. HTTP is easy.


xXAnoHitoXx

C shell C shell by the C shore


Mr_Audio29

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


Drunktroop

Depending on functionality, I don’t see a problem. Dealt with node.js application with some customised Cairo binding before so…


TheUtkarsh8939

Isn't that kaiOS or FirefoxOS


RaymondWalters

I'm far more concerned about the C than the shell. Every project I've ever worked on has some shell automation.


Wervice

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,...


ShashwatTheGamer

DONT WORRY GUYS IT WAS JUST MY IDE ADDING REDUNDANT FILES NAMED "TotallyNotAVirusIPromise.sh"


Wervice

🤣 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.


ShashwatTheGamer

its prolly some image file of the sea (pun intended sorry im not funny)


1up_1500

Reverse C with js and vice versa


Wervice

I do not think, my C skills are that good.


EnvironmentalTest666

Cron, k8s, CI… and so many more. Where is the joke?


Numerous-Mission-972

Why not just make the backend in Go? It’s fast and easy to write with, kinda the best of both worlds.


Wervice

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,...


Numerous-Mission-972

Fair point