[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: 319
Thread images: 36

What are you working on, /g/?

Previous thread: >>59177041
>>
File: compiler-dmd.png (16KB, 294x294px) Image search: [Google]
compiler-dmd.png
16KB, 294x294px
First for D!
>>
how the fuck do you do things like this in a clean way without having to check whether something is unset for the first iteration every iteration?
closest = None
for i,coordinate in enumerate(coord_list):
distance = calculate_dist(base,coord)
if not closest:
closest = i,distance
elif distance < closest[1]:
closest = i,distance
print('Closest', coord_list[i])


something like
-1,float('inf')

? It feels like an awful hack


yeah I am not very good at this posting thing


>>59184979
What language has a different construct for that?
>>
>>59185005
What do you need?
>>
>>59185023
Disregard my final print statement. But yeah.

One comparison extra is probably not that much, but if it could be avoided that would be great.
>>
>>59184947
>Chinese
Yeah, she told you to go fuck yourself, laowai.
>>
>>59184360
So 0.00...1?
>>
>>59183782
That's not how you spell Lazarus, anon.
>>
>>59184963
>losing to anime faggot by a 6 seconds

PATHETIC
>>
>>59185225
Anime website, nigger. Should have taken the hint when you saw the anime character on the front page.
>>
>>59185382
>le animu website meme
KYS
>>
>>59185382
>projecting this hard when nobody even said anything

Are you literate? Why are you so insecure?
>>
>>59185419
>anime faggot
>nobody even said anything
>>
>>59185225
Thanks for your help, you fucking faggot.
>>
File: Homura_Dance.gif (1011KB, 276x250px) Image search: [Google]
Homura_Dance.gif
1011KB, 276x250px
>>59185114
> 0.00...1
It's time to stop shitposting
>>
>>59185428
>sjw getting this triggered

HELLO TUMBLR
>>
>>59184963
I'm implementing the Cooley–Tukey algorithm in C.
It's been some time since I coded in C so I just wanted to remember it doing something simple.
>>
>>59185045
Can't you initialize Closest to -1 or so instead of None, than no need for the first of the 2 checks.

Also you do the same thing in both checks so should combine with <code>&&</code> anyway.
>>
>>59185589
You're dumb.
>>
>>59185023
If you're going to use Python, write Python not C.

closest = min((calculate_distance(d, base), i) for i, d in enumerate(coord_list))
>>
File: IMG_2864.png (366KB, 475x356px) Image search: [Google]
IMG_2864.png
366KB, 475x356px
>>59185611
Fuck off nigger cattle. You are damaging alt-rights' cause by spouting bullshit. Either jump on the liberal bandwagon or kys.
>>
File: 1d4.jpg (30KB, 371x321px) Image search: [Google]
1d4.jpg
30KB, 371x321px
>>59187571
>unironically calling yourself alt-right
>>
File: 1486397062619.png (769KB, 1052x1342px) Image search: [Google]
1486397062619.png
769KB, 1052x1342px
bump from last thread

For some reason I'm allocating memory twice, but I'm not sure why. Can anyone see it?

I'm inserting a node at the end of a linked list. Here's the function:
/*
* inserts the address addr as a new listNode at the end of
* the list
*/
void insertBack(struct listNode *pNode, const char *addr){

struct listNode *tempNode;

//Check if next node is NULL; means we are at the end of the list
if(pNode->next == NULL)
{
//Create new node
struct listNode *newNode;
newNode = (struct listNode *)malloc(sizeof(struct listNode));

//Check if done properly
if(newNode == NULL)
{
printf("\nFailed to Allocate Memory.");
exit(-1);
}

//Initialize newNode->addr
strncpy(newNode->addr, addr, MAX_ADDR_LENGTH);

//Insert newNode
pNode->next = newNode;
newNode->next = NULL;
return;
}
else
{
//else set tempNode to the next node and try again
tempNode = pNode->next;
insertBack(tempNode, addr);
}
}
>>
File: Algorithms.jpg (50KB, 424x500px) Image search: [Google]
Algorithms.jpg
50KB, 424x500px
Post books /g/
>>
>>59188970
>I'm allocating memory twice
>Posts code with a single call to malloc
Your problem is somewhere else buddy
>>
Mods are asleep post Scheme!!!
>>
>>59188970
1. typedef your structs
2. don't cast your mallocs
3. why are you recursing just loop
>>
File: pepe-le-pew.jpg (35KB, 320x320px) Image search: [Google]
pepe-le-pew.jpg
35KB, 320x320px
PHP code for reading a error-filled .csv file and inserting all correct rows into a database after some code gymnastics. It's ugly code for an ugly job and I just want it to end. Still like 3 more formats to go.

$racer = $db->query("SELECT * FROM $table WHERE id = $racer_id")->fetch_assoc();
if ($table == "master_fcc") {
$name = trim(ucwords(strtolower($racer['name'])));
$surname = strtoupper(trim($racer['sur1']) . " " . trim($racer['sur2']));
$category = $racer['cat'];
$team = trim(strtoupper($racer['team']));

// Fill in advertising with team if it's empty
$advertising = trim(strtoupper($racer['advert']));
if ($advertising == "")
$advertising = $team;

$license = trim($racer['nid']);
$uci_code = $racer['uci_code'];
$uci_id = $racer['uci_id'];
$email = $racer['email'];
}

$stmt = $db->prepare("INSERT INTO inscriptions (event_id, number, name, surname, category, team, advertising, license, uci_code, uci_id, email) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");

$stmt->bind_param("iisssssssss", $event_id, $number, $name, $surname, $category, $team, $advertising, $license, $uci_code, $email);
$stmt->execute();


end my fucking life please
>>
>>59189612
>$uci_id
I can tell how much you want it to end.
>>
>>59189612
nice sql injection my man
>>
>>59189737
Where's the sql injection on that code or are you just talking about the $racer_id?
>>
>>59189737
that's what the statement is for, injection prevention, for every single field.
$racer_id is sanitized earlier in the code too, if that's your vector.
php has improved in that respect at least.
>>
File: 1485253487188.png (61KB, 252x221px) Image search: [Google]
1485253487188.png
61KB, 252x221px
>>59189612
>error-filled .csv file and inserting all correct rows into a database after some code gymnastics

We've seen some shit anon.
>>
File: double-doubles.jpg (47KB, 602x481px) Image search: [Google]
double-doubles.jpg
47KB, 602x481px
>>59190000
>>59190000
>>59190000
>>59190000
>>
File: 1447887381530.jpg (7KB, 231x218px) Image search: [Google]
1447887381530.jpg
7KB, 231x218px
>"Your visa says you are a software engineer. Is that correct?" the officer asked Omin in a tone the engineer described as accusatory. When Omin said it was right, the officer presented him with a piece of paper and a pen and told him to answer the following questions:
>"Write a function to check if a Binary Search Tree is balanced."
>"What is an abstract class, and why do you need it?"
>>
What APIs/library do I need to programmatically set the default communication device in Windows in C? Found a couple but they're C++.

I switch between headphone/speaker and I want to make a program that switches between the two depending on which is active. Any help?
>>
>>59191049
1) You iterate through every path and if any path has a height difference greater than 1 between itself and the longest path, it's not balanced, yes?
2) Java concept where a class contains (non-pure?) virtual functions and/or members?
>>
>>59191167
Just use C++ but pretend it's actually C and you'll be right.
>>
>>59191194
this
>>
>>59191194
Not as flexible, everything has to be defined ultra-autistically. Can't FARPROC functions and have to be arsed with actual linking and dealing with old libraries and I have to typecast everything and stuff like that. Yeah I guess that's fine, I'll look into it. Thanks anyway.
>>
>>59191292
>FARPROC
Correct me if I'm wrong, but in Winded.h, it's already typedef'd to int:
typedef int (FAR WINAPI *FARPROC)(); typedef int (NEAR WINAPI *NEARPROC(); typedef int (WINAPI *PROC)();


So you don't need to do anything extra?

Also C++ is backwards compatible with C, so I don't quite understand why you need C when a) C++ has C, and b) all the examples are in C++, so that probably means no one bothers doing Windows API in pure C anymore
>>
I'm trying to implement Conway's Game of Life in java. Sorry for the spaghetti code, but basically I'm implementing the rules wrong lol. Tried using a linked list to store each cycle's states, and then run through them and update the board, but there's still something wrong. Any tips?

public static void nextGameCycle(Board b)
{
int cellNeighbors;
LinkedList<Cell> cellList = new LinkedList<Cell>();

for (int x = 0; x < b.width; x++) {
for (int y = 0; y < b.height; y++) {
cellNeighbors = 0;

// count neighbors
for (int w = x - 1; w <= x + 1; w++)
for (int h = y - 1; h <= y + 1; h++)
if (inBounds(b, w, h))
if (b.getCell(w, h).getState() == Cell.ALIVE)
cellNeighbors++;

// game rules
if (b.getCell(x, y).getState() == Cell.DEAD
&& cellNeighbors == 3)
cellList.push(b.getCell(x, y));

if (b.getCell(x, y).getState() == Cell.ALIVE
&& cellNeighbors < 2 || cellNeighbors > 3)
cellList.push(b.getCell(x, y));
}
}

// DEAD to ALIVE or vice versa
for (Cell cellInStack : cellList)
cellInStack.switchState();
}
>>
>>59189271
>sedgewick
i plan to ocr and read it, is it good?
>>
how do i get json data to refresh? like if im reading some json from a public api and display it, but also display updates automatically? and if it was on my own server, how would i update the file calling the query to then convert it into json? would i just run a timer function that called the query every x seconds/minutes?
>>
Whats the difference between an enum and an array in C?
>>
>>59192077
Take a look at this: https://en.wikipedia.org/wiki/Push_technology
>>
>>59191797
>Sorry for the spaghetti code
You should be. Now fuck off you java shit pajeet
>>
File: kek.jpg (9KB, 239x211px) Image search: [Google]
kek.jpg
9KB, 239x211px
>>59184969
Weird, I was almost sure OP would be the first to long for Ds.
>>
Is there a better way to organize inputting string commands to a C commandline program?

Right now it's just a big chain of
if(strcmp(input, "help") == 0) {
//call help menu method
} else if (strcmp(input, "settings") == 0) {
//call settings menu method
} else if (strcmp(input, "exit") == 0) {
//exit
} else if blah blah blah
>>
Thanks again to that one anon that helped me with the subtraction yesterday. It was wonderful. I'm trying to get multiplication (product) to work currently, and I'm having quite a bit of trouble. Not expecting help at this point, but some pointers as to what I'm doing wrong would be awesome.

Oh, and this in C, not C++. Also cannot use string to int.
https://hastebin.com/eqibecujet.cpp
>>
File: ScaryGrossCrayfish.webm (477KB, 1280x720px) Image search: [Google]
ScaryGrossCrayfish.webm
477KB, 1280x720px
>>59184963
Created a genetic algorithm to generate sorting algorithms. I'm surprised that it worked, as the basic idea was to write a simple programming language which can be represented as a genome. Horribly inefficient by the way.
>>
>>59192178
No, kill yourself
>>59192198
Multiplication is literally
Number * number

You fucking retard dipshit
>>
File: 1487647523994.gif (233KB, 200x150px) Image search: [Google]
1487647523994.gif
233KB, 200x150px
>>59192213
>No, kill yourself
w-why would you say that
>>
>>59192115

so if a real time updating app put out its public json api, would i be able to use it with the updates as well?
>>
>>59192213
Please demonstrate multiplying a string by a string without converting the whole thing to an int. I'll wait.
>>
>>59192244
Not quite

A rest api (i'm assuming you are using a rest api) is very simple, and the server will only respond to you if you make a request first.

So, to get "real-time" updates of this rest api, you would have to make a backend that runs on your server to query the api in fixed intervals, and use something like long polling to feed that data in real-time to the browser.
>>
>>59192268
puts ("you're a faggot") * "3"
>>
>>59191797

you'll have to rethink your entire program

No reason to use a linked list here. That's gross overkill and it doesn't make any sense whatsoever.

I recommend you just use a 2d array of booleans. There is a faster way but it's probably too hard for you (called a bitboard)

Then you just write a function boundary_check(int x,int y) that returns true if that cell should live, false if it should die.
>>
File: 1468560570890.jpg (63KB, 893x424px) Image search: [Google]
1468560570890.jpg
63KB, 893x424px
FUCK GEOMETRY
>>
>>59182238
Well OpenGL is bad. But there's not many good alternatives. And vulkan is not for hobby-developers.
At least if you had planned to finish in a reasonable timeframe.

It's really all because of the closed nature of GPUs I believe. My issues with opengl is almost always of that nature.
Fabian Giesen says that console devs have more insight because of their devkits, but there's NDA on that. He has also said that his blogpost series https://fgiesen.wordpress.com/2011/07/09/a-trip-through-the-graphics-pipeline-2011-index/ gives some perspective without breaking NDA.
>>59182353
I'd really like to listen to that. I love listening to people complain.
>>
>>59192198

Your program makes no god damn sense at all.

A good place to start on what is wrong with your program:

Understand that a char is literally just 8 bits. Don't think of it as anything else. If you want to treat a char as a number cast it to a uint8_t.
>>
>>59192295

i totally forgot i could just make a request to the json, im retarded

still good to know tho thanks
>>
>>59192178
>>59192230
You could make an array of the input strings and an enum. Loop through the array and compare, return the associated enum and use that to direct your program.

It's less verbose.
>>
Was going to study up on design patterns to get ahead before object-oriented design class next semester, but they all seem like a load of bullshit that could likely be solved with higher order functions
>>
>>59192426

>object-oriented design class

you are in for a wank session of the highest order
>>
>>59192426
>but they all seem like a load of bullshit
Yes
>that could likely be solved with higher order functions
Many ways to solve the same problems.
OOP and design patterns is for people who know nothing but that world and they will tell you how it's the best way despite knowing nothing about alternatives.
>>
>>59192431
my body is not ready
unfortunately it's mandatory for 80% of higher level CS courses
>>
>>59192461

You should consider finding a different school or switching to computer or software engineering
>>
>>59192461
>mandatory for 80% of higher level CS courses
Generally (i don't know in your case) those courses don't require OOP but rather they require some intermediate level of programming. So your university will naturally want you to stick to their plans, it's easier for them when they don't need skilled teachers.
>>
What's a good use for functions that return functions in Javascript, /dpt/? They're a cool idea but I have a hard time thinking of a practical application.
>>
>Haskell doesn't support and/or patterns
Jesus christ why the fuck would somebody use this terrible language
>>
>>59192489
>Generally those courses don't require OOP but rather they require some intermediate level of programming
This is definitely the case. They just make OOD a requirement because it's one of the core CS classes

>>59192477
I like my university a lot, I'm grateful that I can go here. It has a really good CS program for the most part.
Also I am in CE but I don't really like physics, and my "general engineering" Arduino/MATLAB/CAD class is frustrating, so I'm unsure about this major.
>>
>>59192450
yes i would agree but knowing the history and reasoning behind OOP is more important than being able to recite implementation patterns. It's attempting to simplify software in a way that gets you away from the machine.
>>
>>59192524
no specific use, they just save you time when writing the rest of your code. it's annoying in JS because the syntax doesn't support it but in languages with automatic currying there's no reason not to use it
>>
File: sicp.jpg (51KB, 400x579px) Image search: [Google]
sicp.jpg
51KB, 400x579px
>>59192524
>>
>>59192524

if you want to execute a specific sequence of functions

Maybe you are writing some kind of interpreter

You could write

get_function(string line)(oprand a,oprand b)
>>
>>59192537
>but knowing the history and reasoning behind OOP is more important than being able to recite implementation patterns.
Why?
You can program perfectly well without knowing about every paradigm why would you need to know the history of OOP?

I didn't argue that people need a broad understanding of different programming paradigms to be good programmers. I'm just saying that my experience with OOP people is that they don't know the alternatives so they can't really have opinions you should respect.
>It's attempting to simplify software in a way that gets you away from the machine.
Yes that's practically every programming practice. You make some concessions to what programmers shouldn't have to care about and then you make something "nice to work with" with those in mind.
>>
File: magic8ball.webm (96KB, 575x107px) Image search: [Google]
magic8ball.webm
96KB, 575x107px
Finished my Magic 8 Ball program in C++.
C++ is comfy and more sane than C.
>>
>>59192686

> having opinions on programming languages when you are obviously a noob
>>
>>59192527
It's a requirement to become a Professional Fizzbuzz Engineer.
>>
>>59192710
And where's the problem with that?
>>
File: learning_c.png (2MB, 1058x1600px) Image search: [Google]
learning_c.png
2MB, 1058x1600px
>>59192686
>Do wearing qt striped socks makes me a better programmer?
>ANSWER: Yes definitely.

Way to go anon, your program clearly works!
>>
Why check something at runtime when you can enforce it at compile time?

Why prove a property for one possible input when you can prove it for all possible inputs?
>>
>>59192729
People tend to place more value on opinions of those with more experience rather than those with less experience.
>>
>>59192211
Where do I start as a beginner to genetic algorithms?
>>
>>59192606
I was just saying he should appreciate it's inception more than making it a complete focus of study. He implied he was a student and it's probably the only time you can learn the history and esoteric bullshit about concepts before someone beats you over the head with it in your career.
>>
>>59192763
Makes me think.
What is the point that separates those with less experiences and those with more experience?
>>
>>59192760
deficient languages
turing completeness
applications where productivity is greater than provability
applications where inputs are very unpredictable
>>
>>59192604
But why would one want to write
function somefunc(string line){
if(line == "ADD"){
return function(oprand a, oprand b){
return a + b;
}
}
}


As opposed to
if(line == "ADD"){
return a + b;
}

?

I realize there's probably a reason, I'd just like to know.

>>59192556
>tfw too smart for SICP
Just kidding, of course. I've read the first chapter but always keep putting off reading the rest. Is it really that helpful? I hear it mentioned all the time here.
>>
>>59192798
I see. Yeah maybe that's productive.
>>
>>59192802
>What is the point that separates those with less experiences and those with more experience?
The amount of experience they have, obviously
>>
>>59192790
So long as you're comfortable programming, just do some reading. A lot of the concepts can be intuitively grasped and programmed.

>>59192802
You're trolling right
>>
File: snek.jpg (121KB, 600x800px) Image search: [Google]
snek.jpg
121KB, 600x800px
Can sneks learn to program?

inb4 Python or ASP
>>
>>59192760
Theorem provers shills pls go
>>
>>59192862
>t. programlet
>>
>>59192819
>I realize there's probably a reason, I'd just like to know.
You could store operations in a table

var ops = {
ADD: function(a,b) { ... },
...
};
function get_op (name) {
return ops.name || error("..");
}


Not very useful in javascript, comes up more in languages with currying. Also, it's good for a language to have a lot of things be possible, even if not necessarily useful, just for the off case that it becomes useful.
>>
>>59192890
I have over 300 confirmed proofs and finished top of my class in the Navy.
>>
>>59192908
>in the Navy
I bet you met a lot of experienced guys there
>>
>>59192819
Because if you're gonna consturuct it like that you're gonna check for if(line == "ADD") every time you add a number.

Consider if you have two very large arrays of values, a and b. You want to operate on them in some manner that's determined at runtime. You could have a procedure that contains all the different possibilities (add,subtract, divide) and does the operations for the entire array to produce a result based on an input, like:
(pseudocode, don't know JS)
processArrays(a, b, operand){
switch(operand)
case add:
for(a over b)
c[index]=a[index]+b[index]
return c;
case subtract:
for(a over b)
c[index]=a[index]-b[index]
return c;
[...]
}

This would effectively do what you want. But if you want to add an operation you have to add it right there in the case.

If you instead pass a function to the function you can just send any matching function down the pipe and it works. It's more malleable for optimization on a JIT compiler too.
>>
>>59192760
>Why check something at runtime when you can enforce it at compile time?
If we're gonna contrive reasons the runtime cost may be worth it for improved programmer iteration time. But generally no reason.
>Why prove a property for one possible input when you can prove it for all possible inputs?
Because not every function is written as a proof and brute force isn't feasible a lot of the time.
>>
Does anyone have any advice about how to take in user input from a website to define the where clause of a sql query? I wrote up something that just lets the user generate the where clause, but I feel like that is super unprofessional and is in danger of little bobby tables.

What would I have to write up? I wanted to make it dynamic, but that seems unfeasible. I feel like it should be easily solvable, but I don't think I can just use something like pg_query_params() to accomplish what I would want easily.
>>
I'm beginning to think it was a mistake to try to read the unreal engine 4 sourcecode instead of just inventing my own system for generating a distance field to be used for shadowing.
But I also feel I'm getting close enough that it'd be a waste to stop.
>>
>>59193000
Research prepared statements
>>
>>59192268
You sound like a sperg and a retard mixed into one
>>
>>59193288
Define your own search parameters and build a safe SQL statement from that.
Don't.
Ever.
Let unprivileged users enter code that is run on the server on the server.
In any way.

Webdevs like you are why so many websites are vulnerable to basic shit
>>
Holy fuck, I knew C++ was bad, but I didn't know it was THIS bad.

>Javascript, cast function to String, get the function's source code
>C++ cast function to String, get random gobbeldygook

What the fuck, why didn't /g/ warn me better
>>
>>59193324
What did you honestly expect?
>>
>>59193324
you best be fucking trolling
>>
>>59193343
It should print out the function's source code like in Javascript.

>>59193349
No, I'm not trolling it really happens! Check for yourself if you don't believe me, it comes out as some long string of letters and numbers
>>
>>59193324
>Javascript, cast function to String, get the function's source code

what the fuck is the point of this even
>>
>>59193362
>It should print out the function's source code like in Javascript.
Why?
>>
>>59193324
> (coerce (lambda (x) x) 'string)
#<FUNCTION (LAMBDA (X)) {1006A19D8B}> can't be converted to type STRING.

JavaScript? More like JavaShit.
>>
>>59193451
>something that could be a compile time error is instead a runtime error
Disgusting.
>>
File: 1481298937910.png (129KB, 500x374px) Image search: [Google]
1481298937910.png
129KB, 500x374px
Is there a language which will let me write provably terminating programs? I'm really sick of all this looping and Turing completeness bullshit.
>>
>>59193324
Why would you ever need this
>>
>>59193460
>>59193451
Yeah what that guy said and also it doesnt give out a string like it's supposed to in javascript
>>
>>59193485
Uh, any language? As long as you write the program logic without ambiguity or halting for user input? I don't see what you want.
>>
>>59193485
Idris has a totality checker.

I think Agda and/or Coq also have totality checking.
>>
>>59193460
>>59193487
>what is FTYPE
>what is DECLARE
>what is DECLAIM
>what is PROCLAIM
>he thinks he knows what he's talking about!
Thanks for the amusement, chumps.
>>
>>59193485
Just never use any loops or recursion.
You'll always terminate that way.
>>
>>59193485
>What is the halting problem
>>
>>59193521
In trivial cases, you can prove that a program will terminate.
>>
>>59193500
>As long as you write the program logic without ambiguity or halting for user input?
I want to do this though.
>>59193510
>Coq
I'm not that good. I'll try Idris though, I'm assuming it's just a subset of the language that the totality checker works on?
>>59193519
My whole program pretty much consists of loops and recursion.
>>59193521
You must be either retarded or simply trolling. I literally said that I do not want a Turing-complete language.
>>
>>59193564
>My whole program pretty much consists of loops and recursion.
As most programs do.
>I do not want a Turing-complete language
This statement is contradictory to the statement above.
Basically, by having conditionals, loops/recursion, and some sort of way to modify state, you've given yourself Turing completeness.
Non-Turing complete language are extremely restrictive, and will not be able to be useful in general.
>>
>>59193588
>Non-Turing complete language are extremely restrictive, and will not be able to be useful in general.
>actually believing this garbage
>>
>>59193605
Non-Turing completeness is a meme, and a useless one at that.
>>
>>59193605
>actually believing this garbage
Some non-Turing machines are very useful for certain things.
A finite state automaton is extremely good at recognising regular languages.
A pushdown automaton is extremely good at recognising context-free languages.
Outside of these, they're not that useful for computer programming.
>>
>>59193588
I don't really need state, I just need recursion and loops (both).
>Non-Turing complete language are extremely restrictive, and will not be able to be useful in general.
Fine by me. I am willing to pay the price in exchange for knowing whether or not a program will terminate.
>>59193621
Turing completeness is fucking garbage with no real value. Imagine being this cucked that you would have to just hope your program halts.
>>
>>59193655
>I just need recursion and loops
And how are you going to control these without state?
>Turing completeness is fucking garbage with no real value. Imagine being this cucked that you would have to just hope your program halts.
You really are fucking stupid and do not know anything about CS.
>>
>>59193655
>Imagine this cucked that you would have to just hope your program halts.
>>
>>59193663
>And how are you going to control these without state?
I know when I need to terminate, I will just tell the compiler to do it after a certain amount of time. At least I can do that with a non-garbage language.
>You really are fucking stupid and do not know anything about CS.
That seems to be really unnecessary here, I am willing to bet my life on me being smarter than you.
>>59193668
What?
>>
>>59193694
It you're so fucking worried about termination, learn to formally prove your programs to be (totally) correct, and just do that.
>>
>>59193641
PROTIP: your computer is a finite state automaton
>>
File: 1483613708386.png (732KB, 1184x623px) Image search: [Google]
1483613708386.png
732KB, 1184x623px
How do you get good at coding?
I'm currently a software engineering major, and everything that CS/SE kids usually have trouble with I've been getting good grades in, but I'm doing horrible in my programming II class.
>>
>>59193694
Sounds like he just learned about Turing completeness, hopefully with time he'll realize it's not the be-all and end-all of computation and that often you can have too much power.
>>
How hard is it to learn Erlang?
>>
>>59193758
It is impossible. Turn back now.
>>
File: 1462008290812.png (254KB, 417x417px) Image search: [Google]
1462008290812.png
254KB, 417x417px
>>59193722
Why would I waste my precious brain power doing grunt work when the compiler can do that for me?
>>59193757
Agreed. I can't wait for this shit to be over already.
>>
>>59193694
>What?
What do you mean, "What?" That's one of the most legitimately retarded things I've ever read. First off, using the "cuck" buzzword like it means anything. What is that even supposed to mean in the context of believing in Turing completeness? That you've bought in to the idea that Turing completeness is useful so you're a cuckold? It already tells me that you're a meme-spouting faggot. Then secondly, you have to "hope" your program halts. Nigga what the fuck. I am never worried about whether my program is going to halt or not. *Most* useful programs must take user input and so it will only halt when the user has directed the program to do so. Very few algorithms I write on a daily basis are ambiguous enough to question whether or not they will halt. Finally, why do you give so much of a fuck about it? What's going to happen to you if your program runs forever? Literally what? God, I'll give you points for making me type all this but if you're serious you're mentally deficient.
>>
>>59193757
>and that often you can have too much power
Yes, I fucking know about that.
For example, C++'s template system being Turing complete is fucking stupid.
However, to write computer programs that a generally useful, you will probably need Turing completeness.

>>59193745
If you absolutely boil down the digital logic and all of that into a single state machine, you could almost argue that, but that is one of the least helpful definitions you could give.
>>
>>59193760
Not sure if serious
>>
>>59193800
http://lfe.io/
>>
>>59192198
0x47f0cd7e
0xc00056a4
>>
>>59193756
Write some code every day, solve some problems, even if its trivial. It's literally that simple. You will never get better if you don't write code.
>>
>>59193785
>What do you mean, "What?"
Literally what is sounds like, "what?" as in "what the fuck?"
>That's one of the most legitimately retarded things I've ever read
Why is that exactly?
>First off, using the "cuck" buzzword like it means anything.
It has a meaning, I'm sorry you're to retarded to realize that.
>What is that even supposed to mean in the context of believing in Turing completeness?
First off, the context was "submitting yourself to Turing's retardation", not "believing in Turing completeness". It's supposed to mean that you have quite literally been cuckolded by Turing.
>That you've bought in to the idea that Turing completeness is useful so you're a cuckold?
It isn't useful. You being a cuckold is just a natural reaction to something you deem to be "powerful".
>It already tells me that you're a meme-spouting faggot.
I'm not the one who posted a "meme pic" straight from 9gag.
>Then secondly, you have to "hope" your program halts.
Yes, this is exactly the case if you're working with a Turing complete language. There is no way to determine whether or not your shitty program will halt so all you have left is just hope.
>Nigga what the fuck. I am never worried about whether my program is going to halt or not.
I'm not surprised that the lesser minds of this world don't care about this, but there are people who do.
>*Most* useful programs must take user input and so it will only halt when the user has directed the program to do so.
This is blatantly false and irrelevant to the conversation.
>Very few algorithms I write on a daily basis are ambiguous enough to question whether or not they will halt.
>I
Yeah, exactly. I can only feel sorry for someone who has to write uninteresting shit all day.
>Finally, why do you give so much of a fuck about it?
I'm just sick of Turing and of all the crap he pulls even though he's dead. I would kill both him and Church if I had a time machine.
>>
File: 1459870215194.png (228KB, 400x514px) Image search: [Google]
1459870215194.png
228KB, 400x514px
>>59193785
>What's going to happen to you if your program runs forever? Literally what?
It will do the opposite, it will loop. Which I want to prevent at all costs.
>God, I'll give you points for making me type all this but if you're serious you're mentally deficient.
Why do you say this? I'm genuinely curios as to why you think someone wanting more control over the programs they write is "mentally deficient"?
>>
>>59193844

String anon = "speaks da truth";

>>
>>59193873
Looks like I misread your sentence. Disregard the "It will do the opposite" part.
>>
>>59193878
what sort of mongrel language is this?
>>
>>59193745
makes me think
>>
>>59193855
>There is no way to determine whether or not your shitty program will halt
Yes there is. There is no algorithms which can solve it in GENERAL.
For the more trivial kinds of looping, you can easily verify that a program will halt.
for (int i = 0; i < 10; ++i)
; // Do something

Can be easily reason to terminate.
>>
Are structs OOP?
>>
>>59193855
>Find out what Turing completeness means
>Shitpost about meme desires that don't matter
Insightful stuff.
>>
>>59193986
Now replace that "do something" with other loops which call functions recursively
>>
>>59193933
poo in loo
>>
>>59194001
>actually having control over the shit you write
>"""meme""" desires that don't matter
I'm sorry you feel this way. I'm really curious to see how you will try to spin this into being something else and not a display of your retardation.
>>
>>59194013
>Now replace that "do something" with other loops which call functions recursively
Notice how I said "trivial". But really, the way to reason about loop termination is that you need a term (>= 0) which can be proven to reduce each iteration of the loop, and will terminate the loop at 0.
For the loop I wrote, the term in 10 - i
>>
>>59194040
What you want is as meme as it gets, and no one is taking you seriously.
>>
>>59193994
No.
>>
easy mode solution to halting problem

pin set to 1 means it will halt, set to 0 it will not halt.

set pin to 0
execute code you are testing
set pin to 1


Run it and grab the output after a short period of time.
>>
>>59194119
>misusing "meme" in this retarded way
Can someone be any more of a redditor? I don't think it's possible.
>>
File: 1432860473789.png (40KB, 335x342px) Image search: [Google]
1432860473789.png
40KB, 335x342px
>>59194132
>>
>>59194137
+1
>>
>>59194137
Simply epic sir, take my upboats please

Edit: thanks for the gold, kind stranger!
>>
tfw you have a great idea for an esoteric language but somebody beat you to it and is pushing it as a legitimate language that people should use
>>
>>59194132
does this really work?
>>
>>59194203
No. Stay away from me, I do not want your reddit stink nearby.
>>
>>59194215
Meh, depends on how you define the problem / how theoretical you get. Even if you assume you run it on a super duper computer there could be an input which halts after 10 seconds.

In theory that 10 seconds would fuck everything up
In practice you can just recognize the sleep and "simulate" / bypass it.
>>
Can I use just the heap? It seems like I don't have a stack.
>>
>>59194306
Stack's faster
>>
>>59193324
I'm having trouble telling if this is satire.
>>
>>59194215
Yes. This guy just solved the halting problem.
>>
>>59194327
I don't have one right now.
>>
>>59194361
How?
>>
Why is my professor teaching me haskell and erlang? Why would I need to know these?
>>
>>59194400
In case you ever need to develop a telephone system.
>>
>>59194400
Bjarne Stroustrup knew 25 programming languages when he was making C++.
>>
What's the most rock solid text editor that I should study the source of?
>>
>>59194461
notepad
>>
What's wrong with using Java style brackets? It's easy to use and read.
fn name(args) -> return_type {
//body
}
>>
>>59194520
They don't pad your line count as much
>>
>>59188970
what the hell are you doing...
>you declare one struct pointer before if else
>inside the if, you allocate memory to another struct pointer (why did you declare another?)
>you return inside the if block without freeing the memory allocated to newNode
>get rid of tempNode, it is worthless. Replace last statement with the following

insertBack(pNode->next, addr);
>>
I need operational transformation to work on a python (flask) server I'm writing. From what I can tell, my options are using py-infinote, which hasn't been contributed to in 4 years, or try making something myself. Deadline isn't a real problem (everything else is done; just need this within the next few months), and I'm also a student, so I'm kind of supposed to be learning stuff anyway (it isn't for a class). Thoughts?
>>
>>59188970
I don't know what the rest of your code is, but if addr isn't what you expect it to be your function won't work
>>
>>59191486
Because C is FAST. C uses void*, meaning when you compile you only compile ONE copy of your function, whereas C++ using templates, which aren't what they seem to a beginner. A templated function will be compiled for EVERY type used. Making lookup times slower.

C is multiples faster than C++. Network, tcp/ip, sockets programming all done in C because its fast.
>>
>>59191486
you can compile c code with a g++ compiler and its instantly multiples slower.
>>
>>59192213
kek
>>
>>59192268
why would you multiply a string by a string? Maybe you are retarded
>>
>>59192961
>gonna contrive reasons the runtime cost may be worth it for improved programmer iteration time.
you are literally talking out of your ass
>>
there is so much fucking autism in this thread holy shit you guys are supposed to be smart? fuck.
>>
>>59193994
stupid question. But no
>>
>http://raymontag.github.io/keepassc/
>My main focus has switched to reimplement this project in Rust as it allows me to realize my vision of a secure password manager which is not possible with Python
Why isn't Python up to the task compared to Rust?
>>
>>59194807
Why to both
>>
What is an API?
What is travis CI?
What is source control system?
What is SVN?
>>
>>59194929
>What is an API?
Garbage.
>What is travis CI?
Garbage.
>What is source control system?
Garbage.
>What is SVN?
Garbage.
>>
>>59194922
Are planes road?
>>
>>59194952
>Your post
Garbage
>>
>>59194952
>APIs are garbage
you delete this right now
>>
File: 1487782699888.jpg (91KB, 938x512px) Image search: [Google]
1487782699888.jpg
91KB, 938x512px
Can anyone recommend a good book to learn C++?
>>
File: 12669503.jpg (7KB, 235x138px) Image search: [Google]
12669503.jpg
7KB, 235x138px
>>59194978
https://rust-lang.github.io/book/
>>
>>59194978
>good book
>to learn C++
This request is impossible to fulfill.
see >>59194995
>>
>>59194952
/g/ everybody
>>
File: output.png (260KB, 2058x841px) Image search: [Google]
output.png
260KB, 2058x841px
Been using gprof2dot to generate call graphs for my code, useful for getting at-a-glance information about hotspots.

Seems my tensor product routine is sucking up most of the runtime. For my application, this is the routine that combines basis functions and local patches of control points to evaluate tensor product surfaces.

[ 4-vector of u-direction basis functions ] * [ 4-by-4 "matrix" of control points (each is a 3-vector) ] * [ 4-vector of v-direction basis functions ]

  type(Vect3D) pure function TensorProduct(NU, D, NV)
! (NU) D (NV)^T, row * matrix * column
! TODO (#6): TensorProduct: Investigate whether using DO loops triggers a temporary array.
real(dp), intent(in) :: NU(order), NV(order)
type(Vect3D), intent(in) :: D(order, order)
integer :: i, j
type(Vect3D) :: P(order,order)

do concurrent (i = 1:order)
do concurrent (j = 1:order)
P(i,j) = NU(i) * D(i,j) * NV(j)
end do
end do
tensorproduct = .sum. P
end function

type(Vect3D) pure function Sum2D(array)
type(Vect3D), intent(in) :: array(:,:)

sum2d%x = sum(array%x)
sum2d%y = sum(array%y)
sum2d%z = sum(array%z)
end function
>>
>>59195029
I wish 4chan used a syntax highlighting library like pygments that let you specify which language you're enclosing so that it highlights correctly.
>>
>>59195004
>>59194995
samefag
>>
Programming some sockets. Really fun.
>>
>>59195080
Your autism must be at peak level to make that jump.
>>
>>59195117
Nah its really not
>>
Is my spelling mistake supposed to be valid syntax or is it just not interpreting it unless the except block is executed?
>>
im writing a hobby operating system for MIPS, targeting some shitty old chinese Loonsong desktop that i have.
>>
>>59185374
>>59185413
Bump for this. Anyone care to explain, I'm having hard time finding the answer from python docs.
>>
File: pymeme.png (6KB, 489x106px) Image search: [Google]
pymeme.png
6KB, 489x106px
>>59195331
forgot screenshot
>>
For doing collision detection between hundreds of fast moving objects, how exactly do I insure with quadtrees, that an object that might leave its node on its next update doesn't collide with something in another node? What's a good approach for this?

Working on a bullet-hell game and quadtrees "work" right now, but sometimes I get wonky behavior when objects collide near the boundaries of their node moving fast.
>>
>>59195466
Use a safer language
>>
The only reason I don't use python is because it's slow and nothing else.

Do you think I should try Nim?
>>
>>59195477
I don't see how this would help because it is a "simulation" problem not a language feature problem.
>>
>>59195363
Example one you are passing an iterable
Example two you are passing true / false

For the first one imagine each of those passes of the loop being unwrapped and i - a in set being evaluated. Any is essentially a giant OR of all those.
You probably don't want to use something like this because it has poor readability.
>>
File: screenshot.png (19KB, 400x400px) Image search: [Google]
screenshot.png
19KB, 400x400px
hey /g/ long time listener first time caller. Recently threw together Conway's Game of Life to test out how browserify works. Twas a fun simple ass half our project.

>>59195487
Nim's only fun if you bet people to beat it.
>>
>>59193655

>Turing completeness is fucking garbage with no real value.

God you are retarded.

Turing completeness is a theoretical contruct, it's like saying: "hey, if you can use any word and make sentences of any length, you could make any possible sentence."

So in reality there isn't such a thing as REAL turing completeness, because we don't have infinite space in our universe (as far as we know). So we could never store infinite information.
BUT when we talk about a language that "is turing complete" we are talking about what this language could theoretically do, given infinite space and time.

The bar for turing completeness is incredibly low, basically you can read/write/update values. Even SQL and HTML/CSS3 haven been proven as turing complete, so a language that is NOT turing complete is either incredibly powerless or just extremely wierd. Examples are Date descripting langauges (i.e. YAML, XML, ...) or total functional programming langauges (i.e. Charity and Epigram), where you can't write algorithms for recursively enumerable sets.


>tl;dr: turing completeness just means your language isn't just an elaborated data structure or some kind of wierd shit


>>59191797

Overly complicated.

Just do the following:

-one 2D boolean array "current state"
-one 2D boolean array "next state"
-for every inner cell check the neighbors on "current state" and write the result to "next state"
-for every non-inner cell do the same, but with the specific neighborhood (corners only two neighbors / first row without corners only left, right and lower neighbor / last row without corners only upper, left and right neighbor, and so on)
-copy "next state" to "current state"


It's faster, more readable and you avoid fucking around with stacks and boundaries. Just hard code and comment the edge cases, it's way more readable.
>>
>>59195487
>>59195569
Oh wait shit you mean Nim the language. No, fuck you.
>>
>>59195492
I don't know what I'm talking about so you may very well be correct :) :) :)

use locks Xd
>>
>>59195576
kys
>>
>>59195497
Oh I understand the difference now, thanks.

So something like this is better? Using more descriptive variable names of course. Seems to have the same performance.
for i in range(1, 100):
found = False
for a in set_1:
if i-a in set_1:
found = True
break
if not found: do_stuff(i)
>>
>>59195677
Although more verbose you can instantly skim over it and understand what it's doing.
Remember this: In coding, humans will read the code more than the computer will.
>>
>>59195677
>>59195731
My main grip with Python is that breaking out of nested loops are so ugly.
>>
>>59195789
it's literally the same as any statement or expression based language :)
>>
>>59195803
Another reason why pointers are good but fucking shitters can't handle pointers.
>>
>>59195789
If you need to break out of a nested loop you probably have designed it poorly. Often you can pull out some of the inner code and put it into a function.

Also btw I think your code is more efficient. (then again python is bad so I could be wrong and the performance gain is marginal.
>>
>>59195466
ensure, not insure
>>
>>59195819
C was never intended for massive amounts of concurrency, which is why patchwork shit like smart pointers were addons.

It's time to use Rust, a language without retarded duck tape pointer ownership. It's simply better for large scale applications.
>>
>>59195896
>This hurts the NSA shills
>>
>>59195896
not better enough to be used apparently
>>
>>59195896
Too bad Rust was designed as a language to write kernels with so based on the fact that retards will find it too hard to work with ensures it would be as popular as say Python
>>
>>59195819
I bet you don't even use double pointers
>>
>>59195839
There seems to be a slight difference in performance.

>>59195677
Ran in 0.78 sec

>>59185374
Ran in 0.66 sec
>>
>he doesn't use pointers dangerously
    bool swapLeft = (node->right() == nullptr) || (node->left()->value > node->right()->value);
>>
>>59196014
C++ was a mistake
>>
File: anime pic.jpg (71KB, 400x465px) Image search: [Google]
anime pic.jpg
71KB, 400x465px
>>59196014
>C++
>>
https://www.amazon.com/Engine-Architecture-Second-Jason-Gregory-ebook/dp/B00MMOJ076

Should I do it as a hobby /g/?

Currently on my second C++ book, I'm experienced in Java and OOP in general (software engineer)

I dream of becoming John Carmack
>>
>>59196053
>I dream of becoming John Carmack
>Java and OOP
You're certainly not on the right path.
First, learn C, then learn Racket, then find a way to get sued for for a shitload of money.
>>
>>59196101
>First, learn C,
No
>>
File: Uthstar_TITS_Promo_LR.jpg (99KB, 787x491px) Image search: [Google]
Uthstar_TITS_Promo_LR.jpg
99KB, 787x491px
so i just found out about this guy
https://www.patreon.com/user?u=121401

he makes text-based adventures and is projected to make $300k / year. i'm a senior engineer and i don't even make that much. FML
>>
>>59196151
Yeah but he makes porn for furries. And its good.
Also its a shared effort. So it's not that much money solo.
>>
>>59196053
>I dream of becoming John Carmack

Play Quake 3 and then read about the fast inverse square root algorithm.
And then remember that it was not Carmack that made it but that he was just stitching together work of much better programmers like a pajeet would.
>>
I have Raspberry Pi 3 and Zero and want to make some use of them. Most of the stuff for them is made in python. But python looks stupid. I can use C/C++, basics of Atmel assembly language and Arduino meme C like language. So Im thinking about learning something that will run on Raspi but not Python.
Or am I too meme and should just learn Python?
>>
>>59196187
you're using meme too many times in one post.

it's too late for you
>>
>>59196187
Depends on what you're doing. I'd just use what I already know
>>
>>59196101
I do Java 9 to 5 in an office because I like having nice things.

I'm talking a about a 3-year or so learning process.
>>
Is anime a set?
>>
File: 1482194006472.png (847KB, 1280x720px) Image search: [Google]
1482194006472.png
847KB, 1280x720px
What's a good language with no IO?
>>
>>59194799
No it's actually something you can look up and see that it's useful.

If your compiletime is long it hurts productivity.

Also I said it was a contrived reason you moron. I don't think proofs would take a large portion of compiletime.
>>
I love OOP, I love classifying things, it makes the program easier to understand.
All of you who do things precedurally are hindering yourselves.
>>
>>59196200
>it's too late for you
REEEEEEEEEEEEEEEEEEEEE
>>
 private class RandQueueIterator implements Iterator<Item> {
private int size = N;
private Item[] iter_s = (Item[]) new Object[size]; //error
for (int i = 0; i < size; i++) { //error
iter_s[i] = s[i];
}

public boolean hasNext() { return size != 0; } //error
public void remove() { throw new UnsupportedOperationException(); }
}


Why are these lines throwing syntax errors?
>>
>>59196502
>it makes the program easier to understand.
>>
>>59196407
A program without IO is literally useless.

>>59196502
>easier to understand
How is spreading shared mutable state all over the program "easier to understand"?
>>
>>59196502
I'm sorry, but you must be confused, redditor. Never ever recommend the usage of objects or OOP here.
>>
>>59196528
Did I ask for your opinion? The word "useless" is literally useless in this context.
>>
>>59196407
Would assembly language count?
>>
>>59196536
A program without IO literally cannot modify anything. Everything is happening in the program's own little world, and you will never get to see inside.
Funnily enough, if you compile a program without IO with GCC and sufficient optimisations enabled, it will optimise the entire program out.
>>
>>59194952
how's that fizzbuzz in C/Haskell coming along?
>>
>>59196566
Depends. Does it fit my requirement?
>>59196584
Yes, I do realize that. In no way does this make it "useless".
>Funnily enough, if you compile a program without IO with GCC and sufficient optimisations enabled, it will optimise the entire program out.
Since GCC is straight up garbage I'm not even surprised.
>>
>>59196407
Japanese
>>
>>59196630
>In no way does this make it "useless".
What possible use can this program have?
>Since GCC is straight up garbage I'm not even surprised.
I'm sure any optimising compiler would do it. I've just witnessed it myself with GCC.
>>
>>59196640
Why? It does have IO I think.
>>59196654
>What possible use can this program have?
Running it is already a use. Therefore it is by definition not useless.
>I'm sure any optimising compiler would do it.
But why?
>>
>>59196630
>does it fit
The language allows you to write programs that do nothing at all to the state of the program or only operates in registers (which can later be restored if you view the register states as output). I'm not sure you could execute such a program on a modern operating system but you could write your own OS that allows you to run the program no problem.
But maybe you should be looking for a machine that does no output first? Because the transistors in the CPU will leak information out into the universe in some way, and that can be seen as output.
>>
>>59196677
>I think.
Why do you think your opinions matter
>>
>>59196677
>Running it is already a use.
No? Doing something for the sake of it is not a reason.
>But why?
A compiler only has to behave "as-if" your program was running. It can make all sorts of changes, as long as the observable side effects don't change.
If your program has no observable side effects, then the compiler is just outputting code which has no observable side effects; the empty program.
>>
>>59196520
Any ideas? The first error is "Syntax error on ";", { expected after this token." The second is "Syntax error(s) on tokens, misplaced construct(s)", the third "Syntax error on token "hasNext", AnnotationName expected after this token."
>>
>>59196520
>>59196712
Executable code needs to be inside a method/function.
You can't just have it sitting in the class definition like that.
>>
>>59196520
I think you meant to write a constructor but you kinda forgot and just put the code in your class.
>>
I am a college student who will start his next class in OOP in next semester, so approximately in one month.
We are doing it in java.
Suppose I spend two hours a day on it, and continue that trend.
Could Iamacollegestudent actually get enough experience to be self - sufficient to code on my own at the middle of the semester?
On my own means that I am able to come come up with at plan without getting advice and say... code a program that is comparable to a 3d hack and slash game with the simplest cornerstones done in 6 weeks tops with customizable controls, a game pad support and keep a resolution option.
Or is that a goal I should put on a further date?
>>
>>59196740
>>59196721
Ooh. Thanks.
>>
>>59196684
That's interesting. I'll look into it. Is there already such a machine available?
>>59196685
Why do you think I think my opinions matter
>>59196698
>No?
Yes. Me wanting to run it is already a use (by definition). There is nothing you can do about it.
>It can make all sorts of changes, as long as the observable side effects don't change.
Why does it feel like it has the right to do that sort of stuff?
>>
>>59196744
Please ignore the typos. My phone lags a lot currently.
>>
>>59196744
>code
stopped reading right there.
>>59196772
oh, so you're a redditor. well, that explains it.
>>
>>59196766
>Why do you think I think my opinions matter
Your opinions do not matter.
>>
>>59196744
>3d hack and slash, after coding for a semester
Ha.

Last Java class I was in the students could hardly code out a platformer. Though if you've really got the drive you could, it's probably going to take more than two hours a day though if you're new to programming.

In general if you want to do something like that, consider not java.
>>
>>59196740
>>59196721
Related to that, what accesibility should you give constructors for private classes? Don't want to make it public I feel.
>>
>>59196777
Is that a question?
>>
>>59196775
Is this bait?
>>
>>59196789
Definitely not.
>>
>>59196766
>Why does it feel like it has the right to do that sort of stuff?
Because the standards the govern the languages give them the right to do that sort of stuff.
>Me wanting to run it is already a use
No, not really. This is seriously the same as you creating an elaborate black box with all sorts of complicated internals.
On this box, there are some buttons. When you press the buttons, literally nothing happens.
Completely useless.
>>
>>59196788
No
>>
>>59196779
why the hell do you space your posts like that, plebbitor?
>>
>>59196805
Too used to writing markdown files, honestly. I apologize.
>>
>>59196779
The reason for that is actually the idea that if I can do this, then the rest would be much easier.
Or in other words, I wanted a big goal I can strive for so I can be proficient in other, smaller ones.
>>
File: 1390198783860.jpg (54KB, 370x299px) Image search: [Google]
1390198783860.jpg
54KB, 370x299px
>>59196407
>>59196536
>>59196630
>>59196677
>>59196766

is this some kind of autistic way to meme about pure functional programming?
>>
>>59196810
You're really just going over the top for no reason. I can practically guarantee you that your class isn't going to go over the type of shit you'd need to learn to make a decent game in Java. To be frank you'll likely want to rely on frameworks and engines to do so. Personally I'd recommend libGDX but even then I'd say it's a stupid fuckin idea. and I don't believe it would help much, learning or otherwise.
>>
>>59196802
>Because the standards the govern the languages give them the right to do that sort of stuff.
But is there a language which doesn't do this kind of bullshit? I just want to write some programs.
>No, not really.
So something which is by definition true isn't really true?
>This is seriously the same as you creating an elaborate black box with all sorts of complicated internals.
So? If I have a use for it then it is useful. You have to deny reality to claim this isn't true.
>When you press the buttons, literally nothing happens.
I see, so according to your "logic" you not observing the effects and the effects not happening at all are literally the same thing.
>Completely useless.
Something which someone has a use for is by definition not useless. How retarded does one have to be to deny this?
>>59196812
>that plebbitor way of using "meme"
Please do not attach anime images to your posts next time.
>>
A lot of game studios are using mono to create multiplatform games.
Now, they may not be particularly fast, but they're considered reliable.

Does that mean i can write c# programs for the mono runtime and expect them to work on linux, windows and osx?

Recent versions of mono (4+) seem to be quite good.
>>
>>59196833
Oh it's that kid again.
>>
>>59196833
This is mental illness.
>>
>>59196833
>you not observing the effects and the effects not happening at all are literally the same thing
In the abstract world of programming, it really is.
You're either baiting or just extremely autistic.
I'm going to stop replying to your shit. You don't deserve the (You)s.
>>
>>59196845
Do I know you?
>>59196849
Could you be more precise?
>>59196853
>In the abstract world of programming, it really is.
It's not. But you can go ahead and be delusional since you don't have any problem denying obviously true statements.
>You're either baiting or just extremely autistic.
And in both cases you lose.
>I'm going to stop replying to your shit.
Why is that?
>You don't deserve the (You)s.
You know that you can just reply without linking to my posts, right?
>>
C is trash
Rust or Bust
>>
>>59196882
rust a bush
c a crap
>>
>>59196882
>>59196889
C is carp.
Rust is bust.
FTFY
>>
>>59196407
Assuming such a language exists, can you state specifically what you would use that knowledge for?
>>
>>59196913
>can you state specifically what you would use that knowledge for?
Why are you interested? Are you part of some government organization?
>>
>>59196946
What are you hiding?
>>
>>59196946
We don't like people who want answers and not tell us the reason why.
You'll find that this is common in most societies in the world.
>>
>>59196967
Assuming this is true, why do you want to know?
>>59196968
>We
Clarify. Who exactly are you talking about here? Your friends from the government?
>>
>>59196982
Because the government had the authority to
>>
>>59196990
I do not answer to any government currently in power.
>>
>>59197000
Time for you to surrender
>>
>>59197017
That's no way to greet an old war buddy.
>>
>>59197042
I'm not your buddy.
>>
>>59197068
Fine by me. We don't need your type.
>>
>>59197120
>We
Clarify. Who exactly are you talking about here? Your friends from the government?
>>
>>59197068
New thread:
>>59197136
>>59197136
>>59197136
>>
New thread:

>>59197137
>>59197137
>>59197137
>>
>>59197138
>>59197141
Nicely done.
>>
>>59197133
You want to know the truth?
>>
>>59196805

Mate, can you start using a trip already, so we can start filtering your inane input to these threads.

Some people prefer to format in certain ways, akin to their code as well. As long as it's constant, who cares?
Maybe you should take up another hobby.
>>
>>59197657
Why would I be using a trip? I'm not a redditor like you.
You can format your posts this way on your home site, don't bring your shit here.
>>
>>59197716

>Ctrl+f redditor
Heh, no need for a trip afterall. There's all your posts.
>>
>>59197832
>Heh
you have only confirmed my suspicions of you being from p lebbit.
Thread posts: 319
Thread images: 36


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