/dpt/ - Daglig programmeringstråd

Gammelt tråd: Hva jobber dere med, Sup Forums?

Other urls found in this thread:

erdani.com/index.php/books/modern-c-design/
strawpoll.me/11785985
youtu.be/qWJpI2adCcs?t=2736
docs.oracle.com/javase/7/docs/api/java/awt/event/ActionEvent.html#getActionCommand()
twitter.com/SFWRedditGifs

Scala does not have dependent types.

what does Scala "dependent types" even mean?

benis :--DDDD


I made a Sup Forums image downloader

Apparently Scalafags think this is dependent typing.
data Foo :: * -> * where
Bar :: Foo Int
Baz :: Foo String

-- doesn't compile, must be dependent types at work
qux :: (Foo a, Foo a)
qux = (Bar, Baz)

what is embedded programming like?

>seksti prosent

assembly, if you're lucky, C
debug both hardware and software


[spoiler]just guessing tho[/spoiler]

I wrote you a special message, /dpt/ :3

#include // To print a special message for my friends in the /dpt/

What are some good C++ books and tutorials for someone already familiar with C?

Er Rust et godt programmeringsspråk?

Ja.

Takk.

*speaks in scandinavian*
nope

De är ett imagebord på engelska. Snälla, döda dig.

norsk > svensk

Kona di har en annen mann.

truly this
swedish isn't even a real language LOL

It does superchip now!

what is the purpose of Travis? YML?

Attention to all posters in this thread!
Please answer the question in post

erdani.com/index.php/books/modern-c-design/

So you can put a badge on your github page

I need to refresh my programming skills. I've went from C++, to web dev, then to C# (for Unity reasons). I want to write dlls like all the cool programmers do. I want to write little exe applications like all the cool people do. I want to script like all the cool programmers do.

It's a fucking shame I never went down these paths properly.

>for Unity reasons
Make your own engine or don't bother making a game.

Already did it in the past. Even though I know the path from start to finish, I rather just use a preexisting one. Not a good investment of my time.

Now some tutorials please

>implying anybody in /dpt/ has the knowledge or ability to write a modern AAA engine

>modern AAA engine
What does this even mean?

Graphics without gameplay or story.

It means he's a dumbass

didn't know an engine handles that.

There are no good C++ tutorials.

Why? What's the closest thing to "good" there is?

There's a lot you don't know.

>that feel when I'll never have carmack as a mentor

He'll just tell me to never stop reading programming books and articles anyway

Bjarne mumbling about "C with classes"

Like unreal engine or frost bite.

Jeg har drukket for mye vin.

Were there any good programming languages invented by non-whites?

No. I can tell you this as a black guy.

Are Scots white?

CIA nigger detected

Nah

Thats right, motherfucker. We knew what the fuck you have been doing all along. You think we were just sitting there taking that nsa crap like it was nothing? Bitch please.

Then yes, ML was invented at Edinburgh.

>no anime image
you know you can't program without anime u fucking bruntwurst

stop remaking the fucking wheel. You're acting like a CS grad; no shared code.
I can raise a glass to this with my difficulties. Better to start high level lang. then move to C++ as it starts to look familiar.
Does it matter? The only loyalty that matters is to your nation. Working and serving with every color. Equal pay and equal work input by all colors.
I had the same question about Gravitar. Im a skeptic, but some of this shit seems like more hipster garbage from California's Starbucks community.

>The only loyalty that matters is to your nation

>dude stirner lmoa

Get out. Fucking scum.

You sound butthurt.

I'm a raptor, which programming language would be best for me to learn?

Well, you seem to like moving at high speed and killing people, so I recommend C.

>The one thing I learned in my early days is that, in traditional corporate environments, you can often encounter software project managers that earned their positions with years of manipulation, usurpation and other admirable practices. So, understandably, introduction of a CI is not in their best interest. They don't want transparency. Their whole job sometimes boils down to owning all the information and then strategically feeding specific (slightly adjusted) parts to different channels.
The whole chicken and egg problem is that they are the ones that decide on whether to use CI or not. So, if you ever hear stuff like "That would only slow us down", "This project is too small", "We are doing just fine without it" or "We don't have necessary experience", remember this and just smile (if you're cool-headed enough. I'm unfortunately not :)
Guy sounds kind of butt mad.

Whoops, posted a question in a dead thread.

I want to make something that uses brute-force to find the function that produces a given output from a given input, but I worked out that it would lose efficiency very fast as it tested longer functions, since the longer a function is the more redundant rearrangements of it there are.

What's a computationally inexpensive way to make sure I only test unique functions and none of their aliases?

Can you implement a map in your language in which it is a compile-time type error to try to look up a key that does not exist in the map?

You mean a struct?

No, something more extensible. You can't just add elements to a struct in the same way.

Stirntards are the lowest of the low.

can REST use XML as well as JSON?

Yes.

map f [] = []
map f (x:xs) = f x : map xs

REST describes how you interact with a server.
It doesn't specify what format those interactions should take.

You didn't read his post, did you?

strawpoll.me/11785985

my map is cooler than that type of map

it isnt tho

Who the fuck cares

the desktop's gonna be windows and it'd be a hassle to set up my environment, but it'd have a bigger screen and the bigger keyboard

A laptop with Linux is really comfy desu.

Laptop on campus / elsewhere
Desktop at home
Laptop on bed

when you do sumLists' 1 [] [], i want this to return [1], but it doesn't, it returns []. why?

sumLists' carry [] []
| carry == 0 = []
| otherwise = currentIndex : sumLists' nextCarry [] []
where
currentIndex = carry `mod` 10
nextCarry = (carry - currentIndex) `div` 10

why not

sumLists 0 [] [] = []
sumLists ...

ok nvm, the repl add on i have in atom was trying to gaslight me. i restarted it and it works now

Most embedded systems have C compilers nowadays. You'd very rarely have to program in ASM.

embedded is C

>C++
Practically poison for the mind.

>b-but at least i have a job!!1!

wew

That's something.

>modern AAA engine
user you simply don't realize what gamedev is like.
AAA studios have special requirements to them. Their pipeline is not made for one game. They have this idea of "we're gonna make this engine, it's gonna be cutting edge and we're gonna have experienced people work on it for a long time and perfect it, it's gonna be an investmet we make for 5-7 games" or so. Same with all the tools they build. You often find that studios develop their own special tools for things like map editing etc. They're all very generic, fits for many games etc.

But indie developers don't have the same things to concern themselves with. They can make their one engine for their one game.

Making a Unity replacement would be a lot of work, and it probably wouldn't serve you well at all.

I'm very confident that given time most people here could write something like it though.

Here's an interview with mike acton, timestamp links to where he addresses this very thing.
youtu.be/qWJpI2adCcs?t=2736

It bothers me when people speak on topics they haven't even bothered to research at least a little. I'm sure most of you have written a small game. you should have some perspective on how you could scale it up, it's not particularly hard. It's an incremental process that might take work but it's rarely the case that your problems get much harder.
It may be the case that where you were at some point was problematic and you didn't deal with it so you need major code refractoring which is annoying. But that's just the nature of not being perfectly informed.

If you want good looking modern 3D graphics you'll have a hard time writing your own engine to handle it all. Why do you think so many indie games are pixel shit or have minimilast style 3D graphics.

>If you want good looking modern 3D graphics you'll have a hard time writing your own engine to handle it all.
There's so many resources to help you.
Unity (just as an example) generally does a terrible job. They perform way below what you'd expect of a specialized engine.

It's not as hard as you make it out to be.

I meant more something like unreal or cryengine.

Then the features you're impressed by is 'materials'. Some shaders and a good pipeline for different texture maps.
PBR (physically based rendering) being the big buzzword.

But sure, for that particular niche it's more work to do alone. It's also a lot more artists work so you wouldn't go there for multiple reasons.

Jeg prover å implementere en enkel lenket liste i c++, men c++ er jo helt unodvendig vanskelig.

There's not much C++ madness you can fit into a linked list implementation user.

I'm familiar with those features but you're kidding yourself if you think that's all those engines provide graphically.
I agree for 2D, isometric, etc but 3D is different.

>you're kidding yourself if you think that's all those engines provide graphically.
I have nowhere said that what you mentioned is all they provide. Good strawman.
PBR is a rendering system. It's standalone.
It's enough to produce a good looking 'realistic' 3D game. Of course every feature you want you will be implementing yourself. So if you want exactly what UE or Cryengine does maybe go with those.
The vast majority don't.

Any good programming podcasts?
Ideally about the practice. But 'programming news' is fine too.

Is having an active blog and github actually helpful for getting hired? also tell me everything I should know about blogging and github

What's a version control system that respects my privacy?

I'm trying to make it in Java so that my labels can change what Icon they are displaying, and it seems like an ActionListener is the best way to do it, but I'm still a little confused.

>ActionListener will trigger and perform the thehandler class (according to the tutorial I found) when an event occurs

How do I declare what the event that triggers ActionListener will be? Also why I am I red lining?

I appreciate the help.

JUST
#include
#include

/*
* Generic node for singly linked list
*/
template class Node {
private:
Node *next;
T data;

public:
void setData(T const&);
T getData();
void setNext(Node const&);
Node getNext();

};

template
void Node::setData(T const& inData) {
data = inData;
}

template
T Node::getData() {
return data;
}

template
void Node::setNext(Node const& n) {
nexr = n;
}

template
Node Node::getNext() {
return *next;
}

/*
* Generic singly linked list
*/
template class SinglyLinkedList {
private:
Node *root;

public:
void insert(T data) {

}
};


int main() {
Node n1;
n1.setData(5);
printf("%i\n", n1.getData());

Node n2;
n2.setData(7);

n1.setNext(n2);
printf("%i\n", n1.getNext.getData());

return 0;
}

About to start reading this.
What am I in for?

what's the difference between echo and printf for scripts

Also interested in this.

The more "prestigious" company recruiters do take GitHub and social media into account when hiring.

>red lining
That's your IDE telling you it has detected a problem.
The yellow lining is a warning or other information.
>according to the tutorial I found
I think you've read it wrong.
You can't "trigger a class". Likely you're meant to overload a function (as it looks like you have with actionPerformed) and that function will trigger.
>how do i declare what event triggers actionlistner will be
The event you're given in the function has information about that I believe.
docs.oracle.com/javase/7/docs/api/java/awt/event/ActionEvent.html#getActionCommand()
But I've just spent ~20 seconds googling user.
I don't really know java.

Well printf is formatted. Echo isn't really.
Printf is just a convenience.

>Not even using rvalue references
>Not having a constructor with varidatic templates for checking types
>Not having a constexpr version of this

It's like you WANT to be inefficient.

Blogs are cool, bonus points for having your own domain and email server.
GitHub is a meme

Feelings of inadequacy