Re: New vs length on dymamic array

2020-11-09 Thread Daniel Kozák via Digitalmars-d-learn
On Monday, 9 November 2020 at 08:06:54 UTC, Andrey wrote: Hello, Are here any differences in creation of dynamic array with known size? auto array = new wchar[](111); and wchar[] array; array.length = 111; In theory auto array = new wchar[111]; // or new wchar[](111); should do less

Re: 1 - 17 ms, 553 ╬╝s, and 1 hnsec

2019-05-27 Thread Daniel Kozák via Digitalmars-d-learn
On Friday, 17 May 2019 at 18:02:04 UTC, kdevel wrote: On Thursday, 16 May 2019 at 20:31:23 UTC, Vladimir Panteleev wrote: On Thursday, 16 May 2019 at 20:17:37 UTC, Steven Schveighoffer [...] hnsecs is more confusing than nanoseconds. People know what a nanosecond is, a hecto-nano-second is

Re: Why GNU coreutils/dd is creating a dummy file more efficiently than D's For loop?

2019-05-23 Thread Daniel Kozák via Digitalmars-d-learn
On Thursday, 23 May 2019 at 18:37:17 UTC, H. S. Teoh wrote: On Thu, May 23, 2019 at 06:20:23PM +, kdevel via Digitalmars-d-learn wrote: On Thursday, 23 May 2019 at 09:44:15 UTC, Cym13 wrote: [...] > To go fast, read/write bigger chunks. Or use rawWrite instead of write (reduces the

Re: D IDE "Dexed" - version 3.7.0 available

2019-01-07 Thread Daniel Kozák via Digitalmars-d-announce
I have tried to install it on archlinux but I get something else: http://asb2m10.github.io/dexed/

Re: D is helping from porch pirates

2018-12-17 Thread Daniel Kozák via Digitalmars-d-announce
On Monday, 17 December 2018 at 23:13:18 UTC, Daniel Kozák wrote: https://gma.abc/2zWvXCl https://forum.dlang.org/post/mailman.5569.1501666175.31550.digitalmar...@puremagic.com

D is helping from porch pirates

2018-12-17 Thread Daniel Kozák via Digitalmars-d-announce
https://gma.abc/2zWvXCl

Re: D money data type compatible with postgresql money

2018-11-17 Thread Daniel Kozák via Digitalmars-d-learn
On Saturday, 17 November 2018 at 12:35:45 UTC, Daniel Kozák wrote: On Saturday, 17 November 2018 at 11:48:56 UTC, Václav Kozák wrote: Hello, I have a column of type money in my database. I need to pull the data from the db in my vibe.d backend, but it can't handle such data type. How can I do

Re: D money data type compatible with postgresql money

2018-11-17 Thread Daniel Kozák via Digitalmars-d-learn
On Saturday, 17 November 2018 at 11:48:56 UTC, Václav Kozák wrote: Hello, I have a column of type money in my database. I need to pull the data from the db in my vibe.d backend, but it can't handle such data type. How can I do it? Should I use some library (which?)? Thanks. You could use

Re: ASDF v0.1.5-beta0: new parser is ~40% faster

2017-10-04 Thread Daniel Kozák via Digitalmars-d-announce
On Wednesday, 4 October 2017 at 14:04:30 UTC, Nicholas Wilson wrote: On Wednesday, 4 October 2017 at 13:15:17 UTC, Ilya Yaroshenko wrote: On Wednesday, 4 October 2017 at 12:11:54 UTC, Kagamin wrote: On Sunday, 1 October 2017 at 14:38:04 UTC, Ilya Yaroshenko wrote: [1]

Re: Why does this compile (method in class without return type)

2017-05-03 Thread Daniel Kozák via Digitalmars-d-learn
V Wed, 03 May 2017 09:21:47 + nkm1 via Digitalmars-d-learn napsáno: > On Wednesday, 3 May 2017 at 07:34:03 UTC, Daniel Kozák wrote: > > > > print in A is template: > > > > What :) > How does it interact with 'final'? hmm obviously it is problem only

Re: Why does this compile (method in class without return type)

2017-05-03 Thread Daniel Kozák via Digitalmars-d-learn
V Wed, 03 May 2017 09:21:47 + nkm1 via Digitalmars-d-learn napsáno: > On Wednesday, 3 May 2017 at 07:34:03 UTC, Daniel Kozák wrote: > > > > print in A is template: > > > > What :) > How does it interact with 'final'? final is not important here

Re: Why does this compile (method in class without return type)

2017-05-03 Thread Daniel Kozák via Digitalmars-d-learn
V Wed, 03 May 2017 06:54:15 + nkm1 via Digitalmars-d-learn napsáno: > Consider: > > import std.stdio; > > class A > { > final print() { writeln(this); } // no return type > } > > class B : A > { > final void print() { writeln(this); } > } > >

Re: Why File is exists in std.stdio and in std.file?

2017-04-25 Thread Daniel Kozák via Digitalmars-d-learn
V Tue, 25 Apr 2017 07:05:51 + Suliman via Digitalmars-d-learn napsáno: > Just interesting. Is there any rational reasons for this decision? No it isn't. File is only in std.stdio;

Re: Need help

2017-03-15 Thread Daniel Kozák via Digitalmars-d-announce
V Wed, 15 Mar 2017 12:25:04 + Jack Applegame via Digitalmars-d-announce napsáno: > On Wednesday, 15 March 2017 at 11:46:26 UTC, Daniel Kozák wrote: > > problem is with this line: > > https://github.com/dlang/dmd/blob/v2.073.2/src/clone.d#L1014 > > > >

Re: Need help

2017-03-15 Thread Daniel Kozák via Digitalmars-d-announce
V Wed, 15 Mar 2017 12:25:04 + Jack Applegame via Digitalmars-d-announce napsáno: > On Wednesday, 15 March 2017 at 11:46:26 UTC, Daniel Kozák wrote: > > problem is with this line: > > https://github.com/dlang/dmd/blob/v2.073.2/src/clone.d#L1014 > > > >

Re: Need help

2017-03-15 Thread Daniel Kozák via Digitalmars-d-announce
V Wed, 15 Mar 2017 12:25:04 + Jack Applegame via Digitalmars-d-announce napsáno: > On Wednesday, 15 March 2017 at 11:46:26 UTC, Daniel Kozák wrote: > > problem is with this line: > > https://github.com/dlang/dmd/blob/v2.073.2/src/clone.d#L1014 > > > >

Re: Need help

2017-03-15 Thread Daniel Kozák via Digitalmars-d-announce
V Wed, 15 Mar 2017 07:37:53 + Jack Applegame via Digitalmars-d-announce napsáno: > Dear developers. I need help fixing issue #17257 > (https://issues.dlang.org/show_bug.cgi?id=17257) and related bug >

Re: Need help

2017-03-15 Thread Daniel Kozák via Digitalmars-d-announce
V Wed, 15 Mar 2017 09:19:17 + Jack Applegame via Digitalmars-d-announce napsáno: > On Wednesday, 15 March 2017 at 08:52:03 UTC, David Nadlinger > wrote: > > This is a forum for announcements of general interest. Please > > take that into consideration

Re: foreach for string[string]AA

2017-02-28 Thread Daniel Kozák via Digitalmars-d-learn
V Tue, 28 Feb 2017 15:15:00 + Anton Pastukhov via Digitalmars-d-learn napsáno: > I can't see the logic in AA foreach order. Consider this code: > ... > Output: > three > two > one > four > > I was sure output should be > one > two > three > four

Re: Copying and moving directories

2017-02-16 Thread Daniel Kozák via Digitalmars-d-learn
V Thu, 16 Feb 2017 16:38:51 + Chris via Digitalmars-d-learn napsáno: > In `std.file`, I haven't found a function that allows me to move > or at least copy directories, as in `mv dir /toDir`. Do I have to > go the awkward way over `rename` or something?

Re: Static array size?

2017-02-09 Thread Daniel Kozák via Digitalmars-d-learn
V Thu, 09 Feb 2017 11:22:28 + Suliman via Digitalmars-d-learn napsáno: > Docs says that: > "The total size of a static array cannot exceed 16Mb." > But when I am creation array of: > int [1000_000] x; // 1000_000 is equal ~ 0,95MB > app crush on start. > >

Re: code.dlang.org internal server error

2017-02-09 Thread Daniel Kozák via Digitalmars-d
V Thu, 9 Feb 2017 11:54:05 +0100 Sönke Ludwig via Digitalmars-d napsáno: > Am 09.02.2017 um 03:34 schrieb puming: > > On Wednesday, 8 February 2017 at 14:11:48 UTC, Sönke Ludwig wrote: > >> Am 08.02.2017 um 14:29 schrieb singingbush: > >>> [...] > >> > >> Yes,

Re: code.dlang.org internal server error

2017-02-09 Thread Daniel Kozák via Digitalmars-d
V Thu, 09 Feb 2017 02:34:46 + puming via Digitalmars-d napsáno: > On Wednesday, 8 February 2017 at 14:11:48 UTC, Sönke Ludwig wrote: > > Am 08.02.2017 um 14:29 schrieb singingbush: > >> [...] > > > > Yes, we need to prioritize this somehow. Having a fallback

Re: Does vibe.d support setting cookies?

2017-02-01 Thread Daniel Kozák via Digitalmars-d-learn
V Wed, 01 Feb 2017 14:09:41 + aberba via Digitalmars-d-learn napsáno: > I can't find it. Like set_cookie() in php. maybe this http://vibed.org/api/vibe.http.server/HTTPServerResponse.setCookie

Re: Does vibe.d support setting cookies?

2017-02-01 Thread Daniel Kozák via Digitalmars-d-learn
V Wed, 01 Feb 2017 14:09:41 + aberba via Digitalmars-d-learn napsáno: > I can't find it. Like set_cookie() in php. I am not sure but I use this in one of my projects import vibe.http.client; auto clientOCX = new RestInterfaceClient!I(host ~

Re: Allow static methods and fields for enum?

2017-01-26 Thread Daniel Kozák via Digitalmars-d
V Thu, 26 Jan 2017 06:32:10 + Profile Anaysis via Digitalmars-d napsáno: > Why not make enum a comparable type to structs and classes? > > They are static so they can't contain any mutable fields but > surely they can contain methods? And especially they should

Re: CTFE Status

2017-01-23 Thread Daniel Kozák via Digitalmars-d
V Mon, 23 Jan 2017 17:42:00 + Stefan Koch via Digitalmars-d napsáno: > interpret3.d passes!!! > > The only remaining issues that cause miscompiled code are > UTF(8/16/32) encoding and decoding issues. WOW

Re: Parsing a UTF-16LE file line by line, BUG?

2017-01-15 Thread Daniel Kozák via Digitalmars-d-learn
V Sun, 15 Jan 2017 14:48:12 + Nestor via Digitalmars-d-learn napsáno: > On Friday, 6 January 2017 at 11:42:17 UTC, Mike Wey wrote: > > On 01/06/2017 11:33 AM, pineapple wrote: > >> On Friday, 6 January 2017 at 06:24:12 UTC, rumbu wrote: > >

Re: What about an identifier that is an mixin

2017-01-15 Thread Daniel Kozák via Digitalmars-d
V Sat, 14 Jan 2017 01:28:51 + André Puel via Digitalmars-d napsáno: > On Friday, 13 January 2017 at 23:13:43 UTC, Daniel Kozak wrote: > > On Friday, 13 January 2017 at 22:12:55 UTC, André Puel wrote: > >> > >> Could you elaborate on why you consider it

Re: What about an identifier that is an mixin

2017-01-13 Thread Daniel Kozák via Digitalmars-d
Daniel Kozák napsal Pá, led 13, 2017 v 10∶32 : Daniel Kozák napsal Pá, led 13, 2017 v 10∶29 : André Puel via Digitalmars-d napsal Pá, led 13, 2017 v 10∶15 : One thing that I miss sometimes when doing meta programming is

Re: What about an identifier that is an mixin

2017-01-13 Thread Daniel Kozák via Digitalmars-d
Daniel Kozák napsal Pá, led 13, 2017 v 10∶29 : André Puel via Digitalmars-d napsal Pá, led 13, 2017 v 10∶15 : One thing that I miss sometimes when doing meta programming is being able to hide that a function should be called with mixin. For

Re: What about an identifier that is an mixin

2017-01-13 Thread Daniel Kozák via Digitalmars-d
André Puel via Digitalmars-d napsal Pá, led 13, 2017 v 10∶15 : One thing that I miss sometimes when doing meta programming is being able to hide that a function should be called with mixin. For example (pardon my lack of creativity): // Instead of string

Re: dmd download spike

2017-01-07 Thread Daniel Kozák via Digitalmars-d
Daniel Kozák napsal So, led 7, 2017 v 9∶28 : rikki cattermole via Digitalmars-d napsal So, led 7, 2017 v 3∶58 : On 07/01/2017 3:56 PM, Joakim wrote: A giant spike in downloads recently, likely tied to the latest 2.072 release:

Re: dmd download spike

2017-01-07 Thread Daniel Kozák via Digitalmars-d
rikki cattermole via Digitalmars-d napsal So, led 7, 2017 v 3∶58 : On 07/01/2017 3:56 PM, Joakim wrote: A giant spike in downloads recently, likely tied to the latest 2.072 release: http://erdani.com/d/downloads.daily.png Nice work everyone. A lot of people

Re: Mysql-native - full database backup

2017-01-05 Thread Daniel Kozák via Digitalmars-d-learn
Geert via Digitalmars-d-learn napsal Čt, led 5, 2017 v 3∶13 : On Thursday, 5 January 2017 at 01:16:09 UTC, crimaniak wrote: On Monday, 2 January 2017 at 15:29:08 UTC, Geert wrote: Hi! How can i create a full database backup using mysql-native for D? Too

Re: Another XML DOM Package

2017-01-04 Thread Daniel Kozák via Digitalmars-d-announce
Guillaume Piolat via Digitalmars-d-announce napsal St, led 4, 2017 v 11∶48 : On Friday, 30 December 2016 at 04:19:47 UTC, apz28 wrote: This is my first package to learn D. Suggestion for improvement is welcome. https://github.com/apz28/dlang-xml

Re: Parsing a UTF-16LE file line by line, BUG?

2017-01-04 Thread Daniel Kozák via Digitalmars-d-learn
Nestor via Digitalmars-d-learn napsal St, led 4, 2017 v 8∶20 : On Wednesday, 4 January 2017 at 18:48:59 UTC, Daniel Kozák wrote: Ok, I've done some testing and you are right byLine is broken, so please fill a bug A bug? I was under the impression that this

Re: Parsing a UTF-16LE file line by line?

2017-01-04 Thread Daniel Kozák via Digitalmars-d-learn
Daniel Kozák napsal St, led 4, 2017 v 6∶33 : Nestor via Digitalmars-d-learn napsal St, led 4, 2017 v 12∶03 : Hi, I was just trying to parse a UTF-16LE file using byLine, but apparently this function doesn't work with anything other

Re: Parsing a UTF-16LE file line by line?

2017-01-04 Thread Daniel Kozák via Digitalmars-d-learn
Nestor via Digitalmars-d-learn napsal St, led 4, 2017 v 12∶03 : Hi, I was just trying to parse a UTF-16LE file using byLine, but apparently this function doesn't work with anything other than UTF-8, because I get this error: "Invalid UTF-8 sequence (at

Re: String characters not extended

2017-01-03 Thread Daniel Kozák via Digitalmars-d-learn
Anonymouse via Digitalmars-d-learn napsal Út, led 3, 2017 v 12∶34 : On Monday, 2 January 2017 at 21:07:37 UTC, Ignacious wrote: [...] Assuming Windows: version(Windows) shared static this() { import core.sys.windows.windows; SetConsoleCP(65001);

Re: New GDC binaries: 2.068.2, shared library support, multilib support & a new gdmd tool

2016-12-26 Thread Daniel Kozák via Digitalmars-d-announce
Johannes Pfau via Digitalmars-d-announce napsal Ne, pro 25, 2016 v 8∶41 : Happy holidays everybody, I'm happy to finally announce the release of new GDC binaries at https://gdcproject.org/downloads . GDC is the GNU D Compiler, a D compiler using GCC as

Re: [DIP1005] Unused imports in with(import) declarations: leave alone of flag as errors?

2016-12-25 Thread Daniel Kozák via Digitalmars-d
Andrei Alexandrescu via Digitalmars-d napsal So, pro 24, 2016 v 9∶32 : Consider: with (import std.stdio) int fun(int x/*, File f*/) { // f.writeln("In: ", x); return x * x; } Such situations occur during refactorings and code evolution. The import is no

Re: Red Hat's issues in considering the D language

2016-12-22 Thread Daniel Kozák via Digitalmars-d
? I am on fedora and I have dmd, so it is not true :P Dejan Lekic via Digitalmars-d napsal St, pro 21, 2016 v 6∶36 : On Wednesday, 21 December 2016 at 16:41:56 UTC, hardreset wrote: Moving the reference compiler to LLVM as was suggested in the list. LDC is the

Re: Multiple return value as requirements for safety and performance

2016-12-20 Thread Daniel Kozák via Digitalmars-d
Walter Bright via Digitalmars-d napsal Út, pro 20, 2016 v 3∶47 : On 12/20/2016 5:47 AM, Ilya Yaroshenko wrote: One good thing for safety and CTFE is allow multiple return value. In combination with `auto ref` it is _very_ powerful: auto ref front() { //

Re: Most performant way of converting int to string

2015-12-22 Thread Daniel Kozák via Digitalmars-d-learn
V Tue, 22 Dec 2015 18:39:16 + Ivan Kazmenko via Digitalmars-d-learn napsáno: > On Tuesday, 22 December 2015 at 18:11:24 UTC, rumbu wrote: > > On Tuesday, 22 December 2015 at 17:15:27 UTC, Andrew Chapman > > wrote: > >> Sorry if this is a silly question

Re: Most performant way of converting int to string

2015-12-22 Thread Daniel Kozák via Digitalmars-d-learn
V Tue, 22 Dec 2015 18:11:24 + rumbu via Digitalmars-d-learn napsáno: > On Tuesday, 22 December 2015 at 17:15:27 UTC, Andrew Chapman > wrote: > > Sorry if this is a silly question but is the to! method from > > the conv library the most efficient way of

Re: Most performant way of converting int to string

2015-12-22 Thread Daniel Kozák via Digitalmars-d-learn
V Tue, 22 Dec 2015 17:15:27 + Andrew Chapman via Digitalmars-d-learn napsáno: > Sorry if this is a silly question but is the to! method from the > conv library the most efficient way of converting an integer > value to a string? > > e.g. > string s =

Re: Most performant way of converting int to string

2015-12-22 Thread Daniel Kozák via Digitalmars-d-learn
V Tue, 22 Dec 2015 20:52:07 + rumbu via Digitalmars-d-learn napsáno: > On Tuesday, 22 December 2015 at 19:45:46 UTC, Daniel Kozák wrote: > > V Tue, 22 Dec 2015 18:11:24 + > > rumbu via Digitalmars-d-learn > > > >

Re: Most performant way of converting int to string

2015-12-22 Thread Daniel Kozák via Digitalmars-d-learn
V Tue, 22 Dec 2015 21:10:54 + rumbu via Digitalmars-d-learn napsáno: > On Tuesday, 22 December 2015 at 20:52:07 UTC, rumbu wrote: > > On Tuesday, 22 December 2015 at 19:45:46 UTC, Daniel Kozák > > wrote: > >> V Tue, 22 Dec 2015 18:11:24 + > >> rumbu

Re: Most performant way of converting int to string

2015-12-22 Thread Daniel Kozák via Digitalmars-d-learn
V Tue, 22 Dec 2015 09:43:00 -0800 "H. S. Teoh via Digitalmars-d-learn" napsáno: > On Tue, Dec 22, 2015 at 05:23:11PM +, Andrew Chapman via > Digitalmars-d-learn wrote: [...] > > for({int i; i = 0;} i < num; i++) { > > //string s =

Re: Most performant way of converting int to string

2015-12-22 Thread Daniel Kozák via Digitalmars-d-learn
V Tue, 22 Dec 2015 12:55:10 -0800 "H. S. Teoh via Digitalmars-d-learn" <digitalmars-d-learn@puremagic.com> napsáno: > On Tue, Dec 22, 2015 at 08:54:35PM +0100, Daniel Kozák via > Digitalmars-d-learn wrote: > > V Tue, 22 Dec 2015 09:43:00 -0800 > > &

Re: Socket - handling large numbers of incoming connections

2015-12-21 Thread Daniel Kozák via Digitalmars-d-learn
V Mon, 21 Dec 2015 20:53:14 + Jakob Jenkov via Digitalmars-d-learn napsáno: > On Monday, 21 December 2015 at 20:20:44 UTC, Stefan wrote: > > How about https://github.com/dcarp/asynchronous ? Asyncio > > Socket handling is sometimes quite nice. It's

Re: Reason for 'static struct'

2015-12-09 Thread Daniel Kozák via Digitalmars-d-learn
V Wed, 09 Dec 2015 21:10:43 + Jon D via Digitalmars-d-learn napsáno: > There is a fair bit of range related code in the standard library > structured like: > > auto MyRange(Range)(Range r) > if (isInputRange!Range) > { >

Re: I hate new DUB config format

2015-11-26 Thread Daniel Kozák via Digitalmars-d
V Thu, 26 Nov 2015 22:27:06 + CraigDillabaugh via Digitalmars-d napsáno: > On Thursday, 26 November 2015 at 20:56:04 UTC, Bruno Medeiros > wrote: > > On 26/11/2015 12:53, Daniel Kozak via Digitalmars-d wrote: > >> V Thu, 26 Nov 2015 12:43:52 + > >> Chris

Re: Here's looking at you, kid

2015-11-18 Thread Daniel Kozák via Digitalmars-d
V Wed, 18 Nov 2015 17:21:50 + Ola Fosheim Grøstad via Digitalmars-d napsáno: > On Sunday, 15 November 2015 at 19:02:08 UTC, Russel Winder wrote: > > flat for the first six months at least of 2016. I think I am > > more or less committed to rewriting Me TV (C++,

Re: LDC, GDC, DMD different phobos versions

2015-11-15 Thread Daniel Kozák via Digitalmars-d
V Sun, 15 Nov 2015 19:53:53 +0100 Jordi Sayol via Digitalmars-d napsáno: > El 15/11/15 a les 16:28, Daniel Kozak via Digitalmars-d ha escrit: > > Generaly many changes of phobos are backward compatible, so I can > > use old version of phobos symbols... But there is

Re: Release D 2.069.0

2015-11-04 Thread Daniel Kozák via Digitalmars-d-announce
V Wed, 04 Nov 2015 18:44:40 + Dicebot via Digitalmars-d-announce napsáno: > On Wednesday, 4 November 2015 at 01:50:38 UTC, Martin Nowak wrote: > > Glad to announce D 2.069.0. > > > > http://dlang.org/download.html > >

Re: D bindings for Bonjour

2015-10-28 Thread Daniel Kozák via Digitalmars-d-learn
V Wed, 28 Oct 2015 16:36:32 + Vincent R via Digitalmars-d-learn napsáno: > On Wednesday, 28 October 2015 at 16:12:08 UTC, Vincent R wrote: > > On Wednesday, 28 October 2015 at 16:09:02 UTC, Cauterite wrote: > >> On Wednesday, 28 October 2015 at 16:04:52

Re: Weird behaviour with File.eof

2015-09-20 Thread Daniel Kozák via Digitalmars-d-learn
V Sun, 20 Sep 2015 20:17:36 + Dandyvica via Digitalmars-d-learn napsáno: > Hi all, > > I can't explain to myself this weird behavior: > > void main(string[] argv) > { > char[] line; > auto fh = File(argv[1]); > while (!fh.eof) { >

Re: foreach(line; f.byLine) produces core.exception.InvalidMemoryOperationError@(0) in 2.067 but not 2.066

2015-09-15 Thread Daniel Kozák via Digitalmars-d-learn
On Tue, 15 Sep 2015 13:56:36 + Andrwe Brown via Digitalmars-d-learn wrote: > Hi, > > I'm trying to read a file line by line, and I get a > core.exception.InvalidMemoryOperationError@(0), even after > reducing the program to: > > import std.stdio; > >

Re: GC performance: collection frequency

2015-09-14 Thread Daniel Kozák via Digitalmars-d
http://dlang.org/changelog/2.067.0.html#gc-options On Mon, 14 Sep 2015 12:25:06 -0700 "H. S. Teoh via Digitalmars-d" wrote: > On Mon, Sep 14, 2015 at 07:19:53PM +, Jonathan M Davis via > Digitalmars-d wrote: [...] > > Isn't there some amount of configuration

Re: What is the difference between D and C++ regarding Unique, RefCounted and Scoped?

2015-09-10 Thread Daniel Kozák via Digitalmars-d-learn
On Thu, 10 Sep 2015 11:38:35 + "Gary Willoughby" wrote: > On Wednesday, 9 September 2015 at 23:22:49 UTC, ponce wrote: > > - RefCounted > > > > Only for D structs. std::shared_ptr works for all. > > RefCounted works with classes as well. > >

Re: DCD 0.7.0

2015-09-07 Thread Daniel Kozák via Digitalmars-d-announce
On Sun, 06 Sep 2015 21:00:11 + Dicebot via Digitalmars-d-announce wrote: > On Wednesday, 2 September 2015 at 09:07:24 UTC, Chris wrote: > > Thanks, great stuff! One thing you say it's been tested with > > 2.067.1, but for this version it gives the

Re: Programming in D – Tutorial and Reference

2015-08-31 Thread Daniel Kozák via Digitalmars-d-announce
On Mon, 31 Aug 2015 01:22:56 + "puming" wrote: > On Friday, 28 August 2015 at 22:58:30 UTC, Luís Marques wrote: > > On Friday, 28 August 2015 at 22:42:00 UTC, sigod wrote: > >> Actual link: https://news.ycombinator.com/item?id=10136882 > > > > I think Walter didn't

Re: order of declaration/definition

2015-08-27 Thread Daniel Kozák via Digitalmars-d-learn
On Thu, 27 Aug 2015 13:01:02 + vitus via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Monday, 24 August 2015 at 01:01:13 UTC, John Colvin wrote: enum A = 1; enum B = C; //Error static if(A) enum C = 0; enum D = C; //OK Is order supposed to matter here?

Re: order of declaration/definition

2015-08-27 Thread Daniel Kozák via Digitalmars-d-learn
On Thu, 27 Aug 2015 13:26:11 + vitus via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Thursday, 27 August 2015 at 13:14:24 UTC, Daniel Kozák wrote: On Thu, 27 Aug 2015 13:01:02 + vitus via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:

Re: What is this function call operator?

2015-08-27 Thread Daniel Kozák via Digitalmars-d-learn
On Thu, 27 Aug 2015 15:18:22 + Gary Willoughby d...@nomad.so wrote: If you visit this link: http://dlang.org/phobos/std_traits.html#isCallable There is this paragraph: Detect whether T is a callable object, which can be called with the function call operator (...). What is

Re: Object.factory() and exe file size bloat

2015-08-25 Thread Daniel Kozák via Digitalmars-d
V Tue, 25 Aug 2015 10:34:57 +0200 Jacob Carlborg via Digitalmars-d digitalmars-d@puremagic.com napsáno: On 2015-08-25 10:18, w0rp wrote: I think this is another case where Walter has got it right, by and large. I think we should try and use 'export' to cut down on binary bloat, and it

Re: Moving forward with work on the D language and foundation

2015-08-25 Thread Daniel Kozák via Digitalmars-d-announce
V Tue, 25 Aug 2015 20:30:23 +0300 Dmitry Olshansky via Digitalmars-d-announce digitalmars-d-announce@puremagic.com napsáno: On 24-Aug-2015 21:42, Andrei Alexandrescu wrote: Hello everyone, Following an increasing desire to focus on working on the D language and foundation, I have

Re: Programming in D paper book is available for purchase

2015-08-19 Thread Daniel Kozák via Digitalmars-d-announce
V Tue, 18 Aug 2015 17:57:31 -0700 Ali Çehreli via Digitalmars-d-announce digitalmars-d-announce@puremagic.com napsáno: I am very happy! :) It will be available on many other distribution channels like Amazon in a few days as well but the following is the link that pays me the most royalty:

Re: Where the F*** is phobos on OSX nowadays ?

2015-08-12 Thread Daniel Kozák via Digitalmars-d
On Wed, 12 Aug 2015 11:16:55 +0200 Jacob Carlborg d...@me.com wrote: On 2015-08-11 23:55, Daniel Kozak via Digitalmars-d wrote: Not at all, I am using dvm and I like it. But OTOH it makes things sometimes wierd. My common habit is to do something like this: dmd somefile ./somefile. But

Re: D needs to focus and better the available resources

2015-08-10 Thread Daniel Kozák via Digitalmars-d
On Mon, 10 Aug 2015 04:24:18 + tcak via Digitalmars-d digitalmars-d@puremagic.com wrote: On Sunday, 9 August 2015 at 17:29:08 UTC, karabuta wrote: A lot of request are made most often about what needs to be added in D and what is lacking (multiple compilers, debugging tools, IDEs,

Re: zlib performance

2015-08-07 Thread Daniel Kozák via Digitalmars-d-learn
On Fri, 07 Aug 2015 08:42:45 + yawniek dl...@srtnwz.com wrote: On Friday, 7 August 2015 at 08:24:11 UTC, Daniel Kozák wrote: can you try it with ldc? ldc[2] -O -release -boundscheck=off -singleobj app.d ldc 0.15.2 beta2 2.86s user 0.55s system 77% cpu 4.392 total

Re: zlib performance

2015-08-07 Thread Daniel Kozák via Digitalmars-d-learn
On Fri, 07 Aug 2015 08:13:01 + yawniek dl...@srtnwz.com wrote: On Friday, 7 August 2015 at 08:05:01 UTC, Daniel Kozák wrote: import std.zlib, std.file, std.stdio, std.conv; void main(string[] args) { auto f = File(args[1], rb); auto uncompressor = new

Re: zlib performance

2015-08-07 Thread Daniel Kozák via Digitalmars-d-learn
On Fri, 07 Aug 2015 08:13:01 + yawniek dl...@srtnwz.com wrote: On Friday, 7 August 2015 at 08:05:01 UTC, Daniel Kozák wrote: import std.zlib, std.file, std.stdio, std.conv; void main(string[] args) { auto f = File(args[1], rb); auto uncompressor = new

Re: zlib performance

2015-08-07 Thread Daniel Kozák via Digitalmars-d-learn
On Fri, 07 Aug 2015 07:19:43 + yawniek via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: hi, unpacking files is kinda slow, probably i'm doing something wrong. below code is about half the speed of gnu zcat on my os x machine. why? why do i need to .dup the buffer?

Re: zlib performance

2015-08-07 Thread Daniel Kozák via Digitalmars-d-learn
On Fri, 07 Aug 2015 07:36:39 + yawniek dl...@srtnwz.com wrote: On Friday, 7 August 2015 at 07:29:15 UTC, Daniel Kozák wrote: Which compiler and version. There has been some performance problem with IO on OSX, it should be fixed in 2.068 release i'm on master. v2.068-devel-8f81ffc

Re: zlib performance

2015-08-07 Thread Daniel Kozák via Digitalmars-d-learn
On Fri, 07 Aug 2015 07:19:43 + yawniek dl...@srtnwz.com wrote: hi, unpacking files is kinda slow, probably i'm doing something wrong. below code is about half the speed of gnu zcat on my os x machine. why? why do i need to .dup the buffer? It depends. In your case you don't need

Re: zlib performance

2015-08-07 Thread Daniel Kozák via Digitalmars-d-learn
On Fri, 07 Aug 2015 08:01:27 + yawniek dl...@srtnwz.com wrote: On Friday, 7 August 2015 at 07:48:25 UTC, yawniek wrote: On Friday, 7 August 2015 at 07:43:25 UTC, Daniel Kozák wrote: the fastest version i could come up so far is below. std.conv slows it down. going from a 4kb to a

Re: zlib performance

2015-08-07 Thread Daniel Kozák via Digitalmars-d-learn
On Fri, 7 Aug 2015 09:43:25 +0200 Daniel Kozák ko...@dlang.cz wrote: On Fri, 07 Aug 2015 07:36:39 + yawniek dl...@srtnwz.com wrote: On Friday, 7 August 2015 at 07:29:15 UTC, Daniel Kozák wrote: Which compiler and version. There has been some performance problem with IO on OSX,

Re: zlib performance

2015-08-07 Thread Daniel Kozák via Digitalmars-d-learn
On Fri, 07 Aug 2015 12:29:26 + yawniek dl...@srtnwz.com wrote: On Friday, 7 August 2015 at 11:45:00 UTC, Daniel Kozak wrote: On Friday, 7 August 2015 at 09:12:32 UTC, yawniek wrote: [...] Can you try it without write operation (comment out all write)? And than try it without

Re: Concurrency Confusion

2015-08-04 Thread Daniel Kozák via Digitalmars-d-learn
On Tue, 04 Aug 2015 10:29:55 + 岩倉 澪 mio.iwak...@gmail.com wrote: On Tuesday, 4 August 2015 at 08:35:10 UTC, Dicebot wrote: auto output = receiveOnly!(immutable(Bar)[]); Won't message passing like this result in an expensive copy No it will copy only struct containing length and

Re: Working with pdf

2015-07-30 Thread Daniel Kozák via Digitalmars-d
I use wkhtmltopdf: http://wkhtmltopdf.org On Thu, 30 Jul 2015 11:19:45 + Kingsley via Digitalmars-d digitalmars-d@puremagic.com wrote: Hi Can anyone recommend any ways of pdf creation using D. I am generating an HTML and JavaScript page but I would like it in pdf format as well.

Re: Why approxEqual not working for integers in dmd 2068-b2

2015-07-28 Thread Daniel Kozák via Digitalmars-d-learn
On Tue, 28 Jul 2015 02:16:56 + lobo swampl...@gmail.com wrote: Hi all, I have a bunch of unittests for template code taking any numeric type. Because I'm lazy I just use the approxEqual for both floating point and integer comparisons in these tests. In DMD 2067.1 everthing

Re: Why approxEqual not working for integers in dmd 2068-b2

2015-07-28 Thread Daniel Kozák via Digitalmars-d-learn
On Tue, 28 Jul 2015 08:50:53 +0200 Daniel Kozák ko...@dlang.cz wrote: On Tue, 28 Jul 2015 02:16:56 + lobo swampl...@gmail.com wrote: I would say it is a compiler bug. consider this: bool some(real x, real y) { return true; } bool some(float x, float y) { return

Re: Why approxEqual not working for integers in dmd 2068-b2

2015-07-28 Thread Daniel Kozák via Digitalmars-d-learn
On Tue, 28 Jul 2015 02:16:56 + lobo swampl...@gmail.com wrote: Hi all, I have a bunch of unittests for template code taking any numeric type. Because I'm lazy I just use the approxEqual for both floating point and integer comparisons in these tests. In DMD 2067.1 everthing

Re: Interfaces, traits, concepts, and my idea for a DIP

2015-07-28 Thread Daniel Kozák via Digitalmars-d
On Tue, 28 Jul 2015 12:49:15 + Atila Neves atila.ne...@gmail.com wrote: So I missed the boat on the lengthy Rust traits discussion on the other thread. I confess I didn't have time to read all of it so forgive me if I bring up something that's already been said there. Since last

Re: What about GDC and LDC after DMD becomes D?

2015-07-22 Thread Daniel Kozák via Digitalmars-d
On Wed, 22 Jul 2015 17:12:14 +0530 Shriramana Sharma via Digitalmars-d digitalmars-d@puremagic.com wrote: Once the front end of DMD becomes fully D, I read that the backend will also become D, but then what will happen to GDC and LDC whose backends are C++ IIUC? They will use same dmd

Re: idiom for C error strings

2015-07-21 Thread Daniel Kozák via Digitalmars-d-learn
On Tue, 21 Jul 2015 12:27:55 + yawniek dl...@srtnwz.com wrote: whats the proper way to use/wrap C functions that expect a error string buffer e.g.: somefun(T param1, char* errstr, size_t errstr_size) in D ? dynamic: auto buf = new char[size]; somefun(param1, buf.ptr,

Re: Weird behavior of this in a subclass, I think?

2015-07-16 Thread Daniel Kozák via Digitalmars-d-learn
On Thu, 16 Jul 2015 00:18:30 + seashell86 via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: So I've been mostly just toying around with D as it seems like it will end up being a strong language for game development both now and even moreso in the future. That being said,

Re: How to use core.thread.Thread

2015-07-16 Thread Daniel Kozák via Digitalmars-d-learn
On Thu, 16 Jul 2015 07:57:10 + aki via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I can't resolve the compile errors: import core.thread; class DerivedThread : Thread { int count = 0; this() { super(run); } private void run()

Re: Casting random type to random struct - is this a bug?

2015-07-15 Thread Daniel Kozák via Digitalmars-d-learn
On Wed, 15 Jul 2015 11:57:01 -0400 Steven Schveighoffer schvei...@yahoo.com wrote: On 7/15/15 11:45 AM, rumbu wrote: struct S { int a, b; } auto s = cast(S)10; //compiles and sets s.a to 10. It works also for any other type, if the structure contains a member of that type in the

Re: Casting random type to random struct - is this a bug?

2015-07-15 Thread Daniel Kozák via Digitalmars-d-learn
On Wed, 15 Jul 2015 15:45:43 + rumbu ru...@rumbu.ro wrote: struct S { int a, b; } auto s = cast(S)10; //compiles and sets s.a to 10. It works also for any other type, if the structure contains a member of that type in the first position. Is this normal behaviour? Yes, this is OK

Re: goroutines vs vibe.d tasks

2015-07-01 Thread Daniel Kozák via Digitalmars-d-learn
Same problem still extreamly slow On Wed, 01 Jul 2015 03:28:01 + rsw0x anonym...@anonymous.com wrote: On Tuesday, 30 June 2015 at 15:18:36 UTC, Jack Applegame wrote: Just creating a bunch (10k) of sleeping (for 100 msecs) goroutines/tasks. Compilers go: go version go1.4.2

Re: Bug or feature?

2015-06-30 Thread Daniel Kozák via Digitalmars-d-learn
On Mon, 29 Jun 2015 05:04:36 -0700 Jonathan M Davis via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Sunday, June 28, 2015 11:37:59 Jack Applegame via Digitalmars-d-learn wrote: I don't see any reason why it should not compile. import std.array; import std.range;

Re: Struct vs. Class

2015-06-26 Thread Daniel Kozák via Digitalmars-d-learn
On Fri, 26 Jun 2015 11:11:15 + Chris via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I have still some classes lying around in my code. As threading is becoming more and more of an issue, classes and OOP in general turn out to be a nuisance. It's not so hard to turn the

Re: Struct vs. Class

2015-06-26 Thread Daniel Kozák via Digitalmars-d-learn
On Fri, 26 Jun 2015 11:11:15 + Chris via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I have still some classes lying around in my code. As threading is becoming more and more of an issue, classes and OOP in general turn out to be a nuisance. It's not so hard to turn the

RE: Walter, Brian, and Daniel's DConf 2015 talks are up

2015-06-22 Thread Daniel Kozák via Digitalmars-d-announce
Yes, IT could, but this will need to modify each existing and future range or implement UFCS operator overloading - Původní zpráva - Od:Brad Anderson via Digitalmars-d-announce digitalmars-d-announce@puremagic.com Odesláno:‎23. ‎6. ‎2015 4:06 Komu:digitalmars-d-announce@puremagic.com

Re: Return types of the methods of a struct

2015-06-19 Thread Daniel Kozák via Digitalmars-d-learn
On Fri, 19 Jun 2015 13:52:52 + Quentin Ladeveze via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Friday, 19 June 2015 at 13:38:45 UTC, Steven Schveighoffer wrote: Does this work for you, or is there a further expectation? auto asTuple() { return Tuple!(int, a,

Re: Better forums

2015-06-18 Thread Daniel Kozák via Digitalmars-d
On Thu, 18 Jun 2015 11:12:46 + Vladimir Panteleev via Digitalmars-d digitalmars-d@puremagic.com wrote: On Thursday, 18 June 2015 at 10:27:46 UTC, tired_eyes wrote: Having forums that are just NNTP-frontend has some disadvantages, e.g. lack of moderation and unability to wipe awful

  1   2   >