/dpt/ - Daily Programming Thread

Previous thread: What aren't you working on, Jow Forums?

Attached: 1550902377559.jpg (1024x768, 286K)

Other urls found in this thread:

pcg-random.org/
docs.oracle.com/javase/7/docs/api/java/util/Random.html#Random(long)
kiwifarms.net/data/video/694/694847-518a3baf6096388726e4e9ac7ca0336f.mp4
twitter.com/SFWRedditGifs

dead

god i hate /dpt/

Attached: 1550156603594.png (823x720, 337K)

3rd for haskell tiddie monsters

Attached: 1532570513557.png (850x1200, 1.18M)

/dpt/ confirmed made up of 50 muzzies from new zealand

C question.
I hear that you shouldn't pass (or return too I guess) whole structs to functions because they get stored on limited stack space, but does that also mean that you shouldn't have automatic variables of those types and also big non-static arrays local to the function as well since they too get stored on the stack or am I misunderstanding?

post interesting projects to work on for employers

An object big enough to put you in danger of blowing your stack would be 1KB large. Don't put that on your stack.
Otherwise feel free to pass structs around - though consider passing by const pointer (or in C++, const reference) if you're concerned about copying overhead. A large struct in this situation would be about 3 pointers in size or more.

The default stack size on Linux is 8MB. There's plenty of space on the stack. Just stay away from pathological growth patterns and you'll be fine.

anyone know why this export is an error?

Attached: a773040de4ee23547cdb2f84755f0d02.png (767x743, 30K)

My workplace keeps hiring people who can't program as programmers. They've been paying massive amounts of money to hire expensive consultants to teach us agile methodologies and team building exercises and other stuff. They don't seem to understand that while methodologies can help, they won't fix bad programmers. It's not just bad code that's causing problems. Some of the ideas here are god awful. We had one project that was a 5 year rewrite that recently completed. It failed to meet several extremely important requirements. The lead developer in charge of the project kept dismissing the user complaints saying "You don't really need that" and their ego was so invested in backing up that statement, that the application was written in such a way that trying to add that functionality later was almost impossible without another rewrite. It was almost designed to be a middle finger to the users.

The two most toxic kinds of people you'll ever have on a project are people who cannot code at all and people who can code a little but think of themselves as the next Linus Torvalds and invest their entire ego into it. That describes 80% of the developers at work and it's killing us.

What kind of people would you like to work with?

1. Read the fucking error message. See how it's complaining about a missing semicolon? That means you should...
2. Put a fucking semicolon on line 26 after the closing brace, idiot.
3. You also misspelled default, by the way.

Competent people. I'm not under any delusions that I'm some genius who deserves a job at Google or something. I'm just tired of half my coworkers being pity hires and the other half working on baby's first CRUD web app and strutting around the office like they shit gold and name drop Martin Fowler every other sentence. Not that they even follow Fowler's advice since most of our code has no tests and some of the few projects that do are so bad at it, that I've seen people create mocks and then test the god damn mock object itself. They've effectively written a bunch of "tests" but still manage to have zero percent code coverage.

sorry i have dyslexia, but thanks

I feel you user. Truthfully it's very unlikely that any of this will ever change. If you want to work with more competent people, you're gonna have to go elsewhere.

I've had many programming jobs and the one thing that always made my coworkers smarter was switching to a better job.

So i want to port Minecraft algorithm for checking if Slime's can spawn in given chunk, from Java to C/C++. My problem is, its using Java Random() method, which works differently than the stdlib rand(). What can i do to make pseudorandom generator from Java in C/C++?

Attached: 2019-03-15-124805_1358x311_scrot.png (1358x311, 46K)

Ok guys, sorry to bother but something that started as trying to change a simple config setting in some cfg file or something ended up trying to quickly learn (or at least understand) java bytecode and i am truly lost.

so whats happening is i found the jar file that has the code of what i want to change, and i have found the most simple change i need to make for my goals: have this (numFalse) be zero, or as low as possible.
Problem is, i cant get a modified, or even the "original" jar file to work: i unpacked it, and even if i repack it unmodified as .zip then rename it .jar (as i have red) it wont work and is about 100kB larger than the original

So my second attempt was to directly change either the numFalse (after the random has been assigned), or change the random generations limit to be lower, directly in the jar file so i wouldn't have to un-/repack it; but pic related is about as far as i got, and have no idea where to actually find it, let alone if i could even change it.

Any advice on how to proceed? either if i should loop back to my first attempts to make the jar file, if so: how? Or i can actually edit something in pic related, if so, what and how can i find it?

Attached: wot.png (3296x836, 158K)

pcg-random.org/

could this be it?
the index, constant and the bytcode matches (i think) but the linenumbers and start_pc (whatever that is) and stuff have zero relations as far as i can tell

Attached: maybe.png (599x114, 4K)

Nvm, i have found Java documentation which says what math is behind random generation in Java.

docs.oracle.com/javase/7/docs/api/java/util/Random.html#Random(long)

could be, what comes after?

unironically, /dpt/'s sepplefags and FPweenies.

Attached: IMG_20190313_072755.jpg (4006x4096, 989K)

/dpt/ should become a company or programming guild so we can all program together

Attached: 1551134438448.jpg (497x497, 29K)

The most powerful programming guild in the world.

Attached: IMG_20190304_083829.jpg (865x1311, 166K)

>1KB
nigga this isn't 1990, stacks are measured in megabytes now

I meant 1MB.

once we put our heads together we'll manage to solve fizzbuzz and average all of the ints in C

Attached: 1550284770632.jpg (1280x720, 87K)

>Mixed HTML and Javascript
What the fuck is this basedboy shit?

In the condition that we stay anonymous and only use handles at work.

First, stop programming in C/C++ and program in C++.
Second, use the C++ stdlib random, not C stdlib random.

Started working on a simple IRC client for my operating system. I needed something relatively simple to test my TCP/IP implementation and discover problems. It feels more and more like I'm testing my GUI library though. :)

Attached: Screenshot at 2019-03-15 13-46-31.png (1920x1080, 528K)

lamo

Attached: pygame.png (802x769, 22K)

Virtual memory is bloat. Prove me wrong.

The more and more I read your code and your code style the more I come to the conclusion that you're literally me.

you seem to be coding this really fast, aren't you worried about security holes?

are you writing tests?

who /started enough projects that go nowhere to know that there's no point in writing all that prerequisite code ever again/ here?

fuck programming and fuck me

Stop reinventing the wheel, and maybe you'll get to see some projects finish.

i'm not

Not him but does it count as reinventing the wheel if the only other existing wheel is too damn slow and shitty to reasonably use?

I worry about performance and stability. Security is not a goal at the moment. I'm not writing any tests.

sorry for late reply, was trying to test it
pic is all that follows, and after changing it from 5 to "iconst_1"m which i would assume would get me a random.nextInt(1) i got the error in the red squre

Attached: ss.png (1210x1588, 69K)

Nice to meet you :) What are you working on?

We're the same person so you should already know the answer to that.

Touché

JavaScript rocks!

Attached: js-rocks.png (1000x494, 368K)

This guy was for sure a Haskell programmer.
kiwifarms.net/data/video/694/694847-518a3baf6096388726e4e9ac7ca0336f.mp4

Attached: 1f914.png (512x512, 19K)

looks like the right place
I would have assumed that changing it to iconst_1 shouldn't be a problem.
how did you change it?
is there anything useful in starsector.log?

>istore
>fstore
>iconst_
>fconst_
>iadd
>fadd
utter incompetence.

Attached: 1551967653027.jpg (600x595, 64K)

If you guys are serious there are concurrent web based text editor programs out there (or we can gnu screen into the same terminal) and just start coding a frankenprogram.

I don't know I'm down though.

I'm imagining the software version of the movie Cube.

Maybe so, but it provides an incredibly useful and valuable abstraction when dealing with threads and/or multiple processes, not to mention the safety / security benefits it affords you.
Besides, I *very* seriously doubt using Virtual Memory will be a performance bottleneck. It's probably some dipshit using bubble sort.

Too many side effects for a Haskell programmer.

>Virtual Memory
It's not a pronoun. Learn English you dumb fucking ESL faggot.

What's this?? Did people dieded?

>ESL faggot
How many languages do you speak, Brandynn?

Unvarying instructions may come as bad for PL implementations targeting the JVM but it does come with a slight perf increase and ease of disassembly.

>Did people die
No, just muslims.

Do you mean "proper noun"?

>subscribe to pewdiepie
>remove kebab
>gas gas gas
An inspiration to us all.

Yes. I realized that after posting, I am a dumb baka.

The only 2 languages that matter. English and Japanese.

It wastes a significant amount of silicon and makes context switching much more expensive.

>McKean's Law
> "Any correction of the speech or writing of others will contain at least one grammatical, spelling, or typographical error."
Like poetry.

What constitutes a "significant amount of silicon", though?
And for context-switching, would the alternative just having one main context? If so, what's stopping program A from snooping into program B's contents?

>It wastes a significant amount of silicon
Silicon present on chip before context switch: 100%
Silicon present on chip after context switch: 100%
???

Oh, okay, I'm relieved. I feared the worst when he started shooting on the pedestrian walk. I don't think he's a Haskell-man, though. This seems very object-oriented.

Context switching is expensive with virtual memory because it means that any caches that are indexed by virtual addresses must be flushed.
With a single address space this is not necessary. This also does not preclude memory protection.

He's referring to the MMU hardware used to support Virtual Memory

this

For stuff running on a PC, stack-allocating shit is fine as long as it isn't massive. On something small (e.g. a microcontroller where you might have a stack as small as 512B), you should be more cautious.

more

wasn't sure if i should post this in here or /sqt/. I'm trying to work on my uni project from home and and i am having issues with javafx. I did sudo apt-get install openjfx and it didn't fix it anyone know what i can do?

Attached: Screenshot_2019-03-15_14-34-08.png (1280x800, 223K)

not really, pic related
i was using jbe to look around in it, but when i tried to change stuff with it it gave an error of not finding the folder, so i used jbytemod to change it

after messing with it quite a bit more, i give up on it since ultimately its a minor gameplay thing but at least i (think) i learned something.

thanks for the help though, i appreciate the effort. At least i know i was poking in the right direction

Attached: dd.png (1834x252, 35K)

There's probably some project setting on your IDE, where you need to include javafx.

Jow Forumsing dpt project roll image

Fuck off.

Fuck me~

You're not a girl and never will be.

Who implied that

Me.

trying to pick a first project to learn the machine learning meme, it seems like there are a few typically suggested to beginners like identifying twitter sentiments, predicting stock prices, and some thing about classifying flowers. any recommendations?

god I wish I could meet you IRL

My employer wants me to start tracking what I'm working on/doing with my time every day, for "task time estimate" purposes.

I feel like this is a bit oppressive and I don't take well to being micromanaged. At the same time, I see how the information could be used to adjust estimates. Am I being unreasonable by being uncomfortable with this request?

It's reasonable if you think you're doing less work than you're supposed to, otherwise not really.

I need a project in java lads any ideas?

Obs: all i know is core java, don't know shit about spring, hibernare etc. Ive been studying with javac only. Need something not so overcomplicate so i can move on.

He's just doing his job. Your manager is ultimately responsible for estimate accuracy and deadlines being met.

I wish someone would do that with me I can't be trusted to be productive by myself but I want to be

It kind of makes me feel like looking for another job to be honest. I'm not one of these hardcore productivity machines, but I get my work done.


I feel like after a few months of working here there should be a movement towards more trust, while this seems to be going in the direction of less trust. But I could be overreacting.

someone post it (again)

Attached: 1552351443478.png (3840x2160, 1.61M)

God I fucking hate webdevs and their framework treadmills. The latest news in my little niche of reverse engineering is that the fucking NSA all but openly took a pot shot at the industry champion by releasing their own tools (which on the face of it seem to be in some ways markedly superior) and it was still less an upset overall than all the "full stack" developers jumping ship to the next PurpleCoffeeMonkeyBeans.js. And if it wasn't bad enough in of itself, they're so fucking smug about how you should be using the latest gimmick.

Attached: DarDpvOUQAAoshw.jpg (1200x1150, 167K)

Uh?

tl;dr: fags jump ship too much and managers want to be using the latest "tech"

yeah but how does it affect you? unless you're a webdev yourself but then why the fuck should we care

This is why you learn backend instead of trying to compete with onions over who is the biggest framework cuck

Attached: uWx62iWzES-iABbvPeFE8hfcksH4OsbKH1Zys9XfdpY.jpg (600x600, 55K)

S L U T

I mean I wouldn't worry about it as long as you're actually doing what they pay you to do, which is work. If you're actually working I'm sure he just wants to know how long it takes you to complete a task so that way time estimates can be more accurate. Unless you're fucking around most of the time then I'm sure it's not a big deal.

The real reason is ABI issues. Everybody agrees on what the C ABI is for almost everything. Nobody agrees on whether structs get passed on the stack, or in registers if they're small enough, or registers if they're small and on the stack otherwise, and so on.

Every ABI defines this though.

Is anyone familiar with JASS? I’m trying to figure out how these hacks put together twilights eve save/load system to migrate files

What's the problem