On Tuesday, October 31, 2017 20:36:57 Jacob Carlborg via Digitalmars-d-learn
wrote:
> On 2017-10-31 16:36, Dr. Assembly wrote:
> > thanks. I just find it werid, maybe because I came from C/C++
> > background, where it means only integer types. So enum s = "foo"; is
> > really werid. But I'll get u
On Tuesday, October 31, 2017 04:08:12 Joel via Digitalmars-d-learn wrote:
> The following code assert fails (bar == 1, not -10!). I've wasted
> a bit of time because of this happening.
>
> void main() {
> if (int bar = foo() != 0) {
> assert(bar == -10);
> }
> }
>
> auto foo() {
> retur
On Sunday, October 29, 2017 22:24:57 Nordlöw via Digitalmars-d-learn wrote:
> Shouldn't associative arrays with key types (K) having mutable
> indirections (std.traits.hasAliasing!K) such as
>
> string[ubyte[]]
>
> be disallowed?
>
> If not, in what cases do we want this?
Well, the built-in a
On Friday, October 27, 2017 21:38:55 Jonathan M Davis via Digitalmars-d-
learn wrote:
> Also, toStringz specifically returns an immutable(char)* - though looking
> it over right now, I'd say that that's a bug for the overload that takes
> const(char)[] instead of string. It r
On Saturday, October 28, 2017 02:46:00 Shriramana Sharma via Digitalmars-d-
learn wrote:
> On Wednesday, 25 October 2017 at 00:35:29 UTC, Ali Çehreli wrote:
> > > char[] name = "/tmp/XX".dup;
> >
> > remain valid. The actual issue is the missing '\0'. So,
> >
> > consider toStringz in this case
On Saturday, October 28, 2017 02:38:43 Shriramana Sharma via Digitalmars-d-
learn wrote:
> Hello. I want a function to be able to take any arguments like
> write() and print them out but quoting string arguments of length
> more than 1. So I write the following quote:
>
> import std.stdio;
> string
On Thursday, October 26, 2017 15:09:48 bauss via Digitalmars-d-learn wrote:
> Why is it not allowed to have empty UDAs for classes?
>
> Let's say we have an UDA like this:
> struct Exclude { }
>
> Then we want to put it on a class like:
>
> @Exclude class Foo
> {
> ...
> }
>
> This will fail w
On Thursday, October 26, 2017 17:55:05 Mr. Jonse via Digitalmars-d-learn
wrote:
> C:\D\dmd2\windows\bin\..\..\src\phobos\std\concurrency.d(2395):
> Error: variable lock cannot be modified at compile time
> C:\D\dmd2\windows\bin\..\..\src\phobos\std\concurrency.d(2422):
> called from here: in
On Tuesday, October 24, 2017 16:59:31 Arun Chandrasekaran via Digitalmars-d-
learn wrote:
> On Tuesday, 24 October 2017 at 16:18:03 UTC, H. S. Teoh wrote:
> > On Tue, Oct 24, 2017 at 10:02:11AM +, Arun Chandrasekaran
> >
> > via Digitalmars-d-learn wrote:
> >> On Monday, 23 October 2017 at 18:0
On Sunday, October 22, 2017 15:21:37 Shriramana Sharma via Digitalmars-d-
learn wrote:
> On Saturday, 17 January 2015 at 17:16:41 UTC, Tobias Pankrath
>
> wrote:
> > You're looking for core.sys.posix.stdlib : mkstemp.
> >
> > I think that should be used by std.stdio.File as well, care to
> > create
On Friday, October 20, 2017 21:32:48 Patrick via Digitalmars-d-learn wrote:
> The compiler seems to reject the following code in a class method:
>
> bool test = is(this : myClass);
>
> Could some please explain this?
"this" is not a type. is(T : U) is true if T is implicitly convertible to U.
T an
On Wednesday, October 18, 2017 10:36:41 Per Nordlöw via Digitalmars-d-learn
wrote:
> On Wednesday, 18 October 2017 at 10:17:38 UTC, Biotronic wrote:
> > Make them templates, that should solve the problem:
> >
> > struct S(T) {
> >
> > void foo()() {
> >
> > compileerror;
> >
> > }
On Wednesday, October 18, 2017 09:13:47 Per Nordlöw via Digitalmars-d-learn
wrote:
> Are there any nearby plans to make more template instantiations
> (especially aggregate members) lazy in DMD?
>
> Are there any specific obstacles against doing that or has it
> just not been prioritized?
Templat
On Tuesday, October 17, 2017 18:33:02 drug via Digitalmars-d-learn wrote:
> My code fails and I guess the reason is I have a slice to data in the
> stack and it becomes garbage in some moment. So I need a way to check
> where data is placed. Is it right that it can be done in linux using
> `sbrk` s
On Sunday, October 15, 2017 08:47:42 Domain via Digitalmars-d-learn wrote:
> void f(int i)
> {
> writeln("i");
> }
>
> void f(E)(E e) if (is(E == enum))
> {
> writeln("e");
> }
>
> enum E { A }
> E e = E.A;
> f(e);// output i
>
> How can I overload with enum type?
I'd strongly advise
On Saturday, October 14, 2017 05:20:47 Jesse Phillips via Digitalmars-d-
learn wrote:
> The point is assert tells the compiler something it can use to
> reason about its job, not that it can insert additional runtime
> checks to see if you code is invalid an then add new jumps to
> execute whatever
On Saturday, October 14, 2017 00:18:35 myst via Digitalmars-d-learn wrote:
> I'm sorry if this has been answered already, it seems like a very
> basic question.
>
> There is .toString() method convention for printing, but I can
> not find anything alike for reading. Is there something like
> operat
On Friday, October 13, 2017 11:26:54 kdevel via Digitalmars-d-learn wrote:
> On Friday, 13 October 2017 at 02:22:24 UTC, Jonathan M Davis
>
> wrote:
> > You've told it that i should never be 3 at that point and that
> > it's a bug if it is, and as such, it is free to assume that i
> > is never 3 af
On Friday, October 13, 2017 02:12:21 Jonathan M Davis via Digitalmars-d-
learn wrote:
> On Friday, October 13, 2017 07:36:28 bauss via Digitalmars-d-learn wrote:
> > On Thursday, 12 October 2017 at 18:17:54 UTC, Adam D. Ruppe wrote:
> > > On Thursday, 12 October 2017 at 18:11:5
On Friday, October 13, 2017 07:36:28 bauss via Digitalmars-d-learn wrote:
> On Thursday, 12 October 2017 at 18:17:54 UTC, Adam D. Ruppe wrote:
> > On Thursday, 12 October 2017 at 18:11:55 UTC, Nieto wrote:
> >> Does D have an equivalent to C#'s String.IsNullOrWhiteSpace()
> >> in the standard libra
On Thursday, October 12, 2017 23:33:39 Psychological Cleanup via
Digitalmars-d-learn wrote:
> Is there any way to get the function body of a function,
> delegate, and lambda? I'd also like to extend functions by
> "wrapping" them at compile time generically. For example, I'd
> like to get all the
On Thursday, October 12, 2017 21:22:29 kdevel via Digitalmars-d-learn wrote:
> On Thursday, 12 October 2017 at 20:27:03 UTC, Jonathan M Davis
>
> wrote:
> > On Thursday, October 12, 2017 20:15:41 kdevel via
> >
> >> ---
> >> void main ()
> >> {
> >>
> >> assert (false);
> >>
> >> }
> >> ---
> >
On Thursday, October 12, 2017 20:15:41 kdevel via Digitalmars-d-learn wrote:
> On Thursday, 12 October 2017 at 15:37:23 UTC, John Burton wrote:
> > C++ compilers can and do perform such optimizations so I was
> > wondering if assert in D could cause such behavior according to
> > the spec.
>
> In t
On Wednesday, October 11, 2017 23:06:13 Johan Engelen via Digitalmars-d-
learn wrote:
> I am disappointed to see functions being deprecated, without an
> extensive documentation of how to rewrite them for different
> usage of the deprecated function. It makes me feel that no deep
> thought went int
On Wednesday, October 11, 2017 22:22:43 Johan Engelen via Digitalmars-d-
learn wrote:
> std.string.removechars is now deprecated.
> https://dlang.org/changelog/2.075.0.html#pattern-deprecate
>
> What is now the most efficient way to remove characters from a
> string, if only one type of character n
On Wednesday, October 11, 2017 09:27:49 John Burton via Digitalmars-d-learn
wrote:
> The spec says this :-
>
> "As a contract, an assert represents a guarantee that the code
> must uphold. Any failure of this expression represents a logic
> error in the code that must be fixed in the source code.
On Wednesday, October 11, 2017 06:25:19 Dhananjay via Digitalmars-d-learn
wrote:
> Hello,
>
> I am upgrading to DMD 2.076.1 from DMD 2.069.2 (similar results
> on 2.075.1), and seeing a huge increase in unittest compilation
> time when the -deps parameter is also passed to dmd. This is on
> both O
On Saturday, October 07, 2017 07:38:47 Chirs Forest via Digitalmars-d-learn
wrote:
> I have some data that I want to store in a dynamic 2d array...
> I'd like to be able to add elements to the front of the array and
> access those elements with negative integers as well as add
> numbers to the bac
On Friday, October 06, 2017 20:11:25 Laeeth Isharc via Digitalmars-d-learn
wrote:
> And I'm posting here because we can submit a pull request, but I
> didn't know whether to call Phobos or copy/paste as I haven't
> submitted more than trivial doc changes to compiler. I've
> written all of this up
On Wednesday, October 04, 2017 17:26:36 ketmar via Digitalmars-d-learn
wrote:
> Tristan B. Kildaire wrote:
> > Does this work?
>
> btw. there is "D" newsgroup which you can use for testing your NNTP
> client.
>
> web interface: http://forum.dlang.org/group/D
> NNTP name: "D"
You can also just pos
On Wednesday, October 04, 2017 09:04:10 thorstein via Digitalmars-d-learn
wrote:
> Hi,
>
> I get the following compile error with this function below:
> source\mod_data\matrices.d(66,12): Error: cannot implicitly
> convert expression (j) of type ulong to uint
>
> (66,12) is [j] in row[j]
>
> Using
On Tuesday, October 03, 2017 22:42:35 SamwiseFilmore via Digitalmars-d-learn
wrote:
> On Tuesday, 3 October 2017 at 22:37:17 UTC, SamwiseFilmore wrote:
> > Am I using the ternary operator correctly here, or is this an
> > issue with dmd? I'm using dmd v2.076.0.
>
> I wrapped the ternary in parenth
On Monday, October 02, 2017 18:31:23 Per Nordlöw via Digitalmars-d-learn
wrote:
> On Monday, 2 October 2017 at 18:14:24 UTC, Jacob Carlborg wrote:
> > On 2017-10-02 17:57, Nordlöw wrote:
> >> Is implementing opCall(size_t) for structures such as array
> >> containers that already define opIndex an
On Sunday, October 01, 2017 06:32:53 Nicholas Wilson via Digitalmars-d-learn
wrote:
> On Sunday, 1 October 2017 at 06:27:21 UTC, Nicholas Wilson wrote:
> > And am getting
> > util.d(72,12): Error: template instance helper!(foo) cannot use
> > local 'foo' as parameter to non-global template
> > hel
On Sunday, October 01, 2017 05:57:53 Tony via Digitalmars-d-learn wrote:
> "@property functions can only have zero, one or two parameters"
>
> I am looking for an example of an @property function defined with
> two parameters and the syntax for how it is accessed without ().
If it has two paramete
On Sunday, October 01, 2017 03:11:15 Nicholas Wilson via Digitalmars-d-learn
wrote:
> On Sunday, 1 October 2017 at 02:29:57 UTC, Jonathan M Davis wrote:
> > I would have thought that it would be pretty straightforward to
> > just write a recursive, eponymous template to solve the problem
> > and h
On Sunday, October 01, 2017 02:07:26 Nicholas Wilson via Digitalmars-d-learn
wrote:
> On Sunday, 1 October 2017 at 01:05:56 UTC, Nicholas Wilson wrote:
> > struct MyType
> > {
> >
> > void* raw;
> > static struct Info
> > {
> >
> > @(42) int foo;
> >
> > }
> > mixin gen
On Sunday, October 01, 2017 00:56:23 SrMordred via Digitalmars-d-learn
wrote:
> > In order to know where to split, it really has to do it from
> > the front. If it starts from the back, you won't necessarily
> > split in the same places as when iterating from the front, and
> > that would violate
On Saturday, September 30, 2017 20:18:25 Jon Degenhardt via Digitalmars-d-
learn wrote:
> On Saturday, 30 September 2017 at 17:17:17 UTC, SrMordred wrote:
> > writeln( "a.b.c".splitter('.').dropBack(1) ); //compiles ok
> > writeln( "a.b.c".splitter(".").dropBack(1) );
> >
> > //error:
> > Error: te
On Friday, September 29, 2017 14:34:04 aberba via Digitalmars-d-learn wrote:
> On Friday, 29 September 2017 at 03:42:18 UTC, Jonathan M Davis
>
> wrote:
> > On Friday, September 29, 2017 04:32:44 rikki cattermole via
> >
> > Digitalmars-d- learn wrote:
> >> On 29/09/2017 4:25 AM, Joel wrote:
> >> >
On Friday, September 29, 2017 04:32:44 rikki cattermole via Digitalmars-d-
learn wrote:
> On 29/09/2017 4:25 AM, Joel wrote:
> > With a given date, I want to know what day it is (like Sunday, Monday,
> > etc).
> >
> > I had a look up on std.datetime, and core.time, but they don't seem to
> > have a
On Wednesday, September 27, 2017 22:01:26 DreadKyller via Digitalmars-d-
learn wrote:
> Also off-topic slightly, but am I the only one with massive
> latency on this site? It took like almost 2 minutes from me
> hitting reply before this page showed up, and my last few posts
> took like a minute to
On Tuesday, September 26, 2017 07:33:57 DanielG via Digitalmars-d-learn
wrote:
> According to this page (https://dlang.org/htod.html), wchar_t
> should be recognized as wchar. But I'm just getting an error:
> "Error: ')' expected" ... anywhere a wchar_t appears in my .h
> file.
>
> Anything I need
On Monday, September 25, 2017 13:06:56 John Burton via Digitalmars-d-learn
wrote:
> If I have a int* pointer for example, that points to the start of
> an int array and step through the array until I get the value
> 123, is it defined in D what happens if you step off the end of
> the array?
>
> W
On Monday, September 25, 2017 05:28:13 WhatMeForget via Digitalmars-d-learn
wrote:
> This is taken exactly from the traits documentation.
>
>
>
> 25 Traits
>
> 25.21 identifier
>
> Takes one argument, a symbol. Returns the identifier for that
> symb
On Wednesday, September 20, 2017 21:13:58 nkm1 via Digitalmars-d-learn
wrote:
> OTOH, booleans being numbers is a source of some bugs (just like
> other cases of weak typing). Not a ton of bugs, but the utility
> of implicit conversion to numbers is so unnoticeable that I'm
> sure it's just not wo
On Wednesday, September 20, 2017 02:16:16 EntangledQuanta via Digitalmars-d-
learn wrote:
> On Tuesday, 19 September 2017 at 21:17:53 UTC, nkm1 wrote:
> > On Tuesday, 19 September 2017 at 17:40:20 UTC, EntangledQuanta
> >
> > wrote:
> >> Yeah, that is really logical! No wonder D sucks and has so
>
On Tuesday, September 19, 2017 19:35:15 Steven Schveighoffer via
Digitalmars-d-learn wrote:
> On 9/19/17 7:28 PM, Ivan Kazmenko wrote:
> > On Tuesday, 19 September 2017 at 22:44:06 UTC, greatsam4sure wrote:
> >> On Tuesday, 19 September 2017 at 21:52:57 UTC, Ivan Kazmenko wrote:
> >>> On Tuesday,
On Friday, September 15, 2017 19:04:56 jmh530 via Digitalmars-d-learn wrote:
> On Friday, 15 September 2017 at 18:20:06 UTC, Jonathan M Davis
>
> wrote:
> > It is my understanding that for both C and C++, an enum is
> > always an int (unless you're talking about enum classes in
> > C++). The size o
On Friday, September 15, 2017 15:35:48 bitwise via Digitalmars-d-learn
wrote:
> On Friday, 15 September 2017 at 07:24:34 UTC, Jonathan M Davis
>
> wrote:
> > On Friday, September 15, 2017 04:15:57 bitwise via
> >
> > Digitalmars-d-learn wrote:
> >> I translated the headers for FreeType2 to D, and
On Friday, September 15, 2017 04:15:57 bitwise via Digitalmars-d-learn
wrote:
> I translated the headers for FreeType2 to D, and in many cases,
> enums are used as struct members.
>
> If I declare an extern(C) enum in D, is it guaranteed to have the
> same underlying type and size as it would for
On Wednesday, September 13, 2017 07:51:19 John Burton via Digitalmars-d-
learn wrote:
> Is there any threadsafe queue in the standard library?
> I've not been able to find anything but thought I'd check before
> making my own.
>
> I want to be able to assemble messages (Which are just streams of
>
On Tuesday, September 12, 2017 13:47:47 Azi Hassan via Digitalmars-d-learn
wrote:
> On Tuesday, 12 September 2017 at 01:13:29 UTC, Hasen Judy wrote:
> > Now, a lot of library functions seem to expect ranges as inputs
> > and return ranges as output.
>
> Unless I'm mistaken, it was done on purpose
On Sunday, September 10, 2017 00:05:42 ag0aep6g via Digitalmars-d-learn
wrote:
> On 09/09/2017 11:54 PM, solidstate1991 wrote:
> > There's not much deep documentation about the functions, and I'm
> > interested if it can decode into UTF16 from UTF8.
>
> toUTF16 can transcode from UTF-8. As linked
On Wednesday, September 06, 2017 02:06:59 Psychological Cleanup via
Digitalmars-d-learn wrote:
> Is it possible to run a unit test without adding -unittest to the
> command line?
>
> unittest X
> {
> pragma(msg, "Boo!");
> }
>
> X;
>
> void main() { }
No. Without -unittest, the unittest block
On Tuesday, September 05, 2017 18:04:16 ag0aep6g via Digitalmars-d-learn
wrote:
> On 09/05/2017 05:54 PM, Per Nordlöw wrote:
> > Follow up question: If a character literal has type char, can we always
> > assume it's an ASCII character?
>
> Strictly speaking, this is a character literal of type ch
On Tuesday, September 05, 2017 17:55:20 ag0aep6g via Digitalmars-d-learn
wrote:
> On 09/05/2017 05:43 PM, Per Nordlöw wrote:
> > If a character literal has type char, always below 128, can we always
> > search for it's first byte offset in a string without decoding the
> > string to a range of dch
On Tuesday, September 05, 2017 07:52:03 Rene Zwanenburg via Digitalmars-d-
learn wrote:
> On Tuesday, 5 September 2017 at 06:23:26 UTC, Dukc wrote:
> > On Monday, 4 September 2017 at 20:31:35 UTC, Igor wrote:
> >> Search for word "local" here:
> >> https://code.dlang.org/docs/commandline. Maybe som
On Tuesday, September 05, 2017 08:15:04 John Burton via Digitalmars-d-learn
wrote:
> std.string.fromStringz will create me a string from a null
> terminated array of characters. But I have a zero terminated
> array of "short"s (from a win32 api call) which I'd like to turn
> into a wstring. But th
On Sunday, September 03, 2017 21:22:14 Ali Çehreli via Digitalmars-d-learn
wrote:
> On 09/03/2017 09:03 PM, Joel wrote:
> > One of my small programs doesn't compile any more since, said, DMD
> > versions.
> >
> > I've got other programs that do work, but I can't see what's different
> > about
On Friday, September 01, 2017 20:58:20 EntangledQuanta via Digitalmars-d-
learn wrote:
> template(A, B...)
> {
> auto foo(C...)(C c)
> {
> ... get c's parameter names, should be alpha, beta
> }
> }
>
>
> foo!(., .)(alpha, beta)
>
> I need the actual identifiers passed to foo. I
On Friday, September 01, 2017 14:38:38 bitwise via Digitalmars-d-learn
wrote:
> When I'm using __traits(allMembers), I get a all the invisible
> functions added by the compiler as well "__ctor", "__xdtor",
> "__cpctor", etc..
>
> Is there a way to filter them out?
You can use std.meta.Filter if y
On Thursday, August 31, 2017 23:23:17 Vino via Digitalmars-d-learn wrote:
> On Thursday, 31 August 2017 at 21:59:22 UTC, vino wrote:
> > Hi All,
> >
> > Can you help me what is wrong in the below program, as the
> >
> > output is empty.
> >
> > import std.stdio, std.path;
> >
> > void main ()
> >
On Thursday, August 31, 2017 14:09:55 H. S. Teoh via Digitalmars-d-learn
wrote:
> On Thu, Aug 31, 2017 at 01:34:39PM -0600, Jonathan M Davis via
> Digitalmars-d-learn wrote: [...]
>
> > In general, byLine does not work with other range-based algorithms
> > precisely because
On Thursday, August 31, 2017 18:43:40 Jesse Phillips via Digitalmars-d-learn
wrote:
> On Thursday, 31 August 2017 at 18:26:33 UTC, Sergei Degtiarev
>
> wrote:
> > Hi,
> > I tried to create a simple range concatenating several files,
> >
> > something like this:
> > File[] files;
> >
>
On Wednesday, August 30, 2017 21:51:57 EntangledQuanta via Digitalmars-d-
learn wrote:
> The point you are trying to making, and not doing a great job, is
> that the compiler cannot create an unknown set of virtual
> functions from a single templated virtual function. BUT, when you
> realize that i
On Wednesday, August 30, 2017 20:47:12 EntangledQuanta via Digitalmars-d-
learn wrote:
> This is quite surprising!
>
> public struct S(T)
> {
> T s;
> }
>
>
> interface I
> {
> void Go(T)(S!T s);
>
> static final I New()
> {
> return new C();
> }
> }
>
> abstract class A : I
> {
>
>
On Wednesday, August 30, 2017 13:28:48 Mark via Digitalmars-d-learn wrote:
> C++ has the issue of iterator invalidation, where certain
> operations on a container while iterating on it may invalidate
> the iterator, in which case it is no longer safe to use the
> iterator.
>
> D has ranges, but pre
On Tuesday, August 29, 2017 16:09:17 Per Nordlöw via Digitalmars-d-learn
wrote:
> Is it recommended to cast an unaliased array to `immutable` after
> it has been initialized?
>
> The reason for asking is that I would like the following function
>
> void[] rawReadNullTerminated(string path)
>
On Tuesday, August 29, 2017 03:16:13 Johnson Jones via Digitalmars-d-learn
wrote:
> I need to get this straight:
>
> A normal single dimensional array in D is defined as
>
> T[] arr
>
> and is a linear sequential memory array of T's with an unbound
> length and is effectively the same as T*(althou
On Tuesday, August 29, 2017 00:52:11 Cecil Ward via Digitalmars-d-learn
wrote:
> I am vacillating - considering breaking a lifetime's C habits and
> letting the D garbage collector make life wonderful by just
> cleaning up after me and ruining my future C disciple by not
> deleting stuff myself.
>
On Monday, August 28, 2017 13:08:04 jmh530 via Digitalmars-d-learn wrote:
> On Saturday, 26 August 2017 at 07:17:49 UTC, user1234 wrote:
> > getAttributes is made for UDAs only.
>
> Okay, well if you change it to
>
> deprecated {
> void foo();
> }
>
> void main() {
> pragma(msg, __traits(
On Sunday, August 27, 2017 22:29:46 Adam D. Ruppe via Digitalmars-d-learn
wrote:
> On Sunday, 27 August 2017 at 22:21:11 UTC, Enjoys Math wrote:
> >static int dataReadDelay;
>
> That's thread-local. Use shared to make it shared across all
> threads, and/or initialize it in the same thread as t
On Sunday, August 27, 2017 22:01:52 Michael Reiland via Digitalmars-d-learn
wrote:
> whoa, you can use a struct as a basetype for an enum? I'm
> guessing it allows you to associate more information with the
> enum without using lookup tables and the like? And equality is
> probably just a member
On Sunday, August 27, 2017 03:47:58 Michael Reiland via Digitalmars-d-learn
wrote:
> You can randomly assign a string to an enum? Or am I
> misunderstanding that last bit of code?
No, you can't directly assign a string to an enum of type string. That's
part of why they don't pass isInputRange. T
On Sunday, August 27, 2017 01:43:14 Michael Reiland via Digitalmars-d-learn
wrote:
> Hey guys,
>
> I was running through a tutorial and I noticed that enums can
> have a base type of string. Which is interesting, but I'm
> wondering about comparisons.
>
> I'm guessing the comparison boils down to
On Sunday, August 27, 2017 00:26:33 Andrew Chapman via Digitalmars-d-learn
wrote:
> Hi all, just wanting some advice on parallel processing and
> specifically how to deal with access violations.
>
> I am reading a list of words from a file like this:
>
> auto fileHandle = File("wordlist.txt", "r")
On Saturday, August 26, 2017 23:53:36 Cecil Ward via Digitalmars-d-learn
wrote:
> On Saturday, 26 August 2017 at 23:49:30 UTC, Cecil Ward wrote:
> > On Saturday, 26 August 2017 at 18:16:07 UTC, ag0aep6g wrote:
> >> On Saturday, 26 August 2017 at 16:52:36 UTC, Cecil Ward wrote:
> >>> Any ideas as t
On Friday, August 25, 2017 16:45:16 Vino.B via Digitalmars-d-learn wrote:
> Hi,
>
> Request your help on the below issue,
>
> Issue : While appending data to a array the data is getting
> duplicated.
>
> Program:
> import std.file: dirEntries, isFile, SpanMode;
> import std.stdio: writeln, writef
On Tuesday, August 22, 2017 16:11:11 jmh530 via Digitalmars-d-learn wrote:
> I'm not sure if this is a bug or not.
>
> I was playing around with printing out some member types with
> unittests and I was noticing some strange results when they were
> in @safe unittests rather than normal unittests.
On Monday, August 21, 2017 02:34:23 Mike Parker via Digitalmars-d-learn
wrote:
> On Sunday, 20 August 2017 at 18:08:27 UTC, Jon Degenhardt wrote:
> > Documentation for std.range.put
> > (https://dlang.org/phobos/std_range_primitives.html#.put) has
> >
> > the intriguing line:
> >> put should not b
On Monday, August 14, 2017 17:43:44 Dominikus Dittes Scherkl via
Digitalmars-d-learn wrote:
> On Monday, 14 August 2017 at 15:20:28 UTC, Steven Schveighoffer
>
> wrote:
> > On 8/14/17 9:48 AM, Dominikus Dittes Scherkl wrote:
> > > uint foo(T)(Unqual!T n) // first try
> > > {
> > >
> > > ++n; /
On Monday, August 14, 2017 15:22:23 Steven Schveighoffer via Digitalmars-d-
learn wrote:
> On 8/13/17 11:40 PM, Jonathan M Davis via Digitalmars-d-learn wrote:
> > On Saturday, August 12, 2017 18:57:44 Arek via Digitalmars-d-learn
wrote:
> >> I have the folowing problem:
>
On Sunday, August 13, 2017 16:40:03 crimaniak via Digitalmars-d-learn wrote:
> More of this, I think, you can't avoid __gshared for any complex
> work. Even mutexes from Phobos doesn't support shared, so I had
> to 'cowboy with __gshared' when implementing my site engine.
The way to handle shared
On Saturday, August 12, 2017 18:57:44 Arek via Digitalmars-d-learn wrote:
> I have the folowing problem:
> I like to envelope the class object in struct to control the
> destruction moment and then send this object to another
> thread/fiber (or task, cause I use vibe-d).
>
> I can't find any method
On Saturday, July 29, 2017 21:17:23 Joakim via Digitalmars-d-learn wrote:
> On Saturday, 29 July 2017 at 19:26:03 UTC, FoxyBrown wrote:
> > Also, equating dmd to an audio program or a clip art program
> > that is designed to load any and all files in it's install dir
> > is moronic too.
>
> It is n
On Saturday, July 29, 2017 1:54:29 AM MDT Cecil Ward via Digitalmars-d-learn
wrote:
> The snippet below failed to compile (I think) in the latest DMD -
> but I can't see the error message in the web-based editor at
> dlang.org. It certainly failed to compile under GDC 5.2.0 when
> tried out using
On Thursday, July 27, 2017 11:55:21 Ali Çehreli via Digitalmars-d-learn
wrote:
> On 07/27/2017 11:47 AM, Adam D. Ruppe wrote:
> > On Thursday, 27 July 2017 at 18:35:02 UTC, FoxyBrown wrote:
> >> But the issue was about missing symbols, not anything "extra". If
> >> datatime.d is there but nothing
On Thursday, July 27, 2017 18:35:02 FoxyBrown via Digitalmars-d-learn wrote:
> On Thursday, 27 July 2017 at 18:14:52 UTC, Steven Schveighoffer
>
> wrote:
> > On 7/27/17 1:58 PM, FoxyBrown wrote:
> >> On Thursday, 27 July 2017 at 12:23:52 UTC, Jonathan M Davis
> >>
> >> wrote:
> >>> On Wednesday, Ju
On Thursday, July 27, 2017 14:14:52 Steven Schveighoffer via Digitalmars-d-
learn wrote:
> On 7/27/17 1:58 PM, FoxyBrown wrote:
> > I do not use the installer, I use the zip file. I assumed that
> > everything would be overwritten and any old stuff would simply go
> > unused.. but it seems it doesn
On Wednesday, July 26, 2017 22:29:00 Ali Çehreli via Digitalmars-d-learn
wrote:
> On 07/26/2017 09:20 PM, FoxyBrown wrote:
> >> Somebody else had the same problem which they solved by removing
> >>
> >> "entire dmd":
> >> http://forum.dlang.org/thread/ejybuwermnentslcy...@forum.dlang.org
>
On Tuesday, July 25, 2017 09:31:28 Steven Schveighoffer via Digitalmars-d-
learn wrote:
> The unfortunate thing is that if you want to have non-templated unit
> tests, you have to put them outside the struct itself. This sucks for
> documented unit tests, and for tests being close to the thing bein
On Saturday, July 22, 2017 15:29:26 Domain via Digitalmars-d-learn wrote:
> On Friday, 21 July 2017 at 19:05:00 UTC, Jonathan M Davis wrote:
> > On Friday, July 21, 2017 15:33:45 Domain via
> >
> > Digitalmars-d-learn wrote:
> >> After upgrade dmd to latest 2.075.0, my project no longer
> >> build:
On Friday, July 21, 2017 15:33:45 Domain via Digitalmars-d-learn wrote:
> After upgrade dmd to latest 2.075.0, my project no longer build:
>
> zero.lib(core_cde_4a4f.obj) : error LNK2001: unresolved external
> symbol _D3std8d
> atetime9LocalTime6opCallFNaNbNeZyC3std8datetime9LocalTime
>
> and many
On Wednesday, July 19, 2017 10:19:52 PM MDT Christian Köstlin via
Digitalmars-d-learn wrote:
> Until now I formatted my toy-programs how I like it. Checking up on
> dfmt I saw that these deviate from the default settings of dfmt.
> Does dfmt's default settings reflect the most common style for dla
On Tuesday, July 18, 2017 13:49:11 helxi via Digitalmars-d-learn wrote:
> import std.stdio, std.datetime, std.conv, std.algorithm;
>
> void main()
> {
> immutable DEADLINE = DateTime(2017, 7, 16, 23, 59,
> 59).to!SysTime;
> immutable NOW = Clock.currTime;
> immutable INTERVAL = (DEAD
On Tuesday, July 18, 2017 15:55:00 Seb via Digitalmars-d-learn wrote:
> On Tuesday, 18 July 2017 at 15:41:44 UTC, Meta wrote:
> > As Seb somewhat undiplomatically put, there are replacements
> > listed in the changelog.
>
> Sorry - it wasn't intended to be an offense or aggressive. I
> consider(ed)
On Friday, July 14, 2017 9:06:52 PM MDT Moritz Maxeiner via Digitalmars-d-
learn wrote:
> On Friday, 14 July 2017 at 20:22:21 UTC, Ali Çehreli wrote:
> > Although it's obvious to us that there are only those two
> > exceptions, the compiler cannot in general know that.
>
> Not in general, no, but i
On Friday, July 14, 2017 7:50:17 PM MDT Anton Fediushin via Digitalmars-d-
learn wrote:
> On Friday, 14 July 2017 at 17:23:41 UTC, Steven Schveighoffer
>
> wrote:
> > Don't do this, because it's not what you think. It's not
> > actually calling std.algorithm.sort, but the builtin array sort
> > pro
On Saturday, July 8, 2017 8:45:57 PM MDT Nordlöw via Digitalmars-d-learn
wrote:
> What's the fastest XML-parser on code.dlang.org?
>
> Are there any benchmarks that show performance improvements
> compared to std.xml?
I'm not aware of any benchmarks for std.xml, but from what I know of it, it
wou
901 - 1000 of 1867 matches
Mail list logo