Re: Ehem, ARM

2013-12-28 Thread Joakim
I just got a basic D program running with a patched druntime on Android/x86. :) I was also able to compile and run sieve.d from the D samples, after replacing std.stdio.writefln with core.stdc.stdio.printf and moving the flags declaration inside main. It would segfault at "flags[]=true" if I d

Re: Microsoft working on new systems language

2013-12-28 Thread Ola Fosheim Grøstad
Here is more on Concurrency Safe C#: http://channel9.msdn.com/Forums/Coffeehouse/Concurrency-Safe-C-from-TSIMidori-team-Joe-Duffy-etc

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Dicebot
On Saturday, 28 December 2013 at 20:09:36 UTC, Jacob Carlborg wrote: On 2013-12-28 16:40, Dicebot wrote: Usage of "@" for new keywords is just a matter of avoiding name clashes with existing user code. That worked until we got UDA's with the same syntax. I have deja vu - remember talking w

Re: Microsoft working on new systems language

2013-12-28 Thread Ola Fosheim Grøstad
On Saturday, 28 December 2013 at 16:09:45 UTC, Klaim - Joël Lamotte wrote: This is interesting but: - they don't talk about generic code? - it's not clear if their language solves the build time issue C++ have (which D solves) - if it's not a totally open language specification, then it's a

Re: Tools should use the review process

2013-12-28 Thread Andrei Alexandrescu
On 12/28/13 12:03 PM, Jacob Carlborg wrote: One think I noticed in the tools repository is that some tools are more focused towards the core team, like changed.d and some tools are for all developers like RDMD. The most important tools are of course those aimed to be used by all developers. Perha

Re: Tools should use the review process

2013-12-28 Thread H. S. Teoh
On Sat, Dec 28, 2013 at 09:03:04PM +0100, Jacob Carlborg wrote: > On 2013-12-28 18:28, Andrei Alexandrescu wrote: [...] > One think I noticed in the tools repository is that some tools are > more focused towards the core team, like changed.d and some tools > are for all developers like RDMD. The mo

Re: Reserving/Preallocating associative array?

2013-12-28 Thread Benjamin Thaut
Because I was always curious to do some hashmap profiling with real data, I did some more. Here are the results: My implementation. Power of two size (25% free): building hashmap: 8 seconds 28880605 ticks looking entries up: 0 seconds 31685 ticks My implementation. Prime number size (25% free):

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Ola Fosheim Grøstad
On Saturday, 28 December 2013 at 20:07:46 UTC, Jacob Carlborg wrote: I don't think Objective-C suffers from this. In Objective-C @ is used for every new keyword and other stuff that's not available in standard C. Yes, well what I meant was that they used @ to avoid keyword clashes with the ex

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Jacob Carlborg
On 2013-12-28 16:40, Dicebot wrote: Usage of "@" for new keywords is just a matter of avoiding name clashes with existing user code. That worked until we got UDA's with the same syntax. -- /Jacob Carlborg

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Jacob Carlborg
On 2013-12-28 16:36, "Ola Fosheim Grøstad" " wrote: Understand. Objective-C and Python also suffers from the arbitrary "@" syntax. I don't think Objective-C suffers from this. In Objective-C @ is used for every new keyword and other stuff that's not available in standard C. Sure, you can do

Re: Microsoft working on new systems language

2013-12-28 Thread Adam Wilson
On Sat, 28 Dec 2013 05:49:33 -0800, Andrej Mitrovic wrote: On 12/28/13, Andrej Mitrovic wrote: Found cached version from HN: http://webcache.googleusercontent.com/search?q=cache%3Ajoeduffyblog.com%2F2013%2F12%2F27%2Fcsharp-for-systems-programming%2F&oq=cache%3Ajoeduffyblog.com%2F2013%2F12%2

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Ola Fosheim Grøstad
On Saturday, 28 December 2013 at 18:55:31 UTC, Chris Cain wrote: Same usage, `someGenericAlgorithm(assumeWalkLengthOK(myContainer));` (I didn't actually run this through dmd, but it should work in theory) Not too bad. Being able to create adaptors like this is a nice workaround for overrulin

Re: std.range.iota enhancement: supporting more types (AKA issue 10762)

2013-12-28 Thread Jakob Ovrum
On Saturday, 28 December 2013 at 19:22:25 UTC, Francesco Cattoglio wrote: On Saturday, 28 December 2013 at 16:13:45 UTC, Jakob Ovrum wrote: Alright, so require division for bidirectionality when given a custom step. There's no reason division should be required for bidirectionality in the most

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Jakob Ovrum
On Saturday, 28 December 2013 at 19:24:19 UTC, Ola Fosheim Grøstad wrote: On Saturday, 28 December 2013 at 19:20:15 UTC, Jakob Ovrum wrote: For array literals it's not such a bad idea, and was recently topical in the assessment of `std.algorithm.among`[1]. However, It is not a bad idea for sor

Re: Tools should use the review process

2013-12-28 Thread Jacob Carlborg
On 2013-12-28 18:28, Andrei Alexandrescu wrote: That would, of course, be great. I can't stop mentioning again that we are having a severe deflation of reviewers. We are currently treating our contributors the worst way possible - with indifference. I know and that sucks. But is that a reason

Re: Microsoft working on new systems language

2013-12-28 Thread Jacob Carlborg
On 2013-12-28 18:56, Steve Teale wrote: D#? Heaven help us! Has already been tried. That is, port D to .Net. -- /Jacob Carlborg

Re: std.range.iota enhancement: supporting more types (AKA issue 10762)

2013-12-28 Thread Francesco Cattoglio
On Saturday, 28 December 2013 at 16:13:45 UTC, Jakob Ovrum wrote: Alright, so require division for bidirectionality when given a custom step. There's no reason division should be required for bidirectionality in the most common case of iota(start, end). Ok, now I finally get your point. It goe

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Ola Fosheim Grøstad
On Saturday, 28 December 2013 at 19:20:15 UTC, Jakob Ovrum wrote: For array literals it's not such a bad idea, and was recently topical in the assessment of `std.algorithm.among`[1]. However, It is not a bad idea for sorted arrays either, when you think about it: O(log n)

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Jakob Ovrum
On Saturday, 28 December 2013 at 19:11:14 UTC, Ola Fosheim Grøstad wrote: But the disadvantages are serious, most notably generic code that uses `in` and assumes it has some complexity guarantee would experience a blow-up in complexity when an array is passed. Ok, I agree with this for simple

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Ola Fosheim Grøstad
On Saturday, 28 December 2013 at 18:18:57 UTC, Jakob Ovrum wrote: algorithmic complexity requirements. If it makes the concept more palatable, you could instead imagine it as the anti-thesis of Java's collection interfaces. Anything that isn't Java sounds palatable… Except for Objective-C, wh

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Chris Cain
On Saturday, 28 December 2013 at 18:47:52 UTC, Chris Cain wrote: ...snip... There you go. Use it like: ``` someGenericAlgorithm(assumeWalkLengthOK(myContainer)); ``` Squelches the error message and documents the intent. Could be better, but it saves us writing a language feature for it. I k

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Chris Cain
On Saturday, 28 December 2013 at 18:38:55 UTC, Ola Fosheim Grøstad wrote: It is different in the sense that if your lengths are short you either have to write your own container or your own algorithm because the algorithm designer assumed that walkLength would be too slow in all cases? In the c

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Ola Fosheim Grøstad
On Saturday, 28 December 2013 at 17:53:31 UTC, Chris Cain wrote: How is that significantly different than the current situation? It is different in the sense that if your lengths are short you either have to write your own container or your own algorithm because the algorithm designer assumed

Re: GtkD List?

2013-12-28 Thread Russel Winder
On Sat, 2013-12-28 at 18:06 +, Steve Teale wrote: > > Basically it is a font browsing system, hence the title > > GFontBrowser. > > > Will it let you zap fonts you have no use for without a long > command line performance? No, it is only about reviewing the fonts you have. Mode 1 is to loo

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Jakob Ovrum
On Saturday, 28 December 2013 at 17:23:38 UTC, Ola Fosheim Grøstad wrote: STL is not great, has never been great, and probably will never be great. Cool idea, bad execution for the language it was implemented in. So they had to change C++ to support i better! :-P How much time does a committe

Re: GtkD List?

2013-12-28 Thread Steve Teale
Basically it is a font browsing system, hence the title GFontBrowser. Will it let you zap fonts you have no use for without a long command line performance?

Re: Microsoft working on new systems language

2013-12-28 Thread Steve Teale
On Saturday, 28 December 2013 at 11:13:55 UTC, Barry L. wrote: Hello everyone, first post... D#? Heaven help us!

Re: Tools should use the review process

2013-12-28 Thread Martin Nowak
On 12/28/2013 06:28 PM, Andrei Alexandrescu wrote: I can't stop mentioning again that we are having a severe deflation of reviewers. We are currently treating our contributors the worst way possible - with indifference. Yep

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Chris Cain
On Saturday, 28 December 2013 at 17:23:38 UTC, Ola Fosheim Grøstad wrote: What you want is a (mild) warning if you use a templated algorithm and that algorithm use a O(N) primitive where it is invisible to the library user. A warning you should be able to suppress (basically telling the compile

Re: readln() returns new line charater

2013-12-28 Thread Jakob Ovrum
On Saturday, 28 December 2013 at 17:23:30 UTC, Jeroen Bollen wrote: Usually if you're working with a console though the input stream won't exhaust and thus the blocking 'readln' would be a better option, no? The blocking behaviour of `stdin` by default is fine. The issue is that `readln` retu

Re: Tools should use the review process

2013-12-28 Thread Andrei Alexandrescu
On 12/28/13 6:16 AM, Jacob Carlborg wrote: Since we stared with a review process for adding new modules to Phobos around eight new tools have been added without any review process similar to the one used for Phobos modules. They were only reviewed in pull requests. Some of these are minor tools/

Re: readln() returns new line charater

2013-12-28 Thread Jeroen Bollen
On Saturday, 28 December 2013 at 17:15:17 UTC, Jakob Ovrum wrote: On Saturday, 28 December 2013 at 16:59:51 UTC, bearophile wrote: void main() { import std.stdio, std.string; immutable txt = readln.chomp; writeln(">", txt, "<"); } Bye, bearophile These examples are cute, but I think

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Ola Fosheim Grøstad
On Saturday, 28 December 2013 at 16:35:41 UTC, Jakob Ovrum wrote: I have *no* idea where you got this idea from. D and its standard library follows in the footsteps of STL when it comes to the algorithmic complexity of primitives STL is not great, has never been great, and probably will never

Re: readln() returns new line charater

2013-12-28 Thread Jakob Ovrum
On Saturday, 28 December 2013 at 16:59:51 UTC, bearophile wrote: void main() { import std.stdio, std.string; immutable txt = readln.chomp; writeln(">", txt, "<"); } Bye, bearophile These examples are cute, but I think in real programs it's usually important to handle `stdin` bein

Re: readln() returns new line charater

2013-12-28 Thread Vladimir Panteleev
On Saturday, 28 December 2013 at 17:07:58 UTC, Andrei Alexandrescu wrote: On 12/28/13 8:50 AM, Jeroen Bollen wrote: On Saturday, 28 December 2013 at 16:49:15 UTC, Jeroen Bollen wrote: Why is when you do readln() the newline character (\n) gets read too? Wouldn't it make more sense for that char

Re: readln() returns new line charater

2013-12-28 Thread Ali Çehreli
On 12/28/2013 08:50 AM, Jeroen Bollen wrote: > On Saturday, 28 December 2013 at 16:49:15 UTC, Jeroen Bollen wrote: >> Why is when you do readln() the newline character (\n) gets read too? Because it is possible to remove but hard or expensive or even impossible (was there a newline?) to add bac

Re: readln() returns new line charater

2013-12-28 Thread Vladimir Panteleev
On Saturday, 28 December 2013 at 17:07:23 UTC, Andrei Alexandrescu wrote: On 12/28/13 8:49 AM, Jeroen Bollen wrote: Why is when you do readln() the newline character (\n) gets read too? Wouldn't it make more sense for that character to be stripped off? So you know that if it returns an empty

Re: readln() returns new line charater

2013-12-28 Thread Jakob Ovrum
On Saturday, 28 December 2013 at 16:50:21 UTC, Jeroen Bollen wrote: On Saturday, 28 December 2013 at 16:49:15 UTC, Jeroen Bollen wrote: Why is when you do readln() the newline character (\n) gets read too? Wouldn't it make more sense for that character to be stripped off? I just want to add t

Re: readln() returns new line charater

2013-12-28 Thread Andrei Alexandrescu
On 12/28/13 8:50 AM, Jeroen Bollen wrote: On Saturday, 28 December 2013 at 16:49:15 UTC, Jeroen Bollen wrote: Why is when you do readln() the newline character (\n) gets read too? Wouldn't it make more sense for that character to be stripped off? I just want to add to this, that it makes it re

Re: readln() returns new line charater

2013-12-28 Thread Andrei Alexandrescu
On 12/28/13 8:49 AM, Jeroen Bollen wrote: Why is when you do readln() the newline character (\n) gets read too? Wouldn't it make more sense for that character to be stripped off? So you know that if it returns an empty string the file is done. Andrei

Re: readln() returns new line charater

2013-12-28 Thread bearophile
Jeroen Bollen: it makes it really annoying to work with the command line, as you kinda have to strip off the last character and thus cannot make the string immutable. void main() { import std.stdio, std.string; immutable txt = readln.chomp; writeln(">", txt, "<"); } Bye, bearop

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Ola Fosheim Grøstad
On Saturday, 28 December 2013 at 15:45:16 UTC, Dicebot wrote: It should be #keyword than, as existing #line is closest thing to what you describe Does it matter? I don't think #line is particularly close, it is just an annotation. // allocate simd-aligned and 0-padded string by sacrificing

Re: std.range.iota enhancement: supporting more types (AKA issue 10762)

2013-12-28 Thread Jakob Ovrum
On Saturday, 28 December 2013 at 16:30:27 UTC, Joseph Rushton Wakeling wrote: I can see the case for it, but to me it seems like a too restrictive requirement. Yes, I can totally see that. I'm not really invested either way, because while I see a need for bidirectionality with `iota(start, en

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Ola Fosheim Grøstad
On Saturday, 28 December 2013 at 15:40:41 UTC, Dicebot wrote: This is a solid approach and rationale behind trying to minimize warnings in D as much as possible (and potentially remove at all once standard lint-like tool will appear). Not sure what "This" refers to, but if you can change seman

Re: readln() returns new line charater

2013-12-28 Thread Jeroen Bollen
On Saturday, 28 December 2013 at 16:49:15 UTC, Jeroen Bollen wrote: Why is when you do readln() the newline character (\n) gets read too? Wouldn't it make more sense for that character to be stripped off? I just want to add to this, that it makes it really annoying to work with the command li

readln() returns new line charater

2013-12-28 Thread Jeroen Bollen
Why is when you do readln() the newline character (\n) gets read too? Wouldn't it make more sense for that character to be stripped off?

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Jakob Ovrum
On Saturday, 28 December 2013 at 13:03:30 UTC, Ola Fosheim Grøstad wrote: On Saturday, 28 December 2013 at 11:58:48 UTC, Jakob Ovrum wrote: This is a terrible example - in D it's generally accepted that such a `length` function should NOT be provided at all. Correction: in the D-community it i

Re: std.range.iota enhancement: supporting more types (AKA issue 10762)

2013-12-28 Thread Joseph Rushton Wakeling
On 28/12/13 17:10, Jakob Ovrum wrote: OK, so this has nothing to do with leap years, but that 5.days is an improper step. Oh, I see -- you're assuming that iota has to be defined with start, end and step such that end = start + (n * step) for some integer n >= 0. I can see the case for it,

Re: Microsoft working on new systems language

2013-12-28 Thread Chris Cain
On Saturday, 28 December 2013 at 16:10:43 UTC, Dicebot wrote: Pretty much definition of NiH syndrome :) Exactly. I'm always secretly hoping Microsoft's next programming project involves them using and contributing to LLVM. But then I remember it's Microsoft and they don't do anything that cou

Re: Microsoft working on new systems language

2013-12-28 Thread Dicebot
But hey, my team works at Microsoft, where there is ample C# talent and community just an arm’s length away. Pretty much definition of NiH syndrome :)

Re: std.range.iota enhancement: supporting more types (AKA issue 10762)

2013-12-28 Thread Jakob Ovrum
On Saturday, 28 December 2013 at 14:13:08 UTC, Francesco Cattoglio wrote: It's always the same "issue": you have to compute the last element inside iota, you should never rely on the user giving you ideal inputs. Alright, so require division for bidirectionality when given a custom step. Ther

Re: std.range.iota enhancement: supporting more types (AKA issue 10762)

2013-12-28 Thread Jakob Ovrum
On Saturday, 28 December 2013 at 14:09:17 UTC, Joseph Rushton Wakeling wrote: Try the attached code. The largest value of DateTime(2012, 1, 1) + dur!"days"(5 * n) that is less than DateTime(2013, 1, 1) is _not_ DateTime(2013, 1, 1) - dur!"days"(5). :-) OK, so this has nothing to do with leap

Re: Microsoft working on new systems language

2013-12-28 Thread Klaim - Joël Lamotte
This is interesting but: - they don't talk about generic code? - it's not clear if their language solves the build time issue C++ have (which D solves) - if it's not a totally open language specification, then it's a dead-end to me.

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Dicebot
On Saturday, 28 December 2013 at 15:36:56 UTC, Ola Fosheim Grøstad wrote: On Saturday, 28 December 2013 at 14:32:20 UTC, Jacob Carlborg wrote: Originally @ was added for some new keywords to get a new "namespace" for keywords. There was no risk of conflict with Understand. Objective-C and Pyth

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Dicebot
On Saturday, 28 December 2013 at 15:27:36 UTC, Ola Fosheim Grøstad wrote: Thanks for this perspective, this makes the distinction between integrity and functionality fuzzy. I am not sure if I like that or the effect it has on debugging/programming-in-large… I prefer languages that conceptually

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Ola Fosheim Grøstad
On Saturday, 28 December 2013 at 14:32:20 UTC, Jacob Carlborg wrote: Originally @ was added for some new keywords to get a new "namespace" for keywords. There was no risk of conflict with Understand. Objective-C and Python also suffers from the arbitrary "@" syntax. Basically what I would like

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Ola Fosheim Grøstad
On Saturday, 28 December 2013 at 13:47:48 UTC, John Colvin wrote: D has extensive compile-time introspection. If @disable was ignored it would change the result of some static if statements, including template constraints, changing the meaning of code. Even worse, this change could appear silen

Re: Microsoft working on new systems language

2013-12-28 Thread Big Tummy
On Saturday, 28 December 2013 at 13:49:44 UTC, Andrej Mitrovic wrote: On 12/28/13, Andrej Mitrovic wrote: Found cached version from HN: http://webcache.googleusercontent.com/search?q=cache%3Ajoeduffyblog.com%2F2013%2F12%2F27%2Fcsharp-for-systems-programming%2F&oq=cache%3Ajoeduffyblog.com%2F2013

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Jacob Carlborg
On 2013-12-28 12:38, "Ola Fosheim Grøstad" " wrote: I don't grasp the motivation for the naming of keywords in D. I think the syntax would be more clear if "@" was reserved for compiler hints. Originally @ was added for some new keywords to get a new "namespace" for keywords. There was no ri

Re: What is the rationale behind std.file.setAttributes ?

2013-12-28 Thread Jacob Carlborg
On 2013-12-28 03:46, Marco Leise wrote: Wait a second, what about *setting* attributes? Some difficult ones are: o toggling read-only (for whom? user, group, others?) o executable flag o hidden flag On Windows 'executable' is implicit and based on the extension. On Posix 'hidden' is implicit f

Tools should use the review process

2013-12-28 Thread Jacob Carlborg
Since we stared with a review process for adding new modules to Phobos around eight new tools have been added without any review process similar to the one used for Phobos modules. They were only reviewed in pull requests. Some of these are minor tools/scripts but there are larger tools as we

Re: std.range.iota enhancement: supporting more types (AKA issue 10762)

2013-12-28 Thread Francesco Cattoglio
On Saturday, 28 December 2013 at 13:58:40 UTC, Jakob Ovrum wrote: On Saturday, 28 December 2013 at 12:16:32 UTC, Joseph Rushton Wakeling wrote: Are you sure that's going to work if the iota covers a leap year? :-) How would it fail? std.datetime does a good job with leap years AFAIK. Yes it

Re: std.range.iota enhancement: supporting more types (AKA issue 10762)

2013-12-28 Thread Joseph Rushton Wakeling
On 28/12/13 14:16, Francesco Cattoglio wrote: And that's exactly the reason I choose 2012 as an example :D It's going to get fun if we have to start taking into account leap seconds too ;-) On a serious note -- I wouldn't worry about what kind of range type you generate with iota. It'll be

Re: std.range.iota enhancement: supporting more types (AKA issue 10762)

2013-12-28 Thread Joseph Rushton Wakeling
On 28/12/13 14:58, Jakob Ovrum wrote: How would it fail? std.datetime does a good job with leap years AFAIK. Try the attached code. The largest value of DateTime(2012, 1, 1) + dur!"days"(5 * n) that is less than DateTime(2013, 1, 1) is _not_ DateTime(2013, 1, 1) - dur!"days"(5). :-) import s

Re: std.range.iota enhancement: supporting more types (AKA issue 10762)

2013-12-28 Thread Jakob Ovrum
On Saturday, 28 December 2013 at 12:16:32 UTC, Joseph Rushton Wakeling wrote: Are you sure that's going to work if the iota covers a leap year? :-) How would it fail? std.datetime does a good job with leap years AFAIK.

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread John Colvin
On Saturday, 28 December 2013 at 13:03:30 UTC, Ola Fosheim Grøstad wrote: @disable and (@obsolete) etc can safely be ignored for a sound program, it is a hint for the compiler to check the integrity of the logic, but it does not affect the semantics of a sound program. The same goes for unittes

Re: Microsoft working on new systems language

2013-12-28 Thread Andrej Mitrovic
On 12/28/13, Andrej Mitrovic wrote: > Found cached version from HN: > http://webcache.googleusercontent.com/search?q=cache%3Ajoeduffyblog.com%2F2013%2F12%2F27%2Fcsharp-for-systems-programming%2F&oq=cache%3Ajoeduffyblog.com%2F2013%2F12%2F27%2Fcsharp-for-systems-programming%2F Well anyway there's n

Re: std.range.iota enhancement: supporting more types (AKA issue 10762)

2013-12-28 Thread Jakob Ovrum
On Tuesday, 24 December 2013 at 15:41:06 UTC, H. S. Teoh wrote: This code is wrong for iota(1.0, 9.5), because .back must be of the form start + n*step for some integer n, but in this case end is not an integral multiple of step away from start. (It's not only wrong for .back, it also won't ter

Re: std.range.iota enhancement: supporting more types (AKA issue 10762)

2013-12-28 Thread Francesco Cattoglio
On Saturday, 28 December 2013 at 12:16:32 UTC, Joseph Rushton Wakeling wrote: On 28/12/13 09:06, Jakob Ovrum wrote: [1] Which I'm not convinced of; e.g. `back` == `DateTime(2013, 1, 1) - dur!"days"(5)`. Are you sure that's going to work if the iota covers a leap year? :-) And that's exactl

Re: Microsoft working on new systems language

2013-12-28 Thread Andrej Mitrovic
On 12/28/13, Andrej Mitrovic wrote: > On 12/28/13, Barry L. wrote: >> Just saw this: >> http://joeduffyblog.com/2013/12/27/csharp-for-systems-programming/ > > Hmm it's already down (database error). Is there a cached version? Found cached version from HN: http://webcache.googleusercontent.com/se

Re: Microsoft working on new systems language

2013-12-28 Thread Andrej Mitrovic
On 12/28/13, Andrej Mitrovic wrote: > On 12/28/13, Barry L. wrote: >> Just saw this: >> http://joeduffyblog.com/2013/12/27/csharp-for-systems-programming/ > > Hmm it's already down (database error). Is there a cached version? > It seems this is relevant (from reddit): http://lambda-the-ultimate.

Re: Microsoft working on new systems language

2013-12-28 Thread Andrej Mitrovic
On 12/28/13, Barry L. wrote: > Just saw this: > http://joeduffyblog.com/2013/12/27/csharp-for-systems-programming/ Hmm it's already down (database error). Is there a cached version?

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Ola Fosheim Grøstad
On Saturday, 28 December 2013 at 11:58:48 UTC, Jakob Ovrum wrote: This is a terrible example - in D it's generally accepted that such a `length` function should NOT be provided at all. Correction: in the D-community it is generally accepted. But the reasoning behind this is not sound, it puts

Re: std.range.iota enhancement: supporting more types (AKA issue 10762)

2013-12-28 Thread Joseph Rushton Wakeling
On 28/12/13 09:06, Jakob Ovrum wrote: [1] Which I'm not convinced of; e.g. `back` == `DateTime(2013, 1, 1) - dur!"days"(5)`. Are you sure that's going to work if the iota covers a leap year? :-)

Re: GC noscan and primitve type arrays

2013-12-28 Thread Daniel Murphy
"Benjamin Thaut" wrote in message news:l9mdb4$1lmf$1...@digitalmars.com... > I'm curious, > does the GC allocate primitive type arrays like uint[] as noscan memory > block, or are those data blocks considered for scanning? And if so why? > I have a small program that works with lots of uint[] ar

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Jakob Ovrum
On Saturday, 28 December 2013 at 11:38:38 UTC, Ola Fosheim Grøstad wrote: I think it would be useful to have a dedicated syntax for symbols that a naive compiler can ignore, that is, for compiler hints. I'd consider "@disable" and "pragma" a compiler hint, but not "@property" @disable is defi

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread Ola Fosheim Grøstad
On Saturday, 28 December 2013 at 11:42:58 UTC, bearophile wrote: A @warningonuse("some text") used for editors is just a convention, it needs no language changes. All compiler-hints are conventions: @assert(), @suppresswarnings{} etc. Compilers should be able to ignore all compiler hints they

GC noscan and primitve type arrays

2013-12-28 Thread Benjamin Thaut
I'm curious, does the GC allocate primitive type arrays like uint[] as noscan memory block, or are those data blocks considered for scanning? And if so why? I have a small program that works with lots of uint[] arrays and goes out of memory. The data set it works on is not even close to the maxi

Re: Compiler hints, inlining and syntax consistency

2013-12-28 Thread bearophile
Ola Fosheim Grøstad: @warningonuse "some text" length() @warningonuse "in this class the length-function is O(n), consider xyz instead" The "@warningonuse" keyword enables text editors to emit symbols on the side of the text with helpful warnings about possible bottlenecks when using libra

Compiler hints, inlining and syntax consistency

2013-12-28 Thread Ola Fosheim Grøstad
I think it would be useful to have a dedicated syntax for symbols that a naive compiler can ignore, that is, for compiler hints. I'd consider "@disable" and "pragma" a compiler hint, but not "@property" I don't grasp the motivation for the naming of keywords in D. I think the syntax would be

Microsoft working on new systems language

2013-12-28 Thread Barry L.
Hello everyone, first post... Just saw this: http://joeduffyblog.com/2013/12/27/csharp-for-systems-programming/ D (and Rust) get a mention with this quote: "There are other candidates early in their lives, too, most notably Rust and D. But hey, my team works at Microsoft, where there is am

Re: Go compiler moving from C to Go

2013-12-28 Thread Joseph Rushton Wakeling
On 28/12/13 06:53, CJS wrote: I don't think anything related to linear algebra belongs in the standard library. See here, for example: http://forum.dlang.org/thread/rmyaglfeimzuggolu...@forum.dlang.org?page=2#post-rfnnzssennvpxcihmcmb:40forum.dlang.org. The basic point is that linear algebra libr

Re: What is the rationale behind std.file.setAttributes ?

2013-12-28 Thread Ola Fosheim Grøstad
On Saturday, 28 December 2013 at 08:18:44 UTC, Jonathan M Davis wrote: on it specifically. My main point was that some stuff in std.file is system- specific and that if it has to be, it's better to have it in std.file as system- specific rather than not having it at all just because it couldn't

Re: What is the rationale behind std.file.setAttributes ?

2013-12-28 Thread Jonathan M Davis
On Saturday, December 28, 2013 07:21:28 Marco Leise wrote: > schrieb Jonathan M Davis : > > We need to try hard to make Phobos cross-platform and portable, but some > > stuff just can't be, and std.file already has some functions which fall > > in that category (e.g. anything symlink related or dea

Re: std.range.iota enhancement: supporting more types (AKA issue 10762)

2013-12-28 Thread Jakob Ovrum
On Tuesday, 24 December 2013 at 12:02:54 UTC, Francesco Cattoglio wrote: iota(DateTime(2012, 1, 1), DateTime(2013, 1, 1), dur!"days"(5)); can you easily tell what is the "back" element? If it can't be defined reasonably for a custom step[1], then simply don't support it when a custom step is p