/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

youtu.be/CHLzbscw1kE
kickstarter.com/projects/1327597961/better-support-for-mt7620a-n-in-openwrt-lede
ccs.neu.edu/home/matthias/HtDP2e/part_preface.html
en.wikipedia.org/wiki/Xlib#Example
en.wikipedia.org/wiki/Alternative_facts_(law)
bountysource.com/
tour.golang.org
github.com/golang/go/wiki/GoForCPPProgrammers
appliedgo.net/generics/
github.com/ocornut/imgui
github.com/vurtun/nuklear
github.com/andlabs/libui
github.com/Sup
twitter.com/SFWRedditGifs

skewed prng

youtu.be/CHLzbscw1kE
Go > *

Lets write a business app that will make us all money

Why are there no good cross-platform GUI libraries for C?

rewriting the Linux kernel in CLisp

Just finished a very useful function in Haskell. It truly is a beautiful language.

f x y = liftA2 ((join .) . (:)) (pure x) (many' $ liftA2 (on () pure) x y)

Is Rust white and based? Should I learn it?

this
someone design the logo

Rust only accepts trannies.

...

I can pretend to be one. Is it a good language?

Why can't we treat CPU like we do with GPU and have drivers for it?

So no more Linux x85, Linux x64, Linux ARM, etc...

But a General Linux and different drivers depending on your CPU.

rust turned me into a girl (male) still with bengus

we need a great ideas guy for a unique and creative solution

ncurses

SDL

a pointer to video memory

They require a timestamped pic of your mutilated genitalia when you sign up.

Also no.

do you have a feminine penis?

Serious question, isn't there a website where I can request with other people something, like in a bid, and programmers can join and get money by doing it?

Programmer making better drivers like this guy kickstarter.com/projects/1327597961/better-support-for-mt7620a-n-in-openwrt-lede have a good idea. Why the fuck we don't see more?

We're gonna use agile + scrum and maximize our ROI with inclusive business practices

That's an oxymoron.

yeah i |bepis| unsafe { transmute(bepis) } it

because it's C

you're not supposed to write GUI stuff in it

how is this different from any other ROI software with the same business practices?

>They require a timestamped pic of your mutilated genitalia when you sign up.
I have a negro who is willing to give up his manhood. I will pretend to be him for bonus negro points.
>Also no.
Why?

So then how do people make GUI applications in C?

it connects to your iphone

Rust will be good in 5 years, I promise

With great pain and anguish.

Win32 on Windows.
Don't know about others.

This picture has nothing to do with C

Thank you for posting a cat image.

Please continue to make new threads. You can even make them early if you like.

or programming
or Sup Forums
or Sup Forums

we need a game changer app that will disruptively synergyze and leverage our long term organic growth, and start a paradigm shift that will influence and innovate the big data coopetition

Xlib on Linux, but it's a pain.
There's also GTK et al but honestly it's all crap

To the guy in the last thread- you recommended the book "How to Design Programs". I'm looking at it on amazon right now, is 22 bucks a decent price for it (used)? Also, I see it was written quite a few years ago, is the information still accurate? Or is this more a guideline type of book that explains core concepts and ideas, not necessarily "type this code that actually doesn't even work anymore because it's outdated"?

So then why did I waste all my time learning C if I can't even make GUI applications with it?

Complete text is online for free.

Also that is a very good book.

I didn't say you couldn't, I just said it would cause you great pain and anguish.

Why can't you?

you can't claim that and Dennis Ritchie is dead

>C-at

ccs.neu.edu/home/matthias/HtDP2e/part_preface.html
Get cracking.

>So then why did I waste all my time learning C
you've been trolled

en.wikipedia.org/wiki/Xlib#Example

Alright cool. I'll buy a copy, I like having a physical book. I get distracted when reading online and end up shitposting on here instead (like right now).

Thanks. I'll post my code for that exercise once I get it working to get your opinion on how it looks if you don't mind. I've figured out how to print the smallest and largest number, working on getting it to add everything together in the vector now.

>you can't claim that
free speech faggot

Second edition is significantly improved over the first, so I'd recommend the online 2e.

Happy hacking. This book and language are probably the best possible start to learning to program.

>alternative facts

gb2 pol

Nice work.
Note that HtDP does definitely not teach C++ so if you are really attached to that language you will have to re-learn it. But HtDP gives a good foundation to programming in general

Stop using that phrase incorrectly:
en.wikipedia.org/wiki/Alternative_facts_(law)

you should learn Java it will be more useful to you as a programmer

can people still get programming jobs without a degree of any kind? All I want is like 30-35k a year, what should I learn and where should I learn it?

...

Reminder that you can make money by completing open-source bounties bountysource.com/

why can't they just make c# as fast as c++ so nobody has to live through the c++ hell

Does anyone have the picture of of programming challenges/ objectives on it?

learn Go. easier than those two, great support, lots of features
start here tour.golang.org

...

anime, cats, and programming go hand in hand

stop shilling your shitty,templateless language

>templates
the shittest kind of parametric polymorphism

>using createJS for a class
how the fuck do I see how many sides a polystar has? polystar.sides doesn't return anything

>its shit because i dont have it
wwwwwwwwwwwwwwwwww

but how can you combine the 3 into 1 product

What are you talking about?
Haskell has parametric polymorphism.
And it's not some template shit.

what is a framework?

github.com/golang/go/wiki/GoForCPPProgrammers
appliedgo.net/generics/

Is there any benefit to using C++ when I can perfectly implement my project purely in C code?

>t. leftist pajeet

Strictly speaking, no. In reality it will probably be easier even if you can occasionally use C++ features.

github.com/ocornut/imgui
github.com/vurtun/nuklear
github.com/andlabs/libui

Thinking of making some sort of Sup Forums desktop browser app (similar to clover, but desktop only, like the "messenger" standalone app). Would this be similar to building a small-scale browser? And more importantly, how should I go about learning how to implement certain features?

Pic semi related. I actually sort of want to do this but will fully admit it's really stupid

Sup Forums has an official api. Look at that and go from there.

github.com/Sup Forums/4chan-API
Learn how to parse JSON in your language of choice, essentially.

Yes. Stop being a wanker and use a normal language.

Sounds pretty trivial, something more useful would be a program that scans through a specified board every X seconds and alerts and links you to threads or posts that contain some search terms you've entered

Alright, I've got it working. Here's my code.
#include "R:\C++\std_lib_facilities.h"

int main()
{
cout > dist; ) // for loop, when numbers are input, store them in dist
distance.push_back(dist); // take the dist numbers and put them at the end of our vector

double sum = 0; // initialize a way to add values of dist together
for (double x : distance) sum += x;

sort(distance); // sort ths dists so it'll be in numerical order so I can output the smallest and largest (this seems janked)

cout

the API makes it easy to read threads and even whole boards
pick a language and go to town

Also note that I am fully aware that using namespace std is terrible practice, but that's how Bjarne has it set up in the file I have listed in the #include (he's mentioned several times that it's bad practice in the book, but that file is what he's instructed me to use). But I trust his judgement and will use it for now since that's what he's said to do.

I was also thinking of adding an automatic reply notification (checks every 10-ish seconds for updates/replies to your posts)

wait you're using "std_lib_facilities.h" in a book other than "Programming: Principles and Practice using C++"? I'm going through that book and it seemed like he made that header file specifically for it

I made a python script that could download all images and piped thread information to desktop display.
Was pretty neat unfortunately I lost the code.

I asked on stupid questions thread, but no reply.

Can anyone give me a link to something that can explain how to link libraries, make makefiles, etc.
I keep trying to use libraries in C and really have no idea how to link them when I compile with clang.
like math, stdlib, etc

I am currently reading through "Programming: Principles and Practice using C++". The other book I was discussing earlier (How to Design Programs) was recommended to me in the previous thread, so I plan to read that once I buy a copy. Sorry for the confusion.

To clarify- yes, I am currently working through Stroustrup's PP&P using C++ right now, and the code I posted was from an exercise I just finished in chapter 4.

>tfw you are all plebs at programming

>chapter 4
literally going through chapter 4 right now

Want to work together?

i've almost recreated what took me 30 minutes in c# in c++ and it only took like 5 hours

holy fk

I'd love to. There's so much I feel like I'm not understanding.
How far in are you? I just finished exercise 2 at the end.

impossible, what are you making

>#include with an absolute path

If with the skills I have I am considered a pleb I feel bad for you user

...

I can finish up the chapter and get started on the drills/exercises real soon. Contact info? (or, if you're really paranoid about putting it on Sup Forums we can just use a really specific common interest on omegle)

thanks for using an anime image

How am I supposed to free fields within a struct once I'm done with them (after I loaded them in a hash table with malloc)?

free(object->field)
free(object)

How about a self-driving car neural network which leverages the internet of things?

How do you get The Sims working on W10? I couldn't get it to run right.

Like I've said many times, this isn't some masterful state-of-the-art shit I'm doing over here, I'm working through a beginner book that says for now I should do it like that. I'm gonna go ahead and trust the creator of the C++ language over someone that calls themselves "Ruby Senpai" for now.

Cool. I just set up a dummy email-
[email protected]
shoot me a message there and we'll figure shit out.

It's actually Windows 8.1 I'm running. For old games, it would be wise to set up a VM. I have one that runs x86 XP for Baldur's Gate and the like.