/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

pastebin.com/BuTihxNW
strawpoll.me/12494087
dlang.org/spec/iasm.html
ict.ru.ac.za/Resources/cspw/thinkcspy3/thinkcspy3.pdf
daijoubu.org/bun/
twitter.com/SFWRedditImages

helo

C is the mother of all security exploits

>humans are the mother of all security exploits

USE C!

Nice try CIA

since /dpt/ turned to shit, i remind you the shit to blame is rust

gee I wonder who could be behind these posts

for people who actually programmed something today

> "he doesn't use C"

help help heeelp Sup Forums other thread go full shitpost

making some drawing program (lel).
When i clicked, little rectangle point must be the same location with grids intersection points. what should i add to code?

pastebin.com/BuTihxNW

Underage frogposting C user

sorry friend, this thread is not for programming
go to reddit
meanwhile
use Rust. enough said

>Rust
MUH SJW xDDDDDDDDDDDDDDDDDDDDDDDDDDD

>What are you working on, Sup Forums?
Scraper for Hydrus tag repositories. This will take a while.

sorry but kill yourself if you thought that was a good comment

bruh fix your font rendering

I have a list of words, and I have to fit them into as few lines as possible, given a line cap, with one space between each word.

Is there an algorithm for this, or is this NP-complete? I think it might be 1d bin packing. Input is not too large so I suppose I can just brute force if it's NP-complete.

>tfw when shilling for Rust, while i'm really a C god
>tfw when nobody in /dpt/ uses Rust, only C users troll other C users with it
perfect

>go to reddit
I wonder who could be behind this post...

I don't actually use C anymore

I like them sharp, senpai.

That should have been obvious. Rust is unusable.

/dpt/ cool kids club application form:
strawpoll.me/12494087

>Rust is unusable.
No

yay 5 points

i'm way too cool for your club, strawpoll doesn't work on my cool unbotnetted browser
enjoy your botnet

>>Rust is unusable.
>No
Yes.

>tfw unironically 0 points

For you maybe

just disable noscript on static-strawpoll.cursecdn.com faggot

For everyone.

No

I'd pick Rust over C any day. C is just a small language with close to 0 features

You're not coming at the right moment it seems
Greedy algorithms may give you a good result, but it may also completely miss it. They're still very efficient.
Doing efficient brute-force would mean you'd have to find good heuristics for the practical cases. Otherwise, you can also turn your problem into a constraint satisfaction problem and give it to a CSP solver that uses very efficient techniques for brute-force (as long as the input does not fall into the worst case).

friendly reminder.
if your language doesn't have inline assembly, it's shit

So are you saying Rust is a bloated abomination just like C++? Okay, good to know.

>Bloat
They are called features, user. Maybe your fizzbuzz project doesn't need it but other projects do.

Cheers, I think maybe the lecturer has made a mistake setting this as the problem, so I'll ask him if using a non-optimal solution is allowed.

>I've been using this program for ages, I want to contribute to it
>200,000 lines of ANSI C, batch files and makefiles

How the fuck are newcomers supposed to contribute to this shit

Show me at least one such competent project.

A naive brute-force algorithm may be simple to find. Try that before going into full-optimization autism.

I once had an internship that was like that.
They used CVS to version control, when git already existed.
CVS was probably the hardest part of the job.

One competent project that uses features like exception handling?

Google is your friend

Find a module you want to work on and dig in. I trust it isn't just one huge directory with 200 1k loc files.

Don't they have any documentation? Maybe you can contact a developer? If it's a big project (although 200k LOC is still reasonable) they may have a mailing list.

As you don't know any, I'll assume there are none.

firsthand you submit a commit proposing changing master/slave to a more tolerant variant
after your first commit got closed without comment, propose they change the language to rust, also remind them of safety

>As you don't know any
When did I say that, "C tard"?

Prove me wrong, fagboy.

Any tips?

Around 500 files but at least the folder structure is sensible

I started reading the docs, but it's more of a reference and API explanations. Too autistic to say anything on the mailing list

I bet someone's already made a pull for that

You want me to prove you wrong in assuming I said "I don't know of any competent project that uses Exception handling"?

Not hard, just follow my answers. "C tard"

>Any tips?
1. Build the project
2. Make tiny changes to get your feet wet
3. Look for the easiest open bug reports

I want you to name at least one competent project in this, so called, featureful PL of yours.

rustc
The Mozilla CoC

Look no further, Chromium (written primarily in C++) uses exception handling like any other competent programs

Next question: Does an average "C tard" know what exception handling is?

Thanks. There's some bugs from 2004 still not resolved kek

Been applying for junior programming positions for the past 2 months and had no success whatsoever.

I thought people who had a basic knowledge of java could walk into a junior position?

I thought we were arguing about Rust. C++ is actually decent, if you arbitrarily cut out the 10% of the spec, you find usable.

I'm having so much trouble learning to program. I can fill my will to continue learning breaking. I've been learning for over two months now. I'm feel like I'm not learning anything. I feel like I don't know a damn thing. It's so hard. I don't know what to do. Do I go back and start over? Or do I keep pushing on where I am now?

The last several topics I've been learning for about the last two weeks have completely gone over my head. But it's not like I understood the stuff from earlier much better either.

Now now, I was talking about C, the only systems language that has no exception handling in the year of 2017

There's this bug I'm trying to fix for a C program.

If I ./configure and make, everything's alright. But if after making it once, I configure it again with ./configure --some-option, and run make, it tells me I've already made the program. I have to start with a fresh source archive and configure it again.

Any recommendations?

What language did you get meme'd into starting with?

html

exception handling is high-level pajeet meme

Python

Depends on the location too. You're probably not going to get a programming job in Bumfuck, Nowhere.

What book are you using? What have you built so far?

Ah, typical C toddler announcing his lack of knowledge.

Learn Lisp.

dlang.org/spec/iasm.html

Learn C. Python is terrible. I can't think of it as anything other than an upgraded Bash.

First never configure and build in the source tree. If some software can't be built any other way then it means developers are retarded. In your case try to make clean and reconfigure (this time out of tree).

I just discovered, by accident, that Windows Powershell Scripts have their own IDE pre-installed on Windows 10

>i have nothing to say on topic so i would spray vague nonsense so people won't notice i came from Sup Forums to shitpost
it is high-level pajeet meme though

Explicit handling is always better than magical implicit handling of an error 50 calls down the stack that you magically forget and crash your application.

This book
ict.ru.ac.za/Resources/cspw/thinkcspy3/thinkcspy3.pdf

I've just been doing the exercises in it or trying and failing to do 80% of them.

Python is fine tbqh. The order is usually recommend is C (also usual software engineering practices aka version control and how to build, also with syscalls and other system knowledge) -> Haskell/OCaml with a bit of theory -> anything you like.

Pretty sure the ISE has been pre-installed on Windows for more than a decade now.

Next thing you'll say
Monads are "high-level pajeet meme though"

Not very surprising coming from a C toddler

see

This book is amazing. Lately I've been working through it and implementing the various presented data structures in Haskell.

Now I feel like I understand the ideas behind the data structure much better than after slogging through CLRS using C++ (Inb4 "there's your problem").

It's kind of crazy to see how much of the complexity in the implementations of the CLRS algorithms come from requiring in-place operations (which prevents you from reusing the overwritten data) rather than from the basic high-level idea. In many cases implementing persistent versions is a lot easier.

The fuck is this shit? Grab a copy of "The C Programming Language".

>The C Programming Language
EWW C A N C E R

What's your motivation to learn programming? Do you enjoy it? Do you enjoy learning and progressing your knowledge? Personally I could never have seen myself go down this path if I didn't enjoy programming, solving problems and constantly learning. All of those things do of course involve struggling, and it's a huge part of the practice of programming you have to learn to love. You should reflect on that.

Too bad pure FP is will always be niche.

Norwich, England. There's plenty of demand around here judging by the amount of jobs posted but I probably get filtered out due to not having any qualifications.

But saying that I have two friends who graduated from the UEA with degrees in comp sci and can't land a relevant job.

I learned programming so I could shitpost on /dpt/

...

Reddit sent me here

It was fun at first. But now that I'm lost it's not fun anymore. I feel like I'm stuck in quicksand. I'm lost. I don't know what to do.

Fine, fuck off to daijoubu.org/bun/

Use a language that let's you sketch out your ideas, like Lisp.

Fuck off with your reddit thread.

That's a pretty nice forum

Why does every code monkey on reddit call himself a software engineer? Do they not realize that software engineering is a different thing altogether?

If anyone here is familiar with the Haskell ecosystem, what would you suggest as a replacement for the standard prelude?

How would you know? Are you yourself a plebbitor? Fuck off.

Common Lisp.