Re: Value closures (no GC allocation)

2017-05-29 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 29 May 2017 at 21:26:11 UTC, MakersF wrote: 1) Capture by value. This is the ability to have a lambda which behaves as expected in the example Vittorio showed That's a known bug in the implementation; it is supposed to work that way now. (Though the bug has been open for so long I

Re: Should out/ref parameters require the caller to specify out/ref like in C#?

2017-05-29 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 29 May 2017 at 08:40:27 UTC, ketmar wrote: yet i must say that using pointers in a code where they should be references makes me... nervous. it just doesn't feel right. but meh, i'll trade that (and safety, 'cause `&` is unsafe) for "call site ref indicator". So one win with dip100

Re: Destructor attribute inheritance, yea or nay?

2017-05-27 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 27 May 2017 at 10:11:38 UTC, Stanislav Blinov wrote: 3. Nobody actually cares. That's me. I think the @attribute mess is completely broken and mostly just ignore it. That said, I do agree with you: it SHOULD work like you describe if we want the @attributes to be meaningful.

Re: Value closures (no GC allocation)

2017-05-24 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 25 May 2017 at 03:30:38 UTC, Stanislav Blinov wrote: Captures, if any, should be explicit. That is all :) The current behavior is fine in most cases. The explicit by-value capture handles the remaining cases. By inference, adding capture syntax at all will also complicate the w

Re: Value closures (no GC allocation)

2017-05-24 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 24 May 2017 at 20:15:37 UTC, Vittorio Romeo wrote: If you're interested in contributing, please let me know and I'll add you as a collaborator. can i just edit it on the site? but a few comments: "Currently FunctionLiterals that capture their outer context (i.e. closures/delega

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

2017-05-24 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 24 May 2017 at 12:09:02 UTC, jmh530 wrote: Just wanted to say that I was glad you did this. It makes it that much easier to play around with your stuff. So you use the subpackages or try to use the top level thing? Also have you had trouble with the ~master vs tag thing? dub ju

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

2017-05-24 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 24 May 2017 at 04:14:39 UTC, rikki cattermole wrote: They can be removed, but that means projects stop being built hence not wanting to remove them. That old one hasn't actually even compiled for over a year - I still sometimes get bug reports that things don't build cuz of depr

Re: Runtime?

2017-05-24 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 24 May 2017 at 14:26:42 UTC, Wulfklaue wrote: Well, that sounds just silly. You can bypass it by doing an `extern(C)` main in D... but really, the 1 MB preallocation isn't much for small programs and for larger programs it will be used anyway, so you aren't actually losing anyt

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

2017-05-23 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 23 May 2017 at 21:21:45 UTC, Guillaume Piolat wrote: http://code.dlang.org/packages/arsd So actually, the dub thing for mine is http://code.dlang.org/packages/arsd-official/~master the other was a third party thing that is now obsolete (and imo this shows one of the weaknesses of

Re: Value closures (no GC allocation)

2017-05-21 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 21 May 2017 at 20:09:14 UTC, Stanislav Blinov wrote: is a function that is generated by the template. It accesses the frame of create(). Am I missing something? It does access the frame, but only long enough to copy the values into the struct there's no reason for that to alloca

Re: Value closures (no GC allocation)

2017-05-21 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 21 May 2017 at 19:11:46 UTC, Stanislav Blinov wrote: Looks cool, but it'd still want a GC closure, won't it? No, it just generates the same struct you'd write manually. That should work fine with @nogc now.

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

2017-05-21 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 21 May 2017 at 05:52:11 UTC, Ecstatic Coder wrote: * the following *standard* libraries : Suppose I made a dmd distribution with my libraries pre-packaged (I already have libraries for most the stuff you listed)... would that work for you? Or must it come from the dlang.org site an

Re: Value closures (no GC allocation)

2017-05-21 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 21 May 2017 at 04:08:04 UTC, Vittorio Romeo wrote: This exact statement applied to C++ before C++11, but the introduction of lambda expression significantly changed the way people write and think about C++. Sometimes syntactic sugar can have huge impact on a language. Oh absolutely

Re: Why: error("multiple ! arguments are not allowed");

2017-05-21 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 21 May 2017 at 13:08:18 UTC, Adam D. Ruppe wrote: If I comment that line and use the hacked dmd, it seems to work. Well, not exactly work, it didn't actually instantiate the inner template like it probably should have. So is it just not implemented correctly and became an error b

Why: error("multiple ! arguments are not allowed");

2017-05-21 Thread Adam D. Ruppe via Digitalmars-d
Why is that prohibited? I just wrote template foo(x) { template foo(y) {}} and did foo!(x)!y and it triggered that error. If I comment that line and use the hacked dmd, it seems to work. So why is that error there?

Re: Value closures (no GC allocation)

2017-05-20 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 21 May 2017 at 00:49:23 UTC, Stanislav Blinov wrote: And it would be nice to be able to store the delegate longer than current scope... Important to note that this thing won't be a delegate, since delegates don't have room to store by-value captures. It can still be passed to isCal

Re: Value closures (no GC allocation)

2017-05-20 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 21 May 2017 at 00:33:30 UTC, Vittorio Romeo wrote: auto bar(T)(T x) @nogc Make that `scope T x` and it will compile, using stack allocation. Only worry is that you must not escape a reference to the delegate; you are only allowed to use it in that function's scope. What are

Re: DIP 1008 Preliminary Review Round 1

2017-05-19 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 19 May 2017 at 19:46:07 UTC, nkm1 wrote: I like this proposal... But it looks like people are concerned about 'new' becoming contextual keyword (that in some contexts it allocates with GC and in others it does something else) It *already* does that. `new` can be overloaded and modif

Re: Json in D: clean, simple API

2017-05-11 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 11 May 2017 at 20:56:09 UTC, aberba wrote: Something like this is exactly what I'm talking about. Vibe.data.json also has: // using piecewise construction Json j2 = Json.emptyObject; j2["field1"] = "foo"; j2["field2"] = 42.0; j2["field3"] = true; Yeah, mine can do that too, just

Re: Json in D: clean, simple API

2017-05-11 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 11 May 2017 at 20:22:22 UTC, aberba wrote: With that i meant designing of a simple-clean api my jsvar.d works kinda similarly to javascript... though i wouldn't call it "clean" because it will not inform you of missing stuff. jsvar.d is here: https://raw.githubusercontent.com/a

Re: Json in D: clean, simple API

2017-05-11 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 11 May 2017 at 19:33:09 UTC, aberba wrote: Why does json seem hard in D What are you actually looking for?

Re: "I made a game using Rust"

2017-05-10 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 10 May 2017 at 15:50:06 UTC, Adrian Matoga wrote: In this simple case above, I actually prefer DMD's messages, as there's simply less text for my eyes to read and brain to parse, so I can quickly spot where the problem is. Well, even here, I'd prefer a small tweak: lll.d(6): Er

Re: "I made a game using Rust"

2017-05-10 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 10 May 2017 at 14:02:38 UTC, Adrian Matoga wrote: Would you mind giving some examples? What bothers me on a regular basis is overloading. Basic case: $ dmd lll lll.d(6): Error: none of the overloads of 'foo' are callable using argument types (int, double), candidates are: lll.d

Re: "I made a game using Rust"

2017-05-10 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 10 May 2017 at 12:52:34 UTC, JN wrote: I wonder, would it be possible for D in the current state to achieve the same? I imagine iOS isn't possible yet and Android is just getting there? Probably about the same, the author mostly complains about immature libraries for mobile and

Re: reasoning of evaluating code after return in current block (static if return)

2017-05-07 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 7 May 2017 at 22:34:14 UTC, bastien penavayre wrote: Why is the code following "return true" evaluated ? It isn't evaluated, it is just compiled. The compile happens before it is run, so it doesn't really know if it is reachable yet. ClLinearExpression opBinary(string op) (doubl

Re: DIP 1004 Preliminary Review Round 1

2017-05-02 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 2 May 2017 at 09:03:27 UTC, deadalnix wrote: 100% in favor of the constructor behavior change in case no constructor is in the derived class. I agree.

Re: multiple `alias this` suggestion

2017-04-21 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 21 April 2017 at 15:30:14 UTC, jmh530 wrote: alias m3, m2, m1 this; I thought they were deprecating the comma operator. That's not the comma operator.

Re: Compare boost::hana to D

2017-04-21 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 19 April 2017 at 18:02:46 UTC, Adrian Matoga wrote: [2] https://epi.github.io/2017/03/18/less_fun.html BTW in your D foreach, you could also have done `switch` void trigger(string event) { switch(event) { foreach (i, e; events) { case e: foreach (c;

Re: Interpolated strings

2017-04-20 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 20 April 2017 at 18:28:30 UTC, Atila Neves wrote: writeln($"{a} times 3 is {a * 3}"); is even marginally better than writeln(a, " times 3 is ", a * 3); // look ma, works right now! Matching up the correct commas and quotes is a bit of a pain in the latter. Though I don't thin

Re: The lost Group

2017-04-19 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 19 April 2017 at 20:07:48 UTC, Jolly James wrote: https://forum.dlang.org/group/D does not appear in the forum's index or sidebar. It is obsolete and should not be used for any new stuff anymore. That content now goes in "General" instead.

Re: Interpolated strings

2017-04-19 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 19 April 2017 at 12:03:47 UTC, Stefan Koch wrote: I really don't see how string interpolation is better then ` "The date is " ~ format("%04d", year)); ` That code is hideous, not hard to beat on every level... inefficient, hard to read. The built in thing could potentially opti

Re: Interpolated strings

2017-04-15 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 15 April 2017 at 23:11:42 UTC, Stanislav Blinov wrote: How about... it removes an import or two? It doesn't actually remove the dependency, it is just syntax sugar over it (there is precedent for this in the language, the pow operator calls a Phobos function, but it means you don

Re: Walter and Andrei and community relationship management

2017-04-13 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 10 April 2017 at 22:07:11 UTC, Walter Bright wrote: There are many. A random sampling: The vast, vast majority of the stuff I do in D though are for myself. I used to want to get more into Phobos, but I just don't care anymore - I prefer staying as an independent library other tha

Re: The D ecosystem in Debian with free-as-in-freedom DMD

2017-04-11 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 11 April 2017 at 21:08:05 UTC, Johannes Pfau wrote: I'd think of .d files as a superset of .di files. Note that there is zero difference between them. The compiler treats both *exactly* the same way (it just considers the extensions to be aliases of each other). It is just a nam

Re: Proposal 2: Exceptions and @nogc

2017-04-10 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 10 April 2017 at 23:16:48 UTC, Meta wrote: My knee jerk reaction is that it's a very bad thing that "new" means the same thing everywhere in the language (allocate and initialize some GC-managed memory), except for this one case. Actually, in addition to user defined overloads (whic

Re: What are we going to do about mobile?

2017-04-06 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 6 April 2017 at 05:24:07 UTC, Joakim wrote: There are only two devs working on mobile, Dan and me, I don't think anybody on the core team has even tried our work. I don't even own a mobile device and don't see that changing any time soon (they are really expensive, slow, and just

Re: Exceptions in @nogc code

2017-04-04 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 4 April 2017 at 09:45:14 UTC, Walter Bright wrote: 6. reducing the amount of GC garbage created is good, but does not solve the problem of "I don't want to use D because of the GC". I betcha D would be a better language with more users if you just told those people "sorry, it isn'

Re: Proposal: Exceptions and @nogc

2017-04-03 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 3 April 2017 at 21:31:39 UTC, Jonathan M Davis wrote: though the exception message poses a similar problem (especially if you'd normally construct it with format), and I don't know how you get around that other than not using anything more informative than string literals This is w

Re: Exceptions in @nogc code

2017-04-02 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 2 April 2017 at 18:16:43 UTC, Johannes Pfau wrote: I do not want GC _allocation_ for embedded systems (don't even want to link in the GC or GC stub code) ;-) Then don't use operator `new`... you're probably using some kind of custom druntime anyway.

Re: Exceptions in @nogc code

2017-04-01 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 1 April 2017 at 19:52:14 UTC, Eugene Wissner wrote: If I understand correctly exceptions are anyway special class objects. No, exceptions are just ordinary objects, they just happen to inherit from Throwable which is the interface the compiler requires for the `throw` statement.

Re: Exceptions in @nogc code

2017-04-01 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 1 April 2017 at 14:54:21 UTC, deadalnix wrote: The problem you want to address is not GC allocations, it is GC collection cycles. If everything is freed, then there is no GC problem. not only this, but this is the only way GC and nogc code will interact with each others. Amen. Mo

Re: More exception classes into Phobos?

2017-03-24 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 24 March 2017 at 19:38:14 UTC, H. S. Teoh wrote: Catching an Exception by message? That sounds like horrible code smell to me. Yes, it is. That's why I think exception strings are an antipattern. You should be making new classes, not new strings. But, D lets us have both worlds. C

Re: More exception classes into Phobos?

2017-03-23 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 23 March 2017 at 20:48:24 UTC, Jonathan M Davis wrote: And in cases like D scripts, it would be overkill to be forced to create your own exception types, so it would really annoying if you couldn't create Exceptions. Creating a new exception class is actually trivial in D, we cr

Re: More exception classes into Phobos?

2017-03-23 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 24 March 2017 at 00:28:16 UTC, Walter Bright wrote: The string is what gets printed to the user like: "your password has to have at least one upper case character in it" In general, such is not deducible from the type/arguments. Yes, of course they are. In the simplest case in

Re: More exception classes into Phobos?

2017-03-23 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 23 March 2017 at 19:47:29 UTC, Walter Bright wrote: Over time I've found that standardized Exception types seem to become less and less useful over just using "Exception" with an appropriate message. I'm of the firm belief that exceptions should NEVER have a string message - that

Re: Learning programming with D - optimizing the entry point / the environment?

2017-03-23 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 23 March 2017 at 18:25:55 UTC, H. S. Teoh wrote: And BTW, that was written for a text console, so the only library needed was a terminal control library (which in theory could be dispensed with, as you could just output the escape sequences yourself / call the OS console functions

Re: Learning programming with D - optimizing the entry point / the environment?

2017-03-23 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 23 March 2017 at 17:39:04 UTC, Kagamin wrote: How about a four-dimensional crawler? :) What is that?

Re: Learning programming with D - optimizing the entry point / the environment?

2017-03-23 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 23 March 2017 at 12:36:30 UTC, Martin Tschierschke wrote: Very important I think would be to add some graphics, especially to get the interests of kids, For example arsd.simpledisplay.d with its nice learning example Pong. Fun fact, I added Minesweeper to the example thing, and ne

Re: Non-conflicting derived class overload shadows base class method

2017-03-20 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 20 March 2017 at 19:57:03 UTC, H. S. Teoh wrote: Is this a bug? No, that's intentional, you have to merge the overload sets with alias, same as if you imported them from two separate modules. http://dlang.org/hijack.html

Re: Special Code String for mixins

2017-03-15 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 15 March 2017 at 13:50:28 UTC, Inquie wrote: I hate building code strings for string mixins as it's very ugly and seems like a complete hack. Me too, that's why I avoid doing it. Check out my tips of the week here: http://arsdnet.net/this-week-in-d/sep-20.html and here: http://a

Re: So no one is using Amazon S3 with D, why?

2017-03-14 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 14 March 2017 at 20:21:44 UTC, aberba wrote: Amazon S3 seem like a common solution for object storage these days[1] but I'm seeing almost no activity in this area (stable native D API). Why? I've done it before, but never posted the code in since it was just a quick and easy thing

Re: Nested struct sauses error

2017-03-12 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 12 March 2017 at 18:46:14 UTC, fantom wrote: Can anybody explain me what is wrong? Thanks easy fix is to likely make it a `static struct` even if nested. That will remove access to local variables of the function but should compile. The reason is that access to those local variab

Re: opIndex() may hide opSlice()

2017-03-10 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 10 March 2017 at 15:41:31 UTC, Jonathan M Davis wrote: Yeah, I've never understood how it made any sense for opIndex to be used for slicing, and I've never used it that way. Yeah, I just saw that yesterday in a Phobos type and was like "wtf did they misname it"... but it worked. H

Re: Better ddoc defaults?

2017-03-09 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 9 March 2017 at 21:43:00 UTC, Yuxuan Shui wrote: Also this page looks kind of broken? The text is unreadably small in places, not sure why. I just ran my file through dmd -D with the newest version, so I assume it is the new default macros. I don't use ddoc for myself though, I

Re: Better ddoc defaults?

2017-03-09 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 9 March 2017 at 21:08:17 UTC, Yuxuan Shui wrote: So why don't we make the defaults more beautiful? ddoc DID just recently get an overhaul... do your pages look like http://arsdnet.net/dcode/simpledisplay.html or like this http://arsdnet.net/ddoc/simpledisplay.html ?

Re: [Tidbit] making your D code more modular & unittestable

2017-03-08 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 8 March 2017 at 21:34:19 UTC, H. S. Teoh wrote: So I came up with an idea to abstract file contents as a random-access range of ubyte with lazy loading, so that I can rewrite file parsing code in the nice Sounds like what the kernel does when you memory-map a file...

Re: Let's kill the ddoc _name feature.

2017-03-06 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 6 March 2017 at 05:27:12 UTC, Jonathan M Davis wrote: My big problem with how it currently works with ddoc is it seems way too ad-hoc with regards to when something is highlighted or not. There's two rules: DDOC_PSYMBOL highlights any text that happens to match the current declarat

Re: Let's kill the ddoc _name feature.

2017-03-05 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 6 March 2017 at 04:32:45 UTC, Nick Sabalausky (Abscissa) wrote: And why don't I care? Oh, I agree. tbh my agenda here is more to reduce the merge conflict burden on my fork than to actually improve ddoc. I get sick of `git pull upstream master` eating an extra 5 minutes because HE

Re: A few notes on the ddox-based documentation

2017-03-05 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 5 March 2017 at 01:47:24 UTC, Andrei Alexandrescu wrote: http://dpldocs.info/experimental-docs/std.experimental.checkedint.html * There's code coloring in inline code, which is a bit distracting. Syntax highlighting should be ideally limited to code blocks. I just tried removing

Let's kill the ddoc _name feature.

2017-03-05 Thread Adam D. Ruppe via Digitalmars-d
Have you ever seen how _ddoc has a bunch of random names prefixed with underscores throughout the source? Or ever used _ddoc and found random words italicized? Take a gander at this old file I generated with `dmd -D simpledisplay.d` a long time ago: http://arsdnet.net/ddoc/simpledisplay.html

Re: A few notes on the ddox-based documentation

2017-03-04 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 5 March 2017 at 04:26:01 UTC, Seb wrote: https://github.com/dlang/phobos/pull/5185/commits/c092ce4fcd9e9a45961c41cf44676e76319b9c14 Ah, I actually commented on that one too! Yeah, neither $(D) or `` is desired on those. LREF alone should do it. (or $(D) alone does it on ddox and ad

Re: A few notes on the ddox-based documentation

2017-03-04 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 5 March 2017 at 03:13:46 UTC, Andrei Alexandrescu wrote: A pull request for "the competition" would be very much appreciated! https://github.com/dlang/dlang.org/pull/1600 that should be an improvement, though I didn't actually test it... is there an online preview for that?

Re: A few notes on the ddox-based documentation

2017-03-04 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 5 March 2017 at 03:14:14 UTC, Adam D. Ruppe wrote: So it illegally nested a link inside a link, which the browser interpreted as two adjacent links... and both got that padding-right from the rule I quoted in my last email, thus getting some blank space on the first row. On second

Re: A few notes on the ddox-based documentation

2017-03-04 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 5 March 2017 at 01:47:24 UTC, Andrei Alexandrescu wrote: * For some reason tables have the wrong penalties set up because they hyphenate type names in their left column (e.g. Pro-erCom-pare) which makes all tables look comically bad. I see what happened here too: ddox detected "Abor

Re: A few notes on the ddox-based documentation

2017-03-04 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 5 March 2017 at 01:47:24 UTC, Andrei Alexandrescu wrote: * There's code coloring in inline code, which is a bit distracting. Syntax highlighting should be ideally limited to code blocks. Yeah, I am coming around to agree with you on that too. I have been playing with my highlight c

Re: dpldocs: xlinking and Documented destructors and postblits

2017-03-04 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 1 March 2017 at 23:21:14 UTC, Seb wrote: @Adam: I like your docs as well! Have you ever considered adding vibe.d to them? I just ran the generator over them now (though I did NOT add them to the search index or the source listing so you can't search or view source, but you can n

Re: [NOTABLE PR] First step from traditional to generic runtime

2017-03-02 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 3 March 2017 at 02:59:57 UTC, rikki cattermole wrote: If we end up full on templated TypeInfo that would be lovely. TypeInfo_Class clasz = TypeInfo_ClassT!Foo; class TypeInfo_ClassT(T) if(is(T == class)) { version(FullReflection) { string[] methodNames() { ...

Re: Why opDispatch uses SFINAE implicitly?

2017-03-02 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 2 March 2017 at 06:40:29 UTC, Dukc wrote: If I define an opDispatch for something, but the call does not compile, the compiler currently behaves as if the opDispatch didn't exist at all. I think this is actually an accident of implementation, because when it was new, it actually

Re: dpldocs: xlinking and Documented destructors and postblits

2017-03-01 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 2 March 2017 at 00:06:17 UTC, Adam D. Ruppe wrote: Though it is important to note that adrdox does NOT support user-defined ddoc macros But, it DOES now support a footnote kind of thing. Behold: http://dpldocs.info/experimental-docs/test.html#footnotes In ddoc, I was tempted to d

Re: dpldocs: xlinking and Documented destructors and postblits

2017-03-01 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 1 March 2017 at 23:21:14 UTC, Seb wrote: https://github.com/dlang/phobos/pulls?utf8=%E2%9C%93&q=is%3Apr%20label%3Adocumentation%20 Most of these changes are independent from Ddoc/Ddox/Adrdox/..., so everyone should be able to enjoy cleaner documentation soon. Actually, almost n

Re: dpldocs: xlinking and Documented destructors and postblits

2017-03-01 Thread Adam D. Ruppe via Digitalmars-d
Seeing ddmd coming to dlang.org , just for fun I ran my doc generator over the dmd source code too: http://dpldocs.info/experimental-docs/ddmd.html I didn't enable search over it but you can browse to the extent that there are ddoc comments

Re: dpldocs: xlinking and Documented destructors and postblits

2017-03-01 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 1 March 2017 at 12:05:33 UTC, bachmeier wrote: If by "surrender", you mean adopt your system for the official documentation, well I sure hope not. That's a fast way to kill progress on anything related to this language. Yeah, I'd prolly have to continue working on it myself but t

Re: dpldocs: xlinking and Documented destructors and postblits

2017-03-01 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 1 March 2017 at 06:19:30 UTC, lobo wrote: Is it possible to use your tool to generate the docs for my own code? Yes, but I don't actually support it yet (you can grab the code from the link rikki gave but you're on your own). I work on this in between the other million things I

dpldocs: xlinking and Documented destructors and postblits

2017-02-28 Thread Adam D. Ruppe via Digitalmars-d
I stumbled across std.typecons.Unique in my doc website today and realized there was a postblit in the source, but I didn't display the documentation comment. Aghast at my awful bug, I immediately set out to fix it. Behold: http://dpldocs.info/experimental-docs/std.typecons.RefCounted.html#des

Re: opDispatch forwarding and ifti

2017-02-27 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 27 February 2017 at 14:27:21 UTC, Stefan Koch wrote: op-dispatch is a runtime feature. It takes a string which is avilable at compile-time and passes it as a runtime parameter. Completely false. It runs opDispatch!("the_string") which is totally compile time.

Re: Threads not garbage collected ?

2017-02-22 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 22 February 2017 at 14:51:24 UTC, Guillaume Piolat wrote: https://p0nce.github.io/d-idioms/#The-trouble-with-class-destructors eh, I think this is less a destructor issue and just that the thread is still running and thus not eligible for collection anyway - there's still a refe

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-15 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 15 February 2017 at 17:18:15 UTC, Seb wrote: Now as this same block is used > 30x in Phobos That tells me you already have an empirical clear win! If you wrote exactly the same thing 30x inside the functions, you'd move it out to a new function too. if (isSomeInputRangeChar!R

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-15 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 15 February 2017 at 16:20:30 UTC, Chris Wright wrote: The greatest annoyance is if I have to read through several files of phobos sources just to figure out why there's no matching overload for this function call that looks right to me. I really really REALLY REALLY wish the comp

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-15 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 15 February 2017 at 07:56:00 UTC, Jacob Carlborg wrote: Your documentation is an improvement but it doesn't help when reading the source code. Yeah, I think there's a few things we can do in the source too. We should find the common combinations and abstract them out, like I sai

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 14 February 2017 at 20:46:17 UTC, Walter Bright wrote: A further improvement in the documentation would be to add links to isBidirectionalRange and hasLvalueElements. Kneel before your god! http://dpldocs.info/experimental-docs/std.algorithm.mutation.remove.1.html Take a look at t

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 14 February 2017 at 19:08:53 UTC, bachmeier wrote: I am not familiar with all of the past discussion of this issue, but something that I have wondered is why we can't do something like alias fooConstraint = (s != SwapStrategy.stable You can do that, it would just be a helper func

Re: Best error msg ever

2017-02-09 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 10 February 2017 at 02:53:50 UTC, Era Scarecrow In cases like these i really wish the structure of the class/struct had a hash or something (based on source or struct layout or something) They do have different full names, which includes the module name and uniquely differentiates

Re: Database of practicality will be an important factor for development of D language in the future

2017-02-06 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 6 February 2017 at 14:17:39 UTC, FrankLike wrote: [Microsoft][ODBC SQL Server Driver]The connection is busy resulting in another hstmt Process one result before trying to do another query. If you need the data stored, you can do foreach and save the parts you want to an array (it r

Re: Database of practicality will be an important factor for development of D language in the future

2017-02-06 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 6 February 2017 at 12:30:11 UTC, FrankLike wrote: But mysqlnative.d is not good. idk, I have never used that one.

Re: Database of practicality will be an important factor for development of D language in the future

2017-02-02 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 2 February 2017 at 13:28:48 UTC, Shachar Shemesh wrote: Arguments should ALWAYS be passed out of line of the actual call command, so that the server has no chance of confusing arguments and commands. I know. That's exactly what my library does, and I assume all the others listed;

Re: Database of practicality will be an important factor for development of D language in the future

2017-02-02 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 2 February 2017 at 05:33:57 UTC, FrankLike wrote: For example, I want to do the execution of stored procedure for MSSql、MySQL database. I found in Mysql-d, Mysql-Native, arsd, DDBC, etc. there is no result. db.query("CALL my_procedure(args...)"); Should work with any libraries.

Re: memcpy() comparison: C, Rust, and D

2017-02-01 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 1 February 2017 at 21:31:33 UTC, Walter Bright wrote: What part of the signature guarantees non-overlap? At the rate D is going, pretty soon the entire function body will be retold in the signature. What's the point when it is obvious that in practice, we can actually analyze th

Re: Fix it for me!

2017-02-01 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 1 February 2017 at 15:21:38 UTC, Profile Anaysis wrote: Then make it optional. Simple as that. It is a JS fix on the client side, there's nothing stopping yo from just doing it yourself on your browser. In fact, I'd rather you completely disable the tab key if you I use tab

Re: Fix it for me!

2017-02-01 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 1 February 2017 at 07:46:03 UTC, Vladimir Panteleev wrote: I wish I could use "Content-type: text/markdown" without breaking Gmail etc. Yeah. You could do multipart/alternative with the markdown in text/plain and a rendered version in text/html though. Personally, I don't think

Re: Fix it for me!

2017-01-31 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 31 January 2017 at 14:56:32 UTC, cym13 wrote: That's not really the issue, the thing is this is not a forum, or not only. It's actually an interface to a mailing list and many people only use the mail so that provides only noise for Well, there's a few possibilities.. my preference

Re: `in` no longer same as `const ref`

2017-01-30 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 30 January 2017 at 00:26:27 UTC, Walter Bright wrote: I was afraid that by checking it, too much code would break. Code that was using it improperly was *already* broken. Now, the compiler will simply tell them, at compile time, why instead of letting it silently accept undefined b

Re: Catching Errors

2017-01-20 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 20 January 2017 at 17:00:12 UTC, Jacob Carlborg wrote: Unfortunately setting a new assert handler requires it to be nothrow [1]. WTF. I guess I see why, assert is assumed to be nothrow and used in those statically marked blocks, but ugh. AST macros :) Yeah, it could do it, but

Re: Catching Errors

2017-01-20 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 20 January 2017 at 07:50:23 UTC, Jacob Carlborg wrote: That doesn't work well with a unit test framework that want to catch assertions to be able to continue with other tests. I'd suggest writing a new assert handler for your framework that does something different, then you can get

Re: Catching Errors

2017-01-19 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 20 January 2017 at 01:24:18 UTC, Jon Degenhardt wrote: Is there a place in the docs that describe the difference between errors and exceptions? As to the particular example, why is it unsafe to recover from attempting to access memory past the end of the array, as long as the access

Re: Gui in D: I miss this project

2017-01-17 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 17 January 2017 at 13:46:21 UTC, Vadim Lopatin wrote: There is a workaround: it's possible to create DlangUI theme which looks like native OSX app. It usually isn't the theme, it is the little details of user interaction that the native ones get (though the theme is really hard to

Re: GSoC 2017 Ideas!

2017-01-14 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 15 January 2017 at 04:11:06 UTC, Craig Dillabaugh wrote: I've been trying to find something on this, but haven't yet, but I am not sure if website work would be considered appropriate. The website is still a program, and the ranking algorithm is, well, an algorithm, so it is code;

Re: GSoC 2017 Ideas!

2017-01-14 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 14 January 2017 at 16:12:43 UTC, Adam D. Ruppe wrote: but sorting by rating in search I'm sorry, that was a run on sentence. The big picture goal I'd like to see is that the package manager, or even a tutorial author for some topic, just take the choice away. Sure, you can ign

Re: GSoC 2017 Ideas!

2017-01-14 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 14 January 2017 at 15:54:46 UTC, Craig Dillabaugh wrote: What did you have in mind, new default language for the config file perhaps :o)? The website could use some work. Things that would make me hate it less (fyi, I don't actually use dub, but I sometimes try to keep packages u

Re: Error deducing function

2017-01-13 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 13 January 2017 at 22:22:12 UTC, Ignacious wrote: Like, which arguments actually pass and which ones fail, etc. Yes, I agree entirely. This would be a HUGE usability bonus, far better than most the other things people work on...

Re: Gui in D: I miss this project

2017-01-13 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 13 January 2017 at 20:11:08 UTC, Dukc wrote: Does not work on as many platforms as DlangUI, trough. Which platforms do dlangui work on? It's console feature is cool, I do that with terminal.d rather than simpledisplay.d. I guess the other difference is probably Mac, I only support

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