On 06/27/2014 01:49 AM, safety0ff wrote:
> On Friday, 27 June 2014 at 08:17:07 UTC, Ali Çehreli wrote:
>> Thank you for your responses. I am partly enlightened. :p
>
> I know you're a knowledgeable person in the D community, I may have
> stated many things you already knew, but I tried to answer
On Friday, 27 June 2014 at 07:34:55 UTC, safety0ff wrote:
On Friday, 27 June 2014 at 07:03:28 UTC, Ali Çehreli wrote:
1) After allocating memory by GC.calloc() to place objects on
it, what else should one do?
Use std.conv.emplace.
And possibly set BlkInfo flags to indicate whether the block
Try to make a faster one than http://dpaste.dzfl.pl/aa2ad03cb0dd
Post your reply here, existing entries must be included.
On Fri, Jun 27, 2014 at 03:59:47PM +, seany via Digitalmars-d-learn wrote:
[...]
> core.exception.AssertError@std.regex(5587): Assertion failure
>
> ./niarbyl(_d_assertm+0x26) [0x4e6c26]
> ./niarbyl() [0x4f45be]
> ./niarbyl(pure nothrow @property @trusted immutable(char)[]
> st
Cosider this:
ulong regexChk(string haystack, string needle)
{
// haystack and needle are okey
auto r = regex(needle, "g");
auto m = match(haystack, r);
// up to here is all fine
return m.hit().count();
}
I want to count the numbers needles is mathced in haystack
But I get
On Friday, 27 June 2014 at 05:26:09 UTC, Puming wrote:
On Thursday, 26 June 2014 at 08:02:24 UTC, bearophile wrote:
Puming:
I'm using scriptlike, which imports everything from
std.process for convienience, but I also need to import
another module, which contains a class `Config`, it conflicts
On Friday, 27 June 2014 at 14:27:46 UTC, H. S. Teoh via
Digitalmars-d-learn wrote:
Try this:
Get out of my head!
On Friday, 27 June 2014 at 07:43:27 UTC, Uranuz wrote:
I don't know why I use D enough long but I did not remember
this fact.
Sometimes we get spoiled by all the amazing/nifty things that do
work, and expect comparable things like this to Just Work. To be
honest, at first I didn't see any is
On Fri, Jun 27, 2014 at 06:04:18AM +, Uranuz via Digitalmars-d-learn wrote:
> Compiler can't deduce type for template struct Pair when using it with
> enum argument. There is an example
>
> import std.stdio;
>
> enum Category { first, second, third };
>
> struct Pair(F, S)
> {
> F fir
On Friday, 27 June 2014 at 13:02:55 UTC, Adam D. Ruppe wrote:
On Friday, 27 June 2014 at 12:51:45 UTC, bioinfornatics wrote:
I do not know if that is better to use websocket and if they
exists into dlang:
you could use websocket in D but if you are talking between two
separate D programs you
On Friday, 27 June 2014 at 13:03:20 UTC, John Colvin wrote:
On Friday, 27 June 2014 at 12:51:45 UTC, bioinfornatics wrote:
Hi,
I have a linux network and i would like to know if they are a
D library to communicate between computer efficiently.
I do not know if that is better to use websocke
On Friday, 27 June 2014 at 12:51:45 UTC, bioinfornatics wrote:
Hi,
I have a linux network and i would like to know if they are a D
library to communicate between computer efficiently.
I do not know if that is better to use websocket and if they
exists into dlang:
-
http://planet.jboss.org/
On Friday, 27 June 2014 at 12:51:45 UTC, bioinfornatics wrote:
I do not know if that is better to use websocket and if they
exists into dlang:
you could use websocket in D but if you are talking between two
separate D programs you can just use a regular socket
http://dlang.org/phobos/std_soc
On Friday, 27 June 2014 at 05:58:14 UTC, pgtkda wrote:
What does this symbol mean in relation to D?
~
~ D means it's about the best language I've come across so far.
Hi,
I have a linux network and i would like to know if they are a D
library to communicate between computer efficiently.
I do not know if that is better to use websocket and if they
exists into dlang:
-
http://planet.jboss.org/post/rest_vs_websocket_comparison_and_benchmarks
Thanks for yo
On Friday, 27 June 2014 at 08:17:07 UTC, Ali Çehreli wrote:
Thank you for your responses. I am partly enlightened. :p
On 06/27/2014 12:34 AM, safety0ff wrote:
> On Friday, 27 June 2014 at 07:03:28 UTC, Ali Çehreli wrote:
But addRange doesn't seem to make sense for stdlib.malloc'ed
memory, ri
On Friday, 27 June 2014 at 08:17:07 UTC, Ali Çehreli wrote:
So, the GC's default behavior is to scan the memory,
necessitating clearing the contents? That seems to make
GC.malloc() behave the same as GC.calloc() by default, doesn't
it?
Yes.
compare:
https://github.com/D-Programming-Language
On Friday, 27 June 2014 at 09:20:53 UTC, safety0ff wrote:
Yes.
compare:
https://github.com/D-Programming-Language/druntime/blob/master/src/gc/gc.d#L543
to:
https://github.com/D-Programming-Language/druntime/blob/master/src/gc/gc.d#L419
Actually, I just realized that I was wrong in saying "the m
On Friday, 27 June 2014 at 08:17:07 UTC, Ali Çehreli wrote:
Thank you for your responses. I am partly enlightened. :p
I know you're a knowledgeable person in the D community, I may
have stated many things you already knew, but I tried to answer
the questions as-is.
On 06/27/2014 12:34 AM,
On 06/27/2014 12:53 AM, safety0ff wrote:
I realize that my answer isn't completely clear in some cases, if you
still have questions, ask away.
Done! That's why we are here anyway. :p
Ali
Thank you for your responses. I am partly enlightened. :p
On 06/27/2014 12:34 AM, safety0ff wrote:
> On Friday, 27 June 2014 at 07:03:28 UTC, Ali Çehreli wrote:
>> 1) After allocating memory by GC.calloc() to place objects on it, what
>> else should one do?
>
> Use std.conv.emplace.
That much I
There is proposal exists for this topic
http://wiki.dlang.org/DIP40
I realize that my answer isn't completely clear in some cases, if
you still have questions, ask away.
Seems that I found answer myself. As far as I understand type
inference is working only for template functions but not struct
or class templates. This is why this not working and enum is not
responsible for that.
I don't know why I use D enough long but I did not remember this
fact.
On Friday, 27 June 2014 at 07:03:28 UTC, Ali Çehreli wrote:
1) After allocating memory by GC.calloc() to place objects on
it, what else should one do?
Use std.conv.emplace.
In what situations does one need to call addRoot() or
addRange()?
Add root creates an internal reference within the GC
I think, D is a typesafe language, therefore you can't use
variables with no type declaration.
One thing you can search for, are templates but even there you
have to define a type:
import std.stdio;
enum Category : string { first = "first"}
template Pair(T)
{
T t;
T cat;
}
1) After allocating memory by GC.calloc() to place objects on it, what
else should one do? In what situations does one need to call addRoot()
or addRange()?
2) Does the answer to the previous question differ for struct objects
versus class objects?
3) Is there a difference between core.stdc.
27 matches
Mail list logo