https://issues.dlang.org/show_bug.cgi?id=16091
Issue ID: 16091
Summary: Assertion `thisfd->isNested() || thisfd->vthis'
failed.
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
On Sunday, 29 May 2016 at 05:35:33 UTC, Mike Parker wrote:
Well then, this completely breaks my understanding of variable
scope.
OK, I see now at [1] the following:
" Immutable data doesn't have synchronization problems, so the
compiler doesn't place it in TLS."
I've read that page more
On Saturday, 28 May 2016 at 15:39:44 UTC, ag0aep6g wrote:
On 05/28/2016 10:34 AM, Mike Parker wrote:
On Saturday, 28 May 2016 at 05:30:26 UTC, chmike wrote:
[...]
Is a static const Category c variable a TLS variable ?
Yes. All variables are TLS unless explicitly marked with
__gshared or
https://issues.dlang.org/show_bug.cgi?id=16090
Issue ID: 16090
Summary: popFront generates out-of-bounds array index on
corrupted utf-8 strings
Product: D
Version: D2
Hardware: x86
OS: Mac OS X
On Sunday, 29 May 2016 at 02:44:33 UTC, jhps wrote:
On Sunday, 29 May 2016 at 00:48:20 UTC, dan wrote:
Especially in a declaration like
static typeof(this) make_instance( )
but also in the 'new typeof(this)'. In both cases, 'this'
doesn't even exist.
On Sunday, 29 May 2016 at 03:52:33 UTC, open-source-guy wrote:
Hi,
this is a short ping about one of D's weaknesses - the
restrictive license for the backend. IIRC [1, 2, 3] the status
is that because some parts have been written by Walter while he
was employed by Symantec, it can't get an
Hi,
this is a short ping about one of D's weaknesses - the
restrictive license for the backend. IIRC [1, 2, 3] the status is
that because some parts have been written by Walter while he was
employed by Symantec, it can't get an open-source license.
When I read the backend license [4], I read
On Saturday, 28 May 2016 at 12:27:26 UTC, Stefan Koch wrote:
On Friday, 27 May 2016 at 23:31:24 UTC, Stefan Koch wrote:
On Monday, 9 May 2016 at 16:57:39 UTC, Stefan Koch wrote:
Hi Guys,
I have been looking into the DMD now to see what I can do
about CTFE.
I will post more details as soon
This is a minor update to Scriptlike: A utility library to help you
write script-like programs in D.
- Fixed deprecation warnings with DMD 2.070.x and 2.071.0
- Fixes the Travis-CI build which had been a little bit borked.
- Interact module properly flushes stdout when prompting for user input
On Saturday, 28 May 2016 at 13:37:55 UTC, maik klein wrote:
I really like D's syntax for lambdas and I usually write code
like this
auto v = validationLayers[].all!((layerName){
return layerProps[].count!((layer){
return strcmp(cast(const(char*))layer.layerName,
layerName) == 0;
On Sunday, 29 May 2016 at 00:48:20 UTC, dan wrote:
Especially in a declaration like
static typeof(this) make_instance( )
but also in the 'new typeof(this)'. In both cases, 'this'
doesn't even exist.
https://dlang.org/spec/declaration.html#Typeof
it's another 'this' that has not the
https://issues.dlang.org/show_bug.cgi?id=16035
--- Comment #5 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd
https://github.com/dlang/dmd/commit/47687ca95af80bc690994491effa18dd7d186034
fix Issue 16035 - Compiler crashes with inout, templates, and
https://issues.dlang.org/show_bug.cgi?id=16035
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=16035
Walter Bright changed:
What|Removed |Added
CC|
https://issues.dlang.org/show_bug.cgi?id=15925
github-bugzi...@puremagic.com changed:
What|Removed |Added
Resolution|INVALID |FIXED
--
https://issues.dlang.org/show_bug.cgi?id=15925
--- Comment #10 from github-bugzi...@puremagic.com ---
Commits pushed to stable at https://github.com/dlang/dmd
https://github.com/dlang/dmd/commit/b86f3b3b357f6d0edc0c8a60552657b922443017
fix Issue 15925 - Import declaration from mixin templates
On Saturday, 28 May 2016 at 21:55:58 UTC, Basile B. wrote:
On Saturday, 28 May 2016 at 20:39:18 UTC, Bauss wrote:
So there's no way to do it through the editor? Like I don't
use a dark theme in my OS, but I do like my editors to be dark.
I confirm. Dark theme only available if the OS widget
On Sunday, 29 May 2016 at 00:28:13 UTC, Mithun Hunsur wrote:
On Sunday, 29 May 2016 at 00:14:17 UTC, dan wrote:
Is there a standard alias for a class name inside class code?
Something like 'this' referring to a class instance, but
referring instead to the class itself?
[...]
typeof(this)
On Sunday, 29 May 2016 at 00:37:54 UTC, Alex Parrill wrote:
On Saturday, 28 May 2016 at 19:32:58 UTC, maik klein wrote:
Btw does this even work? I think the struct initializers have
to be
Foo foo = { someVar: 1 };
`:` instead of a `=`
I didn't do this because I actually got autocompletion
On Saturday, 28 May 2016 at 14:54:13 UTC, Era Scarecrow wrote:
Well here's what i got. Maybe someone else will tell me how i
did this wrong...
Using the pragma to output how the lines were being generated i
finally figured out why it kept complaining about the stack
pointer and 'this'. So
On Sunday, 29 May 2016 at 00:14:17 UTC, dan wrote:
Is there a standard alias for a class name inside class code?
Something like 'this' referring to a class instance, but
referring instead to the class itself?
[...]
typeof(this) gets you the type of the current class. :)
Is there a standard alias for a class name inside class code?
Something like 'this' referring to a class instance, but
referring instead to the class itself?
What i would like to do is have something like
class Clas {
// alias Clas THIS; <- don't want this boilerplate
static THIS
On Saturday, 28 May 2016 at 12:04:20 UTC, Andrei Alexandrescu
wrote:
OK, that's a fair argument, thanks. So it seems there should be
no "default" way to iterate a string
Yes!
So it harkens back to the original mistake: strings should NOT
be arrays with the respective primitives.
If you're
On Saturday, 28 May 2016 at 19:04:14 UTC, Walter Bright wrote:
On 5/28/2016 5:04 AM, Andrei Alexandrescu wrote:
So it harkens back to the original mistake: strings should NOT
be arrays with
the respective primitives.
An array of code units provides consistency, predictability,
flexibility,
https://issues.dlang.org/show_bug.cgi?id=16089
Issue ID: 16089
Summary: Outdated "D on GitHub" link.
Product: D
Version: D2
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: trivial
Priority: P1
On Saturday, 28 May 2016 at 21:32:15 UTC, Brad Roberts wrote:
On 5/28/2016 10:27 AM, Joseph Rushton Wakeling via
Digitalmars-d wrote:
On Saturday, 28 May 2016 at 01:48:08 UTC, Jonathan M Davis
wrote:
On Friday, May 27, 2016 23:42:24 Seb via Digitalmars-d wrote:
So what about the convention to
On Saturday, 28 May 2016 at 20:39:18 UTC, Bauss wrote:
So there's no way to do it through the editor? Like I don't use
a dark theme in my OS, but I do like my editors to be dark.
I confirm. Dark theme only available if the OS widget set has one.
On 5/28/2016 10:27 AM, Joseph Rushton Wakeling via Digitalmars-d wrote:
On Saturday, 28 May 2016 at 01:48:08 UTC, Jonathan M Davis wrote:
On Friday, May 27, 2016 23:42:24 Seb via Digitalmars-d wrote:
So what about the convention to explicitely declare a `.transient`
enum member on a range, if
On 05/28/2016 09:54 PM, chmike wrote:
The only inconvenience left is that we can't have mutable references
to immutable objects.
There is std.typecons.Rebindable for that.
On Saturday, 28 May 2016 at 20:43:00 UTC, pineapple wrote:
On Saturday, 28 May 2016 at 16:25:02 UTC, Seb wrote:
If you are interested how it works under the hood - it's
pretty simple & elegant:
I checked up on the phobos implementation and found that arrays
are mutated when iterated over as
On Saturday, 28 May 2016 at 16:25:02 UTC, Seb wrote:
If you are interested how it works under the hood - it's pretty
simple & elegant:
I checked up on the phobos implementation and found that arrays
are mutated when iterated over as ranges, which didn't rest well
with me. Nor did the idea of
On Saturday, 28 May 2016 at 13:08:55 UTC, Basile B. wrote:
On Friday, 27 May 2016 at 17:49:18 UTC, Bauss wrote:
On Thursday, 26 May 2016 at 23:44:21 UTC, Basile B. wrote:
Mostly because an important feature of the library manager
was not compatible with DUB > v0.9.24. Otherwise almost
https://issues.dlang.org/show_bug.cgi?id=16087
ZombineDev changed:
What|Removed |Added
CC|
On Friday, 27 May 2016 at 20:20:36 UTC, chmike wrote:
I need to create an app wide singleton instance for my class.
The singleton is immutable, but I want to allow mutable
references to that singleton object so that I can do fast 'is'
tests.
I declared this
class Category
{
protected
On Thursday, 26 May 2016 at 21:10:30 UTC, bpr wrote:
On Thursday, 26 May 2016 at 18:53:35 UTC, Iakh wrote:
Functions with lambdas cannot be @nogc as far as they
allocates closures.
Counterexample:
// Note that this is NOT a good way to do numerical quadrature!
double integrate(scope double
On Saturday, 28 May 2016 at 19:09:09 UTC, Stefan Koch wrote:
On Saturday, 28 May 2016 at 17:27:17 UTC, Joseph Rushton
Wakeling wrote:
On Saturday, 28 May 2016 at 01:48:08 UTC, Jonathan M Davis
wrote:
On Friday, May 27, 2016 23:42:24 Seb via Digitalmars-d wrote:
So what about the convention to
On Saturday, 28 May 2016 at 17:50:30 UTC, Alex Parrill wrote:
On Saturday, 28 May 2016 at 10:58:05 UTC, maik klein wrote:
derelict-vulcan only works on windows, dvulkan doesn't have
the platform dependend surface extensions for xlib, xcb, w32
and wayland. Without them Vulkan is unusable for
On Saturday, 28 May 2016 at 17:27:17 UTC, Joseph Rushton Wakeling
wrote:
On Saturday, 28 May 2016 at 01:48:08 UTC, Jonathan M Davis
wrote:
On Friday, May 27, 2016 23:42:24 Seb via Digitalmars-d wrote:
So what about the convention to explicitely declare a
`.transient` enum member on a range, if
On Saturday, 28 May 2016 at 18:39:20 UTC, Joseph Rushton Wakeling
wrote:
On Saturday, 28 May 2016 at 18:30:03 UTC, Seb wrote:
On Saturday, 28 May 2016 at 18:11:16 UTC, Joseph Rushton
Wakeling wrote:
Copyright is extremely under-reported for Phobos, in my
experience -- authors of significant
On 5/28/2016 5:04 AM, Andrei Alexandrescu wrote:
So it harkens back to the original mistake: strings should NOT be arrays with
the respective primitives.
An array of code units provides consistency, predictability, flexibility, and
performance. It's a solid base upon which the programmer can
On Friday, 27 May 2016 at 10:34:38 UTC, Kagamin wrote:
On Thursday, 26 May 2016 at 18:53:35 UTC, Iakh wrote:
void g() @nogc
{
catch scope(void);
int[N] arr = [/*...*/];
arr[].sort!((a, b) => a > b);
}
This compiles just fine and doesn't allocate:
void g() @nogc
{
int[2] arr =
https://issues.dlang.org/show_bug.cgi?id=16088
Issue ID: 16088
Summary: Parse error for import expression in statement
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
On Saturday, 28 May 2016 at 18:30:03 UTC, Seb wrote:
On Saturday, 28 May 2016 at 18:11:16 UTC, Joseph Rushton
Wakeling wrote:
Copyright is extremely under-reported for Phobos, in my
experience -- authors of significant components of modules do
not necessarily add their name to the copyright
On Saturday, 28 May 2016 at 18:11:16 UTC, Joseph Rushton Wakeling
wrote:
Copyright is extremely under-reported for Phobos, in my
experience -- authors of significant components of modules do
not necessarily add their name to the copyright list or even
the author list.
Yes that's a huge
On Saturday, 28 May 2016 at 16:23:41 UTC, Nick Sabalausky wrote:
It'd be nice if there was a pre-defined set of dark highlighter
attributes that could just be selected and then used
out-of-the-box or as a starting point. In general, manually
adjusting editor themes can get to be a pain,
On Saturday, 28 May 2016 at 17:50:46 UTC, Seb wrote:
Now that D foundation finally got its own page [1], it's
probably time to start this dicussion.
Is it safe to assume that the entire Phobos source code (except
for the external C modules), belongs to the D foundation?
No, not at all, and
One thing that confused me a lot in the beginning, is that every
Phobos module has it's own copyright - I am not a lawyer, but it
sounded for me pretty weird that in theory I could get sued by a
lot of Oracle-like patent trolls.
I imagine the same effect also for companies when they read a
On Saturday, 28 May 2016 at 10:58:05 UTC, maik klein wrote:
derelict-vulcan only works on windows, dvulkan doesn't have the
platform dependend surface extensions for xlib, xcb, w32 and
wayland. Without them Vulkan is unusable for me.
I really don't care what I use, I just wanted something
Never mind. D was fine. Needed an alureUpdate() to trigger the
call back.
On Saturday, 28 May 2016 at 01:48:08 UTC, Jonathan M Davis wrote:
On Friday, May 27, 2016 23:42:24 Seb via Digitalmars-d wrote:
So what about the convention to explicitely declare a
`.transient` enum member on a range, if the front element
value can change?
Honestly, I don't think that
On Saturday, 28 May 2016 at 14:18:10 UTC, Chris wrote:
I used dmd, because I don't have ldc on my laptop. qznc's find
is clearly the winner.
DMD performance feels flaky to me.
If performance is important, you should use ldc or gdc.
Alternatively, you are Walter Bright and simply optimize
On Saturday, 28 May 2016 at 12:47:59 UTC, Andrei Alexandrescu
wrote:
On 5/28/16 6:56 AM, qznc wrote:
The sentinel value is `needleBack+1`, but range elements need
not
support addition. Finding a sentinel is hard and most
certainly requires
more assumptions about the ranges.
No need for a
On Saturday, 28 May 2016 at 16:24:21 UTC, chmike wrote:
In my long quest to implement a flyweight pattern with objects
instantiated at compile time, I was indirectly notified of the
possible problem of synchronization.
In a flyweight pattern the user has the impression there are
distinct
https://issues.dlang.org/show_bug.cgi?id=16087
Issue ID: 16087
Summary: Alignment (.alignof) and stack space incorrect for
SIMD types.
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
On Friday, 27 May 2016 at 14:59:25 UTC, Adam D. Ruppe wrote:
On Friday, 27 May 2016 at 14:54:30 UTC, pineapple wrote:
I've encountered one remarkable difference: The phobos
function accepts arrays and mine does not.
add `import std.array;` i think to your module and it should
make arrays
On 05/28/2016 06:09 PM, chmike wrote:
In the following instruction of the above commit, what effect has the []
after init ?
_store[0 .. __traits(classInstanceSize, T)] = typeid(T).init[];
T is a template argument that is a class derived from Error.
I couldn't find an explanation here
Also, just a minor wishlist thing, but it'd be nice if the currently
active file (or project name, or something) was prepended to the
window's title bar, so it's displays on people's taskbar. That comes in
handy when using multiple editor windows.
In my long quest to implement a flyweight pattern with objects
instantiated at compile time, I was indirectly notified of the
possible problem of synchronization.
In a flyweight pattern the user has the impression there are
distinct instances where in fact objects with the same state
(member
On 05/28/2016 09:08 AM, Basile B. wrote:
On Friday, 27 May 2016 at 17:49:18 UTC, Bauss wrote:
On Thursday, 26 May 2016 at 23:44:21 UTC, Basile B. wrote:
Mostly because an important feature of the library manager was not
compatible with DUB > v0.9.24. Otherwise almost nothing.
See
On Saturday, 28 May 2016 at 08:47:48 UTC, Kagamin wrote:
For a trick of static mutable allocation see
https://github.com/dlang/druntime/pull/1325
In the following instruction of the above commit, what effect has
the [] after init ?
_store[0 .. __traits(classInstanceSize, T)] =
On Saturday, 28 May 2016 at 15:31:18 UTC, TheDGuy wrote:
On Saturday, 28 May 2016 at 15:29:36 UTC, TheDGuy wrote:
Thanks a lot for the fast hot fix, now everything works fine!
:) Great IDE!
Do you mind implementing an option to reset the layout to
default? Because i think i messed up and
On 05/28/2016 10:34 AM, Mike Parker wrote:
On Saturday, 28 May 2016 at 05:30:26 UTC, chmike wrote:
[...]
Is a static const Category c variable a TLS variable ?
Yes. All variables are TLS unless explicitly marked with __gshared or
shared.
I don't think that's true.
import core.thread;
On Saturday, 28 May 2016 at 15:29:36 UTC, TheDGuy wrote:
Thanks a lot for the fast hot fix, now everything works fine!
:) Great IDE!
Do you mind implementing an option to reset the layout to
default? Because i think i messed up and no i don't know how i
can get the file view for the
On Saturday, 28 May 2016 at 13:25:14 UTC, Basile B. wrote:
I've released a hot fix yesterday and now it works with latest
DUB tag (0.9.25).
But registering from the project that's loaded was already
working yesterday. I think that you have forgotten to choose
the right configuration to
On Saturday, 28 May 2016 at 11:26:23 UTC, Seb wrote:
On Saturday, 28 May 2016 at 11:02:37 UTC, Loïc HAMOT wrote:
Hello,
I am working on a C++ to D converter.
The project is opensource, on github :
https://github.com/lhamot/CPP2D
[...]
If somebody is interested to use this software, or to
On Saturday, 28 May 2016 at 14:11:56 UTC, Lodovico Giaretta wrote:
On Saturday, 28 May 2016 at 14:01:35 UTC, Era Scarecrow wrote:
Do you still want the template i'm building?
Thank you very much for your effort.
Please if you don't need it, don't make it, because I don't
know if I'll use
On 05/28/2016 02:43 PM, Lodovico Giaretta wrote:
struct S1
{
int doSomething() @safe
{
// do something safely
return 1;
}
}
struct S2
{
int doSomething() @system
{
// do something usafe
return 2;
}
}
auto doSomethingDumb(T)(ref
On Saturday, 28 May 2016 at 14:11:56 UTC, Lodovico Giaretta wrote:
On Saturday, 28 May 2016 at 14:01:35 UTC, Era Scarecrow wrote:
Do you still want the template i'm building?
Thank you very much for your effort.
Please if you don't need it, don't make it, because I don't
know if I'll use
On Saturday, 28 May 2016 at 12:47:59 UTC, Andrei Alexandrescu
wrote:
On 5/28/16 6:56 AM, qznc wrote:
The sentinel value is `needleBack+1`, but range elements need
not
support addition. Finding a sentinel is hard and most
certainly requires
more assumptions about the ranges.
No need for a
On Saturday, 28 May 2016 at 14:01:35 UTC, Era Scarecrow wrote:
On Saturday, 28 May 2016 at 13:10:56 UTC, Lodovico Giaretta
wrote:
The only problem is that these structures are parameterized,
and the type parameters may have unsafe operations that I use.
Do you still want the template i'm
Short description
A database engine for quick and easy integration into any D
program. Full compatibility with D types and ranges.
Design Goals (none is accomplished yet)
- ACID
- No external dependencies
- Single file storage
- Multithread support
- Suitable for
On Saturday, 28 May 2016 at 13:10:56 UTC, Lodovico Giaretta wrote:
The only problem is that these structures are parameterized,
and the type parameters may have unsafe operations that I use.
Do you still want the template i'm building? It doesn't like
stack frame pointers, but will work with
On Friday, 27 May 2016 at 21:31:48 UTC, David Nadlinger wrote:
Just about the only reason I could think of for this to happen
is if the compiler fails to inline the range primitives from
std.array. Otherwise, the loops should be pretty much
equivalent to LLVM's optimiser.
This is so
I really like D's syntax for lambdas and I usually write code
like this
auto v = validationLayers[].all!((layerName){
return layerProps[].count!((layer){
return strcmp(cast(const(char*))layer.layerName, layerName)
== 0;
}) > 0;
});
But this gives you basically 0 helpful
On Friday, 27 May 2016 at 19:30:10 UTC, TheDGuy wrote:
On Thursday, 26 May 2016 at 22:15:17 UTC, Basile B. wrote:
gfm doesn't yield a .lib because of this:
https://github.com/d-gamedev-team/gfm/blob/master/dub.json#L22
it should be "library" or staticLibrary or "sourceLibrary"
thus it can't
On Saturday, 28 May 2016 at 13:10:56 UTC, Lodovico Giaretta wrote:
On Saturday, 28 May 2016 at 13:03:10 UTC, Adam D. Ruppe wrote:
What kind of pointer usage do you have? Remember that basic &
and * operations ARE @safe.
If you have more internally, you might be able to wrap them up
in an
On Saturday, 28 May 2016 at 13:03:10 UTC, Adam D. Ruppe wrote:
What kind of pointer usage do you have? Remember that basic &
and * operations ARE @safe.
If you have more internally, you might be able to wrap them up
in an @trusted function to again allow inference to work.
Ouch! I was under
On Saturday, 28 May 2016 at 04:15:45 UTC, Manu wrote:
This is only true for the owner. If we had 'scope', or
something like
it (ie, borrowing in rust lingo), then the fat slice wouldn't
need to
be passed around
Right, I agree - if we keep the slice just the way it is now, it
all still works
On Friday, 27 May 2016 at 17:49:18 UTC, Bauss wrote:
On Thursday, 26 May 2016 at 23:44:21 UTC, Basile B. wrote:
Mostly because an important feature of the library manager was
not compatible with DUB > v0.9.24. Otherwise almost nothing.
See
On Saturday, 28 May 2016 at 11:50:33 UTC, Lodovico Giaretta wrote:
Let's say I have a generic function that uses pointers. It will
be inferred @system by the compiler, but I know that the
pointer usage can be @trusted.
What kind of pointer usage do you have? Remember that basic & and
*
On Saturday, 28 May 2016 at 12:45:21 UTC, Era Scarecrow wrote:
Fourth, you could create a helper function/template that
cycles through a struct of your choice and tells you if any of
it's methods fail to be safe. This will require a little more
work, but it could be used as a full insurance
On Saturday, 28 May 2016 at 12:45:21 UTC, Era Scarecrow wrote:
On Saturday, 28 May 2016 at 12:25:14 UTC, Lodovico Giaretta
wrote:
The problem is that T is a type, and I should check for safety
of every method of T that I'm using in my function. This does
not scale well, and if I change the
On Saturday, 28 May 2016 at 12:25:14 UTC, Lodovico Giaretta wrote:
The problem is that T is a type, and I should check for safety
of every method of T that I'm using in my function. This does
not scale well, and if I change the body of the function to use
a new method, I may forget to add it
On 5/28/16 6:56 AM, qznc wrote:
The sentinel value is `needleBack+1`, but range elements need not
support addition. Finding a sentinel is hard and most certainly requires
more assumptions about the ranges.
No need for a sentinel really so long as you first search for the last
element of the
On Saturday, 28 May 2016 at 12:33:28 UTC, Era Scarecrow wrote:
On Saturday, 28 May 2016 at 12:25:14 UTC, Lodovico Giaretta
wrote:
On Saturday, 28 May 2016 at 11:57:09 UTC, Era Scarecrow wrote:
auto doSomethingDumb(T)(ref T t) if(isSafe!(T))
The problem is that T is a type, and I should
On Friday, 27 May 2016 at 18:11:22 UTC, Andrei Alexandrescu wrote:
On 5/27/16 10:15 AM, Chris wrote:
It has happened to me that characters like "é" return length
== 2
Would normalization make length 1? -- Andrei
No, I've tried it. I think dchar[] returns one or you check by
grapheme.
On Saturday, 28 May 2016 at 12:25:14 UTC, Lodovico Giaretta wrote:
On Saturday, 28 May 2016 at 11:57:09 UTC, Era Scarecrow wrote:
auto doSomethingDumb(T)(ref T t) if(isSafe!(T))
The problem is that T is a type, and I should check for safety
of every method of T that I'm using in my
On Saturday, 28 May 2016 at 11:02:37 UTC, Loïc HAMOT wrote:
Hello,
I am working on a C++ to D converter.
The project is opensource, on github :
https://github.com/lhamot/CPP2D
[...]
Interesting!
On Saturday, 28 May 2016 at 11:57:09 UTC, Era Scarecrow wrote:
Use traits..
https://dlang.org/phobos/std_traits.html#isSafe
so your function becomes (i believe)
auto doSomethingDumb(T)(ref T t) if(isSafe!(T))
The problem is that T is a type, and I should check for safety of
every
On Friday, 27 May 2016 at 23:31:24 UTC, Stefan Koch wrote:
On Monday, 9 May 2016 at 16:57:39 UTC, Stefan Koch wrote:
Hi Guys,
I have been looking into the DMD now to see what I can do
about CTFE.
I will post more details as soon as I dive deeper into the
code.
Update :
int bug6498(int x)
On Saturday, 28 May 2016 at 11:57:09 UTC, Era Scarecrow wrote:
auto doSomethingDumb(T)(ref T t) if(isSafe!(T))
Should also probably test for a function or delegate. So...?
auto doSomethingDumb(T)(ref T t)
if(isSafe!T && (isFunctionPointer!T || isDelegate!T)) {
T* pt =
On 5/28/16 6:59 AM, Marc Schütz wrote:
The fundamental problem is choosing one of those possibilities over the
others without knowing what the user actually wants, which is what both
BEFORE and AFTER do.
OK, that's a fair argument, thanks. So it seems there should be no
"default" way to
On Saturday, 28 May 2016 at 11:50:33 UTC, Lodovico Giaretta wrote:
Is there any way around this? Any way to declare a function
@trusted as long as the methods of the template argument are at
least @trusted?
Thank you in advance.
Use traits..
https://dlang.org/phobos/std_traits.html#isSafe
Let's say I have a generic function that uses pointers. It will
be inferred @system by the compiler, but I know that the pointer
usage can be @trusted.
The problem is that if I declare the function @trusted, I'm also
implicitly trusting any call to @system methods of the template
parameter.
On Saturday, 28 May 2016 at 11:02:37 UTC, Loïc HAMOT wrote:
Hello,
I am working on a C++ to D converter.
The project is opensource, on github :
https://github.com/lhamot/CPP2D
[...]
Very nice! Looking at your examples, you should know that the
default protection in D classes is public.
On Saturday, 28 May 2016 at 04:28:16 UTC, Manu wrote:
On 27 May 2016 at 23:32, Andrei Alexandrescu via Digitalmars-d
wrote:
On 5/27/16 7:07 AM, Marc Schütz wrote:
It should _safely_ convert to `const(char)[]`.
That is not possible, sorry. -- Andrei
It should
On Friday, 27 May 2016 at 13:32:30 UTC, Andrei Alexandrescu wrote:
On 5/27/16 7:07 AM, Marc Schütz wrote:
On Thursday, 26 May 2016 at 16:11:22 UTC, Andrei Alexandrescu
wrote:
RFC: what primitives should RCStr have?
It should _safely_ convert to `const(char)[]`.
That is not possible, sorry.
On Saturday, 28 May 2016 at 11:02:37 UTC, Loïc HAMOT wrote:
Hello,
I am working on a C++ to D converter.
The project is opensource, on github :
https://github.com/lhamot/CPP2D
Clang is used to parse the C++ code and get the abstract syntax
tree. Then I can visit the AST to print it to D
On Saturday, 28 May 2016 at 08:47:48 UTC, Kagamin wrote:
For a trick of static mutable allocation see
https://github.com/dlang/druntime/pull/1325
Thank you that looks promising. I'll study an experiment with the
code.
If I would like that the instances are not in TLS, can I use the
following
On Friday, 27 May 2016 at 13:34:33 UTC, Andrei Alexandrescu wrote:
On 5/27/16 6:56 AM, Marc Schütz wrote:
It is not, which has been shown by various posts in this
thread.
Couldn't quite find strong arguments. Could you please be more
explicit on which you found most convincing? -- Andrei
1 - 100 of 119 matches
Mail list logo