https://issues.dlang.org/show_bug.cgi?id=19279
--- Comment #1 from Manu ---
Conversation: https://github.com/dlang/dmd/pull/8782
Reveals that `scope` is also necessary to guarantee that the promoted reference
does not escape.
Promotion is safe so long as no promoted-reference outlives the call
Typo: to not* be a warning
On Wednesday, 26 September 2018 at 16:29:24 UTC, Neia Neutuladh
wrote:
* If you encounter a mixin in the module you're analyzing, give
up.
Unfortunately, our code uses mixins heavily, so I don't think
this would be useful for us.
In any case, I fundamentally don't consider the approach of
https://issues.dlang.org/show_bug.cgi?id=19280
Issue ID: 19280
Summary: Remove unnecessary error checks in
core.time.currSystemTick
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
On Monday, 1 October 2018 at 04:22:24 UTC, Manu wrote:
Ah, good point. So, it could only be allowed if scope...
struct Bob
{
void setThing() shared scope;
}
That's going to require far-reaching proliferation of `scope`.
Do we infer `scope` like the other attributes?
For templates (either
On Sun, Sep 30, 2018 at 9:00 PM Nicholas Wilson via Digitalmars-d
wrote:
>
> On Monday, 1 October 2018 at 03:33:16 UTC, Manu wrote:
> > On Sun, Sep 30, 2018 at 8:20 PM Nicholas Wilson via
> > Digitalmars-d wrote:
> >>
> >> On Monday, 1 October 2018 at 02:29:40 UTC, Manu wrote:
> >> > struct Bob
https://issues.dlang.org/show_bug.cgi?id=19279
Issue ID: 19279
Summary: mutable does not promote to shared
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority:
On Monday, 1 October 2018 at 03:33:16 UTC, Manu wrote:
On Sun, Sep 30, 2018 at 8:20 PM Nicholas Wilson via
Digitalmars-d wrote:
On Monday, 1 October 2018 at 02:29:40 UTC, Manu wrote:
> struct Bob
> {
> void setThing() shared;
> }
>
> As I understand, `shared` attribution intends to
On Sun, Sep 30, 2018 at 8:20 PM Nicholas Wilson via Digitalmars-d
wrote:
>
> On Monday, 1 October 2018 at 02:29:40 UTC, Manu wrote:
> > struct Bob
> > {
> > void setThing() shared;
> > }
> >
> > As I understand, `shared` attribution intends to guarantee that
> > I dun
> > synchronisation
On Monday, 1 October 2018 at 02:29:40 UTC, Manu wrote:
struct Bob
{
void setThing() shared;
}
As I understand, `shared` attribution intends to guarantee that
I dun
synchronisation internally.
This method is declared shared, so if I have shared instances,
I can
call it... because it must
struct Bob
{
void setThing() shared;
}
As I understand, `shared` attribution intends to guarantee that I dun
synchronisation internally.
This method is declared shared, so if I have shared instances, I can
call it... because it must handle thread-safety internally.
void f(ref shared Bob a, ref
https://issues.dlang.org/show_bug.cgi?id=19278
--- Comment #1 from Manu ---
String expressions don't work (obviously)
```
extern (C++, "std" ~ (UseCxx11Namespace ? "::__1" : "")):
```
--
https://issues.dlang.org/show_bug.cgi?id=19278
Manu changed:
What|Removed |Added
Keywords||C++
Hardware|x86
https://issues.dlang.org/show_bug.cgi?id=19278
Issue ID: 19278
Summary: extern(C++, "name") doesn't accept expressions
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: enhancement
https://issues.dlang.org/show_bug.cgi?id=19258
--- Comment #5 from Nicholas Wilson ---
For structs if no destructor is given then no destructor is compiled.
struct S
{
this(int i){}
}
extern(C++) S foo()
{
return S(3);
}
void main()
{
import std.traits;
import std.stdio;
On Sunday, 30 September 2018 at 22:17:05 UTC, aliak wrote:
On Saturday, 29 September 2018 at 19:27:29 UTC, Paul Backus
wrote:
I agree that this is useful, but why not just return a naked
`SumType!(string, JSONError)` in that case? Is there some
additional value added by the `Expect` wrapper
On Saturday, 29 September 2018 at 19:27:29 UTC, Paul Backus wrote:
On Saturday, 29 September 2018 at 12:40:14 UTC, aliak wrote:
I.e. by allowing you to define the unexepcted you could for
instance:
enum JSONError {
invalidKey, notString, notNumber
}
auto a = parse(jsonData);
On Thursday, 20 September 2018 at 14:57:42 UTC, Atila Neves wrote:
If you've never heard of automem before, I wrote it to have
C++-style smart pointers in D that I could use in @nogc code:
http://code.dlang.org/packages/automem
Sorry for asking here.
Shouldn't this code work?
import
On Sunday, 30 September 2018 at 19:03:17 UTC, Per Nordlöw wrote:
How can I link my dmd-compiled program with a specific version
of the druntime?
druntime is within libphobos. So you must change this.
I need this when experimenting with a new GC.
Did you try what i proposed earlier ? Until
How can I link my dmd-compiled program with a specific version of
the druntime?
I need this when experimenting with a new GC.
https://issues.dlang.org/show_bug.cgi?id=19277
Issue ID: 19277
Summary: storage class used in alias statement has no effect
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
https://issues.dlang.org/show_bug.cgi?id=19258
--- Comment #4 from Илья Ярошенко ---
(In reply to Nicholas Wilson from comment #3)
> I'm not sure what the desired effect of @disabling the destructor is
> supposed to achieve? If this is for C++ integration either: a) don't declare
> it or b) if
On Sunday, 30 September 2018 at 14:06:20 UTC, Vinod K Chandran
wrote:
Thanks. It worked.
I would like to compile this as a gui. Now it starts with the
cmd. Google search didn't gave me the link i want. Any help ?
With the default OPTLINK linker:
dmd -L/SUBSYSTEM:windows app.d
In this
On Sunday, 30 September 2018 at 12:32:08 UTC, kinke wrote:
1) `asm {}` is supported by DMD and LDC, but not by GDC.
Good to know.
Guess I will be targeting DMD and LDC then.
4) For x86_64, there are 2 (completely different) ABIs, Win64
and the System V one. Specs can be found online.
In
On Sunday, 30 September 2018 at 12:07:53 UTC, Basile B. wrote:
On Sunday, 30 September 2018 at 11:53:17 UTC, Basile B. wrote:
Hello, i think this should be here
(https://dlang.org/spec/abi.html) because myself i never
remember them correctly without playing a bit with a
disassembler.
After
On Sunday, 30 September 2018 at 13:21:59 UTC, Adam D. Ruppe wrote:
On Sunday, 30 September 2018 at 13:17:33 UTC, Vinod K Chandran
wrote:
Thanks for the reply. But it says "toUTFz" is not defined. do
i missing any import statement ?
import std.utf;
Thanks. It worked.
I would like to compile
On Sunday, 30 September 2018 at 13:17:33 UTC, Vinod K Chandran
wrote:
On Sunday, 30 September 2018 at 12:48:17 UTC, Adam D. Ruppe
wrote:
so usage is:
toUTFz!(wchar*)(your_string_here);
If passing string literals to Windows, you can put a w at the
end, like:
MessageBoxW(null, "Hello"w,
On Sunday, 30 September 2018 at 13:17:33 UTC, Vinod K Chandran
wrote:
Thanks for the reply. But it says "toUTFz" is not defined. do i
missing any import statement ?
import std.utf;
On Sunday, 30 September 2018 at 12:48:17 UTC, Adam D. Ruppe wrote:
so usage is:
toUTFz!(wchar*)(your_string_here);
If passing string literals to Windows, you can put a w at the
end, like:
MessageBoxW(null, "Hello"w, "World"w, 0); // note the ""w
Thanks for the reply. But it says
On Sunday, 30 September 2018 at 12:31:20 UTC, Dennis wrote:
"LTO now basically working for Win64 too"
That's great! Why the "basically"?
Just a precaution as it hasn't been tested extensively yet;
Guillaume Piolat (p0nce) successfully tested it with his
commercial codebase though, so it's
On Sunday, 30 September 2018 at 06:56:41 UTC, bauss wrote:
There is function that does it for you called toStringz()
https://dlang.org/library/std/string/to_stringz.html
Not really best for Windows. That's for calling C functions with
char*, for Windows, you should be working with wchar*
https://issues.dlang.org/show_bug.cgi?id=19276
ki...@gmx.net changed:
What|Removed |Added
CC||ki...@gmx.net
--- Comment #1 from
"LTO now basically working for Win64 too"
That's great! Why the "basically"?
On Saturday, 29 September 2018 at 19:00:09 UTC, kinke wrote:
* New, Easy::jit-like interface for dynamic/JIT compilation.
What are the applications of that? Is there a code sample I can
check out?
On Sunday, 30 September 2018 at 10:46:33 UTC, Sjoerd Nijboer
wrote:
I'm kinda puzzled.
I'm having trouble getting started with inline asm in D.
Suppowse I have the following:
void Foo(MyStrunct* first_arg, MyStrunct* second_arg)
{
asm
{
naked;
version(X86)
{
On Sunday, 30 September 2018 at 11:53:17 UTC, Basile B. wrote:
On Sunday, 30 September 2018 at 10:46:33 UTC, Sjoerd Nijboer
wrote:
[...]
Hello, i think this should be here
(https://dlang.org/spec/abi.html) because myself i never
remember them correctly without playing a bit with a
https://issues.dlang.org/show_bug.cgi?id=19276
Issue ID: 19276
Summary: Document accurately calling conventions and demo them
in inline asm
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
On Sunday, 30 September 2018 at 10:46:33 UTC, Sjoerd Nijboer
wrote:
I'm kinda puzzled.
I'm having trouble getting started with inline asm in D.
Suppowse I have the following:
void Foo(MyStrunct* first_arg, MyStrunct* second_arg)
{
asm
{
naked;
version(X86)
{
On Sunday, 30 September 2018 at 09:40:10 UTC, Per Nordlöw wrote:
I'm gonna play around with creating a GC that alleviates some
of the uses described in
https://olshansky.me/gc/runtime/dlang/2017/06/14/inside-d-gc.html
What's the most effective way of incrementally developing a new
pluggable
On Sunday, 30 September 2018 at 09:30:38 UTC, Vijay Nayar wrote:
Is there a way to either have a constant reference to a class
that can be set to a new value, or is there a way to convert
the class variable to a class pointer?
Alex has mentioned Rebindable, which is the answer to your first
I'm kinda puzzled.
I'm having trouble getting started with inline asm in D.
Suppowse I have the following:
void Foo(MyStrunct* first_arg, MyStrunct* second_arg)
{
asm
{
naked;
version(X86)
{
/* Do something with the content of I and J. */
}
On Sunday, 30 September 2018 at 10:28:25 UTC, Alex wrote:
On Sunday, 30 September 2018 at 09:30:38 UTC, Vijay Nayar wrote:
Is there a way to either have a constant reference to a class
that can be set to a new value, or is there a way to convert
the class variable to a class pointer?
I
On Sunday, 30 September 2018 at 09:30:38 UTC, Vijay Nayar wrote:
Is there a way to either have a constant reference to a class
that can be set to a new value, or is there a way to convert
the class variable to a class pointer?
For example:
void main()
{
class Thing {}
class
I'm gonna play around with creating a GC that alleviates some of
the uses described in
https://olshansky.me/gc/runtime/dlang/2017/06/14/inside-d-gc.html
What's the most effective way of incrementally developing a new
pluggable GC for druntime with regards to prevention of
On Sunday, 30 September 2018 at 09:16:42 UTC, Nicholas Wilson
wrote:
On Sunday, 30 September 2018 at 07:29:00 UTC, Vijay Nayar wrote:
Second question. const class variables may not be re-assigned,
so if you need a variable that may be reassigned, but may
never modify the underlying object, a
On Sunday, 30 September 2018 at 07:29:00 UTC, Vijay Nayar wrote:
I have two brief questions.
Code that uses "new" to create struct objects appears to
compile and run. Is this an actual language feature, to get
structs on the heap?
void main()
{
struct S {int data = 1;}
S* s1
On Sunday, September 30, 2018 1:35:28 AM MDT Shachar Shemesh via
Digitalmars-d wrote:
> On 30/09/18 10:26, Manu wrote:
> > Other implementations make much better use of that built-in space by
> > not wasting 8 bytes on an interior pointer for small-strings.
>
> I will point out that a pointer
On 30/09/2018 8:29 PM, Vijay Nayar wrote:
I have two brief questions.
Code that uses "new" to create struct objects appears to compile and
run. Is this an actual language feature, to get structs on the heap?
void main()
{
struct S {int data = 1;}
S* s1 = new S();
S* s2 = s1;
On 30/09/18 10:26, Manu wrote:
Other implementations make much better use of that built-in space by
not wasting 8 bytes on an interior pointer for small-strings.
I will point out that a pointer that *sometimes* points to an internal
member was one of the use cases I documented when I
I have two brief questions.
Code that uses "new" to create struct objects appears to compile
and run. Is this an actual language feature, to get structs on
the heap?
void main()
{
struct S {int data = 1;}
S* s1 = new S();
S* s2 = s1;
S s3 = *s1; // Still
On Sat, Sep 29, 2018 at 11:50 PM Walter Bright via Digitalmars-d
wrote:
>
> On 9/29/2018 9:34 PM, Manu wrote:
> > GNU's std::string implementation stores an interior pointer! >_<
> >
> > No other implementation does this. It's a really bad implementation
> > actually, quite inefficient. It could
On Sunday, 30 September 2018 at 06:56:41 UTC, bauss wrote:
On Sunday, 30 September 2018 at 06:33:47 UTC, rikki cattermole
wrote:
null terminated, nothing really special.
To elaborate on this.
There is function that does it for you called toStringz()
On Sunday, 30 September 2018 at 06:33:47 UTC, rikki cattermole
wrote:
No.
2. Can we use D strings in win api functions ?, If not, please
show me how to convert strings
null terminated, nothing really special.
Hi,
Thanks for the reply.
I somehow managed to display a messagebox with
On Sunday, 30 September 2018 at 06:33:47 UTC, rikki cattermole
wrote:
null terminated, nothing really special.
To elaborate on this.
There is function that does it for you called toStringz()
https://dlang.org/library/std/string/to_stringz.html
On 9/29/2018 9:34 PM, Manu wrote:
GNU's std::string implementation stores an interior pointer! >_<
No other implementation does this. It's a really bad implementation
actually, quite inefficient. It could make better use of its space for
small-strings if it wasn't wasting 8-bytes for an
On 30/09/2018 7:24 PM, Vinod K Chandran wrote:
Hi,
I would like to do some win api coding in D. I just taste the syntactic
sugar but cant do anything more. I have few questions.
1. Does WinMain is needed for a D program in order to use win api ?
No.
2. Can we use D strings in win api
Hi,
I would like to do some win api coding in D. I just taste the
syntactic sugar but cant do anything more. I have few questions.
1. Does WinMain is needed for a D program in order to use win api
?
2. Can we use D strings in win api functions ?, If not, please
show me how to convert strings
On Saturday, 29 September 2018 at 15:52:30 UTC, helxi wrote:
I'm writing a utility that checks for specific keyword(s) found
in the files in a given directory recursively. What's the best
strategy to avoid opening a bin file or some sort of garbage
dump? Check encoding of the given file?
If
On Saturday, September 29, 2018 10:34:20 PM MDT Manu via Digitalmars-d
wrote:
> Who knows about DIP 1014? (struct move hook)
> Is it well received? Is it likely to be accepted soon?
>
> I'm working on the std::string binding, it's almost finished... but
> then I hit a brick wall.
> GNU's
On Sunday, 30 September 2018 at 04:34:20 UTC, Manu wrote:
Who knows about DIP 1014? (struct move hook)
Is it well received? Is it likely to be accepted soon?
I'm working on the std::string binding, it's almost finished...
but
then I hit a brick wall.
GNU's std::string implementation stores an
59 matches
Mail list logo