[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

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: 318
Thread images: 30

File: Icon-Sat-Square.png (680KB, 815x720px) Image search: [Google]
Icon-Sat-Square.png
680KB, 815x720px
/dpt/ - Daily Programming Thread
Hey, /g/, what are you working on?

>>62162915

Also, for various technology-related things in real-time, we have a new Discord Server, available here:
https://discord.gg/fsPQy
>>
File: 1491980384198.jpg (54KB, 960x547px) Image search: [Google]
1491980384198.jpg
54KB, 960x547px
i pick the one with anime image
>>
>>62167621
agreed
>>
>>62167566
stella no mahou was too short
>>
>>62167682
I still gotta watch it.
It looks good
>>
File: 1479179758186.jpg (35KB, 519x517px) Image search: [Google]
1479179758186.jpg
35KB, 519x517px
>>62167662
>>62167621
the other one is lain you fools
>>
File: kaiki monogatari.jpg (75KB, 1278x546px) Image search: [Google]
kaiki monogatari.jpg
75KB, 1278x546px
>>62167566
I will repeat my offer once again. It has no value for experienced programmers, but you know, there are people who pay for code camps to learn. And my offer has more value than these paid codecamps.

Gentlemen. I'm looking for junior devs, pajeets, neets and anyone who is willing to become my slave. I have an offer that can be interesting for you.

I have a side-project with some commercial potential, but I don't have enough time to develop it myself. So, I'm looking for people of any skill level who want to practice and do job for me. I will give you tasks, and you will be free to implement them in any way you want — microservice hell is what we will create.

What is your benefit?
- You will get real tasks. If you are learning to code, real-world task may be good for you to understand what expects you in the industry;
- You will get some experience of working with a real client. You will see how real-world interaction may look like;
- My feedback and code review may help you improve your skills;
- You'll be able to add "I know how to develop microservices" line into your CV;
- When the project becomes profitable, you risk getting a low-paid laid-back job, you will have the opportunity to feel the pain of microservice integration and so on.

What is my benefit?
- Free coders;
- Opportunity to find people for future mutually-beneficial exploitation.

Interested? Contact me via [email protected]
>>
(continued from >>62167619)
to clarify, when there are things like this, that are morally wrong, but also no one's fault, a different word from "wrong" is usually used for them

we usually call such happenstance "tragic" or "unfortunate"

that's what autism is, do you understand

it's "unfortunate"

so maybe don't fucking make fun of it asshole
>>
>>62167747
see 62167757
>>
>>62167731
>happy_merchant.jpg
I hope no one of you fuckers gonna do this. If you consider themselves ready for "real task" go contribute to open source instead.
>>
>>62167731
anyone with a modicum of skill is making good money already; enjoy micromanaging retards who cant average two ints
>>
>>62167731
Who do you have as financial backers?
>>
File: dork.png (668KB, 800x600px) Image search: [Google]
dork.png
668KB, 800x600px
>>62167731
Haha nigga, you really expect people to work for free?
Out of spite, here's a free coding school that'd teach anybody way more than your meme project https://www.42.us.org/
Plus if those people are junior devs or NEET it's usually for a reason.
>>
how to access the addons page from firefox
about:addons

with python or other language?

this url only works in firefox, but that's not a valid url
i tried
 
req = requests.get("about:addons")
>>
>>62167905
You can't. It used to be possible but Firefox had to remove this kind of feature because people kept installing malware.
>>
>>62167707
Why she use lisp
>>
>>62167905
you can't, it's a browser-specific tailored handler that servers an internal page based on the url, you can't access it from outside of the browser unless through an RPC or something like that but I doubt browsers even offeri t
>>
>>62167905
Is this bait? Or are you actually making an addon for firefox in python?
>>
>>62167771
>What purpose does a cripple have?
people are their own purposes
it's immoral to consider a person a means to an end
also cripples can do useful things
even the most physically crippled cripple can teach or program
even the most mentally crippled cripple can do heavy lifting, with sufficient strength training
and even someone crippled in both regards can serve as a table
>Besides being a burden to society, they're a burden to themselves.
everyone is a burden to himself
life itself is fundamentally a burden
you will never get more out of it than you have to put in to sustain it
it's a hard lesson to learn
what keeps us alive then
a basal and profound spark of will that can only be extinguished by the most sickening and destructive tragedy
how this spark feels to hold in one's heart is difficult to put into words
after all it's the premise of words themselves
why speak if you have no will to live--life being the singular interminable will from which all other wills are forged
>They know they cannot achieve all great things other can achieve.
life is not about progress
progress is merely a means to ever increase the probability of continued life
>Living for the sake of being alive is stupid.
don't call it stupid, it's why life exists at all
it's why you're here
it's why everyone is here
any other purpose anyone fulfills is secondary and in fact a distant consequence of that one original drive to live for its own sake
>You live to do great things that make you and the people around you proud.
greatness is relative to past experience
anyone who does anything they once thought out of their grasp is right to be proud of it, regardless of the achievements of others
for this reason pride is a fundamental experience that cannot be divorced from life
>>
>>62167932
>>62167945

damn

thanks for the info
>>
Haskell!
>>
File: 1495673874839.gif (145KB, 500x500px) Image search: [Google]
1495673874839.gif
145KB, 500x500px
>>62167979
good post
>>
>>62167949
>>>/pol/
>>
>>62168002
>>>/toy/
>>
posting in real new
is this victim to a race condition? if so, how do you fix that?

access(mutex){
if (mutex->lock == UNLOCKED){
mutex->lock = LOCKED;
return UNLOCKED;
}
else return LOCKED;
}



i'm thinking of two threads running this at the same time
thread one would run the first line, immediately followed by thread 2 doing that first line. both of them read the mutex is unlocked. then thread 1 sets the mutex to locked, as well as thread 2 doing that right after. then both of them get unlocked returned from this function. how would you avoid that? or does that not happen?
>>
Cant find the old dpr thread... someone posted a couple of addons for C/C++ for VS code; anyone able to recommend some addons for VS code for C/C++?
>>
>>62167947
Look
>>62167932
>>
>>62168002
good response
guess that's the end of the conversation then
not much else to say to that
for the record i consider myself the rhetorical victor of this exchange
>>
>>62167949
You know, I used to make shitty edgy /pol/ posts like this talking about "mental deformities" all the time, I never really meant it.
You fell for a troll.
>>
>>62168080
it was a good troll to fall for
it compelled me to reconsider my views on this matter and thereby strengthen and reaffirm them by way of coming to the same conclusions but in more detail
>>
>tfw retard who fucked up school schedule and have to take the alternate java courses
>>
>>62168179
>tfw forced to take java when I already know C
>>
At the moment, I'm trying to overcomplicate a simple fibonacci program.
>>
>>62167949
Do you think a cripple using a motorized wheelchair controlled by his/her chin is a happy person? The only goal they have is to wait until life's over.
>>
>>62167566

Haven't done Java since college, recently finished up in a place I was at for a few years. Freshening up on the basics so I thought I'd do a linkedlist

Did this in about 10 minutes for a standard LinkedList

class LinkedList {

Node head = null;
Node tail = null;
int size = 0;

private LinkedList(Node h){
this.head = h;
this.tail = h;
}

private void add(Node a){
this.tail.setNext(a);
this.tail = a;
size++;
}

private boolean hasNext(){
if(tail.next() != null)
return true;
else
return false;
}

public String toString(){
String output = "";
Node temp = head;
int s = 0;

while(temp != null){
output += temp.toString();
if(s != size){ output += ", "; }
temp = temp.next;
s++;
}

return output;
}

public static void main(String args[]) {
LinkedList mylist = new LinkedList(new Node(0));
int x = 1;
while(x != 6){
mylist.add(new Node(x));
x++;
}
System.out.print(mylist.toString());
}

}

class Node {

Object data;
Node next;

public Node(Object dt) {
this.data = dt;
}

public Node next(){ return next; }

public void setNext(Node n){ this.next = n; }

public Object data(){ return data; }

public Node getNext(){ return next; }

public String toString(){ return data.toString(); }

}


Not sure if this would go down well in an interview if I was asked to do one but it was probably the fastest I could do off the top of my head. How much work is ahead of me?
>>
>>62168192
java is more complicated than c
worse, mind you
but nonetheless more complicated
therefore perhaps it will be a positive learning experience
broadening your horizons, even backward, generally improves future ability to learn
>>
>>62168222
>Do you think a cripple using a motorized wheelchair controlled by his/her chin is a happy person?
that's for the cripple in question to decide
>The only goal they have is to wait until life's over.
so don't decide it for them
>>
>>62168278
Before Christianity, people killed themselves because they were a failure. Christianity forces you to keep on living no matter how horrible the conditions are. Sometimes people cannot decide for themselves.
>>
>>62168245
Its ok. I'm not sure why the tail would ever have a next in a linked list. You should also use generics instead of object, ie Node<Integer>. Also, you have standard interfaces that describe a list. Make LinkedList<T> implement List<T>
>>
>>62168313
>Sometimes people cannot decide for themselves.
they're the only ones with any right to
if you would deprive someone of that choice you deserve to have it taken away from you as well
the spark can't be seen and can't be expressed
only the person who possesses it can know whether it's still there
better an empty shell should live than a real person should die
>>
>>62168045
can someone answer this? the linux book i'm going through says how to use their mutex functions, but now how to make them
>>
>>62167566
I'm waiting for government clearances to go through so that I can start working on a new project. In the meantime I'm amusing myself by learning antlr4 and making a short DSL that create CRUD application plumbing classes for you. If I get it to be beautiful and awesome enough, I'll then proceed to write about how this is an absolutely retarded way to solve the problem, and that what we really NEED is compiler macros so that we can hook our DSLs to the compiler to let it transform our code.

So far I've defined the grammar and I'm kinda happy with it.
type Widget (
fields (UUID id "id"
String name "name"
BigDecimal costPerUnit "unit_cost")
readers (
getByUuid
query: "SELECT id, name, unit_cost from Widgets where id = ?"
args: (UUID id)

getByName
query: "SELECT id, name, unit_cost from Widgets where name = ?"
args: (String name))

deleters(
deleteByUuid
query: "DELETE from Widgets where id = ?"
args: (UUID id)))

This gives you a proper DAO with correct JPA annotations and the aforementioned methods, it gives you an immutable value class called Widget, and it gives you a builder that you can use to change state so that you can save state to the database.

If I get it to work I might add caching too, using the standard annotations for it. Dependency Injection would be necessary though. Just take a functional interface that returns a connection or something and I'll be happy.

The point of the exercise is that these classes are annoying to make: They're boring. We all know how they look. They're not where you spend your time.

So let's create these for us using this incredibly simple language, hit the compile button and have it compiled into java for us, and we're golden. (How I'll tell the compiler what file and package to put the classes in is an unsolved problem though. Not sure what is the BEST way to do it.)
>>
>>62168313
by the way, in this post: >>62168397
i'm assuming you're suggesting sometimes we should kill cripples, which is disgusting and atrocious
if what you mean is that we shouldn't have to go out of our way to keep them alive, then i agree, see: >>62167619
>>
I want to search collections of some millions of entries with ~100 characters each using a reverse word index and then filtering. Does there exist some software to do this reasonably performantly written in a compiled language without many external dependencies? Compile-time is okay if they can be statically linked. How is MySQL's search functionality from a performance perspective?
>>
>>62168481
Have you tried grep?
>>
>>62168423
Anyway the point here is to define something really nice that people wouldn't mind giving a go. Something that looks like it can save them time, that's easy to use, etc. Then I'll show you all the retarded bullshit you have to go through to compile it. Then I'll suggest a compile time mechanism to have the compiler execute arbitrary code at compile time at various places. This would mean that as you point javac at your Main.java class it'll see some sort of annotation or directive that tells it what macros it uses, and how to call them.

And show how all the annoying bullshit that you at one point had to deal with is now dealt with. There's no hidden magic to trick the compiler, it's all right there. And you could conceivably extend the compiler that way too by making it be able to say, deal with more literals. There are several possibilities, but my so far favourite is to tell javac directly about it when you compile by adding it to some macro manifesto that it consumes first, and thus what expansions you have in the java language is easy to deduce. Either that or do it like in Lisp.

Either way is fine.
>>
>>62168481
Both MySQL and Postgres are good with text. But if it's a one-off, grep is likely faster.
>>
>>62168430
Would you terminate pregnancy if the fetus has no arms/legs?
>>
>>62168544
depends if it's sentient yet
if so then yes
if not then no
>>
>>62168430
Can you either kindly fuck off or talk about programming?
Maybe that's too much to ask to an autist though.
>>
File: 1474324373608.jpg (568KB, 2169x2751px) Image search: [Google]
1474324373608.jpg
568KB, 2169x2751px
>>62168365

Good points, I forgot to remove the hasNext method that's actually not used at all

I'll look into revising generics next but I'd imagine it'll eat up more time during an interview. Still, better to be prepared in the event they ask for that stuff, thanks anon
>>
File: kaiki tilt.gif (205KB, 500x281px) Image search: [Google]
kaiki tilt.gif
205KB, 500x281px
>>62167777
There are not so many newbie-friendly maintainers. And even less of them are ready to do some hand-holding.
>>62167782
I'm ready for micromanagement and detailed explanations. I would hire someone experienced otherwise.
>>62167864
I have enough savings to make a startup with a couple of monkeys, but why? Your question sounds really weird, I clearly stated that I'm looking for free labour.
>>62167895
>Plus if those people are junior devs or NEET it's usually for a reason.
I knew one guy who was "I can't code, I can't write resume, I can't get hired". But my mentorship helped him to get a job and grow really fast.
Yes, it is usually for a reason. The reason is: they are not pushed in the right direction. I can help with it.
>>
>>62168544
(continued from >>62168665) errr other way around
>>
>>62168508
Way too fucking slow and O(N)
>>62168539
Are there any benchmarks?
>>
>>62168544
children are not humans, brainlet. answer my question >>62168045
>>62168045
>>62168045
>>
>>62168544
People live happy lives without arms/legs.
>>
>>62168700
Did you also try changing your locale to C and supposedly faster alternatives such as ag/ripgrep?
>>
Is there any way to push_back a unique_ptr in a better way?

vector.push_back(std::unique_ptr<type>(etc));

is ugly and feels superfluous, as it's likely instantiating a new unique_ptr then std::move ing it.
>inb4 pointer to pointers
I don't like it either, but they're rarely accessed and I'll probably turn the whole thing into a ring buffer eventually. I'd reserve and call reset() if I didn't need it to grow and know its size.
>>
>>62168707
>test
>set
Yes, it has a race condition. You cannot guarantee the test and set operation are bundled in a single atomic operation.
You cannot write a userspace mutex.
>>
>>62168544
Yes
>>
>>62168682
>it'll eat up more time during an interview.
nah, its only a few more characters
>>
>>62168755
>You cannot write a userspace mutex.
i had a class years ago where i had to write one but i've forgotten everything about it and don't have the source code. feels bad
>>
>>62168678
i'd love to talk about programming but unfortunately i'm currently tied up convincing a disillusioned person not to murder quadriplegics
>>
>>62168700
How would there be benchmarks? You'd have to take into account the time of the loading operation, writing the functions, running it and getting the results back out again, vs grep just running over the files.

And that's WHY it's likely faster too. It's not that grep is superduper fast (though it can be), it's that it lets you do one-off jobs with a minimum of setup.
>>
>>62168767
In what language did you write it? Inline ASM?
>>
>>62168766

Is this acceptable for the node?

class Node<E> {

E data;
Node next;

public Node(E dt) {
data = dt;
}

...

}
>>
>>62168717
It's still O(N). Making my own would be an interesting exercise and it would be much faster. The benchmarks I find take at least 8 ms, this is abysmal.
>>62168755
Can't you use a mutex mutex or include a short sleep?
>>
>>62168798
yup
>>
>>62168801
Using a mutex to build your own is cheating. Why would a sleep work?
>>
>>62168801
Are you sure grep is O(n) if you use --fixed-strings ?
>>
>>62168787
https://en.wikipedia.org/wiki/Peterson%27s_algorithm

used this. refound it btw
>>
>>62167895
What did she do?
>>
>>62168843
Interesting... Not elegant, but still interesting.
Would Peterson's algorithm even work on languages running in a VM?
>>
I just started learning C and did an exercise to count blanks, tabs, and newlines, but for some reason the tab and newline values are wrong (tabs is always 11, newlines is always 0). What am I doing wrong?

 main () {
int c, blanks, tabs, nls;

blanks, tabs, nls = 0;

while ( ( c = getchar() ) != EOF)
if ( c == ' ' )
++blanks;
if ( c == '\t' )
++tabs;
if ( c == '\n' )
++nls;

printf ( "Blanks: %d\tTabs: %d\tNew Lines: %d\n" , blanks, tabs, nls );
}
>>
>>62168894
Also I'm on Windows if it matters.
>>
>>62168894
Add {}.
>>
>>62168780
I want to have the entries stored in a database though. Benchmarks of searching a large table with random queries, and show average execution time. It seems they at least take a few ms on reasonably powerful computers, I want something faster.
>>62168823
No, multiple userspace mutexes.
1) inc read mutex
1b) sleep
2) if read mutex > 1 abort
3) read real mutex
4) set real mutex
5) dec read mutex
>>62168842
I have to rerun it for each query.
>>62168894
Don't do multiple assignments like that. Use {} for if statements. The excessive spaces look weird. Try fixing this, it might make the issue more clear.
On windows, newline isn't \n (it's \r\n), this might cause problems.
>>
Is spoonfeeding allowed there? What does one read to quickly learn image encoding and transformation basics? Is there a good c# lib for that, or should I go straight into per-byte operations hell?
>>
>>62168942
Thanks, it slipped my mind that I neede {} around the ifs.

>>62168953
>Don't do multiple assignments like that.
What is the reason for this? Is it purely cosmetic or does it affect the values?
>>
>>62168894
C doesn't use indentation as syntax. It doesn't know all the if's are supposed to be in the while. In C's syntax, if a block has no curly braces to indicate what statements are a part of it, then by default only the very next statement is a part of it. So the C compiler reads your code like this:
while ((c = getchar()) != EOF) if (c == ' ') ++ blanks;
if (c == '\t') ++tabs; // Not in the while!
if (c == '\n') ++nls; // also not in the while

That doesn't explain the results you're seeing though. The results you're seeing are very strange.
>>
>>62169016
>Thanks, it slipped my mind that I neede {} around the ifs.
I always add {} no matter if it's a one-liner or not. Otherwise, you might end up with obscure problems like you had.
This might interest you: https://nakedsecurity.sophos.com/2014/02/24/anatomy-of-a-goto-fail-apples-ssl-bug-explained-plus-an-unofficial-patch/.
>>
>>62169009
Imagemagick docs, there are probably some pdfs on libgen too
>>62169016
For pointers it can fuck things up, eg
int* a, b, c
means a is int* but b and c are int.
>>
File: 1503748992863.jpg (157KB, 1024x768px) Image search: [Google]
1503748992863.jpg
157KB, 1024x768px
PROGRAMMING CHALLENGE

Make a £sd calculator. It must be able to add, subtract in £sd, multiply and divide by decimal fractions. Lowest coin is farthing.
4 farthings make 1 penny, 12 pence make 1 shilling, 20 shillings make 1 pound.

So far, we have a solution in APL, J, C and C++!
What other languages will present /g/ later?
>>
>>62169058
>For pointers it can fuck things up, eg int* a, b, c means a is int* but b and c are int.
not him but that's why you should put the star on the right and if you have a pointer type that's more complicated to express (i.e. contains modifiers) you should use a typedef
>>
>>62165794
>>62165794
>>62165794
>>
>>62168894
Just to mention, your loop will always overread by one character as EOF isn't set until you read the EOF character. Hence why C++'s ifstream has peak(), to set EOF before your loop condition check. Lot of ways to solve this, and many programming languages have had different approaches. None of which feel good.

Looking at your loop itself, the while should have the rest of the stuff in {}. Don't ever declare variables the way you have, but I imagine only nls is initialized to 0. "tabs" might be reading garbage or some kind of padding, though that's unlikely.

I don't do anything involving runtime input...ever, but the above are clear places the program isn't doing what you expect.
>>
>>62167566
>download cpython
>go to util
>read docs
>checkout "freeze"
>builds single executable w/o dependencies

wtf i love python know
>>
>>62169096
>/g/ loves IBM
What are you smoking? IBM and Microsoft are the cancer that slaughtered the Unix hacker community. They're as bad as AT&T.
I haven't used Swift and don't plan to do so in the near future. I guess it's a big improvement over Objective C
>>
>>62169151
>AT&T
>bad
>literally built UNIX
>>
>>62169088
No, what you have is an int*, not an int named *a.
>>
>>62169066
Once you realize you can count everything in farthings internally, the challenged is reduced to writing two trivial conversion functions.
>>
>>62169185
This. Or you can just count it in pounds and use floats.
>>
>>62169171
Bell Laboratories did and AT&T tried to jew it.
>>
>>62169174
No, what you have is an int *named a. (Omission of space deliberate; unlike most words, the type int *does not have a space at the end of its name.)
>>
>>62169198
You don't use floats for money.
>>
File: orly.png (177KB, 415x583px) Image search: [Google]
orly.png
177KB, 415x583px
>>62167566
Will I be in pretty good shape if I work through this entire book? I'm not new to programming, but I feel like i'm stuck at whatever is between complete beginner and intermediate. Can't seem to make progress in any direction, everything is either too easy or too advanced
>>
>>62169268
>Why does 2+2=5986?
I don't get it.
>>
>>62169285
dumb faggots think that by adding numbers you can spawn nasal demons out of your anus just because the addition was compiled from C.
>>
>>62169214
Bell Laboratories were owned by AT&T.
>>
>>62169285
It's because of stupid bullshit.
http://www.xent.com/pipermail/fork/Week-of-Mon-20060731/042348.html
It's one of those "we did it wrong and we expect you to arbitrarily know how specifically we did it wrong without looking at what we did just from what answer we got"
>>
>>62169268
>Can't seem to make progress in any direction, everything is either too easy or too advanced
Take up some non-trivial hobby project, then you'll have enough experience to tell what you need to learn next.
>>
What's a good Prolog compiler / anything I should know in advance? Want to start learning it.
>>
>>62167566
I'm learning C from pic related and am having trouble on exercise 2.1:
write a program to determine the ranges of char, short, int, and long variables, both signed and unsigned, by printing appropriate values from standard headers and by direct computation. harder if you compute them: determine the ranges of the various floating-point types.
I found the max value of char to be 127, which is of course 2^7 - 1. I thought unsigned chars were supposed to top off at a byte (2^8). Is my machine automatically "signing" them?
Also, I found the value of short to be 32,767 = 2^15 - 1, but couldn't get the program to display anything for int and long types (i essentially reused the same program for char and short, but swapping out types where appropriate). Here is the program to determine int:
https://hastebin.com/pogipamila.cpp
any help would be most appreciated!
>>
Quick, write the most vulnerable program you can!
>>
>>62169353
I can't even think of any. I was going to make a small roguelike game but I immediately got lost as soon as procedural generation algorithms.
>>
>>62169324
#include <stdio.h>
main() {
int answer;
answer = 2 + 2;
printf("The answer is %d\n");
return (0);
}

I'm dissapointed, I was really expecting a piece of pracitcal C knowlege.
>>
>>62169378
oops, forgot pic
>>
>>62169382
fn main() {
println!("WHITE GENOCIDE!");
}
>>
>>62169382
int main (int, char **argv) {
char *f;
char *a[4];
char *e[1];
f = "/usr/bin/env";
a[0] = f;
a[1] = "python";
a[2] = argv[1];
a[3] = NULL;
e[0] = NULL;
execve (f, a, e);
}
>>
File: 1429709246645.png (477KB, 1450x1080px) Image search: [Google]
1429709246645.png
477KB, 1450x1080px
>>62169386
Pick something else then.
>>
>>62169185
Aren't multiplication and division are expensive operations? Isn't it faster to count and carry over?
>>
>>62169382
use std::mem::forget;

struct Human;

impl Human {
fn get_alzheimers(self) {
forget(self)
}
}

fn main() {
let you = Human;
you.get_alzheimers();
}
>>
>>62169439
NOOOOO!!!
>>
>>62169504
Memory leak isn't a vulnerability tho.
>>
File: rolls.jpg (141KB, 638x450px) Image search: [Google]
rolls.jpg
141KB, 638x450px
>>62169459
>>
>>62169285
he thought he was adding 2 and 2 but he was adding 2 and a memory address
>>
>>62169495
Are you writing embedded software, codecs in assembly, a AAA video game or a simulation for SpaceX? If not, multiplication is really cheap.
>>
>>62169556
wouldn't want to do something stupid like accidentally get a job at spacex instead of making windows apps
>>
Has anyone here ever went koo koo while programming?

I was programming most boring shit for 6 hours straight and found myself quietly singing "I will always love you" for like 10 minutes. And I don't even now the lyrics so I just repeated same sentences over and over
>>
>>62169587
Often happens. Programming requires a great deal of autism.
>>
>>62169587
It's ok. It's a well known side effect of coding. DO not worry anon.
>>
File: 1413074558673.jpg (194KB, 600x756px) Image search: [Google]
1413074558673.jpg
194KB, 600x756px
>>62169587
Has anyone indeed.
>>
Where can I find examples of LMDB API being used? OpenLDAP's own server is too tightly coupled for the backend API code to be useful.
>>
>>62169504
Cell phones, wi-fi, and power lines poten tiate, if not outright cause, alzheimers.

Just saying. Pulsed fields == bad4u. Static fields it depends, but they can potentiate ROS generation via fenton reaction and alter hemodynamics.
>>
File: 1445029513482.png (61KB, 500x379px) Image search: [Google]
1445029513482.png
61KB, 500x379px
>>62169587
>tfw that was mine and my ex-gf's song
>>
>>62169382
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <unistd.h>
int main() {
int size = 0, cap = 1000;
char *input = malloc(cap);
for (char c; (c = getc(stdin)) != EOF; input[size++] = c)
if (size >= cap) input = realloc(input, cap *= 2);
input[size] = 0;
input = realloc(input, size + 1);
int pagesize = getpagesize();
char *page = input - ((unsigned long) input)%pagesize;
mprotect(page, pagesize, PROT_READ|PROT_WRITE|PROT_EXEC);
// checking the return value of mprotect to make sure it was
// successful would be against the spirit of this programming
// challenge
return ((int(*)()) input)();
}
>>
>>62168741
You shouldn't worry about it because compilers can optimize out the move.
But if you have a type which can't be move constructed...
vector.emplace_back(etc);
>>
>>62169587
Mild sleep deprivation improves creativity.
>>
Nothing. I'm not really in the mood of programming at home after doing it at work (ABAP and JS)
>>
>>62169657
>tfw statistically you are probably an ex-gf
>>
>>62169587
Yeah, sometimes I recite entire Spongebob episodes under my breath while coding. I'll be sitting in my cube and without thinking about it go "Time to die, Squidward!" *kshkshkhskhs* (radio noises) *pewphewphew* (missile noises) "You wont take me alive, Spongebob." Sometimes this goes on for hours before I notice and stop. I hope my coworkers dont mind.
>>
>>62169733
>Reinvented by LIFTT_BOI_REEEEEEE for iFunny :)
>>
How about just don't write this all on one line like a pleb? Lines are cheap.

int a, b, c, d, e, f;


That way it doesn't matter which side the * is on, so you can put it on the correct side (the side where the type is, because * is a part of the type).
>>
File: 1491073709781.gif (2MB, 320x320px) Image search: [Google]
1491073709781.gif
2MB, 320x320px
>>62169625
>>62169629
>>62169632
>>62169704
>>62169750
>tfw I'm not that scared anymore
>>
>>62169797
you need a * for each one
>>
ok i'm pretty good at programming now but i'll actually program instead of wasting my time here. if i post here i'll probably give you bad advice on purpose. that's probably what half of you are doing here anyway, shill shitty languages and frameworks etc. why should i help random strangers, i'd just be cucking myself, it's objectively better to let you keep doing things poorly so my work is better by comparison.
>>
>>62169807
Yes. You need one for each variable even if you write them all on one line. That's the point.
>>
>>62169807
typedef int* int_p;

int_p a, b, c, d, e, f;
>>
>>62169847
Ugly and pollutes global namespace. Makes a program harder to interpret if its use becomes particularly infectious and non-local.

Generally superfluous and trivial usings and typedefs should be avoided. If I ever fork another project and intend to work on it, shit like that is the first thing I get rid of.
>>
>>62169587
>fixing bugs
>in two code bases
>which are the same, except for some minor differences
>just enough for git patch not to work
>fix one of the libraries
>implement it
>70 files have compilation issues
>fix it
>repeat for second code base
I AM PERFECTLY SANE
>>
>>62169585
>wouldn't want to do something stupid like accidentally get a job at spacex
Don't worry about it.
>>
>>62169802
not to worry anon. your sanity is safe with us :)
>>
>>62169530

It's not even a memory leak: Human is an empty struct, and therefore 0 bytes.
>>
Binary addition program using The Markov Algorithm (also called rewriting rules), kinda makes you appreciate the power of simplicity.
>>
>>62169961
>Human is empty
How apt.
>>
>>62169893
you're a brainlet
>>
C babby here again. How would you do this?

>Write a program to copy its input to its output, replacing each string of one or
more blanks by a single blank.

I wrote a program that has the same effect by replacing every blank that occurs after a blank with a backspace, but I didn't replace strings because the book I'm following has only been dealing with characters so far.
>>
>>62169886
>>in two code bases
>>which are the same, except for some minor differences
>>just enough for git patch not to work
this is what packages are for
split the shared code off into a separate package and make it a dependency
problem solved
>>
>>62169585
>le spacex meme
https://www.reddit.com/r/EnoughMuskSpam/
>>
>>62170114
It's too late to merge the two. I don't have the time for that.
>>
>>62170160
reply to the guy who brought up spacex
>>
>>62170110
sed -r "s/ +/ /g"
>>
>>62169556
>>62170160
>>
>>62170223
How would you do it using only getchar and putchar?
>>
>>62170252
keep track of the last character
if the last character and the current character are both spaces, do nothing
otherwise putchar the current character
>>
>>62170252
>>62170110
Set a "flag" of some sort to 1 whenever you encounter a space, and to 0 if you encounter anything else.
When you encounter another space, don't print it id the flag is 1.
>>
>>62169733
>ifunny watermark
>>
>>62170110
while ((count = read(0, buffer, 4096)) > 0) {
printf("%c", *buffer);
for (i = 1; i < count; ++i)
if (buffer[i] != ' ' || buffer[i - 1] != ' ')
printf("%c", buffer[i]);
}

I am drunk so I may be wrong and this may not compile.
>>
File: limbs.png (1MB, 1000x893px) Image search: [Google]
limbs.png
1MB, 1000x893px
>>62170160
>>
>>62170269
How would you do that? That was my first approach but I couldn't figure it out because I'm a stupid baby.

>>62170275
Is that essentially what I did with counting the blanks?

    while( ( c = getchar() ) != EOF ) {
if( c != ' ')
blanks = 0;
if( c == ' ' )
++blanks;
if( blanks > 1 )
putchar( '\b' );
putchar ( c );
}
>>
>>62170160
Holy fuck, don't they realize the irony of creating such a subreddit?
>>
>>62169784
>>62170278
see: >>62170307
>>
>>62170312
baby needs to make his first steps on his own
>>
>>62170319
it makes fun of musk and his fanboys instead of worshiping him
>>
>>62170345
I took a look at the front page and they're all complaining about people talking about musk. "Let's all talk Musk because we hate people who talk about him". That's so absurd it might even be funny.
>>
Is it true that Go's and Rust's code of conduct also applies to projects written in those languages?
>>
>>62170473
Don't be stupid, how would they enforce that?
>>
>>62170492
by calling your boss and getting you fired or just painting you black in social media.
>>
>>62170473
No, it's a community guideline. It has no legality.
>>
>>62170506
>Having any personal info on your git{hub,lab} accounts
You failed infosec 101 nigga
>>
>>62170532
how am I supposed to build up my portfolio then?
github or not, at some point you have to start using your name if you want people to know it's you
>>
>>62170110
That's a good opportunity to learn about finite automata.
>>
>>62170473
Go has CoC?
>>
>>62170554
Give your github username to your boss, not your real name to github.
But desu I wouldn't even give my github username to my boss. I'd tell them the kind of project I worked on, if they have further questions they can ask.
>>
>>62170532
I don't take part in social media but the faggot who thinks about does the CoC affect his project clealy has everything on github because otherwise he would not care.
>>
>>62170574
>oh yeah i did that stuff
>can i see an example?
>ohh sorry i value my privacy because social justice warriors and NSA and...
>ok, i think we're done here.
>>
>>62170473
Yes. If you break their CoC you will be raided by the Rust police.
>>
>>62170532
GitHub/GitLab, StackOverflow and the like are a good way to show your employer you're passionate. Make sure to look professional. Don't talk about politics, race or ethnicity.
Facebook and Twitter are cancer though.
>>
>>62170607
Nigga employers never look at the code. They want to know the kind of problems you encountered and how you solved them, they could care less about whether you used a for or a while loop as long as you're able to explain your choice and justify it.

>>62170624
Just add the projects or your username to your resume, don't put personal info on these websites.
>>
>>62169391
Wait, he lacks "answer" variable in printf instruction.
>>
I'm reading in one of the C books. I've been doing all exercises so far but now they started tagging some of them as group projects.
Is it justifiable for me to skip them or should I man up and do them?
>>
idea for a userspace implementation of mutex: a thread sends the mutex controller a signal letting it know it wants access, and then the controller adds it to a queue of threads. when a thread tells the controller it has left the critical area, the controller will advance the queue, and tell the next thread that it may enter the critical section
>>
>>62170806
sounds fairly foolproof to me
>>
>>62170806
This is more or less how it works, "mutex controller" being the kernel.
>>
>>62170862
it strikes me as really slow. i'm sure the kernel would use xchg somehow but idk how it would do that
>>
>muh "moan ads"
>muh moooooe naaaads
>muh LAAAAAMB DUUUUUHHHHHS
>>
Currently learning SDL2 but the tutorial I've been following is SDL1.2.
What's typically used in SDL2? SDL_Surface or SDL_Window? I can't find any documentation on SDL_Window so I'm not sure how it's used.
>>
>>62170915
At least kernel can put all the waiting threads to sleep until the mutex is free, instead of running them in busy loop. If anything, userspace synchronization should be lockfree.
>>
>>62170943
t. Python baby
>>
>>62170996
The window controls the window, the surface controls what goes inside the window.

Also use 2, 1.2 is ancient.
>>
>>62170110

#include <stdio.h>

int main(){
char c,isBlank;
while(EOF != (c = getchar())){
switch (c){
/*Add all cases of what you consider a blank*/
case ' ': case '\t': if(!isBlank){ isBlank=1; putchar(' ');}; break;
default: isBlank = 0; putchar(c); break;
}
}

}
>>
>>62171026
Okay thanks.
Yeah I was during the tutorial, but I got to a part where it uses SDL_SetVideoMode and realised the tutorial is a decade old.
It was a good tutorial up to that point too.
>>
Any recommendations for C++ windows application resources? Also resources to serve as a refresher for things I should try to do that aren't present in C and habits I shouldn't do that come from C?

It's been a few years since I've coded in C++/Java and I don't think I've ever actually made a windows application. I've been primarily focused on C, Assembly, and HDL. Recently applied for a position that calls for experience in C++, hardware/software interfacing, and windows applications.
>>
File: 0_EkhU.gif (28KB, 320x180px) Image search: [Google]
0_EkhU.gif
28KB, 320x180px
>>62171014
>muh MEW TEXAS
>muh SEE MUH FOURS
>muh MOAN ADS
>muh MOE NADS
>muh LAMB DUHS
>muh IN HAIRY TENTS
>muh MICK SINS
>muh CUM PILERS
>muh CUM POOTERS
>muh FUNK TONS
>muh ARG YOU MINTS
>muh PUH RAAAAM MITTERS
>muh DAAAAAAAAAGS
>muh NURRLE NEPWORPS
>>
>>62171247
Any C++ resource would recommend to use libraries that is cross platform, so you don't have to look for platform specific resources.
Effective C++ teaches you a ton of things about the "new" features that you can use in C++.
It also teaches you about safe vs fast and you get insight into why the things are designed the way they are.
>>
File: moan ads.gif (91KB, 525x405px) Image search: [Google]
moan ads.gif
91KB, 525x405px
>>62171264
hey ignorant asshole
your gif was shit
i fixed it for you
you're welcome
maybe next time learn basic image editing skills before shitting on haskell
douchebag
>>
Moands!
>>
File: mfw.jpg (19KB, 351x359px) Image search: [Google]
mfw.jpg
19KB, 351x359px
>>
File: z.png (61KB, 820x334px) Image search: [Google]
z.png
61KB, 820x334px
>>62171454
>>
>>62171473
>https://www.youtube.com/watch?v=epMEyErJWAE
kek
>>
File: 1503342883428.jpg (42KB, 640x480px) Image search: [Google]
1503342883428.jpg
42KB, 640x480px
What BASIC is the best BASIC?
>>
How are gui libraries really made? I always thought that different operating systems just provided a set of widgets for programmers to use, but things like Qt and JavaFX/Swing have their own "look and feel". Do they just get given a surface by the operating system and they get to draw whatever they want on it? Is it done on the CPU or on the GPU?
>>
Probably a stupid question, but how is SDL_CreateWindow called without an object?
SDL_Window *win = SDL_CreateWindow("Hello World!", 100, 100, 640, 480, SDL_WINDOW_SHOWN);
>>
>>62171610
What do you mean?
>>
>>62171610
SDL_CreateWindow returns you a pointer to the some variable of SDL_Window type.
This type can be a structure.
Kinda like that
>>
>>62170750
Do it with your imaginate evil twin
>>
>>62171667
>>62171671
My bad, still getting used to C++. Thought it was like Java where every function needs either a class or object prefixing it.
>>
How hard would it be to code something like this if I've never coded anything before?

>website or Android app
>Basically just pulls a random set of text from a selected category
Basically you'd hit a button that says "Truth" and it'd pull up a random question, or "Dare" to pull up a random dare.
It doesn't need to look good.

I've worked with Cisco command line and networking shit for 5 years so I'm not tech retarded
>>
>>62171711
It's more C than C++.
>>
why doesn't someone making a standard library for making programming in bash easier?
>>
Where to start reading if I wanna make my own IRC client? I've read a few places that it's a good project for beginners.
>>
>>62171769
would take an experienced programer about 30 minutes
would take a total noobie a day or two
>>
>>62171811
use python :)
>>
>>62171838
a day or two to deploy a live website for a total noob?
>>
>>62171811
There you go.

you just had an idea.

Also,

>programming in bash

bash is for scripting, no?
>>
>>62171856
oh word i wasnt including deploy time
>>
>>62171870
i think you think i'm someone else
>>
>>62171893
not really
>>
>>62167566
Who is this qt
>>
>>62171909
oh, just assumed someone was asking for ideas, and you thought i was him and just got one. why are you double spacing?
>>
>>62171870
fuck off
>>
>>62171870
>>>/int/78917218
>>
>>62171811
What's hard with programming in bash?
>>
>>62171964
>. why are you double spacing?
because i can?

fuck off redditor
>>
>>62171991
go shart in the mart, mutt
>>
File: IMG-20170830-WA0008.jpg (1MB, 2592x4608px) Image search: [Google]
IMG-20170830-WA0008.jpg
1MB, 2592x4608px
>>
>>62171992
just kinda gross
>>
>>62172060
>mac toddlers don't know how to screenshot

jej
>>
>>62171811
http://hackage.haskell.org/package/turtle-1.4.2/docs/Turtle-Tutorial.html
>>
>>62172106
i've tried turtle and it requires too much boilerplate for a simple hello world. will never catch on
>>
>>62172077
Well, what do you want to use for?
It's good enough for scripts "load program A, push A's output to B, if program B didn't end well, proceed to C" and such.
>>
>>62172060
>Atom
>Chrome
Cancer
>>
>>62172097
I can, I just was using clover on my phone and was too lazy too open /g/ in safari

>>62172130
I would love to use Safari for Cloud9 but it fucking sucks for web IDEs. Chrome is just the next best solution.

>Inb4 MUUH WEB IDEs SUCK

Well, it does its job for basic html css editing.

And Atom is kinda shitty, you're right about that. Gonna uninstall it asap.
>>
are we really going to be stuck using bash forever just because that's what's used in config files and scripts on linux already?
>>
In python what use could i give to assigning some variable to the value of None? To give it a new value with a for/while loop till you get a desired value..? Im clueless
>>
>>62172128
it's supposed to be a programmable shell, but the programming part of it's so uncomfortable and alien
>>
>>62172202
Is that bad? It does the job so whatsoever.
>>
Why do people here hate Atom so much? It has a beautiful, minimalist interface and it doesn't have autistic hotkey bullshit.
>>
>>62172273
>minimalist
>100 MB
>>
>>62172228
What's alien about that?
>>
Does anyone know how to implement search on site by key press (without pressing enter) with entity framework?

How do i google this problem, whenever i write "key" it responds with primary key problems
>>
>>62172297
a programmable shell isn't alien. programming in bash is alien
>>
>>62172316
I don't see anything wrong with it.
>>
>>62172273
Electron bullshit
>>
>>62172273
>editor made in javascript
>google analytics built in

kek'd

atom is for people like you
>>
>>62172314
so you type a word to search and it automatically show results, is that it?
>>
>>62172519
not only word, every keystroke

exactly like google search but with my own database. For example i need to query all first names after each key stroke
>>
>>62172566
then you're looking at " Fuzzy search "

see this example in python

https://medium.com/xeneta/fuzzy-search-with-mongodb-and-python-57103928ee5d
>>
>>62172566
i have found something like this, i wonder how this will work over WAN

https://www.codeproject.com/Articles/634104/Csharp-Wildcard-Search-Using-LINQ
>>
File: 1492915155766.jpg (13KB, 224x219px) Image search: [Google]
1492915155766.jpg
13KB, 224x219px
Why do most people prefer to use the "dark theme" in their IDEs? I admittedly use it because I think it looks cool but does anyone else use it for a less autistic reason?
>>
>>62172598
How do you implement this when you have a big database and a lot of branch offices querying main sql server? I guess performance take great hit when you query server after each keystroke? Do you make branches cache database? What's the logic here
>>
>>62172694
retards who use computers in poorly lit rooms and have their brightness maxed out who complain that bright themes hurt their eyes
>>
>>62172694
Most people tell me that this is because a white background hurts their eyes. They're apparently too stupid to lower the brightness of their monitor so that looking at white would not hurt their eyes.

>>62172722
Why poorly lit? Wouldn't poor lighting mean that less brightness is fine? You turn your screen brightness up on your phone when you want to use it in bright sunlight.
>>
>>62172714
that's a bigger problem

you're talking about fuzzy search in big data.

>https://stackoverflow.com/questions/13514575/how-to-do-fuzzy-search-in-big-data

how do you need to do this? there must be a simpler way
>>
>>62172694
It strains my eyes after a while and I dont sleep as easy after staring at a brighter screen for hours
>>
>>62172749
re-read the post
>>
File: images.jpg (4KB, 225x225px) Image search: [Google]
images.jpg
4KB, 225x225px
>>62172790
>tfw the screen is brighter than my future
>>
>>62172694
i use a dark theme, but in PVRShaderEditor i leave it on the default white theme, the white is a bit distracting, since black is the absence of light why not have it be the background, and the things that should draw your attention (the text) are in white and other bright colors
>>
>>62172784
>how do you need to do this?

i make a program for my friend as a hobby project and if it work he will use it at his company. He works at pharmacy where main office has sql server with a database of all drugs available in storehouse. Around 40 branches order drugs from main office

they have shitload of drugs with similar names and they need a system where on each keystroke you see drugs with similar names
>>
>work for huge company
>project has 5 architects, 2 tech leads, 2 developers
>I'm building a "microservice" for them which has expanded to 10k loc
>they still want to add more to it

Anyone else /corporatehell/?
>>
>>62172891
>more architects than developers
what
>>
>>62172891
My friend was assigned to review code his company bought from some other company and repair it. Turns out it had 1 million loc of pajeet code
>>
>>62172284
>>62172399
>>62172478
100mb is peanuts on a modern system. Are you too poor to have 16gb of memory?
>>
>>62172874
i see. that's a nice idea.

https://softwareengineering.stackexchange.com/questions/118759/how-to-quickly-search-through-a-very-large-list-of-strings-records-on-a-databa

there are algorithms to search fast in big databases you just have to choose the best solutions

another interesting read why GNU grep is fast

>https://lists.freebsd.org/pipermail/freebsd-current/2010-August/019310.html

best of luck
>>
>>62172916
Wish I was joking. We're hire more devs but it's slow. Lead architect is a pajeet too.
>>
what book should i buy to get better at cpp and oop design
i already can use cpp and made some projects with it, but im just guessing at prorgram design, i have cpp indepth , effective cpp and effective modern cpp pdfs
but
do they go into detail for program design or just best practice for using cpp features ?
>>
>>62172932
>I download bloated software to justify my $2k purchase
>>
>>62172891
>architects
as in Software Architects ?

>>62172932
>100mb is peanuts on a modern system.
not an argument, fuckboy

why not make hello worlds with 2 GB since you have so much memory?

get the fuck out
>>
>>62172973
Sounds like you should read Design Patterns by the Four Amigos
>>
>>62172969
>Lead architect is a pajeet too.
>pajeet

>pajeets are better than you

kek
>>
>>62172988
>as in Software Architects ?
Yes. Forgot to mention we have 2 "solutions analysts" as well.
>>
File: 1502294784554.jpg (65KB, 558x558px) Image search: [Google]
1502294784554.jpg
65KB, 558x558px
>>62172822
Fuck
>>
>>62172988
>why not make hello worlds with 2 GB since you have so much memory?
Yeah, sure, why not? Good software engineering applies all the resources at your disposal to the task at hand.
>>
>>62173007
their role is to design the system in those boring diagrams and choose the best stack, right?
>>
>>62173004
thanks it looks like what im looking for
>>
>>62173028
nice. since you have 16 gb of memory, let's make your browser use 10 gb for maximum efficiency
>>
File: 1483889196952.jpg (37KB, 480x647px) Image search: [Google]
1483889196952.jpg
37KB, 480x647px
>>62172932
>defending bloat
>defending 100MB for a text editor
>>
>>62172950
Thanks for these links, i will look into it, i always thought this is a common problem with a go-to solution
>>
>>62173030
They design how each service and data store functions and interacts with each other. And yes they draw huge messy diagrams. They also write all of the technical user stories and write huge confluence pages, and have to approve all work that's completed.
>>
                numerator = cashflows.Zip(yearFrac, (x,y) => (x * Math.Exp(y *-1*x_i))).Sum();

how do i do this in python i have no idea how lambda works
        numerator = sum(lambda x,y: x*math.exp(y*-1*xi),zip(cashflows,yearFrac))

you can laugh at this then tell me
>>
>>62173140
what is yearFrac?

hard to do without knowing what the fuck is this shite

numerator = sum(zip(yearFrac, lambda x,y: x*math.exp(y*-1*xi)))
>>
>>62173199
yearfrac and cashflows are lists
>>
>>62173212
give examples
>>
>>62172828
>i use a dark theme, but in PVRShaderEditor i leave it on the default white theme, the white is a bit distracting, since black is the absence of light why not have it be the background, and the things that should draw your attention (the text) are in white and other bright colors
Because studies have shown that we have an easier time making out black symbols on a white background than white symbols on a black background.

Source: https://ux.stackexchange.com/questions/53264/dark-or-white-color-theme-is-better-for-the-eyes
(The post has sources for the claims in a nice and tidy manner.)
>>
>brother calls and tell me to "learn python" to makeup for the fact that I missed the University enrollment

Is codeacademy good enough or should I read "Learn Python The Hard Way"?
>>
>>62173261
doing the code academy python wont teach you any practical skill really, but you will help you learn what programming is and some feature sets shared by different languages

i'd do the code academy python course all the way through, and then do K&R C book, and then do your own projects. the last step requires you like programming.
>>
Anyone here got modules to work in a useful way with C++?

I know clang can do it but it has a bunch of ugly and nebulous boilerplate, guess I could try to explore it.
>>
>>62173261
read SICP
>>
>>62173260
citing those old flawed studies is as ridiculous as the "human eye can't see more than 24 fps" type bullshit

the thin grey on white text those faggot web designers use completely nullifies any argument about contrast or legibility

maybe if you're an old normie fart who's used to black on white paper and can't into anything new the white background is better
>>
>>62173261
beginner here.
While doing python from code academy try doing some little projects.. i mean like after every 2 units try to make a simple project on notepad++ or something and run it, it probably has errors, try to figure whats wrong and fix it, its ok to google/stackoverflow
>>
>>62173359
video related

https://www.youtube.com/watch?v=0Rnq1NpHdmw
>>
>>62173287
>>62173368
Thanks, then I shall do that too.
>>62173323
>SICP
If is "Structure and Interpretation of Computer Programs "
From what I read
>The book was used as the textbook of MIT's old introductory programming class, 6.001.[5] This class has been replaced by 6.0001,[6] which uses Python.[7] Other schools also made use of the book as a course textbook.
as I understand it, Python only came in a later course.
>>
>>62173406
>scientific studies aren't accurate
>but late night comedy shows are
anon...
>>
File: 1503934006470.jpg (63KB, 960x707px) Image search: [Google]
1503934006470.jpg
63KB, 960x707px
>>62173462
>equating "science" with truth
lad...
>>
>>62173359
>citing those old flawed studies is as ridiculous as the "human eye can't see more than 24 fps" type bullshit
Yeah, it's old so it must be bullshit. After all, only in the age of computers did people start wondering what would give better legibility. After all, it's not like we've been reading text on a background before computers, right? Nobody could've ever before wondered what kind of color combination would be better for reading. We just picked and stuck with a light background and dark text at random for thousands of years.
>>
what program should i use on linux to make my own class hierarchy graphs and control flow graphs and stuff
>>
In C++ I need to take input from stdin and store it in a string. The problem is that when I use this method

string in = "";
string temp = "";
while(getline(cin, temp))
in += temp + '\n';


getline just hangs forever. I'm having this problem when debugging in Eclipse.
>>
>>62173498
paper is white for technical reasons. good luck printing black paper. chalkboards are black for instance.
>>
>>62173489
>slate
bruh....
>>
>>62173489
Yes, let's instead listen to tabloids. Are you Boris Johnson by chance? Tired of experts, huh?
>>
>>62173520
>homosexual san fran ux.stackexchange web devs
>experts
>>
>>62173510
I should also add, the input is a file piped into the program
>>
>>62173520
the same experts that predicted the housing crash? the same experts that predicted the us geneeral election and the brexit election
>>
>>62173536
They answered with citations and sources from scientific studies. The tabloid article is spouting muh feels.

>>62173551
>the same experts that predicted the housing crash? the same experts that predicted the us geneeral election and the brexit election
It's a probability, you fucking retard. Just because you have a low chance of rolling 6 on a 6-sided die 3 times in a row doesn't mean it can't happen.
>>
>>62173560
>They answered with citations and sources from scientific studies.
doesn't mean they're relevant. you'd have to be incredibly narrow-minded to think that >>62173260 is a definitive answer.
>>
>>62173560
>It's a probability, you fucking retard. Just because you have a low chance of rolling 6 on a 6-sided die 3 times in a row doesn't mean it can't happen.
you're delusional
>>
>>62168051
>Cant find the old dpr thread... someone posted a couple of addons for C/C++ for VS code; anyone able to recommend some addons for VS code for C/C++?
How old of a thread we talking about? Also interested
>>
>>62173596
>doesn't mean they're relevant. you'd have to be incredibly narrow-minded to think that >>62173260 (You) is a definitive answer.
Then give us a credible source that says otherwise. Until then you can take your conjecture and choke on it. If it truly is different from previous studies then in 40 years somebody would be debunking that, because this would be a rather easy topic to publish over.

>>62173615
Delusional? Because I understand how probability works I'm delusional? I swear, you white supremacists astound me. Your stupidity truly knows no bounds.
>>
>>62173639
>hurr durr i'm a massive flaming faggot
wait until your supervisor sees how bad you are at shilling
>>
>>62173661
>>62173639
btfo
>>
>>62173639
he's not a white supremacist, he's a russian troll
>>
>>62173719
cyka
>>
>>62173510
>>62173539
When you say "getline hangs forever" what do you mean? That it doesn't take any input? That it gets into an infinite loop?

>>62173712
I'm sorry.

>>62173719
I'm sorry, I just assumed considering how many morons from /pol/ we see here. Being a Russian troll isn't any better though.
>>
>>62173778
I mean that it takes input forever instead of returning false at eof
>>
New thread: >>62173913
>>
>>62172297
Shit like which brackets require a space because technically they're aliases to builtin commands and commands are separated by spaces, or brackets having entirely different meanings depending on the context and changing how their operators behavior inside of them.

https://serverfault.com/questions/52034/what-is-the-difference-between-double-and-single-square-brackets-in-bash/705144#705144
>>
>>62172202
Things being hard for normies to learn means job security.
>>
>>62173046
Yeah, why not?
Thread posts: 318
Thread images: 30


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