Re: OSX Foundation framework D binding

2015-11-11 Thread Daniel Kozak via Digitalmars-d-learn
V Wed, 11 Nov 2015 06:17:00 + Vadim Lopatin via Digitalmars-d-learn napsáno: > Hello, > > I'm working on native Cocoa backend for DlangUI GUI library under > OSX. > Is there any ready to use bindings for easy accessing Cocoa API? > Probably, there is some

Re: DUB library prefix - rules ?

2015-11-11 Thread Nicholas Wilson via Digitalmars-d-learn
On Wednesday, 11 November 2015 at 05:03:47 UTC, BBaz wrote: quoted from the website: Sets the base name of the output file; type and platform specific pre- and suffixes are added automatically - this setting does not support platform suffixes I must be blind but I can't find the code that

Re: my first D program (and benchmark against perl)

2015-11-11 Thread Edwin van Leeuwen via Digitalmars-d-learn
On Wednesday, 11 November 2015 at 13:32:00 UTC, perlancar wrote: for (int rownum=0; rownum < table.length; rownum++) { res ~= "|"; for (int colnum=0; colnum < table[rownum].length; colnum++) { res ~= leftJustify(table[rownum][colnum], widths[colnum]);

Re: Error: no property "someFont" for type int

2015-11-11 Thread Marco de Wild via Digitalmars-d-learn
This is not D. It should be giving you a compiler error. How are you compiling? Or did you type 'using' in the post by mistake? Anyway, what you want is: import style; I indeed made a typo while typing the post (and also on various occasions while writing the program, but compiler errors

Re: my first D program (and benchmark against perl)

2015-11-11 Thread cym13 via Digitalmars-d-learn
On Wednesday, 11 November 2015 at 16:02:07 UTC, H. S. Teoh wrote: If performance is a problem, my first reaction would be to try GDC or LDC. While there have been recent improvements in DMD code generation quality, it still has a ways to go to catch with GDC/LDC's optimizer. T My

Re: OSX Foundation framework D binding

2015-11-11 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-11-11 10:29, Daniel Kozak via Digitalmars-d-learn wrote: I find only this one: http://code.dlang.org/packages/derelict-cocoa Also, there's no point in complicate the bindings by using function pointers like this. -- /Jacob Carlborg

Re: my first D program (and benchmark against perl)

2015-11-11 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Nov 11, 2015 at 02:26:28PM +, Andrea Fontana via Digitalmars-d-learn wrote: > On Wednesday, 11 November 2015 at 13:32:00 UTC, perlancar wrote: > >While I am quite impressed with how easy I was able to write D, I am > >not so impressed with the performance. Using rdmd (build 20151103),

Re: my first D program (and benchmark against perl)

2015-11-11 Thread Rikki Cattermole via Digitalmars-d-learn
On 12/11/15 2:31 AM, perlancar wrote: Here's my first non-hello-world D program, which is a direct translation from the Perl version. I was trying to get a feel about D's performance: ---BEGIN asciitable.d--- import std.string; import std.stdio; string fmttable(ref string[][] table) {

Re: OSX Foundation framework D binding

2015-11-11 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-11-11 17:02, Jacob Carlborg wrote: I would recommend creating new bindings which use the new Objective-C interoperability feature that was added in the latest release (2.069.0). You could use DStep [1] to generate the bindings. It will generate bindings which are not completely

Re: OSX Foundation framework D binding

2015-11-11 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-11-11 10:29, Daniel Kozak via Digitalmars-d-learn wrote: I find only this one: http://code.dlang.org/packages/derelict-cocoa I would recommend creating new bindings which use the new Objective-C interoperability feature that was added in the latest release (2.069.0). -- /Jacob

my first D program (and benchmark against perl)

2015-11-11 Thread perlancar via Digitalmars-d-learn
Here's my first non-hello-world D program, which is a direct translation from the Perl version. I was trying to get a feel about D's performance: ---BEGIN asciitable.d--- import std.string; import std.stdio; string fmttable(ref string[][] table) { string res = ""; // column widths

Re: OSX Foundation framework D binding

2015-11-11 Thread Vadim Lopatin via Digitalmars-d-learn
On Wednesday, 11 November 2015 at 09:29:47 UTC, Daniel Kozak wrote: V Wed, 11 Nov 2015 06:17:00 + Vadim Lopatin via Digitalmars-d-learn napsáno: Hello, I'm working on native Cocoa backend for DlangUI GUI library under OSX. Is there any ready to use

Re: my first D program (and benchmark against perl)

2015-11-11 Thread Andrea Fontana via Digitalmars-d-learn
On Wednesday, 11 November 2015 at 13:32:00 UTC, perlancar wrote: While I am quite impressed with how easy I was able to write D, I am not so impressed with the performance. Using rdmd (build 20151103), the D program runs in 17.127s while the Perl version runs in 11.391s (so the D version is

Re: my first D program (and benchmark against perl)

2015-11-11 Thread Rikki Cattermole via Digitalmars-d-learn
On 12/11/15 3:20 AM, Rikki Cattermole wrote: On 12/11/15 2:31 AM, perlancar wrote: Here's my first non-hello-world D program, which is a direct translation from the Perl version. I was trying to get a feel about D's performance: ---BEGIN asciitable.d--- import std.string; import std.stdio;

Re: why does this error out?

2015-11-11 Thread lobo via Digitalmars-d-learn
On Thursday, 12 November 2015 at 02:36:23 UTC, lobo wrote: On Tuesday, 10 November 2015 at 14:25:19 UTC, steven kladitis wrote: On Tuesday, 10 November 2015 at 05:14:29 UTC, lobo wrote: [...] with dmd 2.069 I always get --> [1 and then the error no matter what I canhe that line to. Hmm,

Re: why does this error out?

2015-11-11 Thread lobo via Digitalmars-d-learn
On Tuesday, 10 November 2015 at 14:25:19 UTC, steven kladitis wrote: On Tuesday, 10 November 2015 at 05:14:29 UTC, lobo wrote: On Tuesday, 10 November 2015 at 04:34:22 UTC, Cauterite wrote: Here's the output I get (DMD v2.068.2): [1, 3, 10, 12, 21, 30, 100, 102, 111, 120, 201, 210]

Re: Linker error from dub?

2015-11-11 Thread Stiff via Digitalmars-d-learn
On Thursday, 12 November 2015 at 05:17:58 UTC, BBasile wrote: On Thursday, 12 November 2015 at 02:02:56 UTC, Stiff wrote: Possibly a dumb question, I'm not sure. [...] undefined reference to `cblas_dgemm' collect2: error: ld returned 1 exit status --- errorlevel 1 dmd failed with exit code 1.

win32 from master: unicode functions by default?

2015-11-11 Thread Andre via Digitalmars-d-learn
Hi, by using the win32 library from master, the functions aliases to the ansi windows functions (...A) instead of the unicode functions (...W). Is there a way to control this behavior beside using the explicit function names (A/W)? Kind regards André

Compiler doesn't complain with multiple definitions

2015-11-11 Thread ric maicle via Digitalmars-d-learn
I was playing with __traits and tried the code below. Shouldn't the compiler emit a warning that I'm defining isPOD multiple times and/or I'm defining something that is built-in like isPOD? // DMD64 D Compiler v2.069 import std.stdio; struct isPOD { bool status = false; } int main() { byte

Re: OSX Foundation framework D binding

2015-11-11 Thread Vadim Lopatin via Digitalmars-d-learn
On Wednesday, 11 November 2015 at 16:04:44 UTC, Jacob Carlborg wrote: On 2015-11-11 17:02, Jacob Carlborg wrote: I would recommend creating new bindings which use the new Objective-C interoperability feature that was added in the latest release (2.069.0). You could use DStep [1] to generate

Re: Linker error from dub?

2015-11-11 Thread BBasile via Digitalmars-d-learn
On Thursday, 12 November 2015 at 02:02:56 UTC, Stiff wrote: Possibly a dumb question, I'm not sure. [...] undefined reference to `cblas_dgemm' collect2: error: ld returned 1 exit status --- errorlevel 1 dmd failed with exit code 1. Any suggestions? I do have a blas library installed, but the

Linker error from dub?

2015-11-11 Thread Stiff via Digitalmars-d-learn
Possibly a dumb question, I'm not sure. I'm trying to use the cblas headers from DLangScience, and getting linker errors out of dub when trying to build my project. I'm only trying to call gemm(), so it should be pretty straightforward. Anyway, my dub.json: { "name" : "tcbuilder",

Re: win32 from master: unicode functions by default?

2015-11-11 Thread Mike Parker via Digitalmars-d-learn
On Thursday, 12 November 2015 at 04:58:42 UTC, Andre wrote: Hi, by using the win32 library from master, the functions aliases to the ansi windows functions (...A) instead of the unicode functions (...W). Is there a way to control this behavior beside using the explicit function names (A/W)?

Re: OSX Foundation framework D binding

2015-11-11 Thread Vadim Lopatin via Digitalmars-d-learn
On Wednesday, 11 November 2015 at 16:04:44 UTC, Jacob Carlborg wrote: On 2015-11-11 17:02, Jacob Carlborg wrote: I would recommend creating new bindings which use the new Objective-C interoperability feature that was added in the latest release (2.069.0). You could use DStep [1] to generate

Re: win32 from master: unicode functions by default?

2015-11-11 Thread Andre via Digitalmars-d-learn
On Thursday, 12 November 2015 at 05:08:25 UTC, Mike Parker wrote: On Thursday, 12 November 2015 at 04:58:42 UTC, Andre wrote: Hi, by using the win32 library from master, the functions aliases to the ansi windows functions (...A) instead of the unicode functions (...W). Is there a way to

Re: Linker error from dub?

2015-11-11 Thread BBasile via Digitalmars-d-learn
On Thursday, 12 November 2015 at 05:44:37 UTC, Stiff wrote: On Thursday, 12 November 2015 at 05:17:58 UTC, BBasile wrote: On Thursday, 12 November 2015 at 02:02:56 UTC, Stiff wrote: Possibly a dumb question, I'm not sure. [...] undefined reference to `cblas_dgemm' collect2: error: ld returned

Re: Linker error from dub?

2015-11-11 Thread BBasile via Digitalmars-d-learn
On Thursday, 12 November 2015 at 06:03:49 UTC, BBasile wrote: It worked fine because it was not used, not parsed, not linked. Maybe just the functions declarations was parsed to solve the symbols in the program, but since none was used the 'import blas.blas' was eliminated or something like

Re: OSX Foundation framework D binding

2015-11-11 Thread Jeremy DeHaan via Digitalmars-d-learn
On Thursday, 12 November 2015 at 05:50:09 UTC, Vadim Lopatin wrote: On Wednesday, 11 November 2015 at 16:04:44 UTC, Jacob Carlborg wrote: On 2015-11-11 17:02, Jacob Carlborg wrote: I would recommend creating new bindings which use the new Objective-C interoperability feature that was added in

How to fix "Error symbol '.....' is already defined"

2015-11-11 Thread Vincent R via Digitalmars-d-learn
Hi, I have a small project and I would like to use D to build it. I am working on Windows and I have already generated a gdc compiler through msys2/mingw64 and now I would like to compile the old.unmaintained wxWidgets wrapper called wxd. I have forked the project here: