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
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
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
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,
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
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
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 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
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
array
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
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
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
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)
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)
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 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);
}
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 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 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
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
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
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
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 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
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
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
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
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
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
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
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
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
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
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 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 kinda
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
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 endian
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 that
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*
40 matches
Mail list logo