[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)
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
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
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
Hm.
There seem to be some bot generating a lot of new Issues in the D
bugzilla. Or is that intentional?!?
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
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.
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
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
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
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
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
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
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
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
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.
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
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
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
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
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
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..."
^
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
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
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
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
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
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
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 <<
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
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?
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
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!
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
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
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
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
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
On Wednesday, 11 November 2015 at 01:27:46 UTC, Jakob Ovrum wrote:
Any thoughts?
Cool!
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
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
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.
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
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 +
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
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
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
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
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
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,
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
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
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
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.,
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
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
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
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.
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
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
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
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
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)
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):
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
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
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
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
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?
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
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
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
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
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
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,
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
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
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
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
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
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.
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
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
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
Did I missed issue #5 ?
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
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
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,
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
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
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
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***
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
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.
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
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
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
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,
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:
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
101 - 200 of 252 matches
Mail list logo