On Friday, 11 December 2015 at 03:51:35 UTC, tcak wrote:
In D, directory structure doesn't matter. What matters is
module names.
Actually, it does matter sometimes.
// src/foo/bar.d
module foo.oops;
// main.d
import foo.oops;
void main() {}
Compile:
dmd -Isrc main.d
Result:
main.d(1):
Ali Çehreli wrote:
> http://ddili.org/ders/d.en/enum.html#ix_enum.EnumMembers,%20std.traits
Ali that's great! Thank you!
--
Shriramana Sharma, Penguin #395953
On Thursday, 10 December 2015 at 22:07:48 UTC, Entity325 wrote:
Usually the DMD compiler errors are very helpful, but I guess
nothing can be perfect. In this case, I have a class I'm trying
to declare. The class is intended to be a transport and storage
medium, to allow information to be
rumbu wrote:
> Constant folding: a is evaluated at compile time to + infinity.
Hmm... I guess the compiler figures that if someone is hardcoding that
expression then they don't want to see an exception. Thanks for the
explanation.
--
Shriramana Sharma, Penguin #395953
Here is my original SO question:
http://stackoverflow.com/questions/34218692/how-do-i-properly-set-socket-options-on-std-net-curl
any ideas?
thx!
Have anybody put together a lazy variant of cartesianProduct()
that operates on a range of ranges:
Sample call
cartesianProductDynamic([["2", "3"], ["green", "red"], ["apples",
"pears"]])
should return
[["2", "green", "apples"],
["3", "green", "apples"],
["2", "red", "apples"],
["3",
On 11.12.2015 22:05, Suliman wrote:
I am using https://github.com/buggins/ddbc
string query_string = (`SELECT user, password FROM otest.myusers where
user LIKE ` ~ `'%` ~ request["username"].to!string ~ `%';`);
Don't piece queries together without escaping the dynamic parts. Imagine
what
I am using https://github.com/buggins/ddbc
string query_string = (`SELECT user, password FROM otest.myusers
where user LIKE ` ~ `'%` ~ request["username"].to!string ~ `%';`);
auto rs = db.stmt.executeQuery(query_string);
string dbpassword;
string dbuser;
while
On Saturday, 12 December 2015 at 07:39:47 UTC, Suliman wrote:
if(a is null)
How to check if variable "is not null" ?
a !is null
or
!(a is null)
On 12/11/2015 05:41 PM, Enjoys Math wrote:
> import std.stdio;
> import std.typecons;
>
> int main(string[] argv)
> {
> auto value = Tuple(5, 6.7, "hello");
I don't understand how it relates to the error message but you should
use lowercase 'tuple' there:
auto value = tuple(5, 6.7,
string query_string = (`SELECT user, password FROM
otest.myusers where
user LIKE ` ~ `'%` ~ request["username"].to!string ~ `%';`);
Don't piece queries together without escaping the dynamic
parts. Imagine what happens when the user enters an apostrophe
in the username field.
Do you mean to
if(a is null)
How to check if variable "is not null" ?
ok, i have a working version (memory is nice, twice the speed as
non parallel) ;
http://dpaste.dzfl.pl/504a652c6c47
real0m14.427s
user1m19.347s
sys 0m0.124s
i've got similar performances, without Allocators, using directly
malloc and free
i had to recursively deallocate ...
On 12/10/2015 08:58 PM, Shriramana Sharma wrote:
Ali should really update that section
of his book to use EnumMembers.
Done[1]:
http://ddili.org/ders/d.en/enum.html#ix_enum.EnumMembers,%20std.traits
Thank you,
Ali
[1]
import std.stdio;
import std.typecons;
int main(string[] argv)
{
auto value = Tuple(5, 6.7, "hello");
assert(value[0] == 5);
assert(value[1] == 6.7);
assert(value[2] == "hello");
writeln("Hello D-World!");
return 0;
}
// Standard example copied from the
15 matches
Mail list logo