« first day (1873 days earlier)      last day (1907 days later) » 

12:39 AM
@giuliolunati Since you like math, this list might interest you, though you probably know about them...
 
12:54 AM
I've realized that the DO stack, by virtue of not always pushing itself, may be costing more than saving. Parens and paths should probably be reachable in the stack walk so that things are guarded from GC. If you want to filter out the stack view to not see them when you backtrace, that's the business of your backtrace...look and see that the function is null and omit it if you don't want to see it.
Same with pending frames. Push them lower in the stack, then filter.
Since DO frames are fixed size that could give a very simple heap-allocated structure for the fixed-size portion of the call frame, which (if we were terribly interested) could switch to a specialized heap allocated structure and avoid blowing the C call stack on recursions as readily.
(I am not at this exact moment that concerned about it, but pointing it out as an option.)
 
 
4 hours later…
4:45 AM
@Ladislav Hey, your [L] is bolder looking :-)
 
 
3 hours later…
8:03 AM
@HostileFork You wrote: "Saying that EXIT shouldn't exit try..." - that is certainly not what I wrote. I wrote that TRY should not catch EXIT, which is very much different.
 
8:57 AM
@Ladislav If we're going to speak in clear terminology, TRY doesn't "catch" anything... and in the way I phrase it it "traps". (I now prefer TRAP and TRAP/WITH as an analog to CATCH and CATCH/WITH, vs. the namings TRY and TRY/EXCEPT)
I've wondered if there is a need for something that is a superset, e.g. if TRAP connotes something stronger than CATCH that would be interested in THROW-like things or if they are truly entirely separate concerns. Or if there is a third kind of thing that really means "I do not want non-local control jumping past me, I don't care if it's a 'throwy' thing or an 'errory' thing". These are questions to which I don't have answers.
 
@HostileFork Well, you can hardly expect me to know your new terminology. Nevertheless, that is irrelevant for the case at hand.
The case is that I never said that "EXIT shouldn't exit TRY"
 
Well, whatever. It's a file off for review with some notes on it. Add your own notes.
The behavior changed, the test is off to the side until it and a lot of other things can be addressed, the system has improved by leaps and bounds and has been escalatingly better every day. You're free to absorb that truth or not.
At the moment my main advice to those who would use EXIT is as I said; don't do it unless you are writing a generator and have no definitional return, try and keep it in the outermost block of your generator unless you know all the things you are working with to be native, etc.
LEAVE is coming shortly, as the zero arity definitional "exit" which will be present in PROC+PROCEDURE
My interests and concerns for legacy users who wish EXIT to become definitional are low, in part because I consider EXIT to be a poor word for the functionality (esp. given exit() in C and that it sounds a bit too drastic for returning from a function). So its "dangerous" sounding name is not so bad for its non-definitional behavior that is likely to be of interest to only a very limited audience.
One issue is that TRY is no longer a native. TRAP is. So TRY is a wrapper function. It can survive definitional returns just fine. EXIT it cannot, because that will exit the wrapper...it is non-definitional.
I consider that if a function "catches" an exit then it was that function that was "exited". So to me they are close enough synonyms. If TRY reacts to an EXIT in such a way that the continuation point is after the try, it was the try that was exited, e.g. the target of the exit command.
It is actually technically possible to "catch" an exit if one wishes. catch/name [exit] :exit. The name of the throw is the NATIVE! function value for exit itself.
I don't recommend building protocols on this, and would suggest leaving exit alone and using definitional returns proper.
I will mention that this choice to use native functions as names for the throws is how you would do it for break, continue, etc...where the native function value is considered more invariant than the word to which the native has been assigned, so better than catch/name [break] 'break for instance.
 
 
2 hours later…
10:55 AM
BTW, regarding the exceptions: Carl implemented two kinds of exceptions: handled using the C longjmp() function and handled using "exceptional values". Did you try to streamline that?
 
@Ladislav Yes, this is the fail=>trap and throw=>catch distinction: github.com/metaeducation/ren-c/blob/…
"fail" is the new way to trigger the longjmp kind of error (though you can still DO an ERROR!, but FAIL is a dialect so you can say fail ["You had an error because" value "was not an integer"] or whatever. It also lets you FAIL on an ERROR! directly.
Inside the C code, it's done in a very similar way. fail (Error(...)); with a space between the fail and the parens (not typical for function calls) to help make it look a little more stand-out-ish as "hey, weird longjmp keyword-like thing here"
By contrast, a THROWN value must wind its way gracefully up the return route, piped up through the out slot of whatever natives or actions are running.
Hence there is an opportunity for inspection of a thrown value at every level, but a FAIL and its longjmp may only be intercepted by those who specifically did a PUSH_TRAP (wrapper for the setjmp).
Comments do try and keep up with the changes but of course, resources are limited. The error is a REBFRM ("frames" now type check distinctly), the drop is a DROP_TRAP.
As time has moved on, the idea that values themselves have anything "thrown" about them is disappearing... so it will be more like "the evaluator is in a throwing state". Transitions in this direction are getting ready. But materially speaking, a throw is two values... a throw name and the thrown value itself.
 
11:26 AM
@DarekNędza I notice your top tags list . Have you an interest in Rebol and Red (which are metaprogramming indeed...)
@RebolBot
code: [+ 1 print]
print ["there are" length? code "elements in the code block"]
print ["reversing code, and it is then" mold (code: reverse code)]
append code 2
print ["Now code is" mold code]
do code
 
; Brought to you by: try.rebol.nl
there are 3 elements in the code block
reversing code, and it is then [print 1 +]
Now code is [print 1 + 2]
3
 
Oh, hi. Yes I have been trying Rebol 2 and I like its "blocks". We can an amazing things with it.
2
 
@DarekNędza Ah, well cool. Yes, well it's actually all very deep once one gets into it. Some of the more basic aspects are things that have been around and understood for a while... in Lisp or wherever. But there are new things, strange ideas... like this:
6
A: Is there a overall explanation about definitional scoping in Rebol and Red

HostileForkThis is an old question, and @BrianH's answer here is very thorough on mechanics. But I thought I would give one with a slightly different focus, as a bit more of a "story". In Rebol, there is a category of types called words. These are essentially symbols, so their string content is scanned a...

Very ambitious effort, to try and mix up a lot of things and still stay "simple" (although sometimes it feels like the "simple" part is starting to get lost, which is why we should fight to keep a compass point on it.)
"Athough we like to make REBOL look a lot like other programming languages, it is much deeper than it looks." Carl Sassenrath, REBOL: A Deep Lake
@DarekNędza Let us know if you have questions, or ask them on SO Q&A
 
11:52 AM
@HostileFork Yes, but in case of Rebol, it looks better - little like Ruby.
This scoping sounds a little like namespaces in Factor language - you have a hash (an associative array) that have all word definitions and word(s) just use it and/or change it to something else. I'm not good at scooping in Rebol - I need to study it more.
 
Yes, words are looked up in such "contexts", but there is a "moment of binding" when that happens. They preserve the binding until something comes along and rebinds them.
This means you can pass around bits of code that have been bound and they remember where to go look up their values if you ask... until they are rebound to something else.
@DarekNędza Rebol became open source and so now a few people work on it. Red was started some time before that open sourcing. Both projects are welcoming to contributors and if you enjoy it then it is a language where there is certainly room to be involved.
 
@HostileFork I am wondering if Rebol is alive. Rebol 2 is dead. What are other language in a Rebol family? Are they mature enough? I'm expecting something that can be done in Rebol 2 (networking, gui, parsing, portable - I run it on win xp and win 8.1)
 
@DarekNędza Ren-C is alive, and working in tandem with Atronix, who make a GUI product called Zoe and offer Downloads
Red has an upcoming release focused on GUI pending a release, and is fairly focused on the GUI angle. I am not personally motivated all that strongly by it, as I prefer to tackle basic questions of what makes the language fit-for-any-purpose (or when it has problems, making it unfit, I think it important to address them from a "language design" point of view, vs. plunging ahead with it broken)
So I am more impressed by a solid technical demo at a command line with reasonings and proofs and documents than "pretty pictures", as one can always make pretty pictures after that...
But that said, I waste time as much as anyone probably. (Working right now on an optimization of a commonly-called string routine for reasons that are starting to puzzle me, in fact.)
@DarekNędza You might watch this for some hint of upcoming stuff on the Rebol side
 
12:15 PM
@HostileFork I have to compile Ren-c, right? I donwnloaded r3-view-dev.exe and I've tried `view layout []` but it doesn't work.
Well, I'm not very experienced programmer so I don't want to waste time with GUIs and R2 was very easy to use without need to install something else (that might not work).
As for contributing, I am not very good at C/C++, but I plan to post (on github) some Rebol code.
Well, I'll watch that link now.
 
@DarekNędza I'm not a Rebol GUI person, and the examples thus far have rarely fit the kinds of GUI programs I'm interested in writing when I write GUIs...lately which is not so often. But if I were to make one, I would likely use Ren Garden's approach, as that gives a OS/X + Windows + Linux versions, 32 and 64-bit, etc.
I have a wait-and-see attitude to see what Red does, but am still looking at basic questions about the system first.
 
12:36 PM
@DarekNędza There is a Ren-C build farm that exists in a top secret location in Austria which may some day turn into a way to get executables. But if your interest is in a GUI, that will not be Ren-C but rather Atronix's R3-View or Ren Garden.
If Rebol2 is something that you like and you'd like to use something that is influenced more by that than by language design factors, Red may be a nearer-term bet. It is banking on several of the things that people found compelling about Rebol2, which I didn't in particular find that compelling.
What I have famously called "the 80s cash register" aesthetic.
Whether Red can turn that ship around and deliver something native feeling for Android remains to be seen, as a possible wedge of relevance.
 
@HostileFork "the 80s cash register" - what you mean by that?
The console from this movie is interesting.
 
@DarekNędza Though Red hasn't officially released its 0.6.0, the VID-like GUI examples are now in master. view-test.red and vid.red for instance. I assume there are no promises on these things working 100% out of the box yet, but you can download one of the automated builds dated today and give them a shot
@DarekNędza I mean that in the 1980s, a lot of very simple low-tech graphical interfaces that looked like they were written on simple embedded operating systems looked a lot the way that Rebol2 applications looked.
"Behind the times"... handmade, clunky, boxy... things like scroll bars reinvented, and lacking the heuristics and integration of native controls.
Red intends to go a more native route, though that will be hard to build a "layer" that acts as a common denominator for. Remains to be seen what it will do well or not.
@DarekNędza It's a sample of something built with the C++ bridge to Ren-C
Easy to extend
I'm not really focused on it because I don't see the point of it if the language doesn't really, really, really work
So the really, really, really work is the part I think about.
Can't believe it's still using "return" as the word for breaking lines in VID. Groan.
At least "newline". Jeez.
 
1:00 PM
@HostileFork That's fine that you are not really focused on it but I think REPL is a power of language. I like Ruby's Pry or Elm's repl. Well, I use repls a lot - so I would like to see it in the future.
 
Yep, well I am more interested in it as representative of a platform and a demo of what can be done. It's just one example.
And the good bit about it is how promisingly well it works.
 
1:16 PM
@HostileFork By the way, you are Rebol/C/C++ person, right? I think I have seen you somewhere except Rebol/C/C++ sites/SO.
 
@DarekNędza Hm, well I do have a webpage, and it comes up in some searches on some things.
But generally on the Internet I don't go too far from here of late.
I've actually only been around in Rebolverse since Rebol 3, so never used Rebol 2 for anything.
 
@HostileFork Well, I guess I mistook you for other person
 
Perhaps Dr. Rebmu, we look similar. :-)
>> find/last "abcccccc" #"b"
 
; Brought to you by: try.rebol.nl
== "bcccccc"
 
>> find/skip (tail "abcccccc") #"b" -1
 
1:26 PM
; Brought to you by: try.rebol.nl
== none
 
@HostileFork Haha, no, I don't think so, but that Rebmu dialect is very, very interesting. It's great day I have new programming language to study.
 
>> find/skip "abcccccc" #"b" -1
15
A: Programming Dichotomies (Literally)

Dr. RebmuRebmu: 79 chars OR (37 + length(p1) + 2 * max(length(p2), length(p3))) First I'll give a 79 character solution that asks Which languages must you learn? (entropy 4.0, 30 letters not including ?) and offers you the suggestions of Rebol and [Red]: DD 11 DD :do dd {dd {p{Which languages must yo...

Rebmu has a fairly serious evolution coming up, just have to make some time for it.
So the reason RebolBot isn't saying anything in response to find/skip "abcccccc" -1 is because that hangs.
I feel like negative skips should work, though they do undermine the sort of optimized memory searching operations that the standard C libraries were made for.
red> find/skip "abcccccc" -1
 
; Brought to you by: try.rebol.nl
*** Script error: find is missing its size argument
*** Where: find
*** Stack: do-console all not unset? set do first head reduce do* _execute if all not unset? set do first head reduce do* find
 
red> find/skip "abcccccc" #"b" -1
 
; Brought to you by: try.rebol.nl
== "B^@^@^@˜^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^A^@^@ <ù.·^P^@^@^@T‚þ¶X‚þ¶find^@^@^@^@^@^@^@^@^@^@^@^@^A^@^@ 8ù.·^P^@^@^@x‚þ¶|‚þ¶skip^@^@^@^@^@^@^@^@^@^@^@^@^A^@^@ 4ù.·^P^@^@^@œ‚þ¶¤‚þ¶abcccccc"
 
1:35 PM
Sigh.
We need an inventory of all the things with skips on them and to test the negatives, it looks like no one has bothered to do that.
It's a reasonable desire, and if there's going to be a "last" on find anyway you might as well allow it.
 
I'm looking forward to see that. Well, for now I will study Rebmu.
Well, it's time to leave. It was very interesting talk with you. I am looking to talk with you some other day. Goodbye.
 
@DarekNędza Sure, stop by when you like. Rebmu needs to be brought up to date and it will most likely be sync'd with Ren-C, so that will be needed to use it... you might try building it. It's not difficult. :-)
See testimonials:
Introduction on Rebol3 Porting Guide ("Ren-C" branch)
Ren/C source is available at the GitHub repository: https://github.com/metaeducation/ren-c It's preferable if you have a GitHub account to go ahead and fork the sources to your account, clone fro...
 
@HostileFork Great, thank you again. Goodbye
 
2:11 PM
Hello!
Don't trust my name, but rather my picture: I'm Pierre, and not LouGit.
Unfortunately, both profiles have been totally mixed up... I should never have let LouGit type on my machine!
I'm trying to catch up on what's been happening in the Rebol/Red world since I left. Ren/C seems to be quite interesting. What about Red?
 
Red is close to 0.6.0 (Windows native GUI plus some other goodies) release.
In fact, it is a big one - half a year, over 5000 commits. Red community tends to gather mostly in terms of the Gitter - gitter.im/red/red
both project have task list placed on Trello
 
@pekr Hi @pekr! I noticed that the last git pull I did on Red was quite impressive! It is obviously very active over there!
Trello: I still have to try to understand what this is all about.
 
posted on December 17, 2015 by earl

>> foo: func [] [] == make function! ... >> help foo USAGE: FOO r3: ../src/core/n-data.c:1251: VAL_TYPE_Debug: Assertion `((v)->header.all % 2 == 1)' failed. Aborted (core dumped)

 
@LouGit Trello is a nice task management program, which also has a very nice mobile interface. You should try it out. It's useful for lots of things.
 
@HostileFork Hi @HostileFork! Long time! Okay, I'll try that. Yet another tool...
 
2:22 PM
@LouGit Ren-C's focus is on reliability...and trying to reign in formalisms and "getting the language into shape"...so there is something to show and please those who might come from backgrounds where they expect things to hold together. And to really put together showpieces like collect, to show the power of the language extension.
 
@HostileFork Yes, I did take a look already, I remember now. I wasn't very convinced, I don't recall why.
 
That's the kind of thing I'm talking about, and that's where a proper definitional return is crucial.
Well, it's crucial everywhere, but I'd say that if you don't have a good answer to "what about return?" then it makes the argument that COLLECT is a "good thing" vs. a "flimsy thing" suspect. If it doesn't hold up to return, what else doesn't it hold up to?
 
@HostileFork "backgrounds where they expect things to hold together" => like C backgrounds, I suppose?
 
@LouGit If you did not read, have a go at my definitional scoping overview
 
@HostileFork No, I didn't. Give me a few seconds to go through it.
 
2:26 PM
@LouGit I'm thinking more the kinds of "alternative" language thinkers; Lisp, Clojure, Racket, Nim, Haskell, etc.
 
@HostileFork minutes, not seconds...
 
2:41 PM
I just read BrianH's answer. I had read it before. But today, I don't know why, but I'm feeling a bit scared about my objects, and the whole concept of encapsulation in Rebol objects...
I'm starting to read your answer, now.
 
3:24 PM
>> construct [a: 10 b: 20 c:]
 
; Brought to you by: try.rebol.nl
== RESULT is an object of value:
   a               integer!  10
   b               integer!  20
   c               none!     none
 
@LouGit Rebol's module system is a bit of a maze, but I think there are some interesting ideas in there, and that if some real scrutiny is applied to it--and it gets mapped out well--it could be a very interesting example of how a permissions system can be done basically entirely in userspace, with interesting degrees of flexibility.
I've made some dents in it and so I would hope that it can be "brought into the light" and we can pull the parts of the module system that weren't userspace (but should have been) back out.
There's way too much C in Rebol. With a faster and more capable Rebol language proper, much of that C could vanish. Several big steps have been taken in Ren-C toward that already APPLY moving to userspace, good riddance to that C code, and good riddance to hardcoding positional dependence on refinement ordering at callsites...
 
4:12 PM
Hey, SourceTree actually does have a fixed width commit message setting in the preferences. Who knew. Perhaps now my commit messages won't be wildly skewed by proportional fonts and the difference in widths between MMMM and iiii.
 
4:25 PM
>> append #{010203} "123"
 
; Brought to you by: try.rebol.nl
== #{010203313233}
 
So far so good, right? :)
>> append #{010203} "123^(03BC)" ; <-- that's Unicode for the Greek letter "mu" there
 
; Brought to you by: try.rebol.nl
== #{01000200030031}
 
That is so wrong it isn't even funny!
Probably left over from the great binary <> string change. And I am sure there are lots of these hidden around.
 
Hum.
 
4:31 PM
Save your brain HF, I'll fix this one sooner or later, I promise.
 
Well if the curecode import happens, there will be no shortage of things to do, that won't be design epics.
 
It's all part of a string-type encoding cleanup I plan, will fix urls too.
 
Which isn't to say there's anything stopping such things from being done now
Except a lot of things hinge on design epics
 
Do we have a list of epics somewhere?
 
There are some epic aggregators as their own issues. GitHub has a "milestones" feature as an issue aggregator which could be for the same purpose but tailored to it.
 
4:34 PM
@HostileFork Yes, I like this
 
Idly I noticed there was one routine taking up 11% of the build time of hostilefork.com, which was Find_Str_Char. Twiddled with it a bit, noticed some of its peculiarities, rewrote it.
Apparently my rewrite is > 10x faster. It's now 0.78% of the overall time.
(For the moment keeping the old implementation in the debug build and running in parallel to ensure they give same results)
Find_Str_Char is used a lot in parse so I guess that was worth the time messing with it.
Still spends 40% of the overall time in Parse_Rules_Loop proper...not in the things it calls. Hm.
A pretty much equal percent in the body of Do_Core
But anyway, distractions...back to the evaluator. Need to start putting some pressure on shortening it. One place to do that is to disentangle the debug build stuff; doesn't matter if that's an extra function call or whatever. Back to it in a bit...
 
4:57 PM
I do think it's time to return to take on the data stack. Very early on in looking at it, I was bothered by it being a series that wasn't terminated and that bumped its size by an arbitrary "20" (or something like that) each time through eval. So that's how much headroom it had, and if your function needed more than that for its arguments plus what you decided to push without doing a manual expansion you were out of luck.
if ((DSP + 20) > (REBINT)SERIES_REST(DS_Series)) Expand_Stack(STACK_MIN); //Trap0(RE_STACK_OVERFLOW);
From R3-Alpha's Do_Next(), and yes, that's just... 20.
 
So I can crash Rebol by calling a function with 21 arguments?
 
The default stack allocation is kind of large.
So you'd have to be deep in a stack that hadn't backed off and left reserved space
And it's less than 20, because in those days it would poke a few things in there like the block value of the series being evaluated
 
Ah. What if I called it recursively? Would it crash before stack overflow?
... must ... try ... it ...
 
The hows and whys and whens of Rebol crashing wound up being very complex due to memory pools and a lot of obfuscating factors, which led to the creation of things like PG_Always_Malloc, which is nice for being able to take the memory pooling out of the picture and get a better read from things like Valgrind and Address Sanitizer
 
Nope. Stack overflow.
 
5:02 PM
And there are at this point too many fixing/stabilizing changes to list, but one big one was getting the function call args out of relocating series memory which the data stack was, although I now am thinking that there may not be a particularly great reason why the data stack isn't itself chunked... so it may unify with the chunk stack.
It's not really turned out to be the case that series operations wind up used with the data stack
It gets pushed and popped by one element at a time, dropped to a marker or popped into a series to a marker.
 
Looks like there's a hard limit of 1000 stack frames.
 
The popping and dropping could easily accommodate spanning a chunk, especially if the data stack chunks were fixed size. In any case, I basically don't see the win at this point of the data stack being an ordinary series, it has little in common with a series, and will have less once series get more interesting.
Got a better design in mind and it won't be hard to write.
 
Ach, forget that, it was a coincidence, 20-argument recursives go only 500 deep, 1-arguments go to 1231 deep. At two frames per.
 
5:24 PM
So the current use of the data stack is pretty much entirely compose/reduce, and the goal is to do a line of evaluations into this fixed contiguous buffer that stays allocated and can have nested (but balanced) evaluations build a range of values in...so that you can then tear those values off and create a series that's the exact perfect size for that data. (Well, with some padding likely, to fit it in a memory-pooled blob...and then to reclaim the overage as "reserve capacity")
I wonder though, how much of this as a premise of "good" is true. You're effectively saying you're never going to put the values for starters into a place it might actually stay... you know you're going to have to take them off the data stack and put them somewhere else.
If it was a temporary series, and it seems many are (and there are probably heuristics for knowing with some odds if a series is likely to linger)... then you might not have had so much to lose by putting it into a holding buffer that was conservatively a bit bigger than it needed to be, and then copying it out if-and-when it actually stuck around long enough to warrant it.
I bet there are heuristics one could have on things, even simple ones. Like if you survived one GC pass you're more likely to survive the next one. Maybe GC survival is what bumps you out of "buffer that might be too big for you" into "one that's more precise for your size"
Anyway not a huge priority, so really just going to do a simplification that's faster, but I do think it'd make interesting stuff for someone to study later.
 
5:56 PM
Back. Fetched kids from school... Still reading your prose, @HostileFork...
 
 
3 hours later…
8:42 PM
Thinking a little about schemes: there's the obvious client schemes: HTTP(S), ESMTP, et al, but why is there no server schemes? For example, instead of having to implement a web server as per @earl's tiny HTTP server, you'd just say: server: open httpd://:8080 wait server or server: open [scheme: 'httpd port: 8080 path: %/path/to/www/] wait server
2
 

« first day (1873 days earlier)      last day (1907 days later) »