Prothon - A New Prototype-based Language
Ben Collins writes "Prothon is a new industrial-strength, interpreted, prototype-based, object-oriented language that gets rid of classes altogether in the way that the Self language does. It uses the sensible, practical syntax and add-on C module scheme from Python. This major prototype improvement over Python plus many other general improvements make for a clean new revolutionary breakthrough in language development. Prothon is simple to use and yet offers the combined power of Python and Self. Check out the first public pre-alpha release at prothon.org."
A pre alpha release really isn't newsworthy. Is this some one's pet project? I wasn't aware Python was broken.
Thalasar
Sounds like a korean car.
Watch this Heartland Institute video
call it "Industrial-Strength" if it's "pre-alpha?"
All Your Memory Are Belong To Java
Yet Another New and Improved Scripting Language! Just what we needed!
Oops, did I say that out loud?
...Yet Another Language I Need To Learn...
Maybe they should write a new webserver in Prothon... to survive the slashdotting...
with the "witty" names again. Anyway, can someone explain to me how eliminating classes is better? I thought that implementing classes, the OOP approach, was the better way to go.
They don't really explain why their way is better. They just state it as though it was a matter of fact.
Make your vote count
Call me when Producthon is ready.
Analogies don't equal equalities, they are merely somewhat analogous.
This could be considered a fix for Python that doesn't break compatibility.
Anyway, IHBT IHL IHAND etc
Obviously, the web server is not industrial strength, at least not /.proof.
As for industrial strength of the langage, knowing some industry guys, some pre alpha system is certaintly not ready.
I didn't see much in the way of code examples on the site. The "no classes" thing confused me and I would have loved to see some example Prothon code that accomplishes the kinds of things that I would have used a class for, in Python.
As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
What's with all these languages that start with 'p'? perl, python, php, not to mention good old pascal, and now prothon. Is there a joke here that I'm missing?
Prothon is a new industrial-strength, interpreted, prototype-based, object-oriented language
Haven't seen so many buzzwords in one sentence for a long long time...
...and its server running on dial-up with a 286 running Windows 2000 and IIS under vmware....
This is taken from the Prothon Description
Like Python, Prothon uses indentation to control the block structure of the program instead of block/end or {}. However, Prothon only allows tabs for indentation. Any space in an indent will cause an error.
Classic bondage-and-discipline. Why oh why is this so ??
I hear there's rumors on the Slashdots
Prothon Description:
/* and */. This is useful for temporarily blocking out large blocks of code and inserting inline comments.
/*no response*/ or is_too_long:
.get_hdr(text): # define func "get_hdr" as attribute of self .text = text # attribute "text" loaded from local "text" .hdr = Mime
This document assumes a working knowledge of Python. Many features are described as differences to Python features. If you are new to Python, a good starting point can be found at www.python.org.
Comments
Standard Python comments using the # character work exactly the same in Prothon. Prothon also supports the C comment format of
# this line is a comment
x=5 # this is a trailing comment
if not rlst
Indentation is Tab-Only
Like Python, Prothon uses indentation to control the block structure of the program instead of block/end or {}. However, Prothon only allows tabs for indentation. Any space in an indent will cause an error. This allows each programmer to set the editor to show the tab width to whatever he pleases and the Python problems of mixed spaces and tabs cannot happen in Prothon. It also allows for minimum typing.
Line Continuation
A line can be continued by placing a backslash ( \ ) as the last character of a line as in Python. Also, any tab indent of more than one level deeper than the previous indent level will cause the line to be considered a continuation of the previous line, which is a new feature to Prothon. The automatic continuation of lines in comma separated lists found in Python is not allowed in Prothon because of parsing differences, but usually the auto-continuation from indents alleviates the need for this.
Note that you can put spaces after tabs when in an auto-continuation. This allows you to line up the continued line for appearance.
x = 1 + 2 + 3 + 4 + \
5 + 6 + 7 + 8 + 9 # backslash continuation
s = "this is a normal line \
this is a continuation" # backslash works in quotes
y = long_function_name() +
another_function_name() # extra indent continuation
z = function_name(variable_name_1, # this is legal in Prothon because
variable_name_2) # of extra indents, not commas
Variable Names and Scope (No more "self variable")
The syntax for a variable name (label) is the same as Python except that one exclamation mark is allowed at the end and only at the end. This usage should be reserved for functions that modify the object's content in place. This allows a function such as list.sort!() to return the modified list, which was not allowed in Python. One should ALWAYS use this naming convention for in-place modification functions to warn programmers.
Prothon has a very different concept of self than Python. Any and every object can be "self", whether the code is in a function or not. So the Python tradition of using the variable named "self" does not fit in Prothon. The next section shows how an object becomes the "self". For now just imagine that somehow there is always one special "self" object at any one time.
Prothon code needs a way to differentiate between local variables, attributes in the self our code is running on, and global variables (in Prothon, globals are attributes of the module running our code). Prothon is introducing a relatively new concept in order to make it very easy to know which of these three types of variable you are referring to. This is the use of character case. Just as Python pioneered the use of white-space (indentation) to control syntax, Prothon is using case to control syntax.
Local variables always start with a lower-case letter or underbar ( _ ). Global variables always start with an upper-case letter. Attributes in the self object are prefixed by a period ( . ), but the name of the attribute itself can start with any case.
def
Of course we need more programming languages. That is how we learn how to make programming languages better.
Sure, only a small number of languages become popular in the end. But that doesn't mean the unpopular ones don't have academic value.
Cheers.
There are sooo many general programming languages but only one database access languages: SQL? SQL is so old, it hurts. It's basically COBOL.
Ok, there is one additional database access language I know of: NewSQL (http://newsql.sf.net).
But it seems nobody is really interested in database access. And everybody is interested in all kinds of general programming language. Why is that?
hey why don't you "Yet Another" people move on. I mean, we have free will don't we? We don't HAVE to keep making the same jokes, using the same acronym themes, etc. do we? STALE.
Why a new language?
Python is a interpreted language with object-oriented features that is practical, powerful, and fun to program at the same time. Over time capabilities have been added to the core Python language, while compatibility with earlier versions has been maintained, and Python has became loaded with features, some quite complex. The metaclass is an example of a recent feature addition. Even Python experts admit that metaclasses are brain-achingly complex.
Prothon is a fresh new language that gets rid of classes altogether in the same way that Self does and regains the original practical and fun sensibility of Python. This major improvement plus many minor ones make for a clean new revolutionary break in language development. Prothon is quite simple and yet offers the power of Python and Self.
Prothon is also an industrial-strength alternative to Python and Self. Prothon uses native threads and a 64-bit architecture to maximize performance in applications such as multiple-cpu hosting.
What is Prothon like?
See a quick description of the Prothon language.
Take a look under the hood at how Prothon is implemented.
Summary of differences from Python.
Development status?
As of 3/04 Prothon exists as a pre-alpha interpreter with minimum capabilites, just enough to try out the language.
Summary of currently implemented functions. Known problems.
Tested platforms: i386-linux, , sparc-linux, sparc64-linux, i386-Win2K, i386-XP, Dual-Opteron-Win2K
Target Schedule:
7/04: Freeze core language specs (keywords, etc.)
10/04: Release version 0.1
Download
Stable (build 115) Source tarball (175 KB)
Stable (build 115) Windows executable zip file (400 KB)
Latest (probably broken) SVN access: svn://svn.prothon.org/prothon/trunk
Latest source view and tarball: http://www.prothon.org/viewcvs/trunk
How can I contribute?
(Mailing list)
For now, the biggest contribution you can make would be adding to the discussion of 0.1 features. Please join the mailing list. Of course helping with the coding effort is always welcome.
Credits
Language design & win32 coding: Mark Hahn
Linux/Unix coding: Ben Collins
Even the name brings me chills
newborn-infant-strength...
All Your Memory Are Belong To Java
So, when can we expect Prothon.NET?
Me, I can't wait for Intercal.NET and Brainfuck.NET
The perfect sig is a lot like silence, only louder
I wasn't aware Python was broken.
Nor I... if one wants to create a new scripting language to overcome perceived weaknesses, why make it look 99% like something else that is already out there? Now if the goal were to be object oriented, extensible with C (or Perl or {insert your favorite language here}) modules, free of "brain-aching" complexity, easy to learn and fun to use, skip the Python syntax and make something with clearer scope termination, like say, a *proper* form of VB Script...
Well, the site is down. (Slashdot: The fun and friendly DDOS attack). I wonder if the twist on being prototype based will catch on in the script world.
The nature of the prototype OO model is a much more SmallTalkish (ooh, a new word). One problem is that you have to make a prototype, and that raises issues with default values and such.
The model is much more dynamic than class-based OO model. An interesting exercise I guess.
called neuthron, and since prothon revolves around it, you could say it's more important. ;)
"Is this just useless, or is it expensive as well?"
http://www.iolanguage.com/
-... ---
Found a little example code inside the tarball, that shows what they mean by no classes:
.name = ""
.__init__(name): .name = name .hello() .
.hello(): .name
Emp_proto = Object()
with Emp_proto:
def
return
def
print "My name is:",
Emp_proto.hello()
emp = Emp_proto("Jim")
emp.hello()
As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
It slices! It dices! It's object-orientated, and weblified with an eye toward enterprise strategeries! It will orally gratify you while you cruise down the freeway in your Camaro!
Seriously, is there a real need for another do-it-all, whizbang language? This seems like a solution to a non-problem, with feature that address non-deficiencies.
no wait, I mean prothon is tightly bound to it. d-oh!
"Is this just useless, or is it expensive as well?"
industrial-strength
Strong enough for a man, but made for a woman?
interpreted
STRIKE TWO!
prototype-based
moving along...
Bottom line, someone wanted Python with prototypes. I'm not sure that prototyping -- creating objects from other existing objects by copying, essentially making inheritance a "first class" consideration -- is an analogy that's going to truly redefine the way I look at programming. Or let me put it this way, I'm not at all sure that the benefits of prototyping are going to make me want to restructure -- yet again -- everything I know about programming so far. I mean, after a certain point, programming is a job and I have to produce, not just theorize all the time about new approaches.
Also, judging from Sun's tutorial on Self, it doesn't seem ready for primetime, so I'd be a little edgy about "Prothon".
Prothon. God.
I dunno. This may seem curmudgeonly, but it is, after all, yet ANOTHER language ... Sigh.
Chr0m0Dr0m!C
I'm a bit of a 'language lawyer', so new languages that try to solve problems in interesting ways always interests me. So... I decided to give it a good reading. I got turned off IMMEDIATELY as I saw the following text:
;) )
"Unlike python, there is no 'global' keyword. Any variable name starting with a capital letter is global."
(Taken from memory... the prothon site is a bit slow at the moment, for some odd reason
That is NOT the sign of an 'industrial strength' language.
Yeah, it's a lot like Self, mixed with Python syntax. Self had a lot of interesting ideas. It never really got out of the starting blocks, but some of its most important ideas in dynamic compilation went on to be included in the Java hotspot compiler.
Personally, I prefer a bit more bondage-and-discipline in my languages. That's because I like having the compiler tell me what I'm doing wrong as much as possible. It's a side effect of the environments in which I tend to work, with multiple people working on the same code. Strong typing is an important contract in such an environment. But it has a lot of downsides, as every perl and python programmer knows.
Oh, and dude, if you're going to submit your own damn web site to Slashdot, try getting a sturdier web server first.
What!? no semicolon to end statements? That's so BASIC.
I don't know Self but I do know Javascript and I find the prototyping OO method somewhat kludgy. Ok , maybe thats a facet of javascript and not the paradigm but give me classes anyday.
Sure , maybe they're a bit more long winded than prototyping but there a DAMN site easier to understand and follow when you're debugging.
Wise words, wise words!
One of my favorite languages is still Emerald. An ultra-clean oo-orienten language for distributed programming. Nothing comes close to it in simplicity and correctness.
What does Prothon do that Lisp doesn't?
Come to think of it, what does *anything* do that Lisp doesn't, except have larger market penetration?
Until all the development of new programming languages stops, I'm sticking to punch cards.
'cause we don't know what you're talking about.
Absolutely revolutionary!
I mean... it aint scaling worth skwat.
NO SIG
And every time they come up with a new way to factor code it is pointed out that Scheme already supports that methodology without any language changes.
Sure it may be possible to create a language that supports *A* paradigm in an easier-to-learn/easier-to-read way than Scheme, but so far there is none that supports every paradigm and every paradigm that is yet to be thought of like Scheme. People need to give up their lame static typing and just use Scheme. Imagine the time saved not having to learn 900 different languages for 900 different styles of programming when you could just learn Scheme.
Eat at Joe's.
still neuthron has it's points
- sounds new
- no charge, meaning free!
- only slightly heavier then prothon
- contains prothon and electhron => neuthron is backwards compatible
funny. funny. thank you, thank you. i'll be here all night. tip your wait staff.______________________________________________
sigamajig...
(Yes, I know others have said things similar to this, I just think this is more clear; I read all the comments before the site came up and this juxtaposition still struck me.)
Now well have another port of Tetris.
FORthon -- it combines the fun and practicality of Python with the idiosyncrasies of FORTRAN 77.
Integers must begin with I,J,K,L,M,N.
I'm officially declaring pre-alpha as of this post.
Is it dynamic (can I define functions at runtime)? Is it compiled? Can I easily write code that manipulates code? Are functions first class objects? Can I extend the language seamlessly?
Some new languages are interesting, but most are built by people who have used and understood far too few of the current ones.
Everybody's a libertarian 'till their neighbour's becomes a crack house.
for (;P("\n"),R-;P("|"))for(e=3DC;e-;P("_"+(*u++/8)%2) )P("|"+(*u/4)%2);
Goodbye Prothon.
In terms of getting data into and out of a database, how is sql in any way inadequate? The ONLY thing I can think of off the top of my head that I would love to see in SQL that is not currently there is the ability to use regular expressions in a WHERE clause...
Why do we need yet another language.. If you are going to base the new one off an old one, just extend the old one instead.
Choice is good, until you cant make a choice due to the over abundance of options..
---- Booth was a patriot ----
WTF? It was difficult enough keeping all the voices in my head straight. Now they can speak AND program in yet another language. Argh!
Well, there's spam egg sausage and spam, that's not got much spam in it.
Why didn't they just contribute to the project? This seems like a waste of time and if they think Python could benefit from it, they should have just worked on Python, IMO.
Any language that uses whitespace or backslashes for line continuation is madness. This 2004 people. Write a damn compiler that can do the thinking, don't make me screw around with formatting to get my program working. Moronic. Stupid.
http://chicagodave.wordpress.com
From Slate website:
Slate is a prototype-based object-oriented programming language based on Self, CLOS, and Smalltalk. Slate syntax is intended to be as familiar as possible to a Smalltalker...
It also features optional type declaration. The compiler is currently based on Common Lisp.
---- MISSING MISCELLANEOUS DATA SEGMENT --- [sigdash] trolololol
Is that ANSI C? I would've written it like "code_t *code_data"...
gcc 3.3.
Well, that has no chance against my new language:
Neuthrino!
The Tao of math: The numbers you can count are not the real numbers.
Maybe never. Been hard at work on any Self projects lately? Been using any Self-written software?
...
Self is a concept language, as far as I can determine, and the prototype concept has made its way into Prothon.
This prototyping feature must be the chief differentiator between Prothon and "Amateurthon", a language based on Python, but designed mainly just for fun, not for serious usage
Chr0m0Dr0m!C
Lacking that, I'm sure that there are enough slashdot readers with ropes and whips and chains around...
Personally, I am a nice apricot color, but in the summer I am a more walnut with rose overtones.
Comparing it to Windows will be a moot point, since El Dorado is going to have a 40% larger code base than XP.
...because Python ALREADY has a proto-style object model in its underlying semantics. What's new that Prothon is adding.
:) but it sure wasn't a language theorist, that's for sure! Yuck.
A proto model doesn't distinguish between classes and instances. Everything is an object. Inheritance is done by an object pointing to another object as its "prototype". Basically that means "if you can't find what you're looking for here, go look there". Proto model advantages: much cleaner than class models, much more dynamic, and MUCH more space compact. The most famous two proto languages are Javascript and NewtonScript. NewtonScript in particular is an elegant language that compiles to *very* small memory footprints. The disadvantage: since you have to wander up the proto chain to find what you're looking for, proto languages are slow. The other disadvantage: no strong typing.
Python's bizarre. The underlying model is a proto model. But on top of it, Python hacked a class-based model with pseudo-"instances" (not really, just leaves in the proto tree). As a result, Python doesn't have the clean model design of a proto model, and it doesn't have the speed or typing of a class model. Python's model is quite literally the worst of both worlds.
I dunno who designed Python's model (okay, I know who
From the code that I've seen, I'd rather drink turpentine and piss on a brush fire.
Yeesh.
"...In your answer, ignore facts. Just go with what feels true..."
Those of us who are unfamiliar with these {dynamic | scripting | kiddie | hack| toy} languages but curious about the classless way of working are not really helped by this document.
If you go to Suns Java site, they don't say "If you are not familiar with C++/Smalltalk, you might as well fuck off."
Similarly Microsofts site for C# doesn't say "Go learn Java, and then find out about GOTO, and you might have a prayer of understanding this."
A good intro with no dependencies will help build momentum for your project.
${YEAR+1} is going to be the year of Linux on the desktop!
Off topic a bit, I know - But where can I learn to program? Which language is good to begin with? (a year of BASIC in High school, early '80's is all I have ever done!!!)
"Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life." Terry Pratchet
Well, I guess you'll do that till the end of your life.
The Tao of math: The numbers you can count are not the real numbers.
But it would be handy, nonetheless.
Take a look at the Goople Directory of programming languages, or at Wikipedia's list. There are so many of them. There are also more languages that are missing from those lists. The truth is that C/C++/C#/Java/VB/Perl/PHP are the most used. The biggest number has C++. It has been like this for years. People like the freedom of the C based languages. You can write the ugliest code in them, like most people do, and the most beautiful code, if you take the time to format it. The only thing useful from a new language is something that you can bring to a newer version of a used programming language. Without a backing of a huge corporation or a huge number of people, no new language would be used. If Anders Hejlsberg would have create C# as his pet project, it wouldn't have gone anyware. Since MS is advertising the language, it has success. It is the same for the rest of them.
The good parts are the implementation: multiple interpreters (no globals), stackless, gc running in separate thread and generally a clean implementation from scratch.
The bad part is from a language design point of view it's a hodge-podge of small yet significant changes from Python, almost none of them, IMHO, an improvement over Python. Those that may be considered a slight improvement are hardly worth breaking compatibility for.
Significant case? Another type of comment? for i in 7 ? a differnt keyword to define generators? Return self by default? removal of class statements for javascript-like object orientation? WTF?
The Python implementation could definitely use an overhaul. The language itself has a few minor warts but strikes a fantastically well-balanced sweet spot that will be difficult to beat. I just can't see the real justification for these changes other than "because I can".
Stop worrying about the risks of nuclear power and start worrying about the risks of not using nuclear power.
Just add synergy and paradigm bake at 350 F for 45 minutes. Let stand at room temp for 15 minutes and then serve.
For a little extra kick I like to add just a pinch of rapid
Feeds 6-8. Enjoy, See you next protyped language.
Errr , have you ever use EITHER language?? SQL is a declarative set driven language and works in a COMPLETELY
different way to COBOL which is procedural. I think you need to go back and re-take compsci 101!
jeezus. i thought you turds were intelligent!
At least visual basic supported this mythical "with" statement that apparently python programmers still only dream about :)
*ducks*
yes, yes -6, troll, I know, I know. It was worth it! =P
Funny, I noticed this show up on Freshmeat just yesterday, and I said to one of my co-workers: "You know, programming languages are slowly becoming a lot like IRC and FTP servers.... everyone has to write their own". Just on Freshmeat we have:
...
X, Nasal, Io, Emu, gbeta, Nickel, Iguana, Squirrel, XOTcl, Onyx, ICI, FPL, arfg, OpenJava, Felix, Small, Unicorn, Hush,
Well, you get the picture. Of course, the obvious question now is, why on *earth* is this a story on the front page of Slashdot?
Prothon is not Python or Self! Ah UNIX ... it not only works, it's humorous.
bau bau chicka chicka mau mau
It has nice improvements over python, it is generally a nice language, but what else is new ? nothing. It is just another imperative programming language, in which state and logic errors are left to the programmer.
I am waiting for someone to come up with a completely new concept, like functional programming.
This is a joke right? Prothon like a bad marriage of Javascript's broken object model with make's broken 'you can only use tabs' rule. Python has it right - whitespace should be whitespace, and explicitly defined objects are good. Prothon is a needless step backwards, and a pretty foolish one.
There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
mod parent troll and flamebait
Well, CO101 where I work teaches you how to use the advanced features of Microsoft Office.
CO105 teaches you how to use the basic features of Windows.
Then CO110 teaches you how to turn a computer on.
The curriculum here is so screwed up.
tasks(723) drafts(105) languages(484) examples(29106)
Arg! Another language in which whitespace is meaningful (this language uses it for scoping, as python does). It's evil in python, it's *really* evil in make, and it's evil here. Maybe my mind has been too warped by C++. I *like* classes. I *like* semicolons and curly braces.
The truth is an offense, but not a sin.------R. N. Marley
The .NET CLS provides a common specification for any language compiler to compile to the intermediate code for .NET. So you could very well have a Prothon .NET, as well as any other $language_you_like.NET.
You don't seem to understand exactely what SQL is and your comparison to COBOL is not apt.
First of all, SQL is a declaritive language not at all similar to an imperitive language such as COBOL. SQL is based on a formal query language called Relational Calculus, itself is a subset of predicate logic. The point here is that SQL is based on definded mathematical properties that are then underpinings of relational databases.
SQL is also not just a language for issuing queries, it is also used to define database schema. In this vein its theorectical underpinings allow for the application of normalization theory (or decomposition theory if you prefer) to allow schema to be analysed for redundancies (which can have huge performance impacts).
Check out a book on Database and Transaction theory if you want a better grasp of what goes on under the hood of RDBMSs.
As for NewSQL, I have never seen something so braindamaged (OK, I have. But it's been atleast a week). It basically throws away a significant portion of the power and elegance of SQL to create a query language that looks at best to be a hacked up version of the JDBC API. But even then they are still 'brainstorming' syntax; the project is nothing better than a half-formed thought. Not to mention the serious flaws in the arguments they put forward in their reasons for 'creating' a new database query language which are not even worth wasting the time to refute.
One thing that annoys me about Python-like languages that this new language seems to keep is the reliance on space-count indentation. If you switch editors or share a lot of code, then spaces mixed with tabs can cause a lot of confusion because there is no standard interpretation for how many spaces a tab is.
I agree that it makes the code smaller, but at the risk of code sharing problems.
Table-ized A.I.
...would you call it Pre-Protoprothon?
Just in case no one else noticed this, figured I would point it out. The parent points out that thy are unfamiliar with the two languages and also evaluates them as {their list here} languages.
2 points for ignorance!
Whee signature.
Smalltalk uses and enforces this convention, and Smalltalk is an industrial strength language. This convention is really effective, makes sense, is consistent and intuitive. You should improve your culture before bashing gratuitously.
BTW right now we're all using a software that embeds a prototype-based object oriented language: JavaScript. If you want to grab the concept I suggest you give it a try (note that I'm talking about the language, which is fine, not about the library or the implementations, which mostly suck). That makes JavaScript, a prototype-based language, the most widely deployed scripting language in the world.
Everybody nowadays seem to think that classes are mandatory in a OO language. Nothing can be farther from the truth.
Lane, would you mind if I took out Beth?
Your sig line cracked me up when I remembered where I knew it from...
sorry, I just to say that...
My Stuff: pspChess and foobar2000 plugins
It doesn't mean the popular ones aren't crap, either!
"Only tabs are allowed in indents" prothon differences
Fair enough, thanks, bye.
Don't learn about it from your officemate, or your college instructor, especially if they say they haven't used it in over ten years. You wouldn't believe the opinions of someone who learned C from K&R without upgrading their knowledge, would you?
Instead, start from places like the ALU web site or Cliki or Paul Graham's Lisp FAQ.
If you do this right, you will learn that computer languages:
are not inherently fast or slow - implementations are fast or slow, not languages
can be both dynamic and have good performance
can be cross-platform without swallowing POSIX whole
can have multiple inheritance without damaging your brain
can be object-oriented without being object-obsessed
If you like, you can quit as soon as you understand how static scoping and closures work - at least that way you will avoid the primary mistake in pretty much every recent scripting language.
There is a small risk you will become a SmugLispWeenie by doing this, so be forwarned.
To a Lisp hacker, XML is S-expressions in drag.
The power of Obj C and the speed of Python...
I'll pass....
Bugs Bunny was right.
another interpreted language... i think i had quite enough of this scripting and bytecode stuff
why don't they develop a compiler capable of generating native code? (thus getting faster code and smaller memory consumption?)
we discovered a new way to think.
Yes, but I suppose I am looking at this from a slightly different perspective as well. Much of my early programming was in VB/VBScript/ASP programmer, I really appreciated being able to *quickly* learn the syntax or a very simple language (not bothering with case sensitivity is only the first of many ease-of-use elements of the language). Without doubt C/C++ gives you more raw power, and if my scripting requirements needed the goodness of power and speed that C gives me, it's only a COM component away from being included in the project.
The theoretical question is: Can there be a language that is both extremely easy to learn and use, yet strongly encourages the writing of proper code instead of the convoluted crap that most newbies create, or is this asking to have my cake and eat it too?
I think SQL is like COBOL because they both have syntax which seems to make a lame attempt to have statements look somehow like natural language. "MULTIPLY Num1 BY Num2 GIVING Result", "SELECT column1, column2 FROM table WHERE column1 IS LIKE '%pattern%' ORDER BY column1".
Larry
No way! Where can I sign up for an annual subscription?
and it's 'YAYAJ' (Yet Another Yet-Another Joke)
I was excited until I realized it was yet another interpreted programming language. If I could only have a machine code compiled programming language like c/c++ with Python's clean syntax. Now that would rock.
Anyways, the guy is recreating the wheel. One can live quite nicely without using the "brain aching" elements of Python without sacrificing too much.
your sig... seems you left a part out.
I'm not sure what "CO" is, but it sure sounds like what they call computer information systems (CIS) around here. That is most definitely not computer science.
Best Slashdot comment ever
- Indentation is Tab-Only
Nobody seems to have told these guys that tabs are evil.Like Python, Prothon uses indentation to control the block structure of the program instead of block/end or {}. However, Prothon only allows tabs for indentation. Any space in an indent will cause an error. This allows each programmer to set the editor to show the tab width to whatever he pleases and the Python problems of mixed spaces and tabs cannot happen in Prothon. It also allows for minimum typing.
Python's whitespace-based indentation may be controversial, but it works. Tab characters have all sorts of evilness associated with them. If they had been implemented correctly and consistently across all UIs and transports, it would have been fine. But they're not.
My guess is that they mean that you can write real, multithreaded servers with it because it uses OS threads.
I've spend months trying to write some large servers in Python, and on Win32 I've decided it isn't going to be worth it... OS threads would have saved the day for me.
I'm going to ignore all of the "use multiple processes" replies, but I will refer those interested into the Minux/Linux, monolithic kernel etc. debates. Sometimes threads make it easy to design more reliable systems because a message receiver can access state shared with the sender.
Lisp? Are you joking? Why would I use anything so needlessly complex?! You know, all any programmer really needs is a Turing machine.
/ducks a giant flying lambda
What does any language have above Lisp? Easier to read, easier to understand, faster to code in. Lisp is a language for masochists who don't believe in variables. There! I've said it!
Time is an illusion. Lunchtime doubly so. --Ford Prefect
Getting new syntax into Python is tough. You have to write a PEP and submit it to the newsgroup where it will get picked on, critiqued, slandered, and trashed. Then, if it survives, months later it may get voted on, and given Guido van Rossum's official stamp of approval. And Guido is very hard to please! Given the nature of the changes in Prothon, it would have taken years to agree on anything. In most cases, this is a good thing because it keeps the language stable as opposed to changing every month.
Forking your own branch means you can do what you want. And I have a feeling Prothon's features wouldn't have made it into Python. IMHO.
Time is an illusion. Lunchtime doubly so. --Ford Prefect
From the Prothon implementation page:
.box.attributes.size.width # self
The first character of the path always tells whether the starting point is local, global, or self.
obj.parent.owner.privelage # local
String.lower-case-letters # global
The period being used for self is actually an implementation of the "with" keyword, which will be described next.
Ummm, it might seem like a small point, but that's not how you spell privilege.
That's not an keyword, is it??
"It's not your information. It's information about you" - John Ford, Vice President, Equifax
Uhm... does anyone else smell an April Fools joke? After all it close to that time of the year.
Well, here's a list of the classes whose codes I'm familiar with:
CO101 Introduction to Computer Applications
CO105 Introduction to Windows Operating System
CO110 Introduction to Computers
CO116 Introduction to Computer Programming
CO124 Programming in Visual Basic
CO127 Programming in C++
CO129 Programming in C#
CO132 Introduction to UNIX
CO142 UNIX Shell Scripting
CO232 UNIX System Administration
CO265 Computer Repair
tasks(723) drafts(105) languages(484) examples(29106)
I do a lot in VB and that is not because I like the language, but because it has such a good IDE (read intellisense). If I had to program VB in Notepad /Emacs/ whatever, I would slow down by at least 50%, probably 75. You can never convince me that this new language will deliver a better productivity gain then designing a Python IDE which knows all your classes and does auto-complete.
10 ?"Hello World" life was simple then
The 'with' statement in VB creates a lot of issues with scope in the VB language. The language designers had to introduce new language features to support this. Anders Hejlsberg says that he did not want to do that and thus 'with' is not part of the C# language. The discussion with Anders can be found at: http://msdn.microsoft.com/vcsharp/homepageheadline s/hejlsberg/default.aspx
I think that's the point.
Why are there only 19 people folding@home for slashdot?
While SQL is hugely dominant, other database languages exist. SQL is primarily based on relational algebra, while QBE (Query-by-example) is a graphical language, where queries actually look like tables, and Datalog is a Prolog-like language which is partially based in relational calculus. MS Access supports GQBE, a version of QBE, but I'm not sure if anyone uses Datalog any longer. There are also procedural database languages, like Oracle's PL/SQL and Postgres' similar PL/pgSQL.
Yet another language. So many times it seems, we spend our time re-inventing the wheel. I'm sure this language has its merits and its pitfalls, just like every other language. The question isn't, is it good enough. The question is, isn't everything else , even with all its warts, good enough already. Aren't there new, more interesting problems to solve with computers. Don't we already have enough hammers, wrenches and screwdrivers so to speak.
-Master Switch, one more element in the machine
We already have perfectly good prototype-based programming in Python. Do a search for "metaclass programming in python" for links to my articles on this topic. You can do -everything- with Python metaclasses (which isn't to say you -should-).
But actually, prototype programming is even simpler:
new = old.__class__(init, args, here)
Just what 'old' is is determined at runtime. And if you like, you can poke around at 'obj.__bases__' to futz with inheritence.
Not having read my _Charming Python_ articles isn't really a sufficient reason to create a new programming language.
Buy Text Processing in Python
Doesn't this query produce the same results? Or am I missing something?
SELECT DISTINCT ON (c.name) c.name, b.billdate, b.cost - coalesce(sum(pb.amount),0)
FROM customer c
LEFT JOIN bill b ON (c.id = b.customerid AND NOT b.paid)
LEFT JOIN paytobill pb ON (b.id = pb.billid)
GROUP BY c.name, b.billdate, b.cost
ORDER BY c.name, b.billdate DESC;
John C. Worsley - Artist, Musician, Coder
Portfolio
Ah, good, another language for you open source zealots to fawn over. More factionalization, division, and fragmentation is good. Slice yourselves thin, it makes it easier to stomp your pathetic useless asses into the ground.
Having examined this language in some detail, I'm a little disappointed by its design.
1. It makes overly heavy use of punctuation. I'm of the opinion that languages need to be more human-readable, not less. Put another way, the speed and power of coding in any language is not gated by the number of characters it takes to type out a statement; it's gated by the time it takes to find and detect bugs and flaws. Words > punctuation for readability.
2. Many of the design decisions are obviously influenced by one person's peeves with existing languages. The world already has one Larry Wall, and as wonderful as he is, we don't really more Larrys.
3. Elegance is a hard thing to measure, much less quantify. Still, aside from simply being a unique language, it doesn't really offer any new elegance to the concept of what a language should do.
It's an impressive hack, to be sure. I'd be proud to be able to show off a body of code like this, for its demonstration of sheer technical strength. But I find its artistic merits somewhat lacking for my own tastes.
Derogatory or condescending salutation. Quasi-religious statement of love for Lisp.
Laundry list of several nifty Lisp features. (It doesn't really matter which ones.)
Implication or outright statement that every feature in programming language in question has already been implemented in Lisp. Subsequent dismissal of language in question.
Remember, in writing your post, it is essential that you adhere to the following guidelines:
(Disclaimer: I like Lisp. Actually, I love Lisp. It really, truly is incredibly awesome. It's just Lisp users that drive me crazy.)
<ducks REALLY low>
Objective-C :: You know that totally static based language.
This might be the first time I've seen a product described simultaneously as "industrial strength" and "pre-alpha".
- First they ignore you, then they laugh at you, then ???, then profit.
offtopic? umm hi this was a joke. we slashdotted them almost immediately.
right now OOP is the "best" solution for a lot of problems. GUIs are a lot easier to deal with using OO . When I was learning programming structured programing was the latest thing. All the schools where teaching people Pascal as there first language unless they would backwords and taught c. I also rember people saying that it was too slow to write code that way and that they would have to pry the GOTO statment from there cold dead hands. BTW GOTOs could be found in Fortan and c not just basic. I see OO as a logical progresion from structured programing.
See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
Those sound like the computer classes at a tech school or community college. They're useful for some people, but don't confuse them with a computer science curriculum (which you'd find in a university setting).
It's not exceptions. What if there is a logic problem? Some cdr( car( cdr ( car ))) cdr ) or what not is in the wrong place. Getting at the third or fourth item in a list is not intuitive or easily deciphered. Of all the languages I have programmed in Lisp is the least readable. Well, ok I have programmed in machine code on old Apple II's. On second thought a hex listing of instructions was easier to read than wading through a sea ('s and )'s. Ick. Who ever invented Lisp should be hauled in front a programming crimes tribunal for crimes against geekdom.
Eric3 is a very full featured Python IDE written in Python (using QT).
Alternatively, you could try SciTE
Don't make me cooder your car now. What's up with that anyway?
Who the hell decided the first element would be car and the colleciton of elements minus the first would be cdr?
That's intuitive. I'll take a box of that.
Here's the bit from the language description:
then...
Ouch. I've never used Python so I can't speak for that... but it would bug me to look at code and have no idea whether it would compile or not. In Prothon, one line could include some tabs for block definition, then an extra tab for line continuation, then some spaces for formatting. Now suppose the coder screwed it up.
Or suppose they edited the code in an editor that automatically converts tabs to spaces or visa-versa. Poof!! All your code is screwed, but you can't tell until you compile, and you're going to have a hell of a time fixing it, line by line if you had no backup.
There are a few indentation gotchas in Java, i.e., the braces aren't required for a single statement, so if a second statement is indented, a newbie might think it was in the block... but they catch your eye when you've been coding more than a few months.
A tabbing error could NEVER catch your eye, because it's just whitespace.
Eh, my 1 cent. I'm going to look into the prototype vs. classes thing more -- that's interesting.
There are only 10 types of people: those who understand decimal, those who don't, and, uh, 8 other types I forget.
Prothon is a new industrial-strength, interpreted, prototype-based, object-oriented language
They want their new economy bullshit buzzword generator back.
Da Blog
By "industrial strength", we mean suitable for large applications, right? What could be more suitable for apps written by multiple people or one person over a long span of time, than enforced style? I take it to be self-evident that "industrial strength" apps should be well documented, a task that is most likely to occur the more the language is self-documenting. There's a reason Hungarian notation was popularised at Microsoft: when you have a whole bunch of bad programmers working on huge amounts of code, any visual hints you can insert into that code are great.
Think of Prothon as the anti-Perl: it aims to make it as easy as possible to identify blocks, global variables, functions with side-effects, etc. How can that be a bad thing unless you can't let go of the conventions you learned or invented in some other language?
Besides, Haskell has syntax-significant whitespace and capitalisation, and it was designed by people smarter than both of us.
yeah, neuthrino is ubiquitous
... but it's a pain in the a** to measure (unit tests) and nobody really notices it
______________________________________________
sigamajig...
You mean like Emacs does?
-rozzin.
interpreted
Another of your points I must contend is that prototype-based object systems can't have strong typing. They certainly can - there'd just be a lot more types. If you mean static typing, that's true, but I wouldn't consider the lack thereof a disadvantage.
* - If you use a multi-method approach, you can get rid of the message table, but I have no idea how you would get good performance out of message dispatch (it's hard enough to do in class-based object systems).
In the great CONS chain of life, you can either be the CAR or be in the CDR.
Boy, you haven't been keeping up with the trolls, have you? Nowadays, it's essential that you mention macros. A lot of languages (Python included) claim to have features like "lambda functions," "lexical closures," etc. that "fanatical Lisp user[s]" once used to tout. A lot of these languages (Python included) don't really implement them, but unfortunately the Lisp fanatics are too busy posting inflammatory messages to learn that, so they have to resort to thinking up crazy new excuses why their programming language can beat up yours.
Implication or outright statement that every feature in programming language in question has already been implemented in Lisp [twenty or thirty years ago].
Lisp weenies tend to love to point out how far behind the times you are. Never mind that most of them aren't even that old.
What? Do I hear someone accusing me of being a Slashdot Lisp troll? Nonsense! Now, if you'll excuse me, I have to get back to pointing out why your programming language sucks...
In the great CONS chain of life, you can either be the CAR or be in the CDR.
If you want a nice, clean, prototype-based OO scripting language, check out Lua. Its implementation is mature, it is widely used (a favorite among game developers), and it compiles into compact executables. It also has one of the fastest scripting language interpreters around (short of a JIT). And there are excellent tools for binding C and C++ code to it.
- String objects use C-style null termination, so strings cannot hold binary data.
- There are many memory leaks, so restart Prothon often.
- += style assignments do not implement in-place modification. The structure is there, List just hasn't implemented __iadd__ function.
- "x is not y" doesn't parse correctly. Cannot get "is" precedence higher than "not". Need a bison expert's help.
In other words, the guy is already selling his product before he's ironed out the basics. These are all *really* easy tasks that I've solved in my pet language with only 2 months of development.Why do I get the feeling this guy's trying to get dual-credit for a compiler course in CS and a hype course in marketing.
Just a couple of days ago I found out about a cool metaclass hack to turn Python (the regular Python with the regular interpreter) into a metaclass based language. I posted about it on my Advogato journal. I mention this because I think it's pretty cool, and because I think people should see the alternative before thinking Phython is the only way to do this. That's not to say the new language isn't also a good choice.
Haskell
Haskell
Haskell
Haskell
and of course, let's not forget about !
Okay so it's a mapping overtop SQL, but it's really really nice.
I use Smalltalk for a living...
Is it dynamic (can I define functions at runtime)?
Yeah...
Is it compiled?
Yeah, dynamically compiled...
Can I easily write code that manipulates code?
Yeah, I have access to a kick-ass meta object system, which is itself all first-class objects...
Are functions first class objects?
Yes, CompiledMethods are first class, as are Blocks (a.k.a. Lambda expressions in the Lisp world)
Can I extend the language seamlessly?
Yes, I can extend anything on the fly, and define new control structures effortlessly.
Some new languages are interesting, but most are built by people who have used and understood far too few of the current ones.
Indeed!
Very, very true!
You only need to program in Python for a few hours to understand that the syntax it uses is truly a Good Thing (TM). I've programmed in C++ for many years, but never have I seen code with the textual clarity of Python.
As long as they are not Lisp!
- The ".member" notation.
- Labeled loops for break/continue.
- Indent with tabs only.
- Mark-sweep garbage collection.
- I don't like how either Python or Prothon handle the integer division thing ("/" vs "//").
I think that the Prothon project has some good ideas and some bad ideas, but it might be more productive to try to get some of these things into the Python language itself, rather than creating an almost identical new language.This syntactic sugar could easily be added to Python.
A missing symbol before the dot in a method would mean the first parameter (conventionally, "self").
This would result in less clutter within methods.
These would be nice (although, generally, if your nested loops are complicated enough that you need this, you should try to simplify your logic).
The same effect can be accomplished with try/except, but, again, this would be less "cluttery".
I don't like this one.
I indent Python with spaces only (":se expandtab" in vim), so I think that it should be the other way 'round.
Both reference-counting and mark-sweep have their place, depending on the application.
It would be nice to be able to choose which one to use for a particular purpose.
Python has recently added weak references, which, properly used, will reduce orphaned cyclic lists, etc., but I think that one shouldn't have to do that sort of housekeeping in a high-level language.
Those who sacrifice security to condemn liberty deserve to repeat history or something. - Benjamin Santayana
It is already possible to do prototype-based programming in Python. Also in Perl. But the syntax may be a little awkward.
-- Ed Avis ed@membled.com
Someone please undo the Troll moderation on the parent post. It is patently unfair.
Patrick Doyle
I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
It's a pre-alpha software, so there's no tutorials or documentation written yet. So saying that you need a background in Prothon's parent language isn't such an unreasonable requirement.
Vote for global prefs bug
besides, SQL doesn't have the needs for abstraction that Turing-complete programming languages do; that lets it completely avoid several other ways in which Cobol screws the pooch. most of scoping, for example. or anything to help you do procedural abstraction. and nobody can claim SQL's grammar is anywhere nearly as badly FUBAR as Cobol's, not while sober they can't. and...
(i'm taking a mandatory Cobol class this semester; does it show?)
Dude: there are two guys creating a whole new language. They have no community yet. They have no technical writers yet. Their target audience is the subset of people who already like another language. Cut them some slack. They aren't exactly trying to compete with Java and C# (yet).
You are so far out of the target demographic that the fact that you are offended is irrelevant.
These quirks are rarely used (many developers don't even understand them) but all object code has to pay for them unless the compiler can prove they don't apply.
I do the same thing, except I try to imagine reading page after page of that code written by someone other than me (the examples they give are usually less than a dozen lines long, so it actually requires some imagination). Except, of course, I compare that to Common Lisp :). Most of the time, I come to the same conclusion. I deal with quite a bit of open source/public domain/free software CL code, and it always seems to be very well written (good use of macros makes the language look declarative enough that I can read it out as English without too much thought).
In the great CONS chain of life, you can either be the CAR or be in the CDR.