/dpt/ - Daily Programming Threa

Old thread Official Discord channel: discord.gg/xcVHA2Y

What are you working on, Sup Forums?

Other urls found in this thread:

github.com/junegunn/seoul256.vim
home.pipeline.com/~hbaker1/ForthStack.html
twitter.com/SFWRedditGifs

First for java

java is literally the best language

Name a better language than java
>protip: you can't

If you want a job, you need to learn Java

mah nigga

>king of jobs
>Sup Forums shits on it
It's like I want to be mad but I'm just too busy drowning in money

this

>not creating your own job with hasklel

>If you want a job and you're stupid, you need to learn Java
ftfy

>salary is lazily evaluated

Currently I am working on implementing algorithms in Java and C.

i worte my irc bot but it's not welcome in teh channel was annoying people.

might start on an irc client or some new project today.

post a screen shot of the last code you wrote

You need to add the package to you'''re build probably.
Not true but fuck. I had to 'learn' java for my first job.
Thank God for Native.loadLibrary though.
Can do all my 'java' in C instead.

>screenshot of the code
i guess sublime is useful for something, picrelated

i really need to get vim configured properly today as with a better colorscheme.

I can't let you steal my code :^)

its a java try block without a catch or finally, something I read in a book which surprisingly works

started programming a few months ago
i think i'm getting there
wrote this without looking at any references

not enough comments. You'll come back to that code in 6 months and not know what you were trying to achieve.

>This stops the program
good chuckle, 7/10

that's a lot of python code

>creating unmaintainable, non portable code

Great way to get fired and ruin the codebase

for you

about 300 lines, not that many.

Great image famalam, good thing you picked a casual's editor.

compare_list = [i for i in txt_file]

Sure, but at least he got to satisfy his autism right?

having a lot of fun with rails

Nah I claimed it was for performance reasons.
And given java it was. Along with the fact that I had to keep everyone else out of the code base to maintain some semblance of code sanity.
>portability
It's perfectly portable C user. They got the source.

Java is just not made to be run and java programmers are just not made to be employed.

what can you do with rails that you can't do in another language?

>you picked a casual's editor
how dare you, i use Vim. i opened sublime just to take the screenshot of the its little preview thing.

How many C programmers are in the company besides you?

besides me? 213.
it's microsoft.

None were on that project. It was a client application where they basically just wanted to do some online (as opposed to offline in the sense of offline rendering) work to save them money while they were using pajeets for the AWT.

Management was happy. Offered me a lot to stay but you have to aim for happiness.

Not sure what happened with that department. Hopefully all lost their jobs.

You're using Java in Microsoft?

github.com/junegunn/seoul256.vim

My girlfriend's learning C# so she can join in with the project I'm working on.

How do I make her leave me alone?

send her tutorials on functional programming with C# and maybe she'll quit

Snake in SFML.

Just pander to her until she realises programming is too hard for her. It will happen sooner than later.

I don't think that will work, she is very persistent.

She asks me to look through her code to help her, and there's comments like
// I love you so much, thank you for helping me

//this kills the developer

>tfw when I'd love a qt gf who wants me to help her learn C#
thanks for making me feel lonely faggot

Tell her you're only into 'useful abstractions' and send her a complete mess of OOP garbage coupled with delegates which you pass around everywhere and overload the assignment operator on (if possible, I don't care for C#).

Seriously just tell her you don't like the idea and hug her hard or dump her.

Why would you keep her if you couldn't even work with her?
You can easily get a fwb in this day and age and you clearly don't care for her at all.

>>I love you
>fuck you
fuck you

Putting the finishing touches and polish on my OS homework. Documentation, test cases, commenting code, etc.

Fuck.
Pack her up and send her to me. I will treat her well I promise.

That's adorable.

>and I just want to punch her in the face
But why?

shit that didnt happen

>all programmers are social outcasts
Is that the idea?
Or is the idea of a girl being nice to you when you help her just unfathomable to you?

...

>Or is the idea of a girl being nice to you when you help her just unfathomable to you?
Pretty much this

>tfw programming slave
>have to help relatives son learn programming to get him a job
>paid less than minimum wage
>spent 4 hours on a Sunday writing a solitaire program and explaining every detail repeatedly
This is killing me.

Is mfilter not good for this?
I guess that doesn't give an error message

>having any hope of using legacy stuff on proprietary platforms
Don't be this foolish.

Are you talking about fns? That's quasiquoting, not a list comprehension

Nvm, I was talking about unless but unless is slightly different anyway

maybe she's at uni and learning C# for a course and pretending she wants to help user so he will spoonfeed her

>he still programs in ALGOL style languages
home.pipeline.com/~hbaker1/ForthStack.html

Not very exciting.

>
{
s;
}

It makes pepper pics.

nice

C# community style is allman. You can hate it, but it's not going anywhere.

...

pretty disgusting desu

it's for test generation desu desu

>allman
>all man
This is why we need feminism

>all man
sounds pretty gay

function check(key){
if(!key || key.length != 32) { return false; }

var i = 0, bytes = [], ts = 0, rnd = 0, chs = 0, xor = 0;

for(i = 0; i < 16; ++i) {
bytes.push(parseInt(key.substr((i*2),2),16));

if(i < 4) {
ts += bytes[i]

How do I take one element out of an array and place it into a new array if it meets certain conditions in c? Right now i have
int function(char array[]){
int res if (game->score1 >= 2 && game->score1 == game->score2 )
res = memcpy(New array, array, strlen(array[1]))
return res;
}
elese{
return 0;
}

But since I dont make the new array in the funtion I am not able to do this, is there anyother way?


}

Java was a mistake :^)

Anything is possible with Trump our lord.

>yoloscript
>safe

i can't wait for the recount

You're just asking for a ban with posts like these

You do realize that the recount is a misdirection to fill the Green party coffers, right? Stein hates Clinton, and I guarantee that the recount vindicates Trump's already-validated win in all three states.

Thanks user. This is the result:
use std::collections::HashMap;
use std::env;

fn main() {
let mut whitelist = HashMap::new();
whitelist.insert("white", vec!["purple", "red", "green", "orange"]);
whitelist.insert("red", vec!["green"]);
whitelist.insert("black", vec!["black", "purple", "red"]);
whitelist.insert("orange", vec!["red", "black"]);
whitelist.insert("green", vec!["orange", "white"]);
whitelist.insert("purple", vec!["black", "red"]);

let args: Vec = env::args().skip(1).collect();

let mut prev_arg_opt: Option = None;
for arg in args {
if let Some(prev_arg) = prev_arg_opt {
if !whitelist[prev_arg.as_str()].contains(& arg.as_str()) {
println!("Boom");
return;
}
}
prev_arg_opt = Some(arg.to_string());
}

println!("Bomb defused");
}

Does Rust(?) not have a way to insert all of those at once?

Just having a bit of fun and demonstrating the image filters, my guy.

Nigger boy, could you do that to the Go mascot? I like to see them weep.

no, of course i don't realize, friendo. i'm just shitposting.

if anything i'm majorly benefiting from trump's presidency -- hello from sibiria, my american friend

>Learned Java at university.
>Started working with COBOL.

I couldn't find that in the docs.

How about this
// i don't know rust tuple syntax
for (k,v) in vec![("white", vec!["purple", "red", "green", "orange"]), ..., ... ] {
whitelist.insert(k,v);
}

Like so?

oh and you could move that vec![("white", vec![...]), ("black", vec![...])] outside and just have

for (k,v) in assocs
whitelist.insert(k,v);

You're stupid, and now I discovered that you're a nazi or a nazi simpathiser. Why am I not surprised?

Thnx. It even worked:

kill yourself

>now I discovered that you're a nazi or a nazi simpathiser.

I definitely am not. Just lampooning the idea that everybody liberals hate is a 'white nationalist' or 'neo-nazi'.

Quite obviously not a nazi, considering my love of miscegenation.

I don't really like that idea. It adds more complexity for a simple problem.

Look at your pic moron.

it should be in the library anyway

>>oh just do vec![1,2,3]
>that just adds complexity to a simple problem
>vec.insert(1); vec.insert(2); vec.insert(3);

Is programming compatible with Islam?

>someone posts a swastika on Sup Forums
>doofus liberal figures this is solid proof the poster is a nazi
God help this generation

Is there a such thing as using wildcard operators on function calls, specifically in C#? Say I have 5 functions with similar names, like firstFunc(), secondFunc() thirdFunc(), and so on.

Is there a way to call these like *Func() or %var%Func()? If not C# then which language can do this?

Theres clearly no moral dilemma or conflict of interest in having the Hillary campaign participate in the recount, or targeting states only won by Trump. Absolutely none.

>>>/reddit/
>>>/tumblr/