On Tuesday, 4 March 2014 at 06:31:24 UTC, Timothee Cour wrote:
that gives tid of spawned thread, not 'self'.
The link you mentioned says it is stored in the special variable
thisTid.
"bearophile" schrieb im Newsbeitrag
news:qqcdemwimcylaizjy...@forum.dlang.org...
> Christof Schardt:
>
>> By "trickery" I meant having to know about things like
>> "import std.exception : assumeUnique" for this basic kind of task.
>
> Your function has signature (you use "ref" instead of "in" or
Am 03.03.2014 21:49, schrieb Remo:
On Monday, 3 March 2014 at 19:51:45 UTC, Benjamin Thaut wrote:
Am 28.02.2014 21:14, schrieb Remo:
How to build DMD on windows ?
And then run all the test for it?
README.md is pretty empty at the moment.
Of course it is possible to wait for some Fixes in DMD c
On Fri, Feb 28, 2014 at 10:27 AM, Martin Nowak wrote:
> On 02/26/2014 10:16 PM, Timothee Cour wrote:
>
>> Currently (on OSX) I can runtime load a D dll from a C program, but not
>> from a D program, which seems silly.
>>
>> Is it possible to runtime load a D shared library as a standalone (ie
>>
On Mon, 03 Mar 2014 21:48:16 -0500, Casper Færgemand
wrote:
Is there any loss in performance instantiating an interface variable as
a final class implementing only that interface, as opposed to a class
variable?
You mean the difference between:
final class C : I {...}
// this
I i = new
Is there any loss in performance instantiating an interface
variable as a final class implementing only that interface, as
opposed to a class variable?
On Monday, 3 March 2014 at 12:23:49 UTC, Jeroen Bollen wrote:
If I were to compile without linking to the garbage collector,
what would and what wouldn't work in D?
You can get almost everything to work, though some built-in
features will need to be replaced/supplemented by library things
and
Ever since I installed the latest DMD 2.065 I cant seem to
compile and run .d files anymore. I'm installing dmd using the
.deb file on Ubuntu. When it is installed and I try to compile a
.d file the console gives me this.
cannot find source code for runtime library file 'object.d'
dmd
I don't get it. That should be a static assert, not static if.
Why would you even add into your build order a module that will
never be actually compiled?
If anything, static assert will prevent dead imports while such
"static return" will silently swallow them.
How would you propose handlin
It sounds suspicious. Clearly, you are not accessing a1 there,
and clearly a1 is set before being used.
Any chance to reduce it?
-Steve
I don't know. But I know that my little trick doesn't work in
lifetime.d although it works locally. Here what I tried:
import std.stdio;
struct Foo
On 2014-03-03 16:19, John Colvin wrote:
On Monday, 3 March 2014 at 22:03:24 UTC, captaindet wrote:
On 2014-03-03 14:58, John Colvin wrote:
On Monday, 3 March 2014 at 19:35:53 UTC, captaindet wrote:
std.algorithm.find has an overload that works with several needles:
// phobos doc example:
int[
Christof Schardt:
By "trickery" I meant having to know about things like
"import std.exception : assumeUnique" for this basic kind of
task.
Your function has signature (you use "ref" instead of "in" or
"out" because it performs read/write):
void rw(ref string x)
A string is a immutable(ch
I thought it could be nice to have a static return.
My Idea is to remove unnecessary bracket encapsulation made with some
static if statements.
It will works like this :
module xxx.opengl;
import buildSettings; // contains some global constants
static if (renderMode == directX)
return;
.
"John Colvin" schrieb im Newsbeitrag
news:zjsykclxreagfhqsq...@forum.dlang.org...
> On Monday, 3 March 2014 at 22:22:06 UTC, Christof Schardt wrote:
>> "John Colvin" schrieb im Newsbeitrag
>> news:dyfkblqonigrtmkwt...@forum.dlang.org...
>>> On Monday, 3 March 2014 at 21:44:16 UTC, Christof Schar
On Monday, 3 March 2014 at 18:46:24 UTC, Chris wrote:
On Monday, 3 March 2014 at 18:03:12 UTC, Frustrated wrote:
On Sunday, 2 March 2014 at 11:47:39 UTC, Steve Teale wrote:
On Sunday, 2 March 2014 at 10:05:05 UTC, Dicebot wrote:
There is nothing wrong about not using templates. Almost any
c
On Mon, 03 Mar 2014 15:34:18 -0500, Namespace
wrote:
On Monday, 3 March 2014 at 18:36:56 UTC, Steven Schveighoffer wrote:
On Mon, 03 Mar 2014 12:03:12 -0500, Namespace
wrote:
On Monday, 3 March 2014 at 02:44:09 UTC, Namespace wrote:
It's working now, I get all my debug infos I need.
Bu
On Monday, 3 March 2014 at 19:32:51 UTC, Dicebot wrote:
On Monday, 3 March 2014 at 18:46:24 UTC, Chris wrote:
E.g. an algorithm that finds the first instance of something
might be different for each type (string, char, int) and the
"abstract" implementation has to differentiate internally (if
On Monday, 3 March 2014 at 22:22:06 UTC, Christof Schardt wrote:
"John Colvin" schrieb im
Newsbeitrag
news:dyfkblqonigrtmkwt...@forum.dlang.org...
On Monday, 3 March 2014 at 21:44:16 UTC, Christof Schardt
wrote:
I'm evaluating D and try to write a binary io class.
I got stuck with strings:
On 03/03/2014 02:25 PM, Christof Schardt wrote:
> Thanks, Ali, this works.
Yay! :)
> book be equipped with a TOC and an index?
Yes, all of that will happen after I get back to working on the book and
its ever increasing list of to-dos. :)
Ali
"Ali Çehreli" schrieb im Newsbeitrag
news:lf2ude$1njf$1...@digitalmars.com...
> On 03/03/2014 01:44 PM, Christof Schardt wrote:> I'm evaluating D and try
> to write a binary io class.
> > I got stuck with strings:
> >
> > void rw(ref string x)
> > {
> > if(_isWriting)
> >
"John Colvin" schrieb im Newsbeitrag
news:dyfkblqonigrtmkwt...@forum.dlang.org...
> On Monday, 3 March 2014 at 21:44:16 UTC, Christof Schardt wrote:
>> I'm evaluating D and try to write a binary io class.
>> I got stuck with strings:
>>
>> void rw(ref string x)
>> {
>> if(_isWriti
On Monday, 3 March 2014 at 22:03:24 UTC, captaindet wrote:
On 2014-03-03 14:58, John Colvin wrote:
On Monday, 3 March 2014 at 19:35:53 UTC, captaindet wrote:
std.algorithm.find has an overload that works with several
needles:
// phobos doc example:
int[] a = [ 1, 4, 2, 3 ];
assert(find(a, [ 1
On 03/03/2014 01:44 PM, Christof Schardt wrote:> I'm evaluating D and
try to write a binary io class.
> I got stuck with strings:
>
> void rw(ref string x)
> {
> if(_isWriting)
> {
> int size = x.length;
> _f.rawWrite((&size)[0..1]);
>
On Monday, 3 March 2014 at 21:44:16 UTC, Christof Schardt wrote:
I'm evaluating D and try to write a binary io class.
I got stuck with strings:
void rw(ref string x)
{
if(_isWriting)
{
int size = x.length;
_f.rawWrite((&size)[0..1]);
_f
On 2014-03-03 14:58, John Colvin wrote:
On Monday, 3 March 2014 at 19:35:53 UTC, captaindet wrote:
std.algorithm.find has an overload that works with several needles:
// phobos doc example:
int[] a = [ 1, 4, 2, 3 ];
assert(find(a, [ 1, 3 ], 4) == tuple([ 4, 2, 3 ], 2));
the function i want to
I'm evaluating D and try to write a binary io class.
I got stuck with strings:
void rw(ref string x)
{
if(_isWriting)
{
int size = x.length;
_f.rawWrite((&size)[0..1]);
_f.rawWrite(x);
}
else
{
int size
On Monday, 3 March 2014 at 19:35:53 UTC, captaindet wrote:
std.algorithm.find has an overload that works with several
needles:
// phobos doc example:
int[] a = [ 1, 4, 2, 3 ];
assert(find(a, [ 1, 3 ], 4) == tuple([ 4, 2, 3 ], 2));
the function i want to write has to deal with variadic
argumen
On Monday, 3 March 2014 at 19:51:45 UTC, Benjamin Thaut wrote:
Am 28.02.2014 21:14, schrieb Remo:
How to build DMD on windows ?
And then run all the test for it?
README.md is pretty empty at the moment.
Of course it is possible to wait for some Fixes in DMD
compiler may be
it could be faster j
On Monday, 3 March 2014 at 19:51:45 UTC, Benjamin Thaut wrote:
Am 28.02.2014 21:14, schrieb Remo:
How to build DMD on windows ?
And then run all the test for it?
README.md is pretty empty at the moment.
Of course it is possible to wait for some Fixes in DMD
compiler may be
it could be faster j
On Monday, 3 March 2014 at 18:36:56 UTC, Steven Schveighoffer
wrote:
On Mon, 03 Mar 2014 12:03:12 -0500, Namespace
wrote:
On Monday, 3 March 2014 at 02:44:09 UTC, Namespace wrote:
It's working now, I get all my debug infos I need.
But: I have absolutly no idea how to get the correct TypeInfo
Am 28.02.2014 21:14, schrieb Remo:
How to build DMD on windows ?
And then run all the test for it?
README.md is pretty empty at the moment.
Of course it is possible to wait for some Fixes in DMD compiler may be
it could be faster just to fix them by my self and then hope that the
fix will be acc
std.algorithm.find has an overload that works with several needles:
// phobos doc example:
int[] a = [ 1, 4, 2, 3 ];
assert(find(a, [ 1, 3 ], 4) == tuple([ 4, 2, 3 ], 2));
the function i want to write has to deal with variadic arguments serving as
needles. unfortunately, i failed trying to make
On Monday, 3 March 2014 at 18:46:24 UTC, Chris wrote:
E.g. an algorithm that finds the first instance of something
might be different for each type (string, char, int) and the
"abstract" implementation has to differentiate internally (if
string > else if int > else if ...). But this is no longe
On Monday, 3 March 2014 at 17:24:08 UTC, Dominikus Dittes Scherkl
wrote:
On Monday, 3 March 2014 at 16:40:09 UTC, Chris wrote:
I'm always willing to use templates, but maybe in fact the use
cases are limited. I have a class for html elements (that
implements DOM functionality), and a class for
On Monday, 3 March 2014 at 18:03:12 UTC, Frustrated wrote:
On Sunday, 2 March 2014 at 11:47:39 UTC, Steve Teale wrote:
On Sunday, 2 March 2014 at 10:05:05 UTC, Dicebot wrote:
There is nothing wrong about not using templates. Almost any
compile-time design can be moved to run-time and express
On Mon, 03 Mar 2014 12:03:12 -0500, Namespace
wrote:
On Monday, 3 March 2014 at 02:44:09 UTC, Namespace wrote:
It's working now, I get all my debug infos I need.
But: I have absolutly no idea how to get the correct TypeInfo in
rt_finalize2. The ClassInfo is identified by casting the void*
On Monday, 3 March 2014 at 18:03:12 UTC, Frustrated wrote:
If you don't attempt to use templates, even in example code,
you won't get it.
What I don't get in this discussion is that all those fine phobos
examples are neglected. Yes, it is library code, but
writef/formattedWrite/std.conv.to,
On Monday, 3 March 2014 at 08:18:04 UTC, alexhairyman wrote:
On Monday, 3 March 2014 at 07:38:05 UTC, Ali Çehreli wrote:
On 03/02/2014 10:38 PM, alexhairyman wrote:
> I think I'm missing something big, but I'm having troubles
with mutexes
> (using in a parallel foreach loop somewhere else); Why
On Sunday, 2 March 2014 at 11:47:39 UTC, Steve Teale wrote:
On Sunday, 2 March 2014 at 10:05:05 UTC, Dicebot wrote:
There is nothing wrong about not using templates. Almost any
compile-time design can be moved to run-time and expressed in
more common OOP form. And using tool you have mastery
Anonymouse:
To write tidy code? Much like const correctness, avoiding magic
numbers and globals, not polluting namespace overly, only
import what you need etc etc.
In general avoiding the self initialization of the GC doesn't
make your code more tidy. Totally not activating the GC is only
f
On Monday, 3 March 2014 at 16:40:09 UTC, Chris wrote:
I'm always willing to use templates, but maybe in fact the use
cases are limited. I have a class for html elements (that
implements DOM functionality), and a class for building trees
with the tags. Of course, for html tags only string as a t
On Monday, 3 March 2014 at 16:42:10 UTC, Gary Willoughby wrote:
class Test
{
private int number;
public void setNumber(int newValue)
{
number = newValue;
}
public int getNumber()
{
return number;
}
}
I nee
On Monday, 3 March 2014 at 02:44:09 UTC, Namespace wrote:
It's working now, I get all my debug infos I need.
But: I have absolutly no idea how to get the correct TypeInfo
in rt_finalize2. The ClassInfo is identified by casting the
void* pointer to a void** and then cast this void** to
ClassInf
On Monday, 3 March 2014 at 12:07:15 UTC, Tolga Cakiroglu wrote:
Have you got a small example?
import std.stdio;
class Test{
private int number;
public void setNumber( int newValue ) shared{ number =
newValue; }
public int getNumber() shared{ return number; }
}
void main()
On Sunday, 2 March 2014 at 18:59:23 UTC, Steve Teale wrote:
On Sunday, 2 March 2014 at 15:23:03 UTC, H. S. Teoh wrote:
This is a pretty good primer to templates:
https://semitwist.com/articles/article/view/template-primer-in-d
The trouble is with most of these tutorials that they off
On Monday, 3 March 2014 at 01:48:23 UTC, bearophile wrote:
Jeroen Bollen:
Is there maybe a way to disable the garbage collector from
running unless you explicitly call it?
I often seem to ask silly questions, but why do you need that?
Bye,
bearophile
To write tidy code? Much like const cor
MacPorts DMD is still 2.064.
There appears to be a notice that the maintainer position for this port
is "vacant". I have no knowledge of creating or updating ports so cannot
really volunteer to do this myself, but it would be good if some people
did. I would be happy to be involved if others were
On Monday, 3 March 2014 at 02:33:49 UTC, Adam D. Ruppe wrote:
On Sunday, 2 March 2014 at 23:21:49 UTC, Jeroen Bollen wrote:
Is there maybe a way to disable the garbage collector from
running unless you explicitly call it?
That's really the default. The GC in D runs if and only if you
do a GC
Have you got a small example?
import std.stdio;
class Test{
private int number;
public void setNumber( int newValue ) shared{ number = newValue;
}
public int getNumber() shared{ return number; }
}
void main(){
auto test = new Test();
(cast(shared)test).set
On Monday, 3 March 2014 at 07:38:05 UTC, Ali Çehreli wrote:
On 03/02/2014 10:38 PM, alexhairyman wrote:
> I think I'm missing something big, but I'm having troubles
with mutexes
> (using in a parallel foreach loop somewhere else); Why do the
trylocks
> return true shouldn't they return false bec
50 matches
Mail list logo