/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Last thread:

Attached: 1483307844342.jpg (940x822, 675K)

Other urls found in this thread:

youtu.be/OZzIvl1tbPo
twitter.com/NSFWRedditGif

>programming
first for published user

youtu.be/OZzIvl1tbPo

Attached: 1548695775366.png (720x747, 361K)

Do we like Rust in 2019?

JavaScript rocks!

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

It is a sensible middle ground between C and C++

nth for Nim!

>we
no

Attached: 1548632922610.png (1274x933, 275K)

You should change her PC to show /prog/.

only problem is the friction created by the ownership model

but then again you wouldn't use rust if that wasn't worth it

How do I know when I'm good enough to contribute on GitHub?
How to get I get started with that?

I feel like I've learned so many basics of programming and I've reached a point where guides/tutorials aren't helping me as much as working on a project would.
The problem is, none of the books, guides, or tutorials I've used have taught me how to make a project from scratch or how to contribute to already created projects.

Ahahahahha!!!! My projects works!!! It works user!!! It really does!!! Yeeeeeeeeeeees!!! I achieved something!!!

Attached: prooohhh.png (181x194, 9K)

show us pajeet

learning about the machine.
it looks to me like we are perpetually stuck writing for x86 using under cooked compilers,languages,retarded paradigms for the years to come.
exotic cray shit need to come to desktop now.

No it's inappropriate for blue board

but this is Jow Forums

Attached: DgxWzV7UcAErfl5.jpg_large.jpg (1684x1191, 202K)

Create pull request, if request is rejected, you aren't good enough. If it is accepted, you are good enough.

submit a patch to the linux kernel where you modify the Makefile to compile everything with C++

>posting my image
Good deal.

Why can't I assign the value "My favorite food is cheese." to my "sentence" constant?

func makeFavorite(categoryOfThing: String, favorite: String) {
// I've tried this
//"My favorite \(categoryOfThing) is \(favorite)."
// and I've tried this
//let favoriteSentence = "My favorite \(categoryOfThing) is \(favorite)."
// and I've also tried this
//var favoriteSentence = "My favorite \(categoryOfThing) is \(favorite)."
}

let sentence = makeFavorite(categoryOfThing: "food", favorite: "cheese")

z

What exactly is a pull request?
I've never used GitHub, I don't understand it.
Is there some kind of introduction to GitHub for my dumb ass that at least knows the basics of programming?

Is this a reference to what one girl who got hired to work on Linux because she did some basic thing on GitHub?

What am I in for, bros?

Attached: index.jpg (334x445, 17K)

is that Swift?

you need to return the value and modify the function signature

func greet(person: String) -> String {
let greeting = "Hello, " + person + "!"
return greeting
}

Elements of programming, user'.

Oh shit, I also for the -> String
Thanks, m8. I got it.

func makeFavorite(categoryOfThing: String, favorite: String) -> String {
return "My favorite \(categoryOfThing) is \(favorite)."
}

let sentence = makeFavorite(categoryOfThing: "food", favorite: "cheese")

spend a year studying that and SICP and you'll have enough self confidence to sustain you through the inevitable years of unemployment that follow

how would you replace string streams with variadic templates?

How do I unleash my inner Pajeet and git gud at Java?

Attached: 1533667017162.gif (849x458, 153K)

but user I am already employed.

I don't see how they're at all related.

>telling journos on twitter to learn to code
>realize I need to take my own advice

What would you guys suggest I learn?

Attached: 1526843722278.png (1200x699, 345K)

How can I find a simple iOS app on GitHub to contribute for my first time contributing?
Most of it seems too big for a newfag like me to be good enough to contribute to.

ATS

In this order: Assembly -> C -> Java -> Python

remove Python

if you learn the others you get the privilege to make one-off shitty scripts in python when you need to

>no functional language
Doomed to become a code monkey

Yea no.

do the needful and create some shit, thats the best way to actually learn something
also
>1100 members in a single class room
imagine...

can someone recommend a book with programming projects?

Checked

programming

What would you suggest?

make one off shitty scripts in some other language

REMOVE PYTHON remove python
you are worst language. you are the dynamic idiot you are the dynamic smell. return to california. to our california cousins you may come our github. you may live in the zoo….ahahahaha ,lisp we will never forgeve you

for India that is an actual thing they do

for entrance into engineering grad school they cram like 10 million assholes into one gymnasium to take the entrance test

but one off shitty scripts is the point of python, it's the best at it

based and redpilled
>it's the best at it
no it's just marketed as that

>no it's just marketed as that

As someone who writes shitloads of small scripts, you're just wrong.

sad
how do we get rid of them? why do they pick programming instead of accounting or something idk...

>it's the best because it's the one i use
maybe you're just being retarded and wasting your time

quints don't lie

did a quint tell you that

Nice

Attached: dubs.png (880x1262, 996K)

Checked

>Doomed
Ok the digits are nice but the text is perfect.

Scheme

Learning a functional language will transfer to other languages, even Java
You don't need to actually master FP to benefit from it.

Download git and create a local project repository and learn the different commands. It's not hard and you're expected to know it if you get a job in software.

What is the point of programming if you are not a code monkey?

Sorry, I think it was extern inline.

>the friction created by the ownership model
Speaking as a C++ programmer, you don't escape from this by using C++ instead

Can you pull from github into android studio the same way you would pull into eclipse or netbeans? Via one simple link?

Most enterprise sepples is full of race conditions due to abuse of shared_ptr. A stricter ownership model would be welcome.

Most enterprise sepples doesn't even use shared_ptr because they are still using C++98

yes

Check'dd

Exactly: You still have to worry about it, but you don't have the compiler checking your work. It's like the difference between type checking or stack management in C and assembly. You CAN do it all in your head, but do you want to?

>"Functional language is worth learning [because of] the profound enlightenment experience you will have when you finally get it. That experience will make you a better programmer for the rest of your days, even if you never actually use LISP..." Eric S. Raymond, How to Become a Hacker

shared_ptr exists since '98 in boost. But you're probably right anyway.

Yes. The mandatory SICP class was one of my most useful courses in CompSci. I would recommend it to anyone

There should be a saying, "Once you learn functional programming, there goes your memory."

>that feel when no project

Clever joke

>tfw 17 unfinished projects, at least 5 of which are definitely feasible

Attached: 1537574428339.png (571x448, 10K)

Python > Lisp

Fuck off frogposter. You're not welcome here.

No bullying the only person who gave me a (You)

jani post

payment processing backend for an insurance company.

The janitor is immunized against all dangers

Attached: Screenshot_2019-01-28 (0) g - dpt - Daily Programming Thread - Technology - 4chan.png (395x83, 3K)

This guy again

Attached: 1543308216228.png (400x389, 48K)

>mainstream languages are awful to program in but usually are good performance
>finally find a language that is perfect
>bad performance or no libraries or no ecosystem
everytime

Python doesn't have this problem.

>dynamic typing
>good

>mainstream languages are awful to program in but usually are good performance
>finally find a language that is perfect
>great performance but few companies use it
fucking Swift

How little is your brain? No, seriously, how small is it? Are you unable to hold a few types in your head as you program? Is doing type(object) that fucking hard? Fuck off, you don't deserve Python Only real men can be the Serpent Bearers.

>Started internship doing Java
>Entire team is Pajeet
>Half my team is outsourced

You guys warned me and I didn't listen

This is your brain on dynamic typing.

>/dpt/ thinks they're superior to Indian software engineers who have studied 12 hours a day, 5 days a week for 4 years with state-of-the-art equipment at top universities
>/dpt/ doesn't realize (or is willfully ignorant of the fact that) an Indian computer science freshman will have to write a bootloader and a compiler IN THEIR FIRST SEMESTER or fail their degree
>/dpt/ considers themselves better than such engineers... and it's all because the engineers have brown skin
Inferiority-superiority complex much?

It's a meme you dip

I'm Indian and lived in India for a good part of my life. They do not make you do that kind of stuff.

Lisp is the most powerful programming language.

You're a white-washed lazy indian, you make your kin puke in disgust.

I want to go to a school that can actually teach programming
I feel like I've never seen a college in my area that takes it seriously
they all have like one teacher who programs as a hobby and teaches a 101 class

Nice racism.

def proc(primes, sol, n, k):

for prime in primes:
n -= prime
if(n >= 0):
sol.append(prime)
if(len(sol) == k and n == 0):
print(sol)
else:
proc(primes, sol, n, k)
n += prime
if(len(sol) > 0):
sol.pop()

def main():
n = 10
k = 3
primes = getPrimes(n)
sol = []
proc(primes, sol, n, k)

~ py kPrimess.py
[2, 3, 5]
[2, 5, 3]
[3, 2, 5]
[3, 5, 2]
[5, 2, 3]
[5, 3, 2]


This is my first time implementing a back-tracking algorithm. The task is to see how many subsets of K primes can add up to N. I'd like to get unique sets though, not all possible permutations. Can this be done within the algorithm or do I just have to add all permutations to a list and clean it up in memory?

>nigger detected
leave

Use a set instead of a list then

If you were taught Java, you were conned.