I've gone on TDPL and the language reference here but still don't
get relative imports. I've isolated it to this:
./package1/package2/foo.d:
import std.stdio;
void doFoo() {
writeln(Foo!);
}
./main.d:
import package1.package2.foo;
void main() {
doFoo();
}
This works:
dmd -c main.d
dmd
I'm trying to achieve the syntax opts[...] = 123, rather than using
the more direct this[...] = 123. I can use this code:
-
class C
{
this()
{
opts = Opts(this);
opts[foo] = 1;
}
struct Opts
{
C c;
void opIndexAssign(T)(T value, string
Jos van Uden:
It's an old task (from 2007). The task description was changed
after the D entries were made.
Yes, there are about 63 Rosettacode tasks that I have not yet
updated:
accumulator_factory.d
address_of_a_variable.d
animation.d
boolean_values.d
Ok python3-dev was missing.
Now, it is a gdc problem:
[code]
def: hello
wrap_struct: 'RangeWrapper'
class.def: __iter__
class.def: next
wrapped_struct_init, S is 'struct pyd.make_object.RangeWrapper'
library_dirs: []
runtime_library_dirs: []
libraries: []
gdc -fPIC -nostartfiles -shared -fdebug
On 2013-08-30 09:39, eles wrote:
On Linux 64
$chmod +x htest
$cat ./htest
#!/usr/bin/env rdmd
import std.stdio;
void main() {
writeln(hello world!);
}
then:
$./htest
Error: cannot read file ./htest.d
Failed: 'dmd' '-v' '-o-' './htest.d' '-I.'
OTOH:
$cp htest htest.d
$./htest.d
hello
On Friday, 30 August 2013 at 13:32:25 UTC, eles wrote:
On Friday, 30 August 2013 at 11:34:59 UTC, Jacob Carlborg wrote:
On 2013-08-30 09:39, eles wrote:
I'm pretty sure it's DMD that is the problem.
Yes. But that's, the least to say, limiting.
This:
On Saturday, 31 August 2013 at 09:29:16 UTC, Atila Neves wrote:
How to relative imports actually work?
Atila
Actually for me it looks like it is a bug in automatic module
name deduction. It should always use full qualified name built
from directory path from closest import folder (set by -I
On Sat, 2013-08-31 at 12:56 +0200, Larry wrote:
Ok python3-dev was missing.
Are you using Python 3.3?
Are you using SCons or Tup for the build?
I just tried the SCons build OOTB and it fails to build PyD with DMD :-(
--
Russel.
On 08/31/2013 03:07 AM, Andrej Mitrovic wrote:
I'm trying to achieve the syntax opts[...] = 123, rather than using
the more direct this[...] = 123. I can use this code:
-
class C
{
this()
{
opts = Opts(this);
opts[foo] = 1;
}
struct Opts
On 9/1/13, Ali Çehreli acehr...@yahoo.com wrote:
This is the limitation of inner structs' not having an 'outer'
reference, right?
Right, but this was just a workaround. Anyway I did just realize I can
use opDispatch for this:
-
class C
{
this()
{
this.opts[foo] = 1;
}
Hi,
i want to save data from an array of variants into a file. I saw
that to!string format the array content in a nice way... There is
a way of converting the resulted string back to an array of
varianta?
thanks,
Bogdan
11 matches
Mail list logo