Re: Error compiling with DUB (dmd) since yesterday dub update

2018-03-10 Thread Mario via Digitalmars-d-learn
On Sunday, 11 March 2018 at 07:11:09 UTC, rikki cattermole wrote: On 11/03/2018 8:02 PM, Mario wrote: On Sunday, 11 March 2018 at 06:59:32 UTC, rikki cattermole wrote: On 11/03/2018 7:55 PM, Mario wrote: [...] Are you aware that it is compiling with ldc? Actually, I didn't even realize XD.

Re: Error compiling with DUB (dmd) since yesterday dub update

2018-03-10 Thread rikki cattermole via Digitalmars-d-learn
On 11/03/2018 8:02 PM, Mario wrote: On Sunday, 11 March 2018 at 06:59:32 UTC, rikki cattermole wrote: On 11/03/2018 7:55 PM, Mario wrote: I upgraded yesterday to "DUB version 1.8.0, built on Mar  3 2018" using "4.15.6-1-ARCH". I got an error while compiling a project which uses the following

Re: Error compiling with DUB (dmd) since yesterday dub update

2018-03-10 Thread Mario via Digitalmars-d-learn
On Sunday, 11 March 2018 at 06:59:32 UTC, rikki cattermole wrote: On 11/03/2018 7:55 PM, Mario wrote: I upgraded yesterday to "DUB version 1.8.0, built on Mar  3 2018" using "4.15.6-1-ARCH". I got an error while compiling a project which uses the following dependencies: dependency "vibe-d"

Re: Tools to help me find memory leaks?

2018-03-10 Thread Denis Feklushkin via Digitalmars-d-learn
On Wednesday, 23 August 2017 at 20:52:17 UTC, Stefan Koch wrote: On Wednesday, 23 August 2017 at 17:30:40 UTC, Drake44 wrote: I'm on a Windows 7 machine and I'm using VisualD as my IDE. I'm trying to work out what's chewing up all the RAM in a program I'm writing... is there a tool that I can u

Error compiling with DUB (dmd) since yesterday dub update

2018-03-10 Thread Mario via Digitalmars-d-learn
I upgraded yesterday to "DUB version 1.8.0, built on Mar 3 2018" using "4.15.6-1-ARCH". I got an error while compiling a project which uses the following dependencies: dependency "vibe-d" version="~>0.8.3-beta.1" dependency "vibe-d:tls" version="~>0.8.3-beta.1" versions "VibeDefaultMain" su

Re: Error compiling with DUB (dmd) since yesterday dub update

2018-03-10 Thread rikki cattermole via Digitalmars-d-learn
On 11/03/2018 7:55 PM, Mario wrote: I upgraded yesterday to "DUB version 1.8.0, built on Mar  3 2018" using "4.15.6-1-ARCH". I got an error while compiling a project which uses the following dependencies: dependency "vibe-d" version="~>0.8.3-beta.1" dependency "vibe-d:tls" version="~>0.8.3-

Re: Do forum posts use any markup language?

2018-03-10 Thread Tony via Digitalmars-d-learn
On Saturday, 10 March 2018 at 18:02:48 UTC, Bogdan wrote: I'd like to distinguish between regular text and code, maybe have quotes, etc. A poster has come up with a standard way to delineate code and also show if multiple files are involved (along with an "extraction to files" program): htt

Re: List installed modules

2018-03-10 Thread psychoticRabbit via Digitalmars-d-learn
On Sunday, 11 March 2018 at 03:52:19 UTC, psychoticRabbit wrote: Whether dub does that currently I do not know, as i don't use dub, or any additional packages outside of phobos. oh > dub list ;-)

Re: List installed modules

2018-03-10 Thread psychoticRabbit via Digitalmars-d-learn
On Sunday, 11 March 2018 at 01:04:27 UTC, Roberto wrote: How do I list installed modules? or.. https://dlang.org/phobos/index.html

Re: List installed modules

2018-03-10 Thread psychoticRabbit via Digitalmars-d-learn
On Sunday, 11 March 2018 at 01:04:27 UTC, Roberto wrote: How do I list installed modules? dmd --list-modules datefmt dateparser std.algorithm std.array std.conv std.datetime std.digest std.exception std.file std.format std.getopt std.json std.math ... Presumably, you mean packages installed by

Re: List installed modules

2018-03-10 Thread Roberto via Digitalmars-d-learn
On Sunday, 11 March 2018 at 01:55:07 UTC, Jonathan M Davis wrote: On Sunday, March 11, 2018 01:04:27 Roberto via Digitalmars-d-learn wrote: [...] The compiler has no concept of installed modules any more than C/C++ has a concept of installed header files. It has paths that it looks in for mo

Re: List installed modules

2018-03-10 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, March 11, 2018 01:04:27 Roberto via Digitalmars-d-learn wrote: > How do I list installed modules? > > dmd --list-modules > datefmt > dateparser > std.algorithm > std.array > std.conv > std.datetime > std.digest > std.exception > std.file > std.format > std.getopt > std.json > std.math >

Re: Forwarding arguments through a std.algorithm.map

2018-03-10 Thread crimaniak via Digitalmars-d-learn
On Saturday, 10 March 2018 at 20:48:06 UTC, Nordlöw wrote: If I have a function bool f(Rs...)(Rs rs) is it somehow possible to map and forward all its arguments `rs` to another function bool g(Rs...)(Rs rs); docs: https://dlang.org/phobos/std_traits.html#.Parameters usage example:

List installed modules

2018-03-10 Thread Roberto via Digitalmars-d-learn
How do I list installed modules? dmd --list-modules datefmt dateparser std.algorithm std.array std.conv std.datetime std.digest std.exception std.file std.format std.getopt std.json std.math ...

Re: DUB and Gtk-d reduce size of huge executable, build dynamic dependencies

2018-03-10 Thread CSim via Digitalmars-d-learn
On Saturday, 10 March 2018 at 15:46:58 UTC, Gerald wrote: On Wednesday, 7 March 2018 at 10:51:49 UTC, CSim wrote: Hi, I'm trying to decide whether it is better to use DLang for Gtk development or Vala/Genie. When I make a simple Vala/Genie Gtk executable the file is tiny whereas the DLang f

Re: UFCS in generic libraries, silent hijacking, and compile errors.

2018-03-10 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, March 10, 2018 21:50:42 aliak via Digitalmars-d-learn wrote: > What are the recommended guidelines for using/not using UFCS in > writing generic libraries? > > I ask because if you have an internal generic free function that > you use on types in a generic algorithm via ufcs, then ever

UFCS in generic libraries, silent hijacking, and compile errors.

2018-03-10 Thread aliak via Digitalmars-d-learn
What are the recommended guidelines for using/not using UFCS in writing generic libraries? I ask because if you have an internal generic free function that you use on types in a generic algorithm via ufcs, then everything works fine until the type being operated on has a member function with

Re: Forwarding arguments through a std.algorithm.map

2018-03-10 Thread ag0aep6g via Digitalmars-d-learn
On 03/10/2018 09:48 PM, Nordlöw wrote: If I have a function     bool f(Rs...)(Rs rs) is it somehow possible to map and forward all its arguments `rs` to another function     bool g(Rs...)(Rs rs); through a call to some map-and-forward-like-function `forwardMap` in something like     b

Re: Consume binary files

2018-03-10 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, March 10, 2018 19:22:43 Bogdan via Digitalmars-d-learn wrote: > On Saturday, 10 March 2018 at 18:49:48 UTC, Jonathan M Davis > > wrote: > > Check out > > > > https://dlang.org/phobos/std_bitmanip.html#peek > > https://dlang.org/phobos/std_bitmanip.html#read > > > > They can be used to

Forwarding arguments through a std.algorithm.map

2018-03-10 Thread Nordlöw via Digitalmars-d-learn
If I have a function bool f(Rs...)(Rs rs) is it somehow possible to map and forward all its arguments `rs` to another function bool g(Rs...)(Rs rs); through a call to some map-and-forward-like-function `forwardMap` in something like bool f(Rs...)(Rs rs) { alias som

Re: Consume binary files

2018-03-10 Thread Bogdan via Digitalmars-d-learn
On Saturday, 10 March 2018 at 18:49:48 UTC, Jonathan M Davis wrote: Check out https://dlang.org/phobos/std_bitmanip.html#peek https://dlang.org/phobos/std_bitmanip.html#read They can be used to read integral values from a range of ubytes. You can use either std.file.read or std.stdio.File to

Re: Consume binary files

2018-03-10 Thread Mark Fisher via Digitalmars-d-learn
On Saturday, 10 March 2018 at 18:26:43 UTC, Bogdan wrote: I'm working on a pet project which involves reading various structure types, or just multi-byte values (uin32_t, uint16_t, etc) from files, or just from ubyte arrays. I think you should use ranged types.

Re: Consume binary files

2018-03-10 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, March 10, 2018 18:31:23 Bogdan via Digitalmars-d-learn wrote: > ... I accidentally posted that before it was complete because I > kept pressing TAB in order to indent ... > > Anyway, I'd like to know if there exists such a thing as > > ``` > int a = stream.ReadInt32(); > ``` Chec

Re: Consume binary files

2018-03-10 Thread Bogdan via Digitalmars-d-learn
... I accidentally posted that before it was complete because I kept pressing TAB in order to indent ... Anyway, I'd like to know if there exists such a thing as ``` int a = stream.ReadInt32(); ```

Consume binary files

2018-03-10 Thread Bogdan via Digitalmars-d-learn
I'm working on a pet project which involves reading various structure types, or just multi-byte values (uin32_t, uint16_t, etc) from files, or just from ubyte arrays. Here's how I've been dealing with some of these situations so far: ``` /// Helper structure used to read each of the file

Re: Do forum posts use any markup language?

2018-03-10 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 10 March 2018 at 18:02:48 UTC, Bogdan wrote: I'd like to distinguish between regular text and code, maybe have quotes, etc. You can write with email plain text conventions. The forum software recognizes just some of it, but the readers will know what you mean. So like quote li

Do forum posts use any markup language?

2018-03-10 Thread Bogdan via Digitalmars-d-learn
I'd like to distinguish between regular text and code, maybe have quotes, etc.

Re: Generic Property Implementation

2018-03-10 Thread Simen Kjærås via Digitalmars-d-learn
On Friday, 9 March 2018 at 23:34:56 UTC, Mike Franklin wrote: On Friday, 9 March 2018 at 14:46:04 UTC, Simen Kjærås wrote: 1) Wrong return type: unittest { S s; auto a = s.field; // Fails - typeof(a) is Property!((get) => this.n, (set) => this.n = set) assert(is(typeof(a) == in

Re: DUB and Gtk-d reduce size of huge executable, build dynamic dependencies

2018-03-10 Thread Gerald via Digitalmars-d-learn
On Wednesday, 7 March 2018 at 10:51:49 UTC, CSim wrote: Hi, I'm trying to decide whether it is better to use DLang for Gtk development or Vala/Genie. When I make a simple Vala/Genie Gtk executable the file is tiny whereas the DLang file is huge. First I used the default Dub build and the f

What principle difference between structure and Tuple?

2018-03-10 Thread Suliman via Digitalmars-d-learn
writeln(is(Tuple!(string, int) == struct)); // true What is real user case where I should use Tuple instead of Struct?

Why Pay For Learning a Foreign Language?

2018-03-10 Thread Globibo via Digitalmars-d-learn
A major rationale behind paying to learn a new foreign language in a good language school is to enjoy the prospect of greater job opportunity and an opportunity to earn more money. But is that perception really true? Will learning a new language enable a person to earn higher salary than before

Re: LDC / BetterC / _d_run_main

2018-03-10 Thread Richard via Digitalmars-d-learn
On Saturday, 10 March 2018 at 10:57:05 UTC, Johan Engelen wrote: On Saturday, 10 March 2018 at 07:54:33 UTC, Mike Franklin wrote: On Saturday, 10 March 2018 at 02:25:38 UTC, Richard wrote: Hi, I've been trying to see if I can get an mbed project to work with Dlang basically compiling D code f

Re: LDC / BetterC / _d_run_main

2018-03-10 Thread Uknown via Digitalmars-d-learn
On Saturday, 10 March 2018 at 12:00:12 UTC, Richard wrote: On Saturday, 10 March 2018 at 07:54:33 UTC, Mike Franklin wrote: On Saturday, 10 March 2018 at 02:25:38 UTC, Richard wrote: [snip] Based on the above this seems to work fine so I'll use this since it's the simplest option. ``` extern(

Re: LDC / BetterC / _d_run_main

2018-03-10 Thread Richard via Digitalmars-d-learn
On Saturday, 10 March 2018 at 07:54:33 UTC, Mike Franklin wrote: On Saturday, 10 March 2018 at 02:25:38 UTC, Richard wrote: Hi, I've been trying to see if I can get an mbed project to work with Dlang basically compiling D code for use on a Cortex-M Proccessor You might be interested in the f

Re: LDC / BetterC / _d_run_main

2018-03-10 Thread Johan Engelen via Digitalmars-d-learn
On Saturday, 10 March 2018 at 07:54:33 UTC, Mike Franklin wrote: On Saturday, 10 March 2018 at 02:25:38 UTC, Richard wrote: Hi, I've been trying to see if I can get an mbed project to work with Dlang basically compiling D code for use on a Cortex-M Proccessor You might be interested in the f

Re: Compile-time variadic equality

2018-03-10 Thread Nordlöw via Digitalmars-d-learn
On Saturday, 10 March 2018 at 08:49:19 UTC, Nordlöw wrote: How do I most conveniently merge these into one single `allSame` that can operate on mixtures of values and types? I found the privately defined `isSame` in std.meta that does this.

Re: Compile-time variadic equality

2018-03-10 Thread Nordlöw via Digitalmars-d-learn
On Friday, 9 March 2018 at 22:13:39 UTC, Simen Kjærås wrote: static if (allEqual!(staticMap!(ElementEncodingType, Rs))) { // compare Rs byCodeUnit } NoDuplicates!V.length == 1 BTW, `NoDuplicates` can handle both types and values (mixed) opposite to my `allSame` and `allSameType` defined