The review mentioned web programming, does one need a specific platform installed or it "just runs"?
I'm not sure what you mean by platform or "just runs". If you mean, do you need a certain OS? No. Do you need Apache in particular? No, though Apache and Ruby work very well together. Do you need any external web server? No. One of the standard libraries that comes with Ruby is WEBrick, which is a standalone webserver. You can get Ruby running web apps using WEBrick on any OS, no other software required.
Along those lines, let me throw in a quick plug for Ruby on Rails. Rails makes web application using the MVC model very quick and easy. The default setup includes a WEBrick servlet so you can have your application listening for requests minutes after installation, literally.
Visit #ruby-lang and #rubyonrails on freenode for more information about Ruby in general or Rails.
NO IT ISN'T! Commercially developed transparent Alumina (think clear ruby/sapphire) is here, HUGE difference...
Alumina is a mineral/glass/ceramic, Aluminum is a metal!
Well, technically,
Alumina = Aluminum Oxide (Al2O3)
Although aluminum oxide is a main component of ruby and sapphire that's not what alumina is, primarily. If you have something made of aluminum, just expose it to air and you'll soon have a coating of alumina on the surface.
The alloy the article talks about is 80 mole % (that's 80% by quantity of atoms, not by weight)
alumina, so it is mostly alumina, or oxidized aluminum.
Yes, it's not a transparent metal, but I'd say that calling it "Transparent Aluminum" would be within reason.
Disclaimer: A large portion of the following has nothing to do with either SCO or McBride. You may parse out the ... section as you see fit.
<off-topic>
"I know plenty of Christians with different worldviews. Although I don't know any practising Mormons, I'm sure the same could be said of them."
I can verify your comment that yes, the same is definitely true of Mormons (or as we prefer to be called, LDS -- not to be confused with LSD). The main reason comes from the first sentence: "plenty of Christians", that statement would by definition include LDS members. That is one of the most common misconceptions about the LDS faith -- that they aren't Christian. But the Church's full name should clarify any misconception there: "The Church of Jesus Christ of Latter Day Saints".
In conjunction with that, I'd point out that your statement that you don't know any "practising Mormons" is probably incorrect. Odds are that you do, but don't know that they are. Most people do. We're not all highly vocal zealots that need to make sure you know who we are. We mainly just live in the best manner we know how and let the example speak for itself.
As a whole, I think our faith is very misunderstood by the populace, and that misunderstanding is perpetuated because the majority of comments people see are from either uninformed or hostile individuals (I'd say the majority is in the former, not latter, category).
</off-topic>
Now, as this concerns McBride, I agree with what many other posters have said -- his religious affiliation doesn't really matter. I live in Utah and am a member of a local *nix users group. The majority of the group is LDS, and the majority if not entirety of the group opposes SCO's actions on moral principles as much as anything else.
One of the questions we frequently ask ourselves in our faith is "Are you honest in all your dealings with your fellow man?" From our vantage point, it looks like SCO and McBride are not. Their actions can hardly be indicative of LDS belief or action in general. McBride's position in this action may be influenced by his his beliefs, but that does not equate to our religion.
Above all, as another poster said, Darl could just as easily be of some other faith -- christian, non-christian, non-theistic -- and the question would be the same, though it probably wouldn't be expressed or even considered. I don't think you'd see something like: "Darl McBride is supposedly a devout Buddhist, how do you think that might be influencing his actions?"
Even though there's a lot of public misconception about the LDS faith, the American media has started to realize that we're not a cult of wierdos or fanatics. As such, Darl's religious affiliation doesn't really matter, and they've left it out of the story.
A 6'x4' metal cylinder is going to be pretty darn heavy. Some determined groups of adults (read 'enemy soldiers') might try and make off with some, but I don't think you'll find many youngsters out collecting them after school.
Shooting BB guns at them might be an option however...
One of the most useful instances of blocks I've found, and the one that truly converted me to Ruby, is registering them as callbacks.
I was working on a program while learning Ruby where we wanted to filter an incoming stream of events and filter them out to handlers. Some events needed to be dispatched to multiple handlers, others could be ignored.
The traditional approach would be to modify Dispatcher (any capitalized noun will be a class in my example here) and add some filtering logic each time a new filter needed to be added. But with procs (which are real closures, not just anonymous code blocks), I can do this:
class Dispatcher include Singleton def initialize @callbacks = Array.new end def register(&callback) @callbacks.push callback end def receive(event) @callbacks.each.call(event) end end
str = $stdout prefix = 'On STDOUT: ' Dispatcher.instance.register do |event| str.puts prefix + event.to_s end
str = $stderr prefix = 'On STDERR: ' test = proc { |event| event.type == 'error'; } Dispatcher.instance.register do |event| return unless test.call(event) str.puts prefix + event.to_s end
# produces # "On STDOUT: error text" on stdout # "On STDERR: error text" on stderr # "On STDOUT: other text" on stdout
Of course, this example is trivial, but the
I'll admit I've since learned a way to do this in Perl, but it's much cleaner and all in all elegant the Ruby way.
Jacob Fugal
(ps. apparently <ecode> doesn't preserve my indentation, sorry...)
Re:Former perl, python, java geek gone to Ruby
on
Ruby 1.8.0 Released
·
· Score: 2, Interesting
From what I understand, code blocks are basically anonymous functions that the method they are passed to can only invoke with yield, right? Or is it possible to treat them as any other parameter, i.e. store them, pass them further around, take more than one etc?
When I looked at Ruby (not in much detail yet), I thought that code blocks were a pretty lame excuse for proper functions-as-data
Ruby is a completely first-class language, as in scheme, smalltalk, et al. In other words, anything can be passed around and modified as an object -- methods, anonymous procs and even classes themselves.
It's true that the code blocks mentioned by my grandparent are limited, as the poster said, but ruby also provides the Proc object (mentioned by my sibling).
But even more exciting than anonymous procs (first class methods to you CS theoreticians) are classes as objects. If I want to, I can provide a class name -- which is really just a handle to an object representing that class -- as an argument to a function call. I can modify that class on the fly, adding or redefining methods. It's true that this extreme power requires extreme care, but IMO it's a verynice feature to have available and used correctly can produce very elegant and readable (and correct!) code.
Re:Former perl, python, java geek gone to Ruby
on
Ruby 1.8.0 Released
·
· Score: 1
Ruby has substantially less syntax than Perl and C++, that much is true and pretty commonly known. However, IMHO, Ruby has a bit much syntax, compared to languages like Smalltalk or Scheme.
Yes, but it has *loads* less parentheses than scheme.:)
I wonder if any effective market niche still exists for non-Texas Instruments high-end calculators. The education market -- high school and college math/science students -- is pretty well ruled by TI and has been for years since TI came out with the TI-92./i>
I'll admit that I've never used a TI, so I can't say anything about how the TI-92 and my old HP-48 compare in real terms (the TI may well be better), but I must challenge this statement. I would say that TIs (or HPs) dominate the education market about as much as either the Democrats or Republicans have dominated the U.S. congress in the past decade -- by a nominal margin if any.
Aside from my major in computer science, I also had minors in Physics and Mathematics. (I'll admit, not much exposure outside of CS to engineers, so I can't comment there). In each of these three departments I saw pretty close to a 50/50 mix of TI's vs. HP's. And in the math department, both were dwarfed by computer applications, obviously.
I'll give you the benefit of the doubt in high schools -- I don't have much experience there (very few students had high end calculators of any sorts in my school). The few current HS students that I've tutored in math or physics did use TI's if any calculator.
And finally:
Nearly all of the calculator-oriented curricula out there is designed specifically for TI calculators.
This may well be true, but I've seen very few calculator oriented curricula myself. I only had one class that included calculator training myself (stats). Once again, I can't speak from the engineering standpoint.
More likely, no one interested in that kind of analysis considers Risk much worth the bother.
Agreed.
A couple years ago I had a stats class and out of curiousity and with hopes of practicing the material I'd just learned, I set about to calculate a begninning table of odds for Risk. I got up to a 6x6 chart (so yes, I had calculated 5 vs. 5!) before losing interest, and it only took me 2 periods of physics (which was so insanely simple as to be boring) to do so.
I'm sure there are plenty of others who have done this and more, just never cared about 'publishing' their results.
Once the lexer is complete, a parser can be built. The tokens from the lexer are assembled into a parse tree. My favorite tool for generating parsers is CUP. The grammar for the parser is usually specified in BNF form.
Exactly. The parser uses a BNF grammer; ie. a restricted Context Free Grammar [CFG] which is higher up the heirarchy than Regular Expressions (which are related to Automata).
Your parser uses the lexer, which uses regular expressions, so you could say the parser depends on regular expressions, but the core work of the parser -- what makes it a parser and not a lexer -- is the use of a parse tree to evaluate a Context Free Grammar.
There is no way you can correctly process a CFG using only regexes. Sorry, but no.
A description of quantum cryptography resides at Dartmouth (http://www.cs.dartmouth.edu/~jford/crypto.html). The real advantage of quantum cryptography is in the generation of a secret key for use in secret-key encryption (128- or 256-bit or whatever). From the above mentioned site:
"In secret-key encryption, a k-bit ``secret key'' is shared by two users, who use it to transform plaintext inputs to an encoded cipher. . . A key of 128 bits used for encoding results in a key space of two to the 128th (or about ten to the 38th power). Assuming that brute force, along with some parallelism, is employed, the encrypted message should be safe: a billion computers doing a billion operations per second would require a trillion years to decrypt it. ..
"The main practical problem with secret-key encryption is determining a secret key. . . A possible solution is to agree on a key at the time of communication, but this is problematic: if a secure key hasn't been established, it is difficult to come up with one in a way that foils eavesdroppers. In the cryptography literature this is referred to as the key distribution problem. ..
"Quantum encryption provides a way of agreeing on a secret key . .."
Through the use of random quantum polarizations of the photons and public (unencrypted) discussion of these measurements and their accuracy, the two communicants can determine a shared secret key without an eavesdropper knowing the same info. They then use this key to do standard encryption. A demo of this process can be found here (http://www.cs.dartmouth.edu/~jford/crypto.html).
it'll be secure until anyone with the right
dosh can get their hands on one of these
recievers
Not quite, compare the Enigma encryption machine from WWII. The machine wasn't the encryption, just the device (although the machine itself was quite clever). Without knowing the proper setting for the machine, it was near worthless. The allies had their hands on Enigma for several years before they came up with a cryptanalytic method (kudos to the Poles!) that made the physical machine they had worth something. The encryption is in the signal and noise, not in the machine that reads it.
I'm not sure what you mean by platform or "just runs". If you mean, do you need a certain OS? No. Do you need Apache in particular? No, though Apache and Ruby work very well together. Do you need any external web server? No. One of the standard libraries that comes with Ruby is WEBrick, which is a standalone webserver. You can get Ruby running web apps using WEBrick on any OS, no other software required.
Along those lines, let me throw in a quick plug for Ruby on Rails. Rails makes web application using the MVC model very quick and easy. The default setup includes a WEBrick servlet so you can have your application listening for requests minutes after installation, literally.
Visit #ruby-lang and #rubyonrails on freenode for more information about Ruby in general or Rails.
Jacob Fugal
Although aluminum oxide is a main component of ruby and sapphire that's not what alumina is, primarily. If you have something made of aluminum, just expose it to air and you'll soon have a coating of alumina on the surface.
The alloy the article talks about is 80 mole % (that's 80% by quantity of atoms, not by weight) alumina, so it is mostly alumina, or oxidized aluminum.
Yes, it's not a transparent metal, but I'd say that calling it "Transparent Aluminum" would be within reason.
Jacob Fugal
<off-topic>
I can verify your comment that yes, the same is definitely true of Mormons (or as we prefer to be called, LDS -- not to be confused with LSD). The main reason comes from the first sentence: "plenty of Christians", that statement would by definition include LDS members. That is one of the most common misconceptions about the LDS faith -- that they aren't Christian. But the Church's full name should clarify any misconception there: "The Church of Jesus Christ of Latter Day Saints".
In conjunction with that, I'd point out that your statement that you don't know any "practising Mormons" is probably incorrect. Odds are that you do, but don't know that they are. Most people do. We're not all highly vocal zealots that need to make sure you know who we are. We mainly just live in the best manner we know how and let the example speak for itself.
As a whole, I think our faith is very misunderstood by the populace, and that misunderstanding is perpetuated because the majority of comments people see are from either uninformed or hostile individuals (I'd say the majority is in the former, not latter, category).
</off-topic>
Now, as this concerns McBride, I agree with what many other posters have said -- his religious affiliation doesn't really matter. I live in Utah and am a member of a local *nix users group. The majority of the group is LDS, and the majority if not entirety of the group opposes SCO's actions on moral principles as much as anything else.
One of the questions we frequently ask ourselves in our faith is "Are you honest in all your dealings with your fellow man?" From our vantage point, it looks like SCO and McBride are not. Their actions can hardly be indicative of LDS belief or action in general. McBride's position in this action may be influenced by his his beliefs, but that does not equate to our religion.
Above all, as another poster said, Darl could just as easily be of some other faith -- christian, non-christian, non-theistic -- and the question would be the same, though it probably wouldn't be expressed or even considered. I don't think you'd see something like: "Darl McBride is supposedly a devout Buddhist, how do you think that might be influencing his actions?"
Even though there's a lot of public misconception about the LDS faith, the American media has started to realize that we're not a cult of wierdos or fanatics. As such, Darl's religious affiliation doesn't really matter, and they've left it out of the story.
Jacob Fugal
Maybe, except you're forgetting the dimensions:
6'x4', not 6"x4"
A 6'x4' metal cylinder is going to be pretty darn heavy. Some determined groups of adults (read 'enemy soldiers') might try and make off with some, but I don't think you'll find many youngsters out collecting them after school.
Shooting BB guns at them might be an option however...
Jacob Fugal
One of the most useful instances of blocks I've found, and the one that truly converted me to Ruby, is registering them as callbacks.
I was working on a program while learning Ruby where we wanted to filter an incoming stream of events and filter them out to handlers. Some events needed to be dispatched to multiple handlers, others could be ignored.
The traditional approach would be to modify Dispatcher (any capitalized noun will be a class in my example here) and add some filtering logic each time a new filter needed to be added. But with procs (which are real closures, not just anonymous code blocks), I can do this:
Of course, this example is trivial, but the I'll admit I've since learned a way to do this in Perl, but it's much cleaner and all in all elegant the Ruby way.
Jacob Fugal
(ps. apparently <ecode> doesn't preserve my indentation, sorry...)
Ruby is a completely first-class language, as in scheme, smalltalk, et al. In other words, anything can be passed around and modified as an object -- methods, anonymous procs and even classes themselves.
It's true that the code blocks mentioned by my grandparent are limited, as the poster said, but ruby also provides the Proc object (mentioned by my sibling).
But even more exciting than anonymous procs (first class methods to you CS theoreticians) are classes as objects. If I want to, I can provide a class name -- which is really just a handle to an object representing that class -- as an argument to a function call. I can modify that class on the fly, adding or redefining methods. It's true that this extreme power requires extreme care, but IMO it's a verynice feature to have available and used correctly can produce very elegant and readable (and correct!) code.
Yes, but it has *loads* less parentheses than scheme. :)
Jacob Fugal
I'll admit that I've never used a TI, so I can't say anything about how the TI-92 and my old HP-48 compare in real terms (the TI may well be better), but I must challenge this statement. I would say that TIs (or HPs) dominate the education market about as much as either the Democrats or Republicans have dominated the U.S. congress in the past decade -- by a nominal margin if any.
Aside from my major in computer science, I also had minors in Physics and Mathematics. (I'll admit, not much exposure outside of CS to engineers, so I can't comment there). In each of these three departments I saw pretty close to a 50/50 mix of TI's vs. HP's. And in the math department, both were dwarfed by computer applications, obviously.
I'll give you the benefit of the doubt in high schools -- I don't have much experience there (very few students had high end calculators of any sorts in my school). The few current HS students that I've tutored in math or physics did use TI's if any calculator.
And finally:
This may well be true, but I've seen very few calculator oriented curricula myself. I only had one class that included calculator training myself (stats). Once again, I can't speak from the engineering standpoint.
Jacob Fugal
Agreed.
A couple years ago I had a stats class and out of curiousity and with hopes of practicing the material I'd just learned, I set about to calculate a begninning table of odds for Risk. I got up to a 6x6 chart (so yes, I had calculated 5 vs. 5!) before losing interest, and it only took me 2 periods of physics (which was so insanely simple as to be boring) to do so.
I'm sure there are plenty of others who have done this and more, just never cared about 'publishing' their results.
Jacob
Exactly. The parser uses a BNF grammer; ie. a restricted Context Free Grammar [CFG] which is higher up the heirarchy than Regular Expressions (which are related to Automata).
Your parser uses the lexer, which uses regular expressions, so you could say the parser depends on regular expressions, but the core work of the parser -- what makes it a parser and not a lexer -- is the use of a parse tree to evaluate a Context Free Grammar.
There is no way you can correctly process a CFG using only regexes. Sorry, but no.
(and yes, I have written a parser)
How did this even gain one mod point? Pure flamebait.
it'll be secure until anyone with the right
dosh can get their hands on one of these
recievers
Not quite, compare the Enigma encryption machine from WWII. The machine wasn't the encryption, just the device (although the machine itself was quite clever). Without knowing the proper setting for the machine, it was near worthless. The allies had their hands on Enigma for several years before they came up with a cryptanalytic method (kudos to the Poles!) that made the physical machine they had worth something. The encryption is in the signal and noise, not in the machine that reads it.