[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: alpine.png (13 KB, 702x134)
13 KB
13 KB PNG
AlpineJS (+ you're a lazy asshole for not making a thread already) 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: >>106619601
>>
File: file.png (72 KB, 860x476)
72 KB
72 KB PNG
>want to learn PWA
>decide to make something simple with vite
>look for an API to show some content
>ultimately decide to use 4chan API
>find out you can't use it for shit
So apparently only requests coming from within 4chan itself, outside of the browser or from a proxy will work. Why must browsers cuck me so much with their CORS jewery?
>>
>>106687188
I applied for a job which used Alpine but they rejected me. Bummer.

>>106687371
You could just find another API.
>>
Which is /g/ web devs preferred git service, github or gitlab?
>>
File: total scroll.webm (369 KB, 1074x1080)
369 KB
369 KB WEBM
web call
>>
>>106687556
Source? I'll apply.
>>
>>106688337
what are we seeing there pham?
>>
>>106688822
it's a webrtc chat app with continuous clipping and reactions with audio notes (the bubble trees)
you can scroll through the audio for 30 minutes and clip up to 5 minutes into a bubble.
>>
>>106688077
I have accounts with both. Most of my repos are on GitHub but I pushed a couple of the best ones to GitLab as well. I might push all my repos to GitLab so that if GitHub loses all my data somehow then I'll have another copy.
>>
I love my users, even if they sometimes fight like little kids or get stubborn as teens, i still appreciate them
>>
>>106688077
GitHub, it's more of the social media of coders anyways which is better for job prospects/building your portfolio
>>
>>106690265
This, I love every shit poster that visits my service
>>
what orm do you guys use for nodejs?
I am new to webdev and wanted some thoughts on orm choices
Also what about logging? is there a common consensus or recommendation on logging ingestion?
>>
>>106691829
>I am new to webdev
stop asking gay fucking senior tier questions that are focused on optimizing and just make stuff you procrastinating fuck
>>
>>106691829
i might be stupid but i decided to use kyseley instead of ORM for my mid-size project.
>>
>>106692220
was that a lot of work?
query builder doesn't help you with database connection and other things right?
>>
File: blockforests.png (357 KB, 1866x951)
357 KB
357 KB PNG
>>106688337
blockforests
>>
>>106691281
why is github better for building a portfolio? I can link to my gitlab projects the same as I would on github. doesn't make sense.
>>
Deleted my entire DB by mistake, i guess it was bound to happen. I had to restore and i've spent since then rebuilding part by part everything that was done today. Now i run backups every 8 hours, and a master backup that runs every hour or so, on different drives too just in case
>>
WHY WON'T ANYBODY FUCKING HELP ME
>>
>>106688337
can comments graph upwards and towards other branches?
>>
>>106694085
link to your post
>>
>>106693399
gitlab is rarely used in companies I believe
>>
>>106693895
>Deleted my entire DB by mistake
how exactly?
fun fact, dropping relational tables completely (not at db level) can be quiet a complicated task, you have to drop foreign keys from cross referencing tables or it won't let you drop the tables
>>
>>106694085
because this isn't chat.com, go there if you want to ask your useless nigger questions
>>
>>106694085
Why do you think we should help you for free? Are you going to help us for free if we need help in the future? No you won't. So fuck off. /wdg/ is for web devs who do their own work instead of expecting free help from strangers.
>>
>>106695216
nta, I've been helped and also helped "for free" countless times, you fuck off
>>
>>106695319
I think you might have meant this directed at me here: >>106695291

I just dislike people who turn up here without making any effort to solve their problems by themselves. When I have a problem I go and RTFM in order to solve it. Surely a big part of programming for any programmer is the ability to look through documentation and find answers to your problems. Some people seem to come to /g/ expecting to be spoon fed answers without them putting in any effort themselves.
>>
>>106696194
sometimes the documentation doesn't have the answer to begin with, that's when I asked for help and got it
and some times writing short scripts, etc, I just even find enjoyable, I do it during work time even, to keep learning (writing short scripts, not helping people here)
some of you either forgot or didn't get to know that we're supposed to be brothers here
I don't disagree with RTFM, but c'mon you guys don't even know his question to begin with
>>
vanilla js, but if it had everything you wanted it to have
describe it
>>
>>106697324
support for big numbers including decimals, official and well supported web3d implementation, canvas becomes flash for real
>>
>>106694132
not really
>>
>>106697651
that'd be the simulation of a 4chins comment, I'm thinking, a thread even
>>
>>106694889
This is why you never hard delete and instead do soft deletes only
>>
>>106698047
I was talking about tables not registers, but similar thing happens with registers too
>>
What's the best data structure to represent a 4chan thread? I was thinking of a Map since it's fast and behaves well when deleting mid stack
>>
>>106698738
An array you dumb gorilla nigger.
>>
>>106698984
Explain your reasoning like a white man
>>
>>106694889
Users reported a network error, i wanted to copy the DB to my local testing machine, i did it in the wrong order and pasted my testing DB on the deployed machine, then i panicked hit a few CTRL+z, almost lost some scripts i had made, and i ended up having to resort to my backups, all due to introducing a sound for when clicking as users requested.
>>
>>106699017
>all due to introducing a sound for when clicking as users requested
hilarious
>>
>>106699017
>copy pasting a db
gui or command line, are we talking about SQLite?
>>
>>106698738
1. I don't know
2. let me theorize
apparently objects have faster look up time than arrays, while maps have faster look up time than objects, the drawbacks I don't know
a linked list over arrays? I'm asking kek
>>
I've been tinkering with FastAPI for about 3 days now and I've spent most of that trying to add react as a front end but it seems impossible right now. I managed to get HTMX going which seems enough if I wanted to throw something basic together but I wanted to try out React and Tailwind instead because I've seen them mentioned a lot. I've spent all day trying to get it to work.

I've also been trying to get the FastAPI/React template in the FastAPI docs to function but what's driving me nuts is that I can get the front end functional but now the backend wont even install the requirements it needs to work and every time I want to do something it feels like I have to install 3 other things to install something else. I know fullstack is difficult but I feel like such a brainlet that I cant even get the template to work.

Im trying to do this with FastAPI because I'm most familar with Python.
>>
>>106699200
Well I chose maps because they are id based (key) just like posts so I would be able to effortlessly look for a post just by using posts.get(123); and another reason is the fact that arrays leave empty spaces when you delete an element.

At first I thought of a java queue but it's not like a post is always deleted at the end. Maybe it would make sense for sticky generals with a fixed limit of posts per thread but that can simply be handled by a cleanup routine that compares the current thread with what an endpoint returns.

A possible drawback would be the fact that if you delete an element at the top and then re-add it it will end up at the bottom so the sequential order of ids would be lost. Unsure if that can technically happen on 4chan
>>
>>106700659
>>106698738
For what purpose? I'd just store them as a list and order by id when selecting them. I think their order is more important. You can build a map of the relationships between the posts in a thread pretty simple from the base thread data.
>if you delete an element at the top and then re-add it it will end up at the bottom so the sequential order of ids would be lost
4chan style IDs don't have this problem, and 2ch style threads (with post numbers going 1-1000 in every thread) will keep deleted posts but remove their content. Rely on ids for order.
>>
>>106698738
It doesn't fucking matter
threadId timestamp content
>>
File: slices.webm (82 KB, 718x544)
82 KB
82 KB WEBM
>>106697687
I have a different plan to implement something similar, but yes I agree with the logic, I just have a different idea I want to chase
>>
>>106699171
GUI, Indeed SQLite. I should've seen it coming since i stopped my local server, as otherwise it complains about the active connection, but i thought it was bugged or just didn't thought about it so i tried it a few times, which was not good. I'm going to just make a script hat will ask me to be extra sure which side i want to make the transfer from and to of the DB's
>>
File: 1491260627435.jpg (24 KB, 337x600)
24 KB
24 KB JPG
What is /wdg/'s favorite CMS? Every body says nice things about Ghost but I want a second opinion.
>>
>>106703216
check payload
>>
>>106700845
A map preserves the order in which elements are added so there's no need to order them
>For what purpose?
None for now. Just a mental experiment I started when I was in line for a medical examination yesterday
>>106701290
I've seen cases of posts made at the same time listed like
>20:00:00
>19:59:59
>20:00:00
>20:00:01
so I am not sure if a timestamp is really reliable
>>
>>106698986
1) 4chan threads are chronological, easily represented with an array
2) Deleting in the middle of an array is fast for a thread, and is rarely done to justify any more complexity
>>
>>106701651
I love the way these behave, the movement, so nice
>>
>>106703686
>A map preserves the order
I see, so that should be okay as long as you render server-side, but if you think in terms of simple data structures supported by JSON, I don't think I'd rely on the data being serialized and deserialized in the same order.
>not sure if a timestamp is really reliable
It isn't unique, so no.
>>
>>106703686
>A map
...your database?
>>
>>106704616
anon might be trying to do a in-memory idk, whatever problem he's having doesn't exist if you use any SQL database lol
>>
>>106703686
>A map preserves the order
That is implementation specific and not a guarantee
>>
>>106703216
if it's not too complicated, make your own
>>
>>106702201
>make a script
yeah brub, guis are not to be trusted, if the db doesn't weight too much, you might consider dealing with it in git
>>
>>
>>106705051
The complete lack of LTS is literally my only gripe with DotNet. What the fuck were they thinking
>>
>>106705094
I think .NET does have LTS versions though. The current LTS version of .NET is version 8. The current non-LTS version is 9. The upcoming release will be the next LTS, version 10. So I guess they alternate between non-LTS and LTS versions.

https://dotnet.microsoft.com/en-us/download
>>
>>106705218
No, they have a version they call "LTS", which is supported for 3 (THREE) years.
3 years is not LTS. LTS stands for Long-Term Support.
>>
>>106705349
>.NET 8.0
>Long Term Support
https://dotnet.microsoft.com/en-us/download

Fine they don't support it for as long as you wish but it's still Long Term Support, it literally says so
>>
>>106705516
It's not LTS if it's only 3 years. Don't bother with .NET because it's a shitty Microsoft product masquerading as open source. Use Go instead. Go code written 10 years ago still works fine. And Go is simpler and more performant than .NET.
>>
File: PHP the king.png (1.04 MB, 1024x575)
1.04 MB
1.04 MB PNG
is Laravel/Symfony any use for personal hobby projects? I feel like it's made for making sovlless corpo CRUD over and over and your project doesen't have any "identity" so to say if you use these frameworks. Am I right?
>>
>>106706928
Most applications are CRUD over and over in different forms. It doesn't have to be soulless, but that part's up to you.
>>
Why bother with heavy frameworks? Just do this for every endpoint/url in your webside or web app:
>one that is 'full page' and that has everything, all HTML/CSS/JS
>one that is AJAX and that only includes the HTML/CSS/JS that changes between pages (on the same website). So for example not including the 'website header - e.g. logo, nav, search bar...

Set a value in the header of the request to indicate if it's an AJAX request. So they would have the same url and handler function (or you could use different handler functions if you want to). Just execute a different HTML template depending on if it's an AJAX request or not.

If you go to the page from another page on the same website, then you use the AJAX version and only the HTML/CSS/JS that changes is sent. If you go to the page from lets say some random link on another website, then you get the full page.

This is going to be the most performant type of website. You can also lazyload content below the fold to speed it up even more (to make sure you keep each request below 14kB after compression), and include the CSS inside of <style> tags so that it loads faster.
>>
>>106707861
Already do that. HTMX and AlpineAJAX (I think) set a header for you. What I do is have one handler function, and 2 private methods one to render a full page and another that only renders the resource.

I also made one handler server HTML, JSON, and XML. Based on the accept header I would decide what render function to use. Useful for RSS feeds and for scripts/bots depending on what you need.
>>
>>106707936
Nice.
>>
>>106707861
>>106707936
>>106708056
You might have to add from which page you're coming from for the AJAX request. For example, you might have this on your website or web app: page_1 --> page_2 and page_3 --> page_2 (where '-->' is a link that uses the AJAX request part of the handler function for that endpoint). And page_2 and page_1 share a header and a subheader but page_3 might not have that subheader. So you don't need to send the HTML of that subheader if you go from page_1 to page_2 but you will have to send it if you go from page_3 to page_2.
>>
>>106705516
It says so, it's just not what that word means. Look at Oracle's support for Java if you want to see what an enterprise system should mean by LTS.
>>
bump
>>
single page apps were a mistake.
The number of fucking websites that don't work properly anymore trying to maintain state between things slower than you can navigate around them and getting caught on a page you aren't supposed to even be on according to the URL is too fucking high.
>>
>>106710045
This >>106707861 >>106708127 is the solution: Faster performance than SPAs and doesn't easily break because the server is actually returning HTML that the browser is really fast at rendering.
>>
>>106710045
spas are very fucky, maybe, browsers should step up around them, same as search engines, because it BTFO's having to reload a page or loading a different page
>>
>>106707861
sort of this was what old school you throw so much shit at ideal way of doing it
in other words, just build everything html css, it should "work" at every url, then implement a js layer on top, main reason why they did this was because "but what if they disable js", which is completely alien line of thought to today's web world

or put in simple terms,
>>
>>106710555
>"but what if they disable js"
Some browsers don't even support js (like pre-smartphone mobile browser applets)
>>
>>106710595
give me a % of total users of a normal corporate web that sells shit
many users used to disable js, back in the days, corporate decision was "lol fuck 'em", because %
>>
>>106687188
gentlemen, are there any free and good face recognition apis or libs that work entirely on the front end that you guys recommend? I have been tasked to create one of those proof of life apps but I never worked with that shit before. Got to be one where the use needs to blink and turn his head in different directions to prove he is a real person kind of thing.
>>
File: verifying.webm (3.8 MB, 590x1278)
3.8 MB
3.8 MB WEBM
>>106710720
Show them this and tell them it's a waste of developer hours and money
>>
>>106710720
>face recognition
>work entirely on the front end
This is how face recognition is done:
>put a bunch of images into a vector db using some embedding model
>run the image the user is searching with through the same embedding model and find the most common images using similarity search
You can't do this in the browser obviously. You need to talk to your backend (that has a vector db, which can be Postgres for example). Unless you are talking about only consuming some API? That is also a bit complicated because of privacy laws (GDPR). It's a big no no at the company I work for anyways.
>>
>>106710815
>Unless you are talking about only consuming some API?
yeah. are there any free services that do that? i know there are paid ones but since they want something like a proof of concept I can't really pay for any of that.
>>
File: Screenshot_20250927.png (80 KB, 1126x697)
80 KB
80 KB PNG
>>106710045
im making a single-page imageboard. currently there is just one variable in state so it works easily but we'll see how it holds up later on.
>>
>>106710868
>any free services that do that?
I don't think.
>>
>>106710932
not even as a free trial or something?
>>
>>106710944
Look at the footer of >>106710790
That logo is a company providing that service
image search the logo
>>
fuck angular n*ggers for changing everything every 6 months
nuke mountain view
>>
Is it just me or software that runs under Java always seems to have memory issues or config suggestions for how much memory to have available
Yeah its not limited to Java but it feels like Java programs seems to crash once a week because of memory issues
>>
File: 1603083530648.jpg (33 KB, 684x960)
33 KB
33 KB JPG
>>106703446
??
>>106704944
It can't be that simple.
>>
File: 1750483775444633.png (226 KB, 1678x1039)
226 KB
226 KB PNG
>>106712058
i'd say it's way better to just engineer your own for-specific-task CMS, pic related. instead of trying to learn and use some other system, thats trying to do a bunch of "unfocused" stuff.
for example i could use letterboxd, IMDB, or other movie watching websites to search stuff, follow genres, directors. i could just find a random stream site and browse it like a cow till i find something i like. or i can put in the effort to make a movie CMS for myself that just does whatever i need and can have a button for torrent lookup or streamSiteA,B,C link from a movie page.
its better to make your own platform, easier to fix stuff. just keep it simple and understand its just a tool. move on when the tool works.
>>
>>106687371
if you cant bypass this maybe you should just quit
>>
File: 1718201151831823.png (111 KB, 346x297)
111 KB
111 KB PNG
>>106712247
sadly this seems to be the way to go. Sure, I'll try but I know I'm going to hate it.
>>
https://www.kothakotha.com/

Alright guys, I built (Spring, Angular, MySQL) a very simple anonymous, text only forum inspired by 4chan/Reddit. It supports markdown for formatting. There's even a report system for moderation. Right now there is only one category (like boards/subreddits) on it. Feedback is welcome.
>>
File: transcripts.webm (509 KB, 512x734)
509 KB
509 KB WEBM
transcripts
>>
>>106713349
i visited and said hi
>>
>>106713378
well visited
>>
File: ico_container_format.png (27 KB, 320x284)
27 KB
27 KB PNG
What's /wdg/'s take on .ico vs png in various sizes as favicon?
>>
morning web devs, got a question.
do you know of any good and especially open source kanban board web app? I am using gitlab and there I can set up one but I don't want other people to see my kanban, it is not a problem when I put the repo to private but I am going to put it as visible some day and don't want others to see what trash I have written there
>>106713592
I am using svg, maybe it's bad, I don't know but I like it
>>
>>106713592
You should use .ico because all the big websites use that format.
>>
>>106713349
Nice. Do you like Spring? I tried and it's okay. It seems a bit bloated though. I also tried Javalin, a minimal Java web framework, which was easier to figure out. But I guess Spring experience is what employers want.
>>
>No Frills, Just Go: Standard Library Only Web Apps
Go has such a great standard library:
https://www.youtube.com/watch?v=BNSjnUZMXEA
>>
good morning party people.
I am a web dev, mostly frontend with JS/TS, React/Next and I want to learn more about the backend and wonder if I should stay in the JavaScript/TypeScript area or learn additional stuff to be more valuable, I thought about Java for the backend. Would this be a good route or is this stupid?
>>
>>106715232
for one, examine the job postings in your area, see what's in demand, what requirements, what stacks, salary, overall quality of the job offer etc.
>>
>>106715232
I would recommend Go. It's simple, performant, has great tooling, and there's a growing job market for it. But Java is not a bad choice either.
>>
>>106715629
nta, how verbose it is when compared to Java or .net? conceptually is what makes more sense, but you know, google is the big satan of the web
>>
>>106713359
you're killing it dude, gj, any insight to share?
>>
>>106715731
>how verbose it is when compared to Java or .net?
It's only verbose when it needs to be, i.e. making errors explicit.

>google is the big satan of the web
Go is an open source product though, unlike e.g. .net which is something in between an open source project and a Microsoft product.
>>
Just did some work on my shitty website which I'm only making because I thought it might impress employers. Maybe I should have chosen a more interesting project idea.
>>
File: 1758991844041406.jpg (33 KB, 322x468)
33 KB
33 KB JPG
new OP pic
>>
File: proxy-image.png (166 KB, 440x302)
166 KB
166 KB PNG
>>106687188
>Trying out Webstorm because some autist recommended it to me in uni (for ThreeJS dev)
>404 not found error when running the project
>what.exe
>check deployment, looks good
>wait a few minutes
>it works in brave
>open the link in Firefox
>404 not found!
>restart webstorm, wait a few minutes
>open in firefox
>it works
>open it in brave
>404 not found!
FUCK Webstorm! python3 -m http.server saves the day!
>>
>>106715787
>>google is the big satan of the web
>Go is an open source product though, unlike e.g. .net which is something in between an open source project and a Microsoft product.
I think he's right to be more concerned about Google fucking up any of their products than Microsoft fucking up their main system it's been doubling down on for decades.
Both are open source, and neither of those are threatened realistically though.
>>
>>106715741
It's a stupid insight; but indignation has pushed me more than the thought of reward.
>>
>>106717818
>I think he's right to be more concerned about Google fucking up any of their products than Microsoft fucking up their main system it's been doubling down on for decades.
Go isn't a product, it's an open source project. Go hasn't changed a lot while .NET is being changed all the time. Google also has a lot of infra written in Go, so I don't see them fucking it up; it would cause too many problems for them. Go is also used by a lot of other companies, so many big companies have a stake in Go not being fucked up.
>>
>>106718166
Pretty much all of those are true about dotnet too. In fact, I'm pretty sure dotnet is more widely used than Go.
>>
>>106714848
Yeah, it's fine for what I do. I've used it for work, so it feels comfy for me. Javalin seems interesting, though.
>>
>>106713592
ICOs can contain PNGs
>>
hello anons i am new here. ive learned the basics of html/css/js from the mozilla tutorial, what should my next steps be? fancier js stuff? i dont really have any concrete goals in mind as it currently stands, atm i guess these languages are just a bit of a hobby for me. i knew java beforehand, which was helpful for picking up js since a lot of concepts carry over even if the structure/syntax is different; is it the case that java integrates with html/css/js as part of a stack or is that what things like nodejs are for?
>>
>>106719024
java is unrelated unless your webserver is running it
>>
>>106719024
Java and NodeJS are for the same purpose: running on the web server (backend). It uses the database and gives back HTML to the user.
>>
>>106719024
you seem to be just having fun, for having fun I recommend js + canvas, work on 2d animations, mozilla docs can start you iirc
I'll suggest you one exercise, bouncing ball (which you might find in mozilla under canvas), then modifying it to simulate physics like friction and energy/hieght loss
>>
>>106720320
>I recommend js + canvas
Using a canvas would be leaving the realm of web dev for graphics/game dev.
Stick to HTML elements and CSS animations/keyframes or start learning the server side of the full stack.
>>
on second thought,
learning how to draw charts in canvas or SVG would be a worthwhile experience to avoid depending on an external charts library.



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