On 05/28/2013 08:56 AM, Ali Çehreli wrote:
That is a difficult situation to manage though: What operations are valid
under
the 8 total mutable combinations of 3 members? The compiler must know what
operations to be applied on what type of data so that it can both check the
code
and compile
On Tuesday, 28 May 2013 at 12:57:12 UTC, Sergei Nosov wrote:
Hi!
I'm trying to implement an array, which uses malloc to allocate
memory. Also, I want to implement a random access range
interface for it.
That went pretty well, until I tried to sort it. Sorting
function asserted Failed to
Sergei Nosov:
That went pretty well, until I tried to sort it. Sorting
function asserted Failed to sort range of type Array!(int).
If you take a look a the implementation of Phobos sort, you see
there is a recently added runtime test mostly meant to catch
wrongly implemented comparison
On Tuesday, 28 May 2013 at 13:41:19 UTC, bearophile wrote:
Sergei Nosov:
That went pretty well, until I tried to sort it. Sorting
function asserted Failed to sort range of type Array!(int).
If you take a look a the implementation of Phobos sort, you see
there is a recently added runtime
I do not believe this is a bug. You should be able to print the
value by casting to string. (to!() will not work as it will
provide the same results)
Usually enumeration values are not descriptive for how they
should be used. And when printing to the screen it is usually for
debugging or
On Tuesday, 28 May 2013 at 14:35:22 UTC, Jesse Phillips wrote:
I do not believe this is a bug.
You are right, I was wrong. writeln is meant to write the name of
enums and not their contents.
Bye,
bearophile
On 05/28/2013 05:57 AM, Sergei Nosov wrote:
Hi!
I'm trying to implement an array, which uses malloc to allocate memory.
Also, I want to implement a random access range interface for it.
That went pretty well, until I tried to sort it. Sorting function
asserted Failed to sort range of type
On Tuesday, May 28, 2013 03:05:52 Timothee Cour wrote:
2A)
Thanks for your answer;
You skipped over this one, which I don't understand:
string a=ΩΩab;
auto b1=a.map!(a=d~a~d).array;
writeln(b1);//[Ω, Ω, a, b, , ]
Why are there 2 empty strings at the end? (one per Omega if you vary the
Timothee Cour:
Where do you think it can cause clashing?
I don't know.
But my solution is to introduce a simple enumerate range:
http://d.puremagic.com/issues/show_bug.cgi?id=5550
So if you have a range and you don't need indexes you use:
foreach (item; myrange) {}
If you also want an
Thx, Ali!
1) First, an observation: This Array design conflates the
concepts of container and range. If there are actual elements
that are being stored (as opposed to elements being generated),
it is better tha a range merely provides access to those
elements. popFront should consume the
On 05/28/2013 11:19 AM, Sergei Nosov wrote:
Do you mean it's a good idea
to separate storage and access (via range) to the container? Like
std.container's containers (heh) have nested Range struct?
Yes, that is generally the right approach. Note that built-in arrays
have a similar design
On 05/28/2013 11:31 AM, Ali Çehreli wrote:
@property Array!T opSlice(size_t i, size_t j) {
// ...
ret.front_ = i;
I feel like the initialization of front_ above is not right either.
Imagine quick sort where we are slicing the right-hand side of a range
as [0..10],
On Tuesday, 28 May 2013 at 18:38:01 UTC, Ali Çehreli wrote:
On 05/28/2013 11:31 AM, Ali Çehreli wrote:
@property Array!T opSlice(size_t i, size_t j) {
// ...
ret.front_ = i;
I feel like the initialization of front_ above is not right
either.
Imagine quick sort where
On Tuesday, 28 May 2013 at 12:57:12 UTC, Sergei Nosov wrote:
Hi!
I'm trying to implement an array, which uses malloc to allocate
memory. Also, I want to implement a random access range
interface for it.
That went pretty well, until I tried to sort it. Sorting
function asserted Failed to
On 05/28/2013 12:47 PM, Anthony Goins wrote:
sort!(ab, SwapStrategy.stable)(arr);
This worked for me with the code at your link.
I've noticed that too. The reason that works is because in that case it
uses Tim Sort. Apparently, the Tim Sort algorithm does not expose the
bugs that were in
Thanks for the enumerate pointer.
3A)
why not having an Enumerate(R) containing a single 'opApply' public method,
to avoid returning tuples in 'front()'
3B)
requiring one to use 'myrange.enumerate' for inputRanges and 'myrange' in
other cases is bad for generic programming and user time. This is
I was trying some funky stuff with D, not real code just playing
and I got a message of a seg fault and a core dump written to a
log. I just wondered where these logs are written to. It's not
immediately apparent where it is.
On Tuesday, 28 May 2013 at 21:06:14 UTC, Gary Willoughby wrote:
playing and I got a message of a seg fault and a core dump
written to a log.
like this?
Segmentation fault (core dumped)
That's actually more of a linux thing than a D thing. The file
will be called core in the current
Timothee Cour:
3A)
why not having an Enumerate(R) containing a single 'opApply'
public method,
Unfortunately opApply doesn't not work well with all the other
range-based functions.
Also that Enumerate code is for illustrative purposes, it's not
meant to be good library code.
3B)
On 05/27/2013 05:24 PM, Francois Chabot wrote:
If with immutable(Type)[], I can have a re-assignable reference
to arrays of immutable data, I really should be able to have some
form of syntactical equivalent for single instances. But there
just doesn't seem to be one. Immutability for
What's the most efficient way to convert a float/double/real to an integer
type with a specified rounding scheme (eg floor/ceil etc)?
Is there anything besides:
int x=floor(1.2); ?
there's also
core.stdc.math.floor{l,f,}
Because these first convert to floating point representation and then then
This is still there with the new release of 2.063.
[quote]
OPTLINK (R) for Win32 Release 8.00.12
Copyright (C) Digital Mars 1989-2010 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
Graphics.lib(object) Offset 201F6H Record Type 0091
Error 1: Previous Definition Different :
I don't even understand the error. Where is a previous
definition? And why?
Seems like I have to switch back to 2.062.
On Tuesday, 28 May 2013 at 20:43:32 UTC, Ali Çehreli wrote:
On 05/28/2013 12:47 PM, Anthony Goins wrote:
sort!(ab, SwapStrategy.stable)(arr);
This worked for me with the code at your link.
I've noticed that too. The reason that works is because in that
case it uses Tim Sort. Apparently,
Hi All,
I updated to dmd 2.063 today and all has been going smoothly
until I decided to try out msgpack.d. I got an error compiling
the msgpack.d unittest, so out of interest I decided to check
this using dmd2.062 and it compiled and ran fine.
I admit I don't really understand whether the
Here's a link to the msgpack.d source:
https://github.com/msgpack/msgpack-d/blob/master/src/msgpack.d
And the error is on line 3211, not 3215 as mentioned in the
previous post.
Thanks,
Stewart
On Tuesday, 28 May 2013 at 22:28:50 UTC, Namespace wrote:
I don't even understand the error. Where is a previous
definition? And why?
Seems like I have to switch back to 2.062.
In the case of using Mono-D,
could you give me your build log please? That might help!
When copypasting the
http://d.puremagic.com/issues/show_bug.cgi?id=10187
Summary: Precision of floating-point returned values
Product: D
Version: D2
Platform: x86
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
http://d.puremagic.com/issues/show_bug.cgi?id=10187
Maxim Fomin ma...@maxim-fomin.ru changed:
What|Removed |Added
CC||ma...@maxim-fomin.ru
http://d.puremagic.com/issues/show_bug.cgi?id=10187
Vladimir Panteleev thecybersha...@gmail.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=8476
Vladimir Panteleev thecybersha...@gmail.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=10167
--- Comment #3 from Ryuichi OHORI r.97...@gmail.com 2013-05-28 01:16:28 PDT
---
I found that line 176 of std.format.d is wrong:
$(TR $(TD $(B '#')) $(TD numeric ($(B '0'))) $(TD Use leading
and thought it should be:
$(TR $(TD $(B '0')) $(TD
http://d.puremagic.com/issues/show_bug.cgi?id=10188
Summary: Wrong Document Comment on std.format.d(176)
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
http://d.puremagic.com/issues/show_bug.cgi?id=10189
Summary: demangle doesn't work with __ModuleInfoZ __initZ
__arrayZ
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
http://d.puremagic.com/issues/show_bug.cgi?id=10190
Summary: fullyQualifiedName on enum template members doesn't
work
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
http://d.puremagic.com/issues/show_bug.cgi?id=10190
Dicebot m.stras...@gmail.com changed:
What|Removed |Added
CC||m.stras...@gmail.com
http://d.puremagic.com/issues/show_bug.cgi?id=10190
--- Comment #2 from Dicebot m.stras...@gmail.com 2013-05-28 02:38:03 PDT ---
Ok, there are two issues here.
First one is that identifier trait fails badly with temporaries, minimal
example:
template
http://d.puremagic.com/issues/show_bug.cgi?id=9878
--- Comment #3 from bearophile_h...@eml.cc 2013-05-28 02:56:25 PDT ---
(In reply to comment #2)
where I suggest to give a template parameter to specify
lexicographic/antilexicographic, along with depth first/breadth first.
If you want to
http://d.puremagic.com/issues/show_bug.cgi?id=10191
Summary: std.array.array and Unicode strings
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
http://d.puremagic.com/issues/show_bug.cgi?id=6447
Russel Winder rus...@winder.org.uk changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=6447
--- Comment #3 from bearophile_h...@eml.cc 2013-05-28 04:15:16 PDT ---
(In reply to comment #2)
Is this a symptom of the fact that Phobos is really predicated on use of
hardware types more generally?
I think it's mostly a symptom of
http://d.puremagic.com/issues/show_bug.cgi?id=10192
Summary: Fixed size array initialization inconsistency between
DeclDefs scope and statement scope
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status:
http://d.puremagic.com/issues/show_bug.cgi?id=3849
--- Comment #20 from bearophile_h...@eml.cc 2013-05-28 04:45:25 PDT ---
A small example why enforcing array lengths match improves safety of D
programs. This part of a program uses strings to define a binary decision
table, but it's easy to
http://d.puremagic.com/issues/show_bug.cgi?id=10193
Summary: Template args to UDA's
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
http://d.puremagic.com/issues/show_bug.cgi?id=10017
Martin Nowak c...@dawg.eu changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=10194
Summary: std.variant.Variant doesn't call the dtor of struct
values
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
http://d.puremagic.com/issues/show_bug.cgi?id=10193
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=9816
--- Comment #4 from Martin Nowak c...@dawg.eu 2013-05-28 09:31:31 PDT ---
1) Exporting a global variable leads to a linker error
fixed by bug 10059
2) Exporting thread local variables should be an error (at least it is in c++)
Can't you
http://d.puremagic.com/issues/show_bug.cgi?id=10195
Andrej Mitrovic andrej.mitrov...@gmail.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=10195
Summary: auto type inference on method override
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component:
http://d.puremagic.com/issues/show_bug.cgi?id=8318
Andrej Mitrovic andrej.mitrov...@gmail.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=10021
Sebastian Graf sebastiang...@t-online.de changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=8318
--- Comment #2 from Sebastian Graf sebastiang...@t-online.de 2013-05-28
14:01:45 PDT ---
*** Issue 10021 has been marked as a duplicate of this issue. ***
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
---
http://d.puremagic.com/issues/show_bug.cgi?id=6101
Andrei Alexandrescu and...@erdani.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=10196
Summary: RDMD: RDMD can't be used from MSys
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
http://d.puremagic.com/issues/show_bug.cgi?id=10196
--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-05-28
15:30:23 PDT ---
Almost forgot, here's the -chatty version:
-
$ rdmd --chatty test.d
stat C:/Users/ADMINI~1/AppData/Local/Temp\.rdmd
stat
http://d.puremagic.com/issues/show_bug.cgi?id=6101
--- Comment #5 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-05-28
15:31:34 PDT ---
We don't have access to HTML generation, it's always up to Walter to build the
final zip file.
--
Configure issuemail:
http://d.puremagic.com/issues/show_bug.cgi?id=6101
Andrei Alexandrescu and...@erdani.com changed:
What|Removed |Added
Status|REOPENED|ASSIGNED
http://d.puremagic.com/issues/show_bug.cgi?id=10193
Manu turkey...@gmail.com changed:
What|Removed |Added
Status|RESOLVED|REOPENED
http://d.puremagic.com/issues/show_bug.cgi?id=10167
--- Comment #4 from github-bugzi...@puremagic.com 2013-05-28 17:53:02 PDT ---
Commit pushed to https://github.com/D-Programming-Language/phobos
https://github.com/D-Programming-Language/phobos/commit/d6488d76a8dfcb2ef6d2cd094cfaeb13f4df9e69
http://d.puremagic.com/issues/show_bug.cgi?id=10193
Diggory digg...@googlemail.com changed:
What|Removed |Added
CC||digg...@googlemail.com
http://d.puremagic.com/issues/show_bug.cgi?id=10188
--- Comment #1 from github-bugzi...@puremagic.com 2013-05-28 21:50:26 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos
http://d.puremagic.com/issues/show_bug.cgi?id=10188
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Keywords||pull
http://d.puremagic.com/issues/show_bug.cgi?id=10193
--- Comment #4 from Manu turkey...@gmail.com 2013-05-28 22:10:42 PDT ---
(In reply to comment #3)
It could be implemented by making the template rewrite rule happen before the
attribute rewrite rule, so that this:
@attribute(target, T)
201 - 264 of 264 matches
Mail list logo