Nexus Programming Language

A new object-oriented programming language has been unofficially
released. There are some interesting details already published at the
in-progress website (www.nexuslang.org). The language is a marriage
between concepts introduced by Lua and Ruby. Strong influences from
both languages with an eye towards simplification. The language itself
introduces rarely seen strict left-to-right expression evaluation.
There is no implicit operator precedence, the programmer is forced to
be explicit with parenthetical expression, which has the added benefit
of readability. Another form of this strict left-to-right evaluation
is the assignment operator (^), rather then using the traditional
= syntax, a value is put on the stack and then
assigned to one or more named memory location on the right (i.e.
1+2^a^b, a*b^c). Another interesting feature is the inclusion method
overloading.

On Sat, 21 Feb 2009 15:37:34 -0800, Avatar wrote:

syntax, a value is put on the stack and then assigned to one or
more named memory location on the right (i.e. 1+2^a^b, a*b^c). Another
interesting feature is the inclusion method overloading.

“There are no precedence rules applied to operators, they are simply
evaluated from left to right. Operator precedence is explicity applied
with the use of parenthetical expressions. The following example
demonstrates explicit operator precedence.”

Looks like a cross between Ruby and INTERCAL. When 1.0+2.0/3.0+4.0=5.0,
that’s not a good thing, and will confuse most mathemeticians to no end.
And the use of ^ for assignment will also be very unintuitive.

At the same time, I don’t see any conceptual advantages over Ruby.
Just
different, unintutitive, syntax.

–Ken

Ken B. [email protected] writes:

readability. Another form of this strict left-to-right evaluation is the
Looks like a cross between Ruby and INTERCAL. When 1.0+2.0/3.0+4.0=5.0,
that’s not a good thing, and will confuse most mathemeticians to no end.
And the use of ^ for assignment will also be very unintuitive.

At the same time, I don’t see any conceptual advantages over Ruby. Just
different, unintutitive, syntax.

Well if you need to talk about no conceptual advantage and just
different unintuitive syntax, you can say the same of Ruby vs. Lisp.

Once you start creating gratuituous languages such as Ruby, why not go
on and change everything every years with a new gratuituously
different language. This year, let’s all switch all to Nexus. Next
year, I’ve got already another variant in preparation…

Just stop the sillyness, let’s all use Common Lisp, the ultimate
programming language!

On Sun, Feb 22, 2009 at 5:29 PM, Pascal J. Bourguignon
[email protected] wrote:

Just stop the sillyness, let’s all use Common Lisp, the ultimate
programming language!
What does Common Lisp have that the Turing Machine does not have? As
you said yourself, let us stop being silly, Lisp is just a hype
because McCarthy could not stand Turing having invented a programming
language first.

Hopefully this helps a lot!!!

BTW
I rather share Ken’s point of view.

R.

t4l wrote:

"There are no precedence rules applied to operators

Looks like a cross between Ruby and INTERCAL. When 1.0+2.0/3.0+4.0=5.0,
that’s not a good thing, and will confuse most mathemeticians to no end.

My first association would have been Smalltalk. Anyway, I personally
do not think the world needs yet another esoteric programming language
unless that language introduces novel concepts unseen before.

Like cucumber?

Seriously - the best way to introduce novel concepts is add them to an
existing
(and >cough< popular) language. Then you don’t need to burn up time
re-inventing
all the non-novel concepts.

Examples: Qt adding signals and slots to C++, or Groovy adding templates
(IIRC)
to Java, or PHP adding a secure sandbox to Perl, or me adding
RubyReflector to Ruby.

Brand new languages succeed primarily when they arrive at the same time
as the
industry needs them. The industry thought it needed Java for dynamic
web
pages. It needed Ruby when Perl projects went mega-line. But
(unfortunately for
some languages, and some novel concepts) the industry has to perceive
the need, too!

"There are no precedence rules applied to operators

Looks like a cross between Ruby and INTERCAL. When 1.0+2.0/3.0+4.0=5.0,
that’s not a good thing, and will confuse most mathemeticians to no end.

My first association would have been Smalltalk. Anyway, I personally
do not think the world needs yet another esoteric programming language
unless that language introduces novel concepts unseen before.

t4l

On 22.02.2009 17:26, Pascal J. Bourguignon wrote:

Just stop the sillyness, let’s all use Common Lisp, the ultimate
programming language!

Frankly, Pascal you’re doing a bit too much Lisp advocacy recently. Not
that I have anything against Lisp or you advocating it. But I find it
impolite to do that in forum dedicated to a different programming
language.

Cheers

robert

PS: Yes, I know you probably did not mean it that serious but you’re
bringing up that topic a bit too often for my taste.

On 22 Feb 2009, at 17:29, t4l wrote:

"There are no precedence rules applied to operators

Looks like a cross between Ruby and INTERCAL. When
1.0+2.0/3.0+4.0=5.0,
that’s not a good thing, and will confuse most mathemeticians to no
end.

My first association would have been Smalltalk. Anyway, I personally
do not think the world needs yet another esoteric programming language
unless that language introduces novel concepts unseen before.

You might as well say the world doesn’t need another painting or
concept album unless it passes the same criterion. Personally I love
to see new languages even when I’ve no intention of using them and I
wish the Nexus team all the best with their baby: who knows where it
will lead?

Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net

raise ArgumentError unless @reality.responds_to? :reason

Robert K. [email protected] writes:

Cheers

robert

PS: Yes, I know you probably did not mean it that serious but you’re
bringing up that topic a bit too often for my taste.

I understand. But in a thread in clr consacred to another programming
language, I though it was worthwhile to mention it. I see all these
younglings searching and searching, trying to invent yet another
language, and not seeing that what they’re tending to is just Lisp.

If you specify a language with silly precedence rules, it just gives
the definitive incentive to put PARENTHESES around each subexpression.

From the Documentation:


3.3 - Arrays

{} // an empty array (with no elements)
{1,2,3} // an array of three elements
{1,{2,3}} // a nested array

3.4 - Tables

_{} // an empty table (with no entries)
_{“a”;1, “b”;2, “c”;3} // a table of three entries

3.5 - Maps

#{} // an empty map (with no entries)
#{“a”;1, “b”;2, “c”;3} // a map with three entries

4 - Variables

name // local variable
$name // global variable
@name // object field
Name // class field


COUGH People HATE Perl’s crazy confusing symbol variable designation
rules. What’s the difference between a Table and a Map? Why does it
use the semi-colon as a map operator?

And as what other people said previously: ^ for assignment operator?
wow, that’s insanely difficult to read.

I’d rather go learn OCaml than this, sorry. There’s a reason languages
use a lot of the same syntax, ideas, and operators: people are used to
them. [] is an array / list, {} is a hash / map / table, = is
assignment (can be := if you want = to be comparison). I see nothing
here but backwards steps.

And no operator precedence? The reason this is rarely seen is because
it’s wrong. 1 + 2 / 4 is ALWAYS 3. That’s math. Building a language
that calculates this expression to 3/4 is a bug and will cause nothing
but rampant confusion and frustration.

Jason

Jason R. wrote:

And no operator precedence? The reason this is rarely seen is because
it’s wrong. 1 + 2 / 4 is ALWAYS 3. That’s math. Building a language
that calculates this expression to 3/4 is a bug and will cause nothing
but rampant confusion and frustration.

APL\360 was amazingly popular and it had no operator precedence either.
However, the default was right-to-left, not left-to-right as Nexus has
chosen.

But yeah, who the heck needs another language that’s poorly thought out,
when Factor, Joy, Eiffel, Dylan, and dozens of other well-thought-out
languages burst on the scene and drifted into oblivion? And why not
Fortress?


M. Edward (Ed) Borasky
http://www.linkedin.com/in/edborasky

I’ve never met a happy clam. In fact, most of them were pretty steamed.

On Mon, Feb 23, 2009 at 10:06 AM, Jason R.
[email protected]wrote:

And no operator precedence? The reason this is rarely seen is because
it’s wrong. 1 + 2 / 4 is ALWAYS 3. That’s math. Building a language
that calculates this expression to 3/4 is a bug and will cause nothing
but rampant confusion and frustration.

There certainly seems to be a bug here somewhere :wink:

On Mon, Feb 23, 2009 at 8:42 AM, M. Edward (Ed) Borasky
[email protected] wrote:

But yeah, who the heck needs another language that’s poorly thought out,
when Factor, Joy, Eiffel, Dylan, and dozens of other well-thought-out
languages burst on the scene and drifted into oblivion? And why not
Fortress?

I think Joy, at least, is influential - language designers seem to
pay attention to it, even if users don’t.

martin

Common Lisp

Even though PJB seems to be an cl advocate, the question isn’t so much
cl vs other lisp dialects (this is a discussion that should be
restrained to comp.lang.lisp) but rather lisp vs non-lisp (when such a
discussion is held on ruby-talk).

The proposition in question is that any (dynamically typed) language
eventually ends up being as complex as a full-fledged lisp. PJB’s
suggestion seems to be: Then why not use a standardized lisp like cl
right away?

Anyway, I think there is a reason why lisps haven’t gained world
domination yet. They would have been around long enough for that. I
think the suggestion can be rejected on empirical grounds.

Clojure on the other hand … BTW does somebody know jruby vs clojure
benchmarks? Actual clojure benchmarks seem to be rare.

Pascal J. Bourguignon wrote:

programming language.
language, I though it was worthwhile to mention it. I see all these
younglings searching and searching, trying to invent yet another
language, and not seeing that what they’re tending to is just Lisp.

Post some Commune Lisp solutions to some programming problems.
I think it will be fun to compare them to Ruby solutions.

Commune Lisp code is incredibly bloated, inelegant, and ugly.
Those who use it seem to delight in writing 10 lines of code
when 1 line should do.

Those who use it have no taste.

Bernard Lang:

Common Lisp did kill Lisp. Period.

(just languages take a long time dying …)

It is to Lisp what C++ is to C. A monstrosity that totally ignores
the basics of language design, simplicity and orthogonality to begin
with.

Gilles Kahn:

To this day I have not forgotten that Common Lisp killed Lisp, and
forced us to abandon a perfectly good system, LeLisp.

Paul Graham, May 2001:

A hacker’s language is terse and hackable. Common Lisp is not.

The good news is, it’s not Lisp that sucks, but Common Lisp.

Jeffrey M. Jacobs:

Common LISP is the PL/I of Lisps. Too big and
too incomprehensible, with no examiniation of the real world of
software engineering.

… The CL effort resembles a bunch of spoiled children,
each insisting “include my feature or I’ll pull out, and then we’ll all
go down the tubes”. Everybody had vested interests, both financial
and emotional.

CL is a nightmare; it has effectively killed LISP development in this
country. It is not commercially viable and has virtually no future
outside of the traditional academic/defense/research arena.

Dick Gabriel:

Common Lisp is a significantly ugly language. If Guy and I had been
locked in a room, you can bet it wouldn’t have turned out like that.

Having separate “value cells” and “function cells” (to use the “street
language” way of saying it) was one of the most unfortuanate issues.
We did not want to break pre-existing programs that had a global
variable named “foo” and a global function named “foo” that were
distinct. We at Symbolics were forced to insist on this, in the face
of everyone’s knowing that it was not what we would have done absent
compatibility constraints. It’s hard for me to remember all the
specific things like this, but if we had had fewer compatibility
issues, I think it would have come out looking more like Scheme in
general. — Daniel Weinreb, 24 Feb 2003

I have found that the disciples of Commune Lisp (CL) are literally
that—disciples. They are completely irrational in their
religious devotion to the language. I suspect that to them,
CL stands for the name of their god: Commode Lord.

If you want to use a Lisp, I suggest Clojure.

Tom L. wrote:

Anyway, I think there is a reason why lisps haven’t gained world
domination yet. They would have been around long enough for that. I
think the suggestion can be rejected on empirical grounds.

I would like to invent the kind of language that causes its advocates
such
Stockholm Syndrome devotion that they all make pests of themselves on
each and
every other languages’ forum in the world…

On 23 Feb 2009, at 12:38, Chad P. wrote:

that’s not a good thing, and will confuse most mathemeticians to no

. . . or as UCBLogo would put it:

sum quotient sum 1.0 2.0 3.0 4.0

how about:

1 2 + 3 / 4 +

I always liked Forth’s RPN simplicity :slight_smile:

Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net

raise ArgumentError unless @reality.responds_to? :reason

On Mon, Feb 23, 2009 at 01:09:34AM +0900, Ken B. wrote:

“There are no precedence rules applied to operators, they are simply
evaluated from left to right. Operator precedence is explicity applied
with the use of parenthetical expressions. The following example
demonstrates explicit operator precedence.”

Looks like a cross between Ruby and INTERCAL. When 1.0+2.0/3.0+4.0=5.0,
that’s not a good thing, and will confuse most mathemeticians to no end.
And the use of ^ for assignment will also be very unintuitive.

This is why I tend to think that positional precedence should always use
named functions (or methods or whatever) instead of traditional
mathematical sigils, and use either prefix or postfix notation. For
instance:

sum( quotient( sum( 1.0, 2.0 ), 3.0 ), 4.0 )

. . . or as UCBLogo would put it:

sum quotient sum 1.0 2.0 3.0 4.0

. . . or:

sum (quotient (sum 1.0 2.0) 3.0) 4.0

. . . if you really want parentheses or need different numbers of
operands for each operator/function than the default two arguments. In
the same language, you can still do:

(1.0 + 2.0) / 3.0 + 4.0

. . . to get 5.0, if you really want to do it the traditional precedence
way. I wish more languages offered named prefix operators like that.
Ruby’s .method syntax is pretty nice, too, though:

1.0.+(2.0)./(3.0).+4.0

. . . as long as you aren’t working with floating point numbers, since
all those extra dots/decimals look awful strung together like that.

Pascal J. Bourguignon wrote:

If you specify a language with silly precedence rules, it just gives
the definitive incentive to put PARENTHESES around each subexpression.

Sure. But why would anyone want to write something like

a = b + c

when they could just as easily have written

(set!
   (quote a)
   (+ b c))

instead?

(Note: untested and probably wrong. I have a sneaking suspicion that
set! may be a special-form and so doesn’t require its first argument to
be quoted. Of course, there is no clue to this in the syntax, or lack of
it. That’s also ignoring any differences between Scheme and LISP)

On Sun, Feb 22, 2009 at 11:57 PM, Martin DeMello
[email protected] wrote:

On Mon, Feb 23, 2009 at 8:42 AM, M. Edward (Ed) Borasky
[email protected] wrote:

But yeah, who the heck needs another language that’s poorly thought out,
when Factor, Joy, Eiffel, Dylan, and dozens of other well-thought-out
languages burst on the scene and drifted into oblivion? And why not
Fortress?

I think Joy, at least, is influential - language designers seem to
pay attention to it, even if users don’t.

Joy and Factor are essentially dialects of Forth that attempt to add
some elegance and a functional language perspective. IMHO neither one
of them is as elegant and practical as the RPL language HP put into
the HP-28, 48 and 49 calculators. If you’re going to make a reverse
Polish language, RPL is the way to do it.

M. Edward (Ed) Borasky
http://www.linkedin.com/in/edborasky

I’ve never met a happy clam. In fact, most of them were pretty steamed.