On 06/09/2015 09:36 PM, Dennis Ritchie wrote:
But I can not do so:
enum int[][int][int] ctHash = init_ctHash(5);
ctHash = merge(ctHash, init_ctHash(6));
I have a question: why variables may not be initialized more than once?
Why can't they to resave at compile time?
My phrasing was off:
On Wednesday, 10 June 2015 at 00:04:16 UTC, Oleg B wrote:
Why it's extern(C)?
For easy linking.
What must do collectHandler function?
Looks like it overrides the destruction procedure.
If I understand correctly monitor relates to multithreading
control (Mutex?).
Yes.
Am Mon, 8 Jun 2015 12:59:31 +0200
schrieb Daniel Kozák via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com:
On Mon, 08 Jun 2015 10:41:59 +
Kadir Erdem Demir via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
I want to use my char array with awesome, cool
On Wednesday, 10 June 2015 at 17:43:36 UTC, Ali Çehreli wrote:
On the other hand, if it's a manifest constant (enum, const
static, etc.) then by definition it cannot be mutated. If we
allowed mutation of compile-time expressions, then we would
have a complicated language.
Unfortunately, the
On Wednesday, 10 June 2015 at 19:59:17 UTC, Atila Neves wrote:
On Linux:
foo.d:
import std.stdio;
void main() { writeln(import(dir/bar.txt)); }
dmd -J. foo.d # ok
On Windows:
Error: file dir/bar.txt cannot be found or not in a path
specified with -J
I tried the obvious buildPath(dir,
I'm new to the language and new to using MonoDevelop and I've got
this persistent problem that I haven't been able to solve with
Google searching. I frequently test out my code as I write it and
every time I start it up a new gdb process will start running but
not terminate at the end of the
On Wednesday, 10 June 2015 at 17:13:34 UTC, anonymous wrote:
On Wednesday, 10 June 2015 at 17:00:34 UTC, Dennis Ritchie
wrote:
Isnt it possible to come up with the interpreter compile-time,
which will determine the operating time of the program at
runtime at compile time.
Sounds like the
ubyte[5] a = 0xAA; // Fine. Five 0xAA bytes.
auto a2 = new ubyte[5]; // Fine. Five 0 bytes.
Now, let's say, I want to allocate an array of a size, derived at
run time, and initialize it to some non-zero value at the same
time. What would be the shortest way of doing it?
On Wednesday, 10 June 2015 at 20:22:18 UTC, Adel Mamin wrote:
ubyte[5] a = 0xAA; // Fine. Five 0xAA bytes.
auto a2 = new ubyte[5]; // Fine. Five 0 bytes.
Now, let's say, I want to allocate an array of a size, derived
at run time, and initialize it to some non-zero value at the
same time. What
On 06/10/2015 10:00 AM, Dennis Ritchie wrote:
Is it possible somehow
to create a more complex compilation process, which can reassign
variables more than once?
I am not a compiler writer but I assume if a variable is not a
compile-time expression, then the compiler generates code that makes
On Wednesday, 10 June 2015 at 18:55:27 UTC, Adam D. Ruppe wrote:
I'm still tempted to grab a used Mac so I can port my display
stuff to Cocoa and test it, but Macs are outrageously expensive
and I hate them, so want to spend as little as possible.
What does dmd minimally require on a mac? If
On Linux:
foo.d:
import std.stdio;
void main() { writeln(import(dir/bar.txt)); }
dmd -J. foo.d # ok
On Windows:
Error: file dir/bar.txt cannot be found or not in a path
specified with -J
I tried the obvious buildPath(dir, bar.txt) instead and now:
Error: file dir\\bar.d cannot be found or
On 2015-06-10 18:55:26 +, Adam D. Ruppe said:
I'm still tempted to grab a used Mac so I can port my display stuff to
Cocoa and test it, but Macs are outrageously expensive and I hate them,
so want to spend as little as possible.
Well, I would go at least for a 64-bit system. Otherwise
On Wednesday, 10 June 2015 at 07:15:26 UTC, Ali Çehreli wrote:
My phrasing was off: By definition, initialization happens
once. :) What I meant is, once initialized, a compile-time
variable cannot be reassigned. The reason is, to effect compile
time evaluation, one needs to use 'enum' (or
On Wednesday, 10 June 2015 at 17:00:34 UTC, Dennis Ritchie wrote:
Isnt it possible to come up with the interpreter compile-time,
which will determine the operating time of the program at
runtime at compile time.
Sounds like the halting problem. So, no, generally this is not
possible.
I'm still tempted to grab a used Mac so I can port my display
stuff to Cocoa and test it, but Macs are outrageously expensive
and I hate them, so want to spend as little as possible.
What does dmd minimally require on a mac? If I got like a 10.5
would that work?
i'm considering something
I am running DMD on windows, my DMD version is DMD32 V2.067.1.
It might be because I installed 32bit version on 64bit windows.
Briliant, thanks a lot ! Looks like I misunderstood Adam's reply,
sorry about that !
I tried different things but I didn't think of calling invoke
from within the worker thread, that solved the freezing problem.
I ended up using the Thread class; spawn complained about the
mutability of the
On Wednesday, 10 June 2015 at 21:49:56 UTC, kerdemdemir wrote:
== NOTHİNG PRINTS
What am I doing wrong?
Which OS, which terminal ?
Hi
Following code works
int[] peopleMoney = iota(0, 500, 1).array();
writeln(peopleMoney.map!(a = to!string(a)).joiner( ));
= 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ...
It writes the contents to std.output as expected.
But if I change 500 to 600 nothing is
On 06/10/2015 01:22 PM, Adel Mamin wrote:
ubyte[5] a = 0xAA; // Fine. Five 0xAA bytes.
auto a2 = new ubyte[5]; // Fine. Five 0 bytes.
Now, let's say, I want to allocate an array of a size, derived at run
time, and initialize it to some non-zero value at the same time. What
would be the shortest
On 06/10/2015 02:49 PM, kerdemdemir wrote:
Hi
Following code works
int[] peopleMoney = iota(0, 500, 1).array();
writeln(peopleMoney.map!(a = to!string(a)).joiner( ));
= 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ...
It writes the contents to std.output as expected.
i am assuming you are using the built in gdb debugger.
a) you can try using this addin Gdb.D instead
-https://github.com/llucenic/MonoDevelop.Debugger.Gdb.D
it might be also be in the monodevelop beta repos.
b) you can fix/work around the issue by replacing
Syscall.kill in the source
On Wednesday, 10 June 2015 at 20:22:18 UTC, Adel Mamin wrote:
ubyte[5] a = 0xAA; // Fine. Five 0xAA bytes.
auto a2 = new ubyte[5]; // Fine. Five 0 bytes.
Now, let's say, I want to allocate an array of a size, derived
at run time, and initialize it to some non-zero value at the
same time. What
On Thursday, 11 June 2015 at 00:32:45 UTC, ZombineDev wrote:
Environment exceptions are stuff like user input and network
and file access. This are problems that you generally want to
... These* are ...
handle and that's why they're considered recoverable.
So 'Exception's propagate through
I want to know exactly what is considered to be 'throw'.
I'm able to use dynamic arrays (which can throw 'Range
violation') and asserts in a nothrow function. Shouldn't those be
considered 'throw'?
On 06/10/2015 05:06 PM, Yuxuan Shui wrote:
I want to know exactly what is considered to be 'throw'.
I'm able to use dynamic arrays (which can throw 'Range violation') and
asserts in a nothrow function. Shouldn't those be considered 'throw'?
Yes, the documentation is minimal: :)
On Thursday, 11 June 2015 at 00:06:24 UTC, Yuxuan Shui wrote:
I want to know exactly what is considered to be 'throw'.
I'm able to use dynamic arrays (which can throw 'Range
violation') and asserts in a nothrow function. Shouldn't those
be considered 'throw'?
In D there are two types of
On Wednesday, 10 June 2015 at 20:18:06 UTC, Laeeth Isharc wrote:
On Wednesday, 10 June 2015 at 18:55:27 UTC, Adam D. Ruppe wrote:
I'm still tempted to grab a used Mac so I can port my display
stuff to Cocoa and test it, but Macs are outrageously
expensive and I hate them, so want to spend as
Am Mon, 08 Jun 2015 11:13:25 +
schrieb Daniel Kozak kozz...@gmail.com:
BTW on ldc(ldc -O3 -singleobj -release -boundscheck=off)
transcode is the fastest:
f0 time: 1 sec, 115 ms, 48 μs, and 7 hnsecs // to!dstring
f1 time: 449 ms and 329 μs // toUTF32
f2 time: 272 ms, 969 μs, and 1
On Thursday, 11 June 2015 at 00:27:36 UTC, Ali Çehreli wrote:
Note: Remember that it is not recommended to catch Error nor
its base class Throwable. What I mean by any exception here
is any exception that is defined under the Exception
hierarchy. A nothrow function can still emit exceptions
On Wednesday, 10 June 2015 at 22:18:21 UTC, Scroph wrote:
client.perform;
while(!client.isStopped)
I don't think this will work as you expect. perform is a
synchronous call, it will not return until the download finishes,
as I understand, so your while loop is too late. I
On Wednesday, 10 June 2015 at 19:59:17 UTC, Atila Neves wrote:
On Linux:
foo.d:
import std.stdio;
void main() { writeln(import(dir/bar.txt)); }
dmd -J. foo.d # ok
On Windows:
Error: file dir/bar.txt cannot be found or not in a path
specified with -J
I tried the obvious buildPath(dir,
On Thursday, 11 June 2015 at 00:27:36 UTC, Ali Çehreli wrote:
On 06/10/2015 05:06 PM, Yuxuan Shui wrote:
I want to know exactly what is considered to be 'throw'.
I'm able to use dynamic arrays (which can throw 'Range
violation') and
asserts in a nothrow function. Shouldn't those be considered
34 matches
Mail list logo