edit : btw, I understand how to build an app that conscists out
of a few source files, I'd just do 'dmd file1.d file2.d' I
amtalking here about the situation where that's unpractical
because of the amount and folder structure.
On Tuesday, 5 August 2014 at 07:27:18 UTC, nikki wrote:
Hello, I am completely new to D and have been paying around with
the tutorials, some docs and little test programs.
Now I want to try and use https://github.com/elvisxzhou/artemisd
for little gamedev experiment but I am running into build
Hello, I am completely new to D and have been paying around with
the tutorials, some docs and little test programs.
Now I want to try and use https://github.com/elvisxzhou/artemisd
for little gamedev experiment but I am running into build issues.
That project doesn't have a Makefile in the repo,
On Sunday, 3 August 2014 at 23:48:09 UTC, Martin wrote:
When I use the spawnProcess function in std.process, the
command line arguments that I provide to the function seem to
get "quoted". Is there a way to tell the spawnProcess function
that I want the command line arguments to be non-quoted?
On Tuesday, 5 August 2014 at 07:29:46 UTC, nikki wrote:
edit : btw, I understand how to build an app that conscists out
of a few source files, I'd just do 'dmd file1.d file2.d' I
amtalking here about the situation where that's unpractical
because of the amount and folder structure.
With rdmd,
On Tuesday, 5 August 2014 at 07:29:46 UTC, nikki wrote:
edit : btw, I understand how to build an app that conscists out
of a few source files, I'd just do 'dmd file1.d file2.d' I
amtalking here about the situation where that's unpractical
because of the amount and folder structure.
You can ta
On Monday, 4 August 2014 at 17:02:27 UTC, Peter Alexander wrote:
On Sunday, 3 August 2014 at 23:48:09 UTC, Martin wrote:
When I use the spawnProcess function in std.process, the
command line arguments that I provide to the function seem to
get "quoted".
I can't reproduce this on OS X with 2.0
What issues have you had with rdmd?
The library seems to have a package.json file, so you could
also try dub:
http://code.dlang.org/download
nikki@crunchbang:~/projects/d/artemisd$ rdmd example/source/app.d
example/source/app.d(5): Error: module all is in file
'artemisd/all.d' which cann
On Tuesday, 5 August 2014 at 07:43:56 UTC, nikki wrote:
What issues have you had with rdmd?
The library seems to have a package.json file, so you could
also try dub:
http://code.dlang.org/download
nikki@crunchbang:~/projects/d/artemisd$ rdmd
example/source/app.d
example/source/app.d(5):
On Tuesday, 5 August 2014 at 07:46:05 UTC, Vladimir Panteleev
wrote:
On Tuesday, 5 August 2014 at 07:43:56 UTC, nikki wrote:
What issues have you had with rdmd?
The library seems to have a package.json file, so you could
also try dub:
http://code.dlang.org/download
nikki@crunchbang:~/pr
Correction:
rdmd -Isource example/source/app.d
that one worked, woohoo thanks.
what did the -Isource do? it's not in the 'rdmd --help'
On Tuesday, 5 August 2014 at 07:51:53 UTC, nikki wrote:
Correction:
rdmd -Isource example/source/app.d
that one worked, woohoo thanks.
what did the -Isource do? it's not in the 'rdmd --help'
You'll find it in dmd's --help. It adds the "source" directory to
the search path, the list of dire
On Tuesday, 5 August 2014 at 07:57:57 UTC, Vladimir Panteleev
wrote:
On Tuesday, 5 August 2014 at 07:51:53 UTC, nikki wrote:
Correction:
rdmd -Isource example/source/app.d
that one worked, woohoo thanks.
what did the -Isource do? it's not in the 'rdmd --help'
You'll find it in dmd's --help
Different formats and also different languages. I don't see how
you
can compare a parse tree that's a D object and another tree
made by
dustjs: you never see the AST produced by dust, you only see the
resulting JS code.
Yes. That's a point. Thanks for all the explanations. I'll try to
make so
On 8/5/2014 5:06 PM, nikki wrote:
On Tuesday, 5 August 2014 at 07:57:57 UTC, Vladimir Panteleev wrote:
On Tuesday, 5 August 2014 at 07:51:53 UTC, nikki wrote:
Correction:
rdmd -Isource example/source/app.d
that one worked, woohoo thanks.
what did the -Isource do? it's not in the 'rdmd --hel
On Mon, 2014-08-04 at 18:34 +, Dicebot via Digitalmars-d-learn
wrote:
[…]
> Well it is a territory not completely alien to me either ;) I am
> less aware of academia research on topic though, just happen to
> work in industry where it matters.
I have been out of academia now for 14 years, bu
The switch itself is -I, not -Ipath. 'path' indicates a
parameter for which you need to substitute something, in this
case a directory path. It should be the root folder for the
source modules you want to add to the search path. In this
case, for artemisd, the source files are in the 'source'
On Tuesday, 5 August 2014 at 08:13:25 UTC, Uranuz wrote:
Different formats and also different languages. I don't see
how you
can compare a parse tree that's a D object and another tree
made by
dustjs: you never see the AST produced by dust, you only see
the
resulting JS code.
Yes. That's a p
On Tuesday, 5 August 2014 at 15:13:37 UTC, Rene Zwanenburg wrote:
clean looking code to parse Wavefont OBJ files [0].
[0] http://en.wikipedia.org/wiki/Wavefront_.obj_file
On Saturday, 2 August 2014 at 06:46:04 UTC, Jonathan M Davis via
Digitalmars-d-learn wrote:
On Fri, 01 Aug 2014 23:09:37 +
sigod via Digitalmars-d-learn
wrote:
Code: http://dpaste.dzfl.pl/51bd62138854
(It was reduced by DustMite.)
Have I missed something about structs? Or this simply a
Here's something which I've run into a few times now without
finding a pretty solution. When parsing a text file using lazy
ranges and algorithms you will have to convert a string range to
an object at some point.
In this particular case I was curious to see if I could write
clean looking cod
On Saturday, 2 August 2014 at 12:42:00 UTC, Gary Willoughby wrote:
What is the preferred format people here use for program config
files? Json, Xml, ini, etc?
Also what libraries exist to parse the preferred format?
Preffered one is the one a RTL(run time library) or a VCL(visual
component l
On Tuesday, 5 August 2014 at 08:06:57 UTC, nikki wrote:
edit: couldn't find that flag in dmd --help (only -Ipath),
atleast I know what it does now, hope I'll remember..
thanks a lot though @ great helpful community
Remember rdmd is just a program to help collect and organise
parameters. It st
I am porting DerelictBGFX to linux, but I am having some
problems. When I run the dub command in my example directory, I
get the following error :
derelict.util.exception.SharedLibLoadException@../../../.dub/packages/derelict-util-1.0.2/source/derelict/util/exception.d(35):
Failed to load one
On Tuesday, 5 August 2014 at 15:39:55 UTC, sigod wrote:
On Saturday, 2 August 2014 at 06:46:04 UTC, Jonathan M Davis
via Digitalmars-d-learn wrote:
On Fri, 01 Aug 2014 23:09:37 +
sigod via Digitalmars-d-learn
wrote:
Code: http://dpaste.dzfl.pl/51bd62138854
(It was reduced by DustMite.)
> Is there multiline comments available inside PEGGED template?
> As far as I understand inline comments are set via # sign.
No, no multiline comment. That's based on the original PEG grammar,
which allows only #-comments.
https://en.wikipedia.org/wiki/Marshalling_(computer_science)
bla.
damn it.
alias Vec4f = TVector!(float,4);
alias Vec3f = TVector!(float,3);
class TVector(T,int n)
{
T[n] val;
...
TVector as class does work as expected, as a struct i get the
following errors, but why?
struct Vector.TVector!(float, 4).TVector no size yet for forward
reference
struct Vector.T
On Tuesday, 5 August 2014 at 18:36:35 UTC, ddos wrote:
alias Vec4f = TVector!(float,4);
alias Vec3f = TVector!(float,3);
class TVector(T,int n)
{
T[n] val;
...
TVector as class does work as expected, as a struct i get the
following errors, but why?
struct Vector.TVector!(float, 4).TV
Am 05.08.2014 21:13, schrieb "Marc Schütz" ":
On Tuesday, 5 August 2014 at 18:36:35 UTC, ddos wrote:
alias Vec4f = TVector!(float,4);
alias Vec3f = TVector!(float,3);
class TVector(T,int n)
{
T[n] val;
...
TVector as class does work as expected, as a struct i get the
following errors, but
On Tuesday, 5 August 2014 at 19:13:31 UTC, Marc Schütz wrote:
On Tuesday, 5 August 2014 at 18:36:35 UTC, ddos wrote:
alias Vec4f = TVector!(float,4);
alias Vec3f = TVector!(float,3);
class TVector(T,int n)
{
T[n] val;
...
TVector as class does work as expected, as a struct i get the
f
> Some range which takes an at compile time known number of elements from an
> input range and provides opIndex seems perfect to me, but as far as I know
> there's no such thing in Phobos.
There is chunks:
http://dlang.org/phobos/std_range.html#chunks
> http://pastebin.com/34sbffSa
Your problem comes from lengthSquared:
public auto lengthSquared = function () => val.reduce!((a,b) => a + b*b);
That's an unusual way to define a method. Any reason why you are using
a pointer to a function as a member? Do you need to be able to
redefine it at run
i wasn't intentionally creating a functionpointer, i just liked
the syntax x3 ... but i guess i should read into it now :)
thx for you help !
On Tuesday, 5 August 2014 at 19:51:33 UTC, Philippe Sigaud via
Digitalmars-d-learn wrote:
http://pastebin.com/34sbffSa
Your problem comes from lengthS
I'd have thought that this would work:
struct A
{
int[] i;
B b;
struct B
{
void foo() { i ~= 1;}
}
}
void main()
{
A a;
a.b.foo();
}
But the compiler tells me 'need this for i of type int[]'.
Is there any way I can gain access on i inside B?
On Monday, 4 August 2014 at 20:48:09 UTC, Jon wrote:
For reasons I don't completely understand, you also need a fake
main function, dummy.d:
void main(){}
Note that this is not necessary if you compile with -lib e.g.:
dmd -lib -oflibtest.a test.d
and then
ghc Main.hs --make -omai
On Tuesday, 5 August 2014 at 20:32:08 UTC, Philippe Sigaud wrote:
I'd have thought that this would work:
struct A
{
int[] i;
B b;
struct B
{
void foo() { i ~= 1;}
}
}
void main()
{
A a;
a.b.foo();
}
But the compiler tells me 'need this for i of type int[]'.
On Tue, Aug 5, 2014 at 11:37 PM, Martijn Pot via Digitalmars-d-learn
wrote:
> Does this help :
> http://www.digitalmars.com/d/archives/digitalmars/D/learn/Nested_struct_member_has_no_access_to_the_enclosing_class_data_38294.html
Yes, that helps: that explains why it does not wor :).
I changed my
> why it does not wor :).
why it does not *work*, of course. Sigh.
This is exactly what I was thinking. Thanks so much for your
help!
TJB
Just a little something I made for you. Untested of course. But
takes an argument from cli, which is a glob. Foreach file under
current working directory, if its a file write out processing.
(I gave std.stdio an alias be
On Tuesday, 5 August 2014 at 20:32:08 UTC, Philippe Sigaud wrote:
I'd have thought that this would work:
struct A
{
int[] i;
B b;
struct B
{
void foo() { i ~= 1;}
}
}
void main()
{
A a;
a.b.foo();
}
But the compiler tells me 'need this for i of type int[]'.
Oh great thank you. I think that might solve the majority of the
confusion I was having. One thing I can't figure out though, is
getting garbage collection to work as expected. If I have a
function that allocates a pointer to a struct using new, I get an
error on linking _dAlloc... not found
On Monday, 4 August 2014 at 22:45:15 UTC, anonymous wrote:
On Monday, 4 August 2014 at 22:18:24 UTC, splatterdash wrote:
Indeed I do. I'm not sure which type I should use for the
common base type, though. MyFileReader is a templated class,
so using it plainly did not work. I also tried
`InputR
So that does indeed solve some of the problems. However, using
this method, when linking I get two errors, undefined reference
rt_init() and rt_term() I had just put these methods in the
header file. If I put wrappers around these functions and export
I get the rt_init, rt_term is private.
Hi all,
Is there a recommended way to test functions that opens and
iterates over files? The unittest block seems more suited for
testing functions whose input and output can be defined in the
program itself. I'm wondering if there is a better way to test
functions that open files with specif
On Tuesday, 5 August 2014 at 20:32:08 UTC, Philippe Sigaud wrote:
But the compiler tells me 'need this for i of type int[]'.
Is there any way I can gain access on i inside B?
Been thinking about this a bit. I know some of my relies are in
the 2012 fourm posts regarding it, but access permiss
On 08/05/14 22:32, Philippe Sigaud via Digitalmars-d-learn wrote:
> I'd have thought that this would work:
>
> struct A
> {
> int[] i;
> B b;
>
> struct B
> {
> void foo() { i ~= 1;}
> }
> }
>
> void main()
> {
> A a;
> a.b.foo();
> }
>
> But the compiler tel
On Tuesday, 5 August 2014 at 23:23:43 UTC, Jon wrote:
So that does indeed solve some of the problems. However, using
this method, when linking I get two errors, undefined reference
rt_init() and rt_term() I had just put these methods in the
header file. If I put wrappers around these function
On 8/6/2014 2:53 AM, Rishub Nagpal wrote:
I am porting DerelictBGFX to linux, but I am having some problems. When
I run the dub command in my example directory, I get the following error :
derelict.util.exception.SharedLibLoadException@../../../.dub/packages/derelict-util-1.0.2/source/derelict/u
On Tuesday, 5 August 2014 at 17:41:06 UTC, Marc Schütz wrote:
On Tuesday, 5 August 2014 at 15:39:55 UTC, sigod wrote:
On Saturday, 2 August 2014 at 06:46:04 UTC, Jonathan M Davis
via Digitalmars-d-learn wrote:
On Fri, 01 Aug 2014 23:09:37 +
sigod via Digitalmars-d-learn
wrote:
Code: ht
On Tuesday, 5 August 2014 at 17:41:06 UTC, Marc Schütz wrote:
It's a consequence of the fact that every type in D has a
default initializer which is known at compile time.
Then doesn't this mean it should pop out a warning in case
that's the behavior you wanted, perhaps a reference to the D
On Tuesday, 5 August 2014 at 23:22:24 UTC, splatterdash wrote:
Hi all,
Is there a recommended way to test functions that opens and
iterates over files? The unittest block seems more suited for
testing functions whose input and output can be defined in the
program itself. I'm wondering if ther
On Thursday, 31 July 2014 at 10:22:28 UTC, Marc Schütz wrote:
On Thursday, 31 July 2014 at 02:03:37 UTC, Puming wrote:
1. Are AAs reference type? if so, why does the compiler copy
it?
This is probably your problem. They are reference types, but
initially that reference is `null`. When you wri
Hi ,
I am new to D, I would like to build HTTP Server in D. Can any
one throw some light on what are all the libraries available in D
and if there is any example it would be helpful.
Thanks
Hussain
On Wed, Aug 06, 2014 at 04:10:27AM +, HUSSAIN via Digitalmars-d-learn wrote:
> Hi ,
>
> I am new to D, I would like to build HTTP Server in D. Can any one
> throw some light on what are all the libraries available in D and if
> there is any example it would be helpful.
[...]
http://vibed.org/
See this list:
https://github.com/zhaopuming/awesome-d#web-frameworks
On Wednesday, 6 August 2014 at 04:10:28 UTC, HUSSAIN wrote:
Hi ,
I am new to D, I would like to build HTTP Server in D. Can any
one throw some light on what are all the libraries available in
D and if there is any exampl
On Tuesday, 5 August 2014 at 22:14:23 UTC, abanstadya wrote:
programming Q, either youra newb or not, should rather be
posted to 'http://forum.dlang.org/group/digitalmars.D.learn'.
Your post appears on
'http://forum.dlang.org/group/digitalmars.D' which is more
related to the lang. design rath
On Tuesday, 5 August 2014 at 23:47:00 UTC, Artur Skawina via
Digitalmars-d-learn wrote:
Is there any way I can gain access on i inside B?
Not directly, but as you ask for /any/ way -- yes:
struct B
{
void foo() { outer.i ~= 1; }
ref A outer() inout @property { return
*cast(A
Era:
broken_b.foo(); //i_a is accessible invisibly because
overridden or transformed assuming it would be converted or
copied/moved as appropriate.
return b; //if a is a local variable then b becomes invalid
even though it's a struct.
return i_b; //same as return b
return broken_b; //sam
On Wednesday, 6 August 2014 at 05:53:55 UTC, Philippe Sigaud
wrote:
I see. I didn't know one could create an A.B 'outside'. I saw
inner types as Voldemort types, but that is true only for inner
structs in functions.
But we weren't creating them, we were copying them, no
constructors were use
Is there a simple way to to do this?
enum A{
a1,
a2
}
void fun(A a){...}
void test(){
fun(A.a1); //works
fun(a1); //I'd like a1 to work, but just where an A is expected to avoid
polluting namespace.
}
This dlang.org/cpp_interface.html says I can do the following
// c++
namespace N {
void someCppFunction();
}
// d
extern (C++, N) void someCppFunction();
but this http://dpaste.dzfl.pl/e2242263e1dc says I can't
Is this feature implemented?
On Wednesday, 6 August 2014 at 06:50:59 UTC, Alexandr Druzhinin
wrote:
This dlang.org/cpp_interface.html says I can do the following
// c++
namespace N {
void someCppFunction();
}
// d
extern (C++, N) void someCppFunction();
but this http://dpaste.dzfl.pl/e2242263e1dc says I can't
Is
63 matches
Mail list logo