Re: Announcing .NET Native Preview

2014-04-03 Thread Paulo Pinto
On Thursday, 3 April 2014 at 22:49:07 UTC, NA wrote: Interesting development. http://blogs.msdn.com/b/dotnet/archive/2014/04/02/announcing-net-native-preview.aspx Already being discussed here http://forum.dlang.org/post/lhhrku$211h$1...@digitalmars.com

Re: Reviving YAGE

2014-04-03 Thread Daniel Murphy
"Ryan Voots" wrote in message news:asffkvstgjtktahlp...@forum.dlang.org... It'd be really nice if someone knew how to get DMD to spew out EVERY error it finds instead of stopping after the first 100 or so so that I could go fix things in larger chunks. In mars.c, find the comment //moderate

Re: Specifying C++ symbols in C++ namespaces

2014-04-03 Thread Daniel Murphy
"Andrei Alexandrescu" wrote in message news:lhkebg$1i1p$1...@digitalmars.com... extern (C++) template nspace() { int foo(); } This is really ugly and complicated. I don't quite see how one is ugly and complicated and the other is... pretty and simple? Anyhow de gustib

Re: Poll - How long have you been in D?

2014-04-03 Thread H. S. Teoh
I couldn't remember when I started using D, so I had to go dig in my personal diary entries until I found it... In late 2011, I had already heard of D during my search for something better than C++, but I didn't really start seriously using D until by chance I came across Andrei's TDPL at a local

Re: Poll - How long have you been in D?

2014-04-03 Thread Adam D. Ruppe
I'm almost at the point where I've been a D fanatic for half my programmer years... the time sure flies. I think I surpassed writing more D code than all other languages combined last year, taking the prize away from C.

Poll - How long have you been in D?

2014-04-03 Thread dnewbie
Please vote now! http://www.easypolls.net/poll.html?p=533e10e4e4b0edddf89898c5 See also results from previous years: - http://d.darktech.org/2012.png - http://d.darktech.org/2013.png

Re: sfloat24 Floating Point DataType - Request for Comments

2014-04-03 Thread Steven Schveighoffer
On Thu, 03 Apr 2014 16:13:34 -0400, Bill Buckels wrote: The sfloat24 data type is half way between a float and a double in storage size. It offers high precison and speed, but is currently not available as a built-in data type in any compiler that I am aware of. Adding an aditional built-i

Re: sfloat24 Floating Point DataType - Request for Comments

2014-04-03 Thread Bill Buckels
On Thursday, 3 April 2014 at 21:06:52 UTC, Andrej Mitrovic wrote: On 4/3/14, Bill Buckels wrote: D Compiler for .NET -- Compiles the code to Common Intermediate Language (CIL) bytecode rather than to machine code. The CIL can then be run via a Common Language Infrastructure (CLR) virtual mach

Re: Specifying C++ symbols in C++ namespaces

2014-04-03 Thread deadalnix
On Wednesday, 2 April 2014 at 22:06:53 UTC, Walter Bright wrote: Here's Andrei's proposal: extern (C++) template nspace() { int foo(); } It would be accessed in D by: nspace!().foo(); A possible enhancement would be to allow (for all templates with no parameters): ns

Re: Reviving YAGE

2014-04-03 Thread Ryan Voots
On Monday, 31 March 2014 at 20:22:57 UTC, Andrej Mitrovic wrote: On 1/29/14, Ryan Voots wrote: I've started a fork of YAGE in an attempt to revive it. So far I'm still working on porting it to build with dub and D2, but it's coming along faster than I had expected. I figured I should let pe

Re: sfloat24 Floating Point DataType - Request for Comments

2014-04-03 Thread Bill Buckels
On Thursday, 3 April 2014 at 20:33:51 UTC, anonymous wrote: On Thursday, 3 April 2014 at 20:13:35 UTC, Bill Buckels wrote: The sfloat24 data type is half way between a float and a double in storage size. Wait. 24 bits would be halfway between half (16 bits) and single precision (32 b its). C

Announcing .NET Native Preview

2014-04-03 Thread NA
Interesting development. http://blogs.msdn.com/b/dotnet/archive/2014/04/02/announcing-net-native-preview.aspx

Re: Specifying C++ symbols in C++ namespaces

2014-04-03 Thread H. S. Teoh
On Thu, Apr 03, 2014 at 12:43:59PM -0700, Walter Bright wrote: > On 4/3/2014 4:06 AM, Daniel Kozák wrote: > >I think we should distinguish modules lookup from namespaces lookup. > >Something like this: > > > >A.B.foo() // call foo function from module/struct/class A and B > >#A.#B.foo // call foo f

Re: sfloat24 Floating Point DataType - Request for Comments

2014-04-03 Thread Andrej Mitrovic
On 4/3/14, Bill Buckels wrote: > D Compiler for .NET -- Compiles the code to Common Intermediate > Language (CIL) bytecode rather than to machine code. The CIL can > then be run via a Common Language Infrastructure (CLR) virtual > machine This seems out of place? What about D for .NET?

Re: Table lookups - this is pretty definitive

2014-04-03 Thread monarch_dodra
On Thursday, 3 April 2014 at 19:39:57 UTC, Andrei Alexandrescu wrote: On 4/2/14, 11:19 PM, monarch_dodra wrote: If I were to request the actual "memchr"/"wmemchr"/"dmemchr" functions in some "core.???" module, is this something we'd want, and would somebody know how to provide an efficient imp

Re: Specifying C++ symbols in C++ namespaces

2014-04-03 Thread Théo.Bueno
On Thursday, 3 April 2014 at 11:19:53 UTC, Daniel Murphy wrote: "Walter Bright" wrote in message news:lhi1lt$269h$1...@digitalmars.com... Here's Andrei's proposal: extern (C++) template nspace() { int foo(); } This is really ugly and complicated. Why not just pragma(cpp_n

Re: sfloat24 Floating Point DataType - Request for Comments

2014-04-03 Thread anonymous
On Thursday, 3 April 2014 at 20:13:35 UTC, Bill Buckels wrote: The sfloat24 data type is half way between a float and a double in storage size. Wait. 24 bits would be halfway between half (16 bits) and single precision (32 b its).

Re: Table lookups - this is pretty definitive

2014-04-03 Thread Dmitry Olshansky
03-Apr-2014 01:51, Walter Bright пишет: On 4/2/2014 1:54 PM, Dmitry Olshansky wrote: If we can alter semantics of return foo(arg); to _always_ be a goto, guarantee a jump and reuse of the stack, then I'm all for it. I don't see why not. Note that we couldn't do this for extern(C) functions, o

Re: Specifying C++ symbols in C++ namespaces

2014-04-03 Thread Michel Fortin
On 2014-04-03 19:43:23 +, Walter Bright said: On 4/3/2014 3:36 AM, Michel Fortin wrote: I'd tend to simply implement extern(C++, namespace.here), which should work fine to wrap single-namespace cpp files, and wait to see what are the actual friction points before introducing more (people

sfloat24 Floating Point DataType - Request for Comments

2014-04-03 Thread Bill Buckels
The sfloat24 data type is half way between a float and a double in storage size. It offers high precison and speed, but is currently not available as a built-in data type in any compiler that I am aware of. Adding an aditional built-in datatype to a compiler would be alot of work, but for som

Re: Table lookups - this is pretty definitive

2014-04-03 Thread Dmitry Olshansky
03-Apr-2014 05:05, Walter Bright пишет: On 4/2/2014 3:06 PM, bearophile wrote: Walter Bright: I don't see why not. Note that we couldn't do this for extern(C) functions, or variadics, or caller functions with parameters that need destruction, or parameters that may refer to any locals. That la

Re: Specifying C++ symbols in C++ namespaces

2014-04-03 Thread Andrei Alexandrescu
On 4/3/14, 4:19 AM, Daniel Murphy wrote: "Walter Bright" wrote in message news:lhi1lt$269h$1...@digitalmars.com... Here's Andrei's proposal: extern (C++) template nspace() { int foo(); } This is really ugly and complicated. Why not just pragma(cpp_namespace, "outer") {

Re: Specifying C++ symbols in C++ namespaces

2014-04-03 Thread Daniel Kozak
On Thursday, 3 April 2014 at 19:44:02 UTC, Walter Bright wrote: On 4/3/2014 4:06 AM, Daniel Kozák wrote: I think we should distinguish modules lookup from namespaces lookup. Something like this: A.B.foo() // call foo function from module/struct/class A and B #A.#B.foo // call foo function from

Re: Table lookups - this is pretty definitive

2014-04-03 Thread Dmitry Olshansky
03-Apr-2014 10:19, monarch_dodra пишет: If I were to request the actual "memchr"/"wmemchr"/"dmemchr" functions in some "core.???" module, is this something we'd want, and would somebody know how to provide an efficient implementation? Something I wanted in D since about 2011. Should have put a

Re: Specifying C++ symbols in C++ namespaces

2014-04-03 Thread Walter Bright
On 4/3/2014 3:36 AM, Michel Fortin wrote: I'd tend to simply implement extern(C++, namespace.here), which should work fine to wrap single-namespace cpp files, and wait to see what are the actual friction points before introducing more (people can experiment with structs or other modules meanwhile

Re: Specifying C++ symbols in C++ namespaces

2014-04-03 Thread Walter Bright
On 4/3/2014 4:06 AM, Daniel Kozák wrote: I think we should distinguish modules lookup from namespaces lookup. Something like this: A.B.foo() // call foo function from module/struct/class A and B #A.#B.foo // call foo function from namespaces A and B or A::B.foo // call foo function from namespac

Re: Table lookups - this is pretty definitive

2014-04-03 Thread Andrei Alexandrescu
On 4/2/14, 11:19 PM, monarch_dodra wrote: If I were to request the actual "memchr"/"wmemchr"/"dmemchr" functions in some "core.???" module, is this something we'd want, and would somebody know how to provide an efficient implementation? Yes. Probably checking stuff with SIMD and a few other app

Re: (DO NOT POST TO HACKERNEWS/REDDIT/ETC.) RFC for a Community Newsletter for D: What's New in D Draft #1

2014-04-03 Thread Wyatt
On Thursday, 3 April 2014 at 16:07:06 UTC, Meta wrote: The links, especially the Github ones, tend to be quite long, and I didn't want to take up too much space with them, especially with the "one link per line" format. To clarify, I'm not against descriptive text serving as a link; my conc

Re: (DO NOT POST TO HACKERNEWS/REDDIT/ETC.) RFC for a Community Newsletter for D: What's New in D Draft #1

2014-04-03 Thread Meta
On Thursday, 3 April 2014 at 16:34:28 UTC, Vladimir Panteleev wrote: On Tuesday, 1 April 2014 at 23:25:07 UTC, Meta wrote: You can view the rought draft here. https://docs.google.com/document/d/1Elwm-k6Gs9f7Y-FQNmRVt1uycPEtLkHgpR4v2aQjGwc/edit?usp=sharing Could you please use canonical links

Re: (DO NOT POST TO HACKERNEWS/REDDIT/ETC.) RFC for a Community Newsletter for D: What's New in D Draft #1

2014-04-03 Thread Vladimir Panteleev
On Tuesday, 1 April 2014 at 23:25:07 UTC, Meta wrote: You can view the rought draft here. https://docs.google.com/document/d/1Elwm-k6Gs9f7Y-FQNmRVt1uycPEtLkHgpR4v2aQjGwc/edit?usp=sharing Could you please use canonical links to forum posts? http://forum.dlang.org/help#canonical If linking to

Re: (DO NOT POST TO HACKERNEWS/REDDIT/ETC.) RFC for a Community Newsletter for D: What's New in D Draft #1

2014-04-03 Thread Meta
On Wednesday, 2 April 2014 at 20:53:53 UTC, Joseph Rushton Wakeling wrote: Honestly think that you should go with the solution that will make it easiest to write and share the results. The point of a newsletter like this is to communicate! You could do much worse than a Wordpress blog -- simp

Re: (DO NOT POST TO HACKERNEWS/REDDIT/ETC.) RFC for a Community Newsletter for D: What's New in D Draft #1

2014-04-03 Thread Meta
On Wednesday, 2 April 2014 at 14:31:49 UTC, Wyatt wrote: This is a good base. In general, I would suggest not shying away from subheadings. It gives you more opportunities to catch the eye and tends to allow readers to see the parts that interest them more easily. Conversely, making phrases

Re: (DO NOT POST TO HACKERNEWS/REDDIT/ETC.) RFC for a Community Newsletter for D: What's New in D Draft #1

2014-04-03 Thread Meta
On Wednesday, 2 April 2014 at 11:34:34 UTC, Dicebot wrote: Awesome stuff there! I do want to propose one fundamental change though - change grouping / ordering to be based on potential importance to the casual end user and not by information origin. For example, I am pretty sure that merged -

Re: Specifying C++ symbols in C++ namespaces

2014-04-03 Thread Robert Clipsham
On Thursday, 3 April 2014 at 03:48:08 UTC, Walter Bright wrote: Alternatively you can use another module for the other namespace. Forcing C++ code that exists in a single file to be split up among multiple D files is inflicting unnecessary punishment on the poor guy trying to justify migratin

Re: Table lookups - this is pretty definitive

2014-04-03 Thread Artur Skawina
On 04/03/14 04:40, Walter Bright wrote: > On 4/2/2014 6:21 PM, bearophile wrote: >> Then this feature needs a specific and explicit syntax, or it has _no_ point >> at >> all. > > That's like saying inlining has no point because it doesn't have a particular > syntax. Weak inlining *hints* have n

Re: D binding to JNI

2014-04-03 Thread NVolcz
On Wednesday, 2 April 2014 at 16:53:28 UTC, monnoroch wrote: I created a D binding to JNI and some convenient wrappers around it. Here it is: https://github.com/Monnoroch/DJni Note, that this is a port from similar C++ lib, so it can be not the best D code, but it's a start. I would love if s

Re: Another interesting hack: expand a static array into parameter arguments

2014-04-03 Thread Artur Skawina
On 04/03/14 15:38, Andrej Mitrovic wrote: > On 4/3/14, Artur Skawina wrote: >> Actually, they are *much easier* to debug than the recursive templates >> -- because you can always look at the generated code, something that >> is impossible when using the templates. > > Personally I think we need a

Re: Another interesting hack: expand a static array into parameter arguments

2014-04-03 Thread Dicebot
On Thursday, 3 April 2014 at 13:38:48 UTC, Andrej Mitrovic wrote: static if (is(T == int)) FilterInts ~= T; // populate a type tuple It would have been a very complex and non-precedent feature, much more so than a simple static foreach. I personally did not have any prob

Re: Specifying C++ symbols in C++ namespaces

2014-04-03 Thread Ola Fosheim Grøstad
I am not sure what is the best option, but it should be readable and obvious. So I might prefer to just have "::" if possible. Somewhat annoying and verbose, so I am not sure about this, but the advantage is that it is easy to see what is C++ and what is D function calls.

Re: Table lookups - this is pretty definitive

2014-04-03 Thread bearophile
Walter Bright: That's like saying inlining has no point because it doesn't have a particular syntax. Hopefully Dmitry Olshansky can explain why you are probably wrong regarding the proposed feature. Bye, bearophile

Re: Another interesting hack: expand a static array into parameter arguments

2014-04-03 Thread Andrej Mitrovic
On 4/3/14, Artur Skawina wrote: > Actually, they are *much easier* to debug than the recursive templates > -- because you can always look at the generated code, something that > is impossible when using the templates. Personally I think we need a third mechanism. I would totally love to be able t

Re: Specifying C++ symbols in C++ namespaces

2014-04-03 Thread Jacob Carlborg
On 03/04/14 00:07, Walter Bright wrote: Here's Andrei's proposal: extern (C++) template nspace() { int foo(); } It would be accessed in D by: nspace!().foo(); A possible enhancement would be to allow (for all templates with no parameters): nspace.foo(); Note that

Re: (DO NOT POST TO HACKERNEWS/REDDIT/ETC.) RFC for a Community Newsletter for D: What's New in D Draft #1

2014-04-03 Thread Wyatt
On Wednesday, 2 April 2014 at 20:53:53 UTC, Joseph Rushton Wakeling wrote: You could do much worse than a Wordpress blog -- simple, has built-in comments and lots of plugins, talks very easily to lots of the rest of the internet ... ...and it has all the security of a plastic sieve filled wi

Re: Another interesting hack: expand a static array into parameter arguments

2014-04-03 Thread Artur Skawina
On 04/03/14 10:56, Andrej Mitrovic wrote: > On 4/2/14, Artur Skawina wrote: >>template expand(alias A, alias M=Delay) { >> mixin(q{alias expand = TypeTuple!(} >> ~ iota(A.length).map!q{",M!(A,"[!a..$]~text(a)~")"}().join() >> ~ q{);}); >>} > > You can alway

Re: Community input for a new C binding generator project

2014-04-03 Thread Jacob Carlborg
On 03/04/14 01:16, Rikki Cattermole wrote: Interestingly I was having a play recently with a CTFE'd macro preprocessor in the hope that I could push it through a c lexer and create via template mixins the entire bindings to files. Few limitations like string imports not recursive on Windows (one

Re: Community input for a new C binding generator project

2014-04-03 Thread Jacob Carlborg
On 02/04/14 23:00, James Buren wrote: On Wednesday, 2 April 2014 at 15:49:18 UTC, Jacob Carlborg wrote: Use a compiler that can already parse C, i.e. Clang. Use a compiler that can handle those extensions, i.e. Clang. I'm already wanting to reuse an existing parser or compiler frontend. Howe

Re: Another interesting hack: expand a static array into parameter arguments

2014-04-03 Thread monarch_dodra
On Thursday, 3 April 2014 at 08:59:44 UTC, Andrej Mitrovic wrote: On 4/2/14, Artur Skawina wrote: template expand(alias A, alias M=Delay) { mixin(q{alias expand = TypeTuple!(} ~ iota(A.length).map!q{",M!(A,"[!a..$]~text(a)~")"}().join() ~ q{);}); } You

Re: Another interesting hack: expand a static array into parameter arguments

2014-04-03 Thread bearophile
Andrej Mitrovic: But what is the performance cost? In D the minimal one. In Python is not that important. And in Haskell it's efficient. Also, what this shows is how you can take advantage of *existing* features to implement something interesting. It shows power, rather than the ability

Re: Specifying C++ symbols in C++ namespaces

2014-04-03 Thread Daniel Murphy
"Walter Bright" wrote in message news:lhi1lt$269h$1...@digitalmars.com... Here's Andrei's proposal: extern (C++) template nspace() { int foo(); } This is really ugly and complicated. Why not just pragma(cpp_namespace, "outer") { pragma(cpp_namespace, "inner") {

Re: C++ interface.

2014-04-03 Thread Daniel Murphy
"DanielKozák" wrote in message news:mailman.36.1396437697.19942.digitalmar...@puremagic.com... > I thought it was a stated goal of D to have C++ interoperability > for the same compiler suite? > E.g. dmd/dmc++, g++/gdc, ldc/clang… This would be awesome. But it would be much better if DMD has

Re: Specifying C++ symbols in C++ namespaces

2014-04-03 Thread Daniel Kozák
V Thu, 3 Apr 2014 06:36:54 -0400 Michel Fortin napsáno: > On 2014-04-03 03:48:18 +, Walter Bright > said: > > > On 4/2/2014 7:14 PM, Michel Fortin wrote: > >> That's a contrived example. > > > > Not at all. The whole point of using namespaces in C++ is to > > introduce a scope. And the who

Re: Specifying C++ symbols in C++ namespaces

2014-04-03 Thread Michel Fortin
On 2014-04-03 03:48:18 +, Walter Bright said: On 4/2/2014 7:14 PM, Michel Fortin wrote: That's a contrived example. Not at all. The whole point of using namespaces in C++ is to introduce a scope. And the whole point of scopes is to have the same name in different scopes represent diffe

Re: Specifying C++ symbols in C++ namespaces

2014-04-03 Thread Andrej Mitrovic
On 4/3/14, Walter Bright wrote: > A possible enhancement would be to allow (for all templates with no > parameters): > > nspace.foo(); My only problem with this is how it will affect existing code. E.g.: template take(alias templ) { } template take(T) { } template Empty() { struct Empty {

Re: Another interesting hack: expand a static array into parameter arguments

2014-04-03 Thread Andrej Mitrovic
On 4/2/14, Simen Kjærås wrote: > In fact, it does not even need to have arg and idx explicitly passed, > and the alias for Array is redundant. Actually, I've just realized the inner Delay() becomes a nested function with a hidden context pointer. If you mark the function as 'static' the code will

Re: Another interesting hack: expand a static array into parameter arguments

2014-04-03 Thread Andrej Mitrovic
On 4/2/14, Simen Kjærås wrote: > In fact, it does not even need to have arg and idx explicitly passed, > and the alias for Array is redundant. Nice! I recall trying to use .length before but I've had some CT errors. It was probs my fault.

Re: Another interesting hack: expand a static array into parameter arguments

2014-04-03 Thread Andrej Mitrovic
On 4/2/14, bearophile wrote: > In Python2 and Haskell it's a built-in feature. But what is the performance cost? In D it is a compile-time feature, everything can be inlined. Also, what this shows is how you can take advantage of *existing* features to implement something interesting. It shows p

Re: Another interesting hack: expand a static array into parameter arguments

2014-04-03 Thread Andrej Mitrovic
On 4/2/14, Artur Skawina wrote: >template expand(alias A, alias M=Delay) { > mixin(q{alias expand = TypeTuple!(} > ~ iota(A.length).map!q{",M!(A,"[!a..$]~text(a)~")"}().join() > ~ q{);}); >} You can always use string mixins for these hacks. But they are ter

Re: MSBUILD 2014, C# gets an ahead of time compiler to native code.

2014-04-03 Thread Paulo Pinto
On Wednesday, 2 April 2014 at 21:43:05 UTC, Adam Wilson wrote: On Wed, 02 Apr 2014 13:36:56 -0700, Orvid King wrote: On Wed, 02 Apr 2014 15:24:00 -0500, Paulo Pinto wrote: So it finally happened, C# gets an AOT compiler in addition to NGEN/JIT as part of standard Visual Studio tools. ht

CTFE any diagrams?

2014-04-03 Thread Rikki Cattermole
Does anybody have any form of diagrams for CTFE? And its place in the build process? I'm in need of it for a report. So any help would be greatly appreciated. I would rather somebody who understood how its implemented to help with this than me. After all I'll muck it up ;)

Re: MSBUILD 2014, C# gets an ahead of time compiler to native code.

2014-04-03 Thread Paulo Pinto
On Thursday, 3 April 2014 at 07:40:11 UTC, Bienlein wrote: This is not really spectacular. The intermediate byte code generated by the C# compiler also in the past was transfered to machine code. But this was happening at start-up time and this way slowing down application start-up. The change

Re: MSBUILD 2014, C# gets an ahead of time compiler to native code.

2014-04-03 Thread Bienlein
This is not really spectacular. The intermediate byte code generated by the C# compiler also in the past was transfered to machine code. But this was happening at start-up time and this way slowing down application start-up. The change MS now made is only about reducing start-up times. It will

Re: 2.065 compiler problem

2014-04-03 Thread monarch_dodra
On Thursday, 3 April 2014 at 07:05:13 UTC, Ondrej Pokorny wrote: Same under windows. Is this compiler/phobos bug? I can tell *why* it's breaking right now, but have been unable to understand what caused said breakage, or how it worked at all to begin with. Will reduce and file (and potentia

Re: MSBUILD 2014, C# gets an ahead of time compiler to native code.

2014-04-03 Thread Kagamin
Though native doesn't mean as fast as other native languages. The speed depends on used features. Well, number crunching can be definitely sped up.

Re: 2.065 compiler problem

2014-04-03 Thread Ondrej Pokorny
Same under windows. Is this compiler/phobos bug?

Re: Specifying C++ symbols in C++ namespaces

2014-04-03 Thread Kagamin
On Wednesday, 2 April 2014 at 22:06:53 UTC, Walter Bright wrote: A possible enhancement would be to allow (for all templates with no parameters): nspace.foo(); std.string - does it refer to phobos module or C++ string?