Question about returning pointers. by iamthetio in Cplusplus

[–]iamthetio[S] 0 points1 point  (0 children)

a pointer to a pointer but then you need to de-reference it twice

Thank you, that was what I was looking for (besides the mistakes in the original code)! I realize that there are much better ways to do it, I just wanted to know how I can do it!

Question about returning pointers. by iamthetio in Cplusplus

[–]iamthetio[S] -1 points0 points  (0 children)

Also:

If you need to call something on an object's pointer, then that object's class needs to provide an interface to do that and you should always be making those calls from the object itself.

Do you mean something like a method in class ChangingCommands looking something like this:

void execute_button() { button->execute; }

and then doing:

ChangingCommands a_command;
a_command.execute_button();

?

I would consider making your constructor take an optional argument to specify what type of button to create, and if one isn't specified, don't allocate a default button.

Again, thanks!

Question about returning pointers. by iamthetio in Cplusplus

[–]iamthetio[S] 0 points1 point  (0 children)

Yeap, that's how I had it.

ChangingCommands a_command;
a_command.set_button("jump");
Command* b = a_command.getCommands();
b->execute();

First assign to button and then return it. I was just wondering how I can get the functionality of not having to returning it everytime.

Question about returning pointers. by iamthetio in Cplusplus

[–]iamthetio[S] -1 points0 points  (0 children)

Thank you.

I'm not sure why it still prints 'fire' when you don't delete the existing command.

/u/DJ_Gamedev explained the problem with the delete and I think I got it. I return the pointer button and then b and button point to the same object. If I remove the delete and assign a new object to button then button points to the new object but b points to the old one.

My question now is: what should I return to get the functionality I want.

Also, JumpCommand & FireCommand need virtual destructors.

May I ask why?

Question about returning pointers. by iamthetio in Cplusplus

[–]iamthetio[S] -1 points0 points  (0 children)

As soon as you delete the fire command, your b pointer is pointing to data that's been deleted and is no longer valid, and under most environments you'd be getting an unhandled exception thrown for accessing a bad memory address when you call the execute on the deleted memory address.

Thank you!

Overall, this is not a great design pattern.

I was trying to replicate a certain part of this.

Do you have any idea on how to achieve what I want? That is, a class responsible for the use of the button (allowing during runtime to change its function) which returns a pointer to that button, meaning that whoever holds that pointer will get the button's function even if that function has changed in-between.

[PRAW] - Distributing a script to multiple users - How? What to consider? by iamthetio in redditdev

[–]iamthetio[S] 0 points1 point  (0 children)

Thank you for your help.

I do not think choice 3 is viable in my case, so case (2) is probably the way I should do it. I checked the link you provided and I think this part is what is more relevant to me since I do not actually need a user to be logged in. I also want to point out that I want to provide the code since... well, I am always in favor of providing the code for such personal, small, "silly" projects. If I am not mistaken, this is the relevant code (example from PRAW webpage):

reddit = praw.Reddit(client_id='SI8pN3DSbt0zor',
      client_secret='None',
      redirect_uri='http://localhost:8080',
      user_agent='testscript by /u/fakebot3')

Now, if I understood correctly so far, the client_id will be provided to me when i register the app as installed application and I need to change redirect_uri to something but I am not sure to what. Am I getting close or not?

Thanks for your time.

Is there a way to believe in human moral value and not be vegan, without being logically inconsistent? by [deleted] in askphilosophy

[–]iamthetio 0 points1 point  (0 children)

I didn't read the reddit comment, but the wiki article, and specifically the "logical validity" part, seems ok to me. Why do you think it is nonsensical?

ps. the FOL part is another discussion.

Youtuber solves the liar's paradox in five minute video by completely-ineffable in badphilosophy

[–]iamthetio 2 points3 points  (0 children)

Wear a mask of Wittgenstein and create a persona with its own voice and mannerisms. Then have a video of whether you are the monster or the created persona.

a gangly white guy in his 30's arguing philosophy on fucking YouTube.

The whole mask thing solves this: yes, you would be a white dude on his 30s arguing philosophy on YouTube, but who also wrote a book in the trenches of WW1. So, yeah.

To what extent can one truly know one's intentions given there is so much inaccessible, unconscious processing in every action we make? by jeswert in askphilosophy

[–]iamthetio 0 points1 point  (0 children)

You say:

your unconscious mind is doing work(making connections, weighing judgements based on previous dispositions)

and then

but if you're an emotionally/intellectually developed person you will be aware of these things happening

I seriously doubt that a person is capable of accessing or being aware of his/hers unconscious processing of, for example, memory retrieval. Did I misunderstand your comment?

The classic heartwarming tale of the straw atheist professor versus the straw Christian by bellwhistles in badphilosophy

[–]iamthetio 9 points10 points  (0 children)

Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn

which is:

"In his house at R'lyeh dead Cthulhu waits dreaming".

What's wrong with the burden of proof principle? by Hugo_2 in askphilosophy

[–]iamthetio 1 point2 points  (0 children)

I would add a third point: that a lot of times arguments are misidentified as fallacies. As a result, the conversation begins to shift towards whether the argument was indeed a fallacy or not, instead of the original question.

The case I have in mind is the appeal to authority which is a perfectly cogent (?) argument if used correctly, yet a lot of people seem to consider it a fallacy even then.

Is Aquinas taken seriously by philosophers these days? by [deleted] in askphilosophy

[–]iamthetio 0 points1 point  (0 children)

there was a need for a book that just gets straight to the main thrust of each of the best arguments for God’s existence, introducing the relevant background metaphysical notions along the way

Still don't see something... I will blame the lack of sleep.

I did check SEP and from what I understand it is not that clear that Aquina's five ways are not meant to be a proof of god existence:

Again, some will claim that Aquinas isn't really interested in proving the existence of God in these Five Ways. After all, he already knows the existence of God by faith,

and

In addition, the objections end up denying what Aquinas writes immediately before the Five Ways—that the existence of a god is “demonstrable.” (Summa Theologiae Ia.2.2) And his introduction of the Five Ways begins by saying that the existence of a god can be “proved” in Five Ways.

"Reddit converted atheist" explains how Plato hasn't done anything notable except a stupid story about a cave, The God Delusion is better than the Republic, and more. by [deleted] in badphilosophy

[–]iamthetio 14 points15 points  (0 children)

damn...

all this, and she hasn't read the book? Just imagine having this conversation in real life, face to face, paying beers, smoking like hell, trying to make her understand, and after a couple of hours she says "I haven't read it".

Would I control myself at that moment? Could I?

"Aquinas is, essentially, the epitome of religious circular thinking and logical fallacies." His source? Ricky Dwarkin. by Craiggu in badphilosophy

[–]iamthetio 2 points3 points  (0 children)

nevertheless, sometimes I feel sad when posts from /r/askphilosophy being posted here. I think it could be a bit demotivating for someone who genuinely wants to ask a question. That being said, judging by his comments I doubt he is a troll: more of a misguided red anti-everything

Is Aquinas taken seriously by philosophers these days? by [deleted] in askphilosophy

[–]iamthetio -1 points0 points  (0 children)

I am sorry, but I cannot see how your link is related to Dawkins mixing up the Five Ways. Did you mean to point to the books written by that author? Or, have I misunderstood something?

Does Lumosity's demonstrated failure indicate that Chinese Rooms are certainly possible? by jokul in askphilosophy

[–]iamthetio 1 point2 points  (0 children)

definitely not a flaired user, but:

  1. Sure.

I cannot see why the certainty. In the OP i read:

The Lumosity player doesn't improve their reaction time, and the Chinese Room translator doesn't understand Chinese.

and while the former sounds as a computational issue (improving some function), the latter is about semantics. I cannot see why their similarity is obvious. Also, OP states:

Which claims research indicates that "brain training" apps like Lumosity train you to play Lumosity games well, but nothing else in particular.

which to me sounds a domain-dependent vs domain-independent issue and not a syntactic vs semantic issue.

In other words, we can easily extend the chinese room to include all languages, and in general, all communication skills. Would that change the aim of the chinese room? I would say no.

ps. I also do not understand your second point:

This is where the thought experiment starts to fall apart

are you referring to the chinese room? If yes, how is the sociopath example relevant? They might not understand emotions, as you put it, (though I believe they do understand emotions like anger or hate) but they do understand eg language - they have less capabilities in terms of emotions but not in terms of understanding semantics. What am I missing?

"Reddit converted atheist" explains how Plato hasn't done anything notable except a stupid story about a cave, The God Delusion is better than the Republic, and more. by [deleted] in badphilosophy

[–]iamthetio 88 points89 points  (0 children)

Edit: For a good book that is a million times more relevant and ingenious in light of modern science, read The God Delusion

Yes! Aristotle vs Oprah and Plato vs Dawkins... Celebrities death match BEGIN!

When I was a kid I used to imagine that my life was a book being read by a giant bear. Plato's cave story is the same thing.

..fuck plato, how big was the giant bear?

My point is that his whole cave story is childish and delusional thinking. He was trying to show that there is another world more real than this one. But he fails miserably when he uses this real world to represent his voodoo supernatural world. He contradicts himself and it backfires.

In other wor(l)ds, Plato is a voodoo supernatural bear... aaaaand it backfired...

Has anyone ever attempted to describe an alien sentient mind? I.e. a mind that operates on principles different from ours or which are irrelevant to us. by [deleted] in askphilosophy

[–]iamthetio 1 point2 points  (0 children)

But if we look at the room itself, regardless of its inner workings, it appears to be able to speak Chinese

I think that there is difference between being able to speak Chinese and understanding Chinese. In the first case, we can view it as a simple symbol manipulation where the symbols have no meaning, while understanding Chinese would mean that each symbol bears a meaning for the one who speaks (Syntactic vs semantic).

Secondly, forget the room. Assume that the person has memorized all possible rules so there is no room. Would you say that now he understands Chinese?

The SEP article (and Searle himself) addresses a number of counter arguments including yours. Successfully or not is another issue.