Hi,
Honestly, I don't know. I would go stab the original API
designers in the face and tell them to clean up their mess.
I'm sorry to reply to a 2-year-old topic, but as the original API
designer, I simply couldn't resist :)
Please do not stab me in the face.
The nanopb API was never desig
On Thursday, 7 August 2014 at 17:46:13 UTC, nikki wrote:
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 alt
On Thursday, 24 July 2014 at 16:09:25 UTC, Justin Whear wrote:
On Thu, 24 Jul 2014 16:04:01 +, Pavel wrote:
Thanks to all you folks who explained "in" operator for me. My
bad.
Let's focus on the real problem, which is JSON wrapper class.
Is it
needed? Wouldn't it be better to get AA from
The .., range operator, when used like this :
string a = "abcd";
string b = a[0 .. a.count()-1];
sets b to "abc". is this the expected behavior?
On Fri, 08 Aug 2014 14:07:33 +, Pavel wrote:
>
> I know that as per JSON spec there's no boolean type specified, only
> separate true and false values, which are specified as type in
> http://dlang.org/library/std/json/JSON_TYPE.html, so I guess the only
> way to check boolean in JSONValue it
On Friday, 8 August 2014 at 15:17:25 UTC, seany wrote:
The .., range operator, when used like this :
string a = "abcd";
string b = a[0 .. a.count()-1];
sets b to "abc". is this the expected behavior?
Yes. [..] is exclusive the last element.
So [0..1] is a single element [0]
That allows to avo
consider this :
struct S
{
/* ... */
}
void main()
{
ulong [] u;
for(// ...
{
S s_instance;
// fillup .. S.key = value;
u ~= cast(ulong)*s_instance;
}
}
however, the structs are being allocated to the same place.
Because, Every time the iterator ends an iterati
On Fri, Aug 08, 2014 at 04:42:12PM +, seany via Digitalmars-d-learn wrote:
> consider this :
>
> struct S
> {
> /* ... */
>
> }
>
> void main()
> {
>ulong [] u;
>
>for(// ...
>{
> S s_instance;
> // fillup .. S.key = value;
> u ~= cast(ulong)*s_instance;
>}
On Friday, 8 August 2014 at 16:51:37 UTC, H. S. Teoh via
Digitalmars-d-learn wrote:
On Fri, Aug 08, 2014 at 04:42:12PM +, seany via
Digitalmars-d-learn wrote:
consider this :
struct S
{
/* ... */
}
void main()
{
ulong [] u;
for(// ...
{
S s_instance;
// fillup .. S.k
I want use dmd compiler with COde:Blocks. IDE detect compiler but
is error "can't find compiler executable". I have Windows 8.1,
CodeBlocks 13.12 (now svn 9790)
I download dmd.2.065.0.zip. I try compile hello.d with command
line. It compiles when I have core/,std/ and rt/ directories in
my directory. Compiler wants source files. Which option is to
using libs?
On Friday, 8 August 2014 at 17:07:37 UTC, seany wrote:
And as discussed earlier, I was trying to save the pointers in
an ulong (which is same as size_t or ptr_t, those are aliased)
(when compiling for x86-64 that is)
Generally, casting pointers to size_t is a horrible idea. Why
can't you at le
p.s. seems that aligning works only on ints. i.e. on types which
has sizeof >= default platform align.
yeah, chars (and bytes, and so on) are not aligned. i.e.
align(1) struct B {
int qtim;
int bid;
int ofr;
int bidsiz;
int ofrsiz;
short mode;
char ex;
byte mmid;
char z;
}
has sizeof == 25. not sure if specs mentions this, but they
should.
On Fri, 08 Aug 2014 16:42:12 +
seany via Digitalmars-d-learn wrote:
a) we need the working code;
b) foreach (a; ...) doest struct copying, and you see the temporary
stack object as 'a'. either use 'ref a', or don't do that at all.
that is what i was able to understand from your code.
signa
On Friday, 8 August 2014 at 17:44:29 UTC, anonymous wrote:
On Friday, 8 August 2014 at 17:07:37 UTC, seany wrote:
And as discussed earlier, I was trying to save the pointers in
an ulong (which is same as size_t or ptr_t, those are aliased)
(when compiling for x86-64 that is)
Generally, castin
Why are void pointers better than ulong, if I may ask
there is at least one reason: GC. yes, it is conservative, but
there's no reason to scan ulong[] for any pointers, so you may
lost your objects if there is no other references to 'em.
It was quite some journey I got it working now ;)
https://github.com/Hackerpilot/DCD/issues/153
Hi,
I bumped into a blog talking about building a (toy) browser
engine in Rust:
(http://limpet.net/mbrubeck/2014/08/08/toy-layout-engine-1.html)
In the blog I found that the OP is in the mozilla servo team
building a parallel browser for mozilla. The servo is hosted on
github here:
(https
More opDispatch woes. This feature keeps biting me, yet I keep
trying to use it.
This time I'm trying to access elements of a vector GLSL-style
(without swizzling... for now).
Here's the relevant code:
struct Vector (uint length, Element = double)
{
ref @property component (s
On Saturday, 9 August 2014 at 00:34:43 UTC, Puming wrote:
Hi,
I bumped into a blog talking about building a (toy) browser
engine in Rust:
(http://limpet.net/mbrubeck/2014/08/08/toy-layout-engine-1.html)
In the blog I found that the OP is in the mozilla servo team
building a parallel browser
On Saturday, 9 August 2014 at 01:20:33 UTC, Vlad Levenfeld wrote:
More opDispatch woes. This feature keeps biting me, yet I keep
trying to use it.
This time I'm trying to access elements of a vector GLSL-style
(without swizzling... for now).
Here's the relevant code:
struct Vector (uint len
On Wednesday, 6 August 2014 at 17:03:23 UTC, Timothee Cour via
Digitalmars-d-learn wrote:
Is there a reason why 'with(Foo):' is not allowed, and we have
to
use with(Foo){...} ?
It would be more in line with how other scope definitions work
(extern(C)
etc)
ping, anyone?
On Saturday, 9 August 2014 at 01:26:05 UTC, ed wrote:
On Saturday, 9 August 2014 at 00:34:43 UTC, Puming wrote:
Hi,
I bumped into a blog talking about building a (toy) browser
engine in Rust:
(http://limpet.net/mbrubeck/2014/08/08/toy-layout-engine-1.html)
In the blog I found that the OP is
I am very interested to find a good example for D2 of a Windows
Service implementation. Can you point me to one?
On Saturday, 7 September 2013 at 13:57:07 UTC, HeiHon wrote:
On Thursday, 23 February 2012 at 01:33:10 UTC, DNewbie wrote:
Here is a simple service in D
http://my.opera.com/run3/bl
Yep, replacing @property with auto did the trick.
The lack of error messages in opDispatch is frustrating. I
realize that, due to tricks like __traits(compiles,
Foo.testing_for_some_function), having opDispatch stop
compilation if it fails is not going to work, but there's gotta
be some way t
On Sat, Aug 09, 2014 at 05:34:40AM +, Vlad Levenfeld via
Digitalmars-d-learn wrote:
> Yep, replacing @property with auto did the trick.
>
> The lack of error messages in opDispatch is frustrating. I realize
> that, due to tricks like __traits(compiles,
> Foo.testing_for_some_function), having
When I try to compile these two functions, the second function is
flagged with an already defined error:
bool testRoundTrip(T, U)(T first, U second) if (isIntegral!T &&
isFloatingPoint!U)
{
return false;
}
bool testRoundTrip(U, T)(U first, T second) if (isIntegral!T &&
isFloatingPoint!U)
28 matches
Mail list logo