Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-14 Thread Dominikus Dittes Scherkl via Digitalmars-d
[about leaving the syntax as it is, only extend the import to include the previous (declaration) line] On Wednesday, 14 December 2016 at 21:21:39 UTC, Jonathan M Davis wrote: It also doesn't work with function prototypes. With the proposed syntax, you can do int foo(SysTime st)

Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-14 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Tuesday, 13 December 2016 at 22:33:24 UTC, Andrei Alexandrescu wrote: Destroy. https://github.com/dlang/DIPs/pull/51/files Why not leave it as it is and only change the compiler to perform inputs _within_ a function before evaluating the declaration, so that the symbols imported can be

Re: CTFE Status

2016-12-05 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Monday, 5 December 2016 at 08:07:11 UTC, ketmar wrote: On Monday, 5 December 2016 at 07:55:32 UTC, deadalnix wrote: On Monday, 5 December 2016 at 04:26:35 UTC, Stefan Koch wrote: I just improved the handling of void initializations. Now the code is less pessimistic and will allow them if

Re: Bot creating issues

2016-11-25 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Friday, 25 November 2016 at 17:27:07 UTC, Dominikus Dittes Scherkl wrote: Hm. There seem to be some bot generating a lot of new Issues in the D bugzilla. Or is that intentional?!? It started 3 days ago, but becomming increasingly frequent - at the moment every twenty minutes a new one

Bot creating issues

2016-11-25 Thread Dominikus Dittes Scherkl via Digitalmars-d
Hm. There seem to be some bot generating a lot of new Issues in the D bugzilla. Or is that intentional?!?

Re: Fun: Shooting yourself in the foot in D

2016-10-28 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Friday, 28 October 2016 at 11:41:11 UTC, John Colvin wrote: You unregister your feet from the runtime in order to move smoothly, wander in front of a bullet that's paused by the GC, which then un-pauses and hits you in the foot. This is the best one so far! This is typical D: circumvent

Re: core.intrinsics

2016-10-13 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Thursday, 13 October 2016 at 19:52:57 UTC, Stefan Koch wrote: On Thursday, 13 October 2016 at 19:49:42 UTC, Johan Engelen wrote: On Thursday, 13 October 2016 at 19:35:08 UTC, Stefan Koch wrote: Please share your thoughts and tell me what other intrinsic functions could/should be added.

Re: Overloading relational operators separately; thoughts?

2016-09-30 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Friday, 30 September 2016 at 09:55:36 UTC, pineapple wrote: On Friday, 30 September 2016 at 00:50:54 UTC, Jonathan M Davis wrote: Except that it kind of is. It's an example of a language allowing you to mess with too much and make it so that it doesn't function as expected, which is what

Re: ddoc latex/formulas?

2016-09-15 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Wednesday, 14 September 2016 at 13:56:26 UTC, jmh530 wrote: I learned Latex by playing with LyX. You can get things looking how you want pretty easily. When you copy some code from LyX and paste it somewhere else, the output is the Latex code you need. I do this somewhat frequently because

Re: Simplifying conversion and formatting code in Phobos

2016-09-09 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Thursday, 8 September 2016 at 23:34:13 UTC, Walter Bright wrote: On 9/8/2016 5:10 AM, Andrei Alexandrescu wrote: Consider the pattern of overloads: template foo(T) if (condition!T) { } template foo(T) if (!condition!T) { } It makes condition!T a user-facing constraint, which it

Re: Quality of errors in DMD

2016-09-05 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Sunday, 4 September 2016 at 20:14:37 UTC, Walter Bright wrote: On 9/4/2016 10:56 AM, David Nadlinger wrote: The bug report I need is the assert location, and a test case that causes it. Users do not need to supply any other information. So, if we assume the user cannot debug if he hit an

Re: Fallback 'catch-all' template functions

2016-09-01 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Thursday, 1 September 2016 at 10:53:01 UTC, Ethan Watson wrote: On Thursday, 1 September 2016 at 10:43:50 UTC, Dominikus Dittes Scherkl wrote: I have never seen what benefit could be gained from having overloads. Oh, it's perfectly fine if you're not writing a library that's designed to

Re: Fallback 'catch-all' template functions

2016-09-01 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Thursday, 1 September 2016 at 10:43:50 UTC, Dominikus Dittes Scherkl wrote: I have never seen what benefit could be gained from having overloads. I think they are a relict from languages without static if. I mean, overloads with same function signature except for the condition. Of course

Re: Fallback 'catch-all' template functions

2016-09-01 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Thursday, 1 September 2016 at 05:37:50 UTC, Manu wrote: So, consider a set of overloads: void f(T)(T t) if(isSomething!T) {} void f(T)(T t) if(isSomethingElse!T) {} void f(T)(T t) {} I have a recurring problem where I need a fallback function like the bottom one, which should be used

Re: Allows the use of part of the language keywords?

2016-08-29 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Sunday, 28 August 2016 at 13:35:59 UTC, ketmar wrote: it has nothing to do with compiler: parser skips comments when peeking tokens. the only thing affected is simplistic syntax highlighter that can't do proper lookup. I have anyway never seen the necessity of the keyword "body" anyway. I

Re: Battle-plan for CTFE

2016-08-29 Thread Dominikus Dittes Scherkl via Digitalmars-d-announce
On Monday, 29 August 2016 at 00:24:01 UTC, Stefan Koch wrote: I feel that this can have a positive impact on the whole of dmd, since that will allow better frontend-optimisations. I am happy for all comments or suggestions. The work you are doing is just awesome! Many thanks.

Re: C# 7 Features - Tuples

2016-08-25 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Thursday, 25 August 2016 at 13:41:29 UTC, dom wrote: https://blogs.msdn.microsoft.com/dotnet/2016/08/24/whats-new-in-csharp-7-0/ came across the new c# features today. I really liked the syntax for Tuples (and deconstructors), would be great to have a similar syntax in D :) Pretty

Re: [OT] The coolest (literally) desktop machine I've ever had

2016-08-15 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Sunday, 14 August 2016 at 23:51:44 UTC, Jonathan M Davis wrote: On Friday, August 12, 2016 15:13:12 Andrei Alexandrescu via Digitalmars-d wrote: Thought this might help others looking for a fanless dekstop. You don't have to go fanless to have a quiet computer, but there are other pros

Re: core.checkedint

2016-06-24 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Friday, 24 June 2016 at 17:25:32 UTC, Dominikus Dittes Scherkl wrote: I have a save exponentiation function (+ two helper functions that may also be useful on their own): Ah, and I use a better abs() function: /// get the absolute value of x as unsigned type. always succeeds, even for

Re: core.checkedint

2016-06-24 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Friday, 24 June 2016 at 16:56:36 UTC, Andrei Alexandrescu wrote: There are a few simple enhancements to add to core.checkedint: 1. No need for different names (addu/adds) etc., overloading should take care of it (simplifies caller code). Right now the API is an odd mix of overloading and

Re: static if enhancement

2016-06-24 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Friday, 24 June 2016 at 17:03:55 UTC, JohnnyC wrote: On Friday, 24 June 2016 at 15:29:18 UTC, Steven Schveighoffer wrote: On 6/24/16 11:24 AM, Andrei Alexandrescu wrote: Does anyone else find this annoying? https://issues.dlang.org/show_bug.cgi?id=16201 -- Andrei Maybe. That bug report

Re: Areas of D usage

2016-06-17 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Wednesday, 15 June 2016 at 20:01:09 UTC, Seb wrote: http://dlang.org/areas-of-d-usage.html Really nice! I think D can use a little evangelizing very well. One bug in GPU Programming: "Thanks to the power the power of D’s type system..." ^

Re: Checking if an Integer is an Exact Binary Power

2016-04-25 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Monday, 25 April 2016 at 15:27:02 UTC, Xinok wrote: On Monday, 25 April 2016 at 12:56:27 UTC, Andrei Alexandrescu wrote: On 4/25/16 6:42 AM, Solomon E wrote: On Monday, 25 April 2016 at 05:35:12 UTC, Andrei Alexandrescu wrote: With gdc https://godbolt.org/g/jcU4np isPow2B is the winner

Re: final switch and straight integers

2016-04-21 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Wednesday, 20 April 2016 at 17:42:03 UTC, Basile Burg wrote: On Wednesday, 20 April 2016 at 10:19:17 UTC, Dominikus Dittes Scherkl wrote: Anyway, something need to be changed. a) allow Range Cases (nice for ints but bad idea for enums) b) require also non-enum types to explicitly state all

Re: final switch and straight integers

2016-04-20 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Wednesday, 20 April 2016 at 07:23:09 UTC, Bastiaan Veelo wrote: On Wednesday, 20 April 2016 at 07:18:55 UTC, Bastiaan Veelo wrote: On Wednesday, 20 April 2016 at 06:36:01 UTC, bearophile wrote: Dominikus Dittes Scherkl: final switch makes no sense on things that are not enumerated. Even

Re: final switch and straight integers

2016-04-19 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Tuesday, 19 April 2016 at 22:04:21 UTC, Stefan Koch wrote: On Tuesday, 19 April 2016 at 14:53:18 UTC, Steven Schveighoffer wrote: or we should do away with requiring handling all enum cases. Are you suggesting getting rid of final switch ? No - I think he suggests to error out if

Re: Why is this not a warning?

2016-03-19 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Thursday, 17 March 2016 at 09:13:34 UTC, tsbockman wrote: On Thursday, 17 March 2016 at 06:55:34 UTC, Shachar Shemesh wrote: On 16/03/16 23:50, tsbockman wrote: On Wednesday, 16 March 2016 at 16:40:49 UTC, Shachar Shemesh wrote: ... People who are marginally familiar with integer

Re: Problem running code examples in the Home page

2016-03-03 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Thursday, 3 March 2016 at 05:24:26 UTC, Mike Parker wrote: On Thursday, 3 March 2016 at 05:09:17 UTC, mahdi wrote: When I click on "Run" I have the text "Running..." inside the box and nothing happens. I don't know if this is a problem with the code or the website but can someone please

Re: C++ UFCS update

2016-02-23 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Tuesday, 23 February 2016 at 20:35:16 UTC, Ola Fosheim Grøstad wrote: The primary issue I have with iostream is that floating point formatting gets ugly. The "<<" works out ok for iostream in practice, mostly because it is not common to do bit-shifts in combination with IO. stdout <<

Re: Weird issue with std.range.iota.length

2016-02-15 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Sunday, 14 February 2016 at 13:16:58 UTC, Jonathan M Davis wrote: On Sunday, 14 February 2016 at 10:59:41 UTC, w0rp wrote: Maybe I'm missing something, but can't the length just be size_t? I doubt there is much you could do with code which generates finite sequences larger than the

Re: IDE - Coedit 2 rc1

2016-02-07 Thread Dominikus Dittes Scherkl via Digitalmars-d-announce
On Monday, 8 February 2016 at 07:05:15 UTC, Suliman wrote: Cool! Thanks! But do you have any plans to reimplement it from Pascal to В to get it's more native... B? What is B?

Re: Website contains a virus?

2016-01-21 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Thursday, 21 January 2016 at 18:51:34 UTC, sclytrack wrote: On Thursday, 21 January 2016 at 18:46:15 UTC, Dominikus Dittes Scherkl wrote: Hi. I'm using Norton Security from Symantec, and it claims that the current compiler dmd-2.069.2.exe is infected with the "Trojan.Gen.2". Not a

Website contains a virus?

2016-01-21 Thread Dominikus Dittes Scherkl via Digitalmars-d
Hi. I'm using Norton Security from Symantec, and it claims that the current compiler dmd-2.069.2.exe is infected with the "Trojan.Gen.2". Not a particularly harmful virus, but nevertheless I hope that's not true or you can fix that rather soon!

Re: Website contains a virus?

2016-01-21 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Thursday, 21 January 2016 at 19:23:50 UTC, Walter Bright wrote: On 1/21/2016 10:46 AM, Dominikus Dittes Scherkl wrote: I'm using Norton Security from Symantec, and it claims that the current compiler dmd-2.069.2.exe is infected with the "Trojan.Gen.2". Not a particularly harmful virus, but

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: Comparison operator overloading

2015-12-07 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Monday, 7 December 2015 at 13:31:52 UTC, Mike Parker wrote: On Monday, 7 December 2015 at 11:49:51 UTC, Dominikus Dittes Scherkl wrote: On the other hand the chapter also states that opCmp() should always return "int" - which is a bad idea if you e.g. want to provide a "NaN" value in your

Re: Comparison operator overloading

2015-12-07 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Sunday, 6 December 2015 at 15:01:08 UTC, cym13 wrote: Don't use opCmp, all binary operators should be overriden using opBinary. For more information I recommend this page http://ddili.org/ders/d.en/operator_overloading.html Why should we don't use opCmp() ? I can't see any recommendation

Re: Is D ready for quants?

2015-11-30 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Monday, 30 November 2015 at 04:16:10 UTC, Saurabh Das wrote: On Monday, 30 November 2015 at 04:06:07 UTC, Jack Stouffer wrote: This sounds interesting! Would you be willing to write a blog post on your experiences with this, or even better give a talk a DConf ;)? I definitely want to

Re: Proof of concept/proposal: reference counted closures/delegates

2015-11-11 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Wednesday, 11 November 2015 at 01:27:46 UTC, Jakob Ovrum wrote: Any thoughts? Cool!

Re: Difference between input range and forward range

2015-11-11 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Tuesday, 10 November 2015 at 18:57:31 UTC, Steven Schveighoffer wrote: IMO, that shouldn't be a forward range. But in any case, the correct mechanism is: forward range -> a = b works and makes a copy of the iteration. non-forward range -> a = b fails, you'd have to use a = b.getRef or

Re: Preventing implicit conversion

2015-11-05 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Thursday, 5 November 2015 at 09:33:40 UTC, ixid wrote: In C++ I can add two shorts together without having to use a cast to assign the result to one of the two shorts. It just seems super clunky not to be able to do basic operations on basic types without casts everywhere. +1 If

Re: Preventing implicit conversion

2015-11-05 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
And I want to have small number litterals automatically choosing the smallest fitting type. If I write ubyte b = 1u; auto c = b + 1u; I expect the 1u to be of type ubyte - and also c.

Re: Preventing implicit conversion

2015-11-05 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Thursday, 5 November 2015 at 13:23:34 UTC, Adam D. Ruppe wrote: On Thursday, 5 November 2015 at 10:07:30 UTC, Dominikus Dittes Scherkl wrote: ubyte b = 1u; auto c = b + 1u; I expect the 1u to be of type ubyte - and also c. This won't work because of the one-expression rule. In the

Re: Preventing implicit conversion

2015-11-05 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Thursday, 5 November 2015 at 22:15:46 UTC, Dominikus Dittes Scherkl wrote: On Thursday, 5 November 2015 at 13:23:34 UTC, Adam D. Ruppe wrote: On Thursday, 5 November 2015 at 10:07:30 UTC, Dominikus Dittes Scherkl wrote: ubyte d = b + (ubyte)1; Sorry, should of course be: ubyte d = b +

Re: Phobos still being statically linked in?

2015-10-20 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Sunday, 18 October 2015 at 16:02:50 UTC, Jacob Carlborg wrote: On 2015-10-17 13:28, Marc Schütz wrote: Yes, it's still linked statically by default, at least with DMD. I don't know why this wasn't changed yet 1. It makes it easier to distribute binaries since most computers won't have a

Re: foreach loop

2015-10-19 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Monday, 19 October 2015 at 14:28:06 UTC, Namal wrote: Is it possible to create a foreach loop with a breakstetemen? I mean something like that for the second loop where i want to break if element from: int [] g = [9,15,21]; int [] v = [2,3,5,7,8,9,11,13,17,19]; foreach(j;1..10) for(int

Re: Bug? 0 is less than -10

2015-10-08 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Wednesday, 7 October 2015 at 16:25:02 UTC, Marc Schütz wrote: Lionello Lunesu posted a PR that should fix this: https://github.com/D-Programming-Language/dmd/pull/1913 See also the discussion in the linked bug report. Unfortunately it seems it's been forgotten since then... Meanwhile I

Re: building Windows kernel-mode drivers in D

2015-09-25 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Friday, 25 September 2015 at 15:17:02 UTC, Cauterite wrote: [...] mydriver.d : pragma(startaddress, DriverEntry); extern(Windows) int DriverEntry(void*, void*) {return 0;}; build.cmd : dmd -L/exetype:nt -L/subsystem:native -ofmydriver.sys mydriver.d checksum.exe

Re: A collection of DIPs

2015-09-09 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Tuesday, 8 September 2015 at 17:07:50 UTC, NX wrote: And, can somebody show me a working example code of how to solve that friend class problem without some horrible hacktic way and agressive template/mixin stuff ? (I doubt it can solved via templates but anyway...) Why would you ever need

Re: What's the "right" way to do openmp-style parallelism?

2015-09-08 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Tuesday, 8 September 2015 at 05:50:30 UTC, Russel Winder wrote: void main() { immutable imax = 10; immutable jmax = 10; float[imax][jmax] x; foreach(int j; 1..jmax){ foreach(int i, ref item; parallel(x[j-1])){ x[j][i] = complicatedFunction(i,

Re: Why 1f.iota(100f).array returns double[] not float[]?

2015-09-08 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Tuesday, 8 September 2015 at 07:17:01 UTC, Ali Çehreli wrote: https://github.com/D-Programming-Language/phobos/blob/master/std/range/package.d#L4630 auto iota(B, E)(B begin, E end) if (isFloatingPoint!(CommonType!(B, E))) { return iota(begin, end, 1.0); } Such kind of stuff would

Re: Prefer Signed or Unsigned in D?

2015-09-02 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Wednesday, 2 September 2015 at 09:47:16 UTC, BBasile wrote: On Tuesday, 1 September 2015 at 23:06:50 UTC, John Carter wrote: C/C++ discussion here http://blog.robertelder.org/signed-or-unsigned-part-2/ D rules here... http://dlang.org/type.html#integer-promotions It depends on

Re: Possible solution for export : `unittest export`?

2015-09-02 Thread Dominikus Dittes Scherkl via Digitalmars-d
What I meant is, of course you cannot test everything with unittest. It has a reason that there exist other types of test. But that should not hold anybody back from unit-testing as much as possible. If nothing else this is useful because unit-tests are by far the cheapest tests. And within a

Re: Possible solution for export : `unittest export`?

2015-09-02 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Tuesday, 1 September 2015 at 19:42:51 UTC, deadalnix wrote: On Tuesday, 1 September 2015 at 18:25:06 UTC, H. S. Teoh wrote: That would explain why GUI apps tend to be buggy and unreliable, and RNGs tend to have unintended biases. No, actually, GUIs should be written to be testable (e.g.,

Re: Possible solution for export : `unittest export`?

2015-09-01 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Tuesday, 1 September 2015 at 12:55:11 UTC, Benjamin Thaut wrote: While your proposal sounds interresting to start with I don't like some of the implications: 1) You force people to write unittest. If people don't write a export unittest block their templates won't work across shared

Re: observation: D getting a bit complex

2015-08-30 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Sunday, 30 August 2015 at 07:36:55 UTC, BBasile wrote: On Sunday, 30 August 2015 at 02:42:30 UTC, Spacen Jasset wrote: immutable(ElementEncodingType!(ElementType!Range))[] buildPath(Range)(Range segments) if (isInputRange!Range isSomeString!(ElementType!Range)); pure nothrow @safe

Re: Why does not my program is not running?

2015-08-21 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Thursday, 20 August 2015 at 21:15:36 UTC, anonymous2 wrote: On Thursday, 20 August 2015 at 21:11:07 UTC, anonymous wrote: I severely limited the range of integer. I don't know off the top of my head how large you can make it without hitting overflow. I removed the file writing, because

Re: Problem with dmd 2.068 Win 32

2015-08-11 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Tuesday, 11 August 2015 at 15:04:29 UTC, MGW wrote: Hi! My project has an error link: Error 42: Symbol Undefined _D6object9Exception6__ctorMFNaNbNfAyaAyakC6object9ThrowableZC9Exception On dmd 2.067.* everything gathered without mistakes. Where to look for a mistake? See the changelog.

Re: Release D 2.068.0

2015-08-10 Thread Dominikus Dittes Scherkl via Digitalmars-d-announce
On Monday, 10 August 2015 at 13:09:16 UTC, anonymous wrote: On Monday, 10 August 2015 at 12:24:36 UTC, Dominikus Dittes Scherkl wrote: Congrats, but why are there still 6 Regressions / 34 Blockers open in Bugzilla? At least with the one that opens from the main D page /resouces/bugtracker. Is

Re: Release D 2.068.0

2015-08-10 Thread Dominikus Dittes Scherkl via Digitalmars-d-announce
On Monday, 10 August 2015 at 10:02:38 UTC, ZombineDev wrote: On Monday, 10 August 2015 at 08:48:52 UTC, Martin Nowak wrote: Glad to announce D 2.068.0. http://downloads.dlang.org/releases/2.x/2.068.0/ This release comes with many rangified phobos functions, 2 new GC profilers, a new AA

Re: Berlin D Meetup July 2015

2015-07-20 Thread Dominikus Dittes Scherkl via Digitalmars-d-announce
On Monday, 20 July 2015 at 08:56:02 UTC, Joseph Rushton Wakeling wrote: On Monday, 13 July 2015 at 12:31:56 UTC, Iain Buclaw wrote: On 13 Jul 2015 11:30, Ben Palmer via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: Just a note for anyone that is coming, we will be on the

Re: Wait, what? What is AliasSeq?

2015-07-09 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Thursday, 9 July 2015 at 11:34:56 UTC, Steven Schveighoffer wrote: Returns Aliases created from TList with the first occurrence, if any, of T removed. Returns the Aliases created from TList with the first occurrence, if any, of T removed. Returns an instance of Aliases created from TList

Re: GDC adds intrinsic support for core.checkedint

2015-07-03 Thread Dominikus Dittes Scherkl via Digitalmars-d
Hmm. Your solution is rather longish. I had once started something along this lines (but only for signed types): alias sbyte = SafeSigned!byte; alias sword = SafeSigned!short; alias sint = SafeSigned!int; alias slong = SafeSigned!long; alias scent = SafeSigned!cent; template isSafeSigned(T)

Re: GDC adds intrinsic support for core.checkedint

2015-07-03 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Tuesday, 30 June 2015 at 20:24:38 UTC, tsbockman wrote: Robert's version: https://github.com/D-Programming-Language/phobos/pull/3389 My version: https://github.com/tsbockman/CheckedInt Some comparative benchmarks (note: these predate Iain's update to GDC):

Re: DIP80: phobos additions

2015-06-23 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Wednesday, 17 June 2015 at 09:28:00 UTC, Tofu Ninja wrote: I actually thought about it more, and D does have a bunch of binary operators that no ones uses. You can make all sorts of weird operators like +*, *~, +++, ---, *--, /++, ~~, ~-, -~, --, ++, ^^+, in++, |-, %~, ect... +* is a

Re: 0 is not a power of 2

2015-05-21 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Tuesday, 19 May 2015 at 20:46:09 UTC, Matthias Bentrup wrote: I think you can make the over/underflow at zero work in your favor: bool isPowerOf2(uint x) { return (x -x) (x - 1); } The cool thing is that also the over/underflow of - at 0x8000_ works. But that is really a weird

Re: Visual D 0.3.41 released

2015-05-19 Thread Dominikus Dittes Scherkl via Digitalmars-d-announce
Sorry for my last post - the system somehow eat my message On Saturday, 16 May 2015 at 09:09:38 UTC, Rainer Schuetze wrote: Hi, there is a new release of Visual D available at http://rainers.github.io/visuald/visuald/StartPage.html Cool. How is the site under D / Getting Started / IDE

Re: Visual D 0.3.41 released

2015-05-19 Thread Dominikus Dittes Scherkl via Digitalmars-d-announce
On Saturday, 16 May 2015 at 09:09:38 UTC, Rainer Schuetze wrote: Hi, there is a new release of Visual D available at http://rainers.github.io/visuald/visuald/StartPage.html Major new features: - new linker option build and use local phobos library to get a COFF32 version (dmd 2.067+) or

Re: Good examples of value types

2015-05-06 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Wednesday, 6 May 2015 at 02:07:40 UTC, deadalnix wrote: Problem is, all these entries needs to be value types (we are in java) Maybe you meant reference types here?

Re: oversight with input ranges

2015-04-23 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Wednesday, 22 April 2015 at 19:37:21 UTC, Steven Schveighoffer wrote: Yeah, I like this. But now we have to name the flag :) I don't think it should be a bool, because: isInputRange!(R, true) Is pretty obtuse. I'd rather see something like: isInputRange!(R, RangeOption.NonCopyable) Or

Re: oversight with input ranges

2015-04-22 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Tuesday, 21 April 2015 at 23:33:38 UTC, ketmar wrote: On Tue, 21 Apr 2015 15:48:25 -0700, Jonathan M Davis via Digitalmars-d wrote: auto h = r.front; the thing is that chain, or filter, or other algorithms are perfectly able to work with such ranges, yet it is forbidden now. it looks

Re: Implementing cent/ucent...

2015-04-14 Thread Dominikus Dittes Scherkl via Digitalmars-d-announce
On Monday, 13 April 2015 at 20:06:11 UTC, Kai Nacke wrote: On Monday, 13 April 2015 at 09:00:30 UTC, Dominikus Dittes Scherkl wrote: I once had added cent/ucent to std/traits.d TypeInfo for cent/ucent is now in druntime. std.traits has cent/ucent support. Wow, cool. I need to address some

Re: Implementing cent/ucent...

2015-04-13 Thread Dominikus Dittes Scherkl via Digitalmars-d-announce
On Tuesday, 7 April 2015 at 15:55:24 UTC, Kai Nacke wrote: Hi all! I started to work on cent/ucent support in LDC (and possible in upstream DMD). Here is the current state: Hurray! I missed that. If you like to help: - clone test - Druntime/Phobos should support cent/ucent. I already

Re: Why I'm Excited about D

2015-04-13 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Monday, 13 April 2015 at 05:46:32 UTC, Dicebot wrote: [...] That said, I think the main reason why this notion didn't work well for D when @property was introduces is because of extremely vague range semantics. I find it important that you have mentioned exactly `front` and `popFront` as

Re: Speed of horizontal flip

2015-04-02 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Wednesday, 1 April 2015 at 14:00:52 UTC, bearophile wrote: If you have to perform performance benchmarks then use ldc or gdc. Also disable bound tests with your compilation switches. Add the usual pure/nothrow/@nogc/@safe annotations where you can (they don't increase speed much,

operators in language reference

2015-04-01 Thread Dominikus Dittes Scherkl via Digitalmars-d
There is a gapping hole in the language reference: The operators are nowhere described. Ok, most of them are the same as in C and C++, but there are subtle differences (e.g. different precedence) and some are new (the floating point comparisons have their own chapter and they are about to

Re: operators in language reference

2015-04-01 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Wednesday, 1 April 2015 at 11:18:26 UTC, John Colvin wrote: On Wednesday, 1 April 2015 at 10:53:57 UTC, Dominikus Dittes Scherkl wrote: On Wednesday, 1 April 2015 at 10:39:01 UTC, John Colvin wrote: On Wednesday, 1 April 2015 at 10:06:20 UTC, Dominikus Dittes Scherkl wrote: There is a

Re: operators in language reference

2015-04-01 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Wednesday, 1 April 2015 at 10:39:01 UTC, John Colvin wrote: On Wednesday, 1 April 2015 at 10:06:20 UTC, Dominikus Dittes Scherkl wrote: There is a gapping hole in the language reference: The operators are nowhere described. Ok, most of them are the same as in C and C++, but there are subtle

Re: operators in language reference

2015-04-01 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Wednesday, 1 April 2015 at 15:42:31 UTC, ketmar wrote: does this including IEEE floating point number description down to bits, for example? as it's essentialy the same thing: requirement to read external sources. i.e. it's good and all that, but where we should draw the line? At least a

Re: Human unreadable documentation - the ugly seam between simple D and complex D

2015-03-27 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Thursday, 26 March 2015 at 19:32:53 UTC, Idan Arye wrote: The problem, as Andrei Alexandrescu pointed out(http://forum.dlang.org/thread/mdtago$em9$1...@digitalmars.com?page=6#post-mduv1i:242169:241:40digitalmars.com), is learning how to use them. Ideally you'd want to be able to look at a

Re: This Week in D #8: ddmd progressing, moving toward release.

2015-03-09 Thread Dominikus Dittes Scherkl via Digitalmars-d-announce
On Monday, 9 March 2015 at 03:19:58 UTC, Adam D. Ruppe wrote: Not a very eventful week (probably for the better, I was stuck out of town ALL week due to a work meeting compounded with flight cancellations getting back), we're marching toward a release.

Re: Contradictory justification for status quo

2015-02-27 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Thursday, 26 February 2015 at 20:35:04 UTC, deadalnix wrote: Yes, I don't care about the specific enum case, in fact, that is one of the least offender and this is why I choose it as an example here. Hmm. I still consider it a major issue and thought we agreed to introduce final enum to be

Re: BigFloat?

2015-02-17 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Tuesday, 17 February 2015 at 09:08:17 UTC, Vlad Levenfeld wrote: On Tuesday, 17 February 2015 at 08:05:49 UTC, Kagamin wrote: Periodic fractions. Or transcendental numbers, for that matter, but arbitrary != infinite. A max_expansion template parameter could be useful here. For my use

Re: This Week in D: Issue #4

2015-02-12 Thread Dominikus Dittes Scherkl via Digitalmars-d-announce
On Wednesday, 11 February 2015 at 14:32:46 UTC, Adam D. Ruppe wrote: On Wednesday, 11 February 2015 at 11:21:46 UTC, Dominikus Dittes Scherkl wrote: Did I missed issue #5 ? No, I did; I was sick most of last week and decided to skip it, just going to bed instead on sunday night. Sorry, I

Re: This Week in D: Issue #4

2015-02-11 Thread Dominikus Dittes Scherkl via Digitalmars-d-announce
Did I missed issue #5 ?

Re: shared Variant[string]

2015-01-29 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Wednesday, 28 January 2015 at 12:29:09 UTC, Fyodor Ustinov wrote: On Wednesday, 28 January 2015 at 11:27:53 UTC, Kagamin wrote: Associative array doesn't support thread-safe operations, that's why they don't work on shared instance. You should use std.concurrency or implement low-level

Re: using the full range of ubyte with iota

2015-01-25 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Sunday, 25 January 2015 at 10:42:51 UTC, bearophile wrote: Vlad Levenfeld: What's this about !`[]` and std.range.uniform?? It's not in the documentation. It's an enhancement I have proposed. Hm. I had more something in mind like paramCast - a kind of big scissors that cut everything a

Re: using the full range of ubyte with iota

2015-01-25 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Sunday, 25 January 2015 at 13:03:16 UTC, bearophile wrote: Dominikus Dittes Scherkl: Because this is useful in more situations, Right, but it's still a cast. And in D you want to minimize the number of usages of casts. The proposed syntax iota![] is cast-safe. I don't case too much,

Re: using the full range of ubyte with iota

2015-01-25 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Sunday, 25 January 2015 at 12:56:14 UTC, Tobias Pankrath wrote: On Sunday, 25 January 2015 at 12:25:35 UTC, Dominikus Dittes Scherkl wrote: map!(x = fn(cast(ParameterTypeTuple!fn[0])x) but instead with map!(paramCast!fn) Because this is useful in more situations, e.g. in every place

unittest with Visual D

2015-01-25 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
I finaly got managed to install Visual D on my Windows PC (thanks to the new community version of Visual Studio), but the cool point Compile and Run seems to have a problem with some of my unittests: I get the error template instance xy is not defined if a specific instantiation is not used

Re: using the full range of ubyte with iota

2015-01-25 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Sunday, 25 January 2015 at 18:59:04 UTC, ketmar wrote: auto x2 = (x4) | (x4); // swap nibbles - but result in an int! this is true for C and C++ too, as all three languages doing integer promotion. the only difference is that D forbids potentially lossy assigns. you best bet is to

using the full range of ubyte with iota

2015-01-24 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
Maybe I'm just too stupid, but I cannot manage to call a simple function with all 256 possible values of ubyte with iote: int foo(ubyte c); auto myRange = iota(0,256).map!foo; -- Error: function foo(ubyte c) is not callable using argument types (int) and this is because of the f***

Re: using the full range of ubyte with iota

2015-01-24 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Saturday, 24 January 2015 at 23:19:11 UTC, ketmar wrote: people that are new to D aren't used to D lambdas, so it's fairly common. Oh, I am aware, but I didn't thought it would be necessary in this pace. if you'll stay with D, you'll find yourself dreaming about such handy thing in

Re: using the full range of ubyte with iota

2015-01-24 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Saturday, 24 January 2015 at 21:00:06 UTC, Tobias Pankrath wrote: On Saturday, 24 January 2015 at 20:49:03 UTC, Dominikus Dittes Scherkl wrote: I would have no problem using an explicit cast, but where should I apply it? iota(0, 256).map!(x = foo(cast(ubyte) x)) Ok, thank you very much.

Re: Number of Bits Needed to Represent a Zero-Offset Integer

2015-01-20 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Monday, 19 January 2015 at 21:23:47 UTC, Nordlöw wrote: On Monday, 19 January 2015 at 20:54:50 UTC, Steven Schveighoffer wrote: Cool. I would point out that the commented code suggests you should be handling the 0 case, but you are not (when T.min == T.max) I believe that should trigger a

Re: [DRAFT] This Week in D - Jan 18

2015-01-19 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Monday, 19 January 2015 at 01:42:58 UTC, Adam D. Ruppe wrote: Anyone like to do a quick proofread of the next edition of This Week in D? http://arsdnet.net/this-week-in-d/jan-18.html Do NOT post this publically yet - it is just a draft, I want to do the broad public release/announcement

Re: More recent work on GC

2015-01-14 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Wednesday, 14 January 2015 at 06:15:09 UTC, Andrei Alexandrescu wrote: On my reading list: http://research.microsoft.com/pubs/230708/conservative-gc-oopsla-2014.pdf Interesting. non-exact GC but with about the same performance. The bad part for D would be, that this GC collects

Re: reinterpret array

2015-01-14 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Tuesday, 13 January 2015 at 23:36:51 UTC, Artur Skawina via Digitalmars-d-learn wrote: It's neat, but the real problems with it are: 1) obfuscation - it hides those trivial bit ops behind layers of functions and operator overloads, which everyone reading the code must then figure out; Ok,

reinterpret array

2015-01-13 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
Does the following construct hold water? version(LittleEndian) { /// interpret an array of one type as an array of a different type. /// if the array has odd length, the highest elements are /// not accessible, at worst an empty slice is returned inout ref T[] arrayOf(T, V:

Re: reinterpret array

2015-01-13 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Tuesday, 13 January 2015 at 17:12:42 UTC, Adam D. Ruppe wrote: On Tuesday, 13 January 2015 at 17:09:32 UTC, Dominikus Dittes Scherkl wrote: I assume taking a slice of a pointer uses the GC, so this cannot be @nogc, am I right? Nope, slicing never allocates, it just takes an address and

<    1   2   3   >