22.12.2013 07:47, Gary Willoughby пишет:
When porting C headers which include function declarations with using
char* types. Is it best to use const char* or const(char)* as the type
in the D declaration?
C vs D
const char* == const(char)*
const char const* == const char*
On 12/21/2013 05:39 PM, aldanor wrote:
> On Saturday, 21 December 2013 at 21:49:01 UTC, MrSmith wrote:
>> just use foreach_reverse
>
> Wow, I never knew it is a keyword, thank you!
I feel guilty for omitting in knowingly but we've been hearing that it
would be deprecated. I don't think it will
On 12/21/2013 05:44 PM, Charles Hixson wrote:
On 12/21/2013 03:52 PM, Ali Çehreli wrote:
On 12/21/2013 03:13 PM, John Colvin wrote:
> Ideally the compiler will optimise your version to be fast, but you may
> find you get better performance by doing the bit manipulations
eplicitly:
Assuming tha
On 12/21/2013 03:52 PM, Ali Çehreli wrote:
On 12/21/2013 03:13 PM, John Colvin wrote:
> Ideally the compiler will optimise your version to be fast, but you may
> find you get better performance by doing the bit manipulations
eplicitly:
Assuming that the program needs to support only big endia
On Saturday, 21 December 2013 at 21:49:01 UTC, MrSmith wrote:
On Saturday, 21 December 2013 at 00:47:04 UTC, aldanor wrote:
Is there an efficient method to remove elements with multiple
(compile-time-unknown) indices from an array? I currently do
something like
if (!index.empt
On Sun, Dec 22, 2013 at 12:47:45AM +, Gary Willoughby wrote:
> When porting C headers which include function declarations with
> using char* types. Is it best to use const char* or const(char)*
> as the type in the D declaration?
Doesn't really matter: both work exactly the same way.
I kind
When porting C headers which include function declarations with
using char* types. Is it best to use const char* or const(char)*
as the type in the D declaration?
On Saturday, 21 December 2013 at 23:52:05 UTC, Ali Çehreli wrote:
On 12/21/2013 03:13 PM, John Colvin wrote:
> Ideally the compiler will optimise your version to be fast,
but you may
> find you get better performance by doing the bit
manipulations eplicitly:
Assuming that the program needs to s
On 12/21/2013 03:13 PM, John Colvin wrote:
> Ideally the compiler will optimise your version to be fast, but you may
> find you get better performance by doing the bit manipulations eplicitly:
Assuming that the program needs to support only big endian and little
endian systems (i.e. excluding s
On 12/21/2013 02:31 PM, ponce wrote:
On Saturday, 21 December 2013 at 22:29:59 UTC, ponce wrote:
On Saturday, 21 December 2013 at 22:22:09 UTC, Charles Hixson wrote:
I was planning to ask if there were a better way to do this, but
instead I need to ask what's my mistake?
For some reason, if cal
I just wanted to add that the "can't format immutable Exception"
also prevents me from doing this:
auto exception = receiveOnly!(immutable Exception)();
because receiveOnly creates a tuple which implements a toString
that uses indirectly uses formatObject. So I'm forced to use the
slightly mo
I'm sending an exception from a worker thread to the owner thread
to be logged/printed. Using DMD64 D Compiler v2.064
http://dpaste.dzfl.pl/7c8b68bd
Using std.concurrency prevents me from passing a naked Exception.
So the owner receives either a shared or immutable Exception.
I can't format a sh
On Saturday, 21 December 2013 at 23:00:20 UTC, Mineko wrote:
On Saturday, 21 December 2013 at 22:51:53 UTC, John Colvin
wrote:
On Saturday, 21 December 2013 at 22:18:58 UTC, Mineko wrote:
On Saturday, 21 December 2013 at 22:07:42 UTC, John Colvin
wrote:
To the best of my knowledge it's totall
On Saturday, 21 December 2013 at 22:22:09 UTC, Charles Hixson
wrote:
I was planning to ask if there were a better way to do this,
but instead I need to ask what's my mistake?
For some reason, if called with an uninitialized ubyte array,
and an index of 0, it returns a value of 8, even though all
On Saturday, 21 December 2013 at 22:51:53 UTC, John Colvin wrote:
On Saturday, 21 December 2013 at 22:18:58 UTC, Mineko wrote:
On Saturday, 21 December 2013 at 22:07:42 UTC, John Colvin
wrote:
To the best of my knowledge it's totally ok to have your
program download the latest zip from dlang.
On Saturday, 21 December 2013 at 22:18:58 UTC, Mineko wrote:
On Saturday, 21 December 2013 at 22:07:42 UTC, John Colvin
wrote:
To the best of my knowledge it's totally ok to have your
program download the latest zip from dlang.org on the client
machine and use that.
Sounds good to me, I mor
On Saturday, 21 December 2013 at 22:29:59 UTC, ponce wrote:
On Saturday, 21 December 2013 at 22:22:09 UTC, Charles Hixson
wrote:
I was planning to ask if there were a better way to do this,
but instead I need to ask what's my mistake?
For some reason, if called with an uninitialized ubyte array,
On Saturday, 21 December 2013 at 22:22:09 UTC, Charles Hixson
wrote:
I was planning to ask if there were a better way to do this,
but instead I need to ask what's my mistake?
For some reason, if called with an uninitialized ubyte array,
and an index of 0, it returns a value of 8, even though all
I was planning to ask if there were a better way to do this, but instead
I need to ask what's my mistake?
For some reason, if called with an uninitialized ubyte array, and an
index of 0, it returns a value of 8, even though all the values in the
array are 0.
The error has to be somewhere in the
On Saturday, 21 December 2013 at 14:52:08 UTC, Russel Winder
wrote:
I just created a new vibe.d project using dub, all fine. Well
once I had
solved the libevent problem. Then, as the project is to be a
GUI client,
I added a gtk-d dependency. I tried building the empty project
and the
binary co
On Saturday, 21 December 2013 at 22:07:42 UTC, John Colvin wrote:
To the best of my knowledge it's totally ok to have your
program download the latest zip from dlang.org on the client
machine and use that.
Sounds good to me, I more or less know what to do now, I'll be
using DMD because of i
On 2013-12-21 15:51, Russel Winder wrote:
I just created a new vibe.d project using dub, all fine. Well once I had
solved the libevent problem. Then, as the project is to be a GUI client,
I added a gtk-d dependency. I tried building the empty project and the
binary comes out at 42MB. Not only th
On Saturday, 21 December 2013 at 21:58:16 UTC, Mineko wrote:
On Saturday, 21 December 2013 at 10:00:10 UTC, Kelet wrote:
On Saturday, 21 December 2013 at 08:55:04 UTC, Mineko wrote:
This is a fairly basic question but I can't find any good
answers, so I'm asking..
Anyways, I want to be able t
On Saturday, 21 December 2013 at 10:00:10 UTC, Kelet wrote:
On Saturday, 21 December 2013 at 08:55:04 UTC, Mineko wrote:
This is a fairly basic question but I can't find any good
answers, so I'm asking..
Anyways, I want to be able to invoke the D compiler, whichever
that might be from inside
On Saturday, 21 December 2013 at 00:47:04 UTC, aldanor wrote:
Is there an efficient method to remove elements with multiple
(compile-time-unknown) indices from an array? I currently do
something like
if (!index.empty)
foreach (i; index.sort.reverse)
On 12/21/2013 09:56 PM, Nick Hamann wrote:
I'm not sure if this is a bug or if I'm doing something wrong.
Compilation succeeds and the program runs successfully with this code:
import std.stdio;
import std.conv : to;
void main() {
auto x = std.conv.to!double("7.3");
writeln(x - 2.2);
I'm not sure if this is a bug or if I'm doing something wrong.
Compilation succeeds and the program runs successfully with this
code:
import std.stdio;
import std.conv : to;
void main() {
auto x = std.conv.to!double("7.3");
writeln(x - 2.2);
}
However, when I change the first line to
On Friday, 15 November 2013 at 21:11:36 UTC, simendsjo wrote:
I thrid compiling thrift 0.9.1 from github with d support, but
there's a bug in the makefile it seems.
$(addprefix.log: $(addprefix
@p='$(addprefix'; \
b='$(addprefix'; \
$(am__check_pre) $(LOG_DRIVER) --t
On 11/15/2013 01:11 PM, simendsjo wrote:
I thrid compiling thrift 0.9.1 from github with d support, but there's a
bug in the makefile it seems.
$(addprefix.log: $(addprefix
@p='$(addprefix'; \
b='$(addprefix'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
On Friday, 15 November 2013 at 21:11:36 UTC, simendsjo wrote:
I thrid compiling thrift 0.9.1 from github with d support, but
there's a bug in the makefile it seems.
$(addprefix.log: $(addprefix
@p='$(addprefix'; \
b='$(addprefix'; \
$(am__check_pre) $(LOG_DRIVER) --t
Is there a way of mocking the TCPConnect call so as to create a
connection to a mock instead of the real device so as to be able to
integration test and system test a vibe.d-based client?
--
Russel.
=
Dr Russel Winder
I just created a new vibe.d project using dub, all fine. Well once I had
solved the libevent problem. Then, as the project is to be a GUI client,
I added a gtk-d dependency. I tried building the empty project and the
binary comes out at 42MB. Not only that there are two copies of it one
in . and o
aldanor:
So should this considered a bug then and be filed?
I think so. I have a related EnhancementRequest open, but I have
to close it down or modify it...
Bye,
bearophile
On Saturday, 21 December 2013 at 02:52:00 UTC, bearophile wrote:
Do not forget to add the () after the sort, otherwise you call
the deprecated, buggy and slow built-in sort.
reverse is another deprecated built-in, so use "retro".
The first "if" is not much useful, trying to sort an empty
arra
On Saturday, 21 December 2013 at 03:22:22 UTC, H. S. Teoh wrote:
Unfortunately, while std.algorithm.remove does provide a way to
do this
if the number of indices to remove are known beforehand, it
doesn't seem
to be able to remove a dynamic list of indices. Probably an
enhancement
request shou
On Saturday, 21 December 2013 at 02:56:57 UTC, Dicebot wrote:
No. There is no such thing as "suitable compiler warning".
So should this considered a bug then and be filed? (if that will
do any good, lol)
On Friday, 20 December 2013 at 15:45:04 UTC, Frustrated wrote:
I'm in need of a circular buffer/array. I am using
std.container.array to avoid the GC. I suppose I could copy and
modify the code but is there any easier way? It looks like it
is defined as templates so could I somehow hijack the c
On Saturday, 21 December 2013 at 08:55:04 UTC, Mineko wrote:
This is a fairly basic question but I can't find any good
answers, so I'm asking..
Anyways, I want to be able to invoke the D compiler, whichever
that might be from inside of a D program, so I can say, compile
a D script on-the-fly
I still hope they make DMD available as shared/static library
just like tinyc compiler!
On Saturday, 21 December 2013 at 08:55:04 UTC, Mineko wrote:
This is a fairly basic question but I can't find any good
answers, so I'm asking..
Anyways, I want to be able to invoke the D compiler, whichev
On Saturday, 21 December 2013 at 08:55:04 UTC, Mineko wrote:
To be even more to the point, how can I invoke the D compiler
inside of a D program, also, do I need to bundle said D
compiler with my program or does D have some compilation
feature inside of an already compiled program (Which I doub
This is a fairly basic question but I can't find any good
answers, so I'm asking..
Anyways, I want to be able to invoke the D compiler, whichever
that might be from inside of a D program, so I can say, compile a
D script on-the-fly in some game, it's just an idea though.
To be even more to t
On Friday, 20 December 2013 at 15:45:04 UTC, Frustrated wrote:
I'm in need of a circular buffer/array. I am using
std.container.array to avoid the GC. I suppose I could copy and
modify the code but is there any easier way? It looks like it
is defined as templates so could I somehow hijack the c
42 matches
Mail list logo