-
Posts
8390 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by bascule
-
It really depends on what kind of language you're trying to write and what kind of interpreter you're trying to write. The very first thing you'll need to do is scan/parse the input you're trying to interpret into some kind of abstract form. This will require learning a little bit about languages. I learned how to do this from the Definitive ANTLR Reference. ANTLR is a parser generator tool written in Java, although the book contains a good introduction to languages and language recognition in general. After you read the section on languages you'll hopefully understand the differences between regular and context-free languages, both of which you'll need to understand if you wish to write or generate a scanner and parser. There's several tools to generate scanners and parsers. ANTLR is certainly one, but more common ones are lex and yacc (or their modern successors flex and bison). The parser will spit out input programs in an abstract, tree-structured form, known as an Abstract Syntax Tree. Once you have your program represented as AST, there's several strategies to interpreting it. The most straightforward is to use a tool like LLVM to compile your language to machine code. Here's a tutorial on making your own language using LLVM: http://llvm.org/docs/tutorial/LangImpl1.html Oh, have I mentioned I'm making my own language?
-
How long before our civilization reaches Type I, Type II, Type III civs
bascule replied to Reaper's topic in The Lounge
The first question I'd ask is: where do you get the mass to construct a Dyson sphere? From the star itself? -
I feel differently. Perhaps you'd like me to start a thread?
-
I found this neato realtime countdown to LHC's activation: http://www.lhcountdown.com/ 31 days, 7 hours to go! For those living in a cave: LHC is the Large Hadron Collider, the world's most powerful particle accelerator. It's hoped it will spot the Higgs boson, a hypothetical particle responsible for mass and predicted by the standard model. Observing the Higgs particle would be a major breakthrough in physics. It's also hoped that LHC will observe so-called "sparticles" which would provide proof of an idea called supersymmetry.
-
If you really want to argue this it probably deserves its own thread.
-
Yes, that's exactly what happened, the regulatory safety net was removed, housing prices skyrocketed, then the bubble burst, and now the economy is in the toilet. And we did that... why? How is that better than regulation?
-
Java is a language I would consider fairly low on the power continuum. Java's foibles are revealed through the many design patterns one must learn in order to solve what are relatively easy problems in other languages. The factory pattern sees extensive use in Java, due in large part to the semantics of constructors in Java (all constructors are implicitly final). In higher level languages, the factory pattern is relegated to a set of cases the typical programmer never deals with. That's to say, it still has its uses, but they're not something most people ever deal with. Observers in Java require the use of ugly anonymous classes because Java previously provided no way to use functions as arguments. Beyond that, Java remains just low level enough to be terribly annoying. While most languages remove size constraints on numbers (and have only Fixnums and Floats) Java retains this from lower level languages. Furthermore, Java remains halfway between the C/C++ world and the HLL world in that it lets you specify sizes for integers / floats, but not signedness. This makes Java not low level enough to perform fixed precision binary arithmetic easily (e.g. hashes, cryptographic ciphers). Java is slowly working its way up the power continuum. I've heard that Java 7 features bona fide lambdas. That may help de-uglify Java observers. All that said, in Java you just end up writing more code. This is largely due to its stupid type system which lacks the inference capabilities of higher level languages like OCaml or Haskell. More code generally shrouds intent as it makes things harder to find. It also makes them more difficult to maintain. The "more code" problem in Java has continued to the point that people generally manage changing interfaces by using automated tools to shove around large chunks of code, as interfaces changes can't be made simply.
-
Can you detail to us more how you think the mortgage crisis was caused by overregulation? To me it's a crystal clear case of deregulation gone bad. Lenders sought to create a number of "bait and switch" mortgage products which prior regulations forbade. These are the afforementioned adjustable-rate mortgages, mortgages that started interest-only or with introductory teaser rates, and mortgages with no down payment. The plan, as far as what I can tell, was to lure in mortgagors with low introductory rates, then lock them into much higher rates. It's the same thing credit card companies have been pulling off for years to some degree of success. Except these aren't credit cards we're talking about. These are assets with a valuation of hundreds of thousands of dollars. These are assets intimately tied into larger financial markets in the form of mortgage backed bonds. The lending institutions let lots and lots of untrustworthy people borrow money, and those people failed to borrow it successfully. The net result is lots of lost money: for the mortgagors, for the lenders, and for owners of mortgage backed bonds. Nobody came out a winner here... it was a massive experiment in failure. Where, exactly, does overregulation enter into this mess?
-
There is absolutely, positively no science going on there, whatsoever. This is religious dogma being foisted upon helpless students, and surprise surprise, it's not working out very well.
-
How long before our civilization reaches Type I, Type II, Type III civs
bascule replied to Reaper's topic in The Lounge
I don't think it's easily predictable. -
Handgun Widespread Availability Increases Suicide Rate
bascule replied to SkepticLance's topic in The Lounge
I'd like to see a comprehensive comparison of all methods of suicide, first and foremost comparing the number of suicides performed in a given manner to the success rate. SkepticLance compared three methods, which seem more or less randomly sampled. -
I don't want to overgeneralize, but I've noticed "long-standing conservative beliefs" tend to run antipodal to science... you know, things like intelligent design, life begins at conception, tobacco doesn't cause lung cancer, pollution isn't harmful, global warming is a lie, etc. etc. Can you name one that happened this century?
-
I think the blame is equally shared between politicians and economists for our present situation. Bernanke didn't go as far as to blame Greenspan for the present situation, but he certainly implied it. Steve Forbes blasted Greenspan outright.
-
Maybe I'm confused, but I was under the impression if they modified the bill it was sent back to the House for another vote...
-
This is quite the juxtaposition: http://youtube.com/watch?v=cDQv5CbhipI I don't support the hecklers, per se, but the response was terribly ironic: As Bush says: "To my fellow citizens to be, we believe in free speech in the United States of America" ...two secret service agents drag off some banner waving hippie who was calling him a war criminal. Yes, we believe in free speech, but step out of line and the man will come and take you away... Well, the crowd certainly ate it up with a spoon. Happy birthday, America!
-
Well, the S&L crisis was another example of deregulation blowing up in the country's collective face. The California electricity crisis at the beginning of the decade was also caused by deregulation, exploited by vindictive plant managers trying to cash in by purposely lowering the energy supply to drive up the cost of electricity. The result was rolling blackouts. The recent New York blackout is another example of deregulation gone bad: electrical lines that were originally designed for failover are now used to sell electricity between various parts of the grid. This makes the grid substantially more fragile as there's less excess capacity in the lines to handle failures in other parts of the grid. In my opinion markets which play an enormously important role in the economy (the mortgage market) and ones which provide essential services (the power grid) should most certainly be highly regulated, and attempts to deregulate them have repeatedly resulted in disastrous failure. And while we're at it, with the national debt approaching $10 trillion (having increased 66% since Bush took office) we should probably consider reducing new foreign debt, but that'd probably involve ending the war... something only Obama can do at this point as McCain seems pretty intent on business as usual.
-
If you don't have order of operation the grammar is ambiguous. In a particular type of computer program which recognizes computer languages (most of which contain arithmetic with implied order of operation) this is known as a shift/reduce conflict. These programs resolve the problem by picking one of the two ambiguous options, but it's generally frowned upon to leave these in your grammar.
-
Here's a wealth of documents supporting Kucinich's claims, acquired by Judicial Watch under the Freedom of Information Act: http://www.judicialwatch.org/iraqi-oil-maps.shtml
-
As long as he opposes retroactive immunity I'm happy, although I'd prefer he not support the act whatsoever. I still feel it's unconstitutional.
-
I think it's a fairly well known fact that the variety of fiscally unsound mortgages banks began to offer after deregulation of the mortgage industry, such as adjustable-rate mortgages, mortgages that started interest-only or with introductory teaser rates, and mortgages with no down payment, are what lead to the housing crisis which only compounded the sagging dollar and further dampened the economy. This wasn't the only cause, of course (many blame Greenspan for keeping rates too low for too long) but it was certainly the principal one. I'm not saying there wouldn't have been a market correction otherwise, but it was certainly a severe one thanks to deregulation.
-
http://www.bloomberg.com/apps/news?pid=20601087&sid=aH0_cYGS8Avc&refer=home America is now the 2nd worst performing country in the G8, after Italy. A weak dollar doesn't bode well for a country with a massive addiction to foreign imports, including oil. I'd attribute this to decades of Milton Friedman-inspired economic policy blowing up in the country's collective face (and that includes such policies introduced by Clinton). Massive deregulation precipitated massive corruption which in turn precipitated massive devaluation. Of course none of this is going to deter free market advocates who think that the economy was overregulated even under Bush.
-
How can abstinence education remotely be considered a "theory"?
-
This is a little more than just "testing scientific theories on a massive scale". It's screwing with the development of children. They're withholding knowledge of safe sex from these children. No matter how good the program is some kids are going to have sex anyway, and those kids don't receive a proper education about safe sex. The end result is predictably higher rates of pregnancy and STDs. And in what bizarre context can abstinence-only programs be considered a scientific theory? The same context as intelligent design?
-
Allowed by whom? Short of Congress impeaching Bush or cutting off funds to the programs, the US court system / SCOTUS is the only entity that can put a stop to unconstitutional activities, and the process of putting a stop to them is long and drawn out. Bush has a long history of programs I at least consider to be unconstitutional. These include the warrantless wiretapping program (which violates the 4th Amendment) as well as denying Guantanamo inmates habeas corpus (at least they cleared that one up) Among other things, Bush has authorized them to use "sacred texts" (e.g. the Bible) within federally funded programs: http://www.commondreams.org/headlines03/0508-07.htm
-
Huh? Are you saying since we don't know, we should assume, by default, that he's making more sarin? As it turned out, he was actively hiding nothing. Glad we destroyed our economy, our reputation in the international community, and the lives of thousands of Americans to figure that out empirically. Your argument is based on an appeal to consequences (if Saddam has WMDs he might kill us all!), which is a logical fallacy. I agree having WMDs is bad, but it says nothing about the truth of whether or not he did have WMDs. This turned out to be false, and there turned out to be dire consequences on the other side as well.