[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: 314
Thread images: 45

File: K&R himegoto waifux2.png (1MB, 1000x1400px) Image search: [Google]
K&R himegoto waifux2.png
1MB, 1000x1400px
old thread: >>52335496

What are you working on, /g/?
>>
>>52339464
>>
Stop spamming that image, you fucking turbonerd degenerate.
>>
I don't think I'm going to bother with observational type theory. My naive quotient types make everything unsound, and they're not that useful anyways. I'll stick with intensional type theory with this one.

Now, I'm thinking about approximation. That's really important to me -- I want to be able to write proofs based on the classic inductive type for the natural numbers, but I want to use unsigned integers at run time.

In order to do that, you have to define an approximation, U32 ~ Nat or something. That entails a conversion from Nat to U32, as well as a paramorphism (or apomorphism for codata) on U32. Then, you can provide approximate reimplementations of functions, like addition. The compiler will then check that your approximations are correct using regression testing, similar to QuickCheck.

I also envision the ability to add extra correctness checks at run time for debug builds. Like being able to detect overflow, which is, after all, what makes U32 only an approximation to Nat.
>>
>>52339479
but it's cute tho

go make your own anime gril holding programming book images if you want and post them before the bump limit
>>
If you can't predicted the fizzbuzz of your post ID, you can't do fizzbuzz
>>
>people who use Java when there are much better alternatives out there
>>
>>52339494
>gril
>>
>>52339512
Brainfuck is too hard for them to think in.
>>
tfw you find a library that does exactly what you want
>>
>>52339459
I'm messing with D. I have an issue though. I'm trying to figure out how to list all the files given a filepath and I can't find shit anywhere on doing it. I can only parallel to Java and it can be done easily in two lines:

File F = new File("path");
String[] List = F.List();


What is the D equivalent?
>>
>>52339514
w-what?
>>
>>52339578
https://dlang.org/phobos/std_path.html
https://dlang.org/phobos/std_file.html
>>
>tfw ocaml is the only language that is reasonably usable in practice
If it had full linear types and no GC, it would be literally perfect 2bh. Phantom types can be used to emulate linear types but it's not perfect, and the GC is still needed though. Combined with the flambda and multicore patches, it's really the GOAT language.
>>
>>52339493
Also, how stupid is the idea of "inline LLVM IR" on a scale from 1 to 10?
>>
>>52339617
f-f-F#?
>>
File: file.png (20KB, 635x285px) Image search: [Google]
file.png
20KB, 635x285px
>>52339525
>Have you ever used GNU/linux

No, i've only ever used windows. Guess i'll have to look into educating myself on it.

> If you have your mingw bin in your path, you can compile software by opening cmd, and typing "g++ mySourceFile.cpp", and it will output an a.exe in the same folder

When I do like you said and enter this I don't get a console, but it does create another process just like when I run it from the IDE.
>>
>>52339630
Tied with .net (maybe in a few years it won't be such an issue), slower, nowhere near as powerful a module system, object system is worse, less portable (I think - not entirely sure on the last point).
It's a great second option but it just doesn't live up to the ocaml.
>>
>>52339630
I'd only ever use F# if I was already constrained to .Net for whatever reason. From any other standpoint, it's a sub-par ML.
>>
>>52339578
import std.process;

void main(string[] args)
{
string path; //assume this already contains your path
execute("ls -l " ~ path);
}
>>
>>52339650
better IDE
>>
>>52339669
kek
>>
File: FUCKYOU.png (549KB, 813x733px) Image search: [Google]
FUCKYOU.png
549KB, 813x733px
>>52339578
>>52339578
>D
>Not using Java or Python

What the fuck is wrong with you?
>>
>>52339599
>>52339577
>>52339573
Thanks for replying to my questions, I appreciate it.
>>
game AI is bloody tricky to implement
>>
>>52339711
I think that's true. There are multiple ways to go about it, but turning it into an algorithm if possible isn't too bad, depending on the complexity of the game?
>>
>>52339711
AI is just pathfinding. The search space is the tricky part :)
>>
>>52339709
in my second example the last two equations are probably impossible to solve with the first one but if they weren't, solving the first one would mean that the second two were identical

(of course you could always just do the whole thing in one and use 0 when a certain variable isn't mentioned)
>>
File: 1406803019377.jpg (103KB, 1280x720px) Image search: [Google]
1406803019377.jpg
103KB, 1280x720px
>>52339692
>Java or Python
What the fuck is wrong with YOU?
>>
File: tengen toppen bait lagann.jpg (43KB, 736x849px) Image search: [Google]
tengen toppen bait lagann.jpg
43KB, 736x849px
>>52339692
>>java
>>python
>>shit
>pick one
>>
>>52339692
I have been using Java forever. I want to learn a new language so I chose D.
>>
>java
>python
>not literally the definition of shit
Look at this retard! Look at him and laugh!
>>
File: ed.png (301KB, 659x500px) Image search: [Google]
ed.png
301KB, 659x500px
>>52339781
Java and Python runs on any machine a fuck ton better than D, oh excuse me (C but with extra operators).

No fucking way is D superior to Python and Java at allocating code to machine, I don't think you people realize just how shit D is, facebook runs on a extremely modded daily version of D. Unless you have millions, you won't get much out of learning or building in D
>>
File: Dlicious.jpg (840KB, 1580x3422px) Image search: [Google]
Dlicious.jpg
840KB, 1580x3422px
>>52339801
They're just jealous about your D
>>
>>52339781
Is it bad that java, python, and SQL are the main things I know? I just started with java because that was the curriculum. I kinda feel like this is a silly argument, different tools for different jobs? What do you prefer and why?
>>
>>52339829
>Literally giving them the D
>>
File: ;D.png (57KB, 800x334px) Image search: [Google]
;D.png
57KB, 800x334px
>>52339865
Who doesn't love a bit of D?
>>
>>52339848
Its not bad at all, look at the world's coding market today. You HAVE to know Java to get some place in today's programming market. Even fucking google requires you to know Java, its one of the leading languages people need to learn. Neckbeards will tell you otherwise cause they enjoy web 1.0
>>
>>52339848
Congratulations, you're the most employable codemonkey on Earth aside from the fact you're not in india right now! Enjoy your 0 advancement prospects and 9 to 5 writing unit tests job!
>>
>>52339886
I bet this fucker thinks html is a coding language.
>>
>>52339828
I highly doubt anything you said, especially since Python's a slow piece of shit and Java's just a shitty, stripped down C#
>>
>>52339870
neat
>>
File: trash.jpg (752KB, 1920x1080px) Image search: [Google]
trash.jpg
752KB, 1920x1080px
STOP DROP AND ROLL
>>
>>52339764
>>52339756
That's exactly the problem: the size of the search space in any non trivial game will be massive.

Anyone can whack together a minimax. Turning it into a good AI is the problem and finding ways to increase the search depth and to accurately evaluate nodes is a nightmare.
>>
>>52339880
Knowing c/c++ and reading a few "java for c developers" docs was enough for me to get a good handle.

As long as you have a decent education you can grasp any 'new' concepts pretty quickly.
>>
>>52339848
same haha except I have pretty strong C system programming skills
>>
>>52339932
Alphabeta, dude.
But really, policy-based like in FEAR is a great way to go. It's basically a static, restricted RL. You can also use simulation and stochasticity to search more than you can see (off-policy learning for instance), and you can also prelearn good algorithm cores.
>>
>>52339963
GOAP isn't really the thing for what I'm working but I am using some stochastic methods to help in the evaluation (mainly montecarlo sims).

The problem with sims though is that they are also really resource intensive and you need a lot of iterations to get an accurate enough evaluation to be useful. It's a trade off between the evaluation and the search depth and it all need to be finely tuned to get the maximum performance out of it.
>>
File: 1438706413120.png (227KB, 587x571px) Image search: [Google]
1438706413120.png
227KB, 587x571px
Fucking everyone in this thread is retarded, but that's obvious since no one is using Ruby.
>>
>>52339615
Fuck, I think I am retarded. The best I can put together from those pages is this:

auto a = dirEntries("path",SpanMode.shallow,false);
writeln(a);


That stores the full file paths to an array of "some type". Looking more for just filenames though.
>>
File: 1402886051076.jpg (126KB, 856x704px) Image search: [Google]
1402886051076.jpg
126KB, 856x704px
>>52340030
>Ruby
Good meme, mate.
>>
>>52340033
just use C or python m8
>>
>>52340030
>>52340038
more smug anime faces pls
>>
>>52340070
But that would be a cop out.
>>
File: 1438572704434.png (79KB, 307x400px) Image search: [Google]
1438572704434.png
79KB, 307x400px
>>52340086
>>
File: 1402817790146.gif (2MB, 533x300px) Image search: [Google]
1402817790146.gif
2MB, 533x300px
>>52340086
>>>/wsr/
>>
#define N 8192

void
reload(char *buffer, FILE *file)
{
size_t i = fread(buffer, 1, N, file);

/* Set EOF if we have reached end of file */
if (i < N) {
buffer[i] = 0;
}
}

void
parse(const char *filename)
{
/* Open file, create buffer and set up pointers */
FILE *file = fopen(filename, "r");
char *left = malloc(N*2+2);
char *right = left + N + 1;
char *token = left, *forward = left;

/* Insert sentinel at end of buffer halves */
left[N] = right[N] = 0;

/* Initial load */
reload(left, file);

/* Parse loop */
bool done = false;
while (!done) {
switch (*forward) {
case 0: /* Hit sentinel */
if (forward == left + N) {
reload(right, file);
forward = right;
} else
if (forward == right + N) {
reload(left, file);
forward = left;
} else
done = true;
break;
default:
printf("%c", *forward);
}
++forward;
}
}


Reposting my parse buffer from dragon book chapter 3. Am I doing it right?
>>
File: 1452322982803.jpg (338KB, 1369x1183px) Image search: [Google]
1452322982803.jpg
338KB, 1369x1183px
>>52340086
>>
http://i.imgur.com/foxwpvR.gifv
>>
File: 1407220426641.gif (2MB, 640x360px) Image search: [Google]
1407220426641.gif
2MB, 640x360px
>>52340134
>Posting a link to an image
>On an imageboard
Kill yourself
>>
>>52340149
https://media.giphy.com/media/l41m0VsfS0cF7YUb6/giphy.gif
>>
>>52339924
Before we fill this thread up with 30 or more assholes saying "roll"
Please consider your first task as not being a stupid fucking ape and instead take the twenty seconds it takes to write a random number generator that outputs numbers between 0-99.
>>
>>52339617
nah, it's still lacking in a lot of ways IMO, it's just that nothing else is really as comfy to use for 90% of programming.
>>52339680
meh, merlin basically has intellisense at this point and it has the advantage of being integrated into Emacs or vim. only real problem with it is that the debugging isn't great
>>
>>52340123
Awful animation. How do you tasteless weebs watch trash like that?
>>
>>52340169
Or post this in OP
https://better-dpt-roll.github.io
>>
>>52340169
filename is "trash.jpg" for a reason
>>
>>52340211
Good luck getting these thread clashing retards to post it, they're too busy fighting over the OP image or astroturfing about Reddit.
>>
>>52340169
>2016
>not using a truly random number generator

https://www.random.org/
>>
>>52340169
Or make a post actually contributing to the thread and use the post number from that.
>>
>>52339924
>>52340169

I'll second this. Coding project: Roll generator. Hard mode: Evenly distributed and cryptographically secure.
>>
>>52340229
>Actually caring that the result for a stupid programming exercise is truly random
>>
Inline LLVM?
U32 : Type
U32 = llvm "u32"

_+_ : U32 -> U32 -> U32
m + n = llvm "add u32 %m, %n" where
letreg "m" = m
letreg "n" = n
>>
>>52340169
>>52340229
>>52340242
>>52340244


Random numbers don't exist you faggots
>>
File: TrueRNG2_clear-300x198.png (56KB, 300x198px) Image search: [Google]
TrueRNG2_clear-300x198.png
56KB, 300x198px
>>52340229

>Running one of these on a Raspberry Pi
>>
>>52340260
Oh no whatever we shall do, anon pointed out the obvious that everyone else had the social tact to leave out due to its immense triviality.
>>
>>52340260
You have no way of proving that.
>>
>>52339459
There was a thread a few days ago recommending some books to learn java with but I seem to have lost that piece of paper where I wrote them down..

Anyone have any recommendations on good books to learn java?
>>
>>52340259
I would say that if you're gonna do that route maybe create a wrapper type like LLVM or Unsafe so you're transparent about everywhere that it's used (since that can lead to side effects or just plain breaking the safety of the language). then again, if you implement the entire standard library like that then you'd have a lot of trouble defining functions that aren't Unsafe.
>>
>>52340260
>>52340276

Yes they do you cunts
>>
>>52340318
If there were a demon that knew the precise position and energy of every particle in the world, it would be able to predict the result of every "True Random Number Generator" circuit in existence.

In reality, random is the concept of a sufficiently chaotic system such that a demon as described earlier cannot exist. This should be obvious to everyone in this thread

So fuck off.
>>
>>52340310
It would be used along with the stuff I mentioned here: >>52339493

But yeah, it would probably be good to have a type "decorator".
U32 : Native Type
U32 = llvm "u32"

I guess there'd be some constructor "a -> Native a". Though you wouldn't be able to use it directly, "llvm" would use it to wrap its result, "letreg" would require something wrapped with it, etc.
>>
>>52340350
How would it? Prove it.
>>
>>52340302
Why not just use the best seller from amazon? I used Absolute Java (5th Edition)
by Walter Savitch in my class.
>>
>>52340375
Actually, wait. It doesn't make sense to wrap "Type" in that case. You'd just do something like this, because it makes sense to have a separate keyword for native types anyways.
U32 : Type
U32 = llvmtype "u32"
>>
>>52340350
>implying quantum physics are deterministic
Such a demon can not exist, thus randomness does.
>>
>>52340377
>prove a thought experiment
>autism
Either you don't know how true random number generators work or you've been living in a cave since before the birth of Laplace.
>>
>>52340425
Like you can prove it isn't deterministic. The answer is unknown so shut up and post programming.
>>
>>52340426
>it's just a thought experiment i don't have to prove anything
You're a fucking retard.
>>
File: found this googling SICP.jpg (149KB, 1031x882px) Image search: [Google]
found this googling SICP.jpg
149KB, 1031x882px
So should I read SICP or is it just a meme?
>>
>>52340475
If the answer is unknown then why the fuck are you claiming to know?
>>
>>52340496
its a meme
you wont learn anything
>>
>>52340494
>I don't know who Laplace is so I'm gonna have this random stranger on the internet prove his fucking theorems for me over the next two hours
Fuck you and fuck your laziness, if you're so damn interested then Google it.
>>
>>52340509
Please point out where I made such a claim, keeping in mind this is an anonymous imageboard.
>>
>dpt argument flavor of the night: randomness

wow
>>
>>52340559
introduced a random component to my thrusts into your mums twat last night
>>
>>52340527
You're begging the question you retard
>>
>>52340559
What if I told you these were all my posts?

>>52339924
>>52340260
>>52340318
>>
>>52340577
Nigger I'm not begging shit, I'm saying that I'm not your fucking grandfather, so I'm not going to read you Laplace's "A Philosophical Essay on Probabilities" and extended peer reviews, at your bedside.
>>
>>52340605
>grandfather

I'm sorry, why is your gender relevant to this discussion?
>>
>>52340621
'cause it tells you what I used to pork your mum last night :^)
>>
>>52340605
You retard, it's a complete fucking non sequitur to say anyone who knew all particles, positions and energies would therefore be able to predict the future, and you couldn't prove it without assuming that the universe is deterministic (which would beg the question), making your entire fucking argument circular

If you had proof that the Universe is deterministic you'd be a fucking millionaire
>>
File: screen.1452405999.png (24KB, 998x467px) Image search: [Google]
screen.1452405999.png
24KB, 998x467px
>>52340496
>assignment involves making a script that can get perfect baseball hits
>they want you to use actual physics and make the script as if you're coding this bot in real life

like what the fuck, who's going to map all that shit out? 90% of the problem has nothing to do with programming
>>
>>52340653
ball.position = out;
predictedposition = out;
>>
>>52339643
Strange, maybe code::blocks is doing something weird with their distribution of gcc? Do you get any output if you run "g++ -v"? This SHOULD output the gcc version, as well as a bunch of other info.

I would try downloading mingw-w64 from another source, removing that Mingw from your Path (conflicting versions will cause everything to break), and then readding the new one. I have personally had great success using win-builds recently. It has an easy installer/updater, and comes with a bunch of extra third party libraries already compiled for use with mingw-w64, which is normally a right pain. http://win-builds.org
>>
>>52340634
>predict the future
>implying the "future" has anything to do with true RNG
Laplace's Demon is useful to the conversation to the extent that it can be used to say that the position and energies of particles specific to the immediate surroundings of a True RNG circuit would be usable to predict the results of said circuit.

To know the position and energies of such particles would be identical to knowing the Unix Time, random seed, and contents of the table at the exact moment rand() is called.
>>
File: screen.1452406526.png (71KB, 869x661px) Image search: [Google]
screen.1452406526.png
71KB, 869x661px
>>52340662
if only
>>
>>52340653
that's fucking level 1.01 physics bro
>>
>>52340688
That's only like high school physics though. A real computer scientist could do that.
>>
>>52340653
That's basic high school physics with some coding thrown in.
>>
>>52339459
I'm going through some Unreal Engine 4 tutorials. Once I can kinda sorta make some stupid shit I'm going to start trying to make some actual games (though they'll mostly just be shit, but I need to start somewhere).

I just finished the battery collector third person game tutorial. Where should I go next? More tutorials, or should I just dive right into making my own stuff and rely on documentation and example projects as reference?
>>
>>52340688
whoever wrote that question should die slowly. Use some latex for fuck sake
>>
>>52340698
>>52340710
>>52340716
Where did I mention it wasn't basic physics?
That isn't the point I'm making.
>>
>>52340593

I'd believe it. It's all part of the jewish plan.
>>
File: hacker.png (255KB, 600x561px) Image search: [Google]
hacker.png
255KB, 600x561px
Rate my FizzBuzz /g/
#include <sys/mman.h>
#include <string.h>
int main(int argc, char *argv[]) {
int (*kek)(void) = mmap(0, 301, 7, 34, -1, 0);
memcpy(kek, "\
\xeb\x00\x55\x53\x48\x8d\x35\x0d\x01\x00\x00\xbf\x01\x00\x00\x00\
\xba\x08\x00\x00\x00\xb8\x01\x00\x00\x00\x0f\x05\xbd\x01\x00\x00\
\x00\x4c\x8d\x05\xf9\x00\x00\x00\x4c\x8d\x0d\xf7\x00\x00\x00\x4c\
\x8d\x15\xf5\x00\x00\x00\x48\x63\xdd\x48\x69\xc3\x56\x55\x55\x55\
\x48\x89\xc1\x48\xc1\xe9\x3f\x48\xc1\xe8\x20\x01\xc8\x8d\x04\x40\
\x39\xc3\xb0\x01\x75\x16\xbf\x01\x00\x00\x00\xba\x04\x00\x00\x00\
\xb8\x01\x00\x00\x00\x4c\x89\xc6\x0f\x05\x31\xc0\x48\x69\xcb\x67\
\x66\x66\x66\x48\x89\xca\x48\xc1\xea\x3f\x48\xc1\xf9\x21\x01\xd1\
\x8d\x0c\x89\x39\xcb\x75\x16\xbf\x01\x00\x00\x00\xba\x04\x00\x00\
\x00\xb8\x01\x00\x00\x00\x4c\x89\xce\x0f\x05\xeb\x4e\x84\xc0\xb8\
\x00\x00\x00\x00\x89\xe9\x74\x43\x48\x63\xd1\x48\x69\xf2\x67\x66\
\x66\x66\x48\x89\xf7\x48\xc1\xef\x3f\x48\xc1\xfe\x22\x01\xfe\x6b\
\xfe\x0a\xf7\xdf\x83\xfa\x09\x8d\x4c\x39\x30\x88\x4c\x04\xff\x48\
\x8d\x40\xff\x89\xf1\x7f\xd1\x89\xc2\xf7\xda\x48\x8d\x34\x04\xbf\
\x01\x00\x00\x00\xb8\x01\x00\x00\x00\x0f\x05\xbf\x01\x00\x00\x00\
\xba\x01\x00\x00\x00\xb8\x01\x00\x00\x00\x4c\x89\xd6\x0f\x05\xff\
\xc5\x83\xfd\x65\x0f\x85\x2c\xff\xff\xff\x31\xff\xb8\x3c\x00\x00\
\x00\x0f\x05\x31\xc0\x5b\x5d\xc3\x46\x6f\x72\x20\x2f\x67\x2f\x0a\
\x00\x46\x69\x7a\x7a\x00\x42\x75\x7a\x7a\x00\x0a\
", 300);
return kek();
}


Compiles normally with either GCC or clang. Run it on 64-bit Linux.
>>
>>52340686
Then it's not a true RNG circuit
>>
>>52339643
It honestly looks like that g++ .exe doesn't even work. It gives you no output at all, and I assume it doesn't create an a.exe either. I think that code::blocks/that version of mingw is broken.
>>
>>52340725
just dive in,it's the only way you'll learn
>>
>>52340686
>the position and energies of particles specific to the immediate surroundings of a True RNG circuit would be usable to predict the results of said circuit

You cannot prove that particles behave in a deterministic way.
>>
>>52340735
it's easy as fuck to implement functions like that. It's high school physics which makes it easier to implement. I don't see why you're bitching.
>>
>>52340737
>Run it on 64-bit Linux
wait a minute, it's actually not portable
I've actually seen non-portable code on /dpt/ now, not just a meme

I can finally cross it off the list
>>
>>52340737
What the fuck
>>
>>52340758
It doesn't matter if they behave in a deterministic way. As long as their state is known at the moment a number is being generated who the fuck cares what their state is going to be in the next microsecond?

>>52340746
Are you really trying to tell me that True RNG circuits don't take entropy from the surrounding environment?
The whole point of the argument is that such a demon doesn't exist, but people should understand the argument anyways.
What the fuck is a thought experiment to you people?
>>
>>52340759
>I don't see why you're bitching.
Probably because you can't read.
>90% of the problem has nothing to do with programming
They basically just want you to plug values in. It's not a helpful example at all.
>>
>>52340794
You're fucking retarded, nobody asked you to prove the demon existed they asked you to prove the fucking thought experiment
>>
>>52340737
$ gcc fizzbuzz.c -o fb
$ ./fb
For /g/
1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
17
Fizz
19
Buzz
Fizz
22
23
Fizz
Buzz
26
Fizz
28
29
FizzBuzz
31
32
Fizz
34
Buzz
Fizz
37
38
Fizz
Buzz
41
Fizz
43
...
>>
>>52340794
>who the fuck cares what their state is going to be in the next microsecond?

The whole point of something being random or not is whether you can deterministicly predict the outcome. If you have to wait until the moment the event happens then you aren't predicting shit.
>>
>>52340737
beautiful

Anyone have a good shellcode tutorial?
>>
>>52340737
ëUSH5
¿º¸½LùL
÷LõHcÝHiÃVUUUHÁHÁé?HÁè È@9ðu¿º¸LÆ1ÀHiËgfffHÊHÁê?HÁù!Ñ 9Ëu¿º¸LÎëNÀ¸étCHcÑHiògfffH÷HÁï?HÁþ"þkþ
÷ßú L90LÿH@ÿñÑÂ÷ÚH4¿¸¿º¸LÖÿÅýe,ÿÿÿ1ÿ¸<1À[]ÃFor /g/
FizzBuzz


wew
>>
>>52340824
I'll sound it out in baby words for you
true RNG == pseudorandom RNG
known entropy == known random seed, known random number table

>>52340839
If you're shitting out the numbers at the same time the RNG circuit is, then that's for all useful purposes, the same as the random numbers being known, so they aren't random and thus not useful anymore.
>>
>>52340800
The problem is good for beginners.
>>
>>52340866
A true RNG isn't pseudorandom
>>
>>52340875
You're not even reading or applying any serious thought to this shitty argument of yours. I'm done with you.
>>
File: nagisa.jpg (40KB, 480x749px) Image search: [Google]
nagisa.jpg
40KB, 480x749px
>>52340861
Nice detective work, anon. You cracked the code

>>52340859
A lot of the information I used to make >>52340737 I learned doing challenges on smashthestack.org
>>
>>52340887
>Nice detective work, anon. You cracked the code

I diddly done did it!
>>
>>52340886
>let me show you why the the result of a true RNG could be predicted
>true RNGs don't exist (don't make me prove it)
>>
>>52340866
>the same as the random numbers being known
No, it's not. Unless you can deterministicly predict the numbers before they occur, it's truly random.

>known entropy == known random seed, known random number table
That's bullshit. Knowing the state of the universe doesn't mean you know what will happen in the future unless it's deterministic, which you cannot prove it is.
>>
>>52340918
You're a fucking retard that thinks a "True RNG circuit" is literally identical to some magical space wizard device that shits out cryptographically random numbers and doesn't require input.

Whereas I have literally never once referred to "True RNG" but rather "True RNG circuits", which are real devices that take real input from real sources of entropy.

If you're just going to dick around and put words in my mouth you should just fuck off.
>>
>>52340887

Also, with that said, ODA provides a nice view of the shellcode as instructions.

Pretty neat shite, m8.
>>
>>52340955
You literally couldn't predict the result of a true RNG circuit. Otherwise it's not true RNG. That's a fucking tautology, it's circularly true and true by definition.
>>
File: 1445732905653.jpg (418KB, 768x768px) Image search: [Google]
1445732905653.jpg
418KB, 768x768px
>>52340737
>>52340887

Is this considered being a hacker now a days? Writing assembly/shell code and taking advantage of strcpy that was obviously placed there to be taken advantage of for "hacker" challenges?
>>
are we really arguing about TRNG? jesus christ

atmospheric noise is the way to go really
>>
>>52340936
If you know the state of the universe at every moment a random number is being generated by the very real True RNG circuits (which simply take entropy from the environment rather than from Unix Time and a number table), then you can deterministically "predict" every number that will come out of said circuit.

Why do I say "deterministically" in this case? Because the result will always be right, because the only thing that matters at the moment a random number is being generated by a True RNG circuit is the current state of the particles it's taking entropy from.

>>52340981
>otherwise it's not true RNG
You're being a retard again by trying to apply pie-in-the-sky academia logic to a device made by engineers who have to face real problems that are solved by realistic solutions.

You need to get it in your head that a True RNG circuit is not magic and is made by engineers in a realistic way, and whether it is named accurately or not does not matter to this argument.
>>
>>52341011
no. to be considered hacking you would actually have to hack something. Just using shellcode isn't hacking.
>>
>>52341022
Of course it matters whether or not it's accurately fucking named. If true RNG circuit means circuit for non-true RNGs in some weird subculture then you should point that out
>>
>>52341022
It is impossible to know the future state of the universe unless it is deterministic, which is why what you're saying is bullshit.
>>
>>52341011
I'd assume it's more for beginners
>>
>>52341011
Of course not. I've actually made good progress on the IO series on smashthestack, though. Of course, even that's not close to the real world these days, since it disables ASLR and DEP.

But it's highly improbable that you actually know how to write exploits in the modern day either, so no reason to act all superior.

I made it as a joke this afternoon since people were all confused at the Python FizzBuzz from earlier.
>>
File: file.png (141KB, 669x1030px) Image search: [Google]
file.png
141KB, 669x1030px
>>52340671
>g++ -v
Pic related is what I get. Replaced it with mingw-w64 bin in winbuilds but it didn't seem to make a difference.

>>52340748
It does create a process in my task manager that I can't seem to close, even using process explorer.
>>
>>52341075
>abluhbluhbluh it's named wrong
So fucking what? What are you going to do about it, cry to the Casino cabal of Las Vegas that probably invented the thing?

>>52341075
I can clearly see that you don't understand what I mean by "deterministic", and that you're shoehorning your academic flavor of the word "deterministic" in this very wrong context.

As I've said about five times now, the future state of the universe is not relevant.

The current state of the universe is relevant.
The True RNG circuits take entropy from the current state of the universe.
Producing their output.
If that particular state is known, as well as the machinations of that circuit, then you will produce the same number, because you literally did the exact same thing the RNG circuit did.

It would be functionally identical to having a probe on the data output line of the circuit that stole the numbers for you.
>>
>>52341133
>I reply to someone talking about true randomness with a comment about non-true randomness that's mislabelled "true random [x]" and don't tell them it means that

>I am a genius
>>
>>52341147
>I am expected to understand that this moron knows nothing about true randomness to a useful extent and am expected to spoonfeed him something considered common knowledge in the subject
>I am a genius
>>
my unit tests are absolutely disgusting, revolting pieces shit although my actual code looks great.

is it acceptable to awful test code or am I supposed write them with the same care as I write my proper code? Not talking about "ideally" just whether it's accepted practice.
>>
>>52341161
I don't even know what you're fucking getting at.
Either you're trying to take a jab at me for you not knowing true randomness (in which case, you're at fault for replying) or for me not knowing what your completely unrelated and clearly mislabeled and obscuring domain specific phrase means

You are at fault
>>
>>52341201
>>52341161
>>52341147
You guys should just set up a chat room and fap to traps together

Guaranteed to end programming arguments
>>
>>52341201
An assload of people in this thread appear to know where True RNGs get their data.
Hell one guy even mentioned "Atmospheric noise"
Clearly you're the odd one out here.
It's not my fault you never thought about whether or not humans could really make an algorithm that produced true random numbers.
>>
>>52341133
>the future state of the universe is not relevant
It's entirely relevant since, as you have said your self, that is how you determine the result of a truly RNG.

If you know the state of a pseudo-RNG it is possible to generate all future result, hence it being pseudorandom.

By definition you cannot predict the result of a truly RNG, that is what makes it truly random. Yet, as you have claimed in >>52340350, if such a state were known then you COULD predict the result.

Perhaps you would like the definition of predict:
>To state, tell about, or make known in advance, especially on the basis of special knowledge.

So, tell me again why the future state of the universe is not relevant when it is the entire underpinning of your argument.
>>
>>52341219
You muppet, you're responding to people talking about whether or not true random numbers exist by talking about inventions that have nothing to do with true random numbers

If you wanted to talk about "true RNG circuits" maybe you should've been replying to other people
>>
>>52340725
Dude, unreal scripters and unity scripters are a dime a dozen.

The only non-disposable people in game-dev are graphics programmers, engine developers and art directors.
>>
>>52340175
it's 7 different scenes spliced together to emphasize her smugness
you're a moron
>>
>>52341250
>the premiere device that makes what humans purport to be true random numbers is not related to true random numbers
ok
you take your academic whining elsewhere.
nobody is interested in something that can't be made because there is no magic.
>>
>>52341243
Don't worry guy, it turns out ""true random number generator" circuit" means a non-true random number generator. Obviously we're at fault for this.
>>
>>52341273
What the fuck are you bitching about? You think RNGs came before discussions about motherfucking determinism and true randomness? You retard. Maybe next time don't take a philosophy term and use it to describe the complete fucking opposite of what it originally meant?
>>
>>52341267
I know that.
What I'm saying that the animation is consistently trash across 7 different scenes. It seems that anime perfected mediocrity as a medium.
>>
>>52341292
fuck off
>>
>>52341243
You clearly don't understand what a "True RNG circuit" is.
If you'd take the five seconds to go to Wikipedia you'd know how the fuck real people make random numbers.

So as I've done probably four times now, I'm going to DEFINE TRUE RNG CIRCUIT FOR YOU. Jesus Christ you're fucking blind.

A true RNG circuit is a real device made by real people that takes entropy from the environment to generate its results. Future entropy is not relevant, because how could an ordinary device possibly know the state of particles in the future?

>>52341276
you should cuddle together, sounds like you'd get along since there's assloads of evidence in this thread that neither of you can use Wikipedia.

>>52341292
>philosophy term
>implying I ever used it
It would behoove you to not enter an argument without knowing the basics of the topic. Anyone who participated in at least two semesters of a CS class have been taught what psuedorandomness is versus true randomness, and ought to be aware that both are actually pseudorandom.
>>
>>52341329
Oh, of course, you've been churned out of the computer science complex. Why am I not surprised?

True randomness isn't pseudorandom and anyone should know if you have a domain specific term that has those two the same, you point it the fuck out. Jesus fucking Christ you're almost as retarded as the guy who decided "true random" should mean the same as "false random"
>>
I'm too tired for this shit. Are you guys trying saying that randomness exists?
>>
>>52341299
Oh yes, because everything need to move and cost money.
The only reason niche shit gets produced and niche genres get pandered to is because anime is so cheap to produce since the the highest frame rate you ever have to deal with is 8, and most of those frames are drawn by minimum wage scrubs.
>>
>>52341350
That's what we WERE arguing about before this guy showed up
>>
>>52341360
If you don't care about the animation quality of an animated medium, why do you watch it?
It's like playing a video game with bad gameplay or a book with bad writing.

Most anime wouldn't be worse off as a visual novel or something, there's about the same number of frames to be drawn anyway.
>>
>>52341346
You done tipping your fedora or are you going to fuck your elitist ass over to /sci/ to discuss the lack of god or how gay you are for engineers?

https://en.wikipedia.org/w/index.php?title=True_random_number_generator&redirect=no

Face it, you could have spent maybe a minute reading the first paragraph of the article on Wikipedia, realized that a True Random Number Generator is a misnomer, and saved yourself the embarrassment.

You should stop posting.
>>
>>52341371
>It's like playing a video game with bad gameplay or a book with bad writing.

Actually, it'd be like playing a video game with poor graphics. The analogy doesn't hold for books. Storytelling and the quality of the medium in which the story is told are separate things.
>>
>>52341329
You claimed that knowing the current state of the universe, you could PREDICT the result of every "True RNG circuit".

Yet you also claim that the future is irrelevant, and that only the state at the moment the "True RNG circuit" takes entropy from the environment to generate its results.

Knowing the result of something at the same time it happens is NOT predicting it. By definition you must know the result before the fact, which would mean knowing the future state of the universe.
>>
>>52341375
Not him, but a "True random number generator" still doesn't actually generate a truly random number, which don't actually exist since anything can be theoretically be predicted, even if our technology doesn't current allow us to do so.
>>
>>52341371
You clearly don't like anime and no amount of reasoning on my part is going to change your mind.
>>
>>52341393
Would it satisfy your autism to say that the demon could calculate it faster than the TRNG circuit?
>>
Haha
>>
>>52340737
>draw a girl
>call it a boy

people will defend this
>>
>>52341402
>anything can be theoretically be predicted
Can you prove that?
>>
>>52341385
You retard, in animated mediums, the animation itself should carry the medium. The story should be told through the animation. Do you know where the expression "show, don't tell" comes from?
But why am I talking to a retard like you, anyway, you're the type of person who READS an animated, narrated medium. The visual component and the voice acting are the two main methods of conveying the story in an animated medium, but you can appreciate neither because the visual component is 8 FPS and the voice acting is in a language you can't understand. So you read subtitles, poorly translated by retards like yourself, in a hurry to compete with other "fansubbers". You fucking disgust me.
>>52341406
I like well animated anime.
So about three of them.
>>
>>52341417
>be attracted to a 2d boy
>say it was drawn a girl

people will defend this
>>
>>52341402
>since anything can be theoretically be predicted, even if our technology doesn't current allow us to do so
Our technology will never allow us if the theory is wrong.

>>52341407
No.
>>
>>52341488
ok
>>
>>52341471
Sorry, I would, but I'm not up for an argument today. But funnily enough, I actually strongly prefer well animated anime as well. I just believe that's a mostly separate aspect from the story/plot. Anyway, I was never an ass to you, so I don't know why you responded in such an angry manner.

>>52341481
OHHH SHIIIIIT
>>
>>52341417
boys can look like that tho
>>
File: smash dat like button lel.jpg (32KB, 720x480px) Image search: [Google]
smash dat like button lel.jpg
32KB, 720x480px
>>52341471
>being this smug and elitist about your choice in chinese pornography drawings.

wew lad
>>
>>52341512
I get very passionate when discussing art. I'm very sorry.

Also, you implied that I was ever wrong about anything, which calls for an insult.
>>
Interesting thread
>>
File: floppy.png (125KB, 1280x1024px) Image search: [Google]
floppy.png
125KB, 1280x1024px
Floppy Driver.
Can anybody recommend me any good documentation besides the stuff on the osdev wiki??
>>
>>52341432
I doubt it, but anything that was caused by something is deterministic and therefore not random. Even something like nuclear decay is caused by something, and it can be logically deduced that every time that something happens, so will nuclear decay. Albeit we don't know -what- causes it, but something does.

Things can be highly chaotic and as such impossible for us to detect the cause, but the existance of the cause is proof that it was indeed not random.

At least these are my beliefs, I can't prove nuclear decay or shot noise isn't random because I can't see the cause. Of course no one has proven that there isn't a cause either.
>>
>>52341525
Haha yeah, I guess I should have expressed it as an opinion. Anyway, I've had moments like that too on /g/, so don't sweat it. For me, it was a post by a beginner-intermediate about something programming related, and I was an ass for some reason or other. I felt really bad so I apologized afterward, and he accepted. Can't even remember what it was about anymore...

>>52341535
What do you like about it anon?
>>
I have a confession to make.

I don't know what a stack or a heap is.
>>
File: 1452030278257.jpg (114KB, 960x911px) Image search: [Google]
1452030278257.jpg
114KB, 960x911px
>>52339924
https://en.wikipedia.org/wiki/Supersonic_Low_Altitude_Missile
>>
File: file.png (27KB, 554x213px) Image search: [Google]
file.png
27KB, 554x213px
>>52341086
>>52340748
I went ahead and copied my entire PATH variable and reorganized it here. Would any of these be interfering with it maybe?
>>
>>52341371
I watch anime for the cute girls and drama though.
>It's like playing a video game with bad gameplay or a book with bad writing.
No, you should be comparing bad animation to bad graphics, idiot.
>>
>>52341572
http://stackoverflow.com/questions/79923/what-and-where-are-the-stack-and-heap
>>
Is there such a thing as a string table? Like if you are going to use the same string more than once and they can't change so they can all share the same pointer.

e.g.
char *a = "hello"; /* pretend this is a string not known at compile time */
char *b = tablelookup(a);
if (!b) {
b = tableadd(a);
}


What data structure would that be?
>>
>>52341568
Just all the shit about RNG
>>52341572
They're two different areas of memory used for storing a program's data
The stack is my waifu btw
>>
>>52341607
No I shouldn't be, retard.
It's called ANIME because the medium is about ANIMATION.
It's called video GAMES because the point of the medium is GAMEPLAY.

Fucking mongoloid.
>>
File: 1451716106981.jpg (825KB, 1276x1015px) Image search: [Google]
1451716106981.jpg
825KB, 1276x1015px
>>52341607
A game with low-poly terrible graphics can still be good, you moron.
Anime with bad writing makes it terrible all around, unless you're so far gone that you'll watch literally anything with cute girls in it.
>>
>>52341617
Hash table.
>>
>>52341572
A stack is a data structure that is last-in first-out. What that means is, when you take something off a stack, (when you "pop" from the stack) it takes the most recent thing that got "pushed" onto it. That would be the thing on the top- that's why it's called a stack. So stacks operate kind of like the towers in a towers of Hanoi puzzle. https://en.wikipedia.org/wiki/Stack_(abstract_data_type)

In most programming languages, the whole program runs on one big stack in particular called the "call stack". Each time you call a function, all of its data gets pushed onto the stack, and each time you return, it gets popped.

The heap is super loose. Instead of having an order to the data like a stack does (bottom to top), a heap just can be imagined as a floating space to put information in. There are independent pieces of data in the heap, but they have no order or other sort of structure.

When you instantiate and pass around objects, they get put on the heap.
>>
>>52341645
So you would hash the string and that location in the map would have the pointer to it?
>>
>>52341660
Pretty much.
>>
>>52341525
>Also, you implied that I was ever wrong about anything, which calls for an insult.

>being mildly autistic
>>
>>52341552
>anything that was caused by something is deterministic

this isn't true
>>
>>52341688
Explain
>>
>>52341653
>>52341612
Yeah, but nobody gives a fuck about the abstract definition of what is a stack or a heap.

What matters is what they do in practical terms, what to keep in mind when writing programs, etc.
Anyway, my idea was that a heap is where the pointers are and the stack is where everything else it.
>>
File: 1439672279928.gif (1MB, 264x264px) Image search: [Google]
1439672279928.gif
1MB, 264x264px
>>52340800
what do you think programming is used for genius? it solves problems. you think fizzbuzz has more to do with programming than programming a baseball batting bot?
>>
>>52341690
Elaborate
>>
>>52341689

If I cause a ball to fall, that doesn't say anything about how fast, how far, where, etc
>>
>>52341690
the stack holds the pointer addresses to locations in the heap

the end
>>
>>52341705
Elaborate on what?
I have no idea what the fuck a heap or stack is, I was simply under the impression that whenever I make a pointer to something, I'm pushing shit to the heap.
I don't even bother thinking about the stack because the compiler seems to do everything on its own anyway.
>>
>>52341729
THATS WHAT I NEEDED THANKS
>>
>>52341643
>A game with low-poly terrible graphics can still be good, you moron.
Exactly, that's my point. And bad animation doesn't mean bad anime.
>Anime with bad writing makes it terrible all around
Obviously, that is irrelevant to my point though, I was not arguing that at all.
>>
>>52341729
Not necessarily true. The stack can hold values, as can the heap hold pointers.
>>
>>52341765
but the stack still holds the pointer to a location in the heap
it doesn't matter if that location in memory is another pointer or an array block, or an array of pointers
>>
Guys, I'm over at /agdg/ meming super hard at them for being unity script kiddies.
What should I post to twist their panties in a bunch?
>>
>>52341785
Post progress you fucking nodev
>>
>>52341371
>>52341640
literally assburger

of course animes (are supposed to) contain storytelling

anime isn't only about animation quality. that would be like saying video games are only about video quality or that printed books are only about print quality.
>>
>>52341765
No matter what, all references to the heap initially start from/can be traced back to either the stack or global memory. If they can't, you have a memory leak.

>>52341690
Well, learning the hard way is your choice I guess
>>
>>52341729
No.
The stack can hold arbitrary data, same with heap.
>>
>>52341785
They're being productive and you are not, you compiled language zealot.
Maybe you should reevaluate your life.
>>
>>52341794
The stack can hold a LIMITED amount of arbitrary data.
You really can't put more than 10mb of shit into a stack frame without segfaulting.
>>
>>52341785
enginebabbies can't even make fucking tetris

https://www.youtube.com/watch?v=NvHIpxJE2Ss
>>
>tfw 8am

night /dpt/
>>
>>52341811
Good night, see you again soon friend
>>
>>52341811
I've done this before.
DO NOT SLEEP
You will ruin your sleep cycle.
Stay up, it's punishment for sleeping all night.
You'll be really tired in the evening and sleep in early, and you'll wake up early tomorrow, you dumb neet.
>>
>>52341803
And? so you can put 10mb of arbitrary data on the stack, what's you're fucking point you moron?
THE STACK IS NOT ONLY FOR POINTERS fuckface.
Go read some assembly sometime m8.
>>
>>52341820
*punishment for staying up all night
>>
File: 1431698324599.gif (9KB, 645x773px) Image search: [Google]
1431698324599.gif
9KB, 645x773px
What would be the best method of programming a gf? has anyone had any luck with this kind of project?

I'm asking for a friend.
>>
>>52341820
this
>>
>>52341791
How can you be so dumb, it's incomprehensible.

In no way is animation "supposed to" contain a story. The core of the medium is animation and animation without story is still animation. The same way that a video game only has to have gameplay to be called a game and how a story doesn't have to have illustrations.

if you fuck up the very thing that identifies your medium, its core, then why even bother?
>>
What would be an interesting CPU to make an emulator for?
>>
>>52341832
Kidnap a girl off the street and train her.
>>
>>52341820
if you're a neet it doesn't matter much what your sleep cycle is like

but of course it's nice to have daylight when you're awake
>>
>>52341832
>learning programming
>make a lot of money
>buy a gf
>>
>>52341832
programming a girlfriend would almost be as much of a waste of time as actually having a girlfriend. Stop acting like the rest of the world wants you to anon
>>
>>52341848
I'll watch badly drawn anime so long as the premise is good.
I'll play poorly designed video games so long as the music is good.
People have different tastes, dumb shit.
Not everyone cares about the namesake of the medium, and it certainly isn't the only defining factor in determining quality and "worthwhileness".
>>
>>52341858
RISC-V
>>
>>52341807
Is that man some kind of nazi?
>>
>>52341819
you too

>>52341820
I'm NEET I don't have a sleep cycle lol

my bf went to bed 3 hours ago after staying up like 24 hours
>>
>>52341879
That's only because you have shit taste. But that's not a surprise since you watch anime.
I bet you care about lyrics in music too, you fucking pleb.
>>
File: shit_niqqa.png (490KB, 482x660px) Image search: [Google]
shit_niqqa.png
490KB, 482x660px
>>52341640
So, by your definition, some of the greatest Anime series' of the 80's and 90's are shit because the quality is relatively bad.

Point and laugh anons, point and laugh.
>>
>>52341848
anime is like a tv show or a cartoon show, just drawn in a certain style. of course it can have a story and they do contain stories. even that umaru cancer shit has a storyline.

you think family guy is about the animation quality and not the story/jokes?

just because it's called "anime" doesn't mean it's only about animation.

fucking idiot
>>
>/dpt/
>talk more about anime than programming
>>
File: temp.jpg (13KB, 300x300px) Image search: [Google]
temp.jpg
13KB, 300x300px
>>52339494
some fucking sweaty japanese nerd with a small cock in a dark basement probably fucking drawed that you disgusting faggot
>>
>>52341916
We talk about whatever we want you democrat
1st ammendment bitch
>>
>>52341902
>I bet you care about lyrics in music too, you fucking pleb.

If music has lyrics, then yes, it will be judged as a whole, lyrics and all.
If there's no lyrics then it gets judges with no lyrics.

Why are you still replying?
It seems like you only want to argue minutiae at this point.
>>
File: 1432764773186.png (139KB, 400x398px) Image search: [Google]
1432764773186.png
139KB, 400x398px
>>52341807
>Jimquisition
>>
>>52341933
do you even know how to program?
>>
>>52341906
>anime series
>great
Lost me.
>>52341935
>listening to anything other than instrumental music
Holy shit, animetards everyone.
>>
>>52341902
Shots fucking fired. Who the fuck thinks lyrics in some songs aren't awesome? Ur delusional, guy.
>>
>>52341936
what's wrong with jimquisition? are you just a butthurt agdg unity babby?
>>
>>52341862
Oh shit, that went dark quick :^)

>>52341880
That's a good idea - I'll have to look at the spec to see how simple it is to get the basic parts of it though. I almost certainly wouldn't have the time to make a fully compliant emulator.
>>
>>52341926
>implying
norio tsukudani is a woman
>>
>>52341959
Cringy edge master fat fuck.
>>
>>52341956
Every time I hear a song with vocals, I just think "I wish this faggot would shut the fuck up so I could hear the instruments better".
Since, you know, I want to listen to music not hear prose.
>>
>>52341902
>not caring about lyrics
>>
>>52341947
Get better taste in anime and music before replying to me again.
>>
>>52341975
it's just a pretty cool persona he's got going on and he makes valid points in an entertaining manner
>>
File: barely 9000.gif (2MB, 500x281px) Image search: [Google]
barely 9000.gif
2MB, 500x281px
Anyone here have good taste in anime?

You know, Kara No Kyoukai, One Punch Man, Gintama, etc
>>
File: smug girl.jpg (47KB, 400x315px) Image search: [Google]
smug girl.jpg
47KB, 400x315px
>>52341986
>anime
>taste
LOL
>>
>>52342002
The last anime I watched was umaru and non non biyori

should I start yuru yuri?
>>
>>52341998
I still can't stop cringing at his antics though.
>>
File: cute anime pic 0636.png (289KB, 514x424px) Image search: [Google]
cute anime pic 0636.png
289KB, 514x424px
>>52342008
>he replied with an anime picture
LOL
>>
>>52342012
>umaru
No, just fuck off a kill yourself instead you cancerous turd.
>>
When should you use pointers and when should you not? I'm going through SDL and it's seems really random.
>>
>>52342025
Sailor moon is a cartoon you fucking retard.
>>
File: umaru eats the pizza.png (654KB, 580x582px) Image search: [Google]
umaru eats the pizza.png
654KB, 580x582px
>>52342027
umaru is literally aoty 2015
what are you on about?

>>52342037
read the specs
if functions keep asking for pointers to opaque types, then you probably want to put those on the heap.
>>
>>52342037
Whenever you want a function to modify something, or to avoid passing large structs on the stack.
>>
I fucking hate anime.
>>
File: lol.jpg (9KB, 289x175px) Image search: [Google]
lol.jpg
9KB, 289x175px
>>52342080
>being this retarded
>>
>>52342106
Write an extension that will additionally flag and collapse posts with anime images attached.
>>
>>52342080
RETARD
>>
What's the most efficient way to restart a pthread?
I want to avoid thread re-creation.
>>
Is anyone here familiar with the dragon book? I need help understanding something.

In chapter 3 it describes a buffer split into two halves using sentinels. What happens if a token is split between two halves of the buffer, how do you combine it?
>>
It's -14 degrees Celsius outside. Kill me.
>>
>>52342144
goto
>>
>>52342129
but then I'd miss out on all the programming discuss... bahahaha, even I can't finish that with a straight face.
>>
>>52341617
String interning.
>>
>>52342163
I should've clarified that I need to restart the worker thread from the main thread.
So I can't just use a goto.
>>
>>52342122
fuckouttahere:


goto fuckouttahere;
>>
>>52342182
pass messages
>>
>>52342183
Why are you so harmful?
>>
>>52342183
meant for >>52342106
>>
>>52342199
why are weabs so fucking stupid?
>>
>>52342183
>keeping me in here forever
don't do it senpaisasuke
>>
>>52342144
have you already tried googling "thread pool"?
>>
>>52342216
Never fucking reply to me again unless you are contributing to the thread.
>>
>>52342246
he didn't reply to you
>>
>>52342182
Some sort of message passing or interrupt scheme. Ultimately you need to be looking for some sentinel value on the worker thread and resetting state/restarting (continue a loop wrapped around the entire damn thing, even) when it is altered.
>>
File: 220px-Edsger_Wybe_Dijkstra[1].jpg (24KB, 220x293px) Image search: [Google]
220px-Edsger_Wybe_Dijkstra[1].jpg
24KB, 220x293px
>>52342198
Because I'm a GOTO statement
>>
>>52342265
Prove it.
>>
Making this new thread and going to bed!
NEW THREAD

>>52342272
>>52342272
>>
>>52342288
I hope you have nightmares you faggot.
>>
>>52342276
>>
>>52342266
>>52342190
I can't do message passing either. Okay I'll explain my situation.
I have a programmable interrupt timer in my VM, the actual timer functionality is implemented in a pthread which just calls nanosleep with given parameters and raises a an IRQ when it returns, then it waits on a cond variable.
Now, say in my kernel, I set a timer for some event, and then suddenly a running process requests to sleep for a time shorter than the timer I just set before, I'd obviously need to cancel that timer and set a new one, right? so I need to be able to cancel the timer thread and restart it.
Is cancelling/aborting the thread and creating a new one my only choice?
Also, what's the difference between cancelling a thread and aborting a thread?
>>
>>52342327
C++11 conditional variables have a feature to be woken up either manually or after a duration or until the system clock reaches a date.
Don't pthreads have similar functionality?
You could just wake the thread up and have the thread go back to sleep until the new date
>>
File: 'proof'.png (13KB, 669x157px) Image search: [Google]
'proof'.png
13KB, 669x157px
>>52342303
Aren't you special?
>>
>>52341596
Nothing there should be interfering in any way, no. Have you tried actually compiling with the non code blocks g++? I don't think it does anything if you include the -v.
>>
>>52342482
>>52339643
>>
>>52342497
Didn't see. That is the code blocks g++ though. I bet if you download a different version, like the one win-builds provides, or even just install the pure mingw-w64 native windows binaries, add them to path, and then remove that code blocks entry in the path, it would work.
>>
>>52342303
>>52342477

I love both of you equally, it doesn't matter who I replied to
>>
>>52339914
>Java's a shitty striped down version of C#

0 Knowledge detected
>>
>>52342288
die in a fire
>>
>>52340242

use p and q for relatively prime seeds and a bit of modular arithmetic too

2lazy2code
>>
File: file.png (34KB, 677x342px) Image search: [Google]
file.png
34KB, 677x342px
>>52342535
I'm assuming by a different g++ you mean the MinGW right?

I just tried the one in win-builds and another one from the minGW website but I get the same results as before from both of them. If I just erase the g++ path then I get pic related so I know it's doing SOMETHING.
>>
>>52342477
17 minutes between posts

about the time to photoshop a (You) on there
>>
>>52342684
>20 minutes between posts
you really are special aren't you?
>>
>>52342678
I honestly have no idea what you have broken then.
>>
File: file.png (3KB, 393x68px) Image search: [Google]
file.png
3KB, 393x68px
>>52342708
I don't know, but running it in codeblocks gives me this in my task manager processes. The project name in codeblocks is test so i'm assuming that's what it is, but I can't close them out even using process explorer.
>>
>>52342702
are you retarded?
>>
>>52342735
No I'm not black.
Thread posts: 314
Thread images: 45


[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.