Re: Setting up dmd properly

2016-01-12 Thread Jason Jeffory via Digitalmars-d-learn
On Wednesday, 13 January 2016 at 01:40:59 UTC, Mike Parker wrote: On Tuesday, 12 January 2016 at 21:08:30 UTC, Jason Jeffory wrote: (I should mention that I am exaggerating a bit, and some of the complaints about D are actually more directed to the programming community in general. D has the

Re: Today was a good day

2016-01-12 Thread Andrei Alexandrescu via Digitalmars-d
On 01/12/2016 08:31 PM, Timon Gehr wrote: - This probably does not make a large difference, but one can find the median of five elements using only at most 6 comparisons. (And without moving the elements.) [1] Moving the elements actually does help. - getPivot selects indices which depend

Re: "Good PR" mechanical check

2016-01-12 Thread H. S. Teoh via Digitalmars-d
On Tue, Jan 12, 2016 at 02:03:57PM -0500, Andrei Alexandrescu via Digitalmars-d wrote: > On 01/12/2016 08:42 AM, Martin Drašar via Digitalmars-d wrote: > >Wouldn't it be sufficient to mandate usage of dfmt with proper > >settings before submitting a PR? > > That would suffice at least in the

CAS and atomicOp!"" memory ordering?

2016-01-12 Thread rsw0x via Digitalmars-d-learn
Why is there no way to specify the desired memory order with these? What memory order am I supposed to assume? The documentation is sparse.

Re: [dlang.org] new forum design - preview

2016-01-12 Thread Suliman via Digitalmars-d
On Wednesday, 13 January 2016 at 06:01:41 UTC, Vladimir Panteleev wrote: http://beta.forum.dlang.org/ https://github.com/CyberShadow/DFeed/pull/51 I dislike it :( old one is better. Probably you need make content up to 100% of windows size and make forum part bigger. Also it's look like as

mixed-in ctor not on par with explicit one?

2016-01-12 Thread Shriramana Sharma via Digitalmars-d-learn
Hello. Compiling the following code: mixin template intCtor() { this(int i) {} } struct Test { mixin intCtor; this(string s) {} } void main() { auto a = Test("hello"); auto b = Test(1); } ...gives the error: (6): Error: constructor .Test.this (string s) is not callable using argument

Re: "Good PR" mechanical check

2016-01-12 Thread Brian Schott via Digitalmars-d
On Wednesday, 13 January 2016 at 05:19:36 UTC, H. S. Teoh wrote: There are also some (smaller) examples in std.range, such as in transposed(), where nested arrays are formatted like matrices in order to make it clear what the function is trying to do. I'm almost certain dfmt (or any mechanical

Re: [Dlang] Delegate Syntax Question

2016-01-12 Thread Jack via Digitalmars-d-learn
On Sunday, 10 January 2016 at 14:32:02 UTC, Jack wrote: Hello. So I was trying to pass a delegate as an argument in a function and was wondering if I'm writing the correct code for it. You see my code is : // class Foo() { void bar() {

Re: extern(C++, ns)

2016-01-12 Thread Manu via Digitalmars-d
On 13 January 2016 at 03:20, Walter Bright via Digitalmars-d wrote: > On 1/11/2016 8:02 PM, Manu via Digitalmars-d wrote: >> >> Surely the fact that people are implementing machinery to undo the >> damage done is a strong indication that they don't want the feature.

[dlang.org] new forum design - preview

2016-01-12 Thread Vladimir Panteleev via Digitalmars-d
http://beta.forum.dlang.org/ https://github.com/CyberShadow/DFeed/pull/51

Re: Anyone using glad?

2016-01-12 Thread Jason Jeffory via Digitalmars-d-learn
On Tuesday, 12 January 2016 at 20:48:37 UTC, Dav1d wrote: On Tuesday, 12 January 2016 at 19:16:51 UTC, Jason Jeffory wrote: So, I finally got it to work by abandoning demios and static linking. Derelict + dynamic linking worked with only about a min of problems(copying the proper dll to the

Re: [dlang.org] new forum design - preview

2016-01-12 Thread Jason Jeffory via Digitalmars-d
On Wednesday, 13 January 2016 at 06:01:41 UTC, Vladimir Panteleev wrote: http://beta.forum.dlang.org/ https://github.com/CyberShadow/DFeed/pull/51 Cool, looks nice!

Re: extern(C++, ns)

2016-01-12 Thread Walter Bright via Digitalmars-d
On 1/12/2016 8:46 PM, Manu via Digitalmars-d wrote: Of course that's an error, declaring 2 symbols with the same name at the top level of the same module is obviously an error. No D coder would expect otherwise. There's no realistic scenario that could lead to that case; why would you have an

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Wednesday, 13 January 2016 at 02:12:36 UTC, tsbockman wrote: On Wednesday, 13 January 2016 at 01:43:21 UTC, John Colvin wrote: I am all for keeping it simple here, but I still think there's a problem. https://issues.dlang.org/show_bug.cgi?id=15561 That's a good point. Interesting. I

Re: extern(C++, ns)

2016-01-12 Thread Jason Jeffory via Digitalmars-d
New construct to solve the problem! extern(C++, nsin, nsout) The nsin is the C++ namespace to import from and nsout is the D namespace that the symbol ends up being in. You can default nsout to be local, global, or whatever one wants.

[Issue 15543] [ndslice] assumeSameStructure has useless flag

2016-01-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15543 --- Comment #1 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/fe6353028f4ff260aa775c72276759e5c5552673 [one line review]

Re: Setting up dmd properly

2016-01-12 Thread Robert M. Münch via Digitalmars-d-learn
On 2016-01-12 04:15:36 +, Mike Parker said: You can avoid all of these headaches by using dynamic bindings like those at DerelictOrg [4] if they are available for the libraries you use. Then the compile-time dependency on the C library goes away and all you need is the DLL at runtime. I

Re: Beta D 2.070.0-b1

2016-01-12 Thread Jacob Carlborg via Digitalmars-d-announce
On 2016-01-12 01:54, Martin Nowak wrote: Makes sense https://github.com/D-Programming-Language/dub/issues/747. The compiler does check assertions in unittest blocks even in release builds, right? Yes, just verified. Actually, it doesn't matter where the assertion is placed, as long as

Re: D and C APIs

2016-01-12 Thread Atila Neves via Digitalmars-d
On Monday, 11 January 2016 at 17:25:26 UTC, Russel Winder wrote: I am guessing that people have an answer to this: D making use of a C API needs a D module adapter. This can either be constructed by hand (well it can, but…), or it can be auto generated from the C header files and then hand

Re: Anyone using DMD to build 32bit on OS X?

2016-01-12 Thread Jacob Carlborg via Digitalmars-d
On 2016-01-11 23:44, bitwise wrote: So..I've only had time to glance at the code, but it looks like you've effectively moved this issue out of the way of shared libraries entirely, and that no interaction between shared libs and TLS is needed at all..is this correct? Yes, I think so. I

Re: My LLVM talk @ FOSDEM'16

2016-01-12 Thread Kai Nacke via Digitalmars-d-announce
On Friday, 8 January 2016 at 03:13:22 UTC, Bubbasaur wrote: It will be recorded or live? Bubba. The last 2 years there was a live stream and recording. Regards, Kai

Re: Beta D 2.070.0-b1

2016-01-12 Thread Guillaume Piolat via Digitalmars-d-announce
On Tuesday, 12 January 2016 at 08:12:58 UTC, Jacob Carlborg wrote: Yes, just verified. Actually, it doesn't matter where the assertion is placed, as long as -unittest is passed. Another surprise.

Re: D and C APIs

2016-01-12 Thread John Colvin via Digitalmars-d
On Tuesday, 12 January 2016 at 10:43:40 UTC, Russel Winder wrote: On Tue, 2016-01-12 at 08:12 +, Atila Neves via Digitalmars-d wrote: On Monday, 11 January 2016 at 17:25:26 UTC, Russel Winder wrote: > I am guessing that people have an answer to this: > > D making use of a C API needs a D

[Issue 15276] Allow specification of shell for spawnShell/executeShell/pipeShell

2016-01-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15276 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/963f7e4170fd02aa07c95562f2554807a8fe9178 Issue 15276: Allow

Re: D and C APIs

2016-01-12 Thread Jacob Carlborg via Digitalmars-d
On 2016-01-12 13:13, Jacob Carlborg wrote: I assume you mean LLVM. Have you tried one from here [1]. I use the Ubuntu releases to test on Debian 7 (64bit) and 6 (32bit). -- /Jacob Carlborg

Re: Tutorials section on vibed.org

2016-01-12 Thread Suliman via Digitalmars-d
On Tuesday, 5 January 2016 at 06:42:25 UTC, Sönke Ludwig wrote: Am 05.01.2016 um 05:19 schrieb Charles: On Monday, 4 January 2016 at 18:42:32 UTC, Sönke Ludwig wrote: Am 04.01.2016 um 19:04 schrieb Pradeep Gowda: On Monday, 4 January 2016 at 14:31:21 UTC, Sönke Ludwig wrote: Added! The

Re: Setting up dmd properly

2016-01-12 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 12 January 2016 at 12:32:11 UTC, Mike Parker wrote: On Tuesday, 12 January 2016 at 08:42:19 UTC, Robert M. Münch wrote: I have seen countless problems because apps are using dynamic linking and whole IT environements getting into DLL hell. IMO one of the worst ideas these days.

Re: Setting up dmd properly

2016-01-12 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 12 January 2016 at 08:42:19 UTC, Robert M. Münch wrote: I have seen countless problems because apps are using dynamic linking and whole IT environements getting into DLL hell. IMO one of the worst ideas these days. I'm not talking about dynamic linking, but dynamic loading. This

Re: Proposal: Database Engine for D

2016-01-12 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 12 January 2016 at 12:53:29 UTC, w0rp wrote: I've played with the idea of using operator overloading for some kind of ORM before, but I don't think it's strictly necessary to use operator overloading for an ORM at all. Maybe in some cases it might make sense. The question is

Re: On Reggae [was D and C APIs]

2016-01-12 Thread Russel Winder via Digitalmars-d
On Tue, 2016-01-12 at 13:12 +, Atila Neves via Digitalmars-d wrote: > […] > You can also write build descriptions in Python with reggae BTW. Splendid. Python 3 I trust. -- Russel. = Dr Russel Winder t: +44 20

"Good PR" mechanical check

2016-01-12 Thread Andrei Alexandrescu via Digitalmars-d
Related to https://github.com/D-Programming-Language/dlang.org/pull/1191: A friend who is in the GNU community told me a while ago they have a mechanical style checker that people can run against their proposed patches to make sure the patches have a style consistent with the one enforced by

[Issue 15558] New: std.parallelism giving inscrutable error messages

2016-01-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15558 Issue ID: 15558 Summary: std.parallelism giving inscrutable error messages Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: enhancement

[Issue 15554] typedef standard type can't be used with to! properly

2016-01-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15554 gruen_tob...@web.de changed: What|Removed |Added CC||gruen_tob...@web.de --

[Issue 14511] Profiler does not work with multithreaded programs

2016-01-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14511 zotema...@gmail.com changed: What|Removed |Added Status|RESOLVED|REOPENED CC|

Re: D and C APIs

2016-01-12 Thread Russel Winder via Digitalmars-d
On Tue, 2016-01-12 at 12:56 +, bachmeier via Digitalmars-d wrote: > […] > Sorry I can't offer any help, but I'm genuinely curious by what  > you mean in this part of your quote. If the API is changing, how  > does using C++, or for that matter C, help you? Sure, you can  > include the header

Re: "Good PR" mechanical check

2016-01-12 Thread Martin Drašar via Digitalmars-d
Dne 12.1.2016 v 14:34 Andrei Alexandrescu via Digitalmars-d napsal(a): > Related to https://github.com/D-Programming-Language/dlang.org/pull/1191: > > A friend who is in the GNU community told me a while ago they have a > mechanical style checker that people can run against their proposed >

Re: D and C APIs

2016-01-12 Thread Russel Winder via Digitalmars-d
On Tue, 2016-01-12 at 13:13 +0100, Jacob Carlborg via Digitalmars-d wrote: > […] > I assume you mean LLVM. Have you tried one from here [1]. Should > work  > with LLVM 3.1 to 3.5 (at least). This is the matrix of Clang > versions  > that I use for testing [2]. > > > [1]

Re: D and C APIs

2016-01-12 Thread Russel Winder via Digitalmars-d
On Tue, 2016-01-12 at 11:05 +, John Colvin via Digitalmars-d wrote: > […] > > What's so hard about writing a few function prototypes, aliases  > and enums? It's annoying that we have to do it, but compared to  > writing the rest of a project it's always going to be a tiny  > amount of work.

Re: "Good PR" mechanical check

2016-01-12 Thread Rikki Cattermole via Digitalmars-d
On 13/01/16 2:34 AM, Andrei Alexandrescu wrote: Related to https://github.com/D-Programming-Language/dlang.org/pull/1191: A friend who is in the GNU community told me a while ago they have a mechanical style checker that people can run against their proposed patches to make sure the patches

Re: D and C APIs

2016-01-12 Thread John Colvin via Digitalmars-d
On Tuesday, 12 January 2016 at 13:24:48 UTC, Russel Winder wrote: On Tue, 2016-01-12 at 11:05 +, John Colvin via Digitalmars-d wrote: […] What's so hard about writing a few function prototypes, aliases and enums? It's annoying that we have to do it, but compared to writing the rest of a

Re: D and C APIs

2016-01-12 Thread Walter Bright via Digitalmars-d
Many times I've considered simply incorporating a C compiler into the D compiler, and then: import "stdio.h"; The perennial problem, however, is the C preprocessor and all the bizarre things people do with it in even the most mundane header files. The problem is NOT, however, implementing

Re: Anyone using glad?

2016-01-12 Thread Jason Jeffory via Digitalmars-d-learn
So, I finally got it to work by abandoning demios and static linking. Derelict + dynamic linking worked with only about a min of problems(copying the proper dll to the correct place). I'd prefer static linking but I can deal with that later. My current problem is: 1. The code doesn't work as

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread John Colvin via Digitalmars-d
On Tuesday, 12 January 2016 at 19:44:18 UTC, Fool wrote: On Tuesday, 12 January 2016 at 19:21:47 UTC, John Colvin wrote: Note that a non-reflexive <= doesn't imply anything about ==. Non-reflexive '<=' does not make any sense at all. It might be a bit of a mess, agreed, but nonetheless:

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread Fool via Digitalmars-d
On Tuesday, 12 January 2016 at 19:46:47 UTC, John Colvin wrote: On Tuesday, 12 January 2016 at 19:44:18 UTC, Fool wrote: Non-reflexive '<=' does not make any sense at all. It might be a bit of a mess, agreed, but nonetheless: assert(!(float.nan <= float.nan)); Agreed, but in case of float

Re: D and C APIs

2016-01-12 Thread bachmeier via Digitalmars-d
On Tuesday, 12 January 2016 at 16:21:40 UTC, Atla Neves wrote: In C/C++, a change to the headers causes a recompilation which will fail if there are API changes. From any other language, it'll compile, link, and fail at runtime (unless the symbols change name). If you're lucky in an obvious

opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread John Colvin via Digitalmars-d
Background: Some important properties for binary relations on sets that are somewhat similar to the normal ≤/≥ on the real numbers or integers are: a ≤ a (reflexivity); if a ≤ b and b ≤ a, then a = b (antisymmetry); if a ≤ b and b ≤ c, then a ≤ c (transitivity); a ≤ b or b ≤ a (totality,

Re: Reserved Identifiers (just making sure)

2016-01-12 Thread naptime via Digitalmars-d-learn
On Tuesday, 12 January 2016 at 17:50:45 UTC, Meta wrote: On Tuesday, 12 January 2016 at 16:20:10 UTC, naptime wrote: [...] Yes, symbols in the form of `_Foo` are not reserved in D. Only symbols beginning with two underscores, such as __traits or __gshared. Technically the different `op*`

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread Fool via Digitalmars-d
On Tuesday, 12 January 2016 at 19:21:47 UTC, John Colvin wrote: Note that a non-reflexive <= doesn't imply anything about ==. Non-reflexive '<=' does not make any sense at all.

Re: "Good PR" mechanical check

2016-01-12 Thread tsbockman via Digitalmars-d
On Tuesday, 12 January 2016 at 13:34:25 UTC, Andrei Alexandrescu wrote: [...] I realize that dfmt may need some upgrades first, but isn't it about time to just suck it up and dfmt the whole of phobos and druntime? It will mess with the "git blame", true - but it will do so *once* and end

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread John Colvin via Digitalmars-d
On Tuesday, 12 January 2016 at 18:36:32 UTC, Ilya Yaroshenko wrote: On Tuesday, 12 January 2016 at 18:27:15 UTC, John Colvin wrote: Background: Some important properties for binary relations on sets that are somewhat similar to the normal ≤/≥ on the real numbers or integers are: [...]

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread John Colvin via Digitalmars-d
On Tuesday, 12 January 2016 at 19:13:29 UTC, John Colvin wrote: On Tuesday, 12 January 2016 at 19:00:11 UTC, Andrei Alexandrescu wrote: On 01/12/2016 01:27 PM, John Colvin wrote: Preorder or partial order: not possible in D, opCmp insists on totality. The way I look at it, a partial order

Re: Setting up dmd properly

2016-01-12 Thread Jason Jeffory via Digitalmars-d-learn
On Tuesday, 12 January 2016 at 08:42:19 UTC, Robert M. Münch wrote: On 2016-01-12 04:15:36 +, Mike Parker said: You can avoid all of these headaches by using dynamic bindings like those at DerelictOrg [4] if they are available for the libraries you use. Then the compile-time dependency on

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread tsbockman via Digitalmars-d
On Tuesday, 12 January 2016 at 18:27:15 UTC, John Colvin wrote: P.S. This is not just about floats! This also affects any custom numeric type which should be comparable with float - while working on a checked integer type for Phobos, one of the (minor) problems I have run into is that it is

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread Andrei Alexandrescu via Digitalmars-d
On 01/12/2016 02:13 PM, John Colvin wrote: a<=b and b<=a must also be false. Would the advice "Only use < and == for partially-ordered data" work? -- Andrei

If Java Were Designed Today: The Synchronizable Interface

2016-01-12 Thread rsw0x via Digitalmars-d
http://blog.jooq.org/2016/01/12/if-java-were-designed-today-the-synchronizable-interface/ D's synchronized classes and statements are (AFAIK) very similar to Java's so I thought this might spark an interesting discussion.

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread Ilya Yaroshenko via Digitalmars-d
On Tuesday, 12 January 2016 at 18:27:15 UTC, John Colvin wrote: Background: Some important properties for binary relations on sets that are somewhat similar to the normal ≤/≥ on the real numbers or integers are: [...] http://dlang.org/phobos/std_math.html#.cmp ? --Ilya

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread tsbockman via Digitalmars-d
On Tuesday, 12 January 2016 at 20:56:41 UTC, John Colvin wrote: Please consider the second design I proposed? It's small, simple, has no impact on existing code and works in the right direction (library types can emulate / act as replacements for builtins) as opposed to the other way (library

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread Fool via Digitalmars-d
On Tuesday, 12 January 2016 at 21:06:40 UTC, John Colvin wrote: On Tuesday, 12 January 2016 at 19:50:57 UTC, Fool wrote: By the way, that implies that the result of sorting an array of float by default comparison is undefined unless the array does not contain NaN. Didn't think of that.

Re: "Good PR" mechanical check

2016-01-12 Thread Sebastiaan Koppe via Digitalmars-d
On Tuesday, 12 January 2016 at 21:04:33 UTC, Jacob Carlborg wrote: On 2016-01-12 15:53, Adam D. Ruppe wrote: I'm not sure if git supports this but I think it should be done fully automatically. Not even something the user runs, just when they open the pull request, it reformats the code.

Re: Official Announcement: 'Learning D' is Released

2016-01-12 Thread jmh530 via Digitalmars-d-announce
On Tuesday, 12 January 2016 at 21:10:28 UTC, John Colvin wrote: When you want to have control over the process of loading a library e.g. if you want it to be an optional dependency at runtime. I've seen the example in the book. I'm just not sure why you would want an optional runtime

Re: Official Announcement: 'Learning D' is Released

2016-01-12 Thread John Colvin via Digitalmars-d-announce
On Tuesday, 12 January 2016 at 20:32:57 UTC, jmh530 wrote: I'm not sure when you would want to use dynamic bindings. When you want to have control over the process of loading a library e.g. if you want it to be an optional dependency at runtime.

[Issue 15560] New: is expression with template parameter list and fqn fails

2016-01-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15560 Issue ID: 15560 Summary: is expression with template parameter list and fqn fails Product: D Version: D2 Hardware: All OS: All Status: NEW

Declaring extern(C) declarations with template mixins

2016-01-12 Thread Jacob Carlborg via Digitalmars-d-learn
Is this supposed to work: template Foo() { extern(C) int printf(in char*, ...); } mixin Foo; void main() { printf("foo\n"); } It fails with a linker error, undefined symbol, due to not applying C mangling: Undefined symbols for architecture x86_64:

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread John Colvin via Digitalmars-d
On Tuesday, 12 January 2016 at 21:12:08 UTC, tsbockman wrote: On Tuesday, 12 January 2016 at 20:56:41 UTC, John Colvin wrote: Please consider the second design I proposed? It's small, simple, has no impact on existing code and works in the right direction (library types can emulate / act as

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread Timon Gehr via Digitalmars-d
On 01/12/2016 10:02 PM, John Colvin wrote: On Tuesday, 12 January 2016 at 20:52:51 UTC, Timon Gehr wrote: On 01/12/2016 07:27 PM, John Colvin wrote: ... struct S{ auto opCmp(S rhs){ return float.nan; } bool opEquals(S rhs){ return false; } } unittest{ S a,b;

Re: Declaring extern(C) declarations with template mixins

2016-01-12 Thread Mathias Lang via Digitalmars-d-learn
On Tuesday, 12 January 2016 at 21:22:46 UTC, Jacob Carlborg wrote: Is this supposed to work: template Foo() { extern(C) int printf(in char*, ...); } mixin Foo; void main() { printf("foo\n"); } It fails with a linker error, undefined symbol, due to not applying C mangling:

Re: Anyone using DMD to build 32bit on OS X?

2016-01-12 Thread Walter Bright via Digitalmars-d
On 1/12/2016 12:36 PM, Andrei Alexandrescu wrote: On 01/12/2016 03:30 PM, Jacob Carlborg wrote: On 2016-01-12 17:48, Walter Bright wrote: From reading the responses here, I believe the best solution is to continue to support OSX 32 bit, but as legacy support. This means folding in changes to

Scale-Hierarchy on ndslice

2016-01-12 Thread Per Nordlöw via Digitalmars-d-learn
Have anybody been thinking about adding a scale-hierarchy structure on top of ndslice? I need this to implementing some cool signal/image processing algorithms in D. When processing an image this structure is called a Mipmap.

Re: Official Announcement: 'Learning D' is Released

2016-01-12 Thread John Colvin via Digitalmars-d-announce
On Tuesday, 12 January 2016 at 22:00:32 UTC, jmh530 wrote: On Tuesday, 12 January 2016 at 21:10:28 UTC, John Colvin wrote: When you want to have control over the process of loading a library e.g. if you want it to be an optional dependency at runtime. I've seen the example in the book. I'm

Re: D and C APIs

2016-01-12 Thread Atila Neves via Digitalmars-d
On Tuesday, 12 January 2016 at 10:43:40 UTC, Russel Winder wrote: On Tue, 2016-01-12 at 08:12 +, Atila Neves via Digitalmars-d wrote: On Monday, 11 January 2016 at 17:25:26 UTC, Russel Winder wrote: > [...] This is the kind of thing I wrote reggae for. CMake is an alternative, but I'd

Re: Proposal: Database Engine for D

2016-01-12 Thread w0rp via Digitalmars-d
I've played with the idea of using operator overloading for some kind of ORM before, but I don't think it's strictly necessary to use operator overloading for an ORM at all. Maybe in some cases it might make sense. I don't think the answer for building such a thing is to think of one idea,

Re: Setting up dmd properly

2016-01-12 Thread Jacob Carlborg via Digitalmars-d-learn
On 2016-01-11 02:22, Jason Jeffory wrote: Dmd's setup construction is a bit weird and has some difficult issue tracking. How about if dmd supported, if it already doesn't, some ways to help the user check the configuration of dmd. It would be quick and easy to implement. e.g., dmd -showinfo

Re: D and C APIs

2016-01-12 Thread Russel Winder via Digitalmars-d
On Mon, 2016-01-11 at 21:42 +, stew via Digitalmars-d wrote: > […] > At work we use CMake and have a target for this. The DStep target  > is invoked whenever the C headers change. We also use SWIG this  > way. Both tools often require some hand-massaging though. […] I tried downloading

Re: D and C APIs

2016-01-12 Thread Russel Winder via Digitalmars-d
On Tue, 2016-01-12 at 08:12 +, Atila Neves via Digitalmars-d wrote: > On Monday, 11 January 2016 at 17:25:26 UTC, Russel Winder wrote: > > I am guessing that people have an answer to this: > > > > D making use of a C API needs a D module adapter. This can  > > either be constructed by hand

Re: D and C APIs

2016-01-12 Thread Jacob Carlborg via Digitalmars-d
On 2016-01-12 11:39, Russel Winder via Digitalmars-d wrote: I tried downloading pre-built Linux DStep, but it requires an .so link that doesn't exist on Debian Sid or Fedora Rawhide. I hacked something and DStep segfaulted. I assume you mean LLVM. Have you tried one from here [1]. Should work

Re: D and C APIs

2016-01-12 Thread bachmeier via Digitalmars-d
On Tuesday, 12 January 2016 at 10:43:40 UTC, Russel Winder wrote: D and Rust provide so many barriers to effective use of a C library, that I am resorting to using C++. Yes you have to do extra stuff to avoid writing C code, but nowhere near the amount you have to to create D and Rust

Re: D and C APIs

2016-01-12 Thread Atila Neves via Digitalmars-d
On Tuesday, 12 January 2016 at 11:05:38 UTC, John Colvin wrote: On Tuesday, 12 January 2016 at 10:43:40 UTC, Russel Winder wrote: On Tue, 2016-01-12 at 08:12 +, Atila Neves via Digitalmars-d wrote: On Monday, 11 January 2016 at 17:25:26 UTC, Russel Winder wrote: > [...] This is the kind

is expression with template parameter list

2016-01-12 Thread Jacob Carlborg via Digitalmars-d-learn
The following example compiles work as expected: import std.stdio; import std.typecons; void main() { Nullable!(int) a; static if(is(typeof(a) == Nullable!(U), U)) writeln("true"); else writeln("false"); } But if I use the fully qualified name in the condition,

[Issue 15559] New: std.datetime.benchmark should offer a tear down option

2016-01-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15559 Issue ID: 15559 Summary: std.datetime.benchmark should offer a tear down option Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: [dlang.org] getting the redesign wrapped up

2016-01-12 Thread anonymous via Digitalmars-d
On 12.01.2016 08:24, Vladimir Panteleev wrote: > Nice. Is it responsive? As responsive as the main site. I just updated the dlang.org submodule and fixed what got broken. I'm mostly done now. Pull request is over here: https://github.com/CyberShadow/DFeed/pull/51

Re: Official Announcement: 'Learning D' is Released

2016-01-12 Thread jmh530 via Digitalmars-d-announce
On Sunday, 27 December 2015 at 17:21:24 UTC, Mike Parker wrote: Thanks guys! That kind of feedback is a good Christmas present :) I'm working through the book now. I'm liking it. I'm on Chapter 9, which has the Connecting D with C material. At the beginning of the chapter you define some

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread Timon Gehr via Digitalmars-d
On 01/12/2016 07:27 PM, John Colvin wrote: ... struct S{ auto opCmp(S rhs){ return float.nan; } bool opEquals(S rhs){ return false; } } unittest{ S a,b; assert(!(a==b)); assert(!(ab)); assert(!(a>=b)); }

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread John Colvin via Digitalmars-d
On Tuesday, 12 January 2016 at 20:04:26 UTC, Andrei Alexandrescu wrote: On 01/12/2016 03:01 PM, John Colvin wrote: On Tuesday, 12 January 2016 at 19:28:36 UTC, Andrei Alexandrescu wrote: On 01/12/2016 02:13 PM, John Colvin wrote: a<=b and b<=a must also be false. Would the advice "Only use

Re: Tutorials section on vibed.org

2016-01-12 Thread Ilya via Digitalmars-d
On Monday, 4 January 2016 at 09:53:45 UTC, Sönke Ludwig wrote: I've just added a sub page on vibed.org to collect links to all existing vibe.d tutorials [1]. If you know of any additional ones, or would like to have an existing one removed, please leave a quick comment:

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread John Colvin via Digitalmars-d
On Tuesday, 12 January 2016 at 20:52:51 UTC, Timon Gehr wrote: On 01/12/2016 07:27 PM, John Colvin wrote: ... struct S{ auto opCmp(S rhs){ return float.nan; } bool opEquals(S rhs){ return false; } } unittest{ S a,b; assert(!(a==b)); assert(!(a

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread John Colvin via Digitalmars-d
On Tuesday, 12 January 2016 at 20:52:51 UTC, Timon Gehr wrote: On 01/12/2016 07:27 PM, John Colvin wrote: ... struct S{ auto opCmp(S rhs){ return float.nan; } bool opEquals(S rhs){ return false; } } unittest{ S a,b; assert(!(a==b)); assert(!(a

Re: "Good PR" mechanical check

2016-01-12 Thread Jacob Carlborg via Digitalmars-d
On 2016-01-12 15:53, Adam D. Ruppe wrote: I'm not sure if git supports this but I think it should be done fully automatically. Not even something the user runs, just when they open the pull request, it reformats the code. The hook/tool would need to do a commit with the changes. How would

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread Fool via Digitalmars-d
On Tuesday, 12 January 2016 at 20:25:25 UTC, Andrei Alexandrescu wrote: D uses !(b < a) for a <= b. We can invent notation to disallow that rewrite. Anyhow the use of <, >, <=, and >= for partially ordered types is bound to be less than smooth. Math papers and books often use other notations

Re: Setting up dmd properly

2016-01-12 Thread Jason Jeffory via Digitalmars-d-learn
On Tuesday, 12 January 2016 at 20:38:50 UTC, Laeeth Isharc wrote: On Tuesday, 12 January 2016 at 19:38:32 UTC, Jason Jeffory wrote: It seems the whole state of affairs in programming is "Lets do the most minimal work to get X to work in environment Y. To hell with everything else!". The

Re: Setting up dmd properly

2016-01-12 Thread Jason Jeffory via Digitalmars-d-learn
(I should mention that I am exaggerating a bit, and some of the complaints about D are actually more directed to the programming community in general. D has the same fundamental issues though and it is just a matter of scale. Programming is way more fun when you are actually programming and

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread Andrei Alexandrescu via Digitalmars-d
On 01/12/2016 03:10 PM, Fool wrote: On Tuesday, 12 January 2016 at 20:04:26 UTC, Andrei Alexandrescu wrote: I'd be in favor of giving people the option to disable the use of <= and >= for specific data. It's a simple and logical approach. -- Andrei But doesn't the symbol <= originate from

Re: Anyone using glad?

2016-01-12 Thread Dav1d via Digitalmars-d-learn
On Tuesday, 12 January 2016 at 19:16:51 UTC, Jason Jeffory wrote: So, I finally got it to work by abandoning demios and static linking. Derelict + dynamic linking worked with only about a min of problems(copying the proper dll to the correct place). I'd prefer static linking but I can deal

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread John Colvin via Digitalmars-d
On Tuesday, 12 January 2016 at 19:50:57 UTC, Fool wrote: On Tuesday, 12 January 2016 at 19:48:35 UTC, Fool wrote: On Tuesday, 12 January 2016 at 19:46:47 UTC, John Colvin wrote: On Tuesday, 12 January 2016 at 19:44:18 UTC, Fool wrote: Non-reflexive '<=' does not make any sense at all. It

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread Fool via Digitalmars-d
On Tuesday, 12 January 2016 at 19:48:35 UTC, Fool wrote: On Tuesday, 12 January 2016 at 19:46:47 UTC, John Colvin wrote: On Tuesday, 12 January 2016 at 19:44:18 UTC, Fool wrote: Non-reflexive '<=' does not make any sense at all. It might be a bit of a mess, agreed, but nonetheless:

Re: "Good PR" mechanical check

2016-01-12 Thread Mathias Lang via Digitalmars-d
On Tuesday, 12 January 2016 at 13:34:25 UTC, Andrei Alexandrescu wrote: Related to https://github.com/D-Programming-Language/dlang.org/pull/1191: A friend who is in the GNU community told me a while ago they have a mechanical style checker that people can run against their proposed patches

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread John Colvin via Digitalmars-d
On Tuesday, 12 January 2016 at 19:28:36 UTC, Andrei Alexandrescu wrote: On 01/12/2016 02:13 PM, John Colvin wrote: a<=b and b<=a must also be false. Would the advice "Only use < and == for partially-ordered data" work? -- Andrei If by that you mean "Only use <= or >= on data that defines a

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread Andrei Alexandrescu via Digitalmars-d
On 01/12/2016 03:01 PM, John Colvin wrote: On Tuesday, 12 January 2016 at 19:28:36 UTC, Andrei Alexandrescu wrote: On 01/12/2016 02:13 PM, John Colvin wrote: a<=b and b<=a must also be false. Would the advice "Only use < and == for partially-ordered data" work? -- Andrei If by that you

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread Fool via Digitalmars-d
On Tuesday, 12 January 2016 at 20:04:26 UTC, Andrei Alexandrescu wrote: I'd be in favor of giving people the option to disable the use of <= and >= for specific data. It's a simple and logical approach. -- Andrei But doesn't the symbol <= originate from ORing < and = ?

Re: opCmp, [partial/total/pre]orders, custom floating point types etc.

2016-01-12 Thread Fool via Digitalmars-d
On Tuesday, 12 January 2016 at 20:10:11 UTC, Fool wrote: But doesn't the symbol <= originate from ORing < and = ? '=' in the mathematical sense.

Re: Anyone using DMD to build 32bit on OS X?

2016-01-12 Thread Jacob Carlborg via Digitalmars-d
On 2016-01-12 17:48, Walter Bright wrote: From reading the responses here, I believe the best solution is to continue to support OSX 32 bit, but as legacy support. This means folding in changes to the 64 bit support, but not adding features if they are not a natural consequence of the 64 bit

  1   2   >