On Thursday, September 6, 2018 1:05:03 PM MDT Steven Schveighoffer via
Digitalmars-d-learn wrote:
> On 9/6/18 2:52 PM, Jonathan M Davis wrote:
> > On Thursday, September 6, 2018 12:21:24 PM MDT Steven Schveighoffer via
> >
> > Digitalmars-d-learn wrote:
> >> On 9/6/18 12:55 PM, Jonathan M Davis
On 9/6/18 2:52 PM, Jonathan M Davis wrote:
On Thursday, September 6, 2018 12:21:24 PM MDT Steven Schveighoffer via
Digitalmars-d-learn wrote:
On 9/6/18 12:55 PM, Jonathan M Davis wrote:
It's not a bug in writeln. Any time that a range is copied, you must not
do _anything_ else with the
On Thursday, September 6, 2018 12:21:24 PM MDT Steven Schveighoffer via
Digitalmars-d-learn wrote:
> On 9/6/18 12:55 PM, Jonathan M Davis wrote:
> > On Thursday, September 6, 2018 2:40:08 AM MDT Saurabh Das via
> > Digitalmars-d->
> > learn wrote:
> >> Is this a bug with writeln?
> >>
> >> void
On 9/6/18 12:55 PM, Jonathan M Davis wrote:
On Thursday, September 6, 2018 2:40:08 AM MDT Saurabh Das via Digitalmars-d-
learn wrote:
Is this a bug with writeln?
void main()
{
import std.stdio, std.range, std.algorithm;
auto a1 = sort([1,3,5,4,2]);
auto a2 = sort([9,8,9]);
On Thursday, September 6, 2018 2:40:08 AM MDT Saurabh Das via Digitalmars-d-
learn wrote:
> Is this a bug with writeln?
>
> void main()
> {
> import std.stdio, std.range, std.algorithm;
>
> auto a1 = sort([1,3,5,4,2]);
> auto a2 = sort([9,8,9]);
> auto a3 = sort([5,4,5,4]);
>
>
On Thursday, 6 September 2018 at 09:06:21 UTC, Simen Kjærås wrote:
On Thursday, 6 September 2018 at 08:40:08 UTC, Saurabh Das
wrote:
Is this a bug with writeln?
Yup. What happens is writeln destructively iterates over b[i].
Since b[i] is a forward range, this shouldn't be done
On Thursday, 6 September 2018 at 08:40:08 UTC, Saurabh Das wrote:
Is this a bug with writeln?
Yup. What happens is writeln destructively iterates over b[i].
Since b[i] is a forward range, this shouldn't be done
destructively. Instead, a copy should be made using b[i].save,
somewhere deep in
oops, it was my fault. sorry for noise. my apologies to ElementType ))
On Wednesday, 30 August 2017 at 20:47:12 UTC, EntangledQuanta
wrote:
interface I
{
void Go(T)(S!T s);
static final I New()
{
return new C();
}
}
abstract class A : I
{
}
class C : A
{
void Go(T)(S!T s)
{
On Monday, 4 September 2017 at 03:08:50 UTC, EntangledQuanta
wrote:
On Monday, 4 September 2017 at 01:50:48 UTC, Moritz Maxeiner
wrote:
On Sunday, 3 September 2017 at 23:25:47 UTC, EntangledQuanta
wrote:
On Sunday, 3 September 2017 at 11:48:38 UTC, Moritz Maxeiner
wrote:
On Sunday, 3 September
On Monday, 4 September 2017 at 01:50:48 UTC, Moritz Maxeiner
wrote:
On Sunday, 3 September 2017 at 23:25:47 UTC, EntangledQuanta
wrote:
On Sunday, 3 September 2017 at 11:48:38 UTC, Moritz Maxeiner
wrote:
On Sunday, 3 September 2017 at 04:18:03 UTC, EntangledQuanta
wrote:
On Sunday, 3 September
On Sunday, 3 September 2017 at 23:25:47 UTC, EntangledQuanta
wrote:
On Sunday, 3 September 2017 at 11:48:38 UTC, Moritz Maxeiner
wrote:
On Sunday, 3 September 2017 at 04:18:03 UTC, EntangledQuanta
wrote:
On Sunday, 3 September 2017 at 02:39:19 UTC, Moritz Maxeiner
wrote:
On Saturday, 2
On Sunday, 3 September 2017 at 11:48:38 UTC, Moritz Maxeiner
wrote:
On Sunday, 3 September 2017 at 04:18:03 UTC, EntangledQuanta
wrote:
On Sunday, 3 September 2017 at 02:39:19 UTC, Moritz Maxeiner
wrote:
On Saturday, 2 September 2017 at 23:12:35 UTC,
EntangledQuanta wrote:
[...]
The
On Sunday, 3 September 2017 at 04:18:03 UTC, EntangledQuanta
wrote:
On Sunday, 3 September 2017 at 02:39:19 UTC, Moritz Maxeiner
wrote:
On Saturday, 2 September 2017 at 23:12:35 UTC, EntangledQuanta
wrote:
[...]
The contexts being independent of each other doesn't change
that we would still
On Sunday, 3 September 2017 at 02:39:19 UTC, Moritz Maxeiner
wrote:
On Saturday, 2 September 2017 at 23:12:35 UTC, EntangledQuanta
wrote:
On Saturday, 2 September 2017 at 21:19:31 UTC, Moritz Maxeiner
wrote:
On Saturday, 2 September 2017 at 00:00:43 UTC,
EntangledQuanta wrote:
On Friday, 1
On Saturday, 2 September 2017 at 23:12:35 UTC, EntangledQuanta
wrote:
On Saturday, 2 September 2017 at 21:19:31 UTC, Moritz Maxeiner
wrote:
On Saturday, 2 September 2017 at 00:00:43 UTC, EntangledQuanta
wrote:
On Friday, 1 September 2017 at 23:25:04 UTC, Jesse Phillips
wrote:
I've love being
On Saturday, 2 September 2017 at 21:19:31 UTC, Moritz Maxeiner
wrote:
On Saturday, 2 September 2017 at 00:00:43 UTC, EntangledQuanta
wrote:
On Friday, 1 September 2017 at 23:25:04 UTC, Jesse Phillips
wrote:
I've love being able to inherit and override generic
functions in C#. Unfortunately C#
On Saturday, 2 September 2017 at 00:00:43 UTC, EntangledQuanta
wrote:
On Friday, 1 September 2017 at 23:25:04 UTC, Jesse Phillips
wrote:
I've love being able to inherit and override generic functions
in C#. Unfortunately C# doesn't use templates and I hit so
many other issues where Generics
On Saturday, 2 September 2017 at 16:20:10 UTC, Jesse Phillips
wrote:
On Saturday, 2 September 2017 at 00:00:43 UTC, EntangledQuanta
wrote:
Regardless of the implementation, the idea that we should
throw the baby out with the bathwater is simply wrong. At
least there are a few who get that. By
On Saturday, 2 September 2017 at 00:00:43 UTC, EntangledQuanta
wrote:
Regardless of the implementation, the idea that we should throw
the baby out with the bathwater is simply wrong. At least there
are a few who get that. By looking in to it in a serious manner
an event better solution might
On Friday, 1 September 2017 at 23:25:04 UTC, Jesse Phillips wrote:
I've love being able to inherit and override generic functions
in C#. Unfortunately C# doesn't use templates and I hit so many
other issues where Generics just suck.
I don't think it is appropriate to dismiss the need for the
I've love being able to inherit and override generic functions in
C#. Unfortunately C# doesn't use templates and I hit so many
other issues where Generics just suck.
I don't think it is appropriate to dismiss the need for the
compiler to generate a virtual function for every instantiated T,
This happens when building, not running. This might be a Visual D
issue as when I use dmd from the command line, it works fine ;/
On Friday, 1 September 2017 at 19:25:53 UTC, Adam D Ruppe wrote:
On Friday, 1 September 2017 at 18:17:22 UTC, EntangledQuanta
wrote:
I get an access violation, changed the code to
What is the rest of your code? access violation usually means
you didn't new the class...
No, that is the
On Friday, 1 September 2017 at 18:17:22 UTC, EntangledQuanta
wrote:
I get an access violation, changed the code to
What is the rest of your code? access violation usually means you
didn't new the class...
On Friday, 1 September 2017 at 15:24:39 UTC, Adam D. Ruppe wrote:
static foreach is now in the new release! You can now do stuff
like:
---
alias I(A...) = A;
interface Foo {
static foreach(T; I!(int, float))
void set(T t); // define virt funcs for a list
of types
}
static foreach is now in the new release! You can now do stuff
like:
---
alias I(A...) = A;
interface Foo {
static foreach(T; I!(int, float))
void set(T t); // define virt funcs for a list of
types
}
class Ass : Foo {
static foreach(T; I!(int, float))
On Thursday, 31 August 2017 at 15:48:12 UTC, EntangledQuanta
wrote:
On Thursday, 31 August 2017 at 10:34:14 UTC, Kagamin wrote:
On Thursday, 31 August 2017 at 00:49:22 UTC, EntangledQuanta
wrote:
I've already implemented a half ass library solution.
It can be improved alot.
Then, by all
On Thursday, 31 August 2017 at 10:34:14 UTC, Kagamin wrote:
On Thursday, 31 August 2017 at 00:49:22 UTC, EntangledQuanta
wrote:
I've already implemented a half ass library solution.
It can be improved alot.
Then, by all means, genius!
On Thursday, 31 August 2017 at 00:49:22 UTC, EntangledQuanta
wrote:
I've already implemented a half ass library solution.
It can be improved alot.
On 08/30/2017 05:49 PM, EntangledQuanta wrote:
> The compiler can and should do this!
Yes, the compiler can do it for each compilation but there is also the
feature called /separate compilation/ that D supports. With separate
compilation, there would potentially be multiple different and
On Wednesday, 30 August 2017 at 22:52:41 UTC, Adam D. Ruppe wrote:
On Wednesday, 30 August 2017 at 20:47:12 UTC, EntangledQuanta
wrote:
This is quite surprising!
In the new version pending release (scheduled for later this
week), we get a new feature `static foreach` that will let you
loop
On Wednesday, 30 August 2017 at 22:08:03 UTC, Jonathan M Davis
wrote:
On Wednesday, August 30, 2017 21:51:57 EntangledQuanta via
Digitalmars-d- learn wrote:
[...]
Templates have no idea what arguments you intend to use with
them. You can pass them any arguments you want, and as long as
they
On Wednesday, 30 August 2017 at 20:47:12 UTC, EntangledQuanta
wrote:
This is quite surprising!
In the new version pending release (scheduled for later this
week), we get a new feature `static foreach` that will let you
loop through the types you want and declare all the functions
that way.
On Wednesday, 30 August 2017 at 22:08:03 UTC, Jonathan M Davis
wrote:
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
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
On Wednesday, 30 August 2017 at 21:33:30 UTC, Jonathan M Davis
wrote:
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
On Wednesday, 30 August 2017 at 20:47:12 UTC, EntangledQuanta
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, 30 August 2017 at 21:13:19 UTC, Kagamin wrote:
It can't work this way. You can try std.variant.
Sure it can! What are you talking about! std.variant has nothing
to do with it! It works if T is hard coded, so it should work
generically. What's the point of templates variables if
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
> {
>
It can't work this way. You can try std.variant.
On Fri, Aug 11, 2017 at 11:34:04PM +, Adam D. Ruppe via Digitalmars-d-learn
wrote:
> On Friday, 11 August 2017 at 22:43:02 UTC, Mr. Pib wrote:
> > int and I should be able to append an int without having to worry
> > about the value of the int.
>
> Appending an int to a string really ought
On Friday, 11 August 2017 at 23:34:04 UTC, Adam D. Ruppe wrote:
On Friday, 11 August 2017 at 22:43:02 UTC, Mr. Pib wrote:
int and I should be able to append an int without having to
worry about the value of the int.
Appending an int to a string really ought to just be a type
mismatch error.
On Friday, 11 August 2017 at 22:43:02 UTC, Mr. Pib wrote:
int and I should be able to append an int without having to
worry about the value of the int.
Appending an int to a string really ought to just be a type
mismatch error.
We might be able to convince the leadership to do that too,
On Friday, 11 August 2017 at 22:50:53 UTC, ketmar wrote:
Mr. Pib wrote:
Wow, that is pretty screwed up! I thought D was against
implicit conversions that might cause problems? I'm passing
an int and I should be able to append an int without having to
worry about the value of the int.
Mr. Pib wrote:
Wow, that is pretty screwed up! I thought D was against implicit
conversions that might cause problems? I'm passing an int and I should
be able to append an int without having to worry about the value of the
int. Instead D chose to do something very strange, awkward, and error
On Friday, 11 August 2017 at 04:17:32 UTC, ketmar wrote:
Mr. Pib wrote:
string Q(alias T, alias D)()
{
pragma(msg, T);
pragma(msg, D);
enum x = T~" = "~D~";";
pragma(msg, x);
}
mixin(Q!(`x`, 100)());
outputs, at compile time,
x
100
x = d;
there is no
Mr. Pib wrote:
string Q(alias T, alias D)()
{
pragma(msg, T);
pragma(msg, D);
enum x = T~" = "~D~";";
pragma(msg, x);
}
mixin(Q!(`x`, 100)());
outputs, at compile time,
x
100
x = d;
there is no lowercase d. I did initially define Q as
string Q(alias T, D)(D
On 03-08-17 23:11, Johnson Jones wrote:
On Thursday, 3 August 2017 at 21:00:17 UTC, Mike Wey wrote:
On 03-08-17 22:40, Johnson Jones wrote:
Ok, so, I linked the gtk to the msys gtk that I installed before when
trying to get glade to work and it worked!
seems that msys is much more up to date
On Thursday, 3 August 2017 at 21:00:17 UTC, Mike Wey wrote:
On 03-08-17 22:40, Johnson Jones wrote:
Ok, so, I linked the gtk to the msys gtk that I installed
before when trying to get glade to work and it worked!
seems that msys is much more up to date than anything else as
it just works(I
On 03-08-17 22:40, Johnson Jones wrote:
Ok, so, I linked the gtk to the msys gtk that I installed before when
trying to get glade to work and it worked!
seems that msys is much more up to date than anything else as it just
works(I need to remember than in the future).
The problem I see is
On Thursday, 3 August 2017 at 15:11:46 UTC, Mike Wey wrote:
On 03-08-17 05:00, Johnson Jones wrote:
On Wednesday, 2 August 2017 at 14:51:45 UTC, Mike Wey wrote:
On 02-08-17 08:04, Johnson Jones wrote:
Ok, Using msys I was able to get glade 3.20 running. Maybe
that will fix everything.
On Thursday, 3 August 2017 at 15:11:46 UTC, Mike Wey wrote:
On 03-08-17 05:00, Johnson Jones wrote:
On Wednesday, 2 August 2017 at 14:51:45 UTC, Mike Wey wrote:
On 02-08-17 08:04, Johnson Jones wrote:
Ok, Using msys I was able to get glade 3.20 running. Maybe
that will fix everything.
On Thursday, 3 August 2017 at 15:11:46 UTC, Mike Wey wrote:
On 03-08-17 05:00, Johnson Jones wrote:
On Wednesday, 2 August 2017 at 14:51:45 UTC, Mike Wey wrote:
On 02-08-17 08:04, Johnson Jones wrote:
Ok, Using msys I was able to get glade 3.20 running. Maybe
that will fix everything.
On 03-08-17 05:00, Johnson Jones wrote:
On Wednesday, 2 August 2017 at 14:51:45 UTC, Mike Wey wrote:
On 02-08-17 08:04, Johnson Jones wrote:
Ok, Using msys I was able to get glade 3.20 running. Maybe that will
fix everything.
Great, unfortunately "Use msys2" seems to be the official way to
On Thursday, 3 August 2017 at 03:00:02 UTC, Johnson Jones wrote:
On Wednesday, 2 August 2017 at 14:51:45 UTC, Mike Wey wrote:
On 02-08-17 08:04, Johnson Jones wrote:
Ok, Using msys I was able to get glade 3.20 running. Maybe
that will fix everything.
Great, unfortunately "Use msys2" seems to
On Wednesday, 2 August 2017 at 14:51:45 UTC, Mike Wey wrote:
On 02-08-17 08:04, Johnson Jones wrote:
Ok, Using msys I was able to get glade 3.20 running. Maybe
that will fix everything.
Great, unfortunately "Use msys2" seems to be the official way
to install anything GTK related on windows.
On Wednesday, 2 August 2017 at 14:51:45 UTC, Mike Wey wrote:
On 02-08-17 08:04, Johnson Jones wrote:
Ok, Using msys I was able to get glade 3.20 running. Maybe
that will fix everything.
Great, unfortunately "Use msys2" seems to be the official way
to install anything GTK related on windows.
On 02-08-17 08:04, Johnson Jones wrote:
Ok, Using msys I was able to get glade 3.20 running. Maybe that will fix
everything.
Great, unfortunately "Use msys2" seems to be the official way to install
anything GTK related on windows.
--
Mike Wey
Ok, Using msys I was able to get glade 3.20 running. Maybe that
will fix everything.
On Tuesday, 1 August 2017 at 20:18:19 UTC, Mike Wey wrote:
On 01-08-17 21:44, Johnson Jones wrote:
On Tuesday, 1 August 2017 at 15:20:08 UTC, Mike Wey wrote:
On 01-08-17 05:53, Johnson Jones wrote:
GtkD is currently based on GTK 3 the properties it complains
about were removed in GTK 3.0.
On 01-08-17 21:44, Johnson Jones wrote:
On Tuesday, 1 August 2017 at 15:20:08 UTC, Mike Wey wrote:
On 01-08-17 05:53, Johnson Jones wrote:
GtkD is currently based on GTK 3 the properties it complains about
were removed in GTK 3.0.
Which version of glade are you using?
The latest: Glade
On Tuesday, 1 August 2017 at 15:20:08 UTC, Mike Wey wrote:
On 01-08-17 05:53, Johnson Jones wrote:
GtkD is currently based on GTK 3 the properties it complains
about were removed in GTK 3.0.
Which version of glade are you using?
The latest: Glade 3.8.5
On 01-08-17 05:53, Johnson Jones wrote:
GtkD is currently based on GTK 3 the properties it complains about were
removed in GTK 3.0.
Which version of glade are you using?
--
Mike Wey
On 07/29/2017 03:54 AM, Cecil Ward wrote:
Is it my bug, or a compiler bug? (name clash at link-time?):
void main()
{
{
immutable static dstring str1 = "a";
}
{
immutable static dstring str1 = "b";
}
}
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 Saturday, 29 July 2017 at 01:54:29 UTC, Cecil Ward 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 d.godbolt.org. (Is there
On 07/26/2017 04:51 AM, closescreen wrote:
> I have a file with empty lines: 2,3 and 5,6
>
> filename.csv (with linenumbers for better view in this message)
> 1>Joe,Carpenter,30
> 2>
> 3>
> 4>Fred,Blacksmith,40
> 5>
> 6>
>
> Now, if I run:
> rdmd
>
On Thu, Mar 23, 2017 at 05:11:49PM +, Adam D. Ruppe via Digitalmars-d-learn
wrote:
> On Thursday, 23 March 2017 at 00:39:56 UTC, H. S. Teoh wrote:
> > I'm still working on that. :-)
>
> Hey, can you at least put scare quotes around "static foreach" each
> time it is used? There's no such
On Thursday, 23 March 2017 at 00:39:56 UTC, H. S. Teoh wrote:
I'm still working on that. :-)
Hey, can you at least put scare quotes around "static foreach"
each time it is used? There's no such thing as static foreach and
while we might call foreach over a typetuple "static", it isn't a
On 03/22/2017 05:39 PM, H. S. Teoh via Digitalmars-d-learn wrote:
> the article is turning out to be quite a bit longer
I said "book"; didn't I? :)
Ali
On Wed, Mar 22, 2017 at 11:12:06PM +, Jesse Phillips via
Digitalmars-d-learn wrote:
> On Friday, 17 March 2017 at 19:05:20 UTC, H. S. Teoh wrote:
> > There are actually (at least) TWO distinct phases of compilation
> > that are conventionally labelled "compile time":
> >
> > 1) Template
On Friday, 17 March 2017 at 19:05:20 UTC, H. S. Teoh wrote:
There are actually (at least) TWO distinct phases of
compilation that are conventionally labelled "compile time":
1) Template expansion / AST manipulation, and:
2) CTFE (compile-time function evaluation).
This was an awesome
On Friday, 17 March 2017 at 19:05:20 UTC, H. S. Teoh wrote:
There are actually (at least) TWO distinct phases of
compilation that are conventionally labelled "compile time":
1) Template expansion / AST manipulation, and:
2) CTFE (compile-time function evaluation).
[ ... ]
Template
On Sunday, 19 March 2017 at 00:18:15 UTC, H. S. Teoh wrote:
Haha, I don't think I'm up for writing a book... and I don't
really keep a blog either. But perhaps a writeup on
wiki.dlang.org is in order.
This particular topic, I think, is something somebody *should*
write about, because it
On Saturday, March 18, 2017 17:18:15 H. S. Teoh via Digitalmars-d-learn
wrote:
> On Fri, Mar 17, 2017 at 02:52:39PM -0700, Ali Çehreli via Digitalmars-d-
learn wrote:
> > On 03/17/2017 12:05 PM, H. S. Teoh via Digitalmars-d-learn wrote:
> > > 1) Template expansion / AST manipulation, and:
> > >
>
On Fri, Mar 17, 2017 at 02:52:39PM -0700, Ali Çehreli via Digitalmars-d-learn
wrote:
> On 03/17/2017 12:05 PM, H. S. Teoh via Digitalmars-d-learn wrote:
>
> > 1) Template expansion / AST manipulation, and:
> >
> > 2) CTFE (compile-time function evaluation).
> >
> > Not clearly understanding
On Friday, 17 March 2017 at 19:05:20 UTC, H. S. Teoh wrote:
On Fri, Mar 17, 2017 at 03:14:08PM +, Hussien via
Digitalmars-d-learn wrote: [...]
[...]
This appears to be yet another case of the term "compile-time"
causing confusion, because it's actually an ambiguous term. I
actually
On 03/17/2017 12:05 PM, H. S. Teoh via Digitalmars-d-learn wrote:
1) Template expansion / AST manipulation, and:
2) CTFE (compile-time function evaluation).
Not clearly understanding the distinction between the two often leads to
confusion and frustration at why the compiler isn't doing "what
On Fri, Mar 17, 2017 at 03:14:08PM +, Hussien via Digitalmars-d-learn wrote:
[...]
> What I am talking about is
>
> how the statement
>
> static if (x) continue;
> pragma(msg, "called");
>
> vs
>
> static if (x) { } else
> pragma(msg, "not called");
>
>
> They are both semantically
On Friday, 17 March 2017 at 15:14:08 UTC, Hussien wrote:
What I am talking about is
If you want to add a new feature, `static foreach`, that has
static continue and static break, I can get behind that, but
that's a new feature, not a bug in the existing feature. You
think it is something it
On Friday, 17 March 2017 at 14:27:25 UTC, Adam D. Ruppe wrote:
On Friday, 17 March 2017 at 13:53:58 UTC, Hussien wrote:
Yes, but you have a nested foreach loop. One runtime and one
compile time. The break goes with the runtime loop... but
NORMAL programming logic tells us that the break goes
On Friday, 17 March 2017 at 13:53:58 UTC, Hussien wrote:
Yes, but you have a nested foreach loop. One runtime and one
compile time. The break goes with the runtime loop... but
NORMAL programming logic tells us that the break goes with the
loop that it exists in.
It did. It broke the loop
On Friday, 17 March 2017 at 13:10:23 UTC, Jonathan M Davis wrote:
it looks like break and continue _are_ used at compile time,
since it prints
They are working exactly the same way as any other loop. The fact
that it is unrolled and the dead code removed from the binary is
an implementation
On Friday, 17 March 2017 at 13:10:23 UTC, Jonathan M Davis wrote:
On Friday, March 17, 2017 11:53:41 Michael via
Digitalmars-d-learn wrote:
On Friday, 17 March 2017 at 11:30:48 UTC, Jonathan M Davis
wrote:
> On Friday, March 17, 2017 01:55:19 Hussien via
> Digitalmars-d-learn wrote:
>
> I
On Friday, March 17, 2017 11:53:41 Michael via Digitalmars-d-learn wrote:
> On Friday, 17 March 2017 at 11:30:48 UTC, Jonathan M Davis wrote:
> > On Friday, March 17, 2017 01:55:19 Hussien via
> > Digitalmars-d-learn wrote:
> >
> > I tend to agree with this. If the foreach is static, and
> >
On Friday, 17 March 2017 at 11:30:48 UTC, Jonathan M Davis wrote:
On Friday, March 17, 2017 01:55:19 Hussien via
Digitalmars-d-learn wrote:
I tend to agree with this. If the foreach is static, and
continue and break are just going to be ignored, then they
should just be illegal. Allowing
On Friday, March 17, 2017 01:55:19 Hussien via Digitalmars-d-learn wrote:
> On Friday, 17 March 2017 at 01:41:47 UTC, Adam D. Ruppe wrote:
> > On Friday, 17 March 2017 at 01:34:52 UTC, Hussien wrote:
> >> Seems like continue needs to be static aware.
> >
> > That's not a bug, pragma is triggered
Dne 17.3.2017 v 02:34 Hussien via Digitalmars-d-learn napsal(a):
foreach (y; aliasSeqOf!["a", "b", "c"])
{
static if (y == "a") { }
else
pragma(msg, y);
}
works but
foreach (y; aliasSeqOf!["a", "b", "c"])
{
static if (y == "a") continue
pragma(msg, y);
}
fails.
Seems like continue needs to
On Friday, 17 March 2017 at 01:41:47 UTC, Adam D. Ruppe wrote:
On Friday, 17 March 2017 at 01:34:52 UTC, Hussien wrote:
Seems like continue needs to be static aware.
That's not a bug, pragma is triggered when the code is
*compiled*, not when it is run. The code is compiled, even if
it is
On Friday, 17 March 2017 at 01:34:52 UTC, Hussien wrote:
Seems like continue needs to be static aware.
That's not a bug, pragma is triggered when the code is
*compiled*, not when it is run. The code is compiled, even if it
is skipped over by a continue.
On 01/30/2017 11:58 AM, Profile Anaysis wrote:
Also, if one tries to create a global generator an error about PAGESIZE
not being a compile time value is given.
That means you can't initialize it statically, because PAGESIZE is not
known statically. But you can have a global (module scope,
On 01/30/2017 11:58 AM, Profile Anaysis wrote:
the code from https://dlang.org/library/std/concurrency/generator.html
gives a seg fault at the end.
import std.concurrency;
import std.stdio;
void main()
{
auto tid = spawn(
{
while (true)
{
On Thu, Jan 26, 2017 at 06:47:21PM +, Suliman via Digitalmars-d-learn wrote:
> On Thursday, 26 January 2017 at 18:42:29 UTC, Suliman wrote:
> > On Thursday, 26 January 2017 at 17:52:24 UTC, H. S. Teoh wrote:
> > > On Thu, Jan 26, 2017 at 05:38:59PM +, Suliman via
> > > Digitalmars-d-learn
On Thursday, 26 January 2017 at 18:42:29 UTC, Suliman wrote:
On Thursday, 26 January 2017 at 17:52:24 UTC, H. S. Teoh wrote:
On Thu, Jan 26, 2017 at 05:38:59PM +, Suliman via
Digitalmars-d-learn wrote:
I read docs and can't understand what's wrong. Or I am do not
understand it, or there is
On Thursday, 26 January 2017 at 17:52:24 UTC, H. S. Teoh wrote:
On Thu, Jan 26, 2017 at 05:38:59PM +, Suliman via
Digitalmars-d-learn wrote:
I read docs and can't understand what's wrong. Or I am do not
understand it, or there is come mistake.
Let's look at function
On Thu, Jan 26, 2017 at 05:38:59PM +, Suliman via Digitalmars-d-learn wrote:
> I read docs and can't understand what's wrong. Or I am do not understand it,
> or there is come mistake.
>
> Let's look at function https://dlang.org/phobos/std_stdio.html#.File.byLine
>
> auto byLine(Terminator =
On Thursday, 26 January 2017 at 17:38:59 UTC, Suliman wrote:
I read docs and can't understand what's wrong. Or I am do not
understand it, or there is come mistake.
[...]
You have to import typecons.
On 11/07/2016 06:18 PM, Alex wrote:
On Monday, 7 November 2016 at 17:12:32 UTC, Alex wrote:
dmd -c -of./app.o -debug -g -gc -O -profile -w ./app.d -vcolumns
dmd -of./app ./app.o -g -gc
Knowing this, I tried to find the option which does the difference. This
was the profile option. So, if I
On Monday, 7 November 2016 at 16:55:29 UTC, Alex wrote:
Ok... Another point is, that I'm using dub and trying compiling
my app directly by dmd does not yield the error.
So, I have to attach the compiling commands, which I see, when
tried
dub build --force -v
dmd -c -of./app.o -debug -g -gc
101 - 200 of 404 matches
Mail list logo