On Wednesday, 16 October 2013 at 14:39:23 UTC, Andrew wrote:
Concluding, I can post the could if you like, or I can first
try compiling it for ARM :-)
whatever's easiest for you. I have an arm cross compiler
targeting the raspberry pi, not sure if that will work for the
android device or not,
On Tuesday, 22 October 2013 at 06:33:04 UTC, John Joyus wrote:
That works! Thanks.
cool. If you need anything more in this, let me know (feel free
to email me directly too destructiona...@gmail.com ) and i'll see
what I can do.
The 99% of my programs demand a basic GUI. And I personally
lo
Am 24.10.2013 19:03, schrieb Timothee Cour:
+1
this is a command use case. Further,relying on shell such as cd subdir
&& foo is fragile: if it fails, we're not sure whether it's because it
couldn't cd to subdir or because of foo.
Woudl the following be as efficient?
system_in_dir(string dir, st
25.10.2013 02:08, Adam D. Ruppe пишет:
On Thursday, 24 October 2013 at 17:59:03 UTC, Alexandr Druzhinin wrote:
foo(cast(float[]) points); // is it safe?
Two options would be to make the points itself be a float[] with the
names just properties into the index:
struct Point {
float[7] data;
On Thursday, 24 October 2013 at 17:59:03 UTC, Alexandr Druzhinin
wrote:
foo(cast(float[]) points); // is it safe?
Two options would be to make the points itself be a float[] with
the names just properties into the index:
struct Point {
float[7] data;
ref float x() { return data[0]; }
ref
On Thu, Oct 24, 2013 at 11:36:09AM -0700, H. S. Teoh wrote:
> On Thu, Oct 24, 2013 at 12:12:48AM +0200, Daniel Davidson wrote:
> [...]
> > Here is the self-contained code (I hope) that you can see it
> > happening in:
> > http://pastebin.com/hb0Dz50r
> [...]
>
> Hmm. Somebody claimed that 2.064 be
On Thu, Oct 24, 2013 at 12:12:48AM +0200, Daniel Davidson wrote:
[...]
> Here is the self-contained code (I hope) that you can see it
> happening in:
> http://pastebin.com/hb0Dz50r
[...]
Hmm. Somebody claimed that 2.064 beta has made text() pure, but that's
only partially true, because it calls to
On Thursday, 24 October 2013 at 17:59:03 UTC, Alexandr Druzhinin
wrote:
May I cast like:
struct Point
{
float x, y, z;
float r, g, b, a;
}
Point[] points;
void foo(float[] float_array) {};
foo(cast(float[]) points); // is it safe?
May be more elegant way do express this exist
On Thursday, 24 October 2013 at 16:22:44 UTC, Daniel Davidson
wrote:
template hasAnnotation(alias f, Attr) {
This function looks for annotations as identified by type.
Instead of using a plain string, you should make them some kind
of struct:
struct MyAnnotation {
string value;
}
Then y
May I cast like:
struct Point
{
float x, y, z;
float r, g, b, a;
}
Point[] points;
void foo(float[] float_array) {};
foo(cast(float[]) points); // is it safe?
May be more elegant way do express this exists?
Thanks
I use this small helper in vibe.d:
===
template extractUda(UDA, alias Symbol)
{
import std.typetuple : TypeTuple;
private alias TypeTuple!(__traits(getAttributes, Symbol))
udaTuple;
private template extract(list...)
{
static if (!list.length)
On Thursday, 24 October 2013 at 17:36:42 UTC, Jonathan M Davis
wrote:
You should probably use std.traits.functionAttributes:
it doesn't list UDAs though.
On Thursday, October 24, 2013 18:22:43 Daniel Davidson wrote:
> enum Bar = "Bar";
> @("Foo") @Bar int x;
> pragma(msg, __traits(getAttributes, x));
>
> This prints: tuple("Foo", "Bar")
>
> How do you run code only if "Bar" is associated with a symbol
> like x?
> I was hoping something like this:
+1
this is a command use case. Further,relying on shell such as cd subdir &&
foo is fragile: if it fails, we're not sure whether it's because it
couldn't cd to subdir or because of foo.
Woudl the following be as efficient?
system_in_dir(string dir, string action){
auto path=getcwd
scope(exit)
c
On 10/24/2013 07:58 AM, Rene Zwanenburg wrote:
I'm writing a D wrapper for a C library. I was planning to use
RefCounted structs to control the lifetime of objects created by this
library. Please check the following example:
http://dpaste.dzfl.pl/b49962bf
Foo would be an opaque struct. createFo
24-Oct-2013 20:30, Mathias LANG пишет:
On Wednesday, 23 October 2013 at 11:58:17 UTC, Dicebot wrote:
Using `enum` with ctRegex is discouraged because it is a dumb
copy-paste upon every enum usage. I'd recommend to use global variable
initialized during compile-time:
```
auto r =
ctRegex!(r"^(\w
On Thursday, 24 October 2013 at 14:58:21 UTC, Rene Zwanenburg
wrote:
I'm writing a D wrapper for a C library. I was planning to use
RefCounted structs to control the lifetime of objects created
by this library. Please check the following example:
http://dpaste.dzfl.pl/b49962bf
Foo would be an
On Wednesday, 23 October 2013 at 11:58:17 UTC, Dicebot wrote:
Using `enum` with ctRegex is discouraged because it is a dumb
copy-paste upon every enum usage. I'd recommend to use global
variable initialized during compile-time:
```
auto r =
ctRegex!(r"^(\w+)\s+([a-zA-Z0-9/]+)\?a=(\w+)&b=(\w+)
enum Bar = "Bar";
@("Foo") @Bar int x;
pragma(msg, __traits(getAttributes, x));
This prints: tuple("Foo", "Bar")
How do you run code only if "Bar" is associated with a symbol
like x?
I was hoping something like this:
pragma(msg, hasAnnotation!(x, Bar));
Where getAnnotation from
(http://forum
I'm writing a D wrapper for a C library. I was planning to use
RefCounted structs to control the lifetime of objects created by
this library. Please check the following example:
http://dpaste.dzfl.pl/b49962bf
Foo would be an opaque struct. createFoo() and destroyFoo() would
be implemented in
On Thursday, 24 October 2013 at 11:59:37 UTC, qznc wrote:
On Wednesday, 23 October 2013 at 15:56:33 UTC, Namespace wrote:
Is there anything like this for VisualD?
As far as I understand the GhostDoc website it generates prose
comments from the type information? The only reason I can think
of
On Wednesday, 23 October 2013 at 15:56:33 UTC, Namespace wrote:
Is there anything like this for VisualD?
As far as I understand the GhostDoc website it generates prose
comments from the type information? The only reason I can think
of are weird enterprise requirements like "every method must
On Thursday, 24 October 2013 at 10:58:30 UTC, bearophile wrote:
Jonathan M Davis:
It's a compiler bug. immutable data should not be initialized
more than once.
My point was another one, regarding this refused code:
import std.algorithm: copy;
immutable int[2] data;
static this() {
[10,
On Thursday, 24 October 2013 at 07:02:25 UTC, bearophile wrote:
This shows a limitation of the D type system:
import std.algorithm: copy;
immutable int[2] data;
static this() {
foreach (i, x; [10, 20]) data[i] = x; // OK
data[] = [10, 20]; // OK
[10, 20].copy(data[]); // Error.
}
vo
Thank you very much for your help! I think I start to understand
it better.
On Wednesday, 23 October 2013 at 14:48:52 UTC, John Colvin wrote:
On Wednesday, 23 October 2013 at 14:00:46 UTC, Yura wrote:
Dear all,
Thank you for your replies!
Regarding Julia - it seems to be interesting, but - i
Jonathan M Davis:
It's a compiler bug. immutable data should not be initialized
more than once.
My point was another one, regarding this refused code:
import std.algorithm: copy;
immutable int[2] data;
static this() {
[10, 20].copy(data[]); // Error.
}
void main() {}
Bye,
bearophile
On Thursday, 24 October 2013 at 09:46:52 UTC, Danny Arends wrote:
Some people on the IRC channel said it might be a bug:
http://d.puremagic.com/issues/show_bug.cgi?id=11338
Gr,
Danny Arends
And a pull request:
https://github.com/D-Programming-Language/phobos/pull/1659
Gr,
Danny Arends
htt
On Thursday, 24 October 2013 at 08:35:15 UTC, Danny Arends wrote:
Is there a reason why the decode/encode functions and such
throw Errors ?
Seems like an error (Non-recoverable) is a bit harsh, why isn't
the Exception class used ?
Kind regards,
Danny Arends
http://www.dannyarends.nl
Some
Hello all,
An interesting observation I made today: if you have a static if/else block in
your code, then ddoc will ignore anything inside the else block.
I've filed this as a bug report:
http://d.puremagic.com/issues/show_bug.cgi?id=11337
... but I wonder if anyone can give insight into why
Is there a reason why the decode/encode functions and such throw
Errors ?
Seems like an error (Non-recoverable) is a bit harsh, why isn't
the Exception class used ?
Kind regards,
Danny Arends
http://www.dannyarends.nl
On Thursday, October 24, 2013 09:02:24 bearophile wrote:
> This shows a limitation of the D type system:
>
>
> import std.algorithm: copy;
> immutable int[2] data;
> static this() {
> foreach (i, x; [10, 20]) data[i] = x; // OK
> data[] = [10, 20]; // OK
> [10, 20].copy(data[]); //
Am 24.10.2013 09:06, schrieb simendsjo:
On Thursday, 24 October 2013 at 06:25:40 UTC, Benjamin Thaut wrote:
As far as I can tell std.process can only run commands in the working
directory of the currently executing function. I want to execute a
certain program inside a subdirectory on windows an
On Thursday, 24 October 2013 at 06:25:40 UTC, Benjamin Thaut
wrote:
As far as I can tell std.process can only run commands in the
working directory of the currently executing function. I want
to execute a certain program inside a subdirectory on windows
and can't get it to work:
myproject
|-
This shows a limitation of the D type system:
import std.algorithm: copy;
immutable int[2] data;
static this() {
foreach (i, x; [10, 20]) data[i] = x; // OK
data[] = [10, 20]; // OK
[10, 20].copy(data[]); // Error.
}
void main() {}
Bye,
bearophile
34 matches
Mail list logo