Well, this lets you do transformations of your code in a standard way. You can write special XML-y ways to do unit testing frameworks and such.
Aw, hell. Here's an example from Lisp, which has something a lot like this. It counts from 20 to 30 by 2 and sums up those numbers:
(loop for x from 20 to 30 by 3 sum x)
Now, that's a list of symbols (things like "for") and numbers, and if we just get the language to dispatch on "loop" to a special function at compile time which is passed the unevaluated arguments, we can transform that into optimized looping code. If you want to get even fancier you can even add an object system to a language that isn't object oriented, or accomplish similar amazing feats.
The important thing is transformation. If you want other examples of this sort of thing, there's a language called MetaL which is a pretty straightforward transformation of Java to XML, and there's MS's CodeDOM, which sounds similar but overly complex.
To give some idea of how simple genetic algorithms are, here's a fun fact: if you know what you're doing, you can write one in a few hours. It'll work, too. Maybe not that well, or quickly, but it can work.
In that case, I recommend looking at the best nude photography you can find and analyzing the technique, and getting all the experience (in any type of photography) that you can.
Word to that. When I was in school, we couldn't even use calculators. I could calculate the cube root of large numbers to several significant digits with paper and pencil.
It can be done by someone who can do arithmetic---and knows how. I don't know how, but I know Newton's method of root solving, so I can come up with a way quickly.
To find the cube root of c (which I'll call x), we need to solve x^3 - c = 0. We can do this by coming up with a guess t[0] and recursively saying that t[n+1] = t[n] - (x^3-c)/(3x^2).
I might have learned this in school, but I would have forgotten it. I'd say I was better served by understanding of concepts than overemphasis on calculation.
Even easier method, which I would have used if I didn't already have CMUCL installed: grab the two needed RPMs from the Download page and install them with "rpm -i [filename]" or the GUI program of your choice. It's easy.
By the way, I'm using Maxima to supplement my calculus class. It's helpful to be able to use a full-fledged CAS to go through problems that I missed and see where I went wrong, or to do fancy graphing, or do quick rational arithmetic and save me the trouble, or any one of a number of things. Thank you, to everyone who's helped with Maxima.
By the way, graphing seems pretty slow---unless I throw in some floating-point numbers. Is Maxima trying to use arbitrary-precision rationals for graphing?
If you want something like Maple, but open source, try getting Maxima. It runs on Windows and Linux, can do algebra, calculus, and a good amount of other stuff, and you can use TeXmacs as a front end.
The post I was responding to made it seem far to much like magic. I've heard far too many people acting as if solar and wind power was free, and that our energy problems would be solved through some handwaving about "hydrogen". Unfortunately, TANSTAAFL.
Wind turbines and solar panels cost money to build and run. Splitting water for hydrogen and using that in a fuel cell or internal combustion engine results in a net loss of energy. Hydrogen would be a great way of forcing the job of powering our cars onto our power grid, but it's not a free ticket to environmental friendliness by any stretch of the imagination.
Therefore you try to be different in a different way. I suggest coming up with clever ways of making fun of other people's rebellion attempts. I saw, written on an old desk, the phrase "Your posessions own you". Right beneath it was something written by someone else who pointed out that if your posessions own you, that makes you their posession, therefore you own them, therefore DAMN RECURSIVE [stack overflow].
Does A (pass in a function) work in O'Caml? Back when I know much more about O'Caml than I do now, I could have sworn that you had to use the B approach. Otherwise, why would anybody do it with parameterized modules? Yet there are Map.OrderedType and Set.OrderedType, which are just wrappers around the concept of passing a function, so there must be some reason.
Setting the sort order explicitly doesn't bother me at all; what bothers me is needing to use parameterized modules, which looks like bloating your code just to get around the type system. What I would like is to simply pass a function that can be applied to the element type in the tree---but I don't know how.
The way you would do this in Lisp is to either pass in a comparison function or to use a generic function for comparison, which is close to what you're talking about doing in Haskell. I believe there's something similar in G'Caml, but I haven't seriously looked into it yet.
The thing that really annoyed me about the type system in O'Caml (I haven't used those other languages you mentioned) is that it seems unnecessarily painful to write things like binary search trees for arbitrary ordered types. The language itself had some exceptions to its rules so that things would be less painful, and to me, that looks like a big weakness.
Type inference is great, and I think that it should be part of every language, but O'Caml's type system has some nasty corners.
Type inference can help with native compilation a lot (just look at some Lisp compilers like CMUCL for an example---they can get dandy speed), but you're basically right that it isn't easy.
If you can't be bothered to type all four letters of "porn" without autocompletion, you are a lazy bastard who doesn't deserve any. But if you're diligent enough to type "pr0n" just to figure out Google's autocompletion, then I hope Google dishes out a lot of it to you.
Re:Cool! Just like form AutoComplete
on
Google Suggest
·
· Score: 1
Small enough that Google's servers can hold up under a slashdotting.
Simply switching from briefs to boxers can raise fertility. But briefs have been with us so long that there isn't any fuss over it. It's just sensationalism.
Because in such a huge country, with as much variation as there was in this survey (white and asian students in the US actually scored above the international average), there are bound to be quite a few people who can do statistics.
Not always. If your language optimizes tail recursion (or, even better, plain old tail calls) you can get the equivalent of a while loop by performing some action and conditionally recursing. I would post an example, but the damn Slashcode messed up the indentation. It's basically just a glorified goto.
Sometimes it's not that simple. How do you get your damn brother to stop using IE to visit porn sites?
That's why I have to run Ad-aware and Spybot S&D regularly.
Aw, hell. Here's an example from Lisp, which has something a lot like this. It counts from 20 to 30 by 2 and sums up those numbers:
Now, that's a list of symbols (things like "for") and numbers, and if we just get the language to dispatch on "loop" to a special function at compile time which is passed the unevaluated arguments, we can transform that into optimized looping code. If you want to get even fancier you can even add an object system to a language that isn't object oriented, or accomplish similar amazing feats.The important thing is transformation. If you want other examples of this sort of thing, there's a language called MetaL which is a pretty straightforward transformation of Java to XML, and there's MS's CodeDOM, which sounds similar but overly complex.
If the usernames and passwords are in the email body, then encrypting it will protect the information. Why wouldn't it?
To give some idea of how simple genetic algorithms are, here's a fun fact: if you know what you're doing, you can write one in a few hours. It'll work, too. Maybe not that well, or quickly, but it can work.
I'm sure you'll enjoy that.
No, why do you ask?
As someone in high school, I have to say: that sounds pretty damn revolting.
Van de Graaf generators are cool.
It can be done by someone who can do arithmetic---and knows how. I don't know how, but I know Newton's method of root solving, so I can come up with a way quickly.
To find the cube root of c (which I'll call x), we need to solve x^3 - c = 0. We can do this by coming up with a guess t[0] and recursively saying that t[n+1] = t[n] - (x^3-c)/(3x^2).
I might have learned this in school, but I would have forgotten it. I'd say I was better served by understanding of concepts than overemphasis on calculation.
Plotting on a dry-erase marker board. Chalk is evil, and using it gets chalk everywhere.
Also, for some particularly hairy things, computers can make plotting a lot easier. Just special cases, sure---but they exist.
By the way, I'm using Maxima to supplement my calculus class. It's helpful to be able to use a full-fledged CAS to go through problems that I missed and see where I went wrong, or to do fancy graphing, or do quick rational arithmetic and save me the trouble, or any one of a number of things. Thank you, to everyone who's helped with Maxima.
By the way, graphing seems pretty slow---unless I throw in some floating-point numbers. Is Maxima trying to use arbitrary-precision rationals for graphing?
If you want something like Maple, but open source, try getting Maxima. It runs on Windows and Linux, can do algebra, calculus, and a good amount of other stuff, and you can use TeXmacs as a front end.
The post I was responding to made it seem far to much like magic. I've heard far too many people acting as if solar and wind power was free, and that our energy problems would be solved through some handwaving about "hydrogen". Unfortunately, TANSTAAFL.
Wind turbines and solar panels cost money to build and run. Splitting water for hydrogen and using that in a fuel cell or internal combustion engine results in a net loss of energy. Hydrogen would be a great way of forcing the job of powering our cars onto our power grid, but it's not a free ticket to environmental friendliness by any stretch of the imagination.
Therefore you try to be different in a different way. I suggest coming up with clever ways of making fun of other people's rebellion attempts. I saw, written on an old desk, the phrase "Your posessions own you". Right beneath it was something written by someone else who pointed out that if your posessions own you, that makes you their posession, therefore you own them, therefore DAMN RECURSIVE [stack overflow].
Hooray! O'Caml looks good again! Thank you!
Setting the sort order explicitly doesn't bother me at all; what bothers me is needing to use parameterized modules, which looks like bloating your code just to get around the type system. What I would like is to simply pass a function that can be applied to the element type in the tree---but I don't know how.
The way you would do this in Lisp is to either pass in a comparison function or to use a generic function for comparison, which is close to what you're talking about doing in Haskell. I believe there's something similar in G'Caml, but I haven't seriously looked into it yet.
Type inference is great, and I think that it should be part of every language, but O'Caml's type system has some nasty corners.
Type inference can help with native compilation a lot (just look at some Lisp compilers like CMUCL for an example---they can get dandy speed), but you're basically right that it isn't easy.
If you can't be bothered to type all four letters of "porn" without autocompletion, you are a lazy bastard who doesn't deserve any. But if you're diligent enough to type "pr0n" just to figure out Google's autocompletion, then I hope Google dishes out a lot of it to you.
Small enough that Google's servers can hold up under a slashdotting.
Simply switching from briefs to boxers can raise fertility. But briefs have been with us so long that there isn't any fuss over it. It's just sensationalism.
Damn nonstandard operator names. Exponentiation: Is it ^? Or maybe **? Or are we getting really funky and making it be ^^? Or even "expt"?
Slashdot has much higher standards of spelling, grammar, and organization than the examples given in the article.
Because in such a huge country, with as much variation as there was in this survey (white and asian students in the US actually scored above the international average), there are bound to be quite a few people who can do statistics.
Not always. If your language optimizes tail recursion (or, even better, plain old tail calls) you can get the equivalent of a while loop by performing some action and conditionally recursing. I would post an example, but the damn Slashcode messed up the indentation. It's basically just a glorified goto.
Sometimes it's not that simple. How do you get your damn brother to stop using IE to visit porn sites? That's why I have to run Ad-aware and Spybot S&D regularly.