On Tuesday, 19 December 2017 at 02:04:34 UTC, codephantom wrote:
writeln(S.j);
// Error: Instance symbols cannot be used through types.
I don't understand why you would say that is a bug.
I meant that the example is wrong, and a bug report should be
filed to fix the example.
Mike
On Tuesday, 19 December 2017 at 01:30:07 UTC, Mike Franklin wrote:
writeln(S.j);
// Error: Instance symbols cannot be used through types.
I don't understand why you would say that is a bug.
i.e.
//
import std.stdio;
struct S
{
int j;
}
void main()
{
On Monday, 18 December 2017 at 23:44:46 UTC, Michael wrote:
I have been looking at the following example found right at the
end of the section here:
https://dlang.org/spec/declaration.html#alias
struct S { static int i; }
S s;
alias a = s.i; // illegal, s.i is an expression
alias b = S.i;
On Monday, 18 December 2017 at 23:44:46 UTC, Michael wrote:
Hello,
I have been looking at the following example found right at the
end of the section here:
https://dlang.org/spec/declaration.html#alias
struct S { static int i; }
S s;
alias a = s.i; // illegal, s.i is an expression
alias b
On Monday, 18 December 2017 at 23:44:46 UTC, Michael wrote:
alias a = s.i; // illegal, s.i is an expression
Actually, as I understand it, the example provided in 10. is
legal (because it aliases a type), and the example provided in 3.
is illegal (because it aliases an expression)
perhaps
On Monday, 18 December 2017 at 23:44:46 UTC, Michael wrote:
alias a = s.i; // illegal, s.i is an expression
alias a = s.i; (this is an alias to a type, since s.i is an int)
Hence it is actually 'legal', as far as I understand.
i.e... "AliasDeclarations create a symbol that is an alias for
On 12/18/2017 03:54 PM, Ali Çehreli wrote:
On 12/18/2017 02:58 PM, Marc wrote:
Here's another experiment:
template FirstOf(T...) {
template otherwise(D) {
static if (T.length == 0) {
enum otherwise = D.init;
} else {
enum otherwise = T[0];
}
On 12/18/2017 02:58 PM, Marc wrote:
Imaginary code:
int index = FirstOrDefault!(int)(__traits(getAttributes, C.a));
In that case, if the tuple is empty, the value is the int's type default
value.
The method is defined as following:
template FirstOrDefault(X)(T...) {
static
Hello,
I have been looking at the following example found right at the
end of the section here:
https://dlang.org/spec/declaration.html#alias
struct S { static int i; }
S s;
alias a = s.i; // illegal, s.i is an expression
alias b = S.i; // ok
b = 4; // sets S.i to 4
and it runs
Imaginary code:
int index = FirstOrDefault!(int)(__traits(getAttributes, C.a));
In that case, if the tuple is empty, the value is the int's type
default value.
The method is defined as following:
template FirstOrDefault(X)(T...) {
static if(T.length > 0) {
enum
On Monday, 18 December 2017 at 22:36:44 UTC, WhatMeWorry wrote:
I've been using Dub for a while but from the very beginning I
decided to go with SDL 100% of the time, So I've got a dub.sdl
file like:
name "01_10_camera_view_space"
description "A minimal D application."
authors "kheaser"
On Friday, 15 December 2017 at 21:56:48 UTC, Steven Schveighoffer
wrote:
On 12/15/17 10:08 AM, Kagamin wrote:
Maybe this https://issues.dlang.org/show_bug.cgi?id=18084
Thanks for looking into this. I created a PR to fix.
Szabo, can you please try with this patch and see if it fixes
your
I've been using Dub for a while but from the very beginning I
decided to go with SDL 100% of the time, So I've got a dub.sdl
file like:
name "01_10_camera_view_space"
description "A minimal D application."
authors "kheaser"
copyright "Copyright © 2017, kheaser"
license "proprietary"
On Saturday, 16 December 2017 at 14:05:28 UTC, Vino wrote:
On Saturday, 16 December 2017 at 13:59:11 UTC, Vino wrote:
On Saturday, 16 December 2017 at 12:39:53 UTC, Kagamin wrote:
[...]
H, All,
Are are also getting the same exception on Windows after
updating the dmd to version v2.077.1,
On Monday, 18 December 2017 at 08:49:51 UTC, Binghoo Dang wrote:
On Monday, 18 December 2017 at 07:55:25 UTC, Andrey wrote:
Hello!
I have a question about creating native GUI applications for
Windows 7 or/and Windows 10.
I know that exist DWT, DlangUI and other... But I'm
interesting in
Ali,
Shouldn't this be a pull request for std.parallelism to be extended?
If the function is in std.algorithm, then people should not have to
write it for themselves in std.parallelism.
On Mon, 2017-12-18 at 11:01 -0800, Ali Çehreli via Digitalmars-d-learn
wrote:
>
[…]
> > Hi Ali,
> >
> >
On Monday, 18 December 2017 at 16:06:33 UTC, Jonathan Marler
wrote:
Trying to run the dmd test suite on windows, looks like Digital
Mars "make" doesn't work with the Makefile, I tried Gnu Make
3.81 but no luck with that either. Anyone know which version
of make it is supposed to work with on
On 12/18/2017 02:18 AM, Vino wrote:
On Sunday, 17 December 2017 at 20:00:53 UTC, Ali Çehreli wrote:
On 12/17/2017 08:11 AM, Vino wrote:
> As per the document form std.parallelism it states that we
can use
> taskPool.reduce so can we use the same for fold
(taskPool.fold) as
> basically both
On 12/18/17 7:20 AM, Szabo Bogdan wrote:
On Saturday, 16 December 2017 at 12:01:49 UTC, Steven Schveighoffer wrote:
On 12/16/17 5:12 AM, bauss wrote:
On Saturday, 16 December 2017 at 08:07:30 UTC, Szabo Bogdan wrote:
On Friday, 15 December 2017 at 21:56:48 UTC, Steven Schveighoffer
wrote:
On
On Monday, 18 December 2017 at 16:06:33 UTC, Jonathan Marler
wrote:
Trying to run the dmd test suite on windows, looks like Digital
Mars "make" doesn't work with the Makefile, I tried Gnu Make
3.81 but no luck with that either. Anyone know which version
of make it is supposed to work with on
Trying to run the dmd test suite on windows, looks like Digital
Mars "make" doesn't work with the Makefile, I tried Gnu Make 3.81
but no luck with that either. Anyone know which version of make
it is supposed to work with on windows? Is it supposed to work
on windows at all?
I understand that dll can be loaded dynamically, and static lib
is allow export functions than embedded to binaries. But what
difference in their structure? What stop to export needed
function from dynamic lib and embed it to bin?
On Monday, 18 December 2017 at 14:31:38 UTC, Kagamin wrote:
https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gcc/x86-Function-Attributes.html#index-functions-that-pop-the-argument-stack-on-x86-32-3
looks like gcc doesn't see it as OS dependent.
Thanks. I was playing around on asm.dlang.org and found
From https://gcc.godbolt.org/
__attribute__((stdcall))
int square(int num) {
return num * num;
}
_Z6squarei:
push ebp
mov ebp, esp
mov eax, DWORD PTR [ebp+8]
imul eax, DWORD PTR [ebp+8]
pop ebp
ret 4
https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gcc/x86-Function-Attributes.html#index-functions-that-pop-the-argument-stack-on-x86-32-3
looks like gcc doesn't see it as OS dependent.
On 2017-12-18 08:55, Andrey wrote:
Hello!
I have a question about creating native GUI applications for Windows 7
or/and Windows 10.
I know that exist DWT, DlangUI and other... But I'm interesting in
native GUI. If it will be C++ then I would use WinAPI from SDK.
DWT _is_ a native GUI, it
On Monday, 18 December 2017 at 10:52:22 UTC, Kagamin wrote:
On Sunday, 17 December 2017 at 13:36:15 UTC, Mike Parker wrote:
My limited testing on a 64-bit Linux VM shows no problems when
binding a C function as extern(C) or extern(Windows), and the
disassembly looks the same.
64-bit ABI
On 2017-12-17 20:45, Jonathan M Davis wrote:
That's pretty much just declaring manifest constants with braces so that you
don't repeat the keyword enum a bunch of times.
Anonymous enum is what the spec calls it and was available before
manifest constants.
--
/Jacob Carlborg
On Saturday, 16 December 2017 at 12:01:49 UTC, Steven
Schveighoffer wrote:
On 12/16/17 5:12 AM, bauss wrote:
On Saturday, 16 December 2017 at 08:07:30 UTC, Szabo Bogdan
wrote:
On Friday, 15 December 2017 at 21:56:48 UTC, Steven
Schveighoffer wrote:
On 12/15/17 10:08 AM, Kagamin wrote:
Maybe
On Monday, 18 December 2017 at 10:08:13 UTC, Andrey wrote:
Is core.sys.windows.windows equals fully to C WinApi, do you
know?
Should be enough for most things.
On Saturday, 16 December 2017 at 14:14:28 UTC, Vino wrote:
Yes, will give a try.
From,
Vino.B
well, this sort of gets there ;-)
// -
module test;
import std.stdio;
import std.variant;
import std.typecons;
import std.conv;
import std.string;
void main()
{
Variant[] arr;
auto
On Sunday, 17 December 2017 at 13:36:15 UTC, Mike Parker wrote:
My limited testing on a 64-bit Linux VM shows no problems when
binding a C function as extern(C) or extern(Windows), and the
disassembly looks the same.
64-bit ABI fixed calling convention proliferation, only one cc is
used
On Sunday, 17 December 2017 at 20:00:53 UTC, Ali Çehreli wrote:
On 12/17/2017 08:11 AM, Vino wrote:
> As per the document form std.parallelism it states that we
can use
> taskPool.reduce so can we use the same for fold
(taskPool.fold) as
> basically both are same with slight variation on seed
On Monday, 18 December 2017 at 09:45:38 UTC, Mike Parker wrote:
You can use the C Windows API out of the box:
Aaa, excelent! I always thought that first one should port winapi
to D and then use it...
Is core.sys.windows.windows equals fully to C WinApi, do you know?
On Monday, 18 December 2017 at 08:49:51 UTC, Binghoo Dang wrote:
You can use libuid which can be found here
https://code.dlang.org/packages/libuid.
It wrapped the native os gui for d, and it's cross-platform.
Nice...
But I want to use WinApi. Is it possible? Or what one should do
first to
On Monday, 18 December 2017 at 07:55:25 UTC, Andrey wrote:
Hello!
I have a question about creating native GUI applications for
Windows 7 or/and Windows 10.
I know that exist DWT, DlangUI and other... But I'm interesting
in native GUI. If it will be C++ then I would use WinAPI from
SDK.
And
hi Davis,
I read the std.bitmanip, and I tried to test the code like below:
```
import std.stdio;
import std.array;
import std.bitmanip;
void main(string[] args)
{
align(1) struct c {
ushort c1;
uint c2;
//ubyte[8] c3;
}
ubyte[] buffer;
auto ap =
On Monday, 18 December 2017 at 07:55:25 UTC, Andrey wrote:
Hello!
I have a question about creating native GUI applications for
Windows 7 or/and Windows 10.
I know that exist DWT, DlangUI and other... But I'm interesting
in native GUI. If it will be C++ then I would use WinAPI from
SDK.
And
On Monday, 18 December 2017 at 07:03:14 UTC, Andrew Benton wrote:
[snip]
Looking at dmd's gc profile, it looks like only
std.array.Appender!string has allocated enough to be the culprit.
End program memory was 110MB and the Appender!string had
allocated 127MB totaly with Appender!(Json[])
Hello!
I have a question about creating native GUI applications for
Windows 7 or/and Windows 10.
I know that exist DWT, DlangUI and other... But I'm interesting
in native GUI. If it will be C++ then I would use WinAPI from SDK.
And what about D? What should I do? Make some kind of wrapper
40 matches
Mail list logo