And here's a working example:
import std.stdio;
import variant;
import std.string;
import std.conv;
//
class Base
{
private int y; //check if a variable causes any problems
//run all member functions that start with "in"
public void RunAllIn(alias T) ()
{
writeln("Ru
Here's my changes to it:
//Convert a string representation of a type, produced by typeinfo into a
.stringof representation
string typeinfo2stringof(string id){
auto rid = retro(id);
auto r1 = find(rid, '.');
auto rb = find(rid, '!');
auto r1len = r1.source.
> 1) No UNIX Socket support in std.socket.
Someone has added unix domain sockets in one of the phobos forks. I even
think there's a pending pull request.
I'm getting pretty close to having a reasonably comprehensive native D
driver for MySQL - no translated header files, no linking to libraries.
However there are three blocking factors, features missing in Phobos that
would stop it's use as things stand.
1) No UNIX Socket support in std.socket.
On 11/02/2011 09:00 PM, Adam D. Ruppe wrote:
bearophile:
But how many times do you want to ignore some of the
arguments listed?
I do a lot. The way I do it is the arguments are made
available to the format, but it doesn't always need them
at runtime.
string f = showNames ? "%1$s\t%2$d" : "%2$
On Thu, 03 Nov 2011 20:47:48 +0100, Marco Leise wrote:
> Am 03.11.2011, 18:43 Uhr, schrieb Steve Teale
> :
>
>> On Thu, 03 Nov 2011 13:22:49 -0400, Jonathan M Davis wrote:
>>
>>> On Thursday, November 03, 2011 09:22 Steve Teale wrote:
I see that Walter just fixed a typedef bug in 2.056, even
On 11/3/2011 9:14 PM, bearophile wrote:
Regarding pointer types, in D there are function pointers and function
delegates, they are kind of two different kinds of pointers already.
And their only saving grace is they are not used that often, so the complexity
is tolerable. This is not so for po
Walter Bright:
> You're wrong still :-)
In this newsgroup I am used to being wrong several times every day :-)
> It can be done if the D compiler emits full runtime type info. It's a solved
> problem with GCs.
I see, I will have to read more on this solution.
> Besides, having two pointer t
On 11/3/2011 8:14 PM, bearophile wrote:
Mark-compact (aka moving) collectors, where live objects are moved together
to make allocated memory more compact. Note that doing this involves
updating pointers’ values on the fly. This category includes semispace
collectors as well as the more efficient
I have found a slides pack, Rust All Hands Winter 2011, with some notes on
typestates too:
http://www.slideshare.net/pcwalton/rust-all-hands-winter-2011
And here there are some tests about macros too, search the word "macro":
https://github.com/graydon/rust/tree/master/src/test/run-pass
Bye,
bea
Through Reddit I've found two introductions to the system language Rust being
developed by Mozilla. This is one of them:
http://marijnhaverbeke.nl/rust_tutorial/
This is an alpha-state tutorial, so some parts are unfinished and some parts
will probably change, in the language too.
Unfortunatel
On Thu, 03 Nov 2011 23:42:01 +0100, bearophile
wrote:
Martin Nowak:
I think there's a lot to learn from
http://python.org/download/releases/.
For example somebody changing from Python2.5 to 2.7 is anticipating
some breaking changes, not so much for a change from dmd2.053 to
dmd2.056.
On 8/19/11 2:36 AM, Jose Armando Garcia wrote:
Sorry guys for disappearing. I'll put some time into this...
On Wed, Aug 10, 2011 at 12:52 AM, Jonathan M Davis wrote:
Jose, are you ready for std.log to be reviewed? I believe that it's the item
which has been in the review queue the longest at t
Martin Nowak:
> I think there's a lot to learn from http://python.org/download/releases/.
> For example somebody changing from Python2.5 to 2.7 is anticipating
> some breaking changes, not so much for a change from dmd2.053 to dmd2.056.
There is a difference between Python 2.5 and the current D2.
On 11/3/11 7:44 PM, Brad Roberts wrote:
While I don't disagree with the larger point, I do feel compelled to
clarify that it's not dmd or the language that's making most of the
backwards incompatible changes, it's phobos.
I don't think this is generally true – for template
metaprogramming-heav
On 03-11-2011 18:45, Martin Nowak wrote:
On Wed, 02 Nov 2011 21:24:53 +0100, Danni Coy wrote:
On Thu, Nov 3, 2011 at 12:47 AM, Martin Nowak wrote:
On Wed, 02 Nov 2011 11:07:54 +0100, Denis Shelomovskij <
verylonglogin@gmail.com> wrote:
Two regular arguments against git.
- The Tcl/Tk b
Am 03.11.2011, 18:43 Uhr, schrieb Steve Teale
:
On Thu, 03 Nov 2011 13:22:49 -0400, Jonathan M Davis wrote:
On Thursday, November 03, 2011 09:22 Steve Teale wrote:
I see that Walter just fixed a typedef bug in 2.056, even though I was
just ticked of for even thinking of using one ;=)
He p
On Thursday, November 03, 2011 20:36:03 Marco Leise wrote:
> Am 03.11.2011, 16:54 Uhr, schrieb Jonathan M Davis :
> > [...] So, really, there is no way to have -release affect
> > any code in Phobos beyond what it does to the language in general
> > (remove
> > assertions and remove array bounds ch
Am 03.11.2011, 16:54 Uhr, schrieb Jonathan M Davis :
[...] So, really, there is no way to have -release affect
any code in Phobos beyond what it does to the language in general (remove
assertions and remove array bounds checking in @system code), even if we
wanted it to, which is debatable.
- Jo
Am 03.11.2011, 17:21 Uhr, schrieb kenji hara :
2011/11/4 Nick Sabalausky :
"kenji hara" wrote in message
news:mailman.655.1320322897.24802.digitalmar...@puremagic.com...
2011/11/3 Nick Sabalausky :
I don't know much about the internals of DMD, but would this make any
sense?:
When unrolling
On Thu, 03 Nov 2011 19:44:36 +0100, Brad Roberts
wrote:
On Thu, 3 Nov 2011, Martin Nowak wrote:
I think we need to change the release policy to make that happen.
Honestly the half-life period for D code using the mainline dmd
is about a few weeks and is released on ~monthly base.
This is a
On Thu, 3 Nov 2011, Martin Nowak wrote:
> I think we need to change the release policy to make that happen.
> Honestly the half-life period for D code using the mainline dmd
> is about a few weeks and is released on ~monthly base.
> This is a heavy restriction to attract professional development.
On Thu, 03 Nov 2011 18:22:49 +0100, Jonathan M Davis
wrote:
On Thursday, November 03, 2011 09:22 Steve Teale wrote:
I see that Walter just fixed a typedef bug in 2.056, even though I was
just ticked of for even thinking of using one ;=)
He probably fixed it because it hasn't actually been
On Thu, 03 Nov 2011 16:54:14 +0100, Jonathan M Davis
wrote:
On Thursday, November 03, 2011 13:38:44 Gor Gyolchanyan wrote:
I think this could be integrated into "to" template without need for
extra symbols.
There are tons of optimization opportunities like this, that are
currently not being
On Wed, 02 Nov 2011 21:24:53 +0100, Danni Coy wrote:
On Thu, Nov 3, 2011 at 12:47 AM, Martin Nowak wrote:
On Wed, 02 Nov 2011 11:07:54 +0100, Denis Shelomovskij <
verylonglogin@gmail.com> wrote:
Two regular arguments against git.
- The Tcl/Tk based Git Gui and gitk look awful.
Yes th
On Thu, 03 Nov 2011 13:22:49 -0400, Jonathan M Davis wrote:
> On Thursday, November 03, 2011 09:22 Steve Teale wrote:
>> I see that Walter just fixed a typedef bug in 2.056, even though I was
>> just ticked of for even thinking of using one ;=)
>
> He probably fixed it because it hasn't actually
On Thursday, November 03, 2011 09:22 Steve Teale wrote:
> I see that Walter just fixed a typedef bug in 2.056, even though I was
> just ticked of for even thinking of using one ;=)
He probably fixed it because it hasn't actually been given the axe yet, but
it's definitely going to get the axe - a
On Thu, 03 Nov 2011 17:28:53 +0100, Alex Rønne Petersen wrote:
> On 03-11-2011 17:22, Steve Teale wrote:
>> I see that Walter just fixed a typedef bug in 2.056, even though I was
>> just ticked of for even thinking of using one ;=)
>
> Shouldn't that be long deprecated in favor of alias...?
That
On 03-11-2011 17:22, Steve Teale wrote:
I see that Walter just fixed a typedef bug in 2.056, even though I was
just ticked of for even thinking of using one ;=)
Steve
Shouldn't that be long deprecated in favor of alias...?
- Alex
I see that Walter just fixed a typedef bug in 2.056, even though I was
just ticked of for even thinking of using one ;=)
Steve
2011/11/4 Nick Sabalausky :
> "kenji hara" wrote in message
> news:mailman.655.1320322897.24802.digitalmar...@puremagic.com...
>> 2011/11/3 Nick Sabalausky :
>>> I don't know much about the internals of DMD, but would this make any
>>> sense?:
>>>
>>> When unrolling code, keep track of where the u
On Thursday, November 03, 2011 13:38:44 Gor Gyolchanyan wrote:
> I think this could be integrated into "to" template without need for
> extra symbols.
> There are tons of optimization opportunities like this, that are
> currently not being utilized.
> If the result won't change, then the release ve
"kenji hara" wrote in message
news:mailman.655.1320322897.24802.digitalmar...@puremagic.com...
> 2011/11/3 Nick Sabalausky :
>> I don't know much about the internals of DMD, but would this make any
>> sense?:
>>
>> When unrolling code, keep track of where the unrolled parts came from.
>> Only
>>
On 11/3/11, Nick Sabalausky wrote:
> "Uno" wrote in message
> news:j8rvda$1nuk$1...@digitalmars.com...
>>> The only drawback I experienced is Windoze-specific. There you have
>>> TortoiseHg which makes work really nice while TortoiseGit lacks behind
>>> and msysgit is just a pain.
>> I use SmartG
On 03-11-2011 15:06, Kagamin wrote:
Do I understand it right, that "sacred history problem" is a problem only for
git due to how it implements merges?
Also if you can always fast forward the main branch, does it mean the project
is small, i.e. ~1 man is working on it?
No, Git is probably the
On Thu, 03 Nov 2011 06:28:30 -0400, J Arrizza wrote:
PS, this version works and prints "10" for the length:
string id = "somestring";
auto rid = retro(id);
//writeln(rid.length);
writeln(rid.source.length);
On Thu, Nov 3, 2011 at 3:26 AM, J Arrizza wrote:
Robert,
This stub
> > Do I understand it right, that "sacred history problem" is a problem only
> > for git due to how it implements merges?
> >
> > Also if you can always fast forward the main branch, does it mean the
> > project is small, i.e. ~1 man is working on it?
>
> No, Git is probably the DVCS with *leas
Very enlightening, thanks!
kenji hara , dans le message (digitalmars.D:146395), a écrit :
> I got an idea for multidimentional indexing and slicing.
> http://d.puremagic.com/issues/show_bug.cgi?id=6798
>
> I think opSlice!n (n is dimension integer typed size_t) is rarely
> used, therefore using that name for the enhancement
bearophile , dans le message (digitalmars.D:146534), a écrit :
> Robert Jacques:
>
>>[... several things]
>> Seventh, Matlab, NumPy, Octave, BLAS, etc. all support striding.
>
> OK, a nice striding syntax for user defined types will be a good thing to
> have in D2.
>
> I have suggested the x..y
2011/11/3 Nick Sabalausky :
> I don't know much about the internals of DMD, but would this make any
> sense?:
>
> When unrolling code, keep track of where the unrolled parts came from. Only
> issue an unreachable code warning if *all* the unrolled versions of the
> original line X are unreachable.
"kenji hara" wrote in message
news:mailman.649.1320309243.24802.digitalmar...@puremagic.com...
> 2011/11/3 Don :
>> Maybe we should suppress unreachable code warnings inside unrolled code.
>
> I don't agree with this opinion of you.
> It is useful when we write generic code.
>
I don't know much
"Uno" wrote in message
news:j8rvda$1nuk$1...@digitalmars.com...
>> The only drawback I experienced is Windoze-specific. There you have
>> TortoiseHg which makes work really nice while TortoiseGit lacks behind
>> and msysgit is just a pain.
> I use SmartGit. Very good tool IMO.
> (http://www.synt
"Vladimir Panteleev" wrote in message
news:op.v4ckapeytuz...@cybershadow.mshome.net...
> On Thu, 03 Nov 2011 03:24:51 +0200, Don wrote:
>
>> Why point people there? That's a dreadful page! Here are his arguments:
>
> Note that each item is addressed with regards to specific alternatives.
> For
On 03-11-2011 11:35, Kagamin wrote:
Alex R�nne Petersen Wrote:
That only makes sense if you keep the branches around after they're
'dead', which is considered a bad practice, as it will eventually grow
confusing.
They're not dead. They're history.
I don't understand what point you're tryi
On 03-11-2011 11:33, Kagamin wrote:
Jesse Phillips Wrote:
You are both correct, but due to git's high level once you do a merge you don't
see the history as multiple branches. A merge commit will reference both branch
data as its parent. The branch name can then be removed and its history rem
""Jérôme M. Berger"" wrote in message
news:j8sf42$d3$1...@digitalmars.com...
> You can always use hg-git [1] to do everything with Mercurial
>whether you're working on GDC or DMD...
hg-git only barely works. I've completely given up on it after wasting too
much time and effort on showstopper pr
03.11.2011 11:29, kenji hara пишет:
EnumMember returns tuple, it is compile-time sequence.
And foreach with tuple unrolls its body. Then, Loop A is unrolled like follows.
__foreachEntry0: {
if ( TestEnum.ONE == TestEnum.TWO )
goto __foreachEntry1;
writeln( "A: ", TestEnum.ONE );
}
__
Alex R�nne Petersen Wrote:
> >> That only makes sense if you keep the branches around after they're
> >> 'dead', which is considered a bad practice, as it will eventually grow
> >> confusing.
> >
> > They're not dead. They're history.
>
> I don't understand what point you're trying to argue. :)
Jesse Phillips Wrote:
> You are both correct, but due to git's high level once you do a merge you
> don't see the history as multiple branches. A merge commit will reference
> both branch data as its parent. The branch name can then be removed and its
> history remain part of the master branch.
PS, this version works and prints "10" for the length:
string id = "somestring";
auto rid = retro(id);
//writeln(rid.length);
writeln(rid.source.length);
On Thu, Nov 3, 2011 at 3:26 AM, J Arrizza wrote:
> Robert,
>
> This stub shows the issue:
>
> import std.stdio;
> import std
Robert,
This stub shows the issue:
import std.stdio;
import std.range;
void main(string[] args)
{
string id = "somestring";
auto rid = retro(id);
writeln(rid.length);
}
$: dmd dtest.d
dtest.d(8): Error: no property 'length' for type 'Result'
I haven't applied either patch you
On Thu, 03 Nov 2011 10:24:19 +0100, Jens Mueller wrote:
> I found what's causing this behavior (see man 7 socket (search for
> SO_RCVBUF)).
> The maximum value is specified in /proc/sys/net/core/rmem_max. On my
> system it's 131071.
>
> Jens
Yup, I got there too, so I've dropped the idea.
Thank
I think this could be integrated into "to" template without need for
extra symbols.
There are tons of optimization opportunities like this, that are
currently not being utilized.
If the result won't change, then the release version should drop safety checks.
... IMO ...
On Thu, Nov 3, 2011 at 1:4
Steve Teale wrote:
> Who is the resident expert? Sean maybe?
>
> How do I get the receive buffer size up into the megabytes range for use
> between the D client and localhost. setOption seems to only get me about
> 262k.
>
> Steve
I found what's causing this behavior (see man 7 socket (search
Steve Teale wrote:
> On Wed, 02 Nov 2011 16:17:12 -0700, Sean Kelly wrote:
>
> > On Nov 2, 2011, at 9:59 AM, Steve Teale wrote:
> >
> >> On Wed, 02 Nov 2011 16:45:30 +, Regan Heath wrote:
> >>
> >>> .. why do you want/need such a large TCPIP recv buffer?
> >
> > I suspect that MySQL's "pack
On 30.10.2011 22:42, Vladimir Panteleev wrote:
On Sun, 30 Oct 2011 03:39:57 +0300, Mehrdad wrote:
I tried converting some C code I found on the internet to D.
Reduced version:
import std.stdio;
static double[1][] f()
{
auto array = new double[1][2];
array[0][0] = 1;
return array;
}
void m
2011/11/3 Don :
> Maybe we should suppress unreachable code warnings inside unrolled code.
I don't agree with this opinion of you.
It is useful when we write generic code.
Kenji Hara
2011/11/3 knommad :
> Hi,
>
> I'm a relative newcomer to D, and am enjoying the experience.
>
> I have a small testcase here that causes what seems to be a spurious warning
> from the compiler (resulting code still works, however).
>
> Am I missing something??
>
> import std.stdio;
> import std.tra
On 02.11.2011 22:19, deadalnix wrote:
Le 31/10/2011 21:25, Timon Gehr a écrit :
On 10/31/2011 08:34 PM, bearophile wrote:
I don't see the need to accept this cast, because we have said that D
arrays are not pointers, and allowing the array to pointer cast means
introducing/leaving an useless sp
On 03.11.2011 08:47, knommad wrote:
Hi,
I'm a relative newcomer to D, and am enjoying the experience.
I have a small testcase here that causes what seems to be a spurious warning
from the compiler (resulting code still works, however).
Am I missing something??
It's an interesting situation t
Hi,
I'm a relative newcomer to D, and am enjoying the experience.
I have a small testcase here that causes what seems to be a spurious warning
from the compiler (resulting code still works, however).
Am I missing something??
import std.stdio;
import std.traits;
enum TestEnum
{
ONE = 1,
62 matches
Mail list logo