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

Pages: 1-4041-

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.

Name: Anonymous 2017-01-09 21:39

>>38
Shit's getting meta. How about we go back to /b/ memes?

Name: Anonymous 2017-01-09 22:18

Name: Anonymous 2017-01-10 0:00

https://www.youtube.com/watch?v=Dr-XL6opuRo this is what i listen to while hacking

Name: Anonymous 2017-01-10 0:03

>>40
I've always thought that memory use in C++ is not going to arbitrarily change and that programmers normally act like this (assuming single threaded and non-shared memory etc). In the cases where we know it can change arbitrarily, we use the volatile keyword to tell the compiler about the volatility of certain variables. Do you have any documentation to show me more about this, I don't know what I would need to search in the C++ standard to find such information.

Name: Anonymous 2017-01-10 0:14

>>40
Sounds like somebody needs to reread DA STANDARD.

>>44
The volatile keyword is mainly to tell the compiler not to make any assumptions when optimizing, as the usual assumptions may not be accurate. It's basically telling the compiler "don't try to be smart, or you'll probably just end up fucking things up". What >>34 is talking about is functions that do not have any sort of state, i.e. that is for every specific combination of explicit parameters, they have a single well-defined return value. For example, time(NULL] is an impure function, since its return value depends on the state of the system clock, which is not provided as an explicit argument. Likewise, the rand() function is impure, since it takes no arguments (and thus has only one COMBINATION of arguments that is valid), yet its return value is unpredictable.

Name: Anonymous 2017-01-10 0:50

>>45
Thanks for clearing that up.

Name: Anonymous 2017-01-10 8:20

>>13,15-16
partial application is pointless in C. it is not pointless in languages with first-class and higher order functions. the possibility of dynamically, programatically creating new functions based on the other ones (without the requirement of either the arguments or the input function being known at compile-time) is much more meaningful when functions can be assigned to variables, passed to other functions, returned from other functions and generally treated like everything else in the language.

and sure, you don't really need it. after all, languages without such feature are Turing complete and it's possible to find other ways of doing whatever you need to do. but I think it's a nice abstraction that can often make your work easier.

Name: Anonymous 2017-01-12 3:36

JavaScript

The last language you will ever need

Name: Anonymous 2017-01-12 5:31

>>48
You can't write desktop apps in JavaScript.

Name: Anonymous 2017-01-12 7:00

Name: Anonymous 2017-01-12 11:39

>>50
I've been using atom for the last weeks because of company policies and every time I launch the program (sorry, the ``app''), I am closer to accepting death not as a ghoulish fate but as a solace.

Name: Anonymous 2017-01-13 4:36

launch my anus

Name: Anonymous 2017-01-13 13:37

>>51
This is what it's like to work for hire. Suck it up snowflake.

Name: Anonymous 2017-01-14 3:03

>>51
>>53's advice is shit, just quit & chill in nature lol

Name: Anonymous 2017-01-14 3:43

>>54
chill in nature
Make sure to do this with your favorite Touhou

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