Any 3D Game or Engine with examples/demos which just work (compile) out of the box on linux ?

2019-10-17 Thread Prokop Hapala via Digitalmars-d-learn
Already >1 year I consider to move from C++ to Dlang or to Rust in my hobby game development (mostly based on physical simulations https://github.com/ProkopHapala/SimpleSimulationEngine). I probably prefer Dlang because it compiles much faster, and I can copy C/C++ code to it without much

Re: How does one cast to an array type?

2019-10-17 Thread Vinay Sajip via Digitalmars-d-learn
On Thursday, 17 October 2019 at 12:40:33 UTC, Adam D. Ruppe wrote: On Thursday, 17 October 2019 at 12:19:03 UTC, Vinay Sajip wrote: Are arrays and objects part of a unified type system? No, they are separate. You can define a class that contains an array, but it doesn't work like that

Re: arsd errors on windows

2019-10-17 Thread Dennis via Digitalmars-d-learn
On Thursday, 17 October 2019 at 21:32:34 UTC, WhatMeWorry wrote: DUB version 1.11.0, built on Oct 6 2018 `dub add` got added at the end of 2018 IIRC, so you need to upgrade Dub.

Re: arsd errors on windows

2019-10-17 Thread WhatMeWorry via Digitalmars-d-learn
Really stupid question here, but when I try to run the same command I get: C:\Users\whatmeworry>dub add arsd-official Unknown command: add USAGE: dub [--version] [] [] [-- []] . . . DUB version 1.11.0, built on Oct 6 2018 I thought about dub init, but that still doesn't give me an

Re: several types in one Array ?

2019-10-17 Thread Ron Tarrant via Digitalmars-d-learn
On Thursday, 17 October 2019 at 14:45:24 UTC, Mil58 wrote: Hi all... Does exist (or not?) a way to create array with several types (as in Python) You actually have at least three options for handling mixed data: ``` // Three ways to handle mixed data import std.stdio; import std.typecons;

Re: arsd errors on windows

2019-10-17 Thread Dennis via Digitalmars-d-learn
On Thursday, 17 October 2019 at 20:17:53 UTC, Greatsam4sure wrote: the same error That was meant for Adam to put in the dub package file of arsd, in your project it won't affect the compilation of the dependency. (Though you can still try adding it in your local download of arsd to quickly

Re: arsd errors on windows

2019-10-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 17 October 2019 at 20:17:53 UTC, Greatsam4sure wrote: arsd-official:cgi 4.0.3: building configuration oops i forgot to push the new tag to git. It should update in a little while now.

Re: Vibe/Mysql Testing

2019-10-17 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 17 October 2019 at 19:05:44 UTC, Vino wrote: Hi All, Request your help on the below code and error Error: source\app.d(25,15): Error: none of the overloads of writeBody are callable using argument types (VariantN!20LU), candidates are Code: import vibe.vibe; import std.array

Re: arsd errors on windows

2019-10-17 Thread Greatsam4sure via Digitalmars-d-learn
On Thursday, 17 October 2019 at 12:10:21 UTC, Dennis wrote: On Thursday, 17 October 2019 at 12:06:49 UTC, Dennis wrote: You can put "buildRequirements": "allowWarnings" in your dub.json. Should be "buildRequirements": ["allowWarnings"] the same error Performing "debug" build using

Re: arsd errors on windows

2019-10-17 Thread Greatsam4sure via Digitalmars-d-learn
On Thursday, 17 October 2019 at 08:57:06 UTC, Dennis wrote: On Thursday, 17 October 2019 at 04:05:40 UTC, Greatsam4sure wrote: what is the way out. I made a pull request fixing it: https://github.com/adamdruppe/arsd/pull/222 In the mean time, you can add the subpackage

Vibe/Mysql Testing

2019-10-17 Thread Vino via Digitalmars-d-learn
Hi All, Request your help on the below code and error Error: source\app.d(25,15): Error: none of the overloads of writeBody are callable using argument types (VariantN!20LU), candidates are Code: import vibe.vibe; import std.array : array; import mysql; import std.stdio; import std.range;

Re: Vibe.d Error

2019-10-17 Thread Vino via Digitalmars-d-learn
On Thursday, 17 October 2019 at 18:12:54 UTC, Andre Pany wrote: On Thursday, 17 October 2019 at 10:58:20 UTC, Vino wrote: Hi All, We are planning to migrate our website form Mysql/PHP to Mysql/D using vibe.d , as part of the plan we tried to install the vibe.d (vibe.d 0.8.6 release) and we

Re: Vibe.d Error

2019-10-17 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 17 October 2019 at 10:58:20 UTC, Vino wrote: Hi All, We are planning to migrate our website form Mysql/PHP to Mysql/D using vibe.d , as part of the plan we tried to install the vibe.d (vibe.d 0.8.6 release) and we are facing below issue, we have tried both the version of

Re: several types in one Array ?

2019-10-17 Thread Mil58 via Digitalmars-d-learn
On Thursday, 17 October 2019 at 14:50:23 UTC, Paul Backus wrote: On Thursday, 17 October 2019 at 14:45:24 UTC, Mil58 wrote: Hi all... Does exist (or not?) a way to create array with several types (as in Python) (example) : xxx[4] myTab = [180, "John", false, -0.771]; Of course, this is

Re: several types in one Array ?

2019-10-17 Thread Paul Backus via Digitalmars-d-learn
On Thursday, 17 October 2019 at 14:45:24 UTC, Mil58 wrote: Hi all... Does exist (or not?) a way to create array with several types (as in Python) (example) : xxx[4] myTab = [180, "John", false, -0.771]; Of course, this is doing an Error ;-) Thanks. import std.variant; Variant[4] myTab

several types in one Array ?

2019-10-17 Thread Mil58 via Digitalmars-d-learn
Hi all... Does exist (or not?) a way to create array with several types (as in Python) (example) : xxx[4] myTab = [180, "John", false, -0.771]; Of course, this is doing an Error ;-) Thanks.

Re: How does one cast to an array type?

2019-10-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 17 October 2019 at 12:19:03 UTC, Vinay Sajip wrote: Are arrays and objects part of a unified type system? No, they are separate. You can define a class that contains an array, but it doesn't work like that automatically. You'll want to use a wrapper class or a variant type or a

Re: How does one cast to an array type?

2019-10-17 Thread Andrea Fontana via Digitalmars-d-learn
On Thursday, 17 October 2019 at 12:19:03 UTC, Vinay Sajip wrote: Are arrays and objects part of a unified type system? Specifically, if I do void foo(Object x) { if (typeid(x) == typeid(Object[])) { auto a = cast(Object[]) x; } } I get a compilation error: onlineapp.d(3):

Re: Undefined symbol: _dyld_enumerate_tlv_storage (OSX)

2019-10-17 Thread nazriel via Digitalmars-d-learn
On Wednesday, 16 October 2019 at 15:52:22 UTC, nazriel wrote: On Friday, 11 October 2019 at 11:38:27 UTC, Jacob Carlborg wrote: ... Should we bump https://github.com/dlang/dmd/blob/master/src/posix.mak#L143 ? BR, Damian I made two PRs, lets see how it plays out: -

How does one cast to an array type?

2019-10-17 Thread Vinay Sajip via Digitalmars-d-learn
Are arrays and objects part of a unified type system? Specifically, if I do void foo(Object x) { if (typeid(x) == typeid(Object[])) { auto a = cast(Object[]) x; } } I get a compilation error: onlineapp.d(3): Error: cannot cast expression x of type object.Object to Object[]

Re: arsd errors on windows

2019-10-17 Thread Dennis via Digitalmars-d-learn
On Thursday, 17 October 2019 at 12:06:49 UTC, Dennis wrote: You can put "buildRequirements": "allowWarnings" in your dub.json. Should be "buildRequirements": ["allowWarnings"]

Re: arsd errors on windows

2019-10-17 Thread Dennis via Digitalmars-d-learn
On Thursday, 17 October 2019 at 11:35:26 UTC, Adam D. Ruppe wrote: ugh dub insists on this stupid warning as error nonsense and the warnings suck so they slip through me sometimes. You can put "buildRequirements": "allowWarnings" in your dub.json. (buildRequirements "allowWarnings" in dub.sdl)

Re: arsd errors on windows

2019-10-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 17 October 2019 at 04:05:40 UTC, Greatsam4sure wrote: Warning: statement is not reachable ugh dub insists on this stupid warning as error nonsense and the warnings suck so they slip through me sometimes.

Re: I thought we could leave off ()

2019-10-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 17 October 2019 at 10:50:52 UTC, Brett wrote: auto n = (){ return Z[0]; }; that's a pointer, the optional () rule only applies to direct functions, not pointers/delegates. so do auto n () { return Z[0]; } n.X no assignment means function instead of

Vibe.d Error

2019-10-17 Thread Vino via Digitalmars-d-learn
Hi All, We are planning to migrate our website form Mysql/PHP to Mysql/D using vibe.d , as part of the plan we tried to install the vibe.d (vibe.d 0.8.6 release) and we are facing below issue, we have tried both the version of compiler (DMD 2.088.1 DMD Beta 2.089.0-beta.1) the issue is

I thought we could leave off ()

2019-10-17 Thread Brett via Digitalmars-d-learn
auto n = (){ return Z[0]; }; n().X = X; I'm trying to alias nodes away but alias n = Z[0]; fails. Dropping () from n().X fails also.

Re: arsd errors on windows

2019-10-17 Thread GreatSam4sure via Digitalmars-d-learn
On Thursday, 17 October 2019 at 08:57:06 UTC, Dennis wrote: On Thursday, 17 October 2019 at 04:05:40 UTC, Greatsam4sure wrote: what is the way out. I made a pull request fixing it: https://github.com/adamdruppe/arsd/pull/222 In the mean time, you can add the subpackage

Re: arsd errors on windows

2019-10-17 Thread Dennis via Digitalmars-d-learn
On Thursday, 17 October 2019 at 04:05:40 UTC, Greatsam4sure wrote: what is the way out. I made a pull request fixing it: https://github.com/adamdruppe/arsd/pull/222 In the mean time, you can add the subpackage "arsd-official:simpledisplay" as a depdendency instead so cgi.d won't be included