[Issue 8323] New: std.string.chompPrefix does not handle varying string types properly
http://d.puremagic.com/issues/show_bug.cgi?id=8323 Summary: std.string.chompPrefix does not handle varying string types properly Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: jmdavisp...@gmx.com --- Comment #0 from Jonathan M Davis 2012-06-30 00:14:27 PDT --- This fails assert(equal(chompPrefix("\uFF28el\uFF4co", "\uFF28el\uFF4co"w), "")); This because chompPrefix is assuming that the two strings that it's given have the same character type even though it's templated to take two completely different character types. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4617] Alias this'ed symbols cannot be passed to templates
http://d.puremagic.com/issues/show_bug.cgi?id=4617 Kenji Hara changed: What|Removed |Added Keywords||pull Version|unspecified |D2 --- Comment #2 from Kenji Hara 2012-06-30 05:07:55 PDT --- https://github.com/D-Programming-Language/dmd/pull/1032 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8324] New: Arrays seen as callables for map/filter
http://d.puremagic.com/issues/show_bug.cgi?id=8324 Summary: Arrays seen as callables for map/filter Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-06-30 07:28:23 PDT --- A low-priority enhancement request. In some cases the mapping function is just an array or associative array: import std.stdio, std.range, std.algorithm; void main() { auto a = [0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1]; iota(0, a.length).filter!(i => a[i])().writeln(); } Output: [1, 4, 9, 16] So maybe filter/map (and few other higher order functions) can be improved (using a new little function in std.functional) to see a given array/associative array as a callable: iota(0, a.length).filter!a().writeln(); The Clojure language supports something similar. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8324] Arrays seen as callables for map/filter
http://d.puremagic.com/issues/show_bug.cgi?id=8324 timon.g...@gmx.ch changed: What|Removed |Added CC||timon.g...@gmx.ch --- Comment #1 from timon.g...@gmx.ch 2012-06-30 07:39:39 PDT --- Also see issue 6110. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8325] New: IFTI on non-function templates
http://d.puremagic.com/issues/show_bug.cgi?id=8325 Summary: IFTI on non-function templates Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: accepts-invalid, wrong-code Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: timon.g...@gmx.ch --- Comment #0 from timon.g...@gmx.ch 2012-06-30 07:53:44 PDT --- DMD 2.059: template X(){ double X(double){return 2;} float X(float){return 3;} } static assert(!is(typeof(X(2; // fail static assert(is(typeof(X!()(2.0f)) == float)); // fail static assert(is(typeof(X(2.0))==double)); // ok static assert(is(typeof(X(2.0f))==float)); // fail All static assertions should pass. IFTI should not have any other effect than implicit template instantiation if the template in question contains more than one declaration. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8321] std.range.put doesn't work with RefCounted output range
http://d.puremagic.com/issues/show_bug.cgi?id=8321 Kenji Hara changed: What|Removed |Added Keywords||pull Component|DMD |Phobos Depends on||4617 Summary|std.range.put doesn"t work |std.range.put doesn't work |with RefCounted output |with RefCounted output |range |range --- Comment #1 from Kenji Hara 2012-06-30 10:18:57 PDT --- https://github.com/D-Programming-Language/phobos/pull/656 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8326] New: std.string.format results in run-time exception
http://d.puremagic.com/issues/show_bug.cgi?id=8326 Summary: std.string.format results in run-time exception Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: pun...@coverify.org --- Comment #0 from Puneet Goel 2012-06-30 11:19:22 PDT --- std.string.format throws runtime exception for BigInt and for BitArray types even though writefln works fine. The run-time error says std.format.FormatException@std/format.d(4744): Can't convert std.bigint.BigInt to string: "string toString()" not defined Here is a small test case: void main() { import std.stdio; import std.string; import std.bigint; import std.bitmanip; BigInt aa = 100; BitArray bb; bb.init([true, false]); writefln("%x", aa); writefln("%x", bb); writeln(format("%x", aa)); // throws exception writeln(format("%x", bb)); // throws exception } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5206] stat_t is not the same as struct stat
http://d.puremagic.com/issues/show_bug.cgi?id=5206 --- Comment #10 from jfanati...@gmx.at 2012-06-30 11:15:15 PDT --- Fixed. Pull request: https://github.com/D-Programming-Language/druntime/pull/257 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8327] New: Internal error: backend/cod1.c 3271
http://d.puremagic.com/issues/show_bug.cgi?id=8327 Summary: Internal error: backend/cod1.c 3271 Product: D Version: D2 Platform: All OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: simend...@gmail.com --- Comment #0 from simendsjo 2012-06-30 12:40:28 PDT --- Thrift trunk (last commit 6530f1dc88377c3d1a9811267c76fd80d5f419c4) fails to build with dmd trunk (last commit ec5d4da9ac7c8ed6b0ef7c75765b0624aa67a994). make[4]: Entering directory `/home/simendsjo/code/thrift/thrift-trunk/lib/d' dmd -oflibthriftd.a -w -wi -Isrc -lib src/thrift/base.d src/thrift/async/base.d src/thrift/async/socket.d src/thrift/codegen/async_client.d src/thrift/codegen/async_client_pool.d src/thrift/codegen/base.d src/thrift/codegen/client.d src/thrift/codegen/client_pool.d src/thrift/codegen/idlgen.d src/thrift/codegen/processor.d src/thrift/protocol/base.d src/thrift/protocol/binary.d src/thrift/protocol/compact.d src/thrift/protocol/json.d src/thrift/protocol/processor.d src/thrift/server/base.d src/thrift/server/simple.d src/thrift/server/taskpool.d src/thrift/server/threaded.d src/thrift/server/transport/base.d src/thrift/server/transport/socket.d src/thrift/transport/base.d src/thrift/transport/buffered.d src/thrift/transport/file.d src/thrift/transport/framed.d src/thrift/transport/http.d src/thrift/transport/memory.d src/thrift/transport/piped.d src/thrift/transport/range.d src/thrift/transport/socket.d src/thrift/transport/zlib.d src/thrift/util/awaitable.d src/thrift/util/cancellation.d src/thrift/util/future.d src/thrift/util/hashset.d src/thrift/internal/algorithm.d src/thrift/internal/codegen.d src/thrift/internal/ctfe.d src/thrift/internal/endian.d src/thrift/internal/resource_pool.d src/thrift/internal/socket.d src/thrift/internal/traits.d src/thrift/internal/test/protocol.d src/thrift/internal/test/server.d Internal error: backend/cod1.c 3271 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8327] Internal error: backend/cod1.c 3271
http://d.puremagic.com/issues/show_bug.cgi?id=8327 klickverbot changed: What|Removed |Added Status|NEW |RESOLVED CC||c...@klickverbot.at Resolution||DUPLICATE --- Comment #1 from klickverbot 2012-06-30 13:05:45 PDT --- *** This issue has been marked as a duplicate of issue 8283 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8283] backend/cod1.c 1677, related to structs with constructors (?)
http://d.puremagic.com/issues/show_bug.cgi?id=8283 klickverbot changed: What|Removed |Added CC||simend...@gmail.com --- Comment #1 from klickverbot 2012-06-30 13:05:46 PDT --- *** Issue 8327 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8268] std.datetime unittest asserts
http://d.puremagic.com/issues/show_bug.cgi?id=8268 --- Comment #3 from Jonathan M Davis 2012-06-30 14:51:20 PDT --- I'm going to install the Windows 8 Preview in VirtualBox and see if I can reproduce the error and track it down there, since I can get it for free, and it'll waste less of your time that way. By the way, assuming that I determine that Windows 8 has a bug in it, do you know how I could report it to Microsoft? I assume that they have a process for that or it would be silly to have betas, but I don't know what it is. If you happen to know what is or could point me in the right direction, that would be quite helpful. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8328] New: Mind Blowing error (possibly in DMD or std.variant)
http://d.puremagic.com/issues/show_bug.cgi?id=8328 Summary: Mind Blowing error (possibly in DMD or std.variant) Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: critical Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: icepa...@gmail.com --- Comment #0 from Isak Andersson 2012-06-30 17:04:36 PDT --- Created an attachment (id=1122) The minimal source tree that is giving the error Hello lovely D folks! I have been dealing with this incredibly strange error that I don't really even know how to describe because I can't understand what's causing it. I can really just show you. Here's the quick scoop if you don't want to download stuff etc: https://gist.github.com/3025946 Anyways here's everything I can say, Assuming the following tree: ./ ├── bin ├── lib │ ├── import │ │ └── gl3n │ │ ├── color │ │ │ └── hsv.di │ │ ├── interpolate.di │ │ ├── linalg.di │ │ ├── math.di │ │ └── util.di │ ├── libgl3n-dmd.a | ├── reducedt.reduced │ ├── build (HERE IS WHERE YOU RUN THE COMPILE COMMAND..) │ │ └── empty │ └── torment │ ├── component │ │ ├── all.d │ │ ├── component.d │ │ └── render.d │ ├── entity │ │ └── camera.d │ ├── math │ │ └── vector.d │ └── scene │ └── scene.d compiling with "dmd -g -debug -property -w -wi -I../../lib/import -L-L../../lib/ -L-lgl3n-dmd -of../../bin/execute_me ../torment/component/all.d ../torment/component/component.d ../torment/component/render.d ../torment/scene/scene.d ../torment/math/vector.d ../torment/entity/camera" outputs the following error: ../torment/scene/scene.d(3): Error: cannot compare const(VariantN!(1LU,RenderComponent)[]) and const(VariantN!(1LU,RenderComponent)[]) The line it's complaining about (3) looks like: struct Scene { And I don't know what to make of that. I've tried reducing (in fact the tree you are looking at is *very* reduced) so I have the minimal case of failure here. I have attached the tree (including lib imports and the .a file compiled for 64bit linux) so you can try compiling for yourself. I've tried it on two computers - both 64bit linux though so I don't know if that's got anything to do with the problem. At this point I don't know if this is my fault or dmd's fault or phobos'. I assume it's the compiler but I can't know for sure. I marked this bug as critical because it has completely stalled the development of my project for two days now. And that does not give me a good feeling at all. I really *need* to get on with it! I just feel like this either is out of my hands, or just me doing something obviously wrong and is not getting it. But nobody in irc seems to know what's wrong either. So I am submitting this here. Thank you! -- Isak Andersson -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8328] Mind Blowing error (possibly in DMD or std.variant)
http://d.puremagic.com/issues/show_bug.cgi?id=8328 Jonathan M Davis changed: What|Removed |Added CC||jmdavisp...@gmx.com --- Comment #1 from Jonathan M Davis 2012-06-30 17:07:51 PDT --- Have you tried the latest master from github? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8328] Mind Blowing error (possibly in DMD or std.variant)
http://d.puremagic.com/issues/show_bug.cgi?id=8328 --- Comment #2 from Isak Andersson 2012-06-30 17:09:12 PDT --- (In reply to comment #1) > Have you tried the latest master from github? You mean DMD? No I have not. But I've considered since I really need to keep up development! Should I? Or are there any errors visible from the code I posted? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8328] Mind Blowing error (possibly in DMD or std.variant)
http://d.puremagic.com/issues/show_bug.cgi?id=8328 --- Comment #3 from Jonathan M Davis 2012-06-30 17:21:16 PDT --- You should just try the latest master. I honestly don't want to spend the time digging through your code to try and figure out what's wrong with it. It's much simpler if you can present an example which exhibits the problem. But for all I know, your problem has been fixed in git already, and it'll be easier for you to test that than anyone else. You'll need to grab dmd, druntime, and Phobos from here: https://github.com/D-Programming-Language build them all, and then use those, which would involve building dmd, then making sure that your system is using the new dmd, then building druntime and Phobos and making sure that your system is using them (which involves altering your dmd.conf or sc.ini file). It's not hard to deal with (particularly in Linux thanks to symlinks) once you've got it set up, but it might be a bit of a pain to figure out exactly Alternatively, you could use dvm ( https://github.com/jacob-carlborg/dvm ) to download and build it using its compile command. I've never used dvm, but it's supposed to be quite easy to use. It's a tool for managing dmd, and will allow you to install a specific compiler version or build the latest from github. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8328] Wrong constness of autogenerated opEquals when fields' opEquals have mixed constness
http://d.puremagic.com/issues/show_bug.cgi?id=8328 Vladimir Panteleev changed: What|Removed |Added Keywords||rejects-valid CC||thecybersha...@gmail.com Platform|x86_64 |All Summary|Mind Blowing error |Wrong constness of |(possibly in DMD or |autogenerated opEquals when |std.variant)|fields' opEquals have mixed ||constness OS/Version|Linux |All Severity|critical|normal --- Comment #4 from Vladimir Panteleev 2012-06-30 18:07:42 PDT --- Minimal testcase: --- struct S1 { bool opEquals(S1 o) { return true; } } struct S2 { bool opEquals(S2 o) const { return true; } } struct X { S1 s1; S2 s2; } --- The problem seems to be that DMD decides that the autogenerated opEquals should be "const", and then fails when it tries to call S1's opEquals. The solution for this particular problem would be to reverse the common-denominator logic, although this won't work if immutable is thrown into the mix. A better error message would also be an improvement. Workaround: Write your own non-const opEquals in X. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8328] Wrong constness of autogenerated opEquals when fields' opEquals have mixed constness
http://d.puremagic.com/issues/show_bug.cgi?id=8328 --- Comment #5 from Vladimir Panteleev 2012-06-30 18:16:47 PDT --- Still happens in DMD head (7307e7190d9). The submitter's issue could also be resolved by making Variant const-correct. I don't know what that would involve; I assume the issue is non-trivial, seeing that this hasn't been done yet. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8328] Wrong constness of autogenerated opEquals when fields' opEquals have mixed constness
http://d.puremagic.com/issues/show_bug.cgi?id=8328 --- Comment #6 from Isak Andersson 2012-06-30 18:21:14 PDT --- Huge thanks to Vladimir for figuring this out! This means I'll be able to go to sleep without worrying about being concerned about solving this. I hope this can be resolved so that others don't fall into the same trap, because it was definitely not easy to get out of for me who is new to D! Thank you :) -- Isak Andersson -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8329] New: foreach over string with dchar as element isn't nothrow
http://d.puremagic.com/issues/show_bug.cgi?id=8329 Summary: foreach over string with dchar as element isn't nothrow Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: druntime AssignedTo: nob...@puremagic.com ReportedBy: jmdavisp...@gmx.com --- Comment #0 from Jonathan M Davis 2012-06-30 18:31:02 PDT --- This code fails to compile: import std.stdio; void main() nothrow { foreach(dchar c; "hello world") {} } giving the error q.d(5): Error: _aApplycd1 is not nothrow q.d(3): Error: function D main 'main' is nothrow yet may throw if the dchar is removed, then it compiles just fine. Clearly, there's an issue with the apply function which implements iterating over strings as characters other than the character type of the string, since this really should be nothrow, but it's not. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8158] std.algorithm.min fails to compile with user-defined types
http://d.puremagic.com/issues/show_bug.cgi?id=8158 --- Comment #2 from github-bugzi...@puremagic.com 2012-06-30 19:25:53 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/adb31e7048d1b8e9661be0508b515a0887d98809 Fix for issue# 8158. https://github.com/D-Programming-Language/phobos/commit/6048cafc58c722957dc21e94eb47f7046a1a5ff7 Merge pull request #612 from jmdavis/min Fix for issue# 8158. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8158] std.algorithm.min fails to compile with user-defined types
http://d.puremagic.com/issues/show_bug.cgi?id=8158 Jonathan M Davis changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8329] foreach over string with dchar as element isn't nothrow
http://d.puremagic.com/issues/show_bug.cgi?id=8329 --- Comment #1 from Kenji Hara 2012-06-30 22:22:23 PDT --- (In reply to comment #0) > This code fails to compile: > > import std.stdio; > > void main() nothrow > { > foreach(dchar c; "hello world") > {} > } > > giving the error > > q.d(5): Error: _aApplycd1 is not nothrow > q.d(3): Error: function D main 'main' is nothrow yet may throw > > if the dchar is removed, then it compiles just fine. Clearly, there's an issue > with the apply function which implements iterating over strings as characters > other than the character type of the string, since this really should be > nothrow, but it's not. I think it should not be nothrow. Iterating string(== immutable(char)[]) as a range of dchar runs decoding of UTF-8, and if given string has invalid UTF-8 sequence, it should throw UnicodeException (it's declared in core.exception). On the other hand, such a transcoding iteration should be pure and @safe. It's enough worth. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8329] foreach over string with dchar as element isn't nothrow
http://d.puremagic.com/issues/show_bug.cgi?id=8329 Jonathan M Davis changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Comment #2 from Jonathan M Davis 2012-06-30 22:37:36 PDT --- Valid point. I forgot about invalid unicode. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---