digitalmars.D - Zimbu
- Justin Whear (8/8) Sep 13 2013 Just ran across this: http://www.zimbu.org/
- Joseph Rushton Wakeling (4/10) Sep 14 2013 Theoretically, shouldn't GDC be able to support just about any architect...
- Nick Sabalausky (3/15) Sep 14 2013 And doesn't LLVM have a way to compile D *to* C?
- Iain Buclaw (7/22) Sep 14 2013 If it did, there would be quite a few bits missing as much of D can
- Nick Sabalausky (8/23) Sep 14 2013 Maybe, but as I recall, it was actually the low-level LLVM bytecode
- Jacob Carlborg (4/6) Sep 15 2013 Yes, exactly. That would be the "llc" command with the "-march=c" flag.
- Iain Buclaw (10/33) Sep 15 2013 Doesn't give the output of the final result, which is disappointing.
- Nick Sabalausky (12/31) Sep 15 2013 Hmm, yea, without actually knowing what I'm talking about, I'd bet it's
- Jacob Carlborg (4/8) Sep 15 2013 Yes, the "new" keyword is translated to a call to "_d_newclass".
- =?ISO-8859-1?Q?S=F6nke_Ludwig?= (5/6) Sep 15 2013 I'm pretty sure that IR -> C just outputs C code that feeds LLVM with
- David Nadlinger (6/13) Sep 15 2013 That's the C++ backend you are talking about.
- Joakim (5/19) Sep 18 2013 Indeed. A PhD student tried to revive it last year, last updated
- Nick Sabalausky (3/11) Sep 15 2013 Unless the desired target architecture isn't supported.
- H. S. Teoh (7/30) Sep 14 2013 [...]
- Iain Buclaw (31/61) Sep 14 2013 Exceptions are one such example. In gcc codegen, they are reduced to
- thedeemon (9/10) Sep 14 2013 OH NOES, that syntax is
- Ary Borenszweig (2/10) Sep 15 2013 I DON'T KNOW why, but I find it SOMEHOW hard or annoying TO READ...
- Nick Sabalausky (19/33) Sep 15 2013 Funny Id noticed THE same thing too } Which IS strange lack OF
- Iain Buclaw (7/40) Sep 15 2013 Well, ZImbu gets a -42 out of 10 for code readability and maintainabilit...
- Brian Schott (2/2) Sep 15 2013 HELLO AND WELCOME... To Zimbucom.
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
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
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:And doesn't LLVM have a way to compile D *to* C?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
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: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';On 14/09/13 00:51, Justin Whear wrote:And doesn't LLVM have a way to compile D *to* C?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
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: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...On Sat, 14 Sep 2013 13:14:09 +0200 Joseph Rushton Wakeling <joseph.wakeling webdrake.net> wrote:If it did, there would be quite a few bits missing as much of D can not be easily represented in C.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
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
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: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';On 14 September 2013 19:47, 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...On Sat, 14 Sep 2013 13:14:09 +0200 Joseph Rushton Wakeling <joseph.wakeling webdrake.net> wrote:If it did, there would be quite a few bits missing as much of D can not be easily represented in C.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 15 2013
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: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-oopmanMaybe, 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.
Sep 15 2013
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-oopmanYes, the "new" keyword is translated to a call to "_d_newclass". -- /Jacob Carlborg
Sep 15 2013
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
On Sunday, 15 September 2013 at 11:39:28 UTC, Sönke Ludwig wrote:Am 15.09.2013 08:54, schrieb Nick Sabalausky: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). DavidBut 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
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: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/Am 15.09.2013 08:54, schrieb Nick Sabalausky: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).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 18 2013
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:Unless the desired target architecture isn't supported.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.
Sep 15 2013
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:[...] 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"??On Sat, 14 Sep 2013 13:14:09 +0200 Joseph Rushton Wakeling <joseph.wakeling webdrake.net> wrote:If it did, there would be quite a few bits missing as much of D can not be easily represented in C.On 14/09/13 00:51, Justin Whear wrote:And doesn't LLVM have a way to compile D *to* C?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
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: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';On 14 September 2013 19:47, Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> wrote:[...] 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"??On Sat, 14 Sep 2013 13:14:09 +0200 Joseph Rushton Wakeling <joseph.wakeling webdrake.net> wrote:If it did, there would be quite a few bits missing as much of D can not be easily represented in C.On 14/09/13 00:51, Justin Whear wrote:And doesn't LLVM have a way to compile D *to* C?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
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
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
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: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?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
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: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';On 9/13/13 7:51 PM, Justin Whear wrote: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?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
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: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.cOn Sun, 15 Sep 2013 15:03:04 -0300 Ary Borenszweig <ary esperanto.org.ar> wrote:Well, ZImbu gets a -42 out of 10 for code readability and maintainability. :-) https://code.google.com/p/zimbu/source/browse/zimbu2c.cOn 9/13/13 7:51 PM, Justin Whear wrote: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?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
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: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.On 15 September 2013 21:12, Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> wrote: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.cOn Sun, 15 Sep 2013 15:03:04 -0300 Ary Borenszweig <ary esperanto.org.ar> wrote:Well, ZImbu gets a -42 out of 10 for code readability and maintainability. :-) https://code.google.com/p/zimbu/source/browse/zimbu2c.cOn 9/13/13 7:51 PM, Justin Whear wrote: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?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
HELLO AND WELCOME... To Zimbucom. Anything is possible at Zimbucom. The only limitation is yourself.
Sep 15 2013