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



Thread archived.
You cannot reply anymore.



File: wojak.png (17 KB, 600x378)
17 KB
17 KB PNG
What's your favorite programming language?
>>
>>64102485
C
>>
English
>>
Español
>>
I program you rmom with my DICK
>>
>>64102489
this
>>
>>64102485
C#
>>
Go, Plan 9 C, Erlang and Haskell
>>
>>64102485
punjabi
>>
JavaScript
>>
>>64102485
Python 3. Anyone who isn't using the newest release should get on with times.
>>
>>64102485
My favourite language is Lisp but for all practical intents and purposes it has to be JavaScript.
>>
>>64102485
why do these new males like JS so much?
it's literally the aids of websites.
>>
Scala.
>>
>>64103254
i think it's due to two factors: low barrier of entry and easy to get started.
every browser has js, you can just try it out in a console. you also don't need to know shit about types, compilers, ides etc.
>>
>>64103324
>you also don't need to know shit
that's not a good thing
>>
>>64103348
it is a good thing when you're getting started. the less you need to know just to get moving, the better.
i'm not saying it's a good thing to stay in that stage, but you asked why it was popular and i answered.
>>
>>64103254

What >>64103324 said. I think there's more to it than that. Javascript, by its very nature is front end. Back end javascript (NodeJS) is an absolute fucking joke. It lets the numale think he is doing something meaningful, but in realty is just making an STD-riddled, pretty-on-the-outside-but-ugly-on-the-inside mess of barely usable garbage that will inevitably blow up in his chronically agape face.

Truly the most feminist of programming languages.
>>
>>64102702
Esto.
>>
professional js developer here. ama
>>
>>64103523
How much cum do you guzzle on a daily basis to appease the HR department?
>>
>>64103523
Why haven't you lot committed mass suicide so actual programmers can get bet jobs?
>>
>>64103523
Why does this return 0?
{}+''
>>
>>64103523
does the syntax not looking disgusting for you?
>>
>>64102485

Having a favorite programming language is retarded because all programming languages suck, and anyone that's programmed for long enough has come to this conclusion. You simply pick the least worst one for a given problem domain.
>>
>>64102485
The ones I make myself.
>>
>>64102485
HTML5
>>
>>64103612
/thread
>>
>>64102708
Zztails?
>>
>>64102767

Perfection
>>
8086 assembly language.
>>
>>64103458

If you can't build a scalable stable web application with js then you are doing something wrong. it has a lot of problems but if people actually bother to learn the language like they would any other you can avoid the bad parts completely.

Doesn't help that most web devs haven't touched any other languages or written anything besides whatever they did for university projects.

Tldr. Language isn't the problem it's the shit programmers
>>
>>64103254
>new males
nufag detected
>>
>>64104089
>the language is fine when you avoid all the bad parts
>>
>>64104253

There are no circumstances where you need to use them. What is your argument again
>>
>>64104253
that's true of literally any language
>>
/g/ truly is just /v/ 2.0
The same shitposting, with the same memes.
>>
>>64104279
My argument is that avoiding the bad parts of a language does not fix the problem; someone is going to use those bad parts anyway.
>>
>>64102489
MOSSACK! DISHA, DISHA.
>>
>>64104292
Nu-males is not a /v/ meme you soyboy.
Also, go back to your containment area.
>>
>>64104294
>idioms do not exist
>conventions and guidelines do not exist
>specific practices do not exist
It's like you've never actually worked with programming.
>>
Latex *going to /sci/*
>>
File: index.png (9 KB, 213x237)
9 KB
9 KB PNG
>>64104323
OP is just a variation of the same "nu-male" wojak except with a Nintendo Switch because of the recent shitposting about it.

All those shitty AMD/Intel/nVidia wojaks are also just variations of the console war shitposting wojaks too.
>>
(define (f-rec n)
(if (< n 3)
n
(+ (f-rec (- n 1))
(* 2 (f-rec (- n 2)))
(* 3 (f-rec (- n 3))))))
>>
File: 1491533503565.jpg (97 KB, 861x889)
97 KB
97 KB JPG
>>64102767
Plan 9 hipsters are cute. I want one at my home!
>>
>>64104325
>hey, let's set out some rules so that we can avoid the bad parts of this language
You're still avoiding the problem, retard.
>>
>>64102485
Don't care as long as its not PHP or a functional meme
>>
>>64103548
>{}+''
not him but { } is an empty code block, so the rest of the code there is just +'' the plus converts '' to an integer (i.e. 0) so it returns +0, which is just 0
>>
#include <stdio.h>
#include <stdlib.h>

Int main (int argc, char *argv [ ])
{
Printf ("the best one. I mean C of course");

return 0;
}
>>
>>64102767
Found the hipster who only reads blogs and writes 0 code.
>>
>>64104406
>t. i don't understand why someone would program in any language except Haskell, it's the perfect language
>>
File: poo in it.jpg (59 KB, 630x403)
59 KB
59 KB JPG
PHP for scripting basic shit and Visual Basic for creating Enterprise Quality software
>>
>>64103561
You can shit on JS for a lot of things but not syntax. ES6 and newer syntax is god-tier.
>>
File: 1446973012445.jpg (266 KB, 388x402)
266 KB
266 KB JPG
>>64104416
>{ } is an empty code block
>>
Favorite impractical language: lisp
Favorite practical language: TypeScript
>>
>>64103883
Go back to /an/ brainlet
>>
JavaScript.

select = (i) =>
(i % 3 == 0 ? "fizz" : "") + (i % 5 == 0 ? "buzz" : "") || i

Array
.apply(null, {length: 101})
.map(Number.call, Number)
.splice(1)
.map(select)
.forEach((i) => console.log(i))
>>
>>64104479
>
    .map(Number.call, Number)

what the fuck
>>
>>64104441
Haskell is fine ; (
>>
>>64104479
Stop posting shit. I'M EATING !!!
>>
>>64104490
It's a nice language, my point is merely that most languages evolve over time but still has to deal with legacy.
>>
HTML, i mak dolars forr coding in html for my job at gfoogle.
>>
>>64104485
>>64104485
Array.apply(null, {length: 101}) creates an array of 101 undefined elements.

map has a signature:
map(function, instance)


call has a signature
call(thisInstance, [arg1, [arg2, [...]]])


So in other words, I'm invoking the number class to create number instances. It could be this instead:
.map( (element, index) => index )

but that's not as elegant, as I'm basically just ignoring the element argument and misusing the index argument.
>>
>>64104292
We are in the age of
>what is computah
What did you expect when you experience everything computah related through apps
>>
>>64104543
>>64104485
Of course, as JavaScript supports prototypes, I could do something like this instead.

Function.prototype.discardArgs = function (before, after) {
let bound = this;

return function () {
return bound.apply(this, [].slice.call(arguments, before, after));
};
};


select = (i) =>
(i % 3 == 0 ? "fizz" : "") + (i % 5 == 0 ? "buzz" : "") || i


Array
.apply(null, {length: 100})
.map(((i) => i + 1).discardArgs(1))
.map(select)
.forEach(console.log.discardArgs(0, 1))
>>
>>64104665
Default functions are inconsistent in terms of return values and arguments, and of course weak typing is an abomination, but asides from that it is clear that JS draws from functional paradigms.
>>
https://hackernoon.com/the-javascript-phenomenon-is-a-mass-psychosis-57adebb09359

https://whydoesitsuck.com/why-does-javascript-suck/

https://medium.com/javascript-non-grata/javascript-is-a-dysfunctional-programming-language-a1f4866e186f

http://live.julik.nl/2013/05/javascript-is-shit

https://www.semitwist.com/mirror/node-js-is-cancer.html
>>
>>64103523
>javascript
>9999999999999999 == 10000000000000000
>9999 9999 9999 9999 == 1 0000 0000 0000 0000
>>
>>64104479
Except for the boilerplate range creation, this is unironically one of the most concise FizzBuzzes I've seen on /g/.
>>
File: 394e137e435dd7c0.jpg (109 KB, 900x900)
109 KB
109 KB JPG
>>64104457
minus lack of types/type declaration/type hinting
>>
C++ Forever
>>
>>64104759
why the fuck does javascript support toString(), parseInt(), and parseFloat(), etc. if JS doesn't have real types?
>>
File: 1510793081366.jpg (99 KB, 678x1000)
99 KB
99 KB JPG
>>64103612
t. doesn't use C++
>>
>>64104759
that is why I said in a different post that typescript is my favorite practical language.
>>
>>64104795
>ebrything is object
>>
File: 1449686374859.png (105 KB, 359x380)
105 KB
105 KB PNG
>>64102485
>All these people trashing Javascript
I was thinking of learning it because I want to get a junior dev job and get out of retail, but you guys make it sound I'll be the biggest idiot if I try and do that. Should I learn Java on the side while continue working on my shitty job?
>>
>>64104478
It's Turing complete, pussytits.
>>
>>64104434
>Int
>Printf
>no indentation

Why?
>>
>>64104981
Learn fucking javascript, moron. /g/ is a big pile of failed people like you. The only thing they can do is shoving down their pretentious little elitism that isn't by any means deserved anyones throat.
>>
Go
Call me a brainlet I don't care. I just want a simple programming language with support which runs somewhat fast and I do not want to care about memory safety.
>>
>>64103612
> least worst
In other words, your favorite.
>>
>>64104981
Don't fall for the memes lad, learn whatever gets you the fucking shekels.
>>
Python and C (to write Python extensions) are the only ones you need.
>>
File: nu male.jpg (5 KB, 222x228)
5 KB
5 KB JPG
>>
>>64102489
fpbp
>>
>>64102485
>>64105670
>>>/pol/
stop forcing this fucking "lol switch nu male xd" meme everywhere.
he looks like shit. so what? why can't you fucks just leave him alone? what has he done to you?
>>
>>64105903
>t. nu male
>>
File: javascript.jpg (792 KB, 3264x1836)
792 KB
792 KB JPG
>>64104089
>>64104253
>>
>>64105903
the expression triggers slavics for some reason but idk why its just ppl trying to imitate :D
>>
unironically perl 6
>>
>>64106031
The cult of Crockford is more of a commentary on OOP than JS itself, imho
>>
>>64103612
/thread
>>
>>64102485
python.
>>
ES6, golang, C & C++. If you don't like ES6, you're a brainlet/street shitting pajeet/unemployed
>>
2-nd year university fellow here. Don't have much practice, nor real_work™
I've studied only c#, c, python and delphi. (There are more, but i don't know the rest well enouhg)

Right now, the c is the most favorable so far. It has a nice syntax, pointers are comfy af. And you fucking understand what is happening with the system.

Will have to choose between c++ and java the next semester. Any thoughts on them?
>>
>>64106985
Choose c++ and avoid OOP like the plague.
>>
>>64104490
I can't deal with its white space rules and formatting. Its horrible to deal with as a beginner to the language. Code you write will suddenly stop working if you accidentally load from one text editor or to another computer. It's just a frustrating experience.
>>
>>64102485
Red/Rebol, Haskell, Idris, Elm, C, Lisp, and JS.

Python is ok for prototyping. Never used Rust or Golang.
>>
>>64107338
>choose c++
>avoid OOP
what did he mean by this?
>>
>>64108109
As in, choose C++ but treat it as a diseased version of C.
>>
>>64102485
Java
>>
I'm a fan of Lisp, but the only concurrent lisp is Clojure which is riddled with the cancer known as the JVM, so I'm gonna have to say Erlang
>>
J. It makes it extremely easy to implement high-level mathematical concepts and work with high dimensional data.

Example: This generates the collatz sequence of its argument
(, -:`(1: + 3: * ])@.(|~ 2:)@{:)^:(1: ~: {:)^:_

http://www.jsoftware.com/
>>
>>64102485
Hindoostani
>>
Rust. But I’m just a fat neo-nazi so I don’t get any benefit from shilling it.
>>
C++
>>
Visual basic
>>
>>64104403
PM address and I will move to you
>>
>>64104665
If you're using ES6 anyway, you could just do this:
Function.prototype.discardArgs = function (before, after) {
let bound = this;

return function () {
return bound.apply(this, [].slice.call(arguments, before, after));
};
};


select = (i) =>
(i % 3 == 0 ? "fizz" : "") + (i % 5 == 0 ? "buzz" : "") || i


Array
.from({length: 100})
.map(((i) => i + 1).discardArgs(1))
.map(select)
.forEach(console.log.discardArgs(0, 1));
>>
Ruby nigga
>>
>>64102808
Python 2 4 life
>>
what is the soy of language codes
>>
>>64112373
Ruby
>>
Java
>>
>>64112373
Node.js
>>
fix ("","",z) = show z
fix (x, y, _) = x ++ y

fizz x = map fix (take x (zip3 (cycle ["","","Fizz"]) (cycle ["","","","","Buzz"]) (cycle [1..])))
>>
>>64104754

I wrote this one this morning :>

Array.from({length: 100}, (_,i) => console.log(`${i%3?'':'Fizz'}${i%5?'':'Buzz'}${(i%3&&i%5)?i:''}`))

I win?

Favorite languages:
ES6 JS
Elixir/Erlang
Crystal
F#

Professional Fullstack Memedev here.
>>
>>64112641
Nice

>>64112713
Also nice.
>>
>>64104089

> JS is fine when you avoid more than half of it.

RELIABLE AF

> Tldr. Language isn't the problem it's the shit programmers

What is cost/benefit ratio....
>>
>>64112641

I would be super interested in a breakdown of this.
>>
>>64112713
>>64112641
select = (a, b, c) => a + b || c

cycler = (v) => () => {
v.push(v.shift());
return v[v.length - 1];
};

fizz = cycler(['','','Fizz'])
buzz = cycler(['','','','','Buzz'])

Array.from({length: 100}, (_, i) => console.log(select(fizz(), buzz(), i + 1)))
>>
>>64102485
Ruby
>>
>>64112713
This one starts at 0 though, just to nitpick a little.
>>
>>64113470

I know =/

it prints FizzBuzz first iteration but I wrote it sleep deprived. I have another version that is more legible and offset by one but muh autism trying to see how concise I could get it
>>
>>64113579
Well, I think it's very nice.
>>
>>64113652

>Th-thanks, y-you too...
>>
>>64104416
Wtf man
>>
C++17, much faster to prototype shit now
>>
>>64105090
cuz phoneposter with autocorrect, its obvious
>>
Unironically Perl.
>>
{-
T = { i, f, v, e, n, t, d }
NT = { Z, L, C, P }

p0: Z --> i L f
p1: L --> P C
p2: C --> &
p3: | v L
p4: P --> e n t d
-}

split f l r = (f l, f r)
(><) f g x = (f x, g x)

-- p0
recZ :: String -> Bool
recZ (h:l) = (&&) pre $ recL $ init l
where pre = (h == 'i') && (last l == 'f')

-- p1
recL :: String -> Bool
recL [] = False
recL l = uncurry (&&) $ (><) recP (recC . remP) l

-- p2 e p3
recC :: String -> Bool
recC [] = True
recC (h:l) = (h == 'v') && recL l

-- p4
recP :: String -> Bool
recP = strNCmp 4 "entd"

remP :: String -> String
remP l
| recP l = drop 4 l
| otherwise = []

strNCmp :: Int -> String -> String -> Bool
strNCmp n l r = uncurry (==) (split (take n) l r)
>>
>>64104759
given the moderate success of typescript, you can bet ECMAsomething will add type declarations. they always end up adding the "neue" popular language features eventually.
>>
>>64104754
perl -e 'say "Fizz"x!($_%3)."Buzz"x!($_%5)||$_ for 1..100

Doesn't use any confusing maps, applys, splices, selects, or foreach. Straight for loop using no fancy tricks, just straight string operators and modulus.
>>
>>64113836
TypeScript will be the only good implementation of javascript until ECMA implements it exactly the same way.
Vanilla JS's biggest strength and weakness is its implicit weak typing. Typescript maintains speed and gets rid of those two things, while still transpiling to vanilla JS, there's no reason not to use it.
>>
Fortran
>>
>>64102489
It's time for you to leave the 90's behind.
>>
>>64113952
Something better needs to come along first.
>>
>>64113970
https://www.rust-lang.org/
>>
File: bait.gif (208 KB, 323x221)
208 KB
208 KB GIF
>>64113997
>>
File: 1514908349408.jpg (33 KB, 314x258)
33 KB
33 KB JPG
>>
File: 1514908398941.jpg (40 KB, 472x324)
40 KB
40 KB JPG
>>
>>64102485
Any answer other than C is wrong
>>
>>64104479
>Array.apply
>not
Array.from({ length: 101 }, Number.bind(null, null))


in fairness, the Array.from proto could literally do all of this without the chaining
>>
>>64113903
and I fully agree. but I also fucking hate transpiling and no amount of inotify whatever automagic transpiling daemons are going to make me want to use it.
>>
OCaml, Lisp, JavaScript. Love all three for different reasons.
>>
>>64113970
C++ already exists and in all honesty rust is ok, I guess.
>>
C++ was the funnest to work with
>>
>>64106060
>triggers slavics
what the actual fuck are you talking about, soyboy
>>
File: 1374833941115.jpg (101 KB, 640x846)
101 KB
101 KB JPG
What's a good book for learning C as a beginner programmer?

Is there better than K&R out there? I hear it's outdated in some aspects.
>>
>>64102485
GML. It is very easy to understand, very clear how everything works.
The sister language from ENIGMA is pretty nice too, but I wish it was 100% GML compatible.
>>
C# for professional work
Go for personal projects
>>
>>64114327
Indeed.
>>
>>64113997
see, this is why we need more options.




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.