/dpt/ - Dziennego Programowania Thread

Na czym pracujesz, Sup Forums?

Stary thread:

English motherfucker, do you speak it?

Motherfucker english, speak it do you?

Thanks for proving that translation engines are still complete garbage. Both the title and the sentence are grammatically wrong.

First for Java

Où est la bibliothèque?

how do hashmaps work in java? i thought i'd just be able to do
LinkedList RemoveDups(LinkedList input){
HashMap occurrence = new HashMap();
...
}

but it's telling me the hash map requires two type parameters, which the documentation says is one for the key and one for the value. what does this mean? the value would be if i'm not wrong, but what would the key be?

potato

T would be your key. Your value could be anything, you don't really need to care -- all you care about in your case is whether it's in the map or not. So you can use the smallest possible available type (maybe char or boolean or somesuch.)

it depends. a hashmap is used to map a value to a key.

/dpt/-chan, daisuki~

Ask your much beloved programming literate anything (r/IAMA).

How do I get my programming teacher to suck my dick?

Why didn't you reply to anybody?

have you done anything productive, Sup Forums?

post progress

Can I set a function pointer as 0 in C?
If so, will it reset my computer?

anime is garbage

Thanks. I hope Google will give me job in American that is good enough to support my village by this

Write a correct version that involves three words with initial D, P and T.

Is anyone doing Advent of Code 2016?

pic

There's no reason why a function pointer couldn't be NULL (as a matter of fact, if you declare a global array of function pointers, all its elements should be initialized to NULL automatically if not initialized explicitly).

Advent of Code IS SHIT

STOP SPAMMING

I can see why C# exists after using C++/MFC, but C# doesn't have any dank themes by default.

what do?

...

Dzienny Programerski Topik

I forgot to add.
Set to 0 (NULL and 0 aren't the same, are they?) and then call this function.
Is it possible?

...

Programerski?
But English name is Daily Programming Thread, not Daily Programmers' Thread.

you are guaranteed to end up with a nullpointer if you cast the number 0 to a pointer-type. But the nullpointer is not guaranteed to be all zero bits (so e.g. if you initialize a pointer with calloc(), memset() or whatever to zero, you are not guaranteed to end up with a nullpointer.)

If you call a nullpointer, your program will simply segfault.

Daily Programming Thread

...

nepracujem nič :/

yes but most OSs set the (virtual) memory region from 0x0 to ~0x1000 as non-readable, non-writable, and non-executable to detect array accesses on a null pointer.

I'm not polish but that sounds right in another slavic language.
it's an adjective.

stop being so upset

So I'm applying for master's programs in comp sci and I'm beginning the process of learning all the programming and math skills that I need so that I can hit the ground running (my bachelor's degree wasn't in STEM).

My question is, what if I don't get into a program? Is there any way I can use those skills to get a job or will employers just throw my resume in the trash without having a proper CS education? Basically I don't have a back up plan and that scares me.

tak było

How come you haven't killed you are self yet?

You should specify what language you're talking about (in C, NULL is a preprocessor constant standing for (void *)0). Dereferencing NULL pointers has its usual implications, I believe that function pointers wouldn't be any different. You should make sure that the pointer in question is not NULL before actually calling via that pointer.

nie zdałem kolosa z C eeeeeeh anoni

...

>NULL and 0 aren't the same, are they?
It's complicated. It depends on the context.
NULL is defined to 0, but a pointer can be 0 without being NULL, and sometimes 0 means NULL but sometimes it doesn't.

Is there a possibility to overcome this?

C

Polish grammar makes it impossible to reconcile both conditions. The ordering of the words is simply different.

...

Dzienny Programistyczny Temat.

I know that's an adjective, but doesn't programer means literally a programmer?
I thought word order in Polish is free.

Yes, by using the OS's API to make the said region executable and writable, then you write some machine code there.

What are some of the more portable GCC extensions? I know inline assembly, for example, is also supported by TCC, but what other sorts of extensions are supported outside of GCC?

>involves three words with initial D
GAS GAS GAS

You aren't the usual literate

...

why is java so shit? i can't handle this. if interviewers don't want to let me use haskell they can fuck off

As a last resort you could go ahead and swap "Programerski" for "Programistyczny", but that sounds a bit over the top.

POLAND STRONG 40:1

#pragma once

clang has full support of GNU C

...

...

How about Clojure?
It uses JVM and yet it's a functional programming language.

>apply for programming job
>go to interview
>get hired
>have no idea what the fuck im supposed to be doing at said job
im kinda scared, first day sometime next week

What's your job is called?

>It uses JVM and yet it's a functional programming language
Maybe in the paradigm sense, but nothing using JVM actually functions

i'll look into it. i don't want to bring an arcane language into coding interviews that interviewers have never heard of or can't read the code of, but i really can't handle java. if i can have a middle ground of something that is mainstream but also powerful and high level that's what i'd want

Spent the whole day working on a Harvest moon clone.

If you can program, you are in demand. But to land a good position, you'll still need to have a portfolio to show off and maybe a niche you're specialized in (e.g. app development or web development)

kek

quality assurance technician

nigga, you're awesome
Everyday a new game, that's something.

Looks like a dwarf fortress remake.

not me

just "C# developer"
i was told they make desktop applications and i know they're in the healthcare industry, not much more than that

cheeky breeky kurwa

iv damke

>English daily thread
>taken over by poles
damn it, not again

does anyone have the Sup Forums challenge list?

Poles are the european niggers

WILNO JEST POLSKIE

>and i know they're in the healthcare industry,
Hope your code won't cause anyone's death.

>this man is getting hired while you're unemployable

>Hope your code won't cause anyone's death.

Well, we need to solve overpopulation somehow

It's more abut who you know and knowing how to present yourself. Actual talent or skill does not matter.

Nah, the last two were 15-30 minute mini projects.
Been working on this one for 5-ish hours straight, and it'll probably take a day or two until version 1.0, so my 1:1 game/day ratio ends here...
Thanks for the support tho!

Yeah, I went with roguelike-based mechanics, since, ya know, ncurses.

>implying that isn't its own skill

what's a language that's good for working with data structures? ie graphs, trees, etc

It doesn't take any skill. It's literally being in the right place at the right time. If your parents or friends work in the industry you don't even have to try.

>you're hired while some bitter Sup Forums fatass is jealous
yep, feels pretty good

C++

but really, most language can deal. It depends on how much you care about overhead and being able to model the structure you want precisely.

Java holds your hand more than C++ for data structures. I'd use it for that purpose.

Python if you want to be quick.

>fatass
nice try but i'm no american

Anime was a mistake

>Python if you want to have it written quick
FTFY

Any language, but some languages are better suited to specific types of structures. For example, LISP is very good at handling lists and, notably, even expresses programs in lists than can be modified as a data structure.

For really getting into the nitty gritty, C is a very strong contender - manual management of every byte is possible, and pointers are very powerful tools.

Java is a very well understood language that is used by many universities and such, so there's also a lot of material out there for algorithms+data structures that uses Java, so it is also another worthwhile contender.

What about Haskell?

Please don't say that. Japanime/Manga is one of the few things which give youngsters the desire to live and fight for this (sad) world.

The one on the right looks like way clearer, right?

I like image processing. What's the technique?

I'm teaching a neural network to visualize images on demand

anime gives me the desire to live and fight for a different world

poles are literally the niggers of europe

I want to make a PC from NES, what should I keep in mind in order to do it efficiently?

Haskell by definition can't manipulate structures, they're immutable, but this alone is an interesting twist and there's a shedload of value in learning Haskell for how functionally rigorous it is and how different it is from imperative languages like C(++)/Java/Python.

Haskell cares more about types, and programs are built by transforming between types and combining data. You can still implement a lot of the same algorithms and data structures but just in different ways.

J might be a fun choice, if you have prior programming experience.