/dpt/ - Daily Programming Thread

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

Fuck yourself

LIKING GIRLS IS NOT GAY JUST BECAUSE THEY HAVE A PENIS, OKAY?

> tfw virgin JS is gonna die in your lifetime crushed by chad wasm

why the fuck is visual studio so fucking fat

it wanted me to install 40 fucking gigs of bullshit before i said fuck this and just downloaded VS code instead

VS code is just an editor, it has no development toolchain out of the box.

Even on linux, installing only the GNU coreutils and the GCC toolchain is close to 600MB for lots of stuff you'll never use.

use VC6 instead
neat and comfy before they added 2 decades of bloat

>600MB
awful

Lad, everything Microsoft makes is fucking bloatware. Have you ever seen Word? It's full of so much useless shit, it's not even funny

I want to learn Rust but I've heard that it's an SJW language. Should I bite the bullet?

Reading ACPI tables and working on the PCI subsystem for my arm64 server based OS.

Learn Hasklel.

everyone should give it a try and form their own opinion.

How does this meme keep proliferating on this board? Nobody uses Rust. It's like the 40th most used language, extremely low on the list

>everyone should give it a try and form their own opinion.
yeah, that's what the sjws said about fucking a tranny and now I have terrible hemorrhoids

In order to write anything of value in Rust you need to disable the memory borrower using unsafe blocks, defeating the whole point of static memory correctness.

VS is not fat it is just thicc

Read a proper book you worthless hack.

>asking brainlets to for their own opinion
Spotted the brainlet

>can't even quote me properly
hello pajeet

>t. self hating pajeet

If i was a pajeet, I would have killed myself by now, lad.

Honestly, with the exception of some library code, you probably won't need much in the way of unsafe blocks in Rust.

Translated:
>I keep a catalog of my katana and kimono collection on my Linux computer

jokes on both of us, my main computer is wangblows 8.1
I like OpenBSD and Debian though.

Fucking a tranny != letting a tranny fuck you.

Still gay.

>windows 8.1
Jesus lad, why? Don't get me wrong, 10 is a piece of shit also, but it's slightly better than 8.1

How is it gay if the tranny looks feminine?

submissive sex is for women and gays

Literally landed a job like that a month ago. I'm working on software for scientific data analysis, i have no degree(got kicked off uni last semester) or professional experience, it's a desktop aplication in C++ so no web shit, the gui is super basic so there's not much work on that. The pay isn't too high cause I'm a junior but it's not bad, I can even save up a good amount every month.

>tfw just three months ago i was standing on a bridge contemplating suicide after failing college and now i'm living the dream

Don't lose hope friend.

Why'd you get kicked out of university?

does your friend live in australia?

You selected Xamarin, didn't you?

That includes multiple Java and Android SDKs, as well as Android VMs.

>but it's slightly better than 8.1
I disagree, installed it to try Gigantic way back and I hated every second of it.
Way too much bloat, idled hotter and with more resources, and felt clunky.
8.1 is pretty much perfect to me, though I still long for the day i can completely switch to a Linex or BSD.

Keep in mind 8 and 8.1 are basically two different OS's with how much things changed.
And

C is first and assembly is second to last? How silly

10 has less OS overhead than 8.1...

...

Failed one class twice. It was my fault cause I didn't study enough, but in my defense the class was hard and I was already dealing with depressions and anxiety from all the tests the school threw at me (one of the top schools in the country). Work is much more comfy, as soon as I started working the depression almost completely faded and I no longer have anxiety attacks. Maybe school just wasn't for me.

i meant to reply to you:

proof?
I may have been remembering wrong but i do remember even post-patching, it felt generally slower.

what school?

>felt

...

...

Whats the best online college for getting a Bachelor's degree in CS for programming? What school offers more than just java?

Learning how to automate my tinder matching so it only swiping right if their height and weight match the ratio I set for my own.

aprox 6foot 1.222 inches

aprox 210 lb

Fucking mobile is abysmal though this was a bad project idea

oregon state

I'm trying to use Mongoose/Jquery/Node, but my PUT method is never being called.

$('form').on('submit', function(){

var item = $('form input');
var todo = {item: item.val()};

$.ajax({
type: 'PUT',
url: '/todo/' + id,
data: todo,
success: function(data){
location.reload();
}
});

return false;

});


for the method

app.put('/todo/:id', urlencodedParser, function(req, res) {
console.log("It reaches!");
Todo.findByIdAndUpdate(req.params.id,
{ "$push": { "item": req.body } },
function (err, data) {
if (err) throw err;
}
);
});

I could never understand std::array properly. For example I have this struct and enum class
struct type {
public:
std::string monName;
char monSymbol;
int monHealth, monDamage, monGold;
type(std::string nm, char sym, int h, int d, int g)
: monName{nm}, monSymbol{sym}, monHealth{h}, monDamage{d}, monGold{g} {}
};
This legacy style array works
type monsters[size_t(Type::MAX_TYPES)]{{"dragon", 'D', 20, 4, 100},
{"orc", 'o', 4, 2, 25},
{"slime", 's', 1, 1, 10}};

However std::array complains that it's missing braces:

std::array monsters2{
type{"dragon", 'D', 20, 4, 100}, type{"orc", 'o', 4, 2, 25},
type{"slime", 's', 1, 1, 10}};

>assembly is second last
You're a fucking idiot.

Forgot the enum class
enum class Type { DRAGON, ORC, SLIME, MAX_TYPES };

>Sepples was a fucking mistake
>- Balding Danish Gnome

maybe you need an extra set of braces? like
monsters2{ { ... } }

you could also try

monsters2{ std::initializer_list {...} }

lamo
that actually was the reason. Silly me
std::array monsters2{{
type{"dragon", 'D', 20, 4, 100}, type{"orc", 'o', 4, 2, 25},
type{"slime", 's', 1, 1, 10}}};

*silly sepples

Python was a bad idea

Nim is a good idea

If by good you mean bad and by idea you mean even worse

Nim
Is a
Mistake

awful
try again

Meanwhile, in a sane language:
struct type {
const char *name;
char symbol;
int health;
int damage;
int gold;
};

enum {
DRAGON,
ORC,
SLIME,
MAX_TYPES,
};

struct type monsters[MAX_TYPES] = {
[DRAGON] = {
.name = "dragon",
.symbol = 'D',
.health = 20,
.damage = 4,
.gold = 100,
},
[ORC] = {
.name = "orc",
.symbol = 'o',
.health = 4,
.damage = 2,
.gold = 25,
},
[SLIME] = {
.name = "slime",
.symbol = 's',
.health = 1,
.damage = 1,
.gold = 10,
},
};

>oregon state

Why?

Do you even try?
enum class Type { DRAGON, ORC, SLIME, MAX_TYPES };
struct type {
std::string monName;
char monSymbol;
int monHealth, monDamage, monGold;

type(std::string nm, char sym, int h, int d, int g)
: monName{nm}, monSymbol{sym}, monHealth{h}, monDamage{d}, monGold{g} {}
};


std::array monsters2{
{type{"dragon", 'D', 20, 4, 100}, type{"orc", 'o', 4, 2, 25},
type{"slime", 's', 1, 1, 10}}};

>Completely dependent of struct member ordering
>Completely dependent on enum ordering
>No correspondence for what each initialiser is actually for; you just need to remember ir
>Syntactically looks like shit
0/10, try harder next time.

>Completely dependent of struct member ordering
Yes, this avoids confusion
>Completely dependent on enum ordering
As it should be. Literally.
>No correspondence for what each initialiser is actually for
Ordering

What is Sup Forums's opinion on Rust? It seems like a really nice language and a lot of projects are transitioning to it like Gtk and Tor.

How the fuck are you justifying that reliance on ordering is better?
What happens in the extremely likely situation where you want to change the definition of "type"?

it's dead

How so?

honestly if you're trying to write a robust RPG engine, you won't hardcode any of the NPC types and you'll import them during runtime in some kind of XML or JSON format.
How would you handle DLC, for example?

12/18 chapter finished
Can't wait to start on the Qt book

Rust kinda lacks in GUI tools. Which is why I moved to C++ (Qt Quick) for my big project.

>change the definition of "type"?
By changing the definition do you mean constructor overloading?

> reliance on ordering is better?
Yes, I can easily loop through the members and manipulate them if need be

I'm not really good at OOP tho

>By changing the definition do you mean constructor overloading?
I mean adding more members or just changing ANYTHING.
>Yes, I can easily loop through the members and manipulate them if need be
You can easily loop through mine too. You're just not restricted to declare things in an exact order.

How does everybody here feel about the Go language?

that's awful logic but i forgive you since you posted an akarin gif

hello lads
struct Monster
{
string name;
char symbol;
int health;
int damage;
int gold;
};

struct Dragon { alias this Monster; }
struct Orc { alias this Monster; }
struct Slime { alias this Monster; }

void main()
{
auto dragon = new Monster;
dragon.name = "dragon";
dragon.symbol = 'd';
dragon.health = 20;
dragon.damage = 4;
dragon.gold = 100;

auto orc = new Monster;
orc.name = "orc";
orc.symbol = 'o';
orc.health = 4;
orc.damage = 2;
orc.gold = 25;

auto slime = new Monster;
slime.name = "slime";
slime.symbol = 's';
slime.health = 1;
slime.damage = 1;
slime.gold = 10;
};

That's fucking retarded.

Where is your lookup table?

don't need one
i could do it a few other ways.

But user, if I am going to change the type definition, this is all enclosed within a class, I'll just update the base class, which will allow the properties to be inherited in deriv classes

nevermind, the oregon state online comp sci program is only for those who already have a 4-year bachelor's degree

wew, im a fucking idiot.
should be
struct Monster
{
string name;
char symbol;
int health;
int damage;
int gold;
};

struct Dragon { Monster m; alias m this; }
struct Orc { Monster m; alias m this ;}
struct Slime { Monster m; alias m this; }

void main()
{
auto dragon = new Dragon;
dragon.name = "dragon";
dragon.symbol = 'd';
dragon.health = 20;
dragon.damage = 4;
dragon.gold = 100;

auto orc = new Orc;
orc.name = "orc";
orc.symbol = 'o';
orc.health = 4;
orc.damage = 2;
orc.gold = 25;

auto slime = new Slime;
slime.name = "slime";
slime.symbol = 's';
slime.health = 1;
slime.damage = 1;
slime.gold = 10;
};

enumerate?

What is the purpose of the enum in the monster example?
Why not use a const string& or const string*?
You can just compare the pointers.

If you have an enum, why have a lookup table at all?
You're just limiting dynamic data with static info

Where is you lookup table?

i don't need one lad, i just told you.
lookup tables are shit in this context.

ive been doing the microsoft dev c# thing for so long now that im starting to feel emotionally attracted to bob

#ifdef _WIN32
size_t arr[90000;
#endif

you forgot something

Patrician choice

What's the most verbose and tedious language that's not sepples,rust or java?

C#

He said not Java

fug

I'll do you one better.

#ifdef _WIN32
int main[-1u] = { 1 };
#endif

I miss being a uni-fag. Damn.

I should have picked Software Engineering, easy degree. Would totally BTFO all the units.
But alas I picked Telecom Engineering.
Then I had a gf
Then we broke up
Then I lost my motivation
Then I dropped out

But at least it allows me to dig deep into programming. I'd still love to go to a community college and do some competitive studies. Competition is very important.

But between my night time job and hobo tier life, I can't make up my mind

>D fags never came up with any code, much less an "elegant implementation"
LOL

unsafe blocks don't disable the borrow checker, brainlet.

You know what they say, only brainlets call others brainlets

Damn, you caught me

Should I use intrusive or non-intrusive lists? Cache performance and low latency lookups are important