On Sunday, 5 June 2016 at 00:28:36 UTC, Pie? wrote:
The point I'm trying to make is that when we deal with
structures, the motions specify the structure. Most of the time
we deal with simple motions(linear/incremental).
Can D deal with the general case?
D can be made to do so, but I don't
On Saturday, 4 June 2016 at 21:52:31 UTC, AbstractGuy wrote:
On Saturday, 4 June 2016 at 17:16:45 UTC, pineapple wrote:
Won't this pattern fail if items is a type implementing
opApply and/or opApplyReverse?
opApply/ApplyReverse predates the detection of the input/bidir
range primitives. It's
https://issues.dlang.org/show_bug.cgi?id=16123
Ketmar Dark changed:
What|Removed |Added
CC|
https://issues.dlang.org/show_bug.cgi?id=16123
Issue ID: 16123
Summary: alias member of member
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
In a mathematical space we can define operators that allow us to
move around in it. Take your typical Euclidean N space. We can
define a set of orthogonal motions for each dimension. These can
be represented by vectors(your typical orthogonal matrix),
derivatives(infinitesimal differential
On 06/04/2016 05:05 PM, poliklosio wrote:
I need to throw some exceptions in my code, but I don't want to ever
care about the garbage collector.
I have seen some solutions to throwing exceptions in nogc code, but only
toy examples, like
https://p0nce.github.io/d-idioms/#Throwing-despite-@nogc
I need to throw some exceptions in my code, but I don't want to
ever care about the garbage collector.
I have seen some solutions to throwing exceptions in nogc code,
but only toy examples, like
https://p0nce.github.io/d-idioms/#Throwing-despite-@nogc
The solution sort of works, but doesn't
On Saturday, 4 June 2016 at 18:58:51 UTC, Brad Anderson wrote:
On Saturday, 4 June 2016 at 18:55:09 UTC, Brad Anderson wrote:
On Saturday, 4 June 2016 at 18:20:26 UTC, Alex wrote:
[...]
Check out enumerate() in std.range;
Ah! thanks!
int counter = 5;
foreach(i, el;
https://issues.dlang.org/show_bug.cgi?id=16122
Issue ID: 16122
Summary: user-friendly CLI interface for dmd
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
https://issues.dlang.org/show_bug.cgi?id=16121
ag0ae...@gmail.com changed:
What|Removed |Added
CC||ag0ae...@gmail.com
--- Comment #1 from
On Saturday, 4 June 2016 at 17:16:45 UTC, pineapple wrote:
Won't this pattern fail if items is a type implementing opApply
and/or opApplyReverse?
opApply/ApplyReverse predates the detection of the input/bidir
range primitives. It's specified in the language. If an aggregate
implements both
https://issues.dlang.org/show_bug.cgi?id=16121
Issue ID: 16121
Summary: the canonical way to create and use an exception type
is not documented on dlang.org
Product: D
Version: D2
Hardware: All
URL:
On Saturday, 4 June 2016 at 17:35:23 UTC, Seb wrote:
In Phobos (especially in std.algorithm) a lot of specialization
between a RandomAccessRange and an InputRange are used even
though only an InputRange is required. The reason for this is
solely performance - imho we should start to tackle
https://issues.dlang.org/show_bug.cgi?id=12558
--- Comment #15 from Andrei Alexandrescu ---
Yes, catching Errors should always be explicit.
--
On 6/4/16 2:33 PM, Vladimir Panteleev wrote:
On Saturday, 4 June 2016 at 16:10:14 UTC, Seb wrote:
Imho it's quite impressive that he still pushes the project and as Adam
correctly said - we need to make a decision and have a clear deadline
like 2.072 will be the last documentation build with
On 6/4/16 2:23 PM, Sönke Ludwig wrote:
Am 04.06.2016 um 19:01 schrieb Andrei Alexandrescu:
I recall there were a few issues with ddox rendering up until relatively
recently, have all been fixed?
I think they have. Vladimir has reported a bunch of them over time and
all of those have been
On Saturday, 4 June 2016 at 17:35:23 UTC, Seb wrote:
ldc does the job (nearly) correctly.
Scratch the "nearly" – at least you can't infer that from the
performance results alone, the differences are well within the
run-to-run noise.
dmd -release -O -boundscheck=off test_looping.d &&
On Saturday, 4 June 2016 at 18:55:09 UTC, Brad Anderson wrote:
On Saturday, 4 June 2016 at 18:20:26 UTC, Alex wrote:
[...]
Check out enumerate() in std.range;
int counter = 5;
foreach(i, el; enumerate(randomCover(iota(counter
writeln("index: ", i, " element: ", el);
On Saturday, 4 June 2016 at 18:20:26 UTC, Alex wrote:
Hi all!
Could you help me clearify why a iota can't be accessed with
two arguments in a foreach loop?
following tests show my problem:
What does work:
int[] ku = [0, 1, 2, 3, 4];
foreach(i, el; ku)
writeln("index: ", i, "
On Saturday, 4 June 2016 at 16:36:18 UTC, Artem Tarasov wrote:
Embedding is easy indeed, and it is rather fun (also speaking
from experience), but it again shifts the focus towards D,
while most people would like to call D from R, and that's where
things start to go awry, especially once you
On Saturday, 4 June 2016 at 16:10:14 UTC, Seb wrote:
Imho it's quite impressive that he still pushes the project and
as Adam
correctly said - we need to make a decision and have a clear
deadline like 2.072 will be the last documentation build with
ddoc, once it's released we will remove the
PPS: The error shown is in line with the iota inside foreach:
Error: cannot infer argument types, expected 1 argument, not 2
Hi all!
Could you help me clearify why a iota can't be accessed with two
arguments in a foreach loop?
following tests show my problem:
What does work:
int[] ku = [0, 1, 2, 3, 4];
foreach(i, el; ku)
writeln("index: ", i, " element: ", el);
What does not work:
counter = 5;
Am 04.06.2016 um 19:01 schrieb Andrei Alexandrescu:
I recall there were a few issues with ddox rendering up until relatively
recently, have all been fixed?
I think they have. Vladimir has reported a bunch of them over time and
all of those have been fixed.
I don't see these options
On Saturday, 4 June 2016 at 16:10:26 UTC, Martin Nowak wrote:
Useful? What do you think? Anyone volunteering?
Generally I'm not a fan of bloating things up with JavaScript
widgets. Perhaps only if there is a lot of demand for this?
Perhaps we should improve editor support instead. For my
On Saturday, 4 June 2016 at 16:10:26 UTC, Martin Nowak wrote:
I'm finding myself writing a lot of selective imports nowaday,
while also browsing the documentation (sometimes even using
dman).
I though it might be a nice to have a
"copy-as-selective-import" button
next to the anchor link.
On 06/04/2016 07:25 PM, Sönke Ludwig wrote:
I think ideally we could do something like introducing a special
"Cheatsheet" section or macro for each function that DDOX could
aggregate or use instead of the normal short description. Also
interesting (although less so since we started using sub
In Phobos (especially in std.algorithm) a lot of specialization
between a RandomAccessRange and an InputRange are used even
though only an InputRange is required.
The reason for this is solely performance - imho we should start
to tackle this and remove such specializations. Let's create
On 06/04/2016 07:32 AM, pineapple wrote:
> It would be fantastic if I could write this -
>
> static if(forward){
> foreach(item; items) dostuff();
> }else{
> foreach_reverse(item; items) dostuff();
> }
>
> as something like this -
>
> foreach!forward(item; items)
Am 04.06.2016 um 19:18 schrieb ag0aep6g:
On 06/04/2016 07:01 PM, Andrei Alexandrescu wrote:
* The cheat sheet made sense for the single-page docs but not for the
new ones. Consider e.g.
http://dlang.org/library/std/algorithm/comparison.html - it's two tables
with the same row headings one after
On Saturday, 4 June 2016 at 15:43:01 UTC, Mihail K wrote:
As far as I recall, foreach_reverse is deprecated in favour of
range operations.
ie.
import std.algorithm, std.range;
static if(forward)
{
items.each!(item => doStuff());
}
else
{
items.retro.each!(item =>
On 06/04/2016 07:01 PM, Andrei Alexandrescu wrote:
* The cheat sheet made sense for the single-page docs but not for the
new ones. Consider e.g.
http://dlang.org/library/std/algorithm/comparison.html - it's two tables
with the same row headings one after another. The information should be
On 06/04/2016 12:10 PM, Seb wrote:
More than two and half years ago, Sönke added ddox builds for the Phobos
documentation. We all know that there are many reasons for ddox - being
able to generate single pages for methods is just one, it also
eliminates all the JavaScript hacks (e.g. the
On 06/04/2016 05:02 PM, chmike wrote:
Is it possible to instantiate immutable objects by using emplace
Yes. I'm not sure, but the memory may have to be untyped for the emplace
call to avoid mutating immutable data. I.e., call emplace with void[],
not with a pointer whose target is already
On Saturday, 4 June 2016 at 15:51:22 UTC, Alex Parrill wrote:
(It also doesn't help that many "thread-safe" functions in D
aren't marked as shared where they really ought to be, ex. all
the functions in core.sync.mutex)
And you have to be continuously casting the methods of Mutex,
Thread,
On Sat, Jun 4, 2016 at 5:56 PM, bachmeier via Digitalmars-d <
digitalmars-d@puremagic.com> wrote:
>
>
> D integrates quite easily with R. I speak from experience, regularly using
> the two together. You can embed R inside your D program and pass data
> trivially between them. The technical side is
https://issues.dlang.org/show_bug.cgi?id=16120
Issue ID: 16120
Summary: dmd does not inline simple range primitives
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
I'm finding myself writing a lot of selective imports nowaday, while
also browsing the documentation (sometimes even using dman).
I though it might be a nice to have a "copy-as-selective-import" button
next to the anchor link.
Then once you find what you've been looking for, e.g.
Hi,
I try to create objects by using the factory method in a static
library scenario.
file base.d
---
module base;
class Base { }
Object createObject(string name)
{
return Object.factory(name);
}
---
file child.d
More than two and half years ago, Sönke added ddox builds for the
Phobos documentation. We all know that there are many reasons for
ddox - being able to generate single pages for methods is just
one, it also eliminates all the JavaScript hacks (e.g. the
quickindex menu, anchors, ...) that we
On Saturday, 4 June 2016 at 15:27:53 UTC, xky wrote:
Hi! First, thank you to those who always answers.
I got some DataURL string(it's png image) like this...
On Saturday, 4 June 2016 at 13:18:02 UTC, Artem Tarasov wrote:
which is dynamic languages. PyD is only barely alive, and
nobody seems to be interested to take it to the next level—of
making it easy to distribute the created packages.
D integrates quite easily with R. I speak from experience,
On Saturday, 4 June 2016 at 15:11:51 UTC, tcak wrote:
If you ignore the discouraged __gshared keyword, to be able to
share a variable between threads, you need to be using "shared"
keyword.
While designing your class with "shared" methods, the compiler
directly assumes that objects of this
On Saturday, 4 June 2016 at 14:32:23 UTC, pineapple wrote:
It would be fantastic if I could write this -
static if(forward){
foreach(item; items) dostuff();
}else{
foreach_reverse(item; items) dostuff();
}
as something like this -
foreach!forward(item; items)
On Saturday, 4 June 2016 at 00:41:33 UTC, Meta wrote:
On Friday, 11 October 2013 at 00:36:12 UTC, Andrei Alexandrescu
wrote:
Today I committed the first 5112 lines of D code to Facebook's
repository. The project is in heavy daily use at Facebook.
Compared to the original version (written in
On Saturday, 4 June 2016 at 02:10:57 UTC, Adam D. Ruppe wrote:
On Saturday, 4 June 2016 at 01:04:08 UTC, Pie? wrote:
alias this pImage;
It is actually `alias pImage this;`
That should do what you want right here. Then you can add your
own methods or wrap/disable the image ones one by
Hi! First, thank you to those who always answers.
I got some DataURL string(it's png image) like this...
So, i used std.base64
On Saturday, 4 June 2016 at 02:22:37 UTC, Adam D. Ruppe wrote:
On Friday, 3 June 2016 at 20:06:50 UTC, Pie? wrote:
Thanks! It is working. A few issues with my images being
clipped and not throwing when file doesn't exist...
That's weird.. I don't know what's going on there.
BTW have you seen
On Saturday, 4 June 2016 at 10:02:44 UTC, bob belcher wrote:
On Saturday, 4 June 2016 at 03:05:59 UTC, Seb wrote:
On Saturday, 4 June 2016 at 01:27:46 UTC, Mike Parker wrote:
On Saturday, 4 June 2016 at 00:55:33 UTC, Pie? wrote:
Has anyone gathered up all the cool tricks one can do in D?
If you ignore the discouraged __gshared keyword, to be able to
share a variable between threads, you need to be using "shared"
keyword.
While designing your class with "shared" methods, the compiler
directly assumes that objects of this class must be protected
against threading problems.
On Friday, 3 June 2016 at 21:04:41 UTC, ag0aep6g wrote:
Thank you ag0aep6g, especially for the missing shared in my
static this !
Since I'm implementing a (hopefully useful) library, it would be
unpleasant for users to have to cast away shared to print the
info.
It works with immutable at
https://issues.dlang.org/show_bug.cgi?id=15768
--- Comment #1 from github-bugzi...@puremagic.com ---
Commits pushed to stable at https://github.com/dlang/phobos
https://github.com/dlang/phobos/commit/92eed4f45ed01a5d1f975fb23859ea63473e6f5e
Warn about Issue 15768
On Saturday, 4 June 2016 at 13:18:02 UTC, Artem Tarasov wrote:
The largest blocking point to me is the community attitude. D
constantly wants to 'rule them all' instead of integrating with
other language ecosystems. This only recently started to
change, but only towards C/C++ and not in the
On Saturday, 4 June 2016 at 08:27:53 UTC, Russel Winder wrote:
On Sun, 2016-05-29 at 14:01 +0200, Jordi Sayol via
Digitalmars-d-learn wrote:
[…]
https://github.com/nomad-software/tkd
I am not a great fan of tk even in Python. It is true that Tk
is everywhere and so meets the portability
On 06/03/2016 05:43 PM, Vladimir Panteleev wrote:
On Thursday, 26 May 2016 at 16:38:16 UTC, Andrei Alexandrescu wrote:
If Vladimir is okay with auto-deployment I'm okay too. Move fast!
This is now live. (Perhaps it should be posted in Announce?)
This is awesome, thank you guys for making it
It would be fantastic if I could write this -
static if(forward){
foreach(item; items) dostuff();
}else{
foreach_reverse(item; items) dostuff();
}
as something like this -
foreach!forward(item; items) dostuff();
Is there any way to accomplish this?
On 30 May 2016 at 19:24, Johan Engelen via Digitalmars-d-announce
wrote:
> On Sunday, 29 May 2016 at 21:53:23 UTC, Martin Nowak wrote:
>>
>> Second beta for the 2.071.1 release.
>>
>> http://dlang.org/download.html#dmd_beta
>>
On 6/4/16 4:57 AM, Patrick Schluter wrote:
On Friday, 3 June 2016 at 20:18:31 UTC, Steven Schveighoffer wrote:
On 6/3/16 3:52 PM, ag0aep6g wrote:
Does it work for for char -> wchar, too?
It does not. 0x is a valid code point, and I think so are all the
other values that would result.
On 4 June 2016 at 19:14, Walter Bright via Digitalmars-d
wrote:
> On 6/3/2016 4:38 AM, Timon Gehr wrote:
>>
>> I'm sure there is some syntax that
>> will feel natural to D programmers.
>
>
> Aye, there's the rub. Nobody has found one in over 10 years, despite a lot
>
On 3 June 2016 at 10:40, Stefan Koch via Digitalmars-d
wrote:
> On Friday, 3 June 2016 at 00:31:31 UTC, Walter Bright wrote:
>
>> If they cover the cases that matter, it's good. Rust has the type system
>> annotations you want, but Rust has a reputation for being
The largest blocking point to me is the community attitude. D constantly
wants to 'rule them all' instead of integrating with other language
ecosystems. This only recently started to change, but only towards C/C++
and not in the other direction, which is dynamic languages. PyD is only
barely
Hello, all I recently need to get the integrity level of a
process but i do not know how to do.
Thank you folks for the kind words. It has been an honor to work with
you all on the D language. -- Andrei
On Friday, 3 June 2016 at 11:24:40 UTC, ag0aep6g wrote:
Finally, this is not the only argument in favor of *keeping*
autodecoding, of course. Not wanting to break user code is the
big one there, I guess.
I'm not familiar with the details of autodecoding, but one thing
strikes me about this
On Saturday, 4 June 2016 at 03:05:59 UTC, Seb wrote:
On Saturday, 4 June 2016 at 01:27:46 UTC, Mike Parker wrote:
On Saturday, 4 June 2016 at 00:55:33 UTC, Pie? wrote:
Has anyone gathered up all the cool tricks one can do in D?
There are a ton of things D can do differently that are
optimal
On 03/06/2016 20:12, Dmitry Olshansky wrote:
On 02-Jun-2016 23:27, Walter Bright wrote:
I wonder what rationale there is for Unicode to have two different
sequences of codepoints be treated as the same. It's madness.
Yeah, Unicode was not meant to be easy it seems. Or this is whatever
On Fri, 2016-06-03 at 07:12 +, Iain Buclaw via Digitalmars-d wrote:
> On Friday, 3 June 2016 at 03:17:56 UTC, Eugene Wissner wrote:
> > On Thursday, 2 June 2016 at 18:16:33 UTC, Basile B. wrote:
> > > It's also that LDC is at front end 2.070 and GDC 2.067 ;););)
> >
> >
> > GDC is actively
On Tuesday, 27 August 2013 at 19:50:03 UTC, luminousone wrote:
I was under the impression that the atomic spinlock has a lower
latency for any waiters, then a mutex when its unlocked?
I am using this for a temporary or depending on performance, a
perminate replacement for std.concurrency
On 6/4/2016 2:14 AM, Walter Bright wrote:
On 6/3/2016 4:38 AM, Timon Gehr wrote:
I'm sure there is some syntax that will feel natural to D programmers.
Aye, there's the rub. Nobody has found one in over 10 years, despite a lot of
discussion.
No one found one for Rust, either.
On 6/3/2016 4:38 AM, Timon Gehr wrote:
I'm sure there is some syntax that
will feel natural to D programmers.
Aye, there's the rub. Nobody has found one in over 10 years, despite a lot of
discussion.
On Friday, 3 June 2016 at 20:18:31 UTC, Steven Schveighoffer
wrote:
On 6/3/16 3:52 PM, ag0aep6g wrote:
On 06/03/2016 09:09 PM, Steven Schveighoffer wrote:
Except many chars *do* properly convert. This should work:
char c = 'a';
dchar d = c;
assert(d == 'a');
Yeah, that's what I meant by
On Sun, 2016-05-29 at 14:01 +0200, Jordi Sayol via Digitalmars-d-learn
wrote:
>
[…]
> https://github.com/nomad-software/tkd
>
I am not a great fan of tk even in Python. It is true that Tk is
everywhere and so meets the portability requirement, but I would still
go with Qt (well QML anyway) in
On 6/3/2016 11:17 PM, H. S. Teoh via Digitalmars-d wrote:
On Fri, Jun 03, 2016 at 08:03:16PM -0700, Walter Bright via Digitalmars-d wrote:
It works for books.
Because books don't allow their readers to change the font.
Unicode is not the font.
This madness already exists *without*
One has also to take into consideration that Unicode is the way
it is because it was not invented in an empty space. It had to
take consideration of the existing and find compromisses allowing
its adoption. Even if they had invented the perfect encoding, NO
ONE WOULD HAVE USED IT, as it would
On Tue, 2016-05-24 at 09:00 +0200, Jacob Carlborg via Digitalmars-d-
learn wrote:
>
[…]
> I think that by default Dub should not check dependencies. There
> should
> be an explicit command to install the dependencies.
Dub must check all dependencies before starting a build, the question
is
On Friday, 3 June 2016 at 20:53:32 UTC, H. S. Teoh wrote:
Even the Greek sigma has two forms depending on whether it's at
the end of a word or not -- so should it be two code points or
one? If you say two, then you'd have a problem with how to
search for sigma in Greek text, and you'd have
On Fri, Jun 03, 2016 at 08:03:16PM -0700, Walter Bright via Digitalmars-d wrote:
> On 6/3/2016 6:08 PM, H. S. Teoh via Digitalmars-d wrote:
> > It's not a hard concept, except that these different letters have
> > lookalike forms with completely unrelated letters. Again:
> >
> > - Lowercase Latin
77 matches
Mail list logo