/dpt/ - Daily Programming Thread

Old thread: What are you working on, Jow Forums?

Attached: 1535695506626.png (1000x800, 427K)

Other urls found in this thread:

imgur.com/a/HJXN1Ph
twitter.com/NSFWRedditGif

Don’t post my waif without my permission you fucking fag

"I am working on really interesting projects".. someday I will say.

>posting anime on a boomer website

Attached: 1534524680742.gif (467x398, 74K)

posting a link to my post in the other thread. Its an idea for a filesharing program.

That's basically a shit version of Zeronet

Anime is for boomers

start today

>Nobody should start to undertake a large project. You start with a small trivial project, and you should never expect it to get large. If you do, you’ll just overdesign and generally think it is more important than it likely is at that stage. Or worse, you might be scared away by the sheer size of the work you envision. So start small, and think about the details. Don’t think about some big picture and fancy design. If it doesn’t solve some fairly immediate need, it’s almost certainly over-designed. And don’t expect people to jump in and help you. That’s not how these things work. You need to get something half-way useful first, and then others will say “hey, that almost works for me”, and they’ll get involved in the project.
- Linus Torvalds

what kind of psychoactive substances do you use to increase performance while coding?

This. It closes over the entire scope and you can't do anything about it. C++ has a much more elegant solution with capture clause.

water

That is a really great advice!. Thanks!

amphetamine

Is there any reason to do a "unity build" of a C project at all?

LTO for free if you really care about that. Sometimes faster compilation in fuckhuge projects.

what doses? how often? do you supplement?

any good book on dart?

I'm not sure it's useful to look at dosages since quality is so varying. Maybe 40-60 mg, but I tried prescription amphetamine once and like 10 mg of that was more than I ever felt on 40-60 mg of black-market amphetamine.
In general, not much can happen if you misdose so just experiment a bit.

I take it once a day, in the morning. I don't think there'd be much harm in taking it mid-day, but i don't want to take much later than that because I don't want to risk insomnia.

No supplements.

In general, just look up science about ADHD. Normal brains react in the same way to amphetamine as an ADHD brain, so whatever conclusions and recommendations are made there can to a large extent apply to regular people too.

cafeine, sometimes phenidates
i was thinking about microdosing lsd tho

>that guy who takes drugs to be a more productive slave of the industrial technological system

Brainlet here: how do I write code for one of those newfangled FPGAs that they're offering on AWS now? Gotta go fast.

Attached: localization(5).gif (640x480, 1.86M)

>implying all code you create is for work
now thats a slave's mind

Probably doesn't belong here but say I just got a semi-decent job at a startup company and know quite a bit about programming, and then get asked to invite a friend, but my only friend is a brainlet in terms of programming because they have no discipline but otherwise would be good at it because they're fairly smart, and I invited them in anyway and vouched for them. I'm hoping he'd have discipline simply for the money but I'm honestly not sure. Did I fuck up? Can a brainlet become smart just for money?

tfw you have to go back to c++14 to support most systems and c++11 to support even more.
fucking pleb tier linux distribution

>having friends

Wrong. Amphetamines don't affect ADHD brains nearly as much as non-ADHD brains. It's like having a cup of coffee at most. Speaking from personal experience here.

Started trying to program a week ago, choose C# and VS. Made a basic program to fit my needs but it wasn't enough to make my life more efficient. Watched the first 3 parts of CS50 and I am already able to implement more features I want. I think I'm gonna make it, lads.

Why isn't lua used for webshit?
They have a non-shit version of js at their disposal, why are they using the shit one?

mass quantities of green tea

How strenuous was the interview process? Just spent the last month interviewing at three different startups:
>on-site behavioral interview
>week long project
>four hours of whiteboarding questions
>sorry we went with other candidates lmao

Attached: 1535665840709.gif (350x239, 420K)

>I think I'm gonna make it, lads.
wrong thread

>muh C
>muh sepples
>muh Java
>muh C#
>muh Go
>muh Python
>muh Ruby
>muh Crystal
>muh Julia
>muh Node
>muh React
>muh TypeScript
>muh Scala
>muh Kotlin
>muh Erlang
>muh Elixir
>muh Nim
>muh D
>muh Elm
>muh PHP
>muh Perl

>lua
>non-shit
funny post

tfw writing c++99

Attached: 1511546095506.jpg (489x499, 27K)

>being so enslaved to the system that an activity that, yes, is FUNDAMENTALLY and INARGUABLY linked to work, is also your leisure activity
>not having a leisure activity that's actually leisure

why tho, c++11 comes with so much useful features and is supported by basically every OS that isn't a century old

...

We should never have let industry get hold of programming. It should have remained in academia.

The only good thing about it is coroutines.

dumb frogposter

You don't need it.

Learn Agda first.

>open youtube video on how to do X in language Y
>it's a fucking pajeet speaking nonsense for 30 mins

fucking why

>tfw writing C11
>tfw have VLAs, implicit reinterpret casting, everything is POD, functions behave predictably
>don't have to deal with sepples' shit
>all the memory errors sepples tries to protect you from but just winds up hiding are all out in the open and easier to diagnose and debug than it is to use sepples' overengineered inconsistent safefy features for avoiding them in the first place
>rarely if ever need sepples level abstractions and can trivially implement them if so, e.g. vector in five-odd lines, map in two small files
why do people bother

>inb4 /s4s/ sesu dempai

Attached: 1535596219789.gif (129x114, 32K)

There's this script that uses ImageMagick to clean text, unfortunately it's only written in bash. I want to rewrite it in Java and essentially make it into an Object. I was told that you can use a Builder pattern to achieve this (the script has many optional arguments). However, I don't know how to return the output image? One person told me to just call .getImage() but I don't know.

Does this look right?
BufferedImage img = new TextCleaner.Builder("Capture1.png")
.convertGreyScale()
.enhance(Enhance.STRETCH)
.filterSize(15).offset(20);
.getImage();


He said if I used .build() I'd get a compiler error for some reason.

Attached: retard.png (547x671, 246K)

Believe me, I do. Trying to simulate a coupled system of ~20 billion ODEs.

>muh x86
>muh amd64
>muh mips
>muh 6502
>muh nvidia

>mfw i see someone using anything other than assembly

Attached: 1500541673666-ck.jpg (540x540, 155K)

Spent the past few days being too depressed and anxious to work, hoping to get two weeks of cs50 done this weekend

Attached: 529EC115DC7D4639B1D3D61422210461.jpg (605x486, 181K)

>mfw i see someone using anything other than direct physical manipulation of the alu multiplexer

Attached: 1534390778407.jpg (268x284, 8K)

You're not, though.

fucking incredible

Attached: Geromy01.jpg (187x250, 10K)

fine grained control of variable capture is not something I have an issue with but the syntax is so bloated with those unnecessary parens.

sepples lambda syntax is pretty bad but at least it doesn't require all this shit

But I am? It's for seismic inversion.

Attached: 1516080975018.gif (300x214, 19K)

why do you want to turn the ground upside down

I just posted my first question on Stack Overflow. I've used that site for several years and yet never needed to actually ask a question.

Attached: apu.png (1210x1190, 116K)

dumb frogposter

It's seismic tomography. It's a similar idea to getting a CT scan, but using earthquakes instead of x-rays as the illuminating source.

Lads would I still be able to program if I got turned into a parrot? I guess I could try to type with my feet but I'd only have four digits on each foot.

You would lack the brainpower

Sometimes I think I shouldn't have started doing this but now that I have been doing it for 6 months it's starting to look real good. People thought it was a stupid idea to use neural networks to create an aimbot but I still did it.

Attached: h25.webm (1280x720, 2.77M)

>Working on
Some utilities for Lancer RPG to practice modern sepples

Parrots are easily capable of doing webdev

I had not slept for two days, so I fell asleep and missed bootcamp class, woke up an hour or two ago, am working on notes so I can prove im not just skipping cos goofin off but actually just am fucked up in the head imgur.com/a/HJXN1Ph

Attached: Webp.net-gifmaker.gif (1274x473, 450K)

Let's see how good docker is to compile shit on old setups. I hopes this works because it looks way better than using fucking virtualbox

And I forget to image

Attached: Screenshot_2018-08-31_18-47-33.png (646x236, 48K)

Who is smarter: a large parrot or a webdev who only knows JS?

>the syntax is so bloated with those unnecessary parens.
They are indeed unnecessary. Only pajeets who copy code from the web without any understanding use IIFEs that way. Even with ES5, there are cleaner ways to turn the function into an expression than wrapping it in parens. How? That'll be left as an exercise to the reader. In ES6 you can use arrow functions, which look rather nice if you're passing one argument to the IIFE.

Also in ES6, all you need for a closure is this:
{
// clean enough syntax yet?
}

something can't be smarter than itself

have to admit you gave me a giggle user

> Even with ES5, there are cleaner ways to turn the function into an expression than wrapping it in parens. How? That'll be left as an exercise to the reader.
Yeah, I think you can use the unary + operator to coerce a function to be an expression in JS.

>Also in ES6, all you need for a closure is this:
For real? That sounds like it would be a syntactic ambiguity. Unless JS just doesn't have compound statements?

I got the classnotes for my upcoming class and there is PHP programming
I never Coded in PHP and we are literally into it.
I don't understand mich about the functions and the PHP manual is docshit.
I need a few pointers pls.
Some sort of PHP tutorials linke in Java or better like the one c++ book Form strasstroup.

PHP is awful I'm sorry
the best thing you can do is pour over the official docs to find functions that do what you want but the standard library is confusing and inconsistent

If you're making a new statically typed language and it doesn't have dependent types then what are you even doing

Making a practical language?

global type inference is more valuable and GADTs are enough

in C++ a parameterless IIFE is just
[]{ }()

Clearly not. No new statically typed language without an advanced type system is practical. You want practicality, you use an existing shitlang or you go all in on types

You might prefer Go 1, the people using it assure me you don't need many features at all

Is that why Go is so popular?

Could be. Could be the parrot phenomenon instead

dumb nigger I just told you better features

Why do so many people find monads difficult?

monads are just monoids in the category of endofunctors

they always try to make terrible analogies

I always thought they were some amazing special built in feature not just a typeclass with semantics particularly well suited to modelling side effects

this

that's pretty neat

>Here goes
I have a windows form.
It has two parts.
One the left we have a hierarchical (family) tree, -
second is a grid with the same values and in the same order as the tree.
To show the grid in the same order as the tree I use a Map (Typ::RecordRecId, Type::Int) where I store the hierarchy, but I have this problem when I need to switch place a tree value/values. Something similar to array swapping.

What ambiguity? JS has compound statements, they're called blocks. Everything in {}s is a block. ES6 const and let are block scope. Old var is still function scope.

So I'm in my last semester of my meme degree, but I've been teaching myself programming for about 4 months. There's a career fair for Engineering and Science jobs at my uni this Wednesday. Would it be worth it to check it out even though I don't have too much on my portfolio to showcase yet?

Yes, just for the networking part.

so does {} evaluate to a "closure" or does it just execute the statements within immediately? I'm not sure what you meant by that.

I used to use 2x 60mg Ginko Biloba. It helped me maintain focus but was terrible on my stomach.
Currently I'm taking 5mg amphetamine salts once a day in the morning.
They certainly work, but I wouldn't recommend them as they bring their own issues.
My next experiment will be with Hypericum perforatum (St John's-wort).

I've narrowed down the possible root causes for my focus and energy problems. For me personally, it may be clinical depression and/or anemia.
I don't know if that counts as "increased performance" more than negating a de-buff, but make of that what you will. If the concept is; take substance, perform better than without it.

Got it, should I just be upfront and say I'm teaching myself right now, and I would like to get involved in the future once I have a decent skillset?

Does it normally take over three minutes to do an objdump -D on a Rust Hello World program?

>of the industrial technological system
Of society. Without sacrifice we as a species make no progress. You may not like it, but it has to be done. Willingly or unwillingly.

>Civilization is based on self-sacrifice. On the willingness of men to go out and die for what they believe in. When you get rid of that self-sacrifice, you get anarchy. Civilization is built because I am willing to give up something for my family, and the family is willing to give up something in order to have the town succeed. And the town is willing to give up something so the state can be in business, and the state is willing to give up something so the nation can succeed. Self-sacrifice is the first principle of civilization.

Yeah, be an open book. Nobody likes dishonest people. You can brag, but don't outright lie.

Earthquakes don't emit light lol, silly user.

I use Taiwanese oolong tea

Not on my machine at least. Although the dump (debug build) is 106 MB. Are you printing to stdout as you're dumping?

Attached: 1524765841367.png (655x418, 22K)