[ / / / / / / / / / / / / / ] [ dir / dempart / gfl / leftpol / lewd / schweiz / vg / vichan / wmafsex ]

/prog/ - Programming

Catalog   Archive

Winner of the 75nd Attention-Hungry Games
/caco/ - Azarath Metrion Zinthos

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

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: dd70dffa3355902⋯.jpg (29.19 KB, 680x383, 680:383, 1513536086815.jpg)

0ee160  No.5259[Reply]

Having a million stickies and meta threads was annoying so I claimed the board and cleaned it up a bit. If you have any desires in regards to this board I'd like to hear them; what rules should we have, what settings to change (e.g. should we have images or not?), should we have banners, should we have a dedicated newbie/QTDDTOT thread, what do you think in regards to the board CSS, etc.

In case you encounter a thread that gives 404, you can fix it by logging in at https://sys.8ch.net/mod.php with the username "Anyone" and password "0", and then posting in the thread through mod.php. You can also post in this thread if you want me to fix it.

In case the board goes up for claims or there's an unresolved problem, I'd like to hear about it in this thread first. Since this board is not fast I may not feel the need to log in too often, but that doesn't mean I'm not active here.

--

/prog/ rules:

1. Common sense rules; no spam, stay on the topic of programming, don't bait for more specific rules, etc.

2. Don't start shit about the languages other people use if there's no good reason to, especially if you just plan to shill another language in it's place. You don't need to be a supreme gentleman or avoid arguments but basically don't shit up the board and derail threads needlessly.

3. Meta is only allowed in this thread.

4. Making new threads for your projects is allowed, but don't beg for people to do things for you, this includes "do my homework" type posts.

Post last edited at

fa31e8  No.5260

Nice. It would be good to have more life in this board. It's not easy to bring life back to a mostly-dead board. Most programmers on the site either don't know this place exists, or remember that it exists and is dead.

I don't have a clue how that Attention-Hungry Games thing works, but it might be worth entering /prog/ in the next one.


0ee160  No.5261

>>5260

It might also be that some of the few who came here stopped because a sticky thread suggested this board was about to be nuked for a whole month, and according to the settings only mods could make new threads, unnecessarily strict rules etc.

There's only a ~1/45 chance of winning attention hungry games per week and it has the adverse effect of attracting shitposters if you do, but it could be useful for a push of awareness. I don't think I'll submit /prog/ to it myself, but feel free to if you want to.


000000  No.5311

It would be nice if this place was more active, since the start of this year /tech/ has been filled with /g/-types who can't program and instead shit up the board with consumerist shit.


293ab4  No.5312

>>5311

I feel you. /tech/ was already filled with idiots beforehand, but it's gotten really bad recently. For what it's worth, I'm monitoring this board. Just start a thread about something you want to talk about.




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.

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

852e17  No.5303

>>5293

>gitcoin bounties

what does this look like? can you talk about your workflow for this?

if you find time, a post on some worthwhile hustles like that would be cool (despite it working directly against your self-interest..). I have a lot of spare time and could use some cash or whatever, I'll drop an email if you want


852e17  No.5304

>>5303

oh, and can you expand on

>just trying to use probability to estimate my success

it sounds entertaining yet pragmatic


c868cb  No.5307

>>5293

Newfag here.

Can this help me rebuild my forgotten math background from 0? Third world education more or less didn't care as long as you passed.


3ae53a  No.5308

>>5307

Yes - there is a section in the guide that specifically addresses this concern. Specifically:

>https://functionalcs.github.io/curriculum/#sec-2-3

Start now, go fast, and don't look back.


c500fa  No.5310

>>5308

This is me.

>>5307

Thank you, that will help me alot.




File: 1441181852069.jpg (66.74 KB, 573x459, 191:153, heart.jpg)

6c1915  No.3182[Reply]

>C without pointers

>Haskell without monads

>Java without exceptions

>Python without whitespace

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

f22752  No.5281

>>5279

It's been two years nigger, this thread is dead.


11087c  No.5282

>>3986

welcome to rust


000000  No.5283


b7642d  No.5292

All language's have pointers. Even if A language doesn't expose you to the pointer.

You just hate pointers because you refuse to understand how memory works low level. DUMB ASS HOE


b2c809  No.5309

>python without list comprehension or list slicing

it would be so annoying




152758  No.5134[Reply]

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

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

3c9732  No.5297

>>5296

There isn't anything better than these options at least in 8chan. Problem with 8chan is that it's completely under the thumb of goon types, they can shit up every board and manipulate people and the mods into bending to their will and nobody is willing to learn to recognize and ban them.

It's strikingly reminiscent of real world, they're completely ruining our home, but people will defend those guys because they've been manipulated into thinking that unless you let people do whatever they want then you're an evil rulecuck 4chan jew kike femitranny newfag who hates fun and doesn't understand 8chan culture and we need to migrate to a new board that's exactly like /b/.


57b665  No.5298

>>5297

Well, either way this board certainly doesnt suffer from any kind of overpopulation. On topic, a couple of questions:

<Do you use C++ at work?

For me its part hobby part work, graphics programming and geometry processing. Im working towards my Bachelors in CS and wonder if C++ is a good specialization choice, career-wise. I like it for the performance and flexibility, and can‘t really warm up to the other big players like Java or C#, but i have used them. Reading the FQA >>5177, the points make sense, but there isn‘t really a good alternative. Would be interesting however to test if he is right about flawed shared_ptr use and superfluous pass by values outweighing the penalty of a managed language and GC, in the average project.

<Preferred C++ subset

A lot of RAII, shared_ptr and stl containers. Usually not a single new/delete in the entire project, a lot of auto, limited amounts of templates. Little OO and inheritance. Heavy use of ECS architecture, but that is very application specific. No singletons or static initialization at all.

<Preferred and recommended libraries

>cereal - Easy, fully featured serialization, barely any code necessary

>EnTT - Great, very fast ECS with very useful bonus features

>ImGui - Stateless, immediate mode GUI, shit documentation though


d81073  No.5300

https://spit.mixtape.moe/view/a58b07a8

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


000000  No.5305

>>5300




#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

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

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


000000  No.5306

>>5305

>>5300

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




000000  No.5299[Reply]

Can someone help me understand DHTs with Byzantine fault tolerance? I read the wikipedia pages but they it didn't quite click for me. I'm also new to writing P2P stuff.

What is the algorithm, exactly? So I write a bunch of servers that all store some values with some keys and listen on a port. Then I want to query a key.

1. Do I send that key to every server and see which one replies? That sounds very inefficient if I have millions of servers all retrieving values frequently.

2. Is there a way to make it so that the server can't see the information it stores? I suppose I could somehow break up the file but now every query requires many more connections. Would it work if I encrypt the file and break it up into a small number of pieces, say 2, and store each piece on a different server? Even if an individual knew the key it couldn't decrypt even the part that it has.

3. How do I know the IPs of the servers without having a centralized directory?

4. What if the servers sometimes go offline? Is it enough to just store the same key-value on multiple peers and hope that at least one will be up?



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

so

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

imageboard

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.




92ebfa  No.5133[Reply]

Discuss and share C related talks here. K&R, Ansi/ISO, C99, C11, embedded are all welcome.

23 posts omitted. Click reply to view.

967848  No.5286

can someone explain ALL the uses for the -> operator?

i'm trying to learn OpenGL|ES 2.0 for the raspberry pi and don't really know what the fuck i'm doing besides reading K&R once and the code example here ( https://github.com/Apress/raspberry-pi-gpu-audio-video-prog/blob/master/EGL/window.c ) repeatedly uses the arrow operator from a struct to its members, whereas K&R and other resources I've found say it's only supposed to be used for a pointer to a struct to access members.

so for example, if you have a struct s and a pointer to struct s as ptr_s, and the struct has members x and y, what does s->x even do? shouldn't it only be s.x or ptr_s->x?


967848  No.5287

>>5286

nevermind, i'm an absolute nigger monkey. the naming conventions are just horrible in this code, it really is the struct's pointer being passed to a different function and then used with the same name as the main struct. global variables can swallow fat loads.


911fe1  No.5289

>>5167

digital mars has FIRE c++ compiler for windows... high recommend it. Everyone @ rockstar games uses it :)


911fe1  No.5290

GCC: GNU's C compiler, available for almost every platform, and popularly installed on Unix machines.

Digital Mars C/C++: The hackers at Digital Mars have a pretty rippin' C/C++ compiler for Windows that you can download and use for free, and that will work wonderfully for all the code presented in this guide. I highly recommend it.

VC++: Microsoft's Visual C++ for Windows. This is the standard that most Microsoft programmers use, and I freaking hate it. Nothing personal, but I'm one of those crazy people that still uses vi.

Turbo C: This is a classic compiler for MSDOS. It's downloadable for free, and I has a special place in my heart. (It can't handle the "//"-style comments, so they should all be converted to "/**/"-style.)

cc: Virtually every Unix system has a C compiler installed, and they're typically and merely named cc (C Compiler, see?) Just try it from the command line and see what happens!


911fe1  No.5291




82e3e8  No.5212[Reply]

Is there anything about x86 ASM? I want resources on x86 ASM. Does anyone here have any good books or have experienced programming in it.

3 posts omitted. Click reply to view.

085f44  No.5231

Oh and the Zhirkov book is mainly (completely?) x86_64, there are quite a few differences. And '64 has two different calling conventions: one for Linux and one for Windows. They differ in which registers are saved to/retrieved from the stack on function calls.


89cd3c  No.5254

Ugh what a sad reminder of my unanswered stack overflow thread about an x86 problem I'm having. I opened it an hour ago (https://stackoverflow.com/questions/53967161/segfault-when-writing-into-data-segment-even-though-sufficient-space-allocated) or so and not one answer.


835be7  No.5255

Are there any resources for i960 ASM? A huge stretch I know, but I can find almost nothing. The only online resource is some college project which used CTOOLS 5.0 code to create some sort of network.


5b5031  No.5277

>>5255

Well, if you must.. just Wiki the i960, the last external reference listed deals with instruction set.. and then get good at assembly.


6299d9  No.5288

https://software.intel.com/en-us/articles/intel-sdm

https://developer.amd.com/resources/developer-guides-manuals/ (scroll down to the "AMD64 Architecture" heading)

These are the official reference documentation for the x86 architecture.




dc5b95  No.5135[Reply]

Discuss and share HolyC related talks here.

Important: Stay only on the subject of HolyC only. Terry is wonderful but nobody seems to ever focus on his work. This will try to fill that gap.

Some documentation: https://web.archive.org/web/20170531043554/http://www.templeos.org:80/Wb/Doc/HolyC.html

Post last edited at

42ae1d  No.5278

I'll bite. Why? I am fascinated with Terry, love what he did, would love to know more about making ring 0 only OS's work.. but why Holy C? It looks so much like straight C with a ton of exceptions. Why not just use C, like GCC, maybe with some extensions? It would take folks so long to get adept and make programs.


de8b44  No.5280

>>5278

He's no nigger, he made his own compiler.


1b3ed3  No.5285

>>5278

HolyC used to be more like C, but due to the need for the language to work as the shell and the main programming language Terry had to modify the way the language was written. Think how he ones spoke about function pointers how he had to find a new way to represent them in HolyC because of the shell. Terry also wanted to use C as the shell because he never really learned the window batch files or the unix shell.

GCC for Terry had couple of problems

1. GPLv3

Originally terry had a loose idea of selling his OS.

2. JIT

As far as I am aweare GCC does not jit compile any languages..

3. The Size

The feature set of GCC very large and the way how most GNUproject software is written. Means that GCC would take up way too many lines of code and thus either fillup or excede the somewahat arbitrary LOC limit that Terry had. Also GCC has dependencies so those would have to be either ported or reimplemented.

4. Format

TempelOS uses a special fileformat that is somewhat similar to RTF called DolDoc. This is what enebles for the system to have a complex HyperText linking system and for the code to have embeded 3D models, sounds, images and so on. It would propably take a while to implement a proper parser for the format in GCC.




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

1 post omitted. Click reply to view.

3c524b  No.4608

The reason I know that you're LARPing is because your uneducated mind is too small to detect instances of parallel computing (i.e. distributed computing) in the real world.


3c524b  No.4609

>snake oil

hadoop?


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

>>4597

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.

https://www.manning.com/books/c-plus-plus-concurrency-in-action-second-edition

>t. own this myself




51d42d  No.5228[Reply]

Discuss and share Visual Basic 6.0 (not modern version) related talks here.

000000  No.5252

On Error Resume Next


aa60d0  No.5272

God I fucking hate Visual Basic.




406df8  No.5137[Reply]

Discuss and share Fortran related talks here.

This includes all variations (for now), but specify which one you're referring to.

7b9f91  No.5234

How to RICH with FORTRAN?


cc87d4  No.5237

>>5234

sell tutorials to hipsters




bca91f  No.5136[Reply]

Discuss and share Pascal related talks here.

This includes all variations (for now), but specify which one you're referring to.

c365a4  No.5197

begin

writeln('Hello');

end.


23dabd  No.5211

program answer;

const pascal = shit;

begin

write('Pascal is ', pascal)

end.




57c9b4  No.5138[Reply]

Discuss and share Python related talks here.

This includes all versions just be explicit about it.

209d44  No.5190

Gimme some sources to learn python


a9deb7  No.5196




File: 1411372549161.jpg (64.52 KB, 447x553, 447:553, 23456456789.jpg)

706e1e  No.60[Reply]

Does /prog/ need images?

http://strawpoll.me/2622392

Also you can suggest changes (rules, dashboard).
68 posts and 4 image replies omitted. Click reply to view.

706e1e  No.4504

>>2465

>>2467

>>2483

All of you faggots were never on the original /prog/.

Go to >>>/tech/ all of you.


706e1e  No.4593

>>4504

I'm not sure if you're telling them to go to tech to get educated, or as insult like you're exiling them


706e1e  No.4606

>>4593

>go to tech

>to get educated

That ain't happenin


706e1e  No.4626

>>4606

I suppose that depends on your level of knowledge / experience. It has certainly helped point me in the right direction (TOR/VPNs, GNU/Linux, FSF, /prog/, etc)


2cf9ec  No.4767

more textbrowser-friendly sites will go a long way toward reducing internet cancer levels




Delete Post [ ]
[]
Previous [1] [2] [3] [4] [5] [6] [7]
| Catalog | Nerve Center | Cancer
[ / / / / / / / / / / / / / ] [ dir / dempart / gfl / leftpol / lewd / schweiz / vg / vichan / wmafsex ]