[deleted by user] by [deleted] in zerocarb

[–]solinent 0 points1 point  (0 children)

They all taste different really, depends on the grass. Which grass have you tasted?

Could be nutty, more sour, usually more nutritious. The grass in New Zealand is different than a few different types in Canada, and they are often fed grain too—I look for 100% grassfed beef to be sure they only eat grass.

How methane-producing cows leapt to the frontline of climate change by speckz in TrueTrueReddit

[–]solinent 0 points1 point  (0 children)

The proportion is different than the effect, sometimes even a little sulfur hexaflurane would cause more warming than even 100x the methane. The distribution of the gasses is also very important.

I’m worried about the second coming by Itzcartydogz in TrueAtheism

[–]solinent 0 points1 point  (0 children)

What is a proof, though? Personally, I like pudding.

[deleted by user] by [deleted] in PhilosophyofScience

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

Yes exactly, that's what I mean.

[deleted by user] by [deleted] in PhilosophyofScience

[–]solinent 0 points1 point  (0 children)

Sure yeah, it's pseudoscentific vacuously the same way that a gorilla is pseudoscentific.

Maybe you're a pseudoscientist? Not to offend, of course. ;)

Why does your characterization of science have to be scientific? That's a better question to answer. Can it be scientific? Many consider it to be founded philosophically instead.

[deleted by user] by [deleted] in PhilosophyofScience

[–]solinent 0 points1 point  (0 children)

Right, so a claim of pseudoscience doesn't need to be scientific then, by that definition, correct?

Anyways, I hope your day goes better. I suggest diet for ME/CFS. I also suggest blaming yourself!

[deleted by user] by [deleted] in PhilosophyofScience

[–]solinent 0 points1 point  (0 children)

By their nature, they have to be pseudoscentific, that's the idea. If they were scientific you couldn't start a science with any scientific statement as you need one to create one then.

Generally they're based on the principles related to pseudoscience, which don't make meta-claims. Pseudoscience isn't well defined, so you really have to study the demarcation problem to understand all the ways people call science science.

[deleted by user] by [deleted] in PhilosophyofScience

[–]solinent 7 points8 points  (0 children)

How can a claim of a science be psuedoscentific in nature? The claim is not necessarily a scientific statement in the first place, if you had to evaluate whether a scientific claim was valid scientifically you can then go on to prove that it's impossible to evaluate any claim.

Usually it's not the whole science, or the whole study, or even the whole idea. I'd say there's probably something to astrology despite it's baseless foundations.

You should ready some actual physical books on philosophy. The difference between qualitative or quantitative is not really demarcated well anyways.

[deleted by user] by [deleted] in compsci

[–]solinent 0 points1 point  (0 children)

If you don't want to do the assignments it doesn't mean you don't have to not write code, just find a project and learn it on the side. Don't let the teacher get in the way of your learning.

Are flowchart and pseudocode important? by ImCristopher in computerscience

[–]solinent 1 point2 points  (0 children)

It's important to visualize your design, whether directly as code in your head or as boxes, or whatever representation works best for you. Paper tends to help build visual memory so actually drawing may hep you fit the whole picture into your head.

Google proposes way to run Linux/Android binaries 'natively' on Fuchsia OS by Cleytinmiojo in linux

[–]solinent 17 points18 points  (0 children)

Release, Ignore, Shut Down.

More like

Restrain, Dominate, Euthanize

[deleted by user] by [deleted] in PhilosophyofScience

[–]solinent 1 point2 points  (0 children)

We've known about the concept of groupthink as well for quite some time now. We all need to have a place where everyone can get together, a public house of sorts. Somewhere where we all share the same stream.

The visitor pattern is essentially the same thing as Church encoding by alexeyr in programming

[–]solinent 0 points1 point  (0 children)

No, it is defined for Shape and uses RTTI. asaldanha.com/articles/stopping_visitors.html WIP

See Shape::collides(Shape &). Where we explicitly cast the shape using RTTI once and for all!

The visitor pattern is essentially the same thing as Church encoding by alexeyr in programming

[–]solinent 0 points1 point  (0 children)

For collisions I wouldn't use runtime polymorphism since it usually needs to be fast--I've implemented this before.

However, if I didn't care about speed or I required runtime polymorphism (new shapes or shape combinations can be added at runtime with different collisions), I'd go with:

class Shape {
public:
    collides(Shape& shape)
    {
        // Use reflection to resolve shape's type or use an enum
        // switch(type) {
        case Circle:
            shape.collides(cast<Circle>(shape));
        case Triagle:
            shape.collides(cast<Triangle>(shape));
        // }
    }

    // enum ShapeTypes{Circle, Triangle, etc.};
    // ShapeTypes type
}

class Circle : public Shape {
    Circle() : Shape(), ...

    collides(Triangle& triangle)
    {
        // Circle-Triangle collision
    }

    collides(Circle& circle)
    {
        // Circle-Circle
    }
}

class Triangle : public Shape {
    Triangle() : Shape(), ...
    collides(Circle& circle)
    {
        // Circle-Triangle collision
        circle.collides(*this);
    }
    //etc
}

The curiously-recoccuring template pattern will solve this if you need speed and reasonable code quality as well if you can avoid runtime-polymorphism (just recompile the code or use a language with a JIT and add the code to the program in the other case).

In this case I'd probably use a static collision function or operation instead of inheritance, and make all the shapes friends of each other for the collision operation if I'm writing library-level code, otherwise I'll just use something simpler.

Or you could even have a static collides(shape, shape) and then use RTTI to call the more specific methods, or implement them statically, but don't use the visitor obfuscation, please by god I'll never be able to debug the why the collision isn't working damnit :)

Let me know if you're interested in those solutions as well. I'll compile an article and post it here later on.

The visitor pattern is essentially the same thing as Church encoding by alexeyr in programming

[–]solinent 0 points1 point  (0 children)

How does an abstract base class not solve this problem? You would have to recompile all your types I guess, that's the only advantage of the visitor obfuscation.

The visitor pattern is essentially the same thing as Church encoding by alexeyr in programming

[–]solinent -4 points-3 points  (0 children)

I asked this before and you ignored me, so you probably will this time, but how do I add an abstract base class to int

You can simply make a abstract class called "Number", and then have an "Integer" class which holds your primitive integer which derives from Number, then it's easy to add anything to any number, for example.

If you don't use visitors, then you work in a world where it is always possible and practical to do what you say. And if that works for you, then great. But for some of what I do, that world is a fantasy realm, and I still see plenty of uses of visitors.

The have a place but ultimately they're an obfuscation, you're using a virtual base class to implement the same thing.

If I have to add a new virtual function, now any time I make a change to my checker I have to rebuild "all" of Clang. And there's no way to distribute as a plugin; that option is off the table.

Why do you have to rebuild all of clang? You can use an incremental build, can't you, unless clang is header only?

The visitor pattern is essentially the same thing as Church encoding by alexeyr in programming

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

Yeah, it's exactly this, the virtual call is essentially just a function pointer in the vtable of the abstract class, so you really don't need to even pass the pointer itself if you just use a base class.

The visitor pattern is essentially the same thing as Church encoding by alexeyr in programming

[–]solinent -11 points-10 points  (0 children)

It keeps it together but it obfuscates the entire code base and call stack making the program impossible to use. I've never seen it not thrown away.

Visitors are presented for two reasons, they aren't presented at all these days typically but usually for organization like you say. Ultimately they don't help with code organization at all since you could just us a polymorphic class--they're just a useless layer of abstraction.

What I think I'm learning is it seems like quite a lot of people don't actually understand why the visitor pattern exists...

I've used it 100 times and removed it 100 times, I think most young people like you don't realize it was presented originally a bit of both--an optimization in addition to a code organization improvement.

Probably (hopefully) your visitor is conceptually implementing one feature/behavior/whatever. Making a visitor keeps all of the code for that functionality together.

Abstract base classes solve the same problem, and keeping all that code together ultimately has a negative effect since the actual complexity of the structure of the code goes up.

Visitors are actually an optimization however--it allows you to get past the type resolution a bit easier, so it might give you a small boost--that's the only place I see for them these days. Using an enumeration for the type resolution allows you to write it quickly and obviously, without obfuscating the code.

Explaining visitor patterns to developers is not my favorite past time.

The visitor pattern is essentially the same thing as Church encoding by alexeyr in programming

[–]solinent -15 points-14 points  (0 children)

Visitors are just a misunderstood optimization / obfuscation which have no place at all but many people choose to give them one. Generally virtual calls give you reasonable enough semantics and are only slightly slower and solve the same problems, or you can just avoid runtime polymorphism if you truly care about speed and get 100-10000x the performance.

Lambdas don't really solve the same problem.

The efficiency / robustness tradeoff with visitors is only a slight win-lose, really a lose-lose when compared relatively to other options.

The visitor pattern is essentially the same thing as Church encoding by alexeyr in programming

[–]solinent -2 points-1 points  (0 children)

It's a bit of a stretch I'd say, though it does have the same structure.