I've just started learning D and noticed a bug, but wanted to
confirm it here before reporting it.
According to spec: "If the new array length is shorter, the array
is not reallocated, and no data is copied. It is equivalent to
slicing the array". Contradicted by a trivial program:
void
On Sat, 2015-12-26 at 19:57 +, Ilya Yaroshenko via Digitalmars-d-
announce wrote:
> Hi,
>
> I will write GEMM and GEMV families of BLAS for Phobos.
>
> Goals:
> - code without assembler
> - code based on SIMD instructions
> - DMD/LDC/GDC support
> - kernel based architecture like
On 26.12.2015 21:21, Jacob Carlborg wrote:
It does work, but it looks like it affected other bowers as well
(Firefox).
That's weird. Does it look bad?
BTW, I still think that a custom look would be better.
Something like the search field in Firefox. It has a the magnifier icon
which acts
On Wednesday, 23 December 2015 at 12:54:39 UTC, Jakob Jenkov
wrote:
I really want to put these paid blogging ideas into use one
day, but maybe D isn't the place to do it.
Or - maybe D is exactly the right use case. D doesn't already
have a ton of available material, but still as a decent size
https://issues.dlang.org/show_bug.cgi?id=15479
--- Comment #2 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos
https://github.com/D-Programming-Language/phobos/commit/678e1b46180fc192ec5520899a0c35b0c5934cf8
Issue 15479 - COFF:
On 24.12.2015 14:57, Chris wrote:
On Thursday, 24 December 2015 at 09:30:24 UTC, Rainer Schuetze wrote:
In the locals window, mago displays all instances of variables, but
with the same value (which might be some uninitialized value of a
different declaration than expected). The Visual Studio
Hi there,
I've just read a thread about low latency programming using D. As
a Java user, I'm developing low latency applications in the
financial area. In Java, there are some comprehensive FIX engines
like QuickFix/J or lightweight engines like Falcon available as
open source. I like to
On Sunday, 27 December 2015 at 09:27:18 UTC, Kokyo wrote:
Hi there,
I've just read a thread about low latency programming using D.
As a Java user, I'm developing low latency applications in the
financial area. In Java, there are some comprehensive FIX
engines like QuickFix/J or lightweight
On Sunday, 27 December 2015 at 15:19:21 UTC, FrankLike wrote:
Hi,
Now I need get the .a file on Linux,target system is ARM.
If you use gcc ,you will use the 'ar' to get .a file,
but how to do by GDC ?
And how to get the execute file by .a file and .d file?
Thank you.
I couldn't have
On Sunday, 27 December 2015 at 15:10:07 UTC, TheDGuy wrote:
I don't understand this:
https://www.youtube.com/watch?v=j_VCa-5VeP8=youtu.be
The variable "discriminant" is below zero but it jumps right
into the if statement?
The video is private, so we can't see it. I think you wanted
https://issues.dlang.org/show_bug.cgi?id=15480
--- Comment #2 from karthikeyan ---
Seems this depends upon https://issues.dlang.org/show_bug.cgi?id=5710. Atleast
can this assert be removed or replaced by some other logic to check for void
functions?
--
On Sunday, 27 December 2015 at 16:41:10 UTC, TheDGuy wrote:
It looks like the debugger is not working correctly because i
changed the code to this:
[...]
and the same problem appears.
I can't watch youtube here. What numbers does your input
generate? Which 'if' doesn't fire? What results
On Sunday, 27 December 2015 at 15:10:07 UTC, TheDGuy wrote:
I don't understand this:
https://www.youtube.com/watch?v=j_VCa-5VeP8=youtu.be
The variable "discriminant" is below zero but it jumps right
into the if statement?
Please paste the code here: http://dpaste.dzfl.pl/
Bubba.
On 27.12.2015 15:04, Jacob Carlborg wrote:
https://drive.google.com/open?id=0B7UtafxGD9vEQTVjeXZhSDdRZDA
The caret seems to be a bit high maybe, but otherwise that's how it's
supposed to look. Feel free to criticize, of course.
Hello again.
I'd like to announce a simple pl0 trans-compiler.
https://github.com/UplinkCoder/pl0stuff
with my parser generator it took me about 3 hours to get the
compiler running.
The implemented optimizations are
* function-call-inclining
* nested-block-simplification,
*
On Sunday, 27 December 2015 at 14:44:37 UTC, Ola Fosheim Grøstad
wrote:
On Sunday, 27 December 2015 at 08:25:58 UTC, Joakim wrote:
recently). Rather, the goal would be a site for hobbyists to
learn how to use the language to its fullest, without having
to dive into the source and github PRs
On Sunday, 27 December 2015 at 07:40:55 UTC, Ali Çehreli wrote:
It looks like you need map(), not each():
import std.algorithm;
import std.typecons;
import std.array;
void main() {
auto a = [ 1, 2 ];
auto arr = a.map!(e => tuple(2 * e, e * e)).array;
static assert(is(typeof(arr)
On Sunday, 27 December 2015 at 16:39:18 UTC, SimonN wrote:
On Sunday, 27 December 2015 at 16:01:37 UTC, TheDGuy wrote:
Sry:
if((x1 < 0) & (x2 >= 0)){
This looks like a bug, with & instead of &&.
-- Simon
It looks like the debugger is not working correctly because i
https://issues.dlang.org/show_bug.cgi?id=15434
yazan.dab...@gmail.com changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
On Sunday, 27 December 2015 at 15:19:21 UTC, FrankLike wrote:
Hi,
Now I need get the .a file on Linux,target system is ARM.
If you use gcc ,you will use the 'ar' to get .a file,
but how to do by GDC ?
And how to get the execute file by .a file and .d file?
Thank you.
Just use ar on the
https://issues.dlang.org/show_bug.cgi?id=15480
--- Comment #3 from karthikeyan ---
Seems related : https://github.com/D-Programming-Language/phobos/pull/1917
--
On Sunday, 27 December 2015 at 18:03:16 UTC, Bubbasaur wrote:
On Sunday, 27 December 2015 at 15:53:55 UTC, TheDGuy wrote:
Any idea what i am doing wrong?
https://www.youtube.com/watch?v=j_VCa-5VeP8
Tell me one thing, what is the value returned?
Well It's working here:
On 2015-12-27 13:06, anonymous wrote:
That's weird. Does it look bad?
https://drive.google.com/open?id=0B7UtafxGD9vEQTVjeXZhSDdRZDA
b) It would require Javascript, right?
I have no idea.
--
/Jacob Carlborg
https://issues.dlang.org/show_bug.cgi?id=15480
Issue ID: 15480
Summary: std.algorithm.iteration.map not accepting multiple
lambdas
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Any idea what i am doing wrong?
https://www.youtube.com/watch?v=j_VCa-5VeP8
On Sunday, 27 December 2015 at 10:28:53 UTC, Russel Winder wrote:
On Sat, 2015-12-26 at 19:57 +, Ilya Yaroshenko via
Digitalmars-d- announce wrote:
Hi,
I will write GEMM and GEMV families of BLAS for Phobos.
Goals:
- code without assembler
- code based on SIMD instructions
-
On Sunday, 27 December 2015 at 16:01:37 UTC, TheDGuy wrote:
Sry:
if((x1 < 0) & (x2 >= 0)){
This looks like a bug, with & instead of &&.
-- Simon
On Sunday, 27 December 2015 at 16:48:44 UTC, SimonN wrote:
On Sunday, 27 December 2015 at 16:41:10 UTC, TheDGuy wrote:
It looks like the debugger is not working correctly because i
changed the code to this:
[...]
and the same problem appears.
I can't watch youtube here. What numbers does
I've started some parsing of ddoc sections and continue work on
the formatter:
http://dpldocs.info/experimental-docs/std.algorithm.searching.findSplit.html
I'm pretty happy with how this is turning out. Going to add more
rich info to params later - I realize I can't parse all
constraints,
On Sunday, 27 December 2015 at 02:21:11 UTC, Ali Çehreli wrote:
On 12/26/2015 05:26 PM, Karthikeyan wrote:
> if I need to map on a array of tuples will that work with the
tuple being
> unpacked or do I need to get it as single element and do
unpacking myself?
Unfortunately, there is no
I don't understand this:
https://www.youtube.com/watch?v=j_VCa-5VeP8=youtu.be
The variable "discriminant" is below zero but it jumps right into
the if statement?
On 12/26/15 4:17 PM, Daniel Kozak via Digitalmars-d-announce wrote:
https://strongloop.com/strongblog/compare-javascript-templates-jade-mustache-dust/
Andrei Alexandrescu via Digitalmars-d-announce
napsal So, pro 26, 2015 v 8∶58 :
On 12/26/15 1:35 PM,
On Saturday, 26 December 2015 at 19:09:22 UTC, Kingsley wrote:
On Saturday, 26 December 2015 at 17:58:52 UTC, Guillaume Piolat
wrote:
Really appreciate the attention to detail that went into it.
This is a fantastic book - thanks very much to Mike for all the
effort and attention he put into
I have a binary tree storing ints implemented using an array. The
internal state looks like this:
8,7,6,4,1,3,5,2
When extracting this data, it is returned as 8,7,6,5,4,3,2,1.
Is it possible to elegantly add a range on top of the internal
state to return the correct value order I would
On Sunday, 27 December 2015 at 08:25:58 UTC, Joakim wrote:
recently). Rather, the goal would be a site for hobbyists to
learn how to use the language to its fullest, without having to
dive into the source and github PRs to extract all that info
themselves. Obviously, learning D might
On Sunday, 27 December 2015 at 15:24:17 UTC, tcak wrote:
On Sunday, 27 December 2015 at 15:19:21 UTC, FrankLike wrote:
Hi,
Now I need get the .a file on Linux,target system is ARM.
If you use gcc ,you will use the 'ar' to get .a file,
but how to do by GDC ?
And how to get the execute
See the following code:
import std.stdio;
void foo(ref int x)
{
writefln("%s", x);
}
void main(string[] args)
{
int y = 0;
foo(y++);
}
When compiled it produces this error:
test.d(11): Error: function test.foo (ref int x) is not callable
using argument types (int)
On 12/27/15 1:27 AM, Rory McGuire via Digitalmars-d-announce wrote:
On 26 Dec 2015 22:00, "Andrei Alexandrescu via Digitalmars-d-announce"
> wrote:
>
> On 12/26/15 1:35 PM, Rory McGuire via
On 12/27/15 12:23 AM, Basile B. wrote:
On Saturday, 26 December 2015 at 19:57:19 UTC, Ilya Yaroshenko wrote:
- allocators support. GEMM requires small internal allocations.
- @nogc nothrow pure template functions (depends on allocator)
Do you mean using std.experimental.allocators and
On Sunday, 27 December 2015 at 16:52:39 UTC, TheDGuy wrote:
I don't understand why my program goes into the if statement if
the debugger shows, that the variable "discriminant" is below
zero even though:
"if(discriminant > 0)"?
I have a hard time believing this. Does the problem persist if
On Sunday, 27 December 2015 at 15:53:55 UTC, TheDGuy wrote:
Any idea what i am doing wrong?
https://www.youtube.com/watch?v=j_VCa-5VeP8
Tell me one thing, what is the value returned?
Well It's working here: http://dpaste.dzfl.pl/18b27ea26b08
Maybe you would like to change the code above to
On Sunday, 27 December 2015 at 16:05:39 UTC, Gary Willoughby
wrote:
If I remove the post-increment of the y variable if works. Is
this an rvalue reference issue? Would you expect this to work?
This should work with *pre*-increment, but not post-increment.
Post-increment works like this:
int
On Sunday, 27 December 2015 at 16:05:39 UTC, Gary Willoughby
wrote:
void foo(ref int x)
foo(y++);
If I remove the post-increment of the y variable if works. Is
this an rvalue reference issue?
Yes, but more than that, what, exactly, would you expect from
that? The order of operations
On Sunday, 27 December 2015 at 18:47:52 UTC, Adam D. Ruppe wrote:
On Sunday, 27 December 2015 at 18:40:55 UTC, Jeremy DeHaan
wrote:
I was playing around with some code today and I noticed that
in some cases struct destructors are not called.
struct destructors are called when the struct
On Sunday, 27 December 2015 at 17:23:35 UTC, Gary Willoughby
wrote:
I have a binary tree storing ints implemented using an array.
The internal state looks like this:
8,7,6,4,1,3,5,2
When extracting this data, it is returned as 8,7,6,5,4,3,2,1.
Is it possible to elegantly add a range on top
On Sunday, 27 December 2015 at 18:54:25 UTC, Adam D. Ruppe wrote:
On Sunday, 27 December 2015 at 16:05:39 UTC, Gary Willoughby
wrote:
[...]
Yes, but more than that, what, exactly, would you expect from
that? The order of operations with the postfix ++ operator and
ref would probably lead to
On Saturday, 26 December 2015 at 05:31:59 UTC, Ur@nuz wrote:
On Friday, 25 December 2015 at 20:06:04 UTC, drug wrote:
25.12.2015 17:13, Ur@nuz пишет:
[...]
You can do following http://dpaste.dzfl.pl/41c57f89a5a0
The reason of compile error is your using a range as a
separator, change it
On Sunday, 27 December 2015 at 16:00:34 UTC, jkpl wrote:
On Sunday, 27 December 2015 at 15:53:55 UTC, TheDGuy wrote:
Any idea what i am doing wrong?
https://www.youtube.com/watch?v=j_VCa-5VeP8
You could post the code also, personnaly I'm always almost at 2
meters from my screen, with zoom,
On Sunday, 27 December 2015 at 15:53:55 UTC, TheDGuy wrote:
Any idea what i am doing wrong?
https://www.youtube.com/watch?v=j_VCa-5VeP8
You could post the code also, personnaly I'm always almost at 2
meters from my screen, with zoom, so I can't read the code...
On Sunday, 27 December 2015 at 18:40:55 UTC, Jeremy DeHaan wrote:
I was playing around with some code today and I noticed that in
some cases struct destructors are not called.
struct destructors are called when the struct ceases to exist in
the program.
A global variable never ceases to
On Sunday, 27 December 2015 at 19:04:11 UTC, Jeremy DeHaan wrote:
So are these left dangling or do they actually get cleaned up
at the program exit?
They are left dangling right now. You can clear it yourself by
defining a `static ~this() { .destroy(your struct); }` somewhere
in the module.
I'm doing some re-writing and measuring. The basic task is to
take 10K samples (in struct S samples below) and calculate some
metrics (just per sample for now). It isn't evident to me how to
write the parallel foreach in the same format as each!, so I just
used the loop form that I
On Sunday, 27 December 2015 at 20:06:53 UTC, TheDGuy wrote:
I don't know what my computer is doing today:
x and y are coordinates and if x is any number from 0 to 150
the result of x/width is always zero
Dividing Integers will result in Integer:
int x = 10, width = 50;
https://issues.dlang.org/show_bug.cgi?id=15480
--- Comment #1 from karthikeyan ---
I took a local copy of the std.algorithm.iteration as myiteration.d and used it
for debugging. Commenting out the following two lines make this work
Hi,
Now I need get the .a file on Linux,target system is ARM.
If you use gcc ,you will use the 'ar' to get .a file,
but how to do by GDC ?
And how to get the execute file by .a file and .d file?
Thank you.
I was playing around with some code today and I noticed that in
some cases struct destructors are not called.
for example:
impost std.stdio;
SomeStruct global;
void main()
{
SomeStruct inMain;
writeln(global.thing);
writeln(inMain.thing);
writeln(getSomeInt());
}
int
https://issues.dlang.org/show_bug.cgi?id=15434
Martin Nowak changed:
What|Removed |Added
CC||c...@dawg.eu
--- Comment #3
I don't know what my computer is doing today:
code:
double normalized_i = (x / width) - 0.5;
double normalized_j = (y / height) - 0.5;
writeln(x);
writeln(normalized_i);
writeln(y);
On 12/27/2015 02:09 AM, milentin wrote:
> I've just started learning D and noticed a bug, but wanted to confirm it
> here before reporting it.
>
> According to spec: "If the new array length is shorter, the array is not
> reallocated, and no data is copied. It is equivalent to slicing the
>
On 12/27/2015 04:17 PM, Jay Norwood wrote:
On Sunday, 27 December 2015 at 23:42:57 UTC, Ali Çehreli wrote:
That does not compile because i is size_t but apply_metrics() takes
an int. One solution is to call to!int:
foreach( i, ref a; parallel(samples[])){
apply_metrics(i.to!int,a);}
On Sunday, 27 December 2015 at 23:42:57 UTC, Ali Çehreli wrote:
On 12/27/2015 11:30 AM, Jay Norwood wrote:
> samples[].each!((int i, ref a)=>apply_metrics(i,a));
Are you using an older compiler? That tuple expansion does not
work any more at least with dmd v2.069.0 but you can use
On Sunday, 27 December 2015 at 22:36:32 UTC, Ali Çehreli wrote:
[Several hours later...]
You know what... I bet there is no actual allocation at all. I
think what happens is, the code calls GC.realloc(24) and
realloc() does not do anything. However, it still reports to
the profiler that
On 28/12/15 3:44 AM, Ola Fosheim Grøstad wrote:
On Sunday, 27 December 2015 at 08:25:58 UTC, Joakim wrote:
recently). Rather, the goal would be a site for hobbyists to learn
how to use the language to its fullest, without having to dive into
the source and github PRs to extract all that info
On Sunday, 27 December 2015 at 22:51:27 UTC, Ali Çehreli wrote:
On 12/27/2015 07:53 AM, TheDGuy wrote:
Any idea what i am doing wrong?
https://www.youtube.com/watch?v=j_VCa-5VeP8
YouTube says that the video has been removed by the user.
That's exactly the reason why I don't like even dpaste.
On Sunday, 27 December 2015 at 23:42:57 UTC, Ali Çehreli wrote:
That does not compile because i is size_t but apply_metrics()
takes an int. One solution is to call to!int:
foreach( i, ref a; parallel(samples[])){
apply_metrics(i.to!int,a);}
It builds for me still, and executes ok,
On 12/27/2015 07:53 AM, TheDGuy wrote:
Any idea what i am doing wrong?
https://www.youtube.com/watch?v=j_VCa-5VeP8
YouTube says that the video has been removed by the user. That's exactly
the reason why I don't like even dpaste. There is no guarantee that such
threads will be useful forever.
On 12/27/2015 08:42 AM, Jay Norwood wrote:
> However, I was trying to use each!, with the intention of then moving to
> parallel processing by samples blocks. My guess is this would be more
> efficient than using parallel map or amap, which would parallel process
> by function application, if I
My code:
http://dpaste.com/1X3E1HW
i store colors in the accumulator-array and draw them via
"cr.rectangle()". Because i have some problems with the code i
set the SourceRgb-color to a constant value but if i execute the
program, the window remains white.
On 12/27/2015 11:30 AM, Jay Norwood wrote:
> samples[].each!((int i, ref a)=>apply_metrics(i,a));
Are you using an older compiler? That tuple expansion does not work any
more at least with dmd v2.069.0 but you can use enumerate():
On Monday, 28 December 2015 at 01:17:15 UTC, Dan Olson wrote:
A little progress report. More to come later when I get
something pushed to github.
I bought a returned Apple Watch yesterday at discount for
$223.99 US and tried to see how much of D would work on it
using my iOS fork of LDC.
A little progress report. More to come later when I get something pushed
to github.
I bought a returned Apple Watch yesterday at discount for $223.99 US and
tried to see how much of D would work on it using my iOS fork of LDC.
There were a few bumps, like dealing with embedded bitcode (a watchOS
Now I build a project for ARM linux on ubuntu 15.04 ,but build
error.
I download the 'wiringPi' from http://wiringPi.com,convert the
*.h to *.d.then build the 'aa.so' file:
#! /bin/sh
dfiles="max31855.d max5322.d mcp23008.d mcp23016.d mcp23016reg.d
mcp23017.d mcp23s08.d mcp23s17.d mcp23x08.d
On Sunday, 27 December 2015 at 09:51:42 UTC, tcak wrote:
On Sunday, 27 December 2015 at 09:27:18 UTC, Kokyo wrote:
Hi there,
I've just read a thread about low latency programming using D.
As a Java user, I'm developing low latency applications in the
financial area. In Java, there are some
On Sunday, 27 December 2015 at 20:01:47 UTC, Gary Willoughby
wrote:
On Sunday, 27 December 2015 at 17:23:35 UTC, Gary Willoughby
wrote:
I have a binary tree storing ints implemented using an array.
The internal state looks like this:
8,7,6,4,1,3,5,2
When extracting this data, it is returned
https://issues.dlang.org/show_bug.cgi?id=15481
Issue ID: 15481
Summary: Reducing array.length triggers reallocation
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
On Sunday, 27 December 2015 at 22:36:32 UTC, Ali Çehreli wrote:
I don't understand why that happens. I found one related bug:
https://issues.dlang.org/show_bug.cgi?id=13750
I can understand that assignment to arr.length cannot be @nogc
but I would expect a check against length so that there
On Thursday, 24 December 2015 at 17:10:25 UTC, Jack Stouffer
wrote:
On Sunday, 13 December 2015 at 05:10:17 UTC, Jack Stouffer
wrote:
This is the voting thread to decide if the proposed addition
to Phobos, std.experimental.ndslice, should be accepted.
Voting ends in three days.
Have a merry
Hi Ali.
I've been reading your book recently and wish to comment on how
excellent it is. It's easy to read, the concepts are well
explained and I've learned lots about the language. I've always
found D documentation a bit lacking, your book fills many of
these gaps.
Thank you for writing
78 matches
Mail list logo