Re: Strange behaviour with mmfile

2013-01-28 Thread H. S. Teoh
On Tue, Jan 29, 2013 at 05:46:49AM +0100, nazriel wrote: > On Tuesday, 29 January 2013 at 00:49:07 UTC, bioinfornatics wrote: > >I missed to show the code > > > >$ cat test_mmap.d > >import std.stdio; > >import std.mmfile; > > > >void main(string[] args ){ > >MmFile m = new MmFile( args[0] ); >

Re: gtkD problem

2013-01-28 Thread SaltySugar
On Monday, 28 January 2013 at 21:50:24 UTC, Mike Wey wrote: On Monday, 28 January 2013 at 19:20:00 UTC, Mike Wey wrote: There seems to be a small bug in the code so that it fails is the GTK_BASEPATH doesn't end with a backslash, you can either add it to the GTK_BASEPATH, or remove the GTK_BASEP

Re: Strange behaviour with mmfile

2013-01-28 Thread nazriel
On Tuesday, 29 January 2013 at 00:49:07 UTC, bioinfornatics wrote: I missed to show the code $ cat test_mmap.d import std.stdio; import std.mmfile; void main(string[] args ){ MmFile m = new MmFile( args[0] ); foreach( ulong c; 0..m.length ) writeln( m[c], " ", cast(dchar) m[c] )

Strange behaviour with mmfile

2013-01-28 Thread bioinfornatics
Dear, Why when i try to read this file: Input file- $ cat little.fastq @H8:C16L5ACXX:8:1101:1168:2103/1 TCTGAAGGCATGCTGCAATTGTGAATGGCAGAAATGT + ?@@DD>DBDAFDF@4CFGICFHHECHEEBF;E@FFFG @H8:C16L5ACXX:8:1101:1223:2104/1 CTCACGTACTTTAGACAAGCGCAGTAGTGCT + @@;

Re: Strange behaviour with mmfile

2013-01-28 Thread bioinfornatics
I missed to show the code $ cat test_mmap.d import std.stdio; import std.mmfile; void main(string[] args ){ MmFile m = new MmFile( args[0] ); foreach( ulong c; 0..m.length ) writeln( m[c], " ", cast(dchar) m[c] ); }

Re: lvalue <-> rvalue problem

2013-01-28 Thread Namespace
It's fixed already. But I searched at the wrong place. The compiler is too huge for me. o.O

Re: lvalue <-> rvalue problem

2013-01-28 Thread Jonathan M Davis
On Monday, January 28, 2013 11:16:26 Namespace wrote: > > And that prevents a workaround for the missing auto ref. :o) > > It seems dmd 2.060 is far more useable than 2.061 (for users > > which use structs, of course). > > I will switch back. > > I'm still interested in this problem. But how can I

Re: gtkD problem

2013-01-28 Thread Mike Wey
On Monday, 28 January 2013 at 19:20:00 UTC, Mike Wey wrote: There seems to be a small bug in the code so that it fails is the GTK_BASEPATH doesn't end with a backslash, you can either add it to the GTK_BASEPATH, or remove the GTK_BASEPATH environment variable completely. Fixed in git: https://

Re: An error on trying to sort shared data using slice

2013-01-28 Thread Sparsh Mittal
Thanks a lot. Your code is very valuable to explain the whole concept. I have changed my code based on it.

Re: gtkD problem

2013-01-28 Thread Mike Wey
On 01/28/2013 08:43 PM, SaltySugar wrote: On Monday, 28 January 2013 at 19:20:00 UTC, Mike Wey wrote: On 01/28/2013 03:08 PM, SaltySugar wrote: On Monday, 28 January 2013 at 13:20:31 UTC, SaltySugar wrote: On Monday, 28 January 2013 at 13:15:09 UTC, Jordi Sayol wrote: Al 28/01/13 13:43, En/na

Re: Tutorial on how to build DMD/druntime/phobos and docs from source?

2013-01-28 Thread H. S. Teoh
On Mon, Jan 28, 2013 at 09:24:46PM +0100, Philippe Sigaud wrote: > >> Besides the wiki, see: > >> https://xtzgzorex.wordpress.com/2011/07/31/d-building-dmd-and-phobos-on-linux/ > > > > Would you kindly add this info to the wiki? :-) > > Where on the page? Ideally, integrate it into the current pa

Re: An error on trying to sort shared data using slice

2013-01-28 Thread Ali Çehreli
On 01/28/2013 12:33 PM, Sparsh Mittal wrote: > My requirement is to sort a portion of an array in each thread, such > that there is no overlap b/w portions and all portions together make the > whole array. > > So I am taking array as shared. Currently, in each thread, I am taking a > slice of tha

Re: An error on trying to sort shared data using slice

2013-01-28 Thread Sparsh Mittal
Thanks a lot. Actually, I am using std.concurrency, following your tutorial: http://ddili.org/ders/d.en/concurrency.html. Thanks for that tutorial. My requirement is to sort a portion of an array in each thread, such that there is no overlap b/w portions and all portions together make the who

Re: Tutorial on how to build DMD/druntime/phobos and docs from source?

2013-01-28 Thread Philippe Sigaud
>> Besides the wiki, see: >> https://xtzgzorex.wordpress.com/2011/07/31/d-building-dmd-and-phobos-on-linux/ > > Would you kindly add this info to the wiki? :-) Where on the page?

Re: hasDataMember and mixin inconsistency

2013-01-28 Thread Philippe Sigaud
>> Just testing whether t.M can be assigned to something (ie, is it a value?) >> I use '_' as a variable name to indicate I don't care for it's precise >> name/value. It's just a placeholder. > > > Ok, I must be missing something, why "t.D" or is this just a typo? Ark, typo, sorry about that. >

Re: gtkD problem

2013-01-28 Thread SaltySugar
On Monday, 28 January 2013 at 19:20:00 UTC, Mike Wey wrote: On 01/28/2013 03:08 PM, SaltySugar wrote: On Monday, 28 January 2013 at 13:20:31 UTC, SaltySugar wrote: On Monday, 28 January 2013 at 13:15:09 UTC, Jordi Sayol wrote: Al 28/01/13 13:43, En/na SaltySugar ha escrit: I have one problem.

Re: gtkD problem

2013-01-28 Thread Mike Wey
On 01/28/2013 03:08 PM, SaltySugar wrote: On Monday, 28 January 2013 at 13:20:31 UTC, SaltySugar wrote: On Monday, 28 January 2013 at 13:15:09 UTC, Jordi Sayol wrote: Al 28/01/13 13:43, En/na SaltySugar ha escrit: I have one problem. I compiled gtkD ad my first program successfully but when I

Re: gtkD problem

2013-01-28 Thread Jordi Sayol
Al 28/01/13 15:08, En/na SaltySugar ha escrit: > On Monday, 28 January 2013 at 13:20:31 UTC, SaltySugar wrote: >> On Monday, 28 January 2013 at 13:15:09 UTC, Jordi Sayol wrote: >>> Al 28/01/13 13:43, En/na SaltySugar ha escrit: I have one problem. I compiled gtkD ad my first program successful

Re: Delegate type inferred as pure

2013-01-28 Thread cal
On Monday, 28 January 2013 at 10:44:22 UTC, qznc wrote: On Monday, 28 January 2013 at 03:16:24 UTC, cal wrote: Is the 'typeof((int a){return z;})' getting it wrong here? Do you really need the type? You could just use "auto". auto dg = (int a) {return z;}; Yeah this is reduced from somethin

Re: Tutorial on how to build DMD/druntime/phobos and docs from source?

2013-01-28 Thread H. S. Teoh
On Mon, Jan 28, 2013 at 03:20:32PM +0100, Joseph Rushton Wakeling wrote: > On 01/27/2013 10:13 PM, Chad Joan wrote: > >I remember there being a tutorial on how to build DMD and such from > >source. I've been searching for a while and can't find it. It won't > >show up on google searches. Does an

Re: Reading Standard Input

2013-01-28 Thread H. S. Teoh
On Mon, Jan 28, 2013 at 02:49:59PM +0100, Adam D. Ruppe wrote: > On Monday, 28 January 2013 at 13:39:22 UTC, Kenneth Sills wrote: > >I found that consoleD is more about text, and less about treating > >the console like an I/O. > > I think that's a failure of documentation... taking a quick look at

Re: An error on trying to sort shared data using slice

2013-01-28 Thread bearophile
Sparsh Mittal: Thanks for your reply and link (which I will try to follow). Good. However, I am trying to write a parallel program where I have a big array. Multiple (e.g. 2, 4, 8) threads do work on part of those arrays. Afterwards, they sort their portions of array and return the answer

Re: An error on trying to sort shared data using slice

2013-01-28 Thread Sparsh Mittal
Thanks for your reply and link (which I will try to follow). However, I am trying to write a parallel program where I have a big array. Multiple (e.g. 2, 4, 8) threads do work on part of those arrays. Afterwards, they sort their portions of array and return the answer to main. So, I have mad

Re: Tutorial on how to build DMD/druntime/phobos and docs from source?

2013-01-28 Thread Joseph Rushton Wakeling
On 01/27/2013 10:13 PM, Chad Joan wrote: I remember there being a tutorial on how to build DMD and such from source. I've been searching for a while and can't find it. It won't show up on google searches. Does anyone have a link? Besides the wiki, see: https://xtzgzorex.wordpress.com/2011/07

Re: gtkD problem

2013-01-28 Thread SaltySugar
On Monday, 28 January 2013 at 13:20:31 UTC, SaltySugar wrote: On Monday, 28 January 2013 at 13:15:09 UTC, Jordi Sayol wrote: Al 28/01/13 13:43, En/na SaltySugar ha escrit: I have one problem. I compiled gtkD ad my first program successfully but when I try to run my program it shows: C:\apps>h

An error on trying to sort shared data using slice

2013-01-28 Thread Sparsh Mittal
Purpose: I am trying to sort only a range of values in an array of struct (the struct has two fields and I want to sort on one of its fields using myComp function below). However, I am getting this error: ../src/phobos/std/algorithm.d(7731): Error: cannot implicitly convert expression (assume

Re: How to stop the Threadmill

2013-01-28 Thread Chris
Thanks guys. I can get the functionality I need by simply using a shared flag that breaks out of the play loop if set to false. I thought it might be possible to implement the stop function by sending a message to the thread assuming that the thread "listens" to receive *while* executing its ta

Re: Reading Standard Input

2013-01-28 Thread Adam D. Ruppe
On Monday, 28 January 2013 at 13:39:22 UTC, Kenneth Sills wrote: I found that consoleD is more about text, and less about treating the console like an I/O. I think that's a failure of documentation... taking a quick look at termbox-go, the terminal.d we have in there seems to fill the same bi

Re: Reading Standard Input

2013-01-28 Thread Kenneth Sills
So if anyone cared to know, I've been working on a D library for terminal use. Linux only, xterm based (fits my needs). I've got the hard part (non-blocking and non ASCII input) done. I found that consoleD is more about text, and less about treating the console like an I/O. So if you want a clo

Re: gtkD problem

2013-01-28 Thread SaltySugar
On Monday, 28 January 2013 at 13:15:09 UTC, Jordi Sayol wrote: Al 28/01/13 13:43, En/na SaltySugar ha escrit: I have one problem. I compiled gtkD ad my first program successfully but when I try to run my program it shows: C:\apps>hello object.Exception@..\src\gtkc\Loader.d(123): Library load

Re: gtkD problem

2013-01-28 Thread Jordi Sayol
Al 28/01/13 13:43, En/na SaltySugar ha escrit: > I have one problem. I compiled gtkD ad my first program successfully but when > I try to run my program it shows: > > C:\apps>hello > object.Exception@..\src\gtkc\Loader.d(123): Library load failed: > libgtk-3-0.dll > > My Path variable: > C:\Pro

Re: Delegate type inferred as pure

2013-01-28 Thread Kenji Hara
On Monday, 28 January 2013 at 03:16:24 UTC, cal wrote: This fails: void main() { int z; typeof((int a){return z;}) dg; dg = (int a) {return z;}; } Error: cannot implicitly convert expression (__lambda2) of type int delegate(int a) nothrow @safe to int delegate(int a) pure nothrow

gtkD problem

2013-01-28 Thread SaltySugar
I have one problem. I compiled gtkD ad my first program successfully but when I try to run my program it shows: C:\apps>hello object.Exception@..\src\gtkc\Loader.d(123): Library load failed: libgtk-3-0.dll My Path variable: C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WI

Re: Invalid conversion from utf8 string when it is in variable

2013-01-28 Thread John Chapman
On Monday, 28 January 2013 at 11:17:02 UTC, rsk82 wrote: The effect here is that the message text is correct in greek letters but message title is all empty boxes, sometimes with other texts there are chinese chars. string msg= "ένα μήνυμα"; MessageBoxW(null, "ένα μήνυμα", cast(wchar*)msg.toSt

Invalid conversion from utf8 string when it is in variable

2013-01-28 Thread rsk82
The effect here is that the message text is correct in greek letters but message title is all empty boxes, sometimes with other texts there are chinese chars. string msg= "ένα μήνυμα"; MessageBoxW(null, "ένα μήνυμα", cast(wchar*)msg.toStringz, MB_ICONERROR); http://s9.postimage.org/66e84i80r

Re: Delegate type inferred as pure

2013-01-28 Thread qznc
On Monday, 28 January 2013 at 03:16:24 UTC, cal wrote: This fails: void main() { int z; typeof((int a){return z;}) dg; dg = (int a) {return z;}; } Error: cannot implicitly convert expression (__lambda2) of type int delegate(int a) nothrow @safe to int delegate(int a) pure nothrow

Re: How to stop the Threadmill

2013-01-28 Thread Dicebot
On Monday, 28 January 2013 at 10:18:27 UTC, Chris wrote: I am sure this has been asked before, but I couldn't find a solution or a hint via Google: I use a separate thread to play a sound file. Everything works fine, except that I cannot tell the thread to stop what it is doing. It refuses to r

Re: How to stop the Threadmill

2013-01-28 Thread qznc
On Monday, 28 January 2013 at 10:18:27 UTC, Chris wrote: I am sure this has been asked before, but I couldn't find a solution or a hint via Google: I use a separate thread to play a sound file. Everything works fine, except that I cannot tell the thread to stop what it is doing. It refuses to r

How to stop the Threadmill

2013-01-28 Thread Chris
I am sure this has been asked before, but I couldn't find a solution or a hint via Google: I use a separate thread to play a sound file. Everything works fine, except that I cannot tell the thread to stop what it is doing. It refuses to receive messages while it is doing what it's doing (even i

Re: lvalue <-> rvalue problem

2013-01-28 Thread Namespace
And that prevents a workaround for the missing auto ref. :o) It seems dmd 2.060 is far more useable than 2.061 (for users which use structs, of course). I will switch back. I'm still interested in this problem. But how can I identify the specific compiler code where this error comes from? I k

Re: hasDataMember and mixin inconsistency

2013-01-28 Thread Olivier Grant
On Sunday, 27 January 2013 at 16:51:26 UTC, Philippe Sigaud wrote: string hasDataMember( T )(string M ) { return " __traits(compiles, { Test t; auto _ = t.D; // reading t.M t." ~ M ~ " = t." ~ M ~ "; // assign to t.M })"; } What is the purpose of "auto _ = t.D;"

wxD problem

2013-01-28 Thread SaltySugar
Can someone help me? I compiled WxWidgets succesfully but when I try to compile wxD it shows me an error: dmc -D__DMD__ -mn -g -o+none -D -D__WXDEBUG__ -IC:\Program Files\WxWidgets\ include -IC:\Program Files\WxWidgets\lib\dmc_lib\mswd -w- -I. -WA -DNOPCH -HP90 -Ar -Ae-c -owx-relea