<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.lang.d.learn">
    <title>gmane.comp.lang.d.learn</title>
    <link>http://blog.gmane.org/gmane.comp.lang.d.learn</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.d.learn/21834"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.d.learn/21825"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.d.learn/21820"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.d.learn/21806"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.d.learn/21805"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.d.learn/21797"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.d.learn/21783"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.d.learn/21777"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.d.learn/21773"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.d.learn/21754"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.d.learn/21753"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.d.learn/21743"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.d.learn/21735"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.d.learn/21734"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.d.learn/21727"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.d.learn/21724"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.d.learn/21716"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.d.learn/21712"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.d.learn/21706"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.d.learn/21699"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21834">
    <title>alias parameter tuples:  need this to access member</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21834</link>
    <description>&lt;pre&gt;I am writing a mixin template that uses alias parameters and 
should me instantiated in a class. With only one parameter, it 
works. But I fail with
using multiple aliases as a tuple.

This works:

mixin template print(alias x) {
     void doprint() { writeln(x); }
}

class A { int x; mixin print!x; }

Now I would like to do the same, but with several attributes of 
my class at once. Thus I tried tuple parameters:

mixin template print(alias b...) { ... } // seem not to be legal 
syntax.

My second try was this:

mixin template print(b...)
{
     void doprint() {
         foreach(mem; b)
             writeln(b);
     }
}

class A { int x,y; mixin print!(x, y); }

Now DMD says:  need this to access member

How can I do this? Thank you in advance :)

&lt;/pre&gt;</description>
    <dc:creator>Tobias Pankrath</dc:creator>
    <dc:date>2012-05-26T10:39:29</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21825">
    <title>Why doesn't this throw?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21825</link>
    <description>&lt;pre&gt;import std.algorithm;
import std.stdio;

void main()
{
    int[] a = [1, 2, 3];
    a = a.remove(3);
    writeln(a);
}

writes [1, 2]

If I'd called a.remove with index 2 I would get the above result, but
index 3 is clearly out of bounds, so why'd it remove the last element
instead of throwing?

&lt;/pre&gt;</description>
    <dc:creator>Andrej Mitrovic</dc:creator>
    <dc:date>2012-05-25T12:59:47</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21820">
    <title>Multi-library project path issue</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21820</link>
    <description>&lt;pre&gt;Hi,

I am using the Mono-D for building a project with 3-4 library 
projects and one console project. Although I am using the Mono-D 
but I think this issue is not unique to Mono-D. Please advise me 
with a solution, if I am missing something obvious here.

Issue;

I have two "library" project with something similar to following:

AppFolder  (AppFolder contains the below two folders for 
individual project)

Lib1
  |
  ------ TestFile1.d
  |
  ------ TestFile2.d (import TestFile1;) // TestFile2 is importing 
TestFile1 in same library project.


Lib2  (Lib2 has linker path to "lib1.a" and include path to 
"AppFolder")
|
------ TestFile3.d (import Lib1.TestFile2).


If I compile the Lib1 folder alone then it will work fine but now 
if I compile the Lib2 folder then the error will be in 
"TestFile2.d" of Lib1 project that "TestFile1" is not found. If I 
change the "Import" in TestFile2 to

import Lib1.TestFile1;

Then the compilation of Lib2 starts to work. Now, if I try to 
compile the Lib1 project alone in Mono-D (I also tried same on 
D-IDE) then it will not compile.

I was ok with compiling only the Lib2 but now the next issue is 
that the code completion won't work in "Lib1.TestFile2" after 
changing the import statement (simply because Lib1.TestFile1 is 
not valid path for it any more).


What should I do? How are other people working on multi-library 
projects in D? I tried to look into generating the ".di" files 
but I don't think that will work either. I looked at "Phobos" and 
it uses the convention like "Lib1.TestFile2" (std.conv) but I 
don't think it will help me with the compilation of Lib1 project.


Thanks



&lt;/pre&gt;</description>
    <dc:creator>#coder</dc:creator>
    <dc:date>2012-05-25T06:15:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21806">
    <title>null matches typed pointers before void pointers</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21806</link>
    <description>&lt;pre&gt;I'm not sure if this is a bug or not:

struct Foo { }

void test(void* test) { assert(0); }
void test(Foo* test)  { }

void main()
{
    test(null);
}

The call matches the second overload: "void test(Foo* test)". But
shouldn't this be an ambiguous call?

&lt;/pre&gt;</description>
    <dc:creator>Andrej Mitrovic</dc:creator>
    <dc:date>2012-05-24T12:50:38</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21805">
    <title>get Class from Pointer of member</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21805</link>
    <description>&lt;pre&gt;Hi,
I'm totally new to D. But it looks very interesting :-)
I normally develop in C++.

I have such a function in C++:

template&amp;lt;class CB,class FIELD&amp;gt;
inline CB* get_class_from_field( FIELD CB::*field, FIELD* mp) {
     return reinterpret_cast&amp;lt;CB*&amp;gt;(
             reinterpret_cast&amp;lt;char*&amp;gt;(mp) -
             
reinterpret_cast&amp;lt;ptrdiff_t&amp;gt;(&amp;amp;(reinterpret_cast&amp;lt;CB*&amp;gt;(0)-&amp;gt;*field)));
}


Here I come with a pointer to a class member and can calculate 
the pointer to the class, where the member is within. (Nothing 
spectacular in c++)

Is this also possible in D?
I noticed that it's not very easy to get a member pointer on the 
heap. Isn't it?

thank you &amp;amp; best regards,
Stefan

&lt;/pre&gt;</description>
    <dc:creator>StefanvT</dc:creator>
    <dc:date>2012-05-24T12:29:54</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21797">
    <title>D under Linux Mint</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21797</link>
    <description>&lt;pre&gt;Hello, Ive tried to install D under Linux and followed the steps
described on . this page http://dlang.org/dmd-linux.html . I
checked all folders after every step and everything is where it
should be. In the secound step I did both, adding dmd to the PATH
and copied the executables into the lib folder. If I type dmd
into the console, I get back all infos about D, so this is
already working. But if I try to run a simple Hello world program
like this:

import std.stdio;

void main() {
writeln("Hallo Welt");
}

I get the following error:
object.d: Error: module object is in file 'object.d' which cannot
be read
import path[0] = /usr/local/bin/../../src/phobos
import path[1] = /usr/local/bin/../../src/druntime/import


My DMD folder is in the home directory and the dmd.config
contains this:
[Environment]

DFLAGS=-I%&amp;lt; at &amp;gt;P%/../../src/phobos -I%&amp;lt; at &amp;gt;P%/../../src/druntime/import
-L-L%&amp;lt; at &amp;gt;P%/../lib64 -L-L%&amp;lt; at &amp;gt;P%/../lib32 -L--no-warn-search-mismatch
-L--export-dynamic

I already tried to compile the program with geany and the
console. In the console i trid to compile it as: dmd hello.d and
dmd -c hello.d. But everywhere I get the same errors



&lt;/pre&gt;</description>
    <dc:creator>snow</dc:creator>
    <dc:date>2012-05-23T21:46:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21783">
    <title>OPTLINK : Error 63: DOSNEWSIZE Error ?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21783</link>
    <description>&lt;pre&gt;Hi,

I'm getting the error mentioned in the subject. I can't find no 
reference neither to DOSNEWSIZE nor to Error 63 on the Optilink 
pages or google.
Where can I find information about this error ?
Is there a list which maps Optilink Error Numbers to Error Names ?

Cheers, ParticlePeter !

&lt;/pre&gt;</description>
    <dc:creator>ParticlePeter</dc:creator>
    <dc:date>2012-05-23T18:02:13</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21777">
    <title>Sorry for posting this here. Not sure where else.</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21777</link>
    <description>&lt;pre&gt;I apologize in advance if I'm doing something stupid here. But 
shat's up with dsource.org forums?  I created a user account on 
5/19/12 and got an email:

Welcome to  Forums

Please keep this email for your records. Your account information 
is as follows:

----------------------------
Username: myusername
Password: mypassword
----------------------------

Your account is currently inactive, the administrator of the 
board will need to activate it before you can log in. You will 
receive another email when this has occured.

Please do not forget your password as it has been encrypted in 
our database and we cannot retrieve it for you. However, should 
you forget your password you can request a new one which will be 
activated in the same way as this account.

Thank you for registering.

--
Thanks, The Management


It has been 5 days and still no replay.  Catch-22. Can't post 
this on the dsource.org site.


&lt;/pre&gt;</description>
    <dc:creator>WhatMeWorry</dc:creator>
    <dc:date>2012-05-23T14:38:00</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21773">
    <title>pure functions calling impure functions at compile-time</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21773</link>
    <description>&lt;pre&gt;...do not compile. Because, you know, having done impure things, they are
tainted for life.

Example:

string foo( ) {
     return "O HAI";
}

pure void bar( ) {
     enum tmp = foo( ); // Error: pure function 'bar' cannot call impure  
function 'foo'
}

Should this be filed as a bug, or is the plan that only pure functions be
ctfe-able? (or has someone already filed it, perhaps)

&lt;/pre&gt;</description>
    <dc:creator>Simen Kjaeraas</dc:creator>
    <dc:date>2012-05-23T07:52:49</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21754">
    <title>"repeating pair" regex</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21754</link>
    <description>&lt;pre&gt;Hi,

I tried something like this...
auto m = match("a=42 b=32 c=22", regex(`^(?: \s* (\w+)=(\d+) 
)+$`, `x`));

This works fine...
`^(?: \s* (\w+)=(\d+) )+$`
... and if I duplicate the string x times, it also works...

But I'm hoping to parse a variable number of these 'pairs'... so 
I tried grouping the pairs in (?:)+ but this way it saves only 
the last pair?

Anyone got an idea?


&lt;/pre&gt;</description>
    <dc:creator>Thor</dc:creator>
    <dc:date>2012-05-21T12:42:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21753">
    <title>std.range.put?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21753</link>
    <description>&lt;pre&gt;Shouldn't the following work?

import std.range;
import std.stdio;

void main() {
     int[] a;
     a.reserve(10);
     //a.put(1); // Attempting to fetch the front of an empty array of int
     a.length = 1;
     writeln(a.length); // 1
     a.put(2);
     writeln(a.length); // 0 - what?
     writeln(a); // [] - come on!

     char[] b;
     //b.put('a'); // range.d(615): Error: static assert  "Cannot put a  
char into a char[]"
}

&lt;/pre&gt;</description>
    <dc:creator>simendsjo</dc:creator>
    <dc:date>2012-05-21T11:26:32</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21743">
    <title>static functions?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21743</link>
    <description>&lt;pre&gt;I pretty sure I'm an idiot.

[code]
class foo {
public static int bar() {
return 0;
}
}
[/code]

How do I call bar() without creating an instance of foo? 
foo.bar() results in "Error: undefined identifier 'bar'"

I'm having a really hard time finding anything related to D in 
general.

&lt;/pre&gt;</description>
    <dc:creator>p0xel</dc:creator>
    <dc:date>2012-05-20T21:17:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21735">
    <title>detecting POD types</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21735</link>
    <description>&lt;pre&gt;I write function template that should works only with POD types 
(i.e. base types, structures, enums etc.). Is there something 
like C++11 std::is_pod 
(http://en.cppreference.com/w/cpp/types/is_pod) template?

&lt;/pre&gt;</description>
    <dc:creator>japplegame</dc:creator>
    <dc:date>2012-05-20T13:50:15</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21734">
    <title>druntime investigation troubles</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21734</link>
    <description>&lt;pre&gt;Looks like `_STI_monitor_staticctor` is called by C runtime on Windows. 
And C runtime isn't open-source.

It creates troubles for investigation druntime (for me at least). Why is 
it so? Why not to call everything in C `main`, what's the reason?

If there is no list of stuff done before C `main` druntime isn't 
open-source for me because I can't understand what is taking place just 
with druntime sources.

&lt;/pre&gt;</description>
    <dc:creator>Denis Shelomovskij</dc:creator>
    <dc:date>2012-05-20T08:41:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21727">
    <title>state of web programming</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21727</link>
    <description>&lt;pre&gt;it is a list of project lo look if yo want create a web application in D
- https://github.com/mrmonday/serenity
-
https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff
- https://github.com/Aatch/dfcgi
- https://github.com/rejectedsoftware/vibe.d

Add yours, tell which is better ...


&lt;/pre&gt;</description>
    <dc:creator>bioinfornatics</dc:creator>
    <dc:date>2012-05-19T23:53:10</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21724">
    <title>Limit number of compiler error messages</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21724</link>
    <description>&lt;pre&gt;Is there a way to limit the dmd compiler to outputting just the 
first few errors it comes across?

&lt;/pre&gt;</description>
    <dc:creator>cal</dc:creator>
    <dc:date>2012-05-19T22:38:33</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21716">
    <title>vibe.d how build it / intall it?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21716</link>
    <description>&lt;pre&gt;Dear,
i do not found on vibe.d repository (github) how do a manual install.

Since i am a  linux user (Fedora) they are any documentation to explain
how install it?

after take a look from source tree i think
bin/vibe go to /usr/bin
bin/views to /usr/share/vibe.d/
source/vibe to /usr/include/d/

i think source file into source/vibe should be compiled and linked
together to do a lib, isn't it?

thanks in advance for help (how to do a manual install?)


&lt;/pre&gt;</description>
    <dc:creator>bioinfornatics</dc:creator>
    <dc:date>2012-05-19T17:28:05</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21712">
    <title>std.concurrency.send</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21712</link>
    <description>&lt;pre&gt;Multithreading in D confuses me more and more.

import std.concurrency;
import std.stdio;
shared Tid tid;
void main() {
   send(cast(Tid)tid, "Hello, World");
}
void worker() {
    writeln(receiveOnly!string);
}
shared static this() {
   tid = cast(shared)spawn(&amp;amp;worker);
}

I hate these explicit casts. It is impossible sharing anything 
between threads without these ugly casts from/to shared. Seems 
like something wrong in program design when I'm forced to use 
explicit casts. But I don't understand what is it exactly.

For example. I need create mutable object in one thread and send 
to another. I don't need to share this object, just create, send 
and forget. But I have no idea how make this without using shared 
attribute and casting to/from it.

&lt;/pre&gt;</description>
    <dc:creator>japplegame</dc:creator>
    <dc:date>2012-05-19T13:26:18</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21706">
    <title>unsynchronized access to primitive variables</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21706</link>
    <description>&lt;pre&gt;Hello to all,

I would like to know if D guarantees that access to primitive variable 
is atomic ?

I was looking for any source of information that says anything about 
unsynchronized access to primitive variables. What I want to know is if 
it is possible (in any way and any OS / hardware) for the following code 
to output anything other then 1 or 2:

import std.stdio;
import core.thread;

void main () {
   int value = 1;
   (new Thread({ value = 2; })).start();
   writeln(value);
}

Thanks !

&lt;/pre&gt;</description>
    <dc:creator>luka8088</dc:creator>
    <dc:date>2012-05-19T08:16:39</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21699">
    <title>using deimos.portaudio</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21699</link>
    <description>&lt;pre&gt;Hi,

I'm try to use the deimos portaudio bindings

https://github.com/D-Programming-Deimos/portaudio

I've managed to compile and run the test demo provided with the 
module.
It seems to work fine. However, when I add this statement:

PaStreamParameters outputParameters;

that I need to specify the output parameters for using the
Pa_OpenStream function, rather than the Pa_OpenDefaultStream
function used in the example, I get the following linker error:

dmd pa_test2.d -L-lportaudio
pa_test2.o: In function `_Dmain':
pa_test2.d:(.text._Dmain+0x22): undefined reference to 
`_D6deimos9portaudio18PaStreamParameters6__initZ'
collect2: ld returned 1 exit status
--- errorlevel 1

I'm a newby on D programming and also C programming,
so I'm pretty much lost even after extensive googling.

I'm on Debian Squeeze 64-bit, using the dmd2 compiler.
Any help would be appreciated!

&lt;/pre&gt;</description>
    <dc:creator>Samuele Carcagno</dc:creator>
    <dc:date>2012-05-19T02:31:57</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21693">
    <title>directory wildcard</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21693</link>
    <description>&lt;pre&gt;According to:
http://dlang.org/phobos/std_path.html#globMatch

it is possible to use wildcards spanning multiple directories.

assert (globMatch(`foo/foo\bar`, "f*b*r"));

But wildcards with dirEntries() seem less powerful.

`c:\partial*\path\*.d`

If I were to use:
absolutePath + filter! + globMatch

I would expand too many unrelated directories, no?

I happen to know in my case that 'partial*' will match exactly 
one directory, but I don't know the complete name...

So am I left with tokenizing dirSeparator and 'cd' into one 
directory at a time? Or am I missing some magic D function which 
does everything? (wouldn't be the first time that happened to me 
;) hence my question).




&lt;/pre&gt;</description>
    <dc:creator>Arne</dc:creator>
    <dc:date>2012-05-18T22:10:34</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.lang.d.learn">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.lang.d.learn</link>
  </textinput>
</rdf:RDF>

