On Wednesday, 11 June 2014 at 04:17:04 UTC, Andrew Edwards wrote:
On 6/10/14, 10:01 PM, Brian Schott wrote:
Please do not tag anything until we decide if virtual is a
keyword in D.
See:
https://github.com/D-Programming-Language/dlang.org/pull/584
The branch will not be created until 30
On Tuesday, 10 June 2014 at 23:08:33 UTC, Chris Cain wrote:
I had an opportunity to give the entire code a good once over
read and I have a few comments.
Thanks! :-)
1. Biggest thing about the new hap.random is how much nicer it
is to actually READ. The first few times I went through the
On Tuesday, 10 June 2014 at 23:48:09 UTC, bearophile wrote:
Please stop, I am not worth that, and I don't even know how
much good that generator is. So for you it's better to focus on
more important matters of the new random module. Extra
generators can be added later if needed.
After all
On Monday, 9 June 2014 at 18:09:21 UTC, Joseph Rushton Wakeling
wrote:
Hello all,
Incidentally, would it be a good idea to post a link to the blog
post on r/programming? Haven't done so yet, as generally I
prefer to leave decisions about D publicity to others, but can do
so if people would
On 10/06/14 19:43, Adam D. Ruppe wrote:
blargh, I thought it could do more. Does it at least work to pull out
extern C functions from a C++ header?
Hmm, I haven't tried that. You need to specified which language to use.
Currently DStep has hard coded its language support, in which C++ is not
On 6/10/2014 7:08 PM, Chris Cain wrote:
3. I'd also REALLY like to see seed support ranges/values giving ANY
type of integer and guarantee that few bytes are wasted (so, if it
supplies 64-bit ints and the generator's internal state array only
accepts 32-bit ints, it should spread the 64-bit int
On 6/11/2014 2:41 AM, Joseph Rushton Wakeling wrote:
5. Another possible improvement would be something akin to a remix
function. It should work identically to reseeding, but instead of
setting the internal state to match the seed (as I see in
On Wednesday, 11 June 2014 at 06:41:34 UTC, Joseph Rushton
Wakeling wrote:
That would be very cool. Can you point me at your code
examples?
It's written in Nimrod (in a way that someone who learned Nimrod
the day before would write them, because I learned Nimrod the day
before and worked on
Have you any plan to implement CMWC?
http://en.wikipedia.org/wiki/Multiply-with-carry#Complementary-multiply-with-carry_generators
On Monday, 9 June 2014 at 18:09:21 UTC, Joseph Rushton Wakeling
wrote:
Hello all,
Some of you may remember my earlier draft of a class-based
std.random
Example of D (dmd 2.065 64) with Qt 64 Windows64/Linux64. Running
programs *.EXE with key --debug.
http://yadi.sk/d/qLE7Kgz9SpKEX
On Thursday, 5 June 2014 at 14:22:46 UTC, Mike James wrote:
First problem: you need to add gl3n to the git clone list for
developing under Visual-D.
Fixed. I've removed gl3n and libpng references from project.
I am having problems running (debugging) the example1 program.
When loading the
On Wednesday, 11 June 2014 at 07:42:10 UTC, Andrea Fontana wrote:
Have you any plan to implement CMWC?
http://en.wikipedia.org/wiki/Multiply-with-carry#Complementary-multiply-with-carry_generators
I hadn't made any concrete plans about that particular family of
generators (my impression was
On Thursday, 5 June 2014 at 19:58:10 UTC, Casper Færgemand wrote:
On Thursday, 5 June 2014 at 16:10:00 UTC, Mike James wrote:
I checked the sub-directory the loading refers to and all the
pngs seems to be there.
I managed to get the files from github just fine, but dub says
it is unable to
On 6/11/14, 2:23 AM, deadalnix wrote:
I'll be there to test and bug report ! Thank for being the release
lieutenant.
In my world a lieutenant is absolutely useless. Given the tutelage and
guidance of solid staff non-commissioned officer, some day they will
become productive members of the
On 11 June 2014 14:19, Andrew Edwards via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:
On 6/11/14, 2:23 AM, deadalnix wrote:
I'll be there to test and bug report ! Thank for being the release
lieutenant.
In my world a lieutenant is absolutely useless. Given the
On Tuesday, 10 June 2014 at 10:57:32 UTC, bearophile wrote:
Kagamin:
Pass it by reference, I see no reason why MT can't be pure.
I meant strongly pure :-)
I'm afraid, this pure rng pattern precludes all pure
optimizations, so it's effectively weakly pure.
On Tuesday, 10 June 2014 at 23:08:33 UTC, Chris Cain wrote:
4. I'd just like to say the idea of using ranges for seeds gets
me giddy because I could totally see a range that queries
https://random.org for true random bits to seed with, wrapped
by a range that zeroes out the memory on popFront.
On 6/11/14, 11:24 AM, Iain Buclaw via Digitalmars-d-announce wrote:
On 11 June 2014 14:19, Andrew Edwards via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:
On 6/11/14, 2:23 AM, deadalnix wrote:
I'll be there to test and bug report ! Thank for being the release
lieutenant.
On 6/11/2014 9:19 AM, Andrew Edwards wrote:
On 6/11/14, 2:23 AM, deadalnix wrote:
I'll be there to test and bug report ! Thank for being the release
lieutenant.
In my world a lieutenant is absolutely useless. Given the tutelage and
guidance of solid staff non-commissioned officer, some day
On 11 June 2014 17:56, Andrew Edwards via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:
On 6/11/14, 11:24 AM, Iain Buclaw via Digitalmars-d-announce wrote:
On 11 June 2014 14:19, Andrew Edwards via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:
On
On 6/11/2014 12:35 PM, Kagamin wrote:
In some scenarios impredictability is not enough. For example, when you
generate a session id, an attacker doesn't have to predict it ahead of
time, he can guess it at any time later. And if they listen to radio
waves - that's an open protocol, an attacker
On Tuesday, 10 June 2014 at 19:36:57 UTC, bearophile wrote:
At about 40.42 in the Thoughts on static regex there is
written even compile-time printf would be awesome. There is a
patch about __ctWrite in GitHug, it should be fixed and merged.
Bye,
bearophile
I wish I'd taken the mic at the
On Tuesday, 10 June 2014 at 16:30:31 UTC, Andrei Alexandrescu
wrote:
Leverage - my talk at Lang.NEXT.
http://www.reddit.com/r/programming/comments/27sp6r/langnext_2014_leverage_by_andrei_alexandrescu/
https://news.ycombinator.com/newest
On Tuesday, 10 June 2014 at 16:30:31 UTC, Andrei Alexandrescu
wrote:
Leverage - my talk at Lang.NEXT.
I think this is one of your better D talks. It's refreshing to
see honest admittance of the shortcomings of D's features,
although I think a little too much time was spent talking about
On Wednesday, 11 June 2014 at 18:06:03 UTC, justme wrote:
I cannot accept
10. .iota; // The space here is unacceptable.
Please have the programmer change 10. to 10.0 so that we have
10.0.iota; // Cleaner, obvious, and doesn't look like a typo.
Thank you.
The point wasn't about how best to
On Wednesday, 11 June 2014 at 07:24:11 UTC, Chris Cain wrote:
I almost always like all the D posts I see on r/programming,
but in general if any language highlighted the efforts in the
RNG part of the standard library, I would like it. Too many
languages get it wrong or don't care enough about
On 6/11/14, 11:06 AM, justme wrote:
On Tuesday, 10 June 2014 at 16:30:31 UTC, Andrei Alexandrescu wrote:
Leverage - my talk at Lang.NEXT.
http://www.reddit.com/r/programming/comments/27sp6r/langnext_2014_leverage_by_andrei_alexandrescu/
https://news.ycombinator.com/newest
On Wednesday, 11 June 2014 at 18:03:06 UTC, Atila Neves wrote:
I wish I'd taken the mic at the end, and 2 days later Adam D.
Ruppe said what I was thinking of saying: unit test and debug
the CTFE function at runtime and then use it at compile-time
when it's ready for production.
Aye. It
I'm looking for the John Chapman who worked as a programmer at
Centre-file Ltd, in Finsbury Circus London in 1971.
Any leads?
Karen
On 10.06.2014 17:15, Sean Kelly wrote:
On Thursday, 29 May 2014 at 23:39:02 UTC, Marco Leise wrote:
Nice try, but destructors called by the GC are currently
effectively @nogc. So don't try that at home.
When did that happen? Some effort was made at one point to ensure that
allocations
On Wednesday, 11 June 2014 at 03:19:55 UTC, Walter Bright wrote:
On 6/10/2014 7:44 PM, deadalnix wrote:
On Wednesday, 11 June 2014 at 02:10:18 UTC, Walter Bright
wrote:
On 6/10/2014 5:27 PM, deadalnix wrote:
I'm talking about structs, not classes.
Ok, but since D structs do not inherit, how
On Wednesday, 11 June 2014 at 04:11:53 UTC, Walter Bright wrote:
Hmm, this could have serious problems with the following:
S1 s1;
S2 s2;
s2.c = 3;
memcpy(s2.s1, s1, sizeof(S1)); // Oops! stomped on s2.c
Yes, that is why they do it only in specific condition (ie when
the thing use C++
On 6/10/2014 11:11 PM, deadalnix wrote:
On Wednesday, 11 June 2014 at 04:11:53 UTC, Walter Bright wrote:
Hmm, this could have serious problems with the following:
S1 s1;
S2 s2;
s2.c = 3;
memcpy(s2.s1, s1, sizeof(S1)); // Oops! stomped on s2.c
Yes, that is why they do it only in specific
Hello,
I was replacing some nasty slice code with std.array calls when I
encountered the following situation:
void main()
{ import std.array, std.stdio;
int[2][] arr = [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5,
0], [6, 0]];
size_t from = 4; // from is inclusive
size_t to =
On Wednesday, 11 June 2014 at 06:40:24 UTC, safety0ff wrote:
When 'from' and 'to' differ by one, there's no error, when two
or greater, error.
I believe it is a bug, but want confirmation.
Actually, it seems that the trigger is 'to - from' being equal to
'stuff.length'.
On Tuesday, 10 June 2014 at 18:36:20 UTC, Burp wrote:
I'm not sure how valid the comparison would be, even if
someone did port it to D.
That C++ project is very old, and was likely not organized to
minimize compilation times, may not have used precompiled
headers etc.
It is possible to
On 11/06/14 02:00, Matt wrote:
I was wondering if anyone could help with a problem I'm having.
My program compiles properly, and has all up-to-date files and DLLs
(SDL2, SDL2-image, SDL2-ttf, all the other DLLs that are required by
these). However, when I run it, I get object.Error: Access
On 10/06/14 23:32, Ellery Newcomer wrote:
Another thing I was envisioning is a web page that shows test results
for each combination so that it is easy for a casual user to determine
pyd's status. Does buildbot have this sort of thing?
Travis CI does have that. But it currently doesn't
On Wednesday, 11 June 2014 at 06:30:26 UTC, Walter Bright wrote:
On 6/10/2014 11:11 PM, deadalnix wrote:
On Wednesday, 11 June 2014 at 04:11:53 UTC, Walter Bright
wrote:
Hmm, this could have serious problems with the following:
S1 s1;
S2 s2;
s2.c = 3;
memcpy(s2.s1, s1, sizeof(S1)); // Oops!
On Wednesday, 11 June 2014 at 03:56:06 UTC, Nick Sabalausky wrote:
Point being, all that admiration I have for both that second
closing and the initial opening battle, and I *still* never
noticed they were the same song! Don't I feel like the perfect
fool now! ;)
The battle theme starts as
Only a little. In scripts where I deliberately introduce
contention my allocator is quicker. It's much closer when there
is little contention.
Very interesting...
It would be nice to see single-threaded benchmarks aswell for
completeness.
Thx-
On Wed, 11 Jun 2014 06:40:23 +
safety0ff via Digitalmars-d digitalmars-d@puremagic.com wrote:
When I took a peek at std.array code on github I found:
https://github.com/D-Programming-Language/phobos/blob/master/std/array.d#L1921
and:
On Wednesday, 11 June 2014 at 07:30:41 UTC, Kagamin wrote:
And last time I did an indie game (ages ago) I was very
surprised how much difference I noticed (even on ordinary
speakers) when encoding the music as 128kbps MP3, as opposed
to 128kbps Vorbis and 320kbps MP3.
I can only hear a
On Wednesday, 11 June 2014 at 08:15:00 UTC, John Colvin wrote:
On Wednesday, 11 June 2014 at 07:30:41 UTC, Kagamin wrote:
And last time I did an indie game (ages ago) I was very
surprised how much difference I noticed (even on ordinary
speakers) when encoding the music as 128kbps MP3, as
On 6/11/2014 12:22 AM, deadalnix wrote:
On Wednesday, 11 June 2014 at 06:30:26 UTC, Walter Bright wrote:
On 6/10/2014 11:11 PM, deadalnix wrote:
On Wednesday, 11 June 2014 at 04:11:53 UTC, Walter Bright wrote:
Hmm, this could have serious problems with the following:
S1 s1;
S2 s2;
s2.c = 3;
On Sunday, 8 June 2014 at 15:37:06 UTC, Dicebot wrote:
Finally got to cleanup and submit this PR:
https://github.com/D-Programming-Language/dmd/pull/3651
While proposed change is very small (and backwards-compatible)
and not worth separate DIP, it is still a language change and
needs community
On Tuesday, 10 June 2014 at 15:53:35 UTC, AsmMan wrote:
I have dmd and dmc installed on my system but I can't find
obj2asm executable. IIRC, when I was on Linux I just installed
dmd and had working obj2asm. Where's it on Windows 64-bit?
You can probably use binutils' objdump, but I don't know
On 06/11/2014 11:35 AM, Walter Bright wrote:
I'm not so sure about that, either. There are many ways of bit copying
structs, and some of them are perfectly memory safe.
It is not provable by the compiler, therefore it is not @safe.
Not memory safe implies (is supposed to imply) not @safe
On 07/06/2014 16:39, monarch_dodra wrote:
Then, you are using the code:
.partition!(forest_invalid).sort.uniq.array;
The advantage of partition over filter is that partition is a
greedy inplace algorithm. But then, you go on to use uniq, which is
lazy, and requires array. I implemented a (very)
On Wednesday, 11 June 2014 at 07:22:51 UTC, deadalnix wrote:
On Wednesday, 11 June 2014 at 06:30:26 UTC, Walter Bright wrote:
On 6/10/2014 11:11 PM, deadalnix wrote:
On Wednesday, 11 June 2014 at 04:11:53 UTC, Walter Bright
wrote:
Hmm, this could have serious problems with the following:
S1
On Sun, 08 Jun 2014 15:37:04 +
Dicebot via Digitalmars-d digitalmars-d@puremagic.com wrote:
Finally got to cleanup and submit this PR:
https://github.com/D-Programming-Language/dmd/pull/3651
While proposed change is very small (and backwards-compatible)
and not worth separate DIP, it is
Try using objconv http://www.agner.org/optimize/objconv.zip , it
doesn't handle every obj file from dmd but it works most of the
time.
On Wednesday, 11 June 2014 at 07:56:12 UTC, Jonathan M Davis via
Digitalmars-d wrote:
It should have been uncommented out ages ago, but it was never
done. So, we
need to uncomment it out and make sure that it still works, in
which case,
presumably it can be added in like it was supposed to
On Wed, 11 Jun 2014 10:09:18 -0400, Jonathan M Davis via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On Sun, 08 Jun 2014 15:37:04 +
Dicebot via Digitalmars-d digitalmars-d@puremagic.com wrote:
Finally got to cleanup and submit this PR:
David Nadlinger:
There seems to have been some discussion regarding
std.experimental at DConf,
In the discussions of yesterday has emerged a feature of Rust I
didn't know about:
http://doc.rust-lang.org/rust.html#stability
In Rust code you can add annotations like #[stable] that specify
On 11/06/2014 14:45, Nick Treleaven wrote:
/** Copy up to r.length elements of src to r. */
auto refill(R, Input)(ref R r, Input src)
if (isRandomAccessRange!R isInputRange!Input)
Note this is related to:
std.algorithm.fill(Range1 range, Range2 filler)
Except that fill always fills all of
On 6/11/2014 4:34 AM, Timon Gehr wrote:
Not memory safe implies (is supposed to imply) not @safe but not @safe does not
imply not memory safe.
@safe in D == memory safe.
03-Jun-2014 11:35, Rainer Schuetze пишет:
Hi,
more GC talk: the last couple of days, I've been experimenting with
implementing a concurrent GC on Windows inspired by Leandros CDGC.
Here's a report on my experiments:
http://rainers.github.io/visuald/druntime/concurrentgc.html
tl;dr: there is a
I'd call this INVALID WONT FIX :) D module system is defined
to have strong 1-to-1 matching with file system. Any attempt to
circumvent that in favor of personal preferences is asking for
trouble and is not worth supporting.
I can only agree with this, but fact is that D allows flattened
On Tuesday, 10 June 2014 at 19:04:18 UTC, Stefan Frijters wrote:
I've been using the multidimensional arrays for a while now,
but recently I've run into a problem w.r.t. optimization:
import std.stdio;
import unstd.multidimarray;
void main() {
MultidimArray!(double, 3) arr;
arr =
It's the only function in std.string that takes a string by ref
instead of by value, and this screws up call chaining. What's
the reason for this?
On Wednesday, 11 June 2014 at 20:27:41 UTC, Sean Kelly wrote:
It's the only function in std.string that takes a string by ref
instead of by value, and this screws up call chaining. What's
the reason for this?
munch modifies the string you give it.
On Wednesday, 11 June 2014 at 21:07:18 UTC, w0rp wrote:
On Wednesday, 11 June 2014 at 20:27:41 UTC, Sean Kelly wrote:
It's the only function in std.string that takes a string by
ref instead of by value, and this screws up call chaining.
What's the reason for this?
munch modifies the string
On Wednesday, 11 June 2014 at 21:10:42 UTC, Sean Kelly wrote:
On Wednesday, 11 June 2014 at 21:07:18 UTC, w0rp wrote:
On Wednesday, 11 June 2014 at 20:27:41 UTC, Sean Kelly wrote:
It's the only function in std.string that takes a string by
ref instead of by value, and this screws up call
On Wednesday, 11 June 2014 at 21:18:29 UTC, monarch_dodra wrote:
I think it's because it returns both the munched data, and
the modified string:
string s = 123abc;
string t = munch(s, 0123456789);
assert(t == 123 s == abc);
But it would indeed be more natural to simply return the
updated
I've got an enhancement request to have it behave like extern(C):
https://issues.dlang.org/show_bug.cgi?id=12894
Thoughts? Anyone use extern(Windows) on non-Windows systems?
On Wednesday, 11 June 2014 at 22:20:27 UTC, Walter Bright wrote:
I've got an enhancement request to have it behave like
extern(C):
https://issues.dlang.org/show_bug.cgi?id=12894
Thoughts? Anyone use extern(Windows) on non-Windows systems?
What is the extern(Windows) is supposed to do
On Wednesday, 11 June 2014 at 22:25:22 UTC, Walter Bright wrote:
It changes the calling convention and name mangling to match
what Microsoft uses for the Windows API.
OK, but I don't get why you wouldn't be able to use
extern(C/C++/Whatever) and it adapt to the system. Obviously
there is
On 6/11/2014 3:24 PM, deadalnix wrote:
On Wednesday, 11 June 2014 at 22:20:27 UTC, Walter Bright wrote:
I've got an enhancement request to have it behave like extern(C):
https://issues.dlang.org/show_bug.cgi?id=12894
Thoughts? Anyone use extern(Windows) on non-Windows systems?
What is
On 6/11/2014 3:27 PM, deadalnix wrote:
On Wednesday, 11 June 2014 at 22:25:22 UTC, Walter Bright wrote:
It changes the calling convention and name mangling to match what Microsoft
uses for the Windows API.
OK, but I don't get why you wouldn't be able to use
extern(C/C++/Whatever) and it adapt
On 11 June 2014 23:20, Walter Bright via Digitalmars-d
digitalmars-d@puremagic.com wrote:
I've got an enhancement request to have it behave like extern(C):
https://issues.dlang.org/show_bug.cgi?id=12894
Thoughts? Anyone use extern(Windows) on non-Windows systems?
I'd doubt there's be
On 12 June 2014 00:17, Iain Buclaw ibuc...@gdcproject.org wrote:
On 11 June 2014 23:20, Walter Bright via Digitalmars-d
digitalmars-d@puremagic.com wrote:
I've got an enhancement request to have it behave like extern(C):
https://issues.dlang.org/show_bug.cgi?id=12894
Thoughts? Anyone
On 6/11/2014 4:17 PM, Iain Buclaw via Digitalmars-d wrote:
I'd doubt there's be anyone that uses extern(Windows) on non-windows
systems, but there may be people who wish to force stdcall for
whatever reason. Currently, extern(C) on Windows could either be a
stdcall, cdecl or thiscall function.
On Wednesday, 11 June 2014 at 23:27:09 UTC, Walter Bright wrote:
Even Microsoft gave up on stdcall for Win64 and uses the C
convention.
I think that's because the 64 bit C convention is a lot closer to
the stdcall convention anyway, putting more args in registers
etc...
On 6/11/2014 4:34 PM, Adam D. Ruppe wrote:
On Wednesday, 11 June 2014 at 23:27:09 UTC, Walter Bright wrote:
Even Microsoft gave up on stdcall for Win64 and uses the C convention.
I think that's because the 64 bit C convention is a lot closer to the stdcall
convention anyway, putting more args
On Wednesday, 11 June 2014 at 22:20:27 UTC, Walter Bright wrote:
I've got an enhancement request to have it behave like
extern(C):
https://issues.dlang.org/show_bug.cgi?id=12894
Thoughts? Anyone use extern(Windows) on non-Windows systems?
No, but if I had a 3rd party .lib that had been
On Wed, 11 Jun 2014 20:27:40 +
Sean Kelly via Digitalmars-d digitalmars-d@puremagic.com wrote:
It's the only function in std.string that takes a string by ref
instead of by value, and this screws up call chaining. What's
the reason for this?
It looks like it's trying to act like
On Wed, 11 Jun 2014 15:20:29 -0700
Walter Bright via Digitalmars-d digitalmars-d@puremagic.com wrote:
I've got an enhancement request to have it behave like extern(C):
https://issues.dlang.org/show_bug.cgi?id=12894
Thoughts? Anyone use extern(Windows) on non-Windows systems?
Regardless
On Wed, 11 Jun 2014 11:27:35 -0400
Steven Schveighoffer via Digitalmars-d digitalmars-d@puremagic.com
wrote:
On Wed, 11 Jun 2014 10:09:18 -0400, Jonathan M Davis via
Digitalmars-d digitalmars-d@puremagic.com wrote:
I would be inclined to argue that this should be done in a way
that
On Wednesday, 11 June 2014 at 22:20:27 UTC, Walter Bright wrote:
I've got an enhancement request to have it behave like
extern(C):
https://issues.dlang.org/show_bug.cgi?id=12894
Thoughts? Anyone use extern(Windows) on non-Windows systems?
Isn't this the whole point of extern(System)? I
debug version = DebugOrUnittest;
else version(unittest)version = DebugOrUnittest;
version(DebugOrUnittest) { static
assert(false,DebugOrUnittest); }
On Tuesday, 10 June 2014 at 22:31:37 UTC, Nordlöw wrote:
Either way, it shouldn't be too hard to implement. Base it off
splitter!pred, which is actually quite trivial. AFAIK, your
What do you mean by basing it off splitter!pred - should I
start with some existing splitter algorithm in Phobos
On Wednesday, 11 June 2014 at 05:46:07 UTC, Ali Çehreli wrote:
On 06/10/2014 08:06 PM, Matt wrote:
On Wednesday, 11 June 2014 at 02:30:01 UTC, WhatMeWorry wrote:
int[] array; // initially empty
array.length = 5; // now has 5 elements
while in Mr. Alexandrescu's book, it says
To create a
On Tuesday, 10 June 2014 at 14:06:58 UTC, bearophile wrote:
Juanjo Alvarez:
Probably I pretty simple question, how could I mark some code
to be compiled when in debug OR unittest mode? (or both, ||)
At first I tough I could do:
version(unittest, debug) {}
You can define a enum boolean
On Tuesday, 10 June 2014 at 20:58:41 UTC, Nordlöw wrote:
Is there a way to, programatically (trait), lookup the source
file and position of a user defined type either dynamically or,
even better, statically?
I don't know about the source file, per se, but std.traits has
the
It seems like you're trying to compile 64-bit code when you are
on 32-bit system and you have 32-bit libphobos.
I conclude that because I have similar errors when trying to
build 64-bit library on 32-bit system.
/usr/bin/ld:
/usr/lib/x86_64-linux-gnu/libphobos2.a(format_712_5b3.o):
relocation R_X86_64_32 against `.rodata' can not be used when
making a shared object; recompile with -fPIC
On Wed, 11 Jun 2014 02:30:00 +
WhatMeWorry via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
In Mr. Cehreli's book it says
Additionally, the length of dynamic arrays can be changed by
assigning a value to this property:
int[] array; // initially empty
array.length = 5;
Hi there,
The problem this question is about is now solved, by writing my
own binary search algorithm, but I'd like to ask it anyway as I
think I could learn a lot from the answers.
The problem was, given an array of numbers, double[] numbers, and
an ordering from makeIndex size_t[] order,
On Wednesday, 11 June 2014 at 11:22:08 UTC, Andrew Brown wrote:
Hi there,
The problem this question is about is now solved, by writing my
own binary search algorithm, but I'd like to ask it anyway as I
think I could learn a lot from the answers.
The problem was, given an array of numbers,
My question about this is how lazy is map? Will it work on
every value of order and then pass it to lowerBound, or could
it work to evaluate only those values asked by lowerBound? I
guess probably not, but could a function be composed that
worked in this way?
Thank you very much
Andrew
On 06/11/14 00:31, Nordlöw via Digitalmars-d-learn wrote:
Either way, it shouldn't be too hard to implement. Base it off
splitter!pred, which is actually quite trivial. AFAIK, your
What do you mean by basing it off splitter!pred - should I start with some
existing splitter algorithm in
map is fully lazy.
However, if you've already got the sorted indices in `order`, I
would do this:
auto numLessThanN = numbers.indexed(order).countUntil!((x) = x
= N)();
That indexed command is perfect though, does the trick, thank you
very much.
On Wednesday, 11 June 2014 at 11:42:42 UTC, Artur Skawina via
Digitalmars-d-learn wrote:
On 06/11/14 00:31, Nordlöw via Digitalmars-d-learn wrote:
Either way, it shouldn't be too hard to implement. Base it
off splitter!pred, which is actually quite trivial. AFAIK,
your
What do you mean by
On 6/11/2014 2:14 PM, Matt wrote:
window = SDL_CreateWindow (cfg[window][caption].str.ptr,
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height,
SDL_WINDOW_SHOWN);
I'm curious -- does cfg[][].str ensure that the string is null
terminated? Because if it doesn't, you've got
On Wednesday, 11 June 2014 at 11:50:36 UTC, Andrew Brown wrote:
map is fully lazy.
However, if you've already got the sorted indices in `order`,
I would do this:
auto numLessThanN = numbers.indexed(order).countUntil!((x) = x
= N)();
That indexed command is perfect though, does the trick,
On Wednesday, 11 June 2014 at 11:38:07 UTC, Andrew Brown wrote:
My question about this is how lazy is map? Will it work on
every value of order and then pass it to lowerBound, or could
it work to evaluate only those values asked by lowerBound? I
guess probably not, but could a function be
You are correct. assumeSorted and lowerBound will provide
better time complexity than countUntil
I'm sorry, one final question because I think I'm close to
understanding. Map produces a forward range (lazily) but not a
random access range? Therefore, lowerBound will move along this
range
On Wednesday, 11 June 2014 at 13:20:37 UTC, Andrew Brown wrote:
You are correct. assumeSorted and lowerBound will provide
better time complexity than countUntil
I'm sorry, one final question because I think I'm close to
understanding. Map produces a forward range (lazily) but not a
random
On Wednesday, 11 June 2014 at 13:25:03 UTC, John Colvin wrote:
On Wednesday, 11 June 2014 at 13:20:37 UTC, Andrew Brown wrote:
You are correct. assumeSorted and lowerBound will provide
better time complexity than countUntil
I'm sorry, one final question because I think I'm close to
1 - 100 of 184 matches
Mail list logo