On Wednesday, 20 March 2013 at 19:54:42 UTC, Jacob Carlborg wrote:
On 2013-03-20 14:25, Mike Parker wrote:
Can dstep output function declarations as aliased function
pointers in
the format I use in Derelict?
BTW, why does it uses aliases and not declare a function
pointer directly?
Becaus
On 3/20/13, Andrej Mitrovic wrote:
> It seems to be COM-based, so it should be usable from D.
Actually slight correction, for example the endpointvolume.h header in
the Windows SDK defines both a COM and a C API, but the COM API is
probably easier to use.
It seems to be COM-based, so it should be usable from D.
On 2013-03-20 22:02, Andrea Fontana wrote:
Maybe I have a old (binary) version for linux. For example params named
"out" are not replaced with something else (f.e. _out)
I checked the history and see that I added a fixed for this for function
parameters just after the release. I'm pretty sure
Ali Çehreli:
Aside: bool parameters (regular or template) hurt readability. It would
be better to have defined a type similar to std.stdio.KeepTerminator and
its use with byLine():
http://dlang.org/phobos/std_stdio.html#.File.byLine
I see. On the other hand: For an internal function lik
On Wednesday, 20 March 2013 at 19:10:28 UTC, Jacob Carlborg wrote:
On 2013-03-20 14:59, Andrea Fontana wrote:
*Very* useful. I hope it will be updated with some small
changes (like
anonymous struct alias replacement and d keyword replacement)
:)
It should already to D keyword replacement, if
cal wrote:
On Wednesday, 20 March 2013 at 20:11:47 UTC, Peter Sommerfeld wrote:
In std.json is a function getchar() with this signature:
dchar getChar(bool SkipWhitespace = false);
It looks like the signature (line 115) is:
dchar getChar(bool SkipWhitespace = false)()
Note the extra set of
On 03/20/2013 01:27 PM, Ali Çehreli wrote:
> > getChar(); // obviously SkipWhitespace = true;
>
> No, in that case SkipWhitespace==true.
I said "No" but kept your value. :) I meant "No, in that case
SkipWhiteSpace==false."
Ali
On 03/20/2013 01:11 PM, Peter Sommerfeld wrote:
> In std.json is a function getchar() with this signature:
>
> dchar getChar(bool SkipWhitespace = false);
That 'false' up there is the default value of SkipWhitespace.
> But it is called differently:
>
> getChar(); // obviously SkipWhitespace = tr
On Wednesday, 20 March 2013 at 20:11:47 UTC, Peter Sommerfeld
wrote:
In std.json is a function getchar() with this signature:
dchar getChar(bool SkipWhitespace = false);
It looks like the signature (line 115) is:
dchar getChar(bool SkipWhitespace = false)()
Note the extra set of parens at the
In std.json is a function getchar() with this signature:
dchar getChar(bool SkipWhitespace = false);
But it is called differently:
getChar(); // obviously SkipWhitespace = true;
getChar!true(); // probably getchar(true)
What is the reason for the different notation ?
Peter
On 2013-03-20 14:25, Mike Parker wrote:
Can dstep output function declarations as aliased function pointers in
the format I use in Derelict?
BTW, why does it uses aliases and not declare a function pointer directly?
--
/Jacob Carlborg
On Wednesday, March 20, 2013 20:15:46 Dan wrote:
> On Wednesday, 20 March 2013 at 19:01:27 UTC, Jonathan M Davis
>
> wrote:
> > Why are you casting? The cast shouldn't be necessary, because
> > you're doing the
> > initialization inside a static constructor.
>
> Without it I get:
> Error: mutable
On Wednesday, 20 March 2013 at 17:44:16 UTC, Ali Çehreli wrote:
In that case, brute force to the rescue (nc stands for
non-const): :)
this(const(Series[string]) source) {
auto nc_source = cast(Series[string])source;
itemToSeries = nc_source.dup;
}
Wow - that worked. Thanks! I h
On Wednesday, 20 March 2013 at 19:19:09 UTC, Mike Wey wrote:
On 03/19/2013 11:06 PM, Martin wrote:
http://pastebin.com/8M2EuyfT
I'm fairly new to D, but would this work? Obviously I would
need to make
my own kind of associative array that uses manual memory
management to
completely circumven
On 03/19/2013 11:06 PM, Martin wrote:
http://pastebin.com/8M2EuyfT
I'm fairly new to D, but would this work? Obviously I would need to make
my own kind of associative array that uses manual memory management to
completely circumvent the GC, but besides that?
It looks like your refCount is off
On Wednesday, 20 March 2013 at 19:01:27 UTC, Jonathan M Davis
wrote:
Why are you casting? The cast shouldn't be necessary, because
you're doing the
initialization inside a static constructor.
Without it I get:
Error: mutable method cmap.S.__postblit is not callable using a
const object
Error
Dan:
this(this) { x = x.dup; }
I think this(this) doesn't work well with const.
cast(S[string])m = [ "foo" : S(['a']) ];
I think I have never seen code like that. What's the meaning? :-)
(Also if you remove that cast then dmd gives bad error messages
with no line numbers:
Error:
On 2013-03-20 14:59, Andrea Fontana wrote:
*Very* useful. I hope it will be updated with some small changes (like
anonymous struct alias replacement and d keyword replacement) :)
It should already to D keyword replacement, if not, please report an
issue with a test case:
https://github.com/
On 2013-03-20 14:25, Mike Parker wrote:
Can dstep output function declarations as aliased function pointers in
the format I use in Derelict?
I guess I could make an option for that.
--
/Jacob Carlborg
ixid:
The prime factorization of 1 is an empty set, so surely to be
correct it should return [] when given 1 and not throw an
exception.
The Task says that the input can't be 1, so the input 1 needs to
be a pre-condition violation:
Write a function which returns an array or collection whic
On Wednesday, March 20, 2013 19:41:00 Dan wrote:
> The following works and is the only way I have found to
> initialize m.
> Unfortunately it requires the cast.
>
> Is this safe to do?
> Is there a better way?
> Is this a bug or are future features coming to clean it up?
>
> Thanks
> Dan
>
> ---
On Tuesday, 19 March 2013 at 18:53:21 UTC, bearophile wrote:
Small changes on your version:
http://codepad.org/E9KHKvAi
It's now on Rosettacode. I have added more changes to make it
able to deal with immutable input.
Bye,
bearophile
Another issue to consider as the question I was attemptin
The following works and is the only way I have found to
initialize m.
Unfortunately it requires the cast.
Is this safe to do?
Is there a better way?
Is this a bug or are future features coming to clean it up?
Thanks
Dan
--
import std.stdio;
struct S {
this(thi
On Wednesday, March 20, 2013 12:47:38 Dan wrote:
> I would
> imagine by now there is a fair amount of code that might rely on
> a false result from opEquals if the members (slices, associative
> arrays) are not bitwise the same.
I think that it's more likely that there's a lot of code that expects
On 03/20/2013 10:24 AM, Dan wrote:
On Wednesday, 20 March 2013 at 17:11:02 UTC, Ali Çehreli wrote:
The code compiles with 2.062 and an earlier version of 2.063 if you
accept letting go of const-correctness there:
this(Series[string] source) {
Thanks Ali. But, removing const there then requir
On Wednesday, 20 March 2013 at 17:11:02 UTC, Ali Çehreli wrote:
The code compiles with 2.062 and an earlier version of 2.063 if
you accept letting go of const-correctness there:
this(Series[string] source) {
Thanks Ali. But, removing const there then requires non-const
instances to be p
On 03/20/2013 07:34 AM, Dan wrote:
Can the following be made to build and run, but keep the intent of what
is shown. I realize it touches on several bugs related to const,
postblit, and map - but I'm having trouble finding the magic
combination. The idea is simply have assets store multiple serie
On Sun, 17 Feb 2013 16:53:23 -, Lubos Pintes
wrote:
I am writing little program which downloads simple data file from server
through HTTP.
The file is static, but updated regularly, so I am using "Range: bytes"
header to optimize the traffic a bit.
After I analyzed HTTP status line and
Can the following be made to build and run, but keep the intent
of what is shown. I realize it touches on several bugs related to
const, postblit, and map - but I'm having trouble finding the
magic combination. The idea is simply have assets store multiple
series of data in a map indexed by the
On Wednesday, 20 March 2013 at 12:43:13 UTC, Jacob Carlborg wrote:
On 2013-03-20 12:09, Andrea Fontana wrote:
You're missing dstep. Using dstep I converted some c-libraries
in short
time. It's quite easy to use and usually just some minor
modification
are needed to adjust auto-generated d in
On Wednesday, 20 March 2013 at 12:43:13 UTC, Jacob Carlborg wrote:
On 2013-03-20 12:09, Andrea Fontana wrote:
You're missing dstep. Using dstep I converted some c-libraries
in short
time. It's quite easy to use and usually just some minor
modification
are needed to adjust auto-generated d in
On 2013-03-20 12:09, Andrea Fontana wrote:
You're missing dstep. Using dstep I converted some c-libraries in short
time. It's quite easy to use and usually just some minor modification
are needed to adjust auto-generated d interface.
I was just about to suggest to use dstep. I'm glad to see t
On Wednesday, 20 March 2013 at 03:10:41 UTC, Jonathan M Davis
wrote:
The way == is defined is very clean and straightforward. There
_are_ bugs which
complicate things (e.g.
http://d.puremagic.com/issues/show_bug.cgi?id=3789 ),
but those can and will be fixed. The design itself is solid.
Th
On Wednesday, 20 March 2013 at 08:13:45 UTC, Mike Parker wrote:
On Tuesday, 19 March 2013 at 15:03:11 UTC, Lemonfiend wrote:
I see. That's a larger project than I'd hoped. Considering
I've never created a binding before, is there some kind of
tutorial/recommended reading available?
There
On Tuesday, 19 March 2013 at 15:03:11 UTC, Lemonfiend wrote:
I see. That's a larger project than I'd hoped. Considering I've
never created a binding before, is there some kind of
tutorial/recommended reading available?
There's a page at dlang.org[1], and I have a series of 5 blog
posts o
36 matches
Mail list logo