[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Lets settle once and for all

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 228
Thread images: 25

File: langs.png (46KB, 640x400px) Image search: [Google]
langs.png
46KB, 640x400px
What's the best language for web apps?
>>
>>58231702
Gonna have to be PHP
>>
>>58231702
Ruby for 90% of webapps, node or elixir for special cases. Most difficult parts of webapps can be handled with the right database or distributed queue, which is the only type of thing that should be written in ridiculous languages like erlang or scala when the language features or vm actually helps
>>
>>58231790
>>58231799
>PHP
>Ruby
wew lad
>>
Go if performance is critical
Python if it needs to get done fast and perf doesnt matter
C# ASP if its enterprise bullshit
>>
File: B9CWDRNCcAAyg5l.jpg_large.jpg (70KB, 692x577px) Image search: [Google]
B9CWDRNCcAAyg5l.jpg_large.jpg
70KB, 692x577px
Mfw when ive been working on a VB.net webapp for the past months (no i didnt have a choice)
>>
Backend: Perl
DB: MongoDB
Frontend: WebAssembly
>>
>>58232237
t. hipster faggot
>>
>>58231702
Backend: Usually python, but depends on your needs.
DB: Usually PostgreSQL, couch and mongo may be options.
Frontend: You don't have an option, all js frameworks are shit.
>>
>>58232237
>perl

Hahahahahahaha
>>
>>58231799
Nah bro, java for 100% projects, you have just to choose the right frameworks and tools.
>>
>>58232237

> Perl

For obfuscation maybe
>>
I've had good experiences with Flask + Python3 in the past.
>>
Java + Spring Boot
Not even kidding.
>>
>>58232433
hi pajeet
>>
Node.js

- npm has the most amount of packages
- client side, server side, REST APIs can all be done in one language, reducing overhead.
- fastest of the three
>>
>>58232237
Did you just draw well-known project names out of a hat to make this post?
>>
>>58231702
Go, of course.
>>
>>58232483
>have to do even the most basic amount of processing on a request
>everything grinds to a halt

I'm not convinced
>>
>>58231702
P Y T H O N
Y
T
H
O
N
>>
>>58232482
>le funny indian maymay XDDD
>>
>>58232497
Might be one of those "jokes" I've heard to much about.
>>
>>58232519
THIS
H
I
S
>>
>>58232483
>- fastest of the three

Node.js isn't faster than Go. It also uses more memory.
>>
It's Python.
>>
>>58231702
You already posted it :-^)
>>
>>58232525
i cant think of any other reason why would anyone willignly use spring desu
>>
>>58231702
Out of the three you've listed, Golang seems to be growing the fastest. It will probably be the fastest of the three and uses far less memory if you're building a real-time app.

Javascript is the bane of my existence, so I would probably prefer Python or Go. Python seems to be much faster to write, but Go might be nicer to use if you're a C fan and performance actually matters (which it won't in the vast majority of cases).

My choices:

Backend: Go, Python, Elixir, Haskell
Frontend: Elm
DB: PostgreSQL
>>
>>58232483
>>> npm has the most amount of packages
Quality > Quantity
>>> Reduces Overhead
Not necessarily. Just because you know JS doesn't mean you'll be able to pick up Node right away. Backend programming is a different beast from frontend.

Context switching isn't as big a deal as most make it out to be.

>>> Fastest of the three
Golang beats Node, especially on multi-core servers, and does it using far less memory.
>>
>>58231702

PHP.

If you need a long-running daemon that uses persistent state as a part of the complete webapp, use Go to write those.
>>
>>58232675
> Golang seems to be growing the fastest
God I hope so, that language is in desperate need of library support
>>
>>58232237
>Backend
>Perl
Good god man
I enjoy working in Perl but it is not meant for that kind of work
>>
ITT: faggots jelly of perl
>>
>>58232483
>- npm has the most amount of packages
left-pad comes to mind
>>
Perl, Mongo (because SQL is a fucking mess), and MINMAL amounts of plain JS on the front end
>>
PHP or Ruby.

Can't argue with ubiquity.
>>
> Mongo.

kek
>>
>>58231790
C is the only one that actually does the job. No surprises there.
>>
Go.
>>
>>58231702
should be elxir for its awesome livereload support.
>>
>>58233270
pardon my plebitude, but what window manager/text editor is that?
>>
>>58231702
Javascript and Go
(also HTML5, HTML, CSS and PHP)
>>
Backend+Fronted in one: Xojo
DB: PostgreSQL
One Caveat:
>it's not an industry standard meme
>>
Ruby desu. It is fun.
>>
>>58231702
Backend: Go, Python
Frontend: JS with Babel, TypeScript
DB: PostgreSQL
>>
File: CkH3YRqUUAA3h1B.jpg (39KB, 600x726px) Image search: [Google]
CkH3YRqUUAA3h1B.jpg
39KB, 600x726px
>>58232483
>mfw I literally needed to write a python script to scrap a page to node.js code because there's no way to make cookies.txt work on node.

Maybe I'm just retarded, but both packages I found on npm didn't work with request.
>>
C
with an IPC mechanism that allows to load .so files in the form of pages and other modules like a database in real time.
Also most resources are also inside the library files so accessing them is not needed so not to waste disk access time
>>
>>58233007
>Mongo (because SQL is a fucking mess)

SQL is a tool, a useful one, and you'd best learn how to use your tools appropriately.

Example on why mongo sucks: Hundreds of millions of documents, perform a count operation on an indexed field where that field equals a certain value. This operation will take minutes to complete because mongo traverses the entire b-tree to count up documents that match your query.

This same operation will take milliseconds on your favorite SQL database.

I have experienced this first hand. My predecessors at work are millennial hipster douche bags and chose mongo because "SQL is hard, man."
>>
C# webapi is pretty sweet and it's always my choice.
>>
C++ once you know what your doing
>>
>>58234948
>no way to make cookies.txt work on node.
>both packages I found on npm didn't work with request.

This is the problem with node. The people who use it don't know how to use it.
>>
Go for dead simple APIs or jobs

Python if there's any complex business logic
>>
Common Lisp for sure
>>
>>58231702
Problem is, you'll be hard pressed to find anything that isn't a either trivial, or a passion project, that doesn't use multiple languages, and possibly frameworks. Heavily.

Nature of the beast.
>>
>>58231790

im gonna have to agree. It's still easy to make apps in php without even using a php framework. No ORM, but you have PDO and a lot more flexibility with PHP7.
>>
>>58232152
>Python if it needs to get done fast and perf doesnt matter

Python isn't '''faster''' to do anything compared to other languages unless you need a specific, established library. And it's established libraries pale in comparison to many other languages.

>>58232483
>- fastest of the three

The moment you do something non-trivial and complex in Node it starts to slow down. It is also much slower than most server languages.

90% of node packages are garbage, and long-term maintenance is going to be horrendous with all those third-party dependencies that stop being supported in 6 months.

>>58235162
>C++ once you know what your doing

Anyone who knows what they are doing isn't going to be using C++ for a new project.

>>58235194
>Common Lisp for sure
((((((((((((((((((((((((()))))))))))))))))))))))))

>>58233007
>Perl, Mongo (because SQL is a fucking mess)

Perl is a fucking mess at maintenance. SQL is a tool when you need to make relational databases. If relationships between data don't matter, than mongoDB is okay.

>>58231702
There is no 'best' language, but there are shitty ones. The least shittiest depends on the project needs.
>>
Idris
>>
File: 34484712.png (79KB, 600x600px) Image search: [Google]
34484712.png
79KB, 600x600px
>>58231702

python
sqlite3
django/flask
uikit
>>
If I was starting something I would use Haskell or Scala on the backend. If they won't let me use those I'd use Java or C#.

Frontend who cares, some dumb javascript framework that will be obsolete in a year.

Backend, postgres.
>>
>>58231702
Ceylon (www.ceylon-lang.org)
It's from Red Hat and made for serverside development in a huge team.
>>
>>58235434
Dear anon,
I'm not working everyday with Databases, but every DB dev I met said that mongoDB is a clusterfuck to work with, and their brain was likely to explode, and was protipped on multiple occasions to avoid it. Could you please specify how mongoDB is ok? I haven't really heard a counterpoint yet to the negative treatment of mongoDB.
>>
>>58231702
web assembly
>>
>>58231702
If performance isn't a big issue, like it isn't for 99% of webapps, Ruby and Rails. It's far faster than anything else at getting a website up and running and iterating quickly.
>>
Most web apps are io-bound anyway so best is whatever you can most effectively shit your app out which is gonna be whatever language you personally know best
>>
>>58232601
>tfw you've willingly used spring as the project lead
>>
>>58233864
looks like tmux and vim

> that vim session
>>
JavaScript, retard.
>>
>>58235776
this except mysql instead of sqlite
>>
>>58231790
This.

PHP is the AK47 of web programming. It sucks, it's old, but it just won't fucking die and when it's time to get shit done PHP will get it done while Ruby, Node, C#, and Python are still fucking around with packages and shit.
>>
>>58237794
If you seriously think python is lacking packages in comparison to php then you need to get in the fucking oven
>>
PHP. The hero we need yet don't deserve.
Coming it a close second is Ruby on Rails.


"Node.JS is like trying to drink water from a coffee mug" ~ Pajeeta
>>
>>58232525
Why else would you use Java when literally every other language is superior?

C++ and C# are both faster and neither of them is as verbose and crusty. They both have more features and run on literally every platform. For example, both C++ and C# had lambdas before Java.

Python, Ruby, PHP, and even fucking Javascript are much faster to write and get shit done and all of them run on every platform.

The only thing Java has over other languages is a poisonous and malicious corporate backer: Oracle. Gee whiz, what a great feature.

You retards only use Java because you've never known anything else. Which speaks volumes about your intelligence, skills, and experience.
>>
>>58237809
Python as a language is Java-tier garbage.

I like the syntax, but Python's semantics are so bad it's like they TRIED to make a bullshit language.

Also, selfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfselfself
>>
>>58237809
He didn't say Python is lacking in packages. He said you could get something running with PHP while a Python programmer is still fucking around with packages. As in, installing them, configuring them, etc.
>>
>>58237878
to be fair any decent IDE will provide self for you. But I agree with the semantics.

__init__ is fucking bullshit when something like def class.init() would have been fine
>>
>>58237894
again that simply isn't true. Look at django - you can have a page and admin console ready to go in 0 lines of code. To do the same in python you need a db, phpmyadmin plus a custom panel for your site. What's that? A few thousand lines of code at least
>>
>>58237907
*to do the same in PHP
>>
>>58231799
>Ruby for 90% of webapps, node or elixir for special cases
>ridiculous languages like erlang or scala
Do you realize that Erlang and Elixir are pretty much the same language?

For reference, Elixir is pretty much Erlang with a different syntax, improved binary string handling, some extra language features like protocols for polymorphism, macros and better tooling.
>>
>>58231702
backend: Scala
frontend: Scala.js

Any other answer is retarded and austistic
>>
>>58238121
saying erlang and elixir is the same language because they both running on BEAM is like saying rust and swift is the same language because they both compile to LLVM
>>
>>58238121
My aunt is my uncle save for a pair of balls.
>>
>>58237907
>>58237907
yea 1000 lines of code minimum
or just google "php flat file database framework"
one of the first hits for me:
http://picocms.org/
>>
>>58233270
god this looks terrible, don't your eyes hurt looking at this?
>>
>>58232237
>MongoDB
You are kidding me, right? I mean, if you're happy writing to a database that doesn't give you any idea that your data is actually written just because you want high performance numbers, why not write to /dev/null? It's fast as hell.
>>
>>58233270
What the fuck is that abomination of a colour scheme.
>>
File: retard-1.jpg-c200.jpg (5KB, 200x200px) Image search: [Google]
retard-1.jpg-c200.jpg
5KB, 200x200px
>>58236060

It's called mongoloidDB for a reason
>>
File: 32828459_big_p0.png (217KB, 640x480px) Image search: [Google]
32828459_big_p0.png
217KB, 640x480px
>>58231702
Clojure!

But really, look at this (It starts getting really cool about 8 minutes in): https://youtu.be/j-kj2qwJa_E

>Works on both client and server (ClojureScript)
>Live reloading of code as you edit files without refreshing pages (Figwheel)
>Can target the JVM or Node.js for a lower memory footprint (Macchiato)
>The entire Java and JavaScript ecosystems work with it
>Free concurrency
>Ridiculously easy to test
>Full integration with JavaScript devtools, including actually debugging and seeing Clojure in your web inspector
>Both browser and server REPLs you can play with which makes it incredible for experimentation
>Ridiculously easy to set up ("lein new reagent")

And to top things off, if you don't use it as your main language, you can embed it right into a Java or JavaScript server as an optional, startable service to help you diagnose problems or script custom actions.
>>
>>58231702

Ruby is the mosty comfy.

If you need a simple server with speed optimization and not much functionality, Golang it is.

For a simple OnePageApp, Node + [insert JS framework of your choice].

Elixir if you need high reliability and a stylish language.

For heavy lifting, Java is OK, but it's.. well, it's still Java.

Python or PHP: Avoid if you can.


>>58239917
>>58239926

Are you retarded?

Elixir compiles to NATIVE ERLANG code. You can use Erlang libraries.
>>
>>58241662
>Elixir compiles to NATIVE ERLANG code. You can use Erlang libraries.

Kill your fucking self, ignorant cunt.

Elixir compile to BEAM (erlang virtual machine) bytecode, the same with erlang. Just like Jruby can use java library, because both of them compile to JVM bytecode.
>>
>>58235434
C++ is the best language for a lot of use cases. All my crypto stuff I've done at work which is world leading shit was in C++ and CUDA C.
>>
>>58241709 (You)

Exactly.

So basically you programm in Erlang with some syntactic sugar and a slightly differnt abstraction.
>>
File: cpp_vs_java.png (21KB, 800x600px) Image search: [Google]
cpp_vs_java.png
21KB, 800x600px
>>58237850
topkek, 90% shit you wrote here is false
>>
Python if you want to get something small done quick.
Node.js for single page applications.
Java for big projects that require some heavy lifting.
>>
>>58232433
this tb᠎h f᠎am

if you want a fast, solid, configurable system Spring boot is the way to go.

i know there's many people who hate Spring but Spring Boot really fixes most of the problems that Spring had. no more xml files either.
>>
>>58237850
Does C# run well on Linux finally? Been out of the loop for a bit.
>>
>>58239196
>Scala.js
Enjoy your loading times.
>>
>>58241879
Why don't they fucking finally get value types.
>>
>>58239917
>>58239926
>rust and swift is the same language because they both compile to LLVM
Rust and Swift have different semantics (most noticeably manual memory management proved to be correct by the type system vs. ARC). Elixir's and Erlang's semantics are almost all the same, i.e., the native semantics of BEAM. There have been languages that implement different semantics on top of BEAM like Reia but Elixir isn't one of them.
>>58241662
>Elixir compiles to NATIVE ERLANG code.
More likely than not you mean the same thing I do but that is not a good way to put it.
>>58241709
>Elixir compile to BEAM (erlang virtual machine) bytecode, the same with erlang
The point isn't just that Erlang and Elixir both compile to BEAM bytecode; it is that not counting the macros and such code that solves the same task in Erlang and in Elixir would compile to just about the same bytecode. This isn't true of, say, JRuby and Java. If you want a comparison from the JVM world, Elixir is more like Xtend than JRuby.
>>
File: 1440500067081.gif (18KB, 104x104px) Image search: [Google]
1440500067081.gif
18KB, 104x104px
>>58231702
>PHP
Designed for web programming, has tight integration with webservers. However the syntax is somewhat shitty and some of the language features act weirdly and unpredictably.
>Ruby, Python, Perl
General languages not initially designed for web programming but usable for it with the right framework (Rails, Django etc). Less clunky than PHP but requires fucking around with CGI.
>Java/ASP.NET
Enterprise level programming, but require some more work to set up. ASP.NET requires the .NET framework, and that can be an issue on linux.
>whatever remains
Either not made for it, obscure as fuck or something I don't know. Also Node isn't a fucking language but a server that uses javascript.

Just stick to PHP if you need it simple and stupid, or take your pick from Python, Ruby or Perl if you need a more consistent and decent language. Use ASP/NET if you need it to interface with something microsoft-related.
>>
>>58241879
Source pls. Otherwise I'll fire up excel and create a chart that says I compute primes faster than Java.
>>
>>58231702
import "fmt"
func main(){
fmt.Println("Go in the backend, of course")
fmt.Println("Vanilla JS for everything else")
}
>>
>>58242271

maybe its only me but i find the PHP syntax incredibly easy to understand. When i first started i tried to learn asp.net and it just wasnt clicking. Finally I moved away from M$ and tried PHP and "it just werked" for me. Guess each of us react differently...
>>
>>58239196
> Scala.js

Even angular isn't this bloated and slow.
>>
>>58242040
>Spring Boot really fixes

Spring Boot doesn't fix anything. All the underlying problems with Spring and runtime scoped annotations are still there. Spring Boot just tries to configure things so that you can attempt to ignore that you're building on top of a foundation of shit.
>>
>>58240162
Does this /dev/null support sharding?
>>
>>58237794
>when it's time to get shit done PHP will get it done while Ruby, Node, C#, and Python are still fucking around with packages and shit
That's sort of true, but only for trivially short PHP scripts with no dependencies when you already have a LAMP server set up. For the kind of web application that has user accounts and talks to a database Rails and Django are at least as productive as Laravel, Symphony, etc. and run faster (check TechEmpower).

>>58239969
>google "php flat file database framework"
>click the top result
>it's a cms
>same difference
Are you one of those "WordPress developers"?
>>
File: 1464415107822.jpg (45KB, 728x728px) Image search: [Google]
1464415107822.jpg
45KB, 728x728px
>Really like C#
>ASP.NET is absolute dogshit

What are my alternatives?
>>
>>58237850
This smells like a freshman CS student's second hand opinion.
>>
how much of a meme is it to run PHP on IIS?
>>
>>58242271
>has tight integration with webservers
>requires fucking around with CGI
LOL. You have no idea what you're talking about.
>>
>>58243290
Why is ASP.NET dogshit? Actual question.
>>
>>58231702
PHP
>>
>>58243374

not him, but i generally don't think it's a good idea to learn asp.net/c#, at least for a first language or framework because you'll deal with a lot of M$ and windows specific stuff. Kinda takes away from learning what's actually going on on a base level. It's an unnecessary layer IMO. There's a reason why uni's don't bombard students with it. If M$ controls your life, then i would say learn .net CORE instead....at least that runs cross platform
>>
>>58232483
>npm has the most amount of packages
Only because JavaScript's standard library is pathetic.
Remember left-pad?
>>
ASM
>>
I still use Perl for everything
>>
File: india_fecal_matter_meme.png (116KB, 678x610px) Image search: [Google]
india_fecal_matter_meme.png
116KB, 678x610px
>>58231702
I use Django now and it's fine. I tried ROR a bit, it seemed too magical.
PHP is really popular in my country, though I have heard so many bad things about it on /g/ and elsewhere so I barely touched it. The thing that scared me off the most is the supposed lack of any security, and that if you don't write tons of boilerplate you can be pwned by simple SQL injections.
How much of this is true? Modern PHP still has this issue?
I'm really bored on holidays, I might learn PHP if it's not that bad.
>>
>>58242059
Mono.
>>
>>58243129
Yeah, Spring negates a lot of the advantages of using a statically typed language.
>>
>>58245116
>Modern PHP still has this issue?
Even with reasonably "modern" PHP versions like 5.6 you've got to be careful to not call the flawed legacy functions. The bad stuff is deprecated but it is still there and there is a lot of crappy online tutorials that tell you to use it. Follow the best practices (e.g., http://www.phptherightway.com/) and you'll be all right.

Overall, though, I don't think PHP is worth using if you know something else and have a choice.
>>
>>58245116
https://laurent22.github.io/so-injections/
>>
>>58245116
>poop
>pajeet
kek
>>
Nobody here use C++? Why is that? It's one of the most versatile languages out there.
>>
>>58247736
pls gtfo of this board and kys
>>
>>58247736
>Nobody here use C++? Why is that? It's one of the most versatile languages out there.

It's too versatile for most. A good example of why giving people too many options and tools ends up leading to mostly worse projects.

Most languages now strive to be Idiomatic. To have the least number of ways to do things, and to be clearly expressive rather than magical.

Golang is a good example of this desire, and it seems to have worked out pretty well so far.

>>58246942
>Overall, though, I don't think PHP is worth using if you know something else and have a choice

Have to agree here, PHP is just too fucked the way it is. Facebook tried their .Hack spin off or some shit, and it didn't get picked up either. Legacy is what makes PHP desirable in the first place. Without that, it is just a bad programming language, poorly suited to run the modern web.

>>58244839
>I still use Perl for everything

Everyone maintaining your code-base hates you.

>>58236060
>Could you please specify how mongoDB is ok?

If you don't care about your data relationships. A good example is a simple phone-logging system where you just need to dump the data and retrieve it back every now and then. Modelling MongoDB is piss easy since it is in json format, so you can usually hook it to your server really quick. A common advantage is if you are using Node.js on your back-end, you can keep all data stored as a json object for pretty much the entire system. The moment you want to do anything actually interesting with your data it starts to fall apart.

>>58236851
>If performance isn't a big issue, like it isn't for 99% of webapps, Ruby and Rails. It's far faster than anything else at getting a website up and running and iterating quickly.

It isn't 2008 anymore, every language nowadays can get you up and running within an hour, even the most difficult to configure ones.

>>58241223
There is tooling to do almost all of that in other languages.
>>
File: 68506954.jpg (126KB, 640x480px) Image search: [Google]
68506954.jpg
126KB, 640x480px
>>58231702
Perl masterrace.
>>
>>58239196
>scala

ya i sure love having a shitty JVM language that can actually throw StackOverflowExceptions from very basic use cases, like folds.
>>
Whoa re these faggots talking about making websites using fucking C and C++?

hell even fucking Go, quite possibly the most backward looking language ever made that actually has users.

lets see some fucking source code because you people are fucking full of shit.

>>58248171
are you ready for Perl 6?
>>
>>58248128
>There is tooling to do almost all of that in other languages.
Um no? A lot of them can be done individually by separate langues, but there is an incredibly important difference here, and I should have emphasized it better:

>Live reloading of code as you edit files without refreshing pages (Figwheel)
I am not talking about hotswapping code into a server. I am talking about editing a random file on your server, and automatically seeing all changes in realtime on your browser without having to reload.

That is ridiculously useful for development.
>>
>>58248128
Some of it, yeah. But there are some things that can't be done elsewhere, and no individual language has tooling for all of it.
>>
>>58248128
>>58248819
Oh, I was talking about Clojure. It's pretty boss.
>>
File: 8.gif (579KB, 160x160px) Image search: [Google]
8.gif
579KB, 160x160px
>>58231702
tfw stuck using java server faces for govt contracted web app
>>
File: ready.png (310KB, 479x337px) Image search: [Google]
ready.png
310KB, 479x337px
>>58248701
>>
>>58235129
Maintenance is more important than ancient wizard magic And this is why nobody likes you.
>>
>>58242271
>Perl
>Python
>decent languages
lol
>>
File: image.png (219KB, 335x280px) Image search: [Google]
image.png
219KB, 335x280px
I don't pretend to be an expert like most people in this thread. Never understood why people do that. It's anonymous, you make yourself feel special, but you spread bullshit information. You stupid NEET.

Anyways, I have a question for the employed here. Who actually know what they're talking about...

I understand that languages which work on all platforms are faster to get work done, but obviously that comes with the issue of bloat and all that. So, I'm thinking... Why don't people use C, which I've seen used exclusively for operating systems... But maybe even something like C++ instead of Java or whatever. Even for a website backend. Yes, it'll take more work, but isn't that better? It's be more efficient on every single level aside from time. Isn't it better for future maintenance and future proofing? You're going to have to work on it EVENTUALLY... Why take the easy way out and cuck yourself later on?

Excuse the question, I don't pretend to be an expert, but I've always wondered this. Why not just program in C or something lower level? Why instantly jump to something like JavaScript and take the easy way out? Doesn't that hurt us as a whole?
>>
>>58248973
this

the only good scripting language is javascript
>>
"lets settle once and for all"

lel

yeah. Good luck
>>
>>58249075
idk man, I think we all pretty much settled on rust at this point
>>
>>58247736
Using memory unsafe languages for web development is retarded.
>>
File: thisKJFJA.png (39KB, 392x200px) Image search: [Google]
thisKJFJA.png
39KB, 392x200px
>>58249041
>>
>>58249088

fb did it

>>58249087

i thought we all agreed on assembly.
>>
>>58249088
this

people who program for web couldn't give less of a fuck for performance, even backend

I just cant trust a gaggle of indians with memory managment
>>
>>58249041
because C is fucking gay and hard to design securely.

Hell even GNOME made Vala to fix how awful C is while still being compatible with glib and GTK+

C++ is just bad.
I legitimately do not understand how anyone can like it over Java.
It has obnoxious design, syntax and a crap load of wtf tier features while potentially being as unsafe as C if you don't use said features.

Also Java is binary compatible with any proper JVM implementation, so you can just point your Ansible/uDeploy, or whatever meme deployment automation system you use, at literally any server, linux or even wangblows, and magically have a functioning java stack.

good luck doing that with C++ or even C. best bet, if you're targeting windows is if you have mingw build servers. but even then, more shit to worry about.

Also protip on performance.
You can SCALE very easily, especially now the industry is leveraging microservice design and software load balancers.
Most DBAs understand db scale as well, so you get the positives of that.
>>
>>58249041
>Why instantly jump to something like JavaScript and take the easy way out?
>take the easy way out

That last bit is the response to your entire post in most cases. Why fuck around with a compiled language when you can chuck some PHP code into a file and everything works? Sounds like wasteman logic but that gets the job done.
>>
>>58249041

Servers are long running processes. If you have a memory leak somewhere(very common in C/C++) then eventually you'll run out and the server will crash. It's better to use something garbage collected for a long running process.

That said some companies do build their backends in C. They usually have very deep pockets to afford to do that, and are the type of company to save millions by optimizing something by 10%. So for them it's worth it.
>>
>>58231790
>LOL LISP PARENTHS CRAAAAAAZY PEOPLE
Why do brainlets make the same joke about Lisp over and over again?
>>
>>58235434
>>Common Lisp for sure
>((((((((((((((((((((((((()))))))))))))))))))))))))
Is this really the only argument against Common Lisp? I guess lots of pajeets around here don't even know enough to criticize it beyond the most superficial of levels.
>>
>>58249041
>I understand that languages which work on all platforms are faster to get work done, but obviously that comes with the issue of bloat and all that. So, I'm thinking... Why don't people use C, which I've seen used exclusively for operating systems... But maybe even something like C++ instead of Java or whatever. Even for a website backend. Yes, it'll take more work, but isn't that better?
Go tries to do just that.
it's multiplatform, fast, manages resources very well, and even makes concurrency part of the language. it's easy to write, safe (as possibly as it can be, as much as its authors try to), and so on
it's still a new lang/platform, so it lacks a lot of stuff, and also, the lang itself lacks some features (which make some people hate it.. although I bet most of those haven't even tried it)

but enough shilling, start here if you want to learn the lang/know more:
https://tour.golang.org
then go here if you want to learn how to use it as the backend for your webapp:
https://golang.org/doc/articles/wiki/
>>
>>58249240
pretty much.

most people forget that lisp is basically an ast. if parens are so cancerous, you could make a lisp using the ever so beloved json syntax.
>>
>>58249261
it's also a poorly designed shit language that takes a step backward in language design by trying to distance itself from functional and object oriented design.
>>
File: Capture.png (48KB, 910x450px) Image search: [Google]
Capture.png
48KB, 910x450px
>>58249182
That's what I mean though, it's better in the long run. You're going to win anyways. If you don't do it right from the start, you'll pay for it later one way or another.
>>
wutz a server?
>>
>>58249273
J-expressions make Javascript the acceptable Lisp

The consistent implementation of key enumeration order of objects in Javascript engines allows us to write specifications of composeable computations using generic JSON-serializable notation that we can call “J-expressions”.

{opname: main_parameter,
keyword1: value1,
keyword2: value2,
...}


J-expressions, in combination with functions that implement what the operation named opname is supposed to do, are then a systematic way to approach DSL construction within Javascript. The notation is as expressive as s-expressions.
>>
>>58249304
yes. so what?
why do you like syntactic sugar, retarded abstractions, and stupid concepts that go far from what the real job the machine is doing, etc?

>>58249261
forgot to mention: VERY FUCKING STABLE
I had my website running for 3+ months after releasing the very first version of it... and, guess what, not even one fucking crash, error message, NOTHING. of course this also depends on the dev... but, seriously, no fucking surprises.
>>
>>58249400
ya pretty much.

I used a similar approach to build an automation tool, similar to Ansible, for my bachelor's thesis.
>>
>>58249429
Go, the whole lang, is going "far from what the real the machine is doing" by it's nature.

Just because you don't have something like a Virtual Machine runtime like java doesn't mean you don't have a lot of the same design concepts, especially your beloved garbage collector, in your shitty massive Go binaries.

Also there is a reason the industry jumped on OO when it became cool.

purely imperative is a nightmare of terrible design, like Go as a whole.

also, shit like map is comfy as fuck. Don't hate.
>>
>>58231702
Django
>>
>>58249480
Django isn't a language you bellend.
>>
>>58249497
Then why is Node.js a language?
>>
>>58249517
it isn't

it's just a javascript runtime for use outside of a web browser.

it's like how gjs is to GNOME.
>>
>>58249517
Its not. Nodejs is just V8 with some libs and a package manager.
>>
>>58249540
>>58249546

So Node.js is in the OP...but Django isn't because it's not a language....
>>
Soon rust.
>>
>>58249470
>Go, the whole lang, is going "far from what the real the machine is doing" by it's nature.
lolno, Go compiles to machine code, and you can write ASM in it (although it's not your "common" intel/at&t asm).
also, it embeds a tiny GC in your binaries. that's all.

>Just because you don't have something like a Virtual Machine runtime like java doesn't mean you don't have a lot of the same design concepts, especially your beloved garbage collector, in your shitty massive Go binaries.
if you compared those "shitty massive Go binaries" against statically linked C/C++ binaries... you'd get the same size

>Also there is a reason the industry jumped on OO when it became cool.
>purely imperative is a nightmare of terrible design, like Go as a whole.
which is why Go takes some abstractions from OO, while avoding the rest.

>also, shit like map is comfy as fuck. Don't hate.
didn't say otherwise.
but, see: Go takes the best features from other langs, simplifies some of them, and mixes them. do you see the problem with that? I don't.
>>
>>58249041

It depends on what is being developed.

A lot of companies are making webapps where performance is not the biggest goal so being able to produce an app and make changes quickly is important.

Also remember that the average software company is not perfect. Imagine writing software with 20 other people in C. If those 20 other people are good devs then yeah maybe things work out. Now what if they are average devs or even shitty devs?

I work at a big slow corporate company and managed to get into managing cloud systems instead of pure development (thank god) but the 120 dev clusterfuck of a project would never have survived if it was written in C. Java lets even shitty developers get together and push something functional out even if it is misery to work on.

Now a team of 20 or less competent devs could probably do a better job but that is not how retarded corporations do things.

I have not worked in much of a startup environment but even with smaller competent teams people use things like Node.js to quickly get a product out the door and continue making and deploying features fast.
>>
>>58249577
Node.js is the name of both the runtime and the libraries, Django is a framework that runs on a python runtime (like python, or pypy)
>>
>>58249606
>Go compiles to machine code

O WOW LOOKY YOU

you have ahead of time compilation for a runtime dependent language!

SO MODERN (not even remotely).

why the fuck are you doing inline asm anyhow.
stop being stupid.

and i highly doubt all you have is a "tracing gc" as your only runtime requirement.
>>
>>58249778
>you have ahead of time compilation for a runtime dependent language!
C is runtime dependent :^]
>>
>>58235434
I agree with everything except with Mongo. Mongo is just a fucking mess to manage on a large scale. You should use relational db's in general for your own sanity and only use non-relational db's for specific use cases.
>>
>>58232872
Go's pretty good as is? I mean it could always do with more, but that's not it's weak point.
>>
>>58232872
Go has lots of libraries. It also has great tooling, fantastic documentation, and a community like no other. It's incredible. Switching to Go has made my life so much easier, inside and outside work.
>>
>>58249304
no it's a well designed language that focuses on things that are needed to get work done.

The only real way to discover this is use it for a while and realize how easily you're writing code that does stuff well.

also, good vid re: object oriented stuff
https://www.youtube.com/watch?v=QM1iUe6IofM
>>
>>58249088
C/C++ programs are only memory unsafe if you write them that way :^)
Languages shouldn't compromise performance by retard-proofing themselves
>>
>>58237794
>PHP is the AK47 of web programming
The AK47 is an incredibly versatile, powerful, and dependable weapon. PHP is none of these things.
>>
>>58250450
I was waiting for that response. I want believe your smiley and assume you're joking, but between you and me there are really people on this board dumb enough to think that way about serving html over the public internet with all of its inherent latency and security threats.
>>
>>58250726
imho if you want to serve static html, or a basic dynamic website, you should choose something safe and easy.

If you are writing a high throughput low latency REST API with huge bandwidth and intensive computations, then C might be the right choice. I've used C to write the server interface for a app/web game before. It worked beuatifully, and I even added HTTP/2 support. I statically analyzed the code and took all the security precautions one would take.
>>
>>58249120
fb also doesn't test their code...¯\_(ツ)_/¯
>>
>>58250873
That's reasonable, but I get the feeling most people who bring up C and C++ in web development threads tend just to blurt it out because it's lolsofast and hardcore, without considering the need, the risks, or their own ability with the languages.
>>
>>58248734
>I am not talking about hotswapping code into a server. I am talking about editing a random file on your server, and automatically seeing all changes in realtime on your browser without having to reload.

elixir/erlang do it better
>>
>>58252354
Oh..? Care to elaborate?
I always through Figwheel was one of Clojure's killer features.
>>
>>58231790
This is the correct answer.
>>
>>58243374
Its not and it's only 2nd to PHP in distribution.

PHP is 82% of the internet and 40% of websites are wordpress.

ASP.net is 13%

Java is a whopping 4% (and is curry hell)
>>
>>58231790
>the lisp one
topkek
>>
>>58252354
>elixir/erlang do it better
What are you talking about? It does neither of those things.
>>
File: ehow_php.png (161KB, 1200x1200px) Image search: [Google]
ehow_php.png
161KB, 1200x1200px
>>58246942

There is some hilarious PHP documentation sitting near the top of Google searches for common questions.

It's not the language's fault this exists, but fuck me, a lot of people read this sort of thing.
>>
>>58253153


I can only speak for Erlang but..

It's been a core feature since its inception to allow hot code loads. You can do a minor hot patch by attaching to the instance and running:


l(module).



Which (re)loads the module. Or you can use the OTP release process which lets you hot upgrade the whole application version.
>>
>>58253153
don't know much about clojure, but when I run phoenix app in development mode, I can create, delete, move files around and it still works. Yes, both assets files (js, css) and elixir files (ex eex). All happens in matter of milliseconds.
>>
>>58253771
phoenix does.
>>
>>58237812
>Ruby on rails.
Disgusting.
>>
>>58245199
stop.
>>
>>58231790
this
>>
>>58253995
That's not quite what I meant... I mean that you can change serverside or clientside code, and the changes appear instantly in your browser. You don't reload your browser or evaluate anything, you just save a file and watch things update without any other input.

So, if you were working on something that required a few steps to get to on the interface, you would just do those things once, and then watch as those things change as you update the code.

Hot code loading is nice, but this is so much more then that.

>>58254201
Got any demos? I looked for videos on it on YouTube but the results were not really that enlightening. I'm still not 100% sure we are talking about the same thing.

In Clojure world, I mean this: https://www.youtube.com/watch?v=j-kj2qwJa_E

It was linked earlier in this thread, but it is a really nice demo I think. The actual demonstration of Figwheel as opposed to explaining the problem starts about ten minutes in.

If you do mean this, that's pretty sweet. I never really considered looking into Erlang or Elixir before. Largely because I found Clojure to be really fun to use. I might give it a go.
>>
>>58254558
>Figwheel
turn out it just client side? Because figwheel is about clojurescript if I understand correctly.

Well, while phoenix doesn't look as nice as the demo (livereload dom elements), but you can get automatic reload when the following files are changed: css, js, html(eex) or even server codes like models or controllers.
>>
>>58254558
>That's not quite what I meant... I mean that you can change serverside or clientside code, and the changes appear instantly in your browser. You don't reload your browser or evaluate anything, you just save a file and watch things update without any other input.

well, almost any of those technology out there can do that, just using browsersync in proxy mode. What count is the reloading of server logic though.
>>
>>58231702
the one with the least package management overhead bullshit
>>
00 buckshot to the skull.
>>
>>58255031
>turn out it just client side? Because figwheel is about clojurescript if I understand correctly.
This is half-correct. It is true this only applies to ClojureScript, but it works serverside too because of Macchiato--which is how you target Node.js with ClojureScript.

Figwheel on Node.js works really nicely, and it is nice to never have to restart your Node process whenever you want to work on something.

>>58255046
It looks like Browsersync can automate loading of the pages, but this allows you to avoid reloading altogether.

Why I wasn't sure if we were talking about the same thing is that everything is immutable in Clojure, and the code that does anything with requests is functional. This is what allows you to just hotswap server and client logic without weird problems cropping up.

I wasn't sure how that was handled in Elixir because I am largely unfamiliar with it.
>>
>>58255638
>This is half-correct. It is true this only applies to ClojureScript, but it works serverside too because of Macchiato--which is how you target Node.js with ClojureScript.
>Macchiato
Yet another library. Also nodejs. Probably require ton of configs also.

You know, I just install elixir/phoenix, type mix phoenix.new my_app to generate a new project, and everything will work just fine.

>Why I wasn't sure if we were talking about the same thing is that everything is immutable in Clojure, and the code that does anything with requests is functional. This is what allows you to just hotswap server and client logic without weird problems cropping up.

the same with elixir. And I'm confident that Elixir/Phoenix will just do it better, because support hot code patch and supervisor (restart the processes tree when crash).
>>
>>58256003
>Yet another library. Also nodejs.
Both of these are true.

>Probably require ton of configs also.
This one is not though. You just run "lein new macchiato $NAME", and you have it up and running. This isn't more complicated than "mix phoenix.new $NAME".

>the same with elixir. And I'm confident that Elixir/Phoenix will just do it better, because support hot code patch and supervisor (restart the processes tree when crash).
It's certainly possible, but keep in mind a large portion of the entire Clojure ecosystem is based on being able to hotswap things safely.

I wonder how the two really compare in actuality. Clojure's reloadability is at the pinnacle of the practice, so if Elixir can compete against it, it has to be really, really good.
>>
>>58250688
>>>58237794
>>PHP is the AK47 of web programming
>The AK47 is an incredibly versatile, powerful, and dependable weapon. PHP is none of these things.
PHP has been all of those things for over 10 years. Like, back when you were probably still on dialup, or possibly before you were even born. Could you name a single other language that has achieved that degree of dominance? No? See >>58253217
>>
>>58235434
Relationships between data almost always matter, but Mongo mongoloids don't realize this until it's too late
>>
>>58249240
Because if you write fuckhuge nested expressions in any other language it would be considered obnoxious. It forces you to write obnoxious code
>>
File: frog_rising.jpg (23KB, 438x438px) Image search: [Google]
frog_rising.jpg
23KB, 438x438px
>>58240162
But... Eventually you'll have consistent data.

t. dba
>>
>>58233007
>SQL is a mess

Do you mean the language, or a specific RDBMS? If so, which one(s) have you tried?
>>
File: download.jpg (7KB, 225x225px) Image search: [Google]
download.jpg
7KB, 225x225px
>>58236060
I will stick everything in a relational database and only pull it out when it makes sense.

For example Elasticsearch for full text search, Redis or Riak for caching data to keep repetitive calls to largely static data away from the database, etc.

Attaining minimal competency with relational databases isn't hard anymore.
>>
>>58237778
Good luck with your constant data corruption.
>>
File: 1443196658243.jpg (75KB, 622x647px) Image search: [Google]
1443196658243.jpg
75KB, 622x647px
>>58231790
fpbp
>>
>>58256602
meme lord detected
>>
File: laughing.png (822KB, 525x809px) Image search: [Google]
laughing.png
822KB, 525x809px
>>58256664
Yeah, totally. Just remember to post your data recovery questions directly to dba.stackexchange.com so mods don't have to migrate it.
>>
>Ctrl F
>brainfuck
>0/0
WHAT'S THE MATTER WITH Y'ALL
>>
HTML
>>
>>58241223
I agree. Never have been as productive as with the CLJ/CLJS combo.

>>58255638
>It is true this only applies to ClojureScript, but it works serverside too because of Macchiato

There is a solution for the JVM, too (ring-reload).
>>
>>58256143
>I wonder how the two really compare in actuality
I know far more about Erlang/Elixir/etc. than about Clojure and I'd also love to see a good comparison. Here is an overview of how Erlang does it: http://erlang.org/doc/reference_manual/code_loading.html
>>
Assembly
>>
Smalltalk :^)
>>
>>58259919
Every year or so I read a blog post that swears by Pharo for web development, but apparently there's, like, five people using it.
>>
>>58259919
>using the smiley with a carat nose
>>
>>58231790
I honestly wish that Pascal and certain BASIC implementations were more popular.
>>
>>58231799
>hoping to fix the "difficult" parts of a webapp by using a different database or queue

Good luck fixing any of that kind of thing properly with that ActiveRecord abomination fucking up the SQL skills of your entire community.

Also:
>elixir
>ever

Fuck. No. You might as well have jumped on board with Crystal if you're going to be a "next big thing as viewed as an unoriginal Railsfag" perspective.
>>
>>58232297
>mongo

Please just let this die already.
>>
>>58235129
> SQL is hard, man

REEEEEEEEEEEEEEEEEEEEEEEEE!
>>
>>58249041
C++ isn't that easier to work with. Not really.

Java is just simpler to deal with. It has a better String type for web, it has more good frameworks (C++ has what, PHP?), JDBC is actually pretty fucking great, and is getting better, it makes it rather easy to integrate multiple data sources, etc.

If I want to throw up a simple webserver in Java, I could just do:

import static spark.Spark.get;

public static void main(String... args) {
get("/hello", (req, res) -> "Hello World");
}


It's not actually very hard to get something set up with Java.

And then there's the tooling.
Maven/Gradle are both great.
Unit testing is 10/10: It's okay - IGN.com
Jenkins for CI is awesome.
You can tell your build-tool to build a singular file that contains the entire web-application that you can just deploy to the web-server.

It just has a lot of stuff that makes development fucking doable.

I define my project in an annoying xml-file that says what dependencies it has, and my build tool uses its meme-magic to fix all that stuff for me. I don't have to care.

I then have my code in a predefined set of folders. I can point my IDE to it and it understands the project and imports it accordingly, and talks to the build-tool, integrating it into the development environment.

I now also get unit-testing frameworks, and my IDE can automatically create test-units for every class I have. I then init git, and since Jenkins works with git, I can set it up so that when I push to Jenkins' repository, it will automatically run all integration tests, and build my deployment files.

Java has all this tooling that makes this stuff really fucking easy. Even if the original setup can be a fucking chore, you only do it once per project, and if the project is to last for say, 5 years, it's really worth it.

Java shines when you have larger complicated projects. For smaller projects it doesn't make that much sense, but it's serviceable.
>>
>>58249470
Java is actually pretty close to what the machine is REALLY doing. It's just that the machine is a virtual CPU that is cheap to emulate.

So what the machine is really doing, is to emulate the x86-64 CISC instruction set that emulates the JVM instruction set. More or less. I'm drunk and it's midnight.

Happy new year.

>>58253809
I find that sad, and not funny. But the population of PHP users have always been the best argument against PHP.
>>
>>58263327
>I find that sad, and not funny. But the population of PHP users have always been the best argument against PHP.
The people who laugh at those users the most are actually PHP devs too.

When you get really good at something like PHP, the lolnope code, the ridiculous things it does, the users who think they are the best programmers in the world because they can use language features, and the inconstancy that is at every level of the language all become kind of morbid in-jokes.

If you look at this: https://www.reddit.com/r/lolphp/

Would you think this was a bunch of people who hate PHP and like to find the ridiculous stuff it does? If so, you would be right.
Would you think this was a bunch of people who voluntarily write PHP on a regular basis? If so, you would also be right.

PHP is not a good language.

It's killer feature is it is very easy to get set up in no time at all and the feedback loop is pretty good. Know how serverside Figwheel for Clojure sounds amazing? (>>58254558) Yeah. PHP does that by default. (Not to say that PHP compares in any reasonable way to Clojure)

The reason why you don't rip your hair out on a regular basis with modern PHP development is because library writers, the people who are actually really good at PHP (And the posters of lolphp) have tried incredibly hard to iron out the issues with the language--so instead of you ripping your hair out, we rip out ours.
>>
File: 1482378040154.gif (405KB, 722x720px) Image search: [Google]
1482378040154.gif
405KB, 722x720px
Crystal and Lua
You just don't know it yet
>>
>>58231702

PHP by itself can be annoying as it requires to write alot of code etc.

However PHP paired with Composer, a good framework such as Symfony, Laravel, Slim3, and a few core libs is incredibly good and scalable.

JEE is necessary for very big, corporate projects and is not easy to learn neither allows to provide content quickly.

Ruby using Rails framework is a very good alternative to PHP and you can actually find many Ruby developpers to be former PHP developpers.

ASP is meant for full-microsoft environnement but suffers the lack of community and ecosystem unlike the above mentionned technologies.
>>
>>58249212
>>58249240
sour grapes
Thread posts: 228
Thread images: 25


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.