Ask me any advanced programming question

Ask me any advanced programming question

Attached: 1555264836458.png (900x900, 708K)

Other urls found in this thread:

netlib.org/fdlibm/
jhauser.us/arithmetic/SoftFloat.html?
homepages.cwi.nl/~storm/teaching/reader/Dijkstra68.pdf)
twitter.com/SFWRedditVideos

what is a shoe?

You're a homosexual (guy interested in guys).

The question goes: Would you rather fuck somebody in the ass or have your ass fucked?

Is Go an object-oriented programming language?

How do you average two ints in C?

int i = 0;
int j = ++i++;

what's the value of j?

2

A monad is just a monoid in the category of endofunctors, what's the problem?

Attached: 1552907006284.jpg (480x360, 26K)

What's a good CoC for a new project?

cant do that to an rvalue retard

a / 2 + b / 2 + (a & b & 1);

undefined behavior

What properties are mandatory in a heuristic function for A* to be guaranteed optimal?

How many bytes in a kilobyte?

int i = 0;
static int j[10];
j[i++] = i++;

1000, anyone claiming otherwise is a retard

Optimal highly depends on your context

Undy

Given it's a path-finding algorithm, I have to disagree with you. Why do you say that?

Also, if you had to choose a memory-fitting algorithm for an OS today, which one would you choose and why?

>UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0x82 in position 30: invalid start byte
What does this mean and how do I fix it? I’m running a script that grabs a csv file from my local drive and uploads it somewhere in the cloud

You are trying to interpret bytes as UTF-8 (which is the Python standard) when the bytes you are trying to read really were meant to be interpreted in some other way that is incompatible with UTF-8. Perhaps it's "windows-1252" or some other common codec, try that instead

1024, anyone claiming otherwise is a retard

encoding='windows-1252' worked
you have my thanks

what's the best pair of programming socks?

1

Invisible

>Given it's a path-finding algorithm, I have to disagree with you. Why do you say that?
Can you precompute nodes? Do you take actors into account, i.e. Is your world static or dynamic? Is your world 2d, 2.5d, 3d, more than 3d? Do you have terrain modifiers?

If you want to implement an optimal heuristic you kinda need to know everything about the world you're trying to do pathfinding in. Also A* is a generalized pathfinding algorithm, it doesn't mean it's the optimal algorithm for every conceivable task

Attached: s-l300.jpg (149x300, 9K)

How can I portably get framebuffer access on any android device, ideally with vulkan acceration?

I need to write a floating-point arithmetic package, the pointwise specification to display graphic characters, and a debugging subsystem continuously displaying the contents of typed-in locations in a corner of the screen. It needs to be written in assembly language for a cross-assembler that runs under GECOS.

Looked at the source code for netlib.org/fdlibm/ or jhauser.us/arithmetic/SoftFloat.html? It's written in C but may give you some inspiration

Dude, I understand you want to look smart in an anonymous Tibetan wallpainting forum, but you're making a fool out of yourself.

How so? A* is infinitely flexible so knowing the context seems pretty important to me personally

Well, for starters, A* doesn't care about your geometry or whatever number of dimensions you have.
Also, if you can precompute nodes, what algorithm did you use to precompute them? At runtime, how do you find the path to your precomputed nodes?
Lastly, if your world is dynamic or non-deterministic, then it's another fucking whole problem! Of course A* isn't appropriate, much less optimal, in those cases.

There is a simple definition for an optimal path-finding algorithm, you should check that out.

Ok you make some valid points. Dimensionality does matter because you may want to determine the cost of your heuristic before you actually implement it. If you precompute nodes, yes, you don't need A* which is why I was asking it. Same for your third point.

I mean I only implemented A* about twice so I'm no expert, but I would imagine knowing everything about your problem before trying to implement a heuristic is somewhat wise.

And the optimal pathfinding would be BFS, wouldn't it?

>using the brainlet explanation
Monad is horizontal categorification of monoid.

What's the point of Use Case UML diagrams? Should I make one diagram for all actors, or for each actor one diagram, and then include/exclude another actor if I need it?

an optimal heuristic depends on the layout of your graph you fucking dumbass, it's not a question with a definite answer

8, anyone claiming otherwise is a retard

Holy fuck, for someone who makes fun of someone for trying to look smart, you sure made yourself look like a fucking retard.

>There is a simple definition for an optimal path-finding algorithm
Learn to read, he's only talking about optimal heuristic.

Depends on context.
Anyone claiming otherwise is less smart than he believes himself to be.

Attached: 1561146310837.png (486x562, 224K)

Alright, there are a few misconceptions there, but you're not wrong.
First and foremost: BFS is not a path-finding algorithm, is a graph search algorithm. Dijkstra (and A*, for that matter), are more or less adaptations of BFS for path-finding.
About the dimensionality of the problem, I understand what you're saying, but the heuristic function is not formally part of the A* algorithm. In fact, you could take the very same heuristic, plug into another algorithm and have a worse result (more running time)

You're actually retarded

How can we make hardware random number generation actually random

>heuristic function is not formally part of the A* algorithm
What a fucking mong, holy shit
Who gives a fuck about "formally", it's about the application of it, not some autistic mental masturbation

Attached: 1504575100623.png (500x529, 322K)

>You're actually retarded
and you dont know what a heuristic is apparently, the quality of a heuristic is 100% dependent on your application and you could have a super wierd and specific graph layout with an equally specific best heuristic

Let me guess, you're self taught, right?

Of course the heuristic is dependent on the problem, but the search algorithm that uses it isn't. That's the whole point of heuristic search. The original question was about the required properties of the heuristic for A* to be optimal. Read the thread

Which of recent developments in programming technology do you see as being influential developments in the long run, and which ones do you see as mayfly hypes? And why?

>the required properties of the heuristic for A* to be optimal.
are indeterminate, because it entirely depends on the layout, that's the point, a heuristic is a tradeoff between speed and accuracy, and whether you want more speed or more accuracy is also your choice and thus indeterminate

Why don’t i need to compile JavaScript?

It’s something invented by the anti-sandal movement

>Let me guess, you're self taught, right?
LMAO autistic retard trying to flaunt his paper because he doesn't get that neurotypicals talk to communicate ideas and not to worship dictionary definitions.
Do you also try to base your authority on internet IQ test results?

And no, I've got muh paper too. Being a literal sperg is not necessary for it.

it has a vm

Wrong. If the heuristic is admissible and monotonic, then A* is optimal.
Looks like you'll have to take your undergrad algos again.

Page 93 of pic related. You should read the rest too, might learn a thing or two

Attached: russel_norvig.jpg (638x827, 173K)

do you feel smart being able to regurgitate what lecturers told you instead of understanding them

how would you efficiently share a class between C++ and C#?

oh, I thought you meant
>the required properties of (the heuristic for A*) to be optimal.
but you meant
>the required properties of the heuristic for (A* to be optimal.)

Thank God there's someone not retarded on Jow Forums, holy shit.

I hope I never have to touch software made by you. You have no idea what the hell you're doing

>if you aren't an autistic retard who cares about words more than about their meaning, you don't know what you're doing

>I hope I never have to touch software made by you
you probably already have

what is lambda calculus?

The company name in half life 2 episode 2

based, I have a job for you. Send me a PM

Undefined behavior, but probably 1

Actually a monad is just a functor in the terminal bicategory.

This.

That's a kibibyte.

your dads

What do you mean? Optimality is well-defined term and A* is a cookie-cutter graph traversal algorithm.
If you don't understand what is meant by his question, you should reconsider tech being your hobby.
I didn't mean anything, it's not me who asked that question. Optimality means that the output of the algorithm is an optimal solution, you're conflating it with complexity, or rather asymptotical optimality.
You forgot to categorify your functor. My condolences.

Why did pitiri net fail while coroutines did not? It is mathematically superior, can be implemented with filters (the unix way), and is complementary to functional programming paradigms.

Pretty sure this is patented. Try again if you want to sell your software in the US.

Well kilo- means 1000 not 1024 so it should be 1000 but that's not a power of 2 so there should be a different naming system

>there should be a different naming system
I'll make the logo.

>kibi
>mebi
>gibi
>tebi
>pebi
>etc
You're welcome

p=np?

any coc
even the linux coc maybe
the important part is how you enforce the coc as a mantainer and how that affects your community, not what Jow Forums thinks about it

Better question: If you found out that P==NP, you think that would that bring more good or more evil? What would you do with that discovery?

Probably a bit too general.
What metaprogramming features are convenient for good library integration? Things like math libraries/types consolidation are typical problems.

How?

1 I think

IDEs

how do i become and advanced programmer and how do i get an advanced programming job?

Attached: 1547239026367.jpg (640x493, 58K)

while nesting two while loops, is it possible to break the outer loop and not the inner if a condition is met in the inner loop?

Not without a second predicate.

You could actually make a jump out to another loop which is a copy of the inner loop. It's not the same loop for real but in effect it is.
That way you avoid another predicate.
Horrible overall.

please elaborate, I actually have restructured my program and work around that and felt stupid for even asking myself this question but now I am curious, I might get something out of it

this complex jumping
seems like you should be using threads with semaphores or some kind of signalling if your expectation is to have 2 semi-independent loops.

fuck, now I remember I didn't work around I just dropped the idea and am now remembering some other shit and I might get stuck later, fuggggggg
can one goto out ? do modern languages have that label goto thing

It depends on the language obviously. Go has a great version of goto imo. A lot is forbidden by the compiler. It has good CSP mechanisms too that would probably benefit you here. But I have no clue what you're doing or what language.

bool pred = false;
while(){
while(){
if() pred = true;
}
if(pred) break;
}

depends on the language, UB in C

ooooooooh, nice
are gotos usually bad? I know my language don't have them but few packages are there but I decided not to go there but when I was searching around goto stuff, I was curious about other thing, but I am wondering can goto actually fix lot of problems or I am just being too simple minded code monkey to consider them for lot of little things

>are gotos usually bad
Yes. This (homepages.cwi.nl/~storm/teaching/reader/Dijkstra68.pdf) is what people reference when they say 'x is considered harmful'. Not as common a phrase now but it's one of the early programming memes.
So gotos are quite famously bad. And I would say they're a lot worse now than they used to be because your typical programmer won't be used to them at all. Might never have seen one.

But for some tasks them and similar constructs with similar problems don't have good counterparts in the rest of the programming language you're using.

So you need very good reasons to use one and you should really double check when you've concluded you need one. It's not surprising some languages just don't have them.

goto is not inherently any more or less bad than any other keyword. You can use it wisely or poorly just as any other construct.
In fact, a lot of the keywords you use boil down to structured jmp's anyway. It not only can, but does solve a lot of problems related to control flow.
I don't know how best to convey the knowledge, I guess you might want to look into assembly programming to gain a better understanding of it. Even in a contrived or modern ASM, you'll have to figure out how to implement control flow in a way that's sane, otherwise the entire program dies. And it might give you an idea of how that relates to the execution of your own programs written in higher languages.

Attached: out.webm (1138x640, 673K)

> In fact, a lot of the keywords you use boil down to structured jmp's anyway.
They don't just boil down to jumps. They literally compile to jumps because that is how computers work.
The last 40 years of computer science have been a pseudo-intellectual movement to pretend that the underlying hardware never existed. In the meantime, caches have arrived and only now are the idiots looking for the exits.

Is it possible for a pure functional languge built from either J. Shutt's vau calculus or J. Sturdy's metaevaluator to implement its own garbage collection as a library feature, presumably in such a way as it's bootstrapped from a trivially implementable core? I'm too much of a brainlet to grok either's thesis and this question has been bothering me for a while. GL OP.

Addendum. Are there any brainlet friendly blogs/forums that have even examined Sturdy's thesis? I've only found a few references scattered about, but no real discussion.

I really _really_ think we should brand these people in some way.

He is write tho. If the lecture is any worth, they will have walked through the proof or proven it themselves. That trumps any opinion or experience anyone could every have.

They strayed from the original question. It's a good answer to that though.
I think the person who took on the task to answer didn't understand the question.

how do i tell if the files are buildings in the exapunks level "kings randsom"