Here is what I'm going to say and people will probably just reiterate it.
1) Report problems. Can't be fixed if we don't know it.
2) We're working on it. No really, I get it, you want to have a GUI
toolkit yesterday but I don't think you understand just how expensive it
is dependency wise. Its
Sorry, I've spend the last month trying my best to get simple
shit done. At every turn there is some problem that has to be
dealt with that is unrelated to my actual work. Be it the IDE,
debugging, the library, or user shared code, it is just crap. D
cannot be used successfully for semi-large
https://issues.dlang.org/show_bug.cgi?id=16228
--- Comment #2 from Walter Bright ---
BTW, you'll see errors diagnosed if @safe is added. Leaving off @safe disables
safety checks.
--
On 02.07.2016 14:26, Andrei Alexandrescu wrote:
How would you reshape this? It's important that the call to hook is
physically at the end of the function and issued just in that place, and
that the code does not do any redundant work.
U hook(U, T)(T value) { return U.init; }
U opCast(U, T)(T
On Saturday, 2 July 2016 at 21:23:57 UTC, Namespace wrote:
passing by value is only a good solution if your struct is
really small.
It's not uncommon for optimizers to generate the same code either
way regardless of what you write.
https://issues.dlang.org/show_bug.cgi?id=16228
Walter Bright changed:
What|Removed |Added
Keywords||pull, safe
On Saturday, 2 July 2016 at 21:37:12 UTC, ZombineDev wrote:
On Saturday, 2 July 2016 at 20:48:51 UTC, Andrei Alexandrescu
wrote:
So I'm working on this checked integral thing and starting to
really get into the possibilities offered by DbI. One core
operation is "stacking" two policies on top
On Saturday, 2 July 2016 at 15:15:39 UTC, Guillaume Boucher wrote:
U opCast(U, T)(T payload)
{
import std.traits;
enum Tsizeof = is(T==bool) ? 0 : T.sizeof;
enum Usizeof = is(U==bool) ? 0 : U.sizeof;
enum noCheck = isUnsigned!T == isUnsigned!U && Tsizeof
<=
On Saturday, 2 July 2016 at 20:49:27 UTC, Andrei Alexandrescu
wrote:
On 7/2/16 4:30 PM, Walter Bright wrote:
On 7/2/2016 1:17 PM, Andrei Alexandrescu wrote:
So what's the fastest way to figure that an integral is
convertible to a
floating point value precisely (i.e. no other integral
converts
On Saturday, 2 July 2016 at 20:48:51 UTC, Andrei Alexandrescu
wrote:
So I'm working on this checked integral thing and starting to
really get into the possibilities offered by DbI. One core
operation is "stacking" two policies on top of each other, i.e.
an operation is first offered to the
On Saturday, 2 July 2016 at 20:17:59 UTC, Andrei Alexandrescu
wrote:
So what's the fastest way to figure that an integral is
convertible to a floating point value precisely (i.e. no other
integral converts to the same floating point value)? Thanks! --
Andrei
bool isConvertible(T) (long n)
Just for you, a slightly adapted version:
import std.stdio;
struct A {
public int id = 0;
this(int id) {
this.id = id;
}
ref A byRef() {
return this;
}
}
void foo(ref const A a) {
On 7/2/2016 1:49 PM, Andrei Alexandrescu wrote:
On 7/2/16 4:30 PM, Walter Bright wrote:
On 7/2/2016 1:17 PM, Andrei Alexandrescu wrote:
So what's the fastest way to figure that an integral is convertible to a
floating point value precisely (i.e. no other integral converts to the
same
floating
On Saturday, 2 July 2016 at 21:19:04 UTC, ketmar wrote:
On Saturday, 2 July 2016 at 21:17:33 UTC, Namespace wrote:
On Saturday, 2 July 2016 at 21:15:29 UTC, ketmar wrote:
On Saturday, 2 July 2016 at 21:05:18 UTC, Namespace wrote:
Try this little trick:
or don't. such pointers to structs are
On Saturday, 2 July 2016 at 20:49:27 UTC, Andrei Alexandrescu
wrote:
On 7/2/16 4:30 PM, Walter Bright wrote:
On 7/2/2016 1:17 PM, Andrei Alexandrescu wrote:
So what's the fastest way to figure that an integral is
convertible to a
floating point value precisely (i.e. no other integral
converts
On Saturday, 2 July 2016 at 21:17:33 UTC, Namespace wrote:
On Saturday, 2 July 2016 at 21:15:29 UTC, ketmar wrote:
On Saturday, 2 July 2016 at 21:05:18 UTC, Namespace wrote:
Try this little trick:
or don't. such pointers to structs are *dangerous*.
Either that "dangerous" thing or 2^N
On Saturday, 2 July 2016 at 20:40:00 UTC, Adam D. Ruppe wrote:
Using ref is wasteful there regardless just take an
ordinary Point (even const is optional if it is all value but
it doesn't hurt).
I think a lot of C++ programmers overuse references. If you're
passing a large thing, it
On Saturday, 2 July 2016 at 21:15:29 UTC, ketmar wrote:
On Saturday, 2 July 2016 at 21:05:18 UTC, Namespace wrote:
Try this little trick:
or don't. such pointers to structs are *dangerous*.
Either that "dangerous" thing or 2^N template bloat.
On Saturday, 2 July 2016 at 21:05:18 UTC, Namespace wrote:
Try this little trick:
or don't. such pointers to structs are *dangerous*.
On Saturday, 2 July 2016 at 19:40:53 UTC, phant0m wrote:
On Saturday, 2 July 2016 at 19:25:37 UTC, ketmar wrote:
note the first "()", though: this is effectively a template
function, which compiler will instantiate either with "ref" or
without it.
Yeah, I've noticed it. Always using function
On 7/2/16 4:30 PM, Walter Bright wrote:
On 7/2/2016 1:17 PM, Andrei Alexandrescu wrote:
So what's the fastest way to figure that an integral is convertible to a
floating point value precisely (i.e. no other integral converts to the
same
floating point value)? Thanks! -- Andrei
Test that its
So I'm working on this checked integral thing and starting to really get
into the possibilities offered by DbI. One core operation is "stacking"
two policies on top of each other, i.e. an operation is first offered to
the first one, and then the second one. Here's an excerpt:
struct
On Saturday, 2 July 2016 at 20:24:12 UTC, phant0m wrote:
I took a simple task (for D learning purposes): to implement a
Point template "class" (something like Qt's QPoint).
Using ref is wasteful there regardless just take an ordinary
Point (even const is optional if it is all value but
On 7/2/2016 1:17 PM, Andrei Alexandrescu wrote:
So what's the fastest way to figure that an integral is convertible to a
floating point value precisely (i.e. no other integral converts to the same
floating point value)? Thanks! -- Andrei
Test that its absolute value is <= the largest unsigned
On Saturday, 2 July 2016 at 19:46:53 UTC, Adam D. Ruppe wrote:
On Saturday, 2 July 2016 at 18:37:06 UTC, phant0m wrote:
How should I pass a struct variable in D effectively?
Passing by value is often the most efficient. It depends on
what exactly you have in the struct.
From the point of
So what's the fastest way to figure that an integral is convertible to a
floating point value precisely (i.e. no other integral converts to the
same floating point value)? Thanks! -- Andrei
//scone, Simple Console Engine is a Windows console API, made for
easier CLI application development.
https://github.com/vladdeSV/scone
Today, at v1.1.0, some pretty big additions for scone were
introduced, the two main points being
* UI libray
* Localization
Biggest addition is the UI
On Saturday, 2 July 2016 at 18:37:06 UTC, phant0m wrote:
How should I pass a struct variable in D effectively?
Passing by value is often the most efficient. It depends on what
exactly you have in the struct.
On Saturday, 2 July 2016 at 19:25:37 UTC, ketmar wrote:
note the first "()", though: this is effectively a template
function, which compiler will instantiate either with "ref" or
without it.
Yeah, I've noticed it. Always using function template for this
use case seems like a weird idea.
On Saturday, 2 July 2016 at 18:47:31 UTC, phant0m wrote:
On Saturday, 2 July 2016 at 18:43:51 UTC, ketmar wrote:
void boo() (in auto ref MyStruct s) { ... }
this will accept both lvalues and rvalues, and will avoid
copying if it can.
Thank you! Could you please explain what does "auto" in
On Sat, Jul 02, 2016 at 06:47:31PM +, phant0m via Digitalmars-d-learn wrote:
> On Saturday, 2 July 2016 at 18:43:51 UTC, ketmar wrote:
> > void boo() (in auto ref MyStruct s) { ... }
> >
> > this will accept both lvalues and rvalues, and will avoid copying if
> > it can.
>
> Thank you! Could
On Saturday, 2 July 2016 at 08:02:30 UTC, John Colvin wrote:
On Saturday, 2 July 2016 at 01:20:35 UTC, Hiemlick Hiemlicker
wrote:
public struct Foo
{
public void Create(T)(uint delegate(T) c, T param)
{
}
}
Foo f;
f.Create((x) { }, "asdf");
cannot deduce
On Saturday, 2 July 2016 at 01:51:03 UTC, rikki cattermole wrote:
Couple of things could be happening.
1) Alignments are off, aligning of data really really matters
Where? I rewrote the code to use size_t and same problem. If
alignments were off chances are it wouldn't exhibit the issues in
On Saturday, 2 July 2016 at 18:43:51 UTC, ketmar wrote:
void boo() (in auto ref MyStruct s) { ... }
this will accept both lvalues and rvalues, and will avoid
copying if it can.
Thank you! Could you please explain what does "auto" in this
context mean?
void boo() (in auto ref MyStruct s) { ... }
this will accept both lvalues and rvalues, and will avoid copying
if it can.
I came from a C++ world, so I'm used to passing structs by a
const reference (I mean the case, where a function argument isn't
changed by the function). C++ allows passing a temporary (rvalue)
to a function, which accepts a const reference. D doesn't allow
this. All I have found is a message
http://code.dlang.org/packages/unit-threaded
After merging code from Robert's fork I added some support for
property-based testing. There's no shrinking yet and user-defined
types aren't supported. Right now most if not all primitive types
are, as well as string, wstring, dstring and arrays
On Saturday, 2 July 2016 at 03:54:26 UTC, Mike Parker wrote:
On Saturday, 2 July 2016 at 00:08:10 UTC, Hiemlick Hiemlicker
wrote:
I use a struct with static members so I do not have to
instantiate it. It is essentially a singleton. I want all the
variables to be __gshared. I guess I have
On 07/02/2016 11:15 AM, Guillaume Boucher wrote:
Your function does redundant work. E.g. opCast!(int, ubyte) should not
require any checks. I also don't understand why opCast!(int, ubyte) is
not allowed.
It's an adapted fragment from a larger function that handles other cases
separately. --
On Saturday, 2 July 2016 at 14:03:29 UTC, Andrei Alexandrescu
wrote:
Nice, thanks. I've tried to not rely too much on mixing
statically-known and dynamically-known Boolean expressions. Can
I safely assume that all compilers will generate good code for
such?
I'd be very surprised if not
On Saturday, 2 July 2016 at 15:15:39 UTC, Guillaume Boucher wrote:
E.g. opCast!(int, ubyte) should not require any checks.
Or opCast!(long, int) and opCast!(int, int).
On Saturday, 2 July 2016 at 12:26:34 UTC, Andrei Alexandrescu
wrote:
How would you reshape this? It's important that the call to
hook is physically at the end of the function and issued just
in that place, and that the code does not do any redundant work.
Your function does redundant work.
On 07/02/2016 09:23 AM, Johan Engelen wrote:
On Saturday, 2 July 2016 at 12:26:34 UTC, Andrei Alexandrescu wrote:
How would you reshape this?
Maybe:
U opCast(U, T)(T payload)
{
import std.traits;
enum descriptiveName = !isUnsigned!T && isUnsigned!U && T.sizeof <=
U.sizeof;
On Saturday, 2 July 2016 at 12:26:34 UTC, Andrei Alexandrescu
wrote:
How would you reshape this?
Maybe:
U opCast(U, T)(T payload)
{
import std.traits;
enum descriptiveName = !isUnsigned!T && isUnsigned!U &&
T.sizeof <= U.sizeof;
enum unsT_sigU = isUnsigned!T && !isUnsigned!U;
On 07/02/2016 02:45 AM, Patrick Schluter wrote:
On Friday, 1 July 2016 at 20:09:30 UTC, Andrei Alexandrescu wrote:
On 7/1/16 3:43 PM, Patrick Schluter wrote:
On Friday, 1 July 2016 at 16:30:41 UTC, Andrei Alexandrescu wrote:
https://issues.dlang.org/show_bug.cgi?id=16224 -- Andrei
That
On Saturday, 2 July 2016 at 12:10:28 UTC, qznc wrote:
I want to implement some caching for HTTP GET requests.
Basically a map of URL to content. A cache needs some
additional meta data (size, age, etc).
There seem to be two basic data structures available:
Associative array (AA) or red black
On Saturday, 2 July 2016 at 11:50:15 UTC, qznc wrote:
On Saturday, 2 July 2016 at 11:27:57 UTC, Lodovico Giaretta
wrote:
On Saturday, 2 July 2016 at 11:25:51 UTC, Lodovico Giaretta
wrote:
What emerged in a previous thread[1], unittests that can't be
@safe have to be explicitly marked @system,
On Saturday, 2 July 2016 at 07:04:28 UTC, Patrick Schluter wrote:
On Friday, 1 July 2016 at 20:30:30 UTC, Steven Schveighoffer
wrote:
On 7/1/16 4:08 PM, Andrei Alexandrescu wrote:
On 7/1/16 2:46 PM, Steven Schveighoffer wrote:
On 7/1/16 2:15 PM, Andrei Alexandrescu wrote:
On 7/1/16 2:05 PM,
I want to implement some caching for HTTP GET requests. Basically
a map of URL to content. A cache needs some additional meta data
(size, age, etc).
There seem to be two basic data structures available: Associative
array (AA) or red black tree (RBT).
With AA cache eviction is inefficient.
On 7/2/2016 2:55 AM, Dicebot wrote:
I have submitted a short summary of that ng.learn thread here :
https://issues.dlang.org/show_bug.cgi?id=16228
Thanks! I'll fix them.
My overall opinion of DIP25 is that it must not become part of language
mainline for two reasons:
1) Implementation is
On Saturday, 2 July 2016 at 11:27:57 UTC, Lodovico Giaretta wrote:
On Saturday, 2 July 2016 at 11:25:51 UTC, Lodovico Giaretta
wrote:
What emerged in a previous thread[1], unittests that can't be
@safe have to be explicitly marked @system, so that it is
obvious to the reader that the
On Friday, 1 July 2016 at 20:06:39 UTC, Andrei Alexandrescu wrote:
What is the condition? -- Andrei
`while`'s job is it to test for a condition and loop while the
condition is true, even if the condition is `true` or `0`. So
-cov does the right thing. It checks whether this part of the
On Saturday, 2 July 2016 at 11:25:51 UTC, Lodovico Giaretta wrote:
What emerged in a previous thread[1], unittests that can't be
@safe have to be explicitly marked @system, so that it is
obvious to the reader that the functionalities tested are not
@safe.
[1]
On Saturday, 2 July 2016 at 11:03:16 UTC, qznc wrote:
In general, it is a good idea to make unittests @safe and @nogc
in Phobos. When reviewing a pull request, we should check that.
There is a pull request [0] which annotates @system. Why would
you do that? Is that somehow a desirable thing?
In general, it is a good idea to make unittests @safe and @nogc
in Phobos. When reviewing a pull request, we should check that.
There is a pull request [0] which annotates @system. Why would
you do that? Is that somehow a desirable thing? Should a reviewer
check for that?
The spec for
On Saturday, 2 July 2016 at 09:22:48 UTC, Joakim Brännström wrote:
On Saturday, 2 July 2016 at 08:11:48 UTC, Stefan Koch wrote:
The Bytecode interpreter is now CTFEable :)
Good job Stefan. The PR looks really interesting.
I'll be looking into using your engine I future projects so I
hope
On Friday, 1 July 2016 at 20:08:30 UTC, Andrei Alexandrescu wrote:
To remove that feedback would mess up someone else's use case.
This argument is phony. Unconvinced. -- Andrei
If you are hellbent on using a loop to execute a scope once, do
something that makes it clear at the top of the
>> I've reminded Dylan about it. Should be out soon, but no exact ETA.
>
> Still no word?
Sorry for the waiting :( Aiming for the middle of coming week but that
requires Dylan to not be distracted by something urgent and irrelevant.
On 07/01/2016 07:30 PM, Andrei Alexandrescu wrote:
> https://issues.dlang.org/show_bug.cgi?id=16224 -- Andrei
Works as it should, nothing to fix.
On 06/29/2016 02:53 PM, Walter Bright wrote:
> On 6/29/2016 3:02 AM, Dicebot wrote:
>> See this d.learn discussion
>> (http://forum.dlang.org/thread/vtvtukooicwspxzzo...@forum.dlang.org)
>> for example
>> of diagnostics problems I am talking about.
>
> Please post bug reports to bugzilla. Brad
https://issues.dlang.org/show_bug.cgi?id=16228
Issue ID: 16228
Summary: Insufficient diagnostics for wrong application of
DIP25
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
On Saturday, 2 July 2016 at 08:11:48 UTC, Stefan Koch wrote:
The Bytecode interpreter is now CTFEable :)
Good job Stefan. The PR looks really interesting.
I'll be looking into using your engine I future projects so I
hope that it will be available in some way or another :)
// Joakim
https://issues.dlang.org/show_bug.cgi?id=16227
Issue ID: 16227
Summary: std.numeric unit tests fail when run in isolation
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: minor
On Thursday, 30 June 2016 at 23:27:10 UTC, lobo wrote:
On Thursday, 30 June 2016 at 11:09:10 UTC, ketmar wrote:
On Thursday, 30 June 2016 at 10:36:44 UTC, qznc wrote:
Off-topic: Is it possible/feasible/desirable to let dmd use
dub packages?
please, no. not everybody out there is dub fan.
On Saturday, 2 July 2016 at 01:20:35 UTC, Hiemlick Hiemlicker
wrote:
public struct Foo
{
public void Create(T)(uint delegate(T) c, T param)
{
}
}
Foo f;
f.Create((x) { }, "asdf");
cannot deduce arguments compiler error.
Surely D can figure out that T is a
On Friday, 1 July 2016 at 23:11:34 UTC, Hiemlick Hiemlicker wrote:
On Friday, 1 July 2016 at 22:55:21 UTC, qznc wrote:
On Friday, 1 July 2016 at 22:23:23 UTC, Hiemlick Hiemlicker
wrote:
It seems D won't replace
encrypt("This string will still end up in the binary");
with
On Saturday, 2 July 2016 at 01:20:35 UTC, Hiemlick Hiemlicker
wrote:
public struct Foo
{
public void Create(T)(uint delegate(T) c, T param)
{
}
}
Foo f;
f.Create((x) { }, "asdf");
I'm a D noob so take it with a very big grain of salt, but I
think that
On 7/1/2016 6:28 PM, Jonathan M Davis via Digitalmars-d wrote:
https://issues.dlang.org/show_bug.cgi?id=16226
https://github.com/dlang/dmd/pull/5900
DMD will go ahead and infer the 'return' attribute when it is inferring other
attributes for a function. This helps a lot to reduce the number
https://issues.dlang.org/show_bug.cgi?id=16226
Walter Bright changed:
What|Removed |Added
CC|
On Saturday, 2 July 2016 at 06:45:37 UTC, Patrick Schluter wrote:
On Friday, 1 July 2016 at 20:09:30 UTC, Andrei Alexandrescu
wrote:
On 7/1/16 3:43 PM, Patrick Schluter wrote:
On Friday, 1 July 2016 at 16:30:41 UTC, Andrei Alexandrescu
wrote:
https://issues.dlang.org/show_bug.cgi?id=16224 --
On Friday, 1 July 2016 at 20:30:30 UTC, Steven Schveighoffer
wrote:
On 7/1/16 4:08 PM, Andrei Alexandrescu wrote:
On 7/1/16 2:46 PM, Steven Schveighoffer wrote:
On 7/1/16 2:15 PM, Andrei Alexandrescu wrote:
On 7/1/16 2:05 PM, Chris wrote:
On Friday, 1 July 2016 at 16:30:41 UTC, Andrei
On Friday, 1 July 2016 at 20:09:30 UTC, Andrei Alexandrescu wrote:
On 7/1/16 3:43 PM, Patrick Schluter wrote:
On Friday, 1 July 2016 at 16:30:41 UTC, Andrei Alexandrescu
wrote:
https://issues.dlang.org/show_bug.cgi?id=16224 -- Andrei
That
do {
} while(0)
construct is ridiculous.
On Friday, 1 July 2016 at 21:18:28 UTC, Vladimir Panteleev wrote:
Generally most use cases for using an image library can be
divided into:
1. You have full control over the images being loaded. This is
the case when you're loading graphical assets for your
application which otherwise
73 matches
Mail list logo