[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / 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: 1789802653493795.png (202 KB, 855x824)
202 KB PNG
php was bloat we should go back to c
>>
most of the C could be written once and put into a library to be used over and over again
>>
I miss when languages were tailored for its users, when the paragraph tag was <p> and not <ParagraphBreakV130>, when var was $var and not $_REQUEST['var']

and so on
>>
>>110135741
you retards kept saying shit like this and now webtards are doing full stack javascript
>>
File: 1766306094422205.jpg (25 KB, 400x400)
25 KB JPG
>>110135741
>"people" that got filtered by PHP think they'd fare better with C
>>
>>110135741
He just described jeetcoding.
>>
>>110135885
C is simple and just werks
>>
>>110135818
or when a command was "ln" instead of "update-alternatives"
>>
but is it rust safe?
>>
>>110136415
safe to dilate
>>
>>110135885
Bro, I still get PTSD when I see malloc.
>>
>>110136429
why
i wrote a bunch earlier today although i typically do calloc instead even when not strictly necessary
>>
>>110135741
>php was bloat
>posts evidence that C was bloat
>>
>>110136429
You shouldn't have PTHD when you see a malloc(), but when you don't see the related free()
>>
>>110136533
>1 malloc
>The free()s happen in a conditional loop
>>
>>110136711
Just check if the condition can not be fulfilled before the free() happens
>>
>>110136711
unless you're basically crashing why do this?

freeing allocations really isnt complicated you just have to give it a bit of thought
>>
>>110135741
The PHP version looks more suckless.
>>
>>110135741
why did we leave C in the first place?
>>
>>110135885
i tried php, and i liked its simplicity.
but my heart was set for C, and assembly.

php was/is easy
C is easy, when you have someone actually competent at explaining, explaining it
>>
>>110136429
>malloc
>not making heap allocations from an arena
>>
html was broken, it was a bandaid. html was supposed to get better, it didn't.
>>
>>110138614
HTML5 was a god damn miracle compared to HTML4, and especially XHTML.
>>
>>110138510
lazyness
other languages are basically C macros that automate some things but add massive overhead/bloat
>>
>>110138510
Working with strings in C is tedious. Turns out, a lot of programs are just slinging strings around.
>>
>>110135741
>back to c
tcc
>>
>>110139409
Make a string type. Problem solved.
>>
Same page in Crystal

src/main.cr
require "kemal"

get "/" do
name = nil
age = nil
render "views/form.ecr"
end

post "/form" do |env|
name = env.params.body["name"].as(String)
age = env.params.body["age"].as(String)
render "views/form.ecr"
end

Kemal.run


views/form.ecr
<!DOCTYPE html>
<html>
<head>
<title>Form Example</title>
</head>
<body>
<h1>My Example Form</h1>
<form action="/form" method="POST">
Name: <input type="text" name="name">
Age: <input type="text" name="age">
<br>
<input type="submit">
</form>
<% if name %>
<p>Hi <%= name %>, you are <%= age %> years old</p>
<% end %>
</body>
</html>


I didn't put a bunch of tags on one line because that's gay. Either you minify it or you make it look presentable.
>>
>>110135929
>just werks
more like a lot of work
imagine managing memory manually lol
>>
>>110138510
go also uses libc precompiled in their binaries
but this is retarded, binaries always use libc, because that's how linkers work
>>
>>110135741
>I'm not that interested in programming, it's kind of tedious and boring, so if I could reduce the amount of time I had to spend programming
This guy was a god-tier programmer
>>
>>110135741
Before PHP people used Perl, Tcl, or Awk.
Almost no one wrote web apps in C, not because of security (which was lax back then), but because it was too painful for text manipulation.
Amazon, for example, used Perl heavily, at one point (specifically HTML Mason).
Vignette story server, the "enterprise" CMS of the .com era that powered sites like FOXNews.com, was written in Tcl, and so was ArsDigita, a CMS/startup created by Phil Greenspun (used Tcl/AOLServer), a famous Web 1.0 blogger and Harvard prof. who went insane after his wife divorced him, so he moved to Florida went full MAGA crazy.
Hotmail is a partial exception, being written in a mix of Perl/C.
>>
>>110138510
And C is abstracted from Assembly.
What's your point?
>>
>>110139382
>>110139625
>>
>>110139623
>Amazon, for example, used Perl heavily, at one point (specifically HTML Mason).
Actually, "heavily" might be a stretch, as it was used mainly for templating, while Obidos proper was written in C.
>>
>>110135741
php is piss easy thanks to him. so thanks c guy.
>>
>>110139623
Why did perl die anyway?
>inb4 "write-only language" meme
>>
>>110136429
You just parrot shit
>>
>>110139762
Most people (me included) learned Perl to do web scripting, and when better alternatives emerged, it fell by the wayside.
PHP was similar to Perl, but much simpler, easier to learn, more directly suited to web programming, and most importantly, much more efficient because of mod_php.
mod_perl was unusable in shared hosting setups, which was 99% of web hosting back in the early 00s.
You either needed bare metal or a VPS setup if you didn't want to pay the CGI tax.
Tons of cheap webhosts, even free ones, offered PHP with mod_php, while almost none offered mod_perl, only Perl/CGI.



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