Re: Render SVG To Display And Update Periodically

2016-10-22 Thread Jason C. Wells via Digitalmars-d-learn
On Saturday, 22 October 2016 at 06:18:13 UTC, Mike Parker wrote: I think I can confidently assure you that you aren't running into any bugs here. Thanks for the confirmation. It helps me to learn. You've dived right into a multi-module projects without a full understanding of imports and link

Re: Real Simple Question?

2016-10-22 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, October 22, 2016 21:34:36 WhatMeWorry via Digitalmars-d-learn wrote: > Ok, but now I'm getting these error in my new > mypackage/constants.d > > ..\common\vertex_data.d(5,15): Error: undefined identifier > 'GLfloat' > ..\common\vertex_data.d(53,12): Error: undefined identifier 'vec3'

Re: Dustmite can't handle my memory segfault

2016-10-22 Thread Anonymouse via Digitalmars-d-learn
On Friday, 21 October 2016 at 10:13:23 UTC, Nordlöw wrote: #!/usr/bin/env python3 import sys import pty stat = pty.spawn(sys.argv[1:]) if stat == 256: exit(42)# remap to 42 else: exit(stat) Assuming you want to remap 134 to 0 (success): #!/bin/bash cmd="$1" shif

Re: Real Simple Question?

2016-10-22 Thread WhatMeWorry via Digitalmars-d-learn
On Saturday, 22 October 2016 at 20:51:14 UTC, Jonathan M Davis wrote: On Saturday, October 22, 2016 20:35:27 WhatMeWorry via Digitalmars-d-learn wrote: [...] Just put it in a separate module and then import it. e.g. file: mypackage/constants.d == module mypackage.constants; G

Re: Real Simple Question?

2016-10-22 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, October 22, 2016 20:35:27 WhatMeWorry via Digitalmars-d-learn wrote: > This is probably so simple that there's no example anywhere. > > Basically, I've got a huge array definition (see below) which I > reuse over and over again in different projects. > > GLfloat[] vertices = > [ >

Real Simple Question?

2016-10-22 Thread WhatMeWorry via Digitalmars-d-learn
This is probably so simple that there's no example anywhere. Basically, I've got a huge array definition (see below) which I reuse over and over again in different projects. GLfloat[] vertices = [ // Positions // Texture Coords -0.5f, -0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5

Re: getting started with web server - vibe.d dub giving link error

2016-10-22 Thread Karabuta via Digitalmars-d-learn
On Saturday, 22 October 2016 at 17:21:45 UTC, Karabuta wrote: On Saturday, 22 October 2016 at 14:50:14 UTC, aman wrote: I just started on vibe.d on fedora and the experience is not pretty getting hello-world running. Please help. Below are the details. [...] I wrote a blog post at https:/

Re: getting started with web server - vibe.d dub giving link error

2016-10-22 Thread Karabuta via Digitalmars-d-learn
On Saturday, 22 October 2016 at 14:50:14 UTC, aman wrote: I just started on vibe.d on fedora and the experience is not pretty getting hello-world running. Please help. Below are the details. [...] I wrote a blog post at https://aberba.gtihub.io which has Fedora users covered. But somehow

Re: Render SVG To Display And Update Periodically

2016-10-22 Thread Jason C. Wells via Digitalmars-d-learn
Now I think I finally see where my hang up is. If B imports C, and A imports B and C, you still have to tell A where to find C. C doesn't go along for the ride with B. Stated another way, A doesn't look inside B to find C. Stated yet another way, B does not expose C to A. The statement above

getting started with web server - vibe.d dub giving link error

2016-10-22 Thread aman via Digitalmars-d-learn
I just started on vibe.d on fedora and the experience is not pretty getting hello-world running. Please help. Below are the details. setup the env via yum (I have installed ldc). dub init test -t vibe.d (go ahead with default options) cd test dub Performing "debug" build using ldc2 for

Re: Render SVG To Display And Update Periodically

2016-10-22 Thread ketmar via Digitalmars-d-learn
On Saturday, 22 October 2016 at 03:59:16 UTC, Jason C. Wells wrote: nanovg_demo>dmd example.d iv\arsd\color.d iv\arsd\simpledisplay.d iv\perf.d iv\perf.d(41): Error: module iv.nanovg.nanovg from file iv\nanovg.d must be imported with 'import iv.nanovg.nanovg;' demo.d(6): Error: modul

Re: Reflection: Order of fields guaranteed?

2016-10-22 Thread Michael Coulombe via Digitalmars-d-learn
On Friday, 21 October 2016 at 01:51:44 UTC, Stefan Koch wrote: On Friday, 21 October 2016 at 01:34:44 UTC, Nick Sabalausky wrote: When using reflection to obtain the fields of a class/struct, is there any guarantee that the order is the same as the order the fields are defined? Yes they shoul

Re: Phobos lacks a particular family of range functions...

2016-10-22 Thread Basile B. via Digitalmars-d-learn
On Friday, 21 October 2016 at 19:41:00 UTC, Basile B. wrote: They would have for constraint `if (isInputRange!Range && isInputRange!(ElementType!Range))` In case you wouldn't see directly what would they be used for, it's for tree-like structures. Each element in a Range is also an input ra

Re: New to D

2016-10-22 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 22 October 2016 at 08:05:12 UTC, Daniel Kozak wrote: uint[string] dictionary; should be uint[size_t] dictionary; because size_t is 32bit on x86 system and 64bit on x86_64 and you are trying to put array length to dictionary which is size_t I believe you meant: size_t[string];

Re: New to D

2016-10-22 Thread Daniel Kozak via Digitalmars-d-learn
Dne 22.10.2016 v 07:41 Mark via Digitalmars-d-learn napsal(a): Thanks for the fast reply. That did work. But now the error is on the line: dictionary[word] = newId; I changed the value to 10, still errors. ?? everything else is as before. thanks. uint[string] dictionary; should b