Re: is char[] faster than string?

2017-04-05 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Apr 05, 2017 at 09:58:16PM +, Inquie via Digitalmars-d-learn wrote: > I have a lot of string concatenation to do and I'm wondering if char[] > is faster? Does it simply extend the buffer or are new buffers created > every time? > > What I am looking for is something like StringBuilder

Re: is char[] faster than string?

2017-04-05 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 5 April 2017 at 21:58:16 UTC, Inquie wrote: I have a lot of string concatenation to do and I'm wondering if char[] is faster? No, they are the same. Does it simply extend the buffer or are new buffers created every time? Both will extend the buffer when the runtime can

is char[] faster than string?

2017-04-05 Thread Inquie via Digitalmars-d-learn
I have a lot of string concatenation to do and I'm wondering if char[] is faster? Does it simply extend the buffer or are new buffers created every time? What I am looking for is something like StringBuilder in C#.

Re: cmake-d and gdc/gdmd compiler

2017-04-05 Thread timvol via Digitalmars-d-learn
On Tuesday, 4 April 2017 at 19:59:19 UTC, Dragos Carp wrote: On Tuesday, 4 April 2017 at 18:42:45 UTC, timvol wrote: Hi guys, I'm trying to cross-compile a project using CMake and gdc (or better: the gdmd port). My CMakeLists-file is the following: For cross-compiling, CMake uses a so

Re: Single exe vibe.d app

2017-04-05 Thread Inquie via Digitalmars-d-learn
On Wednesday, 5 April 2017 at 12:42:23 UTC, evilrat wrote: On Wednesday, 5 April 2017 at 12:13:38 UTC, Satoshi wrote: Hi, How can I build single exe application with vibe.d (windows)? now it require zlib.dll, libeay32.dll and ssleay32.dll But I need it as single app. btw, if all you need is

Re: Single exe vibe.d app

2017-04-05 Thread Nicholas Wilson via Digitalmars-d-learn
On Wednesday, 5 April 2017 at 12:13:38 UTC, Satoshi wrote: Hi, How can I build single exe application with vibe.d (windows)? now it require zlib.dll, libeay32.dll and ssleay32.dll But I need it as single app. As Evilrat notes static libraries are one solution, the catch being you need to get

Re: Single exe vibe.d app

2017-04-05 Thread evilrat via Digitalmars-d-learn
On Wednesday, 5 April 2017 at 12:13:38 UTC, Satoshi wrote: Hi, How can I build single exe application with vibe.d (windows)? now it require zlib.dll, libeay32.dll and ssleay32.dll But I need it as single app. btw, if all you need is to ship it as a single file and don't care if it writes

Re: Covert a complex C header to D

2017-04-05 Thread Nicholas Wilson via Digitalmars-d-learn
On Wednesday, 5 April 2017 at 12:27:23 UTC, biocyberman wrote: On Monday, 3 April 2017 at 23:10:49 UTC, Stefan Koch wrote: On Monday, 3 April 2017 at 11:18:21 UTC, Nicholas Wilson wrote: prefer template over string mixins where possible. This will make the code much more readable. My

Re: pyd: implementing __hash__ and __str__ for PyD wrapped classes

2017-04-05 Thread harfel via Digitalmars-d-learn
On Wednesday, 5 April 2017 at 11:39:47 UTC, Nicholas Wilson wrote: On Wednesday, 5 April 2017 at 09:31:09 UTC, harfel wrote: Dear all, [...] Following the documentation and code examples, I got the basic functionality working. However, I am struggling with implementing the magic functions

Re: Covert a complex C header to D

2017-04-05 Thread biocyberman via Digitalmars-d-learn
On Monday, 3 April 2017 at 23:10:49 UTC, Stefan Koch wrote: On Monday, 3 April 2017 at 11:18:21 UTC, Nicholas Wilson wrote: prefer template over string mixins where possible. This will make the code much more readable. My advise would be the opposite. templates put much more pressure on

Re: Single exe vibe.d app

2017-04-05 Thread evilrat via Digitalmars-d-learn
On Wednesday, 5 April 2017 at 12:13:38 UTC, Satoshi wrote: Hi, How can I build single exe application with vibe.d (windows)? now it require zlib.dll, libeay32.dll and ssleay32.dll But I need it as single app. you have to build those as static libraries first, compile vibe.d with that static

Single exe vibe.d app

2017-04-05 Thread Satoshi via Digitalmars-d-learn
Hi, How can I build single exe application with vibe.d (windows)? now it require zlib.dll, libeay32.dll and ssleay32.dll But I need it as single app.

Re: pyd: implementing __hash__ and __str__ for PyD wrapped classes

2017-04-05 Thread Nicholas Wilson via Digitalmars-d-learn
On Wednesday, 5 April 2017 at 09:31:09 UTC, harfel wrote: Dear all, Relatively new to D in general and PyD in particular, I am trying to wrap some D classes I wrote for use in Python. Following the documentation and code examples, I got the basic functionality working. However, I am

pyd: implementing __hash__ and __str__ for PyD wrapped classes

2017-04-05 Thread harfel via Digitalmars-d-learn
Dear all, Relatively new to D in general and PyD in particular, I am trying to wrap some D classes I wrote for use in Python. Following the documentation and code examples, I got the basic functionality working. However, I am struggling with implementing the magic functions __str__ and