Re: auto: useful, annoying or bad practice?

2018-05-20 Thread Jonathan M Davis via Digitalmars-d
On Sunday, May 20, 2018 14:33:16 I love Ice Cream via Digitalmars-d wrote: > On Sunday, 20 May 2018 at 02:34:38 UTC, Neia Neutuladh wrote: > > The return type for range-oriented functions in std.algorithm > > is usually not terribly useful. > > So the first question that comes to my mind are what

Re: Error about constructor calls in loops/labels, but there are no loops and labels?

2018-05-20 Thread Yuxuan Shui via Digitalmars-d
On Sunday, 20 May 2018 at 14:39:28 UTC, Jonathan M Davis wrote: Well, constructors are one of the few places that the compiler attempts flow analysis for stuff other than optimization, because it pretty much has to in order to do what the language needs. And no, it's not very sophisticated

Re: Sealed classes - would you want them in D? (v2)

2018-05-20 Thread Dave Jones via Digitalmars-d
On Sunday, 20 May 2018 at 02:45:25 UTC, KingJoffrey wrote: On Saturday, 19 May 2018 at 17:38:48 UTC, Gheorghe Gabriel wrote: But in D, everything is your friend - you don't get to manage You want to be taken seriously and yet you repeat false statements over and over again. There is

Re: Error about constructor calls in loops/labels, but there are no loops and labels?

2018-05-20 Thread Jonathan M Davis via Digitalmars-d
On Sunday, May 20, 2018 10:56:27 Yuxuan Shui via Digitalmars-d wrote: > On Sunday, 20 May 2018 at 00:05:39 UTC, Jonathan M Davis wrote: > > because it tends to become very difficult to get right in all > > cases and results in situations where the programmer is forced > > to do something in order

Re: auto: useful, annoying or bad practice?

2018-05-20 Thread I love Ice Cream via Digitalmars-d
On Sunday, 20 May 2018 at 02:34:38 UTC, Neia Neutuladh wrote: D is very hard to make an IDE for that would actually tell you what type the return value is. This might sound a little hard, but that's probably a fundamental failure of the D language and explains some of the poor tooling around

[Issue 18683] std.containers.rbtree.RedBlackTree has opEquals but no toHash

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18683 vladvi...@gmail.com changed: What|Removed |Added CC||vladvi...@gmail.com

Re: Error about constructor calls in loops/labels, but there are no loops and labels?

2018-05-20 Thread Daniel N via Digitalmars-d
On Sunday, 20 May 2018 at 10:56:27 UTC, Yuxuan Shui wrote: On Sunday, 20 May 2018 at 00:05:39 UTC, Jonathan M Davis wrote: because it tends to become very difficult to get right in all cases and results in situations where the programmer is forced to do something in order to make the compiler

Re: Reserved 1.0.0

2018-05-20 Thread Paolo Invernizzi via Digitalmars-d-announce
On Sunday, 20 May 2018 at 09:15:12 UTC, Andrea Fontana wrote: On Sunday, 20 May 2018 at 07:33:39 UTC, Fra Mecca wrote: On Wednesday, 16 May 2018 at 08:38:05 UTC, Andrea Fontana wrote: I released another small library on behalf of the company I work for (http://lab.2night.it). It is called

Re: auto: useful, annoying or bad practice?

2018-05-20 Thread I love Ice Cream via Digitalmars-d
On Sunday, 20 May 2018 at 02:34:38 UTC, Neia Neutuladh wrote: The return type for range-oriented functions in std.algorithm is usually not terribly useful. So the first question that comes to my mind are what are the 'rules' of the output. Which is really what typing is. It's a series of

auto & class members

2018-05-20 Thread Robert M. Münch via Digitalmars-d-learn
I use the D RX lib [1] and can create a filtered stream using the auto keyword: struct a { SubjectObject!myType myStream; ??? mySubStream; } void myfunc(){ a myA = new a(); auto mySubStream = a.myStream.filter!(a => a == myMessage); ... } The problem

Re: Error about constructor calls in loops/labels, but there are no loops and labels?

2018-05-20 Thread Yuxuan Shui via Digitalmars-d
On Sunday, 20 May 2018 at 00:05:39 UTC, Jonathan M Davis wrote: because it tends to become very difficult to get right in all cases and results in situations where the programmer is forced to do something in order to make the compiler shut up Well, doesn't this post show exactly this problem,

[Issue 18819] DMD compilation crash

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18819 Nathan S. changed: What|Removed |Added See Also|

[Issue 18871] DMD "illegal hardware instruction" crash

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18871 Nathan S. changed: What|Removed |Added CC|

Re: vibe.d 0.7.33 maintenance release

2018-05-20 Thread Sönke Ludwig via Digitalmars-d-announce
Am 18.05.2018 um 16:00 schrieb Seb: On Friday, 18 May 2018 at 13:46:45 UTC, Márcio Martins wrote: On Wednesday, 16 May 2018 at 08:48:15 UTC, Sönke Ludwig wrote: Being the final public release on the 0.7.x branch, this version on DMD 2.068.2 up to DMD 2.080.0 and LDC 1.9.0. It includes some

[Issue 18819] DMD compilation crash

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18819 Mike Franklin changed: What|Removed |Added CC||slavo5...@yahoo.com

[Issue 18885] New: statfs struct was changed in FreeBSD 12

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18885 Issue ID: 18885 Summary: statfs struct was changed in FreeBSD 12 Product: D Version: D2 Hardware: x86_64 OS: FreeBSD Status: NEW Severity: major

Re: Can I infer the type from this?

2018-05-20 Thread Alex via Digitalmars-d-learn
On Sunday, 20 May 2018 at 03:16:39 UTC, Dr.No wrote: Oh, my bad: I totally forgot a crucial thing on question: I want this to work with a static member, for example, call myTemp like this myTemp!(C.a) I don't mind if I to pass the type as parameter somehow, like myTemp!(C, C.a) or

[Issue 18826] [inline asm] Wrongcode for mov

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18826 Stefan Koch changed: What|Removed |Added Priority|P1 |P2

Re: auto & class members

2018-05-20 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, May 20, 2018 16:30:10 Robert M. Münch via Digitalmars-d-learn wrote: > I use the D RX lib [1] and can create a filtered stream using the auto > keyword: > > struct a { > SubjectObject!myType myStream; > ??? mySubStream; > } > > void myfunc(){ > a myA = new a(); > > auto

[Issue 18882] __gshared not displaying in debuginfo

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18882 --- Comment #4 from Rainer Schuetze --- The debug info contains the "pretty" name, i.e. the fully qualified name, even for extern(C++) symbols. Otherwise you would have to guess the linkage and type as it is part of the mangled

[Issue 18884] New: getSymbolsByUDA fails on AliasSeq members

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18884 Issue ID: 18884 Summary: getSymbolsByUDA fails on AliasSeq members Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression

[Issue 18846] VisualD - show vtable in debugger

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18846 --- Comment #4 from Rainer Schuetze --- It seems I've messed up the defaults between Visual D and mago: you have to enable it in Tools->Options->Debugger->Mago. I think that being disabled is actually the better default as the

Re: Override member variables

2018-05-20 Thread Gheorghe Gabriel via Digitalmars-d
On Sunday, 20 May 2018 at 03:02:28 UTC, KingJoffrey wrote: On Saturday, 19 May 2018 at 18:09:56 UTC, Gheorghe Gabriel wrote: And of course, you cannot override private members. wtf! what do you mean we cannot override private members! I mean: module base; class Base { protected int x

Re: Examples/tutorials for OpenGL games which works out-of-the-box on linux

2018-05-20 Thread rikki cattermole via Digitalmars-d-learn
On 20/05/2018 8:06 PM, Prokop Hapala wrote: Hi, I'm looking for examples of OpenGL games which I can use as templates for making my own stuff. But I'm quite discouraged that everything I found on github is probably outdated and fails to compile. Since I'm not very familiar with dub

[Issue 18882] __gshared not displaying in debuginfo

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18882 --- Comment #3 from Manu --- Hmm... yeah, that's unfortunate. I don't understand why it's hard to resolve the name. It's extern(C++), and it has no namespace supplied, so the correct symbol name should just be the mangled name,

[Issue 18879] !is doesn't highlight correctly

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18879 --- Comment #3 from Rainer Schuetze --- The distinction matters if keywords and operators are supposed to show different colors. --

Re: Reserved 1.0.0

2018-05-20 Thread Fra Mecca via Digitalmars-d-announce
On Wednesday, 16 May 2018 at 08:38:05 UTC, Andrea Fontana wrote: I released another small library on behalf of the company I work for (http://lab.2night.it). It is called "reserved", and it's a small library you can use to run your D webpages/service. It is focused on simplicity (no

Examples/tutorials for OpenGL games which works out-of-the-box on linux

2018-05-20 Thread Prokop Hapala via Digitalmars-d-learn
Hi, I'm looking for examples of OpenGL games which I can use as templates for making my own stuff. But I'm quite discouraged that everything I found on github is probably outdated and fails to compile. Since I'm not very familiar with dub environment I don't feel able to correct the errors

[Issue 18882] __gshared not displaying in debuginfo

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18882 --- Comment #2 from Rainer Schuetze --- See also issue 11024: there is no information about imports in the debug informations so you don't know which symbols are visible in the current scope and what their qualified name is. In

[Issue 18846] VisualD - show vtable in debugger

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18846 --- Comment #5 from Manu --- Even if we can't see the symbol names, seeing the pointers might help matching values and confirm function order against C++ code that you can also see in the debugger. --

[Issue 18879] !is doesn't highlight correctly

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18879 --- Comment #4 from Manu --- Oh? I didn't know they did... they're all blue by default on my setup :) --

Re: C style callbacks fix for member callbacks

2018-05-20 Thread MGW via Digitalmars-d-learn
On Saturday, 19 May 2018 at 23:52:58 UTC, IntegratedDimensions wrote: I have a member callback that I want to use as a C callback. http://www.agner.org/optimize/calling_conventions.pdf https://www.youtube.com/watch?v=xhDS377mAc4

[Issue 18846] VisualD - show vtable in debugger

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18846 --- Comment #6 from Rainer Schuetze --- The build was ok, I just looked at the class instance before it was initialized. I've now added symbol names (no demangling yet). One gotcha: if you are linking with /INCREMENTAL, the

Mysql query result access by field name

2018-05-20 Thread ipkwena via Digitalmars-d-learn
I have started learning D and I am enjoying it so far. How does one access the columns fields in a Mysql query results by the column name. Currently I have to use the method as shown in a couple of example by indexing array values (f being a struct variable): Data f; f.name

Re: C style callbacks fix for member callbacks

2018-05-20 Thread IntegratedDimensions via Digitalmars-d-learn
On Sunday, 20 May 2018 at 08:40:57 UTC, MGW wrote: On Saturday, 19 May 2018 at 23:52:58 UTC, IntegratedDimensions wrote: I have a member callback that I want to use as a C callback. http://www.agner.org/optimize/calling_conventions.pdf https://www.youtube.com/watch?v=xhDS377mAc4 Sorry, I

http://asm.dlang.org/ needs updating

2018-05-20 Thread IntegratedDimensions via Digitalmars-d
load and save are not working, an example is always compiled in. No code in the input box still shows examples code in the disassembly.

[Issue 1578] Allow AA literals to initialize static variables

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1578 Ethan Watson changed: What|Removed |Added CC||goober...@gmail.com ---

Re: Help with DMD internals

2018-05-20 Thread Manu via Digitalmars-d
On 20 May 2018 at 12:28, Manu wrote: > > [...] Then... next up, extern(C++) classes need to place __xdtor in the vtable (posix uses 2 slots). We need the vtable to match naturally, without advising people to add a dummy method. I also have a hack in progress to support

Re: auto: useful, annoying or bad practice?

2018-05-20 Thread Neia Neutuladh via Digitalmars-d
On Sunday, 20 May 2018 at 14:35:21 UTC, I love Ice Cream wrote: On Sunday, 20 May 2018 at 02:34:38 UTC, Neia Neutuladh wrote: D is very hard to make an IDE for that would actually tell you what type the return value is. This might sound a little hard, but that's probably a fundamental

Re: http://asm.dlang.org/ needs updating

2018-05-20 Thread Walter Bright via Digitalmars-d
On 5/20/2018 9:47 AM, IntegratedDimensions wrote: load and save are not working, an example is always compiled in. No code in the input box still shows examples code in the disassembly. Please post bug reports to https://issues.dlang.org/

Re: Convert mixin to function call

2018-05-20 Thread IntegratedDimensions via Digitalmars-d-learn
https://dpaste.dzfl.pl/fb49bf834cff import std.stdio; auto Q(string A)() { auto foo() { auto d = mixin(Z!(A)()); return d; } return foo()(); } auto X(string A, string N)() { return N~" = (() { int y = 4; return "~A~" + y

[Issue 18879] !is doesn't highlight correctly

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18879 --- Comment #5 from Rainer Schuetze --- Actually never implemented in the "new" parser that is now used for about 5 years. I've added it now and preview should be available in a couple of minutes here:

Re: Found on proggit: simple treap language benchmark, includes D

2018-05-20 Thread Nerve via Digitalmars-d
On Saturday, 19 May 2018 at 15:09:38 UTC, Joakim wrote: D does well, comes in second on Mac/Win/linux: https://github.com/frol/completely-unscientific-benchmarks https://www.reddit.com/r/programming/comments/8jbfa7/naive_benchmark_treap_implementation_of_c_rust/ The results in these tests are

[Issue 18886] New: Explicitly invoking super.__ctor in a constructor does not count as calling a super constructor

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18886 Issue ID: 18886 Summary: Explicitly invoking super.__ctor in a constructor does not count as calling a super constructor Product: D Version: D2 Hardware: x86 OS:

Re: auto & class members

2018-05-20 Thread Robert M. Münch via Digitalmars-d-learn
On 2018-05-20 14:49:59 +, Jonathan M Davis said: In cases like this, typeof is your friend. e.g. something like typeof(myStream.filter!(a => a == myMessage)) mySubStream; Hi Jonathan, great! This got me a step further. So I can declare my member now. But I get an implict cast error when

[Issue 18234] [REG 2.075] Case of link failure when a program is compiled against a static lib

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18234 David Nadlinger changed: What|Removed |Added CC||c...@klickverbot.at

[Issue 18879] !is doesn't highlight correctly

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18879 --- Comment #6 from Manu --- Added distinct colour, or fixes for !is/!in? :) --

[Issue 18846] VisualD - show vtable in debugger

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18846 --- Comment #7 from Manu --- Haha, oh man. Everything is always so hard! ;) I turned it off and everything works great! Sadly, /INCREMENTAL is overwhelmingly common, and also the default... basically nobody will ever turn that

Convert mixin to function call

2018-05-20 Thread IntegratedDimensions via Digitalmars-d-learn
I have a string mixin that returns a value or function that uses the mixed in scope. Currently I have to wrap the mixin in a delegate or local function as to be able to get the value: int x = 3; int y = 1; auto foo() { mixin(X!("x")); } This allows the the mixin to see the scope but keep

Re: Convert mixin to function call

2018-05-20 Thread IntegratedDimensions via Digitalmars-d-learn
Also, one thing that would help would be able to create identifier names that are unique to avoid collisions. Does D have any ability to do such a thing?

[Issue 18846] VisualD - show vtable in debugger

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18846 --- Comment #8 from Manu --- I just noticed a minor issue... Mago is displaying hex with A-F in CAPS. VS debugger displays hex with a-f in lower case. I'm finding it surprisingly jarring when calling in/out of D, because a

[Issue 18887] inout badly described

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18887 Bolpat changed: What|Removed |Added Hardware|x86 |All

[Issue 18887] New: inout badly described

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18887 Issue ID: 18887 Summary: inout badly described Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: enhancement Priority: P1

[Issue 18846] VisualD - show vtable in debugger

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18846 --- Comment #9 from Manu --- Also, another super-minor detail. In C++, it shows the derived type member at the top, then __vfptr (ie, first member), then the normal member listing. In Mago, it's showing __vfptr at the top, then

Re: Help with DMD internals

2018-05-20 Thread Walter Bright via Digitalmars-d
On 5/20/2018 12:28 PM, Manu wrote: I've started digging at some surfac-ey extern(C++) issues. I've improved the definition of how construction works, such as when the .init happens, in the spec. https://dlang.org/spec/class.html#constructors > Is __xdtor **always** present? No. If it's

Re: Convert mixin to function call

2018-05-20 Thread IntegratedDimensions via Digitalmars-d-learn
It should be obvious that these are simplifications. I can't pass the variables directly as parameters as in the real case the names may only be partially specified.

[Issue 18884] getSymbolsByUDA fails on AliasSeq members

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18884 Simen Kjaeraas changed: What|Removed |Added CC|

Re: GDC Explorer - an online disassembler for D

2018-05-20 Thread IntegratedDimensions via Digitalmars-d
On Friday, 21 September 2012 at 03:46:12 UTC, Andrei Alexandrescu wrote: I've met Matt Goldbolt, the author of the GCC Explorer at http://gcc.godbolt.org - a very handy online disassembler for GCC. We got to talk a bit about D and he hacked together support for D by using gdc. Take a look at

Re: auto & class members

2018-05-20 Thread Robert M. Münch via Digitalmars-d-learn
On 2018-05-20 17:40:39 +, Robert M. Münch said: Hi Jonathan, great! This got me a step further. So I can declare my member now. But I get an implict cast error when I try: class a { ... myStream; } class b { typeof(a.myStream.filter!(x => x == myMessage)) mySubStream; }

Help with DMD internals

2018-05-20 Thread Manu via Digitalmars-d
I've started digging at some surfac-ey extern(C++) issues. First up, I desperately want a document that describes D's precise construction/destruction rules; there are a bunch of generated functions, they get called, in what order, and under what conditions? Construction: What is the order of

[Issue 18819] DMD compilation crash

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18819 ag0aep6g changed: What|Removed |Added CC||ag0ae...@gmail.com ---

[Issue 18234] [REG 2.075] Case of link failure when a program is compiled against a static lib

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18234 --- Comment #2 from Basile B. --- There's some progress, using -allinst solves the problem --- if [ ! -d "iz" ]; then git clone https://www.github.com/BBasile/iz.git fi cd iz git checkout v0.6.4 cd scripts sh compile.sh cd ../

[Issue 18888] New: extern(C++) template arg/alias arg mangling issue

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1 Issue ID: 1 Summary: extern(C++) template arg/alias arg mangling issue Product: D Version: D2 Hardware: All OS: Windows Status: NEW Severity: normal

[Issue 18888] extern(C++) template arg/alias arg mangling issue

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1 Manu changed: What|Removed |Added Keywords||C++, industry --

Re: Help with DMD internals

2018-05-20 Thread Walter Bright via Digitalmars-d
On 5/20/2018 12:28 PM, Manu wrote: Is re-initialisation to 'init' part of destruction, No. or is it a separate post-process? (I feel it's a post-process) Yes, and only for delete.

A pattern I'd like to see more of - Parsing template parameter tuples

2018-05-20 Thread Ethan via Digitalmars-d
Code for context: https://github.com/GooberMan/binderoo/blob/master/binderoo_client/d/src/binderoo/util/enumoptions.d Something struck me at DConf. I was watching the dxml talk and hearing about all these things that weren't being implemented for one reason or another. And I was thinking,

Re: C style callbacks fix for member callbacks

2018-05-20 Thread ag0aep6g via Digitalmars-d-learn
On 05/20/2018 06:48 PM, IntegratedDimensions wrote: alias callback = extern(C) int function(const(void) a, void *b, uint c, void* context); (I'm assuming that `a` is supposed to be a `const(void)*`.) Where context acts as this. I would like to assign a D method to this callback. class {   

Re: A pattern I'd like to see more of - Parsing template parameter tuples

2018-05-20 Thread Neia Neutuladh via Digitalmars-d
On Monday, 21 May 2018 at 00:13:26 UTC, Ethan wrote: Code for context: https://github.com/GooberMan/binderoo/blob/master/binderoo_client/d/src/binderoo/util/enumoptions.d This looks good. One small caveat: alias DocumentType = SomeDocument!(ObjectVersion._1_0, ObjectEncoding.UTF8); alias

Re: Help with DMD internals

2018-05-20 Thread Manu via Digitalmars-d
On 20 May 2018 at 17:14, Walter Bright via Digitalmars-d wrote: > On 5/20/2018 12:28 PM, Manu wrote: >> >>Is re-initialisation to 'init' part of destruction, > > > No. > >> or is it a >> separate post-process? (I feel it's a post-process) > > > Yes, and only for

Re: C style callbacks fix for member callbacks

2018-05-20 Thread IntegratedDimensions via Digitalmars-d-learn
On Sunday, 20 May 2018 at 23:05:47 UTC, ag0aep6g wrote: On 05/20/2018 06:48 PM, IntegratedDimensions wrote: alias callback = extern(C) int function(const(void) a, void *b, uint c, void* context); (I'm assuming that `a` is supposed to be a `const(void)*`.) Where context acts as this. I

Re: A pattern I'd like to see more of - Parsing template parameter tuples

2018-05-20 Thread Manu via Digitalmars-d
I don't really like that SomeObject() will be instantiated a crap load of times for every possible combination and order of options that a user might want to supply. How do you control the bloat in a way that people won't mess up frequently? On 20 May 2018 at 17:58, Neia Neutuladh via

[Issue 17035] extern(C) and extern(C++) module ctor/dtor should behave like the C init/fini functions

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17035 Manu changed: What|Removed |Added CC||turkey...@gmail.com --- Comment

[Issue 18889] New: Hovering over the alias of an enum doesn't show it's value

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18889 Issue ID: 18889 Summary: Hovering over the alias of an enum doesn't show it's value Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW

[Issue 18819] DMD compilation crash

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18819 --- Comment #5 from Mike Franklin --- > but I can't reproduce it locally from DMD-Head (Linux 64-bit). Disregard that; I had code for https://github.com/dlang/dmd/pull/8260 in my local copy. That being said

Re: A pattern I'd like to see more of - Parsing template parameter tuples

2018-05-20 Thread Paul Backus via Digitalmars-d
On Monday, 21 May 2018 at 00:13:26 UTC, Ethan wrote: But the functions, they're a bit trickier. So I made a new trait in Binderoo's traits module called ExtractTupleOf. The template prototype is the following: template ExtractTupleOf( alias TestTemplate, Symbols... ) That first parameter is

[Issue 18890] extern(C++) mangles all destructors the same

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18890 Manu changed: What|Removed |Added Keywords||C++, industry --

[Issue 18890] New: extern(C++) mangles all destructors the same

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18890 Issue ID: 18890 Summary: extern(C++) mangles all destructors the same Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: major

Re: C style callbacks fix for member callbacks

2018-05-20 Thread ag0aep6g via Digitalmars-d-learn
I tried this. Your code crashes in windows dmd x86 x64. Hm. Works for me in a virtual machine. But I'm not surprised that it's fragile. It might be completely wrong, and it just happens to look alright on my machine.

Re: auto: useful, annoying or bad practice?

2018-05-20 Thread Charles Hixson via Digitalmars-d
auto has its uses, but it's wildly overused, especially in library code and documentation, and really, really, *really* much so in documentation examples. On 05/01/2018 06:09 AM, Craig Dillabaugh via Digitalmars-d wrote: On Monday, 30 April 2018 at 21:11:07 UTC, Gerald wrote: I'll freely

CI buildbots

2018-05-20 Thread Manu via Digitalmars-d
This CI situation with the DMD/druntime repos is not okay. It takes ages... **hours** sometimes, for CI to complete. It's all this 'auto-tester' one, which seems to lock up on the last few tests. This makes DMD is a rather unenjoyable project to contribute to. I had a sudden burst of inspiration,

Re: Temporary file creation for unittests

2018-05-20 Thread Joakim via Digitalmars-d-learn
On Friday, 18 May 2018 at 15:16:52 UTC, Russel Winder wrote: Hi, What's the current official position on how to create temporary files for use during a unittest. I found https://github.com/dlang/phobos/pull/5788 but it seems to be languishing in the "we have discussed all the issues that

Re: Sealed classes - would you want them in D? (v2)

2018-05-20 Thread KingJoffrey via Digitalmars-d
On Sunday, 20 May 2018 at 11:19:01 UTC, Dave Jones wrote: On Sunday, 20 May 2018 at 02:45:25 UTC, KingJoffrey wrote: On Saturday, 19 May 2018 at 17:38:48 UTC, Gheorghe Gabriel wrote: But in D, everything is your friend - you don't get to manage You want to be taken seriously and yet you

Re: Sealed classes - would you want them in D? (v2)

2018-05-20 Thread KingJoffrey via Digitalmars-d
On Saturday, 19 May 2018 at 21:25:37 UTC, 0xEAB wrote: I wouldn't consider putting classes into own modules a workaround. In my opinion it's more or less the solution. I'll add your solution into my article - but, I'm not sure it really addresses my problem statement. The Problem

Re: A pattern I'd like to see more of - Parsing template parameter tuples

2018-05-20 Thread Dmitry Olshansky via Digitalmars-d
On Monday, 21 May 2018 at 01:53:20 UTC, Manu wrote: I don't really like that SomeObject() will be instantiated a crap load of times for every possible combination and order of options that a user might want to supply. How do you control the bloat in a way that people won't mess up frequently?

[Issue 18891] New: extern(C++) destructor prototype should just link; not generate field/aggregate dtor

2018-05-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18891 Issue ID: 18891 Summary: extern(C++) destructor prototype should just link; not generate field/aggregate dtor Product: D Version: D2 Hardware: All OS: All