On Thursday, February 15, 2018 22:49:56 Alex via Digitalmars-d-learn wrote:
> Hi all,
> a short question about an old bug:
> https://issues.dlang.org/show_bug.cgi?id=11877
>
> Are there reasons, which speaks against this feature?
>
> And maybe another one, more general:
> Is there any place, where
On Thursday, February 15, 2018 23:22:17 Adam D. Ruppe via Digitalmars-d-
learn wrote:
> On Thursday, 15 February 2018 at 23:20:42 UTC, Jonathan M Davis
>
> wrote:
> > The only overloaded operator that I'd expect to work as static
> > would be opCall, which I expect works primarily because of
> > fu
Does anyone know if there's a way to append to a ddoc macro instead of
replacing it?
For instance, dlang.org has the EXTRA_HEADERS macro for adding extra stuff
to the header of a web page, and it uses that with several pages defining
EXTRA_HEADERS to add headers to that specific page. I have somet
On Sunday, February 18, 2018 19:10:02 Tofu Ninja via Digitalmars-d-learn
wrote:
> What is __traits(isFuture)? The language documents says it tests
> for @future which doesn't really help as @future is undocumented.
https://github.com/dlang/DIPs/blob/master/DIPs/DIP1007.md
- Jonathan M Davis
On Monday, February 19, 2018 07:25:07 Nicholas Wilson via Digitalmars-d-
learn wrote:
> On Monday, 19 February 2018 at 07:08:49 UTC, Fra Mecca wrote:
> > Is there a way to avoid using to! conversion here?
> >
> > immutable string[] dst = to!(immutable
> > string[])(array(pipe.readEnd.byLineCopy));
On Monday, February 19, 2018 11:43:26 psychoticRabbit via Digitalmars-d-
learn wrote:
> So I finally got around to building from source.
>
> I have builds working just fine on a variety of linux machines,
> it's just a FreeBSD problem I'm having.
>
> So, on FreeBSD, I can build the dmd directory, a
On Monday, February 19, 2018 14:41:21 Seb via Digitalmars-d-learn wrote:
> On Monday, 19 February 2018 at 12:01:31 UTC, Jonathan M Davis
>
> wrote:
> > On Monday, February 19, 2018 11:43:26 psychoticRabbit via
> >
> > Digitalmars-d- learn wrote:
> >> [...]
> >
> > I've never been able to figure thi
On Tuesday, February 20, 2018 08:44:37 aberba via Digitalmars-d-learn wrote:
> On Sunday, 18 February 2018 at 15:23:14 UTC, Cym13 wrote:
> > On Sunday, 18 February 2018 at 14:48:59 UTC, Cym13 wrote:
> >> [...]
> >
> > Just thought of a much better/simpler solution for that last
> > case that also d
On Wednesday, February 21, 2018 02:59:21 Nicholas Wilson via Digitalmars-d-
learn wrote:
> On Tuesday, 20 February 2018 at 15:32:45 UTC, Chris M. wrote:
> > Thanks for the info, that clears things up. Like I said, it was
> > more experimentation rather than me planning to actually use
> > it. Works
On Wednesday, February 21, 2018 09:21:58 0x via Digitalmars-d-learn
wrote:
> What is the equivalent of C++17 std::string_view (an object that
> can refer to a constant contiguous sequence of char-like objects
> with the first element of the sequence at position zero) in D?
>
> PS: I'm gett
On Wednesday, February 21, 2018 10:17:55 0x via Digitalmars-d-learn
wrote:
> On Wednesday, 21 February 2018 at 09:21:58 UTC, 0x wrote:
> > What is the equivalent of C++17 std::string_view (an object
> > that can refer to a constant contiguous sequence of char-like
> > objects with
On Friday, February 23, 2018 01:54:07 Leonardo via Digitalmars-d-learn
wrote:
> Hi, I'm new to language and games.
> Many people say that GC is bad and can slow down your project in
> some moments.
> What can happen if I create a game using D without worrying with
> memory management?
> (using ful
On Saturday, February 24, 2018 02:54:13 Jonathan via Digitalmars-d-learn
wrote:
> I am having trouble finding many useful explanations of using
> template constraints beyond basic usage.
>
> I would like to have a template constrant to enforce that a type
> can be explicitly cast to another type:
On Saturday, February 24, 2018 03:04:53 psychoticRabbit via Digitalmars-d-
learn wrote:
> On Saturday, 24 February 2018 at 02:54:13 UTC, Jonathan wrote:
> > I am having trouble finding many useful explanations of using
> > template constraints beyond basic usage.
> >
> > I would like to have a temp
On Saturday, February 24, 2018 03:30:45 psychoticRabbit via Digitalmars-d-
learn wrote:
> On Saturday, 24 February 2018 at 02:54:13 UTC, Jonathan wrote:
> > I am having trouble finding many useful explanations of using
> > template constraints beyond basic usage.
> >
> > I would like to have a temp
On Saturday, February 24, 2018 03:48:44 psychoticRabbit via Digitalmars-d-
learn wrote:
> On Saturday, 24 February 2018 at 03:43:25 UTC, Jonathan M Davis
>
> wrote:
> > That does not do what the OP requested at all. That tests
> > whether T is one of byte, ubyte, short, ushort, int, uint,
> > long,
On Saturday, February 24, 2018 04:13:30 psychoticRabbit via Digitalmars-d-
learn wrote:
> On Saturday, 24 February 2018 at 03:58:48 UTC, Jonathan M Davis
>
> wrote:
> > Whether an implicit cast or an explicit cast makes more sense
> > depends entirely on what the code is doing, but either way, the
On Saturday, February 24, 2018 04:33:52 psychoticRabbit via Digitalmars-d-
learn wrote:
> On Saturday, 24 February 2018 at 04:22:12 UTC, Jonathan M Davis
>
> wrote:
> > Why is there anything dodgy going on and why would you need
> > contracts? Contracts actually tend to go very badly with
> > gener
On Sunday, February 25, 2018 00:36:16 kdevel via Digitalmars-d-learn wrote:
> A code fragment using static foreach
>
> https://forum.dlang.org/thread/jiefcxwqbjzqnmtaz...@forum.dlang.org#post-b
> eruryblsptnunsowjph:40forum.dlang.org
>
> does not compile with the current GDC (GCC 4.9.4 and 5.5.0).
On Sunday, February 25, 2018 01:49:05 Seb via Digitalmars-d-learn wrote:
> On Tuesday, 20 February 2018 at 08:44:37 UTC, aberba wrote:
> > On Sunday, 18 February 2018 at 15:23:14 UTC, Cym13 wrote:
> >> On Sunday, 18 February 2018 at 14:48:59 UTC, Cym13 wrote:
> >>> [...]
> >>
> >> Just thought of a
On Sunday, February 25, 2018 02:58:33 Seb via Digitalmars-d-learn wrote:
> On Sunday, 25 February 2018 at 02:37:00 UTC, Jonathan M Davis
>
> wrote:
> > If any exceptions could be thrown, then a lazy solution can't
> > be @nogc (something that's often the case with strings thanks
> > to auto-decodin
On Sunday, February 25, 2018 05:24:54 psychoticRabbit via Digitalmars-d-
learn wrote:
> Hi. Anyone know whether something like this is possible?
>
> I've tried various conversions/casts, but no luck yet.
>
> Essentially, I want to cast the result set of the iota to an
> array, during initialisation
On Sunday, February 25, 2018 06:22:03 psychoticRabbit via Digitalmars-d-
learn wrote:
> On Sunday, 25 February 2018 at 05:40:19 UTC, Jonathan M Davis
>
> wrote:
> > int[] intArr = iota(1, 11).array();
> >
> > - Jonathan M Davis
>
> thanks!
>
> oh man. It's so easy to do stuff in D ;-)
>
> But
On Monday, February 26, 2018 12:30:24 ParticlePeter via Digitalmars-d-learn
wrote:
> mixin template Common() {
>private int m_member;
>this( int m ) { m_member = m; }
> }
>
> struct Foo {
>mixin Common;
> }
>
> struct Bar {
>mixin Common;
>this( int m, float n ) { m_member = m
On Monday, February 26, 2018 16:04:59 H. S. Teoh via Digitalmars-d-learn
wrote:
> On Mon, Feb 26, 2018 at 11:34:06PM +, psychoticRabbit via
> Digitalmars-d-learn wrote: [...]
>
> > and what's going on here btw?
> >
> > assert( 1 == 1.01 ); // assertion error in DMD but not
> >
On Monday, February 26, 2018 17:49:21 H. S. Teoh via Digitalmars-d-learn
wrote:
> On Tue, Feb 27, 2018 at 12:26:56AM +, psychoticRabbit via Digitalmars-
d-learn wrote:
> > On Tuesday, 27 February 2018 at 00:04:59 UTC, H. S. Teoh wrote:
> > > A 64-bit double can only hold about 14-15 decimal di
On Monday, February 26, 2018 18:33:13 H. S. Teoh via Digitalmars-d-learn
wrote:
> Well, the way I deal with floating point is, design my code with the
> assumption that things will be inaccurate, and compensate accordingly.
The way that I usually deal with it is to simply not use floating point
n
On Wednesday, February 28, 2018 14:28:47 bauss via Digitalmars-d-learn
wrote:
> On Wednesday, 28 February 2018 at 13:38:56 UTC, drug wrote:
> > done https://issues.dlang.org/show_bug.cgi?id=18539
>
> I would argue that isn't a regression and that you __should__ use
> the .get and that it's not a w
On Thursday, March 01, 2018 10:55:34 Steven Schveighoffer via Digitalmars-d-
learn wrote:
> It should really say that it's up to the GC implementation whether it's UB
> or not.
Well, that arguably makes it UB in general then, because it can't be relied
on. By putting restrictions on the GC in gene
On Thursday, March 01, 2018 14:52:26 Steven Schveighoffer via Digitalmars-d-
learn wrote:
> On 3/1/18 2:04 PM, Jonathan M Davis wrote:
> > On Thursday, March 01, 2018 10:55:34 Steven Schveighoffer via
> > Digitalmars-d->
> > learn wrote:
> >> It should really say that it's up to the GC implementati
On Thursday, March 01, 2018 15:53:08 Steven Schveighoffer via Digitalmars-d-
learn wrote:
> On 3/1/18 3:33 PM, H. S. Teoh wrote:
> > Won't a precise GC scanning for pointers to aligned objects want to skip
> > values that can't be an aligned pointer? Though in D's case, being
> > required to be co
On Thursday, March 01, 2018 21:16:54 Jamie via Digitalmars-d-learn wrote:
> I'm trying to understand arrays and have read a lot of the
> information about them on this forum. I think I understand that
> they are set-up like Type[], so that int[][] actually means an
> array of int[].
>
> I create an
On Thursday, March 01, 2018 22:57:16 Jamie via Digitalmars-d-learn wrote:
> On Thursday, 1 March 2018 at 21:34:41 UTC, Jonathan M Davis wrote:
> > Don't put the indices within the brackets. What you want is
> >
> > auto arr = new int[][][](3, 2, 1);
>
> Okay thanks, but I don't understand what is t
On Thursday, March 01, 2018 23:51:37 Jamie via Digitalmars-d-learn wrote:
> On a similar not, is there an accepted way to assign across
> arrays? As Steve mentioned, cross-slicing isn't supported, so is
> the best way to iterate through the array and assign as necessary?
That's what you would have
On Friday, March 02, 2018 09:44:20 psychoticRabbit via Digitalmars-d-learn
wrote:
> trying to do this C code, in D, but getting error:
> "Error: assignment cannot be used as a condition, perhaps `==`
> was meant?"
>
> any help much appreciated:
>
> --
> while ((*dst++ = *src++)) {}
> --
Y
On Friday, March 02, 2018 10:21:39 Arredondo via Digitalmars-d-learn wrote:
> Hi,
>
> The following works as expected:
>
> auto range = [1, 2, 3, 4, 5];
> foreach (i, el; range) {
> writeln(i, ": ", el);
> }
>
> but this slight modification doesn't:
>
> auto range = iota(5);
> foreach (i, el; ran
On Sunday, March 04, 2018 11:35:23 bauss via Digitalmars-d-learn wrote:
> Why is the following not working?
>
> class Foo(string baz = "baz")
> {
> mixin("int " ~ baz ~ ";");
> }
>
> class Bar : Foo
> {
> }
>
> Shouldn't it implicit do, without me having to do it manually?
>
> class Bar : Foo!
On Sunday, March 04, 2018 14:43:41 bauss via Digitalmars-d-learn wrote:
> On Sunday, 4 March 2018 at 11:57:12 UTC, Jonathan M Davis wrote:
> > On Sunday, March 04, 2018 11:35:23 bauss via
> >
> > Digitalmars-d-learn wrote:
> >> Why is the following not working?
> >>
> >> class Foo(string baz = "baz
On Sunday, March 04, 2018 21:03:23 arturg via Digitalmars-d-learn wrote:
> On Sunday, 4 March 2018 at 19:58:14 UTC, ag0aep6g wrote:
> > On 03/04/2018 08:54 PM, aliak wrote:
> >> wait a minute... so I can't use any std.range functions on a
> >> type if I add the range primitives as free functions? O
On Monday, March 05, 2018 21:26:48 Marc via Digitalmars-d-learn wrote:
> if so, can I somehow make it copy only if newest?
It actually would have been my guess that it would copy too infrequently -
e.g. only on a fresh build - but I don't know. IIRC, it does have that
problem when running pre-buil
On Tuesday, March 06, 2018 18:34:34 bauss via Digitalmars-d-learn wrote:
> On Monday, 5 March 2018 at 19:51:33 UTC, Steven Schveighoffer
>
> wrote:
> > On 3/5/18 2:25 PM, Marc wrote:
> >> Can __gshared be used instead of static in the singleton
> >> pattern? I, comming from C++, ignorantly, have ne
On Tuesday, March 06, 2018 11:52:05 H. S. Teoh via Digitalmars-d-learn
wrote:
> On Tue, Mar 06, 2018 at 11:46:04AM -0700, Jonathan M Davis via
Digitalmars-d-learn wrote:
> > On Tuesday, March 06, 2018 18:34:34 bauss via Digitalmars-d-learn wrote:
> [...]
>
> > > Singleton
On Thursday, March 08, 2018 08:36:09 Nordlöw via Digitalmars-d-learn wrote:
> Is using
>
> https://dlang.org/changelog/2.079.0.html#default_after_variadic
>
> for instance as
>
> void show(Args...)(Args args,
> string file = __FILE__,
> uint line = __LINE__,
On Friday, March 09, 2018 14:12:10 Basile B. via Digitalmars-d-learn wrote:
> On Friday, 9 March 2018 at 13:47:34 UTC, Basile B. wrote:
> > I would need this to work:
> >
> > ```
> > struct Foo
> > {
> >
> > TypeInfo typeCache;
> >
> > TypeInfo getTypeCache()
> > {
> >
> > alias
On Friday, March 09, 2018 19:33:26 WhatMeWorry via Digitalmars-d-learn
wrote:
> On Friday, 9 March 2018 at 10:42:47 UTC, Kagamin wrote:
> > To make a struct noncopyable, add @disable this(this); to it,
> > then compiler will give an error on an attempt to copy it.
>
> I tried the @disable this(thi
On Saturday, March 10, 2018 18:31:23 Bogdan via Digitalmars-d-learn wrote:
> ... I accidentally posted that before it was complete because I
> kept pressing TAB in order to indent ...
>
> Anyway, I'd like to know if there exists such a thing as
>
> ```
> int a = stream.ReadInt32();
> ```
Chec
On Saturday, March 10, 2018 19:22:43 Bogdan via Digitalmars-d-learn wrote:
> On Saturday, 10 March 2018 at 18:49:48 UTC, Jonathan M Davis
>
> wrote:
> > Check out
> >
> > https://dlang.org/phobos/std_bitmanip.html#peek
> > https://dlang.org/phobos/std_bitmanip.html#read
> >
> > They can be used to
On Saturday, March 10, 2018 21:50:42 aliak via Digitalmars-d-learn wrote:
> What are the recommended guidelines for using/not using UFCS in
> writing generic libraries?
>
> I ask because if you have an internal generic free function that
> you use on types in a generic algorithm via ufcs, then ever
On Sunday, March 11, 2018 01:04:27 Roberto via Digitalmars-d-learn wrote:
> How do I list installed modules?
>
> dmd --list-modules
> datefmt
> dateparser
> std.algorithm
> std.array
> std.conv
> std.datetime
> std.digest
> std.exception
> std.file
> std.format
> std.getopt
> std.json
> std.math
>
On Sunday, March 11, 2018 08:39:54 aliak via Digitalmars-d-learn wrote:
> On Saturday, 10 March 2018 at 23:00:07 UTC, Jonathan M Davis
> > issue in practice. That doesn't mean that it's never a problem,
> > but from what I've seen, it's very rarely a problem, and it's
> > easy to work around if you
On Sunday, March 11, 2018 13:19:39 Mike Franklin via Digitalmars-d-learn
wrote:
> This works:
>
> ```
> class S {
> int n, m;
> int sum() { return n + m; }
> Inner!(sum) a;
>
> class Inner(alias f){
> auto get() {
> return f();
> }
> }
> }
>
On Monday, March 12, 2018 02:11:49 Jordan Wilson via Digitalmars-d-learn
wrote:
> I wanted to iterate through a date range, so I initially tried:
> iota(Date(2016,1,1),Date(2018,1,1),dur!"days"(1));
>
> That wouldn't compile, which is fair enough I guess.
Maybe iota should be made to work, but as
On Tuesday, March 13, 2018 01:12:15 psychoticRabbit via Digitalmars-d-learn
wrote:
> I cannot get my head around, why private is not private, in D.
>
> How do I make a private member, private?
>
> -
> module test;
>
> import std.stdio;
>
> void main()
> {
> myClass c = new myClass();
>
On Tuesday, March 13, 2018 02:06:57 psychoticRabbit via Digitalmars-d-learn
wrote:
> On Tuesday, 13 March 2018 at 01:39:13 UTC, Jonathan M Davis wrote:
> > private is private to the module, not the class. There is no
> > way in D to restrict the rest of the module from accessing the
> > members of
On Tuesday, March 13, 2018 18:55:35 Marc via Digitalmars-d-learn wrote:
> I want to basically make this work:
> >auto l = new List();
> >l += 5;
>
> I managed to do this:
> >class List
> >{
> >
> > int[] items;
> > ref List opBinary(string op)(int rhs) if(op == "+")
> > {
> >
> > items ~= rhs;
On Tuesday, March 13, 2018 21:36:13 Arun Chandrasekaran via Digitalmars-d-
learn wrote:
> On Tuesday, 13 March 2018 at 13:59:00 UTC, Steven Schveighoffer
>
> wrote:
> > On 3/12/18 10:06 PM, psychoticRabbit wrote:
> >> [...]
> >
> > OK, so I agree there are drawbacks. But these can be worked
> > aro
On Tuesday, March 13, 2018 21:35:50 Nathan S. via Digitalmars-d-learn wrote:
> On Tuesday, 13 March 2018 at 21:07:33 UTC, ag0aep6g wrote:
> > You're storing a reference to `small` in `data`. When a
> > SmallString is copied, that reference will still point to the
> > original `small`. When the orig
On Tuesday, March 13, 2018 22:25:52 Nathan S. via Digitalmars-d-learn wrote:
> On Tuesday, 13 March 2018 at 21:36:13 UTC, Arun Chandrasekaran
>
> wrote:
> > On Tuesday, 13 March 2018 at 13:59:00 UTC, Steven Schveighoffer
> >
> > wrote:
> >> On 3/12/18 10:06 PM, psychoticRabbit wrote:
> >>> [...]
>
On Wednesday, March 14, 2018 07:11:49 Nathan S. via Digitalmars-d-learn
wrote:
> On Tuesday, 13 March 2018 at 22:33:56 UTC, Jonathan M Davis wrote:
> > And you can't get rid of it, because the object can still be
> > moved, which would invalidate the pointer that you have
> > referring to the stat
On Wednesday, March 14, 2018 13:36:51 Andre Pany via Digitalmars-d-learn
wrote:
> Hi,
>
> I do not understand why struct initializer works for arrays but
> not for
> associative arrays:
>
> struct Bar
> {
> string s;
> }
>
> struct Foo
> {
> Bar[string] asso;
> Bar[] arr;
> }
>
> vo
On Wednesday, March 14, 2018 22:23:47 Cecil Ward via Digitalmars-d-learn
wrote:
> say in C I have a function with a pointer argument
> foo( const sometype_t * p )
>
> I have asked about this D nightmare before. Using the same
> pattern in D or the in argument qualifier as far as I can see the
On Thursday, March 15, 2018 02:06:23 Marc via Digitalmars-d-learn wrote:
> Can I make it work?
>
> >struct S
> >{
> >
> > int[] l;
> >
> >}
>
> then
>
> >auto s = S();
> >s.l ~= 1; // ok
> >s.l = []; // error
It's not possible to do anything like that, and it really doesn't make sense
when you con
On Friday, March 16, 2018 07:57:04 John Chapman via Digitalmars-d-learn
wrote:
> I need to write to a range created with outputRangeObject, then
> read from it. Is there a way to convert it to an input range?
The output range API only supports the put function. That's it. The output
range support
On Saturday, March 17, 2018 06:58:04 Dukc via Digitalmars-d-learn wrote:
> On Friday, 16 March 2018 at 08:07:09 UTC, Jonathan M Davis wrote:
> > For instance, std.array.Appender is an output range, and you
> > get a dynamic array out of it, which would be an input range.
> > So, if you have control
On Sunday, March 18, 2018 18:04:13 Tony via Digitalmars-d-learn wrote:
> On Tuesday, 13 March 2018 at 06:03:11 UTC, Mike Parker wrote:
> > D is not C++, C#, or Java. C++ uses friend to get around the
> > issue. Java has no solution. I don't know about C#.
>
> Java has four protection levels. If you
On Sunday, March 18, 2018 18:59:39 Tony via Digitalmars-d-learn wrote:
> On Sunday, 18 March 2018 at 18:32:42 UTC, Jonathan M Davis wrote:
> > They're similar, but there are differences. For instance, you
> > can do package(a) in D in order to do something like put the
> > stuff in a.b.c in package
On Sunday, March 18, 2018 19:51:18 aberba via Digitalmars-d-learn wrote:
> On Friday, 16 March 2018 at 21:15:33 UTC, H. S. Teoh wrote:
> > On Fri, Mar 16, 2018 at 08:17:49PM +, aberba via
> >
> > Digitalmars-d-learn wrote:
> >> [...]
> >
> > The usual way I do this is to decouple the code from
On Monday, March 19, 2018 00:14:11 Drone1h via Digitalmars-d-learn wrote:
> I am not sure whether I can make it work with "inout" instead of
> "const". Perhaps I am missing something.
...
> May I ask that you confirm that this is what you suggested ?
> Thank you.
Marking a empty or front with inou
On Monday, March 19, 2018 17:29:10 Russel Winder via Digitalmars-d-learn
wrote:
> I had assumed that a directory of modules was a package. So for
> example:
>
> A/a.d
> A/b.d
>
> were two modules in package A. Especially given there is a module
> statement at the beginning of each module:
>
>
On Wednesday, March 21, 2018 00:47:18 Ontonator via Digitalmars-d-learn
wrote:
> The following code does not compile:
> > void main() {}
> >
> > class SuperClass {}
> >
> > class TemplatedClass(T : SuperClass) {}
> >
> > class A : SuperClass {
> >
> > alias T = TemplatedClass!B;
> >
> > }
> >
On Wednesday, March 21, 2018 20:07:09 tipdbmp via Digitalmars-d-learn wrote:
> D's type declarations seem to read right to left.
>
>
> int an_integer;
>
> int[10] an_array_of_10_integers;
> int[10]* a_pointer_to_an_array_of_10_integers =
> &an_array_of_10_integers;
>
> int*[10] an_array_of_10_point
On Wednesday, March 21, 2018 22:50:32 Ontonator via Digitalmars-d-learn
wrote:
> On Wednesday, 21 March 2018 at 06:39:22 UTC, ag0aep6g wrote:
> > On 03/21/2018 01:47 AM, Ontonator wrote:
> >> The following code does not compile:
> >>> [...]
> >>
> >> It gives the error:
> >>> [...]
> >>
> >> The a
On Monday, March 26, 2018 10:13:08 Simen Kjærås via Digitalmars-d-learn
wrote:
> On Monday, 26 March 2018 at 09:46:57 UTC, Nicholas Wilson wrote:
> > Have a look at Rebindable:
> > https://dlang.org/phobos/std_typecons.html#rebindable
>
> Allow me to quote from aliak's post:
> > what I'm looking f
On Monday, March 26, 2018 23:15:42 Jonathan via Digitalmars-d-learn wrote:
> Everywhere I look the advice is to avoid atomic and just mutex
> things.
>
> Why is this `a.atomicStore(b)`(memory order is seq) less safe
> than `synchronized{a=b}`? I get that when more operations or
> shared values are
On Tuesday, March 27, 2018 09:15:43 Boris-Barboris via Digitalmars-d-learn
wrote:
> Hello! Can someone point me to the changelong entry or maybe a
> pull request, wich changed the "in" from "scope const" to
> "const"? I thought the previous matter of things was pretty
> natural, and current "in" i
On Tuesday, March 27, 2018 09:58:11 bauss via Digitalmars-d-learn wrote:
> On Tuesday, 27 March 2018 at 09:27:07 UTC, Jonathan M Davis wrote:
> > On Tuesday, March 27, 2018 09:15:43 Boris-Barboris via
> >
> > Digitalmars-d-learn wrote:
> >> Hello! Can someone point me to the changelong entry or may
On Tuesday, March 27, 2018 16:16:15 Adam D. Ruppe via Digitalmars-d-learn
wrote:
> On Tuesday, 27 March 2018 at 09:27:07 UTC, Jonathan M Davis wrote:
> > it was deemed too dangerous to have in suddenly really mean
> > both scope and const, because it would potentially break a lot
> > of code.
>
>
On Tuesday, March 27, 2018 23:29:57 Anonymouse via Digitalmars-d-learn
wrote:
> My IRC bot is suddenly seeing crashes. It reads characters from a
> Socket into an ubyte[] array, then idups parts of that (full
> lines) into strings for parsing. Parsing involves slicing such
> strings into meaningfu
On Wednesday, March 28, 2018 02:16:59 Joe via Digitalmars-d-learn wrote:
> I'm trying to build a very simple library. For now it just has a
> single class, constructor, destructor and one method. I added a
> unit test right after the method, declared the targetType to be
> "library" and a buildTyp
On Wednesday, March 28, 2018 21:29:22 Jesse Phillips via Digitalmars-d-learn
wrote:
> On Wednesday, 28 March 2018 at 03:07:23 UTC, Jonathan M Davis
>
> wrote:
> > Run
> >
> > dub test
> >
> > The problem is that an executable needs a main, and a library
> > doesn't have one, whereas when you'r
On Thursday, March 29, 2018 17:41:15 Chris M. via Digitalmars-d-learn wrote:
> I'm working with mysql-native for a project, and have been using
> a single, shared Connection
> (http://semitwist.com/mysql-native-docs/v2.2.0/mysql/connection/Connection
> .html) among multiple threads. The issue here
On Thursday, March 29, 2018 18:50:39 Chris M. via Digitalmars-d-learn wrote:
> On Thursday, 29 March 2018 at 18:07:50 UTC, Jonathan M Davis
>
> wrote:
> > On Thursday, March 29, 2018 17:41:15 Chris M. via
> >
> > Digitalmars-d-learn wrote:
> >> [...]
> >
> > In general, the correct way to deal with
On Friday, March 30, 2018 02:30:01 Chris Katko via Digitalmars-d-learn
wrote:
> void start_draw_calls(BITMAP target_bitmap); //locks onto a
> resource
> void end_draw_calls(); //frees previous resource lock
>
> void my_function()
> {
> //...
>
> start_draw_calls(target_bitmap) //whe
On Sunday, April 01, 2018 11:54:16 Steven Schveighoffer via Digitalmars-d-
learn wrote:
> I currently have a situation where I want to have a function that
> accepts a parameter optionally.
>
> I thought maybe Nullable!int might work:
>
> void foo(Nullable!int) {}
>
> void main()
> {
> foo(1);
On Sunday, April 01, 2018 22:06:57 Boris-Barboris via Digitalmars-d-learn
wrote:
> On Sunday, 1 April 2018 at 15:54:16 UTC, Steven Schveighoffer
>
> wrote:
> > I currently have a situation where I want to have a function
> > that accepts a parameter optionally.
>
> I would simply use a pointer for
On Sunday, April 01, 2018 22:37:17 Boris-Barboris via Digitalmars-d-learn
wrote:
> On Sunday, 1 April 2018 at 22:25:45 UTC, Jonathan M Davis wrote:
> > How would a pointer help? Instead of doing
> >
> > foo(nullable(42))
> >
> > he'd have to do
> >
> > foo(new int(42))
> >
> > which is just one ch
On Sunday, April 01, 2018 22:34:16 Seb via Digitalmars-d-learn wrote:
> On Sunday, 1 April 2018 at 15:54:16 UTC, Steven Schveighoffer
>
> wrote:
> > I currently have a situation where I want to have a function
> > that accepts a parameter optionally.
> >
> > I thought maybe Nullable!int might work:
On Wednesday, April 04, 2018 04:54:50 Ali via Digitalmars-d-learn wrote:
> I am going through the Learning D book by Michael Parker
> So every now and then I will make post about the book
> either critics of the book, book content or questions
>
>
> First critic
> chapter 2 - the special package mo
On Wednesday, April 04, 2018 16:05:52 Timoses via Digitalmars-d-learn wrote:
> On Wednesday, 4 April 2018 at 10:41:52 UTC, Simen Kjærås wrote:
> > Because by the time B's constructor is called, A might already
> > have initialized it, and rely on it never changing.
>
> What about:
>
> ```
> class A
On Wednesday, April 04, 2018 21:46:13 Timoses via Digitalmars-d-learn wrote:
> On Wednesday, 4 April 2018 at 18:11:12 UTC, Jonathan M Davis
> > That code doesn't compile - at least not with dmd master. It
> > gives these two errors:
> >
> > q.d(5): Error: constructor `q.A.this` missing initializer
On Thursday, April 05, 2018 13:36:07 Alex via Digitalmars-d-learn wrote:
> On Wednesday, 4 April 2018 at 21:49:08 UTC, Timoses wrote:
> > "[...] the construction of the base class can be independent
> > from the derived one."
> >
> > Hm, the points 7 and 8 don't clearly state what you wrote.
>
> Ye
On Friday, April 06, 2018 00:35:39 Kayomn via Digitalmars-d-learn wrote:
> On Friday, 6 April 2018 at 00:21:54 UTC, H. S. Teoh wrote:
> > On Thu, Apr 05, 2018 at 11:53:00PM +, Kayomn via
> > Digitalmars-d-learn wrote: [...]
> >
> >> [...]
> >
> > [...]
> >
> >> [...]
> >
> > `lastID`, as declar
On Friday, April 06, 2018 16:10:56 Dr.No via Digitalmars-d-learn wrote:
> I'm reading line by line the lines from a CSV file provided by
> the user which is assumed to be UTF8. But an user has provided an
>
> ANSI file which resulted in the error:
> >core.exception.UnicodeException@src\rt\util\utf.
On Monday, April 09, 2018 00:25:08 solidstate1991 via Digitalmars-d-learn
wrote:
> Would the if(!(myFunctionPointer is null)){} work is I
> intended?
You can also do
if(myFunctionPointer !is null)
- Jonathan M Davis
On Monday, April 09, 2018 08:27:50 Per Nordlöw via Digitalmars-d-learn
wrote:
> Is it possible to get the source expression sent to a lazy
> function?
>
> So that I can implement something like
>
> show(Arg)(lazy Arg arg)
> {
> writeln(arg.sourceof, arg);
> }
>
> used as
>
> show(1+2+3);
On Monday, April 09, 2018 23:58:02 Drone1h via Digitalmars-d-learn wrote:
> On Monday, 19 March 2018 at 00:50:06 UTC, Jonathan M Davis wrote:
> > [...]
> > http://jmdavisprog.com/articles/why-const-sucks.html
>
> I have just read the reply and the article.
>
> I cannot believe you have written this
On Tuesday, April 10, 2018 14:25:52 Nordlöw via Digitalmars-d-learn wrote:
> Should ranges always provide a length property?
>
> If so, in which cases is a length property an advantage or a
> requirement?
Whether a range has a length property or not is primarily dependent on how
efficient it is to
On Tuesday, April 10, 2018 18:52:19 kinke via Digitalmars-d-learn wrote:
> On Tuesday, 10 April 2018 at 18:34:54 UTC, n0fun wrote:
> > Why the destructor is called in the second case and why not in
> > the first?
>
> The first case is RAII, where destruction isn't done for not
> fully constructed i
On Tuesday, April 10, 2018 19:47:10 Nordlöw via Digitalmars-d-learn wrote:
> On Tuesday, 10 April 2018 at 14:34:40 UTC, Adam D. Ruppe wrote:
> > On Tuesday, 10 April 2018 at 14:25:52 UTC, Nordlöw wrote:
> >> Should ranges always provide a length property?
> >
> > No.
> >
> >> If so, in which cases
On Tuesday, April 10, 2018 22:07:40 Cym13 via Digitalmars-d-learn wrote:
> On Tuesday, 10 April 2018 at 20:08:14 UTC, Jonathan M Davis wrote:
> > On Tuesday, April 10, 2018 19:47:10 Nordlöw via
> >
> > Digitalmars-d-learn wrote:
> >> On Tuesday, 10 April 2018 at 14:34:40 UTC, Adam D. Ruppe wrote:
>
901 - 1000 of 1863 matches
Mail list logo