Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Programmer's Music Mix for Dark Minds

Name: Anonymous 2016-12-30 0:47

Get to work
Enterprise IntelliJ Java Beans and Node.js ES6 Enterprise frameworks
Pajeet just won't stop talking about his shitting street
Need something to cut out the noise
Can count on Programmer's Music Mix for Dark Minds every time

https://www.youtube.com/watch?v=6dkqVj7heiA

Name: Anonymous 2016-12-30 0:53

Come into work 10 minutes late
Got some coder's block trying to implement our new enterprise REST service
Project is behind schedule, manager is starting to get on my case
Got that bad vibe of anxiety looming over my head
Need a sudden burst of innovation and creativity
Reach for Coder's Essential Music - Moments of Innovation
Works every time

https://www.youtube.com/watch?v=c5X4-pCDy94

Name: Anonymous 2016-12-30 13:18

Roll into work. Trying to get to grips with some 10000 line spaghetti I have been asked to maintain. My mind weeps at the huge mess in dire need of refactoring my someone sane. Then I see it through the glass door of the fridge - Tuscon whole milk, gallon, 128 oz.

Name: Anonymous 2017-01-04 19:49

programming
Javashit

No, thank you.

Name: Anonymous 2017-01-04 21:45

>>4
Imperative cuck detected.

Name: fairX 2017-01-04 21:51

>>1
WARNING! I have out on some hacker music for dark minds and decided to hack away like i am wont to do ;_) it has not even been ten minutes and i am already in the linux mainframe uploading dlls to perl scripts! wouw, this is POWerful music but also very immersive, be careful out there fellow lambda knights! truly a thing not for weaker minds

Name: Anonymous 2017-01-04 22:21

>>4
Wait, what.
Javashit is the epitome of the imperative cucks.

Name: Anonymous 2017-01-05 3:26

>>7
It supports functional programming a lot better than C. JS makes partial application trivial:

function add(a, b) {
return a + b;
}

function multiply(a, b) {
return a * b;

function partialApplication(func, arg) {
return function(n) {
return func(arg, n);
}
}

var addToFive = partialApplication(add, 5);
var multiplyBySeven = partialApplication(multiply, 7);

addToFive(3); //8
multiplyBySeven(9); //63


The equivalent code in C is quite clumsy, and the resulting partially-applied functions will always stand out from "real" functions:

#include <stdio.h>

int add(int a, int b) {
return a + b;
}

int multiply(int a, int b) {
return a * b;
}

typedef struct {
int (*func)(int, int);
int arg;
} closure;

closure partialApplication(int (*f)(int, int), int n) {
closure c;
c.func = f;
c.arg = n;
return c;
}

int call(closure c, int x) {
return c.func(x, c.arg);
}

int main(void) {
closure addToFive = partialApplication(add, 5);
closure multiplyBySeven = partialApplication(multiply, 7);
call(addToFive, 3);
printf("%d\n", call(addToFive, 3)); //8
printf("%d\n", call(multiplyBySeven, 9)); //63
return 0;
}

Name: Anonymous 2017-01-05 3:44

>>7-8
JavaScript is Lisp. Lispers made JavaScript to spread Lisp ideas to the masses as the epitome of good.

It was their "Trojan horse" for embedding dynamic typing, Lisp-style garbage collection, Lisp-style dynamic OOP, etc. into a program the masses will have on their computer (web browsers).

Lispers originally planned to use a dialect of Scheme, but they made JavaScript so Lisp would remain free from criticism.

They knew from experience that when Lisp ideas become popular, they become hated, so Lisp must always be a minority.

Name: Anonymous 2017-01-05 5:27

smoke weed everyday.

Name: Anonymous 2017-01-05 6:27

check dubs everyday

Name: Anonymous 2017-01-05 7:26

>>9
Javascript definitely had some Lisp influence (as did other dynamic languages) but its lack of homoiconicity makes metaprogramming much harder (in JS, code generation is rarely used for any serious task; in fact, it's usually done to either minify or obfuscate the code as opposed to extending the language), and metaprogramming is one of the biggest draws of Lisp.

Name: Anonymous 2017-01-05 9:53

>>8
What is the point of partial application?
#define add(a,b) (a)+(b)
#define add5(b) add(5,b)
int n=6;
int r=add5(n)// Same thing

Name: Anonymous 2017-01-05 10:01

>>13
the point of partial application is to create more specialized functions at runtime. practical example: I do it a lot in the game I'm writing and the resulting functions are dependent on values not known at compile time so making a C macro or C function is not viable. as to why you'd need more specialized functions, it depends on the programming style you're using but it's obviously a pretty common need in FP. I'm not doing pure FP in my game (I'm using FIOC) but partial application helps me combine generic functions and runtime data into something that fits the required interface.

Name: Anonymous 2017-01-05 10:15

>>14
There is no magic barrier from ``the runtime''
#include <stdio.h>
#define add(a,b) (a)+(b)
#define add5(b) add(IamARunTimeVariable,b)
int getnum(void){
int num;
printf("Enter a RunTime variable: ");
scanf("%d", &num);
return num;
}

int main(void){
int IamARunTimeVariable=getnum();
int n=6;
int r=add5(n);

printf("\n Result:%d:\n",r);
return 0;}

Name: Anonymous 2017-01-05 10:31

//rewritten to concise macro style i normally use
#include <stdio.h>
#define getnum() ({int num; printf("Enter a RunTime variable: "); scanf("%d", &num); ;num;})
#define add(a,b) (a)+(b)
#define addnum(b) add(getnum(),b)
int main(void){
printf("\n Result:%d:\n",addnum(6));
return 0;}

Name: Anonymous 2017-01-05 10:58

Bonus for >>8 you don't need the verbose drivel to create function in JS
var add=(a,b) => (a)+(b);
var addToFive = (n)=>add(n,5);
alert(addToFive(1))

Name: Anonymous 2017-01-05 11:04

>>17
this syntax looks quite nice, completely unlike most of the javashit I've seen (which manages to be both verbose and inconsistent at the same time). maybe it's not such a bad language after all.

Name: Anonymous 2017-01-05 11:07

>>8 Its only due ES6 standard syntax being implemented in major browsers. Its basically a shorter way to write:
var add=function(a,b){return (a)+(b)}
var addToFive = function(n){return add(n,5)}
alert(addToFive(1))

Name: Anonymous 2017-01-05 11:10

>>19
I know it's a syntactic sugar but it's both clear and concise. you can write lambdas this way, right? if so, javashit would be an implicit var away of not being a pain in the ass to read and write.

Name: Anonymous 2017-01-05 11:20

>>20

alert([1,2,5,10,25,100,250,500,100].map((n)=>n*n))

Name: Anonymous 2017-01-05 11:33

Additionally javascript objects are all associative arrays so this works too:
var funcname=prompt("Enter function name","map");
alert( [1,2,5,10,25,100,250,500,100] [funcname] ((n)=>n*n) )

Name: Anonymous 2017-01-05 12:27

>>21-22
nice javashit FP and nice dubs. looks like I'm going to add JS to my list of languages that don't necessarily suck but are often misused horribly.

Name: Anonymous 2017-01-05 16:52

>>22
That's more proof that JavaScript is Lisp.

[1,2,5,10,25,100,250,500,100] ["map"] ((n)=>n*n)

Name: Anonymous 2017-01-07 0:43

class Mapper {
constructor() {
this.target = null;
this.operation = null;
}
setTarget(target) {
this.target = target;
}
setOperation(operation) {
this.operation = operation;
}
map() {
var result = new Array(this.target.length);
for (var i = 0; i < this.target.length; i++) {
result[i] = this.operation.run(this.target[i]);
}
return result;
}
}

class Squarer {
run(value) {
return value * value;
}
}

var mapper = new Mapper();
mapper.setTarget(new Array(1,2,5,10,25,100,250,500,100));
mapper.setOperation(new Squarer());
mapper.map(); // [ 1, 4, 25, 100, 625, 10000, 62500, 250000, 10000 ]

Name: Anonymous 2017-01-07 4:16

Programmer's Music Mix for Dank Minds

Name: Anonymous 2017-01-07 14:20

>>25
That's CLOS with reader macros to look like Java.

Name: Anonymous 2017-01-08 14:15

>>8-25
This is all fine and dandy but it doesn't change the fact Javashit is imperative and mutable through and through, and most people writing in it are imperative cucks.

Name: Anonymous 2017-01-08 14:21

>>28
Why do you care if it's mutable? If it's mutable, then you can easily program in a non-mutable way.

Name: Anonymous 2017-01-08 14:27

>>29
Because most people writing in it are imperative cucks who mutate everything and use loops.

Name: Anonymous 2017-01-08 16:37

>>30
Nah man everyone's using Facebook's immutable.js now.. functional programming, non-mutable data structures, etc are quite trendy among JS elitists these days. So >>30... how does it feel to be a hipster??

Name: Anonymous 2017-01-08 18:05

>>28,31
JavaScript is essentially C syntax mixed with Lisp semantics. Lisp allows loops and mutable data too. But these languages allow what imperative languages do not, namely the ability to manipulate functions as first-class objects.

Name: Anonymous 2017-01-08 19:01

>>32
Adding first class functions does not make a language unimperative. These days even C++ and C# have first-class functions and lambdas, are they functional now?

Name: Anonymous 2017-01-08 22:45

>>33
In functional code, the output value of a function depends only on the arguments that are input to the function, so calling a function f twice with the same value for an argument x will produce the same result f(x) each time.

If C++ can do this, I consider it a functional language. Even if the variables are mutable, it is only yourself that's stopping yourself from writing C++ code in the functional paradigm.

Name: Anonymous 2017-01-09 6:33

>>34
All "functional paradigms" in Sepples are written by expert trolls with liberal use of meta-templates and OOP.

Name: Anonymous 2017-01-09 7:37

>>30
e/pol/in cuck meme, /pol/ro!

Name: Anonymous 2017-01-09 16:43

>>36
No, you fucking retard, it's LLLLLLLLEEEEEEELLLLLLL E/G/IN /G/UCK MEME /G/RO XDDDDDDDDDDDDDDDDDDDDDDD
>LE IMA/G/EBOARD MEMES
>LE PLE/B/ SHILL /G/ROS
>CUCKED XDDDDDDDDDDDDDDDDDD LELELELELLELLEEEEEEEEEEELLLLLL

Name: Anonymous 2017-01-09 20:28

>>37
e/lel-cunt/in LLLLLEEEELLLLL XDDDD meme, /lel-cunt/ro!

Name: Anonymous 2017-01-09 20:38

>>36,37,38
IT'S STILL SHITPOASTING EVEN IF YOU ARE BEING LE IRONIC

Name: Anonymous 2017-01-09 21:19

>>34
C++ can't do that, it's got no guarantees, man.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List