On Wednesday, September 14, 2011 05:43:37 %u wrote:
> i have qustion why filter can't return int[]
> and if lambda return the last Expression without return keyword it would
> much cleaner
filter can't return int[]. filter does not alter the original array. It returns
a new range with only the e
i have qustion why filter can't return int[]
and if lambda return the last Expression without return keyword it would much
cleaner
On Tue, 13 Sep 2011 10:59:27 +0300, Dainius (GreatEmerald) wrote:
> Is there any library that would allow me to use the extended terminal
> features (like coloured backgrounds and custom/multiple resolution
> support) that works with D and is not platform-dependent? Something
> similar to ncurses?
On 09/14/2011 04:12 AM, Timon Gehr wrote:
On 09/14/2011 03:34 AM, hdsh wrote:
this my try
int[] quickSort(int[] arr) {
int[] result = quickSort(filter!(arr< arr[0])(arr)) ~ arr[0] ~
quickSort(filter!(arr> arr[0])(arr));
}
but it fail to compile
Note that this approach is an inefficient way o
On 09/14/2011 03:34 AM, hdsh wrote:
this my try
int[] quickSort(int[] arr) {
int[] result = quickSort(filter!(arr< arr[0])(arr)) ~ arr[0] ~
quickSort(filter!(arr> arr[0])(arr));
}
but it fail to compile
Note that this approach is an inefficient way of implementing a sorting
routine.
On Wednesday, September 14, 2011 01:34:34 hdsh wrote:
> this my try
>
> int[] quickSort(int[] arr) {
> int[] result = quickSort(filter!(arr < arr[0])(arr)) ~ arr[0] ~
> quickSort(filter!(arr > arr[0])(arr));
> }
>
> but it fail to compile
filter does not return an array. It returns a new ran
this my try
int[] quickSort(int[] arr) {
int[] result = quickSort(filter!(arr < arr[0])(arr)) ~ arr[0] ~
quickSort(filter!(arr > arr[0])(arr));
}
but it fail to compile
On Tuesday, September 13, 2011 15:34 Caligo wrote:
> On Tue, Sep 13, 2011 at 4:47 AM, Jonathan M Davis
wrote:
> > On Monday, September 12, 2011 23:15:19 Caligo wrote:
> > > On Mon, Sep 12, 2011 at 10:44 PM, Jonathan M Davis
> >
> > wrote:
> > > > On Monday, September 12, 2011 22:38:25 Caligo wrot
On Tue, Sep 13, 2011 at 4:47 AM, Jonathan M Davis wrote:
> On Monday, September 12, 2011 23:15:19 Caligo wrote:
> > On Mon, Sep 12, 2011 at 10:44 PM, Jonathan M Davis
> wrote:
> > > On Monday, September 12, 2011 22:38:25 Caligo wrote:
> > > > Great. So is it a known bug?
> > >
> > > I don't know.
On 09/13/2011 02:59 AM, Dainius (GreatEmerald) wrote:
Is there any library that would allow me to use the extended terminal
features (like coloured backgrounds and custom/multiple resolution
support) that works with D and is not platform-dependent? Something
similar to ncurses? I know that there
On Tuesday, September 13, 2011 15:45:27 Vladimir Panteleev wrote:
> On Tue, 13 Sep 2011 06:27:44 +0300, Jonathan M Davis
>
> wrote:
> > Personally, I'd just Duration far those and not TickDuration. Duration
> > is just
> > as precise (if not more precise) than TickDuration as long as the system
>
On Tuesday, September 13, 2011 07:43:55 bearophile wrote:
> Jonathan M Davis:
> > However, Foo.y is not encapsulated
> > by a strongly pure function at all. Other functions can alter alter it.
> > So, it breaks purity.
>
> Thank you for your explanation :-)
>
> So, let's change the situation a bi
bearophile Wrote:
> So, let's change the situation a bit. If the struct Foo is the only thing
> present in a module (to avoid someone to touch its private members), and the
> y field is "private static" only foo2 is able to touch it. In this case isn't
> foo2 weakly pure?
Weakly pure function
bearophile , dans le message (digitalmars.D.learn:29490), a écrit :
> Jonathan M Davis:
>
>> However, Foo.y is not encapsulated
>> by a strongly pure function at all. Other functions can alter alter it. So,
>> it
>> breaks purity.
>
> Thank you for your explanation :-)
>
> So, let's change th
On Tue, 13 Sep 2011 06:27:44 +0300, Jonathan M Davis
wrote:
Personally, I'd just Duration far those and not TickDuration. Duration
is just
as precise (if not more precise) than TickDuration as long as the system
ticks
aren't less than 1 hnsec apart. TickDuration is useful in that it gives
Jonathan M Davis:
> However, Foo.y is not encapsulated
> by a strongly pure function at all. Other functions can alter alter it. So,
> it
> breaks purity.
Thank you for your explanation :-)
So, let's change the situation a bit. If the struct Foo is the only thing
present in a module (to avoi
On Monday, September 12, 2011 23:15:19 Caligo wrote:
> On Mon, Sep 12, 2011 at 10:44 PM, Jonathan M Davis
wrote:
> > On Monday, September 12, 2011 22:38:25 Caligo wrote:
> > > Great. So is it a known bug?
> >
> > I don't know. You'd have to search bugzilla: d.puremagic.com/issues
> >
> > - Jonat
Is there any library that would allow me to use the extended terminal
features (like coloured backgrounds and custom/multiple resolution
support) that works with D and is not platform-dependent? Something
similar to ncurses? I know that there was a dcurses project, but it
seems that it only works w
18 matches
Mail list logo