/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?
Previous thread:

Attached: dpt.png (400x400, 141K)

...

>tfw fell for the CS meme
>tfw just got my Winter quarter grades back
>tfw 1.6 GPA
should i just kill myself?

Attached: 2bc.jpg (399x388, 9K)

But CS 1.6 is the best

CS isn't a meme. You just weren't smart enough to make the cut. Sorry user

dumb frogposter

Proof

>1.6
Yeah, probably

Eighth for semigroups with two-sided identity in [Hask, Hask].

stick it out bro no one cares about your GPA after graduation

it's not a meme, you just happened to do bad

lmao how fucking stupid does one have to be to fuck up elementary computer science?
it's for loops and selection sort bro. this is NOTHING

nani kore?

Attached: 1477079857756.png (700x700, 362K)

>in a major for retards
>still fails

Welcome to IT

Attached: CS' proud retard.png (1041x148, 17K)

>tfw got an offer for a software engineering job
It took me 3 months after graduating but I finally got it.

Attached: 1384935897095.png (785x584, 564K)

Same. However I'm making garbage money. Not even. Less than one would make in retail. Also I'm writing simple scripts and refactoring back-end code. I feel useless. At least I "got my foot in the door".

>tfw already had 3 offers with a salary three times as much as an average junior dev
>hasn't even graduated yet

Attached: IMG_20171116_210838.jpg (713x950, 148K)

Who is this titty monster

I have a question regarding vocabulary of sql-like queries.
How do you call the parts after the select, from and the where ?
>select [fields??] from [no-idea] where [clauses?]

Attached: IMG_20171009_170658.jpg (566x800, 62K)

Moan ads.

a virgin who likes coq

select fields from table where filters?

How do I get companies to want to hire me.

if you're not being overworked, try to see if you can get a better deal somewhere else

this is now a Megumin thread

Attached: 1519524315693.jpg (1786x2282, 1.89M)

>be junior software engineer for international company
>have to consult directly with clients to work out their needs
>one of the clients ends up being a guy I matched with on grindr
>end up sucking his dick
>finish his project
>lose my job a week later for professional behaviour
>no proper explination given
What's worse is big companies talk and I don't know what I'm meant to say when they ask why I was let go, I have no reference and they will contact my last employer to ask about me.

that's an ugly boy

>this is the power of programming socks

Attached: IMG_20170804_194424.jpg (800x550, 85K)

>grindr
oh the memes

Kek

Yo /dpt/
What's my best bet for a C++ library for drawing 2d stuff to a screen with ok performance (rules out SFML)?
I don't really want to have to set up an entire OpenGL boilerplate for a simple 2d game, especially when what i want to achieve is perfectly possible with fixed-function stuff.
Am i best off just using SDL2?

Attached: technomate.png (500x387, 85K)

Seems like discrimination to me m8
Call a lawyer and sue for wrongful termination

You could probably put "Inadvertently dated customer" or some shit

>Yo
stopped reading right there

How much math do you really need to know to get a simple code monkey job? If yes, what kind of math?

>it's okay to be sexually involved with clients
yeah that's definitely a-okay you braindead faggot.

use a free gameengine and stop worrying about such trivial things

+-/*

Use SDL 1.2.15 so it can be easily ported to homebrew for consoles.

Is this a joke response?

Attached: 343434.png (511x365, 377K)

& | ^ ~

*sighs*

That's actually a really good idea.

This but without the bullying.

Really though what an asshole, I sent him a slew of hateful messages and he won't even reply. Total piece of shit.

Attached: 1514554944188.gif (540x603, 188K)

Why is CS filled with so many faggots?

you a thot

What does CS stand for?

>and or xor neg
Y-you too.

lel

Cum Swapping. Why do you think there's so many faggots?

Algebra 1, 2, linear Algebra
Calculus 1
Discrete Math
Probability & Statistics
etc

Is this a bug with g++ or it's the effect of optimization?
void foo(unsigned char);
void bar(char);

int main(){
bar(0xff); //This value will overflow the signed char, but not unsigned char
return 0;
}

void bar(char foobar){
foo(foobar);
}

This code compiles without any warning even with -Wall.

I've only ever sucked two guys and I got on grindr because of /lgbt/ telling me it's the only way I'll find love.

Because we are smart.

Attached: 151726901189894.jpg (506x543, 126K)

>relying on char's signedness
don't do that, it's implementation defined

>Because we are smart.
>sucks a dick
>loses job
Kek

Not smart enough to not suck off a client clearly

so all integer type but char have a well defined signedness, and char is the only one with implementation defined signedness?
Why?

char, signed char and unsigned char are all distinct types. char itself may be signed or unsigned, and has additional rules wrt aliasing.

Manually type out signed char

Well I have learned from the mistake and I won't do it again.

Attached: 189651658941.gif (500x200, 857K)

I hope you realize the mistake was being a cum guzzling faggot.

get together with the client and live happily ever after

You are wrong.

He won't talk to me and he's obviously an asshole for reporting me.

I have no idea what you're trying to ask here.

damn

The engine would provide a lot of overhead and performance actually matters. If it wasn't a rhythm game then i would be using godot or something.
a BMS player wouldn't exactly be comfortable to play on consoles unless you can hook up a beatmania IIDX controller to it.

Ehh.. Does Java really lack decimal and unsigned integer types?

Java definitely has doubles, and unsigned types are bad anyway not just in Java so that's a good thing they're missing.

>performance actually matters
nigger, unless you're making the new assassin's creed game, you will be fine with any engine out there

Java has float and double. It also has a BigDecimal class.
Java does not have unsigned integer types."It's simpler that way".

why does stack overflow close all the good questions with some shit motivation like "too broad" or "not a good format"

Attached: 1521413401533.jpg (384x381, 150K)

they're not good questions then

>be SO gold badger
>link to docs and copy paste one liners
>???
>PROFIT

Attached: SOLOLOLOL.png (760x313, 23K)

Okay, I'm thinking of what languages to focus on to maximize my employability in the market. I'm currently a Physics PHD student and I'll probably graduate next year or so. I've messed around with a lot of stuff including Rust, Fortran, a bunch of lisps and Smalltalk. But I feel like I should focus on using just a few languages and learning their library ecosystems properly.

The four languages that I'm planning to go deeper into (and that I've already worked with a bit) would be Python, C++, Julia, and Haskell.

Python and C++ are mainstream and used by a lot of physicists and are useful because of network effect. Also there are a few libraries in those languages that I'll need in the near term for my research. They also happen to synergize reasonably well, and I've looked into ML with those languages a bit.

Haskell is there mostly to show that I'm not just another pajeet, and because physicists/mathematicians who really got into CS tend to love it.

Julia for whenever I don't want to touch C++ or Python. Also, my strong point is having experience writing high-performance numerical code and with scientific libraries in general. Showing that I know it helps me capitalize on that.

Also planning to learn machine learning formally this summer, by following Andrew Ng's course (the one in an actual class that's actually math-heavy, not the coursera one) and then diving into papers. I've poked a bit at it and the basic math seems really easy.

I don't want to get into Javascript or any webshit frontend atm. My graphical design skills are shit and I don't have a unique advantage for that niche so I'd handicap myself if I tried to focus on it. For simple personal stuff I can just stick to Elm + Yesod that I already know.

The niche that I should probably be going for with my skillset would be machine learning in production environments, not just prototyping, since I have C++ and HPC experience. Unlike the Python niche, that niche isn't too crowded but has lots of demand.

>focus on to maximize my employability
>Rust, Fortran, a bunch of lisps and Smalltalk
laff

how many years will it take until below-average code monkeys like me can use ML in their shit?
math is not my thing, and it seems to me like ML programs today are highly specialized and have to redone from scratch if you want it to solve some other but similiar problem

C's get degrees
Increase it by 0.4 and you should be good.

At least now you have a better idea of how much studying you need for your classes

>What are you working on, Sup Forums?
I found this really cool API on sjwhub for creating storage-applications using NVME SSDs, which I'm playing around with. Compared to SPDK, it's pretty small and probably not so rich in features, but it serves my needs and is a lot easier to set up and configure (it basically worked OOTB on Ubuntu). I have a CUDA application that I've been working on for some time and I've struggled with disk IO being a bottleneck.

Apparently, if I understand the technical jargon being used, it is also possible to somehow write data directly into GPU memory rather than going through system memory or something like that, which would be extremely awesome. But sadly it says in the README that you need a Quadro or Tesla for this, which I don't have. Maybe someone here has any experience with the difference in Quadros and GeForces and could explain to me if something like that could be possible to do with a GeForce?

the whole "now that youve fucked it up real bad you know not to fuck it up" logic doesn't work with these kinds of things becaues people tend to need to change a fundimental attitude in order to increase their willpower this way and a low number never gives enough of a push.

Can Sup Forums guess what does this little program print to the terminal?

module myModule
implicit none
contains

subroutine doSomething(i)
implicit none
integer, intent(inout) :: i
integer :: currentCount = 0
currentCount = currentCount + 1
i = currentCount
end subroutine
end module

program test
use myModule
implicit none

integer :: testInt1
testInt1 = 10

print '(''count is now:'',(i2))', testInt1

call doSomething(testInt1)
print '(''count is now:'',(i2))', testInt1

call doSomething(testInt1)
print '(''count is now:'',(i2))', testInt1
end program

this
t. dropout turned web code monkey

my life

10, 1, 1

If you had worked on your dick sucking skills, he wouldn't have had reported you.

Tbh it really doesn't get much harder than that in industry lol.

Nice guess, that's what I thought too. However this is the output:
$ f95 -o test test.f95
./test
count is now:10
count is now: 1
count is now: 2
$

I don't know where you are but, you should be thanking them SJWs, nowadays in this hypersensitive world references don't go further than.

"We can confirm X worked here from until held position of and was paid "

because companies don't want to be liable for giving a good or a bad reference because you can sue if you can prove that they are refusing to hire you based on some shit like being a colossal faggot.

go away gramps

rude

Works perfectly fine for personal projects when you know you won't be looking for a job in the next few years. You can focus on learning.

discrete math, calc III, linear algebra, probability and statistics (using linear algebra and calc), some approximation theory/numerical analysis is probably the max you'll need
it varies from job to job though

Brainlet here. What is the simplest example of a lambda expression in Java you can provide?

yeah you won't do it again because you won't find work again lmao

() => 1

Might be true :/

I guess that's good. Fair enough too because one mistake shouldn't destroy your whole career

>tfw finally understand the reader monad
>tfw finally understand lenses
>tfw finally understand monad transformers

Is this what it feels like to ascend from brainlet status?

Attached: images?q=tbn:ANd9GcQbTA802bkdTj_8ORn33lutbr2vGSyJhBlBZ4B7j7mpgVuVadwsOA.jpg (217x232, 5K)

I really enjoy C#. Wish C was like this.

How can I decide if some equations n1 = a * 2 + 3, n2 = b * a * 1, ...
hold for some assignment of the n's?
just some keywords to search for would help me already
I have one equation per n and the right hand side consists of multiplications, additions, variables that are not n, and literals. Also I don't care what the values the variables have, I just want to know if the assignment is possible under the given equations

join us on the crusade against shitty programming languages

Attached: haskalman transparent.png (1920x1080, 1.24M)

You're looking for mathematical proofs.

Solving non-linear systems of equations.

Thread t1 = new Thread(()->{
System.out.println("hello world");
});
and for a not-so-simple example,
String[] x = {"f","o","o","bar"};
//c_x is a char array of all strings in the array that are only one character
char[] c_x = Arrays.toString(Arrays.stream(x).filter(s->s.length()==1).toArray(String[]::new)).toCharArray();


there are times where lambda functions and streams like these just look nicer since they're only one line, but aren't resource efficient (this is an example of exactly that)

also that :: just simplifies an expression
i could've wrote this instead
[...].toArray(size->new String[size]).[...]

as toArray just turns the stream to an array of objects with whatever type you specified, so long as it's non primitive (if you did size->new char[size] it wouldn't work since char is primitive)