/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Old thread:

Attached: 41MbfCUK4vL.jpg (396x500, 28K)

Other urls found in this thread:

stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list
pastebin.com/wZvVBgYm
arxiv.org/pdf/1510.08079.pdf
quora.com/Why-does-CERN-use-ROOT
stackoverflow.com/a/513839
amazon.com/Database-Concepts-Abraham-Silberschatz-Professor/dp/0073523321
en.wikipedia.org/wiki/Q_(programming_language_from_Kx_Systems)
tech.marksblogg.com/billion-nyc-taxi-kdb.html
fm2gp.com
phoenixframework.org
dev.realworldocaml.org/toc.html
github.com/jozefg/learn-tt
twitter.com/SFWRedditImages

pls reply

oh thats the keylogger i upgraded your computer with

>tfw finally have two on-sites scheduled in 2 weeks
holy shit lads, i think im gonna make it

what's the best way to prepare?

NEW /DPT/ RULES

>(A)GPL3 only
>no Windows
>no Nvidia
>no Java-style OOP

also should I cut my hair? i unironically look like pic-related without the neckbeard and general good looks

Attached: 3577440656_bd42c9afe3[1].jpg (400x500, 156K)

>no windows
t. moms basement

Perhaps this is the wrong thread but does anybody have any recommendations for books/materials for a zero knowledge beginner to learn c++ or c#. It seems a lot of the recommended books for c++ in the past were never updated for the 11 revision, so anything I currently have is presumably very out of date?

embrace it

Attached: xero.png (306x373, 156K)

cutie

Anyone could share this book? I cant find it anywhere, not even on libgen

Attached: cobol anime girl.png (1920x1080, 1.58M)

Why would you want that?

sent ;)

repeating from the last thread:
I want to learn Python 3 to work on an existing open source project. I have previous experience with C and C++. There's a ton of books out there so I am confused about which ones I should use. I prefer some example problems to reinforce my learning as I go. Does anyone have any suggestion on a general Python 3 book?

Attached: 1518993056315.jpg (540x720, 101K)

stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list

What IDE or editor or whichever has best code intel? The amount of different languages doesn't matter, jutst the amount of features. Navigation, type inference, adding your code to its intel, calltips, code completion, shit like that.

More EE than programming but can i power a little attiny85 board from its gpio AND plug it in to a USB port without damaging it or the port?

Attached: SKU172392b.jpg (361x361, 67K)

pay is huge. No one knows Cobol and some inportant banking software has critical software written in it

Any online courses that are good or worth it?

What do you think of microsoft virtual academy?

how to git gud

Attached: oogaboogaaa.jpg (800x450, 38K)

b-but real time ray tracing user

Yeah there's a diode to protect for that

Why did they make the epoch 1970-01-01?
Why not 1931-10-26? That would have drastically simplified programming, and also made it a more easily recognizable date.

What IDE does Jow Forums recommend for plain old C on windows?

Attached: nrc0mf9NhM1srgilio11280.gif (910x885, 33K)

You'll have Gouraud shading and you'll bloody well like it user.

(indirect link because of spam filter) pastebin.com/wZvVBgYm
This?
Otherwise you could buy a used paperback of the 7th edition for $2 if you're an American.
Pelles C.

Wear a wizard hat and a black t shirt that says “Computer Wiz” in white comic sans

probably cut hair and beard?

Temporal Logic as Filtering
arxiv.org/pdf/1510.08079.pdf

Cool stuff.

Remember that many OOPsies who shit-talk FP don't even understand it. They think consing a list takes O(n) time.

can someone help me understand Second Normal Form? I get that 1NF means "in a table with a primary key and atomic data", but for 2NF I'm not sure what "all non-key columns are dependant on the table's primary key" implies. Does this mean that all the columns in a row have to directly describe what the primary key identifies? like, not something you could move to another table and link later?

Why is Rust so much more complicated than C?

It's a more featureful language. C doesn't have the borrow checker. C doesn't have traits. C doesn't have lifetimes. C doesn't have closures. (You can of course emulate them yourself, but it's quite cumbersome.)

CHICKEN or GNU Guile?

The following traits are correlated with good programming ability:
>introversion
>enjoyed math in school
>played with 'building' toys as a child e.g. lego
>feminine and/or non-binary and/or fluid gender identity
>shyness and/or social anxiety
>vegan diet
>being a furry
>near-sightedness

you could of said being a faggot and you couldn't be more wrong

>could of
cmon user

Imagine if you had to design a programming language that tries to prevent compilation when brainlets make mistakes with pointers, but also tries to allow low level memory management. Just think of all the ways they can fuck something up and then imagine having to design a countermeasure for it.

Attached: diversitycoding.jpg (1024x595, 178K)

Hey guys, Java newfag here. What is wrong with my code? Why is it not compiling?

Attached: Java code.jpg (1165x681, 60K)

==

= != ==

Say you have a composite key. Do all the attributes depend on both parts of the composite key or only one? If they only depend on one then chuck them in a different table with only that pk. So when you're done, the composite PK table onyl has columns that are about the relationship between two entities, not about each entity

I've posted in these threads before, so I apologise if I repeat my spiel.
I'm currently a PhD student in physics at an '''ancient university''', but my love for the subject has been destroyed by long working hours and a lack of respect from my colleagues.
I programme in C++ daily, and am thinking of becoming a quantitative developer when I graduate, because even if the hours are shit at least I'll be paid something.
I've read some stuff online that says that you should become proficient at SQL and database management if you want to gain a post as a quant dev. I was wondering if anyone has any experience in these areas and knows if this is true?
Also, I am completely unaccustomed to using databases: are there any test grounds where I can learn to use SQL?

Ah. That was such a simple mistake.

That's fair enough. It's because I work for CERN and use their diabolical ROOT framework which is built in C++. They tried to implement their own memory management/garbage collection (in the 90s) and completely failed, resulting in a horrible language which goes against almost all modern c++ programming standards.
Nonetheless, this has if anything incensed me to learn how to programme c++ 'properly', and should give me something to talk about at interview.

Further reading: quora.com/Why-does-CERN-use-ROOT

Attached: Screenshot from 2018-06-04 18-49-31.png (728x779, 29K)

Not that either

Ah - I deleted my post because for some reason I assumed you were doing a CS PhD (where I imagine C++ is quite uncommon), I missed the part where you mentioned you're doing a physics PhD. C++ surprises me less there.

How hard would it be to become a skilled programmer if I've taken math up to abstract algebra and real analysis?

I did it a bit in my teen years with sicp and k+r but gave it up for epic_gayming xD (which I obviously regret). No pajeet shit, C and FP mainly.

I guarantee you AMD will come out with their own raytracing hardware acceleration. They have to if they ever want to compete.

Speaking of competition, why is NVidia pricing their shit like they only want bitcoin miners to buy it? Absolutely bourgeois.

hello i have a question about functional applicatives
in my range adapters I have zip and map, and product, and zipapply ect

but I want an adapter that can lift the value type out of ranges of range compatible objects
for example a range of lists of chars
i want to apply a char -> char lambda to them
and then get out the other end another range of list of chars
whats should an adapter that does this be called?
or is there a better way?

Attached: .jpg (750x1334, 170K)

>It's because I work for CERN

Attached: mad_scientist__hououin_kyouma_2_by_usayfudo-d4l9mvj.png (774x1032, 434K)

Radeon Rays is a couple of years old now, they just haven't marketed it to non-professionals.

map . map

How much of a meme is Elixir? Is it actually good? I know we hate functional programming around here because Hasklels couldn't resist always always shilling their language all the time, but for serious: Is Elixir good?

>no Java-style OOP
D R O P P E D
R
O
P
P
E
D

you're right this is where my library breaks down lol
ill look into seeing if I can make that syntax work

could make some kind of adapter that always eats down the first non-range convertable type and maps that but it seems wrong

Folks, Java is not a bad language, but it used to be. Also, most Java codebases have shit architecture to deal with the ways Java used to be terrible.

Good, modern Java looks like a higher-level Go or Rust in some ways.

Still a boring-ass 80s paradigm though.

Hey guys, it's me again ( Cersei!
>Her name really is Cersei!

Rather than
>Cersei! Her name really is Cersei!

The %n method of line separation I learned isn't working, nor is \n

import Data.List
import Data.List.Zipper as Z (toList, duplicatez, fromList, Zipper(..))
import Data.List.NonEmpty as NE (nonEmpty, toList, NonEmpty)
import Data.Bifunctor
import Control.Monad

anyEqualSumPartitions :: [Integer] -> Bool
anyEqualSumPartitions = maybe True (or . ((.) . fmap) (uncurry (==) . bimap sum sum . (\x -> case x of Z.Zip l r -> (l, r))) ((Z.toList . Z.duplicatez . Z.fromList)

Forgot the pic. Fugg.

Attached: Java code 2.jpg (1168x594, 48K)

t. desperately doesn't want to have to learn anything other than java

System.out.println or add a newline character '\n' on the end.

Before you get bit in the ass
stackoverflow.com/a/513839

learning linked lists in JavaScript. HELP!

I know how you do smell only for that post.

elixir is pretty cool.
It can be a bit ugly sometimes given its parent lang, but for webshit it's WELL above the standard.
Elm for front and elixir for back is a pretty nice combo, i briefly did a project with them, and it was pretty fun.

i don't know if it's one autist or a few pajeets. But for the last few days we've had INTENSE java shilling like on other.

But modern Java or C# style OOP is nicer than Smalltalk OOP. Static types allow IDE's to be extremely powerful to the extent where you can autocomplete your way to a solution. Smalltalk's main advantage is easier support for TDD and that's pretty much it.

That's basically how Rust works.

Please tell me everything about yourself.

- How much schooling?
- Who paid for the schooling?
- Do you have a shit-load of debt? or did you get some (person/institution/program/government) to take care of your financial needs?

- What is your job?
- Are you a professor?
- Do you have research projects?
- Who pays you? How much?

- Do you enjoy what you do?
- Do you get to do what you want to do?

I wish I could go just leap into college and never look back. I wish I could be one of those people to start college, get lost in the magic of the studies, and become one of those research guys that gets to spend all of his time learning.... The kind of guy that enters college, and 10 years later he's still there. (but usually as a professor at that point, or some kind of lab researcher)

But I'm always worried I wouldn't be good enough, and would have to leave after 4 to 6 years, and would have my life ruined by like $100,000+ worth of debt to have to pay off.

I wish I could have had the education to understand the kinds of things discussed in your publication.

I'm 24. I have a decent job, but I don't enjoy it. I'd like to go to school... but i'm afraid of the financial implications. I've heard too many horror stories about student loans and shit...

...enough to scare me away from ever going back. (I'm currently debt-free, making $56K (contractor), but have no degree)

Did you reply to the right guy? I just do this on my own time, I don't go to school for CS.

Try to use Pyroot as much as possible and improve your python skills. Maybe try joining some of the machine learning efforts at CERN. Learn packages like Pandas. Etc etc.

SQL isn't too difficult to figure out in comparison.

If you're on windows, you might need `\r\n`

Did you write the publication? The "Temporal Logic as Filtering"?

If you're the guy that wrote that PDF, then you are the one I want to hear from

>use Pyroot
It's good for plotting, but I'm just so accustomed to C++ at this stage that I don't really like using pyRoot if I don't have to. I have some personal projects using python for machine learning, which is fun.
The main issue is that my datasets are ~TB, so I really need the performance of compiled c++ code.

Are you a phd student?

Oh, no, I just found it interesting.

are there any jobs left in webdev? I'm mostly looking for a summer job to pay my tuition.

Do you understand it? Like, understand it well? If so, your answers are still desirable.

hey guys, i'm doing a simple calculator program in C++ to get square roots/cube roots/etc, everything in stored in doubles, but i want it to work with maximum 2 decimal digits

so sqrt(2) should be 1.41 instead of 1.414213......., round() is returning 1

Well enough I guess, but really I never studied this stuff in school.

no they're all gone. now leave

bish I never use Java anymore, I only ever used it for Minecraft modding. Just don't understand all of the eternal posts shitting on Java all the time.

I'm a Rustfag though so you can probably throw plenty of other memes at me for that.

The padding is probably garbage data. Having your struct fields word-aligned makes access more efficient, so compilers will do that for you, and as a result, any field smaller than a word has trailing garbage data before the next field. The stuff at the end is probably the same thing.

Usually just Read and practice one database system book, quant just made SQL like queries.

amazon.com/Database-Concepts-Abraham-Silberschatz-Professor/dp/0073523321

Some SQL like language is Q.

en.wikipedia.org/wiki/Q_(programming_language_from_Kx_Systems)

tech.marksblogg.com/billion-nyc-taxi-kdb.html

>Just don't understand all of the eternal posts shitting on Java all the time.
it's because java is shit

>Country's education system is now rolling out Computer Science at the high school level

Fuck's sake, why couldn't that have happened while I was still in school? That way I wouldn't have to be wagecucking while trying to teach myself the basics, stumbling in the dark

Just read CLRS or even TAOCP,some computer architecture book and
fm2gp.com for C++

Elixir don’t just put nice syntax on erlang, build real world libraries for web servers.
phoenixframework.org

my school had CS classes, but I took business and history in its place.

Thanks. Is Haskell a good FP language to learn instead of lisp? Seems more common.

Why do bootcampers and self-taughts get so upset that people don't consider their educations equivalent to a CS degree?

Haskell will teach you how to write functional programs, Lisp will teach you how to program how everybody else does except with ((())((())()()))))())))) (which does have its merits).

To elaborate, in Haskell you treat programs as being completely or mostly opaque, yet still able to reasoned about purely based on their types. In Lisp you tear apart programs and put them back together as data.

Aren't you looking for setprecision()?

>Going tens of thousands in debt for a teen daycare made me smarter

round(100*x)/100

Like say But Haskell community is full eternal beginners loves write monad tutorials and never get things done.
Learn Ocaml, nice type systems and imperative programming using tail call if things get hard in pure functional programming.
dev.realworldocaml.org/toc.html
First 3 books begin type theory in programming languages over hundreds half baked tutorial online.
github.com/jozefg/learn-tt

Does anyone have these moments?

>Working on some programming problem
>No idea how to solve it
>Ruminate for a couple hours or so, sometimes a day
>Randomly hammer out some code
>Code works, problem is solved
>Really don't get "why" it works but it works

>unironically recommending oh camel

Attached: 81r4KMgiF-L._SX425_.jpg (425x425, 21K)

I made a timer app that takes the separating colon out of the time (3:15 -> 315) then displays the prime factorization of the number.

3:15 -> 315 -> 3*3*5*7