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

/dpt/ daily programming thread

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: 312
Thread images: 20

File: tumblr_nfkrwhvJe21sr3dtho1_1280.jpg (151KB, 800x600px) Image search: [Google]
tumblr_nfkrwhvJe21sr3dtho1_1280.jpg
151KB, 800x600px
old >>51617301

* whatcha workin' on?
* first for lua
* non-hentai edition
>>
>>51623544
>tumblr_
almost as bad as the tranny threads desu
>>
>lua
Into the trash. Egison is the future.
>>
>>51623544
i would rather have trannies than whoever that fucker is.
>>
>>51623577
Egison? Enlighten me, senpai.
>>
>>51623563
>letting shitposters dictate the content of the OP
literally giving into terrorism
>>
File: KANSHA.jpg (393KB, 1000x1311px) Image search: [Google]
KANSHA.jpg
393KB, 1000x1311px
I deleted the other thread because some autistic fucker keeps dumping tranny porn in my threads.
>>
>>51623544
tranny poster, please post in the desktop threads, they actually deserve it, they're degenerates with no tech discussion and just circlejerking
>>
>>51623582
My child, questioning is the first step on the path of satori!
http://www.egison.org/
A pattern-matching-heavy lisp language with powerful introspection. Truly the language of the Gods!
>>
>>51623600
KANSHA!
>>
>>51623602
I can only save so many generals from degeneracy.
>>
>2 /dpts/ in a row got deleted because of shitposting
this is literally terrorism
>>
>>51623600
says the anime poster with trap fetishes, faggot.
>>
>>51623627
you're right, might as well make the degenerates have their own containment thread
>tfw the popularity of desktop threads say enough about the state of /g/
>>
>>51623627
No seriously.
Those desktop autists deserve it much more than /dpt/.
Go dump tranny porn in their fucking thread before you consider dumping porn in /dpt/ again.
>>
College assignment, some simple simulation. The difficult part isn't getting the desired outputs but somehow integrating the mandatory library (teacher's per project from 1990's) into the whole thing and actually using it at some point.
>>
>I'm not destroying the generals, I'm saving them!
>>
>>51623627
did you use other IPs?
or do the mods not care about tranny dumping
>>
File: hobnobloginlol.png (4KB, 392x168px) Image search: [Google]
hobnobloginlol.png
4KB, 392x168px
hey friends does anyone know about php location headers?
I'm trying to make an ajax login thing, but the location header seems to just echo the location html file, rather than transfer you to other page.

if(login successful){
header('HTTP/1.1 301 Moved Permanently');
header("Location: http://localhost/hobnobv2/secondpage.html");
exit();
}

//secondpage.html
<!DOCTYPE html>
<html>
<head>
<title>secondpage</title>
</head>
<body>
hold the fuck up
</body>
</html>
>>
>>51623694
There are no mods, only janitors. And all they can do is delete posts.
>>
>>51623692
you can only build something more elegant and better from the destruction of what has gone before
>>
>>51623715
>trap /dpt/
>everyone posting programming
>tranny shitposter comes in
>threads being deleted left and right

Come the fuck on, don't fix what wasn't broken you autistic piece of shit.
>>
File: 1409882857909.png (23KB, 489x423px) Image search: [Google]
1409882857909.png
23KB, 489x423px
sometimes I feel like I'm making real progress

then I think about how much more I need to learn in order to make it
>>
finally, a general with degenerate OP
anyways, I need help with undertanding how un-syntactic representation of list comprehension in haskell work
I know its just a combination of >>= and the guard function, but I have no idea how guard and >> act as the filter
can somone explain how
[1..50] >>= (\x -> guard ('7' `elem` show x) >> return x)

works? I've bent my mind on it, can't figure it out
>>
Best C book that isn't K&R?
>>
>>51623745
People have been complaining about trap OPs for years. You get shitfests like this every couple weeks or so. People need to just stop posting them, or mods need to start enforcing Rule 6.
>>
>>51623779
dumb frogposter
>>
>>51623709
Janitors can also block someone from posting for 10 minutes. Only mods can ban.
>>
>>51623804
Nice meme xD
>>
>>51623798
SICP
>>
>>51623779
JUST

no seriosuly, think about what you can create with a strong foundation in x language and a number of high level concepts
what keeps me going is creating a gf AI
>>
>>51623800
I gave up the anti-trap fight long ago. It's literally just one deranged faggot. As long as we don't have shitposters posting selfies of themselves crossdressing in skirts, I can deal with the occasional trapfaggotry.
>>
>>51623798
>>
>>51623804
>FELL FOR L'MEME

top lel
>>
>>51623861
What does a fucking raccoon a squirrel mix have to do with C
>>
File: 1446697506915.jpg (36KB, 286x429px) Image search: [Google]
1446697506915.jpg
36KB, 286x429px
>>51623894
>>
>>51623544
who is this semon demon?
>>
>>51623869
who are you quoting?
stupid redditposter
>>
>>51623800
I honestly think the anti-trap spam posts are from repressed homos that come in from /pol/

>I hate this degeneracy so much I have it saved on my computer."
>"i'm going to pretend like I'm satirizing traps and act like I'm 'saving' degenerate trapthreads but the true fact is that i just want an excuse to post my tranny porn collection without the shame of going to /gif/ or /d/"
>>
>>51623894
C is pretty awful and chimeric, just like that raccoon-squirrel mix.
>>
File: cprimerplus.jpg (49KB, 504x648px) Image search: [Google]
cprimerplus.jpg
49KB, 504x648px
>>51623861
This is the shittiest book I have ever tried to read. I don't recommend it.

>>51623798
see pic
>>
I've been doing shit all the day... now my eyes hurt

>>51623779
learn Go, it's simple yet powerful

to the anon that asked for books about Go in the other thread:
start with tour.golang.org
>>
>>51623955
Go is simple in the sense of simplistic, and powerful in the sense of deadly.

Meanwhile, racket is simple in the sense of concise, and powerful in the sense of expressive.
>>
>>51623955
"Go was a mistake." -William Shatner
>>
>>51623948
Writing C is like building a bridge. Very long, very costly, and pointless in an era of air travel.
>>
>>51623997
what is your language of recommend
>>
>>51623986
k

>>51623987
kek
>>
>>51623955


I'm not THAT new. I've been learning javascript. Got stuck on how to reverse an array in place.
>>
>>51623997
>I need to get across this river
>I'll drive to the airport, hire a helicopter to take me to the airport on the other side of the river, then rent a car to drive to my destination
>>
>>51624026
>create a temp variable
>copy a into temp
>copy b into a
>copy temp into b
>repeat for every element in the array, until the halfway mark
>>
>>51624011
OCaml.
>>
What's the best programming contest website?

Seems like HackerRank has the most breadth/depth.
>>
>>51624048

Yeah unfortunately I had to peek at the answer but I understand the solution now.

 

var arrayValue = [1, 2, 3, 4, 5];

function reverseArrayInPlace(arr) {
var len = Math.floor((arrayValue.length / 2));
for (i = 0; i < len; i++) {
var old = arr[i];
arr[i] = arr[arr.length - 1 - i];
//arr[arr.length - 1 - i] = old;
}
return arr;
}

console.log(reverseArrayInPlace(arrayValue));

>>
>>51624045
more like
>I need to get across this river, but really fucking quickly
>cars are too slow
>planes are too slow
>I better invent space travel and build a rocket to take me to the other side of this river
>it'll take me a decade to finish the engineering and the first hundred times I try it'll probably crash into the ground and kill the pilots
>once it's done though, it'll be fast as fuck
>and it only kills the passengers 1/10 the time, if you're careful
>btw I built the rocket out of legacy parts and everyone who makes them has retired
>>
File: basic.jpg (77KB, 850x400px) Image search: [Google]
basic.jpg
77KB, 850x400px
Daily reminder that if Dijkstra was alive today, he would say the same thing about Python.
>>
>>51623796
nobody?
>>
strtok() is such an amazing function. I was handrolling my own custom parsers before I found it. Goddamn, why did no one tell me about this earlier?
>>
File: 1443731684119.jpg (59KB, 409x187px) Image search: [Google]
1443731684119.jpg
59KB, 409x187px
Is there any guide for transitioning from C++ to C? I understand how everything works, but I feel like C++ left me with a lot of bad habits.
>>
>>51624206
noice
>>
So everyone and their mother says that if you want to get hired you should show real world experience in coding and that you can easily get some through github, and I made one.

I haven't contributed one line of code to a single project and I feel pretty overwhelmed right now at everything you have to do, and how most of these projects work. I thought it was just gonna be a bunch of low level projects for people making shit for fun but goddamn it's actual companies making and testing products.

I guess what I'm asking is, what's the easiest way to ease into this community?
>>
>>51624213
They're completely different languages.
Just go in with a fresh start and if you recognize similar syntax, great.
>>
>>51624233
make your own personal projects and put them up there
later when you're more in tune you can find 1 project you really like that maybe is in a field you are into and contribute
I've been programming in C for about 2 years and I only have personal projects; never contributed to other larger projects because I don't think I'm ready yet
>>
>>51624213
Unfortunately it's a lot harder to go from C++ to C than the other way around. I find C code about 100x more readable than C++ code, and when I have to write C++, I write it in a very C-style way, which is great. You can write awesome code in C++ that looks just like C code: not so the other way around.

Basically, all I really can say is, you need to get used to doing things yourself, and doing things very explicitly. No more hidden RAII bullshit.
>>
>>51623796
>>51624133
none of the haskell shillers wants to even help anymore
top kek
>>
>>51624301
>RAII
>hidden
>bullshit
>C
>readable at all
Fizzbuzz programmer detected.
>>
assert(Dogs > Cats)
>>
>>51624256
I used an anime avatar on my github for about 4 months. Am I doomed?
>>
>>51624256
I guess I'll just do that, man. Ive been reading lots of contributions made to these things and a lots of them aren't even offering code solutions, it's just paragraphs of explanations and theories on why shit doesn't work and how it can be improved. It seemed so simple from the start page that I thought it was just gonna be lots of programmers looking to make stuff for shits and giggles and asking for help on personal projects
>>
>>51624348
Way to crash a program
>>
>>51624104
>>51624048

Hey one thing I'm not understanding is why do I need
  arr[arr.length - 1 - i] = old 
?

Isn't old going to be overwritten at the start of the next loop?
>>
>>51624350
I still have an anime avatar. Gonna change it soon though.

>>51624357
There are a lot of programmers with personal projects that would be delighted to receive a pull request; the thing is that since they (we) definitely won't be found in "Trending", they are hard to come across. Search for random things and find some people to follow; you'll start seeing activity and might find little projects you may be able to help with.
>>
>>51624340
c is pretty ugly

hex and escape sequences everywhere
>>
>>51624340
Kek. C++ is all about doing things under the hood to "simplify" the code. References are a great example of an integral language feature that's complete shit and ruins readability.

With references in C++, when you call a function you never know whether it's grabbing a copy or the address unless you look at the function.

C++:
void doShit(int &fuck)
{
*fuck = 2;
}

int main()
{
int cunt = 0;
doShit(cunt); // cunt is now 2 even though it looks like I'm passing a copy
}

vs in C:
void doShit(int* fuck)
{
*fuck = 2;
}

int main()
{
int cunt = 0;
doShit(cunt); /* does not compile */
doShit(&cunt); /* now I KNOW I'm passing it the address */
}


This obviously matters when your functions are scattered across different files.
>>
>>51624453
Fizzbuzz confirmed. Have you graduated as a 3rd level fizzbuzz master yet? I hear it's quite hard, it might even take you a whole week of programming experience to get there!
>>
>>51624453
const int cunt = 0;

doShit(cunt); /* does not compile */
>>
>>51623579
Fuck no, trannies are for faggots
>>
File: raii.png (41KB, 649x365px) Image search: [Google]
raii.png
41KB, 649x365px
>>51624473
I showed you a concrete example of why C++ can be less readable than C.

In the second example, from just looking at main, I can perfectly predict what the value of cunt is gonna be. Not so in C++.
>>
>>51624125
that fuck didn't even write code so he is in no position to complain about languages
>>
Threadly reminder, if you think exception handling is implemented well in C++, you're a delusional cargo-cult programmer.
>>
>>51624509
/*** header.h
#ifndef THING_H
#define THING_H
struct _thing {
int value;
float boat;
};

typedef struct _thing * Thing;

#endif


/** thing.c
Thing New_Thing(int v, float b) {
Thing ret = malloc(sizeof(struct thing));
ret->value = v;
ret->boat = b;
return ret;
}

void Delete_Thing(Thing t) {
free(t);
}

void Thing_doShit(Thing t) {
t->value = 2;
}

/*** main.c - user written */
#include <thing.h>

int main(int argc, char **argv) {
Thing MyThing = New_Thing();
Thing_doShit(MyThing); /* WHO KNOWS/????/??-__ */
Delete_Thing(MyThing);
return 0;
}
>>
>>51624453
Idk my first language is C++ but it's pretty easy for me to read both those coding examples. It's just that the first uses bad programming practice in my opinion. No need to use * in your doShit function.
>>
fuk

>>51624509


/*** header.h */
#ifndef THING_H
#define THING_H
struct _thing {
int value;
float boat;
};

typedef struct _thing * Thing;

#endif


/** thing.c */
Thing New_Thing(int v, float b) {
Thing ret = malloc(sizeof(struct thing));
ret->value = v;
ret->boat = b;
return ret;
}

void Delete_Thing(Thing t) {
free(t);
}

void Thing_doShit(Thing t) {
t->value = 2;
}

/*** main.c - user written */
#include <thing.h>

int main(int argc, char **argv) {
Thing MyThing = New_Thing();
Thing_doShit(MyThing); /* WHO KNOWS/????/??-__ */
Delete_Thing(MyThing);
return 0;
}
>>
>>51624583
Oh nevermind I didn't read the last thing you said about having to look at the function.
>>
>>51624301
> when I have to write C++, I write it in a very C-style way, which is great.
No it isn't.

> hidden RAII bullshit.
Confirmed for failed C++ programmer.

If you feel that you have to put everything in plain sight, it means that you're incapable of writing robust classes which behave properly.

C sidesteps the problem of crap programmers who can't create sound abstractions by simply not letting anyone create any abstractions, so the crap programmers never have to face up to their own worthlessness.

The downside is that non-trivial code gets bogged down in reams of boilerplate. And robust code is even worse because of the need for explicit error handling and clean-up, so most code either doesn't bother to clean up properly after errors, or all but the most common errors get "handled" with an abort().
>>
>>51624453
>/* does not compile */

It most certainly fucking does. In fact, it'll give you a warning about conversion to pointer without a cast, and then carry on.
>>
>>51624667
>your compiler lets you convert a 32 bit int to a 64 bit pointer and doesn't complain
Sounds safe.
>>
>>51624692

It does complain. It gives a warning.

>inb4 I use -werror
>>
>>51624701
>he doesn't use -werror
>>
>>51624707

I do, too. The claim that it DOESN'T compile is fundamentally wrong, though.
>>
>>51624564
Is there any language with "good" exception handling?
>>
>>51624718
Well, at least it doesn't change the value of the int, and that's what really matters, right guys? :^)
>>
>>51624667
>undefined behaviour

>>51624724
Anything that encourages pattern-matching error handling and provides the syntax to do it monadically.
>>
>>51624724
0ceh is great, so C++.
Other than that, lisp languages with abort/restart, which is the most malleable, most powerful, most useful construct I've ever encountered.
>>
>>51624737
It's perfectly defined behavior actually.
>c
>>
>>51624727

Amen.
>>
>>51624764
Well, I suppose it's technically implementation-defined, at best.

https://en.wikipedia.org/wiki/Memory_segmentation
>In a system using segmentation, computer memory addresses consist of a segment id and an offset within the segment.
>>
If I made a program that requires moviepy dependencies in python, how can I distribute it with the knowledge that someone else could run it? Can I just include the moviepy.py folder or file in the directory?
>>
>>51624764
I think it'd be defined for all cases if it were an unsigned int, but because it's signed-to-pointer I'm pretty sure the conversion of negative numbers is sometimes undefined.
>>
>>51624724
I like Python's. Simple Try/Except blocks are possible, but you can just as easily build a powerful, more general handler if you need to.
>>
>>51624591
Typedef'ing pointers is bad practice precisely for that reason.
>>
>>51624821
>his computer doesn't even support negative memory
PLEBEIAN MAXIMUS
>>
>>51624453
> With references in C++, when you call a function you never know whether it's grabbing a copy or the address unless you look at the function.
Which is a problem for .... nobody expect C programmers who can't get it through their thick skulls that not every language is C.

C++ uses references heavily, so C++ programmers (as opposed to C programmers who know just enough C++ to whine about it on 4chan) don't take it for granted that parameters are passed by value. If you call a function, you need to know what it does (any half-decent IDE makes this easy).

And note that in C, you have exactly the same problem for pretty much anything that isn't a primitive type. If you're passing a pointer, you don't know whether it's because the function needs to modify the pointed-to value, or just because copying a pointer is cheaper than copying a struct ... unless you look at the function declaration.
>>
>>51624764
>>51624799
And don't forget the integer not being able to store the full pointer, like a system with 64-bit pointers and 32-bit ints. Actually, that's pretty common nowadays.

>>51624821
Technically, if you were just casting, and the integer had at least as much precision as the pointer, you'd be okay. Arithmetic would still be fucked.
>>
f you want it clearly passed by value or unchanged, you can explicitly copy construct or make it const
>>
>>51624851
This. Pass by reference is OK because every half-decent programmer will use a const reference or just pass by value to indicate that the function won't mutate what you pass it. And this is clearly visible just with the function prototype.
>>
>every /dpt/ boils down to C++ fags bitching about C fags or the other way around

When did these threads get so pleb? I remember when people used to talk about decent programming languages, like Java and Python.
>>
File: 1420413980489.png (127KB, 546x486px) Image search: [Google]
1420413980489.png
127KB, 546x486px
>>51624875
>java
>decent
>>>/trash/
>>
>>51624799
No, because the language doesn't care that you give it a valid address or not, only the computer does.
>>
>>51623544
Building a message board in PHP. I'm having issues with redirecting to different pages depending if you are logged in or not.
>>
>>51624895
That's the stupidest argument I've ever heard.
>>
>>51624840
It's only bad practice in your head. In real life it's considered good practice. Other good practice involves using heavy macro chains that end with complex pointer arithmetic that you'd expect to only ever see in code golf. They're literally all over every large C codebase that are considered high-quality.
>>
>>51624886
>no PHP
Why does it get an exception?
>>
>>51624926

It was so bad that I couldn't stomach to put it on the list when I made the image, roughly 700 years ago.
>>
>>51624917
>c
>>
>>51624945
Yeah, and?
>>
>>51624886
What do I get to bitch about?
>>
>>51624951
>is the stupidest language ever invented
>>
>>51624886
Rolling. I hope I get a language I'm good at.
>>
>>51624400
It puts the >current< value of "old" into the array at the position. When you overwrite the "old" variable you're changing the value of the >variable< but the array (located in another variable) does not change.

As I rule of thumb (I've mentioned this before on /g/): If you modify a variable "x = ... or var x = ...", you are ONLY MODIFYING THAT VARIABLE. You are not modifying any other variables, or any other objects or any elements of any lists, you are just modifying that one variable.
>>
>>51624886
Rolling for C
>>
>>51624955
Man, idk shit about Ruby aside from it being unreadable hipster trash and Rails being a ghetto.
I also heard someone describe it as Java and Perl having a baby and none of the good traits made it through, so let's go with that too.
>>
>>51624886
Rollerino
>>
>>51624764
It's defined as requiring a diagnostic (implicit conversion of a pointer to an integer is a constraint violation, 6.5.4p3).

The standard makes no distinction between warnings and errors, that's up to the compiler.

Typically, if the compiler can figure out that certain code (e.g. what it would generate if there was an explicit cast there) might be meaningful, then it will generate that code, print a warning, and carry on.

If the compiler hasn't got a clue (e.g. because you passed an integer where a structure was expected), it will print an error, compile the rest of the file (in case there are more errors or warnings for it to report), and not bother generating an object file (because there isn't anything it can generate that isn't 99.99% certain to be garbage).
>>
>>51624886
Oh fuck. Thread is dead. Abandon ship.
>>
>>51624991
The thread was dead before the ship even sank
>>
>>51623544
Met a cute girl around my age at a friend's place during Thanksgiving. She's a programmer and immediately started gushing about the software she's been working on and shit when she found out I work as a software engineer. I usually keep my occupation secret because people's eyes just glaze over when I bring up computers and I inevitably get asked to fix their laptop because malware or w/e the fuck.
/blog
>>
>>51624989
Your condition is backward. That's pointer->int, not int->pointer.
>>
>>51624964
Lisp
>homoiconicity is nice, but I'm a compiled language guy so I don't need it (TemplateHaskell-esque is good enough) & I prefer mixfix syntax
>rarely ever typed, and if it is, it's poorly implemented
>trees are a better "basic unit of aggregation" than lists in a language that encourages recursion over iteration anyways
>mostly favoured by autists who only heard about it through SICP
There's not much to bitch about, really, it's a pretty reasonable family of languages
>>
>>51625023
You got her number, playboy?
>>
>>51625023
Every single girl programmer I've met has been a shitty programmer, only hired to fill HR quotas.
>>
>>51625023
Either she's MtF or a bad programmer.
Or this is a dream and this is the only way we can contact you. You've been in a coma for the past few months. Please wake up.
>>
>>51625041
Got her number and her steam id. Going to get in on some steamy co-op action.
>>51625053
This has been true from past experience at previous jobs I've had. I'm ok with it though.
>>
>>51625029
> but I'm a compiled language guy
Homoiconicity has nothing to do with compiled v.s. interpreted/jited and many lisps can be compiled.
>it's poorly implemented
Look harder, noob.
>trees are a better "basic unit of aggregation" than lists in a language that encourages recursion over iteration anyways
You have never used a functional programming language, you have never used lisp, and you have no idea what a tree is.
>mostly favoured by autists who only heard about it through SICP
You are completely out of things to say because you have never even come close to anything lispy.
>>
FAGGOTS
do you even program?
>>
>>51625053
Haven't met many girl programmers (my gf is learning to code in college atm. but that doesn't really count) but I dream of a qt2.7182 fp-programmer waifu. Will they always be dreams, /g/?
>>
Serious question. Has anybody here ever actually programmed something that wasn't straight out of a textbook?
>>
>>51625120
import std.stdio;

void main()
{
writeln("no");
}
>>
>>51625068
>MtF
I'm ok with this.
>Bad programmer
Doesn't really matter when you've spent the past year working with Indian expats and hunting down hidden shit-tastic surprises they've sprinkled your code with.
I've been wondering if I've been in a coma for a while, actually. It's too weird that as soon as a subject is brought up once it's suddenly popping up everywhere I go. Also, when you haven't talked to a friend in 7 years, think "I wonder how he's doing" and bump into him in the street that week. What is even real?
>>
>>51625132
I've only programmed a few things "straight out of a textbook" to be honest, and I can't recall what they were.
>>
>>51625132
I've made a program in C that will pull up information about a specified assembly language instruction (Intel only) and an LMC in D.
I haven't been programming long though
>>
>>51625132
I make my living programming things that are far removed from anything textbooky.
>>
>>51625121
I'm literally only learning how to program so I can one day create the perfect 2d programmer waifu that'll code shit for me.
>>
>>51625074
Lisp baby duck detected.

>Homoiconicity has nothing to do with compiled v.s. interpreted/jited and many lisps can be compiled.
I'm saying that homoiconicity isn't really necessary if you can't modify the code at runtime anyways, i.e. if the language is compiled. You could even conceivably use something like TH at runtime but it just doesn't seem right to me.

>Look harder, noob.
Typed Racket is the only thing anybody seems to mention, and I've heard nothing but criticism against it.

>You have never used a functional programming language, you have never used lisp, and you have no idea what a tree is.
Ad hominem, nice. Haskell is my main language.

>You are completely out of things to say because you have never even come close to anything lispy.
Lisps (mostly Scheme) were my main functional languages before I switched to Haskell.
>>
>>51625147
The answer is out there, Neo.
>>
>>51625132
I wrote fizzbuzz once, but I changed the tab width so it was pretty different from the book.
>>
>>51625023
>>51625071
>>51625147
Good luck lad
>>
Hey /dpt/, is there anyone more insufferable than functional-fags?

When your language takes longer to write than a scripting language and still runs slower than a real compiled language like C or C++, I guess all you can do is boast about "purity" on the internet and pretend your language is superior.
>>
>>51625132
I developed a comprehensive Mantle API header/function loader library, which is my only public/finished work. It's got hardly any "real" programming, though, it's mostly a bunch of function prototypes and struct/enum definitions.

I am currently treading new ground, as far as I can tell, with the language I'm designing.
>>
>>51625174
Thanks for confirming all my points.
>>
>>51625195
The people who make posts like this in the first place?

>>51625215
Epic.
>>
>>51625132
I worked for a while in a skunkworks team writing drivers and programs for future IoT products.
>>
>>51625195
Yes: you.
>he doesn't know about the performance and development efficiency of functional languages!
I bet you like C, too!
>>
>>51625224
>IoT

Thanks for contributing to supreme cancer.
>>
>>51623701
make it into a relative url
header('Location: /hobnobv2/secondpage.html');
>>
>>51625195
honestly FP is pretty important to understand from a CS prospective so if you write off FP because of a few vocal autists/shills (paul graham included) then i honestly Feel Bad For You Son
>>
>>51625230
Name one functional language that runs faster than good C code.

Now
>implying you can write it faster than someone with equivalent experience can write Python or Perl
>>
>>51623779
iktf

no one can ever know everything tho

learn to embrace the fact that there's always something to learn and/or get better at rather than let it depress you that the ride never ends
>>
>>51625251
>what is a middle ground
It's not even in the middle, it's closer to the performance of C than Python and closer to the development time of Python than C.
>>
>>51625024
It is backwards, but the other way is also a constraint violation.

The only cases involving pointers where a cast isn't required are between pointer-to-void and some other pointer type (in either direction), or from integer constant zero to a pointer.
>>
>>51625251
Nice strawman. Now name a single application that can be written faster in C (assuming you are 10x faster than the fastest human in C) than in a functional programming language.
Protip: you can't.

Call me when python is even 1/100th as fast as a naive lisp SBCL program.
>>
>>51625233
The reason I'm not still working for the company is because I was very vocal about the IoT being a terrible terrible idea that shouldn't be pushed.
The pay was good and the tech was fun to work with though.
>>
>>51623798
>>
>>51625282

God will have mercy on you for this good deed.
>>
>>51625251
ATS
Checkmate.
>>
the only people who hate java are memers and plebeian wage slaves that worked in a shitty workplace where they belong
>>
>>51625286
>le I have no idea what millenial means meme
>>
>>51625132
I wrote an application that can backtrace peoples' IP addresses from their post number. Your dead, kiddo.
>>
>>51625281
Either performance matters, and you write it in C, or it doesn't matter, and you write it in Python. That's what my point was.

Trying to find a compromise is pointless.
>>
>>51625251
"Name one functional language that runs faster than good C code."

I've had it with all you guys thinking that raw performance is the only thing that fucking matters and that if anything is slower than C (which pretty much nothing CAN POSSIBLY be slower than "good C code") then its shit.
People used to be like this about assembly language, and then Unix came along and wrote everything in C, now look where we are.
Fucking ignorant
>>
>>51625320
My sides!
I'll bite though: the only way to make a fast program in C is if you have infinite time. Without infinite time, it is possible to write python code that is significantly faster than C code. More realistically is to use a fast non-C language like lisp, ats, ocaml, lua, javascript, or D.
>>
>>51623796

It maps every element of a list to a new list and concats them.

>>= = concatMap
return x = [x]
guard p = if p then [()] else []

list >>= \x -> guard foo >> return x
list >>= \x -> guard foo >>= \() -> return x
list >>= \x -> guard foo >>= \() -> [x]
list >>= \x -> if foo then [()] else [] >>= \() -> [x]
list >>= \x -> if foo then ([()] >>= \() -> [x]) else ([] >>= \() -> [x])
list >>= \x -> if foo then [x] else []
concat $ map (\x -> if foo then [x] else []) list
>>
>>51625334
fizzbuzz is probably too hard for these kids in assembly, that's why they don't meme about >muh performance

they would if they could tho
>>
>>51625335
>le "C takes forever to write!!! maymay"
Will this meme ever die?

I swear to god if any of you faggots had to write a program in assembly, you'd understand that C is still a very efficient use of programmer time. It might take a competent C programmer maybe 20% longer to write something in C than, say, Java or C++.
>>
File: 1423246623700.jpg (63KB, 559x715px) Image search: [Google]
1423246623700.jpg
63KB, 559x715px
>>51625362
>C is still a very efficient use of programmer time
>>
>>51625335
>not sure if trolling or just retarded
it's trivial to write C code faster than any python code.

>lisp, ats, ocaml, lua, javascript, or D
the memes are out of this world
>>
>>51625334
*be faster than "good C code"

>>51625362
I can write code in C and be productive in it but I'd rather not because it's such a pain in the ass (no namespacing, strings a shit, memory management etc).
I'd rather write in C++, which I have a very good grasp on (even though its a clusterfuck of a language) and can write clear and fast code in. If I want to dick around I'll use Python or Haskell but the majority of my large projects end up in C++ (unless I'm forced into another language)
>>
>>51625362
C takes me 10 times longer to write when doing anything with strings because segfaults are one of it's biggest features.
>>
>>51624049

Just back from wanking over its compiler.
>>
>>51625362
Idunno. If I'm writing something with a GUI or a lot of string manipulation, I'd rather write it in something else that does all the dirty work for me.
>>
>>51625398
Are you that faggot from yesterday who said it'd take 10 minutes to write a program that reverses words in a string, in C?
>>
>>51625132
a couple times ye


i made a platformer game in C with SDL
i made a toy language in C
some other toys

need a new project idea asap
>>
>>51625413
No.
I don't even see how that would be an issue when strtok exists.
>>
It's not even string manipulation regex bullshit, it's just that if you have to keep track of string in multiple parts of the program it exponentially becomes a pain to handle memory associated with them.

>>51625413
Trivial programs (fizzbuzz, string reverse, quicksort etc) are not, and never will be, a good representation of the language's effectiveness as a whole. When will this fucking meme die?
>>
>>51625335

> lisp, ats, ocaml, lua, javascript, or D

> ats
> lua

Time to ask your guardian to turn your internets off.
>>
>>51625419
a scikit/ML project that makes dank new memes
>>
>>51625450
you could be a great data science pioneer of memes
>>
>>51625434
>implying Linux is a trivial program
>>
File: Einstein_laughing.jpg (32KB, 640x480px) Image search: [Google]
Einstein_laughing.jpg
32KB, 640x480px
>>51625362
It's all relative
>>
>>51625466
It's not trivial, so it displays the fact that C is a extremely good language for developing something large and performance sensitive like an OS, where the programmer needs direct control over memory at all times.
>>
>>51625362
>le "Assembly takes forever to write!!! maymay"
Not really. Ignoring everything else, it takes a skilled x86 assembly dev about twice as long to write a moderately complex application than a C dev.
>>
>tfw due Sunday night

http://users.ece.utexas.edu/~patt/15f.306/LabAssignments/Project5/index.html

I'm fucked
>>
>>51625513
>Ignoring everything else, it takes a skilled x86 assembly dev about twice as long to write a moderately complex application than a C dev.

And it takes a skilled C dev about 100 times as long to write a moderately complex application than a Python dev.
>>
>>51625434
>>51625466
I have to add that trivial programs may be good representations of some aspects of a language's effectiveness.

e.g.
string reverse in C isn't extremely easy (doable in about like 8-10 lines)
string reverse in Python is pretty easy and very simple if you write out the code for it (doable in 5 lines), but there are tricks like slicing that can get it done in like 2 lines.
string reverse in Haskell is a 2 liner normally and can be made into one line if you use 'foldl', but both solutions look very cryptic if you aren't accustomed to functional programming.
>>
>>51625576
>string reverse in Python is pretty easy and very simple if you write out the code for it (doable in 5 lines), but there are tricks like slicing that can get it done in like 2 lines.

You mean one line.
print("hello world"[::-1])
>>
I learned PHP so I'm making user self-service sites to code myself out of my job. At least I can stop resetting passwords.
>>
>>51625603
Code I was referring to:

C:
// kind of unclear how this works, VERY EFFICIENT
void reverse (char* str)
{
int i, j, len = strlen(str);
for (i = 0, j = len - 1; i < j; i++, j--)
{
char c = str[i];
str[i] = str[j];
str[j] = c;
}
}


Python:
def reverse (string): # VERY CLEAR how this code works
result = ""
for char in result:
result = char + result
return result

def reverse (string): # less so
return string[::-1]


Haskell:
-- confusing to non-FP
reverseStr "" = ""
reverseStr (x:xs) = xs ++ [x]

-- what the fuck??
reverseStr = foldl (flip (:)) ""
>>
>>51625672
The second part example in Python isn't really unclear, in fact it's quite obvious, if you know how Python slices work.
>>
>>51625726
I suppose so. It's certainly better than the haskell fold but not as direct as the other example.
You could say the same about the first Haskell example, but do you know how that works on first glance? (also just realized I fucked it up)

reverseStr "" = ""
reverseStr (x:xs) = (reverseStr xs) ++ [x]
>>
>>51625744
Not him, but I can. Though I've used Haskell a lot. As a beginner, it would probably take me a minute or so to work it out.

The version with "foldl" is still pretty arcane to me, since I tend not to work with foldables or traversables much.
>>
today I am going to write a program in C# that asks you for your height

if you enter 180cm-210cm you get a "good for you"
if you enter >210cm you get "freak"
if you enter <180cm you get "pathetic"
and if you enter some non-numeric value you get "Wrong entry, bitch"
>>
>>51625744
>>51625772
I also like how the use of "flip" is a big red herring.
>>
>>51625772
flip f x y = f y x

foldl f acc [] = acc
foldl f acc (x:xs) = foldl f (f acc x) xs

-- write string reverse in tail-recursive style
reverseStr a =
iter "" a
where
iter acc "" = acc
iter acc (x:xs) = iter (x:acc) xs
-- ^ this is a 'left fold'
-- where z = ""
-- f acc x = x : acc

reverseStr a = foldl (\acc x -> x:acc) "" a
= foldl (\acc x -> (:) x acc) "" a -- convert infix operator to normal application order
= foldl (\acc x -> flip (:) acc x) "" a -- flip argument order
= foldl (\acc -> flip (:) acc) "" a -- this is called "eta-conversion", used to eliminate variables
= foldl (flip (:)) "" a -- again.

reverseStr a = foldl (flip (:)) "" a
reverseStr = foldl (flip (:)) "" -- all variables have been eliminated
>>
>>51623544

>>51625877
>>
>>51625868
>>51625744

Lol. Kid,

You think that by using these esoteric symbols you YOURSELF look smarter by going out of your way.

You did nothing!

Your code performs slower! Your code is harder to read!

You literally contribute nothing but selfishness.
>>
>>51625545
Does it really, though? I feel like the initial start-up time investment with C is much higher, but once you've written your own data structures and are onto actually writing the behavior, writing it in C won't take that much longer than writing it in Python.
>>
>>51625778
Good job anon. Maybe one day you'll graduate to FizzBuzz.
>>
>>51625868
Alright, makes sense to me now. I gotta associate "foldl" with "tail recursion" in my brain.

@51625915
Hello, realtalkintech.
>>
>>51625545
What kind of application?

>>51625576
>but both solutions look very cryptic if you aren't accustomed to functional programming.

yea im gonna go out of my way to read your jizz gobbledegook
give me a real programming language and quit with the horse shit
>>
>>51625915
I think eta reduction and combinatory calculus is fun and interesting, I would never put that kind of code in a real program but I like how it's possible to do that
>>
>>51625941
>Hello, realtalkintech.

how did you know

also are you a full fledge fp

explain your philosophy of where fp fits in your life

>>51625949
>I would never put that kind of code in a real program but I like how it's possible to do that

Thank you.

I respect your right to enjoy a hobby in your free time. and even use haskell for places where it makes sense

the meme of fp being this "epiphany" that you can just turn every oxygen molecule into has to go.

they need to be pumped with steroids and redpill'd
>>
def reverse(str: String): String =
if (str.isEmpty) "" else reverse(str.tail) ++ str.head


Scala would be something like that. I'm rusty and on my phone
>>
>>51623544
>>51625335

ITS A CAPITAL L (Lua)
GET IT RIGHT KIDS
>>
>>51625335
>lisp, ats, ocaml, lua, javascript, or D.

you forgot node.js

wait, u meant node right?
>>
>>51625982
look at this memer
he thinks javascript is a programming language
>>
>>51625967
>the meme of fp being this "epiphany" that you can just turn every oxygen molecule into has to go.
>they need to be pumped with steroids and redpill'd
I know you're trolling but FP is very powerful, you should realize that by the fact that every single popular language has elements of FP in it. Haskell may not be practical due to being "purely-functional" and "lazy-evaluated" but that doesn't discredit the rest of functional programming (type inference, lambdas, list comprehension, stateless programming in stuff like concurrency)
>>
>>51625967
>explain your philosophy of where fp fits in your life
I'm a student, but I'm currently developing a programming language (using Haskell, of course) that blends type theory, which is inherently functional, and imperative programming, with all the good stuff like manual memory management and FFI, in a way that makes programs both very fast and very safe.
>>
>>51625398
segfault is a failure on your part, not the language.


Learn the language, and don't tell the computer to do anything stupid.
>>
>>51626017
Tell me all about your mastery over the C language and your avoidance of segfaults.

Times when segfaults occur when I'd rather have a sane error message:
Stack overflow
Out of memory
Null pointer dereference, other kinds of bad pointers
When you forget to recompile a .cpp file when you changed a header

Times when I wish I had segfaults over silent errors:
Array out of bounds
Use after free
Integer overflows
Bad casts


No, I'm not just fucking around writing string reverse and fizzbuzz all day.
>>
>>51626017
But if the language encourages telling the computer to do stupid things, then isn't it actually the language's fault?
>>
>>51625967
>>51626007
tl;dr I'm more interested in the type systems than functional programming itself. It just so happens that the most common models for type theory are lambda calculi, which are *gasp* purely functional.
>>
is this correct logic?

void g_ENT_remove ( int entity ) 
{
g_ENT[entity].used = false;

if ( entity == highest_used_entity )
{
int i;
for( i=highest_used_entity; i>0; --i )
{
if( g_ENT[entity].used == false )
continue;
highest_used_entity = i;
break;
}
}
}
>>
I hate coding interviews.
>>
>>51626083
Sure.

If you can, I'd consider going for the unordered array approach, where removal involves an O(1) swap and you stay packed in memory.
>>
>>51625994
>I know you're trolling but FP is very powerful, you should realize that by the fact that every single popular language has elements of FP in it.

Chicken vs Egg

Of course we had functions.

FP took them and literally discarded the scaffolding that made stuff useful.
Imagine if imperative programming was an ice cream cake. I have great tools, hot knife (cmake, autotools), all these templating things. yatta yatta

now imagine, you took the frusting with your skinny arms. and were like, my frosting! then you said, "cake, cupcakes, everything has frosting in it".

you even feel empowered. you can actually kinda ball up frosting without any base, for a bit of time

then you realize, without that strong, sturdy base, you don't have the strength to bustress and scale your cake well.

also people complain that the lack of breading, ice cream, and a refridgerator with candles makes people bored.

eating icing by itself is fine. but it's just a condiment

that's why you don't rip one part of a language and try to apply it to every last thing.

doubling down just makes you look like more of a lunatic.

im sure you can creating amazing feats using just icing. but real architects understand the wide array of tools and build to the stars
>>
>>51626095
a what now?
>>
>>51626096
Not gonna bother replying anymore
>>
>>51626092
why? how have you practiced?
>>
>>51626096
All you're doing is contriving "imperative programming" with mature languages and "functional programming" with immature/toy languages.

It's a convincing strawman, but it's still a strawman.
>>
>>51626117
I'm doing problems on sites like leetcode and hackerrank. For some reason I can't solve the problems on my own. Like it only makes sense once I see the solution.
>>
>>51626101
void g_ENT_remove(int entity) {
g_ENT[entity] = g_ENT[highest_used_entity];
// you could even be super 1337 and use a postdecrement to make it a one-liner
--highest_used_entity;
}


This will only work if you're not expecting the entities to be in any particular order, and indices/pointers will get invalidated.
>>
>>51626139
I'd say "practice more problems" but most of my problem solving skills that let me solve most of those problems just came from me programming whatever the hell I want so I'm gonna have to just say "program more"
>>
>>51626060
>null pointer dereference
Literally what? How hard is it to write if(ptr) *ptr; else error_handle();
>>
>>51626139

Have you read CTCI? Or EPI? I would recommend those. Don't worry about finding hackerrank hard, its not easy.

Do you have gaps in your knowledge? Big O? Or DP?
>>
>>51626116
no disrespect.

>>51626131
ok

what startup did you create?

Google or Facebook?

If you are so wise and have all this advice, show me *your success*. Then tell me it's a strawman.


Are you upset that I give selective attention?

FP gives selective attention by FUCKING THROWING AWAY EVERYTHING imperative programming has!

Then acting ARROGANT about it.

So you talk down to me about programming and think you're so smart.


how would you feel if I came up to you like some JOCK and then start giving you some tips on girls and form.

https://www.youtube.com/watch?v=lZeiXPeOhAM

then I go tehre and critique your form.

on tiny superficial things. all the while EVERYTHING GOES BANKRUPT because you care about the SMALL - with ZERO consideration we're on a team and have to SHIP

Functional programming is more than a paradigm.

>>51626131
>It's a convincing strawman, but it's still a strawman.

If you want to debate this. I will - but even if I did, do you really think they'd change their minds?
>>
>>51626101
>>51626157
Note that the invalidation problem can be solved through abstraction -- keep a sparse, ordered array of indices/pointers in the packed array. Only store indices/pointers to elements of the sparse array. Iterating through all your entities becomes a simple act of iterating through the packed array, which is good for cache.
>>
>>51626139
There's some shit that you just can't be expected to solve without being exposed to the "common" way of doing things.
>>
>>51626197
When I "invented" the ability to sort a bunch of huge objects by actually just sorting an array of pointers to them, I felt like a genius.
>>
>>51626160
OK, I admit that I don't run into very many of those. But that's only because I structure my code and keep an internal catalog of which pointers are nullable very well. If I was working with a larger messier codebase I can imagine it being more of a nightmare.
>>
>>51626191
>Functional programming is more than a paradigm.
Another strawman. They just keep coming, don't they?

>>51626218
Gotta love Wheeler's Law.

>>51626226
C would be improved IMMENSELY if you weren't able to set pointers to null.
>>
>>51626158
I'm trying, like for example, one problem is keeping track the median from a stream of numbers. The solution is to use a min-heap and max-heap but to keep numbers in the max-heap less than the min-heap. It's clever once I know it, but I would try a balanced avl tree, but the heaps are much more simple.

>>51626182
EPI? I'm currently reading through CTCI, I can sort of work through the problems, but when I see a new one I freeze and become clueless.
>>
>>51626072
it doesn't encourage it.
it gives you more control with the assumption that you know how to use it.

a language is just a way to tell a computer to do things.
>>
>>51626240
>Another strawman. They just keep coming, don't they?
you even lift?

you think you're this fast "wisp"
that's what you are
so strong and clever in all your ways
"true" and self-actualized. you reached the precipce of excellence by becoming a functional programmer
all code you write is logical and infallible. *raises nose up all snobby like* It is functional programming and I am pure and exquisite.
It is just *revolutionary*
>>
>>51626240
What? Null pointers are INSANELY useful for a ton of purposes. I'm not sure what the alternative is. I use null pointers extensively.
>>
When I add a new member to my class in C++, the program crashes with weird backtrace, what gives? I figured out that if I add a small member like a boolean or any other primitive, it's okay, when I add an std::string, then it's okay too, but when I add, say, 5 std::string instances, then it explodes, what the fuck?
>>
>>51626294
I suppose you'd need to augment C with something like a Maybe type that forces you to pattern match to either get Nothing (null) or Just a (non-null) pointer.

Being able to store the information of not having a pointer in the pointer itself as a never-valid address is just a memory-saving optimization.

My point is, it would be better off if a) there was a way to quantify by type that the pointer was non-null and b) if it could be null, you would be forced to check it to get the address.
>>
>>51626334
Well, what does the error say?
>>
>>51626334
Stack overflow maybe? You can try configuring your stack size higher and see if that fixes it.

I once was accidentally allocating 1024 arrays of 1024 integers instead of just 1024 integers and shit kept crashing immediately. I could not figure it out.
>>
>>51626346
I'm either getting std::bad_alloc exception or some arcane backtrace like this:

#0  0x777a4400 in ntdll!RtlImageNtHeader () from C:\Windows\SysWOW64\ntdll.dll
#1 0x777a35d7 in ntdll!RtlImageNtHeader () from C:\Windows\SysWOW64\ntdll.dll
#2 0x777a34c2 in ntdll!RtlImageNtHeader () from C:\Windows\SysWOW64\ntdll.dll
#3 0x77841a36 in ntdll!RtlpNtEnumerateSubKey () from C:\Windows\SysWOW64\ntdll.dll
#4 0x777fae62 in ntdll!RtlUlonglongByteSwap () from C:\Windows\SysWOW64\ntdll.dll
#5 0x01ee0000 in ?? ()
#6 0x777a34c2 in ntdll!RtlImageNtHeader () from C:\Windows\SysWOW64\ntdll.dll
#7 0x764698cd in msvcrt!free () from C:\Windows\syswow64\msvcrt.dll
#8 0x01ee0000 in ?? ()
>>
>>51623600

"KANSHA!"
>>
>>51626336
Well, my point was more that I've never had a null pointer cause any trouble in C, especially since they're so easy to check against (literally if(pointer)) so adding unneeded complexity seems... unnecessary.
>>
>>51626389
I wouldn't call it unneeded complexity. It lets you quantify when you're not allowed to pass in a null pointer (thus removing the "well, I should do it anyways to be safe" check, which has overhead), and forces you to do the check otherwise.
>>
>>51626372
That's probably heap corruption, which can be caused by an overflow. What's likely happened is that you haven't recompiled all .cpp files that include the header, which leads to the code thinking the structure is smaller than it is and not allocating enough memory, or something similar to that.
>>
>>51626240
Wheeler's Law?
>>
>>51626446
>All problems in computer science can be solved by another level of indirection, except of course for the problem of too many indirections.
- David Wheeler

There's no real "Wheeler's Law", I'm just referring to that quote.
>>
Does Alchemist for emacs actually do anything? The documentation is shit.
>>
File: 01.png (554KB, 640x480px) Image search: [Google]
01.png
554KB, 640x480px
Rate me, /g/
>>
>>51626249
Honestly, its just more practice. EPI is Elements of Programming Interviews. Its harder than CTCI.
>>
File: 02.png (514KB, 640x480px) Image search: [Google]
02.png
514KB, 640x480px
>>51626475
>>
>>51626475
If you wrote your solution in a real language it wouldn't have taken so long, retard.
>>
File: 05.png (503KB, 640x480px) Image search: [Google]
05.png
503KB, 640x480px
>>51626475
Last one;
>>
File: plsnobully.jpg (52KB, 500x500px) Image search: [Google]
plsnobully.jpg
52KB, 500x500px
>>51626486
WHAT
>>
>>51626371
>>51626439

That was it, I hate myself so much for trusting CMake. I've been at it for the second day wondering why the fuck is this happening and I was sure that it can't be this since CMake automatically picks up which source files rely on a modified header and rebuilds as necessary but I just went with make clean && make and it clicked. Thanks anons.
>>
>>51626511
>but I just went with make clean && make and it clicked
It's the "have you turned it off and on again?" of programming. Sometimes it's all you have to do.
>>
>>51626511
>using cmake
KEK

I am always amused by fags who think makefiles are useful.

I just #include all my shit into one file and compile that with some flags. I've literally never had a project take longer than a second to compile on me. Incremental compilation is useless with how fast computers are today.
>>
Is codecademy a good site to learn basic web development skills?

Any recommendations of sites, resources, etc.. would be very much appreciated
>>
>>51626529
You've never programmed anything substantial.
>>
>>51626540
I don't know, 80,000 LOC isn't insubstantial. Maybe if you get into the millions incremental compilation is relevant, but few projects get that big.
>>
>>51623544
What is your experiance with QT / opintion on it for c++ /g/?
>>
>>51626540
If you want an actual source: http://buffered.io/posts/the-magic-of-unity-builds/

It's definitely worth trying out rather than just dismissing.
>>
>>51626529
>I've literally never had a project take longer than a second to compile on me.
>>
>>51626708
Not a project that I've written myself and followed good practice on. Obviously when retards abuse templates or I need to do some bullshit with boost because some asshole was feeling lazy, then yeah, those projects take minutes. But in my own codebases, where I enforce strict guidelines? Everything compiles quickly. I literally reject any pull request that has templates in it.
>>
>>51626607
Qt is great. Learning it now.
>>
>>51626398
And THIS is an example of how a rich type system can simultaneously improve performance and type-safety.
Suck it imperative-fags
>>
>>51626529
This actually seems intriguing, however it makes C's "static" keyword meaningless.
>>
>>51626336
>a Maybe type that forces you to pattern match to either get Nothing (null) or Just a (non-null) pointer
this terminology is so gay

JUST
>>
So, is Go really terrible or is that just a meme?
>>
>>51626982
it really is terrible. it has no redeeming features.
>>
>>51626982
nobody uses it, not even google
>>
>>51626982
its not terrible, just outperformed by other languages for any conceivable use case
>>
>Needs an Erlang SMTP library
>Found three separate libraries
>Each of them have dozens of forks
>Can't find any that don't look abandoned
>>
>>51626996
>>51626997
>>51626998
What's a good option for getting into networked application backends? Should I just stick to the standards like Ruby or PHP?
>>
>>51627024
node.js
>>
>>51627024
>Should I just stick to the standards like Ruby or PHP?
you dont know what network applications are
>>
>>51627024
If you're just getting into network programming then yeah, I'd stick to mainstream stuff. I wouldn't get anymore exotic than Node.js until you have some experience.
>>
>>51627047
Not him, but lots of web apps use PHP and Ruby backends. Now, if he's talking about making an MMO or something, that's a different and much stupider matter.
>>
>>51627064
PHP and Ruby are web backends , not network backends, network backend is not even a term people would use except for something specific within a network application
>>
>>51627097
Don't really care enough to get into a semantic argument, but he said networked application backend. Any web app that actively communicates with a server is a "networked application".
>>
>>51627150
>Any web app that actively communicates with a server is a "networked application".
No, web applications are frameworks which are a collection of programs that usually include a server. Servers are an example of network applications. You cant confuse web frameworks with network applications, its not semantics, they are different things. If you want to talk about network applications like servers, fine, we can talk about that. But web frameworks are just something that might include a server but is not a server itself. To take node as an example, node is not a framework, and it is not a server either, it is a web app using callbacks and runs on a single thread.
>>
Any good examples of HSM in c11?
>>
>spend 1 hour debugging my code
>turns out I forgot to bracket one of my macros properly

fuck programming.
>>
>>51624844
Negative memory is retarded.
>>
>>51624886
roll
>>
>>51627360
>using macros
this is just one of those things you won't get bothered with in based java
>>
>>51627378
>he doesn't store his porn starting from -2147483648 bytes
>>
>>51624011
java
>>
> Twine Engine
> Find out that only Twine 1.0 has any actual attempt at documentation
> Twine 2.4 is current engine
> Not the same markups
> All documentation is on outside sites in videos and .jpg files
> The wiki is only edited by the admin, abandoned since this spring
> 2.4 came out this week

Oh the cringe. Dear god, please get it together!
>>
>>51624011
C++ for performance-critical tasks
java for everything else
>>
>>51627403
>Storing porn in volatile memory
Enjoy your reboot.
>>
>>51627396
>Touting lack of macros as a feature
God damn, Javafags are retarded.
I hate using languages that don't support macros. Even macro systems as shitty as C's is incredibly useful.
>>
>>51627424
>using random-ass libraries/engines
>not rolling your own to your own specifications
>>
>>51627426
C++ is 10x slower than c i thought?
>>
any chip recommendations for getting started with embedded C programming?

no meme ARM boards by sjw companies pls
>>
>>51627449
Only if you go full retard with inheritance. Otherwise its basically C.
>>
File: Blank_Calendar_-_White.jpg (37KB, 1107x870px) Image search: [Google]
Blank_Calendar_-_White.jpg
37KB, 1107x870px
I want to program an automatically generated calendar that allows users to add activities. User adds the name and the frequency (once, twice, thrice or six times a week). Each box has a checkbox for which the value is saved.

How should I approach this? I am thinking of Javascript to add the lines to the calendar but I don't know about the cookies.

Pic related, it looks like this.
>>
>>51627433
> Re-inventing the wheel when you're just trying to make a Choose your own Adventure game

Frankly, though, with the total crap documentation on Twine I pretty much already am. None of the macros from 1.0 work and none of the macros for 2.0 are written down in any reasonable fashion so I'm scripting everything outside of basic links and story layout.

I'm bitching because this is a crap way to run any engine. I mean, seriously... WTF. Where's the pride in your work?
>>
>>51627464

why isn't postgres, linux, bsd, vim written in C++?

why is firefox so slow?
>>
>>51627476
because its easier to enforce good code with C, with c++ you can go full retard, like I said.

because SJWs are killing it on purpose
>>
>>51627452
>wants embedded programming
>doesn't want ARM

You're sending mixed signals here, anon. ARM dominates the embedded processor market.
>>
tfw mentally inferior
>>
If C++ is hard for you, then your IQ is probably quite low
>>
>>51627733
C++ isn't hard, it's just stupid.
Thread posts: 312
Thread images: 20


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