On Saturday, February 23, 2013 08:26:57 dennis luehring wrote:
> func(a,b,c)
>
> can be written as a.func(b,c)
>
> is there a good reason
>
> for not allwing
>
> (a,b).func(c)
>
> or even
>
> (a,b,c).func()?
>
> for me it feels natural
Because that's not what member functions look like. The
func(a,b,c)
can be written as a.func(b,c)
is there a good reason
for not allwing
(a,b).func(c)
or even
(a,b,c).func()?
for me it feels natural
I have the same issue with my Boost.units port:
https://github.com/Arlen/phobos/blob/std_units/std/units.d
DMD runs out of memory and that's why I've had to comment out most of the
definitions. I haven't tried separate compilation, yet.
Arlen
On Sat, Feb 16, 2013 at 3:37 AM, deadalnix wrote:
2013/2/23 deadalnix
> On Friday, 22 February 2013 at 18:55:58 UTC, kenji hara wrote:
>
>> No, const/inout overload does not intend to solve 'method hiding' problem.
>>
>> To clarify the situation, I try to explain.
>>
>> class A {
>> void foo() {}
>> void foo() const {}
>> }
>>
>>
> You misse
On Saturday, 23 February 2013 at 06:15:38 UTC, Jonathan M Davis
wrote:
Which then makes it so that the function can't be pure. While
overloading on
constness may be infrequently needed, we're definitely losing
something useful
if we can't do it anymore.
Note that is const is considered to be
On Saturday, February 23, 2013 07:07:51 deadalnix wrote:
> On Friday, 22 February 2013 at 20:32:59 UTC, Jonathan M Davis
>
> wrote:
> > On Friday, February 22, 2013 14:31:55 Steven Schveighoffer
> >
> > wrote:
> >> It is probably rare to have both a const and non-const
> >> overload, that is
> >>
On Friday, 22 February 2013 at 20:32:59 UTC, Jonathan M Davis
wrote:
On Friday, February 22, 2013 14:31:55 Steven Schveighoffer
wrote:
It is probably rare to have both a const and non-const
overload, that is
true, but it is not up to D to decide what design is best. We
should take
the most flex
On Friday, 22 February 2013 at 18:55:58 UTC, kenji hara wrote:
No, const/inout overload does not intend to solve 'method
hiding' problem.
To clarify the situation, I try to explain.
class A {
void foo() {}
void foo() const {}
}
You missed the important part. I'm talking about overload,
"Iain Buclaw" wrote in message
news:yhylqjyqkfrebukid...@forum.dlang.org...
>>
>> Aren't supposed to go away at some point ?
>
> Maybe... but as they got added as being semantically valid in 2.061,
> requires minimal changes to make it handled by the compiler backend for
> gdc.
>
Not quite, th
On 2/22/13 10:07 PM, bearophile wrote:
That's another commonly useful function, often named table(), similar to
map() but doesn't pass an index to the callable:
http://reference.wolfram.com/mathematica/ref/Table.html
So it becomes something like:
10.table!({ return letters.choice; }).writeln;
On 02/22/2013 05:07 PM, bearophile wrote:
> Ali Çehreli:
>
>> auto pickOne(R)(R range)
>> // insert template constraints here ... :)
>> {
>> return range[uniform(0, range.length)];
>> }
>
> That's the function choice() I'd like in Phobos:
> http://d.puremagic.com/issues/show_bug.cgi?id=4851
Agree
On 02/22/2013 01:10 PM, Andrej Mitrovic wrote:
On 2/22/13, Marco Leise wrote:
But obviously you cannot offer downloads of Windows.
There's this: http://www.microsoft.com/en-us/download/details.aspx?id=11575
But this is a VirtualPC image. Perhaps it can be converted to a
virtualbox machine th
Ali Çehreli:
auto pickOne(R)(R range)
// insert template constraints here ... :)
{
return range[uniform(0, range.length)];
}
That's the function choice() I'd like in Phobos:
http://d.puremagic.com/issues/show_bug.cgi?id=4851
Note that:
range[uniform(0, range.length)];
is written more
On 02/22/2013 04:23 PM, Jens Mueller wrote:
Hi,
I'd like to sample with replacement. But found no simple way.
In particular I want to generate a random string of given letters, say
std.ascii.letters.
Anybody a simpler version than
auto randomString = repeat('a').take(10).map!(c => randomSampl
Hi,
I'd like to sample with replacement. But found no simple way.
In particular I want to generate a random string of given letters, say
std.ascii.letters.
Anybody a simpler version than
auto randomString = repeat('a').take(10).map!(c => randomSample(letters, 1,
letters.length))().joiner();
?
didn't fully formulate that thought:
above examples vs. the following
struct Fraction
{
long numerator;
long denominator;
double value() const @property
{
return cast(double)numerator / denominator;
}
auto opPseudonym() { /* points to value() ? */ }
alias op
On Friday, 22 February 2013 at 23:20:55 UTC, Timon Gehr wrote:
auto opPseudonym() { ... }
alias opPseudonym=foo;
Isn't that creating multiple functions for the same thing?
struct Fraction
{
long numerator;
long denominator;
double value() const @property
{
return ca
On 02/23/2013 12:10 AM, Joshua Niehus wrote:
On Friday, 22 February 2013 at 21:23:04 UTC, Timon Gehr wrote:
[snip].. or the alias this syntax should be deprecated in favour of a
specially named member function.
pseudonym foo;
auto opPseudonym() { ... }
alias opPseudonym=foo;
On Friday, 22 February 2013 at 21:23:04 UTC, Timon Gehr wrote:
[snip].. or the alias this syntax should be deprecated in
favour of a specially named member function.
pseudonym foo;
There is no justification for this.
I guess the main issue is that alias blah this; shouldn't have
made it into the grammar in the first place. But this was
obviously done in order to establish a broken analogy to the
other uses of alias. Either alias this=blah; must be kept or
the alias this
On 02/22/2013 07:30 PM, Marco Leise wrote:
Am Fri, 22 Feb 2013 09:38:48 -0800
schrieb Ali Çehreli :
I appreciate everybody's contributions to D but that is not an
intention, that is a change to dmd that caused a regression. A syntax
that used to work in the previous version simply stopped worki
On 02/22/2013 03:51 PM, Martin wrote:
struct Test
{
int i;
alias this = i;
}
Worked fine in 2.061 but in 2.062 I get the errors
"Error: no identifier for declarator this" and "Error: alias cannot have
initializer".
Was something changed intentionally or is this a bug?
It is (embarra
On 02/22/2013 04:51 AM, FG wrote:
Those are two different approaches:
D starts lua, and lua finishes before D.
It's _embedding_ LUA in D. Can be easily done now.
Try lua starts D, and D finishes before lua.
It's _extending_ LUA with D. Requires good D shared library support. :(
Thanks
Jonathan M Davis:
I don't believe that either Walter or Andrei has ever
suggested getting rid of them.
Andrei has suggested few times to implement a fixnum in Phobos
instead of the built-in cent/ucent, and he was quite against a
recent change that makes allows programmers to know if the
cur
On Friday, February 22, 2013 19:29:02 deadalnix wrote:
> So I'm sorry if that appears completely stupid, but . . .
>
> DUB sounds kind of like dumb. As Orbit sounds very nice,
> especially since libraries are satellites of mars, so it make
> sense to see other libs as artificial satellites :D
>
>
On Friday, February 22, 2013 14:31:55 Steven Schveighoffer wrote:
> It is probably rare to have both a const and non-const overload, that is
> true, but it is not up to D to decide what design is best. We should take
> the most flexible approach, and allow designers to come up with whatever
> ideas
On Fri, 22 Feb 2013 13:17:06 -0500, Sönke Ludwig
wrote:
Am 21.02.2013 18:17, schrieb Sönke Ludwig:
Oh sorry, the problem is that I generated the docs on Windows and the
two files differ just by the case of the first character - so one was
overwritten by the other. I'll regenerate them on L
On Fri, 22 Feb 2013 13:18:34 -0500, deadalnix wrote:
On Friday, 22 February 2013 at 17:25:58 UTC, kenji hara wrote:
2013/2/23 deadalnix
On Friday, 22 February 2013 at 15:32:42 UTC, kenji hara wrote:
Yes, then the B's definition should raise "mutable A.foo() is not
overridden but hidden in
Was something changed intentionally or is this a bug?
It was changed intentionally, but only for alias this. That
syntax is allowed still for other aliases.
Bye,
bearophile
I see, thanks. What was the reason for not allowing alias
this = identifier?
Requiring lookahead when parsing.
Al
On 2/22/13, Marco Leise wrote:
> That said I started using "alias this = ..." as well and was
> surprised it was removed, but noticed it in time as a DFeed
> line on IRC.
It will be documented in the changelog once
https://github.com/D-Programming-Language/d-programming-language.org/pull/284
is p
On 2/22/13, Marco Leise wrote:
> But obviously you cannot offer downloads of Windows.
There's this: http://www.microsoft.com/en-us/download/details.aspx?id=11575
But this is a VirtualPC image. Perhaps it can be converted to a
virtualbox machine though.
2013/2/23 deadalnix
> On Friday, 22 February 2013 at 17:25:58 UTC, kenji hara wrote:
>
>> 2013/2/23 deadalnix
>>
>> On Friday, 22 February 2013 at 15:32:42 UTC, kenji hara wrote:
>>>
>>> Yes, then the B's definition should raise "mutable A.foo() is not
overridden but hidden in B" (but doe
Am Fri, 22 Feb 2013 09:38:48 -0800
schrieb Ali Çehreli :
> I appreciate everybody's contributions to D but that is not an
> intention, that is a change to dmd that caused a regression. A syntax
> that used to work in the previous version simply stopped working in
> 2.062. That is the definition
On Saturday, 16 February 2013 at 17:10:33 UTC, Sönke Ludwig wrote:
With the recent talk about Orbit, I thought it is time to also
announce
the package manager that we have been working out based on the
simple
VPM system that has always been in vibe.d. I don't really like
stepping
into competiti
On 02/22/2013 09:27 AM, Ali Çehreli wrote:
On 02/22/2013 09:08 AM, Ali Çehreli wrote:
On 02/22/2013 06:55 AM, bearophile wrote:
> Martin:
>
>> Was something changed intentionally or is this a bug?
>
> It was changed intentionally, but only for alias this. That syntax is
> allowed still for other
On Friday, 22 February 2013 at 17:25:58 UTC, kenji hara wrote:
2013/2/23 deadalnix
On Friday, 22 February 2013 at 15:32:42 UTC, kenji hara wrote:
Yes, then the B's definition should raise "mutable A.foo() is
not
overridden but hidden in B" (but doesn't because of bug 8366).
I don't really
Am 21.02.2013 18:17, schrieb Sönke Ludwig:
> Am 21.02.2013 17:02, schrieb Robert:
>> On Wed, 2013-02-20 at 23:13 +0100, Sönke Ludwig wrote:
>>> Am 20.02.2013 18:45, schrieb Rob T:
I use this experimental sample website regularly for Phobos
documentation because it's organized much better
On Sunday, 17 February 2013 at 12:20:15 UTC, deadalnix wrote:
On Sunday, 17 February 2013 at 05:25:28 UTC, kenji hara wrote:
2013/2/17 deadalnix
On Saturday, 16 February 2013 at 09:54:10 UTC, Walter Bright
wrote:
On 2/16/2013 1:37 AM, deadalnix wrote:
I cannot use separate compilation to
On Friday, 22 February 2013 at 17:38:49 UTC, Ali Çehreli wrote:
I appreciate everybody's contributions to D but that is not an
intention, that is a change to dmd that caused a regression. A
syntax that used to work in the previous version simply stopped
working in 2.062. That is the definition
Am Fri, 22 Feb 2013 12:02:01 +0100
schrieb Jacob Carlborg :
> I was thinking if it would be a good idea to setup a virtual machine
> with a development environment for D. The virtual machine would contain
> everything needed to start development using D and to start contributing
> to D.
>
> Va
On Friday, 22 February 2013 at 17:38:49 UTC, Ali Çehreli wrote:
I have a feeling that there must have been some newsgroup
discussions as well but unfortunately I must have been busy
with other things at the time. Not all of us read github.
Ali
You should not have to, and this is a problem w
On Fri, Feb 22, 2013 at 06:40:34PM +0100, Andrej Mitrovic wrote:
> On 2/22/13, Jacob Carlborg wrote:
> > Perhaps we can setup something that uses this for automatically
> > finding the breaking commits.
>
> We would also need this script to automatically checkout commits for
> DMD+Druntime+Phobos
On 02/22/2013 09:28 AM, kenji hara wrote:
> 2013/2/23 Ali Çehreli
>
>> On 02/22/2013 06:55 AM, bearophile wrote:
>>> Martin:
>>>
Was something changed intentionally or is this a bug?
>>>
>>> It was changed intentionally, but only for alias this. That syntax is
>>> allowed still for other alia
On 2/22/13, Jacob Carlborg wrote:
> Perhaps we can setup something that uses this for automatically finding
> the breaking commits.
We would also need this script to automatically checkout commits for
DMD+Druntime+Phobos which are known to work together. Sometimes you're
reducing a Phobos bug, bu
On 02/22/2013 09:08 AM, Ali Çehreli wrote:
On 02/22/2013 06:55 AM, bearophile wrote:
> Martin:
>
>> Was something changed intentionally or is this a bug?
>
> It was changed intentionally, but only for alias this. That syntax is
> allowed still for other aliases.
It is a regression at best
2013/2/23 Ali Çehreli
> On 02/22/2013 06:55 AM, bearophile wrote:
> > Martin:
> >
> >> Was something changed intentionally or is this a bug?
> >
> > It was changed intentionally, but only for alias this. That syntax is
> > allowed still for other aliases.
>
> It is a regression at best because it
2013/2/23 deadalnix
> On Friday, 22 February 2013 at 15:32:42 UTC, kenji hara wrote:
>
>> Yes, then the B's definition should raise "mutable A.foo() is not
>> overridden but hidden in B" (but doesn't because of bug 8366).
>>
>>
> I don't really understand why adding a special case for something t
On 02/22/2013 06:55 AM, bearophile wrote:
> Martin:
>
>> Was something changed intentionally or is this a bug?
>
> It was changed intentionally, but only for alias this. That syntax is
> allowed still for other aliases.
It is a regression at best because it is nowhere to be found in the
changelo
On Friday, 22 February 2013 at 15:31:43 UTC, Martin wrote:
On Friday, 22 February 2013 at 15:07:29 UTC, deadalnix wrote:
On Friday, 22 February 2013 at 14:58:02 UTC, Martin wrote:
On Friday, 22 February 2013 at 14:55:19 UTC, bearophile wrote:
Martin:
Was something changed intentionally or is
On Friday, 22 February 2013 at 15:32:42 UTC, kenji hara wrote:
Yes, then the B's definition should raise "mutable A.foo() is
not
overridden but hidden in B" (but doesn't because of bug 8366).
I don't really understand why adding a special case for something
that has no real use case.
On Fri, 22 Feb 2013 11:09:31 -0500, Steven Schveighoffer
wrote:
class X {}
class Y : X {}
class A {
void foo(Y y) {}
}
class B {
override void foo(X x) {}
}
Oops, should be class B : A
-Steve
On Fri, 22 Feb 2013 10:04:23 -0500, deadalnix wrote:
On Thursday, 21 February 2013 at 14:17:16 UTC, Steven Schveighoffer
wrote:
Explain me how the hell you overload on implicit parameter types ?
A method is simply a function that takes a hidden parameter of an
object or struct.
Really,
On Friday, February 22, 2013 14:44:08 deadalnix wrote:
> On Friday, 22 February 2013 at 13:31:18 UTC, Iain Buclaw wrote:
> > http://dlang.org/abi.html
> >
> > This is undocumented - and probably should be raised as a bug
> > as is not defined.
> >
> > Thanks
> > Iain.
>
> Aren't supposed to go a
On Friday, 22 February 2013 at 15:07:29 UTC, deadalnix wrote:
On Friday, 22 February 2013 at 14:58:02 UTC, Martin wrote:
On Friday, 22 February 2013 at 14:55:19 UTC, bearophile wrote:
Martin:
Was something changed intentionally or is this a bug?
It was changed intentionally, but only for al
2013/2/23 deadalnix
> On Friday, 22 February 2013 at 15:15:02 UTC, kenji hara wrote:
>
>> 2013/2/23 deadalnix
>>
>> class A {
>>> void foo() {}
>>> }
>>>
>>> class B {
>>> override void foo() const {}
>>> }
>>>
>>> Add a const foo method to A, and B;foo don't overload the same method
>>
On Friday, 22 February 2013 at 09:40:29 UTC, Sönke Ludwig wrote:
Am 22.02.2013 07:56, schrieb Sönke Ludwig:
I would hope that a future version of Dub wouldn't have any
dependencies
on Vibe, either. That's an odd bootstrapping arrangement.
Done now on master.
Woah! that was fast. I look forw
On Friday, 22 February 2013 at 15:15:02 UTC, kenji hara wrote:
2013/2/23 deadalnix
class A {
void foo() {}
}
class B {
override void foo() const {}
}
Add a const foo method to A, and B;foo don't overload the same
method
anymore.
B.foo overrides A.foo. It is properly allowed as a
On Sunday, 17 February 2013 at 17:10:47 UTC, Russel Winder wrote:
On Sun, 2013-02-17 at 16:08 +0100, Jacob Carlborg wrote:
[…]
There are no package managers out of the box for Mac OS X or
Windows.
The MacPorts, Fink, and Brew folks almost certainly dispute the
first of
those claims. ;-)
No
2013/2/23 deadalnix
> class A {
> void foo() {}
> }
>
> class B {
> override void foo() const {}
> }
>
> Add a const foo method to A, and B;foo don't overload the same method
> anymore.
>
B.foo overrides A.foo. It is properly allowed as a particular case in
contravariant parameter type.
On Friday, 22 February 2013 at 14:58:02 UTC, Martin wrote:
On Friday, 22 February 2013 at 14:55:19 UTC, bearophile wrote:
Martin:
Was something changed intentionally or is this a bug?
It was changed intentionally, but only for alias this. That
syntax is allowed still for other aliases.
By
On Thursday, 21 February 2013 at 14:17:16 UTC, Steven
Schveighoffer wrote:
Explain me how the hell you overload on implicit parameter
types ?
A method is simply a function that takes a hidden parameter
of an object or struct.
Really, a method with a signature Obj.foo() is a function
with a
Martin:
Was something changed intentionally or is this a bug?
It was changed intentionally, but only for alias this. That
syntax is allowed still for other aliases.
Bye,
bearophile
On Friday, 22 February 2013 at 14:55:19 UTC, bearophile wrote:
Martin:
Was something changed intentionally or is this a bug?
It was changed intentionally, but only for alias this. That
syntax is allowed still for other aliases.
Bye,
bearophile
I see, thanks. What was the reason for not a
struct Test
{
int i;
alias this = i;
}
Worked fine in 2.061 but in 2.062 I get the errors
"Error: no identifier for declarator this" and "Error: alias
cannot have initializer".
Was something changed intentionally or is this a bug?
deadalnix:
Aren't supposed to go away at some point ?
I have never read an official statement of them going away, and
I'd like the cent/ucent types.
On the other hand Andrei has instead suggested to introduce a
fixnum struct in Phobos, that is able to replace a "cent" in many
cases (I don't k
On Wednesday, 20 February 2013 at 21:05:42 UTC, bearophile wrote:
I am not intelligent (and experienced) enough to design the
currently missing/broken parts of D. Is someone able to?
If one writes a short description of problems, then it will be
easier to find people and ideas. For example, I
On Friday, 22 February 2013 at 13:55:51 UTC, Iain Buclaw wrote:
On Friday, 22 February 2013 at 13:44:09 UTC, deadalnix wrote:
On Friday, 22 February 2013 at 13:31:18 UTC, Iain Buclaw wrote:
http://dlang.org/abi.html
This is undocumented - and probably should be raised as a bug
as is not defin
On Friday, 22 February 2013 at 13:44:09 UTC, deadalnix wrote:
On Friday, 22 February 2013 at 13:31:18 UTC, Iain Buclaw wrote:
http://dlang.org/abi.html
This is undocumented - and probably should be raised as a bug
as is not defined.
Thanks
Iain.
Aren't supposed to go away at some point ?
On Friday, 22 February 2013 at 13:31:18 UTC, Iain Buclaw wrote:
http://dlang.org/abi.html
This is undocumented - and probably should be raised as a bug
as is not defined.
Thanks
Iain.
Aren't supposed to go away at some point ?
On Friday, 22 February 2013 at 11:01:12 UTC, Sönke Ludwig wrote:
Thanks! I've listed it on the github page:
https://github.com/rejectedsoftware/dub#arch-linux
BTW, the build process has been simplified now - dependencies
are just
DMD+libcurl and building works using "./build.sh" instead of
us
http://dlang.org/abi.html
This is undocumented - and probably should be raised as a bug as
is not defined.
Thanks
Iain.
Am 18.02.2013 22:25, schrieb Moritz Maxeiner:
> On Saturday, 16 February 2013 at 17:10:33 UTC, Sönke Ludwig wrote:
>> With the recent talk about Orbit, I thought it is time to also announce
>> the package manager that we have been working out based on the simple
>> VPM system that has always been i
Am 22.02.2013 10:40, schrieb Sönke Ludwig:
> Am 22.02.2013 07:56, schrieb Sönke Ludwig:
>>> I would hope that a future version of Dub wouldn't have any dependencies
>>> on Vibe, either. That's an odd bootstrapping arrangement.
>
> Done now on master.
>
> Does anyone know which curl package needs
I was thinking if it would be a good idea to setup a virtual machine
with a development environment for D. The virtual machine would contain
everything needed to start development using D and to start contributing
to D.
Vagrant could be an alternative for doing this.
http://www.vagrantup.com/
Those are two different approaches:
D starts lua, and lua finishes before D.
It's _embedding_ LUA in D. Can be easily done now.
Try lua starts D, and D finishes before lua.
It's _extending_ LUA with D. Requires good D shared library support. :(
JoeCoder:
Is it possible/permissible to vote for an issue more than once?
I don't think so.
Bye,
bearophile
On Monday, 18 February 2013 at 14:47:19 UTC, Benjamin Thaut wrote:
Agreed. But as long as D does not have a Garbage Collector that
is as powerfull as the GC of the .NET 4 runtime you will be
better of (performance wise) not using a GC at all when
programming performance critical parts of game e
Am 22.02.2013 07:56, schrieb Sönke Ludwig:
>> I would hope that a future version of Dub wouldn't have any dependencies
>> on Vibe, either. That's an odd bootstrapping arrangement.
Done now on master.
Does anyone know which curl package needs to be installed on Ubuntu so
that std.net.curl is happy
On 02/21/2013 11:13 AM, Jesse Phillips wrote:
On Thursday, 21 February 2013 at 01:50:27 UTC, 1100110 wrote:
I was playing with LuaD (https://github.com/JakobOvrum/LuaD) and was
disappointed to learn that the only way to call D functions from Lua
is for the lua code to be 'inside' a D module. (st
On Wednesday, 20 February 2013 at 22:34:15 UTC, Andrej Mitrovic
wrote:
On 2/20/13, David Nadlinger wrote:
In Phobos, there are quite a few unit tests (std.format,
std.json, ...) which assume that the %e floating point format
zero-pads the exponent to (at least) two digits.
I don't know about
On 02/21/2013 07:18 PM, Nick Sabalausky wrote:
On Thu, 21 Feb 2013 17:57:39 -0600
1100110<0b1100...@gmail.com> wrote:
Can we please add an issue tracker, wiki, or readme to the repo?
It's not always entirely obvious how or why certain things are the
way they are.
This issue tracker and wiki
Am Tue, 19 Feb 2013 18:51:35 +0100
schrieb "tn" :
> In many cases it would be nice, if "arr[] < x" translated to
> "map!(a => a < x)(arr)" and similarly "arr1[] < arr2[]"
> translated to "map!((a, b) => a < b)(arr1, arr2)" or equivalent
> (*).
This would make the compiler depend on std.algorit
On 2013-02-22 06:09, H. S. Teoh wrote:
I'm surprised nobody offered to help, seeing as there are many
complaints about DMD bugs.
Well, I'd love to help, but I can't promise I'll have the time to do a
lot. But I'm reasonably comfortable with running git bisect to isolate
the offending commits;
83 matches
Mail list logo