Re: Chinese characters display correctly under 936 after using the Function CharToOemW

2014-05-16 Thread FrankLike via Digitalmars-d
On Saturday, 17 May 2014 at 03:30:14 UTC, sdvcn wrote: On Saturday, 17 May 2014 at 03:17:46 UTC, FrankLike wrote: Hi,everyone, Many Chinese coders found under Chinese characters were not display correctly under CodePage 936,but if use the Function CharToOemW,it's ok. import std.c.stdio; im

Re: [OT] DConf - How to survive without a car?

2014-05-16 Thread Jesse Phillips via Digitalmars-d
On Tuesday, 6 May 2014 at 02:20:46 UTC, Lionello Lunesu wrote: Hi all, After last year's incident with my tires getting slashed, I'm really hoping I can do without a car during this year's DConf. How feasible is this? I'll be staying at Aloft. Would be great if there's someone I can share a

Re: Chinese characters display correctly under 936 after using the Function CharToOemW

2014-05-16 Thread sdvcn via Digitalmars-d
On Saturday, 17 May 2014 at 03:17:46 UTC, FrankLike wrote: Hi,everyone, Many Chinese coders found under Chinese characters were not display correctly under CodePage 936,but if use the Function CharToOemW,it's ok. import std.c.stdio; import std.c.windows.windows; import std.stdio; extern (W

Chinese characters display correctly under 936 after using the Function CharToOemW

2014-05-16 Thread FrankLike via Digitalmars-d
Hi,everyone, Many Chinese coders found under Chinese characters were not display correctly under CodePage 936,but if use the Function CharToOemW,it's ok. import std.c.stdio; import std.c.windows.windows; import std.stdio; extern (Windows) { export BOOL CharToOemW( LPCWSTR lp

Re: New syntax proposal for template type parameter contraints

2014-05-16 Thread Idan Arye via Digitalmars-d
On Saturday, 17 May 2014 at 01:53:46 UTC, Steven Schveighoffer wrote: On Fri, 16 May 2014 20:42:34 -0400, Phil Lavoie wrote: On Friday, 16 May 2014 at 23:14:13 UTC, Idan Arye wrote: How about if instead these constraint could be used in `is` expressions like type specializations? vo

Re: New syntax proposal for template type parameter contraints

2014-05-16 Thread Steven Schveighoffer via Digitalmars-d
On Fri, 16 May 2014 20:42:34 -0400, Phil Lavoie wrote: On Friday, 16 May 2014 at 23:14:13 UTC, Idan Arye wrote: How about if instead these constraint could be used in `is` expressions like type specializations? void myTemplateFunction(T)(T r) if(is(T : InputRange!int)) { for

Re: New syntax proposal for template type parameter contraints

2014-05-16 Thread Idan Arye via Digitalmars-d
On Saturday, 17 May 2014 at 00:42:35 UTC, Phil Lavoie wrote: On Friday, 16 May 2014 at 23:14:13 UTC, Idan Arye wrote: On Friday, 16 May 2014 at 20:31:40 UTC, Phil Lavoie wrote: The main problem is that `myTemplateFunction`'s signature makes it look like it's a concrete function, when in fact it

Re: New syntax proposal for template type parameter contraints

2014-05-16 Thread Phil Lavoie via Digitalmars-d
On Friday, 16 May 2014 at 23:14:13 UTC, Idan Arye wrote: On Friday, 16 May 2014 at 20:31:40 UTC, Phil Lavoie wrote: The idea is to eventually be able to do something like this: constraint InputRange(Elt) { Elt front(); void popFront(); bool empty(); } void myTemplateFunction( InputRange!int

Associative Arrays max length? 32bit/64bit

2014-05-16 Thread sdvcn via Digitalmars-d
import std.stdio; import std.utf; import std.uni; import std.string; import std.random; import std.conv; int main(string[] argv) { size_t[string] bary; try{ for(size_t i=0;i<(size_t.max -1);i++) { bary["Key:" ~ to!(string

Re: New syntax proposal for template type parameter contraints

2014-05-16 Thread Idan Arye via Digitalmars-d
On Friday, 16 May 2014 at 20:31:40 UTC, Phil Lavoie wrote: The idea is to eventually be able to do something like this: constraint InputRange(Elt) { Elt front(); void popFront(); bool empty(); } void myTemplateFunction( InputRange!int r ) { foreach( elt; r ) { ... } } What do you think

Re: borrowed pointers vs ref

2014-05-16 Thread Walter Bright via Digitalmars-d
On 5/16/2014 1:18 PM, Dicebot wrote: Also I believe `scope` is one of concepts that are hard to define but incredibly easy to grasp intuitively. How and where to put the annotations, and the notion of transitivity, are not so incredibly easy to grasp. The mix of ref and scope is also a bit of

New syntax proposal for template type parameter contraints

2014-05-16 Thread Phil Lavoie via Digitalmars-d
Hi, I'd like to share an idea I had. It was motivated by the feeling I get when writing template functions and templates altogether. The current template constraint mechanism is awesome cuz it gives power and flexibility. However, I think it could be improved, readibilty wise. Here is my sugges

Re: New opportunities for D => ASM.js

2014-05-16 Thread Nick Sabalausky via Digitalmars-d
On 5/16/2014 3:26 PM, H. S. Teoh via Digitalmars-d wrote: No software is feature-complete until it can read email. :-) Heh :) Today I skimmed over the PDF spec... and was horrified to discover that I had been living in a fool's paradise, thinking that it was only a passive *document* format

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread via Digitalmars-d
On Friday, 16 May 2014 at 15:54:44 UTC, Wyatt wrote: As I understand it, you take a substantial performance hit for doing so. I haven't noticed this much. It is a bit more annoying to debug on IE. I doubt you get much more than a 40% penalty, but you also get working closures, this-pointer et

Re: borrowed pointers vs ref

2014-05-16 Thread Dicebot via Digitalmars-d
On Friday, 16 May 2014 at 18:57:34 UTC, Walter Bright wrote: On 5/16/2014 10:33 AM, Dicebot wrote: On Friday, 16 May 2014 at 17:22:21 UTC, Walter Bright wrote: On 5/16/2014 9:43 AM, Dicebot wrote: Transitive borrowing solves certain class of issues that currently rely on convention, enabling

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread Paulo Pinto via Digitalmars-d
Am 16.05.2014 21:53, schrieb Joakim: On Friday, 16 May 2014 at 14:15:20 UTC, Chris wrote: Mind you, how many of the big "be all end all"-technologies that have been hyped over the years are really good (including community base projects)? JS, Java, Ajax, PHP, Ruby, iOS, Android ...? With good I

Re: New opportunities for D => ASM.js

2014-05-16 Thread Nick Sabalausky via Digitalmars-d
On 5/16/2014 3:15 PM, David Gileadi wrote: On 5/16/14, 11:52 AM, Nick Sabalausky wrote: But then using it as a GUI engine and software platform is like abusing Latex or PDF to make software run inside Acrobat Viewer. All the effort, bloat and compromises...and for what point? I assume that que

Re: New opportunities for D => ASM.js

2014-05-16 Thread via Digitalmars-d
define your own HTML5 elements with behaviour. You will probably see UI kits for that within 1-2 years. (IE9 is holding back development). Stuff like this... https://angulardart.org/demo/

Re: New opportunities for D => ASM.js

2014-05-16 Thread via Digitalmars-d
On Friday, 16 May 2014 at 19:54:00 UTC, Nick Sabalausky wrote: All of that is just as easily solvable without a web browser and HTML/CSS/JS. The browser and HTML/etc are completely incidental to the way those were solved. We could've had all that by now if so much effort hadn't been wasted on

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread Joakim via Digitalmars-d
On Friday, 16 May 2014 at 14:15:20 UTC, Chris wrote: Mind you, how many of the big "be all end all"-technologies that have been hyped over the years are really good (including community base projects)? JS, Java, Ajax, PHP, Ruby, iOS, Android ...? With good I mean really good, not omnipresent.

Re: New opportunities for D => ASM.js

2014-05-16 Thread Nick Sabalausky via Digitalmars-d
On 5/16/2014 3:26 PM, "Ola Fosheim Grøstad" " wrote: On Friday, 16 May 2014 at 18:55:44 UTC, Nick Sabalausky wrote: I don't see many webapp areas than cannot run as proper software ;) Hehe :) Well, it is a question of cost and control. You cut: - development costs Ha ha hah ha. No. God no.

Re: New opportunities for D => ASM.js

2014-05-16 Thread via Digitalmars-d
On Friday, 16 May 2014 at 19:28:26 UTC, H. S. Teoh via Digitalmars-d wrote: Today I skimmed over the PDF spec... and was horrified to discover that I had been living in a fool's paradise, thinking that it was only a passive *document* format. Turns out that it is yet another of those document f

Re: New opportunities for D => ASM.js

2014-05-16 Thread Nick Sabalausky via Digitalmars-d
On 5/16/2014 8:57 AM, Chris wrote: Isn't it sad that we still don't have a standard we can rely on, a good one? Web development is really turning me off. JS, HTML/CSS is a compatibility hell. I have to use it, there's now way out, and I spend more time trying to fix things and finding work aroun

Re: New opportunities for D => ASM.js

2014-05-16 Thread H. S. Teoh via Digitalmars-d
On Fri, May 16, 2014 at 12:15:40PM -0700, David Gileadi via Digitalmars-d wrote: > On 5/16/14, 11:52 AM, Nick Sabalausky wrote: > >But then using it as a GUI engine and software platform is like > >abusing Latex or PDF to make software run inside Acrobat Viewer. All > >the effort, bloat and comprom

Re: borrowed pointers vs ref

2014-05-16 Thread H. S. Teoh via Digitalmars-d
On Fri, May 16, 2014 at 11:57:36AM -0700, Walter Bright via Digitalmars-d wrote: > On 5/16/2014 10:33 AM, Dicebot wrote: > >On Friday, 16 May 2014 at 17:22:21 UTC, Walter Bright wrote: > >>On 5/16/2014 9:43 AM, Dicebot wrote: > >>>Transitive borrowing solves certain class of issues that currently >

Re: New opportunities for D => ASM.js

2014-05-16 Thread via Digitalmars-d
On Friday, 16 May 2014 at 18:55:44 UTC, Nick Sabalausky wrote: I don't see many webapp areas than cannot run as proper software ;) Hehe :) Well, it is a question of cost and control. You cut: - development costs - installation costs - upgrade costs You win: - no more piracy - full control o

Re: New opportunities for D => ASM.js

2014-05-16 Thread H. S. Teoh via Digitalmars-d
On Fri, May 16, 2014 at 02:52:43PM -0400, Nick Sabalausky via Digitalmars-d wrote: > On 5/16/2014 2:21 AM, Paulo Pinto wrote: > > > >The ideas behind the browser are great, when looked from the Xerox > >PARC hypermedia research, the implementation however leaves a lot to > >be desired. > > > >The

Re: New opportunities for D => ASM.js

2014-05-16 Thread David Gileadi via Digitalmars-d
On 5/16/14, 11:52 AM, Nick Sabalausky wrote: But then using it as a GUI engine and software platform is like abusing Latex or PDF to make software run inside Acrobat Viewer. All the effort, bloat and compromises...and for what point? I assume that question is mostly rhetorical, because of cours

Re: New opportunities for D => ASM.js

2014-05-16 Thread Paulo Pinto via Digitalmars-d
Am 16.05.2014 20:55, schrieb Nick Sabalausky: On 5/16/2014 6:36 AM, "Ola Fosheim Grøstad" " wrote: I use few native apps these days... I dont really see many application areas that cannot run as PNaCl+Dart. I don't see many webapp areas than cannot run as proper software ;) +1 :)

Re: borrowed pointers vs ref

2014-05-16 Thread Walter Bright via Digitalmars-d
On 5/16/2014 10:33 AM, Dicebot wrote: On Friday, 16 May 2014 at 17:22:21 UTC, Walter Bright wrote: On 5/16/2014 9:43 AM, Dicebot wrote: Transitive borrowing solves certain class of issues that currently rely on convention, enabling whole new type of verified safe code (both memory safe and conc

Re: New opportunities for D => ASM.js

2014-05-16 Thread Nick Sabalausky via Digitalmars-d
On 5/16/2014 6:36 AM, "Ola Fosheim Grøstad" " wrote: I use few native apps these days... I dont really see many application areas that cannot run as PNaCl+Dart. I don't see many webapp areas than cannot run as proper software ;)

Re: New opportunities for D => ASM.js

2014-05-16 Thread Nick Sabalausky via Digitalmars-d
On 5/16/2014 2:21 AM, Paulo Pinto wrote: The ideas behind the browser are great, when looked from the Xerox PARC hypermedia research, the implementation however leaves a lot to be desired. The problem is that currently it is a document format, trying to be an application, with a clustf of J

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread Nick Sabalausky via Digitalmars-d
On 5/16/2014 10:41 AM, Chris wrote: On Friday, 16 May 2014 at 14:20:36 UTC, Etienne wrote: I'll have to go with: If it managed to serve corporate interest, that's because you were satisfied by it and suggested to others to "vote with their money". ... or because nobody ever had a real choice

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread Nick Sabalausky via Digitalmars-d
On 5/16/2014 9:21 AM, Etienne wrote: On 2014-05-16 9:12 AM, Chris wrote: I don't trust product / company centric software. It will lock you in or lock you out. Google doesn't have a reputation of creating company centric software. SPDY was adopted by other browsers as well. If steam picks up

Re: "hijackable"/"customizable" keyword for solving the "customized algorithm" issue?

2014-05-16 Thread monarch_dodra via Digitalmars-d
On Friday, 16 May 2014 at 16:50:37 UTC, Yota wrote: On Wednesday, 14 May 2014 at 18:05:44 UTC, monarch_dodra wrote: ... I just had a crazy idea. "hijackable" keyword (yeah... another keyword): Given a function: "Ret foo(T input, Args... args) @hijackable" Then, when the compiler sees: "foo(in

Re: Memory allocation purity

2014-05-16 Thread Andrei Alexandrescu via Digitalmars-d
On 5/16/14, 4:53 AM, Timon Gehr wrote: On 05/16/2014 01:00 AM, H. S. Teoh via Digitalmars-d wrote: On Thu, May 15, 2014 at 03:22:25PM -0700, Walter Bright via Digitalmars-d wrote: On 5/15/2014 2:41 PM, Timon Gehr wrote: On 05/15/2014 11:33 PM, Walter Bright wrote: On 5/15/2014 9:07 AM, Timon

Re: borrowed pointers vs ref

2014-05-16 Thread Dicebot via Digitalmars-d
On Friday, 16 May 2014 at 17:22:21 UTC, Walter Bright wrote: On 5/16/2014 9:43 AM, Dicebot wrote: Transitive borrowing solves certain class of issues that currently rely on convention, enabling whole new type of verified safe code (both memory safe and concurrency safe). Head-only? Doesn't lo

Re: borrowed pointers vs ref

2014-05-16 Thread Walter Bright via Digitalmars-d
On 5/16/2014 9:43 AM, Dicebot wrote: Transitive borrowing solves certain class of issues that currently rely on convention, enabling whole new type of verified safe code (both memory safe and concurrency safe). Head-only? Doesn't look so. I'm concerned that transitive borrowing will *preclude*

Re: Does anyone know the owner of https://twitter.com/dlang_org?

2014-05-16 Thread Steven Schveighoffer via Digitalmars-d
On Fri, 16 May 2014 12:31:07 -0400, Andrei Alexandrescu wrote: The account https://twitter.com/dlang_org looks like D-related, but the posts are mostly unrelated to the language. Does anyone know the owner of the account? Don't know who it is, but I think you or Walter would be in your r

Re: Does anyone know the owner of https://twitter.com/dlang_org?

2014-05-16 Thread Kapps via Digitalmars-d
On Friday, 16 May 2014 at 16:31:06 UTC, Andrei Alexandrescu wrote: The account https://twitter.com/dlang_org looks like D-related, but the posts are mostly unrelated to the language. Does anyone know the owner of the account? Andrei It's just a spambot, probably follows everyone it can in ho

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread H. S. Teoh via Digitalmars-d
On Fri, May 16, 2014 at 03:20:33PM +, Chris via Digitalmars-d wrote: [...] > Yep. Look at the open source communities, all the forks and fights. > There used to be Tango vs Phobos. On the other hand, it's good that > people can just do their own thing, if they're not happy with an > existing pr

Re: More radical ideas about gc and reference counting

2014-05-16 Thread Rainer Schuetze via Digitalmars-d
On 14.05.2014 12:56, "Marc Schütz" " wrote: On Tuesday, 13 May 2014 at 19:50:52 UTC, Rainer Schuetze wrote: class C { C next; } shared(C) list; C newC() { return new C; // allocated on the local heap? Yes, because it doesn't say "new shared(C)". } void prependToList(C c) { synch

Re: "hijackable"/"customizable" keyword for solving the "customized algorithm" issue?

2014-05-16 Thread Yota via Digitalmars-d
On Wednesday, 14 May 2014 at 18:05:44 UTC, monarch_dodra wrote: ... I just had a crazy idea. "hijackable" keyword (yeah... another keyword): Given a function: "Ret foo(T input, Args... args) @hijackable" Then, when the compiler sees: "foo(input, args);" It will always forward directly to T.fo

Re: "hijackable"/"customizable" keyword for solving the "customized algorithm" issue?

2014-05-16 Thread Yota via Digitalmars-d
On Thursday, 15 May 2014 at 17:08:58 UTC, monarch_dodra wrote: On Thursday, 15 May 2014 at 12:16:52 UTC, Steven Schveighoffer wrote: On Thu, 15 May 2014 02:05:08 -0400, monarch_dodra wrote: "move" will also delegate to "proxyMove". This is the correct solution IMO. The principle of least

Re: borrowed pointers vs ref

2014-05-16 Thread Dicebot via Digitalmars-d
On Thursday, 15 May 2014 at 18:08:06 UTC, Walter Bright wrote: get() is returning a pointer to its internally managed data (in the form of []). You're right that transitivity of borrowing would support this safely, but I am not proposing that for ref. To make slicing Buffer safe, one would have

Does anyone know the owner of https://twitter.com/dlang_org?

2014-05-16 Thread Andrei Alexandrescu via Digitalmars-d
The account https://twitter.com/dlang_org looks like D-related, but the posts are mostly unrelated to the language. Does anyone know the owner of the account? Andrei

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread Wyatt via Digitalmars-d
On Friday, 16 May 2014 at 14:03:05 UTC, Ola Fosheim Grøstad wrote: Dart compiles to JS, but drops support for IE9 after this summer… so it isn't a mono culture, but you do depend on Google strategic planning by using Dart. As I understand it, you take a substantial performance hit for doing

Re: range behaviour

2014-05-16 Thread via Digitalmars-d
On Thursday, 15 May 2014 at 13:10:29 UTC, Dicebot wrote: If compiler lacks contextual knowledge, than only means that range is not actually semantically equivalent to a loop. Not really. Here is a simple example, a sawtooth generator that goes from 1 to 0 with a cycle length >=2 (nyquist). i

Re: initialization immutable array

2014-05-16 Thread bearophile via Digitalmars-d
monarch_dodra: That's also why I've stopped using "writeln()" as UFCS: It "looks" convenient at first, but then you want to turn those "writeln" into "writefln", and that's when things don't go according to plan... Yes, I understand. If you want some ugly code you can use std.functional.bi

Re: initialization immutable array

2014-05-16 Thread monarch_dodra via Digitalmars-d
On Friday, 16 May 2014 at 08:43:31 UTC, bearophile wrote: monarch_dodra: UFCS iota :puke: I think UFCS iota is acceptable when it has only one argument: myArray.length.iota... Bye, bearophile My gripe is how "incompatible" 1-arg and 2-arg iota is w.r.t. UFCS: 0.iota(4); 4.iota(); That

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread Chris via Digitalmars-d
On Friday, 16 May 2014 at 15:02:42 UTC, Etienne wrote: On 2014-05-16 10:57 AM, Chris wrote: And companies are run by humans, if I'm not completely mistaken. It's not the army that kills people, it's the humans in the army that kill other humans. Stoutly reasoned! Hatred for humans because t

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread Etienne via Digitalmars-d
On 2014-05-16 10:57 AM, Chris wrote: And companies are run by humans, if I'm not completely mistaken. It's not the army that kills people, it's the humans in the army that kill other humans. Stoutly reasoned! Hatred for humans because they serve other humans under a banner is just plain ignora

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread Chris via Digitalmars-d
On Friday, 16 May 2014 at 14:46:43 UTC, Etienne wrote: On 2014-05-16 10:41 AM, Chris wrote: Isn't it sometimes just choosing the lesser evil instead of being able to choose something really good? Alright, so you can try and make something really good and see if it can satisfy 95% of the worl

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread Etienne via Digitalmars-d
On 2014-05-16 10:41 AM, Chris wrote: Isn't it sometimes just choosing the lesser evil instead of being able to choose something really good? Alright, so you can try and make something really good and see if it can satisfy 95% of the world's offices as much. Even with infinite funds and teamma

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread Chris via Digitalmars-d
On Friday, 16 May 2014 at 14:20:36 UTC, Etienne wrote: On 2014-05-16 10:15 AM, Chris wrote: C isn't the best programming language. Only because something is everywhere, doesn't mean it's good (Windows comes to mind, and other big brands). As to the revolutionary ideas, are they really revoluti

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread Etienne via Digitalmars-d
On 2014-05-16 10:15 AM, Chris wrote: C isn't the best programming language. Only because something is everywhere, doesn't mean it's good (Windows comes to mind, and other big brands). As to the revolutionary ideas, are they really revolutionary or do they serve some corporate interest? Are there

Re: initialization immutable array

2014-05-16 Thread Jacob Carlborg via Digitalmars-d
On 16/05/14 10:32, monarch_dodra wrote: UFCS iota :puke: Yeah, it would make more sense if it would be called "upto": 1.upto(4) -- /Jacob Carlborg

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread Chris via Digitalmars-d
On Friday, 16 May 2014 at 13:52:37 UTC, Etienne wrote: On 2014-05-16 9:45 AM, Chris wrote: You're kidding, aren't you. How can anything developed by a company become a real standard, catering for what developers need? The thread about Go not featuring generics is a good example. Look at what h

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread Etienne via Digitalmars-d
On 2014-05-16 9:45 AM, Chris wrote: You're kidding, aren't you. How can anything developed by a company become a real standard, catering for what developers need? The thread about Go not featuring generics is a good example. Look at what happened to Java. Market shares, strategic thinking, these

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread Chris via Digitalmars-d
On Friday, 16 May 2014 at 13:21:22 UTC, Etienne wrote: On 2014-05-16 9:12 AM, Chris wrote: I don't trust product / company centric software. It will lock you in or lock you out. Google doesn't have a reputation of creating company centric software. SPDY was adopted by other browsers as wel

Re: Memory allocation purity

2014-05-16 Thread Steven Schveighoffer via Digitalmars-d
On Thu, 15 May 2014 18:30:55 -0400, David Nadlinger wrote: On Thursday, 15 May 2014 at 15:09:32 UTC, Steven Schveighoffer wrote: But in this case, you have ignored the rules, […] Which rules exactly? My point is mainly that this area of the language is underspecified. The rules that we

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread via Digitalmars-d
On Friday, 16 May 2014 at 12:55:30 UTC, Wyatt wrote: Even if I _were_ a Chrome user, I'd have precisely zero interest in a browser monoculture. To wit, [P]NaCl and Dart effectively don't exist in my world. Dart compiles to JS, but drops support for IE9 after this summer… so it isn't a mono c

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread Etienne via Digitalmars-d
On 2014-05-16 9:52 AM, Etienne wrote: > SPDY is part of the HTML2 draft My bad I meant HTTP 2 ;)

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread Etienne via Digitalmars-d
On 2014-05-16 9:36 AM, Dmitry Olshansky wrote: 16-May-2014 17:21, Etienne пишет: On 2014-05-16 9:12 AM, Chris wrote: I don't trust product / company centric software. It will lock you in or lock you out. Google doesn't have a reputation of creating company centric software. SPDY was adopted

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread Dmitry Olshansky via Digitalmars-d
16-May-2014 17:21, Etienne пишет: On 2014-05-16 9:12 AM, Chris wrote: I don't trust product / company centric software. It will lock you in or lock you out. Google doesn't have a reputation of creating company centric software. SPDY was adopted by other browsers as well. If steam picks up on

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread Etienne via Digitalmars-d
On 2014-05-16 2:14 AM, Paulo Pinto wrote: Only if you are speaking about V8, as the other VMs (Nashorn, Webkit, Gecko) do use bytecodes, multiple levels actually. -- Paulo Well it does need to be converted to bytecode at some point but my point is that there can be changes in the code's typi

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread Etienne via Digitalmars-d
On 2014-05-16 9:12 AM, Chris wrote: I don't trust product / company centric software. It will lock you in or lock you out. Google doesn't have a reputation of creating company centric software. SPDY was adopted by other browsers as well. If steam picks up on Dart, it could very well be adopt

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread Chris via Digitalmars-d
On Friday, 16 May 2014 at 12:55:30 UTC, Wyatt wrote: On Thursday, 15 May 2014 at 20:34:31 UTC, Etienne wrote: My position has changed, and I now think D would be in a better position if it ran in the Dart VM. Even if I _were_ a Chrome user, I'd have precisely zero interest in a browser mono

Re: New opportunities for D => ASM.js

2014-05-16 Thread Chris via Digitalmars-d
On Friday, 16 May 2014 at 11:38:14 UTC, Paulo Pinto wrote: On Friday, 16 May 2014 at 10:36:16 UTC, Ola Fosheim Grøstad wrote: On Friday, 16 May 2014 at 06:21:40 UTC, Paulo Pinto wrote: The problem is that currently it is a document format, trying to be an application, with a clustf of Java

Re: D to ASM.js vs D to Dart (VM)

2014-05-16 Thread Wyatt via Digitalmars-d
On Thursday, 15 May 2014 at 20:34:31 UTC, Etienne wrote: My position has changed, and I now think D would be in a better position if it ran in the Dart VM. Even if I _were_ a Chrome user, I'd have precisely zero interest in a browser monoculture. To wit, [P]NaCl and Dart effectively don't

Re: Memory allocation purity

2014-05-16 Thread Timon Gehr via Digitalmars-d
On 05/16/2014 01:56 AM, Walter Bright wrote: On 5/15/2014 4:00 PM, H. S. Teoh via Digitalmars-d wrote: What if the language allowed the user to supply a proof of purity, which can be mechanically checked? I think those sorts of things are PhD research topics. Well, feasibility has long ago b

Re: Memory allocation purity

2014-05-16 Thread Timon Gehr via Digitalmars-d
On 05/16/2014 01:00 AM, H. S. Teoh via Digitalmars-d wrote: On Thu, May 15, 2014 at 03:22:25PM -0700, Walter Bright via Digitalmars-d wrote: On 5/15/2014 2:41 PM, Timon Gehr wrote: On 05/15/2014 11:33 PM, Walter Bright wrote: On 5/15/2014 9:07 AM, Timon Gehr wrote: Why? A memoizable function

Re: New opportunities for D => ASM.js

2014-05-16 Thread Paulo Pinto via Digitalmars-d
On Friday, 16 May 2014 at 10:36:16 UTC, Ola Fosheim Grøstad wrote: On Friday, 16 May 2014 at 06:21:40 UTC, Paulo Pinto wrote: The problem is that currently it is a document format, trying to be an application, with a clustf of JavaScript/CSS/HTML with more compatibility issues than when C w

Re: Optional monitors suggestion

2014-05-16 Thread bearophile via Digitalmars-d
Yuriy: http://dpaste.dzfl.pl/f44762a17fe4 As workaround for a D design bug I suggest to write code like this: foreach (immutable c; 0 .. 100_000) Instead of: foreach(c; 0..10) Because unfortunately by default that c index is not immutable, and this causes significant troubles if you m

Re: New opportunities for D => ASM.js

2014-05-16 Thread via Digitalmars-d
On Friday, 16 May 2014 at 06:21:40 UTC, Paulo Pinto wrote: The problem is that currently it is a document format, trying to be an application, with a clustf of JavaScript/CSS/HTML with more compatibility issues than when C was being standardized. I think it is pretty good if you remove IE

Re: radical ideas about GC and ARC : need to be time driven?

2014-05-16 Thread via Digitalmars-d
On Thursday, 15 May 2014 at 12:56:13 UTC, Ola Fosheim Grøstad wrote: On Thursday, 15 May 2014 at 12:44:56 UTC, Marc Schütz wrote: On Wednesday, 14 May 2014 at 20:02:08 UTC, Ola Fosheim Grøstad wrote: However, you could have rules for collection and FFI (calling C). Like only allowing collection

Re: Optional monitors suggestion

2014-05-16 Thread Yuriy via Digitalmars-d
On Wednesday, 14 May 2014 at 19:08:30 UTC, bearophile wrote: You are good. Before this is ready for Walter's judgement I think this needs some simple performance/memory benchmarks, to compare the situation before and after this change. I've made some minor optimizations, and rebased everything o

Re: Memory allocation purity

2014-05-16 Thread bearophile via Digitalmars-d
Walter Bright: Yes, the VRP has been a nice win for D. There are ways to improve it in very useful ways, that increase static safety and cut down the number of useless casts required. Some currently refused examples: --- int[100] array; void main() { foreach (immutable idx

Re: Memory allocation purity

2014-05-16 Thread Walter Bright via Digitalmars-d
On 5/16/2014 1:54 AM, Araq wrote: Yes, the VRP has been a nice win for D. No other language does it. I don't know why you keep saying things like that, you don't know all the languages out there. Nimrod does it too fwiw... I having trouble finding it in the spec: http://nimrod-lang.org/

Re: Memory allocation purity

2014-05-16 Thread Araq via Digitalmars-d
Yes, the VRP has been a nice win for D. No other language does it. I don't know why you keep saying things like that, you don't know all the languages out there. Nimrod does it too fwiw...

Re: initialization immutable array

2014-05-16 Thread bearophile via Digitalmars-d
monarch_dodra: UFCS iota :puke: I think UFCS iota is acceptable when it has only one argument: myArray.length.iota... Bye, bearophile

Re: initialization immutable array

2014-05-16 Thread monarch_dodra via Digitalmars-d
On Friday, 16 May 2014 at 06:37:30 UTC, Jacob Carlborg wrote: import std.algorithm; import std.range; immutable(int[]) _items = 1.iota(4).array; UFCS iota :puke:

Re: Memory allocation purity

2014-05-16 Thread via Digitalmars-d
On Thursday, 15 May 2014 at 21:48:16 UTC, Timon Gehr wrote: The term "pure function" is only needed in a non-functional language. Applicative/functional languages only have mathematical functions, no need for the term "pure" there. In discussions about e.g. Haskell, it is often used to denote

Re: Memory allocation purity

2014-05-16 Thread Peter Alexander via Digitalmars-d
On Friday, 16 May 2014 at 00:27:34 UTC, Andrei Alexandrescu wrote: On 5/15/14, 2:52 PM, Timon Gehr wrote: On 05/15/2014 08:03 PM, Andrei Alexandrescu wrote: Purity of allocation is frequently assumed by functional languages Examples? cons 1 2 is equal to cons 1 2 ... I don't see anythin