[ / / / / / / / / / / / / / ] [ dir / 8cup / ausneets / choroy / dempart / freeb / magali / strek / vichan ]

/prog/ - Programming

Catalog   Archive

Winner of the 83rd Attention-Hungry Games
/strek/ - Remove Hasperat

May 2019 - 8chan Transparency Report
Comment *
Password (Randomized for file and post deletion; you may also set your own.)
* = required field[▶ Show post options & limits]
Confused? See the FAQ.

Allowed file types:jpg, jpeg, gif, png, webm, mp4
Max filesize is 16 MB.
Max image dimensions are 15000 x 15000.
You may upload 5 per post.

File: ce71e181dd0efc2⋯.png (29.77 KB, 600x315, 40:21, 4130ADA2-3703-4A6F-985A-B7….png)

efdacb  No.5417[Reply]

Hi, i am with the Haiku project here.

If you never heard about it: “Haiku is an open-source operating system that specifically targets personal computing. Inspired by the BeOS, Haiku is fast, simple to use, easy to learn and yet very powerful.”

The project have serious lack of manpower, this is why am i here.

Haiku and the HaikuPorts project searching for devs and experts for the following areas:

- CPP developers

- Go port developers

- Python experts

- driver developers

- marketing magicians

- media related developers

- infrastructure operators

- translators

And many more!

Join today!

https://www.haiku-os.org/ and


Sorry if this unrelated here.

I stay hete to answer your eventually questions.

Thank you guys!

efdacb  No.5418

Almost forgot: if you have any reasonable, non trivial idea the Haiku Inc can pay you to make the development. You just have to send a proposal to the Inc ad to the development mailing list.


c6dba5  No.5421

I personally don't care to support Haiku because according to the GNU project, the Haiku project it "includes some software that you're not allowed to modify. It also includes nonfree firmware blobs."

28eb28  No.5423



I'm curious about this, is it true?

I wish the team luck in getting past the beta state, in any case. I don't see clear direction for the project beyond R1, but it's an outside impression. What is the vision, why should we care?

File: 1439697368517.jpg (179.29 KB, 480x710, 48:71, 9780262019347_0.jpg)

c71b16  No.3034[Reply]

This guide assumes you forgot everything from highschool. No you don't have to learn any of this in order to program you can just start hacking around every .c file in your kernel.org git source clone and see what happens. Why would you want to learn math? Because it will change your thinking. You won't be easily fooled by bullshit, you will have tools to sort through obvious logical fallacies. You will be able to optimize programs and create your own algorithms. You will be able to estimate. Above all, you will be able to solve problems using computation which is what computer science is all about. And least of all, you will get paid more than anybody else without this knowledge so if your goal is shekels then read on. Note: DO THE EXERCISES. You won't learn otherwise. Books instead of video lectures were chosen because they've lasted 30+ years some of them in relevancy in the field, also lectures disappear all the time like when MIT nuked all one prof's Physics OCW lectures because he tried to pickup a student, setting a precedent that at anytime this information can disappear. Read a book nigga.

Math Preliminary

Basic Mathematics by Serge Lang

Buy/Pirate this book (he's dead). It's highschool math, from the perspective of a Mathematician. You will learn up Pre-Calculus and be prepared for rigorous proofs later.

An Introduction to Mathematical Reasoning" by Peter J Eccels

This changes you from rote drilling and being a human calculator in highschool to learning what math actually is, and what proofs do. Excellent, excellent book.

How to Solve It by G. Polya

How to do proofs, written in 1940s and still for sale in every Chapters/B&N bookstore to this day because it's the best proof helper that exists.

Welcome to Proofs

Calculus" by Spivak

Actually, you are learning ANALYSIS, in addition to calculus. Torrent the 3rd edition w/the answer book. This is a fucking hard assed book, you may be bePost too long. Click here to view the full text.

248 posts and 19 image replies omitted. Click reply to view.

8f2ae9  No.5384


Always try to get an intuitive understanding( don't be afraid of using images to get the point across). Don't fall for the memorizing formulas trap like I did for most of my pre-University education

When I stopped believing that math was supposed to be hard, I started finding ways to understand it. Now, I ace most classes and I spend my spare time learning about automata

beb48d  No.5395

One of the best threads I've seen in my entire life.

d60d13  No.5397


Brilliant Post OP

d52371  No.5414


I hope so because I'm the OP, and it's cringe to see my old self preserved years ago shitposting on cruise control in the dungeons of the internet (how do I sage myself), usually after being all night at a concert/bar and wasted off my ass . Back then I was listening to Burzum - Fallen nonstop after drinking where you're alone in those early hours hacking away doing something stupid at 4am, and there was a paradox in the lyrics I chased down which got me interested again in academia. During this period I was working a really awful working class labour job with tons of overtime, essentially back breaking labour. Then I started to do the texts that everybody said were 'impossible' to do. But I did not do these resources correctly, I basically just read them, did a few exercises, thought I knew the material, went into full naive scientist mode and then ran into a brick wall later doing more advanced material, I had to go back and re-do everything. So that is what https://functionalcs.github.io/curriculum/ is, it is a redo where I realized I did a half assed job the first time.

Anybody reading this in (current year), I'm going to redo the math section, and throw out most of this, primarily shilling Apostol as the best way to build your math skills but I'll include my own notes, I wrote a small book for every resource which again, I take for granted that it helped me learn these topics.

The university job I had I didn't have a degree at the time, and you don't need one either. All univeristies hire for research programmers and local students don't take these jobs because they don't pay enough and they are off chasing that startup gold or trying to intern for FAANG (Facebook, Amazon, Apple, Netflix, Google). So you can weasel your way in, especially if you know specific skills like say, the 15-210 parallel algorithms text which was directly responsible for me being hired. Once you get in, you now learn directly from PhDs, on a daily (or in my case weekend) basis. Then you will see how somebody at that level operates in real time, showing up and telling you how they spent 4 hours that morning digesting some incrPost too long. Click here to view the full text.

f5eaa4  No.5422


This. As long as you understand what mathematical relationships mean, then you can understand why the mathematical relationships work. To be able to do this requires a solid background understanding in fundamental mathematical ideas. Go back to the basics and understand "why" rather than memorizing "what".

File: 41e97c61f74be8d⋯.png (76.34 KB, 500x500, 1:1, competitive-programming.png)

c263cc  No.4405[Reply]

ITT we discuss Competitive Programming , is it useful ? have you tried to be part of team >> etc.

1 post omitted. Click reply to view.

c263cc  No.4433

I'm classified for the regional competition of the acm. Didn't try the other ones.

92bc33  No.5374

For real life it's more useful to just work on projects, but I believe learning to solve hard problems on comp. prog. sites really does give you some form of divine intellect.

27a1f7  No.5383

It's probably most useful if you're a researcher in algorithms or something.

942085  No.5415

I've done some of this.

Anybody interested here's a good resource: https://contest.cs.cmu.edu/295/s19/

If you're American join the USACO Training program https://train.usaco.org/usacogate it's probably the best training to go from beginner -> strong competitor.

Topcoder and all that junk, I never bothered with. The only thing you should be doing on Topcoder is claiming bounty's for writing features (this is how Topcoder works, they post a feature they need, you write it, they give you the bounty). The actual online competition and whatever is meh, you should physically enroll in a competition if you're truly interested and build a team.

730992  No.5420


There's utility in experiencing different software requirements. I'm an experienced programmer that's spent much time writing business software. I've recently started learning about game programming and I've picked up many kinds of techniques and lessons that I can apply for my work in business software.

File: 55271e1daa3654f⋯.jpg (19.37 KB, 334x302, 167:151, Morpheus2.jpg)

7bd02a  No.5313[Reply]

What if i told you you can have a programming language that's simpler than Python and faster than C?

24 posts and 3 image replies omitted. Click reply to view.

b4c1b7  No.5394


> all those redundant REX prefixes

8b6e6c  No.5404


Actually programmers spend more time READING their code than writing it. So readability and clean code are really important.

8b6e6c  No.5405



000000  No.5413


munging together necessarily disparate data types in algorithms that require is almost always faster in C++ than C, using C++'s static polymorphism facility (templates).

fe118d  No.5416


See djb's 'Death of Optimizing Compilers' talk.

Pretty much everything is slow as fuck, 1990s tier. If you want something 'fast' you have to hand optimize ie: write your own assembly. Once upon a time these 1970s computer scientists like Dijikstra realized there should exist a high level programming language where you can hand roll compiler optimizations in the high level language, with some kind of special annotations or something. Nobody bothered to do so and so we are stuck with hand optimization in (current year).

That said new languages are coming out all the time in specialized industry, we just don't hear about them like domain specific network programming languages done in probability 'paradigm' languages where you can do annotations for compiler optimizations but they're domain specific, so unless you're into massive networking you haven't heard of them.

152758  No.5134[Reply]

Discuss and share C++ related talks/questions here. All early and later standards are welcome (be explicit).

20 posts omitted. Click reply to view.
Post last edited at

d81073  No.5300


Why the unexpected behavior here? Instead of segfaulting it "fails" silently. Please excuse my lack of understanding here.

000000  No.5305


#include <iostream>
using namespace std;

void swap(int * p, int * q){
int temp;
temp = *p;
*p = *q;
*q = temp;
cout << "Hello" << endl; //this is the unexpected behavior point; cout does not work if int is passed to int* but it also doesn't just crash or not compile; why the unexpected behavior?

int main(){
int c = 5;
int d = 10;
swap (c, d); // this should be swap(&c, &d) yet this DOES swap the values but does not cout as expected or segfault
cout << "c is set to: " << c << endl;
cout << "d is set to: " << d << endl;
return 0;

It's because you are not calling swap, you are calling

. It's getting included indirectly through the
#include <iostream>
, and when you write
using namespace std;
the entire contents of
gets brought into the global namespace. You have written a
with a new signature, so that is fine, it just becomes a new overload. When looking at the
call, the compiler performs overload resolution, and decides to call
because that is the overload of
which matches your arguments.

See https://en.cppreference.com/w/cpp/algoritPost too long. Click here to view the full text.

000000  No.5306



You can prove this to yourself by deleting your swap function, the code still does the same thing.

fc0da5  No.5320


I swear, everytime I see a post like this, C++ is involved. But seriously I think this explains why "using namespace std;" is a bad idea. Beware of what you make implicit.

000000  No.5412


>everytime I see a post like this, C++ is involved

this is a mistake even easier to make in C anon, as you and anon just demonstrated. The value semantics of good C++ as (opposed to anon's C-with-classes code) eliminates this issue. For example, this behaves as anon expected and calls his fubar version instead.

#include <iostream>

void swap(int a, int b) {
// fubar

int main() {
using namespace std;
int a{1}, b{2};
cout << a << b << '\n';
swap(a, b);
cout << a << b << '\n';
and as you said, beware of ignorance.

File: befc86f94e2f0e0⋯.png (143.37 KB, 600x600, 1:1, thonk.png)

44f17b  No.5396[Reply]

is it wise to write a password manager in an high level language like python?

bdcfe1  No.5398

Yes, why wouldn't it be? A password manager is as secure as its handling of the data, including how it handles secrets in memory and in permanent storage. In fact, a high level language would be preferable for a password manager, as you don't need high performance and safety from buffer overflows and other memory exploits is ideal.

7d5fd3  No.5399

I would say it's less safe because of the popularity of Python.

bdcfe1  No.5400



7d5fd3  No.5411


I didn't give it much thought to be honest. Consider it a shitpost

File: 8d9e72129983fc2⋯.png (14.65 KB, 800x400, 2:1, https.png)

4a8220  No.4564[Reply]

I'm making a Node.js application for the first time without a tutorial and I am trying to use an external API someone else made to grab data.

I am getting a mix content error in the console log whenever I try to call the API because it is HTTP and not HTTPS.

I deployed on Heroku and Heroku is of course secure/https.

I have no idea how to convert the HTTP API into a secure HTTPS link.

Please let me know what tools I need and how to go about it. I have a feeling NGROK may be useful but I am pretty lost with this problem.

4a8220  No.4566

I am doing the GET through an AJAX call which gets activate onClick.

4a8220  No.4572


var options = {

url : '',

method : 'GET',

strictSSL : false


6a59c5  No.5410


Your application should proxy the requests to avoid that.

fe8ac7  No.5336[Reply]

Share your experiences with this awesome community. How did you become interested in programming? Why did you decide to learn programming? Where has this knowledge brought you in life?

7 posts omitted. Click reply to view.

05c591  No.5401


>be me, 10 year old kid

> surfing the internet

> wow, making programs and computer obey my commands is awesome

> start to learn HTML

> make my own website around 2013, there was a free hosting service and an unicode domain of .vn was free (https://www.vnnic.vn/nhadangky/tintuc/cấp-phát-tự-do-miễn-ph%C3%AD-tên-miền-tiếng-việt-28032011) use a translator if you want to

> several years later, learn c and c++

> "hack" to the root of poor secured or abandoned websites

> see memes, i know the history of memes since 2008

> make some friends over the internet

> no friends irl

> become a weeb

> still a failure, i haven't produced a completed program

> stupid and lazy to code

> i like computers, that's it

bee4dc  No.5402


>start to learn HTML as a ten year old

>make own website in 2013

Wait a second

05c591  No.5403


What's the matter? I was born in 2002. The website was index.php and some shit no one wants to see.

08e520  No.5406

I received a home computer and I started reading the manual for how to work with BASIC

0fe6c4  No.5409

I liked math but I thought computers were gay, etc...

Then I started learning about Discrete Mathematics. If you know what it is, then you know how it's the link between mathematics and computing and I didn't stop.

File: 3fba14b8e7c6895⋯.png (69.67 KB, 286x306, 143:153, question 2.png)

2fe555  No.5324[Reply]

Hi I'm been amateur programming for years and now go to school to learn it.

I've always been confused about what the best practice is for declaring variables. When I first did programming in highschool we were told to declare all the variables at the top of the scope (I guess for the convenience of the teacher) but also see people declare them in the middle of the code as needed (like a counter right before a while loop).

So redpill me on the variable question. Logically declaring it right before needing it seems like the best thing to do.

7 posts omitted. Click reply to view.

dbe966  No.5363


honestly this. Many linters will give you a warning that you have too many local variables, and it's true. Local variables are helpers, and they should be set directly before they are being used. If you have a bunch of local variables, either use class/static parameters directly or split up the function. You probably don't need all 16 variables for the same thing, and if you do, put them in an array or something.

dbe966  No.5364


this so much this. CS niggers in college will try to follow rules and make their code "super-readable". Newsflash: no code is readable. You just have to make is the most understandable, and even that will take a lot of rewrites before you find that yes, this way is the most optimal way of solving the problem at hand. So just do what seems right, get the functionality, and then review and see if you can make sense of the code.

ff69cb  No.5365

>So redpill me on the variable question. Logically declaring it right before needing it seems like the best thing to do.

Yes, this is best. It's not 1981 any more so we don't need to carry on antiquated practices that were required for the limited memory of the day.

01d309  No.5407


Just declare them so that the program can be maximally readable to all the people that are working on the code. If it's just you, then do what's most convenient to you.

f2b739  No.5408

It doesn't always make sense to put everything on top.

If say I need a temp variable that I'm only gonna use in a "for" then I'll create that variable on top of that "for" that way everyone knows that that variable is only really used there.

57c9b4  No.5138[Reply]

Discuss and share Python related talks here.

This includes all versions just be explicit about it.

1 post omitted. Click reply to view.

a9deb7  No.5196

7f0eed  No.5378

Hey, I'm learning Python, specifically Python 3.6. I came across an issue involving tuples, specifically with:


Whenever x is a variable defined by an input, it gives me a value error saying it is not in the tuple. Is there some work-around?

I can provide the original code and error message as needed.

4219bc  No.5379


if i remember then input is a string and needs to be convertet to an int if you want to use it with index

479b6a  No.5391



"""8. index raises ValueError when x is not found in s. Not all implementations support passing the additional arguments i and j. These arguments allow efficient searching of subsections of the sequence. Passing the extra arguments is roughly equivalent to using s[i:j].index(x), only without copying any data and with the returned index being relative to the start of the sequence rather than the start of the slice."""

While this is poor design, it is documented behavior. The workaround is:

>>> import operator
>>> import functools
>>> def seqindex (seq, item):
... return next (
... map (operator.itemgetter (0),
... filter (operator.itemgetter (1),
... enumerate (
... map (functools.partial (operator.eq, item),
... seq)))), -1)
>>> seqindex ((1, 2, 3), 3)
>>> seqindex ((1, 2, 3), 4)

7f0eed  No.5393


OP here, fixed the code, works fine now. I appreciate the help.

f0ebf0  No.5385[Reply]

I'll have an internship at back-end of some huge service. But I've never programmed anything more serious than homework or site with 3 pages. What should I learn or do in order not to fuckup at my work?

Someone's advised me to read SRE book. Will it help?

f0ebf0  No.5387

File: f54bf0321f7d31a⋯.png (421.16 KB, 570x367, 570:367, 15572540937850.png)


5492fc  No.5388

Keep your mouth shut and listen for the most part. If someone suggests you to do it a certain way, do it and then show it to them they'll appreciate it.

5492fc  No.5389

Also the redhead is obviously the hottest one

f0ebf0  No.5392


Thanks, it's obvious but important.


Oh, she is.

File: c254f3cd9699aae⋯.jpeg (9.75 KB, 195x258, 65:86, maxresdef.jpeg)

3c524b  No.4597[Reply]

Is it snake oil garbage or is it really relevant?

What are some simple application that could be made better by using parallel computing or anything to play with OpenMP

2 posts omitted. Click reply to view.

3c524b  No.4609

>snake oil


3c524b  No.4620

Apply a map to an image. This is an awesome example of SIMD computing.

Anything that's isomorphic to the above example is also a good example, and there are a lot of those.

3c524b  No.4643


This free CMU book will show you all the algorithms and data structures that can benefit from being run in parallel http://www.parallel-algorithms-book.com/ which is a ton of things

000000  No.5274

It's certainly not snake oil OP. With multi-core cpus if you don't program intentionally to take advantage of them, then you are leaving a metric shitton of perf on the table. This is currently the best book on the subject in general so I'm shilling it for now.


>t. own this myself

027183  No.5382

how the hell is it snake oil? its insanely useful. never read the book in your image but parallelism and concurrency are important concepts to know

File: 6fc01fa32961dee⋯.jpg (1.17 MB, 2816x2624, 44:41, TIMESAND___QDRH.jpg)

8c7996  No.5380[Reply]

I have this disproof of the Riemann hypothesis and I want to use it to come up with the general solution to RSA encryption, and actually all prime factorization encryption algorithms. After disproving RH, what is the next step? Also, thread about RH.

File: 1450922815492.png (509.25 KB, 793x457, 793:457, jurassic_newman.png)

51e035  No.3753[Reply]

>Be me

>work in low-level kernel/driver development

>Working long nights to get everything done as soon as I can

>bi-annual performance review comes up

>MFW my boss says he's disappointed because I don't talk to the other employees

>apparently its a problem that none of them know anything about me

What are some fields where I can find a programming job that doesn't involve talking to normies or anyone else? I'm a motivated self-learner who's willing to do whatever it takes to get the job done on time as long as it doesn't involve interacting with other people.

8 posts omitted. Click reply to view.

51e035  No.3904


interact with your coworkers about work stuff.

also every once in a while let yourself be drawn into a conversation. i know it sucks pretty badly most of the time, but it usually doesn't take very long and you can do it why you're getting coffee.

51e035  No.3911


>empowered® female CEO

And that's why I'm considering starting my own business.

51e035  No.3914

This pretty much depends on your boss. Extroverted people tend to feel scorned if you don't talk to them, people who have worked as programmers themselves generally don't care.

Also OP, you could casually drop that you are a brony/furry into a conversation and your co-workers will stop caring that they don't know about you.

d3ab1f  No.5366


where would you scout for jobs? GA here

27005a  No.5373

>work in low-level kernel/driver development

For me, that was the job you could go to work and leave without talking to anyone. Apparently I was wrong. I have worked with development and I rarely did talk to other people, and still no complaint about it.

File: aa70a04d74d6ff7⋯.jpg (15.29 KB, 259x194, 259:194, download.jpg)

05128b  No.5294[Reply]

my first thread here ,my friends suggested to me this site so if its the wrong board suggest me the right one


running out of time

anons , i have a project for uni

i must create a website and i only have sum days left

when it comes to programming i have no problem

the problem that i dont have any ideas for the content of my website

its not a big thing

its like a website for an online library when a customer can check books , loan and order them or a website for an online school ,bank and that shiit

but the fuckers my mates took all subject and here i am with just a week left

anons any ideas or examples of content for the website ??? i really need help

any thing that comes to your mind anons

1de77e  No.5295


reference manual (asm, c, wireless cards supported by linux, commodore computers) these have the bonus you might actually want to USE it later. a full z80 reference is not very hard to write but it takes some looking around. you can slap together a half-working z80 interpreter in like a week with just very basic c knowledge.

a gallery of high res vinyl album art scans/painting photography sorted by album ID/chronology and artist.

it sounds like you just need a framework so you can just put in empty todo pages instead of content and you're good to go.

d95b94  No.5372


the prjects probably over, so whatd you do?

Delete Post [ ]
Previous [1] [2] [3] [4] [5] [6] [7] [8]
| Catalog | Nerve Center | Cancer
[ / / / / / / / / / / / / / ] [ dir / 8cup / ausneets / choroy / dempart / freeb / magali / strek / vichan ]