<?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/21842"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.d.learn/21837"/>
        <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: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/21842">
    <title>Struct hash issues with string fields</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21842</link>
    <description>&lt;pre&gt;I don't understand this:

import std.stdio;

struct Symbol { string val; }

void main()
{
    int[string] hash1;
    hash1["1".idup] = 1;
    hash1["1".idup] = 2;
    writeln(hash1);  // writes "["1":2]"

    int[Symbol] hash2;
    Symbol sym1 = Symbol("1".idup);
    Symbol sym2 = Symbol("1".idup);
    hash2[sym1] = 1;
    hash2[sym2] = 1;
    writeln(hash2);  // writes "[Symbol("1"):1, Symbol("1"):1]"
}

Why are sym1 and sym2 unique keys in hash2? Because the hash
implementation checks the array pointer instead of its contents? But
then why does hash1 not have the same issue?

I can't override toHash() in a struct, so what am I supposed to do in
order to make "sym1" and "sym2" be stored into the same hash key?

&lt;/pre&gt;</description>
    <dc:creator>Andrej Mitrovic</dc:creator>
    <dc:date>2012-05-26T19:53:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.d.learn/21837">
    <title>speeding up + ctfe question</title>
    <link>http://comments.gmane.org/gmane.comp.lang.d.learn/21837</link>
    <description>&lt;pre&gt;I finally made the primerange I wanted to make. I think I'm using a
rather dumb algorithm. The idea is to store the prime we're at in
curPrime and the amount of preceding primes in countPrime. Then
opindex is able to calculate how many primes following or preceding
curPrime we have to find to get the asked value.
I'm not english so some names can be poorly chosen. Code is at
http://dl.dropbox.com/u/15024434/d/primeRange.d

The problem is that it's pretty slow. I wanted to find the first prime
number with 10 digits and it literally takes forever (but manages it
though). Is there an easy way to speed up or is this the ceiling?
(better algorithms, stupidity's I've left,...)

I also have an array of primes I use to "quicktest" to see if
something is a prime. You can change it's size using setQuicktestSize
at runtime. I want to make it large at compile time though. as I'm new
to ctfe I have no idea as to how one can do this.

&lt;/pre&gt;</description>
    <dc:creator>maarten van damme</dc:creator>
    <dc:date>2012-05-26T13:49:43</dc:date>
  </item>
  <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 Mo&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
con&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>
  <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>

