Re: dmd 1.070 and 2.055 release

2011-09-08 Thread Timon Gehr
On 09/08/2011 06:52 PM, Andrej Mitrovic wrote: On 9/8/11, dsimcha wrote: Uh...what's wrong with this at the top of every file: alias toUTFz!(const(wchar)*) toUTF16z; Maybe this is wrong: Error: template instance toUTFz!(const(wchar)*) does not match any template declaration Yes, I think

Re: dmd 1.070 and 2.055 release

2011-09-08 Thread Timon Gehr
On 09/08/2011 08:31 PM, Timon Gehr wrote: On 09/08/2011 06:52 PM, Andrej Mitrovic wrote: On 9/8/11, dsimcha wrote: Uh...what's wrong with this at the top of every file: alias toUTFz!(const(wchar)*) toUTF16z; Maybe this is wrong: Error: template instance toUTFz!(const(wchar)*) doe

Re: dmd 1.070 and 2.055 release

2011-09-10 Thread Timon Gehr
On 09/08/2011 07:21 AM, Walter Bright wrote: By far, the most number of bug fixes ever! http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.070.zip http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.055.zip Thanks! I have written a pr

Re: dmd 1.070 and 2.055 release

2011-09-12 Thread Timon Gehr
On 09/12/2011 09:38 AM, Max Samukha wrote: On 09/11/2011 08:57 PM, Walter Bright wrote: On 9/11/2011 9:08 AM, Max Samukha wrote: This test case struct S { @disable this(); this(int x) { } } class C { S s; this() { s = S(42); } } void main() { auto c = new C; } yields Error: default construc

Re: dmd 1.070 and 2.055 release

2011-09-12 Thread Timon Gehr
On 09/12/2011 05:10 PM, Steven Schveighoffer wrote: On Mon, 12 Sep 2011 10:50:49 -0400, Simen Kjaeraas wrote: On Mon, 12 Sep 2011 16:43:36 +0200, Steven Schveighoffer wrote: While I agree a nested "@disable this" struct inside a struct should disable default construction of the outer struct

Re: dmd 1.070 and 2.055 release

2011-09-12 Thread Timon Gehr
On 09/13/2011 12:09 AM, Jonathan M Davis wrote: On Monday, September 12, 2011 21:02:52 Timon Gehr wrote: On 09/12/2011 05:10 PM, Steven Schveighoffer wrote: On Mon, 12 Sep 2011 10:50:49 -0400, Simen Kjaeraas wrote: On Mon, 12 Sep 2011 16:43:36 +0200, Steven Schveighoffer wrote: While I

Re: Xinok Sort Update

2011-10-29 Thread Timon Gehr
On 10/29/2011 07:13 PM, Xinok wrote: I recently put some time into updating my implementation of xinok sort for D. Major changes include support for random-access ranges and custom predicates ("a>b"). You can download the new version here: http://sourceforge.net/projects/xinoksort/files/D%202.0/

Re: Xinok Sort Update

2011-10-29 Thread Timon Gehr
On 10/30/2011 12:19 AM, Xinok wrote: On 10/29/2011 5:53 PM, Timon Gehr wrote: Looks good =). Thank you. How does this implementation of your algorithm compare to the the unstable sort that is currently in Phobos, performance wise? I posted some benchmarks here. These benchmarks used the

Re: Xinok Sort Update

2011-10-30 Thread Timon Gehr
On 10/30/2011 09:52 AM, Max Wolter wrote: Hey there. Thanks for your good work. I decided to test your xinok sort in my implementation of the A* algorithm; since the list of open nodes will always be partially sorted, it should give better performance than the phobos sort. /Max You might wa

Re: D2 port of Tango

2011-11-03 Thread Timon Gehr
On 11/03/2011 02:55 PM, Trass3r wrote: Am 03.11.2011, 00:46 Uhr, schrieb mta`chrono : Yesterday I managed to compile all ported modules on Windows. So it looks like Tango for D2 should work on Linux and Windows right now. SiegeLord has created a master branch. I've deleted tango.stdc and part

Re: gl3n - linear algebra and more for D

2011-12-04 Thread Timon Gehr
On 12/04/2011 02:27 PM, Alex Rønne Petersen wrote: On 04-12-2011 14:22, David wrote: Am 04.12.2011 14:16, schrieb Alex Rønne Petersen: On 03-12-2011 23:36, David wrote: Am 03.12.2011 22:32, schrieb Kiith-Sa: David wrote: Hello, I am currently working on gl3n - https://bitbucket.org/dav1d/g

Re: A tutorial on D templates

2012-01-14 Thread Timon Gehr
On 01/14/2012 09:14 PM, Andrei Alexandrescu wrote: Since we're on this topic I can't stop picking - all in good fun I hope - on Jonathan, the master of words. The following two sentences convey the same exact information: 1. There are certainly times when reducing how much "you" is used reduce

Re: Native GTK2 D Bindings

2012-01-23 Thread Timon Gehr
On 01/24/2012 12:18 AM, bearophile wrote: Artur Skawina: There is no such thing as a language mandated identifier naming convention. If you think otherwise - make the compiler enforce it. :) There is a D style guide. This line of code seems an example for people that like named arguments i

Re: Mozilla Rust 0.1

2012-01-24 Thread Timon Gehr
On 01/24/2012 08:11 PM, Ary Manzana wrote: On 1/24/12 4:50 AM, dennis luehring wrote: The Rust compiler 0.1 is unleashed http://www.reddit.com/r/programming/comments/opgxd/mozilla_and_the_rust_community_release_rust_01_a/ looks nice - but rusts #fmt macro is nothing compared to std.metastrin

Re: Mozilla Rust 0.1

2012-01-24 Thread Timon Gehr
On 01/24/2012 10:29 PM, Walter Bright wrote: On 1/24/2012 12:45 PM, bearophile wrote: Its author is a very intelligent person, worth respect. Rust has both typestates and variable owning, and probably something else too, I have to study it better. It seems willing to become a direct competitor o

Re: Mozilla Rust 0.1

2012-01-25 Thread Timon Gehr
On 01/25/2012 07:39 PM, Alex Rønne Petersen wrote: On 24-01-2012 23:51, Caligo wrote: On Tue, Jan 24, 2012 at 2:45 PM, bearophile wrote: Ary Manzana: And also, what's the advantage of the language? Its author is a very intelligent person, worth respect. Rust has both typestates and variable

Re: Tango for D2: All user modules ported

2012-02-04 Thread Timon Gehr
On 02/04/2012 11:56 AM, bobef wrote: Great news. Makes me wanna do D again after I gave it up mainly because the lack of Tango for D2 and the obvious death of D1 years ago. I don't see the announcement in the tango forums. I'm wandering if the original tango developers have any plans in using D2

Re: Tango for D2: All user modules ported

2012-02-09 Thread Timon Gehr
On 02/09/2012 06:05 PM, HeiHon wrote: On Saturday, 4 February 2012 at 10:56:14 UTC, bobef wrote: Great news. ... Same here! This is the number one thing I waited for to be ported to D2. I never considered moving to D2 without Tango. Big thanks to SiegeLord and all the other contributors. Fo

Re: GoingNative 2012 to be livestreamed tomorrow - part 2

2012-02-10 Thread Timon Gehr
On 02/10/2012 08:17 AM, Jacob Carlborg wrote: On 2012-02-10 02:47, bearophile wrote: Some more comments about the conference. -- About "Variadic Templates are Funadic" by Andrei Alexandrescu fun talk: I have had to see it at only 1-1.1X speed, to understand the languag

Re: GoingNative 2012 to be livestreamed tomorrow - part 2

2012-02-10 Thread Timon Gehr
On 02/10/2012 02:47 AM, bearophile wrote: Once this patch is applied: https://github.com/D-Programming-Language/dmd/pull/692 you are able to write something like this, that isn't exceptionally nice looking, but it's useful (it's going to make Phobos code a bit more hairy, but the user is going

Re: GoingNative 2012 to be livestreamed tomorrow - part 2

2012-02-10 Thread Timon Gehr
On 02/10/2012 02:44 PM, Jacob Carlborg wrote: On 2012-02-10 13:58, Timon Gehr wrote: On 02/10/2012 08:17 AM, Jacob Carlborg wrote: On 2012-02-10 02:47, bearophile wrote: Some more comments about the conference. -- About "Variadic Templates are Funadic"

Re: GoingNative 2012 to be livestreamed tomorrow - part 2

2012-02-10 Thread Timon Gehr
On 02/10/2012 02:21 PM, Artur Skawina wrote: On 02/10/12 14:04, Timon Gehr wrote: On 02/10/2012 02:47 AM, bearophile wrote: An alternative is to give an else to the template constraints, but the error message is at the bottom of the function, making it not easy to find, so I don't like

Re: GoingNative 2012 to be livestreamed tomorrow - part 2

2012-02-10 Thread Timon Gehr
On 02/11/2012 12:27 AM, bearophile wrote: Timon Gehr: __ctfeWriteln is not required (it is not a declaration, therefore it probably won't work). Then IsNumberWithError needs to be compile-time function. I'm not sure what you are saying here. pragma(msg, ...) can already b

Re: GoingNative 2012 to be livestreamed tomorrow - part 2

2012-02-10 Thread Timon Gehr
On 02/11/2012 01:47 AM, bearophile wrote: Timon Gehr: I'm not sure what you are saying here. I meant using something like this, instead of a template: bool IsNumberWithError(T, string file=__FILE__, int line=__LINE__)() { enum bool result = is( ... if (!r

Re: dmd 1.073 and 2.058 release

2012-02-15 Thread Timon Gehr
On 02/15/2012 01:45 PM, Andrej Mitrovic wrote: On 2/15/12, Jonathan M Davis wrote: @property auto prop(int value) { ... } auto value = 7.prop; So, I have no idea what exactly has been implemented for that one line in the changelog - hence my question. That doesn't seem to work. So does anyon

Re: dmd 1.073 and 2.058 release

2012-02-16 Thread Timon Gehr
On 02/16/2012 07:10 AM, Caligo wrote: On Wed, Feb 15, 2012 at 2:26 AM, Jonathan M Davis wrote: On Tuesday, February 14, 2012 23:38:33 Bill Baxter wrote: On Tuesday, February 14, 2012 20:47:27 Walter Bright wrote: * Allow 1.userproperty syntax Where is this odd-sounding beast documented? And

Re: dmd 1.073 and 2.058 release

2012-02-16 Thread Timon Gehr
On 02/16/2012 08:05 PM, Jonathan M Davis wrote: On Thursday, February 16, 2012 15:27:26 F i L wrote: Marco Leise wrote: I'm just repeating what's already been said, but UFCS on classes and structs has the problem of ambiguities with proper methods of those. If 2.058 introduced more UFCS, then i

Re: dmd 1.073 and 2.058 release

2012-02-16 Thread Timon Gehr
On 02/16/2012 08:37 PM, Martin Nowak wrote: On Thu, 16 Feb 2012 10:29:55 +0100, Jonathan M Davis wrote: On Thursday, February 16, 2012 00:10:20 Caligo wrote: float x = 1.f; // GIVES ERROR float y = 0.f; // OK what's up with that? Is that a bug? I would think so. - Jonathan M Davis Some

Re: Inheriting purity DDJ blog by Walter on reddit

2012-02-25 Thread Timon Gehr
On 02/23/2012 08:54 PM, deadalnix wrote: Le 23/02/2012 18:27, Andrei Alexandrescu a écrit : http://www.reddit.com/r/programming/comments/q2pmd/inheriting_purity_in_the_d_programming_language/ Andrei I'm still not convinced by const (this can lead to very confusing cases), but for everything

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

2012-03-01 Thread Timon Gehr
On 03/01/2012 07:04 PM, Ary Manzana wrote: I think it's cool you can convert D to JS, but I don't see why anyone would want to do it. 1. JS is a superior language: [snip.] Nope.

Re: Pegged, a Parsing Expression Grammar (PEG) generator in D

2012-03-15 Thread Timon Gehr
On 03/15/2012 12:09 AM, Jay Norwood wrote: On Saturday, 10 March 2012 at 23:28:42 UTC, Philippe Sigaud wrote: * Grammars can be dumped in a file to create a D module. In reading the D spec I've seen a few instance where there are infered items such as auto for variables and various parameter

Re: UFCS for D

2012-03-29 Thread Timon Gehr
On 03/29/2012 02:21 AM, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/rif9x/uniform_function_call_syntax_for_the_d/ Andrei I think the article does not mention that it also works for primitive types.

Re: UFCS for D

2012-03-30 Thread Timon Gehr
On 03/30/2012 01:45 AM, bearophile wrote: Timon Gehr: I think the article does not mention that it also works for primitive types. But there is a small problem with primitive properties: http://d.puremagic.com/issues/show_bug.cgi?id=7773 Bye, bearophile Yes, I have never understood why

Re: unzip parallel, 3x faster than 7zip

2012-04-05 Thread Timon Gehr
On 04/05/2012 06:37 PM, dennis luehring wrote: Am 05.04.2012 16:04, schrieb Jay Norwood: I uploaded a parallel unzip here, and the main in the examples folder. Testing on my ssd drive, unzips a 2GB directory structure in 17.5 secs. 7zip took 55 secs on the same file. it makes no sense to bench

Re: Video: Walter Bright D at Lang.NEXT 2012

2012-04-13 Thread Timon Gehr
On 04/12/2012 01:04 AM, Walter Bright wrote: http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012/The-D-Programming-Language and on Reddit: http://www.reddit.com/r/programming/comments/s5492/the_d_programming_language_walter_bright_langnext/ DMD actually implements pure as 'no reading

Re: Introducing vibe.d!

2012-04-27 Thread Timon Gehr
On 04/27/2012 10:01 AM, Nick Sabalausky wrote: ... - Why "static this"? Seems like a strange choice since it'll run before the main that (I assume) vibed automatically provides - and in an undefined order relative to all other module ctors. This is not true. The order is defined as far it matt

Re: Voldemort Types in D

2012-05-09 Thread Timon Gehr
On 05/09/2012 10:09 PM, Jacob Carlborg wrote: On 2012-05-09 19:05, Adam Wilson wrote: This pull fixes this problem and a bunch of others: https://github.com/D-Programming-Language/dmd/pull/928. However, it currently fails to build on Linux and fails the unittests on Windows thanks to a problem

Re: DCT: D compiler as a collection of libraries

2012-05-12 Thread Timon Gehr
On 05/12/2012 11:08 PM, Roman D. Boiko wrote: On Saturday, 12 May 2012 at 20:28:34 UTC, Tobias Pankrath wrote: 1. If a struct is a field of heap allocated object, it will be allocated and garbage collected. Only if it only exists on stack (i.e., in method body), GC is not used. As far as I can

Re: DCT: D compiler as a collection of libraries

2012-05-15 Thread Timon Gehr
On 05/14/2012 05:00 PM, Roman D. Boiko wrote: On Saturday, 12 May 2012 at 03:32:20 UTC, Ary Manzana wrote: I think you are wasting much more memory and performance by storing all the tokens in the lexer. Imagine I want to implement a simple syntax highlighter: just highlight keywords. How can I

Re: Uniform Function Call Syntax in D - GameDev.net

2012-07-03 Thread Timon Gehr
On 07/03/2012 09:55 PM, bearophile wrote: Jonathan M Davis: Yes, but as I said, if it _didn't_ select the member function when there was a conflict, it would be impossible to call the member function whenever there was a conflict. There is no way to indicate that you mean a member function rath

Re: dmd 1.075 and 2.060 release

2012-08-02 Thread Timon Gehr
On 08/02/2012 09:28 PM, bearophile wrote: Walter Bright: Another big pile of bug fixes. More contributors than ever! And there is the first step of this change too: http://d.puremagic.com/issues/show_bug.cgi?id=6652 Bye, bearophile Which is the wrong thing to do. 'ref' means that the range

Re: Visitor pattern revisited in D

2012-08-28 Thread Timon Gehr
On 08/27/2012 05:00 PM, deadalnix wrote: /!\ Shameless autopromotion incoming /!\ I have recently put some effort into exploring alternatives to visitor pattern and see what can be done in D. I ended up with a solution which is a real improvement compared to plein old visitor pattern and wanted

Re: Visitor pattern revisited in D

2012-08-28 Thread Timon Gehr
On 08/29/2012 02:24 AM, deadalnix wrote: Le 28/08/2012 17:39, Timon Gehr a écrit : On 08/27/2012 05:00 PM, deadalnix wrote: /!\ Shameless autopromotion incoming /!\ I have recently put some effort into exploring alternatives to visitor pattern and see what can be done in D. I ended up with a

Re: Slides from LASER 2012

2012-09-20 Thread Timon Gehr
On 09/20/2012 04:23 PM, bearophile wrote: Andrei Alexandrescu: In particular, Martin has been quite impressed with our approach to purity and immutability. We are considering a collaboration with one of his students on a paper to formalize the approach and possibly adapt it to Scala. Formaliz

Re: Slides from LASER 2012

2012-09-20 Thread Timon Gehr
On 09/20/2012 06:55 PM, bearophile wrote: Timon Gehr: Formalising it is not hard, I am not sure of this, given the amount of special cases it already has. Which special cases do you refer to? The number of lines equals the Haskell example in this case. Interestingly, you have opened

Re: Slides from LASER 2012

2012-09-20 Thread Timon Gehr
On 09/20/2012 11:33 PM, bearophile wrote: Timon Gehr: mixin ADT!q{ Tree(T): Leaf(T x), Node(Tree a, Tree b) }; DynRange!T fringe(T)(Tree!T t){ return t.match!( (Leaf l) => cons(l.x, empty), (Node n) => chain(n.a.fringe, n.b.fringe).dynRange, ); } bool sameFr

Re: Slides from LASER 2012

2012-09-20 Thread Timon Gehr
On 09/21/2012 12:03 AM, renoX wrote: Thank for these slides. I didn't get some part of the VRP slides: p40 of the third lesson: byte a, b, c; a = 1; b = c | a; // error Is-this really an error? A binary-or operation on bytes should return a byte.. BR, renoX The result is an int but value rang

Re: Slides from LASER 2012

2012-09-20 Thread Timon Gehr
On 09/21/2012 12:51 AM, bearophile wrote: Timon Gehr: chain has type Result. dynRange takes an arbitrary range and transforms it into a range with the same value/vs reference behaviour whose static type depends only on the element type. I see. So that chain() is the normal chain of Phobos

Re: Slides from LASER 2012

2012-09-21 Thread Timon Gehr
On 09/21/2012 07:46 PM, Dmitry Olshansky wrote: On 21-Sep-12 03:27, Timon Gehr wrote: On 09/21/2012 12:51 AM, bearophile wrote: Timon Gehr: chain has type Result. dynRange takes an arbitrary range and transforms it into a range with the same value/vs reference behaviour whose static type

Re: Component Programming in D

2012-10-03 Thread Timon Gehr
On 10/03/2012 05:59 PM, renoX wrote: I have some mixed feeling about component programming: add in all the examples the requirement to give the context (line number for example) where something happened (either a match or an error) and suddendly component programming becomes much more "tricky"!!

Re: Abstract Database Interface

2012-10-30 Thread Timon Gehr
On 10/30/2012 04:47 PM, Philippe Sigaud wrote: On Tue, Oct 30, 2012 at 3:44 PM, Jacob Carlborg wrote: How does that work with operator precedence? (...) But because of the operator precedence in Ruby you need to wrap every comparison in parentheses, not very pretty. I think the problem wou

Re: User Defined Attributes

2012-11-06 Thread Timon Gehr
On 11/06/2012 05:41 PM, Walter Bright wrote: On 11/6/2012 8:23 AM, bearophile wrote: Supporting annotations for function arguments is probably an important sub-feature. It would be a significant extension, and so I'd like to see a compelling use case first. ... The use cases are the same as

Re: User Defined Attributes

2012-11-06 Thread Timon Gehr
On 11/06/2012 06:31 PM, deadalnix wrote: Le 06/11/2012 18:14, Walter Bright a écrit : On 11/6/2012 9:00 AM, dennis luehring wrote: 1. what if my needs are beyond D? for example my idl allows me to define a type based query source for parameters CalculateStuff( TypeX [source="\\placement\(type

Re: User Defined Attributes

2012-11-06 Thread Timon Gehr
On 11/06/2012 07:02 PM, Walter Bright wrote: On 11/6/2012 9:34 AM, dennis luehring wrote: can't you please give us a bad-usage example why it is/should be forbidden to use UDA on parameters (and please - we are not talking about pure, in, out and stuff like that) I believe this is the wrong qu

Re: User Defined Attributes

2012-11-07 Thread Timon Gehr
On 11/07/2012 08:08 AM, Daniel Murphy wrote: "Walter Bright" wrote in message news:k7cko9$hes$1...@digitalmars.com... On 11/6/2012 6:10 PM, Daniel Murphy wrote: My thoughts exactly. It reminds me of the horror of C++ exceptions. I think it would be reasonable to require every annotation is a

Re: User Defined Attributes

2012-11-14 Thread Timon Gehr
On 11/14/2012 03:31 PM, Leandro Lucarella wrote: Tove, el 14 de November a las 13:55 me escribiste: struct UserProfile { @Id(1) i32 uid; @Id(2) string name; @Id(3) string blurb; } Where Id is "thrift.attributes.Id" or something similar. well, similar... but beginning with a symbol

Re: Abstract Database Interface

2012-12-23 Thread Timon Gehr
On 10/31/2012 05:54 PM, Philippe Sigaud wrote: Timon: From higher to lower, where relational ops are unordered with respect to bitwise ops (this is the reason comparisons would have to be wrapped in parentheses in D as well): ! => (not a real operator, occurs twice this is binding power to th

Re: DIP22 : Private symbol visibility

2013-01-28 Thread Timon Gehr
On 01/28/2013 06:05 PM, Dicebot wrote: http://wiki.dlang.org/DIP22 There are two important issues with current protection attribute design: * Senseless name clashes between private and public symbols * No way to specify internal linkage storage class This DIP addresses both of them with two de

Re: Mono-D v0.4.9.5 - Infinite analysis fix + Mixin analysis improvement

2013-01-29 Thread Timon Gehr
On 01/29/2013 03:14 AM, alex wrote: On Tuesday, 29 January 2013 at 00:48:24 UTC, F i L wrote: ... http://mono-d.alexanderbothe.com/?attachment_id=817 My progress so far. Lots of internals to manage though. The execute-button isn't implemented yet but you can toggle the "Automatically take the m

Re: DIP22 : Private symbol visibility

2013-01-29 Thread Timon Gehr
On 01/29/2013 11:29 AM, Dicebot wrote: Fixing private is enough. ... No need to screw this up. By the way, do you oppose exactly "static" keyword usage> or ability to mark symbols for internal linkage at all? How about something like @internal? I only oppose changing the meaning of "static"

Re: DIP22 : Private symbol visibility

2013-01-30 Thread Timon Gehr
On 01/30/2013 10:42 AM, Dicebot wrote: ... That was the most uneasy part of proposal. I have been thinking for few hours about it, considering different options. In the end, I have decided that it is only confusing to one coming from C++ lax approach and for clean mind it should make perfect sens

Re: Higgs, a JavaScript JIT done in D

2013-02-03 Thread Timon Gehr
On 02/03/2013 11:14 PM, Peter Alexander wrote: On Sunday, 3 February 2013 at 22:00:05 UTC, bearophile wrote: Nick Sabalausky: Why is it silly? (Genuine question) "Silly" wasn't the right word, sorry. But generally if a language offers you a clean feature (D contract programming is designed

Re: Functional Programming with D

2013-04-13 Thread Timon Gehr
On 04/13/2013 05:25 PM, qznc wrote: Sat, 13 Apr 2013 15:03:51 +0200: Vladimir Panteleev wrote On Saturday, 13 April 2013 at 12:29:29 UTC, qznc wrote: While there is no syntactic sugar, What about lambdas? http://dlang.org/expression.html#Lambda Oh. I forgot about those. Thanks! The syntac

Re: Shameless autopromotion : type safe tagged union in D

2013-05-10 Thread Timon Gehr
On 05/10/2013 02:32 PM, deadalnix wrote: http://www.deadalnix.me/2013/05/10/type-safe-tagged-union-in-d-programming-language/ A trick that I used to use more and more, so I ended up creating a generic solution and wrote an article about it. I'd have implemented your TaggedUnion struct as foll

Re: dmd 2.063 released with 260 bugfixes and enhancements

2013-05-30 Thread Timon Gehr
On 05/30/2013 08:00 PM, Mafi wrote: What a great release! Great work! I really like the new langugage changes. One change caught my attention: #10 "The Template This Parameter now changes the member function qualifier". Does this mean that const/immutable ranges can implement a useful opSlice?

Re: DConf 2013 Day 3 Talk 1: Metaprogramming in the Real World by Don Clugston

2013-06-12 Thread Timon Gehr
On 06/11/2013 02:33 PM, Andrei Alexandrescu wrote: Reddit: http://www.reddit.com/r/programming/comments/1g47df/dconf_2013_metaprogramming_in_the_real_world_by/ Hackernews: https://news.ycombinator.com/item?id=5861237 Twitter: https://twitter.com/D_Programming/status/344431490257526785 Faceboo

Re: DConf 2013 Day 3 Talk 2: Code Analysis for D with AnalyzeD by Stefan Rohe

2013-06-12 Thread Timon Gehr
On 06/12/2013 11:23 PM, Walter Bright wrote: On 6/12/2013 2:21 PM, bearophile wrote: Jonathan M Davis: What I find most interesting about checked exceptions is the fact that almost everyone thinks that they're a fantastic idea when they first encounter them and yet they're actually a bad idea.

Re: DConf 2013 Day 3 Talk 2: Code Analysis for D with AnalyzeD by Stefan Rohe

2013-06-15 Thread Timon Gehr
On 06/14/2013 11:03 AM, bearophile wrote: Don: I don't think contracts can be much use to a static analyzer if they can contain arbitrary code. The other contract systems I know of (Eiffel, Ada, C#, Sing#), plus few other systems that use the type system for similar reasons (Liquid Haskell, e

Re: DConf 2013 Day 3 Talk 2: Code Analysis for D with AnalyzeD by Stefan Rohe

2013-06-15 Thread Timon Gehr
On 06/15/2013 05:14 PM, Jacob Carlborg wrote: On 2013-06-12 14:50, Andrei Alexandrescu wrote: Reddit: http://www.reddit.com/r/programming/comments/1g6x9g/dconf_2013_code_analysis_for_d_with_analyzed/ Hackernews: https://news.ycombinator.com/item?id=5867764 Twitter: https://twitter.com/D_Prog

Re: DConf 2013 Day 3 Talk 2: Code Analysis for D with AnalyzeD by Stefan Rohe

2013-06-15 Thread Timon Gehr
On 06/16/2013 12:07 AM, bearophile wrote: Timon Gehr: Eiffel can call arbitrary methods in contracts. This is surprising. Maybe the "Modern Eiffel" is more strict. It's design isn't finished, but IIRC it enforces purity, contracts can be arbitrarily complex, a

Re: My first email to Walter, ever

2013-07-07 Thread Timon Gehr
On 07/07/2013 02:27 PM, Peter Alexander wrote: ... We're almost there with CTFE, but CTFE can only run functions that could run at runtime. In a crazy world where types were first class objects, stuff like this would be feasible. Or perhaps we just need a compile-time metalanguage that allows th

Re: I'm porting some go code to D

2013-08-25 Thread Timon Gehr
On 08/26/2013 12:55 AM, Rory McGuire wrote: shared chan!Fiber scheduler; // channel contains Fibers waiting for their time slice static this () { if (scheduler is null) { You want 'shared static this' instead to avoid a race condition.

Re: legacy code retreat's triva game : the D version

2013-12-21 Thread Timon Gehr
On 12/22/2013 01:07 AM, Marco Leise wrote: ... It didn't cause issues for any of the other students, but on this particular computer the random seed that the Random ctor chose caused a degenerate case where it never hit any of the 3 remaining indexes of the list. The morale is that "uniform" ran

Re: legacy code retreat's triva game : the D version

2013-12-21 Thread Timon Gehr
On 12/22/2013 02:09 AM, Timon Gehr wrote: The morale is that "uniform" random numbers doesn't imply that every value in the range will eventually be generated once! Yes it does. (The probability that some value is never generated is 0.) The actual morale is that random numbe

Re: legacy code retreat's triva game : the D version

2013-12-22 Thread Timon Gehr
On 12/22/2013 09:06 AM, Marco Leise wrote: Am Sun, 22 Dec 2013 02:12:51 +0100 schrieb Timon Gehr : On 12/22/2013 02:09 AM, Timon Gehr wrote: The morale is that "uniform" random numbers doesn't imply that every value in the range will eventually be generated once! Ye

Re: Range-Based Graph Search in D (blog post)

2014-01-10 Thread Timon Gehr
On 01/09/2014 11:04 PM, Peter Alexander wrote: Trying to write a bit more about D on my blog now. To start, I've written about a proof-of-concept range-based API for graph search. http://poita.org/2014/01/09/range-based-graph-search-in-d.html I'd greatly appreciate any feedback on the design.

Re: Interesting rant about Scala's issues

2014-04-05 Thread Timon Gehr
On 04/03/2014 04:45 AM, Walter Bright wrote: On 4/2/2014 6:55 PM, Andrei Alexandrescu wrote: A lot of them could apply to us as well. https://www.youtube.com/watch?v=TS1lpKBMkgg at about 44:00: "I begged them not to do them [AST macros]." :-) (This is a misquote.)

Re: dmd 1.068 and 2.053 release

2011-05-14 Thread Timon Gehr
> Corrected links! > > > http://www.digitalmars.com/d/1.0/changelog.html > > http://ftp.digitalmars.com/dmd.1.068.zip > > > > http://www.digitalmars.com/d/2.0/changelog.html > > http://ftp.digitalmars.com/dmd.2.053.zip Very Nice! Thank you and everyone involved! Thanks to Don for his CTFE-related

Re: dmd 1.068 and 2.053 release

2011-05-14 Thread Timon Gehr
Walter Bright wrote: > On 5/14/2011 2:49 PM, Timon Gehr wrote: > > Also, not having the full druntime source handy apparently means some code > > wont > > CTFE. > > What is missing? I stumbled over foreach(dchar c; char_array); It will complain that "_aApplycd2&qu

Re: Scott Meyers' DConf 2014 keynote "The Last Thing D Needs"

2014-05-28 Thread Timon Gehr via Digitalmars-d-announce
On 05/29/2014 05:35 AM, Jonathan M Davis via Digitalmars-d-announce wrote: On Wed, 28 May 2014 16:07:08 -0700 Walter Bright via Digitalmars-d-announce wrote: Some of the inconsistencies you mentioned and Brian mentioned in his talk are actually the result of consistencies. I know this is a bi

Re: Scott Meyers' DConf 2014 keynote "The Last Thing D Needs"

2014-05-31 Thread Timon Gehr via Digitalmars-d-announce
On 05/30/2014 02:37 PM, Steven Schveighoffer wrote: in which case static if(cond) { immutable: } int x; should not create x as immutable if cond is true. The current behavior is not consistent with attribute either. Ugh, that is really bad. It shouldn't do that. Is that intentional? enu

Re: DConf 2014 Day 1 Talk 4: Inside the Regular Expressions in D by Dmitry Olshansky

2014-06-12 Thread Timon Gehr via Digitalmars-d-announce
On 06/12/2014 02:31 PM, Dicebot wrote: Compiler can cache return value of function that get called from inside mixin statement (for a given argument set). As CTFE is implicitly pure (no global state at compile-time) later generated code can be simply re-used for same argument set. > Re-using it

Re: [hackathon] FreeTree is FreeList on autotune

2015-05-05 Thread Timon Gehr via Digitalmars-d-announce
On 05/02/2015 08:28 AM, Andrei Alexandrescu wrote: I'm just done implementing a pretty cool allocator: FreeTree. https://github.com/andralex/phobos/blob/allocator/std/experimental/allocator/free_tree.d http://erdani.com/d/phobos-prerelease/std_experimental_allocator_free_tree.html It's simil

Re: [hackathon] FreeTree is FreeList on autotune

2015-05-09 Thread Timon Gehr via Digitalmars-d-announce
On 05/07/2015 04:49 PM, Andrei Alexandrescu wrote: - The implementation of 'allocate' appears to be buggy: If no memory block of a suitable size is found, the entire free tree is released. (There is only one occurrence of parent.allocate in the code and it appears right after a call to 'clear'.

Re: D needs...

2015-05-11 Thread Timon Gehr via Digitalmars-d-announce
On 05/11/2015 01:59 PM, Namespace wrote: Inspired by ponce idioms list for D I've set up something similar. There are some themes in D which come up regulary and are discussed to the vomit. If something is agreed, it gets forgotten sometimes and the theme disappears into oblivion (for a few month

Re: [blog post] Dependent types in (half of) D

2015-07-30 Thread Timon Gehr via Digitalmars-d-announce
On 07/30/2015 09:31 AM, thedeemon wrote: I had this idea for a long time but a recent talk about a real dependently typed language helped me with nice examples to demonstrate on. The interpreted part of D is actually dependently typed! http://www.infognition.com/blog/2015/dependent_types_in_d.ht

Re: [blog post] Dependent types in (half of) D

2015-07-30 Thread Timon Gehr via Digitalmars-d-announce
On 07/30/2015 05:45 PM, thedeemon wrote: On Thursday, 30 July 2015 at 13:25:31 UTC, Timon Gehr wrote: There is no dependent typing here. Failures occur during interpretation. Type theory doesn't say anything about interpretation and compilation. You need to consider the type system an

Re: [blog post] Dependent types in (half of) D

2015-07-30 Thread Timon Gehr via Digitalmars-d-announce
On 07/30/2015 06:13 PM, Timon Gehr wrote: ... The real difference is (roughly!) that the dependently typed interpreted program always fails if it would fail in any possible execution (This is ambiguous. What I mean is: If there is some execution in which it would fail.)

Re: Release D 2.068.0

2015-08-10 Thread Timon Gehr via Digitalmars-d-announce
On 08/10/2015 10:48 AM, Martin Nowak wrote: Glad to announce D 2.068.0. http://downloads.dlang.org/releases/2.x/2.068.0/ This release comes with many rangified phobos functions, 2 new GC profilers, a new AA implementation, and countless further improvements and fixes. See the changelog for mor

Re: This Week in D summarizes those long threads for you!

2015-08-25 Thread Timon Gehr via Digitalmars-d-announce
On 08/24/2015 06:09 PM, Adam D. Ruppe wrote: the if(array) thread But, this can be surprising if you aren't used to it, since an empty array is not necessarily null: [] is null passes, since the literal avoids allocating for nothing, but [1][1..$] is null fails, despite the array being empt

Re: It's a class! It's a struct! It's ... SuperStruct!

2015-10-21 Thread Timon Gehr via Digitalmars-d-announce
On 10/18/2015 09:00 PM, rcorre wrote: SuperStruct is a struct that acts like a class: --- struct Square { float size; float area() { return size * size; } } struct Circle { float r; float area() { return r * r * PI; } } alias Shape = SuperStruct!(Square, Circle); // look! polymorp

Re: mir.combinatorics: reviewers and ideas are wanted

2016-03-28 Thread Timon Gehr via Digitalmars-d-announce
On 28.03.2016 09:24, 9il wrote: Hello All, Sebastian Wilzbach (aka @greenify) starts mir.combinatorics. Numeric functions: - `binomial` Ranges: - `permutations` RoR - `cartesianPower` RoR - `combinations` RoR - `combinationsRepeat` RoR RoR - Range of Ranges PR: https://github.com/DlangScienc

Re: C#7 features

2016-05-06 Thread Timon Gehr via Digitalmars-d-announce
On 06.05.2016 18:58, Kagamin wrote: On Friday, 6 May 2016 at 14:33:22 UTC, Andrei Alexandrescu wrote: Added a comment: https://www.reddit.com/r/programming/comments/4i3h77/some_new_c7_features/d2v5lu6 D has ref variables? Not for a long time though. D actually does not support ref local va

Re: Battle-plan for CTFE

2016-05-13 Thread Timon Gehr via Digitalmars-d-announce
On 13.05.2016 15:59, Don Clugston wrote: All that's needed is a very simple bytecode interpreter. Here is the one I have hacked together: https://github.com/tgehr/d-compiler/blob/master/interpret.d This file does both constant folding and byte-code interpretation for most of the language. I s

Re: Ownership and Borrowing in D

2019-07-19 Thread Timon Gehr via Digitalmars-d-announce
On 17.07.19 22:59, Walter Bright wrote: Any competing system would need to not be 'opt-in' on a type by type basis. I.e. the central feature of an @live function is the user will not be able to write memory unsafe code within that function. Those two things are not the least bit at odds with

Re: Ownership and Borrowing in D

2019-07-22 Thread Timon Gehr via Digitalmars-d-announce
On 21.07.19 02:17, Walter Bright wrote: On 7/20/2019 3:39 PM, Sebastiaan Koppe wrote: Do you mean to keep track of ownership/borrowedness manually? No, that's what the copyctor/opAssign/dtor semantics so. This is not true.

Re: Ownership and Borrowing in D

2019-07-23 Thread Timon Gehr via Digitalmars-d-announce
On 23.07.19 10:20, Sebastiaan Koppe wrote: On Tuesday, 23 July 2019 at 04:02:50 UTC, Timon Gehr wrote: On 21.07.19 02:17, Walter Bright wrote: On 7/20/2019 3:39 PM, Sebastiaan Koppe wrote: Do you mean to keep track of ownership/borrowedness manually? No, that's what the copyctor/opA

Re: DIP1028 - Rationale for accepting as is

2020-05-22 Thread Timon Gehr via Digitalmars-d-announce
On 22.05.20 03:22, Walter Bright wrote: This is Obviously A Good Idea. Why would I oppose it? 1. I've been hittin' the crack pipe again. 2. I was secretly convinced, but wanted to save face. 3. I make decisions based on consultation with my astrologer. 4. I am evil. 5. You are backwards-ratio

Re: DIP1028 - Rationale for accepting as is

2020-05-22 Thread Timon Gehr via Digitalmars-d-announce
On 22.05.20 15:58, bachmeier wrote: ... Honest question: What is the use case for an absolutely-positively-has-to-be-safe program that calls C code? Why would anyone ever do that? C is not and will never be a safe language. "Someone looked at that blob of horrendous C code and thinks it's saf

Re: DIP1028 - Rationale for accepting as is

2020-05-22 Thread Timon Gehr via Digitalmars-d-announce
On 22.05.20 16:49, bachmeier wrote: On Friday, 22 May 2020 at 14:38:09 UTC, Timon Gehr wrote: On 22.05.20 15:58, bachmeier wrote: ... Honest question: What is the use case for an absolutely-positively-has-to-be-safe program that calls C code? Why would anyone ever do that? C is not and will

  1   2   >