« first day (1723 days earlier)      last day (2057 days later) » 
00:00 - 17:0017:00 - 00:00

5:00 PM
@moliad I didn't do anything other than make -f makefile.boot OS_ID=0.3.02
 
@Adrian I'll keep it in my list of cool things to look at eventually. there are sooo many other things I want to put time on before learning a new IDE. in reality, I edit all my code with UltraEdit, which I've tuned and macro'ed and Scripted using JS and Rebol... for me, MSVC is really just for building and debugging... for which its extremely powerful.
 
The JetBrains guys put together a nice video - A Tour of Modern C++. It shows the new C++11/C++14 features using both CLion and their VS product Resharper C++.
If you're going to get into C++ to a greater degree, some nice IDE support is going to be welcome.
 
@Adrian cool, I'll definitely look into this quickly, as I really need R3 & 64 bits for my stoneDB ... memory leaks in R2 are causing havoc.
I really hate all the OO parts of C++. Everytime I download a project in C++, its a complex mess of files and overloaded things and when you read the code, you very quickly loose track of what is actually happening. you constantly have to look at 2-3-4 ... 10 files to follow the sources for a single object. it gets tedious really fast. this is, in fact applicable to JAVA, and to some extent C#, maybe C++14 improves this.. though I doubt it.
C/C++ and OO people tend to breath complexity from every pore of their body. its part of their DNA ;-)
in fact, when I look back at how things have evolved, I find OO in general has not improved anything really... it's simply allowed complexity to linger and increase... this is ironic as it was supposed to suppress it, in a way.
 
And now it works on my work computer with both mingw32-make and make (mysys). Strange...
 
5:15 PM
people can ignore my rant ;-) , its just 30 years worth of looking at programming devolve in some ways I would have not imagined decades ago.
 
@HostileFork, if you need an ODROID to build Ren/C on (ARMhf), then let me know. I have an extra one facing the web that I can create an account on for you.
 
@moliad You may not be looking at good C++ code. The issue is that a lot of infastructure is built with it, and intelligent use of the features is why codebases can be both reliable and performant. As with Mozart questioning the idea of "too many notes", in good C++ code all those clamps and checks are there for a reason. So if you point to one and say "take this out it's not needed" you have to understand exactly what you lose by doing so.
It is most certainly not Java, but the people who program in C++ as if it were will no doubt make a mess.
As one makes a mess of Rebol by writing C in it.
 
@HostileFork yep.
 
@Respectech Always interested to know if people can manage to do it themselves... ;-) and if not, what we can do to make it feasible for them to do so without trouble...
 
@moliad Don't worry many of us have an axe to grind with OOP.
 
5:18 PM
@HostileFork OK. Instructions, please!
 
@moliad And trying to program in Rebol in C also makes a mess...
@Respectech Well, just start with a git clone of github.com/metaeducation/ren-c
git clone https://github.com/metaeducation/ren-c should give you a ren-c directory
(If you don't have git, there is a download ZIP link also to the right.)
You will need a C compiler toolchain with make of some sort. It doesn't have to be fancy. But most people tend to have some way to get gcc these days.
 
as far as OOP goes, I really feel like C# is the best contemporary implementation of it. this being said, I have not done C++ in a Lonnnng time, can't say how C++11/14 improve it. But when I see where it comes from, I have a hard time imagining a different vector ... though .
 
There are some syntax improvements. Range based for, as an example.
There is type detection, you can just say auto myVar = some(weird(expression)); and it will be the right type for the expression.
It will still have that type... it didn't suddenly become some variant type.
It analyzed it to figure out what the static type needed to be and uses that.
 
@HostileFork I think Carl was trying to find a middle ground wrt what Red system is doing and C. strangely, I have found that using Rebol semantics improved A LOT of python programming. I used list parsing as a type of dialect system in python and it simplifed a lot of things.... as well as implementing generic series semantics which use the same method names accros all types which supported them. stuff like that.
 
You also have access to the type detection facility if you need it, with decltype(...)
int x = 10;
decltype(x) y = 20;
Then you have a big box of parts of what are called type_traits
Suddenly you can make it so that generic programming abstractions can be turned on or off in terms of availability to certain patterns. You can design operations that will bind up when one argument is_base_of another argument's class, but if it's not a base it won't offer that metacode.
 
5:29 PM
As of late I've sort of been interested in how Go-lang implements OOP.
 
Really grasping how to work it involves understanding "Substitution Failure is Not An Error" which can get confusing when you're doing something tricky.
But, it's not as super hard to understand as it seems at first, once you see what it means.
 
It eschews the whole inheritance model for composition and focuses more on interfaces.
 
R-Value references are another fantastic little piece of magic. Where other languages would have probably solved the idea of "copy" and "move" being distinct by introducing copy and move as fundamentals... C++ made a more fundamental part from which copy and move semantics is only one application of that part.
Nameless functions you can pass as parameters, the "lambda function", a much needed tool.
 
@moliad, take a look at the video I linked above - it really is a great overview of new language features - not really focused on OO.
 
@moliad Elements of Modern C++ Style: “C++11 feels like a new language.” – Bjarne Stroustrup
 
5:33 PM
@HostileFork thanks for that will look at it.
 
@moliad And best of all (only takes a second to look)... we have teh cool
C++ calling rebol code, or Rebol calling C++ code
Or weaving back and forth at will.
 
@moliad if you expand the "show more" section under the YouTube video, there are direct links to the specific C++ features
 
@HostileFork are these specifically enabled because of C++11 ?
 
@moliad Yes, a vast amount of what Ren/C++ does could not be done in C++98
It is C++11 onward only.
I was surprised in Ren Garden to find that indeed, it was often preferable to just embed and do small bits of code with Rebol right inline in the C++.
My general feeling was that it would be more the other way, for writing extensions to Rebol more easily and being able to pick apart the Rebol structures naturally in a type correct system.
Anyway, watch the Ren Garden video for how much was done so quickly.
@Respectech Aaaand ask questions whenever you get blocked here, people who are not me know how to build it as well. :-)
 
5:49 PM
do I understand correctly that for RenC++ you just include Ren/C and build a Class based shim to interact with the interpreter?
or did you completely refactor the original code into C++
 
@moliad It is an interface which behind the scenes calls Rebol's functions. A shim if you will, though not a "just include" shim by any means. It's tricky.
Tricky enough in fact to be retargetable to Red, even with a completely different cell implementation.
While I haven't gone and done that, the proof of concept is there and a separate build branch is kept working in Travis
 
@HostileFork "Just" was not meant to reduce the neatness of the effort and result. I might have meant "Basically" ;-)
 
:-)
It's not that C++ is implicitly required to be that tricky, but for all the automagic you get written to a system that wasn't designed to anticipate the usage... it's amazing to be able to do it and get all the type correctness and packing/unpacking working.
We may now, that Ren/C is actually its own repository, bend the way Rebol works a bit so Ren/C++ has to bend less. We'll see.
 
Well, that was easy! (At least on a stock ODROID)

1. git clone https://github.com/metaeducation/ren-c
2. cd ren-c/make
3. wget http://respectech.com/odroid/r3
4. chmod 755 r3
5. mv r3 r3-make
6. make -f makefile.boot

Less than 3 minutes later, a working R3!
2
 
@Respectech Good. :-)
 
5:56 PM
git and gcc are already installed by default on ODROID's Ubuntu distro.
 
@Respectech If you missed my answer to what you're looking at... stackoverflow.com/q/31510930/211160
 
@HostileFork that may very well be the cleanest C++ source code I've read in a long time/ever. you have the same literate style I have when coding in general, adding a lot of comments to explain the why and how. I can't tell from such a cursory reading, but you also seem to keep your OOP tree as flat as possible. That, for me, is a sign of good OO style.
gtg, garage, bank, bills to pay ... will be back tomorrow.
 
@moliad Thanks. :-) And thank @Morwenn, who specifically did a bunch of stuff for the function calls.
 
6:35 PM
Hmmm...now that I know more about it, I know that each function invocation saves the function value in the call frame. This is how it avoids the function being GC'd while it is still running.
Actually I might have known that before, but DocKimbel said he wasn't going to necessarily be passing a function its pointer when it was invoked. So I decided not to depend on it.
Or at least, Red didn't pass functions their pointer in the frame before.
If Ren/C++ could depend on that, it would get a little simpler.
 
6:49 PM
@HostileFork great work on Ren. I think many would aprreciate it if a default console was always available. Built it on OSX, the build was super-fast.
Does Ren support server-side tls btw?
 
@Maarten Thanks. I'm not sure what you mean by "if a default console was always available."
I'm not sure why it would not work for server-side TLS, though you would have to ask people who have tried it with Atronix's or Saphirion's build to know the limitations. I didn't really change anything (at least not on purpose) except one small fix. Though I'm getting some problems with timeouts right now on things that shouldn't timeout with HTTPS.
It's strange because I made a change that does not touch the TLS/HTTPS code and yet reconstituting across it seems to cause a difference in behavior.
We need to get all the sanitizers on, including undefined-behavior sanitizer, but that's what we're doing. I've got a significant amount of work to get committed from before the so-called "Coherence One and Coherence 1.5" points, where I decided to rework the baseline code for aesthetics and then apply it to the Atronix separation respectively. But there is a lot of stuff from before that to bring in.
I think it's an alignment issue.
 
I stand in awe ;-) TLS - you'd have to specify a certificate, key and maybe ca chain I think
Console: what I mean is the ability to start a REPL on my os, and use it to execute scripts. Like /Core
 
You mean you want a smarter text-based system that can jump the cursor around and do screen rewriting as per VT100 or a GUI vs just stdin/stdout
 
The former, and I want to be able to use it in a the #! line of a shell script
 
7:05 PM
@Maarten Doesn't it work in the #! line of a shell script now?
 
@Maarten are you referring to the point made in the Ren/C readme that its intent wasn't to be be a full, runnable Rebol in the longer term?
 
7:32 PM
Interesting find, for those contemplating macros. See Do We Want Lisp Macros, third section, but here's my paraphrase:
"If your language can define new control structures then you probably don't need (lisp) macros."
 
7:44 PM
@MarkI I lean to this interpretation. I think that perhaps @JacobGood1 would feel differently about the need if more immersed in Rebol evaluation mindset, and if more of the things that should work did...I still think definitionally scoped returns and sorting out the throw/catch stuff so it's sensible will offer different ways of attacking problems.
So it will be interesting to see what kind of stuff people build when they have it. I'm surprised there wasn't more of a revolt against not being able to write proper loop wrappers.
 
@HostileFork I put that down to nobody using R3, at all, ever.
 
Well, there's that.
But Rebol 2 couldn't do it either.
 
It will be fun to see what happens when R3 is finally actually usable.
@HostileFork Really? I thought R2 could do control structures?
 
I don't know exactly what it had or didn't, but it didn't have a return that was bound and knew where it should return to. It may have had a function attribute that said "I ignore returns"
Which is not very interesting, and means you can't return from that function, and you may want to in its implementation.
While still allowing code passed in with returns to return to where they meant.
 
R2 Core:"The throw attribute causes a return or exit that has occurred within the block to be thrown up to the previous level"
Now, maybe it didn't do it very well, or in all conditions, but I haven't tested it really, so I don't know.
Seems to have been intended to work like, well, like it should work.
 
7:53 PM
For the sort of people who consider that to be a solution to that sort of problem, that's the sort of solution that sort of person would use.
 
Intentionally? :)
Would there be a way to test if R2's throw attribute on a function misbehaves in the way you have described (way earlier)?
 
I don't think it misbehaves, but I guess there'd be two questions. One is if it could ever go up past a single level. So if one wrapper calls another and you put a return in a body passed down, does the return continue to propagate up. I don't know if it would or not.
 
I am vaguely remembering "walks the stack" and that that was buggy somehow ...
 
You're sort of damned if you do and damned if you don't.
It's not the right answer for what was intended, which was to bind the return--as variables are bound--before it gets sent off
When dealing with the code each layer knows what it means by a return it binds, and that's the meaning it wants.
 
@HostileFork I am assuming that you're talking about rebinding any occurrences of 'return in the block passed in, right?
 
7:59 PM
In the general case return would be bound to a frame word RETURN: (implicit), which looks up a function of a special type known as a returning function. A returning function value encodes the identity of the function from which it returns in the value.
It is bound when the function does its make function! binding in the same way that locals are bound
Then, when you pass it through as a bound block of code to further functions, they would generally not rebind it unless that was part of their functionality.
As is done for other locals.
The behavior of this word, when its value is looked up, is to evaluate to this returning function which has a slightly magic property, yet is still a function that takes arguments and such
 
Thanks. I still have (at least) two concerns:
1) Are you burnt if the block contains **do to-word "return"**?
2) What if you want to pass the block, unchanged, to another control structure function?
 
1) Most likely. It's technically possible to keep around a global return function that does something along the lines of what return does today. I don't know if that's a great idea or not.
 
By that second one I mean I think I might want to be able to say "I control this return" versus "Push it up to the previous level like usual".
Will I need two different subsidiary control functions, differing only in the return: in the spec?
 
"toss it up like usual" only exists in terms of (1) in my mind, which I don't even know if I want to exist. So you'll have to explain what the second one means.
 
I changed it. Does that help enough? I think I may be missing a crucial point or two ...
 
8:06 PM
It was my opinion that you should be able to get back from binding-of (a.k.a. bind? today) the function! value if you ask about a local. (Today you get TRUE.) I also thought that you should be able to bind things to a function, so you'd be able to bind your return word to the function you mean for it to return from.
And then get a good reference to the return-function-type magic function value.
So that would help you with 1)
 
Right.
 
And not ask for a hacky return that doesn't know what to do and fakes it.
Still don't understand 2 so you'll have to give me an example.
 
But it does seem to me that we might be entering the continuation sphere here ...
@HostileFork OK let me try an example.
Let's say I already have a nicely-behaved control function MY-IF that behaves exactly like IF (does or should).
So a return in the then-block I pass to MY-IF gets "promoted" one level up to the calling function.
(Returns from it, rather than from MY-IF, I mean.)
Now I am writing a new control function called MY-WHILE.
I write it in such a way that it calls MY-IF with the very same then-block (true-block) passed in to MY-WHILE.
I can see two possible behaviours as being potentially desirable now.
1) a return in the then-block gets caught by MY-WHILE, some clean-up is done, then a return is "thrown" (?) up to MY-WHILE's caller.
2) a return in the then-block is completely invisible to MY-WHILE, and automagically returns from MY-WHILE's caller.
So first, let me ask, does this example make more sense? Any sense?
 
8:21 PM
Well, from a C++ perspective, yes it can make sense that you want the desire for the opportunity to "catch" a return.
I see no problem with that, but I don't think it's a function attribute.
Just part of the CATCH construct.
 
I am pretty sure this is possible, binding is a very powerful feature. I just ... well, can't write it myself yet :(
 
Anything that does non-local control like that and "breaks past you when you called something" is kind of your right to intercept.
It's all possible, I've already done it, just have to do it again. :-/
Adding the ability for catch to catch a return is interesting, and also interesting perhaps to be able to query the return to know where it's going...
 
I am also confident that continuations can be done, and without any stupid "environment" parameters either.
But that may well be a topic for further down the road.
@HostileFork Interesting! Could that be done with just spec examination? Can a function's spec be changed on invocation?
... or, I have to whisper it, while it's running?
 
@MarkI Well, with my binding-of concept on locals in functions coming back with the function value, you'd just have to give people the word they caught.
Which you should do anyway, because catch/name [catch/name [catch/name [code]] 'name1] 'name2] 'name3 is uncool.
 
@HostileFork Right, but I am (wildly) imagining that that word is bound to something in the (active) function spec ...
 
8:29 PM
It might be if you are catching your own return that you passed in.
No reason you shouldn't be able to, I guess.
@MarkI Speaking of the road, where it's going, and where it leads, I think we should go ahead and patch in some of your changes just for workflow and warm fuzzies. No improvement too small...
And actually, one of the big ones... TCC.
 
@HostileFork I concur. Working on it.
@HostileFork TCC should be a plug-in replacement for GCC, modulo some command-line switches.
If nobody else wants to, I can try a 64-bit TCC build on Windows ...
 
@MarkI I think we should go ahead and find the right git repo to pick to put in the external directory, and make even a frankenstein Rebol #ifdef build where you say rebol --tcc "switches" and you get the switches. I don't care if said build breaks 1M, I would just like to see it.
Once we see it we can ponder it.
Just understand if there's any issues linking the two together, get a sense for it.
I think one pondering would be the necessity of cross-compilation, and I'm going to say in general no.
 
@HostileFork "the two" being GCC and TCC?
 
@MarkI Rebol and TCC
Put into one .EXE
 
Oh, I see.
 
8:38 PM
And I think building a Rebol and TCC with GCC is a likely quite interesting artifact, especially with FFI.
 
So rebol -tcc "switches" is a (non-forking) Tiny C Compiler then?
 
Yes.
 
Built with GCC. Fascinating ...
 
Now you have a tool that can have (or generate) C text, build a DLL, load it up and add new natives.
 
But GCC is gone, out of the loop at that point, right?
 
8:40 PM
At that point yes.
But it means the TCC and Rebol themselves won't be beholden to the unoptimized nature of TCC.
Building Rebol with itself completely would be more of bragging rights vs something you'd really want to use given the option to build with GCC.
 
@HostileFork I am not sure any code generated after the build will be much different, whether or not the build was G or T.
But it may do it faster of course ...
 
Right.
Rebol's interpreter would be slower, the compilation would be slower...
But regarding the generated C code, it's like the joke when the guy asks "Why are you stopping to put on your running shoes, you can't outrun the bear!" and he says "I don't have to, I just have to outrun you..."
Building TCC inserts to load into Rebol just have to be faster than Rebol would be for whatever that thing is you're doing.
A similar attitude taken by Red/System.
 
@HostileFork Right, the critical point.
@HostileFork I am like, way curious to run some tests and find out exactly how and where said slowness might be ...
 
So after all the work being put in it would be a shame if we dropped the ball and didn't go ahead and put the parts together. You guys did the investigations, so you should know where the best .git repo to make a submodule in external is. Then we Do The Thing and then we see if we can do that test. Have a Rebol script with a C function that adds two numbers in a string, have it compile that string and get a DLL, use the FFI from Shixin to call it, see if the numbers add.
 
But, please stop me if I try to "fix" TCC to be better than GCC :)
 
8:46 PM
Yes, let's not worry about that bit.
The one potentially interesting bit would be perhaps if there's some data structure they have which could be cut out and use guts already in Rebol, or some string parsing better done with PARSE, or stuff like that.
 
@HostileFork Fun fun fun, and soon.
 
So they could leverage the Rebol memory pooling or other things that are already there.
 
gtg bbl
 
Later, but don't forget the above...
Commits of lexer stuff, just for the team spirit. TCC in the repo and glommed into Rebol for the described test.
 
@HostileFork No worries. Exciting times.
 
8:54 PM
@HostileFork yes, I meant that comment in the readme. It'd be a shame if R3 were only a shared lib
 
@Maarten It's good to break things into reusable components. Ren as a data format was conceived as a standards process, not an implementation. Ren/C even might be more appropriately just a lexer implementation of that for C with some basic ability to query and manipulate the types mechanically, and no evaluator.
For the moment I broke it out because of the need to do so. This derives from Ren/C++ which was originally Red/C++, but I reframed it...in part due to differences in direction and priority with Red. They are free to fork it as Red/C++ if these differences are truly irreconcilable.
And space was intentionally left for that to happen if it must. In any case, I'm just saying no one GitHub repository or component needs to be the whole story.
And the story gets easier to manage if broken into pieces with a clear scope.
So this is essentially the "WebKit" of the Rebol world.
Behind the scenes the driver behind hopefully a lot of systems, and then the brands can pick what they want with it.
Rebol can have a GUI and stay determined to not depend on native widgets but rewrite them, if that's its brand. Or it can be a console. Or...
The first user is Ren/C++, and then Ren Garden on that. Hopefully we can gear it up satisfactorily so the second user is Atronix's R3/View.
 
9:45 PM
@Maarten Hi Maarten, welcome to SO chat :) No server-side TLS support in any R3 build I know of, at the moment. So neither in Ren/C. However, many bits are there. Someone driven and knowledgeable of TLS should be able to put it together with a bit of work.
 
9:56 PM
@moliad (et al): Emscripten is a compiler, web assembly will be a compilation target. For starters, web assembly will be basically a binary serialisation format for asm.js, which in turn, is a specially crafted subset of JS aimed at being compilable to fast native code. asm.js's evolution is rather limited by trying to stay a JS subset. So longer term, on goal of wasm is to liberate the evolution of the compilation target (wasm) from the evolution of it's originating host language (JS).
@MarkI @HostileFork R2 could do custom control structures, and the throw-attribute mechanism it used for that is strictly sufficient. For R3, the underlying mechanism (function attributes) was deemed rather inelegant, and we already knew that binding itself would be sufficient to achieve what's necessary as well. Hence, no more throw.
@MarkI There's a few small variations in implementation details of the general "definitionally scoped RETURN" idea. (1) For something akin to do ... to-word "return", there's two possibilities: either a fallback to a dynamically scoped RETURN, or just a plain "return is not bound to a context" failure. (2) For suppressing definitionally scoped return, the main idea currently is to provide a function attribute to do just that (tentatively called "transparent").
 
10:14 PM
@earl Regarding that I think I pretty much have decided tag! is fine for it. String cost is inconsequential, looks better, turned into a bit somewhere anyway
 
@iceflow19 After your complaint about the console windows popping up, I forward-ported a fix to build console-mode binaries (instead of GUI-mode binaries) on Windows. Maybe that's what made it work for you.
 
Keep set-word for local:, and return:, extern: for function as mezzanine or whatever or if it becomes native.
 
@HostileFork Yep, having used it for a while, I too like <transparent>.
@HostileFork Do you have the list of warning-flags that are supposed to work somewhere handy?
 
--std=gnu99, I suppose?
 
10:26 PM
@earl Ya thats what fixed it. Thanks.
 
Ah, and no -Werror ...
 
@earl Up to you. I'd be in favor of it.
The blocks to doing --std=c99 came from inclusion of libraries using alloca, and on Linux the inclusion of that signal thing.
So Coherence One could do it, Coherence 1.5 cannot at present.
So yes, gnu99.
It can also do gnu89 minus the --pedantic, they kindly have no way to say Wno-cpp-comments, though many asked for it.
 
Gazillions of warnings with the above flags. Ok.
 
@earl Gazillions?
You added in the -Wno as well?
 
make -f makefile.boot CC="gcc --std=gnu99 -edantic -Wextra -Wall -Wchar-subscripts -Wwrite-strings -Wdeclaration-after-statement -Wundef -Wformat=2 -Wdisabled-optimization -Wcast-qual -Wlogical-op -Wstrict-overflow=5 -Wredundant-decls -Woverflow -Wpointer-arith -Wall -Wparentheses -Wmain -Wsign-compare -Wtype-limits -Wpointer-sign -Wno-unused-variable -Wno-unused-parameter -Wno-long-long -Wno-switch"
@HostileFork 457
 
10:31 PM
How about one.
 
../src/core/f-deci.c:997:6: warning: assuming signed overflow does not occur when changing X +- C1 cmp C2 to X cmp C2 -+ C1 [-Wstrict-overflow]
 
What version of gcc?
 
5.1.0
 
That could make a difference, as I'm still on 4.9.1. The dangers of -Wall -Wextra
 
Warnings in 48 files.
 
10:32 PM
And crossing a major compiler revision that's not too surprising.
How many different types of warnings besides -Wstrict-overflow?
 
I think 5.2 was released a few days ago, so I'm not even up to date :)
      3 -Wclobbered
      1 -Wdeclaration-after-statement
     38 -Wmaybe-uninitialized
      1 -Wredundant-decls
    414 -Wstrict-overflow
 
I might have fixed a -Wdeclaration-after-statement shortly ago, saw one and wondered why it hadn't been caught before.
 
The clobbered one I know about and have fixes for, I dunno why I didn't get clobbered warnings this time around when I had to deal with them before.
My makefile regeneration at one point switching between windows and linux had wiped my warnings and I didn't put them back
Well, there's one problem. And hopefully one new build logic can solve...
The -Wstrict-overflow looks like something that might be a lost cause for Rebol.
 
@HostileFork would be nice for Jit compilation though. most functions can be statically redefined without any binding tricks. the vast majority of Rebol functions don't play with binding much. with a little bit of work we could write a reduced rebol dialect which can be compiled from within... the origin of Red IIRC
 
10:41 PM
I hadn't got the maybe-uninitialized errors and I thought that was because I was only getting them when building with address sanitizer or something.
Because I do have a bunch of fixes for those
So I was thinking it was just stuff I would get in the next sweep.
Perhaps that was formerly an "experimental" warning that got promoted in 5 to being part of -Wall -Wextra
@moliad Being based on C, and now able to compile and work with C++ if it is required, Rebol has a lot of doors open for existing JIT libraries and such. I will echo my continual refrain though of "focus" where the specific area and "rebellion" isn't lost by trying to do many things, and none of them well.
 
do you have a run-time invalid memory access trapper setup for RenC? I have a special memory mode in StoneDB which replaces all memory allocation with a special VM based system which traps any out of bounds memory instantly, even in non debug build. All the tools I could find didn't help even a commercial valgrind equivalent costing a few thousands.
 
@moliad We are using Address Sanitizer, Undefined Behavior Sanitizer, and Valgrind at this point.
 
@HostileFork I agree in principle, but the needs of one project can fund a specific feature to its completion.
 
If not already mentioned, what you see as Ren/C right now is basically the "language usage cleanup" and attempt to set a baseline for practices and the build. Some organization, unforking, and a lot of attempts to try and make sure that the practices seem sane and not "messy". That the code looks better instead of jumbled with traffic cones for the sake of rigor.
This non-traffic-cones-and-yellow-tape form of phasing forward came after a period of many traffic cones, and a lot of yellow tape.
With that hardhat area set up, I did a number of features and fixes and finding of design flaws.
Those have yet to be committed. I need to extract them and patch it on, now additionally patching onto an environment with a lot more code that I haven't seen before and don't necessarily know much about.
 
@HostileFork but do these tools detect the invalid memory USE on the fly... ex: data[4]->y; when that code has only 3 currently allocated objects, allocation having been performed elsewhere?
 
10:49 PM
But--those important commits will hopefully be able to come quickly as I use the former code as a database for correcting problems.
If you didn't zero fill it, it will catch the first uninitialized usage.
Once you've zero filled, it thinks you've got it under control. One of the reasons I'm removing zero filling.
Rebol used calloc() instead of malloc()
Address Sanitizer has an API and you can "poison" memory programmatically if you want to go back to treating it as uninitialized.
And again to emphasize, I've already done all this.
It's just a matter of getting it packaged up and in.
Perhaps I shouldn't have mentioned it and looked like the fastest coder ever :-)
 
@HostileFork yeah, but that doesn't work in practice. the real memory read is too far removed from the memory writing and allocation. what happens, is that you get a notice that some data got clobbered, but you don't know where/when exactly it occured.
my tool actually causes an OS memory exception write on the invalid op :-) so the debugger jumps and you get the exact offending line of code... the very instant it causes havoc.
anyhow... I'm not by any means saying RenC has any dangling memory bugs.
 
@moliad Well, I'll say that. It doesn't have the fixes yet to the problems I already know about and patched in a rebolsource-derived build with somewhat messier foundations and no reasoned set of commits that had been rebased to be read and absorbed.
That's why Coherence 1.5 was made. Notice the very tidy commit list.
 
@moliad You can do that with asan and poisoning as well. Maybe have a look, it could probably save you some reinvention of the wheel :)
 
Looking at the scope of things, and encouraged by @ShixinZeng's move toward using serious tools like Address Sanitizer, I decided I would bite the bullet and redo everything and unfork it so I wouldn't be working alone and sending myself into a dead end.
 
But then, no idea about asan + Windows.
 
10:57 PM
So everyone can validate my efforts by making sure it doesn't dead end.
 
Soooo ....
GCC compiler intrinsics, eh ...
 
@earl Feel free to sort that out with a flag as to whether there will be a complaint about that test, and if it would complain don't try.
I said it didn't give warnings in GCC or Clang with the settings I used and broke out the "also builds on" into a separate section. :-) Haiku and Syllable didn't like it.
I should have specified the GCC and Clang platform and version, but. Whatever.
 
-DNO_GCC_BUILTINS ?
 
Works for me
Does the preprocessor short-circuit evaluate or would it complain if you put them both on the same line?
I guess that's two questions.
 
@HostileFork Sorry, I'm not following?
I'm trying to build with a non-GCC compiler which uses GCC's headers.
(Intel's 15.0.3, to be precise.)
 
11:06 PM
I mean if a compiler doesn't like seeing things like __has_builtin(...) and which complained about it, could you have a line like #if !defined(NO_GCC_BUILTINS) && __has_builtin(...) ... so would the standard accept it being there. Presumably it wouldn't care for #if !defined(NO_GCC_BUILTINS) && 89e4hndknkjlsdhfjaskhfdFLDJKSHF
The double underscores are reserved iirc
 
@earl StoneDB already has the memory Grinder implemented. It saved my ass in a bug I was trying to track for 20 hours of debugging. the actual bug had nothing to do with the code being run. in fact the code accessing memory was ok, the code allocating stuff was good. and the code setting up the data was ok. they simply didn't collaborate properly.
data poisoning didn't work cause it would crash at the wrong place.
 
@HostileFork My particular case here is a compiler pretending to have __has_builtin, even though it doesn't have all builtins.
Hm, or more likely it's the GCC_VERSION_AT_LEAST line firing. Thanks for the hint.
@moliad So what did work?
#else // presumably __LLP64__ or __LP32__
Evil ... :)
... #elif + #error
 
Yup
I turn a lot of comments I find into assert(...) and delete the comment.
As often it takes a while to figure out "what does this comment even mean?"
 
Ok, getting rid of the GCC_VERSION_AT_LEAST does it. Not sure why that version number override is there and hard-coded in the first place, when __has_builtin looks like the far more sensible way.
Heh, and TCC builds so fast, it's not even funny.
 
@earl Stone's memory grinder lib detected that some function not related to the bug accidentally trampled the array being used by other parts of the software. the system allocates directly using the VMM and causes the addresses to be on the VM block boundaries. invalid blocks are mapped as non-used, so anytime ANY code anywhere tries to access it, without any special type of run-time trapping, it causes a mem access exception.
anyhow. I hope I can get back to setting up the Ren/C project later.
(tonight)
 
11:23 PM
@earl Depends who you ask. Fast building tiny C codebases are comic gold on the networks at Zero One.
 
Compiler        / Build time    / Binary size

Clang 3.6.2     / 18.3sec       /  836K
GCC 5.1.0       / 19.9sec       /  776K
G++ 5.1.0       / 21.6sec       /  792K (+ libstdc++)
ICC 15.0.3      / 30.1sec       / 1548K
TCC 0.9.26      /  1.4sec       / 1352K

(make -f makefile.boot OS_ID=0.4.40 CC=$COMPILER)
And for reference: GCC + ccache rebuild (w/o changes) time: 0.8sec
 
Heh.
Well, that is indeed interesting.
-O0 ?
 
All with the default flags, so -O2.
 
Well then not quite as interesting
Other than ICC took that long and made that giant binary. It better be fast.
 
It's not the kind of workload ICC typically excels on, no.
Also, be warned, timing measurement is totally ad-hoc, not my usual level of rigidity :)
 
11:40 PM
@earl Good to see you're loosening up a bit...
 
Ok test failures are at least within a certain range. All compilers (except TCC) have one crash (the remaining GC overflow). On top of that: GCC/G++ 158 failures, Clang 150 failures, ICC 177 failures, TCC 160 failures + a 2nd crash.
The TCC-built R3 is ~2x as slow as the other binaries. Consistent with previous results.
 
is the GC overflow bug resolution known?
 
@moliad Yeah, and afaik @HostileFork has also implemented it.
 
@earl Patching it in as... we... speak.
 
@HostileFork Great. I'd be obliged it you could keep it as minimal as possible.
(I'd like to eventually cross-port that to all other R3 code bases as well.)
But, not worried, having, with joy, seen your recent commits :)
3
 
11:46 PM
can't wait to join the fray :-)
 
So, Clang's progressions (viz GCC) are integer multiplication overflow things. Probably have to look into the builtins a bit closer.
Similarly, ICC's regressions (compared to GCC) look like a floating point handling interna.
 
@earl When I choose to be a perfessional, I are one.
 
Finally, TCC's two regressions are also floating point related (not very worrying). The crash, however, is a revival of issue.cc/r3/1519. That's surprising.
Gut-feeling (without even having gone so far as pressing enter after typing gdb): that's probably due to some longjmp-related related imperfection, either in our use or in TCC's implementation.
So, overall, not too worrisome. Nothing that couldn't be reigned in. And not too shabby a base to work from.
 
strange, I can't seem to use CALL to start r3... using windows version from rebolsource
I get a "stdio open" error window.
 
00:00 - 17:0017:00 - 00:00

« first day (1723 days earlier)      last day (2057 days later) »