Re: Questions about dmd source

2017-07-29 Thread ketmar via Digitalmars-d-learn
Francis Nixon wrote: I have two completely unrelated questions about the dmd source code. 1. What does the mtype.Type.dotExp method do? The documentation comment says that it "Accesses the members of the object e". I'm not sure exactly why I would want to do that? Is it for handling types spe

Re: Questions about dmd source

2017-07-29 Thread Anton Fediushin via Digitalmars-d-learn
On Sunday, 30 July 2017 at 06:18:16 UTC, Francis Nixon wrote: I have two completely unrelated questions about the dmd source code. 2. I've noticed there are some rather long methods in the dmd source, involving more than one goto; parse.d is particularly bad. Is there a reason for this/is it

Questions about dmd source

2017-07-29 Thread Francis Nixon via Digitalmars-d-learn
I have two completely unrelated questions about the dmd source code. 1. What does the mtype.Type.dotExp method do? The documentation comment says that it "Accesses the members of the object e". I'm not sure exactly why I would want to do that? Is it for handling types specified using an ident

Re: why won't byPair work with a const AA?

2017-07-29 Thread Ali Çehreli via Digitalmars-d-learn
On 07/29/2017 10:15 PM, Matthew Gamble wrote: >> I think it should work. I think a cast to unqualified is a safe >> workaround in this case: >> >> auto pairs() @property const { return >> (cast(int[string])aa).byPair.array.sort().release; } As your question reveals, casting away const is not

Re: why won't byPair work with a const AA?

2017-07-29 Thread Matthew Gamble via Digitalmars-d-learn
On Sunday, 30 July 2017 at 04:36:19 UTC, Ali Çehreli wrote: On 07/29/2017 09:19 PM, Matthew Gamble wrote: I have a class member function from which I'm trying to return a sorted array of key, value tuples stored in an associative array as a private member. The member function should be able to

Re: Is std.xml seriously broken, or is it me?

2017-07-29 Thread Meta via Digitalmars-d-learn
On Sunday, 30 July 2017 at 02:58:09 UTC, Mike wrote: I'm trying to use std.xml, and I can't get it to work. I tried the simplest program I could think of: import std.xml; import std.stdio; void main() { auto parser = new DocumentParser("encoding=\"utf-8\"?>"); parser.onStartTag["device"]

Re: why won't byPair work with a const AA?

2017-07-29 Thread Ali Çehreli via Digitalmars-d-learn
On 07/29/2017 09:19 PM, Matthew Gamble wrote: I have a class member function from which I'm trying to return a sorted array of key, value tuples stored in an associative array as a private member. The member function should be able to be marked const to prevent the AA from being modified. I have

why won't byPair work with a const AA?

2017-07-29 Thread Matthew Gamble via Digitalmars-d-learn
I have a class member function from which I'm trying to return a sorted array of key, value tuples stored in an associative array as a private member. The member function should be able to be marked const to prevent the AA from being modified. I have reduced the problem to the simple case below

Re: Is std.xml seriously broken, or is it me?

2017-07-29 Thread Mike via Digitalmars-d-learn
On Sunday, 30 July 2017 at 02:58:09 UTC, Mike wrote: import std.xml; import std.stdio; void main() { auto parser = new DocumentParser("encoding=\"utf-8\"?>"); parser.onStartTag["device"] = (ElementParser parser) { writeln("device"); }; parser.parse(); } https://d

Is std.xml seriously broken, or is it me?

2017-07-29 Thread Mike via Digitalmars-d-learn
I'm trying to use std.xml, and I can't get it to work. I tried the simplest program I could think of: import std.xml; import std.stdio; void main() { auto parser = new DocumentParser("encoding=\"utf-8\"?>"); parser.onStartTag["device"] = (ElementParser parser) { writeln("devic

Re: Question on SSE intrinsics

2017-07-29 Thread Nicholas Wilson via Digitalmars-d-learn
On Sunday, 30 July 2017 at 02:05:32 UTC, Nicholas Wilson wrote: On Saturday, 29 July 2017 at 22:45:12 UTC, piotrekg2 wrote: What about __builtin_ctz? https://github.com/ldc-developers/druntime/blob/ldc/src/ldc/intrinsics.di#L325 you can also make it out of bsf or bsr (i can't remember which)

Re: Question on SSE intrinsics

2017-07-29 Thread Nicholas Wilson via Digitalmars-d-learn
On Saturday, 29 July 2017 at 22:45:12 UTC, piotrekg2 wrote: On Saturday, 29 July 2017 at 18:19:47 UTC, Johan Engelen wrote: On Saturday, 29 July 2017 at 16:01:07 UTC, piotrekg2 wrote: Hi, I'm trying to port some of my c++ code which uses sse2 instructions into D. The code calls the following i

Re: Error 1: Previous Definition Different : _D3gtk3All12__ModuleInfoZ (gtk.All.__ModuleInfo)

2017-07-29 Thread Marco Leise via Digitalmars-d-learn
Am Fri, 28 Jul 2017 22:53:52 + schrieb FoxyBrown : > After upgrading to latest dmd and having to rebuild gtk, I now > get the following error > > Error 1: Previous Definition Different : > _D3gtk3All12__ModuleInfoZ (gtk.All.__ModuleInfo) > > > in my apps that were previously working(no ch

Re: Question on SSE intrinsics

2017-07-29 Thread piotrekg2 via Digitalmars-d-learn
On Saturday, 29 July 2017 at 18:19:47 UTC, Johan Engelen wrote: On Saturday, 29 July 2017 at 16:01:07 UTC, piotrekg2 wrote: Hi, I'm trying to port some of my c++ code which uses sse2 instructions into D. The code calls the following intrinsics: - _mm256_loadu_si256 - _mm256_movemask_epi8 Do

Re: It makes me sick!

2017-07-29 Thread Timon Gehr via Digitalmars-d-learn
On 29.07.2017 23:52, FoxyBrown wrote: On Saturday, 29 July 2017 at 21:48:09 UTC, Timon Gehr wrote: On 28.07.2017 23:30, FoxyBrown wrote: because you didn't want to spend 10 minutes to fix a program. You need to realize that the same thing applies to you. There is no "us" vs "you". I.e. if y

Re: It makes me sick!

2017-07-29 Thread FoxyBrown via Digitalmars-d-learn
On Saturday, 29 July 2017 at 21:48:09 UTC, Timon Gehr wrote: On 28.07.2017 23:30, FoxyBrown wrote: because you didn't want to spend 10 minutes to fix a program. You need to realize that the same thing applies to you. There is no "us" vs "you". I.e. if you know it to only be 10 minutes of wo

Re: It makes me sick!

2017-07-29 Thread Timon Gehr via Digitalmars-d-learn
On 28.07.2017 23:30, FoxyBrown wrote: because you didn't want to spend 10 minutes to fix a program. You need to realize that the same thing applies to you. There is no "us" vs "you". I.e. if you know it to only be 10 minutes of work, why don't you just fix it yourself? Mike currently has as

Re: It makes me sick!

2017-07-29 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, July 29, 2017 21:17:23 Joakim via Digitalmars-d-learn wrote: > On Saturday, 29 July 2017 at 19:26:03 UTC, FoxyBrown wrote: > > Also, equating dmd to an audio program or a clip art program > > that is designed to load any and all files in it's install dir > > is moronic too. > > It is n

Re: It makes me sick!

2017-07-29 Thread Joakim via Digitalmars-d-learn
On Saturday, 29 July 2017 at 19:26:03 UTC, FoxyBrown wrote: On Saturday, 29 July 2017 at 19:17:08 UTC, Joakim wrote: On Friday, 28 July 2017 at 22:32:27 UTC, FoxyBrown wrote: [...] What you are suggesting is blatantly idiotic. No software ever made supports simply installing on top of an ol

Re: It makes me sick!

2017-07-29 Thread FoxyBrown via Digitalmars-d-learn
On Saturday, 29 July 2017 at 19:51:30 UTC, Adam D. Ruppe wrote: On Saturday, 29 July 2017 at 19:26:03 UTC, FoxyBrown wrote: Also, equating dmd to an audio program or a clip art program that is designed to load any and all files in it's install dir is moronic too. I like to add files to the dm

Re: It makes me sick!

2017-07-29 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 29 July 2017 at 19:26:03 UTC, FoxyBrown wrote: Also, equating dmd to an audio program or a clip art program that is designed to load any and all files in it's install dir is moronic too. I like to add files to the dmd install directory to expand its "just works" library. I was

Re: It makes me sick!

2017-07-29 Thread FoxyBrown via Digitalmars-d-learn
On Saturday, 29 July 2017 at 19:17:08 UTC, Joakim wrote: On Friday, 28 July 2017 at 22:32:27 UTC, FoxyBrown wrote: [...] What you are suggesting is blatantly idiotic. No software ever made supports simply installing on top of an old installation from a compressed zip or tar file. If you ne

Re: It makes me sick!

2017-07-29 Thread Joakim via Digitalmars-d-learn
On Friday, 28 July 2017 at 22:32:27 UTC, FoxyBrown wrote: On Friday, 28 July 2017 at 21:35:01 UTC, Anonymouse wrote: On Friday, 28 July 2017 at 21:23:22 UTC, FoxyBrown wrote: [...] I'm sorry if I'm not expressing it in a way that agrees with you but you're looking at the wrong side of the ex

Re: Question on SSE intrinsics

2017-07-29 Thread Johan Engelen via Digitalmars-d-learn
On Saturday, 29 July 2017 at 16:01:07 UTC, piotrekg2 wrote: Hi, I'm trying to port some of my c++ code which uses sse2 instructions into D. The code calls the following intrinsics: - _mm256_loadu_si256 - _mm256_movemask_epi8 Do they have any equivalent intrinsics in D? Yes, with LDC (probab

Re: It makes me sick!

2017-07-29 Thread Grander via Digitalmars-d-learn
On Friday, 28 July 2017 at 22:32:27 UTC, FoxyBrown wrote: On Friday, 28 July 2017 at 21:35:01 UTC, Anonymouse wrote: [...] YES! EXACTLY! I AM EXPECTING THE SOFTWARE, WHICH IS WHAT THE PROGRAMMER CREATED AND HANDLES THE FILES TO ACTUALLY KNOW WHAT THE HELL IT IS DOING! [...] The software

Re: Question on SSE intrinsics

2017-07-29 Thread Eugene Wissner via Digitalmars-d-learn
On Saturday, 29 July 2017 at 16:01:07 UTC, piotrekg2 wrote: Hi, I'm trying to port some of my c++ code which uses sse2 instructions into D. The code calls the following intrinsics: - _mm256_loadu_si256 - _mm256_movemask_epi8 Do they have any equivalent intrinsics in D? I'm compiling my c++ c

Question on SSE intrinsics

2017-07-29 Thread piotrekg2 via Digitalmars-d-learn
Hi, I'm trying to port some of my c++ code which uses sse2 instructions into D. The code calls the following intrinsics: - _mm256_loadu_si256 - _mm256_movemask_epi8 Do they have any equivalent intrinsics in D? I'm compiling my c++ code using gcc. Thanks, Piotr

Re: D Debug101

2017-07-29 Thread Eugene Wissner via Digitalmars-d-learn
On Saturday, 29 July 2017 at 14:41:32 UTC, Kagamin wrote: People who don't use IDE, use printf debugging. or gdb which has several GUI-frontends if needed.

Re: D Debug101

2017-07-29 Thread Kagamin via Digitalmars-d-learn
People who don't use IDE, use printf debugging.

Re: dmd can't build gtk x64

2017-07-29 Thread Mike Wey via Digitalmars-d-learn
On 29-07-17 01:57, FoxyBrown wrote: On Friday, 28 July 2017 at 22:45:58 UTC, FoxyBrown wrote: Error: can't run 'C:\VS\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64', check PATH It is trying to run some x64.exe/com/bat file... why? What is this file? simply doing dmd -m64 build.d Works fine for x