D-style mixins in C#

2012-08-30 Thread Aleksandar Ružičić
Not really about D, but it's nice to see C# feature (although not official, and some may call it even a hack) inspired by D :) http://blogs.jetbrains.com/dotnet/2012/08/resharper-sdk-adventures-part-5-%E2%80%94-d-style-mixins-in-c/ There's also a HN discussion: http://news.ycombinator.com/item

Re: [OT] Windows users: Are you happy with git?

2012-05-18 Thread Aleksandar Ružičić
On Friday, 18 May 2012 at 07:58:26 UTC, Lars T. Kyllingstad wrote: I remember back when we were considering whether to move DMD, Phobos and druntime from SVN on DSource to Git on GitHub, there were some concerns about using Git on Windows. People claimed that Git was a very Linux-centric tool,

Re: Do not write object file?

2012-05-17 Thread Aleksandar Ružičić
On Thursday, 17 May 2012 at 10:16:38 UTC, Andre Tampubolon wrote: Every time I compile a D code, an .obj file is generated. Is there any to prevent that? I tried "dmd -o- hello.d". Indeed there's no obj file. And no executable, too. Maybe this is a bug? If you don't want object files to be ge

Re: What about x64 windows?

2012-04-11 Thread Aleksandar Ružičić
On Wednesday, 11 April 2012 at 12:45:08 UTC, Davita wrote: Hi guys. Is there a going development on x64 compiler for windows? Or D won't support x64 at all? Thanks As far as I know, optlink (linker used by dmd on windows) cannot output 64bit binaries, so until optlink gets upgraded (or unti

Re: Vote on std.regex (FReD)

2011-10-23 Thread Aleksandar Ružičić
Yes

Re: Proposal on improvement to deprecated

2011-10-03 Thread Aleksandar Ružičić
What about using an attribute for that? deprecated("foo() is deprecated use bar()") void foo() {...} @schedule deprecated("foo() is going to be deprecated as of -MM-DD, use bar() instead") void foo() {...} First form will behave like just it does now, with optional message argument. Secon

Re: Complete D grammar

2011-04-04 Thread Aleksandar Ružičić
On Mon, Apr 4, 2011 at 8:58 PM, Andrei Alexandrescu wrote: > Aleksandar, would you be willing to work with the student working on ANTLR > as a mentor? Please let me know and I'll send details about applying as a > mentor. Well, I'm also a student :) So I'm not sure if I really can be a mentor (23

Re: Complete D grammar

2011-04-04 Thread Aleksandar Ružičić
On Mon, Apr 4, 2011 at 9:05 PM, Steven Schveighoffer wrote: > On Mon, 04 Apr 2011 14:51:02 -0400, Aleksandar Ružičić > wrote: > >> On Mon, Apr 4, 2011 at 8:11 PM, Bruno Medeiros >> wrote: >>> >>> BTW, I wanna thank for this work (current and upcoming), it

Re: New look & feel for std.algorithm

2011-04-04 Thread Aleksandar Ružičić
This is much better than current style of documentation. But still I find D (phobos) documentation hard to read because there are dozens functions on one page. I think that's ok for reference documentation, but I think that for newcomers (myself included) is much easier to follow documentation in

Re: Complete D grammar

2011-04-04 Thread Aleksandar Ružičić
On Mon, Apr 4, 2011 at 8:11 PM, Bruno Medeiros wrote: > > BTW, I wanna thank for this work (current and upcoming), it is likely useful > for other IDE projects as well ;) > Ditto. I have started work on D language support for NetBeans (IMHO it's MUCH better editor than Eclipse) and started to wr

Re: std.string.indexOf with an optional start-at parameter?

2011-04-04 Thread Aleksandar Ružičić
On Mon, Apr 4, 2011 at 3:18 PM, Steven Schveighoffer wrote: > On Sun, 03 Apr 2011 14:24:33 -0400, spir wrote: >> Agreed this is a fairly standard param in other languages, but D easily >> (and rather cheaply) allows >>     auto pos = indexOf(s[i..$], char); > > That doesn't work, because it gets

Re: Forking phobos

2011-04-03 Thread Aleksandar Ružičić
ore5bitop3btsFNbPkkZi ..\druntime\lib\druntime.lib(gcx) Error 42: Symbol Undefined _D4core5bitop3btrFNbPkkZi --- errorlevel 4 (plus 2 broken tests) Do I need latest DMD from github? On Sun, Apr 3, 2011 at 11:30 PM, Jonathan M Davis wrote: > On 2011-04-03 12:48, Aleksandar Ružičić wrote: &

Re: std.string.indexOf with an optional start-at parameter?

2011-04-03 Thread Aleksandar Ružičić
On Sun, Apr 3, 2011 at 10:56 PM, KennyTM~ wrote: >> And javascript _does_ have true arrays, but it _doesn't_ have true >> associative arrays (those are object literals). >> > > I would not call it a true array if it is indexed by string internally. > Anyway, this is not the main point. > You're r

Re: std.string.indexOf with an optional start-at parameter?

2011-04-03 Thread Aleksandar Ružičić
> You mean Python and Ruby. > >  - Javascript does not support negative index. In fact, JS has no true > arrays, it only has associative array. >  - PHP does not support negative index. http://ideone.com/8MZ2T I was talking about javascript's String.prototype.indexOf () and php's strpos functions,

Forking phobos

2011-04-03 Thread Aleksandar Ružičić
I want to fork Phobos and hack a bit on it (maybe even submit some pull requests, someday), but I'm having trouble compiling it (on windows). This is what I've done: - forked phobos on github - cloned the fork to my machine - run make -f win32.mak and make complained that it can't make druntim

Re: std.string.indexOf with an optional start-at parameter?

2011-04-03 Thread Aleksandar Ružičić
On Sun, Apr 3, 2011 at 8:16 PM, Andrei Alexandrescu wrote: > It's not. Seems I've missed that in the docs, I tought it will always make a copy :) > I think that's a natural and simple improvement of indexOf. The one aspect > that I'm unsure about is starting from the end for negative indices. N

Re: std.string.indexOf with an optional start-at parameter?

2011-04-03 Thread Aleksandar Ružičić
', -5)). On Sun, Apr 3, 2011 at 7:55 PM, Robert Jacques wrote: > On Sun, 03 Apr 2011 13:39:40 -0400, Aleksandar Ružičić > wrote: > >> I needed std.string.indexOf to accept start position in the string to >> start the search at. I was really surprised when I rea

std.string.indexOf with an optional start-at parameter?

2011-04-03 Thread Aleksandar Ružičić
I needed std.string.indexOf to accept start position in the string to start the search at. I was really surprised when I realized that this (to me) standard parameter is "missing" (I'm used to indexOf in javascript, strpos in php and equivalent methods in other languages, which support start offset

Re: Is the world coming to an end?

2011-04-02 Thread Aleksandar Ružičić
Nice to see awkward octal literal syntax being removed from Phobos! :) On Sat, Apr 2, 2011 at 10:16 PM, Andrej Mitrovic wrote: > https://github.com/D-Programming-Language/phobos/commit/83f99df573c089cc186ef370cb691c2f8a25c873 > https://github.com/D-Programming-Language/phobos/commit/88904f7795a94

Re: Asynchronicity in D

2011-03-31 Thread Aleksandar Ružičić
I really like design of node.js (http://nodejs.org) it's internally based on libev and everything runs in a single-threaded event loop. It's proven to be highly concurrent and memory efficient. Maybe a wrapper around libev(ent) for D ala node.js would be good solution for asynchronous API, other t

Re: Asynchronicity in D

2011-03-31 Thread Aleksandar Ružičić
I really like design of node.js (http://nodejs.org) it's internally based on libev and everything runs in a single-threaded event loop. It's proven to be highly concurrent and memory efficient. Maybe a wrapper around libev(ent) for D ala node.js would be good solution for asynchronous API, other t

Re: std.algorithm.remove using SwapStrategy.unstable doesn't works

2010-11-16 Thread Aleksandar Ružičić
filed as Issue #5224 - http://d.puremagic.com/issues/show_bug.cgi?id=5224 regards, Aleksandar 2010/11/16 Aleksandar Ružičić : > No problem, just to isolate the code and to confirm it's not something > to other parts of my code (but I'm pretty sure it's not). > > On T

Re: std.algorithm.remove using SwapStrategy.unstable doesn't works

2010-11-16 Thread Aleksandar Ružičić
No problem, just to isolate the code and to confirm it's not something to other parts of my code (but I'm pretty sure it's not). On Tue, Nov 16, 2010 at 7:03 PM, Andrei Alexandrescu wrote: > On 11/16/10 4:24 AM, Aleksandar Ružičić wrote: >> >> I'm trying to

std.algorithm.remove using SwapStrategy.unstable doesn't works

2010-11-16 Thread Aleksandar Ružičić
I'm trying to use remove() from std.algorithm to remove item from an array and when I tried to use SwapStrategy.unstable (as I don't need to maintain order of items in array and I want to optimize where ever I can) I came to surprising results. In the example below one would expect that item at ind