[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 318
Thread images: 28

File: sicp.jpg (133KB, 473x496px) Image search: [Google]
sicp.jpg
133KB, 473x496px
Old thread: >>58375309
What are you working on, /g/?
>>
File: 1483623719555.png (19KB, 345x468px) Image search: [Google]
1483623719555.png
19KB, 345x468px
Thank you for using an anime image
>>
how much academic abstraction is really necessary to become a competent programmer?
>>
File: 1482055600767.png (818KB, 1280x719px) Image search: [Google]
1482055600767.png
818KB, 1280x719px
Functional programming.
Last /fpt/: >>58332039

Resources:
>Erlang
http://learnyousomeerlang.com/content
>>Elixir
http://chimera.labs.oreilly.com/books/1234000001642/index.html
http://elixir-lang.org/learning.html
>F#
http://fsharp.org/learn
>Haskell
https://en.wikibooks.org/wiki/Haskell
https://0x0.st/pbp.pdf
>Lisps
>>Common Lisp
http://gigamonkeys.com/book
http://www.cs.cmu.edu/~dst/LispBook/book.pdf
Paul Graham's ANSI Common Lisp
On Lisp
Common Lisp Recipes
Land of Lisp
>>Clojure
http://www.braveclojure.com/foreword/
The joy of Clojure
>>Scheme
Little Schemer
The Seasoned Schemer
The Scheme Programming Language by Kent Dybvig
Realm of Racket
Lisp in Small Pieces
>OCaml
https://realworldocaml.org/
http://ocaml.org/learn/tutorials/
>Scala
Functional Programming in Scala (Chiusano and Bjarnason)
Atomic Scala (Eckel and Marsh)
Programming Scala (Wampler and Payne)
Programming in Scala (Odersky, Spoon and Venners)
>Web languages
>>Elm
https://guide.elm-lang.org/
>>PureScript
http://www.purescript.org/learn/

>Theory
SICP
Essentials of Programming Languages
Practical Foundations for Programming Languages: http://www.cs.cmu.edu/~rwh/pfpl.html
How to Design Programs: http://www.ccs.neu.edu/home/matthias/HtDP2e/
Art of the Propagator
An Introduction to Functional Programming Through Lambda Calculus
>>
C# is based.
>>
File: 1474792950875.png (145KB, 702x397px) Image search: [Google]
1474792950875.png
145KB, 702x397px
>>58380194
>mfw i've read how much academic masturbation is really necessary to become a competent programmer
It's not far from truth, though.
>>
>>58380134
I was looking some languages hashing function and it was
long hash(char *string, int start, int len) 
{
int i;
long result = 5381;

for( i = start; i < len; i++ ) {
result += (result << 5) + (long)string[ i ];
}

return result & ((1 << 29) - 1);
}

Is it reliable hashing function? Seems kind of poor to me but then again I don't know shit.
>>
int main() {
char *c = (char*)0;
while(1) { *(c++) = 1; }
}


how come this crashes my pc when i run it? :3
>>
>>58380213
ikr i hate how these faggots only post cpp in here
>>
>>58380263
dereferencing null pointer
>>
>>58380263
You're trying to read address 0
The OS doesn't like that
>>
>>58380194
You can be a competent programmer without being an expert at reducing duplication and writing reusable code, but it helps.
>>
>>58380211
>>58380213

Could learning any of these languages actually get you a job tho?
>>
>>58380254
pro-level
#include <stdint.h>
#undef get16bits
#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \
|| defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__)
#define get16bits(d) (*((const uint16_t *) (d)))
#endif

#if !defined (get16bits)
#define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8)\
+(uint32_t)(((const uint8_t *)(d))[0]) )
#endif

uint32_t SuperFastHash(const char * data, int len)
{
uint32_t hash = len, tmp;
int rem;

if (len <= 0 || !data) {
return 0;
}

rem = len & 3;
len >>= 2;

for (;len > 0; len--) {
hash += get16bits (data);
tmp = (get16bits (data+2) << 11) ^ hash;
hash = (hash << 16) ^ tmp;
data += 2*sizeof (uint16_t);
hash += hash >> 11;
}

switch (rem) {
case 3: hash += get16bits (data);
hash ^= hash << 16;
hash ^= ((signed char)data[sizeof (uint16_t)]) << 18;
hash += hash >> 11;
break;
case 2: hash += get16bits (data);
hash ^= hash << 11;
hash += hash >> 17;
break;
case 1: hash += (signed char)*data;
hash ^= hash << 10;
hash += hash >> 1;
}

hash ^= hash << 3;
hash += hash >> 5;
hash ^= hash << 4;
hash += hash >> 17;
hash ^= hash << 25;
hash += hash >> 6;

return hash;
}
>>
>>58380347
There are a fuckton of C# jobs in the UK.

C# is one of the most in-demand languages here, so yeah.
>>
File: 1382256338826.gif (80KB, 800x600px) Image search: [Google]
1382256338826.gif
80KB, 800x600px
WHY is there no /dpt/ IRC channel?

How is it that these threads are so active, but nobody has thought to make an IRC channel for quick questions?

If one doesn't already exist, how about #/g/dpt on Rizon?
>>
>>58380411
/dpt/ itself is pretty quick
>>
>>58380347
FP is quite big in fintech
>>
>>58380411
>but nobody has thought to make an IRC channel for quick questions?
What makes you think that there has never been an IRC channel?
>>
Text editor poll continues
http://www.strawpoll.me/12023125
>>
>>58380795
>people unironically use anything other than vim or emacs
>>
>>58380819
>people unironically use vim or emacs
>>
>>58380275
c++ sucks so fucking much that linus didn't even write his kernel in it
>>
>>58380411
Why would we need an IRC? 4chan works fine, and I can post pictures. And there are all kinds of other sites if I want to share programs or other shit.
>>
>>58380853
C++ sucked so fucking much in 1990 that linus didn't even write his kernel in it
fixed
>>
>>58380819
i use acme. sure, i had to buy a three button mouse, but it only cost 15 bucks and is worth it for muh button chording
>>
>>58380411
there is #/g/sicp on rizon
>>
>>58380878
>using a mouse while editing
>>
>>58380876
c++ is a pdp-11 assembler that thinks it's an object system
>>
>>58380894
A PDP-11 is a Turing machine, no?
>>
>>58380886
>worth it for muh button chording
also
>says that guy that's never even tried acme
>>
>>58380828
kys my dyde
>>
>>58380894
C++ is what you get when a C-occupied region is suddenly raped and pillaged by roaming Simulas.

Then over the course of the next few decades every single other paradigm wanders by and adds its bastard offspring to the already-polluted gene pool.
>>
>>58380912
If it requires a mouse to be productive then I don't want to try it.
>>
>>58380915
>my dyde
>>
>>58380795
>people actually use Atom for anything
Jesus fucking Christ.
>>
>>58380909
it's one of those lambdas i've been hearing so much about
>>
>>58380929
it utilizes a 3 button mouse to allow for chording and makes it more productive than using a keyboard alone

don't knock it till you've tried it. nothing personnel, kid
>>
File: 1471098631108.webm (688KB, 1280x720px) Image search: [Google]
1471098631108.webm
688KB, 1280x720px
Cute anime girl programming.
>>
>>58380965
It's not more productive than a keyboard alone because - and follow closely here - you have to keep moving your hand between the mouse and the keyboard.
>>
>>58380988
If it's not Yuki, I'm not interested.
>>
>>58381000
you have literally never used acme so stfu you don't know what you're talking about

apparently you've never jacked off either since you apparently can't type effectively with one hand.
>>
>>58381000
I use keyboard-only interfaces, but...

My laptop has the three mouse buttons just below the space bar, and the pad below that. I can quite easily use the 'mouse' with my thumbs while typing.
>>
>>58381026
Congratulations. Some of us have real computers, though.

>>58381024
I type much faster with two hands than with one, as do most people.
>>
>>58381001
cringe
>>
>>58381113
then how do you whack it???
checkmate, atheists
>>
>>58381113
>Congratulations. Some of us have real computers, though.
I've got four, bra. Not counting things like Pis/tablets/servers.
>>
>>58381115
>>58380988
>caring about anime
super cringe
>>
>>58381133
Never said I don't. It's just that I have never needed to use an editor while I "whack it".
>>
is it possible to make an open source multiplayer game fairly hack resistant?

if someone knows how the game talks to the server, they can do anything they want.
>>
>>58381306
No, they can't. As long as the server itself is secure and authoritative they can't do shit except send unrealistic inputs (like a turbo button).
>>
>>58381328
people would be able to make their own clients which could have transparent walls and shit like that
>>
>>58381356
Do a sight check, and if the player can't be seen, don't send updates.
>>
i want to work on the linux kernel, but the learning curve is like the great plains.
>>
File: win2k.png (56KB, 1920x1080px) Image search: [Google]
win2k.png
56KB, 1920x1080px
Yep, I've fucking lost it. First Slackware, now this. This is why WAMPVOIP will never be ready for release.
>>
>>58381394
Flat? It's kind of the opposite.
>>
File: 2017-01-08-145805_644x388_scrot.png (13KB, 644x388px) Image search: [Google]
2017-01-08-145805_644x388_scrot.png
13KB, 644x388px
>>58380134
>What are you working on, /g/?
I just finished the basics of the TUI (using ncurses) for my animu program.
The code is a fucking mess.

Now I need to work on getting my program to talk to rutorrent.
>>
>>58381412
sorry, i'm autistic about the learning curve meme. think about it for a second. a learning curve "cliff" means you attain basically all there is to know in a short amount of time. a perfectly flat learning curve means you spend an infinite amount of time and learn precisely nothing.
>>
>>58381381
This guy wins.
>>
>>58381437
Yeah. The kernel is vast and unknowable.
>>
>>58381575
can't tell if sarcastic. it's pretty intimidating starting from scratch nonetheless.
>>
>>58381411
What are you doing?
>>
>>58381609
I installed windows 2000.
>>
>>58381620
For what purpose?
>>
you wouldn't program a car
>>
>>58381632
guess it's one step up from pounding rusty nails into my ballsack, i know what i'm doing next!
>>
>>58381632
That horrible feeling called nostalgia and this(http://www.msfn.org/board/topic/176300-win2k-kernel32-rewrite-progress/).
>>
I made a cute little front end for youtube-dl so that it downloads songs based on title and artist and finds the correct version based on length.
>>
Might be a stupid question but how best to compile and run C++ code on Windows?

>on Linux
>install g++
>make .cpp file, compile with g++, run

This is how I do it on Linux but what about Windows?
>>
>>58381815
>install msys2
>do same shit you would on Linux
>>
>>58381815
>on Windows
>install cygwin/mingw
>make .cpp file, compile with cygwin/mingw g++, run
>>
>>58380254
One thing I notice, is there any reason you are sending len as a parameter and not just using strlen(string)?
>>
>>58381882
strlen is an O(n) operation. There's a good chance the caller already knows the length of the string so there's no sense in duplicating work.

This is C, after all.
>>
File: diddy.png (129KB, 390x299px) Image search: [Google]
diddy.png
129KB, 390x299px
>mfw I learned about keyboard macros in emacs

Is there a way to write programs that access those macros, taking a text file as input and outputting the result after running the macro C-u 0 times?
>>
>>58381815
Microshit Visual Studio
>>
>>58382103
I bet you could get emacs to do that.
>>
>>58382157
emacs can do anything

except edit text
>>
File: Janky ass matrix.png (263KB, 505x637px) Image search: [Google]
Janky ass matrix.png
263KB, 505x637px
Posting this here because you guys helped me so much
I finally got a minimum viable demo out for my portal thing after figuring out the fucking projection matrix asshattery (fucking look at that thing, Unity can't even display it right. It has an oblique near plane)

https://www.youtube.com/watch?v=9K_Lcf9g_C4

If you have a vive you can demo it here

https://phygon.itch.io/vr-portal-demo
>>
Are there any languages which don't allow use of the free store / heap / dynamic memory at all? Stack memory only, that is. A sort of allocationless world, free from the sins of our fathers.
>>
>>58382315
Such a language would be massively gimped in terms of its usefulness.
Just write C or some shit, and then avoid malloc.
>>
>>58382338
I absolutely agree with you, but I'm just wondering what can be done in a language like that. Surely it can do a base-level taste such as averaging two numbers, but how far can its wings stretch?
>>
>>58382354
You'd be limited to any data structure the size of your stack.

Sure, you could use variable length arrays, but you'd be limited to 10MB per stack frame on a modern system with default settings.
On other platforms, even less.

Just use malloc.
You're not supposed to be using it outside of constructor functions anyway.
>>
>>58381148
anime website
>>
>>58382354
If the stack was infinite then it would be capable of anything, but then again an infinite stack is not really any better than the heap performance wise.

What you should strive for is to use malloc/free itself as little as possible, i.e. allocating large chunks that are then allocated from by your application using different methods, like stacks, pools, etc.
>>
>>58380894
So is c++ really as sub-par as people say it is?

Because I'm in the process of learning it as a first language, hoping it'll help make learning higher-level languages relatively easier in the future.

What other languages can I learn that'll give me a thorough introduction to programming concepts, but be mainstream enough for marketability?
>>
>>58382465
There's nothing innately wrong with C++ because it lets you write pure C and get away with it.

Learn C first and then pick and choose the C++ constructs you like, because it's poor practice to use all of them, and even Bjarne himself is attempting to strip the language down to a more manageable core because the feature creep has gotten so bad.
>>
>>58382465
c#
>>
>>58382465
>What other languages can I learn that'll give me a thorough introduction to programming concepts, but be mainstream enough for marketability?
Unsarcastically, Python. It's what MIT and others teach in their intro courses
>>
>>58382497
>Slower than Jit'd scripting languages

Hahah
>>
>>58382465
I learned C++ while first learning programming concepts like data structures.

I liked it a lot. It made sense to me. When I went to look at other languages they seemed so sloppy to me, in the sense that there were not nearly as many data typing restrictions. I think it's better to be disciplined first and then relax later.

But I'm not a programmer by trade so listen to others.
>>
>>58382465
Learn C first, then C++/Java for marketability.
>>
>>58382465
C will teach you about how computers work, pure functional languages will teach you about how abstraction works. All other languages are basically just mixtures of the two unless you count OOP, which is just its own shitty thing. But you'll still understand how to use it to approximate functional abstractions which is generally what happens anyways.

>>58382490 is also right, but the issue is that everyone and their mother uses their own flavour of C++ and C++ is so versatile that these flavours end up tasting quite different.
>>
Can you fuckers actually help me out for once?
How do you acquire a char from a file in c using getc()?
>>
>>58382564
with that attitude you can fuck right off
>>
I want the text boards back.

Why do people complain about anime in this general when the functional retard are using it because it's their only way to attract an audience, as everyone did for the past 10 years here.
>>
>>58382564
char c;
cin >> c;
>>
>>58382579
How can you any sort of visual progress though.
>>
>>58382564
fgetc
>>
>>58382564
http://lmgtfy.com/?iie=1&q=How+do+I+read+a+character+from+a+file+C
>>
>>58382579
i would also welcome text boards. there's really no excuse not to have at least just fucking /prog/. it's not like you're burning bandwidth on huge amounts of images like the other boards
>>58382588
code blocks
>>
>>58382564
FILE *fp = fopen("filename", "r");
char c;
fread(&c, sizeof(char), 1, fp);
>>
>>58382609
Okay? What if I made some cool visual renderer from scratch or something?

Which one would better show my work.

A fucking screenshot

or 500 lines posted in 20 comments
>>
>>58382642
i don't give a shit about your visual renderer
>>
>>58382613
don't do this it gave me a virus
>>
>>58382642
A fucking link
>>
>>58382564
>/dpt/ - ask the most trivial questions that should be obvious from reading the manpages or are literally the first search results on google
>>
>>58382689
Alternatively
>/DPT/- Ask hopelessly specific questions that the poster has obviously canvassed every other corner of the entire internet attempting to find a solution to, that are almost impossible to solve
>>
>>58382572
>>58382587
>>58382596
>>58382605
>>58382613
>>58382689
>How do you acquire a char from a file in c using getc()?
>getc()?
shit-brained morons who can't read
>>
>>58382763
I don't recall suggesting you use getc in my post, but okay
Seriously, if you can't figure this out, give up programming
>>
>>58382763
literally nobody uses getc outside of their first week beginner programming course
>>
>>58382776
>I don't recall suggesting you use getc in my post
...because I suggested it
Improve your reading comprehension m8
>>
>>58382763
Literallt first google result from "get char from file with getc"
http://beej.us/guide/bgc/output/html/multipage/getc.html
>>
>>58382816
Why the fuck would I use google when you're all my personal slaves?
>>
real shit hours
>>
>>58382816
>Giving the botnet profiling info just because you want to know something
>>
>>58382816
Now post where on that page it gives the solution to my question
It doesn't
I'm starting to suspect that /g really is just a bunch of code monkeys who copy and past from stack overflow without actually knowing anything
>>
>>58382842
I never give my profile info to google since I use wget instead.
>>
File: 1000.jpg (264KB, 1000x1000px) Image search: [Google]
1000.jpg
264KB, 1000x1000px
>>58382853
>getc() returns a character from the specified FILE.
>see example
>replace fgetc with getc
>>
>>58382853
(you)
>>
>>58382853
it's like you're literally retarded
>>
File: IMG_20170107_094452.jpg (4MB, 4160x3120px) Image search: [Google]
IMG_20170107_094452.jpg
4MB, 4160x3120px
What are some good lectures to watch? Im at school but feel like im not being challenged enough. Youtube videos and ocw welcome.

Pic related: my school
>>
File: 1471071482821.jpg (40KB, 342x298px) Image search: [Google]
1471071482821.jpg
40KB, 342x298px
>>58382878
>ask for example to retrieve character
>posts an example of outputting a char instead
>with the function I didn't ask for
Yep, this board is useless
>>
>>58382952
>this board is useless when Europosters are asleep
FTFY
>>
>>58382952
>literally didn't read the page
>let me just post this retarded post
/dpt/ in a nutshell
>>
>>58382952
You cant use getc pajeet
>>
>>58382974
>literally didn't read the page
>posts a useless example to my question
The irony
>>
>>58382984
>You cant use getc pajeet
wrong, just pass a FILE pointer to it, and it will return the first char.
>>
File: bde.png (219KB, 827x1050px) Image search: [Google]
bde.png
219KB, 827x1050px
Stop replying, it only fuels him
>>
Any C# fags in here? Trying to write an RSA signing function based off something I was reverse engineering and they only provide the privExp, pubExp, and pubMod. Is that not enough? I get stupid errors no matter what i do.
>>
https://www.youtube.com/watch?v=xK54Bu9HFRw
Holy moly
>>
>>58383304
Not that interesting desu

Harvard's most interesting stuff is in life sciences, check out Jeff Lichtman's lab.
>>
File: 1311195529158.png (6KB, 281x215px) Image search: [Google]
1311195529158.png
6KB, 281x215px
>>58383304
>all these universities with these fucking cool projects
>mine only participates in formula student
>>
Say what you want about Love2d but the way they do their documentation is top notch
>>
So as I understand it, GL "immediate mode" is deprecated because much of the functions are supposed to be implemented at a higher level such that you have more control over them, and the GL API should only implement a layer for lower level primitives and shaders. So my question is why hasn't anyone written a higher level C or C++ API above OpenGL so that you don't have to reinvent the wheel with super simple OpenGL shaders and the like?
>>
>>58383304
>BIG HERO IS BECOME REALITY WEW
Nice. However, doesn't it seem like a pretty inefficient algorithm to take 6-11 hours to assemble these things, it must have to do with the extremely limited positional knowledge of each robot?

>>58383384
Racket is my waifu language and has absurdly good documentation
https://docs.racket-lang.org/reference/pairs.html?q=racket%2Flist#%28def._%28%28lib._racket%2Flist..rkt%29._take-right%29%29
>>
>>58383563
In practice, every driver implements the fixed function stuff anyways.

There are lots of rendering libraries like Irrlicht, Ogre, etc.
>>
>>58383645
Yeah but absolutely everybody harps about how deprecated glVertex2f is and how I should spend 300+ lines of code just to draw a rectangular image on the screen
>>
>>58383688
You can use the fixed function pipeline with VBOs if you want. No point using shaders if you don't need them but you certainly shouldn't use immediate geometry.
>>
Can someone point me to a resource where I can learn about the matrix math used in GL?

I don't really understand basic concepts like projection matrix or whatever.
>>
If I am working with git and at one point made a branch to test some shit, not all of it was good and I kind of left it for a while, and it's fallen behind the master. How do I 'catch up' the other branch to the master so I can play around with it again.
>>
File: 1482098722581.jpg (1MB, 1482x1097px) Image search: [Google]
1482098722581.jpg
1MB, 1482x1097px
Theres this particular exercise on this book (Cprimer) that requires me to do:

1. Using command line arguments open a file and search for specified char occurrences in the file.

argv[1] being the file and argv[2] being the character to find.

I thought I had everything cover up but now there's some things I don't understand.

So the standard is that I will read a character from my file into a int or char variable named Ch and then compare it to argv[2].

But this doesn't work.

I also realized that I couldn't just ''print'' argv[2] as a character, else I get weird values. I need to use printf("%s"...) to print it as if it was a string, which may as well could be.

I guess where I am trying to get here is that I don't really know whats wrong here.

Comparing the read character Ch from the file with the command line argument argv[2] doesn't give me any results.

Care to explain?
>>
>>58383874
Post code
>>
>tfw have to learn java for next semster
hold me
>>
>>58383913

 #include<stdio.h>

int main(int argc, char * argv[])
{
FILE * file1;
int i;
char c;
int count = 0;

file1 = fopen(argv[1], "r");

c = getc(file1);

while(c != EOF)
{
if(c == argv[2])
count++;

c = getc(file1);
}

printf("%d", count);
fclose(file1);
}
>>
>>58383990
You gotta remember argv is a pointer to a pointer, so what you're trying to do right now is compare c to the address of the second argument.
You think you have an idea of how to fix that?
>>
>>58383861
You'd probably be best off just learning linear algebra
>>
>>58384045
Can you point me to a book for that?
>>
>>58384040

Yeah I guess now that you mentioned the pointer to pointer key words I can do my own research on that and try to fix it.
>>
>>58384056
Have you learned about pointers yet?
>>
>>58383990
main.c: In function ‘main’:
main.c:13:15: warning: comparison between pointer and integer
if (c == argv[2])
^


Don't you have warnings enabled?
>>
>>58384056
Basically, argv[2] is a string (a pointer to a list of characters), and c is a character, and comparing the two doesn't do what you want because it doesn't make sense. e.g., what would you expect to happen if the user entered multiple characters as the second argument?

Also, why the fuck do they always tell beginner C student to fuck with strings and character before they even teach them what the fuck a pointer is, this is absurd. One of these days I'm going to write a C tutorial that doesn't shit in a beginners mouth
>>
>>58384086

The book covered them a lil bit, not much on ''pointer to pointers''.

>>58384093

The book did cover them. Cprimer is really good. It's my fault.

Thanks all.
>>
Is there a way to programmatically find out what sound file is playing on a windows and then output its location? If anyone knows it would be a big help.
>>
>>58384134
>The book covered them a lil bit, not much on ''pointer to pointers''.
Well, if you have a basic idea of how pointers work, I'll give a quick hint. argv[2] holds the address of the second argument you passed to your program. You need to somehow access the value held at that address. I wouldn't think of it being a pointer to a pointer right now because that'll be confusing, just think of argv[2] as one unit
>>
>>58384139
I can't say for sure, but you can find out which application is currently playing sounds and you could probably check which files it has opened.
>>
>>58383862
merge the master branch into it
>>
>>58384212

Yeah based on that I simply used the reference operator to get the value on argv[2] and that fixed the problem.

Thanks anon.
>>
>>58384335
np my dude
>>
>>58380795
>other
https://foicica.com/textadept/
>>
>>58380411
See >>58380879
Plus there was an install gentoo one too.
https://installgentoo.com/services/
>>
>>58380194
I've come to learn that worrying too much about abstractions BEFORE you write code often results in shitty code. Generally I write unabstracted code first, then find a suitable abstraction for it.

This is in contrast to how I used to do it, which was imagine what sort of abstraction would work before writing anything. The results were often terrible because it's a lot easier to abstract code than it is to pull code out of an incorrectly-abstracted system in order to transfer it to another.
>>
>>58384533
This. Premature abstraction never leads to any good.
>>
>Erdős probablistic method
Cool shit. I wonder how applicable it is to irrelevant proofs in dependently typed languages.
>>
>>58381667

You can in lisp.
You can program cdr and cons too.
>>
File: 1481082296889.jpg (41KB, 563x420px) Image search: [Google]
1481082296889.jpg
41KB, 563x420px
https://github.com/baklava151/VirtMachine

Added shift instructions to my VM, think I'm going to get started on the assembler soon. Just have to decide if I want to use D for that too or not.
>>
Do kernel threads run with the current process's page tables or do they switch to the master kernel page tables?
>>
>>58385017
First one if I'm remembering correctly from my giant book on the Linux kernel
>>
why is C so shit at handling UTF-8?
>>
>>58384291
Thanks, I looked into it though and it seems like rebasing is more what I want in this case.
>>
>>58385099
C doesn't handle it at all.
>>
>when paging suddenly makes sense
>>
Can somebody run my fizzbuzz and tell me if it works im on mobile
mwhen p m x =
if p x
then m
else mempty

rwhen p x y =
if p x then y else x

mof y x = (rem x y) == 0

forb =
mwhen (mof 3) "Fizz"
<> mwhen (mof 5) "Buzz"

fb x =
(<> "\n") .
(rwhen . forb <*> show)

fbs = fb <$> [1..100]

main = traverse_ print fbs
>>
>>58384533
This

Which makes me wonder, how proponents of test-driven development even manage to do anything productive?

You don't know the abstractions you need and the behaviour you want before implementing something.

Writing tests before source code and making them a central part of a project seem counter-productive to be honest.
>>
>>58385260
Tests are great if you write them alongside the components. Paul Graham talks about hacking like sketching, you write the code and mutate the design as you understand the needs of the project.
>>
>>58385297
That's not TDD. That's just testing. It's like OOP vs. just using objects.
>>
>>58385260
Wikipedia says that test driven design "relies on the repetition of a very short development cycle", so I guess you just don't plan too far ahead before writing tests and code.
>>
File: 1477366347109.png (300KB, 800x425px) Image search: [Google]
1477366347109.png
300KB, 800x425px
You're not writing unsafe code, are you?
>>
>>58385099

Pretty sure most code that actually works with UTF-8 is in C.

>>58385258

Being on mobile is not an excuse for not having a compiler.
>>
>>58385258
What lang is this?
>>
>>58385337
I don't use sepples, so yes.
>>
>>58385337
C++11 is so good, it's almost like a completely different language than C

If you are using C++ as a C extension or C with classes you make your life harder and make a disservice to the awesome language that is C++

>https://www.youtube.com/watch?v=YnWhqhNdYyk
>>
>>58385337
>auto type deduction
>in my C++?

Is this real life? I don't have to declare variable types?! How?
>>
>>58385391

The auto keyword just means "this thing is the type of whatever is on the right of this assignment statement." Not really difficult to implement.
>>
>>58385405
>Not really difficult to implement.
Type inference is quite the can of worms.
>>
>>58385337
Yes?
>>
>>58385381
>i don't write in c++
>i am the hipster of the programming world that exclusively programs in languages that have 5 collective users

>>58385391
C++11 includes the auto type where the compiler deduces the type at compile time
>>
>>58385462
> Argumentum ad populum
Really made me think, desu
>>
File: 1437553658465.png (107KB, 424x370px) Image search: [Google]
1437553658465.png
107KB, 424x370px
Has anyone here used libpng much? I know I'm retarded but I can't figure out why my delete calls aren't freeing all the memory I used (still have 1500KB when I should i have ~800KB)
New:
row_pointers= new png_bytep[height];
For(int y=0;y<height;++y)
row_pointers[y]=new png_byte[png_get_rowbytes(png_ptr, info_ptr)];

Delete:
For(int y=0;y<height;++y)
Delete row_pointers[y];
delete row_pointers;
>>
as a noob is dedicating yourself Pythonism bad?
>>
>>58385337
>>58385337
unsafe { int* a = &path}

:^)
>>
>>58385422
C++ doesnt try very hard (because that would open the can).
auto x = 4;  // x : int
unsigned y = 5;
auto b = x < y; // warning: signed/unsigned comparison
int& r = x;
auto z = r; // z : int, implicit dereference as & is discarded
auto& ar = r; // ar : int&, therefore auto still requires some type annotation by the programmers


It's still an excellent feature. I use it whenever possible, I also am writing a 1000+ LOC program without a single `delete'. Feelsgood
>>
>>58385561
> new []
> delete
You should use delete [] with new []: http://en.cppreference.com/w/cpp/language/delete .
>>
>>58385561
Use delete[] to delet arrays.
Actually, use unique_ptr<> and vector<> for maximum automation and safety.
>>
>>58385578
If you want to be a normie programmer then no, if you want to be a leet system's programmer, then yes
>>
>>58385651

You don't need a single delete if you don't have a single new. And really, how often do you find yourself using "new" when vectors exist?
>>
>>58385686
I'm using some OOP with recursive structures so I need heap allocation. And before you tell me not to use OOP, C++ doesnt support variants well enough for me to represent an AST in any better way.
>>
>>58385696
Not him, but are you a fellow compiler anon?
>>
>>58385651
>>58385686
Modern C++ is amazing, with vector, map, the rest of the STL and the auto var : range operator you can write efficient, powerful code without code duplication and without memory management

Bjarne Stroustrup was right about zero cost abstractions

Fuck Java that doesn't treat functions as first class objects
>>
>>58385686
>You don't need a single delete if you don't have a single new.
Shared pointers. Delete is in the deconstructer
>>
>>58385696

ASTs? Makes sense then. I take it you will be using either unique or shared pointers?
>>
>>58385713
Yes, but everyone in my life things PL is a useless pursuit so Im having trouble motivating myself to finish this

>>58385716
C++ lambdas are essentially compile time sugar, a hack that (along w/ operator overloading) incidentally allows for implementation of seemingly first class functions. Anyways, it's still all very nice

>zero cost
Zero cost, after the compiler is done optimizing away 80% of the generated code.
>>
>>58385742
Lots of unique pointers, lots of std::move()s. I wish C++ could someone voice that an object most be moved before you can call a certain method, like in Rust. But I suppose C++11 will always be a less-safe Rust (meaning the compiler trusts you more to not fuck up).
>>
>>58385744
It's not useless as long as it's valuable to you.
>>
>>58385663
>>58385670
Okay, i added [] to the delete calls, I still have a leak somehow.

row_pointers type is a png_bytep*
Where png_bytep is a png_byte*
Where png_byte is a unsigned char

Any further help is very much appreciated
>>
>>58385337
If you're giving up that much control over your code you should ask yourself why you're using C++ in the first place. Sounds like what you really want to be using is something like Java or C#.
>>
>>58385803
You arent giving up any control. You can always .release() to make a unique_ptr<> manually managed, you can get the raw array point from a vector with .data(). Also, people don't program in C++ besause they want to spend hours writing shitty memory management boilerplate (that's what C is for ;) ), they use it because its fast, powerful and can access low level or cross platform APIs.
>>
>>58385561
This is exactly where a memory pool should be used
>>
>>58385561
Anon are you sure this is the leak? Your code looks fine so I bet its somewhere else
>>
So, I know it's possible to go from BSc to PhD without a MSc, but how does one go about getting one, do you need to be sponsored by an employer?
>>
>>58385831
>>58385842
My other post >>58385789
I'm almost 100% sure the leak is there, I could confirm it by using unique_ptr's but my current retardation prevents me from implementing it with unique_ptr's.
>>
>>58385862
Does `height' change over the course of the program? Do you send that big array to some foreign code that doesnt clean it up? Are you actually reaching the delete code and not returning early?
>>
>>58385851

You apply on a university website. That's it.
>>
>>58385803
>hurr durr if you don't like banging rocks together you should just go ride a tricycle
I want a language that doesn't make it easy to mess up, but still allows me to access low level instruments like pointers.
Try writing exception safe code with multithreading support in C. Oh what's that? A 10 year old library has a rare exception it didn't take care of? And that means that a mutex got locked forever and stalls the entire program? And the original maintainer is nowhere to be found? Shame, buddy.

Meanwhile. I'll be sipping on my orange juice over here, knowing that my mutex is going to get unlocked even in the weirdest of exceptions because of the magic of lock guards and RAII.
>>
>>58385862
Show us the real code.
>>
>>58385874
>exceptions
>C
>>
>>58381728
I believe guys in ReactOS are more successful here.
>>
Why people don't like BASIC?
>>
>>58385867
Height isn't changing, I usually do send the array elsewhere but I'm currently not - literally just newing and then deleting immediately and yet my memory usage is still ~1500KB higher than it should be pre new calls.
>>
>>58386042
Same reason people don't like COBOL.
>>
>>58386042

It's old as shit, and there's nothing good about it. If you want a language that's simple and fast to write applications in, use Ruby or Python. If you want a good .NET application, use C# or F#.
>>
>>58385391
c++ 17 even provides destructuring assignment like:
auto [a, b] = std::make_tuple("ayy", "lmao");
>>
File: ohuetyadebil.png (33KB, 763x233px) Image search: [Google]
ohuetyadebil.png
33KB, 763x233px
Could someone explain me this procedure? Why should we substract (m corner1/2) from a new origin? Why not just make transformed frame as it is:
(make-frame new-origin
(m corner1)
(m corner2)
?
>>
>>58380134
little music query language for building playlists programmatically:https://github.com/llllllllll/witchcraft
>>
>>58386180
subtract*
>>
Okay, so does anyone know how browser engines do it?

They have one object/element super type for everything that has all of the properties and then an inner object for the content?
>>
>>58386374
https://github.com/servo/servo
>>
>>58386436
God, rust is so confusing, ha, doesn't really help
>>
>>58386491
Okay, it's less rust and more of me having no idea where to start looking.
>>
>>58386585>>58386585>>58386585
Just use abstraction man, you will figure this out.
>>
>>58386610
I think I got it mostly, hmm, I'll go with what I thought before instead.
>>
>>58386180

That depends...

What the hell do any of these functions do, and what the fuck is the context?
>>
>>58386585

Start from main, work backwards.
>>
>>58386585
I've found something that might help: https://github.com/servo/servo/blob/master/docs/HACKING_QUICKSTART.md
>>
it would be really cool if C had a 'bit' datatype so you could do something like
bit_t array[8];
...
if (array[3]) { ...


it would make dealing with bit flags and bitmaps loads easier
>>
>>58386880
std::bitset
>>
>>58386868
>https://github.com/servo/servo/blob/master/docs/HACKING_QUICKSTART.md
https://github.com/servo/servo/wiki/Layout-Overview
This is more of what I was looking for, thanks
>>
>>58386904
fuck C++ and fuck Indians
>>
>>58386880
what about something like this
http://ideone.com/gk1KuC
>>
>>58386880
It does, sort of.
struct bitfield {
bool bit0: 1;
bool bit1: 1;
bool bit2: 1;
bool bit3: 1;
bool bit4: 1;
bool bit5: 1;
bool bit6: 1;
bool bit7: 1;
};
>>
>>58386922
>fuck an upgrade
ok
>>
>>58386968
>C++
>Upgrade
I suppose cancer is an "upgrade" to your normal cells, too.
>>
>>58386974
Bwahahahahaha, man, thats pretty funny XD
>>
why do people say that new is better than malloc?

new feels extremely limited
>>
>>58386983
Take my joke however you want, but I'm completely serious about C++ being cancerous shit.
>>
so where do you go next after learning the syntax?

I'm totally overwhelmed
>>
>>58386995

Calls constructor when run. Can be safely used with delete, which calls the destructor, allowing freeing of recursive data structures in one call.

In what way do you feel operator new is limited?
>>
>>58387041
>In what way do you feel operator new is limited?
idk I just feel uncomfortable with new (heh) things I guess
>>
>>58387056
you sound like an absolute ignorant faggot
>>
>>58386995
You're aware you can overload new, right?
>>
>>58387022
Writing some code.
>>
How quickly could I teach myself to code well enough to get a job doing it in the UK? Currently I'm a construction labourer, my IQ is about 115.
>>
>>58387108
How big is your cock?
>>
>>58387119

7 x 5.5
>>
>>58387056

There are two instances where malloc might make sense in C++:

1. You are using a C library that uses a pointer allocated by a user, which uses either realloc or free on said pointer, thus presuming that said pointer is explicitly allocated with malloc, as any other allocator will cause undefined behavior.

2. You need to allocate memory, but forego initialization of object until a later time.

The former I have never seen happen, and is only a theoretical. The latter can be skirted around by making a new char[] and then casting it into your custom object type.
>>
>>58387126
Okay, well, you're way too big to learn functional programming

Well, if that's the case, then I'd say a few weeks?
>>
File: simplicity.png (87KB, 853x621px) Image search: [Google]
simplicity.png
87KB, 853x621px
In Scheme, if I have to read every element of a short set (we're talking like 4 or 5 indices) does it matter if I use a list over a vector? Surely they would have the same complexity if you're reading until the end?

Keep in mind that a vector is not synonymous with an array. It still uses pointers as well.
>>
>>58387150

Sounds good. I'm gonna lurk moar. BTW I jelqued for an extra .25, it works senpai.
>>
>>58387164
Doesn't jelqing ruin your ability to stay hard though?
>>
>>58387169

You need to be gentle. Warm water. Anyway yes I fugged it up bad but get someone to suck on it and it fixes it right back up.
>>
>>58387150

>too big to learn functional programming
You can't learn functional programming with an above average dick size? Where the hell are you pulling that nonsense out of?
>>
>>58387271
But it's true, sorry it makes you feel inappropriate.
>>
>>58387271
Anyways, he said that he wanted to get employed, so that already rules out functional.
>>
>>58387281
You still have yet to make your case for how dick size correlates to ability to program in a functional language.

>>58387294
Fair argument, but what does dick size have to do with it?
>>
>>58387324
It's something called a J O K E
>>
>>58387332

Figures as much. In all seriousness though, we have way too many memesters going around claiming shit like wearing women's clothing makes you a better programmer. One of these days, some dumb newfag is gonna fall for it.
>>
hey /g/, how do you call in english the "tiles" in say a chessboard or checkers?

not the actual graphic tiles, but the "game" tiles
>>
are there any known scandals where someone hid malicious code in big projects?
>>
>>58387362
tiles
>>
>>58387362
just tiles or fields
>>
>>58387371
2016 elections
>>
>>58387356
4chan doesn't really get much new blood, bit of a reputation.

Anyways, learning a functional language as the first one is a bit of an oddity, not sure how that would transform in to using good ol C or Python, so the joke is not any harm.
>>
>>58387372
>>58387376

isn't there another word? i cant find what im looking for when searching with the word "tile"

in spanish you would say "casilleros", which literally means squares of a board-game
>>
>>58387380

I suppose. C should always be one's first language, IMO.
>>
>>58387385
>squares of a board-game
tiles
>>
>>58387385
why do you need to know this?
>>
>>58387385
yeah it's just squares/tiles/fields
there's no specific word for that
>>
Anything I'm missing?
Really interested in C++ for myself, doing WebDev for school.
>>
>>58387408
I think you're good senpai
>>
>>58387398
i want to look for anyone discussing the pro-cons of a tile based system vs fields/squares for 4x games on a game-design standpoint

an aoe vs civ discussion basically, but i dunno how to express that to get good google results
>>
>>58380166
>Write PHP Code
>Just werks
>>
>>58387453
>tile vs square
¿
>>
>>58387453
try hexagons vs squares
>>
>>58387458
>Write PHP Code
>Eyes bleed at 1L/s
>>
>>58387481
well aoe system has 7 levels of elevation, which would come handy for richer strategies cause it would be able to give me more variations on view-ranges (the unit being able to see more/less depending on terrain elevation) and attack/defense bonuses, civ system has just 1 level of elevation (hills)

but i would also want to give the units the ability to hide on forests, but the aoe way of doing stuff has tree objects placed on the tiles, while civ v has forest tiles, which would be easier for that

>>58387494
nono, i don't mean that
>>
>>58384533
>>58384557
>>58385260
If this were actually true, you'd write all your first drafts in machine code.

Abstraction itself is not the problem: the shitty abstractions your languages impose are.
>>
I want to go into gamedev, is SICP a good book to start learning programming?
>>
>>58387538
No, SICP is a decent book to learn about functional programming. For programming in general, start with something else.
>>
>>58387528
i could go the civ way and just create 7 different types of hills , but then it grows exponentially as you have elevations of sand, grass, snow, rock, etc.

unless i could someway make alphamask to imply elevations via shades/lighting on any kind of terrain type, but im having troubles on thinking how the fuck to imply 7 kinds of elevations with transparent lights and shades
>>
File: vis.jpg (982KB, 2066x1152px) Image search: [Google]
vis.jpg
982KB, 2066x1152px
>>58387576
here its easier
>>
>>58387654
Can you be more specific about what you want to make???
>>
>>58385337
>try catch
>auto ptrs
Disgusting, should be removed from c++
>>
File: aaaa.png (204KB, 485x233px) Image search: [Google]
aaaa.png
204KB, 485x233px
>>58387699
i want to visually represent both different levels of elevation and one-forest-per-tile in my maps, in a way that doesn't force me to draw 7 different types of hills for each terrain type

aoe handles this by having specific tiles for slopes, but it does it in such a way that would force me to do a 1 tree per tile system and ruin my "hide in forest" feature

in pic related, civ strategic-mode visualization handles hills by drawing a generic "hill" mask over the lower terrain type tiles, (i think the gray one is different than the brown/green one doe) and leaving enough transparecy to distinguish between hills in ground/grass/snow/sand/etc

i want basically 7(or so) variations of this that can be layered over the lower terrains types, instead of making 7 for each type of terrain type

i guess masks could work, but i don't know how i would go to geometrically imply different levels of elevations while leaving enough transparency to display the lower layers colours

also, memory constraints
>>
Hey guys , could you tell me what would be the equivalent of this code in ruby ?
for (var key in a) {
// skip loop if the property is from prototype
if (!a.hasOwnProperty(key)) continue;
var obj = a[key];
for (var prop in obj) {
// skip loop if the property is from prototype
if (!obj.hasOwnProperty(prop)) continue;
// your code
console.log(prop + ' = ' + obj[prop].author);
}
}

>>
File: basic_tile.png (356B, 67x66px) Image search: [Google]
basic_tile.png
356B, 67x66px
>>58387822
i guess i should also show this, a basic tile, i have all that black space on top to imply height, but if only draw lines of different height on it on a transparent background, i lose the ability to use one for every tile, as the layer below the hill ends where the diamond ends
>>
>>58387564
Well, I am already on half of Chapter 2, should I just give up?
>>
>>58387880
nevermind i just figured it out by having to explain it to you, i need to fill the whole rectangle with the terrain type and do negative layerings of black, more black the lower the elevation
>>
I'm making a program in Java that displays card images in JLabels. Is it possible to initialize a JLabel each time a card gets pulled from the deck instead of first creating the JLabels and then assigning the card images to the labels?
>>
I'm making a programming language. It's functional and stack based. What should I call it?
>>
>>58388034
Stafun
>>
>>58388034
Slack
>>
>>58387832

So... in Ruby, it is not common to iterate over the instance variables of an object. If you were specifically going for instance variables, rather than using a hash table, it might look a bit like this...

a.instance_variables.each do |key|
obj = a.instance_variable_get key
obj.instance_variables.each do |prop|
author = obj.instance_variable_get[prop].author
puts "#{prop} = #{author}"
end
end


But this breaks encapsulation and is probably a bad idea. If you were using hash tables instead to behave like JavaScript's objects, it would look like this:

a.each do |key, obj|
obj.each do |prop, o|
author = o.author
puts "#{prop} = #{author}"
end
end
>>
Decided to get into programming as a hobby

i've been playing around with python for a few weeks, is this a good choice for someone getting into programming? I don't really have any specific direction I want to go in right now, but I majored in chemistry so I thought python would be a safe bet if i eventually wanted to incorporate programming into my career
>>
>>58388160
yep, python is a good choice. It's popular in science.
>>
New thread:
>>58388167
>>58388167
>>58388167
>>
>>58388171
Too early faggot
>>
>>58388171
kys
>>
>>58387832
Here.
for let key in a 
if !a.hasOwnProperty key
continue
const obj = a[key]
for let prop in obj
if !obj.hasOwnProperty prop
continue
console <- `${prop} = ${obj[prop].author}`
end
end
>>
>>58388228

He asked for Ruby. I am not sure entirely what language that is, but it is not Ruby.
>>
>>58388085
>
a.each do |key, obj|
obj.each do |prop, o|
author = o.author
puts "#{prop} = #{author}"
end
end

Thats great thanks! just when I try to use the second code i keep getting
web_scraper.rb:16:in `<main>': undefined method `each' for #<String:0x00000002e0ae50> (NoMethodError)
any idea why ?
>>
>>58388567

I was assuming a and obj were JavaScript objects with some combination of traits, which could be trivially converted to hash tables. If obj is a string, then obviously you can't iterate over its properties. With a string, you can only iterate over its individual characters, which is done with the each_char method.

How are you using this code anyways?
>>
>>58382564
Retard learn to google.

http://www.cplusplus.com/reference/cstdio/getc/#example
>>
>>58385803
>old C++
>write new/delete manually and have a seperate try catch for each allocation
>new C++
>use std::unique_ptr<T> a = std::make_unique<>()
>compiles down to the same thing as above
>always handles exceptions correctly


>inb4 what if I don't want to handle exceptions correctly and instead want to leak memory intentionally to microptimize my code?
Don't be a retard.
>>
File: structure.png (98KB, 1366x768px) Image search: [Google]
structure.png
98KB, 1366x768px
>>58388654
Ah now I see , than you for explaining this to me , because as you can see I don't have much ruby experience. The entire script is
require 'httparty'
require 'nokogiri'
require 'json'
require 'pry'
require 'csv'

page = HTTParty.get('https://boards.4chan.org/g/catalog')
m = page.match(/var catalog = ({.*?});var/)
json_str = m.captures.first
catalog = JSON.parse(json_str)

a = json_str

catalog.each do |key, obj|
obj.each do |prop, o|
author = o.author
puts "#{prop} = #{author}"
end
end

File.write('catalog', catalog)
File.write('json_str', json_str)

Pry.start(binding)

All I really want to do is traverse through all the threads and pass some of the data into separate file . Mainly the Image location , reply count and teaser. I am much more JS orientated so this is new for me but end goal is very simple minimalistic /g/ viewer
>>
>>58388798

Okay, I see what you're doing now. Didn't realize you were operating on actual JSON objects grabbed from the web, rather than just an ordinary object of some variety. I could help you with this a bit more if I had some time to go look at documentation, but it is 7 AM, and I need to get some sleep, as I have been up all night.
>>
>>58388912
Thats absolutely alright , i appreciate your help. There is no real documentation as I just started yesterday and didn't do much yet. I just going to ask your opinion on this.
If I am aiming for a mobile app , that will display /g/ so the server does all the heavy lifting and sends the result to the phone . Does it make sense for me to do do this all with ruby or php would be overall a better choice ?
>>
>>58380134
>This is /prog/
/prog/ was a text board.
>>
>>58386995
Because malloc is shit anyway if you care about performance.
>>
>>58388034
but anon you're modifying the stack
Thread posts: 318
Thread images: 28


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.