Re: D Compiler as a Library

2012-04-19 Thread Roman D. Boiko
On Wednesday, 18 April 2012 at 16:48:46 UTC, Jacob Carlborg wrote: On 2012-04-18 14:49, Marco Leise wrote: I want refactoring to be as simple as Foo.renameSymbol("std.path.sep", "std.path.dirSeperator"); if the connection between module- and filename allows "std.path" to be traced back to the

Re: D Compiler as a Library

2012-04-19 Thread Roman D. Boiko
On Monday, 16 April 2012 at 11:57:29 UTC, Bernard Helyer wrote: On Monday, 16 April 2012 at 07:00:19 UTC, Jakob Ovrum wrote: On Monday, 16 April 2012 at 06:37:00 UTC, Jacob Carlborg wrote: On 2012-04-16 04:35, Ary Manzana wrote: On 4/13/12 9:10 PM, deadalnix wrote: SDC have a lot of theses, an

Re: D Compiler as a Library

2012-04-19 Thread Roman D. Boiko
tors to implement semantic analysis. The visitor will make it super easy to implement lints and to generate documentation. By the way, I also started a project called href="https://github.com/roman-d-boiko/DCT";>The D Compiler Tools (DCT) about a month ago. It is provided under

Re: Let's give a honor to dead giants!

2012-04-19 Thread Roman D. Boiko
On Thursday, 19 April 2012 at 10:00:29 UTC, Denis Shelomovskij wrote: D already has a history with heroes and great projects... Unfortunately, lots of dead great projects. IMHO, a monument to them should be set up. Reasons: 1. If a project failed because of some design issues (e.g. Descent)

Re: D Compiler as a Library

2012-04-19 Thread Roman D. Boiko
. Yes, there is no attribution: https://github.com/roman-d-boiko/SDC/blob/master/LICENCE. It is very similar to Boost. Actually, I prefer Boost only because it is slightly more popular and because the D standard library uses it. I'm perfectly happy with MIT, though, and already cloned

Re: D Compiler as a Library

2012-04-19 Thread Roman D. Boiko
On Thursday, 19 April 2012 at 10:28:08 UTC, Tobias Pankrath wrote: On Thursday, 19 April 2012 at 09:24:23 UTC, Roman D. Boiko wrote: On Friday, 13 April 2012 at 09:57:49 UTC, Ary Manzana wrote: Having a D compiler available as a library will (at least) give these benefits: What about

Re: D Compiler as a Library

2012-04-19 Thread Roman D. Boiko
On Thursday, 19 April 2012 at 10:15:36 UTC, Roman D. Boiko wrote: On Thursday, 19 April 2012 at 09:58:52 UTC, Nick Sabalausky wrote: "David Nadlinger" wrote in message news:voymctvtskltfzhsl...@forum.dlang.org... On Monday, 16 April 2012 at 11:57:29 UTC, Bernard Helyer wrote: Oh

Re: D Compiler as a Library

2012-04-19 Thread Roman D. Boiko
On Thursday, 19 April 2012 at 11:01:10 UTC, Somedude wrote: Le 16/04/2012 13:58, Bernard Helyer a écrit : I recall mentioning it via IRC. Which is hardly going to stand up in a court. :V And given the ongoing Oracle-Google suit over the Java API license, this has to be taken seriously, I'm

Re: D Compiler as a Library

2012-04-19 Thread Roman D. Boiko
On Thursday, 19 April 2012 at 11:04:20 UTC, Ary Manzana wrote: On 4/19/12 12:48 AM, Jacob Carlborg wrote: On 2012-04-18 14:49, Marco Leise wrote: I want refactoring to be as simple as Foo.renameSymbol("std.path.sep", "std.path.dirSeperator"); if the connection between module- and filename all

Re: D Compiler as a Library

2012-04-19 Thread Roman D. Boiko
On Thursday, 19 April 2012 at 11:04:20 UTC, Ary Manzana wrote: On 4/19/12 12:48 AM, Jacob Carlborg wrote: On 2012-04-18 14:49, Marco Leise wrote: I want refactoring to be as simple as Foo.renameSymbol("std.path.sep", "std.path.dirSeperator"); if the connection between module- and filename all

Re: D Compiler as a Library

2012-04-19 Thread Roman D. Boiko
On Thursday, 19 April 2012 at 12:31:24 UTC, Tobias Pankrath wrote: T foo(T)(T x) { return x.something(); } int something(int x) { return 1; } float something(float x) { return 1.0; } Now... go and rename the first function named "something". What do you do with "x.something()" inside the

Re: D Compiler as a Library

2012-04-19 Thread Roman D. Boiko
On Thursday, 19 April 2012 at 12:55:50 UTC, Roman D. Boiko wrote: On Thursday, 19 April 2012 at 12:31:24 UTC, Tobias Pankrath wrote: T foo(T)(T x) { return x.something(); } int something(int x) { return 1; } float something(float x) { return 1.0; } Now... go and rename the first function

Re: D Compiler as a Library

2012-04-19 Thread Roman D. Boiko
On Thursday, 19 April 2012 at 14:46:26 UTC, Jacob Carlborg wrote: On 2012-04-19 13:05, Ary Manzana wrote: Unfortunately rename can't be perfect in D because you can't apply it inside templates. Could you elaborate a bit on why this is? Please see several last messages for this discussion.

Re: D Compiler as a Library

2012-04-19 Thread Roman D. Boiko
On Thursday, 19 April 2012 at 14:55:50 UTC, David Nadlinger wrote: The question is, though, whether »perfect« renaming support is really required, or if a defensive solution warning on potential ambiguities isn't already useful enough for most cases. David "Perfect" support is impossible, I

Re: D Compiler as a Library

2012-04-19 Thread Roman D. Boiko
On Thursday, 19 April 2012 at 15:11:50 UTC, David Nadlinger wrote: On Thursday, 19 April 2012 at 10:15:36 UTC, Roman D. Boiko wrote: Actually, I prefer Boost only because it is slightly more popular […] Not to argue about the Boost license being popular in the D community, and not that the

Re: D Compiler as a Library

2012-04-19 Thread Roman D. Boiko
On Thursday, 19 April 2012 at 15:30:21 UTC, deadalnix wrote: "The Boost Software License is based upon the MIT license, but differs from the MIT license in that it: (i) makes clear that licenses can be granted to organizations as well as individuals; (ii) does not require that the license a

Re: D Compiler as a Library

2012-04-19 Thread Roman D. Boiko
On Thursday, 19 April 2012 at 16:38:31 UTC, Marco Leise wrote: Am Thu, 19 Apr 2012 11:24:34 +0200 schrieb Jacob Carlborg : On 2012-04-19 10:48, Roman D. Boiko wrote: > Convenience interface on top of low-level core functionality > can be > provided and would suffice for man

Re: D Compiler as a Library

2012-04-19 Thread Roman D. Boiko
That's not up to the IDE to decide. If the user wants to break the API the IDE should let him/her. Yes, that's exactly my point. It is a matter of user goals, not a language issue, and decision should not be made by a tool instead of a user.

Re: D Compiler as a Library

2012-04-19 Thread Roman D. Boiko
On Thursday, 19 April 2012 at 19:54:48 UTC, Nick Sabalausky wrote: MIT's *much* easier to understand though. Boost has some real goofy, obfuscated wordings. Although it's *worlds* better in that regard than the completely impenatrable GPL or Creative Commons. Comparing http://www.opensource.o

Re: Let's give a honor to dead giants!

2012-04-19 Thread Roman D. Boiko
On Friday, 20 April 2012 at 02:50:39 UTC, Ary Manzana wrote: * D needs to be implemented as a library. This means no global variables and means to make it easy to build tools on top of it. I know of about two alternative new implementation of D (SDC and DCT) but for now they are making the sa

Re: Let's give a honor to dead giants!

2012-04-19 Thread Roman D. Boiko
On Friday, 20 April 2012 at 02:50:39 UTC, Ary Manzana wrote: Also, the developers of those projects don't seem to have experience in writing compilers so the code is not very nice (though I saw a visitor in DCT). I don't have any prior experience with compilers. I doubt that there are many pe

Re: D Compiler as a Library

2012-04-21 Thread Roman D. Boiko
On Saturday, 21 April 2012 at 13:32:28 UTC, Marco Leise wrote: Am Thu, 19 Apr 2012 18:58:26 +0200 schrieb "Roman D. Boiko" : I doubt specifying symbol it would be any better than location. For example, you would not be able to rename a local variable or any other symbol nested in

Re: Let's give a honor to dead giants!

2012-04-21 Thread Roman D. Boiko
On Saturday, 21 April 2012 at 13:32:16 UTC, Brian Schott wrote: On Friday, 20 April 2012 at 08:01:08 UTC, Jacob Carlborg wrote: There's a vim plugin that uses Clang for autocompletion, if I recall correctly. We need the same for D. Pre-alpha is on Github: https://github.com/Hackerpilot/Dscanne

Re: D Compiler as a Library

2012-04-21 Thread Roman D. Boiko
It's possible to have an instance variable and a local variable with the same name. According to Marco's idea, those would be qualified differently: className.x vs className.funcName.x, but he recently provided an example where that is ambiguous. Also it would be a problem for symbols declar

Re: What library functionality would you most like to see in D?

2012-05-11 Thread Roman D. Boiko
e discussion on adding lexer and parser generator framework of some kind to Phobos to make generating lexers and parsers easy. But no one has submitted anything like that to Phobos yet either. - Jonathan M Davis Please take a look at my draft implementation of lexer and source decoding from U

Re: What library functionality would you most like to see in D?

2012-05-11 Thread Roman D. Boiko
library. :D I would love to see that in Phobos. Please take a look at https://github.com/roman-d-boiko/dct It is an early draft and not tested after restructuring. What would be needed for that code to become a bit closer for Phobos inclusion? Any feedback is highly appreciated.

Re: What library functionality would you most like to see in D?

2012-05-11 Thread Roman D. Boiko
On Friday, 11 May 2012 at 07:31:14 UTC, Roman D. Boiko wrote: Please take a look at https://github.com/roman-d-boiko/dct It is an early draft and not tested after restructuring. What would be needed for that code to become a bit closer for Phobos inclusion? Any feedback is highly appreciated

Re: What library functionality would you most like to see in D?

2012-05-11 Thread Roman D. Boiko
On Friday, 11 May 2012 at 08:37:06 UTC, Jacob Carlborg wrote: A couple of questions: * What's the sate of the lexer I consider it a draft state, because it has got several rewrites recently and I plan to do more, especially based on community feedback. However, implementation handles almost al

Would it be possible (and useful) to introduce declarations like `auto foo() if(isInputRange(auto));`

2012-05-17 Thread Roman D. Boiko
Is there anything preventing us from adding constraints on the auto function return value? I mean, such language extension seems to be quite useful. For example, it would be no longer necessary to provide method bodies for functions with auto return values. In many cases this would eliminate

Re: Would it be possible (and useful) to introduce declarations like `auto foo() if(isInputRange(auto));`

2012-05-17 Thread Roman D. Boiko
On Thursday, 17 May 2012 at 11:49:18 UTC, Roman D. Boiko wrote: Is there anything preventing us from adding constraints on the auto function return value? I mean, such language extension seems to be quite useful. For example, it would be no longer necessary to provide method bodies for

Re: Would it be possible (and useful) to introduce declarations like `auto foo() if(isInputRange(auto));

2012-05-17 Thread Roman D. Boiko
On Thursday, 17 May 2012 at 21:09:10 UTC, Jonathan M Davis wrote: It would still be necessary, because the compiler needs to know what the actual return type is. Knowing that the type implements popFront, front, and empty isn't enough. It needs to know the actual, physical layout of the type to

Re: stream interfaces - with ranges

2012-05-18 Thread Roman D. Boiko
On Friday, 18 May 2012 at 07:52:57 UTC, Mehrdad wrote: On Thursday, 17 May 2012 at 14:02:09 UTC, Steven Schveighoffer wrote: 2. I realized, buffering input stream of type T is actually an input range of type T[]. The trouble is, why a slice? Why not an std.array.Array? Why not some other data

Re: Lazy evaluation of function arguments in D

2012-05-19 Thread Roman D. Boiko
On Sunday, 20 May 2012 at 00:26:14 UTC, Mehrdad wrote: http://www.reddit.com/r/programming/comments/tui75/lazy_evaluation_of_function_arguments_in_d/c4pwvyp +1 ^ Yeah, I'd like both "lazy" and "ref" to be forced to be used from the call site >and not just in the declaration. I don't use laz

Re: Lazy evaluation of function arguments in D

2012-05-19 Thread Roman D. Boiko
On Saturday, 19 May 2012 at 23:03:50 UTC, Walter Bright wrote: http://www.reddit.com/r/programming/comments/tui75/lazy_evaluation_of_function_arguments_in_d/ Lazy evaluation has been discussed previously, but this topic is important and the problems have not been solved yet. Functional langu

Re: Lazy evaluation of function arguments in D

2012-05-20 Thread Roman D. Boiko
On Sunday, 20 May 2012 at 14:02:52 UTC, deadalnix wrote: Le 20/05/2012 01:03, Walter Bright a écrit : http://www.reddit.com/r/programming/comments/tui75/lazy_evaluation_of_function_arguments_in_d/ This feature break pure/@safe/nothrow . I don't think this is a good idea to promote it right n

Re: Lazy evaluation of function arguments in D

2012-05-20 Thread Roman D. Boiko
On Sunday, 20 May 2012 at 18:22:16 UTC, F i L wrote: On Saturday, 19 May 2012 at 23:03:50 UTC, Walter Bright wrote: http://www.reddit.com/r/programming/comments/tui75/lazy_evaluation_of_function_arguments_in_d/ Didn't know this was new. Stumbled upon it a day-or-so ago and (while searching fo

Re: Lazy evaluation of function arguments in D

2012-05-20 Thread Roman D. Boiko
On Sunday, 20 May 2012 at 18:59:22 UTC, deadalnix wrote: Le 20/05/2012 17:59, David Nadlinger a écrit : On Sunday, 20 May 2012 at 15:41:05 UTC, deadalnix wrote: If so, this isn't complicated, just do some rewrite magic on the expression if it is given and expression where a delegate is expecte

Re: Lazy evaluation of function arguments in D

2012-05-20 Thread Roman D. Boiko
On Sunday, 20 May 2012 at 18:59:22 UTC, deadalnix wrote: Le 20/05/2012 17:59, David Nadlinger a écrit : On Sunday, 20 May 2012 at 15:41:05 UTC, deadalnix wrote: If so, this isn't complicated, just do some rewrite magic on the expression if it is given and expression where a delegate is expecte

Re: Interested in being abreast of the GSoC 2012 projects? Here's how

2012-05-22 Thread Roman D. Boiko
On Tuesday, 22 May 2012 at 06:43:02 UTC, Denis Shelomovskij wrote: I agree. But that isn't what I meant to say. There is no reason D Parser/Autocomplete proposal system/etc. should be written in C#. IMHO C# for MonoDevelop and Java for Eclipse should be just layers of interaction with one monol

Is the D community lacking development tools?

2012-05-22 Thread Roman D. Boiko
http://d-coding.com/2012/05/22/is-the-d-community-lacking-development-tools.html

Re: Is the D community lacking development tools?

2012-05-22 Thread Roman D. Boiko
On Tuesday, 22 May 2012 at 10:18:48 UTC, Dejan Lekic wrote: On Tuesday, 22 May 2012 at 10:03:36 UTC, Roman D. Boiko wrote: http://d-coding.com/2012/05/22/is-the-d-community-lacking-development-tools.html My opinion - no. We already have: ... 5) NetbeansD - for NetBeans users Didn't

Re: Is the D community lacking development tools?

2012-05-22 Thread Roman D. Boiko
On Tuesday, 22 May 2012 at 10:18:48 UTC, Dejan Lekic wrote: On Tuesday, 22 May 2012 at 10:03:36 UTC, Roman D. Boiko wrote: http://d-coding.com/2012/05/22/is-the-d-community-lacking-development-tools.html My opinion - no. We already have: ... 5) NetbeansD - for NetBeans users Didn't

Re: Is the D community lacking development tools?

2012-05-22 Thread Roman D. Boiko
On Tuesday, 22 May 2012 at 10:59:04 UTC, Jacob Carlborg wrote: On 2012-05-22 12:03, Roman D. Boiko wrote: http://d-coding.com/2012/05/22/is-the-d-community-lacking-development-tools.html I agree with basically everything in that article. I would also appreciate any specific feedback

DCT use cases - draft

2012-05-22 Thread Roman D. Boiko
http://d-coding.com/2012/05/22/dct-use-cases.html

Re: DCT use cases - draft

2012-05-22 Thread Roman D. Boiko
On Tuesday, 22 May 2012 at 14:42:28 UTC, Dmitry Olshansky wrote: On 22.05.2012 18:04, Roman D. Boiko wrote: http://d-coding.com/2012/05/22/dct-use-cases.html >>Find parts of code model by a query (this single point will be >>expanded into its own series of posts) Love this idea.

Re: DCT use cases - draft

2012-05-22 Thread Roman D. Boiko
On Tuesday, 22 May 2012 at 14:48:49 UTC, Denis Shelomovskij wrote: 22.05.2012 18:04, Roman D. Boiko написал: http://d-coding.com/2012/05/22/dct-use-cases.html Please, please, try to rape dmd to do what you want first because otherwise you (like every other existing parsers in IDE) will fail

Re: DCT use cases - draft

2012-05-22 Thread Roman D. Boiko
On Tuesday, 22 May 2012 at 14:48:49 UTC, Denis Shelomovskij wrote: 22.05.2012 18:04, Roman D. Boiko написал: http://d-coding.com/2012/05/22/dct-use-cases.html Please, please, try to rape dmd to do what you want first because otherwise you (like every other existing parsers in IDE) will fail

Re: DCT use cases - draft

2012-05-22 Thread Roman D. Boiko
On Tuesday, 22 May 2012 at 14:56:42 UTC, Dmitry Olshansky wrote: On 22.05.2012 18:45, Roman D. Boiko wrote: On Tuesday, 22 May 2012 at 14:42:28 UTC, Dmitry Olshansky wrote: On 22.05.2012 18:04, Roman D. Boiko wrote: http://d-coding.com/2012/05/22/dct-use-cases.html >>Find parts o

Re: DCT use cases - draft

2012-05-22 Thread Roman D. Boiko
On Tuesday, 22 May 2012 at 15:15:49 UTC, Roman D. Boiko wrote: On Tuesday, 22 May 2012 at 14:56:42 UTC, Dmitry Olshansky wrote: I suggest to go with such kind of improvised notation with more examples until you fell that semantics are crystal clear. This is a possible, although not the only

Re: Is the D community lacking development tools?

2012-05-22 Thread Roman D. Boiko
On Tuesday, 22 May 2012 at 16:23:46 UTC, Kevin Cox wrote: On May 22, 2012 12:13 PM, "s" wrote: +1 for a GUI lib, which is in sync with DMD releases. Is there any way to bind Qt without the dreaded moc and friends? Because that would give you a cross platform solution without too much wor

Re: DCT use cases - draft

2012-05-22 Thread Roman D. Boiko
On Tuesday, 22 May 2012 at 16:03:49 UTC, Dmitry Olshansky wrote: In my mind it's encountered rather soon: lex/scan -> postprocess (may be combined with lex) -> populate symbol tables (ditto - with next step/previous step) -> parse to AST -> ... That symbol table should contain all of the rich

Re: DCT use cases - draft

2012-05-22 Thread Roman D. Boiko
On Tuesday, 22 May 2012 at 16:55:46 UTC, Dmitry Olshansky wrote: On 22.05.2012 20:47, Roman D. Boiko wrote: On Tuesday, 22 May 2012 at 16:03:49 UTC, Dmitry Olshansky wrote: In my mind it's encountered rather soon: lex/scan -> postprocess (may be combined with lex) -> populate sy

Re: DCT use cases - draft

2012-05-22 Thread Roman D. Boiko
On Tuesday, 22 May 2012 at 17:06:43 UTC, Jacob Carlborg wrote: On Tuesday, 22 May 2012 at 14:04:18 UTC, Roman D. Boiko wrote: http://d-coding.com/2012/05/22/dct-use-cases.html I'm really not sure I understand what this is. Is this use cases for a lexer or some other more high leve

Re: DCT use cases - draft

2012-05-22 Thread Roman D. Boiko
On Tuesday, 22 May 2012 at 18:10:59 UTC, Jacob Carlborg wrote: On 2012-05-22 19:14, Roman D. Boiko wrote: This is a draft of use cases for all DCT libraries combined. This seems to be mostly focused on lexing? See below for some ideas. Yeah, about 50% is lexing. I pay more attention to it

Re: Let's schedule WinAPI ASCII functions for deprecation!

2012-05-22 Thread Roman D. Boiko
On Tuesday, 22 May 2012 at 18:39:46 UTC, Dmitry Olshansky wrote: P.S. Let's finally solve encoding problems that should be solved 10 years ago! By the way, Git+TurtoiseGit still has encoding problems on Windows and it is awful (see its changelog). forgot to mention that my GSOC project h

Re: Let's schedule WinAPI ASCII functions for deprecation!

2012-05-22 Thread Roman D. Boiko
On Tuesday, 22 May 2012 at 18:43:58 UTC, Roman D. Boiko wrote: Dmitry, your project looks really cool. As for the topic, I would vote for that, too, but don't have enough knowledge to understand all possible consequences... Especially I liked "...policy based design, thus expos

Re: DCT use cases - draft

2012-05-22 Thread Roman D. Boiko
On Tuesday, 22 May 2012 at 18:59:48 UTC, Jacob Carlborg wrote: On 2012-05-22 20:33, Roman D. Boiko wrote: Yes, and even before that I'm going to document some fundamental primitives, like immutability and core data structures. Wouldn't it be better to start with the use cases? Yo

Re: DCT use cases - draft

2012-05-22 Thread Roman D. Boiko
On Tuesday, 22 May 2012 at 20:31:40 UTC, deadalnix wrote: Le 22/05/2012 20:33, Roman D. Boiko a écrit : On Tuesday, 22 May 2012 at 18:10:59 UTC, Jacob Carlborg wrote: On 2012-05-22 19:14, Roman D. Boiko wrote: This is a draft of use cases for all DCT libraries combined. This seems to be

Re: DCT use cases - draft

2012-05-22 Thread Roman D. Boiko
On Tuesday, 22 May 2012 at 20:31:40 UTC, deadalnix wrote: Le 22/05/2012 20:33, Roman D. Boiko a écrit : On Tuesday, 22 May 2012 at 18:10:59 UTC, Jacob Carlborg wrote: On 2012-05-22 19:14, Roman D. Boiko wrote: This is a draft of use cases for all DCT libraries combined. This seems to be

Re: Interested in being abreast of the GSoC 2012 projects? Here's how

2012-05-23 Thread Roman D. Boiko
On Wednesday, 23 May 2012 at 06:38:54 UTC, Jacob Carlborg wrote: On the other hand if you have a compiler library you can build a tool based on the library that translates D code to Java, C# or perhaps their byte code equivalents. Then you can automatically translate the compiler library to wha

Re: Does D have "structural sharing" of immutable collections?

2012-05-23 Thread Roman D. Boiko
On Wednesday, 23 May 2012 at 14:35:31 UTC, bearophile wrote: Chris Dew: Does D have "structural sharing" of its immutable collections? i.e. Can I make a copy of an immutable Map or List collection with an extra (or mutated) member, and will the returned (new) collection share most of it's st

Re: DCT use cases - draft

2012-05-23 Thread Roman D. Boiko
On Tuesday, 22 May 2012 at 18:33:38 UTC, Roman D. Boiko wrote: I'm reviewing text right now Posted an updated version, but it is still a draft: http://d-coding.com/2012/05/23/dct-use-cases-revised.html

Re: Does D have "structural sharing" of immutable collections?

2012-05-23 Thread Roman D. Boiko
On Wednesday, 23 May 2012 at 18:18:55 UTC, simendsjo wrote: On Wed, 23 May 2012 17:05:21 +0200, Roman D. Boiko wrote: I need some immutable collections for my D Compiler Tools project, namely linked list, red-black tree, and possibly some others. So I'm going to create them for my use

Re: Does D have "structural sharing" of immutable collections?

2012-05-23 Thread Roman D. Boiko
On Wednesday, 23 May 2012 at 18:24:28 UTC, simendsjo wrote: On Wed, 23 May 2012 20:18:54 +0200, simendsjo wrote: On Wed, 23 May 2012 17:05:21 +0200, Roman D. Boiko wrote: I need some immutable collections for my D Compiler Tools project, namely linked list, red-black tree, and possibly

Re: Does D have "structural sharing" of immutable collections?

2012-05-23 Thread Roman D. Boiko
On Wednesday, 23 May 2012 at 18:39:02 UTC, Stewart Gordon wrote: On 23/05/2012 16:05, Roman D. Boiko wrote: I need some immutable collections for my D Compiler Tools project, namely linked list, red-black tree, and possibly some others. What's the point of an immutable red-black tree?

Re: Does D have "structural sharing" of immutable collections?

2012-05-23 Thread Roman D. Boiko
On Wednesday, 23 May 2012 at 18:51:32 UTC, Roman D. Boiko wrote: Immutable collections in most cases have the same performance characteristics as mutable ones. Space consumption may be higher, but not necessarily. Instead of mutating a collection, a new one is returned each time you add or

Re: Interested in being abreast of the GSoC 2012 projects? Here's how

2012-05-23 Thread Roman D. Boiko
On Wednesday, 23 May 2012 at 17:12:15 UTC, Andrew Wiley wrote: I agree with Roman that automated translation to a VM language would probably be a difficult thing to attempt, although I think it could be doable. I don't think the effort/benefit ration is low enough. It's not often that someone n

Re: Does D have "structural sharing" of immutable collections?

2012-05-23 Thread Roman D. Boiko
On Wednesday, 23 May 2012 at 21:13:48 UTC, Andrei Alexandrescu wrote: Okasaki put together the ultimate work on immutable data structures. I have plans to add immutable collections to D containers once I sort out the allocators matter. Unfortunately, I find myself gasping for time so the news t

Re: Does D have "structural sharing" of immutable collections?

2012-05-23 Thread Roman D. Boiko
On Wednesday, 23 May 2012 at 19:51:02 UTC, Steven Schveighoffer wrote: If you need a sorted tree structure that supports sharing immutable state, you likely have to find a different algorithm than redblack, since adding nodes can modify the tree structure via rotates. -Steve I don't need to

Re: Does D have "structural sharing" of immutable collections?

2012-05-23 Thread Roman D. Boiko
On Wednesday, 23 May 2012 at 21:12:04 UTC, Jonathan M Davis wrote: In my personal experience, that's not true at all. I've seen _huge_ performance problems in Haskell when using a map. There may be cases where an immutable container may not pose large performance problems, but I would be _very_

Re: Interested in being abreast of the GSoC 2012 projects? Here's how

2012-05-23 Thread Roman D. Boiko
On Wednesday, 23 May 2012 at 21:50:02 UTC, David Nadlinger wrote: On Wednesday, 23 May 2012 at 21:41:37 UTC, Roman D. Boiko wrote: On Wednesday, 23 May 2012 at 17:12:15 UTC, Andrew Wiley wrote: I agree with Roman that automated translation to a VM language […] It is possible to translate D to

Re: Does D have "structural sharing" of immutable collections?

2012-05-23 Thread Roman D. Boiko
On Wednesday, 23 May 2012 at 22:25:35 UTC, Steven Schveighoffer wrote: I looked up how it could be done, the one thing I was not sure of was the parent node. If you can have multiple references to the same subtree, how do you keep track of the parents. But if you only are concerned about the

Re: Does D have "structural sharing" of immutable collections?

2012-05-23 Thread Roman D. Boiko
On Wednesday, 23 May 2012 at 23:51:45 UTC, bearophile wrote: Roman D. Boiko: The end goal is to have something as easy to work with as collections of Scala or F# (I don't know Haskell), and, of course, efficient. If you plan in creating a start of purely functional collections library

Re: Does D have "structural sharing" of immutable collections?

2012-05-23 Thread Roman D. Boiko
On Thursday, 24 May 2012 at 01:00:52 UTC, Jonathan M Davis wrote: As part of my thesis work, I wrote a program which was counting possible tokens in code (as part of an AI attempting to learn about a programming language), which required a map of tokens to the number of times that they'd been s

Re: Is the D community lacking development tools?

2012-05-24 Thread Roman D. Boiko
On Thursday, 24 May 2012 at 07:55:28 UTC, Mikael Lindsten wrote: On Tuesday, 22 May 2012 at 11:21:14 UTC, Roman D. Boiko wrote: On Tuesday, 22 May 2012 at 10:59:04 UTC, Jacob Carlborg wrote: On 2012-05-22 12:03, Roman D. Boiko wrote: http://d-coding.com/2012/05/22/is-the-d-community-lacking

Live code analysis in DCT

2012-05-24 Thread Roman D. Boiko
http://d-coding.com/2012/05/24/performing-live-analysis-in-dct.html

Re: Does D have "structural sharing" of immutable collections?

2012-05-24 Thread Roman D. Boiko
On Thursday, 24 May 2012 at 13:15:30 UTC, Craig Dillabaugh wrote: I am not sure if I entirely understand your problem, but would a persistent search tree work? See: http://www.sciencedirect.com/science/article/pii/002289900342 I have a small write up on them from a course I took years ago:

Re: Live code analysis in DCT

2012-05-24 Thread Roman D. Boiko
On Thursday, 24 May 2012 at 14:23:27 UTC, Ary Manzana wrote: On 5/24/12 20:02 , dennis luehring wrote: Am 24.05.2012 14:25, schrieb Roman D. Boiko: http://d-coding.com/2012/05/24/performing-live-analysis-in-dct.html for ideas look at the (dead) decent ide - nice examples of great features

Re: Live code analysis in DCT

2012-05-24 Thread Roman D. Boiko
On Thursday, 24 May 2012 at 13:21:58 UTC, Joseph Rushton Wakeling wrote: [from here: http://d-coding.com/2012/05/24/contributing-to-dct.html ] Is there any real reason for such a decision, beyond aesthetics? The whole point of permissive licences such as MIT and Boost is that you can incorpo

Re: Live code analysis in DCT

2012-05-24 Thread Roman D. Boiko
On Thursday, 24 May 2012 at 16:29:04 UTC, Bernard Helyer wrote: On Thursday, 24 May 2012 at 12:25:07 UTC, Roman D. Boiko wrote: http://d-coding.com/2012/05/24/performing-live-analysis-in-dct.html Just sent you an email saying I'm willing to change SDC's license to Boost. Great, thanks!

Re: Is the D community lacking development tools?

2012-05-29 Thread Roman D. Boiko
On Monday, 28 May 2012 at 23:01:24 UTC, Marco Leise wrote: Am Fri, 25 May 2012 18:25:10 +0400 schrieb Dmitry Olshansky But it lacks: - fast editor ;) That's in part due to how unprepared the poor GtkTextView was when it was told to highlight source code. I think it is neither optimized for

Re: Making generalized Trie type in D

2012-06-04 Thread Roman D. Boiko
On Monday, 4 June 2012 at 15:35:31 UTC, Dmitry Olshansky wrote: On 04.06.2012 18:19, Andrei Alexandrescu wrote: On 6/4/12 4:46 AM, Dmitry Olshansky wrote: Cross-posting from my GSOC list as I think we had a lack of D rox posts lately :) [snip] I think it would be great if you converted this

Re: Making generalized Trie type in D

2012-06-04 Thread Roman D. Boiko
On Monday, 4 June 2012 at 12:15:33 UTC, Denis Shelomovskij wrote: 04.06.2012 13:46, Dmitry Olshansky написал: enum keywords = [ "abstract", "alias", "align", //... all of them, except @ ones "__traits" ]; A nitpick: constant arra

Re: Making generalized Trie type in D

2012-06-04 Thread Roman D. Boiko
On Monday, 4 June 2012 at 19:18:32 UTC, Dmitry Olshansky wrote: On 04.06.2012 22:42, Roman D. Boiko wrote: ... it is possible to create persistent (immutable) tries with efficient (log N) inserting / deleting (this scenario is very important for my DCT project). Immutable hash tables would

Re: opCaret to complement opDollar when specifying slices

2012-06-04 Thread Roman D. Boiko
On Monday, 4 June 2012 at 20:26:52 UTC, Steven Schveighoffer wrote: On Mon, 04 Jun 2012 16:13:49 -0400, Mehrdad Can you use "null"? Hm... now that null has its own type, I likely could. I suppose that would map properly to 0. -Steve But if the key is non-nullable this might be confusing, or

Re: Making generalized Trie type in D

2012-06-04 Thread Roman D. Boiko
On Monday, 4 June 2012 at 20:40:03 UTC, Dmitry Olshansky wrote: [snip] Sorry my Trie implementation focused on "constructe once - read everywhere" case. My cases will likely have quite low amortized number of reads per insert / delete. How do you handle situations when not existent, etc., is

Re: Making generalized Trie type in D

2012-06-04 Thread Roman D. Boiko
On Monday, 4 June 2012 at 21:07:02 UTC, Roman D. Boiko wrote: For example, one by one would allow ignoring key encoding (and thus using multiple encodings simultaneously just as easily as single). It's just as easy with the whole thing. Treat it as bytes ;) Except when equivalent ke

Re: Making generalized Trie type in D

2012-06-04 Thread Roman D. Boiko
On Monday, 4 June 2012 at 21:39:50 UTC, Dmitry Olshansky wrote: And before you run away with that horrible idea of ever decoding UTF in lexer... Just don't do that. Trust me, it's not as small a price as it seems at first. At least keep it only at prototype stage as it simplifies things. I didn

Re: Making generalized Trie type in D

2012-06-04 Thread Roman D. Boiko
On Monday, 4 June 2012 at 21:39:50 UTC, Dmitry Olshansky wrote: On 05.06.2012 1:16, Roman D. Boiko wrote: I believe that once encoidng is established your compiler tool should use the best code for that encoding. And that means templates, tailored per encoding in my book. If anything I plan

Re: Making generalized Trie type in D

2012-06-04 Thread Roman D. Boiko
On Monday, 4 June 2012 at 22:06:49 UTC, Dmitry Olshansky wrote: On 05.06.2012 1:56, Roman D. Boiko wrote: Will it be difficult to adapt your API for immutable tries? E.g., it is not possible to implement immutable sequence (linked list) as a range, Linked list? I'm horrified. Though I&#

Re: Making generalized Trie type in D

2012-06-04 Thread Roman D. Boiko
On Monday, 4 June 2012 at 22:21:42 UTC, Dmitry Olshansky wrote: And you can fake immutability, buy always picking up an unused slot btw. No need to go beyond logical immutability. That's applicable in some cases, not in general. But I agree that often it is possible to optimize if use cases are

Re: Making generalized Trie type in D

2012-06-04 Thread Roman D. Boiko
On Tuesday, 5 June 2012 at 04:42:07 UTC, Dmitry Olshansky wrote: On 05.06.2012 2:28, Roman D. Boiko wrote: My example concern was about fundamental problem of range APIs for immutable data structures, which is not possible to emulate: popFront is mutating by design. Keep in mind Ranges are

Re: Making generalized Trie type in D

2012-06-04 Thread Roman D. Boiko
On Monday, 4 June 2012 at 22:22:34 UTC, Roman D. Boiko wrote: On Monday, 4 June 2012 at 22:06:49 UTC, Dmitry Olshansky wrote: On 05.06.2012 1:56, Roman D. Boiko wrote: so range API doesn't fit that (but could with a tweak - returning tail instead of mutating in popFront). If trie API

Re: Making generalized Trie type in D

2012-06-04 Thread Roman D. Boiko
On Tuesday, 5 June 2012 at 05:28:48 UTC, Roman D. Boiko wrote: ... without deep analysis I can't come up with a good API / design for that (without overcomplicating it). Probably keeping mutable and immutable APIs separate is the best choice. Will return to this problem once I get a b

Re: Making generalized Trie type in D

2012-06-05 Thread Roman D. Boiko
On Tuesday, 5 June 2012 at 12:57:10 UTC, Dmitry Olshansky wrote: On 05.06.2012 9:33, Roman D. Boiko wrote: On Tuesday, 5 June 2012 at 05:28:48 UTC, Roman D. Boiko wrote: ... without deep analysis I can't come up with a good API / design for that (without overcomplicating it). Probably ke

Porting VisualD to Windows 8 and Visual Studio 11

2012-06-10 Thread Roman D. Boiko
https://github.com/roman-d-boiko/visuald/commit/65d733853ea7c38dd010091c942b66ef892bd216#diff-0 Please review. It is not finished, but I would like to get some feedback. Note: support for previous versions of Windows and VS is temporarily broken to speed-up my current work. Later my changes

Re: Porting VisualD to Windows 8 and Visual Studio 11

2012-06-10 Thread Roman D. Boiko
On Sunday, 10 June 2012 at 08:38:05 UTC, Roman D. Boiko wrote: https://github.com/roman-d-boiko/visuald/commit/65d733853ea7c38dd010091c942b66ef892bd216#diff-0 Please review. It is not finished, but I would like to get some feedback. Note: support for previous versions of Windows and VS is

Re: Porting VisualD to Windows 8 and Visual Studio 11

2012-06-10 Thread Roman D. Boiko
On Sunday, 10 June 2012 at 08:38:59 UTC, Roman D. Boiko wrote: By the way, did anybody try doing this before? Just found that http://dsource.org/projects/visuald/browser/downloads/VisualD-v0.3.33rc1.exe supports VS 11 :) (Is it for beta or RC?) But after installing it nothing changed in VS

Re: Porting VisualD to Windows 8 and Visual Studio 11

2012-06-10 Thread Roman D. Boiko
On Sunday, 10 June 2012 at 10:13:40 UTC, Roman D. Boiko wrote: But after installing it nothing changed in VS, new project types have not been created. TOOLS->Options now contain settings for D.

Re: Porting VisualD to Windows 8 and Visual Studio 11

2012-06-10 Thread Roman D. Boiko
On Sunday, 10 June 2012 at 10:18:42 UTC, Roman D. Boiko wrote: On Sunday, 10 June 2012 at 10:13:40 UTC, Roman D. Boiko wrote: But after installing it nothing changed in VS, new project types have not been created. TOOLS->Options now contain settings for D. After reboot I can create proje

  1   2   3   >