[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: 317
Thread images: 42

What are you working on?

Previous thread: >>46032956
>>
>>>/a/
>>
>>46047119
>>>/a/
>>
File: mn4sSzL.jpg (71KB, 500x375px) Image search: [Google]
mn4sSzL.jpg
71KB, 500x375px
>>46047125
>>46047131

Also I'm moving servers and sketching out how I want to refactor the main site on it.
>>
>>46047125
>>46047131
thanks for your input.

If I'd have used a picture of some prominent person in the field of computer science, we'd have shitposters.
When I use the standard anime picture, there are also shitposters.
It'd be nice if you people would just shut the fuck up, but like that's gonna happen, right?
>>
File: Autism_Awareness_Ribbon.png (385KB, 1000x1620px) Image search: [Google]
Autism_Awareness_Ribbon.png
385KB, 1000x1620px
>>46047131
>>46047125
It's showing m80
>>
Is gameboy emulator bro still here.

Commit your changes already so I can pull
>>
>>46047423
Yes I'm here, sorry I didn't realise I had any changes sorry haha. I've done it now. Sorry about that, I'm a bit of a Git Noob ahah
>>
Hi I'm trying to get accustomed to the moneyrunner api for android. Thing is I can't get the fucking thing to work with windows. Anybody have good ideas?
>>
>>46047455
My first idea would be to post more information than "it doesn't work".
>>
>>46047423
Have you been able to pull?
>>
>>46047441
I'll fork it, make some changes and comment it so you can understand a bit and then you can put it back onto your main git(essentially appending your changes)
>>
>>46047492
Okay cheers man. It'd be cool to have a few people working on it on a somewhat larger scale, if you have the time of course.
>>
>>46047455
>>46047476
Sorry I'm a dumb ass. First of all its the MonkeyRunner tool which provides an API for writing programs to control an Android device outside of Android code.

What I want to do is write a python script to inject code into my android device to act as bot in an android game.

The problem is that I'm not able to run the script at all because something about the window directory system doesn't meld well with the android apk shit.

Is there any other way to create a bot for an android game?
>>
>>46047778
>I'm not able to run the script at all because something about the window directory system doesn't meld well with the android apk shit
What do you mean?
>>
>>46047793
I mean that all the solutions to get the api working that I've found only work in Unix/Linux and Osx. I think the windows version isn't working because of some problem with the current version of Jython.

I think at this point I'm better off finding a different method to create the bot.
>>
Now you can fly around in the terrain renderer.
>>
>>46047820
If you're just going to list your thoughts about what the problem is and not the symptoms why even bother to post?
>>
>>46047821
Pretty cool.
>>
>>46047842
Thanks, the height data is downloaded and resampled (to get the projection correct) programatically from a NASA database. Just input a latitude and longitude and you're good to go.
>>
File: code.png (36KB, 882x601px) Image search: [Google]
code.png
36KB, 882x601px
>>46047837
Alright here's the code, taken directly from the android website(http://developer.android.com/tools/help/monkeyrunner_concepts.html).
>>
File: problem.png (72KB, 939x732px) Image search: [Google]
problem.png
72KB, 939x732px
>>46047837
And here's the problem. It trying to use some old android program despite the fact that I've changed where the python script points.

Additionally(at the bottom) its trying to save images into a directory and says it doesn't exist despite the fact that it does.
>>
>>46047878
I don't have the setup necessary to run the code, just say what the problem is. Like that specifically is happening that shouldn't.
>>
File: hgjhfggf.png (135KB, 1427x1053px) Image search: [Google]
hgjhfggf.png
135KB, 1427x1053px
>>46047119
I guess the Age display still looks a bit cluttered

>>46047821
That looks really good for heightmap-based terrain
Not seeing any obvious artifacts
Is it very high res?
>>
>>46047963
What did you code this in? I like the look and style.
>>
>>46047963
The height data from NASA is available at a 3-arc-second resolution (so 90m per pixel at the equator). I resample at a resolution of 50m per quad.
>>
>>46047972
I'm using C#, WinForms and OpenGL
Everything is custom drawn though
The style mostly stolen from Google
>>
>>46048004
It actually really nice, so far imo you did a great job. Bit of a code noob right now but hoping to get on to making useful things soonish.
>>
emulator bro
there was simply too much to edit since you were already diving deeply into the opcode handling
I made the pull request and typed up some info on designing it.
I see a lot of java-like code handling
>>
>>46048031
Thanks,
I think you're the first person to actually like how it looks

P.S. if you want to make useful apps I recommend never touching WPF ever
Only use WinForms or QT for GUI-based stuff
>>
>>46048113
I'm learning python as my first language so I was already planning to look into pyQT when I feel like I've learnt enough to go with GUI's. Also take my opinion on looks with a grain of salt, I just like the mix of functionality and style in it.
>>
>>46048001
Wouldn't it make more sense to just use half of 90 instead of 50?
>>
I'm making an android app that makes stuff a bit more convenient.

I have a bunch of features planned and I'd love to go into it but I personally have never seen anything close to my idea. Sadly I can't share it all with you.
>>
Writing a silly twitter bot using Nodejs. I was trying to make something that tweets picture of a game that was released on the same day whatever years ago, but the Giant Bomb API didn't make dates searching outside of ranges possible.

I could either just scrape their database for games info and use their release dates or just make something simpler with their API instead. Or maybe find a better open video games database.
>>
>>46048113
Only use Themed Tk for GUI-based stuff.
>>
>>46048203
That doesn't really seem like a good idea:
http://en.wikipedia.org/wiki/Category:Software_that_uses_Tk
>>
>>46048048
Just merged the PR and left a comment. Thanks for the changes.

I was actually looking into unions as registers, but wasn't too sure about it so I didn't use them. And yes, I've been using CPP for about a month, so I still think in Java when I program stuff. I love the power of C and CPP though, it feels like I'm not being restricted by anything.
>>
How might I extract out the data from a string that is of this form:
{ "_id" : { "$oid" : "54afe50afb1c311ed0002ec2" }, "command" : "echo hello world", " tasknumber" : "1", " testtype" : "test mongo" }

For example, if I wanted to create an integer called task number and store the 1 in it?

I'm doing this in C. I tried sprintf but that seemed to fuck up!
>>
>>46049228
that's JSON.
use a JSON parser. I don't use C, so I don't have any libraries to recommend, but there will be many.
>>
File: file.png (112KB, 2018x896px) Image search: [Google]
file.png
112KB, 2018x896px
Well, I had the brilliant idea to start a project in node.js. Why is nodegit terrible? With the millions of bullshit packages in npm, you'd think node would have at least one good Git library, but it doesn't seem like it. So this function takes a pointer and returns an error code? They didn't modify or document their auto-generated libgit2 bindings at all? Is this really what I'm supposed to be using instead of node-gitteh?
>>
>>46049262
>node.js
Lots of ADHD teenagers shitting out packages left and right before dropping them and moving on to the next one without caring about reliability or documentation. What did you expect?
>>
>>46049262
last time I checked there were tens of bullshit clients that simply wrapped the git cli
I was somewhat surprised that none had actually wrapped the native client
>>
>>46049246
I knew it was JSON, but didn't know there were parsers to do the job. Thanks.

Now to find something my company internet hasn't blocked to get the job done!
>>
>>46049281
>I knew it was JSON, but didn't know there were parsers to do the job.
wot
you knew it was in some format, but didn't know that there was software designed to read that format?
utter bullshit or stupidity
>>
>>46049270
>What did you expect?
Not much actually. I can't believe node let me down with almost no expectations. Git is supposed to be cool among node hipsters.

>>46049278
>last time I checked there were tens of bullshit clients that simply wrapped the git cli
Yeah, I'll have to look for one of those or invoke Git with child_process, or give up on node again and try Python or something.
>>
>>46049290
I'm not a programmer by training so a lot of these things I don't know about. I'm an engineer. I knew it was json, but thinking I had it as a string made me thing sprintf or something, rather than trying to parse it with a library.
>>
>>46049334
ok, so, stupidity :)
or to be less mean, ignorance
>>
>>46049334
Hi, some random bystander here.

You look like a complete idiot. Clinically retarded. Please don't call yourself an engineer.

How old are you? I'd honestly like to know, just to be sure.
>>
Has anyone here read sicp fully ?
Do you recommend it as a first peogramming book and how much is it still relevant in todays world, if yes what tools and packages should be on my linux system as an environment for completing this book's exercises and projects.
>>
>>46049397
Relevant? Yes.
As a first one? Fuck no, unless you have a tutor or something.
For Scgrme install Dr. Racket. There also should be SICP Scheme language for it somewhere.
Or, if you feel hardcore enough, install MIT Scheme.
>>
>>46049636
s/Scgrme/Scheme
Fuck phone keyboards.
>>
File: Untitled.png (4KB, 496x317px) Image search: [Google]
Untitled.png
4KB, 496x317px
>>46047198
Why not just do this?
>>
>>46049956
Why not stop caring because it literally doesn't matter at all?
>>
>>46049971
Because reasons.
>>
>>46049994
>Because reasons.
and you've just proved what I said in >>46047198: whatever image anyone uses, they'll still be shitposters.
>>
what makes a programming language better suited for one purpose than others?
>>
>>46050131
Lots of things.
>>
>>46050131
a better question to ask might be 'when doing X, recommend a language that would be most useful'
answers would still be highly subjective
>>
>>46047160
>>46047198
>>46047354
>replying to the autist
You are like the autists that reply to the trolls even though they know that they are trolls.
>>
>>46050178
>>46050165
but wouldn't Python be able to do most of the same things C can?
i know Python is a bit slower, but with modern processing power, i don't see how that would be an issue.
>>
>>46050287
performance is only one aspect
for example, if you're developing a 'secure' application, maybe you'd lean towards a language that prevents buffer overflows at the language level (i.e. not C)
other things are ease of use, maintainability, and the list goes on
>>
>>46050287
>i know Python is a bit slower, but with modern processing power, i don't see how that would be an issue.
>python is "a bit" slower than C
>it's not an issue
You are the reason software is less responsive now than it was in the 90's.
>>
>>46050385
i'm pretty sure there are more factors than that. for example, there's a lot more variation in hardware and software now than ever, modern programs tend to feature a lot more unnecessary bells and whistles and bloating DRM.
>>
>>46050385
>You are the reason software is less responsive now than it was in the 90's.
The reason is that HW is becoming infinitely complex while the gap in how well software guys understand the hardware is just increasing.
>>
>>46050131
Mostly because some higher-level languages do a lot of shit for you if you don't care about being fast, and this will save you (as the developer) time. However, if you do care about performance, it would be better to make these decisions yourself.
>>
another day passes, and another idiotic javascript error comes up
I was trying to print all the elements of an array to the console.
Arrays have a function 'forEach' which has one argument which is a function to call with one argument (the value).
e.g.
[1, 2, 3].forEach(function(x) { console.log(x) });
-> 1
-> 2
-> 3

to save code, I was trying to write:
[1, 2, 3].forEach(console.log);

in any sane language this would work, as console.log is a function with one argument, but in javascript it doesn't.
to make it work you have to
[1, 2, 3].forEach(console.log.bind(console));

javascript is retarded
>>
File: admin level 7.png (33KB, 1680x1051px) Image search: [Google]
admin level 7.png
33KB, 1680x1051px
Playing with geodata. Points to whoever can identify the city.
>>
>>46047821
what are you making? flight simulator?
>>
>>46050936
>console.log is a function with one argument

It's not though.
>>
>>46050974
hm, true, but it still doesn't work.
node etc does the correct thing and passes all parameters to console.log, (cur, key, arr)
but chrome errors out completely:
[1, 2, 3].forEach(console.log);
VM138:2 Uncaught TypeError: Illegal invocation
>>
>>46050936
thats a pretty retarded piece of code, nonetheless.
>>
>>46051006
sigh, how
>>
File: B7IRIJuCEAEoQcH.jpg:large.jpg (105KB, 1024x682px) Image search: [Google]
B7IRIJuCEAEoQcH.jpg:large.jpg
105KB, 1024x682px
How do I get employed writing C without a degree?

For that matter, how do I get employed writing <whatever> without a degree?
>>
>>46051024
>How do I get employed writing C without a degree?

>For that matter, how do I get employed writing <whatever> without a degree?

Use your brain and make something.

>Make a shit app that makes something convenient, throw ads on it
>???
>fuck hookers and throw away your millions of dollars
>>
>>46051093
>>Make a shit app that makes something convenient, throw ads on it
I don't have a smartphone, so I can't develop for one to advance shitty get rich quick schemes
>>
>>46051024
Can you program a trojan horse and a botnet?
Maybe you can earn money with that.
>>
>>46051186
:^)
>>
>>46050287
>i know Python is a bit slower, but with modern processing power, i don't see how that would be an issue.
Then try making software like a text editor that processes larger amounts of data for like visualization.

Hell just look at Emacs. If you're in GUI-mode and starts using macros on more text than normally it can cause noticable slowdown.
>>
How did I do?
>>
>>46051308
>new Array();
oh boy...
>>
Let's say I have an array of images, where I store the source of the image (I have a folder with all the images saved) and I want to display them all, preferably in a UL with a slider so I don't fill the whole screen with them. When the users clicks on an image an action will take place. What's the way to do it in JavaScript without much trouble?

Up until now I haven't even been able to display the images. I have something like this.

<html>
<head>
<script language="text/javascript">
var covers = new Array();
covers = [...] //filling the array with img sources

function displayCovers(){
for(i=0; i<covers.length; i++){
document.write("<li><img src='" +covers[i] + "'</li>");
}
}
</script>
</head>

<body>
Products
<ul>
<script>displayCovers();</script>
</ul>
</body>
</html>


I know
document.write()
isn't a very good way to do this, but I'm just trying to display them for now.
>>
>>46051319
What's wrong?
>>
>>46051294
>mac/10
>>
>>46051339
ok, I'll help you.
>language="text/javascript"
noooope. just use <script>...</script>.
all browsers know it's javascript, and besides, it's not 'language', it's 'type' (language is deprecated completely)
>new Array();
if you want to make a new array, you can do that...or:
var covers = []

same thing, without the ugly. It doesn't actually matter though, since you recreate the cover variable in the next line
>no indentation
please. fix that shit.
>document.write
you could, I guess, but there are better ways
see next response
>>
File: 121.png (22KB, 589x344px) Image search: [Google]
121.png
22KB, 589x344px
Why you are not using Scala ?
>>
>>46051405
Because I do not wish to work with some dudes that try to trick people.
>>
 

def comparaison(a:Int ,b:Int,op:String): Boolean =
{
if(op.equals(">")) a>b
else if (op.equals(">=")) a>=b
else if (op.equals("<")) a<b
else if (op.equals("<=")) a<=b
else if (op.equals("!=")) a!=b
else if (op.equals("=")) a==b
else
false
}


Can I make better ?
>>
Somebody post the image with things to code relative to your post number.
>>
>>46051433
>trick people
How ? I've just starting using scala and it seems that it's like java but without it's shit
>>
>>46051405
Because Go exists and it's aimed at the exact same problem space as Java is without making me want to blow my brains out.
If you want access to the JVM then Erlang and Scala are nicer choices of course.
>>
>>46051339
ok 4chan thinks this is spam, so just follow on replacing stuff from http://pastebin.com/raw.php?i=92vsrZCC
first, instead of
snippet 1

use:
snippet 2]

so now when the page loads it'll call your function, and the ul tag now has an id of products.
now, onto the displayCovers function.
in vanilla js, you should be creating the elements using the DOM functions:
snipper 3

do you follow so far?
>>
>>46051438
Spell comparison correctly.
>>
int main(void)
{
printf("%c[0;00mHello, world!\n", 27);
printf("%c[1;33mHello, world!\n", 27);
printf("%c[1;34mHello, world!\n", 27);
}


Holy fucking shit how could I have lived without this in my life.
>>
>>46051571
it's in french sorry
I mean Can't i just write something lik


def comparaison(a:Int ,b:Int,op:String): Boolean = { a "op" b }


And when I do
comparaison(1,2,>) it became
 1>2
>>
>>46050936
console.log is not even standard ECMAScript.
>>
>>46051600
what does it do?
>>
>>46051639
>Non-standard
>This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
didn't even know that
thanks
>>
>>46051600
>using "%c" instead of just writing it properly

printf("\x1b[0;00mHello, world\n");
>>
File: 404AccessDenied.jpg (99KB, 1366x768px) Image search: [Google]
404AccessDenied.jpg
99KB, 1366x768px
I hate how nobody uses HTTP error codes correctly. We've got dozens of them, people though of everything, and yet all the hipster kids have ever heard of is 200 OK and if you're lucky 404 Not Found. For everything else enjoy your custom error pages that have to be parsed manually on a case by case basic.
FFS.
>>
>>46051824
boop http://gadgetopia.com/post/9236
>>
>>46051550
I see, thanks for the help. It's not spam, I'm just completely clueless when it comes to JS and I just started learning. Yes, it's vanilla JS.

So now I want to do something when the user clicks on the specific li I should edit
snippet 3
and add an
onClick
to the li element created? Do I understand correctly?
>>
>>46051847
Glad this fag gets it.
>>
>>46051847
>add an onClick to the li element created?
yes, perfect
li.onclick = function() {
this.style.opacity = 0.8;
}

note onclick is lowercase.
>>
>>46051901
...
meant to quote >>46051853
>>
>>46051294
String handling seems good, no vulnerabilities that I can see.

But what about nonpositive bases? Sure, the ones in the input file are all positive, but the problem statement doesn't say anything about that.
>>
anyone cares to explain pointers on pointers in c++? i have no idea whats going on
>>
>>46052416
As in how they work, or why they are used?
>>
>>46052435
how they work
i'm looking at some pointers on pointers in arrays and i'm losing it. if you could just explain a little how they work exactly that would be great. thanks
>>
>>46052416
>>46052443

Post the relevant code, and with any luck we'll be able to answer your question(s).
>>
>>46052416
Pointers are the simplest shit ever.

It's a fucking address. You know how there's this thing called Real Life where you use addresses to find people's house ?

Same fucking thing. You want to find your variables in memory ? Better have their address. An address just tells you where it is.

Now a pointer to a pointer is the same thing with two layers of abstraction. The first address tells you where to find the second address, the second address tells you where that fucking home is.

And then you add pointer arithmetic and arrays happen because there are multiple houses along a street.

Any questions ?
>>
>>46052462
i wrote this code from the book, sorry for weird names.
int main()
{
double** dvaDpolje;
int i, redaka, stupaca;

cout << "Broj redaka: ";
cin >> redaka;
dvaDpolje = new double*[redaka];
for (i = 0; i < redaka; ++i){
cout << "Broj clanova u " << (i + 1) << ". retku: ";
cin >> stupaca;
dvaDpolje[i] = new double[stupaca + 1];
dvaDpolje[i][0] = stupaca;
for (int j = 1; j <= stupaca; ++j)
dvaDpolje[i][j] = i + 1 + j / 100.;

}
cout << "Ispis clanova niza: " << endl;
for (i = 0; i < redaka; ++i)
for (int j = 1; j <= dvaDpolje[i][0]; ++j)
cout << "[" << i << "] [" << j << "] = " << dvaDpolje[i][j] << endl;
for (i = 0; i < redaka; ++i)
delete[]dvaDpolje[i];
delete[] dvaDpolje;

return 0;
}

>>46052468
guess i'll need to read few more times
>>
>>46052491
just to understand better
redaka = rows
stupaca = columns
>>
>>46052491
holy fuck i never realised how much harder C is to read when someone that doesn't speak english has written it.
>>
How do I stop VS from automatically making closing brackets?
>>
>>46052513
You don't know the utter pain that is reverse engineering, son.
>>
>>46052531
how is reveng a pain
>>
>>46052491
>>46052491
Lol FERovci... TVZ masterrace reporting in, I'll explain it to you when I get home so I can post from my pc not my phone. Pointers are piss easy, even when its such retarded fuckery like you posted.
>>
>>46052607
No variable names, having to keep track of all the state and intent manually.

I love IDA, but it's still a pain. And hex-ray is shite even if it tries.
>>
>>46052491
Ah, in this case,
dvaDpolje
forms a two-dimensional matrix.

A 2D matrix is an array of rows, right? But what is a row? Just an array of elements. (doubles in this case)

So it's an array of arrays. And since an array is just a pointer* to the first element, pointer to pointer just means array of arrays in this case.

Also, you get a pass since it was presumably copied verbatim from a textbook, but get in the habit of using english variable names if you don't already.

* Since someone will probably yell at me for that, arrays are not always like pointers. Read this: http://www.panix.com/~elflord/cpp/gotchas/index.shtml
>>
>>46052610
i didnt go in FER, i never went to college, i'm learning c++ by myself
>>
>>46052628
>calling hexrays shit
dude what the fuck
id like to see you do better
>>
>>46052654
I can't. It's beautiful, but the cold hard truth is that it's shite in practice.

I waste less time with good ol ASM and comments than with what Hex-Rays spews out.
>>
live 4chan (currently only /g/)
https://forty-live.herokuapp.com/
yes, there's practically no styling, and currently it only displays the comment.
I do actually send the thread number, time, and image, but haven't implemented it into the UI yet.
thoughts?
>>
>>46051405
>implying I'm not
>>
What's a good C++ book for someone who already knows C?
>>
Ext4 derangementer on perl5.
>>
>>46052840
Bjarne's books. A tour of Sepples and that other one.
>>
File: 03OGKR.gif (2MB, 320x240px) Image search: [Google]
03OGKR.gif
2MB, 320x240px
I want to programm something in java to improve my skills, but I can't think of anything good. god damnit
>>
>>46052887
Try a simple game. Examples: Sokoban, Bejeweled, Tetris... Turn based tends to be easier than real time.
>>
>>46052507

where are you from? Serbia?
kaze se redova, ne redaka lol
>>
>>46052887
What level of skill are you at? What is the most complex thing you have programmed?
>>
>>46052944
Croatia
>>
hello /dpt/
I stopped programming at least 3 years ago, and I don't remember a thing.
What is a good book for training?
>>
>>46053025
It's a mindset, a way to think. If you get it, there's nothing to learn or remember, just Googling a little to freshen up your skills. If you can't do that, then you've never learned how to code.

Now give up and go learn how to paint. I hear Bob Ross is inspiring.
>>
>>46052945
medio-core I'd say

I programmed a bretty complex programm about managing trainings in a company. And the biggest was an ip-management software, but that was written with php and laravel framework.
>>
>>46052990
a female president ...
>>
>>46052642
Be prepared to join the army now that Kolinda is head of the state...

So let's inspect your code line by line and see what's habbening, I guess your main question is, why the fuck do we need "double** dvaDpolje;" a.k.a. double pointer.

>cin >> redaka;
>dvaDpolje = new double*[redaka];

So you read an int "redaka" from the user and allocate "redaka" numbers of pointers to arrays...

You could already write bullshit into them, for example *dvaDpolje[0] = 100.53; would put the number 100.53 into dvaDpolje[0][0]... but since you want to make a 2D array, we'll need to allocate for every dvaDpolje[i] an array of doubles (notice that I said an array of doubles, not an array of pointers to arrays).

We do that in the for loop... it itterates "redaka" times and asks the user every time how much collums he wants in that row. It's a pretty retarded program, specially when it comes to iterating through the array to write what's inside it...

But all in all, it finally allocated an array (new double[stupaca +1]; puts a memory address inside dvaDpolje[i]... so dereferencing it with dvaDpolje[i][j] finally gets you to the location and you can read write).

Notice:
>dvaDpolje[i][0] = stupaca;

He puts into dvaDpolje[i][0] (1st element of that row) how many lements that row has... and later on when it's time to iterate through the array he iterates the inner loop like this:
>for (int j = 1; j <= dvaDpolje[i][0]; ++j)

So j doesn't go out of bounds...

If you wanna play around, see what will happen if you do something like:

double* banana = dvaDpolje[0][0];
for (i = 0; i < redaka; ++i)
{
cout<<*banana;
banana++;
}


Try and guess what it'll output before you try and run it.

If you have any more questions, shoot.
>>
>>46053054
When I finished my degree in IT I started a law university. Yep, I distanced myself coding and remember few things. It's hard to google when you barely know where to re-begin.
>>
What to program in c++? I know how to create classes / objects. I am also familiar with acquiring libraries and using them in my code.

The most complex thing I've done is a piece of software that connects to a mysql database and you can edit / view the database via a menu.
>>
>>46053129
Grab a simple book about Python or JS if you care. Anyone can learn that. Then if you like it, keep learning, if you don't, you're wasting your time.
>>
Sorry, I meant to write
double* banana = &dvaDpolje[0][0];
for (i = 0; i < redaka; ++i)
{
cout<<*banana;
banana++;
}


You wanna save the address of dvaDpolje[0][0] into the banana pointer...

I'm pretty sure it'll help you understand 2D arrays when you see how incrasing the banana pointer will affect reading what's it pointing to...
>>
>>46053141
What do you like ?

Solving academic exercises made for students ?

Low level dark magic ?

Pretty GUIs ?

Websites ?

Muh gaymes ?
>>
>>46051024
Start submitting patches to Linux, you'll get hired in no time.
>>
>>46053124
please dont remind me...
>>46053128
>>46053178
hmm i see where you getting at.
gonna try do some more examples. thank you
>>
File: gnarly.jpg (6KB, 176x177px) Image search: [Google]
gnarly.jpg
6KB, 176x177px
Im new to computer science and am trying to teach myself python. I got the path working correctly so I can run it in the command prompt, but I can not for the fucking life of me figure out how to navigate around the computer so I can run python programs. the only fucking command I've been able to get to work is import os. please help me, I am a retard
>>
prefix operator ~~ {}

prefix func ~~(inout str:String) {
str = "\(str), notice me~"
}

var senpai = "Senpai"

~~senpai
println(senpai)
>>
>>46053256
>using Wangblow$
>not reading the official tutorial on the Python website

Anon, it's like you wanted to have problems.

What, specifically, went wrong?
>>
>>46053256
In the prompt (don't start python yet)
cd /path/to/python/script
python script.py
>>
If I want to learn ASP.net/ (MVC), is it a good idea to install the VS 2015 preview right now and use vnext or is learning the current revision also okay?

How well do self hosted vnext applications work on Linux hosts?
Do you think there is a better framework than ASP.net out there? I found play to be pretty meh, claims to be convention over configuration but you still need to implement every single route and even Intellij lacks convenience features like automatically creating views for actions, automatic routes or creating models from databases and automatically creating some controllers and views for that model.

PHP is a pretty horrible language, so I have not looked into its frameworks.
>>
>>46053218
Well there is a program that I should create a GUI for, but anything goes for me. I just want general knowledge of c++.
>>
>>46053298
specifically, I get invalid syntax every command. I'll double check the python website though

>>46053303
my path to python is just C:\Python34. should I have script/ python script.py like that or is the script whatever program I have made?
>>
>>46053374
>specifically, I get invalid syntax every command. I'll double check the python website though

[spoiler]Sounds like you didn't run the Python interpreter to start with[/spoiler]

Run Python:
python


Then type in your code.
>>
>>46053374
The script is the program you made, yes.
>>
>>46053386
python works just fine, as does import os. I just dont know how to navigate around the computer using python commands
>>
>>46047119
what are monads /g/?
whats the secret?
>>
>>46053348
>I just want general knowledge of c++.

Sepples is huge. In a good way.

I know quite a lot of stuff, but I can't just sum it up in a nice little paragraph, there's just too much of it.

Do you know simple template meta-programing ?

Ever read Scott Meyers's books/seen his talks (they are great, especially the talks) ?

Do you know all your undefined behaviors and how compilers take advantage of them ? All of it ? Even the fact that reading an uninitialized value is undefined behavior due to possible trap values, except for unsigned char then it's merely unspecified ?

Do you know C++11/C++14 and are you roughly comfortable with all the features ?

Do you know C, can you fall back to it if you need to ?

Do you know how to take advantage of the caches, memory layout, and parallelism to make your programs run (literally) up to a couple hundreds time faster ? Not exaggerating here.

Etc. If you have any specific question, I have half an hour to kill, so I might answer.
You already have plenty to google here.
>>
>>46053410
ah, okay. thank you, I think I have a better understanding now. Should I be saving my scripts in the script file of python or make a new folder?
>>
File: python.webm (308KB, 1020x766px)
python.webm
308KB, 1020x766px
>>46053256
>>
>>46053483
how does it work?
>>
File: 1391089720126.png (369KB, 472x645px) Image search: [Google]
1391089720126.png
369KB, 472x645px
>>46053438
Thanks, I'll save your post and start looking through what you mentioned.
>>
>>46053410
my path is C:\Python34\Scripts and the script is hello.py. right now I'm typing
>cd C:\Python34\Scripts python hello.py
what am I doing wrong? its still not working

>>46053483
hang on, I can write all my python programs in notepad??
>>
>>46053438
>a programming language that is huge in a good way.
There is no such thing.
>>
File: code metrics.png (4KB, 1151x52px) Image search: [Google]
code metrics.png
4KB, 1151x52px
Is this good or bad?
>>
>>46053438
would the Gentooman torrent have effective modern sepples C++11/14?
>>
File: StandardLibrariesSizesCPP.jpg (103KB, 1710x860px) Image search: [Google]
StandardLibrariesSizesCPP.jpg
103KB, 1710x860px
>>46053541
Yes, there is.

C++ is big in features, but it's not bloated like Java or C#.

You have a lot of features *available*, but you don't *have* to use them. And if you don't use them, you don't pay for them. That's called the zero-overhead principle.

E.g. fucking nobody uses exceptions in large applications or framework. You can. But you don't have to.
>>
>>46053534
jesus christ
>>
>>46053556
I don't think so, it's too old.

You might find it at #[email protected] though.
>>
>>46053316
.NET dev here... VS2013 community edition and no need to go vNext yet... learn MVC 5 properly, the knowledge will be handy in vNext, but vNext is not there yet.

It's missing a lot of stuff, it crashes randomly (had VS2015 preview crash on me a shitload of times during debugging). It's missing scaffolding (can be done via command line but is buggy as fuck) etc... wait for it to be polished out and in the mean time learn MVC5...
>>
File: repeatscript.png (81KB, 490x542px) Image search: [Google]
repeatscript.png
81KB, 490x542px
Just spent the last hour making a small script that allows me to set youtube videos to repeat.

Didn't know how much I needed this until I made it.
>>
>>46053582
thanks
>>
>>46053534
You can write them in any plain text editor you want, when you run the command
python hello.py

in the command prompt, you are running the Python interpreter executable and telling it to interpret the hello.py file. It will then execute the commands written inside hello.py.

>cd C:\Python34\Scripts python hello.py
These are two separate commands, the first is to Change Directory (cd) to the folder C:\Python34\Scripts where I assume you have saved your hello.py text file. The second does what I described above.

Your command prompt session will look something like this then.
C:\Users\yourusername> cd C:\Python34\Scripts

C:\Python34\Scripts> python hello.py
hello world

C:\Python34\Scripts>
>>
>>46053585
Thank you for your response. I already have VS 2013.
Are there any books or articles that you recommend for learning ASP.net? I started reading "Pro ASP.net MVC 5" today, it seems to be the right thing, but maybe there is some book that is considered THE book of ASP.net?

And since you're doing it professionally... do you recommend learning .net at all?
>>
>>46053598
Enjoy having to rewrite your script every week because of youtube changing everything constantly.
>>
File: Cantor.Dust.png (871KB, 839x566px) Image search: [Google]
Cantor.Dust.png
871KB, 839x566px
>>46052628
>>46052672
On a scale of 1 to 10 how hyped are you about Cantor.Dust?
Video from 4 months ago: https://www.youtube.com/watch?v=C8--cXwuuFQ
>>
>>46053626

The two functions I'm using have remained the same throughout the last 2 iterations of the youtube api but I'm not hopeful. Youtube is openly hostile towards setting videos to repeat.
>>
>>46053582
what's the proper etiquette for requesting so I don't get kicked or anything?
>>
>>46051403
>they actually use <script> tags
Jesus christ guys, just link to a .js file.
>>
>>46053606
Ill try that, thank you. I really appreciate your help

>>46053578
yeah, tell me about it. I have to fucking live knowing I'm a retard
>>
>>46053670
Asking the bots to do a search, not asking people! There are millions of documents there.

IIRC it's "!search keywords" or "!find keywords" but I haven't been there for a long time.

Lurk what others are doing for a minute and you'll get it.
>>
Has anyone here worked with HDF5 files?
>>
>>46052840
>What's a good C++ book for someone who already knows C?
Meyer's Effective C++ and his newer Effective Modern C++.
>>
>>46053716
Those books are great but they are tips and guidelines on using the language well, not learning how to use it in the first place.
>>
File: eNTEzgY.png (92KB, 1392x885px) Image search: [Google]
eNTEzgY.png
92KB, 1392x885px
Today I learned you can break Swift's type system. No idea why you do this.
>>
>>46053753
The newest version of C++ primer is quite good.
The only thing it lacks are example programs. You'll have to make them up yourself...
>>
>>46053775
You fucking asked for it.
If you use Slowerthanpython, you have only yourself to blame.
>>
>>46053775
For compatibility with Objective C / C.
If you actually program something in Swift, you will never ever need this.
>>
>>46053693
Appreciate it Anon, tried different variations of !find !search @find @search but either I'm not search for it correctly or they don't have it

searched scott meyer, c++
>>
>>46053819
do the bots send you a pm or something? I'm using weechat, I don't know if the client matters.
>>
GCC or Clang?
>>
>>46053877
Clang for development.
GCC possibly for final builds and testing if there's a noticeable speedup.
>>
>>46053877
Clang for development, GCC for release builds.
>>
>>46053437
class Monad m where
(>>=) :: m a -> (a -> m b) -> m b
(>>) :: m a -> m b -> m b
return :: a -> m a
fail :: String -> m a

Oh, you wanted a more practical description?

Okay, say you have a function that takes a normal value as input, and returns a fancy value as output. That's nice and all, but what if you want to feed it a fancy value? It only knows how to consume normal values! Luckily, the fancy value in question is a monad.

The monad typeclass defines the function >>= (pronounced "bind"). I posted the type signature above, but here it is again:
  (>>=) :: m a -> (a -> m b) -> m b

In plain english: Bind takes a "fancy a" and a function from "plain a" to "fancy b" and returns a "fancy b". This works exactly as you would expect. Bind looks past the fanciness, to the plain value(s) hidden inside.

This is all very abstract, so here's a concrete example: Say we want to find the first even number in a list, and find the natural log of it. (Completely contrived, I know.) We will do this by using the following two functions:
find :: [a] -> (a -> Bool) -> Maybe a
log :: Int -> Maybe Double --Not the actual signature of log, but pretend it is.


Why the Maybes? The first function, find, needs to handle the case where no element in the list matches the given predicate. The log function needs to handle negative arguments.

So we have the situation described above. find, when applied to our list of Int, will return a Maybe Int. We want to pass this to log, but log only knows about plain old Int. Monads to the rescue:

ourFunc :: [Int] -> Maybe Double
ourFunc theList = (find theList even) >>= log


There really isn't anything magical about monads. The IO monad in particular is a bit magical, but the monad part of it is easy. I/O makes stuff fancy, so your plain-value-consuming functions need to be applied to IO-wrapped values using >>=.
>>
>>46053857
Nevermind figured out that weechat opens other buffers
>>
>>46053910
that made absolutely no sense. good job at making it harder, man
>>
File: image.jpg (244KB, 997x559px) Image search: [Google]
image.jpg
244KB, 997x559px
>>46053857
>>46053819
Alright I just tested to be sure.

I found plenty of good results for "@search effective". Pick one in my image or do the search on your computer.
>>
File: 1358163730607.png (377KB, 640x480px) Image search: [Google]
1358163730607.png
377KB, 640x480px
>>46053910
>mfw
>>
>>46053775
>lengthOfBytesUsingEncoding
this is what happens when people rely on autocomplete all the time, they invent ridiculously long names for everything.
>>
>>46053940
Don't say that, he's just going to feel smart
>I didn't fail at explaining it, he's just too dumb to get it! And thus I'm smart because I did get it!
>>
File: HUp5D3B.png (134KB, 1018x713px) Image search: [Google]
HUp5D3B.png
134KB, 1018x713px
>>46053802
It's not a problem, it's just something you can do.

It's a new language mate. A lot people who say Swift is slow are compiling with no optimizations on, which is the default xcode mode for testing.

Pic is with fastest[-O] optimization level, 100,000 ints. It'd be faster with -OUnchecked obviously. But then you use lose most protections.
>>
>>46053940
>>46053945
Oh well, I tried. I suppose you've already looked at LYAH. Best advice I can give you is read the preceding chapter first, since functors and applicative functors are (at least in my experience) easier to grasp.

>>46053964
To be fair, I am *very* smart.
>>
>>46053985
You might be smart but how good do you suck dick?
>>
File: splash-book.png (132KB, 386x559px) Image search: [Google]
splash-book.png
132KB, 386x559px
I'm currently reading this.

I work a lot with massively concurrent systems at the moment (in Go) and I'd like to see what all the Erlang fuss is all about.
>>
>>46053985
>To be fair, I am *very* smart.
Most people who say that have a severe case of Dunning-Kruger.

Prove it, anon.
>>
File: chicken burrito.jpg (32KB, 700x525px) Image search: [Google]
chicken burrito.jpg
32KB, 700x525px
>>46053437
>>
>>46054049
Most people who browse /g/ have a severe case of "wouldn't know a joke if it came up and bit them in the face".
>>
File: 1418783675806.gif (3MB, 320x180px) Image search: [Google]
1418783675806.gif
3MB, 320x180px
>>46053944
Thank you for your help I know it's like herding pic related. Learned how to use Weechat lol.
>>
>>46054080
On the internet you can't tell sarcasm from stupidity.
>>
ok i tried to make my first rust thing
use std::io;
use std::rand;

fn main() {
println!("Guess my number");
let random_no = rand::random::<uint>() % 100 + 1u;

loop {
let user_input = get_input();
println!("{}", match user_input {
Some(num) => cmp(num, random_no),
None => "Please insert a positive integer".to_string(),
});
}
}

fn get_input() -> Option<uint> {
from_str(io::stdin().read_line().ok().expect("Couldn't read value").as_slice().trim())
}

fn cmp(guess: uint, answer:uint) -> String {
if guess < answer { "Too small".to_string() }
else if guess > answer { "Too big".to_string() }
else { "Nice one".to_string() }
}


can someone please tell me why in `get_input()` i need to use `as_slice()` before converting? Also (maybe related) why in `cmp` did I have to use the `to_str()` method? i tried to return &str or 'static string or whatever, but it didn't work either. I read the article about strings in the rust development but I still don't think I understand them properly. I got it that &str is immutable and String is not, but i still don't think i understand them
>>
>>46053910
thanks. I think I understood the bind operator. But what does (>>) do?
>>
>>46053598
>http://gadgetopia.com/post/9236
also there is:
youtube com /blABlabLa
change this to:
repeatyoutube com /blABlabLa
>>
Lua 5.3 released: http://www.lua.org/manual/5.3/readme.html#changes
>>
>>46054311
regarding lua:
http://www.cafu.de/

is this good? are there other alternative frameworks?
>>
>>46054274

You can do it without URL hacks with the default api.
>>
>using one of the most despised language for your entire stack
Why do nodefags willingly do this to themselves?
>>
>>46054363
what's your beef with node
I just built http://forty-live.herokuapp.com/ and it works fine as fuck
>>
>>46054355
why bother?
>>
>>46054244
f >> g

is equivalent to
f >>= \_ -> g
>>
>>46054244
At first glance it might look like it just discards its first argument and returns the second, but there is something fishy going on:
ghci> Nothing >> Just 3  
Nothing
ghci> Just 3 >> Just 4
Just 4
ghci> Just 3 >> Nothing
Nothing


The default implementation of (>>) is:
(>>) :: (Monad m) => m a -> m b -> m b  
m >> n = m >>= \_ -> n


In practice then, if you see a monad as a value wrapped in a context, (>>) ignores the wrapped value but not the context.
>>
>>46054413

So I can have a button actually on the page and repeat using timers so I don't give the uploader extra page views.
>>
>>46054404
He's talking about using a MEAN stack where everything is in javascript I think.
>>
Making a website parser that runs weekly and puts shit in a database as JSON, trying to make a working Docker container for it.

Parser uses NodeJS with Cheerio (works great so far), database is newest Postgres with JSONB support in a Docker (haven't done a lot with it). Will see how querying works.
>>
>>46054455
i c
>>
>>46054456
my server-side code for fetching all 4chan /g/ threads is written in node
mongodb is definitely stupid though - you rarely have data that isn't relational. postgres is good enough
>>
>>46054455
>I don't want people to know that I actually enjoy their work
>>
>>46054512
wrong thread sorry
>>
>>46054499

I'm a complete bastard.
>>
>>46054355
how
>>
>>46054532
set focus on flash embed, fire spacebar

that's how I imagine it could work
>>
>>46054532

make the script in greasemonkey. Use the youtube html5 player to get the js api.
>>
>>46054363
Node.js is actually despised ?

I though that was still the cool hipster flavor of the month.
>>
>>46054616
Where do you think you are?
>>
>>46054439
>>46054450
thanks /g/uys
>>
>>46054631
Right. Buying my SICP, now.
>>
>>46053944
here's a direct link to the most recent Scott Meyer's book: http://it-ebooks.info/book/4367/
>>
>>46054678
Actually, the most recent is More Effective Modern C++. It literally just came out, Scott was talking about it at a conference this week.
>>
File: 4chan thought.png (5KB, 601x695px) Image search: [Google]
4chan thought.png
5KB, 601x695px
>Can't decide if I want to learn C, C++ or Python more
>Impossible to find projects that interest me
>>
>>46054786
You can do more cool things with C than with C++ and Python

You can do more cool things with C++ than with Python

You need to learn a language before you can work on a project... stop sounding like such a whiny baby
>>
>>46054694
More Effective assumes you already know the stuff from the Modern Effective book though. It's more of a book on proper use of the C++11 specifics.
>>
File: scott.png (124KB, 865x823px) Image search: [Google]
scott.png
124KB, 865x823px
>>46054694
well it isn't even in his page (see pic). What is the publisher?
>>
File: r888.png (811B, 80x80px) Image search: [Google]
r888.png
811B, 80x80px
Is there anything like Danbooru but for PDFs, DjVus and such (documents, in general)?

I've been pondering building something like it but don't wanna be reinventing the wheel completely.
>>
So I'm learning Python and some of the basic commands, I'm currently using 3.4.2.

I have no idea how to make variables work on here despite me supposedly doing them correctly.
Example:
a = 0
b = 5
print(a + b)

Should result in
5

but I get no results
>>
>>46054881
have u tried to run the program for example
>>
>>46054814
what does C do that C++ don't?
>>
>>46054953
Implicit void* casts without warning you.
>>
>>46054896
oh no I'm not there yet
I'm just going by this tutorial that was linked to me.
I assumed that just typing it in, would work.

http://www.afterhoursprogramming.com/tutorial/Python/Variables/

I feel I'm missing something
>>
>>46054953
>what does C do that C++ don't?

It's better at triggering /dpt/
>>
>>46054953
embedded
ie, C compilers are on all sorts of little micro devices, but C++ compilers won't be

sometimes you can find a limited C++ thing called EC++ (embedded C++) or other one-off standards, but C is king on micro devices

it wasnt a 'feature wise' argument, but in terms of cool shit you can do;

you can program robots and quad copters in C, you cant generally do that as commonly with C++
>>
>>46054985
open the repl

i.e. open IDLE cause ur probably using windows
>>
>>46054985
Clearly. Are you actually running a python interpreter or just typing that stuff into a text editor?
>>
>>46055014
Typing stuff into the editor
>>
File: _.jpg (3KB, 147x88px) Image search: [Google]
_.jpg
3KB, 147x88px
>>46054881
>>46054985
what are you even trying to do to get it running? not wanting to sound mad or insult you
>>
Is Go mature enough to replace Javascript for webservers yet?
>>
>>46055005
You could if you included enough space and write you're own compilier but everyone is too lazy to do that.
>>
>>46054953
>what does C do that C++ don't?
Embedded devices and much less complexity when it comes to handling errors. Simpler to learn.
>>
>>46055035
>not wanting to sound mad or insult you
What are you even doing on 4chan ?

He's not gonna cry if you forget to say that.
>>
>>46055031
Your editor does not know how to consume python. You need a python interpreter. IDLE is the one on Windows. On Linux and OSX just open a terminal and type python.
>>
File: consider:.jpg (31KB, 500x375px) Image search: [Google]
consider:.jpg
31KB, 500x375px
If /g/ were to design a CPU, what features should it have?
>>
>>46055031
so you thought that writing python in a random text file will magically show you something without even specifying the language anywhere or something smh
>>
File: 1420417642499.jpg (10KB, 348x326px) Image search: [Google]
1420417642499.jpg
10KB, 348x326px
>>46055035
OOOOOOH its the >>>
NOW its working.
That's interesting then, Started a new file just to test out some basic strings and the that variable wasn't working.

Don't worry about insulting me either, I know I'm stupid when it comes to this well Rusty, I need the tough love.

The Window I had like this anon explained >>46055091 is IDLE, though I'm curious why didn't this command work on a untitled new?
>>
>>46055059
can you? what if the chip's ASM or whatever instruction set isn't available? like if i give you some random TI micro how would you go and write a compiler for it?

(i genuinely dont kno)
>>
File: _.jpg (11KB, 250x242px) Image search: [Google]
_.jpg
11KB, 250x242px
>>46055077
oh yeah I forgot this isn't nice board
>>
>>46055038

You shouldn't be running a dynamically-typed language in a production environment unless is has all of the nice self-healing powers of Erlang. Javascript really has no business running anywhere there is an alternative.
>>
>>46055126
>rusty
>>
>>46055142
Alright well at this stage its decomposed, its been years since I last did this
>>
>>46055133
Then why does almost every relevant website use it?
>>
>using languages with no ternary operator
Justify yourself with ten words or less
>>
>>46055163
>almost
>>
>>46055163

All the information you need to answer that question was in my post.
>>
>>46055131
Look up the specs (every publicly available chip has specs these days, either official or provided by someone who reversed it), failing that you reverse engineer it yourself.
>>
>>46055174
this is more readable
 if condition { true_branch } else { false_branch}
>>
>>46055186
So in short there is no alternative for the web?
>>
>>46055133
>You shouldn't be running a dynamically-typed language in a production environmen
please stop posting
>>
>>46055201
You can't use that for assignment, though,
>>
>>46055163
Do you mean Java?
Almost no one runs the webserver backend on Javascript.

Java is used because it's actually one of the top performing server languages and it got tons of support and available frameworks, pretty much only C++ can beat it and that's usually only by a small margin.
>>
>>46055219
why not
>>
>>46055219
var x = function(){ if condition { true_branch } else { false_branch} }
>>
>>46055211

Enjoy your easily avoidable and embarrassing run-time errors.
>>
>>46055229
I'm talking frontend stuff like nodejs.
>>
>>46055258
I'm so confused right now.
>>
>>46055245
Type errors only account for less than about 5% of all errors, and fixing type errors is pretty much the easiest error to fix.
Static typing has surprisingly little benefit in reducing errors in practice (lots of papers on this).
>>
>>46055243
let x = if condition { true_branch } else { false_branch} };
>>
File: absolutely disgusting.jpg (20KB, 480x360px) Image search: [Google]
absolutely disgusting.jpg
20KB, 480x360px
>>46055243

Or if you're not in hipsterscript:
int foo = (condition) ? value1 : value2

That's much more sane.
>>
>>46055290
post papers and numbers
>>
>>46055219
Depends on whether the "if" construct is a statement or a expression to begin with. In some languages it is an expression, so a ternary conditional operator is redundant.

A function can always take the place of such an operator as well
>>
>>46055258
>>46055279
Gah, wrote exactly the opposite of what I was thinking.
Server-side stuff with nodejs is what I had in mind.
>>
>>46055304
that's shit compared to >>46055295 sorry mate

python can
 x = true_branch if condition else false_branch 
too

both are more readable
>>
File: 1408700989517.jpg (9KB, 298x212px) Image search: [Google]
1408700989517.jpg
9KB, 298x212px
>>46055304
but that's the ternary operator we were discussing and trying to avoid
>>
>Why is this program valid? I was trying to create a syntax error
>Perl
https://stackoverflow.com/q/27909769/1401962

Topkek.
>>
>>46055326
>we
>>
>>46049956
because it wouldn't be a /dpt/ without complaining that you did/didn't use an anime image
>>
So I just learned rust to emulate C++ lambdas

fn main() {
let print = lambda! {
[](x: int) -> int {
println!("x = {}", x)
}
};

print(5);
}
>>
>>46055346
at least 3 people
>>
>>46055290

5% of all errors is still a lot of errors, and fixing them after they have caused an issue (potentially in a live environment) is strictly worse than catching them at compile-time.
>>
>>46055174
func ifThenElse(cond, true, false) = if cond return true else return false
>>
>>46053316

I believe php is a much more mature platform for serious applications than asp (mostly expensive, corporate shilling and terrible code), and you'd probably agree with me after learning one of the more recent frameworks
>>
File: 2001 a bait oddyssey.jpg (58KB, 563x601px) Image search: [Google]
2001 a bait oddyssey.jpg
58KB, 563x601px
>>46055367
b8
>>
>>46055174
I dislike them because they can cause confusion.
>>
>>46055479
Jesus you make it sound like it's a fucking pokemon or something
>>
>>46055174
I can't.
>>
>>46050287
It really isn't an issue in the modern world, which is why python is popular as a teaching language and for small, dirty programs. C is good if you want more control over what your program is doing, and/or if speed is an issue. If you need to write a quick program to parse through a large chunk of text. Something like that would be simple in python, but more difficult/error prone in C.

But if you're sorting through a massive data structure numerous times and need the fastest access time, then C would be better.

The differences between languages generally boil down to speed vs. complexity. Some languages do some things easier than others. And its difficult to have a language do 'everything' without becoming bloated.
>>
File: 2015-01-12T21h04m30s.png (224KB, 1440x900px) Image search: [Google]
2015-01-12T21h04m30s.png
224KB, 1440x900px
I made a little script to download the images from 4chan threads

planning to implement support for other chans too and maybe try to use threads to speed shit up

mainly learning how to into perl for now
>>
anti-python nerds nerds post ur website made in C and C++
>>
>>46051024
Have an impressive resume of personal projects showing your knowledge of the language. You can get a job but it won't be as easy as if you had a degree.
>>
>>46055232
Most languages won't allow it.
Can't return it either
>>
>>46055562
>using conditional statements instead of conditional expressions
rust can do it so bitch bye
>>
File: 1411090447181.png (305KB, 1920x1080px) Image search: [Google]
1411090447181.png
305KB, 1920x1080px
>>46051439
>>
made a little script to filter fags on 4chan based on words analisys
>>
>>46055537
FastCGI is written in C.
Facebook has Proxygen.
Most performance critical web infrastructure at Amazon et al use some form of C/C++.
>>
>>46055588
But how can you know when people are replying to your posts then?
>>
File: side-project.jpg (89KB, 627x960px) Image search: [Google]
side-project.jpg
89KB, 627x960px
new thread at >>46055605

new thread at >>46055605
>>
>>46055609
ip
>>
>>46055537
It's called Apache2 and a couple HTML files.
>>
>>46053621
Sorry for my slow response... I've been into the .NET ecosystem for quite some time and I've been learning as new things came, so no idea what book is the book.

Also, I'd reccomend it, I left .NET for some time but now I'm back becaouse of a million reasons... WP/Windows being one platform, shitload of freelancing/full time work just in that... then there is vNext and core .NET being open, so there will be even more work, then there is the enterprise market (I avoided it) and it's also a shitload of jobs and work...

It's worth it and it'll soon be even more as MS embraces OSS...
>>
>>46055290
Static typing results in easier to read code though.
I hate having to read docs just to use some sort of function.
>>
>C/C++ qualitifactions
>understands very deep levels of computer computation
>threading
>SIMD instructions
>threading
>making use of CPU features and efficient machine code

>Java/C#/managed language qualifications
>can make the thing go boop
>>
>>46056102

A good and valid point. Generally speaking, dynamic typing = easier to write. Static typing = easier to read and get correct.

I think it's fairly obvious to anybody who cares to be objective about it which should be used for personal or in-house software and which should be used for production software.
>>
Whats the best way to have a (windows)GUI for my native C++ application without having any of that managed language shit or having to deploy my software with 8 fucking dll files.
Thread posts: 317
Thread images: 42


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