« first day (1691 days earlier)      last day (2089 days later) » 

12:44 AM
@HostileFork I see you've posted Coherence One. I'll start looking over the pull request.
 
posted on June 18, 2015 by qtxie

FIX: Issue 1245 and Issue 1246 by qtxie

 
1:00 AM
@HostileFork Thanks for all your hard work. I look forward to trying it out tomorrow
I assume the Lest issue is fixed :)
 
@kealist Well, I'll repeat again that this doesn't contain much in the way of behavioral fixes. Those are the upcoming patches based on it...the things I managed to get written and verified because I could compile with strictness and C++ and all that.
It contains some fixes by virtue of needing to fix those things in the line of repairing the type correctness.
The reason it's not better itemized isn't so much laziness as it is is that my test of when it was ready was when it would compile with the settings. In retrospect, I should have likely started out without it strict and get it compiling, and make a commit for each level of strictness added.
That would have helped with review, certainly, but the goal of coherence one is to be a single patch. It's not aiming to be a bunch of individual branches that are individually accepted or rejected.
Right now I'm separating out the unpooled memory bit, and am grudgingly doing it in such a way that it's something you can turn on or off...keeping the old pooling code for now. This is a result of finding that indeed, tcmalloc could not perform as well... but I have explained a part of why (likely a large part) is that the memory pool implementation isn't thread-safe.
 
1:35 AM
I see what you mean by fixing the type correctness.
 
@HostileFork From what I understand sounds like a great platform for going forward.
Congrats.
 
I looked over it, time to try compiling...
 
2:20 AM
@iceflow19 If you feel like tweaking it or want to throw in any opinions do feel free. I am kind of going back and forth on how to make this compromise between Rebol's C style while leveraging the modern languages and checks. So it's a balance. Names are up in the air, and I've been trying on different ones for size. I had different names for most things while working previously.
Things like CBYTES existed before, and I changed it to AS_CBYTES in a bit of an homage to the now-defunct Rebol2 AS which let you alias between STRING! and BINARY!. I don't really know what the right names for these things are, but to me they're better answers than what was there before (LEN_BYTES, etc.)
The casting operators might be rethought by being AS (for a static cast), AS_ANYTYPE (for reinterpret_cast), AS_CONST (to add a const), AS_MUTABLE (to remove a const)...? I don't know. Things like my casing idea to say sCAST for static cast aren't set in stone, but I'm looking for something that isn't too disruptive to the existing style.
 
 
5 hours later…
7:38 AM
@HostileFork Do you want some free type checking in C11 too?
#define FREE(t,p) \
    do { \
        _Static_assert( \
            _Generic(p, t*: true, default: false), \
            "mismatched FREE type" \
       ); \
       Free_Mem(p, sizeof(t)); \
  } while (0)
We can take advantage of _Generic and _Static_assert to perform some free type checks.
 
@Morwenn It's probably overkill... but at the same time the entire thing is overkill for the mythical "C/C++" language. I was thinking that if the definitions turned out to be any good they could be reused, or at least studied in articles to bring people's awareness to what kinds of techniques are possible...
So if you felt like messing with it for curiosity's sake, by all means do.
I hadn't studied the nuances of C11 all that much, they're pretty much creeping up on me one bit at a time.
 
8:09 AM
The only fun addition to C11 is _Generic. That's the only new mechanism that you can use to write code differently. The other features (thread, mutex, etc...) are useful at best, but by no mean fun.
 
Having more things standard that you can take for granted can be at least less painful. "It's like banging your head against a wall: feels good (when you stop)"
 
Sure. Most of the additions are just there to be useful and standardize existing pratices.
 
 
6 hours later…
2:05 PM
@HostileFork For the sake of fun and curiosity, I guess that I'll try to mess with things at some point :)
 
Hello!
I'm having trouble with logging in this chat: I'm actually Pierre, and not LouGit, but at some point, LouGit came on this computer... Now whenever I come on this chat, I appear as LouGit instead of Pierre... Any cookie to clean, maybe?...
What is strange is that if I go on another place on stackoverflow, I'm correctly logged in as Pierre... Strange, isn't it?
 
2:35 PM
@LouGit If you go to the main chat.stackoverflow.com page, there should be a network options drop down in the upper left... it has logout options, maybe something there?
I'm backing off the "macros have to be in all caps just because they are macros" idea. Lowercasing the cast wrappers--despite being macros (well, inline functions in the C++ build)--would be a better idea visually. s_cast, r_cast, c_cast. s_cast(REBYTE *, ptr). This is the kind of thing to hammer out before the feature pulls happen... basically looking at it and seeing how much it can continue looking like traditional Rebol source more-or-less.
 
@HostileFork I tried logging out and in again...
 
@LouGit It may be tied to a Google login or other OpenID you have to log out of
 
Could well be... Or a facebook or whatever... I logged out of everything I could think of, but something must remain. I won't let LouGit mess with my computer again!
 
@HostileFork I have less problems with macros in C than in C++.
 
2:51 PM
@Morwenn Well, it's the lay of the land with this...but we're trying to get the most of it by making a combined executable that is both Rebol and TCC (or similar). That way there's some advantage to being buildable with a small C-compiler. With the C++ verification angle available behind the scenes, it could be the ticket to building a more rigorous alternative to the Red+Red/System full stack tool
So that's what the game is now. Verify with C++, be able to build with C... be able to build optimized, or be able to build with a smaller compiler bundled in that could also build extensions.
 
Be sure it works everywhere. Almost.
#define is_same(T, U) _Generic((T*)NULL, U*: true, default: false)
#define is_instance(value, type) _Generic(value, type: true, default: false)
Quite handy actually.
 
Hm. I'll have to look into what the syntax for that is. We wouldn't want to use the definition for anything in std:: as a macro if the instantiation syntax was different.
But if one is C-only that gives you a chance
 
You can still call (std::min)(1, 2) even you defined min as a macro.
But that's not cool for users of the library.
_Generic is C11-only, so using C++ standard library names shouldn't that much of a problem if you still want eye-candy.
 
Could you call std::is_same as a template that way :-/
 
I don't think so :/
Actually I just checked and it works.
 
3:06 PM
Interesting.
 
Function-like macros aren't a problem when you don't have an opening brace right after them.
Object-like macros don't care though and replace any identifier that matches their name.
It might open the door to strange things.
 
4:04 PM
Sigh. Now I need a Travis build matrix that builds Rebol with C89 => C11 and C++98 => C++14 in both GCC and Clang. I guess I could go ahead and start that.
Pick some random set that seems like it's likely good enough coverage.
I guess the C++ builds could be done via RenCpp when it's integrated, with Ren-C pulls not building as C++ :-/
 
It would relieve the whole thing. Probably.
At least it would be a proof of the project's excellence :p
 
@Morwenn :-) Well, we'll see if it can get to excellent. Certainly "unique project motivations" as things people are doing today go.
 
 
2 hours later…
6:18 PM
I've found the memory pooling makes sense for Rebol more than I'd have thought in terms of series data. True, it doesn't know how many series of each size there are going to be statistically better than any other allocator. But whenever it asks for memory and the allocator has pooled it into a spot which actually technically has more capacity, the series data can tap into that capacity if it needs it without doing another allocation.
I'm not sure how that compares to a normal std::vector style implementation in terms of handling its own additional capacity management layered on malloc()-or-whatever.
I'd thought that it was Expand_Series that took care of that, and didn't realize there was this additional level of "reclamation" from a stylized allocator. So it's not just memory pooling objects of the same size... it's establishing a prescriptivism about how much "reserved()" space you're going to be able to sneak an advantage out of.
 

« first day (1691 days earlier)      last day (2089 days later) »