On Thursday, 4 September 2014 at 20:03:57 UTC, Nordlöw wrote:
Are there any programming languages that extend the behaviour
of comparison operators to allow expressions such as
if (low < value < high)
?
This syntax is currently disallowed by DMD.
I'm aware of the risk of a programmer mis
On Thursday, 4 September 2014 at 14:00:14 UTC, Ali Çehreli wrote:
On 09/04/2014 02:54 AM, nikki wrote:
> a pointer variable to save an adres of a function, then
dereferencing to use
> it.
If possible, even in C, I would recommend using a 'function
pointer' for that. However, there are cases wh
I should have read your post more carefully, the 'tagging' in the
code is not really what I am after, I want the file including the
documentation to just be a valid d file, does'nt mean however
that there aren't ways of solving the issue without such precise
tagging I guess
On Saturday, 30 August 2014 at 07:24:39 UTC, Philippe Sigaud
wrote:
On Sat, Aug 30, 2014 at 1:37 AM, nikki wrote:
I wasn't too happy about it and I wrote my own little parse
thingie and have
a literate version nice and meta and small and sloppy ;)
http://nikkikoole.github.io/docs/dokidokDOC.ht
On Friday, 29 August 2014 at 23:41:00 UTC, bearophile wrote:
nikki:
I use it to change my d sourcefile slightly (into valid
markdown)
then I use a node module (ghmd) to make sortof sexy html from
that.
Are you going to add popups of the types as in the F# page I
have linked?
Bye,
bearophi
thanks! just what I needed, with some stumbling I managed to get
everything working as intended: using a pointer variable to save
an adres of a function, then dereferencing to use it.
Now I am wondering when to use the ** ?
for example I found this function over at
https://github.com/d-gamede
ah so much cleaner then the mess I was almost into ;)
thanks
sorry could have quicker just googled it thanks!
so I am still very new to structs and & and * adress and pointer
stuff, I have this basic code :
struct S {
int value = 0;
}
void func(S thing){
writeln(&thing); //BFC52B44
thing.value = 100;
}
S guy = {value:200};
writeln(&guy); //BFC52CCC
f
On Saturday, 30 August 2014 at 17:08:30 UTC, Philippe Sigaud via
Digitalmars-d-learn wrote:
instead I would like to use "EAT_FOOD_DECISION" and
"EAT_FOOD_BEHAVIOUR" and
get the functions?
Is that possible somehow?
If all your functions had the same signature, you could use an
associative arra
I would like to use json/or any other format for defining
behavior trees.
in that file format I can only use strings
currently I just use the symbol directly but I was wondering how
to 'find' them otherwise.
float EAT_FOOD_DECISION(Agent agent){
return 1.0 - agent.hunger;
}
bool EAT_FOOD
On Friday, 29 August 2014 at 23:41:00 UTC, bearophile wrote:
nikki:
Are you going to add popups of the types as in the F# page I
have linked?
Bye,
bearophile
Now then you could remove the sortof from that sexy
I wasn't too happy about it and I wrote my own little parse
thingie and have a literate version nice and meta and small and
sloppy ;)
http://nikkikoole.github.io/docs/dokidokDOC.html
I use it to change my d sourcefile slightly (into valid markdown)
then I use a node module (ghmd) to make sorto
That would work very fine, thanks sir!
Aha, then It's quite safe to assume it won't be coming back I
guess, then I might need to cook up some homebrew alternative.
thanks for the info
I've been googling without luck, is there a way to do literate
programming in D?, similar to how it's done in Coffeescript ?
http://www.coffeescriptlove.com/2013/02/literate-coffeescript.html
basically me writing comments around code and some parser that
creates styled documents from that (wit
thanks, that worked, I need to grow a feeling for those * and &
I am trying top port this code :
float interpolate( float from, float to, float amount, float
(*easing)(float) )
{
return from + ( to-from )*( easing( amount ) );
}
float linear_interpolation( float p )
{
return p;
}
the "float (*easing)(float) " part needs to be rewritten as
"float
I come from languages that don't offer structs, I have this json
load function that has to keep some data and intuitively I've
written a struct, I've read about the differences, heap vs stack,
value vs reference, but know I think i am overthinking it.
Is this decent:
bool loadFromFile
On Saturday, 23 August 2014 at 10:29:04 UTC, ketmar via
Digitalmars-d-learn wrote:
On Sat, 23 Aug 2014 10:19:58 +
nikki via Digitalmars-d-learn
wrote:
don't use '==' to check for nulls. the right way is:
if (foo is null) {}
if (bar !is null) {}
'==' transfo
Oops well writing the above post made me realise what to look for
: http://dlang.org/errors.html
;)
I am learning SDL by following the lazyfoo SDL2 tuorials, I am
alos new to D so I have a question:
I the lazyfoo tutorials there are many functions that have a bool
success whiich gets set at various places when something goes
wrong to be returned afterwards.
http://lazyfoo.net/tutorials/SDL
It was quite some journey I got it working now ;)
https://github.com/Hackerpilot/DCD/issues/153
I want to learn SDL2 and learn D at the same time, for the SDL2
part autocompletion would be very nice.
I've found DCD but can't get it working (not finding symbols or
declarations) at the moment but I was wondering if there are any
alternatives, it's hard to google for d things and emacs, cau
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 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
Correction:
rdmd -Isource example/source/app.d
that one worked, woohoo thanks.
what did the -Isource do? it's not in the 'rdmd --help'
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
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,
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.
30 matches
Mail list logo