On Fri, 2014-04-25 at 17:10 +, Kagamin via Digitalmars-d-learn
wrote:
Fibers are more lightweight, they're not kernel objects. Threads
are scheduled by kernel (usually). Fibers are better if you can
get better resource usage with manual scheduling - less context
switches, or don't want
I think I have no idea what D enums are about.
Bearophile's example of some code in an email on another thread uses:
enum double p0 = 0.0045;
Now I would have written:
immutable double p0 = 0.0045;
or at the very worst:
const double p0 = 0.0045;
For me, enum means
On Fri, 2014-05-30 at 16:44 +, Andrew Brown via Digitalmars-d-learn
wrote:
GDC version 4.8.2,i guess that's my problem. This is what happens
when you let Ubuntu look after your packages.
Debian Sid has GCC 4.9 packages, but that may not help?
--
Russel.
On Sat, 2014-06-28 at 16:21 +, John Colvin via Digitalmars-d-learn
wrote:
An MPI backend for std.concurrency would be a game-changer for
D in certain scientific circles.
Pragmatically, I think this would be a good idea…
Note: I don't have much love for MPI, but it's the only practical
On Thu, 2014-07-31 at 08:40 +, Nordlöw via Digitalmars-d-learn
wrote:
Currently Emacs d-mode cannot correctly highlight
`\`
because it doesn't understand that single backslashes are
self-contained in back-quoted strings.
I believe this extract from d-mode.el
(defvar
Sorry, I missed this thread (!) till now.
On Mon, 2014-08-04 at 13:36 +, Dicebot via Digitalmars-d-learn
wrote:
On Monday, 4 August 2014 at 05:14:22 UTC, Philippe Sigaud via
Digitalmars-d-learn wrote:
I have another question: it seems I can spawn hundreds of
threads
(Heck, even
On Mon, 2014-08-04 at 16:57 +, Dicebot via Digitalmars-d-learn
wrote:
[…]
This is why I had or close remark :) Exact number almost always
depends on exact deployment layout - i.e. what other processes
are running in the system, how hardware interrupts are handled
and so on. It is
On Mon, 2014-08-04 at 18:34 +, Dicebot via Digitalmars-d-learn
wrote:
[…]
Well it is a territory not completely alien to me either ;) I am
less aware of academia research on topic though, just happen to
work in industry where it matters.
I have been out of academia now for 14 years, but
On Sun, 2014-08-10 at 04:37 +, Puming via Digitalmars-d-learn wrote:
[…]
I didn't know about that. I don't actually know much about Rust
except the hype on hackernews :-)
But nonetheless, this indicates that a serious application like a
browser is a good driving force for a language to
On Mon, 2014-08-04 at 12:25 +, Atila Neves via Digitalmars-d-learn
wrote:
I took a look and I don't really know if it's possible without
using the Emacs 24 only suggestion in the Stack Overflow
comment to your question.
As far as I can see, before that Emacs syntax tables have a
On Tue, 2014-08-12 at 23:53 +0100, Russel Winder wrote:
[…]
Per Nordlöw has offered a putative fix via a pull request. I'll check
out the claim and if it seems to be true (and I fully expect it to be
so) I'll accept the pull request. People using MELPA should see the new
package quite quickly.
On Mon, 2014-08-18 at 16:39 +, Laeeth Isharc via Digitalmars-d-learn
wrote:
Hi there.
Brief introduction, and a beginner's question.
I just started playing with D a couple of weeks ago. I have been
programming in C on and off since the late 80s, but I do finance
for a living and my
On Mon, 2014-08-18 at 17:17 +, Laeeth Isharc via Digitalmars-d-learn
wrote:
Thank to jwhear on irc who solved it for me despite claiming not
to be a pyd guru.
:-)
[…]
distutils.util.get_platform(),
[…]
Does os.uname() not provide sufficient information?
[…]
print mystruct.i
On Mon, 2014-08-18 at 19:00 +, Laeeth Isharc via Digitalmars-d-learn
wrote:
On Monday, 18 August 2014 at 18:08:59 UTC, Russel Winder via
Digitalmars-d-learn wrote:
[…]
distutils.util.get_platform(),
[…]
Does os.uname() not provide sufficient information
On Mon, 2014-08-18 at 18:59 +, Laeeth Isharc via Digitalmars-d-learn
wrote:
[…]
Thanks for the colour - I appreciate it. I have played with
numba and pypy with numpy and it seems a powerful tool for some
kinds of jobs. Perhaps it is my relative unfamiliarity with
python, but for the time
On Mon, 2014-08-18 at 23:16 +, Laeeth Isharc via Digitalmars-d-learn
wrote:
Are there any D users groups/meetups in London? I see you are
not far away (I am in Barnes).
Crickey, that is just round the corner . :-)
Yes there is a London D user group, it just hasn't met as yet. I
On Mon, 2014-08-18 at 23:12 +, Laeeth Isharc via Digitalmars-d-learn
wrote:
Whilst the hardcore Pythonistas remain Pythonistas, some of the
periphery has jumped ship to Go. Sadly D did not capture these
folk, it perhaps should have done. It would be easy to blame
fadism, but I think
On Mon, 2014-08-18 at 23:12 +, Laeeth Isharc via Digitalmars-d-learn
wrote:
[…]
For me, NumPy has some serious problems despite being the
accepted norm for computational work.
If not too offtopic, do you have a link describing, or would you
briefly summarize these problems? I am
On Tue, 2014-08-19 at 00:53 +, bachmeier via Digitalmars-d-learn
wrote:
[…]
I'm not sure which computational work he is referring to, but for
statistical analysis, R dominates by a wide margin (although
statistical analysis done in Silicon Valley, the type you read
about on Hacker News,
On Thu, 2014-08-21 at 19:22 -0700, Timothee Cour via Digitalmars-d-learn
wrote:
What would be a good answer to this article?
http://swiftcoder.wordpress.com/2009/02/18/raii-why-is-it-unique-to-c/
Especially the part mentioning D:{
D’s scope keyword, Python’s with statement and C#’s using
On Mon, 2014-08-25 at 17:09 +, Kiith-Sa via Digitalmars-d-learn
wrote:
[…]
I don't use an IDE, but MonoD seems to be the most recommended
cross-platform option. It has a wiki page here if it helps:
http://wiki.dlang.org/Mono-D
I just tried following the instructions at
On Mon, 2014-08-25 at 18:09 +, Kiith-Sa via Digitalmars-d-learn
wrote:
[…]
I have no experience with GtkD, but with DUB you shouldn't need
to mess with .lib files at all. DUB automatically downloads and
compiles any libraries specified with dub.json, *and* links them
with the compiled
On Mon, 2014-08-25 at 16:46 +, Ryan via Digitalmars-d-learn wrote:
[…]
What Widget library should I use? I started with GTKD, but since
there are no tutorials does this mean nobody actually does this?
Should I use DWT? What about QT?
GtkD should work for you. I would have preferred Qt
On Wed, 2014-08-27 at 13:25 +, Ryan via Digitalmars-d-learn wrote:
[…]
I'm thinking I will probably create a more in depth GTK+ hello
world that attempts to covers some of the current D landscape.
Exactly what I am doing :-)
For instance I now understand how DMD and RDMD work and how
OK I installed LDC pre-built on MinGW for Windows on Windows and then
Installed MinGW for Windows but when I run ldc2 it tells me
libgcc_s_dw2-1.dll is missing.
Is this problem soluble by any means other than destruction of Windows?
--
Russel.
On Sat, 2014-09-06 at 11:26 +, Danyal Zia via Digitalmars-d-learn
wrote:
On Saturday, 6 September 2014 at 11:13:20 UTC, Russel Winder via
Digitalmars-d-learn wrote:
OK I installed LDC pre-built on MinGW for Windows on Windows
and then
Installed MinGW for Windows but when I run ldc2
On Sat, 2014-09-06 at 15:09 +, Kagamin via Digitalmars-d-learn
wrote:
SEH was patented, so llvm doesn't support it.
I installed the other MinGW option and it provides libgcc_s_sjlj-1.dll
which is not helping me actually run ldc2 on Windows :-(
--
Russel.
On Sat, 2014-09-06 at 21:52 +, David Nadlinger via
Digitalmars-d-learn wrote:
On Saturday, 6 September 2014 at 16:11:55 UTC, Russel Winder via
Digitalmars-d-learn wrote:
I installed the other MinGW option and it provides
libgcc_s_sjlj-1.dll
which is not helping me actually run ldc2
On Sat, 2014-09-20 at 06:46 +, Nordlöw via Digitalmars-d-learn
wrote:
On Thursday, 18 September 2014 at 19:49:00 UTC, Atila Neves wrote:
I had to roll my own parallel map today, but at least I did get
a nice 3x speedup.
How many cores? Is the problem a data parallel one and hence should
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 05/10/14 15:27, flamencofantasy via Digitalmars-d-learn wrote:
Hello,
I am summing up the first 1 billion integers in parallel and in a
single thread and I'm observing some curious results;
I am fairly certain that your use of parallel for
On Sat, 2014-11-01 at 23:32 +, Neven via Digitalmars-d-learn wrote:
Ok, a newbie question ahead. I want to create new thread which
calls given function with some parameters. Thus, I think spawn is
the right function for me. However that functions returns Tid and
not a Thread object.
On Thu, 2014-10-09 at 11:29 +, Sag Academy via Digitalmars-d-learn
wrote:
On Thursday, 9 October 2014 at 10:10:20 UTC, Konstantin wrote:
Are you looking for parallel?
http://dlang.org/library/std/parallelism/parallel.html
I have seen this, but I'm not sure how to use it.
Maybe:
On Mon, 2014-11-10 at 12:10 +, Solomon E via Digitalmars-d-learn
wrote:
I wanted to know how to compile a D program that has multiple
source files. I looked under Modules in the language reference,
but there isn't anything there about compilation, or anything
about where to put the source
On Mon, 2014-11-10 at 13:01 +, Solomon E via Digitalmars-d-learn
wrote:
On Monday, 10 November 2014 at 12:49:46 UTC, ketmar via
Digitalmars-d-learn wrote:
you'd better not use command-line toolchain, they all aren't
ready. if
you can't figure out how to use some compiler of GCC
On Wed, 2014-12-03 at 01:07 +, Michael via Digitalmars-d-learn
wrote:
Hi. I'm new here and this is my first post. I'm not sure this is
the right subforum for it, but wasn't sure where else to put it
either.
I've written a library to talk to some external hardware using a
socket. It
On Sat, 2014-12-20 at 05:46 +, Dicebot via Digitalmars-d-learn wrote:
On Saturday, 20 December 2014 at 04:15:00 UTC, Rikki Cattermole
wrote:
b) Can I do parallel builds with dub. CMake gives me Makefiles
so I can
make -j does dub have a similar option?
No
Worth noting
On Mon, 2014-12-22 at 10:12 +, Iov Gherman via Digitalmars-d-learn wrote:
[…]
- D: 24 secs, 32 ms.
- Java: 20 secs, 881 ms.
- C: 21 secs
- Go: 37 secs
Without the source codes and the commands used to create and run, it
is impossible to offer constructive criticism of the results.
On Fri, 2014-12-26 at 20:44 +, Laeeth Isharc via Digitalmars-d-learn
wrote:
[…]
I agree with other posters that a D REPL and
interactive/visualization data environment would be very cool,
but unfortunately doesn't exist. Batch computing is more
practical, but REPLs really hook new users. I
On Sat, 2014-12-27 at 01:33 +, Laeeth Isharc via Digitalmars-d-learn
wrote:
[…]
Fair argument against an earlier poster but from my perspective,
all I meant is that the absence of a shell is not a good reason
to write off D for exploring data. Because there is a shell
already that
On Sat, 2014-12-27 at 06:21 +, Laeeth Isharc via Digitalmars-d-learn
wrote:
[…]
I don't believe I agree that we need a perfect multi-dimensional
rectangular array library to serve as a backend before thinking
and doing much on data frames (although it will certainly be very
useful when
On Sat, 2014-12-27 at 13:46 +, aldanor via Digitalmars-d-learn
wrote:
On Saturday, 27 December 2014 at 10:54:01 UTC, Russel Winder via
Digitalmars-d-learn wrote:
I know much less about R, but the whole Python/NumPy thing
works but
only because it is faster and easier than Python
On Sat, 2014-12-27 at 13:53 +, via Digitalmars-d-learn wrote:
[…]
I wonder how TSX would work with GIL. I suppose most GIL locks
are short lived enough to be covered by TSX before it fails and
takes a lock.
For Intel chips this is good stuff (stolen from Sun's Rock processor).
Hardware
On Sat, 2014-12-27 at 14:28 +, via Digitalmars-d-learn wrote:
[…]
I don't disagree in principle, but if an OpenMP supporting
compiler can generate code for GPGPU then D will be miles behind
for many homogeneous workloads.
No-one with resources showed any interest in having a D with GPGPU
On Sat, 2014-12-27 at 15:33 +, Laeeth Isharc via Digitalmars-d-learn
wrote:
[…]
I guess we vote with our feet/fingers. Sounds like you don't
find D especially useful (since you don't use it much currently),
whereas I do. De gustibus non est disputandum, particularly when
tastes
On Sat, 2014-12-27 at 15:33 +, Laeeth Isharc via Digitalmars-d-learn
wrote:
[…lots of agreed uncontentious stuff :-) …]
You write as if Christensen's book The Innovator's Dilemma had
never been written, and nor had it been a standard textbook in
business schools for some years. You may
Using reduce for factorial, seems to require iota, not a bad things per
se, with ulongs:
reduce!a*b(1, iota(1, n + 1))
works fine. Now switch to BigInt:
reduce!a*b(one, iota(one, n + one))
fails to compile, one and n + one are of different types. Problem is
that one is
Playing with factorial implementations, as you do. I had a D
implementation using ulong. Not sensible obviously since overflow is a
bit of a problem. But the code worked, as did the tests. Now converting
to BigInt and…
The standard explicit iteration form uses a loop:
for(i; 2..n+1)
for
On Thu, 2015-01-22 at 16:48 +, bearophile via Digitalmars-d-learn
wrote:
It works for me:
Sorry, you are right, it loops:
So it is a bug, and I now have to find out how to report it!
--
Russel.
=
Dr Russel
On Thu, 2015-01-22 at 10:21 -0800, H. S. Teoh via Digitalmars-d-learn
wrote:
[…]
https://github.com/D-Programming-Language/phobos/pull/2895
This is just the tip of the iceberg. The full enhancement is described
in:
https://issues.dlang.org/show_bug.cgi?id=10762
Sadly, I suspect
On Wed, 2015-03-11 at 07:10 -0700, Ali Çehreli via Digitalmars-d-learn
wrote:
On 03/11/2015 01:07 AM, Russel Winder via Digitalmars-d-learn wrote:
On Tue, 2015-03-10 at 15:34 -0700, Ali Çehreli via Digitalmars-d-learn
wrote:
[…]
We can hope to make it simpler by taking advantage
On Tue, 2015-03-10 at 15:34 -0700, Ali Çehreli via Digitalmars-d-learn
wrote:
[…]
We can hope to make it simpler by taking advantage of parallel map but
it requires a static local function or a global function (a lambda
cannot be used):
[…]
Is there a reason for excluding lambdas, it a
On Fri, 2015-02-27 at 04:12 +, AJ via Digitalmars-d-learn wrote:
[…]
I am in the same boat and totally agree. It's tough going from
the user-experience of IntelliJ IDEA or Visual Studio back to vi
on OS X with D. There seems to be a large hole in support for D
debugging outside of
On Mon, 2015-04-20 at 17:28 +, John Colvin via Digitalmars-d-learn wrote:
[…]
True, the constructor doesn't really add anything here.
To be honest, the combination of enumeration and runtime
variables in the Java code seems like a rubbish design, but
perhaps there's a good reason
On Fri, 2015-05-08 at 03:24 +, avarisclari via Digitalmars-d-learn
wrote:
Hello,
Sorry to bother you with something trivial, but I am having
trouble translating a block of code I wrote in Python over to D.
Everything else I've figured out so far. Could someone help me
understand how
On Sat, 2015-05-09 at 07:15 -0700, Ali Çehreli via Digitalmars-d-learn wrote:
On 05/09/2015 04:59 AM, Dennis Ritchie wrote:
On Saturday, 9 May 2015 at 11:49:48 UTC, Timon Gehr wrote:
assert((function int(int
x)=x?x*__traits(parent,{})(x-1):1)(10)==3628800);
Thanks. Yes, it is similar
On Sat, 2015-05-09 at 09:49 -0700, Ali Çehreli via Digitalmars-d-learn wrote:
[…]
BigInt factorial(size_t n)
{
return bigInts(1).take(n).reduce!((a, b) = a *= b);
}
I wonder if that should be a * b rather than a *= b?
It turns out that 2.067 fixes the integrality of BigInts so:
On Tue, 2015-06-30 at 15:20 +, Alex Parrill via Digitalmars-d-learn
wrote:
[…]
Use GDC or LDC for profiling code; the DMD optimizer isn't as
good.
Also note that gc code generation is poor compared to gccgo: always use
gccgo for benchmarking.
[…]
--
Russel.
On Sat, 2015-05-23 at 10:17 -0700, Andrei Alexandrescu via Digitalmars-d-learn
wrote:
[…]
if (ordered(4, 5, 6)) { ... }
if (strictlyOrdered(4, 5, 6)) { ... }
So the latter means the integers have to lashed as well as ordered? ;
-)
--
Russel.
On Sat, 2015-08-22 at 07:30 +, rsw0x via Digitalmars-d-learn wrote:
[…]
because Go is not a general purpose language.
Not entirely true. Go is a general purpose language, it is a successor
to C as envisioned by Rob Pike, Russ Cox, and others (I am not sure how
much input Brian Kernighan
On Fri, 2015-08-21 at 10:47 +, via Digitalmars-d-learn wrote:
Yes, Go has sacrificed some compute performance in favour of
latency and convenience. They have also released GC improvement
plans for 1.6:
https://docs.google.com/document/d/1kBx98ulj5V5M9Zdeamy7v6ofZXX3yPziA
On Fri, 2015-08-21 at 01:22 +, Nicholas Wilson via Digitalmars-d
-learn wrote:
[…]
Keep in mind java may be using green threads as opposed to kernel
threads.
The equivalent in D is a Fiber.
I believe Java itself hasn't used green threads in an awful long time:
Threads are mapped to
On Thu, 2015-08-20 at 20:01 +, tony288 via Digitalmars-d-learn
wrote:
[…]
Now what I would like to know, how would I make this code more
efficient? Which is basically the aim I'm trying to achieve.
Any pointers would be really help full. Should I use
concurrency/parallelism etc..?
I
On Sat, 2015-08-22 at 06:54 +, via Digitalmars-d-learn wrote:
On Saturday, 22 August 2015 at 06:48:48 UTC, Russel Winder wrote:
But one that Google are entirely happy to fully fund.
Yes, they have made Go fully supported on Google Cloud now, so I
think it is safe to say that Google
On Sun, 2015-08-23 at 11:26 +, rsw0x via Digitalmars-d-learn wrote:
[…]
https://groups.google.com/forum/#!msg/golang
-dev/pIuOcqAlvKU/C0wooVzXLZwJ
25-50% performance decrease across the board in 1.4 with the
addition of write barriers, to an already slow language.
Garbage collection
On Sat, 2015-08-22 at 11:06 +, Laeeth Isharc via Digitalmars-d
-learn wrote:
[…]
Builds in Go 1.5 will be slower by a factor of about two. The
automatic translation of the compiler and linker from C to Go
resulted in unidiomatic Go code that performs poorly compared to
well-written
On Sat, 2015-08-22 at 09:27 +, rsw0x via Digitalmars-d-learn wrote:
[…]
The performance decrease has been there since 1.4 and there is no
way to remove it - write barriers are the cost you pay for
concurrent collection. Go was already much slower than other
compiled languages, now it
On Sun, 2015-08-23 at 19:42 +, via Digitalmars-d-learn wrote:
[…]
Yes, of course it is, but given it's typical use context I find
it odd that they didn't go more towards higher level constructs.
For me Go displaces Python where more speed is required, though I
wish it was more
On Sat, 2015-10-31 at 20:55 +, David Nadlinger via Digitalmars-d-
learn wrote:
> On Saturday, 31 October 2015 at 18:23:43 UTC, rumbu wrote:
> > My opinion is that a decimal data type must be builtin in any
> > modern language, not implemented as a library.
>
> "must be builtin in any modern
On Sat, 2015-10-31 at 15:41 +, tcak via Digitalmars-d-learn wrote:
> On Saturday, 31 October 2015 at 14:37:23 UTC, rumbu wrote:
> > On Friday, 30 October 2015 at 10:35:03 UTC, Laeeth Isharc wrote:
> > > I'm writing a talk for codemesh on the use of D in finance.
> > >
> > > Any other
On Thu, 2015-10-15 at 10:00 +, Chris via Digitalmars-d-learn wrote:
>
[…]
> Well, you know how gourmet sausages are made (100% meat), because
> you make them yourself apparently. But I was talking about the
> sausages you get out there ;) A lot of websites are not
> "planned". They are
On Thu, 2015-10-15 at 09:35 +, Ola Fosheim Grøstad via Digitalmars-
d-learn wrote:
> On Thursday, 15 October 2015 at 07:57:51 UTC, Russel Winder wrote:
> > lot better than it could be. From small experiments D is (and
> > also Chapel is even more) hugely faster than Python/NumPy at
> >
On Thu, 2015-10-15 at 06:48 +, data pulverizer via Digitalmars-d-
learn wrote:
>
[…]
> A journey of a thousand miles ...
Exactly.
> I tried to start creating a data table type object by
> investigating variantArray:
> http://forum.dlang.org/thread/hhzavwrkbrkjzfohc...@forum.dlang.org
>
On Thu, 2015-10-15 at 17:00 +, jmh530 via Digitalmars-d-learn
wrote:
> On Thursday, 15 October 2015 at 10:33:54 UTC, Russel Winder wrote:
> >
> > CUDA is of course doomed in the long run as Intel put GPGPU on
> > the processor chip. OpenCL will eventually be replaced with
> > Vulkan
On Tue, 2015-10-20 at 02:19 -0700, Jonathan M Davis via Digitalmars-d-
learn wrote:
> […]
>
> auto before = MonoTime.currTime;
> // do stuff
> auto diff = MonoTime.currTime - before;
What import statement do you use to get MonoTime. I tried the above
and got an error with all the things I
On Tue, 2015-10-20 at 15:16 +0100, Russel Winder wrote:
>
[…]
> What import statement do you use to get MonoTime. I tried the above
> and got an error with all the things I tried.
Hummm… I am now not worried about the import, I tried compiling a
different way and it worked. The upshot is that I
On Wed, 2015-10-14 at 14:48 +, John Colvin via Digitalmars-d-learn
wrote:
> On Wednesday, 14 October 2015 at 14:32:00 UTC, jmh530 wrote:
> > On Tuesday, 13 October 2015 at 23:26:14 UTC, Laeeth Isharc
> > wrote:
> > > https://www.quora.com/Why-is-Python-so-popular-despite-being-so-s
> > > low
On Mon, 2015-11-16 at 22:39 +, Dan via Digitalmars-d-learn wrote:
>
[…]
> My platform of choice is 64-bit Fedora using Code::Blocks (yes, I
> use an IDE as a crutch). It seems that D supports this combo.
Last time I looked at Code::Blocks it couldn't do a dark theme, and the
D support was
On Mon, 2015-09-07 at 02:56 +, Charles via Digitalmars-d-learn
wrote:
> […]
>
> x = float[imax][jmax]; //x is about 8 GB of floats
> for(j = 0; j < jmax; j++){
> //create some local variables.
> for(i = 0; i < imax; i++){
> x[j][i] = complicatedFunction(i, x[j-1], other, local,
On Tue, 2015-09-08 at 07:33 +, Dominikus Dittes Scherkl via
Digitalmars-d-learn wrote:
> On Tuesday, 8 September 2015 at 05:50:30 UTC, Russel Winder wrote:
> > void main() {
> > immutable imax = 10;
> > immutable jmax = 10;
> > float[imax][jmax] x;
> > foreach(int
On Fri, 2015-09-11 at 21:50 +0200, Jacob Carlborg via Digitalmars-d
-learn wrote:
> On 2015-09-10 20:01, Russel Winder via Digitalmars-d-learn wrote:
> > Is there an easy way of knowing when you do not have to initialize
> > the
> > D runtime system to call D code from, in
On Sat, 2015-09-12 at 06:58 +, Mike McKee via Digitalmars-d-learn
wrote:
[…]
> I just tested and you are correct. Now, is there a way that I can
> edit /etc/dmd.conf and make it so that I don't need to do this
> pkg-config stuff all the time?
I think editing /etc/dmd.conf would be the wrong
Is there an easy way of knowing when you do not have to initialize the
D runtime system to call D code from, in this case, Python via a C
adapter?
I naïvely transformed some C++ to D, without consideration of D runtime
systems, compiled it and it all worked. Which is good, but…
--
Russel.
On Fri, 2015-09-25 at 12:54 +, John Colvin via Digitalmars-d-learn
wrote:
>
[…]
> I vastly prefer the UFCS version, but unfortunately reduce has
> its arguments the wrong way around for that if you use the
> version that takes a seed...
In which case the reduce parameter list is wrong,
On Tue, 2015-09-29 at 03:05 +, bitwise via Digitalmars-d-learn
wrote:
> On Monday, 28 September 2015 at 11:47:38 UTC, Russel Winder wrote:
> > I hadn't answered as I do not have answers to the questions you
> > ask. My reason: people should not be doing their codes using
> > these low-level
On Mon, 2015-09-28 at 12:46 +, John Colvin via Digitalmars-d-learn
wrote:
> […]
>
> Pretty much as expected. Locks are slow, shared accumulators
> suck, much better to write to thread local and then merge.
Quite. Dataflow is where the parallel action is. (Except for those
writing
On Thu, 2015-10-01 at 08:52 +, John Colvin via Digitalmars-d-learn
wrote:
> […]
>
> Bug report? Then it'll get fixed.
https://issues.dlang.org/show_bug.cgi?id=15133
Timer running… ;-)
--
Russel.
=
Dr Russel
I have the code:
reduce!"a+b"(x)
where x is a int[] and I get an exception "Enforcement failed" at run
time. This gives me enough information to say ¿que?
--
Russel.
=
Dr Russel Winder t: +44 20 7585 2200
On Wed, 2015-09-30 at 23:35 -0700, Ali Çehreli via Digitalmars-d-learn
wrote:
> On 09/30/2015 10:46 PM, Russel Winder via Digitalmars-d-learn wrote:
> > I have the code:
> >
> > reduce!"a+b"(x)
> >
> > where x is a int[] and I get an excepti
On Sat, 2015-09-26 at 15:56 +, Jay Norwood via Digitalmars-d-learn
wrote:
> std.parallelism.reduce documentation provides an example of a
> parallel sum.
>
> This works:
> auto sum3 = taskPool.reduce!"a + b"(iota(1.0,101.0));
>
> This results in a compile error:
> auto sum3 =
On Mon, 2015-09-28 at 11:38 +, John Colvin via Digitalmars-d-learn
wrote:
> […]
>
> It would be really great if someone knowledgable did a full
> review of std.parallelism to find out the answer, hint, hint...
> :)
Indeed, I would love to be able to do this. However I don't have time
in
On Sat, 2015-09-26 at 14:33 +0200, anonymous via Digitalmars-d-learn
wrote:
> […]
> I'm pretty sure atomicOp is faster, though.
Rough and ready anecdotal evidence would indicate that this is a
reasonable statement, by quite a long way. However a proper benchmark
is needed for statistical
On Fri, 2015-09-25 at 18:45 +, Meta via Digitalmars-d-learn wrote:
> […]
>
> The main difference is that "method call" style is more amenable
> to chaining (and IMO, it looks cleaner as you don't have nesting
> parentheses.
I guess coming from Clojure I was less worried about Lisp-style
I hadn't answered as I do not have answers to the questions you ask. My
reason: people should not be doing their codes using these low-level
shared memory techniques. Data parallel things should be using the
std.parallelism module. Dataflow-style things should be using spawn and
channels – akin to
As a single data point:
== anonymous_fix.d ==
5050
real0m0.168s
user0m0.200s
sys 0m0.380s
== colvin_fix.d ==
5050
real0m0.036s
user0m0.124s
sys 0m0.000s
== norwood_reduce.d
On Sat, 2015-09-26 at 10:46 +, John Colvin via Digitalmars-d-learn
wrote:
> […]
I guess the summary is: it's a breaking change, so do it. No we can't
do that it's a breaking change.
Seems lame given all the other breaking changes that have been. Sad
given that reduce is probably the single
On Sat, 2015-09-26 at 12:32 +, Zoidberg via Digitalmars-d-learn
wrote:
> > Here's a correct version:
> >
> > import std.parallelism, std.range, std.stdio, core.atomic;
> > void main()
> > {
> > shared ulong i = 0;
> > foreach (f; parallel(iota(1, 100+1)))
> > {
> >
On Sat, 2015-09-26 at 17:20 +, Jay Norwood via Digitalmars-d-learn
wrote:
> This is a work-around to get a ulong result without having the
> ulong as the range variable.
>
> ulong getTerm(int i)
> {
> return i;
> }
> auto sum4 = taskPool.reduce!"a +
>
On Mon, 2015-09-28 at 11:37 +, John Colvin via Digitalmars-d-learn
wrote:
>
[…]
> My thoughts exactly, even though it was partly me that pointed
> out the breaking changes...
Curses, if no-one had pointed out it was breaking maybe no-one would
have noticed, and just made the change?
> I
On Sun, 2015-09-20 at 17:49 +0200, Johannes Pfau via Digitalmars-d
-learn wrote:
> […]
>
> Just realized this thread is titled "Debugging D shared libraries" ;
> -)
> GDC does not yet support shared libraries.
Conversely I thought it did due to the GCC toolchain thingy.
I'm using DMD and LDC
On Sun, 2015-09-20 at 07:49 +, rom via Digitalmars-d-learn wrote:
>
[…]
> > works entirely fine. However the "parallel" code:
> >
> > extern(C)
> > double parallel(const int n, const double delta) {
> > Runtime.initialize();
> > const pi = 4.0 * delta * taskPool.reduce!"a
1 - 100 of 485 matches
Mail list logo