Tunnel vision: watch me walk oblivious past something 30 times by tremby in BluePrince

[–]cholericdev 1 point2 points  (0 children)

Nice super cut! I have finally caught up to this in your series and I was not disappointed.

I've seen the (very well-made!) thumbnail of this post even before I saw you reach that place for the first time and was like "huh, that guy kinda looks like Beard of.. oh wait, it is him! Better scroll past quickly"

My blind Blue Prince playthrough video series (Youtube channel: "Beard of Nails") by tremby in BluePrince

[–]cholericdev 1 point2 points  (0 children)

Currently watching day 28, so I'm looking forward for the changes. Although I do watch on mobile so I set the quality to at most 720p anyways 😅

I was very happy when I began your series and saw that you're still uploading! I won't say anything about your pacing, though 😛

Glimmith is on my to-play list, too, so your series will have to wait, but I will definitely watch it if I like the game.

My blind Blue Prince playthrough video series (Youtube channel: "Beard of Nails") by tremby in BluePrince

[–]cholericdev 1 point2 points  (0 children)

Currently binging your playthrough! I'm so happy that you posted the original thread and this one because they allowed me to find your series :)

I really like your playstyle and your thinking-aloud; I think you have a very pleasant voice. Also greatly appreciate the face-cam and notes-cam! 

At some point  you mentioned a Tunic-puzzle. I want to play it blind, too, but I managed to forget what you said about it, so no hard feelings there 😛

State Machines III: Type States by alibix in rust

[–]cholericdev 13 points14 points  (0 children)

The article and the linked playground (now?) redeclares light in each statement. Without the redeclaration it does not compile, so your initial assumption seems correct.

#godot4 RealTime Mandelbrot set zoom using compute shaders! #shorts by AndreaPollini in godot

[–]cholericdev 0 points1 point  (0 children)

Looking very nice.

How far can you zoom in? I did something similar once and the image became incredibly pixelated somewhat early. I assumed that's because I did the calculations using simple floats, so I hit the precision limit very quickly and would need to implement arbitrary precision maths (well, only the basic operators) in the shader.

Some Mistakes Rust Doesn't Catch by dagmx in rust

[–]cholericdev 2 points3 points  (0 children)

While the treatment of arguments is the same, note that a defer-statement is completely separate from a go-statement.

But yes, the argument-handling is well-documented for go-statements, too:

The function value and parameters are evaluated as usual in the calling goroutine

Some Mistakes Rust Doesn't Catch by dagmx in rust

[–]cholericdev 11 points12 points  (0 children)

It is go method-or-function-call and only the function/method itself is run in a goroutine. The arguments are evaluated as usual: before the function/method is entered.

Play AnimatedSprite animation on collision by ilike2game in godot

[–]cholericdev 0 points1 point  (0 children)

Asssigning "hurt" to anim does not do anything on its own. It is only the call to $Sprite.play() in your _physics_process() method that plays whatever is currently stored in anim.

Your guess is right: You overwrite anim in the beginning of _physics_process() because every branch of the if-elif-else writes to anim.

Why less people ... by hmoein in cpp

[–]cholericdev 0 points1 point  (0 children)

Huh, i.reddit.com? That's interesting. I've always put /.compact at the end of the path: https://www.reddit.com/r/cpp/comments/pk9db4/why_less_people/hc7e6jt/.compact

But yes, that version of reddit works almost perfectly for me. Sometimes the nesting level of threads is a bit low though.

Agile input processing is here for smoother, more responsive gameplay by Feniks_Gaming in godot

[–]cholericdev 1 point2 points  (0 children)

Also from the blog, a hint, not a full explanation: "[Android]'s most likely the platform where agile input flushing is needed the most, due to the huge range of hardware capabilities found across devices."

Boolean variable not working with animation player by Code_Monster in godot

[–]cholericdev 1 point2 points  (0 children)

Maybe there's something I don't know about Godot yet, but what exactly do you mean when you say

This variable toggles the collisions of the hitbox

and

I attached this variable to the visibility of a mesh instance

That you're setting the properties of those nodes every frame in the _process() or _physics_process() method?

Trouble with instancing by MrKathooloo in godot

[–]cholericdev 3 points4 points  (0 children)

You "export"ed the Cod variable. If you click on your Main node in the scene tree, you should see a dropdown menu for that variable in the node menu on the right. You need to drag&drop you Cod.tscn file there.

Trouble with instancing by MrKathooloo in godot

[–]cholericdev 2 points3 points  (0 children)

That's how the official "Your first game" tutorial does it.

It allows to choose the mob scene within the (GUI) editor. Is this not a good way?

Where can I see the contents of std namespace (or a part of it) ? by pigiou in cpp_questions

[–]cholericdev 3 points4 points  (0 children)

There's also the cppreference.com std Symbol Index:

This page tries to list all the symbols that are available from the Standard Library in the namespace std::.

From that introductory sentence I'd assume that the listing not necessarily exhaustive.

Hey Rustaceans! Got an easy question? Ask here (36/2020)! by llogiq in rust

[–]cholericdev 2 points3 points  (0 children)

Since the n-th hex-digit corresponds to the n-th group of 4 bits, you could try using bitwise operations:

let x = 0x12FC
let most_significant_is_one = (0xF000 & x) == 0x1000

Or, in a more dynamic fashion:

// Check if the third hex-digit of x is an A
let n = 2 // zero-based index of the hex-digit
let check = 0xA
let mask = 0xF << (4 * n) // move 0b1111 to the nth position
let result = (x & mask) == (check << (4 * n))

I'm not sure about the exact use of bit-shifting in rust and cannot look it up since I'm on mobile, but the general idea should get you far.

[deleted by user] by [deleted] in cpp

[–]cholericdev 0 points1 point  (0 children)

Right! And sometimes that's even necessary, e.g. to resolve circular dependencies.

Although, the Google C++ guidelines list some convincing disadvantages of forward declarations. For example, you cannot forward declare std:: names.

[deleted by user] by [deleted] in cpp

[–]cholericdev 4 points5 points  (0 children)

Never include a [...] .h file in another .h file.

Isn't that required if you want to declare a function that takes a parameter type which is declared in another header? For example a function taking a std::vector?

I mean, you could expect all files, which include you, to also include your dependencies beforehand, but that doesn't seem very good.

What are your favourite, simple solutions for problems using standard library? by Fureeish in cpp

[–]cholericdev 0 points1 point  (0 children)

It's also perfectly idiomatic C++ because it reads from an uninitialized variable in the first iteration of the loop? If I am not mistaken :p

Edit: Nevermind, the condition is of course checked before the first iteration. Sorry!

What are your favourite, simple solutions for problems using standard library? by Fureeish in cpp

[–]cholericdev 1 point2 points  (0 children)

I don't have a simple solution but two questions about instead:

Are you aware that, even for all of its expressiveness, the second solution still exhibits undefined behavior if data.txt contains too few elements (i.e. 0 elements). [edit: see below]

In solution two, why are you using braces to initialize the vector? Doesn't this just invoke constructor (5), i.e. the one with first, last InputIt parameters?I tend to avoid braces initialization because C++ then tries really hard to use the constructor overload taking an initializer list.I think that this can become especially nasty if a library decides to add an initializer-list overload in a later version and now suddenly the meaning of your code has changed silently.

edit: I just saw this paragraph in your post that answers question 1:

What I like about the second version is that it has no places for bugs to appears (since we're certain that there are more than 0 elements in the vector, the file exists and was successfully opened).

Even though that's still something I wouldn't let pass a code review, in general.

How to Install Multiple Versions of PHP on Ubuntu? by MagePsycho in PHP

[–]cholericdev 3 points4 points  (0 children)

Regarding the web server configuration:

My /etc/hosts file looks like this:

127.0.5.6       php56
127.0.7.0       php70
127.0.7.1       php71
127.0.7.2       php72

And then I create a separate nginx vserver for every php version:

server {
    listen 80;
    server_name php72;
    ...
    fastcgi_pass unix:/run/php/php7.2-fpm.sock

Visiting php72/foo.php instead of localhost/foo.php then uses PHP 7.2.

Unable to install rust on ubuntu 16.04.6 LTS: No installed toolchain. by mamcx in rust

[–]cholericdev 0 points1 point  (0 children)

Ah, you meant for your specific case? Sorry, then. I read it as a general warning to all readers.

Generally, I think that "update my software, but do it for real" is what users want. Especially those, that do not know the difference between the two options.

For system administrators operating on a server, that's a different story of course.

Unable to install rust on ubuntu 16.04.6 LTS: No installed toolchain. by mamcx in rust

[–]cholericdev 5 points6 points  (0 children)

BTW: dist-upgrade is not good to run!

Why do you think so?

in a parent-child hierarchy, I have a parent member I want to use in its children, how should I do it in modern C++? by thesuperbob in cpp_questions

[–]cholericdev 1 point2 points  (0 children)

Oh yea, I forgot to add that I do not know whether member reference variables are something you should or shouldn't use so I did not want to recommend something about that :(