I learned about Fibers on D, and now i´m starting to read about
it (Threads/Fibers/Coroutines) etc.
But when i try to make something usefull with it i just fail to
see the real advantage over a normal structured programming
without it.
Can someone show some code with usefull/unique/advantageou
On Monday, 13 June 2016 at 00:57:11 UTC, Alex Parrill wrote:
Also note that Vibe.d, the largest fiber-based framework D has
to offer, is capable of running several coroutines in parallel
on multiple threads, meaning you must use the same level of
synchronization as if you were using threads.
LLVM D compiler (1a7070): based on DMD v2.071.2-b2 and LLVM
3.9.0git-fbbabf3
command: dub run --build=release --arch=x86_64
--compiler=D:/ldc/bin/ldc2.exe
Output:
Performing "release" build using D:/ldc/bin/ldc2.exe for x86_64.
derelict-util 2.0.6: building configuration "library"...
Error:
struct Test{
immutable size_t id;
}
Test[string] dict;
Test[] array;
void main(){
array~=Test(1);//work
dict["teste"] = Test(1); //fail ??
}
"Error: cannot modify struct dict["teste"] Test with immutable
members"
Why?
On Thursday, 6 October 2016 at 02:09:44 UTC, Adam D. Ruppe wrote:
On Thursday, 6 October 2016 at 01:23:35 UTC, Patric Dexheimer
wrote:
Why?
Because you'd be overwriting that immutable member. Structs
just put structure around their contents, but it doesn't change
their nature. That struct is
On Thursday, 6 October 2016 at 03:48:22 UTC, Mike Parker wrote:
On Thursday, 6 October 2016 at 03:05:18 UTC, Patric Dexheimer
wrote:
[...]
There's a difference between initialization and assignment.
[...]
On Thursday, 6 October 2016 at 03:48:22 UTC, Mike Parker wrote:
On Thursday, 6 Octobe
There is a way to capture the return type/parameters of a
templated function like:
void add(T)(T t){}
Parameters!add;
Yes, i know that the template don´t have any type until
explicitly coded like:
Parameters!(add!int);
Or another solution like getting the string function declaration
will be
On Thursday, 13 October 2016 at 18:01:25 UTC, Ali Çehreli wrote:
On 10/13/2016 07:19 AM, Patric Dexheimer wrote:
There is a way to capture the return type/parameters of a
templated
function like:
void add(T)(T t){}
Parameters!add;
Yes, i know that the template don´t have any type until
expli
On Thursday, 13 October 2016 at 21:07:17 UTC, ketmar wrote:
On Thursday, 13 October 2016 at 20:52:09 UTC, Patric Dexheimer
wrote:
So for now my idea is to brute force the numbers of arguments
with 'compiles' trait or trying to get the sourcecode somehow.
depending on source code form (even if
On Saturday, 19 November 2016 at 00:47:00 UTC, ketmar wrote:
On Saturday, 19 November 2016 at 00:28:36 UTC, Stefan Koch
wrote:
Please don't post non-d.
it slipped accidentally, sorry. ;-)
for OP: `uint[2] a = [42, 69];` is the correct syntax.
"uint[$] a = [42, 69];"
haha for a moment I thou
On Thursday, 8 December 2016 at 12:10:55 UTC, Andrey wrote:
On Thursday, 8 December 2016 at 11:09:12 UTC, ketmar wrote:
what can be done, tho, is article (or series of articles)
describing what exactly druntime is, how it is compared to
libc and libc++, why it doesn't hurt at all, how to do
struct Base(T){
static T opCall(Args...)( Args args ){
writeln(args);
writeln("opCall");
T t;
return t;
}
}
struct Data{
Base!Data b;
alias b this;
}
void main()
{
// Expected: opCall o
On Friday, 5 May 2017 at 13:19:03 UTC, Adam D. Ruppe wrote:
On Friday, 5 May 2017 at 13:05:35 UTC, Patric Dexheimer wrote:
[...]
You should never use static opCall. They are ambiguous with
non-static opCall as well as with constructors. It is a buggy
mess that should never have been in the l
1)
struct T{
void f1(){writeln("default f1");}
void f1(int x){writeln("overload f1");}
}
//main
T().f1();
T().f1(1);
//compiles and output as expected.
2)
mixin template add_function(){
void f1(){writeln("default f1");}
}
struct T{
mixin add_function;
void f1(int x){writeln
On Wednesday, 17 May 2017 at 13:26:36 UTC, Adam D. Ruppe wrote:
On Wednesday, 17 May 2017 at 13:13:06 UTC, Patric Dexheimer
wrote:
Function overloads coming from mixin templates are not being
detected ?
A name being present in the struct means that name is NOT
pulled from the mixin template.
Fresh install of GDC. (tried with 32x ad 32_64x)
GDC: 6.3.0
DUB: 1.3.0
dub run --build=release --arch=x86 --compiler=gdc
(...)
Running .\main
Failed to spawn new process (%1 is not a valid win32 application)
On Monday, 19 June 2017 at 23:55:54 UTC, rjframe wrote:
On Mon, 19 Jun 2017 14:08:56 +, Patric Dexheimer wrote:
Fresh install of GDC. (tried with 32x ad 32_64x)
GDC: 6.3.0 DUB: 1.3.0
dub run --build=release --arch=x86 --compiler=gdc
(...)
Running .\main Failed to spawn new process (%1 is
On Wednesday, 21 June 2017 at 15:55:27 UTC, David Nadlinger wrote:
On Monday, 19 June 2017 at 14:08:56 UTC, Patric Dexheimer wrote:
Fresh install of GDC. (tried with 32x ad 32_64x)
Where did you get the GDC executable from? The GDC project
doesn't currently offer any official builds that targ
18 matches
Mail list logo