Re: libfirm-d - D bindings of Firm, a compiler IR based on the SSA form

2019-04-29 Thread Basile B. via Digitalmars-d-announce
On Sunday, 1 July 2018 at 12:04:06 UTC, Basile B. wrote: I've recently ported libfirm to D. This nice C library, developed at the Karlsruhe university, allows to build compiler back-ends, using the SSA intermediate representation. In theory it could even be used to make a new D compiler

Re: GDB + ddemangle

2019-04-26 Thread Basile B. via Digitalmars-d-announce
On Friday, 26 April 2019 at 07:08:45 UTC, Arun Chandrasekaran wrote: On Friday, 20 April 2018 at 17:55:12 UTC, Iain Buclaw wrote: On 20 April 2018 at 17:40, drug via Digitalmars-d-announce wrote: 20.04.2018 16:49, Iain Buclaw пишет: [...] it works, thank you. But not in all cases. For

Re: Efficient enum array keys?

2019-04-11 Thread Basile B. via Digitalmars-d-learn
On Thursday, 11 April 2019 at 07:56:42 UTC, Julian wrote: On Thursday, 11 April 2019 at 06:45:23 UTC, Basile B. wrote: On Thursday, 11 April 2019 at 06:20:05 UTC, Julian wrote: I don't see a difference in micro-benchmarks. *shrug* Your enum is int so in machine code it's exactly like

Re: Efficient enum array keys?

2019-04-11 Thread Basile B. via Digitalmars-d-learn
On Thursday, 11 April 2019 at 06:20:05 UTC, Julian wrote: Hello, When reading through the following D blog post, I noticed in the feature chart that D had "Arrays beginning at arbitrary indices" as a +1 feature, the same as in Ada.

Re: The tools DCD 0.11.1, D-Scanner 0.7.1 and dfmt 0.10.0 are released

2019-04-01 Thread Basile B. via Digitalmars-d-announce
On Monday, 1 April 2019 at 07:22:52 UTC, Basile B. wrote: Note that DCD, when build with DMD 2.085.0 will likely crash a lot due to a bug in DMD backend Sorry this was inexact, DMD 2.085 + DUB. The versions build with make or the bat script work.

The tools DCD 0.11.1, D-Scanner 0.7.1 and dfmt 0.10.0 are released

2019-04-01 Thread Basile B. via Digitalmars-d-announce
DCD[1], D-Scanner[2] and dfmt [3] got updated today. You're invited to update them or wait that the plugin of your editor get a new release. See the links for changelog and binaries. Note that DCD, when build with DMD 2.085.0 will likely crash a lot due to a bug in DMD backend. I've managed

Re: Setting the GtkD Include Path in dexed?

2019-03-14 Thread Basile B. via Digitalmars-d-learn
On Thursday, 14 March 2019 at 20:06:08 UTC, Ron Tarrant wrote: On Thursday, 14 March 2019 at 16:02:01 UTC, Basile B. wrote: You must register put the static library file, not the object I thing, anyway, i just made you a video showing exactly what to do since finally the linker error is gone

Re: Setting the GtkD Include Path in dexed?

2019-03-14 Thread Basile B. via Digitalmars-d-learn
On Thursday, 14 March 2019 at 15:50:55 UTC, Ron Tarrant wrote: Thanks for replying, Basile. It's always nice to get info straight from the original code author. :) On Wednesday, 13 March 2019 at 11:59:11 UTC, Basile B. wrote: 1. "Compile File and Run" It's for the scripts-like program, i.e

Re: Setting the GtkD Include Path in dexed?

2019-03-14 Thread Basile B. via Digitalmars-d-learn
On Tuesday, 12 March 2019 at 15:48:14 UTC, Ron Tarrant wrote: I managed to get dexed to compile a single-file dub project, but for completeness sake, I'm also trying to configure it to use dmd (non-dub) to compile GtkD projects using Compilation (menu) > Compile File and Run. To that end, I

Re: Setting the GtkD Include Path in dexed?

2019-03-13 Thread Basile B. via Digitalmars-d-learn
On Tuesday, 12 March 2019 at 15:48:14 UTC, Ron Tarrant wrote: I managed to get dexed to compile a single-file dub project, but for completeness sake, I'm also trying to configure it to use dmd (non-dub) to compile GtkD projects using Compilation (menu) > Compile File and Run. To that end, I

Re: AliasSeq in UDA

2019-03-10 Thread Basile B. via Digitalmars-d-learn
On Sunday, 10 March 2019 at 17:04:20 UTC, Sebastiaan Koppe wrote: On Sunday, 10 March 2019 at 16:46:43 UTC, Basile B. wrote: Yes I see. I've refined a bit the test case and maybe I'll took a look this week. Cool. Is it normal to create a testcase that doesn't depend on phobos? I suppose it

Re: AliasSeq in UDA

2019-03-10 Thread Basile B. via Digitalmars-d-learn
On Sunday, 10 March 2019 at 16:05:19 UTC, Sebastiaan Koppe wrote: On Sunday, 10 March 2019 at 13:41:32 UTC, Basile B. wrote: It looks like a bug, a "reject-valid" one. Try the same code with enum A = 0; and it work, despite of B being still opaque. The problem may be related to the fact

Re: AliasSeq in UDA

2019-03-10 Thread Basile B. via Digitalmars-d-learn
On Sunday, 10 March 2019 at 13:20:12 UTC, Sebastiaan Koppe wrote: The compiler complains about `cannot form tuple of tuples` whenever I try to put an AliasSeq in a UDA and try to use it. You would expect the compiler to expand it. Is this a bug? --- import std.meta; enum A; enum B;

Re: AliasSeq in UDA

2019-03-10 Thread Basile B. via Digitalmars-d-learn
On Sunday, 10 March 2019 at 13:41:32 UTC, Basile B. wrote: On Sunday, 10 March 2019 at 13:20:12 UTC, Sebastiaan Koppe wrote: The compiler complains about `cannot form tuple of tuples` whenever I try to put an AliasSeq in a UDA and try to use it. You would expect the compiler to expand it. Is

Re: DIP 1004--Inherited Constructors--Abandoned

2019-03-06 Thread Basile B. via Digitalmars-d-announce
On Wednesday, 6 March 2019 at 12:24:03 UTC, Mike Parker wrote: As part of a cleanup of the DIP queue, DIP 1004, "Inherited Constructors", has been marked as Abandoned. This means anyone willing to take it over and move it forward, including the original author, is free to do so. Given that

Re: Release D 2.085.0

2019-03-02 Thread Basile B. via Digitalmars-d-announce
On Saturday, 2 March 2019 at 18:19:37 UTC, Martin Nowak wrote: Glad to announce D 2.085.0, ♥ to the 49 contributors. This release comes with context-aware assertion messages, lower GC memory usage, a precise GC, support to link custom GCs, lots of Objective-C improvements¹, and

Re: DCD 0.11.0 released

2019-02-12 Thread Basile B. via Digitalmars-d-announce
On Monday, 11 February 2019 at 20:40:32 UTC, notna wrote: Installing DCD Downloading from https://github.com/dlang-community/DCD/releases/download/v0.10.2/dcd-v0.10.2-windows-x86.zip to C:\Users\\AppData\Roaming\code-d\bin Failed installing: std.net.curl.CurlException@std\net\curl.d(4340):

DCD 0.11.0 released

2019-02-11 Thread Basile B. via Digitalmars-d-announce
DCD, the best companion of your IDE is updated to v0.11.0 [1] Important changes in this release are enhancements from me on template parameters and ddoc, also fix on arrays semantic by CyberShadow. A little thanks would be welcome, either for me [2] or CyberShadow [3] [1]

The DDOC generator Harbored-mod - version 0.3.0 available

2019-02-10 Thread Basile B. via Digitalmars-d-announce
The documentation generator harborded-mod just got second life. Version 0.3.0 comes notably with - a better default style that looks more like the official doc [1]. - many bug fixes. check [2] and [3] to get the sources and build it. Offer me free coffee or support my involvement in the dlang

The D IDE dexed - version 3.7.5 available

2019-02-02 Thread Basile B. via Digitalmars-d-announce
See [1] to consult the changes since the last announce here. Maybe it was 3.7.2, I don't remember. [1] https://github.com/Basile-z/dexed/releases

Re: OT: LLVM talk @ FOSDEM'19

2019-02-02 Thread Basile B. via Digitalmars-d-announce
On Saturday, 2 February 2019 at 16:12:12 UTC, Kai Nacke wrote: Hi everybody! I am still around. :-) I am a speaker in the LLVM toolchain devroom @ FOSDEM'19. My talk is about how to easily generate IR for LLVM. Sorry - not D related this year but still useful. Read the announcement at

Re: D IDE "Dexed" - version 3.7.0 available

2019-01-08 Thread Basile B. via Digitalmars-d-announce
On Monday, 7 January 2019 at 20:56:27 UTC, Daniel Kozák wrote: I have tried to install it on archlinux but I get something else: http://asb2m10.github.io/dexed/ the archlinux package for mine doesn't exist.

Re: SecureD 2.0 Released

2018-12-31 Thread Basile B. via Digitalmars-d-announce
On Monday, 31 December 2018 at 03:54:31 UTC, Adam Wilson wrote: SecureD is a library that provides strong cryptography with a simple-to-use interface that ensures that your data will be correctly and securely stored with a minimum amount of effort. [...] Thanks it looks very complete.

DCD, D-Scanner and DFMT : new year edition

2018-12-31 Thread Basile B. via Digitalmars-d-announce
DCD [1] 0.10.2 comes with bugfixes and small API changes. DFMT [2] and D-Scanner [3] with bugfixes too and all of the three products are based on d-parse 0.10.z, making life easier and the libraries versions more consistent for the D IDE and D IDE plugins developers. [1]

Re: now it's possible! printing floating point numbers at compile-time

2018-12-30 Thread Basile B. via Digitalmars-d-announce
On Sunday, 30 December 2018 at 12:19:19 UTC, ketmar wrote: too bad that i didn't knew about Ryu back than. It's very recent, announce on proggit is < 1 year. It would be nice to have one to format in phobos. RYU or Grisu3 doesn't matter much as long as the two issues that are - CTFE

Re: Beta 2.084.0

2018-12-28 Thread Basile B. via Digitalmars-d-announce
On Tuesday, 25 December 2018 at 18:26:16 UTC, Andre Pany wrote: On Monday, 24 December 2018 at 22:33:27 UTC, Martin Nowak wrote: On 12/17/18 10:38 PM, Martin Nowak wrote: Second beta live now. Basile B. solved the spurious NOLOGO bug. Can you include it in 2.084?

Re: DCD xmas edition

2018-12-27 Thread Basile B. via Digitalmars-d-announce
On Monday, 24 December 2018 at 17:15:43 UTC, ANtlord wrote: On Monday, 24 December 2018 at 13:24:30 UTC, Basile B. wrote: added support for completion on template type parameters that must implicitly convert to a type. You, sir, are my hero! That's funny ANtlord because the changes allowing

Re: DConf 2019: Shepherd's Pie Edition

2018-12-27 Thread Basile B. via Digitalmars-d-announce
On Wednesday, 26 December 2018 at 11:26:52 UTC, Guillaume Piolat wrote: Last year I had an amazing time at Dconf. Went to bike there for 9 days (800km), to arrive the day before DConf.  woah dude !

Re: DCD xmas edition

2018-12-26 Thread Basile B. via Digitalmars-d-announce
On Wednesday, 26 December 2018 at 21:31:52 UTC, WebFreak001 wrote: On Monday, 24 December 2018 at 13:24:30 UTC, Basile B. wrote: By some chances some cool new feature were added latest week, justifying a new minor release [1] [1] https://github.com/dlang-community/DCD/releases/tag/v0.10.0

Re: Handling signals in D

2018-12-26 Thread Basile B via Digitalmars-d-learn
On Wednesday, 26 December 2018 at 03:19:45 UTC, Norbert Preining wrote: Hello everyone, we are writing a program that synchronizes the OneDrive cloud service with the local computer, and run it as daemon in the background. To ensure proper database shutdown on exit, we need to install signal

Re: Beta 2.084.0

2018-12-25 Thread Basile B. via Digitalmars-d-announce
On Monday, 24 December 2018 at 22:33:27 UTC, Martin Nowak wrote: On 12/17/18 10:38 PM, Martin Nowak wrote: Second beta live now. Can someone take a look at https://issues.dlang.org/show_bug.cgi?id=19510 ?

DCD xmas edition

2018-12-24 Thread Basile B. via Digitalmars-d-announce
By some chances some cool new feature were added latest week, justifying a new minor release [1] [1] https://github.com/dlang-community/DCD/releases/tag/v0.10.0

Re: class template conflict

2018-12-23 Thread Basile B. via Digitalmars-d-learn
On Sunday, 23 December 2018 at 12:09:31 UTC, Michelle Long wrote: class X { } class X(int N) : X { } Is there any real reason we can't do this? It is very nice to be able to treat X like the base and X!n as a derived class. Sure we can do class X(int N) : X!0 { static if(N == 0) {

Re: now it's possible! printing floating point numbers at compile-time

2018-12-22 Thread Basile B. via Digitalmars-d-announce
On Saturday, 22 December 2018 at 20:24:46 UTC, Stefan Koch wrote: On Saturday, 22 December 2018 at 20:08:12 UTC, Stefan Koch wrote: Thus enabling you to convert doubles into strings at compiletime. Cool, CTFE formating is something that occasionaly comes in the forum. Now i remember there's

Re: Mixin operator 'if' directly

2018-12-22 Thread Basile B. via Digitalmars-d-learn
On Saturday, 22 December 2018 at 10:11:23 UTC, bauss wrote: On Saturday, 22 December 2018 at 03:44:09 UTC, Timoses wrote: Awesome hack! Being a hack, it would be even nicer if it worked ouf of the box: mixin template foo(bool b) { int _impl() { writeln(b); return int.init; }

Re: Fuzzed - a program to find DMDFE parser crash

2018-12-15 Thread Basile B. via Digitalmars-d-announce
On Saturday, 15 December 2018 at 21:09:12 UTC, Sebastiaan Koppe wrote: On Saturday, 15 December 2018 at 15:37:19 UTC, Basile B. wrote: I think this is what Walter calls "AST poisoning" (never understood how it worked before today). And the whole parser is like this. This poisoning kills the

Re: Fuzzed - a program to find DMDFE parser crash

2018-12-15 Thread Basile B. via Digitalmars-d-announce
On Sunday, 16 December 2018 at 01:57:17 UTC, Walter Bright wrote: On 12/15/2018 2:48 PM, Neia Neutuladh wrote: The way to fix this is to replace the entire parser and get rid of the idea of AST poisoning; at the first error, you give up on parsing the entire file. From there, you can try

Re: Fuzzed - a program to find DMDFE parser crash

2018-12-15 Thread Basile B. via Digitalmars-d-announce
On Saturday, 15 December 2018 at 22:48:01 UTC, Neia Neutuladh wrote: The way to fix this is to replace the entire parser and get rid of the idea of AST poisoning; at the first error, you give up on parsing the entire file. From there, you can try recovering from specific errors with proper

Re: Fuzzed - a program to find DMDFE parser crash

2018-12-15 Thread Basile B. via Digitalmars-d-announce
On Saturday, 15 December 2018 at 14:22:48 UTC, Johan Engelen wrote: On Saturday, 15 December 2018 at 11:29:45 UTC, Basile B. wrote: Fuzzed [1] is a simple fuzzer for the D programming language. Are you familiar with libFuzzer and LDC's integration?

Fuzzed - a program to find DMDFE parser crash

2018-12-15 Thread Basile B. via Digitalmars-d-announce
Fuzzed [1] is a simple fuzzer for the D programming language. It allows to detect sequences of tokens that crash the parser. While the D front end is not yet used to make tools, if this ever happens the parser will have to accept invalid code. As experienced with dparse, invalid code tend to

Re: A facebook group for D programmers

2018-12-09 Thread Basile B. via Digitalmars-d-announce
On Monday, 10 December 2018 at 00:18:03 UTC, Murilo wrote: Hi guys, thank you for helping me out here, there is this facebook group for the D language, here we can help and teach each other. It is called Programming in D. Please join.

Re: Compiling a template

2018-12-06 Thread Basile B. via Digitalmars-d-learn
On Thursday, 6 December 2018 at 22:50:49 UTC, albertas-jn wrote: If templates are a compile-time feature and instances of templates are generated by compiler at compile time, why is it possible to compile a template definition with dmd -lib or -c? Because to instantiate the source code is

Re: struct sta­tic ini­tial­izer method apply to UDA

2018-12-06 Thread Basile B. via Digitalmars-d-learn
On Thursday, 6 December 2018 at 11:04:23 UTC, learnfirst1 wrote: my question is how to easy use struct sta­tic ini­tial­izer method with UDA. Fake code: struct DbColumn { string name; boolunique ; boolsigned ; boolnullable ; } struct Order {

Re: Non-blocking reads of a fifo (named pipe)?

2018-12-03 Thread Basile B. via Digitalmars-d-learn
On Monday, 3 December 2018 at 23:32:10 UTC, Anonymouse wrote: I have a fifo that I want to read lines from, but everything is blocking. [...] How can I go about doing this to get non-blocking reads? Or perhaps a way to test whether there is text waiting in the fifo? File.eof is not it. [...]

Re: __traits for checking if a type is dynamic array (slice)

2018-11-26 Thread Basile B. via Digitalmars-d-learn
On Monday, 26 November 2018 at 09:04:25 UTC, Per Nordlöw wrote: Why is there no - __traits(isArray, T) alongside - __traits(isStaticArray, T) and - __traits(isAssociativeArray, T) when dmd already has `ENUMTY.Tarray` alongside - ENUMTY.Tsarray and - ENUMTY.Taarray and std.traits already

Re: textattr library for text colors and attributes available in D

2018-11-23 Thread Basile B. via Digitalmars-d-announce
On Thursday, 8 November 2018 at 13:37:08 UTC, Shriramana Sharma wrote: https://github.com/jamadagni/textattr/ textattr is a library and command-line tool that makes adding color and attributes to beautify the terminal output of your program easier by translating human-readable specs into ANSI

Re: Profiling DMD's Compilation Time with dmdprof

2018-11-17 Thread Basile B. via Digitalmars-d-announce
On Sunday, 18 November 2018 at 01:12:04 UTC, Vladimir Panteleev wrote: On Saturday, 17 November 2018 at 23:01:23 UTC, Basile B. wrote: I put a start to the project then today i remembered callgrind... What are the pros and cons in comparison with callgrind ? By coincidence i had to callgrind

Re: Profiling DMD's Compilation Time with dmdprof

2018-11-17 Thread Basile B. via Digitalmars-d-announce
On Tuesday, 6 November 2018 at 18:00:22 UTC, Vladimir Panteleev wrote: This is a tool + article I wrote in February, but never got around to finishing / publishing until today. https://blog.thecybershadow.net/2018/02/07/dmdprof/ Hopefully someone will find it useful. I put a start to the

Re: Fields with the same name not causing a warning?

2018-11-16 Thread Basile B. via Digitalmars-d-learn
On Friday, 16 November 2018 at 17:28:15 UTC, Vinay Sajip wrote: On Friday, 16 November 2018 at 17:08:00 UTC, Basile B. wrote: I agree that this is almost a case of shadowing but i don't know the exact rationale for allowing this. I'm not saying it shouldn't be allowed - just that the

Re: Fields with the same name not causing a warning?

2018-11-16 Thread Basile B. via Digitalmars-d-learn
On Friday, 16 November 2018 at 15:59:14 UTC, Vinay Sajip wrote: This code should IMO give at least a warning, but it doesn't: abstract class A { int kind; } class B : A { int kind; this(int k) { kind = k; } } In my actual code, the declaration of field "kind" in B was

Re: Not able to load classes defined in archive file in Mac OSX using Object.factory

2018-11-16 Thread Basile B. via Digitalmars-d-learn
On Friday, 16 November 2018 at 14:55:52 UTC, Aditya wrote: On Friday, 16 November 2018 at 14:30:02 UTC, Adam D. Ruppe wrote: PS object.factory sucks and I hope it is removed some day. There's no plan to do so, but I still wouldn't actually rely on it... instead, I'd write your own factory

Re: Inherit from class based on bool value

2018-11-13 Thread Basile B. via Digitalmars-d-learn
On Tuesday, 13 November 2018 at 07:10:26 UTC, Jamie wrote: I would like my class to inherit from one of two classes based on a boolean value known at compile time. Something like this: void main() { Top!(OPTION.FALSE) top = new Top!(OPTION.FALSE); } enum OPTION { FALSE = 0., TRUE

Re: We need an internal keyword.

2018-10-22 Thread Basile B. via Digitalmars-d
On Monday, 22 October 2018 at 08:25:17 UTC, Andrea Fontana wrote: Moreover: you're the author of the module so you're supposed to know how it works and which members you should call or not. - team - maintainer of a module written by someone that works elsewhere now. that's two cases where

Re: Wed Oct 17 - Avoiding Code Smells by Walter Bright

2018-10-22 Thread Basile B. via Digitalmars-d-announce
On Friday, 19 October 2018 at 03:53:12 UTC, Walter Bright wrote: On 10/15/2018 2:23 PM, Walter Bright wrote: I'm giving a presentation at: http://nwcpp.org/ See you there! Had a nice crowd there last night. Apparently lots of people were interested in this topic! Video:

Re: We need an internal keyword.

2018-10-21 Thread Basile B. via Digitalmars-d
On Sunday, 21 October 2018 at 03:17:23 UTC, 12345swordy wrote: So that classes can share some of their variables but not others in a module. IE. class A { internal int A; //This is shared in the module private int B; // But not this. } No need to reintroduce the "Friend" feature from cpp.

Re: Noob question about structs allocation

2018-10-14 Thread Basile B. via Digitalmars-d-learn
On Monday, 15 October 2018 at 03:19:07 UTC, IM wrote: I probably used to know the answer to this question, but it's been a long time since I last used D, and I don't remember. Suppose we have: struct S { int num; } Would allocating an instance on the heap using: S* s = new S; use the GC,

Re: [OT] Is this a feature is any Linux terminal?

2018-10-14 Thread Basile B. via Digitalmars-d
On Sunday, 14 October 2018 at 23:28:04 UTC, Nick Sabalausky (Abscissa) wrote: Was just thinking about this: I've often liked the idea of having a terminal emulator built-into my code editor, so it could auto-highlight errors/etc and do jump-to-line on ANY variation of build command, without

Re: Help about Template and class inheritance

2018-10-14 Thread Basile B. via Digitalmars-d-learn
On Sunday, 14 October 2018 at 13:21:00 UTC, Heromyth wrote: Here is a sample code ```d import std.stdio; class Future(T) { T result; this(T r) { this.result = r; } } interface IExecutorService { // Future!(T) submit(T)(T result); // can't be

Re: What's going on with the DMD nightlies releases ?

2018-10-12 Thread Basile B. via Digitalmars-d
On Wednesday, 19 September 2018 at 12:51:25 UTC, Basile B. wrote: The downloads of nightlies is broken since at least 2 weeks now. What's going on ? I've started using this script from today : https://github.com/BBasile/dmdm/blob/master/dmdm.sh Instead of downloading the nightly release it

Re: Has Anyone has this same Issue Please?

2018-10-12 Thread Basile B. via Digitalmars-d-learn
On Thursday, 11 October 2018 at 18:20:56 UTC, Ephrahim wrote: Using this dub.json configuration 0.8.36\eventcore\source\eventcore\drivers\posix\driver.d(145,14): Error: safe function 'eventcore.drivers.posix.driver.PosixEventDriverCore!(SelectEventLoop, LoopTimeoutTimerDriver,

Re: std.data.json formal review

2018-10-09 Thread Basile B. via Digitalmars-d
On Tuesday, 9 October 2018 at 18:07:44 UTC, Márcio Martins wrote: On Tuesday, 28 July 2015 at 14:07:19 UTC, Atila Neves wrote: Start of the two week process, folks. Code: https://github.com/s-ludwig/std_data_json Docs: http://s-ludwig.github.io/std_data_json/ Atila Sorry for the late ping,

Re: DUB??

2018-10-06 Thread Basile B via Digitalmars-d
On Saturday, 6 October 2018 at 19:07:48 UTC, steven kladitis wrote: On Saturday, 6 October 2018 at 17:48:00 UTC, rikki cattermole wrote: On 07/10/2018 6:36 AM, steven kladitis wrote: [...] 1.11.0 is current https://github.com/dlang/dub/tree/v1.11.0 [...] Do you mean code.dlang.org not

Re: Is there a function for this?

2018-10-06 Thread Basile B via Digitalmars-d-learn
On Saturday, 6 October 2018 at 13:56:32 UTC, bauss wrote: On Saturday, 6 October 2018 at 13:35:38 UTC, Basile B wrote: On Saturday, 6 October 2018 at 13:17:22 UTC, bauss wrote: Let's say you have a range with struct, but some of the struct are duplicates of each other. Is there a standard

Re: Is there a function for this?

2018-10-06 Thread Basile B via Digitalmars-d-learn
On Saturday, 6 October 2018 at 13:17:22 UTC, bauss wrote: Let's say you have a range with struct, but some of the struct are duplicates of each other. Is there a standard function in Phobos to remove duplicates? My first thought was "uniq", but it can't really do it like that, but it doesn't

Re: Forums intermittently going down?

2018-10-06 Thread Basile B via Digitalmars-d
On Saturday, 6 October 2018 at 09:29:42 UTC, Jacob Carlborg wrote: Just see what has happened to the DMD nightly builds. It's been down for weeks (soon a month?) I've checked the logs from my stuff at Semaphore and it's since Sept 7 to be exactly.

Re: Linking with a non-default druntime

2018-10-02 Thread Basile B. via Digitalmars-d-learn
On Tuesday, 2 October 2018 at 13:07:04 UTC, Basile B. wrote: On Monday, 1 October 2018 at 11:10:07 UTC, Per Nordlöw wrote: On Monday, 1 October 2018 at 08:27:54 UTC, Basile B. wrote: I think so. Apparently it's registered with a string, e.g "manual" and you pass a special druntime option with

Re: Dlang tour - Unittesting example

2018-10-02 Thread Basile B. via Digitalmars-d-learn
On Tuesday, 2 October 2018 at 12:30:36 UTC, Joe wrote: On Tuesday, 2 October 2018 at 12:25:19 UTC, Joe wrote: On Tuesday, 2 October 2018 at 09:59:28 UTC, bauss wrote: On Tuesday, 2 October 2018 at 04:13:01 UTC, Joe wrote: There appears to be a problem with the example at

Re: Linking with a non-default druntime

2018-10-02 Thread Basile B. via Digitalmars-d-learn
On Monday, 1 October 2018 at 11:10:07 UTC, Per Nordlöw wrote: On Monday, 1 October 2018 at 08:27:54 UTC, Basile B. wrote: I think so. Apparently it's registered with a string, e.g "manual" and you pass a special druntime option with your program to select. Actually i would be interested to

Re: Invalid string literal in ASM

2018-10-01 Thread Basile B. via Digitalmars-d-learn
On Monday, 1 October 2018 at 09:24:47 UTC, Basile B. wrote: On Monday, 1 October 2018 at 08:14:07 UTC, dokutoku wrote: I get a compiler error when I try to put non-ASCII characters in a string literal in the inline assembler. Is this part of the specifications? It's not clear, see

Re: Funny way to crash dmd and brick the whole computer

2018-10-01 Thread Basile B. via Digitalmars-d
On Monday, 1 October 2018 at 09:24:18 UTC, Basile B. wrote: On Friday, 28 September 2018 at 11:58:25 UTC, Zardoz wrote: CTE fib : module fib_cte; import std.stdio; long fib(long n) { if (n <= 1) return 1; return fib(n - 1) + fib(n - 2); } static immutable valueFib = fib(46); void main()

Re: Funny way to crash dmd and brick the whole computer

2018-10-01 Thread Basile B. via Digitalmars-d
On Friday, 28 September 2018 at 11:58:25 UTC, Zardoz wrote: CTE fib : module fib_cte; import std.stdio; long fib(long n) { if (n <= 1) return 1; return fib(n - 1) + fib(n - 2); } static immutable valueFib = fib(46); void main() { writeln(valueFib); } don't try to compile this one

Re: Invalid string literal in ASM

2018-10-01 Thread Basile B. via Digitalmars-d-learn
On Monday, 1 October 2018 at 08:14:07 UTC, dokutoku wrote: I get a compiler error when I try to put non-ASCII characters in a string literal in the inline assembler. Is this part of the specifications? It's not clear, see https://dlang.org/spec/iasm.html#raw_data: "if an operand is a string

Re: Linking with a non-default druntime

2018-10-01 Thread Basile B. via Digitalmars-d-learn
On Monday, 1 October 2018 at 07:17:59 UTC, Per Nordlöw wrote: On Sunday, 30 September 2018 at 19:53:02 UTC, Basile B. wrote: this way you can very easily change-compile-test, without recompiling the whole runtime and phobos each time. Ok, thanks. Is it possible to register an extra GC in a

Re: Linking with a non-default druntime

2018-09-30 Thread Basile B. via Digitalmars-d-learn
On Sunday, 30 September 2018 at 19:03:17 UTC, Per Nordlöw wrote: How can I link my dmd-compiled program with a specific version of the druntime? druntime is within libphobos. So you must change this. I need this when experimenting with a new GC. Did you try what i proposed earlier ? Until

Re: inline ASM function calling conventions.

2018-09-30 Thread Basile B. via Digitalmars-d-learn
On Sunday, 30 September 2018 at 11:53:17 UTC, Basile B. wrote: On Sunday, 30 September 2018 at 10:46:33 UTC, Sjoerd Nijboer wrote: [...] Hello, i think this should be here (https://dlang.org/spec/abi.html) because myself i never remember them correctly without playing a bit with a

Re: inline ASM function calling conventions.

2018-09-30 Thread Basile B. via Digitalmars-d-learn
On Sunday, 30 September 2018 at 10:46:33 UTC, Sjoerd Nijboer wrote: I'm kinda puzzled. I'm having trouble getting started with inline asm in D. Suppowse I have the following: void Foo(MyStrunct* first_arg, MyStrunct* second_arg) { asm { naked; version(X86) {

Re: Most Effective way of developing a new GC for D

2018-09-30 Thread Basile B. via Digitalmars-d
On Sunday, 30 September 2018 at 09:40:10 UTC, Per Nordlöw wrote: I'm gonna play around with creating a GC that alleviates some of the uses described in https://olshansky.me/gc/runtime/dlang/2017/06/14/inside-d-gc.html What's the most effective way of incrementally developing a new pluggable

Re: This is why I don't use D.

2018-09-20 Thread Basile B. via Digitalmars-d
On Thursday, 20 September 2018 at 06:41:54 UTC, drug wrote: Autotester should show build logs because for example `nanogui` package reported as failed although it builds on my machines successfully. This is because the D project tester (i assume this is what you call autotester) uses

Re: This is why I don't use D.

2018-09-19 Thread Basile B. via Digitalmars-d
On Thursday, 20 September 2018 at 04:16:41 UTC, Neia Neutuladh wrote: And source code is available at https://git.ikeran.org/dhasenan/dubautotester Please don't judge me. Nice work.

What's going on with the DMD nightlies releases ?

2018-09-19 Thread Basile B. via Digitalmars-d
The downloads of nightlies is broken since at least 2 weeks now. What's going on ?

DCD 0.9.13 and D-Scanner 0.5.11

2018-09-16 Thread Basile B. via Digitalmars-d-announce
See detailed changelog and pre-compiled binaries: https://github.com/dlang-community/DCD/releases/tag/v0.9.13 https://github.com/dlang-community/D-Scanner/releases/tag/v0.5.11 DCD update highly recommended if you're still on v0.9.11 or older.

Re: dealing with very long paths and names

2018-09-14 Thread Basile B. via Digitalmars-d-learn
On Friday, 14 September 2018 at 17:59:38 UTC, Josphe Brigmo wrote: Seems to break dirEntries when trying to deal with long pathnames(> 512) on windows. It's a strange error because it just fails with access denied or missing file. The bug is known, see

Re: traits getOverload of a template method

2018-09-11 Thread Basile B. via Digitalmars-d-learn
On Thursday, 6 February 2014 at 23:06:03 UTC, QAston wrote: How do i get aliases to overloads of a template method like Class A { int a(T)(T tq,T tw); int a(T)(T tq); } __traits(getOverloads, A, "a(int)")doesnt work Support for template in the getOverloads trait has been added

Re: Error: expression `update` of type `void` does not have a boolean value

2018-09-08 Thread Basile B. via Digitalmars-d-learn
On Saturday, 8 September 2018 at 03:12:56 UTC, Josphe Brigmo wrote: auto foo(bool update = false)() { static if(update) { } } and the compiler, after upgrading to 2.082 from 2.080 now says: Error: expression `update` of type `void` does not have a boolean value when update is

Re: This is why I don't use D.

2018-09-08 Thread Basile B. via Digitalmars-d
On Saturday, 8 September 2018 at 11:24:50 UTC, rjframe wrote: The beta might be better than dmd-nightly, as they would avoid the churn and still provide maintainers with time to react to problems with the upcoming release before the release is out. Betas are often outdated and contain

Re: std.process: spawnProcess

2018-09-07 Thread Basile B. via Digitalmars-d-learn
On Friday, 7 September 2018 at 14:36:42 UTC, Russel Winder wrote: From what I can see, processes created with std.process: spawnProcess are not terminated when the creating process terminates, i.e. it seems Config.detached is the default for these process. Is there a way of all spawned

Re: DCD 0.9.11 & D-Scanner 0.5.10

2018-09-02 Thread Basile B. via Digitalmars-d-announce
On Sunday, 2 September 2018 at 04:52:22 UTC, Basile B. wrote: Both compatible with syntax changes coming with 2.082. https://github.com/dlang-community/DCD/releases/tag/v0.9.11 https://github.com/dlang-community/D-Scanner/releases/tag/v0.5.10 Better use

Re: DCD 0.9.11 & D-Scanner 0.5.10

2018-09-02 Thread Basile B. via Digitalmars-d-announce
On Sunday, 2 September 2018 at 15:45:45 UTC, Nordlöw wrote: On Sunday, 2 September 2018 at 04:52:22 UTC, Basile B. wrote: Both compatible with syntax changes coming with 2.082. https://github.com/dlang-community/DCD/releases/tag/v0.9.11

Re: Static foreach bug?

2018-09-02 Thread Basile B. via Digitalmars-d
On Sunday, 2 September 2018 at 13:21:05 UTC, bauss wrote: Is there a reason why you cannot create a separate scope within a static foreach? The below will not compile: ``` enum a = ["a" : "a", "b" : "b", "c" : "c"]; static foreach (k,v; a) { { enum b = k; enum c = v;

DCD 0.9.11 & D-Scanner 0.5.10

2018-09-01 Thread Basile B. via Digitalmars-d-announce
Both compatible with syntax changes coming with 2.082. https://github.com/dlang-community/DCD/releases/tag/v0.9.11 https://github.com/dlang-community/D-Scanner/releases/tag/v0.5.10

Re: D is dead

2018-08-31 Thread Basile B. via Digitalmars-d
On Friday, 31 August 2018 at 08:36:27 UTC, Nick Treleaven wrote: I hadn't understood the rationale for lazy variadic functions https://dlang.org/spec/function.html#lazy_variadic_functions I don't know if this has been updated too but this sentence makes no sense : "Then each of the

Re: D now has a dangerous competitor

2018-08-30 Thread Basile B. via Digitalmars-d
On Thursday, 30 August 2018 at 10:57:23 UTC, bauss wrote: On Thursday, 30 August 2018 at 10:43:24 UTC, Basile B. wrote: On Wednesday, 29 August 2018 at 04:53:59 UTC, bauss wrote: On Tuesday, 28 August 2018 at 23:27:09 UTC, Nick Sabalausky wrote: [...] Honestly C++ did OOP somewhat right,

Re: D now has a dangerous competitor

2018-08-30 Thread Basile B. via Digitalmars-d
On Wednesday, 29 August 2018 at 04:53:59 UTC, bauss wrote: On Tuesday, 28 August 2018 at 23:27:09 UTC, Nick Sabalausky wrote: [...] Honestly C++ did OOP somewhat right, because it wasn't forced upon you, but C++ itself has design issues, that I think D has solved very well. D does OOP

Re: Static foreach internal variable

2018-08-30 Thread Basile B. via Digitalmars-d-learn
On Thursday, 30 August 2018 at 08:19:47 UTC, Andrey wrote: Hello, is it possible to declare an internal variable in "static foreach" and on each iteration assign something to it? Example: static foreach(arg; SomeAliasSeq) { internal = arg[0].converted;// a shortcut for expression

Re: Null-Coalescing Operator and Extensions

2018-08-27 Thread Basile B. via Digitalmars-d-learn
On Monday, 27 August 2018 at 14:59:20 UTC, SG wrote: On Monday, 27 August 2018 at 07:59:17 UTC, Simen Kjærås wrote: That's the null propagation operator (?.). What SG asked for is the null-coalescing operator (??). Of course, this can also be implemented in D (albeit with a slight more

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-08-27 Thread Basile B. via Digitalmars-d
On Monday, 27 August 2018 at 01:15:49 UTC, Laeeth Isharc wrote: There's no question from my perspective that D is much better than a year ago and unimaginably better from when I first picked it up in 2014. One can't be serious suggesting that D isn't flourishing as far as adoption goes. I

Re: Null-Coalescing Operator and Extensions

2018-08-27 Thread Basile B. via Digitalmars-d-learn
On Saturday, 25 August 2018 at 19:16:26 UTC, Jacob Carlborg wrote: On 2018-08-25 15:33, SG wrote: Hi, 1) I program in C# and I'm wondering if there is something like ?? (Null-Coalescing Operator) in D? (I remember some proposals in the past). Not in the language but it can be implemented

Re: Embrace the from template?

2018-08-25 Thread Basile B. via Digitalmars-d
On Friday, 24 August 2018 at 10:58:29 UTC, aliak wrote: On Friday, 24 August 2018 at 06:41:35 UTC, Jonathan Marler wrote: Ever since I read https://dlang.org/blog/2017/02/13/a-new-import-idiom/ I've very much enjoyed using the new `from` template. [...] Of course, if we don't want to encourage

Re: GDC with D frontend 2.081.2

2018-08-24 Thread Basile B. via Digitalmars-d-announce
On Friday, 24 August 2018 at 05:35:13 UTC, Eugene Wissner wrote: As some of you may know D frontend was merged into GDC some time ago and is up to date. D version currently supported by GDC is 2.081.2 Great news. Best of luck for a wide adoption in the official package managers of the linux

Re: Make function alias

2018-08-20 Thread Basile B. via Digitalmars-d-learn
On Monday, 20 August 2018 at 13:14:14 UTC, Andrey wrote: Hello, I want to make an alias to function "std.stdio.writeln" and "std.stdio.write" and use it like: static void log(bool newline = true)(string text) { alias print(T...) = newline ? : _file.print(); text.print(); }

<    1   2   3   4   5   6   7   8   9   10   >