On Monday, 12 February 2018 at 21:18:01 UTC, Jordi Sayol wrote:
El 12/02/18 a les 21:56, Martin Tschierschke via
Digitalmars-d-learn ha escrit:
I just started to play around with D again on my notebook at
home and realized,
that I have a broken installation.
Even the minimal D "hello world" thr
On Sunday, 4 February 2018 at 11:50:05 UTC, Timoses wrote:
On Thursday, 1 February 2018 at 09:01:34 UTC, Kagamin wrote:
On Wednesday, 31 January 2018 at 16:59:15 UTC, Timoses wrote:
And I would need to do what about it?
Sorry, I'm not familiar with assembly code stuff in detail.
You can try
On Tuesday, 13 February 2018 at 05:51:05 UTC, Domain wrote:
module main;
void main ()
{
writeln("Hello");
}
Of course, this won't compile, but error message is confused:
C:\Git\hello\source>dmd app.d
app.d(5): Error:
object.Error@(0): Access Violation
0x0065445A
0x006548FE
On Tuesday, February 13, 2018 05:51:05 Domain via Digitalmars-d-learn wrote:
> module main;
>
> void main ()
> {
> writeln("Hello");
> }
>
> Of course, this won't compile, but error message is confused:
>
> C:\Git\hello\source>dmd app.d
> app.d(5): Error:
> object.Error@(0): Access Violation
>
module main;
void main ()
{
writeln("Hello");
}
Of course, this won't compile, but error message is confused:
C:\Git\hello\source>dmd app.d
app.d(5): Error:
object.Error@(0): Access Violation
0x0065445A
0x006548FE
0x0064DBD3
0x004B0B90
0x004B8A02
0x00594813
0x005797E2
0x77E
On Monday, 12 February 2018 at 14:06:49 UTC, Lucia wrote:
On Tuesday, 6 February 2018 at 21:25:27 UTC, Joel wrote:
[snip]
On Tuesday, 6 February 2018 at 20:59:54 UTC, WebFreak001 wrote:
can you try
git clone https://github.com/Pure-D/workspace-d.git
cd workspace-d
dub upgrade
dub build
and t
On Tuesday, 13 February 2018 at 01:56:45 UTC, H. S. Teoh wrote:
On Tue, Feb 13, 2018 at 01:58:42AM +, Marc via
Digitalmars-d-learn wrote:
appender doesn't support string[] so in such case:
Why not? This seems to work:
import std.array;
import std.stdio;
void main()
On Monday, February 12, 2018 17:56:45 H. S. Teoh via Digitalmars-d-learn
wrote:
> On Tue, Feb 13, 2018 at 01:58:42AM +, Marc via Digitalmars-d-learn
wrote:
> > appender doesn't support string[] so in such case:
> Why not? This seems to work:
>
> import std.array;
> import std.stdio;
> v
On Tuesday, February 13, 2018 01:58:42 Marc via Digitalmars-d-learn wrote:
> appender doesn't support string[] so in such case:
> > string[] output;
> > for(...) {
> >
> >if(...) {
> >
> > output ~= str;
> >
> > }
> >
> > }
>
> Looking for avoid as many immediate allocations as possibl
On Tue, Feb 13, 2018 at 01:58:42AM +, Marc via Digitalmars-d-learn wrote:
> appender doesn't support string[] so in such case:
Why not? This seems to work:
import std.array;
import std.stdio;
void main() {
auto app = appender!(string[]);
On Tuesday, February 13, 2018 01:55:59 Marc via Digitalmars-d-learn wrote:
> Thanks for you always well-thought-out answer. I was going to
> print it with writefln() calls more than anywhere else so to
> avoid casts in all those places, which would make it ugly, I just
> used
>
> > enum foo = "a";
On Monday, 12 February 2018 at 17:29:47 UTC, Jonathan M Davis
wrote:
On Monday, February 12, 2018 17:07:50 Marc via
Digitalmars-d-learn wrote:
[...]
If you actually use the enum values anywhere other than with
anything from std.conv, std.format, or std.stdio, then when
they get converted to
appender doesn't support string[] so in such case:
string[] output;
for(...) {
if(...) {
output ~= str;
}
}
Looking for avoid as many immediate allocations as possible, what
should I use?
lobo wrote:
sure, i meant that you have to modify the second parameter accordingly. ;-)
anyway, it's good that you fixed it.
El 12/02/18 a les 21:56, Martin Tschierschke via Digitalmars-d-learn ha escrit:
> I just started to play around with D again on my notebook at home and
> realized,
> that I have a broken installation.
> Even the minimal D "hello world" throws an error at execution.
> Speicherzugriffsfehler (Speich
On Monday, 12 February 2018 at 05:37:23 UTC, ketmar wrote:
Norm wrote:
Hi,
I'm new to D so can someone explain to me what is happening
here?
void func(const char* s, char** e) {
import core.stdc.stdlib;
auto result = strtod(s, e);
}
Error: function core.stdc.stdlib.strtod (scope
On Monday, 12 February 2018 at 21:08:30 UTC, Seb wrote:
On Monday, 12 February 2018 at 20:56:11 UTC, Martin
Tschierschke wrote:
I just started to play around with D again on my notebook at
home and realized,
that I have a broken installation.
Even the minimal D "hello world" throws an error at
On Monday, 12 February 2018 at 20:56:11 UTC, Martin Tschierschke
wrote:
I just started to play around with D again on my notebook at
home and realized,
that I have a broken installation.
Even the minimal D "hello world" throws an error at execution.
Speicherzugriffsfehler (Speicherabzug geschrie
I just started to play around with D again on my notebook at home
and realized,
that I have a broken installation.
Even the minimal D "hello world" throws an error at execution.
Speicherzugriffsfehler (Speicherabzug geschrieben) aka. core dump
Compiling with ldc2 still works.
Any hint?
On Monday, February 12, 2018 17:07:50 Marc via Digitalmars-d-learn wrote:
> If I have an enum like this:
> > enum S : string {
> >
> > foo = "a",
> > baa = "b"
> >
> >}
>
> when I printed it, to my surprise I get the enum field name
>
> rather value:
> > writefln("%s v%s", S.foo, S.baa);
>
> outpu
If I have an enum like this:
enum S : string {
foo = "a",
baa = "b"
}
when I printed it, to my surprise I get the enum field name
rather value:
writefln("%s v%s", S.foo, S.baa);
output:
foo vbaa
instead of
a vb
a cast solves it but without cast everywhere I
On Monday, 12 February 2018 at 15:51:58 UTC, Marc wrote:
the warning is:
Non-selected package lnk is available with version ~>0.2.1.
What does it mean by *Non-selected* package lnk is available?
from what I could tell from the page, it's highest version.
But I've tried low versions anyway to
On Monday, 12 February 2018 at 15:51:58 UTC, Marc wrote:
the warning is:
Non-selected package lnk is available with version ~>0.2.1.
What does it mean by *Non-selected* package lnk is available?
from what I could tell from the page, it's highest version.
But I've tried low versions anyway to
the warning is:
Non-selected package lnk is available with version ~>0.2.1.
What does it mean by *Non-selected* package lnk is available?
from what I could tell from the page, it's highest version.
But I've tried low versions anyway to see if it Works 0.2.0,
0.1.1 etc and none did.
I notici
On Monday, 12 February 2018 at 02:05:16 UTC, aliak wrote:
From spec: Cast expression: "cast ( Type ) UnaryExpression"
converts UnaryExpresssion to Type.
And https://dlang.org/spec/operatoroverloading.html#cast makes
no mention of the return type of opCast. One could think that
the return type
On Tuesday, 6 February 2018 at 21:25:27 UTC, Joel wrote:
[snip]
On Tuesday, 6 February 2018 at 20:59:54 UTC, WebFreak001 wrote:
can you try
git clone https://github.com/Pure-D/workspace-d.git
cd workspace-d
dub upgrade
dub build
and then put the resulting path of the executables in your
user
On Monday, 12 February 2018 at 11:25:40 UTC, Simen Kjærås wrote:
I'm sorry, I was apparently unclear. When I said 'static array'
above, I meant 'static member'.
Since we've been using arrays in our examples, there could be
conflation of ideas there. The fact that you can access (and
even modi
On Monday, 12 February 2018 at 09:58:13 UTC, Alex wrote:
On Monday, 12 February 2018 at 09:37:56 UTC, Simen Kjærås wrote:
Not really, since D doesn't have a concept of an address
associated with a type, only with instances of it. So when you
use a static array, the address is hard-coded.
--
On Monday, 12 February 2018 at 05:33:16 UTC, Norm wrote:
I thought inout was supposed to take const or non-const
variants, so expected the original const char* s to work.
The problem is in argument e: it's mutable, and strtod stores
there a part of s, if s is const you end up with const data
On Monday, 12 February 2018 at 09:37:56 UTC, Simen Kjærås wrote:
Not really, since D doesn't have a concept of an address
associated with a type, only with instances of it. So when you
use a static array, the address is hard-coded.
--
Simen
Ok... so the query on ptr on a static is not to
On Monday, 12 February 2018 at 09:10:52 UTC, Alex wrote:
A more extreme example: You have a compiled library, and some
.di (header) files. In one of those files is this code:
struct S {
static int[] arr;
void foo();
}
Now how should Typedef go about making foo() do the right
thing? E
On Monday, 12 February 2018 at 08:51:14 UTC, Simen Kjærås wrote:
I agree that'd be nice. Sadly, it's not a reasonable
expectation. :(
:)
A more extreme example: You have a compiled library, and some
.di (header) files. In one of those files is this code:
struct S {
static int[] arr;
On Monday, 12 February 2018 at 08:42:42 UTC, rikki cattermole
wrote:
https://dlang.org/spec/template.html#TemplateThisParameter
Cheers.
On Monday, 12 February 2018 at 08:35:05 UTC, Nathan S. wrote:
For example in std.container.rbtree:
---
auto equalRange(this This)(Elem e)
{
auto beg = _firstGreaterEqual(e);
alias RangeType = RBRange!(typeof(beg));
if (beg is _end || _less(e, beg.value))
On Sunday, 11 February 2018 at 19:33:23 UTC, Alex wrote:
On Sunday, 11 February 2018 at 15:18:11 UTC, Simen Kjærås wrote:
Basically, Typedef looks like this:
struct Typedef(T) {
T _payload;
// Forward method calls, member access, etc, to _payload.
}
If T looks like this:
struct T {
Hi Joe,
I suggest you watch this video which explains how the parse time
visitors work: https://www.youtube.com/watch?v=tK072jcoWv4 .
On Tuesday, 6 February 2018 at 12:03:06 UTC, joe wrote:
Hello everybody!
Last week end I found this post (
https://dlang.org/blog/2017/08/01/a-dub-case-study
On 12/02/2018 8:35 AM, Nathan S. wrote:
For example in std.container.rbtree:
---
auto equalRange(this This)(Elem e)
{
auto beg = _firstGreaterEqual(e);
alias RangeType = RBRange!(typeof(beg));
if (beg is _end || _less(e, beg.value))
// no values
For example in std.container.rbtree:
---
auto equalRange(this This)(Elem e)
{
auto beg = _firstGreaterEqual(e);
alias RangeType = RBRange!(typeof(beg));
if (beg is _end || _less(e, beg.value))
// no values are equal
return RangeType(beg, beg
On Monday, 12 February 2018 at 06:16:21 UTC, rumbu wrote:
writeln(a++) translates to:
A copy = a;
a.opUnary!"++";
writeln(copy);
copy.a[] and a.a[] are the same reference, you increment
a.a[0]/copy.a[0] in opUnary
to make this work you will need a postblit constructor:
struct A
{
39 matches
Mail list logo