On Friday, 22 April 2016 at 21:29:29 UTC, anonymousuer wrote:
On Friday, 22 April 2016 at 21:26:25 UTC, ciechowoj wrote:
On Friday, 22 April 2016 at 21:13:31 UTC, anonymousuer wrote:
What code is needed to tell D to open a window? Thank you in
advance.
Could you specify what kind of window do
On 23.04.2016 03:11, Ramon wrote:
mmm, I figured the problem, but don't know how to solve it.
my struct has a destructor which clears itself:
struct json_value
{
~this() { .ValueClear(&data); }
}
So the struct is destroyed at the end of DoDirSearch, despite there
being a closure for it. Is
On 23/04/2016 9:29 AM, anonymousuer wrote:
On Friday, 22 April 2016 at 21:26:25 UTC, ciechowoj wrote:
On Friday, 22 April 2016 at 21:13:31 UTC, anonymousuer wrote:
What code is needed to tell D to open a window? Thank you in advance.
Could you specify what kind of window do you need?
As in
On Saturday, 23 April 2016 at 01:11:49 UTC, Ramon wrote:
mmm, I figured the problem, but don't know how to solve it.
my struct has a destructor which clears itself:
struct json_value
{
~this() { .ValueClear(&data); }
}
so how I can I put a struct in the heap? (not in the stack, as
is the def
mmm, I figured the problem, but don't know how to solve it.
my struct has a destructor which clears itself:
struct json_value
{
~this() { .ValueClear(&data); }
}
so how I can I put a struct in the heap? (not in the stack, as is
the default..)
I have something along this way:
struct json_value
{
..
}
function DoDirSearch(..)
{
immutable json_value cbk = json_value(prms.argv[3]);
assert(cbk != json_value.init); // OK, pass
import core.thread;
new Thread({
assert(cbk != js
On Friday, 22 April 2016 at 10:25:34 UTC, Chris wrote:
On Friday, 22 April 2016 at 09:49:02 UTC, Rene Zwanenburg wrote:
On Thursday, 21 April 2016 at 16:29:14 UTC, rcorre wrote:
- What happens when you compile a binary without phobos and
druntime, and with a custom entry point? I've never done
On Friday, 22 April 2016 at 17:37:44 UTC, Nordlöw wrote:
Have anybody implement Ada-style modulo types
https://en.wikibooks.org/wiki/Ada_Programming/Types/mod
I've implemented a proof-of-concept for algorithmic programming
competitions [1]. In these competitions, quite a few problems ask
to
Can somebody give me a quick example of how to combine the
MMapAllocator with the AllocatorList and the BitmapBlock objects
together?
On Friday, 22 April 2016 at 21:26:25 UTC, ciechowoj wrote:
On Friday, 22 April 2016 at 21:13:31 UTC, anonymousuer wrote:
What code is needed to tell D to open a window? Thank you in
advance.
Could you specify what kind of window do you need?
As in a regular Windows window, for example when y
On Friday, 22 April 2016 at 21:13:31 UTC, anonymousuer wrote:
What code is needed to tell D to open a window? Thank you in
advance.
Could you specify what kind of window do you need?
What code is needed to tell D to open a window? Thank you in
advance.
On 22.04.2016 21:52, Nordlöw wrote:
On Friday, 22 April 2016 at 17:37:44 UTC, Nordlöw wrote:
Have anybody implement Ada-style modulo types
https://en.wikibooks.org/wiki/Ada_Programming/Types/mod
Here's my first try
https://github.com/nordlow/phobos-next/blob/master/src/modulo.d
Is there a w
On Friday, 22 April 2016 at 17:37:44 UTC, Nordlöw wrote:
Have anybody implement Ada-style modulo types
https://en.wikibooks.org/wiki/Ada_Programming/Types/mod
Here's my first try
https://github.com/nordlow/phobos-next/blob/master/src/modulo.d
Is there a way to use
alias _value this;
exc
On Thursday, 21 April 2016 at 14:47:55 UTC, Nick Treleaven wrote:
I found std.meta.ApplyLeft but it doesn't seem to work here.
I've needed this before and ended up doing a workaround with a
template block and temporary alias but it might be nice if
Phobos had this. Or is there a simpler solutio
On Thursday, 21 April 2016 at 19:38:21 UTC, Nordlöw wrote:
On Thursday, 21 April 2016 at 12:35:42 UTC, Anonymouse wrote:
Then dmd -unittest -version=TestDeps if you want them run.
This doesn't make things easier. I want to disable the builtin
unittests of the modules I've imported. This requi
Have anybody implement Ada-style modulo types
https://en.wikibooks.org/wiki/Ada_Programming/Types/mod
in D?
I'm thinking
modulo.d:
struct Mod(size_t m, Block = uint)
{
static assert(m <= 2^^(8*Block.sizeof));
Block value;
}
typically used as
Mod!(8, ubyte)
Mod!(256, ubyte)
Mod!(8, u
On Thursday, 21 April 2016 at 00:15:03 UTC, Chuck Moore wrote:
Hi Everyone,
Preamble: We're a Win7+VisualStudio development environment.
This question involves integrating the GitHub-based
.
Chuck
Hi Everyone,
I finally got my compilation+linking to work using VisualD. In
the event o
On 22/04/2016 14:40, Steven Schveighoffer wrote:
OK, I get it. I think this used to work, but I think D has long since
disallowed direct access to eponymous members.
So what you really want to do is:
staticEx!(Exception, msg)!(file, line), but of course this doesn't
follow proper grammar.
I th
On 4/22/16 6:50 AM, Nick Treleaven wrote:
On 21/04/2016 18:03, Steven Schveighoffer wrote:
This doesn't work?
alias staticEx(string msg, string file = __FILE__, size_t line =
__LINE__) = staticEx!(Exception, msg).staticEx!(file, line);
No, nor using the module dot prefix `= .staticEx!(...).st
On 22.04.2016 13:46, Jeff Thompson wrote:
The function literal also works if I add
"function int[]()":
void main(string[] args) {
immutable int[] array = function int[]() {
int[] result = new int[10];
result[0] = 1;
return result;
}();
}
I take it you're on 2.070 or older
On Friday, 22 April 2016 at 11:16:59 UTC, ag0aep6g wrote:
It's a nested function now. That means, it could reference
local variables of main. Make func static and it works.
You can also use a function literal:
void main()
{
immutable int[] array = {
int[] result = new int[10];
re
On Friday, 22 April 2016 at 11:07:47 UTC, Jeff Thompson wrote:
On Friday, 22 April 2016 at 09:40:14 UTC, FreeSlave wrote:
On Friday, 22 April 2016 at 09:25:32 UTC, Jeff Thompson wrote:
Hello. The following code compiles OK where func creates a
mutable array and main assigns it to an immutable v
On 22.04.2016 13:07, Jeff Thompson wrote:
OK, we lose the compiler check for correctness. What if I put func
directly in main with the hopes that the compiler will check correctness
and also inline the function? But it won't assign to the immutable
array. Why not? It's the same function.
void ma
On Friday, 22 April 2016 at 01:42:11 UTC, Yuxuan Shui wrote:
Maybe use something like:
auto a = () => instanceA.verboseFieldA.verboseFieldB;
You can certainly declare temporaries and rely on the compiler
optimizing those away:
auto a = instanceA.verboseFieldA.verboseFieldB;
auto b = instanc
On Friday, 22 April 2016 at 09:40:14 UTC, FreeSlave wrote:
On Friday, 22 April 2016 at 09:25:32 UTC, Jeff Thompson wrote:
Hello. The following code compiles OK where func creates a
mutable array and main assigns it to an immutable variable:
[...]
Probably this is what you look for
http://dl
On 21/04/2016 18:03, Steven Schveighoffer wrote:
This doesn't work?
alias staticEx(string msg, string file = __FILE__, size_t line =
__LINE__) = staticEx!(Exception, msg).staticEx!(file, line);
No, nor using the module dot prefix `= .staticEx!(...).staticEx` either:
staticex.d(3): Error: temp
On Friday, 22 April 2016 at 09:49:02 UTC, Rene Zwanenburg wrote:
On Thursday, 21 April 2016 at 16:29:14 UTC, rcorre wrote:
- What happens when you compile a binary without phobos and
druntime, and with a custom entry point? I've never done that
myself and don't remember how to do that off the t
On Thursday, 21 April 2016 at 16:29:14 UTC, rcorre wrote:
- What happens when you compile a binary without phobos and
druntime, and with a custom entry point? I've never done that
myself and don't remember how to do that off the top of my
head, but the info should be somewhere on dlang.org.
I
On Friday, 22 April 2016 at 09:25:32 UTC, Jeff Thompson wrote:
Hello. The following code compiles OK where func creates a
mutable array and main assigns it to an immutable variable:
[...]
Probably this is what you look for
http://dlang.org/phobos/std_exception.html#.assumeUnique
On Friday, 18 March 2016 at 17:24:27 UTC, Ali Çehreli wrote:
On 03/18/2016 03:50 AM, Dsby wrote:
foreach (i ; 0..4) {
auto th = new Thread(delegate(){listRun(i);});//this is
erro
_thread[i]= th;
th.start();
}
void listRun(int i)
{
writeln("i = ", i); // the value is not(
Hello. The following code compiles OK where func creates a
mutable array and main assigns it to an immutable variable:
int[] func(int x) pure {
int[] result = new int[10];
result[0] = x;
return result;
}
void main(string[] args)
{
immutable int[] array = func(1);
}
I assume this works
On Friday, 22 April 2016 at 01:55:36 UTC, Adam D. Ruppe wrote:
On Thursday, 21 April 2016 at 22:59:58 UTC, Alex wrote:
Ok... I make slices of them, carefully avoiding to make
copies...
Yeah, that shouldn't make a difference..
Wait, wait... I try to make slices of the array of delegates,
bec
33 matches
Mail list logo