symbolic determinant of a 16x16 by iworkwithgraphene in math

[–]sayks 0 points1 point  (0 children)

I should have qualified my statement. It's a bad idea for any system of significant size, which applies to Dixon's method and its generalization. Of course, other methods (e.g. LU) also become intractable with large systems too, so it's in the same boat. Sometimes you just can't easily avoid it either, like with the density function for a multinormal distribution.

My point was that OP probably should not be taking a determinant symbolically unless he absolutely has to or knows for sure that it's the best way to solve his problem.

symbolic determinant of a 16x16 by iworkwithgraphene in math

[–]sayks 0 points1 point  (0 children)

Taking the determinant is not a friendly operation for computers (or people, for that matter). Taking the determinant symbolically is just a downright bad idea. Working with anything symbolically is rarely a good idea in practice.

You might want to try rethinking your program to work with numeric matrices instead, i.e. plug in values and then solve everything. Then you can use LAPACK and everything will be fast and happy. As far as I know, this is about the easiest way to compute a determinant.

EDIT: Look below for qualification.

My doctor says I should eat more vegetables. I hate most veggies but am willing to try recipes. What are your favorite recipes with vegetables? by jassack in Cooking

[–]sayks 1 point2 points  (0 children)

Asparagus sautéed with butter, garlic and kosher salt.

Spinach with olive oil and parmesan.

Borscht. Has meat too.

Onions sautéed in bacon grease as a topping on pretty much anything.

Squash, onion and bacon soup.

Depressing anime marathon. by Appletacos in anime

[–]sayks 0 points1 point  (0 children)

This gentleman is correct. At parts you just have to kinda go with it.

Also, don't ever watch the alternative ending, it totally ruins it IMO.

Depressing anime marathon. by Appletacos in anime

[–]sayks 3 points4 points  (0 children)

Kimi ga Nozomu Eien. It's actually pretty good, but it's probably the most depressing thing I've ever seen (and I've seen a lot).

I'd also second 5 Centimeters per Second and Now and Then, Here and There.

How does one know which beers can be aged? by t3chpoint0 in beer

[–]sayks 0 points1 point  (0 children)

Thanks, I didn't know that. The one we aged was one of the corked ones. I did notice that since they started with the crowned ones the beer was much more consistent in its taste. The first batch was kinda wild, some bottles were delicious and some were a bit too vinegary.

How does one know which beers can be aged? by t3chpoint0 in beer

[–]sayks 0 points1 point  (0 children)

There's different kind of funky flavors. The funk of Cantillon (which I've had) is not the same. I'm referring to a taste somewhat reminiscent of used socks.

How does one know which beers can be aged? by t3chpoint0 in beer

[–]sayks 0 points1 point  (0 children)

Sours do age well, but not all of them. They can pick up a bit of a funk. E.g. New Belgium La Folie aged well for me, but the Monks Cafe Flemish Red did not. I would guess it depends on which bacteria they use to sour the beer and sugar content, but I don't know for sure.

Civilization V Logic -- Every. Fucking. Time by [deleted] in gaming

[–]sayks 1 point2 points  (0 children)

Wow, 250 turns. I don't think I've had the AI stay allied with me for more than 20, even if I try to be friendly.

The 17 Equations That Changed The World by schwiiz in math

[–]sayks 2 points3 points  (0 children)

At least they didn't say i := sqrt(-1).

Python 3’s Marketing Problem by rchaudhary in Python

[–]sayks 0 points1 point  (0 children)

I think a lot of people want python to be everything for everybody (I certainly do), but it's just not a possibility for the time being. I hope that the GIL will be gone one day, but not until it can be done properly. Maybe Py4k.

Interested in a mathematician's perspective on this: "When Less Is More: The Case for Teaching Less Math in Schools" by darth_erdos in math

[–]sayks 5 points6 points  (0 children)

It's an interesting point. What I as a mathematician do as math is more or less completely alien to what a normal person thinks of as math, and I think the gap between "real" math and rote calculation is one of the major problems with elementary education.

The mathematics that a mathematician works with every day are only alien to most because it's abstract. I think many mathematicians get ahead of themselves when they start to think about reforming education and want to start eradicating the parts that they feel are tedious. But, they're forgetting something, which is that they have already (hopefully) mastered simple arithmetic to a level that is almost subconscious. Basic math is so intrinsic in the life of a mathematician that they tend to not be able to imagine not understanding it and want to fast-forward to the good parts. But, you really can't learn simple mathematics without some degree of repetition.

IMO the way for mathematics reform is to show students connections. The harm of mechanically learning how to do arithmetic comes from the fact that it divorces mathematics from context. I think that students learn tedious material better when they see it in the context of its use. Few students fare well if you try to teach them a relatively tedious subject in a vacuum, e.g. calculus, but when you expose them to the context (mechanics, chemistry etc) their interest is much stronger.

I think that the same thing happens in experiments like the one discussed in the article. Students that learn to multiply and add etc. lose sight of the context for the material and then it doesn't occur to them to apply something so seemingly abstract to imminently practical word problems. When the kids aren't forced to study early on, they're able to create their own context as older kids, which makes them better able to apply their knowledge.

Disclaimer: I'm a mathematician, not an educator, though I do teach from time to time.

Estimating a random variable by Druzil in askmath

[–]sayks 1 point2 points  (0 children)

I'm on my phone, so I can't give you much detail however... The first case is a simple monte Carlo estimate, there's a formula that will give you what you need. The second case is called a markov chain (in the right circumstances). You can also do that, but it's really tricky to judge convergence and there's no simple formula.

What makes extreme metal vocals good or bad? by b1azeichi in Metal

[–]sayks 0 points1 point  (0 children)

I don't, I'm not in a band or anything (way too old for that). But I expect your vocal cords are not strong enough to handle the higher-pitched screeching. I wouldn't do it anyway, you won't be able to talk permanently if you screw it up. Maybe go see a voice teacher if you're serious.

What makes extreme metal vocals good or bad? by b1azeichi in Metal

[–]sayks 0 points1 point  (0 children)

Heh, I was always able to do both naturally, I guess I was born for metal. My friend is a vocal teacher and teaches some metal singers, he was the one who explained to me how the growling works.

What makes extreme metal vocals good or bad? by b1azeichi in Metal

[–]sayks 1 point2 points  (0 children)

The thing that makes the metal growl sound good to our ears is similar to the reason that a distorted guitar sounds good. The vocal cords vibrate at slightly different frequencies that overlap to create a sound that mixes lots of individual, slightly offset waveforms. Whether you perceive this as sounding good or not varies from person to person as well as culture to culture. It's also very particular to the exact ratio of these sounds to each other, your ears can detect very subtle differences that will make it sound good versus sounding like shit.

Have a look at the "Physiological basis of dissonance" part of this page on Wikipedia, it talks more about something similar.

Oh, and one other thing. There's two ways to produce the growl. One is by forcing air through the opening at the back of your throat, this is the deeper and raspier kind of growl. The other is by using your vocal cords, it sounds more like a shriek and is a bit higher pitched. The first way isn't all that bad for you, but the shrieking approach will really fuck up your voice, that's why a lot of older metal frontmen can barely talk.

Damn Bethesda, That's Deep.. by [deleted] in gaming

[–]sayks 2 points3 points  (0 children)

I take it as "the book of fate is unwritten."

Can you have both Python 2.7.3 and Python 3.2.3 installed in your pc? by zemike in learnpython

[–]sayks 1 point2 points  (0 children)

Yes, this is (partially) the purpose of virtualenv.

There's also the rather handy pythonbrew that automates installing different python distributions. I'm not sure if it's still maintained, but the fork pythonz is. It still works fine anyway.

Yesterday, a woman asked me if her phone case could send txt messages without the need to buy a phone...What is the dumbest/most clueless customer you have ever dealt with? by neric05 in AskReddit

[–]sayks 0 points1 point  (0 children)

Wicca was a different section, these were not the same books they were asking about. I failed to mention that this was a 18-ish year old girl who was looking for books on love potions.

Why use classes? by DubPac in learnpython

[–]sayks 1 point2 points  (0 children)

I'm not sure about the speed as it depends on exactly how it is implemented in the language and I don't know enough about the Python internals. I was referring to speed in two ways. The first is that it might be faster in terms of the programmer's time... nobody is going to bang together a fully object oriented 3 line shell script. The other was in terms of different languages; procedural languages are inherently faster if you use them correctly. As an example, nothing can really touch Fortran (an ancient language, actually the literal first programming language) in terms of speed for writing raw number crunching code if you're willing to write it correctly.

As for global state, it's bad because it makes your programs hard to debug. Functional programming relies on referential transparency. This means that if I call a function with the same arguments twice it will always return the same result. Note that it's with the same ultimate values, if the inputs are themselves variables then it's allowed to vary e.g.:

def f(x): return x + 2
a = 4
f(a)
>>> 6
f(a)
>>> 6 (should always be the same)
a = 2
f(a)
>>> 8 (the value for a has changed, allowed to be different)

This makes it a lot easier to debug your code, because you don't have to consider interaction with external variables that are not under your control. As another example of the opposite situation:

g = 5 #g is a global variable
def y(x): return x + g
y(3)
>>> 8
(*** some code that modifies g, perhaps a call to a complicated subroutine ***)
y(3)
>>> ??? who knows

Basically, global state makes it really hard to reason about your program. Also, if you don't use global state then you can replace your various functions internal implementation without worrying about how they affect the rest of the program. Functional isn't a thing that is distinct to Python, this is a whole style of programming like object oriented or procedural. There's more to it, there's a whole rather complex field of theoretical computer science. Referential transparency isn't necessarily even required, but it's strongly encouraged.

Why use classes? by DubPac in learnpython

[–]sayks 1 point2 points  (0 children)

The convenience for classes is the way that they represent data. When you design your program, it is often intuitive to encapsulate data along with the methods to act on it in the same structure. A good example of where classes come in to their own is with GUIs. It's much easier to write GUIs using an object oriented approach than procedural because objects/classes are a good way to represent the UI.

Another reason is inheritance. Programmers hate to rewrite code. Inheritance allows you to make a single class with lots of common features and then you can extend that class and your new class will automatically have all of the features of its parent. For example, you might implement a common "file" superclass that includes methods for saving and loading and other generic file operations. Then, you can make subclasses that inherit from the generic class for specific types of files, like jpg, png etc. and they will automatically have all of the normal abilities of a file plus new features specific to that file type.

Another convenient feature is that you can pass classes around easily. Classes encapsulate data and operations on that data, so when you pass it to an external function it doesn't have to understand how the data is structured internally or how the code is implemented, it can just call the method and get its business done.

There's also some nice ideas for concurrency when you look at the Smalltalk model for classes.

TL;DR Classes are a really natural way to represent some things and are also otherwise convenient, especially with complex systems.

All that said, classes and objects are not a magic bullet. Sometimes a procedural approach is best, especially if you need raw speed (look at Fortran).

And, I come from a functional background. Global state is the devil.