Re: How to replace pairs tags with regexp

2017-07-21 Thread Suliman via Digitalmars-d-learn
There reason of issue above is spaces before "#".

[Issue 15054] DMD doesn't work with hardening-wrapper

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15054 Vladimir Panteleev changed: What|Removed |Added Status|NEW

Re: Update to Bare Metal STM32F4 (ARM Cortex-M4) LCD Demo Proof of Concept

2017-07-21 Thread Andrea Fontana via Digitalmars-d-announce
On Thursday, 20 July 2017 at 12:23:31 UTC, Mike wrote: A few years ago I created a bare metal demo on an ARM Cortex-M4 microcontroller entirely in D. It was just a demonstration that one could do bare metal programming for microcontrollers in D without any dependencies on C or assembly. It

[Issue 16457] std.regex postprocesses ctRegex every time at runtime

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16457 Vladimir Panteleev changed: What|Removed |Added Hardware|x86_64 |All

[Issue 13532] std.regex performance (enums; regex vs ctRegex)

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13532 Vladimir Panteleev changed: What|Removed |Added See Also|

Re: How to replace pairs tags with regexp

2017-07-21 Thread Suliman via Digitalmars-d-learn
On Friday, 21 July 2017 at 06:19:43 UTC, Suliman wrote: There reason of issue above is spaces before "#". What wrong with next regex https://dpaste.dzfl.pl/024a47ed2a56 I expect that it will select: #Header my header text ##SubHeader my sub header text Because: ^#{3}

[Issue 10364] Mac OS 10.8 program crash

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10364 --- Comment #8 from Jacob Carlborg --- (In reply to Vladimir Panteleev from comment #7) > I reproduced it with macOS 10.12 and DMD 2.074. > > Changing daemon(0,0) to daemon(0,1) (so that stderr isn't redirected to > /dev/null) reveals

[Issue 14872] [2.068.2] Label address in asm [x86-64]

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14872 Vladimir Panteleev changed: What|Removed |Added Keywords|

Re: An Issue I Wish To Raise Awareness On

2017-07-21 Thread Atila Neves via Digitalmars-d
On Thursday, 20 July 2017 at 21:20:46 UTC, Jonathan M Davis wrote: On Thursday, July 20, 2017 07:40:35 Dominikus Dittes Scherkl via Digitalmars-d wrote: On Wednesday, 19 July 2017 at 22:35:43 UTC, Jonathan M Davis wrote: > The issue isn't the object being destroyed. It's what it > refers to

[Issue 17674] New: [REG 2.064] Simultaneous opBinary and opBinaryRight is not rejected

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17674 Issue ID: 17674 Summary: [REG 2.064] Simultaneous opBinary and opBinaryRight is not rejected Product: D Version: D2 Hardware: All OS: All Status: NEW

[Issue 15135] std.parallelism taskPool.amap compilation error for array of tuple of tuple or tuple of struct results

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15135 Vladimir Panteleev changed: What|Removed |Added Hardware|x86 |All

Re: How to replace pairs tags with regexp

2017-07-21 Thread Antonio Corbi via Digitalmars-d-learn
On Friday, 21 July 2017 at 07:08:34 UTC, Suliman wrote: On Friday, 21 July 2017 at 06:19:43 UTC, Suliman wrote: There reason of issue above is spaces before "#". What wrong with next regex https://dpaste.dzfl.pl/024a47ed2a56 I expect that it will select: #Header my header text ##SubHeader

[Issue 15484] core.memory.GC.disable() is not @nogc

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15484 Vladimir Panteleev changed: What|Removed |Added Status|NEW

[Issue 13216] Failed anti-hijacking of with statement

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13216 Vladimir Panteleev changed: What|Removed |Added Hardware|x86 |All

[Issue 14674] Importing std.stdio causes another module to become undefined

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14674 Vladimir Panteleev changed: What|Removed |Added Status|NEW

[Issue 12277] static opCall is hidden by @disabled constructors and can never be called

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12277 Vladimir Panteleev changed: What|Removed |Added Status|NEW

Re: An Issue I Wish To Raise Awareness On

2017-07-21 Thread Atila Neves via Digitalmars-d
On Thursday, 20 July 2017 at 10:15:26 UTC, Kagamin wrote: On Wednesday, 19 July 2017 at 20:59:03 UTC, Atila Neves wrote: Not necessarily - the reference counted smart pointer doesn't have to be `shared` itself to have a `shared` payload. Yes, but it can be done either way. It's actually what

[Issue 17674] [REG 2.064] Simultaneous opBinary and opBinaryRight is not rejected

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17674 Vladimir Panteleev changed: What|Removed |Added See Also|

[Issue 11847] Importing "package.d" module causes qualified name lookup to fail for sub modules

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11847 Vladimir Panteleev changed: What|Removed |Added See Also|

[Issue 8855] cannot define a function name that matches a package name in import statements

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8855 Vladimir Panteleev changed: What|Removed |Added See Also|

[Issue 6380] Proposal to make 'shared' usable

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6380 Vladimir Panteleev changed: What|Removed |Added Status|NEW

[Issue 15125] Explicit pure needed even though pure: at the top of the file

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15125 Vladimir Panteleev changed: What|Removed |Added Keywords||spec

Re: The X Macro using D

2017-07-21 Thread Stefan Koch via Digitalmars-d
On Thursday, 20 July 2017 at 22:02:32 UTC, Walter Bright wrote: On 7/20/2017 2:21 PM, Stefan Koch wrote: Please tell me this is not going to get into dmd :) templates are so much more expensive then macros. (Well, for now :) ) Those templates can and should be replaced by CTFE. If you like,

[Issue 13800] Class from mixin template missing from ModuleInfo

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13800 Vladimir Panteleev changed: What|Removed |Added Hardware|x86 |All

[Issue 16472] Spurious "is used as a type" when using enum template member as default parameter

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16472 Vladimir Panteleev changed: What|Removed |Added Summary|template alias parameter

[Issue 5155] [AA] AssociativeArray.get does not compile when opBinary("in") is defined.

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5155 Vladimir Panteleev changed: What|Removed |Added Status|NEW

[Issue 15242] Allow version or static if blocks in asm blocks

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15242 Vladimir Panteleev changed: What|Removed |Added Hardware|x86_64 |All

Re: The X Macro using D

2017-07-21 Thread Jacob Carlborg via Digitalmars-d
On 2017-07-21 10:06, Stefan Koch wrote: My pleasure :) My approach, without string mixin: http://forum.dlang.org/post/oksd27$1li9$1...@digitalmars.com :) -- /Jacob Carlborg

Re: The X Macro using D

2017-07-21 Thread Jacob Carlborg via Digitalmars-d
On 2017-07-21 10:25, Stefan Koch wrote: and leaves bloat in the binary. Perhaps that should be fixed in the compiler ;) -- /Jacob Carlborg

Re: How to replace pairs tags with regexp

2017-07-21 Thread Antonio Corbi via Digitalmars-d-learn
On Friday, 21 July 2017 at 07:42:28 UTC, Suliman wrote: On Friday, 21 July 2017 at 07:30:07 UTC, Antonio Corbi wrote: On Friday, 21 July 2017 at 07:08:34 UTC, Suliman wrote: On Friday, 21 July 2017 at 06:19:43 UTC, Suliman wrote: There reason of issue above is spaces before "#". What wrong

[Issue 16684] std.getopt, problem with the automatic handling of "h"

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16684 --- Comment #5 from Vladimir Panteleev --- (In reply to b2.temp from comment #2) > Forgot to say that the only way to handle "h" should be the getopt results, > e.g I guess "helpWanted" is a way to do that, but

[Issue 16684] [REG 2.067.0] std.getopt, problem with the automatic handling of "h"

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16684 Vladimir Panteleev changed: What|Removed |Added Summary|std.getopt, problem with|[REG

Re: WebConfig - a vibe.d HTML form generator & validator from D structs

2017-07-21 Thread Dukc via Digitalmars-d-announce
On Thursday, 20 July 2017 at 15:57:55 UTC, WebFreak001 wrote: [snip] At my current work I do program web pages to access a database, just in C#. Vibe.D and this would wipe the floor with our methods! Thank you!

[Issue 5155] [AA] AssociativeArray.get does not compile when opBinary("in") is defined.

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5155 --- Comment #1 from Vladimir Panteleev --- (In reply to Rob Jacques from comment #0) > As I can see no reason, type wise, for this to be so, this may be rooted > in a DMD error. How so? The implementation of get()

Re: How to replace pairs tags with regexp

2017-07-21 Thread Suliman via Digitalmars-d-learn
On Friday, 21 July 2017 at 07:30:07 UTC, Antonio Corbi wrote: On Friday, 21 July 2017 at 07:08:34 UTC, Suliman wrote: On Friday, 21 July 2017 at 06:19:43 UTC, Suliman wrote: There reason of issue above is spaces before "#". What wrong with next regex https://dpaste.dzfl.pl/024a47ed2a56 I

[Issue 8993] Implement unique references/isolated memory

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8993 Vladimir Panteleev changed: What|Removed |Added Status|NEW

Re: The X Macro using D

2017-07-21 Thread Stefan Koch via Digitalmars-d
On Friday, 21 July 2017 at 08:12:55 UTC, Jacob Carlborg wrote: On 2017-07-21 00:02, Walter Bright wrote: On 7/20/2017 2:21 PM, Stefan Koch wrote: Please tell me this is not going to get into dmd :) templates are so much more expensive then macros. (Well, for now :) ) Those templates can and

[Issue 14790] coverage merge should detect changed source code

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14790 --- Comment #1 from Vladimir Panteleev --- Why not just compare the modification time of the source file with that of the existing coverage file? That would be simpler, and allow avoiding changing the format of the

[Issue 10478] Crappy error message when two operator overloads match

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10478 Vladimir Panteleev changed: What|Removed |Added Severity|normal

[Issue 16253] BitmappedBlock allocator not working with chooseAtRuntime

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16253 Vladimir Panteleev changed: What|Removed |Added Assignee|nob...@puremagic.com

[Issue 15226] Public members being disabled for a synchronized class is undocumented

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15226 Vladimir Panteleev changed: What|Removed |Added Keywords||spec

Re: The X Macro using D

2017-07-21 Thread Jacob Carlborg via Digitalmars-d
On 2017-07-21 00:02, Walter Bright wrote: On 7/20/2017 2:21 PM, Stefan Koch wrote: Please tell me this is not going to get into dmd :) templates are so much more expensive then macros. (Well, for now :) ) Those templates can and should be replaced by CTFE. If you like, present the CTFE

[Issue 15242] Allow version or static if blocks in asm blocks

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15242 Vladimir Panteleev changed: What|Removed |Added Keywords||iasm

[Issue 5531] Erratic type deduction with pointers and type modifiers

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5531 Vladimir Panteleev changed: What|Removed |Added Status|NEW

Re: An Issue I Wish To Raise Awareness On

2017-07-21 Thread Atila Neves via Digitalmars-d
On Monday, 17 July 2017 at 19:30:53 UTC, Jack Stouffer wrote: On Monday, 17 July 2017 at 17:41:58 UTC, Atila Neves wrote: On Monday, 17 July 2017 at 14:26:19 UTC, Jack Stouffer wrote: TL;DR: Issue 17658 [1] makes using shared very annoying/practically impossible. [...] I fixed this

[Issue 16684] std.getopt, problem with the automatic handling of "h"

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16684 Vladimir Panteleev changed: What|Removed |Added Severity|normal

[Issue 10478] Crappy error message when two operator overloads match

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10478 Vladimir Panteleev changed: What|Removed |Added See Also|

Re: Creating a new type, to get strong-ish type checking and restrict usage to certain operations, using struct perhaps

2017-07-21 Thread Moritz Maxeiner via Digitalmars-d-learn
On Friday, 21 July 2017 at 18:49:21 UTC, Cecil Ward wrote: I was think about how to create a new type that holds packed bcd values, of a choice of widths, that must fit into a uint32_t or a uint64_t (not really long multi-byte objects). I am not at all sure how to do it. I thought about using

Re: DIP 1009--Improve Contract Usability--Preliminary Review Round 2 Begins

2017-07-21 Thread MysticZach via Digitalmars-d
On Friday, 21 July 2017 at 18:55:08 UTC, Moritz Maxeiner wrote: I really like how the syntax turned out. My only remaining peeve is the `ContractParameters` nomenclature in the grammar section, because it implies that asserts are contracts. Maybe I should have stuck with AssertParameters.

Creating a new type, to get strong-ish type checking and restrict usage to certain operations, using struct perhaps

2017-07-21 Thread Cecil Ward via Digitalmars-d-learn
I was think about how to create a new type that holds packed bcd values, of a choice of widths, that must fit into a uint32_t or a uint64_t (not really long multi-byte objects). I am not at all sure how to do it. I thought about using a templated struct to simply wrap a uint of a chosen width,

Re: WebConfig - a vibe.d HTML form generator & validator from D structs

2017-07-21 Thread tetyys via Digitalmars-d-announce
On Thursday, 20 July 2017 at 15:57:55 UTC, WebFreak001 wrote: I just released a vibe.d library that allows you to turn any D struct into an editable HTML5 compatible form with live JS updates but also normal no-JS updates with nearly the same experience. that's very nice, thanks

Re: WebConfig - a vibe.d HTML form generator & validator from D structs

2017-07-21 Thread Seb via Digitalmars-d-announce
On Friday, 21 July 2017 at 15:16:30 UTC, NVolcz wrote: On Thursday, 20 July 2017 at 15:57:55 UTC, WebFreak001 wrote: [...] I am getting OpenSSL linker errors when I run "dub test": https://gist.github.com/NVolcz/d1731f92622b018e1cebbc42b195028c FYI:

Re: The X Macro using D

2017-07-21 Thread Jacob Carlborg via Digitalmars-d
On 2017-07-21 14:27, Olivier FAURE wrote: Quick questions: isn't it possible to do private __gshared const(char)*[24] pseudotab = Y.map!(x => x.id); instead? That seems like the most obvious and easy to read option; and in contrast to the other solutions proposed, it's closer to the Rule

Re: DIP 1009--Improve Contract Usability--Preliminary Review Round 2 Begins

2017-07-21 Thread David Gileadi via Digitalmars-d
On 7/21/17 11:41 AM, Moritz Maxeiner wrote: On Friday, 21 July 2017 at 18:35:53 UTC, David Gileadi wrote: On 7/21/17 6:51 AM, Mike Parker wrote: DIP 1009 is titled "Improve Contract Usability". For out contracts that use the return identifier, could the keyword "return" be used?

Re: DIP 1009--Improve Contract Usability--Preliminary Review Round 2 Begins

2017-07-21 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 21 July 2017 at 13:51:05 UTC, Mike Parker wrote: DIP 1009 is titled "Improve Contract Usability". [...] Destroy! I really like how the syntax turned out. My only remaining peeve is the `ContractParameters` nomenclature in the grammar section, because it implies that asserts are

Re: DIP 1009--Improve Contract Usability--Preliminary Review Round 2 Begins

2017-07-21 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 21 July 2017 at 19:19:47 UTC, MysticZach wrote: On Friday, 21 July 2017 at 18:55:08 UTC, Moritz Maxeiner wrote: I really like how the syntax turned out. My only remaining peeve is the `ContractParameters` nomenclature in the grammar section, because it implies that asserts are

Re: Creating a new type, to get strong-ish type checking and restrict usage to certain operations, using struct perhaps

2017-07-21 Thread Ali Çehreli via Digitalmars-d-learn
On 07/21/2017 11:49 AM, Cecil Ward wrote: I was think about how to create a new type that holds packed bcd values, of a choice of widths, that must fit into a uint32_t or a uint64_t (not really long multi-byte objects). I am not at all sure how to do it. I thought about using a templated struct

AddressSanitizer and the GC

2017-07-21 Thread Johan Engelen via Digitalmars-d
Hi all, I've added AddressSanitizer [1] support to LDC, and it is able to nicely catch bugs like this one: ``` void foo(int* arr) { arr[10] = 1; } void main() { int[10] a; foo([0]); } ``` It works for malloc'ed memory, but not yet for GC'd memory. Our GC pool memory is

Re: Cannot find std.datetime when linking after upgrade to 2.075.0

2017-07-21 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, July 21, 2017 15:33:45 Domain via Digitalmars-d-learn wrote: > After upgrade dmd to latest 2.075.0, my project no longer build: > > zero.lib(core_cde_4a4f.obj) : error LNK2001: unresolved external > symbol _D3std8d > atetime9LocalTime6opCallFNaNbNeZyC3std8datetime9LocalTime > > and many

Re: The X Macro using D

2017-07-21 Thread Johan Engelen via Digitalmars-d
On Thursday, 20 July 2017 at 21:17:45 UTC, Walter Bright wrote: Some time ago, I wrote about the X Macro in C: https://digitalmars.com/articles/b51.html I used it from time to time in C code. It's one of the things I actually like about the C preprocessor. But in translating the aged C

[Issue 17590] Unnecessary GC alloc on returning static local struct

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17590 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/9940f4ce5e82f783b3c41c260c32b56b11e37f8a Fix Issue 17590 - Unnecessary GC alloc on returning static

Re: An Issue I Wish To Raise Awareness On

2017-07-21 Thread Atila Neves via Digitalmars-d
On Friday, 21 July 2017 at 11:57:11 UTC, Kagamin wrote: On Friday, 21 July 2017 at 08:51:27 UTC, Atila Neves wrote: Mutexes and sockets are classes, so not destroyed deterministically. They should, like any unmanaged resources, e.g. by wrapping in a smart pointer. Imagine 1 lingering tcp

Re: D easily overlooked?

2017-07-21 Thread Seb via Digitalmars-d
On Friday, 21 July 2017 at 13:50:24 UTC, Joakim wrote: On Friday, 21 July 2017 at 13:25:32 UTC, Adrian Matoga wrote: On Friday, 14 July 2017 at 13:29:30 UTC, Joakim wrote: [...] Interesting. A few months ago I wanted to sell ctRegex as the fastest one in a presentation, but in my benchmarks

Re: DIP 1009--Improve Contract Usability--Preliminary Review Round 2 Begins

2017-07-21 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 21 July 2017 at 18:35:53 UTC, David Gileadi wrote: On 7/21/17 6:51 AM, Mike Parker wrote: DIP 1009 is titled "Improve Contract Usability". For out contracts that use the return identifier, could the keyword "return" be used? out(return > 0) One possible problem with this

Re: An Issue I Wish To Raise Awareness On

2017-07-21 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 21 July 2017 at 11:57:11 UTC, Kagamin wrote: On Friday, 21 July 2017 at 08:51:27 UTC, Atila Neves wrote: Mutexes and sockets are classes, so not destroyed deterministically. They should, like any unmanaged resources I tend to agree, although e.g. by wrapping in a smart pointer.

Re: DIP 1009--Improve Contract Usability--Preliminary Review Round 2 Begins

2017-07-21 Thread H. S. Teoh via Digitalmars-d
On Fri, Jul 21, 2017 at 01:51:05PM +, Mike Parker via Digitalmars-d wrote: > DIP 1009 is titled "Improve Contract Usability". > > https://github.com/dlang/DIPs/blob/master/DIPs/DIP1009.md [...] As far as the meat of the proposal is concerned, I like it. The syntax of the out-contract without

[Issue 12337] Bad enum usage wrong error message line number

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12337 Vladimir Panteleev changed: What|Removed |Added Status|NEW

[Issue 13951] Massive amounts of bloat generated for asserts by template.c

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13951 --- Comment #1 from Vladimir Panteleev --- (In reply to Walter Bright from comment #0) > The dmd source code in template.c: I see that this code block has been removed in

Re: Article on the D blog

2017-07-21 Thread Mike Parker via Digitalmars-d
On Friday, 21 July 2017 at 13:03:34 UTC, Jean-Louis Leroy wrote: Hi, Whom should I contact to submit an article proposal for the D blog? Me: aldac...@gmail.com

[Issue 15537] Private function is not accessible from other module when compiling with -debug flag

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15537 Vladimir Panteleev changed: What|Removed |Added Resolution|INVALID

Re: The X Macro using D

2017-07-21 Thread Patrick Schluter via Digitalmars-d
On Thursday, 20 July 2017 at 21:17:45 UTC, Walter Bright wrote: Some time ago, I wrote about the X Macro in C: https://digitalmars.com/articles/b51.html I used it from time to time in C code. It's one of the things I actually like about the C preprocessor. But in translating the aged C

Re: The X Macro using D

2017-07-21 Thread Olivier FAURE via Digitalmars-d
On Friday, 21 July 2017 at 08:06:09 UTC, Stefan Koch wrote: My pleasure :) // ... mixin((){ // ... enum Y = [ // id reg mask ty X("AH", 4, mAX, TYuchar), X("AL", 0, mAX, TYuchar), X("AX", 8, mAX, TYushort), X("BH", 7, mBX,

Re: The X Macro using D

2017-07-21 Thread Olivier FAURE via Digitalmars-d
On Friday, 21 July 2017 at 12:27:35 UTC, Olivier FAURE wrote: private __gshared const(char)*[24] pseudotab = Y.map!(x => x.id); I meant private __gshared static immutable string[Y.length] pseudotab = Y.map!(x => x.id); but you get my point. Also, upon trying it, it doesn't

Article on the D blog

2017-07-21 Thread Jean-Louis Leroy via Digitalmars-d
Hi, Whom should I contact to submit an article proposal for the D blog?

[Issue 15089] Marks wrong line as where error occurs.

2017-07-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15089 Vladimir Panteleev changed: What|Removed |Added CC|

Re: The X Macro using D

2017-07-21 Thread Nick Treleaven via Digitalmars-d
On Friday, 21 July 2017 at 11:19:47 UTC, Patrick Schluter wrote: In C there's no point in the X macro anymore since C99. Designated initializer allow to do it properly[1] now. enum COLORS { red, blue, green, max }; char *cstring[max] = {[red]="red", [blue]="blue", [green]="green" };

find difference between two struct instances.

2017-07-21 Thread FoxyBrown via Digitalmars-d-learn
Is there a way to easily find the differences between to struct instances? I would like to report only the differences e.g., writeln(s1 - s2); prints only what is different between s1 and s2.

Re: proposed @noreturn attribute

2017-07-21 Thread Andrei Alexandrescu via Digitalmars-d
On 07/19/2017 10:32 AM, Timon Gehr wrote: On 19.07.2017 14:13, Moritz Maxeiner wrote: On Wednesday, 19 July 2017 at 11:35:47 UTC, Timon Gehr wrote: a value of type bottom can be used to construct a value for any other type. AFAIK from type theory, bottom is defined as having no values (so

Re: If Statement with Declaration

2017-07-21 Thread Jonathan M Davis via Digitalmars-d
On Friday, July 21, 2017 17:32:48 Andrei Alexandrescu via Digitalmars-d wrote: > On 07/19/2017 09:30 AM, sontung wrote: > [snip] > > This post: > http://forum.dlang.org/post/vfjlpvpwuyfqoljvp...@forum.dlang.org seems > to be identical to one on November 3, 2016: >

Re: AddressSanitizer and the GC

2017-07-21 Thread Walter Bright via Digitalmars-d
On 7/21/2017 2:37 PM, Johan Engelen wrote: Can you advise me on where best to add the asan calls? Offhand, I don't know. It's been maybe 15 years since I worked on it, and a lot of people have moved things about since then. Dmitry Olshansky has worked on it very recently, in fact he is

Re: If Statement with Declaration

2017-07-21 Thread Andrei Alexandrescu via Digitalmars-d
On 07/19/2017 09:30 AM, sontung wrote: [snip] This post: http://forum.dlang.org/post/vfjlpvpwuyfqoljvp...@forum.dlang.org seems to be identical to one on November 3, 2016: http://forum.dlang.org/post/dejodpslmjdovstdi...@forum.dlang.org. Hat tip for persistence! Regarding the feature

Re: AddressSanitizer and the GC

2017-07-21 Thread Johan Engelen via Digitalmars-d
On Friday, 21 July 2017 at 21:37:39 UTC, Johan Engelen wrote: On Friday, 21 July 2017 at 20:53:18 UTC, Walter Bright wrote: On 7/21/2017 12:06 PM, Johan Engelen wrote: < [...] Another option is to use a pointer to the asan functions, like: if (asan_fp) (*asan_fp)(args...) The

Re: An Issue I Wish To Raise Awareness On

2017-07-21 Thread Jonathan M Davis via Digitalmars-d
On Friday, July 21, 2017 08:37:51 Atila Neves via Digitalmars-d wrote: > On Thursday, 20 July 2017 at 21:20:46 UTC, Jonathan M Davis wrote: > > On Thursday, July 20, 2017 07:40:35 Dominikus Dittes Scherkl > > > > via Digitalmars-d wrote: > >> On Wednesday, 19 July 2017 at 22:35:43 UTC, Jonathan M

Re: The X Macro using D

2017-07-21 Thread Enamex via Digitalmars-d
On Thursday, 20 July 2017 at 22:02:32 UTC, Walter Bright wrote: On 7/20/2017 2:21 PM, Stefan Koch wrote: Please tell me this is not going to get into dmd :) templates are so much more expensive then macros. (Well, for now :) ) Those templates can and should be replaced by CTFE. If you like,

Re: AddressSanitizer and the GC

2017-07-21 Thread Walter Bright via Digitalmars-d
On 7/21/2017 12:06 PM, Johan Engelen wrote: I've added AddressSanitizer [1] support to LDC, and it is able to nicely catch bugs like this one: If anyone is game, it would be cool to do an LLVM compile of DMD so AddressSanitizer can look for bugs in DMD itself.

Re: AddressSanitizer and the GC

2017-07-21 Thread Johan Engelen via Digitalmars-d
On Friday, 21 July 2017 at 20:53:18 UTC, Walter Bright wrote: On 7/21/2017 12:06 PM, Johan Engelen wrote: < [...] Thanks for your work on this. It is important to support such valuable tools. One way making such things pretty much cost-free in the olden days was to trick the linker into

Re: AddressSanitizer and the GC

2017-07-21 Thread Johan Engelen via Digitalmars-d
On Friday, 21 July 2017 at 20:56:02 UTC, Walter Bright wrote: On 7/21/2017 12:06 PM, Johan Engelen wrote: I've added AddressSanitizer [1] support to LDC, and it is able to nicely catch bugs like this one: If anyone is game, it would be cool to do an LLVM compile of DMD so AddressSanitizer

Re: AddressSanitizer and the GC

2017-07-21 Thread Walter Bright via Digitalmars-d
On 7/21/2017 2:39 PM, Johan Engelen wrote: Quick extra note: the function pointer solution is not friendly to LTO, whereas a weak-linking solution would easily be optimized-out fully with LTO. So that's something to consider too. This code should be version'd with: version

Re: find difference between two struct instances.

2017-07-21 Thread Era Scarecrow via Digitalmars-d-learn
On Friday, 21 July 2017 at 21:03:22 UTC, FoxyBrown wrote: Is there a way to easily find the differences between to struct instances? I would like to report only the differences e.g., writeln(s1 - s2); prints only what is different between s1 and s2. This is entirely dependent on the

Re: AddressSanitizer and the GC

2017-07-21 Thread Walter Bright via Digitalmars-d
On 7/21/2017 12:06 PM, Johan Engelen wrote: < [...] Thanks for your work on this. It is important to support such valuable tools. One way making such things pretty much cost-free in the olden days was to trick the linker into writing NOPs over the function calls by using specially crafted

Re: If Statement with Declaration

2017-07-21 Thread Johan Engelen via Digitalmars-d
On Friday, 21 July 2017 at 21:32:48 UTC, Andrei Alexandrescu wrote: It's bizarre even lexically: "If the following ... oh wait let me insert some stuff ... as I was saying, if the following condition happens..." (excuse me for muddying the waters) We do have a construct like that already:

Re: Boston D Meetup: Strawman Structs

2017-07-21 Thread Steven Schveighoffer via Digitalmars-d-announce
On 7/2/17 6:35 AM, Steven Schveighoffer wrote: I'll have a short presentation on a weird trick I discovered while writing some MySQL serialization code. Hope you can attend! https://www.eventbrite.com/e/d-lang-presentation-strawman-structs-tickets-35120523431 I've set up a live stream for

Re: Update to Bare Metal STM32F4 (ARM Cortex-M4) LCD Demo Proof of Concept

2017-07-21 Thread Mr.D via Digitalmars-d-announce
On Friday, 21 July 2017 at 00:27:09 UTC, Mike wrote: On Thursday, 20 July 2017 at 17:09:40 UTC, Mr.D wrote: Thanks for your work with bare metal MCUs! I am dreaming that someday I can program smart house IoT automation on D. You already can; it just may not be the most professional

Re: AddressSanitizer and the GC

2017-07-21 Thread Walter Bright via Digitalmars-d
On 7/21/2017 2:14 PM, Johan Engelen wrote: On Friday, 21 July 2017 at 20:56:02 UTC, Walter Bright wrote: If anyone is game, it would be cool to do an LLVM compile of DMD so AddressSanitizer can look for bugs in DMD itself. Yep, I've got fuzzing to work too, so... expect nice blogs "soon". ;-)

Re: D easily overlooked?

2017-07-21 Thread Joakim via Digitalmars-d
On Friday, 21 July 2017 at 13:25:32 UTC, Adrian Matoga wrote: On Friday, 14 July 2017 at 13:29:30 UTC, Joakim wrote: Yes, D's compile-time regex are still the fastest in the world. I've been benching it recently for a marketing-oriented blog post I'm preparing for the official D blog,

Re: Solving the spurious forward/cyclic reference errors in DMD

2017-07-21 Thread Timon Gehr via Digitalmars-d
On 17.07.2017 03:16, Elie Morisse wrote: Timon, any update on this? Not really. I did not have much time to work in this in the past year. (Also, it is not very convenient to work with DMD 2.060.) What are the insights you gained with your frontend? ... What I have implemented works

Re: DIP 1009--Improve Contract Usability--Preliminary Review Round 2 Begins

2017-07-21 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Friday, 21 July 2017 at 13:51:05 UTC, Mike Parker wrote: DIP 1009 is titled "Improve Contract Usability". I like it. I would prefer the out with two sets of parantheses.

Re: Check whether string value represents a type

2017-07-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/21/17 10:21 AM, Timoses wrote: I'd love to check whether a string value is the name of a type at run-time. E.g.: string a = "int"; string b = "im no type"; assert( isStringType(a) ); assert( !isStringType(b) ); or struct TestStruct { int test; } string t = "TestStruct"; assert(

Re: D easily overlooked?

2017-07-21 Thread Adrian Matoga via Digitalmars-d
On Friday, 14 July 2017 at 13:29:30 UTC, Joakim wrote: Yes, D's compile-time regex are still the fastest in the world. I've been benching it recently for a marketing-oriented blog post I'm preparing for the official D blog, std.regex beats out the top C and Rust entries from the benchmarks

DIP 1009--Improve Contract Usability--Preliminary Review Round 2 Begins

2017-07-21 Thread Mike Parker via Digitalmars-d
DIP 1009 is titled "Improve Contract Usability". https://github.com/dlang/DIPs/blob/master/DIPs/DIP1009.md Based on feedback from the first round, this DIP has been revised to the extent that a second preliminary review round is warranted. All review-related feedback on and discussion of the

  1   2   >