[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: WebAssembly_Logo.svg.png (26 KB, 1024x1024)
26 KB
26 KB PNG
WASM edition.

>Free beginner resources to get started with HTML, CSS and JS
https://developer.mozilla.org/en-US/docs/Learn - MDN is your best friend for fundamentals
https://web.dev/learn/ - Guides by Google, you can also learn concepts like Accessibility, Responsive Design etc
https://eloquentjavascript.net/Eloquent_JavaScript.pdf - A modern introduction to JavaScript
https://javascript.info/ - Quite a good JS tutorial
https://flukeout.github.io/ - Learn CSS selectors in no time
https://flexboxfroggy.com/ and https://cssgridgarden.com/ - Learn flex and grid in CSS

>Resources for backend languages
https://nodejs.org/en/learn/getting-started/introduction-to-nodejs - An intro to Node.js
https://www.phptutorial.net - A PHP tutorial
https://dev.java/learn/ - A Java tutorial
https://rentry.org/htbby - Links for Python and Go
https://quii.gitbook.io/learn-go-with-tests - Learn Go with Tests

>Resources for miscellaneous areas
https://github.com/bradtraversy/design-resources-for-developers - List of design resources
https://www.digitalocean.com/community/tutorials - Usually the best guides for everything server related

>Need help? Create an example and post the link
https://jsfiddle.net - if you need help with HTML/CSS/JS
https://3v4l.org - if you need help with PHP/HackLang
https://codesandbox.io - if you need help with React/Angular/Vue

/wdg/ may or may not welcome app development discussion. You can post and see what the response is.
Some app technologies of course have overlap with web dev, like React Native, Electron, and Flutter.

We have our own website: https://wdg-one.github.io

Submit your project progress updates using this format in your posts, the scraper will pick it up:

:: my-project-title ::
dev:: anon
tools:: PHP, MySQL, etc.
link:: https://my.website.com
repo:: https://github.com/user/repo
progress:: Lorem ipsum dolor sit amet

Previous: >>107504416
>>
7 months back I posted a video about how I nightmarishly hybridded together babylon.js, havok.wasm, and uwebsockets to a frontend of three.js and webgpu for good performance in all web dev languages at the cost of my sanity. And I think I just accidentally discovered a holy trinity for indie game dev. Hear me out.

I was asking GPT to explain SpaceTimeDB to me, a web dev who did all that nonsense. And it explained it to me perfectly. I was close to doing what SpaceTimeDB does except STDB is an all in one backend written with Rust and it's own backend. After some confusion I realized I didn't need the node.js or uwebsockets or Babylon, you're doing the physics and logic all purely in the database and it's everything at once all in Rust including the websockets if you use the Javascript SDK as well as the load balancing by acting like Redis. It's actually an all in one. The catch is I'm having to commit to learning Rust which I was already learning.

Anyways it works the same way as what I was doing. Physics on the backend. Send everything's objects to the frontend. Use a renderer like three.js and just update everything's positions based on what you're sent. Then of course you control the character with WASD and your own camera, and everyone all controls their own character.

The interesting thing is, I was considering switching to Bevy or raw Vulkan and GPT actually said three.js would be better for this as a pure renderer. Especially now that webGPU is out and can handle graphics as well as non-browser engines do.

That's why it's a holy trinity. See, three.js and SpaceTimeDB is obviously a powerful combo already. BUT the third thing is AI. Three.js isn't an engine but a renderer, it's the go to choice of vibe coders. SpaceTimeDB is program it yourself too, not an engine but a backend. Essentially this combo could be insanely powerful for indie multiplayer already, but add the ability to vibe code everything since everything is written by hand.

Thoughts?
>>
How the fuck do I convince my manager to NOT start a new project using spring boot, and use Flask or fastapi instead?
>>
I started working at a non-software company 2 1/2 months ago, my first dev job and I'm very much a junior that stumbles his way through everything
I'm the only developer and my superior is the boss's son that is in charge of the IT - network and security. he's a cool guy, not a nepo baby and knows his stuff, but certainly has no idea about programming.

my company is a bit of a tourist attraction (we make chocolate) and visitors can make custom chocolates on site via touch terminals. (it's an app (probably c# or java) running on a windows server)
I'm tasked with making the new software for those terminals.
>from the ground up, because the devs of the current software are out of business and nobody has access to anything, certainly no source code.

I basicaly have free range what tools and frameworks to use, the only requirement is that it's a web app running in docker.

I chose:
>vue3
>fastapi
>mysql db
>files from nginx

no cloudflare etc because it's just for 500 small pictures

I've got pretty much everything working by now, but now for the fun part:
>I need to make a sync between the cms and my app - the production team enters new ingredients, turns availability on and off etc - I have no idea how I should do that: the cms doesn't have an api I can latch onto.
a newer version of the cms with an api will come next year at some point, but I can't wait for that
>the production team currently receives orders via the kiosk terminals and the online webshop over an app. I'll have to remake that one too, I guess

what I do have access to is:
>the cms - as a user
>xampp/myPHPadmin of the current/old kiosk app

any advice?
>>
>>107536087
look up "development speed" in both languages and show him the stats. Plus, does your team have both java and python devs?

>>107536302
Sounds like a fun project! Though it's a bitch working at non-software companies, most people have no idea what you do nor do they care, they just expect everything to be magically done.
>fastapi
good choice, but given your (I'm assuming) lack of experience, wouldn't you want something with more out-of-the-box tools like Django instead? fastapi is super simple but also a lot more bare-bones than Django.
>mysql db
I've never put SQLite on prod, but given the small scale of this project, maybe give it some thought. You won't have tons of data, or hundreds of request per minute (again, assuming) so a real DB feels like overkill. Keep in mind SQLite is the DB powering every single mobile phone out there.
>how to connect cms to app
no idea honestly, can you figure out how it's being done right now? Do you have access to the cms DB?
>>
File: Next.js_wordmark.svg.png (9 KB, 1024x206)
9 KB
9 KB PNG
Should I learn it?
>>
What framework can I use to build my own text-based web game with a UI? I want it to be bundled into single html file + routing support.
>>
Serious question, how fucked are web devs in terms of job security because of AI? This is not a troll or a tranny question please, sars!
>>
File: fuze-game-preview.jpg (173 KB, 1266x882)
173 KB
173 KB JPG
>>107538029
Do you mean using text to represent graphics? That's what I did for a javascript game once. You don't need a framework at all.
>routing support
wat does that mean?
>>
>>107538248
Woh, cool project. I just want to create something like a text-based game, or maybe a mostly GUI or spreadsheet game, mainly a text-based RPG of my own. By "router", I mean navigating from a URL like /inventory to /world-map, but I want it to be a single page application without backend
>>
>>107538314
For URL locations you can use
if (window.location.pathname.startsWith("/inventory"))

If you also want parameters in the URL you can parse them with URLSearchParams.
>>
>>107538314
Also since you're making a SPA you will need to manage state. Also you need an event listener that fires on history.pushState()
Some extracts from an imageboard I'm working on:
        let state = {selected_thread_id: null};
// [...]
window.history.replaceState(state, null, ""); // Initial state

window.onpopstate = function(event) {
if (event.state) {
state = event.state;
}
refresh_send();
}
// [...]
function openThread(thread_id) {
state.selected_thread_id = thread_id;
history.pushState(state, "", "_ROOT_URL" + "thread/" + state.selected_thread_id + "/");
getThreadPosts();
}
>>
File: 1631956322690.gif (143 KB, 246x238)
143 KB
143 KB GIF
there's a digital STD orgy between node and react bros, remember to use triple condom
>>
Hello everyone.

I'm >>107535904 and want some advice. I've landed on building something like Roblox or Vr Chat for the web. I got all the technology I'm using down to a T and most of the knowledge covered. I found a proof of concept code doing exactly what I suggested with a SpaceTimeDB backend and three.js frontend, though I wouldn't be using react and of course will have a multiserver multiworld system.
https://github.com/majidmanzarpour/vibe-coding-starter-pack-3d-multiplayer/tree/main/server/src

Pretty cool right? So after researching I've decided I can allow sandboxed scripting thanks to WASM so that users can script their works, and will likely use assemblyscript which is like Javascript for the server scripting, Javascript and tsl for the client scripting and shading, and allow people to create and update worlds from a modified version of the three.js editor which accounts for allowing scripting and physics.

My only gripe is I'm not quite sure how to go about sandboxing client side scripting without allowing malicious behavior such as xss. ChatGPT suggested event listening and a locked down API but I'm not quite sure yet.
>>
>>107535904
>Thoughts?
/gedg/ would completely shit on everything you just said, is all I "know"
I think, more like, I believe, you're better of relying on languages like C++/Java/C# or even C for gamedev since that's what they actually use in the industry. three.js is an abomination conceptually
>but why
you're relying on a browser to do game deving, that's like heresy and completely counter-logical
once that said there IS a niche for web-cgi, and that's advertising and fancy-web making, top tier webs rely heavily on CGI, and things like three.js and vulcan are a gateway into it
to be fair, that all the "knowledge" and insight I've got from it is by merely lurking /gedg/, I have dones literally 0 graphical programming outside of animating a svg and creating my own charts using raw canvas, so take it with a grain of salt
>https://github.com/majidmanzarpour/vibe-coding-starter-pack-3d-multiplayer/tree/main/server/src
looks interesting as hell ngl, interesting take I know I'm contradicting myself kinda but still

>XSS
well, SQL has solved this problem ages ago, so look for their solution, I think it is something like "so this is a string, don't fucking exectue the string don't convert it to html or js" no idea how it works but it works
>>
>>107539344
>>107539222
>xss
quick rundown here, it's like basically passing the string to a function that does everything for you
https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html
each back end should have this function, I've used it in the past in PHP you just have to find the name for it, like scape html characters or some shit, research it and you should be gucci, I just haven't done that in ages

I'll try to explain the way I understand it in a SQL DB context

user input -> SQL injection scape -> DB -> html special characters scape -> web front end display
>>
>>107538006
Do you want to have insecure software?
>>
>>107539344
Gedg is full of retards who will never accomplish anything. /agdg/ on /vg/ is where it's at.

That said, webGPU just dropped for browsers this month and is top tier. Been testing it for years. It's legit. Three.js uses webGPU. The reason to use three.js over an actual engine is all logic is handled on the backend and you only use a renderer on the frontend. This is exactly how bitcraft from the people who made SpaceTimeDB works. As far as the issue with downloading goes, you can have a hub and starter character on load then as you swap worlds load in assets just like vrchat. The stack I'm using is perfect for this kind of multiplayer game.
>>
>>107539464
>/agdg/ on /vg/
I see 0 vgms posted there, there's cool ones posted on /gedg/ often
>>
>>107539464
just told you the way I see it from the outside
>>
>>107537586
>look up "development speed" in both languages and show him the stats. Plus, does your team have both java and python devs?
thanks. Python team in a mostly java company.
>>
>>107537586
>Do you have access to the cms DB
I don't and neither does the admin.
the dev company that's been doing the webpage/online store probably has but from what I've been told, those guys "are not easy to work with and that the cms has been modded so heavily to fit the company's needs that only the dev from that company knows how it works."

but I don't see any other way than letting me talk this out with that team if they want a clean solution or any at all.


>Django
you are correct in assuming that I have little experience, plus no one to ask for advice or recommendations. so I took the first thing that sounded like it fits my needs. setting up the api was, as you say, super simple - got it working within a day and a half. what the long-term consequences and challenges will be - that I don't know. I'll look into Django, though - thanks.
>>
>>107539464
>agdg
I just went and checked it out. There isn't a single line of code posted, and if they're was any reference to someone actually making a game in the several hundred replies, I missed it. Had to double check that I didn't click the wrong thread desu
>>
>>107539840
>I don't and neither does the admin
well, that's not entirely true - I have access to the windows server where xampp is running and I have user access to to the db through phpMyAdmin
>>
>>107539444
CVEs happen. If I decided to avoid every piece of software that has ever had a CVE, I would never use a computer again.
>>
>>107539840
I'm just suggesting Django because of all the cool features you get from the get-go. I don't think fastapi has the same features, or at least it didn't last time I used it (like 2 years ago). For bigger projects, with a team of people and more time, I would absolutely say go with fastAPI, but it seems like they want results yesterday, so for that, again I say Django.

How are the users going to interact with your app? In-store, using the app on a tablet? Or do they actually want web access to it?

>only the dev from that company knows how it works
this is starting to sound like a nightmare scenario kek. Hold on tight, anon. You're in for a shitload of trouble.

How fast do they want to see the changes they make reflected on your app? Say they add a new recipe or take out an ingredient, how much time do you have before that change has to be in your app? In your role as a cms user, do you have a way to access the entire database? can you somehow backup the data, store it all in a file, dump the data somehow?
>>
>>107540067
this argument is kind of true, but I'd argue that both node and react with their wild west ecosystem of libraries, opens the door for malicious third parties way too much
>>
>>107540282
I don't think the problems with Next.js were connected to malicious NPM packages though. It looks like they were problems with React's own code:
>a security vulnerability in React that allows unauthenticated remote code execution
https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components
>Denial of Service and Source Code Exposure in React Server Components
https://react.dev/blog/2025/12/11/denial-of-service-and-source-code-exposure-in-react-server-components

If you install random NPM packages then yeah that's probably a bad idea. If you stick with trusted stuff like React then you may still encounter vulnerabilities, but they should be patched very quickly after being discovered.
>>
>>107540584
I hate that I agree, still wouldn't trust, specially node, I'd be giga paranoid of installing packages
>>
>>107540280
>How are the users going to interact with your app?
there are 15-20 stations around the facility - each station is a pc with a 21" touch screen. the app is only used on those machines.
app runs in docker, stations just open the network adress and we're good to go.

>>107540280
>like a nightmare scenario
yes and no. I mean we/they're a chocolate factory that hired an external company to build something for them - so of course nobody needed access to deep level stuff; they'd just call the devs and ask them to change this and that and to report bugs.

I'm actually not on a time schedule. the current app -is- still working fine. it's outdated, but it's working. of course I'm not going out of my way to take my time and do nothing, but it's not like they're breathing down my neck. at all. it's really chill and they're all very nice people.

I just get the feeling that they didn't really think this project through before they hired me. or rather, they didn't know the technical requirements for this to work. as I said, my boss is a network admin and used to working with end-user software. we're also the same age and if I explain to him how something works and what I need to make things work he listens and acknowledges the problems and doesn't want things to just magically work.
>>
>>107540280
>How fast do they want to see the changes they make reflected on your app? Say they add a new recipe or take out an ingredient, how much time do you have before that change has to be in your app? In your role as a cms user, do you have a way to access the entire database? can you somehow backup the data, store it all in a file, dump the data somehow?

if you're talking about manual export and import - no, it should work automatically. the production team turns off an ingredient or shape, topping, whatever if it's out of stock within the cms. so once it's out, users shouldn't be able to use those ingredients in the terminal. of course they turn off availability shorty before it's actually gone, so that orders that are still withing the loop are still valid.
I don't know the exact sync schedule, but it should be within minutes.
>>
>>107540686
but yes, I am able to do exports from that database.
I already thought about writing a script that uses a db backup and imports it into my db. but that's just such a sloppy ass solution lol
>>
>>107540739
got it. The only thing I can think of is that you have to convince them to give you a connection to the database where you have at least read privileges. Not sure if your app would need to write anything into the db, so far all you do is read off of them. If they're willing to, they could even set up a system like a master-slave where the slave just replicates the master, and they give you read access to the slave, so that you have no access at all to the main db.

Another (more complicated) solution would be for them to set some triggers (on update and create) so that when specific items are updated (stock=0 or however they deactivate them) the trigger sends you a message. Depending on their setup, this could be really easy (for example, on AWS DynamoDB it's super simple to set up triggers). But given they're still using PHP, something tells me their stack is pretty old, so your options might be limited.
>>
>GPT is implementing troonwind automatically now
Thanks, trannies.
>>
>>107541480
>I don't like thing
>therefore thing is tranny
tired of you homolord newfags 2bh, I don't even like or dislike tailwind, but your absolute obsession with hating it, faggoted 2bh
>>
been doing python backend for years. Now I'm learning Go on my own initially for fun but ideally to try to land a new job and holy shit, I love this language. Granted it's my second day, but I'm having tons of fun with "Learn Go with Tests". Anybody else a Gopher in here?
>>
>>107541691
started ""learning"" go with aoc two weeks ago. it's an incredibly braindead and boring language imo, but i guess that's a good thing for a wagie language
i appreciate how much shit it has built in, though
>>
>>107541691
yep!
>>107541834
>it's an incredibly braindead and boring language
It's the only reason why I picked it up and keep coming back to it
>go with aoc
I should try it
>>
>>107541834
so what do you program in normally? I'm just sick of all the OOP stuff from Python, so I wanted to see what interfaces and generics were about. I thought about picking up Rust but I'm not really sure my systems knowledge is enough to get me by. Plus most Rust jobs seem to be very niche and hard to come by
>>
>>107539842
You could say the same about wdg. But tons of people actually make games around game jam time.
>>
File: output.webm (357 KB, 800x600)
357 KB
357 KB WEBM
>>107542069
When does that happen? I'll check it out. The thread, as it stands, felt like i was walking in to the middle of a month long argument I don't understand or care about.

I was hyped when you mentioned it to see if there were any dudes building cool shit with SDL3. I just started playing around with it myself.

>webm related
A stupid Atari style first game project
>>
>>107542063
at my job? clojure/clojurescript
has even less jobs than rust and i don't want to be stuck at my current workplace forever so i decided to pick up go
privately rust, not for web though
realistically i don't think it gets better than go for an employable language that isn't soul destroying OOP corposlop
>I'm not really sure my systems knowledge is enough to get me by
i didn't feel like rust needs much systems knowledge but i started programming with C so i may just be blind to it
>>
>>107541611
Anything that is overengineered compared to the original is tranny, forcing frameworks onto people when the base code exists is trooncore and forces people into your sphere of coding or influence.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.