Re: Reading bzipped files

2015-05-05 Thread via Digitalmars-d-learn
On Saturday, 2 May 2015 at 13:50:10 UTC, Per Nordlöw wrote: Should probably be built on top of http://code.dlang.org/packages/bzip2 Docs here: http://www.bzip.org/1.0.3/html/hl-interface.html

Re: Reading bzipped files

2015-05-05 Thread monty via Digitalmars-d-learn
On Tuesday, 5 May 2015 at 06:50:12 UTC, Per Nordlöw wrote: On Tuesday, 5 May 2015 at 06:48:36 UTC, Per Nordlöw wrote: Could anyone please point out if this is possible to fix somehow? Is the solution to avoid the GC and do buffer reuse somehow? I *really* need this for reading Gigabytes of DB

Re: Reading bzipped files

2015-05-05 Thread via Digitalmars-d-learn
On Tuesday, 5 May 2015 at 07:11:36 UTC, monty wrote: also check out: https://github.com/agordon/fileslurp https://github.com/biod/BioD/blob/master/bio/core/utils/bylinefast.d Thanks!

Re: What wrong?

2015-05-05 Thread sclytrack via Digitalmars-d-learn
On Monday, 4 May 2015 at 01:03:43 UTC, Fyodor Ustinov wrote: On Saturday, 2 May 2015 at 20:46:32 UTC, Dennis Ritchie wrote: On Saturday, 2 May 2015 at 19:38:01 UTC, Fyodor Ustinov wrote: I see it by the lack of "42". :) But why is this "receive" breaks down? import std.stdio; import std.c

Re: Error: conflicting Ddoc and obj generation options

2015-05-05 Thread zhmt via Digitalmars-d-learn
Finally,I got the dmd command line as below: dmd -c -of.dub/build/application-debug-linux.posix-x86_64-dmd_2067-3E65324D543ED19695028F22620736D3/ezsock.o -debug -g -w -version=Have_ezsock -version=Have_gamelibd -Isource/ -I../gamelibd/source/ -Jviews source/app.d .. And try to remove d

Re: Ada to D - an array for storing values of each of the six bits which are sufficient

2015-05-05 Thread Dennis Ritchie via Digitalmars-d-learn
Realized bitmap, sorry that does not work with DMD 2.067.1: http://vlang.org/docs/Data_Types/Bits_and_Logic.html https://github.com/coverify/vlang/blob/master/src/esdl/data/bvec.d

Re: CTFE & enums & static assert

2015-05-05 Thread Robert M. Münch via Digitalmars-d-learn
On 2015-05-04 22:22:51 +, ketmar said: as i said, `typeid` is runtime feature, so you can't print it with pragma. and tuples aren't exist in runtime, it's compile-time only. i think you are even more confused now. ;-) sorry. No, that makes it much more clearer for me. The compiler should

Re: Efficiently passing structs

2015-05-05 Thread bitwise via Digitalmars-d-learn
On Tue, 05 May 2015 00:20:15 -0400, rsw0x wrote: it does, auto ref can bind to both lvalues and rvalues. Create the function with an empty template like so, import std.stdio; struct S{ } void Foo()(auto ref S s){ } void main(){ S s; Foo(s); Foo(S()); } There might

Re: Efficiently passing structs

2015-05-05 Thread rsw0x via Digitalmars-d-learn
On Tuesday, 5 May 2015 at 14:14:51 UTC, bitwise wrote: On Tue, 05 May 2015 00:20:15 -0400, rsw0x wrote: it does, auto ref can bind to both lvalues and rvalues. Create the function with an empty template like so, import std.stdio; struct S{ } void Foo()(auto ref S s){ } void main(){

Re: Efficiently passing structs

2015-05-05 Thread bitwise via Digitalmars-d-learn
On Tue, 05 May 2015 10:44:13 -0400, rsw0x wrote: On Tuesday, 5 May 2015 at 14:14:51 UTC, bitwise wrote: Interesting.. Has this always worked? Theres a couple of forum conversations about trying to get "auto ref" to work for non-templates. The main problem seems to be that auto ref wont work

Re: Linker command

2015-05-05 Thread Kagamin via Digitalmars-d-learn
It compiles the example code and links it with supplied libraries, supposedly dallegro bindings.

Re: Efficiently passing structs

2015-05-05 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, 5 May 2015 at 02:47:03 UTC, bitwise wrote: On Mon, 04 May 2015 00:16:03 -0400, Jonathan M Davis via Digitalmars-d-learn wrote: D will move the argument if it can rather than copying it (e.g. if a temporary is being passed in), which reduces the need for worrying about copying like

Re: Efficiently passing structs

2015-05-05 Thread Ali Çehreli via Digitalmars-d-learn
On 05/05/2015 07:14 AM, bitwise wrote: > I don't see how someone could arrive at the above > solution without showing up here and asking first. It was the same with me. :) Then I wrote a short section about it: http://ddili.org/ders/d.en/lvalue_rvalue.html#ix_lvalue_rvalue.auto%20ref,%20parame

Re: Efficiently passing structs

2015-05-05 Thread bitwise via Digitalmars-d-learn
On Tue, 05 May 2015 14:49:07 -0400, Ali Çehreli wrote: http://ddili.org/ders/d.en/lvalue_rvalue.html#ix_lvalue_rvalue.auto%20ref,%20parameter I've actually stumbled upon this site a few times, and it has been very helpful, so thanks =D Unfortunately though, I had no idea that "auto ref" wa

Re: Efficiently passing structs

2015-05-05 Thread bitwise via Digitalmars-d-learn
On Tue, 05 May 2015 11:54:53 -0400, Jonathan M Davis wrote: On Tuesday, 5 May 2015 at 02:47:03 UTC, bitwise wrote: On Mon, 04 May 2015 00:16:03 -0400, Jonathan M Davis via Digitalmars-d-learn wrote: D will move the argument if it can rather than copying it (e.g. if a temporary is being pa

Re: Efficiently passing structs

2015-05-05 Thread Namespace via Digitalmars-d-learn
I've discussed that so many times... just search for auto / scope ref... ;) It will never happen. See: http://forum.dlang.org/thread/ntsyfhesnywfxvzbe...@forum.dlang.org?page=1 http://forum.dlang.org/thread/ylebrhjnrrcajnvtt...@forum.dlang.org?page=1 http://forum.dlang.org/thread/mailman.2989.13

Re: Efficiently passing structs

2015-05-05 Thread bitwise via Digitalmars-d-learn
On Tue, 05 May 2015 17:33:09 -0400, Namespace wrote: I've discussed that so many times... just search for auto / scope ref... ;) It will never happen. See: http://forum.dlang.org/thread/ntsyfhesnywfxvzbe...@forum.dlang.org?page=1 http://forum.dlang.org/thread/ylebrhjnrrcajnvtt...@forum.dlang

Re: Efficiently passing structs

2015-05-05 Thread Gomen via Digitalmars-d-learn
I am sorry for this post, I am just testing something.

Re: Efficiently passing structs

2015-05-05 Thread bitwise via Digitalmars-d-learn
On Tue, 05 May 2015 18:27:54 -0400, Gomen wrote: I am sorry for this post, I am just testing something. The retired "D" forum seems to have been re-purposed for testing ;) Bit

Re: Efficiently passing structs

2015-05-05 Thread Namespace via Digitalmars-d-learn
On Tuesday, 5 May 2015 at 21:58:57 UTC, bitwise wrote: On Tue, 05 May 2015 17:33:09 -0400, Namespace wrote: I've discussed that so many times... just search for auto / scope ref... ;) It will never happen. See: http://forum.dlang.org/thread/ntsyfhesnywfxvzbe...@forum.dlang.org?page=1 http:/

Re: Efficiently passing structs

2015-05-05 Thread bitwise via Digitalmars-d-learn
On Tue, 05 May 2015 18:58:34 -0400, Namespace wrote: On Tuesday, 5 May 2015 at 21:58:57 UTC, bitwise wrote: On Tue, 05 May 2015 17:33:09 -0400, Namespace wrote: I've discussed that so many times... just search for auto / scope ref... ;) It will never happen. See: http://forum.dlang.org

Re: opEquals optimized away?

2015-05-05 Thread Manfred Nowak via Digitalmars-d-learn
On Tuesday, 5 May 2015 at 05:26:17 UTC, anonymous wrote: because `c is c` Thanks. One can see this documented in http://dlang.org/operatoroverloading.html#equals But 1: how can one override this behavior 2: what is the design reason for this Especially: how can one implement side effects o

Re: opEquals optimized away?

2015-05-05 Thread Ali Çehreli via Digitalmars-d-learn
On 05/05/2015 04:30 PM, Manfred Nowak wrote: > On Tuesday, 5 May 2015 at 05:26:17 UTC, anonymous wrote: > >> because `c is c` > > Thanks. One can see this documented in >http://dlang.org/operatoroverloading.html#equals > > But > 1: how can one override this behavior There is now way in D othe

dub: Missing package description for package at ..\memutils\

2015-05-05 Thread Suliman via Digitalmars-d-learn
After some days of holidays I am back to home, and run my project. After it I got very strange error: dub Error executing command run: Missing package description for package at ..\memutils\ I really do not remember that I played with memutils or so. dub.json include only next dependences:

Re: dub: Missing package description for package at ..\memutils\

2015-05-05 Thread Suliman via Digitalmars-d-learn
Updating DUB to git version helped. Latest release version have next issue https://github.com/D-Programming-Language/dub/issues/535