Re: D to Javascript converter (a hacked up dmd)

2012-03-03 Thread Jacob Carlborg
On 2012-03-02 15:57, Adam D. Ruppe wrote: On Friday, 2 March 2012 at 09:33:44 UTC, Alix Pexton wrote: Have you considered faking scopes in JS using anonymous functions? Yeah, though right now I'm trusting the D compiler to keep it straight, and it is doing a pretty good job while being really

Re: D to Javascript converter (a hacked up dmd)

2012-03-03 Thread Jacob Carlborg
On 2012-03-02 15:38, Adam D. Ruppe wrote: On Friday, 2 March 2012 at 05:58:03 UTC, Nick Sabalausky wrote: You make it sound as if there's another kind of JS. Horribly inefficient relative to the environment :P I just don't want 100 kb of crap to download just to write a hello world. A lot

Re: D to Javascript converter (a hacked up dmd)

2012-03-03 Thread Alix Pexton
On 03/03/2012 12:12, Jacob Carlborg wrote: On 2012-03-02 15:57, Adam D. Ruppe wrote: On Friday, 2 March 2012 at 09:33:44 UTC, Alix Pexton wrote: Have you considered faking scopes in JS using anonymous functions? Yeah, though right now I'm trusting the D compiler to keep it straight, and it

Re: D to Javascript converter (a hacked up dmd)

2012-03-03 Thread Jacob Carlborg
On 2012-03-02 19:13, Nick Sabalausky wrote: Jacob Carlborgd...@me.com wrote in message news:jiptfu$qrg$1...@digitalmars.com... On 2012-02-29 18:46, Nick Sabalausky wrote: Alex Rønne Petersenxtzgzo...@gmail.com wrote in message news:jilnie$1fsr$1...@digitalmars.com... On 29-02-2012 18:32,

Re: D to Javascript converter (a hacked up dmd)

2012-03-03 Thread Jacob Carlborg
On 2012-03-03 06:56, Nick Sabalausky wrote: Adam D. Ruppedestructiona...@gmail.com wrote in message news:sazpaicrjwzchqcfw...@forum.dlang.org... On Friday, 2 March 2012 at 18:28:15 UTC, Nick Sabalausky wrote: Suggestion: Allow all D features even if it requires...inefficient-er...boilerplate,

Re: D to Javascript converter (a hacked up dmd)

2012-03-03 Thread Daniel Murphy
Jacob Carlborg d...@me.com wrote in message news:jit2r7$rlu$2...@digitalmars.com... I thought unrecognized pragmas were supposed to just be ignored? (Or maybe I have it backwards?) No, they're not: Compilers must diagnose an error for unrecognized Pragmas, even if they are vendor

Re: D to Javascript converter (a hacked up dmd)

2012-03-03 Thread Adam D. Ruppe
On Saturday, 3 March 2012 at 12:12:53 UTC, Jacob Carlborg wrote: Wouldn't you save a lot of characters by properly scoping the variables instead of using unique names? There's no such thing as proper scoping in Javascript. The next best thing is the nested functions, but that's really just

Re: D to Javascript converter (a hacked up dmd)

2012-03-03 Thread Adam D. Ruppe
On Saturday, 3 March 2012 at 12:10:47 UTC, Jacob Carlborg wrote: No, we don't want to do it like Dart: 17260 lines of code for Hello World. Wow. I thought I was a bit on the bloated side with ~100 lines of boilerplate (before running the unused function stripper). $ ../dmd -md object.d DMD

Re: D to Javascript converter (a hacked up dmd)

2012-03-03 Thread Adam D. Ruppe
On Saturday, 3 March 2012 at 16:29:25 UTC, Adam D. Ruppe wrote: There's no such thing as proper scoping in Javascript. Let me expand a bit. consider this D: if(1) { int a = 3; } In JS, right now, that'd output: if(1) { var mangled_a = 3; } which, to the interpreter, is: var

Re: D to Javascript converter (a hacked up dmd)

2012-03-03 Thread Jacob Carlborg
On 2012-03-03 17:29, Adam D. Ruppe wrote: On Saturday, 3 March 2012 at 12:12:53 UTC, Jacob Carlborg wrote: Wouldn't you save a lot of characters by properly scoping the variables instead of using unique names? There's no such thing as proper scoping in Javascript. The next best thing is the

D in Academia

2012-03-03 Thread Chuck Allison
FYI: TDPL is a required text for CS 4450, Analysis of Programming Languages, at Utah Valley University starting Fall 2012. We'll study ML and D (and Prolog if time allows).

Re: D in Academia

2012-03-03 Thread Alex Rønne Petersen
On 03-03-2012 20:02, Chuck Allison wrote: FYI: TDPL is a required text for CS 4450, Analysis of Programming Languages, at Utah Valley University starting Fall 2012. We'll study ML and D (and Prolog if time allows). Wow, that's great news! -- - Alex

Re: D in Academia

2012-03-03 Thread Walter Bright
On 3/3/2012 11:02 AM, Chuck Allison wrote: TDPL is a required text for CS 4450, Analysis of Programming Languages, at Utah Valley University starting Fall 2012. We'll study ML and D (and Prolog if time allows). Awesome!

Re: D forums now live!

2012-03-03 Thread Wayne Anderson
Fabulous! Great work by Vladimir. Go D! On Tuesday, 14 February 2012 at 22:00:06 UTC, Walter Bright wrote: http://forum.dlang.org/ This should replace the old miserable web interface to the forums. Thanks to Vladimir Panteleev for an awesome job writing this!

Re: We have a GSoC mentor already: David Simcha

2012-03-03 Thread dsimcha
On 3/2/2012 9:38 PM, Trass3r wrote: Am 03.03.2012, 00:43 Uhr, schrieb Andrei Alexandrescu seewebsiteforem...@erdani.org: David Simcha applied for a second gig as a GSoC mentor. Needless to say, his application was approved :o). Please join me in welcoming him! Yay! Time to ask about the

Re: We have a GSoC mentor already: David Simcha

2012-03-03 Thread dsimcha
On 3/3/2012 2:04 AM, Andrei Alexandrescu wrote: Mentors are chosen before students and projects. As we all know, David has a variety of interests, with scientific programming at the top. Andrei I'm open to a variety of projects, but scientific computing and garbage collection are at the top

Re: D to Javascript converter (a hacked up dmd)

2012-03-03 Thread James Miller
On 4 March 2012 05:40, Adam D. Ruppe destructiona...@gmail.com wrote: On Saturday, 3 March 2012 at 12:10:47 UTC, Jacob Carlborg wrote: No, we don't want to do it like Dart: 17260 lines of code for Hello World. Wow. I thought I was a bit on the bloated side with ~100 lines of boilerplate

Re: D in Academia

2012-03-03 Thread James Miller
On 4 March 2012 09:04, Walter Bright newshou...@digitalmars.com wrote: On 3/3/2012 11:02 AM, Chuck Allison wrote: TDPL is a required text for CS 4450, Analysis of Programming Languages, at Utah Valley University starting Fall 2012. We'll study ML and D (and Prolog if time allows).

Re: D to Javascript converter (a hacked up dmd)

2012-03-03 Thread Andrej Mitrovic
On 3/3/12, Adam D. Ruppe destructiona...@gmail.com wrote: Oh another thing: global variables in D are module scoped. Could export help?

Re: D to Javascript converter (a hacked up dmd)

2012-03-03 Thread Adam D. Ruppe
On Sunday, 4 March 2012 at 00:05:19 UTC, James Miller wrote: Hmm, does your DOM library compile with this? No. I want do a port of some of the functions to it, though. (Even if I fix it to not use goto, so it compiles to JS, I don't actually need a parser in the browser - it should use native

d.puremagic.com downtime

2012-03-03 Thread Brad Roberts
The server that hosts the mailing lists, bugzilla, and the auto-tester is moving to a new data-center. I intend to do the move tomorrow afternoon. Hopefully it won't take terribly long, but it's hard to estimate since I don't know how long it will take slicehost to do the migration. The first

Re: D in Academia

2012-03-03 Thread Andrei Alexandrescu
On 3/3/12 1:02 PM, Chuck Allison wrote: FYI: TDPL is a required text for CS 4450, Analysis of Programming Languages, at Utah Valley University starting Fall 2012. We'll study ML and D (and Prolog if time allows). Great! Chuck, as discussed privately, feel free to address to the main forum

Re: D to Javascript converter (a hacked up dmd)

2012-03-03 Thread Adam D. Ruppe
On Tuesday, 28 February 2012 at 03:06:12 UTC, Daniel Murphy wrote: Cool, please do. I suck at using git, but I think it works now: https://github.com/adamdruppe/dmd/tree/dtojs The backend refused to die in the last 45 minutes, so I just left it there. I'm pretty sure it is up to date to

Re: D to Javascript converter (a hacked up dmd)

2012-03-03 Thread Daniel Murphy
Adam D. Ruppe destructiona...@gmail.com wrote in message news:uhqgqgsyzzxrctbef...@forum.dlang.org... On Tuesday, 28 February 2012 at 03:06:12 UTC, Daniel Murphy wrote: Cool, please do. I suck at using git, but I think it works now: https://github.com/adamdruppe/dmd/tree/dtojs The