Re: printing array of strings with writefln?

2014-11-17 Thread Ivan Kazmenko via Digitalmars-d-learn
On Sunday, 16 November 2014 at 15:08:10 UTC, JR wrote: On Sunday, 16 November 2014 at 14:16:55 UTC, Artem Tarasov wrote: writefln(%(%s-%), [a, b, c]) doesn't print the intended a-b-c but surrounds each string with double quotes - a-b-c, which I find inconsistent with the fact that

Re: Russian translation of the range term?

2014-11-17 Thread Ivan Kazmenko via Digitalmars-d-learn
On Wednesday, 12 November 2014 at 20:48:00 UTC, Jack Applegame wrote: интервал, область Thanks to all for the suggestions and reasoning! I don't yet see a word which clicks in this case, but we got multiple reasonable suggestions here. Perhaps I'll be fine with one of them. Ivan

get machine arch

2014-11-17 Thread uranio-235 via Digitalmars-d-learn
Hi there, I'm trying to determinate machine architecture; using core.cpuid return anything except i686 or x86-64; that simple thing is all I need...

InvalidMemoryOperationError@(0)

2014-11-17 Thread Andre via Digitalmars-d-learn
Hi, the following coding is an extract from the DGUI library. On my system (Win 8) I receive InvalidMemoryOperationError@. I got the information that this Error doesn't not occur on a WinXP system. I think there is definetely a bug in the following coding. The Grid class has a Collection of

Simple timing

2014-11-17 Thread Paul via Digitalmars-d-learn
I'm trying to write a program that involves simple timing; I like to be able to execute some function at a point no sooner than, say, 3500 milliseconds from now so I need to read the current 'system time' in ticks and calculate the required point in the future using ticks per sec. In other

Re: Simple timing

2014-11-17 Thread Adam D. Ruppe via Digitalmars-d-learn
The easiest way isn't to read the clock at all and instead just put your program to sleep for a while: void main() { import std.stdio; import core.thread; writeln(started); Thread.sleep(3500.msecs); writeln(ended); }

Re: InvalidMemoryOperationError@(0)

2014-11-17 Thread ketmar via Digitalmars-d-learn
On Mon, 17 Nov 2014 15:41:25 + Andre via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: ~this() { foreach(cp; this._columns) { } } don't do that in destructors. `_columns` field can be already collected by

Re: Simple timing

2014-11-17 Thread Rene Zwanenburg via Digitalmars-d-learn
On Monday, 17 November 2014 at 16:24:10 UTC, Paul wrote: I'm trying to write a program that involves simple timing; I like to be able to execute some function at a point no sooner than, say, 3500 milliseconds from now so I need to read the current 'system time' in ticks and calculate the

Re: Simple timing [solved]

2014-11-17 Thread Paul via Digitalmars-d-learn
Thank you both, I'm sure that answers my question. Paul On Monday, 17 November 2014 at 16:38:45 UTC, Rene Zwanenburg wrote: On Monday, 17 November 2014 at 16:24:10 UTC, Paul wrote: I'm trying to write a program that involves simple timing; I like to be able to execute some function at a

Re: undefined reference to class template

2014-11-17 Thread Satoshi via Digitalmars-d-learn
Could anyone help me please?

Re: undefined reference to class template

2014-11-17 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/14/14 6:29 PM, Satoshi wrote: Hi, Im using GDC 4.9.0 compiler. I have template classes like public class LinkedList(T) {...} and when I try compile it together, everything works fine. But when I compile every source file to separate object file and link it together with ld Ill get errors

Re: InvalidMemoryOperationError@(0)

2014-11-17 Thread André
Thanks a lot. I will forward this recommendation (DGUI BitBucket). Kind regards André On Monday, 17 November 2014 at 16:40:18 UTC, ketmar via Digitalmars-d-learn wrote: On Mon, 17 Nov 2014 15:41:25 + Andre via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: ~this()

vibe.d problem

2014-11-17 Thread låzaro via Digitalmars-d-learn
Hi there folks, let me the fact talk for me lazaro@leviatan:~$ dub init aplicacion vibe.d Successfully created an empty project in '/home/lazaro/aplicacion'. lazaro@leviatan:~$ cd aplicacion/ lazaro@leviatan:~/aplicacion$ dub run Building vibe-d 0.7.20 configuration libevent, build type debug.

Re: Russian translation of the range term?

2014-11-17 Thread Vladimir Panteleev via Digitalmars-d-learn
On Tuesday, 11 November 2014 at 11:50:18 UTC, Ivan Kazmenko wrote: Is there an official translation already? In TDPL, the (very few) occurrences of range are translated as диапазон (Cyrillic for diapason), how official is that? In Russian, the term diapason in computerspeak is used to refer

Re: vibe.d problem

2014-11-17 Thread ketmar via Digitalmars-d-learn
On Mon, 17 Nov 2014 16:24:17 -0500 låzaro via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Building vibe-d 0.7.20 configuration libevent, build type debug. this is very old. try git HEAD instead, it should help. signature.asc Description: PGP signature

Re: InvalidMemoryOperationError@(0)

2014-11-17 Thread Vladimir Panteleev via Digitalmars-d-learn
On Monday, 17 November 2014 at 16:40:18 UTC, ketmar via Digitalmars-d-learn wrote: On Mon, 17 Nov 2014 15:41:25 + Andre via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: ~this() { foreach(cp; this._columns) {

Re: InvalidMemoryOperationError@(0)

2014-11-17 Thread Vladimir Panteleev via Digitalmars-d-learn
On Monday, 17 November 2014 at 22:19:04 UTC, Vladimir Panteleev wrote: On Monday, 17 November 2014 at 16:40:18 UTC, ketmar via Digitalmars-d-learn wrote: On Mon, 17 Nov 2014 15:41:25 + Andre via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: ~this() {

Re: InvalidMemoryOperationError@(0)

2014-11-17 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/17/14 5:19 PM, Vladimir Panteleev wrote: On Monday, 17 November 2014 at 16:40:18 UTC, ketmar via Digitalmars-d-learn wrote: On Mon, 17 Nov 2014 15:41:25 + Andre via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: ~this() { foreach(cp; this._columns)

Debugging a Memory Leak

2014-11-17 Thread Maxime Chevalier-Boisvert via Digitalmars-d-learn
There seems to be a memory leak in the Higgs compiler. This problem shows up when running our test suite (`make test` command). A new VM object is created for each unittest block, e.g.: https://github.com/maximecb/Higgs/blob/master/source/runtime/tests.d#L201 These VM objects are

Re: InvalidMemoryOperationError@(0)

2014-11-17 Thread Vladimir Panteleev via Digitalmars-d-learn
On Monday, 17 November 2014 at 22:40:36 UTC, Steven Schveighoffer wrote: On 11/17/14 5:19 PM, Vladimir Panteleev wrote: On Monday, 17 November 2014 at 16:40:18 UTC, ketmar via Digitalmars-d-learn wrote: On Mon, 17 Nov 2014 15:41:25 + Andre via Digitalmars-d-learn

Compiling with SQLite

2014-11-17 Thread impatient-dev via Digitalmars-d-learn
I'm new to D, and I'm trying to use SQLite, but I can't get this basic program to compile: import etc.c.sqlite3 : sqlite3_open; void main(string[] args){ sqlite3_open(test.sqlite, null); } When compiling with DMD v2.066.1, I get this error: test.o: In function `_Dmain':

Re: Compiling with SQLite

2014-11-17 Thread impatient-dev via Digitalmars-d-learn
Addendum: I'm using DDT for Eclipse, and the names I'm using come up in its autocomplete. They also appear at http://dlang.org/phobos/etc_c_sqlite3.html, which is why I'm stumped. I get what the error means, but I don't understand why it's occurring.

Re: Compiling with SQLite

2014-11-17 Thread uri via Digitalmars-d-learn
On Tuesday, 18 November 2014 at 01:14:26 UTC, impatient-dev wrote: I'm new to D, and I'm trying to use SQLite, but I can't get this basic program to compile: import etc.c.sqlite3 : sqlite3_open; void main(string[] args){ sqlite3_open(test.sqlite, null); } When compiling with DMD

Re: Debugging a Memory Leak

2014-11-17 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/17/14 6:12 PM, Maxime Chevalier-Boisvert wrote: There seems to be a memory leak in the Higgs compiler. This problem shows up when running our test suite (`make test` command). A new VM object is created for each unittest block, e.g.:

Re: InvalidMemoryOperationError@(0)

2014-11-17 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/17/14 6:38 PM, Vladimir Panteleev wrote: On Monday, 17 November 2014 at 22:40:36 UTC, Steven Schveighoffer wrote: On 11/17/14 5:19 PM, Vladimir Panteleev wrote: On Monday, 17 November 2014 at 16:40:18 UTC, ketmar via Digitalmars-d-learn wrote: On Mon, 17 Nov 2014 15:41:25 + Andre

Re: Debugging a Memory Leak

2014-11-17 Thread Maxime Chevalier-Boisvert via Digitalmars-d-learn
GC problems are *nasty*. My advice is to run the simplest program you can think of that still exhibits the problem, and then put in printf debugging everywhere to see where it breaks down. Not sure if this is useful. Unfortunately, the program doesn't break or crash. It just keeps

Re: Debugging a Memory Leak

2014-11-17 Thread Vladimir Panteleev via Digitalmars-d-learn
On Monday, 17 November 2014 at 23:12:10 UTC, Maxime Chevalier-Boisvert wrote: Help or advice on solving this problem is welcome. The D GC has some debugging code which might be a little helpful (check the commented-out debug = X lines in druntime/src/gc/gc.d). Specifically, debug=LOGGING

Re: Compiling with SQLite

2014-11-17 Thread impatient-dev via Digitalmars-d-learn
On Tuesday, 18 November 2014 at 03:41:42 UTC, uri wrote: Are you linking with libsqlite3.a? For example: $ dmd prog.d -L-lsqlite3 That worked, thanks. I didn't know you had to anything special to link with code in the standard library; is there documentation for this somewhere? Also, is