On Wednesday, 28 January 2015 at 14:59:52 UTC, Ali Çehreli wrote:
name must be 'enum':
On 01/28/2015 06:34 AM, zhmt wrote:
void getT(SRC,DEST)(SRC src,DEST dest)
{
foreach (i, type; typeof(SRC.tupleof)) {
string name = SRC.tupleof[i].stringof;
enum name = SRC.tupleof[i].st
On Wednesday, 28 January 2015 at 23:34:10 UTC, Chris Williams
wrote:
On Wednesday, 28 January 2015 at 09:44:29 UTC, zhmt wrote:
Sometime , I need to copy them:
thrift.Card tc;
db.Card dc;
dc.id = tc.id;
dc.pwd = tc.pwd;
...
It is boring coding, I want a solution to copy them
automatica
On 29/01/2015 8:08 p.m., tcak wrote:
I have a library that has many folders and D files in them. I do not
want to list name of all module files one by one while compiling
projects. So, I thought I could use "-I" flag while compiling. It says:
-Ipath
where to look for imports
So, I made a t
I have a library that has many folders and D files in them. I do
not want to list name of all module files one by one while
compiling projects. So, I thought I could use "-I" flag while
compiling. It says:
-Ipath
where to look for imports
So, I made a test as follows:
./test.d
=
On Thursday, January 29, 2015 05:02:58 ketmar via Digitalmars-d-learn wrote:
> http://wiki.dlang.org/DIP25
> this is a very recent thing, it wasn't coded when 2.066 was released.
I don't know if it's even fully coded up in git master, though clearly it's
at least partially there, because @ was put
On Thu, 29 Jan 2015 04:54:38 +, Jesse Phillips wrote:
> A recent discussion over in digitalmars.D
> http://forum.dlang.org/post/rtwbtxigfeupvykpb...@forum.dlang.org
>
> talks about accepting @return... Here is an example from the PR:
> https://github.com/D-Programming-Language/dmd/
compare/36
A recent discussion over in digitalmars.D
http://forum.dlang.org/post/rtwbtxigfeupvykpb...@forum.dlang.org
talks about accepting @return... Here is an example from the PR:
https://github.com/D-Programming-Language/dmd/compare/366422338ece...6b86b12f79e8
struct At
{
@property auto info() @safe @
On Wednesday, 28 January 2015 at 12:46:20 UTC, Fyodor Ustinov
wrote:
On Wednesday, 28 January 2015 at 12:32:29 UTC, Tobias Pankrath
wrote:
In your case above, it's std.variant : Variant, which does not
work when shared.
I look into variant.d and after seeing so many lines "@@@ BUG"
- strange
[0] http://brew.sh/
Do I just put 'brew dub'?
First install brew then
$ brew install dub
From that it should just be dub to run.
Don't forget to restart terminal afterwards or just rerun bash.
If dub isn't found, PATH variable will need to be changed via
.bashrc. But I'm doubting its needed
On 29/01/2015 1:24 p.m., Joel wrote:
On Wednesday, 28 January 2015 at 23:48:52 UTC, Rikki Cattermole wrote:
On 29/01/2015 11:27 a.m., Joel wrote:
When I setup dub/dmd on my OSX install, I used the OSX packages and it
should already be on the PATH variable.
What packages? I'm new to Mac OS.
On Wednesday, 28 January 2015 at 23:48:52 UTC, Rikki Cattermole
wrote:
On 29/01/2015 11:27 a.m., Joel wrote:
When I setup dub/dmd on my OSX install, I used the OSX
packages and it
should already be on the PATH variable.
What packages? I'm new to Mac OS.
Ohh, I was meaning a dmg.
But ugh lo
Thanks Vladimir.
On 29/01/2015 11:27 a.m., Joel wrote:
When I setup dub/dmd on my OSX install, I used the OSX packages and it
should already be on the PATH variable.
What packages? I'm new to Mac OS.
Ohh, I was meaning a dmg.
But ugh looks like I lied, my bad, only had to do it once.
Looks like I used brew[0]
On Wednesday, 28 January 2015 at 14:18:38 UTC, Trollgeir wrote:
I'm having some trouble trying to stream data to my plot.ly
graph:
https://plot.ly/62/~Trollgeir/
The API: https://plot.ly/streaming/
I am able to post messages that get recorded into the stream
live, although right after curl u
On Wednesday, 28 January 2015 at 09:44:29 UTC, zhmt wrote:
Sometime , I need to copy them:
thrift.Card tc;
db.Card dc;
dc.id = tc.id;
dc.pwd = tc.pwd;
...
It is boring coding, I want a solution to copy them
automatically:
void copyObj(SRC,DEST)(SRC src,DEST dest)
{
foreach (i,
On Wednesday, 28 January 2015 at 23:15:32 UTC, bearophile wrote:
I think you can try to open a diagnostic enhancement request.
Nice, that's what I'd hoped for you'd say :)
I'll dig into it later on...
On Wednesday, 28 January 2015 at 22:43:36 UTC, bearophile wrote:
It's such a fundamental part of D+Phobos that newbies are
forced to learn this quickly. On the other hand an informative
error message could be useful...
What error message do you suggest?
Something like:
..., expression o
Chris Williams:
Range is not castable to array. See std.array.array to generate
an array from a Range.
Currently this program:
void main() {
import std.range;
int[] a = iota(10);
}
Gives an error like:
test.d(3,19): Error: cannot implicitly convert expression
(iota(10)) of type R
On Wednesday, 28 January 2015 at 22:43:36 UTC, bearophile wrote:
Nordlöw:
Is there any chance we could add logic to dmd+phobos that
hints user about this?
It's such a fundamental part of D+Phobos that newbies are
forced to learn this quickly. On the other hand an informative
error message c
Nordlöw:
Is there any chance we could add logic to dmd+phobos that hints
user about this?
It's such a fundamental part of D+Phobos that newbies are forced
to learn this quickly. On the other hand an informative error
message could be useful...
What error message do you suggest?
Bye,
bearo
On Wednesday, 28 January 2015 at 01:39:21 UTC, Nordlöw wrote:
Ping. Why no answers? Should i post this as a DUB issue on
github instead?
I made it an issue here:
https://github.com/D-Programming-Language/dub/issues/498
When I setup dub/dmd on my OSX install, I used the OSX packages
and it should already be on the PATH variable.
What packages? I'm new to Mac OS.
On Wednesday, 28 January 2015 at 14:54:27 UTC, data man wrote:
auto arr1 = [1,2,3].map!"a*2".array;
auto arr2 = [1,2,3].filter!"a<3".array;
Is there any chance we could add logic to dmd+phobos that hints
user about this?
Thx very much for all the help, I will try.
name must be 'enum':
On 01/28/2015 06:34 AM, zhmt wrote:
void getT(SRC,DEST)(SRC src,DEST dest)
{
foreach (i, type; typeof(SRC.tupleof)) {
string name = SRC.tupleof[i].stringof;
enum name = SRC.tupleof[i].stringof;
__traits(getMember, dest, name) = __traits(ge
On Wednesday, 28 January 2015 at 11:30:13 UTC, Marc Schütz wrote:
On Wednesday, 28 January 2015 at 09:44:29 UTC, zhmt wrote:
It is boring coding, I want a solution to copy them
automatically:
void copyObj(SRC,DEST)(SRC src,DEST dest)
{
foreach (i, type; typeof(SRC.tupleof)) {
On Wednesday, 28 January 2015 at 14:32:38 UTC, mzf wrote:
is there any simple way to convert?
int [] arr1 = [1,2,3].map!"a*2"; //compile error
int [] arr2 = [1,2,3].filter!"a<3";//compile error
auto arr1 = [1,2,3].map!"a*2".array;
auto arr2 = [1,2,3].filter!"a<3".array;
On Wednesday, 28 January 2015 at 14:35:58 UTC, zhmt wrote:
Anybody help?
__Traits functions are evaluated at compile time so it's not as
simple.
The best you can do is to generate a string to mixin based on the
aggragate members. here i have an example of how you can iterate
through the memb
The final version works well:
void copyObj(SRC,DEST)(ref SRC src,ref DEST dest)
{
foreach (i, type; typeof(SRC.tupleof)) {
__traits(getMember, dest, SRC.tupleof[i].stringof) =
__traits(getMember, src, SRC.tupleof[i].stringof);
}
}
thank u , @Marc Schütz .
On 01/28/15 10:44, zhmt via Digitalmars-d-learn wrote:
> I have a struct created by thrift:
>
> struct Card {
> long id;
> string pwd;
> long agentId;
> bool valid;
> long rmb;
> long createDate;
> long soldDate;
> long chargeDate;
>
> mixin TStructHelpers!([
> TFieldMeta(`i
Anybody help?
is there any simple way to convert?
int [] arr1 = [1,2,3].map!"a*2"; //compile error
int [] arr2 = [1,2,3].filter!"a<3";//compile error
void getT(SRC,DEST)(SRC src,DEST dest)
{
foreach (i, type; typeof(SRC.tupleof)) {
string name = SRC.tupleof[i].stringof;
__traits(getMember, dest, name) = __traits(getMember, src,
name);
writeln(name);
}
}
when I write the code above, the compi
I'm having some trouble trying to stream data to my plot.ly graph:
https://plot.ly/62/~Trollgeir/
The API: https://plot.ly/streaming/
I am able to post messages that get recorded into the stream
live, although right after curl uploads it, it just seems to wait
for a response it's not getting,
On Wednesday, 28 January 2015 at 12:32:29 UTC, Tobias Pankrath
wrote:
In your case above, it's std.variant : Variant, which does not
work when shared.
I look into variant.d and after seeing so many lines "@@@ BUG" -
strange that it somehow works. :)
On Wednesday, 28 January 2015 at 12:29:09 UTC, Fyodor Ustinov
wrote:
On Wednesday, 28 January 2015 at 11:27:53 UTC, Kagamin wrote:
Associative array doesn't support thread-safe operations,
that's why they don't work on shared instance. You should use
std.concurrency or implement low-level concu
On Wednesday, 28 January 2015 at 11:27:53 UTC, Kagamin wrote:
Associative array doesn't support thread-safe operations,
that's why they don't work on shared instance. You should use
std.concurrency or implement low-level concurrency mechanism.
If associative array does not support "share" attr
On Wednesday, 28 January 2015 at 11:50:46 UTC, Danny wrote:
For Windows, if I use GetStdHandle, is the resulting HANDLE
valid for threads other than the one that called GetStdHandle ?
Because the HANDLE is a pointer but doesn't have "shared". Does
one know for Windows handles in general which a
On 29/01/2015 12:54 a.m., Suliman wrote:
Just interesting is there any plans to replace net.curl on native
lib? I mean not plans for long future, but some stuff on which
somebody active work?
The best I can suggest is Vibe.d.
Just interesting is there any plans to replace net.curl on native
lib? I mean not plans for long future, but some stuff on which
somebody active work?
Hello,
I'm trying to write some toy examples using threads in D.
Is the std.stdio.File thread-local or shared? Is flockfile used
when I synchronize on it?
I tried checking phobos myself and found some things I don't get
(in stdio.d):
alias FLOCK = flockfile;
this(this) { @trusted
if(fps
On 28/01/2015 1:34 p.m., Joel wrote:
On Tuesday, 27 January 2015 at 08:08:19 UTC, Joel wrote:
Oope, yeah, and it ran.
Thanks Rikki, I wiped off the dub installation. Now, no errors. The
small program worked too.
I don't now how to set up the dub executable to work with out doing
stuff like th
On 28/01/2015 2:14 p.m., Joel wrote:
On Wednesday, 28 January 2015 at 00:34:13 UTC, Joel wrote:
On Tuesday, 27 January 2015 at 08:08:19 UTC, Joel wrote:
Oope, yeah, and it ran.
Thanks Rikki, I wiped off the dub installation. Now, no errors. The
small program worked too.
Actually I got this
Some reading:
http://ddili.org/ders/d.en/concurrency.html
http://ddili.org/ders/d.en/concurrency_shared.html
http://www.informit.com/articles/article.aspx?p=1609144
On Wednesday, 28 January 2015 at 09:44:29 UTC, zhmt wrote:
It is boring coding, I want a solution to copy them
automatically:
void copyObj(SRC,DEST)(SRC src,DEST dest)
{
foreach (i, type; typeof(SRC.tupleof)) {
auto name = SRC.tupleof[i].stringof;
__traits(getMember, de
Associative array doesn't support thread-safe operations, that's
why they don't work on shared instance. You should use
std.concurrency or implement low-level concurrency mechanism.
How you thought about merging Cook2 with DUB?
I'm not the author the Cook2. :)
On Wednesday, 28 January 2015 at 10:32:56 UTC, Fyodor Ustinov
wrote:
On Wednesday, 28 January 2015 at 10:20:42 UTC, zhmt wrote:
try __gshared
It seems to me - is not the solution, it's a hack. I want to
understand what the happening. :)
I am new to D. But I that error yesterday, and it's s
On Wednesday, 28 January 2015 at 10:20:42 UTC, zhmt wrote:
try __gshared
It seems to me - is not the solution, it's a hack. I want to
understand what the happening. :)
On Wednesday, 28 January 2015 at 01:53:43 UTC, data man wrote:
Try it: https://github.com/gecko0307/Cook2
Looks nice...I'll try it...but I still want integration with
DUB's other feature to automatically download external packages
from github.
How you thought about merging Cook2 with DUB?
On Wednesday, 28 January 2015 at 10:16:02 UTC, Fyodor Ustinov
wrote:
Hi!
Simple program:
import std.variant;
shared Variant[string] t;
void main() {
t["t"] = "bebebe";
}
Without "shared" this program compiles and works.
With shared I get:
aa.d(6): Error: template
std.variant.VariantN!3
Hi!
Simple program:
import std.variant;
shared Variant[string] t;
void main() {
t["t"] = "bebebe";
}
Without "shared" this program compiles and works.
With shared I get:
aa.d(6): Error: template
std.variant.VariantN!32LU.VariantN.opAssign cannot deduce
function from argument types !()(
I have a struct created by thrift:
struct Card {
long id;
string pwd;
long agentId;
bool valid;
long rmb;
long createDate;
long soldDate;
long chargeDate;
mixin TStructHelpers!([
TFieldMeta(`id`, 1, TReq.OPTIONAL),
TFieldMeta(`pwd`, 2, TReq.OPTIONAL),
TFieldMeta(`ag
53 matches
Mail list logo