On Monday, 24 February 2014 at 14:14:43 UTC, Tobias Pankrath
wrote:
On Monday, 24 February 2014 at 13:56:01 UTC, Remo wrote:
Hi,
right now I am truing to figure out how the constructors
behave in D2.
Question 1: why it is not possible to create custom ctor for
struct?
The design of D reli
On Monday, 24 February 2014 at 14:34:14 UTC, Russel Winder wrote:
Two cores with hyperthreads generally means a maximum speed up
of 2 with optimized native code.
Not true. If the code is not trivial and the threads are not
doing exactly same instructions (i.e. they can do some search
where n
On Tuesday, 25 February 2014 at 12:45:06 UTC, Cherry wrote:
Hello
I want to define an enum int, but I want to make it possible to
set its value when I run dmd from the command line. Is it
possible in D?
No, D does not allow passing values via the compiler command
line. You can use the -debu
On Tuesday, 25 February 2014 at 12:57:51 UTC, Dejan Lekic wrote:
On Tuesday, 25 February 2014 at 12:45:06 UTC, Cherry wrote:
Hello
I want to define an enum int, but I want to make it possible
to set its value when I run dmd from the command line. Is it
possible in D?
Regards
Cherry
D offe
On Tuesday, 25 February 2014 at 12:45:06 UTC, Cherry wrote:
Hello
I want to define an enum int, but I want to make it possible to
set its value when I run dmd from the command line. Is it
possible in D?
Regards
Cherry
D offers version blocks: http://dlang.org/version.html#version
It would
module myproggy;
import std.stdio;
enum foo = 5;
enum bar = "walter";
int main() {
writeln(bar);
return foo;
}
... and you call compiler like:
dmd myproggy.d -Dfoo=42 -Dbar=hello
smart, new D compiler would replace enums (iff they exist in
the source code) with the given arguments, so
Hello
I want to define an enum int, but I want to make it possible to
set its value when I run dmd from the command line. Is it
possible in D?
Regards
Cherry
On Tuesday, 25 February 2014 at 13:21:38 UTC, bearophile wrote:
Dejan Lekic:
And yes, if someone builds multiple modules, he/she would have
to use fully-qualified name. Example: dmd foo.d bar.d
-Dfoo.var1=5 -Dbar.var4=walter
If you are interested in such things I suggest you to take a
look
Dejan Lekic:
And yes, if someone builds multiple modules, he/she would have
to use fully-qualified name. Example: dmd foo.d bar.d
-Dfoo.var1=5 -Dbar.var4=walter
If you are interested in such things I suggest you to take a look
at how the Fortress language does them.
Bye,
bearophile
I don't like it. I would prefer a CTFE-able counter part to
boost::program_options that generates thouse enums from a
config file.
If you want a config file, you do not need -D args. You simply
import() it. Right?
I don't like it. I would prefer a CTFE-able counter part to
boost::program_options that generates thouse enums from a
config file.
That would be good.
I would have taken that approach for my current needs, but I do
not see any way to have a fallback if the config file does not
exist. I m
I would have taken that approach for my current needs, but I do
not see any way to have a fallback if the config file does not
exist. I mean mixin import would just fail to compile if the
configuration file is not present. I need an option to live
with default values if the configuration file
Just a few clarifications
For now maybe I could keep an empty/default config.d somewhere
in the library source path.
I am creating a DSL (Domain Specific Language) library. I am
talking about the library src path of my DSL library.
And I could use that with multiple -J options. This w
On Tuesday, 25 February 2014 at 13:26:20 UTC, Dejan Lekic wrote:
I don't like it. I would prefer a CTFE-able counter part to
boost::program_options that generates thouse enums from a
config file.
If you want a config file, you do not need -D args. You simply
import() it. Right?
Yep, that
On Tuesday, 25 February 2014 at 14:26:13 UTC, Tobias Pankrath
wrote:
Something like "static if(fileExists!"config.d")
mixin(import("config.d")) else ...".
Thoughts?
Regards
- Cherry
--
static if(__traits(compiles, import("config.d")))
{
// import/parse/mixin
}
else
{
// default here
}
--
May
What does the somewhat cryptic DUB error
Trying to append absolute path.
mean.
By a process of elimination, the offending line in the json file
is
"importPaths": ["/usr/local/include/d/gtkd-2"]
Steve
On Tuesday, 25 February 2014 at 07:59:33 UTC, Maxim Fomin wrote:
On Monday, 24 February 2014 at 14:14:43 UTC, Tobias Pankrath
wrote:
On Monday, 24 February 2014 at 13:56:01 UTC, Remo wrote:
Hi,
right now I am truing to figure out how the constructors
behave in D2.
Question 1: why it is not
On Tuesday, 25 February 2014 at 14:30:23 UTC, Francesco Cattoglio
wrote:
On Tuesday, 25 February 2014 at 14:26:13 UTC, Tobias Pankrath
wrote:
Something like "static if(fileExists!"config.d")
mixin(import("config.d")) else ...".
Thoughts?
Regards
- Cherry
--
static if(__traits(compiles, impor
On Tue, 2014-02-25 at 12:33 +, thedeemon wrote:
> On Monday, 24 February 2014 at 14:34:14 UTC, Russel Winder wrote:
>
> > Two cores with hyperthreads generally means a maximum speed up
> > of 2 with optimized native code.
>
> Not true. If the code is not trivial and the threads are not
> do
I built some C shared libraries on Mint a while back and
everything with my binding worked out fine. I decided to try out
ubuntu and on getting everything set up there(using the same
previously built shared libs), I am getting an error that I am
unfamiliar with.
/usr/bin/ld: -f may not be use
Can you post the full command line of the linker invocation?
same problem:
$DMDLOC/dmd2/linux/bin64/dmd hello.d
/usr/bin/ld: cannot find -l:libphobos2.a
collect2: ld returned 1 exit status
--- errorlevel 1
$ cat $DMDLOC/dmd2/linux/bin64/dmd.conf
[Environment]
DFLAGS=-I%@P%/../../src/phobos -I%@P%/../../src/druntime/import
-L-L%@P%/../lib64 -L-L%@P%/..
Grammar spec (http://dlang.org/grammar.html#AliasDeclaration)
allows:
AliasDeclaration:
alias BasicType Declarator
DMD allows:
alias ref int MyRefInt;
Is the ref storage class allowed by the current grammar spec?
It's not dmd problem, it's up to ld linker and the issue is same
for other compiled languages including C and C++. You should
specify LD_LIBRARY_PATH variable in your system before executing
any compiled D application. You can add export of this
environment variable to your $HOME/.profile or $H
On Tuesday, February 25, 2014 22:32:44 cal wrote:
> Grammar spec (http://dlang.org/grammar.html#AliasDeclaration)
> allows:
>
> AliasDeclaration:
> alias BasicType Declarator
>
> DMD allows:
>
> alias ref int MyRefInt;
>
> Is the ref storage class allowed by the current grammar spec?
No.
On Tuesday, 25 February 2014 at 23:09:43 UTC, Jonathan M Davis
wrote:
On Tuesday, February 25, 2014 22:32:44 cal wrote:
Grammar spec (http://dlang.org/grammar.html#AliasDeclaration)
allows:
AliasDeclaration:
alias BasicType Declarator
DMD allows:
alias ref int MyRefInt;
Is the ref stora
Is someone willing to write a D entry for this?
http://rosettacode.org/wiki/Rendezvous
Bye,
bearophile
http://dpaste.dzfl.pl/80c6225ed090
The code above demonstrates run-time contracts using interface
based programming.
It provides two co-benfits: Simplified class implementation(you
do not have to use interfaces for types which then requires
casting that type for orthogonal behavior) and run-
i already tried LD_LIBRARY_PATH (and alternatives), however,
looking deeper it seems like the admin has disabled
LD_LIBRARY_PATH on this system (work terminal):
http://stackoverflow.com/questions/9843178/linux-capabilities-setcap-seems-to-disable-ld-library-path
On Tuesday, 25 February 2014 at
On Tuesday, 25 February 2014 at 14:32:42 UTC, Steve Teale wrote:
What does the somewhat cryptic DUB error
Trying to append absolute path.
mean.
By a process of elimination, the offending line in the json
file is
"importPaths": ["/usr/local/include/d/gtkd-2"]
Steve
The path you have provi
On 02/25/2014 03:48 PM, bearophile wrote:
Is someone willing to write a D entry for this?
http://rosettacode.org/wiki/Rendezvous
Bye,
bearophile
I think the following satisfies the requirements. Improve at will! :p
import std.stdio;
import std.exception;
import std.array;
import std.concurre
On Tuesday, 25 February 2014 at 13:26:20 UTC, Dejan Lekic wrote:
I don't like it. I would prefer a CTFE-able counter part to
boost::program_options that generates thouse enums from a
config file.
If you want a config file, you do not need -D args. You simply
import() it. Right?
or import
On Wednesday, 26 February 2014 at 03:33:38 UTC, Jesse Phillips
wrote:
On Tuesday, 25 February 2014 at 14:32:42 UTC, Steve Teale wrote:
What does the somewhat cryptic DUB error
Trying to append absolute path.
mean.
By a process of elimination, the offending line in the json
file is
"importP
On Tuesday, 25 February 2014 at 19:41:54 UTC, Marc Schütz wrote:
Can you post the full command line of the linker invocation?
It was done through Mono-D, so to answer this for you I went and
tried do it on a command line. I got some different errors, so
I'm currently working on fixing them. I
34 matches
Mail list logo