On Wednesday, 27 June 2018 at 02:39:49 UTC, Shigeki Karita wrote:
import std.stdio;
import std.conv;
void main() {
int i;
try {
readf("%d\n", ); // "a"
} catch (ConvException e) {
auto s = readln();
writeln(s); // "aa", "aaa" or SEGV ???
}
}
https://issues.dlang.org/show_bug.cgi?id=18724
Seb changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://issues.dlang.org/show_bug.cgi?id=18721
Seb changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
On Tuesday, 26 June 2018 at 01:52:42 UTC, Ali Çehreli wrote:
I've made some online improvements to "Programming in D" since
September 2017.
[...]
Thank you! One great book which I have read!
import std.stdio;
import std.conv;
void main() {
int i;
try {
readf("%d\n", ); // "a"
} catch (ConvException e) {
auto s = readln();
writeln(s); // "aa", "aaa" or SEGV ???
}
}
https://wandbox.org/permlink/NMYNjpOgQtfUprBQ
I just want to retry reading if
https://issues.dlang.org/show_bug.cgi?id=17423
--- Comment #10 from Walter Bright ---
This example actually works now, see https://github.com/dlang/dmd/pull/8408
--
On Tuesday, 26 June 2018 at 22:16:28 UTC, Jonathan M Davis wrote:
If what you're asking is whether it's possible for a template
constraint that uses something like isSomeString will ever
match a user-defined type, then the answer is no.
Thats exactly what I wanted xD.
My idea was that if
On Tuesday, 26 June 2018 at 16:17:03 UTC, Timoses wrote:
Doesn't it already offer it?
Here https://dlang.org/spec/hash-map.html
in the very top right corner you can diverge from master.
However it seems a bit bugged that when selecting something
else than master, it suddenly prints master
On Tuesday, 26 June 2018 at 16:54:11 UTC, Steven Schveighoffer
wrote:
On 6/26/18 12:48 PM, Steven Schveighoffer wrote:
On 6/26/18 11:51 AM, H. S. Teoh wrote:
On Tue, Jun 26, 2018 at 07:25:09AM +, Mike Franklin via
Digitalmars-d wrote:
[...]
I think the documentation gets published
On Tuesday, 26 June 2018 at 17:12:37 UTC, H. S. Teoh wrote:
On Tue, Jun 26, 2018 at 12:54:11PM -0400, Steven Schveighoffer
via Digitalmars-d wrote: [...]
1. The dlang.org repository is backwards -- master generates
the docs for the default dlang.org. I've brought this up
before, still don't
n Tuesday, June 26, 2018 17:14:08 SrMordred via Digitalmars-d-learn wrote:
> Is possible to make a Custom Struct String work for D string
> constraints?
>
> eg:
>
> struct MyString
> {
> char[] arr;
> alias arr this;
> }
>
> void getString( char[] str ){}
>
> MyString().split(";");
On Tuesday, June 26, 2018 19:03:20 kdevel via Digitalmars-d-learn wrote:
> On Monday, 25 June 2018 at 22:58:41 UTC, Jonathan M Davis wrote:
> > On Monday, June 25, 2018 19:40:30 kdevel via
> >
> > Digitalmars-d-learn wrote:
> >> R r;
> >>
> >> if (r.s is null)
> >>
> >>throw new
On Tuesday, 26 June 2018 at 20:47:27 UTC, Steven Schveighoffer
wrote:
Naming the hook for `put` the same thing as the global function
was one of the biggest mistakes in the range library. I almost
think we would be better off to deprecate that and pick another
hook name.
If you ever do that
On 6/26/18 6:01 AM, ag0aep6g wrote:
On line 23, you're apparently trying to call std.range.put (which would
in turn call tarr[t].put). But being in a method that is itself called
"put", that line is instead interpreted as a recursive call (which
fails). To refer to std.range.put, you have to
On Tuesday, 26 June 2018 at 14:32:59 UTC, Nathan S. wrote:
On Monday, 25 June 2018 at 19:40:30 UTC, kdevel wrote:
Is it possible
to "lower" the Nullable operations if T is a class type such
that there
is only one level of nullification?
Yes: https://run.dlang.io/is/hPxbyf
template
https://issues.dlang.org/show_bug.cgi?id=19027
Steven Schveighoffer changed:
What|Removed |Added
CC||schvei...@yahoo.com
On Monday, 25 June 2018 at 01:03:03 UTC, David Bennett wrote:
On Friday, 22 June 2018 at 21:37:07 UTC, Walter Bright wrote:
If someone wants to figure out how to build an uncomplicated,
straightforward, efficient implementation of text() that we
can be proud of, that would be a nice
On Tuesday, 26 June 2018 at 02:20:37 UTC, Manu wrote:
On Mon, 25 Jun 2018 at 19:10, Manu wrote:
Some code:
-
struct Entity
{
enum NumSystems = 4;
struct SystemData
{
uint start, length;
}
SystemData[NumSystems] systemData;
@property uint
On Tuesday, June 26, 2018 10:38:42 Manu via Digitalmars-d wrote:
> On Mon, 25 Jun 2018 at 20:17, Jonathan M Davis via Digitalmars-d
>
> wrote:
> > dmd's inliner is notoriously poor,
>
> I know, but it's still the reference compiler, and it should at least
> to a reasonable job at the kind of D
On Tuesday, 26 June 2018 at 17:38:42 UTC, Manu wrote:
I know, but it's still the reference compiler, and it should at
least
to a reasonable job at the kind of D code that it's
*recommended* that
users write.
I get your point, but IMO it's all about efficient allocation of
the manpower we
On Monday, 25 June 2018 at 22:58:41 UTC, Jonathan M Davis wrote:
On Monday, June 25, 2018 19:40:30 kdevel via
Digitalmars-d-learn wrote:
R r;
if (r.s is null)
throw new Exception ("some error message");
[...]
Why can't this programming error be detected at compile time?
If
On 26 June 2018 at 20:07, Manu via Digitalmars-d
wrote:
> On Tue, 26 Jun 2018 at 10:43, Iain Buclaw via Digitalmars-d
> wrote:
>>
>> On 26 June 2018 at 19:41, Manu via Digitalmars-d
>> wrote:
>> > On Mon, 25 Jun 2018 at 20:50, Nicholas Wilson via Digitalmars-d
>> > wrote:
>> >>
>> >> Then use
On 26 June 2018 at 20:26, Eugene Wissner via Digitalmars-d
wrote:
> On Tuesday, 26 June 2018 at 18:07:56 UTC, Manu wrote:
>>
>> On Tue, 26 Jun 2018 at 10:43, Iain Buclaw via Digitalmars-d
>> wrote:
>>>
>>>
>>> On 26 June 2018 at 19:41, Manu via Digitalmars-d
>>> wrote:
>>> > On Mon, 25 Jun 2018
On Tuesday, 26 June 2018 at 18:07:56 UTC, Manu wrote:
On Tue, 26 Jun 2018 at 10:43, Iain Buclaw via Digitalmars-d
wrote:
On 26 June 2018 at 19:41, Manu via Digitalmars-d
wrote:
> On Mon, 25 Jun 2018 at 20:50, Nicholas Wilson via
> Digitalmars-d wrote:
>>
>> Then use LDC! ;)
>
> Keep LDC
On Tuesday, 26 June 2018 at 12:58:29 UTC, Adam D. Ruppe wrote:
On Tuesday, 26 June 2018 at 12:40:05 UTC, phs wrote:
Although, it's a little bit strange because I have never had
this issue with my C++ development.
The c++ compiler and runtime libraries are common enough that
the antivirus
On Tue, 26 Jun 2018 at 10:43, Iain Buclaw via Digitalmars-d
wrote:
>
> On 26 June 2018 at 19:41, Manu via Digitalmars-d
> wrote:
> > On Mon, 25 Jun 2018 at 20:50, Nicholas Wilson via Digitalmars-d
> > wrote:
> >>
> >> Then use LDC! ;)
> >
> > Keep LDC up to date with DMD master daily! ;)
>
>
On 06/26/2018 10:37 AM, Rib wrote:
to get get() from std.net.curl return a ubyte[] and use my http
instance, all those failed:
string link = "http://...;;
auto client = HTTP();
// set some client attributes...
auto fileContents = get!(AutoProtocol, ubyte)(link, client);
auto fileContents =
On 06/26/2018 06:24 AM, ShadoLight wrote:
> RevisionHistory on your ddili.org site?
Ok, I should be able to do that by browsing the book's repo history even
for past revisions:
https://bitbucket.org/acehreli/ddili/commits/all
> as a kind of "Quick-Reference" book to D now
I'm not sure
On 26 June 2018 at 19:41, Manu via Digitalmars-d
wrote:
> On Mon, 25 Jun 2018 at 20:50, Nicholas Wilson via Digitalmars-d
> wrote:
>>
>> Then use LDC! ;)
>
> Keep LDC up to date with DMD master daily! ;)
Like what GDC is doing (almost) ;-)
Iain.
On Mon, 25 Jun 2018 at 20:50, Nicholas Wilson via Digitalmars-d
wrote:
>
> Then use LDC! ;)
Keep LDC up to date with DMD master daily! ;)
to get get() from std.net.curl return a ubyte[] and use my http
instance, all those failed:
string link = "http://...;;
auto client = HTTP();
// set some client attributes...
auto fileContents = get!(AutoProtocol, ubyte)(link, client);
auto fileContents = get!(ubyte)(link, client);
auto
On Mon, 25 Jun 2018 at 20:17, Jonathan M Davis via Digitalmars-d
wrote:
>
> dmd's inliner is notoriously poor,
I know, but it's still the reference compiler, and it should at least
to a reasonable job at the kind of D code that it's *recommended* that
users write.
That line of code is the sort
Is possible to make a Custom Struct String work for D string
constraints?
eg:
struct MyString
{
char[] arr;
alias arr this;
}
void getString( char[] str ){}
MyString().split(";"); //oops, type mismatch
getString( MyString() ); //fine, implicit conversion
On Tue, Jun 26, 2018 at 12:54:11PM -0400, Steven Schveighoffer via
Digitalmars-d wrote:
[...]
> 1. The dlang.org repository is backwards -- master generates the docs
> for the default dlang.org. I've brought this up before, still don't
> understand why we don't use stable for the latest
On 6/26/18 12:48 PM, Steven Schveighoffer wrote:
On 6/26/18 11:51 AM, H. S. Teoh wrote:
On Tue, Jun 26, 2018 at 07:25:09AM +, Mike Franklin via
Digitalmars-d wrote:
[...]
I think the documentation gets published prematurely. The new methods
for the associative arrays should come in the
On 6/26/18 11:51 AM, H. S. Teoh wrote:
On Tue, Jun 26, 2018 at 07:25:09AM +, Mike Franklin via Digitalmars-d wrote:
[...]
I think the documentation gets published prematurely. The new methods
for the associative arrays should come in the next release, scheduled
for July 1st.
On Tue, Jun 26, 2018 at 04:17:03PM +, Timoses via Digitalmars-d wrote:
> On Tuesday, 26 June 2018 at 15:51:00 UTC, H. S. Teoh wrote:
[...]
> > Seriously, we need to start implementing versioned docs on dlang.org.
[...]
> Doesn't it already offer it?
>
> Here
On 06/17/2018 06:42 AM, Martin Nowak wrote:
> Glad to announce the first beta for the 2.081.0 release, ♥ to the 52
> contributors for this release.
Second Beta live now.
On Tuesday, 26 June 2018 at 15:51:00 UTC, H. S. Teoh wrote:
On Tue, Jun 26, 2018 at 07:25:09AM +, Mike Franklin via
Digitalmars-d wrote: [...]
I think the documentation gets published prematurely. The new
methods for the associative arrays should come in the next
release, scheduled for
On 6/25/18 7:13 PM, Seb wrote:
Apparently three years ago it was we decided to ban alias this and
opDispatch in the same class.
What are your thoughts on this now?
Is anyone depending on using alias this + opDispatch together like e.g.
in https://github.com/dlang/phobos/pull/6596?
My
https://issues.dlang.org/show_bug.cgi?id=18068
Thibaut CHARLES changed:
What|Removed |Added
CC||cro...@gmail.com
--
On Tue, Jun 26, 2018 at 07:25:09AM +, Mike Franklin via Digitalmars-d wrote:
[...]
> I think the documentation gets published prematurely. The new methods
> for the associative arrays should come in the next release, scheduled
> for July 1st.
When I see "DMD" and "performance" in the same sentence, my first
reaction is, "why aren't you using LDC or GDC"?
Seriously, doing performance measurements with DMD is a waste of time,
because its optimizer has been proven time and again to be suboptimal
(har!). DMD frequently produces
On Tuesday, 26 June 2018 at 14:33:25 UTC, Eugene Wissner wrote:
Tanya hashes any value, also integral types; other hashtables
probably not.
Your intuition is correct here. Most of the tables use
`typeid(key).getHash()`, which for `int` just returns `key`.
= Built-in AA =
General case:
On Monday, 25 June 2018 at 22:58:41 UTC, Jonathan M Davis wrote:
Java does try to force you to initialize stuff (resulting in
annoying false positives at times), but in general, it still
can't guarantee when a variable is null or not and is forced to
insert runtime null checks.
Java can be
https://issues.dlang.org/show_bug.cgi?id=19028
Steven Schveighoffer changed:
What|Removed |Added
CC||schvei...@yahoo.com
--- Comment #1
On Tuesday, 26 June 2018 at 09:03:10 UTC, Eugene Wissner wrote:
It seems it doesn't work with a branch in dub.sdl. I just
replaced the files in ~/.dub/packages.
And to make tanya perform better than built-in AAs in the first
test, define a hash function:
size_t hasher(int e)
{
return e;
On Monday, 25 June 2018 at 19:40:30 UTC, kdevel wrote:
Is it possible
to "lower" the Nullable operations if T is a class type such
that there
is only one level of nullification?
Yes: https://run.dlang.io/is/hPxbyf
template Nullable(S)
{
import std.traits : isPointer,
https://issues.dlang.org/show_bug.cgi?id=19026
Steven Schveighoffer changed:
What|Removed |Added
CC||schvei...@yahoo.com
--
On 2018-06-24 13:08:53 +, Rainer Schuetze said:
a new release of Visual D has just been uploaded. Major changes are
* improved Visual C++ project integration: better dependencies,
automatic libraries, name demangling
* new project wizard
* mago debugger: show vtable, dynamic type of
https://issues.dlang.org/show_bug.cgi?id=19029
Issue ID: 19029
Summary: Provide alias symbol name trait
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
BTW the output is formatted so you can get a sorted list of times
across all trials by piping the output through `sort -n`. That's
also why the tests reusing maps start with ( instead of [, so
they will be grouped separately.
On Tuesday, 26 June 2018 at 12:19:16 UTC, Jonathan M Davis wrote:
On Tuesday, June 26, 2018 11:28:11 Radu via Digitalmars-d-learn
wrote:
> [...]
Ha! :) yeah I was pretty sure this will not work.
I'm looking to generate some custom wrappers and knowing when
something is really `size_t` is
On Tuesday, 26 June 2018 at 01:52:42 UTC, Ali Çehreli wrote:
I've made some online improvements to "Programming in D" since
September 2017.
http://ddili.org/ders/d.en/index.html
Ali
Hi Ali,
Thanks for your book - it is the definitive go-to resource for D
newcomers as well as
On Tuesday, 26 June 2018 at 01:52:42 UTC, Ali Çehreli wrote:
I've made some online improvements to "Programming in D" since
September 2017.
[snip]
+1
On Tuesday, 26 June 2018 at 12:40:05 UTC, phs wrote:
Although, it's a little bit strange because I have never had
this issue with my C++ development.
The c++ compiler and runtime libraries are common enough that the
antivirus realizes it is nothing special, but since D is more
obscure it
On Tuesday, 26 June 2018 at 12:26:45 UTC, rikki cattermole wrote:
On 27/06/2018 12:25 AM, phs wrote:
Hello. I've made a simple hello world program using dub and
dmd for Windows. Everything works well, except that every
first run after each rebuild takes around 3 seconds just to
start up. Is
Hello. I've made a simple hello world program using dub and dmd
for Windows. Everything works well, except that every first run
after each rebuild takes around 3 seconds just to start up. Is it
normal at all?
On 27/06/2018 12:25 AM, phs wrote:
Hello. I've made a simple hello world program using dub and dmd for
Windows. Everything works well, except that every first run after each
rebuild takes around 3 seconds just to start up. Is it normal at all?
Its normal if you don't add an exclusion for that
On Tuesday, June 26, 2018 11:28:11 Radu via Digitalmars-d-learn wrote:
> > I'm pretty sure that that's impossible. As I understand it, the
> > compiler basically just replaces aliases with what they refer
> > to and doesn't care what the original type was. And they
> > _definitely_ don't affect
https://issues.dlang.org/show_bug.cgi?id=12507
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=12507
--- Comment #12 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/phobos
https://github.com/dlang/phobos/commit/9b1f72d89b6db38a05b958baf2195f552fe0aa57
Fix issue 12507: SysTime.init.toString() segfaults.
On Tuesday, 26 June 2018 at 10:19:44 UTC, Jonathan M Davis wrote:
On Tuesday, June 26, 2018 09:47:44 Radu via Digitalmars-d-learn
wrote:
On Tuesday, 26 June 2018 at 09:24:15 UTC, Stefan Koch wrote:
> On Tuesday, 26 June 2018 at 09:14:11 UTC, Radu wrote:
>> Consider this
On Tuesday, June 26, 2018 09:47:44 Radu via Digitalmars-d-learn wrote:
> On Tuesday, 26 June 2018 at 09:24:15 UTC, Stefan Koch wrote:
> > On Tuesday, 26 June 2018 at 09:14:11 UTC, Radu wrote:
> >> Consider this https://run.dlang.io/is/HyY2qG
> >>
> >> ---
> >> void main()
> >> {
> >>
> >>
On Tuesday, 26 June 2018 at 10:01:06 UTC, ag0aep6g wrote:
On line 23, you're apparently trying to call std.range.put
(which would in turn call tarr[t].put). But being in a method
that is itself called "put", that line is instead interpreted
as a recursive call (which fails). To refer to
On 06/26/2018 11:35 AM, Alex wrote:
´´´
import std.range;
void main()
{
T.member.tarr.length = 42;
//put(T.member, 4); // line 6
T.member.put(4); // line 7
}
struct T
{
void put(Type)(Type t){} // line 13
static B member;
}
struct B
{
T[] tarr;
void
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
[...]
What is the status of the DIP? Is it ready to be proposed and
dicussed?
On Tuesday, 26 June 2018 at 09:24:15 UTC, Stefan Koch wrote:
On Tuesday, 26 June 2018 at 09:14:11 UTC, Radu wrote:
Consider this https://run.dlang.io/is/HyY2qG
---
void main()
{
import std.traits;
size_t s;
pragma(msg, typeof(s).stringof);
pragma(msg, mangledName!(typeof(s)));
Hi all,
I have a strange case of template recursion, which I don't know
how to solve:
´´´
import std.range;
void main()
{
T.member.tarr.length = 42;
//put(T.member, 4); // line 6
T.member.put(4); // line 7
}
struct T
{
void put(Type)(Type t){} // line 13
On Tuesday, 26 June 2018 at 09:14:11 UTC, Radu wrote:
Consider this https://run.dlang.io/is/HyY2qG
---
void main()
{
import std.traits;
size_t s;
pragma(msg, typeof(s).stringof);
pragma(msg, mangledName!(typeof(s)));
pragma(msg, mangledName!s);
}
---
It outputs:
---
ulong
On 06/26/2018 02:18 AM, Ali Çehreli wrote:
this time I *think* the index
section will be correct. :)
I meant Table of Contents will exist. :)
Ali
On 06/26/2018 12:52 AM, Martin Tschierschke wrote:
On Tuesday, 26 June 2018 at 01:52:42 UTC, Ali Çehreli wrote:
I've made some online improvements to "Programming in D" since
September 2017.
[...]
Very good, thank you, please trow it to your converter to make a ..pub
for me of it :-)
I
On Sunday, 24 June 2018 at 13:08:53 UTC, Rainer Schuetze wrote:
Hi,
a new release of Visual D has just been uploaded. Major changes
are
* improved Visual C++ project integration: better dependencies,
automatic libraries, name demangling
* new project wizard
* mago debugger: show vtable,
Consider this https://run.dlang.io/is/HyY2qG
---
void main()
{
import std.traits;
size_t s;
pragma(msg, typeof(s).stringof);
pragma(msg, mangledName!(typeof(s)));
pragma(msg, mangledName!s);
}
---
It outputs:
---
ulong
m
_D9onlineapp4mainFZ1sm
---
I'm looking for a way to
It seems it doesn't work with a branch in dub.sdl. I just
replaced the files in ~/.dub/packages.
On Tuesday, 19 June 2018 at 12:59:00 UTC, Steven Schveighoffer
wrote:
I'd recommend putting in an enhancement request in bugzilla.
Done:
https://issues.dlang.org/show_bug.cgi?id=19028
Really, this behaviour at least should be reflected in
`allMembers` and `derivedMembers` documentation.
On Tuesday, 26 June 2018 at 04:17:44 UTC, Nathan S. wrote:
On Tuesday, 26 June 2018 at 03:45:27 UTC, Seb wrote:
Did you by chance also benchmark it with other languages like
C++, Go or Rust?
I didn't since I was evaluating hashtable implementations for
use in a D application.
BTW I'm not
https://issues.dlang.org/show_bug.cgi?id=19028
Issue ID: 19028
Summary: Emit warning for identifiers starting with `__`
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
On Tuesday, 26 June 2018 at 01:52:42 UTC, Ali Çehreli wrote:
I've made some online improvements to "Programming in D" since
September 2017.
[...]
Very good, thank you, please trow it to your converter to make a
.pub for me of it :-)
On Monday, 25 June 2018 at 17:45:01 UTC, zbr wrote:
Hi, this question is not specifically D related but I'll just
ask anyway. Consider the following snippet:
void mergeSort(int[] arr, int l, int r)
{
if (l < r) // 1
{
int m = l+(r-l)/2;// 2
On Tuesday, 26 June 2018 at 07:25:09 UTC, Mike Franklin wrote:
I think the documentation gets published prematurely. The new
methods for the associative arrays should come in the next
release, scheduled for July 1st.
https://dlang.org/changelog/pending.html#require_update
Mike
Wow,
On Tuesday, 26 June 2018 at 07:05:44 UTC, Vasniktel wrote:
Hello everyone.
I am wondering about `update` and `require` properties of AAs
which are mentioned to be present here:
https://dlang.org/spec/hash-map.html#properties
However, this code doesn't compile:
```
import std.stdio;
void
On Tuesday, 26 June 2018 at 01:52:42 UTC, Ali Çehreli wrote:
I've made some online improvements to "Programming in D" since
September 2017.
[...]
This is really great that you keep this important source of
information on D and on programming-in-general up-to-date. Good
luck with the
Hello everyone.
I am wondering about `update` and `require` properties of AAs
which are mentioned to be present here:
https://dlang.org/spec/hash-map.html#properties
However, this code doesn't compile:
```
import std.stdio;
void main()
{
class C{}
int[C] aa;
auto a =
https://issues.dlang.org/show_bug.cgi?id=19026
Alex changed:
What|Removed |Added
CC||sascha.or...@gmail.com
--
https://issues.dlang.org/show_bug.cgi?id=19027
greenify changed:
What|Removed |Added
Keywords||pull
CC|
On 2018-06-25 15:29:23 +, Robert M. Münch said:
I have two foreach loops where the inner should change the iterator
(append new entries) of the outer.
foreach(a, candidates) {
foreach(b, a) {
if(...) candidates ~= additionalCandidate;
}
}
The foreach docs
87 matches
Mail list logo