Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×

Comment Re:Such potential (Score 1) 520

Parsing arbitrary user-written code is more involved than generating code. When you generate code, you deal only with a subset of the language that your generator emits. When you parse code, you have to deal with essentially the entire language.

Sure, but parsing only has to be implemented once, and then everyone can use it.

And, coincidentally, Python contains its own parser in the standard library.

Comment Re: I don't see the problem (Score 1) 216

You should worry more about your own logical reasoning skills than my reading comprehension. First of all, if you believe that you have the right to "say" you can shoot someone in the face, try saying that you're going to shoot the President in public. You'll see just how far that right goes. You cannot claim as a right something that you will find yourself locked up for.

Second, You claim that I do not have the right to shoot you in the face because it is "AGAINST THE LAW" but in the prior post you claim (erroneously) that I have the right to "lie in court" because "the First Amendment protects that right." Which way is it? Do I have illegal rights or not?

Let me define rights for you:

Rights are legal, social, or ethical principles of freedom or entitlement; that is, rights are the fundamental normative rules about what is allowed of people or owed to people, according to some legal system, social convention, or ethical theory.

Therefore, if it is illegal, IT IS NOT A RIGHT!

I can read just fine. Apparently you cannot so I will spell it out for you. My point is that it is NOT a legal (or natural) right if you cannot exercise it without fear of penalty from the government. I argue that there are voluminous violations of our Constitutional rights by the very people who swore to uphold the very same Constitution. In an ideal world, the only case which our Constitutionally enumerated rights SHOULD be curtailed is when they are in direct conflict with our OTHER rights.

Comment Re: I don't see the problem (Score 1) 216

uh... you CAN shout "fire" in a crowded theatre. The First Amendment to the United States Constitution protects that right.
You CAN "dirty talk" to a minor, the First Amendment protects that right.
You CAN lie in court, the First Amendment protects that right.

What the First Amendment DOES NOT DO is protect you from the consequences of that exercise of the FREEDOM to say what you want to if it is a violation of other Laws. The Constitution is Supreme.

That is the fucking stupidest thing I have ever read on Slashdot. By your logic, I have the right to shoot you in the face too, but I can't avoid the consequences of my exercise of my rights. Here's a clue for free: If the government locks you up when you do something, it's not a right, natural or granted, unless the government is illegitimate and is trampling those rights. If you happen to suffer consequences at the hand of your fellow man, but the government sits on its thumbs, it's a right.

Comment Re: I don't see the problem (Score 4, Insightful) 216

You're not allowed to scream "fire!" in a crowd,
you're not allowed to "dirty talk" to a minor,
you're not allowed to lie in court,
... and that list goes on and on.

Only the Constitution doesn't say "except..." The First Amendment is pretty unambiguous.

Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances.

The current "court interpretations" of unambiguous text is the way we ended up with free speech zones, civil asset forfeiture, warrantless wiretaps, eminent domain for the benefit of private interests, and the rationale that everything is interstate commerce even when it isn't. We strict construction Constitutionalists have taken a lot of shit from those who happen to like their "current" interpretations, calling us mindless Libertarians or anarchists, but you are only one swing vote away from an "interpretation" you can't tolerate. So next time you are robbed by your local policeman who just happens to think you are carrying a bit too much cash to be normal, at least you can pat yourself on the back and say, "Well, at least we can get those dirty talking perverts, or those nasty Megaupload pirates, or those filthy traitors who told the world we are spying on our own people." Just remember that when the words don't say what is clearly written, anybody can twist them to mean what they want the next time around.

[...] most people who complain about the restriction of their free speech either have no clue, or forcefully refuse to acknowledge that that freedom is only valid against the gouverment (sic), not their fellow man.

This is the only "insightful" comment you have posted.

Comment Re:Such potential (Score 1) 520

Ah, I see what you mean now.

Yes, in a case like that - for templating languages and such - you really do want the explicit block terminator. And that's what people do to Python in similar circumstances - just add it. Have a look at Bottle's SimpleTemplate engine - you might actually be able to reuse that directly as it's very lightweight, and it's generic and bare-bones enough to not really be tied to HTML in any way.

Comment Re:Such potential (Score 1) 520

It's actually trivial to generate Python code that way, if all you care about is syntactic correctness (rather than, say, preservation of whitespace) - you simply translate indentation into virtual "brackets" (which is pretty much implicit in AST form - and you do want to work with an AST for any kind of reliable codegen, anyway), splice your code in, then translate it back.

If you want to preserve the original indentation, it's just a little bit harder, but not much. Basically, you just need to remember the whitespace information on your AST nodes. Then, when you reconstitute the code from the AST, you can do so with character-for-character precision.

(Source: personal experience. I work on a Python IDE that has to deal with lots of that kind of stuff for e.g. implementation of refactoring. Once we had our whitespace-preserving AST, the rest was and remains easy.)

Comment Re:So? (Score 1) 520

So far as I can see (and also from your link below), there isn't anything there that's not in D, except possibly for slightly better syntax. But syntax is a small enough thing, and given that D is already fairly mature and has a large community with several prominent people spearheading its further development and popularization, the rational choice would seem to be D.

Comment Re:Ask the Linux distributors to change (Score 1) 755

The problem is that if developers will go ahead and write systemd-only software (like GNOME guys are keen on doing), then any distro that wants to include that software will also have to switch to systemd, and that becomes a very strong leverage on distro maintainers when we're talking about popular software.

Comment Re:A pretty pointless study I would say (Score 1) 677

It shouldn't really be surprising - Ada is clearly derived from Pascal, and Pascal is both a simplification and an extension of Algol-60 (with Algol-W as the intermediate step) - removing exotic stuff like label variables and call by name, but extending the type system significantly (with records and pointers, most importantly). Simula is also a direct derivative of Algol-60 - if I remember correctly, it's actually a strict superset, and retains the entire Algol-60 language as a core, but then adds OOP constructs on top. So large parts of the keyword vocabulary are the same, for example.

Algol-68 is another interesting one. Doesn't really have much with common with Algol-60, but you'll find a lot of precursors of C syntax and semantics in it. Pretty much all C built-in types come from it, including things like "short int" and "long long int", for example, as does the general "type name = initializer" syntax for variable declarations. I've already mentioned structs and unions. OTOH, it still uses keywords rather than curly braces to delimit blocks, so it looks like some strange cross between C and Pascal from a modern perspective.

Comment Re:A pretty pointless study I would say (Score 1) 677

Dijkstra wrote it in 1968. At that time, there was still an active debate over whether structured programming (i.e. loops and functions) was genuinely useful, or a fad that made compilers more complicated than they need to be, and generate suboptimal code. Dijkstra's letter was basically an argument in favor of the former camp, which has ultimately won by 1970s. So yes, it's not really a meaningless comparison given today's state of affairs.

Slashdot Top Deals

Today is a good day for information-gathering. Read someone else's mail file.

Working...