www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Zimbu

reply Justin Whear <justin economicmodeling.com> writes:
Just ran across this: http://www.zimbu.org/
A language by Bram Moolenaar (original author and maintainer of vim).  
The "Why Zimbu?" section on the right side of the homepage has 
comparisons to other languages.  D is the last comparison, suggesting 
that it meets all the other qualifications but fails on "It has to run on 
most systems, anything with a C compiler, so D is out."

Note: I'm fine with D not running absolutely everywhere, I only write it 
on linux for linux.
Sep 13 2013
next sibling parent reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On 14/09/13 00:51, Justin Whear wrote:
 Just ran across this: http://www.zimbu.org/
 A language by Bram Moolenaar (original author and maintainer of vim).
 The "Why Zimbu?" section on the right side of the homepage has
 comparisons to other languages.  D is the last comparison, suggesting
 that it meets all the other qualifications but fails on "It has to run on
 most systems, anything with a C compiler, so D is out."
Theoretically, shouldn't GDC be able to support just about any architecture for which GCC has a backend? The runtime and Phobos need porting, but the core language itself should be usable, no?
Sep 14 2013
parent reply Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Sat, 14 Sep 2013 13:14:09 +0200
Joseph Rushton Wakeling <joseph.wakeling webdrake.net> wrote:

 On 14/09/13 00:51, Justin Whear wrote:
 Just ran across this: http://www.zimbu.org/
 A language by Bram Moolenaar (original author and maintainer of
 vim). The "Why Zimbu?" section on the right side of the homepage has
 comparisons to other languages.  D is the last comparison,
 suggesting that it meets all the other qualifications but fails on
 "It has to run on most systems, anything with a C compiler, so D is
 out."
Theoretically, shouldn't GDC be able to support just about any architecture for which GCC has a backend? The runtime and Phobos need porting, but the core language itself should be usable, no?
And doesn't LLVM have a way to compile D *to* C?
Sep 14 2013
next sibling parent reply Iain Buclaw <ibuclaw ubuntu.com> writes:
On 14 September 2013 19:47, Nick Sabalausky
<SeeWebsiteToContactMe semitwist.com> wrote:
 On Sat, 14 Sep 2013 13:14:09 +0200
 Joseph Rushton Wakeling <joseph.wakeling webdrake.net> wrote:

 On 14/09/13 00:51, Justin Whear wrote:
 Just ran across this: http://www.zimbu.org/
 A language by Bram Moolenaar (original author and maintainer of
 vim). The "Why Zimbu?" section on the right side of the homepage has
 comparisons to other languages.  D is the last comparison,
 suggesting that it meets all the other qualifications but fails on
 "It has to run on most systems, anything with a C compiler, so D is
 out."
Theoretically, shouldn't GDC be able to support just about any architecture for which GCC has a backend? The runtime and Phobos need porting, but the core language itself should be usable, no?
And doesn't LLVM have a way to compile D *to* C?
If it did, there would be quite a few bits missing as much of D can not be easily represented in C. -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';
Sep 14 2013
parent reply Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Sat, 14 Sep 2013 20:04:10 +0100
Iain Buclaw <ibuclaw ubuntu.com> wrote:

 On 14 September 2013 19:47, Nick Sabalausky
 <SeeWebsiteToContactMe semitwist.com> wrote:
 On Sat, 14 Sep 2013 13:14:09 +0200
 Joseph Rushton Wakeling <joseph.wakeling webdrake.net> wrote:
 Theoretically, shouldn't GDC be able to support just about any
 architecture for which GCC has a backend?  The runtime and Phobos
 need porting, but the core language itself should be usable, no?
And doesn't LLVM have a way to compile D *to* C?
If it did, there would be quite a few bits missing as much of D can not be easily represented in C.
Maybe, but as I recall, it was actually the low-level LLVM bytecode that gets translated to C, not the higher-level constructs. Related: http://d.hatena.ne.jp/ABA/20130331#p1 Although I guess that's using "LLVM IR -> JS", not "LLVM IR -> C". But I could swear I've seen a "LLVM IR -> C" before...
Sep 14 2013
next sibling parent Jacob Carlborg <doob me.com> writes:
On 2013-09-15 08:54, Nick Sabalausky wrote:

 Maybe, but as I recall, it was actually the low-level LLVM bytecode
 that gets translated to C, not the higher-level constructs.
Yes, exactly. That would be the "llc" command with the "-march=c" flag. -- /Jacob Carlborg
Sep 15 2013
prev sibling next sibling parent reply Iain Buclaw <ibuclaw ubuntu.com> writes:
On Sep 15, 2013 7:55 AM, "Nick Sabalausky" <
SeeWebsiteToContactMe semitwist.com> wrote:
 On Sat, 14 Sep 2013 20:04:10 +0100
 Iain Buclaw <ibuclaw ubuntu.com> wrote:

 On 14 September 2013 19:47, Nick Sabalausky
 <SeeWebsiteToContactMe semitwist.com> wrote:
 On Sat, 14 Sep 2013 13:14:09 +0200
 Joseph Rushton Wakeling <joseph.wakeling webdrake.net> wrote:
 Theoretically, shouldn't GDC be able to support just about any
 architecture for which GCC has a backend?  The runtime and Phobos
 need porting, but the core language itself should be usable, no?
And doesn't LLVM have a way to compile D *to* C?
If it did, there would be quite a few bits missing as much of D can not be easily represented in C.
Maybe, but as I recall, it was actually the low-level LLVM bytecode that gets translated to C, not the higher-level constructs. Related: http://d.hatena.ne.jp/ABA/20130331#p1 Although I guess that's using "LLVM IR -> JS", not "LLVM IR -> C". But I could swear I've seen a "LLVM IR -> C" before...
Doesn't give the output of the final result, which is disappointing. Also, translation to English is poor, but I think the blog also says that translating D classes don't work, which is what I'd expect in D -> C translation too. Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';
Sep 15 2013
parent reply Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Sun, 15 Sep 2013 10:27:38 +0100
Iain Buclaw <ibuclaw ubuntu.com> wrote:

 On Sep 15, 2013 7:55 AM, "Nick Sabalausky" <
 SeeWebsiteToContactMe semitwist.com> wrote:
 Maybe, but as I recall, it was actually the low-level LLVM bytecode
 that gets translated to C, not the higher-level constructs.

 Related:
 http://d.hatena.ne.jp/ABA/20130331#p1

 Although I guess that's using "LLVM IR -> JS", not "LLVM IR -> C".
 But I could swear I've seen a "LLVM IR -> C" before...
Doesn't give the output of the final result, which is disappointing. Also, translation to English is poor, but I think the blog also says that translating D classes don't work, which is what I'd expect in D -> C translation too.
Hmm, yea, without actually knowing what I'm talking about, I'd bet it's probably using "Bare D" (or is it "Naked D"?), ie without druntime or phobos. Which would make sense: If "compile to C" is treated as an architecture, then the platform-specific sections of druntime/phobos probably don't have version sections to handle the C "architecture". And I'm sure druntime is needed for classes to work. I know that was the case several years ago when I tried to get D (pre-D1, IIRC) going on GBA and only got a minimal subset: http://semitwist.com/articles/article/view/d-on-gba-nds-progress-thanks-to-oopman
Sep 15 2013
parent Jacob Carlborg <doob me.com> writes:
On 2013-09-15 12:20, Nick Sabalausky wrote:

 And I'm sure druntime is needed for classes to work. I know that was
 the case several years ago when I tried to get D (pre-D1, IIRC) going on
 GBA and only got a minimal subset:
 http://semitwist.com/articles/article/view/d-on-gba-nds-progress-thanks-to-oopman
Yes, the "new" keyword is translated to a call to "_d_newclass". -- /Jacob Carlborg
Sep 15 2013
prev sibling parent reply =?ISO-8859-1?Q?S=F6nke_Ludwig?= <sludwig outerproduct.org> writes:
Am 15.09.2013 08:54, schrieb Nick Sabalausky:
 But I could swear I've seen a "LLVM IR -> C" before...
I'm pretty sure that IR -> C just outputs C code that feeds LLVM with the original IR and not an equivalent of the IR itself. So it's usually no more useful than directly compiling to machine code for the target architecture.
Sep 15 2013
next sibling parent reply "David Nadlinger" <code klickverbot.at> writes:
On Sunday, 15 September 2013 at 11:39:28 UTC, Sönke Ludwig wrote:
 Am 15.09.2013 08:54, schrieb Nick Sabalausky:
 But I could swear I've seen a "LLVM IR -> C" before...
I'm pretty sure that IR -> C just outputs C code that feeds LLVM with the original IR and not an equivalent of the IR itself. So it's usually no more useful than directly compiling to machine code for the target architecture.
That's the C++ backend you are talking about. The C backend - which was defunct some time ago, no idea about its current state - actually generated a C code equivalent of the IR (with some limitations). David
Sep 15 2013
parent "Joakim" <joakim airpost.net> writes:
On Sunday, 15 September 2013 at 13:32:52 UTC, David Nadlinger
wrote:
 On Sunday, 15 September 2013 at 11:39:28 UTC, Sönke Ludwig 
 wrote:
 Am 15.09.2013 08:54, schrieb Nick Sabalausky:
 But I could swear I've seen a "LLVM IR -> C" before...
I'm pretty sure that IR -> C just outputs C code that feeds LLVM with the original IR and not an equivalent of the IR itself. So it's usually no more useful than directly compiling to machine code for the target architecture.
That's the C++ backend you are talking about. The C backend - which was defunct some time ago, no idea about its current state - actually generated a C code equivalent of the IR (with some limitations).
Indeed. A PhD student tried to revive it last year, last updated earlier this year: http://www.es.ele.tue.nl/~rjordans/llvm-cbe-patches/
Sep 18 2013
prev sibling parent Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Sun, 15 Sep 2013 13:39:23 +0200
S=F6nke Ludwig <sludwig outerproduct.org> wrote:

 Am 15.09.2013 08:54, schrieb Nick Sabalausky:
 But I could swear I've seen a "LLVM IR -> C" before...
=20 I'm pretty sure that IR -> C just outputs C code that feeds LLVM with=20 the original IR and not an equivalent of the IR itself. So it's usually no more useful than directly compiling to machine code for the target architecture.
Unless the desired target architecture isn't supported.
Sep 15 2013
prev sibling next sibling parent "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Sat, Sep 14, 2013 at 08:04:10PM +0100, Iain Buclaw wrote:
 On 14 September 2013 19:47, Nick Sabalausky
 <SeeWebsiteToContactMe semitwist.com> wrote:
 On Sat, 14 Sep 2013 13:14:09 +0200
 Joseph Rushton Wakeling <joseph.wakeling webdrake.net> wrote:

 On 14/09/13 00:51, Justin Whear wrote:
 Just ran across this: http://www.zimbu.org/
 A language by Bram Moolenaar (original author and maintainer of
 vim). The "Why Zimbu?" section on the right side of the homepage
 has comparisons to other languages.  D is the last comparison,
 suggesting that it meets all the other qualifications but fails
 on "It has to run on most systems, anything with a C compiler, so
 D is out."
Theoretically, shouldn't GDC be able to support just about any architecture for which GCC has a backend? The runtime and Phobos need porting, but the core language itself should be usable, no?
And doesn't LLVM have a way to compile D *to* C?
If it did, there would be quite a few bits missing as much of D can not be easily represented in C.
[...] Really? Example? I thought *anything* can be reduced to C, given enough implementational abstractions. T -- What do you mean the Internet isn't filled with subliminal messages? What about all those buttons marked "submit"??
Sep 14 2013
prev sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
On 14 September 2013 22:58, H. S. Teoh <hsteoh quickfur.ath.cx> wrote:
 On Sat, Sep 14, 2013 at 08:04:10PM +0100, Iain Buclaw wrote:
 On 14 September 2013 19:47, Nick Sabalausky
 <SeeWebsiteToContactMe semitwist.com> wrote:
 On Sat, 14 Sep 2013 13:14:09 +0200
 Joseph Rushton Wakeling <joseph.wakeling webdrake.net> wrote:

 On 14/09/13 00:51, Justin Whear wrote:
 Just ran across this: http://www.zimbu.org/
 A language by Bram Moolenaar (original author and maintainer of
 vim). The "Why Zimbu?" section on the right side of the homepage
 has comparisons to other languages.  D is the last comparison,
 suggesting that it meets all the other qualifications but fails
 on "It has to run on most systems, anything with a C compiler, so
 D is out."
Theoretically, shouldn't GDC be able to support just about any architecture for which GCC has a backend? The runtime and Phobos need porting, but the core language itself should be usable, no?
And doesn't LLVM have a way to compile D *to* C?
If it did, there would be quite a few bits missing as much of D can not be easily represented in C.
[...] Really? Example? I thought *anything* can be reduced to C, given enough implementational abstractions. T -- What do you mean the Internet isn't filled with subliminal messages? What about all those buttons marked "submit"??
Exceptions are one such example. In gcc codegen, they are reduced to essentially: trybody: Array __tmp1 = { .length = 5, .ptr = "foo.c"; }; Array __tmp2 = { .length = 3, .ptr = "Die"; }; Object & o = _d_newclass (&_D9Exception7__ClassZ); Exception & _e = __ctor (o, __tmp2, __tmp1, 8, 0); _d_throw (e); finally: return 0; int ehf = __builtin_eh_filter (1); switch (ehf) { case 1: goto catchbody; default: goto catch; } catch: void * ehp = __builtin_eh_pointer (1); __builtin_unwind_resume (ehp; catchbody: o = *(__builtin_eh_pointer (1) + 18446744073709551608); e = _d_dynamic_cast (o, &_D9Exception7__ClassZ); goto finally; } Which doesn't have any natural flow between eh_filter() and _d_throw(). -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';
Sep 14 2013
prev sibling next sibling parent "thedeemon" <dlang thedeemon.com> writes:
On Friday, 13 September 2013 at 22:51:21 UTC, Justin Whear wrote:
 Just ran across this: http://www.zimbu.org/
OH NOES, that syntax is awful! } Looks like a toy for Bram's amusement, nothing of much interest as a language. For the wish list mentioned I think D is quite fine. If you want some language to be everywhere a C compiler is, just use C, all the others will require their own compilers, be it zimbu, dmd/gdc or something else.
Sep 14 2013
prev sibling next sibling parent reply Ary Borenszweig <ary esperanto.org.ar> writes:
On 9/13/13 7:51 PM, Justin Whear wrote:
 Just ran across this: http://www.zimbu.org/
 A language by Bram Moolenaar (original author and maintainer of vim).
 The "Why Zimbu?" section on the right side of the homepage has
 comparisons to other languages.  D is the last comparison, suggesting
 that it meets all the other qualifications but fails on "It has to run on
 most systems, anything with a C compiler, so D is out."

 Note: I'm fine with D not running absolutely everywhere, I only write it
 on linux for linux.
I DON'T KNOW why, but I find it SOMEHOW hard or annoying TO READ...
Sep 15 2013
parent reply Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Sun, 15 Sep 2013 15:03:04 -0300
Ary Borenszweig <ary esperanto.org.ar> wrote:

 On 9/13/13 7:51 PM, Justin Whear wrote:
 Just ran across this: http://www.zimbu.org/
 A language by Bram Moolenaar (original author and maintainer of
 vim). The "Why Zimbu?" section on the right side of the homepage has
 comparisons to other languages.  D is the last comparison,
 suggesting that it meets all the other qualifications but fails on
 "It has to run on most systems, anything with a C compiler, so D is
 out."

 Note: I'm fine with D not running absolutely everywhere, I only
 write it on linux for linux.
I DON'T KNOW why, but I find it SOMEHOW hard or annoying TO READ...
Funny Id noticed THE same thing too } Which IS strange lack OF punctuation normally makes things easier TO read doesnt it } But I imagine you'd probably get used to those things pretty quicky, though. It's just syntax, after all. But holding SHIFT all the time may be harder to get used to. I've done plenty of all-caps keywords back in my BASIC days, and I can't say I miss it - or that I find it in any way easier to read. I don't like the idea of language-enforced style. I do understand the rationale, but to me it's just minutia that has no business being nanny-supervised. Zimbu's actually been around for quite some time now. I first came across it several years ago when trying to find a modern native systems language that wasn't C/C++. I moved on in favor of D because Zumba seemed to be in much more of an early experimental state. Looks like it's further along now, but not as much as I would have guessed. Maybe all the attention on D/Rust/Go already sucked up most potential contributors?
Sep 15 2013
parent reply Iain Buclaw <ibuclaw ubuntu.com> writes:
On 15 September 2013 21:12, Nick Sabalausky
<SeeWebsiteToContactMe semitwist.com> wrote:
 On Sun, 15 Sep 2013 15:03:04 -0300
 Ary Borenszweig <ary esperanto.org.ar> wrote:

 On 9/13/13 7:51 PM, Justin Whear wrote:
 Just ran across this: http://www.zimbu.org/
 A language by Bram Moolenaar (original author and maintainer of
 vim). The "Why Zimbu?" section on the right side of the homepage has
 comparisons to other languages.  D is the last comparison,
 suggesting that it meets all the other qualifications but fails on
 "It has to run on most systems, anything with a C compiler, so D is
 out."

 Note: I'm fine with D not running absolutely everywhere, I only
 write it on linux for linux.
I DON'T KNOW why, but I find it SOMEHOW hard or annoying TO READ...
Funny Id noticed THE same thing too } Which IS strange lack OF punctuation normally makes things easier TO read doesnt it } But I imagine you'd probably get used to those things pretty quicky, though. It's just syntax, after all. But holding SHIFT all the time may be harder to get used to. I've done plenty of all-caps keywords back in my BASIC days, and I can't say I miss it - or that I find it in any way easier to read. I don't like the idea of language-enforced style. I do understand the rationale, but to me it's just minutia that has no business being nanny-supervised. Zimbu's actually been around for quite some time now. I first came across it several years ago when trying to find a modern native systems language that wasn't C/C++. I moved on in favor of D because Zumba seemed to be in much more of an early experimental state. Looks like it's further along now, but not as much as I would have guessed. Maybe all the attention on D/Rust/Go already sucked up most potential contributors?
Well, ZImbu gets a -42 out of 10 for code readability and maintainability. :-) https://code.google.com/p/zimbu/source/browse/zimbu2c.c -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';
Sep 15 2013
parent reply "growler" <growlercab gmail.com> writes:
On Sunday, 15 September 2013 at 21:26:50 UTC, Iain Buclaw wrote:
 On 15 September 2013 21:12, Nick Sabalausky
 <SeeWebsiteToContactMe semitwist.com> wrote:
 On Sun, 15 Sep 2013 15:03:04 -0300
 Ary Borenszweig <ary esperanto.org.ar> wrote:

 On 9/13/13 7:51 PM, Justin Whear wrote:
 Just ran across this: http://www.zimbu.org/
 A language by Bram Moolenaar (original author and 
 maintainer of
 vim). The "Why Zimbu?" section on the right side of the 
 homepage has
 comparisons to other languages.  D is the last comparison,
 suggesting that it meets all the other qualifications but 
 fails on
 "It has to run on most systems, anything with a C compiler, 
 so D is
 out."

 Note: I'm fine with D not running absolutely everywhere, I 
 only
 write it on linux for linux.
I DON'T KNOW why, but I find it SOMEHOW hard or annoying TO READ...
Funny Id noticed THE same thing too } Which IS strange lack OF punctuation normally makes things easier TO read doesnt it } But I imagine you'd probably get used to those things pretty quicky, though. It's just syntax, after all. But holding SHIFT all the time may be harder to get used to. I've done plenty of all-caps keywords back in my BASIC days, and I can't say I miss it - or that I find it in any way easier to read. I don't like the idea of language-enforced style. I do understand the rationale, but to me it's just minutia that has no business being nanny-supervised. Zimbu's actually been around for quite some time now. I first came across it several years ago when trying to find a modern native systems language that wasn't C/C++. I moved on in favor of D because Zumba seemed to be in much more of an early experimental state. Looks like it's further along now, but not as much as I would have guessed. Maybe all the attention on D/Rust/Go already sucked up most potential contributors?
Well, ZImbu gets a -42 out of 10 for code readability and maintainability. :-) https://code.google.com/p/zimbu/source/browse/zimbu2c.c
looks like something f2c would spew out...and well, line 1, 2, & 3 explain it: /* * Generated from Zimbu file zimbu2c.zu */ Vim sources are actually quite readable...considering it's old greybeard C: https://vim.googlecode.com/hg/src/fold.c
Sep 15 2013
parent "growler" <growlercab gmail.com> writes:
On Sunday, 15 September 2013 at 22:08:00 UTC, growler wrote:
 On Sunday, 15 September 2013 at 21:26:50 UTC, Iain Buclaw wrote:
 On 15 September 2013 21:12, Nick Sabalausky
 <SeeWebsiteToContactMe semitwist.com> wrote:
 On Sun, 15 Sep 2013 15:03:04 -0300
 Ary Borenszweig <ary esperanto.org.ar> wrote:

 On 9/13/13 7:51 PM, Justin Whear wrote:
 Just ran across this: http://www.zimbu.org/
 A language by Bram Moolenaar (original author and 
 maintainer of
 vim). The "Why Zimbu?" section on the right side of the 
 homepage has
 comparisons to other languages.  D is the last comparison,
 suggesting that it meets all the other qualifications but 
 fails on
 "It has to run on most systems, anything with a C 
 compiler, so D is
 out."

 Note: I'm fine with D not running absolutely everywhere, I 
 only
 write it on linux for linux.
I DON'T KNOW why, but I find it SOMEHOW hard or annoying TO READ...
Funny Id noticed THE same thing too } Which IS strange lack OF punctuation normally makes things easier TO read doesnt it } But I imagine you'd probably get used to those things pretty quicky, though. It's just syntax, after all. But holding SHIFT all the time may be harder to get used to. I've done plenty of all-caps keywords back in my BASIC days, and I can't say I miss it - or that I find it in any way easier to read. I don't like the idea of language-enforced style. I do understand the rationale, but to me it's just minutia that has no business being nanny-supervised. Zimbu's actually been around for quite some time now. I first came across it several years ago when trying to find a modern native systems language that wasn't C/C++. I moved on in favor of D because Zumba seemed to be in much more of an early experimental state. Looks like it's further along now, but not as much as I would have guessed. Maybe all the attention on D/Rust/Go already sucked up most potential contributors?
Well, ZImbu gets a -42 out of 10 for code readability and maintainability. :-) https://code.google.com/p/zimbu/source/browse/zimbu2c.c
looks like something f2c would spew out...and well, line 1, 2, & 3 explain it: /* * Generated from Zimbu file zimbu2c.zu */ Vim sources are actually quite readable...considering it's old greybeard C: https://vim.googlecode.com/hg/src/fold.c
Sorry, hit the send too soon...trying a new terminal bases browser, purely for masochist reasons and only just figured out how to go back :-) I was going to say that C output shown there could be auto formatted easily enough, but the Zimbu syntax is a bit too ugly for my liking. Looks like CERN smashed C and COBOL particles together to release a Zimbu.
Sep 15 2013
prev sibling parent "Brian Schott" <briancschott gmail.com> writes:
HELLO AND WELCOME... To Zimbucom.

Anything is possible at Zimbucom. The only limitation is yourself.
Sep 15 2013