Re: D IDE Coedit, version 3 update 2 released

2017-06-02 Thread Basile B. via Digitalmars-d-announce
On Friday, 2 June 2017 at 10:03:25 UTC, Basile B. wrote: On Friday, 2 June 2017 at 07:24:02 UTC, Basile B. wrote: Times change. Sorry but i've forgotten to remove a SLOC written for debugging:

Re: D IDE Coedit, version 3 update 2 released

2017-06-02 Thread Basile B. via Digitalmars-d-announce
On Friday, 2 June 2017 at 07:24:02 UTC, Basile B. wrote: Very small update. The Changes won't be noticeable unless you're an hardcore user like me. https://github.com/BBasile/Coedit/releases/tag/3_update_2 https://github.com/BBasile/Coedit off topic: == I've recently discovered that

D IDE Coedit, version 3 update 2 released

2017-06-02 Thread Basile B. via Digitalmars-d-announce
Very small update. The Changes won't be noticeable unless you're an hardcore user like me. https://github.com/BBasile/Coedit/releases/tag/3_update_2 https://github.com/BBasile/Coedit off topic: == I've recently discovered that CE downloads for linux are now more important than

Re: Faster Command Line Tools in D

2017-05-26 Thread Basile B. via Digitalmars-d-announce
On Thursday, 25 May 2017 at 22:04:36 UTC, Ali Çehreli wrote: On 05/24/2017 06:39 AM, Mike Parker wrote: Reddit: https://www.reddit.com/r/programming/comments/6d25mg/faster_command_line_tools_in_d/ Inspired Nim version, found on Reddit:

Re: [Starting with D] d2html.d issues an error

2017-05-25 Thread Basile B. via Digitalmars-d-learn
On Thursday, 25 May 2017 at 15:02:33 UTC, Oleksii wrote: Hi everyone, Could you please help me? I'm get the following error from all.sh: $ /e/D/dmd2/windows/bin/shell.exe all.sh shell 1.05 ..\..\windows\bin\dmd d2html d2html.d(18): Error: module stream is in file 'std\stream.d'

Re: Warning, ABI breakage from 2.074 to 2.075

2017-05-25 Thread Basile B. via Digitalmars-d
On Thursday, 25 May 2017 at 16:16:19 UTC, Patrick Schluter wrote: Could someone please explain why people talk always of ABI compatibilty while what is described would imo better classified as API compatibilty. Here the function mangle is involved. Mangles/Names are part of the ABI in D

Re: Searching strings with indexOf vs countUntil

2017-05-25 Thread Basile B. via Digitalmars-d-learn
On Thursday, 25 May 2017 at 11:55:21 UTC, Kagamin wrote: I would guess indexOf returns a value suitable for indexing, therefore it counts code units, while countUntil counts range elements - code points in case of a string. Also number of code points is not suitable for indexing an utf8

Warning, ABI breakage from 2.074 to 2.075

2017-05-25 Thread Basile B. via Digitalmars-d
Static libraries that are - compiled with dmd 2.074 (maybe previous versions too) - call format() in their API will be responsible for strange errors when used by programs compiled with dmd 2.075. People will see their software raising a FormatException (orphan argument) for no reason. When

Re: My two cents on what D needs to be more successful...

2017-05-21 Thread Basile B. via Digitalmars-d
On Sunday, 21 May 2017 at 11:27:19 UTC, Ecstatic Coder wrote: Coedit is actually by far my favorite IDE for D testing and debugging. I liked it immediately after I saw that it doesn't need to create a project if all you need it compile and test a small D script. I know I can create a

Re: My two cents on what D needs to be more successful...

2017-05-21 Thread Basile B. via Digitalmars-d
On Sunday, 21 May 2017 at 05:52:11 UTC, Ecstatic Coder wrote: Since a few months, I'm using D for all my command-line tools. For that use case, the language and its standard libraries are really perfect, making it the best scripting language I know, completely exploding JavaScript, Python,

Re: [Semi-OT] to!string(enumType)

2017-05-19 Thread Basile B. via Digitalmars-d
On Friday, 19 May 2017 at 21:23:11 UTC, Dominikus Dittes Scherkl wrote: On Friday, 19 May 2017 at 21:04:24 UTC, Stefan Koch wrote: If a template does trigger a static assert, that static assert is ignored if there is another template in the overload set that could match. Wow. Didn't know

Re: DIP 1003 Formal Review

2017-05-17 Thread Basile B. via Digitalmars-d
On Wednesday, 17 May 2017 at 09:53:49 UTC, MysticZach wrote: On Wednesday, 17 May 2017 at 08:03:13 UTC, Mike Parker wrote: * Is it a good idea to remove body's status as a reserved keyword? * If so, which option is best? 1) Make it contextual 2) Replace it with another keyword (`function`

Re: Why dfmt, dcd, dscanner, ... are not bundled together?

2017-05-17 Thread Basile B. via Digitalmars-d
On Wednesday, 17 May 2017 at 09:00:12 UTC, aberba wrote: These tool seem core to D development and will likely simplify plugin dev. Are there any technical reasons why they are not bundled together in installer (such that each release comes with compatible versions of tools)? Technically

Re: Weak Eco System?

2017-05-17 Thread Basile B. via Digitalmars-d
On Wednesday, 17 May 2017 at 08:19:43 UTC, Benro wrote: On Tuesday, 16 May 2017 at 23:17:10 UTC, Mike B Johnson wrote: Grow up! ! is not yelling. It makes no sound, has no meaning, and only exists to insert in to tight anuses that have no life. Thank you for your helpful comment. I

Re: Harbored-mod 0.2.1 and DYaml 0.6.1 at dlang-community

2017-05-17 Thread Basile B. via Digitalmars-d-announce
On Tuesday, 16 May 2017 at 20:46:44 UTC, Basile B. wrote: Following Brian Schott Announce [1] about the migration of his projects to the dlang-community, I'm pleased to announce that the most popular repository from Ferdinand Majerech are now also hosted there. - D-YAML, a YAML parser and

Re: Weak Eco System?

2017-05-16 Thread Basile B. via Digitalmars-d
On Tuesday, 16 May 2017 at 21:08:34 UTC, Benro wrote: On Tuesday, 16 May 2017 at 17:14:49 UTC, Basile B. wrote: For example the build.bat fix could have been made and merged in 10 min. if you would have took the time to report it! First of all. ! is not appreciated. This is considered

Harbored-mod 0.2.1 and DYaml 0.6.1 at dlang-community

2017-05-16 Thread Basile B. via Digitalmars-d-announce
Following Brian Schott Announce [1] about the migration of his projects to the dlang-community, I'm pleased to announce that the most popular repository from Ferdinand Majerech are now also hosted there. - D-YAML, a YAML parser and emitter for D (native D implementation) is at

Re: Weak Eco System?

2017-05-16 Thread Basile B. via Digitalmars-d
On Tuesday, 16 May 2017 at 14:51:29 UTC, Benro wrote: Then found out it requires Dub, DCD, Dscanner, DFmt .. And here the "work" begins. It already requires GIT to be installed on the host system. Then it require knowledge how to clone the projects and building them. Several of the

Re: DIP 1003 Formal Review

2017-05-14 Thread Basile B. via Digitalmars-d
On Monday, 15 May 2017 at 01:39:34 UTC, MysticZach wrote: Not that a whole new way of doing things is called for... but I think a better design would have been to allow 'in' and 'out' statements in the function itself, with no need for brackets if you only have one line's worth of contract,

Re: DMD now has colorized syntax highlighting in error messages

2017-05-14 Thread Basile B. via Digitalmars-d-announce
On Sunday, 14 May 2017 at 23:17:42 UTC, Vladimir Panteleev wrote: On Sunday, 14 May 2017 at 19:11:32 UTC, Basile B. wrote: Yes +1 for configurable. IDEs already parse and make things clickable. It's not just +1, it's mandatory. If you implement this you must add a new compiler switch. No

Re: DUB: Multiprocess?

2017-05-14 Thread Basile B. via Digitalmars-d
On Sunday, 14 May 2017 at 20:23:17 UTC, Ivan Trombley wrote: When I build C++ projects using make, I can specify how many processes I want to use (-j). This keeps the processors full and happy and greatly reduces the overall build time. Does DUB have a similar way of compiling each file in

Re: DMD now has colorized syntax highlighting in error messages

2017-05-14 Thread Basile B. via Digitalmars-d-announce
On Sunday, 14 May 2017 at 17:54:38 UTC, Jacob Carlborg wrote: On 2017-05-14 18:25, Walter Bright wrote: 1. print out the offending line I hope this one will be optional/configurable. I don't think it necessary to print the offending line within an editor/IDE. They usually can already map

Re: DIP 1003 Formal Review

2017-05-14 Thread Basile B. via Digitalmars-d
On Saturday, 13 May 2017 at 10:27:25 UTC, Timon Gehr wrote: [1] Also, here is a list of existing contextual keywords: exit success failure C C++ D Windows Pascal System Objective-C They are not used alone. They are used in a **statement** and surrounded by parens. It's important because

Re: get vtable size

2017-05-08 Thread Basile B. via Digitalmars-d-learn
On Sunday, 7 May 2017 at 04:01:43 UTC, Mike B Johnson wrote: how many elements(virtual functions) are in the __vptr? You don't need the size. The index you get with __traits(virtualIndex) is always valid. (https://dlang.org/spec/traits.html#getVirtualIndex) However as an exercise you can

D IDE Coedit - released version 3 update 1

2017-05-03 Thread Basile B. via Digitalmars-d-announce
Hello, The latest major release does not contain any critical issue known at this day so this is a minor update that brings a few improvements mostly related to the edition: DDOC and completion (including an automatic mode, as suggested many times after latest release). - Changelog and

Re: Definition of D

2017-05-02 Thread Basile B. via Digitalmars-d
On Tuesday, 2 May 2017 at 11:01:04 UTC, Russel Winder wrote: Is D defined by DMD it's reference implementation, I'd say that this is the case, with - The D programming Language: http://erdani.com/index.php/books/tdpl/ "The D Programming Language, dubbed TDPL by its readers, is the

Re: DIP 1004 Preliminary Review Round 1

2017-05-02 Thread Basile B. via Digitalmars-d
On Monday, 1 May 2017 at 16:08:36 UTC, Andrej Mitrovic wrote: On Monday, 1 May 2017 at 15:33:47 UTC, Basile B. wrote: On Monday, 1 May 2017 at 14:55:28 UTC, Mike Parker wrote: DIP 1004 is titled "Inherited Constructors. [...] All review-related feedback on and discussion of the DIP should

Re: Porting Java code to D that uses << and >>> operators

2017-05-01 Thread Basile B. via Digitalmars-d-learn
On Monday, 1 May 2017 at 15:45:00 UTC, bachmeier wrote: I'm porting a small piece of Java code into D, but I've run into this: int y1 = ((x12 & MASK12) << 22) + (x12 >>> 9) + ((x13 & MASK13) << 7) + (x13 >>> 24); I have a basic understanding of those operators in both languages, but I

Re: Using the same name for diffrent entities

2017-05-01 Thread Basile B. via Digitalmars-d-learn
On Monday, 1 May 2017 at 14:01:19 UTC, Noy wrote: Hello, Is it possible to use the same name for different entities? For example calling a variable and a class\function by the same name. It only works with functions that take different parameters or with templated functions that have

Re: DIP 1004 Preliminary Review Round 1

2017-05-01 Thread Basile B. via Digitalmars-d
On Monday, 1 May 2017 at 15:33:47 UTC, Basile B. wrote: On Monday, 1 May 2017 at 14:55:28 UTC, Mike Parker wrote: DIP 1004 is titled "Inherited Constructors. [...] All review-related feedback on and discussion of the DIP should occur in this thread. [...] Destroy! An obvious omission in the

Re: DIP 1004 Preliminary Review Round 1

2017-05-01 Thread Basile B. via Digitalmars-d
On Monday, 1 May 2017 at 14:55:28 UTC, Mike Parker wrote: DIP 1004 is titled "Inherited Constructors. [...] All review-related feedback on and discussion of the DIP should occur in this thread. [...] Destroy! An obvious omission in the syntax variations [1] - alias this() = super.this();

What's the rationale behind partial initialization of static arrays ?

2017-04-29 Thread Basile B. via Digitalmars-d
I'd like to know why the things work like they are working now: === module a; immutable int[42] a = [42]; // OK static immutable int[42] b = [42]; // OK void main() { immutable int[42] c = [42]; // Not allowed } === 1/ this is error prone 2/ the semantic is not consistent (allowed here,

Re: grammer questions

2017-04-26 Thread Basile B. via Digitalmars-d
On Wednesday, 26 April 2017 at 00:45:44 UTC, Philip Miess wrote: On the grammar page it says ModuleDeclaration: module ModuleFullyQualifiedName ; On the module page it says ModuleDeclaration: ModuleAttributesopt module ModuleFullyQualifiedName ; Is the difference and accident? Which

Re: How to overload member function pointer and a regualr member function

2017-04-26 Thread Basile B. via Digitalmars-d-learn
On Tuesday, 25 April 2017 at 18:58:58 UTC, Ali Çehreli wrote: On 04/25/2017 11:54 AM, Ali Çehreli wrote: My analysis is wrong because that writefln() is for the bar(float) overload but I still think what you want is achieved. Ali No it's ok, it works. The additional indirection is well

Re: How to overload member function pointer and a regualr member function

2017-04-25 Thread Basile B. via Digitalmars-d-learn
On Monday, 24 April 2017 at 16:46:21 UTC, ParticlePeter wrote: I would like to have this kind of struct: struct Foo { private int i; void function( int i, float f ) bar; // will be defined at runtime void bar( float f ) { bar( i, f ); } } [...] How else can I get the required

Re: Why need dep 32 bit library?!

2017-04-24 Thread Basile B. via Digitalmars-d
On Monday, 24 April 2017 at 12:13:41 UTC, Basile B. wrote: On Monday, 24 April 2017 at 11:40:04 UTC, Brian wrote: [...] Does DMD works with -ivh --force ? Sorry I meant: if you install with these options.

Re: Why need dep 32 bit library?!

2017-04-24 Thread Basile B. via Digitalmars-d
On Monday, 24 April 2017 at 11:40:04 UTC, Brian wrote: OH ... NO ... I want install dmd to my fedora 26, but I get 64bit dmd's rpm package notic info: [root@fedora Downloads]# rpm -ivh dmd-2.074.0-0.fedora.x86_64.rpm error: Failed dependencies: glibc-devel(x86-32) is needed by

Re: Address of UFCS call implicity converts to Delegate

2017-04-23 Thread Basile B. via Digitalmars-d
On Sunday, 23 April 2017 at 17:07:51 UTC, Jonathan Marler wrote: On Sunday, 23 April 2017 at 17:00:59 UTC, Basile B. wrote: 2/ Why not just a member function ? For the same reason that UFCS exists. You can't add "member functions" to external library types. Good point. I have to say that

Re: Address of UFCS call implicity converts to Delegate

2017-04-23 Thread Basile B. via Digitalmars-d
On Sunday, 23 April 2017 at 16:32:06 UTC, Jonathan Marler wrote: This feels like a natural extension to existing semantics. It doesn't require new syntax and serves as a solution to some issues when working with delegates. Say some API wants a delegate like this: void delegate(string arg)

Re: typeof(this) return wrong type

2017-04-22 Thread Basile B. via Digitalmars-d-learn
On Saturday, 22 April 2017 at 11:45:54 UTC, Andrey wrote: On Saturday, 22 April 2017 at 11:36:09 UTC, Stefan Koch wrote: On Saturday, 22 April 2017 at 11:33:22 UTC, Andrey wrote: Hello, I trying to add custom attribute OnClickListener, the problem is that typeof always return BaseView type

Re: Thoughts from newcommer

2017-04-17 Thread Basile B. via Digitalmars-d
On Monday, 17 April 2017 at 11:14:47 UTC, Shachar Shemesh wrote: On Sunday, 16 April 2017 at 17:00:25 UTC, Jack Stouffer wrote: So we can say that D has buggy RAII. Claiming that D doesn't have RAII is equally false. To me, that's a basic misunderstanding of what RAII mean. RAII, to me,

Re: hidden passing of __FILE__ and __LINE__ into function

2017-04-17 Thread Basile B. via Digitalmars-d-learn
On Monday, 17 April 2017 at 10:55:30 UTC, Jonathan M Davis wrote: On Monday, April 17, 2017 10:30:35 Basile B. via Digitalmars-d-learn wrote: On Monday, 17 April 2017 at 10:22:47 UTC, Dmitry wrote: void error(string msg, string file = __FILE__, size_t line = __LINE__) { ... } That's what

Re: hidden passing of __FILE__ and __LINE__ into function

2017-04-17 Thread Basile B. via Digitalmars-d-learn
On Monday, 17 April 2017 at 10:22:47 UTC, Dmitry wrote: Hi there. Currently for messages about errors I use code like this: void add(string name, ref Scene scene) { if (name in listOfScenes) { EError(__FILE__, __LINE__, "scene already exists".L,

Re: Update roll-up on my arsd libraries

2017-04-14 Thread Basile B. via Digitalmars-d-announce
On Thursday, 13 April 2017 at 16:04:18 UTC, Adam D. Ruppe wrote: I haven't posted in announce for a while, so I figured I'd give you guys an update on what's been happening in my libs. This message is a big long, so feel free to just skim to see if you are interested in anything. [...] *

Re: Fixing sample files

2017-04-12 Thread Basile B. via Digitalmars-d
On Thursday, 13 April 2017 at 01:34:52 UTC, Basile B. wrote: On Thursday, 13 April 2017 at 01:13:23 UTC, Walter Bright wrote: On 4/12/2017 1:30 PM, Basile B. wrote: Since dmd is shipped with DUB one can just put some embedded SDL descriptions and put undead as dependency. Better to just fix

Re: Fixing sample files

2017-04-12 Thread Basile B. via Digitalmars-d
On Thursday, 13 April 2017 at 01:13:23 UTC, Walter Bright wrote: On 4/12/2017 1:30 PM, Basile B. wrote: Since dmd is shipped with DUB one can just put some embedded SDL descriptions and put undead as dependency. Better to just fix them. A bit off topic but all these examples are very

Re: Fixing sample files

2017-04-12 Thread Basile B. via Digitalmars-d
On Wednesday, 12 April 2017 at 19:58:47 UTC, Walter Bright wrote: https://issues.dlang.org/show_bug.cgi?id=17099 This is a bit embarrassing. It seems that the samples fail because they use std.stream, which has been removed. Anyone want to fix them to use stdio instead? Since dmd is

Re: Command Line Parsing

2017-04-12 Thread Basile B. via Digitalmars-d-learn
On Wednesday, 12 April 2017 at 09:51:34 UTC, Russel Winder wrote: Are Argon https://github.com/markuslaker/Argon or darg https://github. com/jasonwhite/darg getting traction as the default command line handling system for D or are they just peripheral and everyone just uses std.getopt

Re: Forwarding calls to objects of another type

2017-04-10 Thread Basile B. via Digitalmars-d-learn
On Monday, 10 April 2017 at 21:04:10 UTC, Johan Fjeldtvedt wrote: I have a couple of questions related to the following code: https://gist.github.com/Jaffe-/b027287a884fc2e173a65601ec242676 1) This is a very simplified example, but what I'm trying to do here is to call `foo` on each object in

Re: automem v0.0.7 - C++ style smart pointers using std.experimental.allocator

2017-04-09 Thread Basile B. via Digitalmars-d-announce
On Sunday, 9 April 2017 at 08:56:52 UTC, Atila Neves wrote: Using std.experimental.allocator? Tired of writing `scope(exit) allocator.dispose(foo);` in a language with RAII? Me too: http://code.dlang.org/packages/automem I think that the Array misses - a reservation strategy, something

Re: dmd Backend converted to Boost License

2017-04-07 Thread Basile B. via Digitalmars-d-announce
On Friday, 7 April 2017 at 15:14:40 UTC, Walter Bright wrote: https://github.com/dlang/dmd/pull/6680 Yes, this is for real! Symantec has given their permission to relicense it. Thank you, Symantec! Good news. Question: Does this apply from now or can the previous DMD releases also be

Re: Write file at compile time?

2017-04-02 Thread Basile B. via Digitalmars-d-learn
On Sunday, 2 April 2017 at 19:42:52 UTC, Inquie wrote: I would like to write the output of a manifest constant at compile time to a file instead of console using pragma(msg). Is this possible? No.

Re: delegate with optional parameters

2017-04-02 Thread Basile B. via Digitalmars-d-learn
On Sunday, 2 April 2017 at 20:48:09 UTC, Inquie wrote: On Sunday, 2 April 2017 at 20:02:56 UTC, Basile B. wrote: On Sunday, 2 April 2017 at 19:24:14 UTC, Inquie wrote: is it possible to create a delegate that takes an optional number of parameters and/or return type? T delegate(S...)(S)

Re: delegate with optional parameters

2017-04-02 Thread Basile B. via Digitalmars-d-learn
On Sunday, 2 April 2017 at 19:24:14 UTC, Inquie wrote: is it possible to create a delegate that takes an optional number of parameters and/or return type? T delegate(S...)(S) special_delegate; I guess this is impossible? alias Dg(Return, Params...) = Return delegate(Params); Dg!(int,float,

Re: sdpc - Simple/Stupid D parser combinator

2017-03-24 Thread Basile B. via Digitalmars-d-announce
On Thursday, 23 March 2017 at 22:55:10 UTC, Yuxuan Shui wrote: GitLab: https://gitlab.com/yshui/sdpc Documents: https://yshui.gitlab.io/sdpc Dub: http://code.dlang.org/packages/sdpc I started this project ~1.8 years ago. It only took me a couple of weeks to write, and I learned a lot about D's

Re: Error: out of memory

2017-03-18 Thread Basile B. via Digitalmars-d-learn
On Saturday, 18 March 2017 at 20:56:47 UTC, StarGrazer wrote: On Saturday, 18 March 2017 at 20:43:29 UTC, Basile B. wrote: On Saturday, 18 March 2017 at 20:39:20 UTC, StarGrazer wrote: I have some CTFE's and meta programming that cause dmd to run out of memory ;/ I am generating simple

Re: Error: out of memory

2017-03-18 Thread Basile B. via Digitalmars-d-learn
On Saturday, 18 March 2017 at 20:39:20 UTC, StarGrazer wrote: I have some CTFE's and meta programming that cause dmd to run out of memory ;/ I am generating simple classes, but a lot of them. dmd uses about 2GB before it quites. It also only uses about 12% of cpu. I have 16 GB total memory

Re: Get most D type from type

2017-03-18 Thread Basile B. via Digitalmars-d-learn
On Saturday, 18 March 2017 at 15:30:27 UTC, Hussien wrote: On Saturday, 18 March 2017 at 15:16:35 UTC, Basile B. wrote: On Saturday, 18 March 2017 at 13:30:22 UTC, Hussien wrote: On Saturday, 18 March 2017 at 13:16:49 UTC, Adam D. Ruppe wrote: On Saturday, 18 March 2017 at 13:06:56 UTC,

Re: Get most D type from type

2017-03-18 Thread Basile B. via Digitalmars-d-learn
On Saturday, 18 March 2017 at 13:30:22 UTC, Hussien wrote: On Saturday, 18 March 2017 at 13:16:49 UTC, Adam D. Ruppe wrote: On Saturday, 18 March 2017 at 13:06:56 UTC, Hussien wrote: So you are telling me there is no way to do this easily? What are you actually trying to do? Glad you

Re: Building custom library package with dub

2017-03-18 Thread Basile B. via Digitalmars-d-learn
On Saturday, 18 March 2017 at 11:29:43 UTC, alex1974 wrote: I want to build a custom library with useful extensions to phobos. They should be named like: extensions.regex extensions.path extensions.files ... Some libraries, like extensions.files contain several files (e.g files.d,

Re: code folding

2017-03-18 Thread Basile B. via Digitalmars-d-learn
On Monday, 13 March 2017 at 17:29:41 UTC, Inquie wrote: Does D have any nice way to specify a block for cold folding? I have a very large set of structs and I'd like to be able to code fold them all at once and together. I have been using static if(true) { ... junk } but the static if

Re: D IDE Coedit - version 3 released.

2017-03-16 Thread Basile B. via Digitalmars-d-announce
On Wednesday, 15 March 2017 at 22:09:07 UTC, aberba wrote: On Monday, 13 March 2017 at 17:43:32 UTC, Basile B. wrote: Finally, after four betas, the third version of my D IDE [0] is available. Good Intellescense is the only missing piece for me. - IDE-grade features are provided by DCD, so

Re: scope(~this)

2017-03-16 Thread Basile B. via Digitalmars-d-learn
On Thursday, 16 March 2017 at 07:49:19 UTC, Basile B. wrote: On Wednesday, 15 March 2017 at 19:34:32 UTC, Ali Çehreli wrote: On 03/15/2017 03:23 AM, Basile B. wrote: > you can use a mixin template because > they can introduce destructors that are called automatically with the > aggregate

Re: scope(~this)

2017-03-16 Thread Basile B. via Digitalmars-d-learn
On Wednesday, 15 March 2017 at 19:34:32 UTC, Ali Çehreli wrote: On 03/15/2017 03:23 AM, Basile B. wrote: > you can use a mixin template because > they can introduce destructors that are called automatically with the > aggregate destrcutor Wow! Is this specified anywhere or have you come across

Re: scope(~this)

2017-03-15 Thread Basile B. via Digitalmars-d-learn
On Tuesday, 14 March 2017 at 14:35:11 UTC, Inquie wrote: On Tuesday, 14 March 2017 at 05:33:28 UTC, thedeemon wrote: [...] Complexity is in the eye of the beholder. Children think many things are complex when they are not. If a library solution could be created that is as seamless as a

D IDE Coedit - version 3 released.

2017-03-13 Thread Basile B. via Digitalmars-d-announce
Finally, after four betas, the third version of my D IDE [0] is available. The change log for this new version quite important. Major additions: - GDB commander, a GDB UI, only under linux. - Project groups. - Compiler paths, defines and select several D compilers. Picked among the other

Re: In Expressions

2017-03-05 Thread Basile B. via Digitalmars-d-learn
On Saturday, 4 March 2017 at 19:31:46 UTC, Andrey wrote: On Saturday, 4 March 2017 at 17:57:16 UTC, John Colvin wrote: but to be honest, I would just repeat myself a bit and write if (regionAlign == RegionAlign.top || regionAlign == RegionAlign.bottom) { } That's exactly what I did, just

Typed D allocator based on jemalloc

2017-03-03 Thread Basile B. via Digitalmars-d-announce
Nothing huge here. The package[0] provides the bindings, JEMallocator (like Mallocator) and JEAlignedAllocator (like AlignedAllocator). All of them use jeallocator[1], which is actually the default implementation of malloc in the FreeBSD system. In a future update I may add another D alloc

Re: Allocators and Containers

2017-02-16 Thread Basile B. via Digitalmars-d
On Thursday, 16 February 2017 at 15:37:52 UTC, Minty Fresh wrote: A lot of the usefulness of the std.experimental.allocators module is lost because no other part of the stdlib actually ties into the functionality provided by it. For example, the Array type defined in std.container relies on

Re: opApply with Type Inference and Templates?

2017-02-15 Thread Basile B. via Digitalmars-d-learn
On Thursday, 16 February 2017 at 03:20:12 UTC, Jerry wrote: I am trying to do opApply to work when the delegate passed when it is and isn't nogc/nothrow. As soon as you involve a template though, type inference goes out the door. I want to be able to use opApply with templates (to get the auto

Re: D IDE Coedit - version 3 beta 3

2017-02-09 Thread Basile B. via Digitalmars-d-announce
On Friday, 27 January 2017 at 04:48:56 UTC, Basile B. wrote: This would probably have been a RC or even the final version if I hadn't to wait for the development platform I use to reach its next milestone, which may not happen before the next spring, so another beta is worth. All important

Re: Why File.rawRead is @system?

2017-02-07 Thread Basile B. via Digitalmars-d-learn
On Tuesday, 7 February 2017 at 09:21:18 UTC, Kagamin wrote: Can't find a reason why it's not inferred @safe (on linux). Any idea? Uh ? It's safe Just tried import std.stdio; void main(string[] args) @safe { File f; ubyte[] z; z = f.rawRead(z); } And it compiles (DMD

Re: Need help to compile code with traits

2017-02-05 Thread Basile B. via Digitalmars-d-learn
On Sunday, 5 February 2017 at 14:59:04 UTC, Xavier Bigand wrote: Hi, I am trying to create an allocator that don't use the GC, and I have issues for the initialization of member before calling the constructor. Here is my actual code : mixin template NogcAllocator(T) { static T

Re: GSoC Project Idea's Part 2

2017-02-04 Thread Basile B. via Digitalmars-d
On Friday, 3 February 2017 at 04:12:10 UTC, Craig Dillabaugh wrote: So the GSoC ideas page is now at least partially complete, you can find it here: https://wiki.dlang.org/GSOC_2017_Ideas In the previous thread some of you (Rikki, Adam) had suggested some improvements to dub/the

Re: D IDE Coedit - version 3 beta 3

2017-02-03 Thread Basile B. via Digitalmars-d-announce
On Monday, 30 January 2017 at 23:32:12 UTC, dminded wrote: Ok, the debugger also works if i write a bit more then just a 'writeln' into main. How can i set breakpoints? If i click on the left side of a row, a little red dot appears. But the debugger seems to ignore it and instead every

Re: unDE 0.2.0 - unusual command line and keybar

2017-02-03 Thread Basile B. via Digitalmars-d-announce
On Friday, 3 February 2017 at 14:05:58 UTC, Basile B. wrote: On Friday, 3 February 2017 at 13:48:39 UTC, Basile B. wrote: On Sunday, 29 January 2017 at 19:00:30 UTC, unDEFER wrote: unDE's not DE which in the future must be replacement for all programs in OS. But today is very original file

Re: unDE 0.2.0 - unusual command line and keybar

2017-02-03 Thread Basile B. via Digitalmars-d-announce
On Friday, 3 February 2017 at 13:48:39 UTC, Basile B. wrote: On Sunday, 29 January 2017 at 19:00:30 UTC, unDEFER wrote: unDE's not DE which in the future must be replacement for all programs in OS. But today is very original file manager, image and text viewer and (what discovered with 0.2.0

Re: unDE 0.2.0 - unusual command line and keybar

2017-02-03 Thread Basile B. via Digitalmars-d-announce
On Sunday, 29 January 2017 at 19:00:30 UTC, unDEFER wrote: unDE's not DE which in the future must be replacement for all programs in OS. But today is very original file manager, image and text viewer and (what discovered with 0.2.0 version) command line and keybar. More information:

Re: CI is broken

2017-02-02 Thread Basile B. via Digitalmars-d
On Thursday, 2 February 2017 at 20:56:35 UTC, Jack Stouffer wrote: Trying to raise visibility on this issue. dscanner doesn't recognize the new DIP1000 syntax, so it errors out when running on CircleCI. All current PRs don't have either working style checks or coverage reports. If someone

Re: Can't find the reason of issue: "std.file.FileException@std\file.d(360): path/to/file.conf:"

2017-02-01 Thread Basile B. via Digitalmars-d-learn
On Wednesday, 1 February 2017 at 11:39:46 UTC, Suliman wrote: Full error log: 0x00580A4D in @trusted bool std.file.cenforce!(bool).cenforce(bool, const(char)[], const(wchar)*, immutable(char)[], uint) 0x00412AB6 in @safe void[] std.file.read!(immutable(char)[]).read(immutable(char)[], uint)

Re: D IDE Coedit - version 3 beta 3

2017-01-30 Thread Basile B. via Digitalmars-d-announce
On Tuesday, 31 January 2017 at 07:23:24 UTC, Basile B. wrote: On Monday, 30 January 2017 at 23:32:12 UTC, dminded wrote: Ok, the debugger also works if i write a bit more then just a 'writeln' into main. How can i set breakpoints? If i click on the left side of a row, a little red dot

Re: D IDE Coedit - version 3 beta 3

2017-01-30 Thread Basile B. via Digitalmars-d-announce
On Monday, 30 January 2017 at 19:45:38 UTC, dminded wrote: On Sunday, 29 January 2017 at 02:56:53 UTC, Basile B. wrote: I'm on IRC right now. Communication on the forum is really painfull, it looks like I need to explain a few things. Also you can ask questions on the bugtracker, although it's

Re: D IDE Coedit - version 3 beta 3

2017-01-30 Thread Basile B. via Digitalmars-d-announce
On Monday, 30 January 2017 at 23:32:12 UTC, dminded wrote: Ok, the debugger also works if i write a bit more then just a 'writeln' into main. How can i set breakpoints? If i click on the left side of a row, a little red dot appears. This means that GDB cannot set the breakpoint. checkout

Re: D IDE Coedit - version 3 beta 3

2017-01-28 Thread Basile B. via Digitalmars-d-announce
On Sunday, 29 January 2017 at 01:06:32 UTC, dminded wrote: On Saturday, 28 January 2017 at 23:55:58 UTC, Basile B. wrote: On Saturday, 28 January 2017 at 22:18:52 UTC, dminded wrote: On Friday, 27 January 2017 at 04:48:56 UTC, Basile B. wrote: This would probably have been a RC or even the

Re: D IDE Coedit - version 3 beta 3

2017-01-28 Thread Basile B. via Digitalmars-d-announce
On Saturday, 28 January 2017 at 22:18:52 UTC, dminded wrote: On Friday, 27 January 2017 at 04:48:56 UTC, Basile B. wrote: This would probably have been a RC or even the final version if I hadn't to wait for the development platform I use to reach its next milestone, which may not happen before

D IDE Coedit - version 3 beta 3

2017-01-26 Thread Basile B. via Digitalmars-d-announce
This would probably have been a RC or even the final version if I hadn't to wait for the development platform I use to reach its next milestone, which may not happen before the next spring, so another beta is worth. All important information, links and other downloads are here:

Re: Multiple return type or callback function

2017-01-23 Thread Basile B. via Digitalmars-d-learn
On Monday, 23 January 2017 at 15:15:35 UTC, aberba wrote: I'm creating a function to authenticate user login. I want to determine login failure (Boolean) and error message (will be sent to frontend) but D does have multiple return type [...] Yes, MRV can be done with a tuple auto foo() {

Re: Writing a JFlex lexer for D - have an issue with cycles

2017-01-22 Thread Basile B. via Digitalmars-d
On Monday, 23 January 2017 at 00:03:44 UTC, FatalCatharsis wrote: On Sunday, 22 January 2017 at 23:20:27 UTC, Basile B. wrote: One way to do this is not to do anything special for q{. [...] This is for tooling, but I still want it to be accurate. Are you suggesting I could move handling

Re: Release D 2.073.0

2017-01-22 Thread Basile B. via Digitalmars-d-announce
On Sunday, 22 January 2017 at 17:55:03 UTC, Martin Nowak wrote: Glad to announce D 2.073.0. This release comes with a few phobos additions, new -mcpu=avx and -mscrt switch, and several bugfixes. http://dlang.org/download.html http://dlang.org/changelog/2.073.0.html -Martin Thanks for

Re: Writing a JFlex lexer for D - have an issue with cycles

2017-01-22 Thread Basile B. via Digitalmars-d
On Sunday, 22 January 2017 at 22:11:08 UTC, FatalCatharsis wrote: I'm writing a flex lexer for D and I've hit a roadblock. It is almost working EXCEPT for one specific production. StringLiteral is cyclic and I don't know how to approach it. It is cyclic because: Token -> StringLiteral

Re: Calls `this(this)` extra with delegate stuff in the code

2017-01-21 Thread Basile B. via Digitalmars-d-learn
On Sunday, 22 January 2017 at 03:42:21 UTC, Ali Çehreli wrote: On 01/21/2017 07:22 PM, Basile B. wrote: [...] Wow! Thanks. I know about 'alias this' but this (pun!) is new to me. TIL indeed and WAT (four exclamation marks is right in this case. :o) ) import std.stdio; struct S {

Re: Calls `this(this)` extra with delegate stuff in the code

2017-01-21 Thread Basile B. via Digitalmars-d-learn
On Sunday, 22 January 2017 at 00:31:38 UTC, Ali Çehreli wrote: On 01/21/2017 03:36 PM, Ali Çehreli wrote: > Change the signature and it works without copies: > > this(const(this)) { > // ... > } Ugh... :( It's not a post-blit. Then what is it? Ali This is a __ctor that takes

Re: What do you use to generate documentation?

2017-01-19 Thread Basile B. via Digitalmars-d-learn
On Thursday, 19 January 2017 at 15:20:37 UTC, Suliman wrote: What do dflag: `-c do not link`. Should I pass it during the generation of the docs? dub is append it's automatically, but if I want to generate new docs every rebuild of app what is the reason to use this flag? Oh no 2013 !! I

Re: What do you use to generate documentation?

2017-01-19 Thread Basile B. via Digitalmars-d-learn
On Thursday, 19 January 2017 at 17:06:39 UTC, Nemanja Boric wrote: On Thursday, 19 January 2017 at 16:47:07 UTC, Basile B. wrote: [...] I've submitted few PRs but they never got merged. We're maintaining, unofficially, fork that does compile and it's available at:

Re: What do you use to generate documentation?

2017-01-19 Thread Basile B. via Digitalmars-d-learn
On Wednesday, 13 March 2013 at 09:35:18 UTC, Andrea Fontana wrote: I've tried to build documentation using ddoc format and dmd. dmd -c -D -o- ... Generated documentation looks ugly and without stylesheet. Am I wrong? I expected a phobos-like documentation. So, what do you use to generate

Re: Printing a floats in maximum precision

2017-01-17 Thread Basile B. via Digitalmars-d-learn
On Wednesday, 18 January 2017 at 00:09:42 UTC, Nordlöw wrote: What's the easiest way to print a double in maximum precision? %.6g for floats and %.17g for doubles. This is for example what's used on std.json to get a perfect conversion from string to value. the number is the maximum number

Re: [Github] Have you ever heard of prhero ?

2017-01-16 Thread Basile B. via Digitalmars-d
On Monday, 16 January 2017 at 14:14:43 UTC, Basile B. wrote: Read this: https://www.reddit.com/r/github/comments/5ob0nl/no_thanks_prhero_you_suck_with_your_heart/ for example dmd is monitored by the bot.

[Github] Have you ever heard of prhero ?

2017-01-16 Thread Basile B. via Digitalmars-d
Read this: https://www.reddit.com/r/github/comments/5ob0nl/no_thanks_prhero_you_suck_with_your_heart/

Re: Quine using strings?

2017-01-15 Thread Basile B. via Digitalmars-d-learn
On Sunday, 15 January 2017 at 19:43:22 UTC, Nestor wrote: I was reading some of the examples of writing a quine with D, but apparently the language has evolved and they no longer compiled unchanged. So I tried to program one by myself using strings and std.stdio, but the result seems long

Re: Beta 2.073.0-b1

2017-01-14 Thread Basile B. via Digitalmars-d-announce
On Saturday, 14 January 2017 at 07:51:13 UTC, Basile B. wrote: On Saturday, 7 January 2017 at 05:02:13 UTC, Martin Nowak wrote: First beta for the 2.073.0 release. _D4core4time12TickDuration25__T10opOpAssignVAyaa1_2bZ10opOpAssignMFNaNbNcNiNfS4core4time12TickDurationZS4core4time12TickDuration

<    3   4   5   6   7   8   9   10   11   12   >