New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add std.string.outdent #156
Conversation
return arr; | ||
} | ||
|
||
private bool ctfe_isWhite(dchar c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... but std.uni.isWhite
is CTFE-able.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... but
std.uni.isWhite
is CTFE-able.
Hmm, it wasn't when I originally wrote it in my own libs. Looks like it is
now.
(
not
is from std.functional)
The cast is unnecessary. All char types are implicitly convertible to
dchar
.
Thanks, will fix.
std.range.join
is CTFE-able.
It isn't in 2.054. Though it looks like it is in the git version I grabbed
yesterday. Maybe I'll use it and submit a separate pull request for some
CTFEability tests to make sure stuff likely to be needed at compile time
stays CTFEable... IIRC, Don did say on the NG that after 2.054 there
shouldn't be more CTFEability regressions.
Note. This pull request used a lot of CTFE version of existing functions. Ideally, none of them should exist. The non-CTFE-able functions currently are: |
At the very least the applicable bugs should be noted in a comment for each of the ctfe_* routines. That way when they're fixed it's easy to find these routines and fix them. |
|
||
S outdent(S)(S str) if(isSomeString!S) | ||
{ | ||
if(str == "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably doesn't matter that much, but In general, I'd be inclined to argue that empty
should be used rather than == ""
.
According to Don, bug 3512 should be fixed by the next release, so your CTFE versions of the strip functions shouldn't be needed for much longer. I don't know about bug 6374 though. Not being able to have |
Don has confirmed that bug 6374 will be fixed before the next release as well. |
return lines; | ||
} | ||
|
||
// TODO: Remove this and use std.array.split when BUG6374 is fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
News flash: 6374 was recently fixed (dlang/dmd@20930500), and indeed .split
is now CTFE-able.
Bug 3512 has been fixed. |
Ok, I've merged in the latest upstream Phobos changes and removed remaining ctfe_* functions. But I wasn't able to test it because of problems building the latest DMD/dsource/phobos. I think all I need is for DMD Pull Request #306 to be accepted ( dlang/dmd#306 ). |
Well, you don't need the compiler test suite to pass to build the latest phobos. I gather that you're using DVM to do grab the latest dmd, and it needs the test suite to pass? |
Maybe it's a different problem I'm hitting then. I'm having trouble with mmfile just simply building phobos. My local repo of dmd, druntime and phobos were getting old, so I updated all of them with the latest master and tried to compile. Compiling druntime gave me this: Internal error: backend\gflow.c 931 So I switched to 2.054 to compile druntime. That worked, but then when I moved on to phobos, I got this regardless of whether I used 2.054 or latest master: std\mmfile.d(197): Error: no property 'Read' for type 'int' |
I don't know. I made sure that it all compiled before I create the pull request for it. However, David Simcha accidentally merged some changes from one of his branches into the main repository, and when he tried to undo it, he broke the build. So, the Phobos build is broken at the moment. |
God fucking dammit GitHub is fucking SLOW. Damn page even keeps hanging. I had to kill the browser twice before I could even type one word. And almost once more right before submitting. And when I'm at the text entry I have to type into notepad and then copy/paste into the page. Worthless fucking site. And the URLs and Back/Forward don't even fucking work. I'd switch back to JS-less FF2 but these fucking pull request pages don't even work with JS off. Can you believe it's actually taken me half an hour to post this fucking message? Goddam, how does anyone ever get anything done with this godawful excuse for a site? Fuck fuckeddy fuck fuck Fuck. Ok, now that I have that out of my system: Andrei: You're looking at an old commit, not the head of this pull request. I'll change the nested functions to be static, insert spaces after if/etc, and add superfluous braces, but please re-check the other stuff in head (probably with the "diff" button at top of this page). I think all of your other comments have already been fixed there. |
Ok, #6509 and #6507 turned out to be invalid, but I am being blocked by #6516: [2.055 beta] ICE: assert constfold.c(721) global.errors |
For your information, I believe that the only formatting rules for Phobos that we actually follow as a group and require are
From the changes in the "Use phobos's goofy formatting convention" commit, I get the impression that you think that other formatting guidelines exist, but they don't. Code within a function should be consistent, but spacing around parens and stuff like that is up to the individual programmer. |
I guess I may have misunderstood something. Andrei said up above: "The code uses very different conventions than the usual in Phobos: two spaces indentation, no space after "if"/"while"/etc., no braces wherever possible, etc. Could you please change?" I took that as meaning that space after foreach was expected and that braces wherever possible were expected. |
It might be worth combining those commits before this is pulled. 17 commits for a ~200 line function seems a little excessive. |
Well, Andrei likes to to put a single space after And yes, you probably should rebase this so that it's fewer commits. |
Merged all of this into one commit: |
Remove findtags in favor of using chmgen-emitted tags
No description provided.