On Monday, 30 November 2015 at 07:54:49 UTC, Rikki Cattermole
wrote:
enums don't have to be integral, but for performance reasons it
is for the best.
enum Foo : string {
A = "a",
B = "b",
C = "d",
ERROR = "What are you talking about?"
}
void main() {
import std.stdio :
On Monday, 30 November 2015 at 07:58:43 UTC, Andrew LaChance
wrote:
Oh interesting. So you are saying I could have a struct
WhiteKey {...} and then an enum that extends WhiteKey?
enums can't *extend* anything. You can do this:
struct WhiteKeyS {
immutable int halfStepsToPrevious;
On 30/11/15 8:58 PM, Andrew LaChance wrote:
On Monday, 30 November 2015 at 07:54:49 UTC, Rikki Cattermole wrote:
enums don't have to be integral, but for performance reasons it is for
the best.
enum Foo : string {
A = "a",
B = "b",
C = "d",
ERROR = "What are you talking about?"
On Monday, 30 November 2015 at 07:48:37 UTC, Andrew LaChance
wrote:
Hello,
D has intrigued me for a while, and I thought I would finally
read up on it! I've been reading "Programming in D" by Ali
Çehreli and I've been thinking about how I can use the language
in a side project I'm working on,
Hi,
is there any possibility, to draw with a pixelbuffer to a surface
(for example with GTKD) and to update it every few milliseconds?
On Monday, 30 November 2015 at 08:37:04 UTC, TheDGuy wrote:
Hi,
is there any possibility, to draw with a pixelbuffer to a
surface (for example with GTKD) and to update it every few
milliseconds?
Are any of these suitable for your needs?
https://github.com/DerelictOrg/DerelictSDL2
http://dgam
I have some struct and other struct stores reference to the first one
like a pointer to constant. Nevertheless I can change the value of the
first struct. Is it some hack?
http://dpaste.dzfl.pl/0dfa3dff2df7
On Sunday, November 29, 2015 23:53:41 Chris Wright via Digitalmars-d-learn
wrote:
> Unfortunately, ddoc doesn't automatically cross-reference these for you,
> which results in confusion. (As if it weren't confusing enough to have
> everything wrapped in templates with filters rather than simply us
It seems like `std.algorithm.each` is not executed in the example
below.
Could anyone tell why?
Thank you.
import std.algorithm;
void main(string[] args) {
int[] arr = [1, 2, 3, 4, 5];
arr.each!((ref e) => {
writeln(e); // does not print
++e;
DMD 2.069.1
OS Win8.1 Enterprise
Can somebody please show a enlightening example of, so called,
"revamp of the REST interface generator"
added to release 0.7.26 at:
http://vibed.org/blog/posts/vibe-release-0.7.26
I want to use vibe.d to add a modern dynamic web-interface to my
knowledge graph I'm currently developing.
More
On Monday, 30 November 2015 at 08:08:20 UTC, Meta wrote:
class WhiteKey
{
private immutable int halfStepsToNext;
private immutable int halfStepsToPrevious;
enum
{
A = new WhiteKey(2, 2),
B = new WhiteKey(2, 1),
C = n
Unfortunately in D constant doesn't mean constant :( it means
readonly: you can read it, but it can change in other ways.
Immutable means constant - doesn't change in any way.
On Monday, 30 November 2015 at 09:56:08 UTC, ref2401 wrote:
DMD 2.069.1
OS Win8.1 Enterprise
in a multiline statement, i believe you must use :
arr.each!((ref e) {
writeln(e);
++e;
})
"=>" is for oneliner
though i don"t understand why it fails silently ??
On 30.11.2015 13:27, Kagamin wrote:
Unfortunately in D constant doesn't mean constant :( it means readonly:
you can read it, but it can change in other ways. Immutable means
constant - doesn't change in any way.
Thanks, considering 'const' as 'readonly' explains my case rather well.
On 30.11.2015 11:50, visitor wrote:
though i don"t understand why it fails silently ??
ref2491's original code is valid, but doesn't have the intended meaning.
`e => {foo(e);}` is the same as `(e) {return () {foo(e);};}`, i.e. a
(unary) function that returns a (nullary) delegate. Calling it d
On Monday, 30 November 2015 at 12:03:08 UTC, anonymous wrote:
On 30.11.2015 11:50, visitor wrote:
though i don"t understand why it fails silently ??
ref2491's original code is valid, but doesn't have the intended
meaning. `e => {foo(e);}` is the same as `(e) {return ()
{foo(e);};}`, i.e. a (
On Monday, 30 November 2015 at 10:22:54 UTC, Marc Schütz wrote:
You're misinterpreting this:
enum X {
A = new Object,
B = new Object,
}
void main() {
import std.stdio;
writeln(cast(void*) X.A);
writeln(cast(void*) X.A);
}
# output:
470910
On Monday, 30 November 2015 at 09:09:00 UTC, lobo wrote:
On Monday, 30 November 2015 at 08:37:04 UTC, TheDGuy wrote:
Hi,
is there any possibility, to draw with a pixelbuffer to a
surface (for example with GTKD) and to update it every few
milliseconds?
Are any of these suitable for your needs
On 30.11.2015 16:09, drug wrote:
On 30.11.2015 15:49, TheDGuy wrote:
On Monday, 30 November 2015 at 09:09:00 UTC, lobo wrote:
On Monday, 30 November 2015 at 08:37:04 UTC, TheDGuy wrote:
Hi,
is there any possibility, to draw with a pixelbuffer to a surface
(for example with GTKD) and to update
On 30.11.2015 15:49, TheDGuy wrote:
On Monday, 30 November 2015 at 09:09:00 UTC, lobo wrote:
On Monday, 30 November 2015 at 08:37:04 UTC, TheDGuy wrote:
Hi,
is there any possibility, to draw with a pixelbuffer to a surface
(for example with GTKD) and to update it every few milliseconds?
Are a
but there is no specific solution inside GTKD?
for example, in pseudo code
auto surf = new Surface(...); // look for cairo.Surface doc
auto cr = cairo.Context.Context.create(surf);
// pb is an existing gdkpixbuf.Pixbuf
gdk.Cairo.setSourcePixbuf(cr, pb, width, height);
cr.paint();
adding o
On Monday, 30 November 2015 at 12:03:08 UTC, anonymous wrote:
On 30.11.2015 11:50, visitor wrote:
though i don"t understand why it fails silently ??
ref2491's original code is valid, but doesn't have the intended
meaning. `e => {foo(e);}` is the same as `(e) {return ()
{foo(e);};}`, i.e. a (
On Monday, 30 November 2015 at 14:21:49 UTC, Tofu Ninja wrote:
Is there something like isInputRange for allocators, I tried
looking for something but couldn't find anything? If not, why
not?
Aka, some way to check that type T is an allocator.
Is there something like isInputRange for allocators, I tried
looking for something but couldn't find anything? If not, why not?
On 11/25/15 12:17 AM, tcak wrote:
On Wednesday, 25 November 2015 at 03:59:01 UTC, Steven Schveighoffer wrote:
On 11/24/15 10:51 PM, tcak wrote:
I have seen a code a while ago, but even by looking at documentation, I
couldn't have found anything about it.
Let's say I have defined an enum;
enum
On 16/11/2015 06:45, Vadim Lopatin wrote:
Hello,
Is there any IDE which allows debugging D apps on OSX?
I'm trying Mono-D, but getting error
"Debugger operation failed A syntax error in expression, near
'sizeof(void*)'"
GDB is installed using homebrew. Probably, something is wrong with my
On Mon, 30 Nov 2015 01:30:28 -0800, Jonathan M Davis via
Digitalmars-d-learn wrote:
> On Sunday, November 29, 2015 23:53:41 Chris Wright via
> Digitalmars-d-learn wrote:
>> Unfortunately, ddoc doesn't automatically cross-reference these for
>> you,
>> which results in confusion. (As if it weren't
Am 24.11.2015 um 19:51 schrieb Zardoz:
Actually I'm trying to setup dub to not grab a dependency on Windows (
https://github.com/Zardoz89/DEDCPU-16/blob/master/dub.sdl ) :
name "dedcpu"
authors "Luis Panadero Guardeño"
targetType "none"
license "BSD 3-clause"
description "DCPU-16 tools"
subPack
On Sunday, 29 November 2015 at 07:37:56 UTC, Suliman wrote:
On Saturday, 28 November 2015 at 23:21:21 UTC, Sebastiaan Koppe
wrote:
On Saturday, 28 November 2015 at 19:05:59 UTC, Suliman wrote:
And also I can't understand difference between
HTTPClientRequest and HTTPServerRequest
If the applic
On Monday, 30 November 2015 at 10:08:17 UTC, Nordlöw wrote:
Can somebody please show a enlightening example of, so called,
"revamp of the REST interface generator"
added to release 0.7.26 at:
http://vibed.org/blog/posts/vibe-release-0.7.26
I want to use vibe.d to add a modern dynamic web-inte
On Monday, 30 November 2015 at 20:05:42 UTC, Sebastiaan Koppe
wrote:
Code can be found here: https://bitbucket.org/skoppe/mpc/src
Looks good. Have you looked at Redux and Webpack? I am working
on a Redux example and we have switched to Webpack and Redux at
work and it is nice.
On Monday, 30 November 2015 at 16:54:43 UTC, Sönke Ludwig wrote:
Am 24.11.2015 um 19:51 schrieb Zardoz:
Actually I'm trying to setup dub to not grab a dependency on
Windows (
https://github.com/Zardoz89/DEDCPU-16/blob/master/dub.sdl ) :
name "dedcpu"
authors "Luis Panadero Guardeño"
targetType
On Monday, 30 November 2015 at 20:23:48 UTC, David DeWitt wrote:
Have you looked at Redux and Webpack? I am working on a Redux
example and we have switched to Webpack and Redux at work and
it is nice.
I know about both yes. Webpack would probably beat browserify,
but I haven't gotten the tim
On Monday, 30 November 2015 at 20:38:12 UTC, Sebastiaan Koppe
wrote:
On Monday, 30 November 2015 at 20:23:48 UTC, David DeWitt wrote:
Have you looked at Redux and Webpack? I am working on a Redux
example and we have switched to Webpack and Redux at work and
it is nice.
I know about both yes.
On 01/12/15 3:23 AM, Tofu Ninja wrote:
On Monday, 30 November 2015 at 14:21:49 UTC, Tofu Ninja wrote:
Is there something like isInputRange for allocators, I tried looking
for something but couldn't find anything? If not, why not?
Aka, some way to check that type T is an allocator.
Doesn't lo
Hi,
I've been trying to create a NamedPipe with security attributes
but at compile time throws:
Error 42: Symbol Undefined _InitializeSecurityDescriptor@8
Error 42: Symbol Undefined _SetSecurityDescriptorDacl@16
This is my code, I'm trying to do it using a class:
module asi.pipe;
import cor
On Tuesday, 1 December 2015 at 04:10:55 UTC, Jonathan Villa wrote:
Hi,
I've been trying to create a NamedPipe with security attributes
but at compile time throws:
Error 42: Symbol Undefined _InitializeSecurityDescriptor@8
Error 42: Symbol Undefined _SetSecurityDescriptorDacl@16
What is causi
On Monday, 30 November 2015 at 08:08:20 UTC, Meta wrote:
This doesn't quite work in D; you'd have to make each WhiteKey
const (which is probably not a bad idea anyway if you're using
it like an enum). However, it's better to just do this with
plain old value-type structs. It's exactly the same
Am 30.11.2015 um 11:08 schrieb Nordlöw:
Can somebody please show a enlightening example of, so called,
"revamp of the REST interface generator"
added to release 0.7.26 at:
http://vibed.org/blog/posts/vibe-release-0.7.26
I want to use vibe.d to add a modern dynamic web-interface to my
knowledg
40 matches
Mail list logo