On Thursday, 27 October 2016 at 13:37:29 UTC, Steven
Schveighoffer wrote:
Hm... what about:
import std.traits: Parameters;
auto mySpawn(F)(F func, Parameters!F params)
{
static auto callIt(F func, Parameters!F params)
{
try
{
return func(params);
}
On Friday, 28 October 2016 at 06:21:38 UTC, Johan Engelen wrote:
On Friday, 28 October 2016 at 05:16:45 UTC, Basile B. wrote:
Here are the specifications of token strings:
"Token strings open with the characters q{ and close with the
token }. In between must be valid D tokens. The { and }"
S
On Friday, 28 October 2016 at 05:16:45 UTC, Basile B. wrote:
Here are the specifications of token strings:
"Token strings open with the characters q{ and close with the
token }. In between must be valid D tokens. The { and }"
So we can deduce that any invalid D token inside a token string
wi
Here are the specifications of token strings:
"Token strings open with the characters q{ and close with the
token }. In between must be valid D tokens. The { and }"
So we can deduce that any invalid D token inside a token string
will lead to a compilation error. Indeed:
void main()
{
en
I found http://arsdnet.net/this-week-in-d/2016-aug-07.html
Maybe it's helps me.
On Friday, 28 October 2016 at 03:38:05 UTC, dm wrote:
On Thursday, 27 October 2016 at 13:37:29 UTC, Steven
Schveighoffer wrote:
Hm... what about:
...
Main thread still running.
Actually it's depends on compiler.
With ldc2 main thread doesn't stop, but with dmd seems all ok:
root@proxytest:~#
On Friday, 28 October 2016 at 03:33:33 UTC, Basile B. wrote:
On Thursday, 27 October 2016 at 14:04:23 UTC, Gianni Pisetta
wrote:
So i searched for a metod to check if an alias is a literal
value, but found nothing. Anyone have any clue on how can be
done?
Thanks,
Gianni Pisetta
Hello, I thi
On Thursday, 27 October 2016 at 13:37:29 UTC, Steven
Schveighoffer wrote:
Hm... what about:
...
Main thread still running.
On Thursday, 27 October 2016 at 14:04:23 UTC, Gianni Pisetta
wrote:
Hi all,
I have an AliasSeq composed of literal strings, variables and
delegates. I want to build a template Optimize that will return
an AliasSeq that have all adjacent literals concatenated into
one. So i writed something lik
On Thursday, 27 October 2016 at 22:17:35 UTC, WhatMeWorry wrote:
I'm using Derelict GLFW3 and I found the following GLFW3 code
snippet in a demo.
In a small demo, crap like this usually isn't a big deal.
It's not common practice, though, and for good reason. You should
definitely avoid imit
I'm using Derelict GLFW3 and I found the following GLFW3 code
snippet in a demo.
float distance = 3.0;
extern(C) void key_callback(GLFWwindow* window, int key, int
scancode, int action, int modifier) nothrow
{
if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)
{
glfwSetWin
On Thursday, 27 October 2016 at 13:43:26 UTC, Steven
Schveighoffer wrote:
It depends on the size of the file and the expectation of
duplicate words. I'm assuming the number of words is limited,
so you are going to allocate far less data by duping on demand.
In addition, you may incur penalties
I admit that I can't come up with a solution right now. I hope others
can see a way out of what I describe below. :-/
On 10/27/2016 11:33 AM, pontius wrote:
> On Wednesday, 26 October 2016 at 18:19:33 UTC, Ali Çehreli wrote:
>> There are different approaches but I think the solution above achi
Dne 27.10.2016 v 20:54 Jot via Digitalmars-d-learn napsal(a):
Using Vibe.D here;
How can one work with the DB's abstractly without incurring duplicity.
I'd like to be able to create one struct and use that, either in D or
the DB. I'd prefer to create a struct in D and interact through that
s
Using Vibe.D here;
How can one work with the DB's abstractly without incurring
duplicity. I'd like to be able to create one struct and use that,
either in D or the DB. I'd prefer to create a struct in D and
interact through that struct with the database abstracted away.
struct Person
{
s
On Thursday, 27 October 2016 at 18:47:07 UTC, Adam D. Ruppe wrote:
It is the same content, generated at the same time, just laid
out differently.
You can use whichever you find easier.
Thanks, Adam.
On Thursday, 27 October 2016 at 18:44:00 UTC, A D dev wrote:
I viewed the above two pages and the content seems roughly the
same.
It is the same content, generated at the same time, just laid out
differently.
You can use whichever you find easier.
Hi list,
What is the difference between pages under dlang.org/phobos and
dlang.org/library?
And when should we use which, as a reference?
E.g.
https://dlang.org/phobos/std_zip.html
https://dlang.org/library/std/zip.html
I viewed the above two pages and the content seems roughly the
same. H
On Wednesday, 26 October 2016 at 18:19:33 UTC, Ali Çehreli wrote:
There are different approaches but I think the solution above
achieves what you want:
DefaultManager!(A) is managing an object of A
DefaultManager!(B) is managing an object of B
SomeCustomManager is managing an object of C
Ali
A dynamic array looks something kind of like this:
struct DynamicArray(T)
{
size_t length;
T* ptr;
}
So, if you take the address of a dynamic array, you're
basically taking the address of a struct on the stack, whereas
the address in ptr is the address in memory where the data is
(be
On Thursday, October 27, 2016 16:13:34 David via Digitalmars-d-learn wrote:
> Hi
>
> The pointer (.ptr) of an array is the address of the first array
> element. But what exactly is the address of the array? And how is
> it used?
>
>auto myArray = [5, 10, 15, 20, 25, 30, 35];
>writeln("myArr
On Thursday, 27 October 2016 at 16:13:34 UTC, David wrote:
Hi
The pointer (.ptr) of an array is the address of the first
array element. But what exactly is the address of the array?
And how is it used?
auto myArray = [5, 10, 15, 20, 25, 30, 35];
writeln("myArray.ptr: ", myArray.ptr); //
Hi
The pointer (.ptr) of an array is the address of the first array
element. But what exactly is the address of the array? And how is
it used?
auto myArray = [5, 10, 15, 20, 25, 30, 35];
writeln("myArray.ptr: ", myArray.ptr); // myArray.ptr:
7FFA95F29000
writeln("&myArray[0]: ", &myArr
On Thursday, 27 October 2016 at 14:45:22 UTC, Gianni Pisetta
wrote:
On Thursday, 27 October 2016 at 14:34:38 UTC, TheFlyingFiddle
wrote:
On Thursday, 27 October 2016 at 14:04:23 UTC, Gianni Pisetta
wrote:
Hi all,
but at the moment isStringLiteral will return true even with
variables of type st
On Thursday, 27 October 2016 at 14:34:38 UTC, TheFlyingFiddle
wrote:
On Thursday, 27 October 2016 at 14:04:23 UTC, Gianni Pisetta
wrote:
Hi all,
but at the moment isStringLiteral will return true even with
variables of type string. So i searched for a metod to check
if an alias is a literal va
On Thursday, 27 October 2016 at 14:04:23 UTC, Gianni Pisetta
wrote:
Hi all,
but at the moment isStringLiteral will return true even with
variables of type string. So i searched for a metod to check if
an alias is a literal value, but found nothing. Anyone have any
clue on how can be done?
Th
Hi all,
I have an AliasSeq composed of literal strings, variables and
delegates. I want to build a template Optimize that will return
an AliasSeq that have all adjacent literals concatenated into
one. So i writed something like this:
template isStringLiteral(alias V) {
enum bool isStringL
On 10/27/16 2:40 AM, Era Scarecrow wrote:
On Tuesday, 25 October 2016 at 14:40:17 UTC, Steven Schveighoffer wrote:
I will note, that in addition to the other comments, this is going to
result in corruption. Simply put, the buffer that 'line' uses is
reused for each line. So the string data used
On 10/26/16 4:42 AM, dm wrote:
Hi. I tried code below:
import std.concurrency;
import std.stdio;
void func()
{
throw new Exception("I'm an exception");
}
void main()
{
auto tID = spawn(&func);
foreach(line; stdin.byLine)
send(tID, "");
}
I expect my application will die im
On Sunday, October 23, 2016 19:20:43 e-y-e via Digitalmars-d-learn wrote:
> On this topic, do you think a 'cumulativeSum' specialisation
> based on the 'sum' specialisation be welcome in phobos? Here's a
> quick prototype, obviously not library standard but the basic
> logic is there:
> https://gis
On Wednesday, 26 October 2016 at 08:18:07 UTC, hardreset wrote:
Is there a page somewhere on how to program D without using the
GC?
The information is scattered.
How do I allocate / free structs / classes on the heap manually?
Classes =>
https://github.com/AuburnSounds/dplug/blob/master/c
31 matches
Mail list logo