« first day (2649 days earlier)      last day (1131 days later) » 

12:19 AM
@HostileFork Might have to work on the food recognition algorithm here. In the meantime, #publicsquare should not now appear.
 
12:40 AM
@HostileFork please how could I print some debug at very start of main() ? Is Debug_Str supposed to work?
 
 
3 hours later…
4:10 AM
@giuliolunati Debug_Str() is dependent on molding and I/O being initialized at a port level, so you have to be a bit far in the boot to use it. If you're in a debug build, it should include stdio.h and you can printf() and fflush(), but if you're in a release build it disables that because you're not supposed to have to link in printf. In release builds you have to -DREN_C_STDIO_OK to get printf().
Reasons why not to include printf: it's a bunch of...stuff...so hopefully blocks and Rebol types can beat string-based formatting in an OS which was "all Rebol" and could get itself far enough in bootstrap to have those things working before needing to do formatted I/O.
 
 
1 hour later…
5:39 AM
>> foo: function [x {The X} y {The Y} /z {Refine}] [
[\  print "Function output in console was too much"
[\  print "Why didn't we shorten it sooner?"
[\  ]
== #[function! [x y /z] ...]
^-- done. To answer why I didn't do it sooner, (a) remember the usermode console is a recent(-ish) thing and doing that kind of stuff in the C was a pain, and would have been wasted time (b) I was always kind of hoping someone else would do that and more. But maybe seeing how easy that kind of thing is will spawn other improvements.
 
 
2 hours later…
7:50 AM
@DaviddenHaring So that's actually exactly what I had already done... if you look up one post... However, I missed the bit about logging out. It's working now.
@DaviddenHaring Works on 14.04 as well. For me anyway. Once I rebooted.
 
 
1 hour later…
9:06 AM
FUNCTION! value cells have 4 platform-pointer-sized elements. First is the header (as with all REBVAL cells, plus sneaky things that pretend to be cells for only one pointer of size...enough to signal an END). Then there's a pointer to the "paramlist", array w/cells linking parameter names and embedding typesets. Then a pointer to the body, which is a so-called "singular" array--it fits in a series node, but holds the value directly inside it. What goes in that cell varies by dispatcher.
Slot #4 is used to point to some form of "binding", particular to that instance of a function cell. This mechanism was originally designed for RETURN; so that a single archetypal return paramlist and body could be reused by varied cells that only poked a different value into this binding (in particular, which FRAME! that particular RETURN was supposed to return from).
So-called "derived binding" expands the concept, where the 4th pointer is used to give one object (at the moment) for which any words in the function body bound to a less derived version of that object will be forwarded to. What might strike people coming from other languages about this as being odd is that when you say derived-obj/method, the pathing relationship of invocation has nothing to do with why the method looks up its members in the derived object.
 
9:23 AM
@HostileFork hit an error during Emscriptendebug build:

emcc -c -I../src/include -Iprep/include -Iprep/core -DREB_API -DENDIAN_LITTLE -DTO_EMSCRIPTEN -DTO_EMSCRIPTEN -O0 --std=c11 -o objs/a-constants.o ../src/core/a-constants.c
In file included from ../src/core/a-constants.c:44:
In file included from ../src/include/sys-core.h:166:
../src/include/debugbreak.h:147:13: error: implicit declaration of function
'trap_instruction' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
trap_instruction();
same also w/out --std=c11
 
@giuliolunati That's only used by debug_break()...which is how from within C code you can programmatically cause a breakpoint. See %sys-core.h and how it omits it for TO_HAIKU, and just add emscripten as another "don't include debug_break.h" clause.
 
Thank, you, I'll do !
 
...(continuing) what happened was that at derived object creation time, the object-making code just looks at the bindings of any FUNCTION! values that are members of the object, and if they were to the base object it twiddles that one pointer in the FUNCTION! value to be the derived object. That's it. Moving the function around to other places doesn't change how it acts. Make sense? (cc: @MarkI)
This does not permit "multiple inheritance", but I frankly have no idea how multiple inheritance would be presumed to work in Rebol, given that single inheritance has been barely defined. :-/
If I have an object that has fields a and b and then a function which refers to those fields, and I merge it with another object that only has a... uhhh. So the b keeps looking up relative to something inherited from the first object, in the but the a in that function is now looking to something inherited from the second? Color me skeptical that you'd get a sensible outcome from that.
 
9:43 AM
@HostileFork ok, worked. Now I get this error on startup (running with Node):

VAL_TYPE() called on unreadable BLANK!
C Source File ../src/include/sys-context.h, Line 272
 
@giuliolunati In debug builds, cells like BLANK!s or voids carry file and line number info in their payload... but that won't help you there. We need finer granularity in the debug switches, so that these features can be selectively enabled vs. just have "megabuild" or nothing. :-/
@giuliolunati If you've got it to that level, then it's probably better to let me hack around on it. Why don't you focus on getting the build/instructions/travis drop thing and I'll do whatever fiddly printf-style debugging to get it booting...
 
@HostileFork Good for me ;-) !
 
@giuliolunati Well...don't let me keep you away from learning to hack and debug the C and evaluator internals if you want to!!
Was hoping to rope @DanLee and @middayc into that...so hope they come back! :-)
 
9:58 AM
maybe in another life...
Truly do you want Emscripten in Travis build? Installing emcc and building yourself is straightforward...
 
@giuliolunati Yes, I think a Travis build would be great, and that way we can make sure it stays working and also always be able to run any online console against the latest build (though there'd presumably be a stable build used by default for a tutorial)
So if I say something like tutorial.rebol.info/?build=latest or whatever, then I would want to run it with whatever the most recent emscripten build was.
@giuliolunati I will, however, of course build it myself...I'm just giving you another goal to shoot for since you've hit a wall with it...while I try and finish up something else I'm working on. :-)
 
 
2 hours later…
11:45 AM
posted on January 31, 2018 by @hostilefork Brian Dickens

@hostilefork wrote: Rebol Docs Experiment The Documentation page now has a comments section http://reboldocs.brianotto.com/docs/3.0/insert (scroll to the very bottom to see it) We definitely want to make it easy and painless for people to give feedback to help improve the documentation. I don't know that Disqus comments is the right way to go ab

 
 
2 hours later…
2:07 PM
@giuliolunati I'm interested in opinions on this policy for OR and AND. The idea is that if the left is a LOGIC! it will force the result to a LOGIC!. But if the left is not LOGIC!, it will act more like ANY and ALL in terms of what it returns.
I think this makes it safer for those trying to produce LOGIC! results, while still being multipurpose.
 
2:22 PM
@Adrian see above --^ ... I think that's cool.
 
 
3 hours later…
5:23 PM
@HostileFork Typically in multiple inheritance (as I understand it) objects aren't "merged" side to side, but rather "linked" or "woven" into previously defined objects.
@HostileFork There is always a hierarchy. So a function defined in an object that has a and b fields would not become available to an object which was defined previously with only an a field. Or if it's the other way around, and the prior object had a and b, and the new object which inherits from it has only a, then when a new function is defined, if that function reference b, the compiler looks back up the inheritance chain and refers to a b in the prior object.
 
posted on January 31, 2018 by @hostilefork Brian Dickens

@hostilefork wrote: I've mentioned that my concept of being "showy" for Rebol is to try and really make it about the code, and to stick to a near-typewriter aesthetic. Here's a suggested starting theme modification for code samples: pre .str, code .str { color: #000000; } /* string - black */ pre .kwd, code .kwd { color: #000000; } /* keyword - black

 
@HostileFork Perhaps that's what you were saying. I was just triggered by the use of the word "merge".
But fields should be hidden inside objects to allow the implementation to change. So a ref to a prior objects b field should really be through the (presumed) prior_object.get_b function. You don't need to allow child objects direct access to parent object fields.
 
As a baseline for conversing, I'm very well versed in C++ (silver badge, top 2% or somesuch SO rank in tag, etc.) But Rebol is not like other languages. One might call its mechanics rather Rube-Goldberg-esque...
For example, when you do o1: make object! [a: 10 b: does [loop 10 [print a]]] and then o2: make o1 [a: 20], historically what had to happen was that the b function had to have its body structure deep copied, so that all the a references in the b function which had bindings to o1 could be replaced with new a references with bindings to o2.
Because basically, this invisible "binding" property that an ANY-WORD! could have was part and parcel of the cell. You couldn't have a single block of data with words in it that could be interpreted at one moment as pointing to one thing, and interpreted at another moment as pointing to another thing.
This led to a problem where if you have 10 methods in an object, with an average of let's say 10 blocks/arrays in each, with an average of 10 elements per block... then each new instance of that object would cost 10 * 10 * 10 * 4x(sizeof(void*))...in addition to any data. That's just what you're paying to get new copies of the methods.
I think it may have copied strings and binaries etc. too, so it's probably worse than that.
Given that I think that's unacceptable, I'm working on solutions. But those solutions have to fit in with the general workings of the language. Which are weird, and understandings from other languages can inform what kinds of patterns one wants to enable, but very little of their mechanics apply.
 
 
3 hours later…
8:28 PM
posted on January 31, 2018 by @BrianOtto Brian Otto

@BrianOtto wrote: If you view the Documentation page on a mobile phone, you will see that the left-hand navigation appears at the top and you have to scroll through it to get to the content. Right now, it's not so bad, but as we add more sections I think that is going to get too long and be a pain to have to scroll through. So we have two possible solu

 
 
2 hours later…
10:51 PM
@HostileFork unfortunately running Emscripten on Travis seems broken ...
 
11:50 PM
@HostileFork I think the policy for OR and AND is good enough
 

« first day (2649 days earlier)      last day (1131 days later) »