[ANN] Boo 0.4.3 - python-like language for .NET/Mono

D

Doug Holton

Rodrigo B. de Oliveira released version 0.4.3 of boo, I thought I'd
share it here since there has been so much interest for similar projects
like IronPython.

http://boo.codehaus.org/

Boo is a python-like language for .NET or the cross-platform Mono
(http://www.go-mono.com/).

Version 0.4.3 adds an interactive interpreter (booish, similar to IDLE
for python), elif, and a bug fix.

I wrote up some notes on boo for people already familiar with Python:
http://boo.codehaus.org/Gotchas+for+Python+Users

Also I have collected some starter resources for getting into .NET
programming: http://developers.coedit.net/DotNetProgramming


A summary of some distinct features of boo:

-quickly compile to an exe (can run cross-platform with Mono)
-closures/anonymous methods: http://boo.codehaus.org/Closures
x = def():
...some code here
-optional static typing:
"x as int", "static def method1() as string:"
-simple super(), automatic super calls and constructors
-unless statement
-built-in support for regular expressions
-timespan literals: "100ms"
-extensible compiler pipeline
-custom macros and attributes (similar to decorators)
-includes an interactive interpreter (booish) and an IDE
with code completion (boox, still in development).

Features in common with C#:

-interfaces, enums, events
-properties with getters and setters
Version as string:
get:
return _version
set:
_version = value
-lock (like "synchronized" in java)
-asynchronous execution with BeginInvoke
http://boo.codehaus.org/Asynchronous+Design+Pattern
-parameter checking with required attribute:
def foo([required(value > 3)] value as int):
pass
-using statement: (disposes of object when finished using)
using f = System.IO.File.OpenText('using0.boo'):
print(f.ReadLine())
 
D

Doug Holton

Istvan said:
"Python-like" means very little.

Actually, it means the syntax is almost identical to python's syntax.
Make it run python code
then you'll see a lot more interest from this group.

Like I said in the first sentence of my earlier message:
"I thought I'd share it here since there has been so much interest for
similar projects like IronPython."
 
J

Josiah Carlson

Like I said in the first sentence of my earlier message:
"I thought I'd share it here since there has been so much interest for
similar projects like IronPython."

I think that IronPython is a bit different from Boo though; it
implements Python, not some Python-like language, derivative, what have
you.

There was also a similar thing with Prothon (Python with prototypes) by
Mark Hahn a while back, that actually used this newsgroup/mailing list
as their discussion forum. I have no particular comment about that.

Re: the Boo language
Make it well, and good luck.

- Josiah
 
I

Istvan Albert

Doug Holton wrote:

Like I said in the first sentence of my earlier message:
"I thought I'd share it here since there has been so much interest for
similar projects like IronPython."

What I referred to was that the reason IronPython got so much
interest in this group is not because it is a *python-like*
language on the CLI but because it aims to be *python* on
the CLI. Big difference IMO.

If you'd make your language a valid python implementation, that could
also access .NET components (a la python) it would
instantly become a bazillion times more popular and talked about.

A "hey, it looks like python but it is not really python"
approach has little chance of capturing a python programmer's
imagination. It just muddies the water and sows confusion among
potential adopters.

this is just an opinion, and I've been wrong many times before...

Istvan.
 
V

Ville Vainio

Istvan> What I referred to was that the reason IronPython got so
Istvan> much interest in this group is not because it is a
Istvan> *python-like* language on the CLI but because it aims to
Istvan> be *python* on the CLI. Big difference IMO.

In some respects Boo is *more* python than Jython (which is lagging
behind CPython).

Istvan> A "hey, it looks like python but it is not really python"
Istvan> approach has little chance of capturing a python
Istvan> programmer's imagination. It just muddies the water and
Istvan> sows confusion among potential adopters.

I dunno, I don't see Boo any less interesting technically than
IronPython. In fact many would consider it *more* interesting, because
of the introduction of type inference. IronPython has more buzz going
for it, but a lot of it can be explained by non-technical issues.
 
D

Doug Holton

Istvan said:
Doug Holton wrote:




What I referred to was that the reason IronPython got so much
interest in this group is not because it is a *python-like*
language on the CLI but because it aims to be *python* on
the CLI. Big difference IMO.

If you'd make your language a valid python implementation, that could
also access .NET components (a la python) it would
instantly become a bazillion times more popular and talked about.

A "hey, it looks like python but it is not really python"
approach has little chance of capturing a python programmer's
imagination. It just muddies the water and sows confusion among
potential adopters.

this is just an opinion, and I've been wrong many times before...

Right, I respect your opinion. What you want is IronPython, definitely.
It is meant to be an exact clone of Python but for .NET/Mono.

Just to make it clear for others (because it took me a while to really
understand this), python does everything at run-time. For example, you
can add or delete methods from a class instance on the fly. Boo,
however is more like C# and does most of its work at compile-time
(although there are some run-time features like duck typing). That
makes it faster (100 times faster on a recent Mandelbrot test), but in
some respects not as flexible as python. So there is a trade-off.

I was going to mention this before, but didn't. Wouldn't it be neat to
actually implement Python in boo? I've been wondering if boo could
support different levels of dynamic late-binding, ranging from:
-completely static, compile-time (already have that)
-duck typing for individual variables (already implemented)
-a duck typing class for runtime customization of a class and control
over duck typing (see http://jira.codehaus.org/browse/BOO-19)
-a modified compiler pipeline mode that interprets everything as runtime
instead of static (possible, see for example the booish interactive
interpreter)
 
G

gabriele renzi

Istvan Albert ha scritto:
A "hey, it looks like python but it is not really python"
approach has little chance of capturing a python programmer's
imagination. It just muddies the water and sows confusion among
potential adopters.

well, but sometimes muddling water is a good thing.
I see this languages as nice 'testbeds' for pythonic alternative worlds,
just think of the optional typing thing
this is just an opinion, and I've been wrong many times before...

so it's mine, and mine is even little valuable cause I'm dumb :)
 
I

Istvan Albert

Doug said:
That makes it faster (100 times faster on a recent Mandelbrot test)

Just out of curiosity

--- speed.py ---
x = []
for i in range(1000):
for j in range(1000):
x.append(j)

--- speed.boo ---
x = []
for i in range(1000):
for j in range(1000):
x.Add(j)

---

dino /home/down/boo/bin $ time python speed.py
real 0m2.217s

---

dino /home/down/boo/bin $ booc speed.boo
dino /home/down/boo/bin $ time speed.exe
real 0m2.417s

This does not appear to indicate that boo is any faster
than python...

Istvan.
 
D

Doug Holton

Istvan said:
> "Python-like" means very little. Make it run python code
> then you'll see a lot more interest from this group.
This does not appear to indicate that boo is any faster
than python...

Istvan.

Nice talking to you
 
N

Neuruss

I wish that more was heard from projects like starkiller, PyPy and
Psyco. Pyrex seems to be going strong though.

Latest news from Mike Salib (Starkiller):

"I've been stuck doing other things and have been kind of down lately,
but I do want to finish a real Starkiller release before I start my new
job in early october..."
"I know a lot of people are waiting on Starkiller (and my seemingly
endless delays), but it is coming along, and it will be ready when its
ready.
I'd rather wait until I can get a release out before sending anything to
the newsgroup or mailing lists."
 
M

Michael Foord

Latest news from Mike Salib (Starkiller):

"I've been stuck doing other things and have been kind of down lately,
but I do want to finish a real Starkiller release before I start my new
job in early october..."
"I know a lot of people are waiting on Starkiller (and my seemingly
endless delays), but it is coming along, and it will be ready when its
ready.
I'd rather wait until I can get a release out before sending anything to
the newsgroup or mailing lists."

Great - that's very good news !!
Premature release is bad, knowing that things are still moving forward is good.....

Regards,

Fuzzy
 
C

Cliff Wells

"Python-like" means very little. Make it run python code
then you'll see a lot more interest from this group.

If you didn't find it interesting, then why did you respond? Also, what
makes you the spokesperson for the rest of the people on this list? Was
there a PEP written somewhere that I missed?

Personally, I find the project interesting. I program in several
languages (as the job requires, Python simply being my preferred
language) and having a tool like this available is definitely
interesting (esp. in the absence of a production-quality IronPython).


Cliff
 
I

Istvan Albert

Cliff Wells wrote:

If you didn't find it interesting, then why did you respond?

To voice my opinion.
> Also, what
makes you the spokesperson for the rest of the people on this list?

You don't have to be a "spokesperson" to express the obvious

Istvan.
 
B

Brian Quinlan

Istvan said:
[benchmark snipped]
This does not appear to indicate that boo is any faster
than python...

Correct. Indeed, your benchmark, which is the most sloppily constructed
that I've ever soon, doesn't indicate much at all.

Cheers,
Brian
 
C

Cliff Wells

Cliff Wells wrote:




To voice my opinion.

Terrific hobby.
You don't have to be a "spokesperson" to express the obvious

Well, I'd suggest that the several people who expressed interest and the
subsequent mention in the Python Daily URL makes your observation a
little less than obvious, but no less rude.


Cliff
 
N

Neuruss

I've been playing with Booish a litle bit, but there are some things
that I don't understand very well, and unfortunately, there's little
documentation so far to read...

I wonder if you could explain with an example how the static typing
and the type inference work in Boo.
I'd like to know "where", "when" and "how" should I declare types and
when I shouldn't.

Also, I'm not sure what you guys understand for "type inference". I
used to think that it was a way to find out the types of the variables
without having to declare them, but since Boo is statically typed,
where does type inference fit in? How?
 
C

Cliff Wells

I've been playing with Booish a litle bit, but there are some things
that I don't understand very well, and unfortunately, there's little
documentation so far to read...

I wonder if you could explain with an example how the static typing
and the type inference work in Boo.
I'd like to know "where", "when" and "how" should I declare types and
when I shouldn't.

Also, I'm not sure what you guys understand for "type inference". I
used to think that it was a way to find out the types of the variables
without having to declare them, but since Boo is statically typed,
where does type inference fit in? How?

Um, despite my criticism of Istvan for jumping on an innocent
announcement, he does have a point (even if he presented it a bit
harshly): this is a Python list, not a Boo list. A lot of people here
may or may not be interested in Boo, just as they are with Ruby,
Haskell, Lisp, et al, but that doesn't make it an appropriate place to
seek technical support on any of those things. They have, or can start,
their own groups.

Regards,
Cliff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top