On Thursday, 8 June 2017 at 01:57:47 UTC, Andrew Edwards wrote:
Ranges may be finite or infinite but, while the destination may
be unreachable, we can definitely tell how far we've traveled.
So why doesn't this work?
import std.traits;
import std.range;
void main()
{
string[string] aa;
Welcome!
On Thursday, 8 June 2017 at 07:32:44 UTC, Michael Reiland wrote:
A few questions:
- Is vibe.d the recommended way of doing web work?
Yes. Adam D. Ruppe also has some easy to use libraries that may
suit your need.
- Is that book worth purchasing?
Don't know.
- Does D have a
On Thu, 2017-06-08 at 00:23 -0700, Jonathan M Davis via Digitalmars-d-
learn wrote:
> […]
>
> release is a member of SortedRange. You don't have to import it
> separately.
> You have it automatically by virtue of the fact that sort returns a
> SortedRange. And unlike calling array, it doesn't
Thanks also to Paolo Invernizzi and ag0aep6g for answering with a
similar response. Using Mike's response as it has extra detail.
On Wed, 2017-06-07 at 20:00 +0200, Mike Wey via Digitalmars-d-learn
wrote:
> On 06/07/2017 06:50 PM, Russel Winder via Digitalmars-d-learn wrote:
> > So why isn't a
On Wednesday, 7 June 2017 at 19:45:05 UTC, ag0aep6g wrote:
You gave the argument against catching out-of-bounds errors as:
"it means an invariant is broken, which means the code
surrounding it probably makes invalid assumptions and shouldn't
be trusted."
That line of reasoning applies to
In case anyone has missed recent news, SCons seems now to work without
any problems using Python 3 (the one true Python – until Python 4,
obviously). I am using Python 3 to run all my SCons D builds.
Obviously this relates to using a checkout of the mainline Mercurial
repository and using default
https://www.reddit.com/r/programming/comments/6fz3yh/cnow_2017_competitive_advantage_with_d/
On Wed, 2017-06-07 at 20:40 +, Stefan Koch via Digitalmars-d wrote:
> On Wednesday, 7 June 2017 at 20:12:22 UTC, cym13 wrote:
>
> > It should be noted that the benchmark isn't fair, it favours
> > the sqlite3 implementation as parsing and preparing the
> > statement isn't measured. And yes,
On Thursday, June 08, 2017 04:07:22 Andrew Edwards via Digitalmars-d-learn
wrote:
> On Thursday, 8 June 2017 at 03:40:08 UTC, Jonathan M Davis wrote:
> > On Thursday, June 08, 2017 03:15:11 Andrew Edwards via
> >
> > Digitalmars-d-learn wrote:
> >> I completely understand the differences between
Hey guys,
I'm looking for a web solution that's:
1. Supported on Linux
2. Statically typed,
3. Reasonably performant,
4. Reasonably productive.
5. Simplicity (in terms of infrastructure and the language
itself).
The contenders as I see them are .Net Core, Go, and D.
I know next to nothing
On Wed, 2017-06-07 at 10:08 -0700, H. S. Teoh via Digitalmars-d-learn
wrote:
> On Wed, Jun 07, 2017 at 01:17:39PM +, Nicholas Wilson via
> Digitalmars-d-learn wrote:
> > On Wednesday, 7 June 2017 at 12:39:07 UTC, Russel Winder wrote:
> > > Are there any idiom rules as to where to put import
On Thursday, 8 June 2017 at 07:32:44 UTC, Michael Reiland wrote:
- Is vibe.d the recommended way of doing web work?
Yes
- Is that book worth purchasing?
Yes
- Does D have a good library for accessing Postgres? I see
several listed but I don't know what the most stable would be
for
On Thursday, 8 June 2017 at 07:23:27 UTC, Jonathan M Davis wrote:
release is a member of SortedRange. You don't have to import it
separately. You have it automatically by virtue of the fact
that sort returns a SortedRange. And unlike calling array, it
doesn't copy the entire range or
On Wed, 2017-06-07 at 19:39 -0700, Jonathan M Davis via Digitalmars-d-
learn wrote:
>
[…]
> Even better. I hadn't realized that such a function had been added.
>
Another import from Python. :-)
--
Russel.
=
Dr Russel
https://issues.dlang.org/show_bug.cgi?id=17483
Issue ID: 17483
Summary: std.numeric.gcd cannot inline function
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
https://issues.dlang.org/show_bug.cgi?id=17484
Issue ID: 17484
Summary: high penalty for vbroadcastsd with -mcpu=avx
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
On Friday, 9 June 2017 at 05:07:37 UTC, Ali Çehreli wrote:
On 06/08/2017 01:39 AM, Walter Bright wrote:
https://www.reddit.com/r/programming/comments/6fz3yh/cnow_2017_competitive_advantage_with_d/
Can someone verify and make corrections to my response to
LordJebbs please:
On Friday, 9 June 2017 at 01:34:14 UTC, Mike Parker wrote:
On Thursday, 8 June 2017 at 19:07:50 UTC, cym13 wrote:
Seeing that the one and only D example in the nim article is a
broken one (using static instead of enum or static immutable
for 'b') we should have started with a correct
https://issues.dlang.org/show_bug.cgi?id=17482
Issue ID: 17482
Summary: [REG 2.074] comile error: Comparing Nullable!Variant
with basic type
Product: D
Version: D2
Hardware: x86_64
OS: Linux
On Thursday, 8 June 2017 at 19:07:50 UTC, cym13 wrote:
Seeing that the one and only D example in the nim article is a
broken one (using static instead of enum or static immutable
for 'b') we should have started with a correct example before
showing the broken one... Good to know for next
On Thursday, 16 February 2017 at 21:05:51 UTC, Stefan Koch wrote:
[ ... ]
Hi there,
I just pulled another all nighter.
I found a bug in the code that was supposed to adjust the values
of || and &&.
As will as a mixup in the error messages for overlapping
slice-assignment.
Both are fixed.
I
On Thursday, 8 June 2017 at 08:36:38 UTC, Nicholas Wilson wrote:
Yes. Adam D. Ruppe also has some easy to use libraries that may
suit your need.
Indeed, my cgi.d, database.d, and postgres.d would give a
foundation.
https://github.com/adamdruppe/arsd
you download the individual files and
mysql-native is a native D client driver for MySQL/MariaDB. It works
with or without Vibe.d.
Small bugfix update:
- Fixed: #99: Update dub.sdl to allow vibe-d 0.8.* releases.
- Fixed: #111: NEWDECIMAL type returns the wrong value. Since this type
is intended as arbitrary precision, the
Ok.
So I have a BST template, and it passes my tests.
However, if you look at how I insert the data into the BST,
you'll quickly notice the problem I have.
https://dpaste.dzfl.pl/ff58876ce213
Keep in mind I just pasted that stack in there because I use it
in my last unittest at the bottom.
On 06/09/2017 05:32 AM, Mark wrote:
https://dpaste.dzfl.pl/ff58876ce213
[...]
What Id like to do is this:
auto tree = new BSTbase!int;
...
tree.insert(7);
and
auto Tree2 = new BSTbase!Aclass;
...
Tree2.insert(Aclassobject);
What I have is:
Tree.insert(7, cast(real) 7);
and
https://issues.dlang.org/show_bug.cgi?id=17478
spring changed:
What|Removed |Added
Status|NEW |RESOLVED
On 06/08/2017 01:39 AM, Walter Bright wrote:
https://www.reddit.com/r/programming/comments/6fz3yh/cnow_2017_competitive_advantage_with_d/
Can someone verify and make corrections to my response to LordJebbs please:
On Thursday, 8 June 2017 at 10:48:41 UTC, ketmar wrote:
worksforme with -O, and with -O -inline.
I forgot to mention, that I'm generating win32 output.
DMD32 D Compiler v2.074.0
On 6/7/17 12:20 PM, Olivier FAURE wrote:
On Monday, 5 June 2017 at 14:05:27 UTC, Steven Schveighoffer wrote:
I don't think this will work. Only throwing Error makes a function
nothrow. A nothrow function may not properly clean up the stack while
unwinding. Not because the stack unwinding code
https://issues.dlang.org/show_bug.cgi?id=16615
Vladimir Panteleev changed:
What|Removed |Added
See Also|
https://issues.dlang.org/show_bug.cgi?id=17479
Vladimir Panteleev changed:
What|Removed |Added
See Also|
https://issues.dlang.org/show_bug.cgi?id=17480
--- Comment #2 from Martin Tschierschke ---
Hmm, I tried
curl -fsS https://dlang.org/install.sh | bash -s dmd
But it seamed that no dub was included.
So I used sudo dpkg -i dmd_2.074.1-0_amd64.deb after downloading
it with
On 6/8/17 9:42 AM, Olivier FAURE wrote:
On Thursday, 8 June 2017 at 12:20:19 UTC, Steven Schveighoffer wrote:
Hm... if you locked an object that was passed in on the stack, for
instance, there is no guarantee the object gets unlocked.
This wouldn't be allowed unless the object was duplicated
On Thu, 2017-06-08 at 11:36 +, Stefan Koch via Digitalmars-d wrote:
>
[…]
> The Alternative is not doing SQL at all.
> But building the queries inside your code.
Exactly my point. Using SQLAlchemy made me actually enjoy writing
database code. Which I did last year having avoided it since I
On Thursday, 8 June 2017 at 12:20:19 UTC, Steven Schveighoffer
wrote:
Hm... if you locked an object that was passed in on the stack,
for instance, there is no guarantee the object gets unlocked.
This wouldn't be allowed unless the object was duplicated /
created inside the try block.
On Thursday, 8 June 2017 at 13:02:38 UTC, ag0aep6g wrote:
Catching the resulting error is @safe when you throw the int*
away. So if f is `pure` and you make sure that the arguments
don't survive the `try` block, you're good, because f
supposedly cannot have reached anything else. This is your
It seems I am on a bit of a roll getting changesets relating to D
support for SCons into an appropriate state so that they get merged
into the mainline SCons repository. So maybe now is a time to get any
"pet peeves" with D support in SCons fixed.
For myself, I am currently working on a new tool
On Thursday, 8 June 2017 at 14:27:53 UTC, Russel Winder wrote:
It seems I am on a bit of a roll getting changesets relating to
D support for SCons into an appropriate state so that they get
merged into the mainline SCons repository. So maybe now is a
time to get any "pet peeves" with D support
Hi,
This code works well with the unoptimized compilation with DMD.
import std.array;
synchronized class Obj{
private int[] arr;
void trigger(){ arr.length += 1; }
}
void main(){
auto k = new shared Obj;
k.trigger;
}
And when I use the -O option, it shows the following error in the
I've managed to narrow the problem even more:
//win32 dmd -O
class Obj{
synchronized void trigger(){ new ubyte[1]; }
}
void main(){
auto k = new shared Obj;
k.trigger;
}
This time I got a more sophisticated error message:
object.Error@(0): Access Violation
0x7272456D
https://issues.dlang.org/show_bug.cgi?id=17479
Vladimir Panteleev changed:
What|Removed |Added
CC|
https://issues.dlang.org/show_bug.cgi?id=17480
Issue ID: 17480
Summary: [Downloads]
Product: D
Version: D2
Hardware: All
URL: http://dlang.org/
OS: All
Status: NEW
Severity: enhancement
On Wednesday, 7 June 2017 at 19:16:07 UTC, Stefan Koch wrote:
On Wednesday, 7 June 2017 at 19:10:26 UTC, Ozan wrote:
On Wednesday, 7 June 2017 at 17:51:30 UTC, Stefan Koch wrote:
Hi guys
I made a small video.
Mature and heavily optimized C library vs. young D upstart.
See for yourself how it
https://issues.dlang.org/show_bug.cgi?id=17479
Vladimir Panteleev changed:
What|Removed |Added
Keywords||pull
---
realhet wrote:
On Thursday, 8 June 2017 at 10:48:41 UTC, ketmar wrote:
worksforme with -O, and with -O -inline.
I forgot to mention, that I'm generating win32 output.
DMD32 D Compiler v2.074.0
mine: GNU/Linux, 32 bit, dmd git HEAD.
https://issues.dlang.org/show_bug.cgi?id=16615
--- Comment #1 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/phobos
https://github.com/dlang/phobos/commit/71ca4c5b1428e6b4a9b2d89586cd8851c48619a6
Partial Fix For Issue 16615 - convert os pid to
On 6/7/17 9:57 PM, Andrew Edwards wrote:
Ranges may be finite or infinite but, while the destination may be
unreachable, we can definitely tell how far we've traveled. So why
doesn't this work?
import std.traits;
import std.range;
void main()
{
string[string] aa;
// what others have
On Wednesday, 7 June 2017 at 21:18:21 UTC, ketmar wrote:
Ozan wrote:
On Wednesday, 7 June 2017 at 09:44:55 UTC, Ali Çehreli wrote:
Is there an issue with the tests? Surprised that vibe.d is
not higher in the rating...
https://www.techempower.com/benchmarks/#section=data-r14=ph=fortune
https://issues.dlang.org/show_bug.cgi?id=17478
Vladimir Panteleev changed:
What|Removed |Added
CC|
On 2017-06-08 09:32, Michael Reiland wrote:
A few questions:
- Is vibe.d the recommended way of doing web work?
Yes.
- Is that book worth purchasing?
Yes.
- Does D have a good library for accessing Postgres? I see several
listed but I don't know what the most stable would be for
worksforme with -O, and with -O -inline.
https://issues.dlang.org/show_bug.cgi?id=16615
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
On Thursday, 8 June 2017 at 08:44:56 UTC, Russel Winder wrote:
But what is D's equivalent to Python's SQLAlchemy? C++ now has
sqlpp11.
Anyone doing SQL code manipulation with strings in another
language is doing it wrong. Internal DSLs FTW.
The Alternative is not doing SQL at all.
But
On 06/08/2017 11:27 AM, Olivier FAURE wrote:
Contracts are made to preempt memory corruption, and to protect against
*programming* errors; they're not recoverable because breaking a
contract means that from now on the program is in a state that wasn't
anticipated by the programmer.
Which
https://issues.dlang.org/show_bug.cgi?id=17480
greenify changed:
What|Removed |Added
CC||greeen...@gmail.com
---
https://issues.dlang.org/show_bug.cgi?id=17399
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
I want to start by stating that the discussion around being able
to throw Error from nothrow functions and the compiler
optimizations that follow is important to the thoughts below.
The other aspect of array bounds checking is that those
particular checks will not be added in -release. There
On Wednesday, 7 June 2017 at 19:03:39 UTC, David Sanders wrote:
You can use nested templates to process multiple AliasSeqs like
so:
[snip]
Interesting approach also.
On Wednesday, 7 June 2017 at 21:47:58 UTC, John Carter wrote:
On Monday, 5 June 2017 at 14:23:34 UTC, Mike Parker wrote:
https://dlang.org/blog/2017/06/05/compile-time-sort-in-d/
Seems like you have inspired people...
http://blog.zdsmith.com/posts/compiletime-sort-in-nim.html
Seeing that
https://issues.dlang.org/show_bug.cgi?id=17399
--- Comment #6 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd
https://github.com/dlang/dmd/commit/8ff0a0a185e0a7d0c04812cf916fbbe6615f792c
fix Issue 17399 - core.checkedint.addu cannot inline function
On 06/08/2017 09:07 PM, cym13 wrote:
Seeing that the one and only D example in the nim article is a broken
one (using static instead of enum or static immutable for 'b') we should
have started with a correct example before showing the broken one...
Good to know for next time.
Broken? It
On Thursday, 8 June 2017 at 13:37:41 UTC, Russel Winder wrote:
Exactly my point. Using SQLAlchemy made me actually enjoy
writing database code. Which I did last year having avoided it
Using ORM like SQLAlchemy certainly has benefits but like any
other ORM, it generates hideous SQL code,
On Thu, 2017-06-08 at 14:37 +, bachmeier via Digitalmars-d wrote:
> On Thursday, 8 June 2017 at 14:27:53 UTC, Russel Winder wrote:
> > It seems I am on a bit of a roll getting changesets relating to
> > D support for SCons into an appropriate state so that they get
> > merged into the
On Thursday, 8 June 2017 at 11:41:40 UTC, realhet wrote:
I've managed to narrow the problem even more:
//win32 dmd -O
class Obj{
synchronized void trigger(){ new ubyte[1]; }
}
void main(){
auto k = new shared Obj;
k.trigger;
}
This time I got a more sophisticated error message:
On Thursday, 8 June 2017 at 14:13:53 UTC, Steven Schveighoffer
wrote:
void foo(Mutex m, Data d) pure
{
synchronized(m)
{
// ... manipulate d
} // no guarantee m gets unlocked
}
-Steve
Isn't synchronized(m) not nothrow?
On 06/08/2017 04:02 PM, Olivier FAURE wrote:
That's true. A "pure after cleanup" function is incompatible with
catching Errors (unless we introduce a "scope(error)" keyword that also
runs on errors, but that comes with other problems).
Is pureMalloc supposed to be representative of pure
On Thu, 2017-06-08 at 14:55 +, Dejan Lekic via Digitalmars-d wrote:
> On Thursday, 8 June 2017 at 13:37:41 UTC, Russel Winder wrote:
>
> > Exactly my point. Using SQLAlchemy made me actually enjoy
> > writing database code. Which I did last year having avoided it
>
> Using ORM like
On Thursday, 8 June 2017 at 13:06:55 UTC, Ozan (O/N/S) wrote:
Your sqlite-d solution would be complete if writing sqlite
files are also possible. Ignore the SQL parsing stuff, it does
not fit in a world of fast data processing.
Writing or rather modifying sqlite-dbs is a bit harder then
On 06/08/2017 05:09 AM, Dominikus Dittes Scherkl wrote:
> Wow. Answer was actually visible before the OP. THAT is what I would
> call fast. Did you use vibe.d?
Your answer hasn't arrived yet. Using something other than vibe.d? :p
Ali
On 6/8/17 11:19 AM, Stanislav Blinov wrote:
On Thursday, 8 June 2017 at 14:13:53 UTC, Steven Schveighoffer wrote:
void foo(Mutex m, Data d) pure
{
synchronized(m)
{
// ... manipulate d
} // no guarantee m gets unlocked
}
Isn't synchronized(m) not nothrow?
You're right, it
On Thursday, 8 June 2017 at 15:35:06 UTC, Ivan Kazmenko wrote:
Perhaps a regression should be filed, or searched for, at
issues.dlang.org. I can do it, but not right now, and would be
glad if someone beats me to it.
Reported: https://issues.dlang.org/show_bug.cgi?id=17481
https://issues.dlang.org/show_bug.cgi?id=17481
Issue ID: 17481
Summary: [REG 2.069.0] synchronized: Access Violation with dmd
-O on win32
Product: D
Version: D2
Hardware: x86
OS: Windows
Status:
On 08.06.2017 14:06, Steven Schveighoffer wrote:
The issue here is that arrays are special. Arrays allow foreach(i, v;
arr) and foreach(v; arr). Ranges in general do not. So there is no way
to forward this capability via the range interface. Not only that, but
foreach(i, v; arr) is much
On Thursday, 8 June 2017 at 09:42:50 UTC, Russel Winder wrote:
In case anyone has missed recent news, SCons seems now to work
without any problems using Python 3
Nice.
I am using Python 3 to run all my SCons D builds.
Me too :)
On 06/08/2017 01:29 PM, Wulfklaue wrote:
On Thursday, 8 June 2017 at 08:39:58 UTC, Walter Bright wrote:
https://www.reddit.com/r/programming/comments/6fz3yh/cnow_2017_competitive_advantage_with_d/
Added to Hacker News ... https://news.ycombinator.com/item?id=14516927
That link doesn't work
On Thursday, 8 June 2017 at 08:39:58 UTC, Walter Bright wrote:
https://www.reddit.com/r/programming/comments/6fz3yh/cnow_2017_competitive_advantage_with_d/
Added to Hacker News ...
https://news.ycombinator.com/item?id=14516927
On Thursday, 8 June 2017 at 14:27:53 UTC, Russel Winder wrote:
It seems I am on a bit of a roll getting changesets relating to
D support for SCons into an appropriate state so that they get
merged into the mainline SCons repository. So maybe now is a
time to get any "pet peeves" with D support
On Thursday, 8 June 2017 at 20:38:33 UTC, Ali Çehreli wrote:
On 06/08/2017 01:29 PM, Wulfklaue wrote:
That link doesn't work for me. Besides, I've heard that it's
better not to click through a link as HN either rates it lower
or flags it as spam.
Not sure though, I'm just contributing to
On Thursday, 8 June 2017 at 20:38:33 UTC, Ali Çehreli wrote:
That link doesn't work for me. Besides, I've heard that it's
better not to click through a link as HN either rates it lower
or flags it as spam.
Not sure though, I'm just contributing to cargo cult... :)
Ali
Removed the old one
On 06/08/2017 02:03 PM, Wulfklaue wrote:
Removed the old one and add new one with the full youtube link:
That worked. Thanks. I recommend others not to click on the link but
search for "competitive advantage with d" on the main page instead:
https://news.ycombinator.com/news
Ali
Good day to you reader! I have a couple questions about Phobos:
1). Do I understand correctly, that there is currently no way
(aside from editing the sources of course) to efficiently (using
one underlying iteration) remove all\first element(s) from DList
based on a predicate? Can such
On 6/8/17 5:03 PM, Wulfklaue wrote:
On Thursday, 8 June 2017 at 20:38:33 UTC, Ali Çehreli wrote:
That link doesn't work for me. Besides, I've heard that it's better
not to click through a link as HN either rates it lower or flags it as
spam.
Not sure though, I'm just contributing to cargo
On Thursday, 8 June 2017 at 22:42:14 UTC, Boris-Barboris wrote:
1). Do I understand correctly, that there is currently no way
(aside from editing the sources of course) to efficiently
(using one underlying iteration) remove all\first element(s)
from DList based on a predicate?
Oh, sorry, I
Vittorio is a new friend who I met at C++Now 2017. He is also the author
of a DIP on "Value closures":
https://github.com/SuperV1234/DIPs/blob/master/DIPs/DIP.md
I'm happy that he talks favorably of D during the following chat (you
should continue watching him till the end until he
84 matches
Mail list logo