Re: Cannot implicitly convert expression () of type char [1024] to IOREQ *

2016-11-29 Thread Anders S via Digitalmars-d-learn
On Tuesday, 29 November 2016 at 23:33:19 UTC, Ali Çehreli wrote: On 11/29/2016 07:30 AM, Anders S wrote: > INTargv[1];/* list of arguments */ In addition to what Nemanja Boric wrote, the recommended array syntax in D is the following: INT[1] argv; > char sbuf[1024]; >

[Issue 16857] inline assembler reverses operands of VPEXTRW instruction

2016-11-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16857 Walter Bright changed: What|Removed |Added Keywords||iasm, wrong-code

[Issue 16854] Inline assembler has VMOVLHPS and VMOVHLPS swapped

2016-11-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16854 Walter Bright changed: What|Removed |Added Keywords||iasm --

[Issue 16857] New: inline assembler reverses operands of VPEXTRW instruction

2016-11-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16857 Issue ID: 16857 Summary: inline assembler reverses operands of VPEXTRW instruction Product: D Version: D2 Hardware: All OS: All Status: NEW

[Issue 16856] New: D is borked on FreeBSD current (what will eventually be 12)

2016-11-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16856 Issue ID: 16856 Summary: D is borked on FreeBSD current (what will eventually be 12) Product: D Version: D2 Hardware: x86_64 OS: FreeBSD Status: NEW

Re: What is going on with the ubuntu/debian debacle ?

2016-11-29 Thread Jonathan M Davis via Digitalmars-d
On Friday, November 25, 2016 22:52:18 H. S. Teoh via Digitalmars-d wrote: > Hope this info will be helpful to anyone else who's experiencing > this problem. It cost me almost 2-3 hours' worth of frustration. Thanks for the info, though I haven't managed to really get much working on my machine.

Re: x86 instruction set reference

2016-11-29 Thread Walter Bright via Digitalmars-d
On 11/29/2016 6:07 PM, deadalnix wrote: To be fair, it explains much more than just what the instructions are. I'm not interested in fairness, I'm interested in quick convenient access to what I need to know when I need to know it :-) I did suspect a mistake in it, but it turned out that

[Issue 15935] compiling dub with -fPIC triggers internal compiler error

2016-11-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15935 Jonathan M Davis changed: What|Removed |Added Blocks||16794 --

[Issue 16794] Official .deb packages must compile libphobos2.a with -fPIC

2016-11-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16794 Jonathan M Davis changed: What|Removed |Added CC|

[Issue 15935] compiling dub with -fPIC triggers internal compiler error

2016-11-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15935 Jonathan M Davis changed: What|Removed |Added CC|

Re: x86 instruction set reference

2016-11-29 Thread deadalnix via Digitalmars-d
On Tuesday, 29 November 2016 at 21:02:46 UTC, Marco Leise wrote: Am Tue, 29 Nov 2016 03:53:06 -0800 schrieb Walter Bright : http://www.felixcloutier.com/x86/ I find this easier to use for quick lookups than the Intel PDF files, because any instruction is just 2

[Issue 16855] New: Global void[0] causes OPTLINK Error when passed as ref Parameter

2016-11-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16855 Issue ID: 16855 Summary: Global void[0] causes OPTLINK Error when passed as ref Parameter Product: D Version: D2 Hardware: x86_64 OS: Windows Status:

Re: JTransc + Android/iOS status support

2016-11-29 Thread Joakim via Digitalmars-d
On Tuesday, 29 November 2016 at 10:37:53 UTC, soywiz wrote: Amazing! Right now all the generated code uses __gshared. In Java you have to use https://docs.oracle.com/javase/8/docs/api/java/lang/ThreadLocal.html to get TLS. And I didn't implemented it yet for multithreading. Because the initial

[Issue 16854] Inline assembler has VMOVLHPS and VMOVHLPS swapped

2016-11-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16854 --- Comment #1 from Walter Bright --- https://github.com/dlang/dmd/pull/6291 --

[Issue 16854] Inline assembler has VMOVLHPS and VMOVHLPS swapped

2016-11-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16854 Walter Bright changed: What|Removed |Added Keywords||wrong-code --

[Issue 16854] New: Inline assembler has VMOVLHPS and VMOVHLPS swapped

2016-11-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16854 Issue ID: 16854 Summary: Inline assembler has VMOVLHPS and VMOVHLPS swapped Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: major

Re: Cannot implicitly convert expression () of type char [1024] to IOREQ *

2016-11-29 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 29 November 2016 at 23:33:19 UTC, Ali Çehreli wrote: On 11/29/2016 07:30 AM, Anders S wrote: > INTargv[1];/* list of arguments */ Speculation, but given that you say "list of args" is it possible OP means to use int[0] for an inline array. In addition to what

Re: Cannot implicitly convert expression () of type char [1024] to IOREQ *

2016-11-29 Thread Ali Çehreli via Digitalmars-d-learn
On 11/29/2016 07:30 AM, Anders S wrote: > INTargv[1];/* list of arguments */ In addition to what Nemanja Boric wrote, the recommended array syntax in D is the following: INT[1] argv; > char sbuf[1024]; > io = (IOREQ *)buf; // Not accepted in dlang You must use

Re: CTFE Status

2016-11-29 Thread Stefan Koch via Digitalmars-d
On Tuesday, 29 November 2016 at 23:00:08 UTC, Stefan Koch wrote: I fixed a bug in continue break handling. For the record it was an off by one error. The value for unresolvedGotos would add one referencing jump. But the count of referencing would be initialized to zero instead of one.

Re: DUB 1.1.1-beta.1

2016-11-29 Thread Martin Nowak via Digitalmars-d-announce
On Wednesday, 23 November 2016 at 16:55:47 UTC, Sönke Ludwig wrote: I've also added a beta release tag for DUB (the same version as included in the DMD beta package). Separate download of pre-compiled binaries: https://code.dlang.org/download Sorry, seems like I forgot to push the dub tag to

Re: CTFE Status

2016-11-29 Thread Stefan Koch via Digitalmars-d
On Monday, 28 November 2016 at 17:02:37 UTC, Stefan Koch wrote: On Friday, 25 November 2016 at 10:53:50 UTC, Stefan Koch wrote: I discovered a nasty bug in goto handling. I am working on fixed it; This could take a while, since it likely requires structural changes. I fixed a bug in continue

Re: x86 instruction set reference

2016-11-29 Thread Stefan Koch via Digitalmars-d
On Tuesday, 29 November 2016 at 22:20:06 UTC, Walter Bright wrote: On 11/29/2016 1:02 PM, Marco Leise wrote: You mean ... like that 3600 pages "Intel® 64 and IA-32 Architectures Software Developer’s Manual" I linked in that bug report earlier today? Aside form being the complete and

Re: x86 instruction set reference

2016-11-29 Thread safety0ff via Digitalmars-d
On Tuesday, 29 November 2016 at 22:20:06 UTC, Walter Bright wrote: And I do have a local copy of it. But to just see the hex code for an instruction, the clickable reference is much handier than navigating 3600 pages. Other links in the same vein: http://ref.x86asm.net/coder64.html

Re: x86 instruction set reference

2016-11-29 Thread Walter Bright via Digitalmars-d
On 11/29/2016 1:02 PM, Marco Leise wrote: You mean ... like that 3600 pages "Intel® 64 and IA-32 Architectures Software Developer’s Manual" I linked in that bug report earlier today? Aside form being the complete and authoritative source on how Intel's CPUs operate, it really doesn't have much

Re: x86 instruction set reference

2016-11-29 Thread Marco Leise via Digitalmars-d
Am Tue, 29 Nov 2016 03:53:06 -0800 schrieb Walter Bright : > http://www.felixcloutier.com/x86/ > > I find this easier to use for quick lookups than the Intel PDF files, because > any instruction is just 2 clicks away. You mean ... like that 3600 pages "Intel® 64 and

[Issue 16842] New: Punjab-@call-1800-381-9788 debt-consolidation-loan phone number

2016-11-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16842 Issue ID: 16842 Summary: Punjab-@call-1800-381-9788 debt-consolidation-loan phone number Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW

Re: [Bench!][Mir] +54%..+185% performance boost for Mersenne Twister.

2016-11-29 Thread Ilya Yaroshenko via Digitalmars-d
On Tuesday, 29 November 2016 at 16:54:55 UTC, Nordlöw wrote: On Saturday, 26 November 2016 at 16:31:40 UTC, Ilya Yaroshenko wrote: Bench results: mir.random 32-bit Mt19937: 6.80851 Gb/s Does Gb mean Gigabytes or Gigabits? Gigabits

Re: Boston Dlang Meetup December 15th

2016-11-29 Thread Sameer Pradhan via Digitalmars-d-announce
On Tuesday, 29 November 2016 at 14:42:38 UTC, Steven Schveighoffer wrote: Going to be at the Capital One Cafe again in the back bay. I'll give a talk on how druntime is constructed. I might be in India trying to salvage some demonetized currency... (for those who have not heard about it:

Re: [Bench!][Mir] +54%..+185% performance boost for Mersenne Twister.

2016-11-29 Thread Nordlöw via Digitalmars-d
On Saturday, 26 November 2016 at 16:31:40 UTC, Ilya Yaroshenko wrote: Bench results: mir.random 32-bit Mt19937: 6.80851 Gb/s Does Gb mean Gigabytes or Gigabits?

Re: Use class template as a type

2016-11-29 Thread Jerry via Digitalmars-d-learn
On Tuesday, 29 November 2016 at 15:56:23 UTC, Jerry wrote: abstract class MyClass {} abstract class MyClassImpl(T) Oops, forgot MyClassImpl should extend from MyClass. abstract class MyClassImpl(T) : MyClass { ... }

Re: Use class template as a type

2016-11-29 Thread Jerry via Digitalmars-d-learn
On Monday, 28 November 2016 at 11:26:41 UTC, dm wrote: ``` abstract class MyClass(T) { public: @property const(T) value(){return _value;} @property void value(T val){_value = val;} ... private: T _value; ... } To avoid having to use the Object class directly you can make an base

Re: Cannot implicitly convert expression () of type char [1024] to IOREQ *

2016-11-29 Thread Nemanja Boric via Digitalmars-d-learn
On Tuesday, 29 November 2016 at 15:30:33 UTC, Anders S wrote: Hi guys, I want to write into a fifo pipe using write( ...) Now a gather my data into my own struct IOREQ so in order to write I have to cast into an char buffer. My problem in dlang is that it doesn't accept the casting (IOREQ

Re: Cannot implicitly convert expression () of type char [1024] to IOREQ *

2016-11-29 Thread Nemanja Boric via Digitalmars-d-learn
On Tuesday, 29 November 2016 at 15:55:57 UTC, Nemanja Boric wrote: just struct IOREQ { SHORT fc; /* function code */ SHORT rs; /* return code */ INT size; /* size of this request, including */

Cannot implicitly convert expression () of type char [1024] to IOREQ *

2016-11-29 Thread Anders S via Digitalmars-d-learn
Hi guys, I want to write into a fifo pipe using write( ...) Now a gather my data into my own struct IOREQ so in order to write I have to cast into an char buffer. My problem in dlang is that it doesn't accept the casting (IOREQ *) I get: Error: Cannot implicitly convert expression () of type

Re: How can I concatenate a string, a char array and an int

2016-11-29 Thread Anders S via Digitalmars-d-learn
Thanks guys for a really quick answer !! OK, a little bit awkward to use but getting there posting a new question about char * to struct ;) Thanks /anders

Re: JTransc + Android/iOS status support

2016-11-29 Thread Jacob Carlborg via Digitalmars-d
On 2016-11-29 11:37, soywiz wrote: @Jacob Cool. So I can expect it to work on iOS Obj-C too right? Yes, using LDC. Someone tried a wrapper using RAII to emulate partially (except for weak references) ARC? Not that I know of. -- /Jacob Carlborg

Boston Dlang Meetup December 15th

2016-11-29 Thread Steven Schveighoffer via Digitalmars-d-announce
Going to be at the Capital One Cafe again in the back bay. I'll give a talk on how druntime is constructed. Details here: https://www.meetup.com/Boston-area-D-Programming-Language-Meetup/events/235904059/ I will post live stream details (before the live stream this time!) at some point,

Re: Converting all enum members to a string fails with version 2.0.72.0

2016-11-29 Thread Stefan via Digitalmars-d-learn
On Monday, 21 November 2016 at 18:53:59 UTC, Stefan wrote: On Monday, 21 November 2016 at 17:26:37 UTC, Jonathan M Davis wrote: [...] Thanks Jonathan for the explanation. The cast works fine but feels "unsafe". I will wait for the next version. Stefan Version D 2.072.1 Beta fixed my

[Issue 10100] Identifiers with double underscores and allMembers

2016-11-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10100 Ethan Watson changed: What|Removed |Added CC||goober...@gmail.com ---

Re: Code example in std.parallelism fails to compile

2016-11-29 Thread Mihai via Digitalmars-d
On Tuesday, 29 November 2016 at 12:49:53 UTC, Stefan Koch wrote: Define the function you want to call globally. and not inside another function. Yes. You can also find a very detailed explanation here https://github.com/dlang/phobos/pull/4915#issuecomment-262484753.

Re: DIP1004: Inherited Constructors

2016-11-29 Thread Dicebot via Digitalmars-d-announce
On 11/29/2016 12:04 PM, Arafel wrote: > I think I might be a bit late to the party, and I'm still quite new in > D... but wouldn't a variadic template constructor work? The usual rules > of templates would still let you override a constructor if needed. > > --- > class A { > this() { } >

Re: DIP1004: Inherited Constructors

2016-11-29 Thread Dicebot via Digitalmars-d-announce
On 11/28/2016 04:57 AM, rikki cattermole wrote: > On 28/11/2016 3:38 PM, Dicebot wrote: >> DIP 1004 is merged to the queue and open for public informal feedback. >> >> PR: https://github.com/dlang/DIPs/pull/42 >> >> Initial merged document: >>

Re: Code example in std.parallelism fails to compile

2016-11-29 Thread Stefan Koch via Digitalmars-d
On Tuesday, 29 November 2016 at 12:09:32 UTC, Nordlöw wrote: The code example at https://dlang.org/phobos/std_parallelism.html containing: import std.algorithm, std.parallelism, std.range; void main() { immutable n = 1_000_000_000; immutable delta = 1.0 / n; real getTerm(int i)

Re: Code example in std.parallelism fails to compile

2016-11-29 Thread Mihai via Digitalmars-d
On Tuesday, 29 November 2016 at 12:09:32 UTC, Nordlöw wrote: Is there a solution? I've reported the issue recently https://issues.dlang.org/show_bug.cgi?id=16705.

Re: Code example in std.parallelism fails to compile

2016-11-29 Thread Robert burner Schadek via Digitalmars-d
Not that I know of, https://github.com/dlang/phobos/pull/4399. I think std.parallelism was designed around a D feature that was more a bug than a feature. This bug/feature seamed to be fixed some years ago. But I'm not 100%, as this was before my time.

Code example in std.parallelism fails to compile

2016-11-29 Thread Nordlöw via Digitalmars-d
The code example at https://dlang.org/phobos/std_parallelism.html containing: import std.algorithm, std.parallelism, std.range; void main() { immutable n = 1_000_000_000; immutable delta = 1.0 / n; real getTerm(int i) { immutable x = ( i - 0.5 ) * delta;

x86 instruction set reference

2016-11-29 Thread Walter Bright via Digitalmars-d
http://www.felixcloutier.com/x86/ I find this easier to use for quick lookups than the Intel PDF files, because any instruction is just 2 clicks away.

Re: x86 instruction set reference

2016-11-29 Thread rikki cattermole via Digitalmars-d
On 30/11/2016 12:53 AM, Walter Bright wrote: http://www.felixcloutier.com/x86/ I find this easier to use for quick lookups than the Intel PDF files, because any instruction is just 2 clicks away. Oh and a little tip from me as well, use the AMD64 manuals. They are actually useful and can be

[Issue 16092] AVX registers YMM0-YMM7 are inaccessible to 32-bit asm

2016-11-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16092 --- Comment #2 from Marco Leise --- Sure, here you go: int main() { asm { vpermilps YMM0, YMM7, 0xAA; } } That does not work in 32-bit compilation mode, although YMM0 to YMM7 should be available. Compare

Re: How can I concatenate a string, a char array and an int

2016-11-29 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 29 November 2016 at 10:21:24 UTC, Anders S wrote: Hi guys, just started to get into Dlang, comming from C and C++ I like to use methods like there if possible. Now I want to catenate something like this, but don't get it to work in standard C i code: char str[80];

Re: how to copy const struct with indirections to mutable one (of the same type)

2016-11-29 Thread drug via Digitalmars-d-learn
29.11.2016 13:49, Mathias Lang пишет: On Tuesday, 29 November 2016 at 10:46:04 UTC, drug wrote: I had the following code: ``` import std.algorithm: equal; [...] You are not calling the (identity) opAssign here, but postblit. To call identity opAssign, you need an already constructed

Re: how to copy const struct with indirections to mutable one (of the same type)

2016-11-29 Thread Mathias Lang via Digitalmars-d-learn
On Tuesday, 29 November 2016 at 10:46:04 UTC, drug wrote: I had the following code: ``` import std.algorithm: equal; [...] You are not calling the (identity) opAssign here, but postblit. To call identity opAssign, you need an already constructed instance: ``` Data mutable_data;

how to copy const struct with indirections to mutable one (of the same type)

2016-11-29 Thread drug via Digitalmars-d-learn
I had the following code: ``` import std.algorithm: equal; struct Data { int[3] arr; } int main() { auto const_data = const(Data)([1, 2, 3]); assert(const_data.arr[].equal([1, 2, 3])); Data mutable_data = const_data;

Re: JTransc + Android/iOS status support

2016-11-29 Thread soywiz via Digitalmars-d
On Tuesday, 29 November 2016 at 09:09:40 UTC, Jacob Carlborg wrote: On 2016-11-29 02:09, soywiz wrote: And for iOS it just supports an AOT approach except for javascript. So it is great too. BTW, it's possible to interface Objective-C from D [1]. [1]

Re: How can I concatenate a string, a char array and an int

2016-11-29 Thread rumbu via Digitalmars-d-learn
On Tuesday, 29 November 2016 at 10:21:24 UTC, Anders S wrote: Hi guys, just started to get into Dlang, comming from C and C++ I like to use methods like there if possible. Now I want to catenate something like this, but don't get it to work in standard C i code: char str[80];

How can I concatenate a string, a char array and an int

2016-11-29 Thread Anders S via Digitalmars-d-learn
Hi guys, just started to get into Dlang, comming from C and C++ I like to use methods like there if possible. Now I want to catenate something like this, but don't get it to work in standard C i code: char str[80]; sprintf(str, "This is a number = %f", 3.14356); Now in Dlang and

Re: DIP1004: Inherited Constructors

2016-11-29 Thread Arafel via Digitalmars-d-announce
On Monday, 28 November 2016 at 02:38:00 UTC, Dicebot wrote: DIP 1004 is merged to the queue and open for public informal feedback. PR: https://github.com/dlang/DIPs/pull/42 Initial merged document: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1004.md If you want the change to be

Re: Use class template as a type

2016-11-29 Thread ag0aep6g via Digitalmars-d-learn
On 11/29/2016 02:21 AM, Basile B. wrote: The cast from a class type to a sub class in itself does absolutely nothing. That can't be right. A bad downcast gives you null, so it has to check the dynamic type information. Compare with upcasts which are statically known to be correct, so they

Re: JTransc + Android/iOS status support

2016-11-29 Thread Joakim via Digitalmars-d
On Tuesday, 29 November 2016 at 08:49:22 UTC, soywiz wrote: @Joakim: Regarding to D. Yep I think I'm in the right place :) I started using D1 something almost 10 years ago and ended doing this: https://github.com/soywiz/pspemu My main concerns by then were: lack of IDE support for major

Re: JTransc + Android/iOS status support

2016-11-29 Thread Jacob Carlborg via Digitalmars-d
On 2016-11-29 02:09, soywiz wrote: And for iOS it just supports an AOT approach except for javascript. So it is great too. BTW, it's possible to interface Objective-C from D [1]. [1] http://dlang.org/spec/objc_interface.html -- /Jacob Carlborg

A simple solution for randomness copy problem

2016-11-29 Thread Ilya Yaroshenko via Digitalmars-d
Hello, The problem is that a structure for a random algorithm or a random variable may holds its own precomputed random state, which is not correct to copy. From [1] by Joseph Rushton Wakeling: Essentially the sampling algorithm carries out its own little internal pseudo-random process

Re: JTransc + Android/iOS status support

2016-11-29 Thread soywiz via Digitalmars-d
@Jacob: You can just download this: https://github.com/jtransc/jtransc-examples/tree/master/hello-world execute `./gradlew runD` or `./gradlew distD` and check the `build/jtransc-d/program.d` file (about 500kb program.d file with treeshaking enabled). Right now it generates classes like