On 01/28/2016 08:37 PM, Adam D. Ruppe wrote:
> I've been listening in on this
Why didn't you say hi? :) This has been the first time that we didn't
have the attendance list open, so we didn't even know whether others
were connected. Come to think of it, I think we were seeing just two
https://issues.dlang.org/show_bug.cgi?id=15621
yebblies changed:
What|Removed |Added
Keywords||pull
On Friday, 29 January 2016 at 13:38:20 UTC, Tomer Filiba wrote:
I can change all such invocations into ``func(FooPtr(null))``
but it's tedious and basically requires me to compile tens of
times before I'd cover everything. Is there some workaround to
make null implicitly convertible to my
On Friday, 29 January 2016 at 15:00:59 UTC, pineapple wrote:
With this bit of code, the first method seems to work fine -
things go as expected. But I get a compile error with the
second method, and I'm not sure how else to write this.
override bool opEquals(Object value) const{
On Friday, 29 January 2016 at 13:22:07 UTC, Mike Parker wrote:
Your problem is probably that you are calling GC.free in the
destructor. Don't do this. You don't need to call GC.free at
all. The GC will collect both your object instance and the
memory you allocated with new. Never, ever,
I had a struct (Foo) that was passed by pointer (i.e., Foo*)
throughout my code. To prevent dangling pointers, I created a
`FooPtr` struct with an `alias this` that does some checks before
returning me the underlying pointer. This is sort-of what I have:
struct FooPtr {
Foo* ptr;
On Thursday, 28 January 2016 at 06:13:32 UTC, Era Scarecrow wrote:
On Thursday, 28 January 2016 at 05:39:55 UTC, Era Scarecrow
wrote:
It really comes down to that an array qualifies as an Lvalue
operator; But I _think_ this is a bug in the language since
you should be able to assign a new
On Friday, 29 January 2016 at 13:56:48 UTC, Dragos Carp wrote:
But not in python, where "accumulate"[1] is the generic
equivalent of C++ "partial_sum"[2]. I like "fold" more.
BTW this week, a colleague of mine implemented a python
"accumulate" in D. Is there any interest to contribute it to
On Friday, 29 January 2016 at 13:11:34 UTC, Luís Marques wrote:
Just to bikeshed a little, I remember that when I first started
using std.algorithm I was ctrl-F'ing for "accumulate" and not
finding it quite often. D competes with C++ directly, so do
consider that name :-)
But not in python,
With this bit of code, the first method seems to work fine -
things go as expected. But I get a compile error with the second
method, and I'm not sure how else to write this.
override bool opEquals(Object value) const{
return this.equals(cast(typeof(this)) value);
}
It also occurred to me to do something like this, but it isn't
accepted either.
override bool opEquals(T)(T value){
return this.equals(value);
}
On Friday, 29 January 2016 at 12:43:53 UTC, Dsby wrote:
the Code:
~this(){
GC.free(by.ptr);
by = null;
writeln("free");
}
Your problem is probably that you are calling GC.free in the
destructor. Don't do this. You don't need
On Friday, 29 January 2016 at 13:59:15 UTC, Andrea Fontana wrote:
What about this:
http://dpaste.dzfl.pl/3305cdf8b7b4
?
Andrea
Thanks Andrea, I thought about it but it requires duplicating all
function signatures (and not in an automatic manner). Btw, you
can also write ``void
On Friday, 29 January 2016 at 07:01:07 UTC, Sönke Ludwig wrote:
Am 29.01.2016 um 00:18 schrieb Ola Foaheim Grøstad:
D is closer to C++ style templating and OO, and currently focus
on enabling binding to non-template C++ libraries.
Small correction: Should be "binding to template based C++
On Thursday, 28 January 2016 at 22:30:51 UTC, nbro wrote:
Apart from [syntax], what are the real advantages of D over
Rust?
D is a broader language and is applicable in more situations.
In many cases you don't care and don't want to care about memory
management. Use D and its garbage
On Friday, 29 January 2016 at 10:18:31 UTC, interessted wrote:
On Thursday, 28 January 2016 at 16:57:04 UTC, thedeemon wrote:
On Sunday, 24 January 2016 at 12:16:09 UTC, nbro wrote:
Except for GtkD and DWT, D does not seem to be supported by a
really nice GUI toolkit.
For Windows DFL is
https://www.reddit.com/r/cpp/comments/41uflq/bjarne_stroustrup_doing_an_ama/
Mentions D.
On Friday, 29 January 2016 at 12:08:01 UTC, Andrei Alexandrescu
wrote:
As has been discussed before there's been discussion about
std.algorithm.reduce taking the "wrong" order of arguments (its
definition predates UFCS). I recall the conclusion was there'd
be subtle ambiguities if we worked
On Friday, 29 January 2016 at 12:08:01 UTC, Andrei Alexandrescu
wrote:
So the next best solution is to introduce a new name such as
the popular "fold", and put them together in the documentation.
Just to bikeshed a little, I remember that when I first started
using std.algorithm I was
On Thursday, 28 January 2016 at 22:59:58 UTC, cym13 wrote:
On Thursday, 28 January 2016 at 11:53:48 UTC, Russel Winder
wrote:
It should be pointed out that anyone using the synchronized
keyword anywhere in Java code is doing concurrent and parallel
programming wrong. If they are using
As has been discussed before there's been discussion about
std.algorithm.reduce taking the "wrong" order of arguments (its
definition predates UFCS). I recall the conclusion was there'd be subtle
ambiguities if we worked reduce to implement both orders.
So the next best solution is to
On Friday, 29 January 2016 at 07:01:07 UTC, Sönke Ludwig wrote:
Small correction: Should be "binding to template based C++
libraries" - non-template libraries have worked more or less
for a while now.
Actually less. Without RAII you can't bind any realistic C++
library like Qt.
https://issues.dlang.org/show_bug.cgi?id=15619
ponce changed:
What|Removed |Added
Summary|[REG 2.068] Floating-point |[REG 2.068] Floating-point
On Friday, 29 January 2016 at 11:30:41 UTC, Suliman wrote:
On Friday, 29 January 2016 at 10:41:03 UTC, interessted wrote:
On Friday, 29 January 2016 at 10:18:31 UTC, interessted wrote:
On Thursday, 28 January 2016 at 16:57:04 UTC, thedeemon wrote:
On Sunday, 24 January 2016 at 12:16:09 UTC,
On Friday, 29 January 2016 at 10:43:08 UTC, Ola Fosheim Grøstad
wrote:
https://www.reddit.com/r/cpp/comments/41uflq/bjarne_stroustrup_doing_an_ama/
Mentions D.
Since it is in danish, let me quickly translate the informative
sections:
Bjarne Stroustrup (translated from danish): The safety
are you handling this in the math libs?
http://milesmathis.com/pi2.html
http://milesmathis.com/pi4.html
On Friday, 29 January 2016 at 12:12:40 UTC, interessted wrote:
On Friday, 29 January 2016 at 11:30:41 UTC, Suliman wrote:
On Friday, 29 January 2016 at 10:41:03 UTC, interessted wrote:
On Friday, 29 January 2016 at 10:18:31 UTC, interessted wrote:
On Thursday, 28 January 2016 at 16:57:04 UTC,
https://issues.dlang.org/show_bug.cgi?id=15622
Issue ID: 15622
Summary: Order of execution of module destructors is not always
correct
Product: D
Version: D2
Hardware: All
OS: Linux
Status: NEW
Hello!
Is there any debuging support for Intelij Idea's D plugin?
Thanks!
the Code:
class MyClass
{
this(){
by = new ubyte[1];
++i;
}
~this(){
GC.free(by.ptr);
by = null;
writeln("free");
}
void show(){
writeln(i);
};
On Thursday, 28 January 2016 at 16:57:04 UTC, thedeemon wrote:
On Sunday, 24 January 2016 at 12:16:09 UTC, nbro wrote:
Except for GtkD and DWT, D does not seem to be supported by a
really nice GUI toolkit.
For Windows DFL is quite nice and working well (I've used it in
several projects).
On Friday, 29 January 2016 at 10:41:03 UTC, interessted wrote:
On Friday, 29 January 2016 at 10:18:31 UTC, interessted wrote:
On Thursday, 28 January 2016 at 16:57:04 UTC, thedeemon wrote:
On Sunday, 24 January 2016 at 12:16:09 UTC, nbro wrote:
Except for GtkD and DWT, D does not seem to be
On Friday, 29 January 2016 at 12:43:53 UTC, Dsby wrote:
the Code:
class MyClass
{
this(){
by = new ubyte[1];
++i;
}
~this(){
GC.free(by.ptr);
by = null;
writeln("free");
}
I think what to make "pure" GUI for D there is a waste of time
and forces. More effectively and faster to develop "wrapper" for
Qt.
For myself I have made library QtE which possibilities suffice
me much. The main feature that addition of a new method or
property from Qt in QtE occupies
Thanks. I am glad be wrong on that one.
I had a look at map & filter in the source code ; pleased to see
they're lazily implemented!
map
https://github.com/D-Programming-Language/phobos/blob/master/std/algorithm/iteration.d#L425
filter
On Friday, 29 January 2016 at 08:26:01 UTC, John Colvin wrote:
It depends what you mean by templated. I believe the
interoperability work is for the results of instantiated
templates, not on the templates themselves.
Hmm, not sure how important that is. At least in my C++ class
templates
On Thursday, 28 January 2016 at 16:57:04 UTC, thedeemon wrote:
On Sunday, 24 January 2016 at 12:16:09 UTC, nbro wrote:
Except for GtkD and DWT, D does not seem to be supported by a
really nice GUI toolkit.
For Windows DFL is quite nice and working well (I've used it in
several projects).
https://issues.dlang.org/show_bug.cgi?id=15621
Issue ID: 15621
Summary: std.file.rename does not allow moving files to a
different drive
Product: D
Version: D2
Hardware: All
OS: Windows
Status:
On Friday, 29 January 2016 at 08:23:38 UTC, Ola Fosheim Grøstad
wrote:
On Friday, 29 January 2016 at 07:01:07 UTC, Sönke Ludwig wrote:
Am 29.01.2016 um 00:18 schrieb Ola Foaheim Grøstad:
D is closer to C++ style templating and OO, and currently
focus
on enabling binding to non-template C++
On Friday, 29 January 2016 at 08:06:14 UTC, glathoud wrote:
Thanks. I am glad be wrong on that one.
I had a look at map & filter in the source code ; pleased to
see they're lazily implemented!
map
https://github.com/D-Programming-Language/phobos/blob/master/std/algorithm/iteration.d#L425
On Friday, 29 January 2016 at 15:13:45 UTC, Mike Parker wrote:
The first implementation is fine because you're overriding the
implementation in the base class (Object). However, the second
one fails because it's a template. Templates are non-virtual
and cannot override anything. Even if you
On Friday, 29 January 2016 at 15:28:29 UTC, Adrian Matoga wrote:
How can I reliably test if CallsFoo can be instantiated?
You can use a constraint to prevent invalid instantiation:
struct HasFoo { void foo() {} }
struct NoFoo {}
struct CallsFoo(T)
if (__traits(hasMember, T, "foo"))
{
On Thursday, 28 January 2016 at 12:40:56 UTC, Ola Fosheim Grøstad
wrote:
I think that Sonke received too much "negative motivation" for
his contributions recently, if I had been in his shoes I'd
probably found working on vibe.d more fun. IRRC Ruppe also have
voiced that he want to work on
https://issues.dlang.org/show_bug.cgi?id=15623
Issue ID: 15623
Summary: is(M!N) evaluates to true for M!N that fails to
instantiate.
Product: D
Version: D2
Hardware: x86_64
OS: All
Status: NEW
On Friday, 29 January 2016 at 13:38:20 UTC, Tomer Filiba wrote:
I can change all such invocations into ``func(FooPtr(null))``
but it's tedious and basically requires me to compile tens of
times before I'd cover everything. Is there some workaround to
make null implicitly convertible to my
On Friday, 29 January 2016 at 10:41:03 UTC, interessted wrote:
where can one find a working DFL version - compilable with the
last compiler?
The last compiler is just 1 day old, don't expect all libs
updated this soon. ;)
Usually I took DFL here:
https://github.com/Rayerd/dfl/
There are
On Thursday, 28 January 2016 at 18:33:19 UTC, Nordlöw wrote:
Thanks, I'm aware of these tools.
But it's easier to use the stacktrace...if I only get one. The
function where the assert() is called is, in turn, called in
hundreds of places.
Which platform are you on? Are all your binaries
qznc:
On Friday, 29 January 2016 at 09:00:52 UTC, qznc wrote:
D is a broader language and is applicable in more situations.
In many cases you don't care and don't want to care about
memory management.
Learning to manage memory in Rust takes lot of time and practice,
it's a bit painful. I am
On Friday, 29 January 2016 at 12:08:01 UTC, Andrei Alexandrescu
wrote:
As has been discussed before there's been discussion about
std.algorithm.reduce taking the "wrong" order of arguments (its
definition predates UFCS). I recall the conclusion was there'd
be subtle ambiguities if we worked
On Friday, 29 January 2016 at 12:08:01 UTC, Andrei Alexandrescu
wrote:
As has been discussed before there's been discussion about
std.algorithm.reduce taking the "wrong" order of arguments (its
definition predates UFCS). I recall the conclusion was there'd
be subtle ambiguities if we worked
On Friday, 29 January 2016 at 12:08:01 UTC, Andrei Alexandrescu
wrote:
As has been discussed before there's been discussion about
std.algorithm.reduce taking the "wrong" order of arguments (its
definition predates UFCS). I recall the conclusion was there'd
be subtle ambiguities if we worked
On Friday, 29 January 2016 at 12:08:01 UTC, Andrei Alexandrescu
wrote:
As has been discussed before there's been discussion about
std.algorithm.reduce taking the "wrong" order of arguments (its
definition predates UFCS). I recall the conclusion was there'd
be subtle ambiguities if we worked
On 1/29/16 10:28 AM, Adrian Matoga wrote:
Code:
struct HasFoo { void foo() {} }
struct NoFoo {}
struct CallsFoo(T) {
T t;
void bar() { t.foo(); }
}
static assert(is(CallsFoo!HasFoo));
alias Bar = CallsFoo!HasFoo;
static assert(is(CallsFoo!NoFoo)); // (1)
//alias Baz =
Code:
struct HasFoo { void foo() {} }
struct NoFoo {}
struct CallsFoo(T) {
T t;
void bar() { t.foo(); }
}
static assert(is(CallsFoo!HasFoo));
alias Bar = CallsFoo!HasFoo;
static assert(is(CallsFoo!NoFoo)); // (1)
//alias Baz = CallsFoo!NoFoo; // (2)
This
Getting this error, could someone explain why?
void main(string[] args) {
InSituRegion!(1024) stackAlloc;
IAllocator alloc = allocatorObject(stackAlloc);
}
..\src\phobos\std\conv.d(5055):
Error: static assert "Don't know how to initialize an object of
type
Am 22.01.2016 um 12:14 schrieb Sönke Ludwig:
I've finally managed to tag a first beta for vibe.d. It contains
numerous optimizations in the network and HTTP code, so it's especially
important to thoroughly test this before release.
0.7.26 (except for the win32 driver) still compiles fine on DMD
On Friday, 29 January 2016 at 16:38:23 UTC, Brad Anderson wrote:
And just for completeness, here is monarchdodra's valiant but
ultimately unsuccessful pull request which attempted fix
reduce:
https://github.com/D-Programming-Language/phobos/pull/861#issuecomment-20760448
Interestingly, that
On Friday, 29 January 2016 at 17:49:58 UTC, Nick Sabalausky wrote:
I don't recall: Does that parse the source for comments on its
own or does it still use dmd's json (or html) output?
Does it on its own. (Well, except the search results page, it
still uses the json, but I'm fixing that soon
On Monday, 25 January 2016 at 02:37:40 UTC, Andrei Alexandrescu
wrote:
Hot off the press! http://wiki.dlang.org/Vision/2016H1 -- Andrei
Just out of curiosity, is getting the different compilers in sync
still a priority? Right now we have dmd at 2.070, ldc at 2.068.
and gdc at 2.066.
On Friday, 29 January 2016 at 16:36:01 UTC, Steven Schveighoffer
wrote:
On 1/29/16 10:28 AM, Adrian Matoga wrote:
Code:
struct HasFoo { void foo() {} }
struct NoFoo {}
struct CallsFoo(T) {
T t;
void bar() { t.foo(); }
}
static assert(is(CallsFoo!HasFoo));
alias Bar =
I want to create an opApply for a type.
I've marked my code @safe, because everything I wrote was @safe. The body
of opApply is @safe, but it calls a delegate that may or may not be @safe.
How do I make it so I can iterate through this type safely and systemly?
I want to support iteration
On Friday, 29 January 2016 at 15:39:53 UTC, bearophile wrote:
D is also more flexible (higher order templates, better CTFE,
unrestricted UFCS, etc), and you can port Python or C code to D
faster than to Rust.
So I think Rust targets a smaller number of coding purposes
compared to D.
Which
On Friday, 29 January 2016 at 12:05:08 UTC, Kagamin wrote:
Actually less. Without RAII you can't bind any realistic C++
library like Qt.
My understanding is that D has a lot of options for behavior
similar to RAII, but it does not have the full capability. What
would be the most important
On 29 Jan 2016 6:55 pm, "Tofu Ninja via Digitalmars-d-announce" <
digitalmars-d-announce@puremagic.com> wrote:
>
> On Monday, 25 January 2016 at 02:37:40 UTC, Andrei Alexandrescu wrote:
>>
>> Hot off the press! http://wiki.dlang.org/Vision/2016H1 -- Andrei
>
>
> Just out of curiosity, is getting
On 01/29/2016 11:09 AM, Adam D. Ruppe wrote:
On Thursday, 28 January 2016 at 19:46:48 UTC, Nick Sabalausky wrote:
Use dpldocs.info. We have good docs.
That's orthogonal to this.
It is just another example of why I feel it is necessary to take a
different direction than dmd.
I see. Good
I get the following downloading and installing the Ubuntu x86_64
deb file.
The package is of bad quality
The installation of a package which violates the quality
standards isn't allowed. This could cause serious problems on
your computer. Please contact the person or organisation who
On Friday, 29 January 2016 at 16:07:48 UTC, Adam D. Ruppe wrote:
In my perfect world, quality third party apps - as determined
just by usage stats or something - would be automatically
downloadable and their documentation searchable as if it was
standard.
I've noticed that curated lists of
On 1/29/16 6:44 PM, Basile B. wrote:
Haven't you seen my answer about constraint ?
If you put a constraint on your function template then invalid
instantiations are rejected. I mean... this language feature is not just
ornamental...
What do you think constraints are used for otherwise ^^
A
On Friday, 29 January 2016 at 18:43:19 UTC, Walter Bright wrote:
On 1/29/2016 7:39 AM, bearophile wrote:
[...]
Nice to see you back, bearophile!
Having not been around here much myself recently, I didn't even
realize he was away, but ... agree :-)
On Friday, 29 January 2016 at 17:01:46 UTC, Adrian Matoga wrote:
On Friday, 29 January 2016 at 16:36:01 UTC, Steven
Schveighoffer wrote:
On 1/29/16 10:28 AM, Adrian Matoga wrote:
[...]
is(T) is supposed to be false if T is not a valid type.
I would agree with you that the static assert
On 1/29/16 6:03 PM, Marek Janukowicz wrote:
On Fri, 29 Jan 2016 17:43:26 -0500, Steven Schveighoffer wrote:
Is there anything I should know about UTF endianess?
It's not any different from other endianness.
In other words, a UTF16 code unit is expected to be in the endianness of
the platform
On Sat, Jan 30, 2016 at 01:21:27AM +, Matt Elkins via Digitalmars-d-learn
wrote:
> On Saturday, 30 January 2016 at 01:18:33 UTC, Ali Çehreli wrote:
> >Definitely so. Rvalues are moved around all the time. The following
> >program has two rvalue moves without calling post-blits or
>
On Saturday, 30 January 2016 at 01:28:54 UTC, H. S. Teoh wrote:
On Sat, Jan 30, 2016 at 01:21:27AM +, Matt Elkins via
Digitalmars-d-learn wrote:
On Saturday, 30 January 2016 at 01:18:33 UTC, Ali Çehreli
wrote:
>Definitely so. Rvalues are moved around all the time. The
>following program
On 1/29/16 8:07 PM, Matt Elkins wrote:
[snip]
on D and came across a section in TDPL which said internal pointers are
verboten because objects must be relocatable. Does this mean my example
is invalid (e.g., the invariant will not hold in all circumstances)? If
it is invalid, does that mean
On Friday, 29 January 2016 at 13:11:34 UTC, Luís Marques wrote:
On Friday, 29 January 2016 at 12:08:01 UTC, Andrei Alexandrescu
wrote:
So the next best solution is to introduce a new name such as
the popular "fold", and put them together in the documentation.
Just to bikeshed a little, I
I have trouble understanding how endianess works for UTF-16.
For example UTF-16 code for 'ł' character is 0x0142. But this program shows
otherwise:
import std.stdio;
public void main () {
ubyte[] properOrder = [0x01, 0x42];
ubyte[] reverseOrder = [0x42, 0x01];
writefln(
I'm trying to compile a 64-bit DMD.exe on windows (as my project
has enough CTFE and Template work that it bumps up against the
4gb limit).
with the pre-DDMD setup I was just able to load the thing up in
visual studio 2013 and build, but I've been having some
difficulty with 2.070's
On Friday, 29 January 2016 at 17:44:34 UTC, Chris Wright wrote:
I want to create an opApply for a type.
I've marked my code @safe, because everything I wrote was
@safe. The body of opApply is @safe, but it calls a delegate
that may or may not be @safe.
How do I make it so I can iterate
Am Fri, 29 Jan 2016 18:58:17 -0500
schrieb Steven Schveighoffer :
> On 1/29/16 6:03 PM, Marek Janukowicz wrote:
> > On Fri, 29 Jan 2016 17:43:26 -0500, Steven Schveighoffer wrote:
> >>> Is there anything I should know about UTF endianess?
> >>
> >> It's not any different
https://issues.dlang.org/show_bug.cgi?id=15623
Ali Cehreli changed:
What|Removed |Added
CC||acehr...@yahoo.com
---
On 01/29/2016 05:07 PM, Matt Elkins wrote:
> this(/* arguments to populate stuff */)
> {
> m_this =
> /* ... populate stuff ... */
> }
> a section in TDPL which said internal pointers are
> verboten because objects must be relocatable. Does this mean my example
On Friday, 29 January 2016 at 19:46:40 UTC, Johannes Pfau wrote:
Now on windows, things are more complicated. First of all, I
can't seem
to simply use "libs": ["foo"] as the linker won't find the C
import .lib file. Then apparently there's no way to add a
library search
path with the MSVC
On Saturday, 30 January 2016 at 01:17:13 UTC, Mike Parker wrote:
There's an issue for this at [1]. Until support for -m32mscoff
is baked in, distributing any libraries with a dub project will
be problematic.
[1] https://github.com/D-Programming-Language/dub/issues/628
On Saturday, 30 January 2016 at 01:17:13 UTC, Mike Parker wrote:
Hopefully one day dub will have the ability to pull down
library dependencies on demand, or based on the current
platform and architecture by default, then this problem goes
away.
I should say "precompiled library
On Friday, 29 January 2016 at 23:45:04 UTC, Ola Fosheim Grøstad
wrote:
So D is adding currying and builtin tuples? :^)
Yes. Come back in 10 years it'll be ready for you.
On Friday, 29 January 2016 at 21:31:35 UTC, Pradeep Gowda wrote:
On Friday, 29 January 2016 at 21:05:00 UTC, nbro wrote:
Hi!
I am trying to write some code in D using Xamarin Studio, but
it's not autocompleting the code as I would expect. For
example, it does not even gives you
On Friday, 29 January 2016 at 22:36:37 UTC, Marek Janukowicz
wrote:
I have trouble understanding how endianess works for UTF-16.
UTF-16 (as well as UTF-32) comes in both little-endian and
big-endian variants. A byte-order marker in the file can help you
detect which one it is in.
See t his
http://dpaste.dzfl.pl/05a82699acc8
So over the past few days I've been in the zone working on a smooth
implementation of "Median of Medians"
(https://en.wikipedia.org/wiki/Median_of_medians). Its performance is
much better compared to the straightforward implementation. However, in
practice
On Friday, 29 January 2016 at 23:20:38 UTC, Walter Bright wrote:
On 1/29/2016 5:11 AM, Luís Marques wrote:
Just to bikeshed a little, I remember that when I first
started using
std.algorithm I was ctrl-F'ing for "accumulate" and not
finding it quite often.
D competes with C++ directly, so do
I want to compute the points of a regular polygon in a loop:
float r = 1.0;
for (uint k=0; k < numVerts; k++) {
vertlist ~= Vec2D(r * cos(k/n * 2 * PI), ...)
}
How do I make sure k/n is a float or double?
On 01/29/2016 09:01 AM, Adrian Matoga wrote:
> Oh, there's more:
> // this should fail:
> static assert(is(CallsFoo!NoFoo));
> // this should fail too:
> static assert(is(typeof({ alias Baz = CallsFoo!NoFoo; return Baz.init;
> }(;
> // and this:
> static assert(__traits(compiles, { alias Baz
On 1/29/16 3:08 PM, Chris Wright wrote:
On Fri, 29 Jan 2016 14:00:08 -0500, Steven Schveighoffer wrote:
On 1/29/16 12:44 PM, Chris Wright wrote:
I want to create an opApply for a type.
I've marked my code @safe, because everything I wrote was @safe. The
body of opApply is @safe, but it calls
On Fri, 29 Jan 2016 23:35:35 +, Basile B. wrote:
> You can implement an input range and annotate all the primitives as
> @safe.
I hadn't realized that if front() returns a tuple, it's automatically
expanded. Works for me.
On Friday, 29 January 2016 at 17:38:18 UTC, Gary Willoughby wrote:
I get the following downloading and installing the Ubuntu
x86_64 deb file.
The package is of bad quality
The installation of a package which violates the quality
standards isn't allowed. This could cause serious problems on
On 1/29/16 6:48 PM, Enjoys Math wrote:
I want to compute the points of a regular polygon in a loop:
float r = 1.0;
for (uint k=0; k < numVerts; k++) {
vertlist ~= Vec2D(r * cos(k/n * 2 * PI), ...)
}
How do I make sure k/n is a float or double?
uint is promoted to float/double with a
On 1/29/16 5:36 PM, Marek Janukowicz wrote:
I have trouble understanding how endianess works for UTF-16.
For example UTF-16 code for 'ł' character is 0x0142. But this program shows
otherwise:
import std.stdio;
public void main () {
ubyte[] properOrder = [0x01, 0x42];
ubyte[]
On 1/29/2016 5:11 AM, Luís Marques wrote:
Just to bikeshed a little, I remember that when I first started using
std.algorithm I was ctrl-F'ing for "accumulate" and not finding it quite often.
D competes with C++ directly, so do consider that name :-)
For algorithms and FP in general, we may be
Hi all, I'm a C++ programmer trying to decide whether to switch
my main focus to D, and so I'm working on a pet project using it.
So far I really like some of the practical aspects of the
language (built-in contracts are great, the metaprogramming is
very accessible, and I can't enough of
On Friday, 29 January 2016 at 23:41:47 UTC, Ola Fosheim Grøstad
wrote:
Yep, a curated list like those awesome-lists found on github
would be a start.
I've got one before there were many awesome-lists:
https://github.com/zhaopuming/awesome-d
On 1/29/16 9:35 PM, Matt Elkins wrote:
On Saturday, 30 January 2016 at 02:09:55 UTC, Steven Schveighoffer wrote:
I figured out a way to have them. You just have to guarantee you don't
copy the actual "pointer" out of the struct:
https://forum.dlang.org/post/mk5k4l$s5r$1...@digitalmars.com
1 - 100 of 172 matches
Mail list logo