« first day (2578 days earlier)      last day (1202 days later) » 

3:30 AM
@rebolek Is there any way to get Red to simply print out something during a long operation? PRINT seems to not flush until the operation is finished. Perhaps a simple timer-based GUI app that can just update some visible number based on a variable?
 
4:05 AM
I figured something out with on-time, it just does one iteration of a loop each call. Hopefully timer events don't fill up a buffer and overflow because each iteration takes a while.
 
4:40 AM
Has something changed with ports? My HTTPD script has stopped working with a fresh build today. Seems to either timeout or only send a portion of the response.
Short test:
import <httpd>
wait open [
    scheme: 'httpd 8080 [
        response/content: unspaced ["<pre>" system/license]
    ]
]
Then browse.
Anyone else getting just four lines as a response?
 
4:56 AM
Duh, that was not a good example.
Can try:
import <httpd>
wait open [
    scheme: 'httpd 8080 [
        response/content: #{DECAFBAD}
    ]
]
And then read http://localhost:8080/ from another instance.
 
 
5 hours later…
10:17 AM
@HostileFork this is known limitation of current graphic console that will be fixed. In standard console PRINT works as it should.
 
10:49 AM
@rebolek Ah, thanks
 
11:34 AM
@rgchris I can't get this second example to work in the version of Ren-C from build circa 23-Aug, just prior to the last update to httpd (2-Sep). Has that ever worked? And system/license seems to be four lines, so four lines seems like the right amount of content to return for your first example.
Oh, that's why you said "duh"
 
11:56 AM
So having putzed around trying to get a demo to show an undesirable property of Red, I was forced to use the GUI dialect (until getting @rebolek's tip of "just run it from a console", I guess I'd forgotten Red ran from the console because when I click it, it gives a window).
 
Not sure I understand.
 
@rebolek I forgot that you could invoke red.exe from a Windows Console. I'm not used to "dual-mode" apps on Windows, I guess.
 
Ah, ok :)
 
I wrote a little workaround:
objs: copy []

n: 0

view [
    t: text "(push start)" on-time [
        t/text: to-string n
        o: make big-o compose [var-1: (n)]
        append objs o
        n: n + 1
    ]

    button "Start" [t/rate: 10]
]
So this is a demonstration of taking a very big auto-generated object and making instances of it, where as we know the instances must deep copy and rebind the function bodies, otherwise references would point to the base object.
 
What is big-o ?
 
11:59 AM
big-o: make object! collect [
    repeat n 256 [
        ;
        ; var-1: 1
        ; var-2: 2
        ; ...
        ; var-256: 256
        ;
        keep compose/only [
            (to-set-word rejoin ["var-" n]) (n)
        ]
    ]
    repeat n 256 [
        ;
        ; fun-1: does [print var-1]
        ; fun-2: does [print var-1 print var-2]
        ; ...
        ; fun-256: does [print var-1 print var-2 ... print var-256]
        ;
        keep compose/only [
            (to-set-word rejoin ["fun-" n]) does (collect [
On my system Red can get to 810 of those.
My longstanding goal is to make the system work without copying the bodies of the functions.
I've called this "virtual binding" but I now realize--in my family of names for things--that this is a more specific thing than truly generalized "virtual binding". I will call it "derived binding" (pending a better name)
@rebolek if you don't mind trying that and letting me know what the count gets up to before crashing, I'd be interested
Also, how do I in the GUI app eliminate the need for the start button?
 
@HostileFork I am running it already, I am currently at ~1200
 
Your computer is fancier than mine. :-) Well, mine is a laptop.
 
So I crashed around 1500
I am on desktop with 16GB RAM, that probably helps :)
To eliminate the start button, just set rate directly: view [text rate 10 on-time [face/text: form random 100]]
 
@rebolek I could have sworn I tried that
But I'm inexperienced with this so I might have screwed something else up in that example. I was trying to mess with the eve clock demo, and I'd notice if I typed something it didn't like it would stop ticking. So I used that as feedback for "oh I must have screwed something up"
But then I got to a point where I was making all kinds of changes and the hand was still ticking
I even deleted the whole text of the clock demo and there was a hand, ticking still
 
:)
 
12:08 PM
So perhaps some timer state and face had gotten a life of its own, disconnected with the load of the demo
Anyway, I guess, I can see why people would like it. As I've said before, I was pretty enthusiastic about Tcl/Tk for GUI long ago. (me posting circa 1993 on comp.lang.tcl, though they seem to have lost records of my posts while at MITRE)
And I can see that would be closed on StackOverflow instantly. :-) Here's me sharing a slightly more useful piece of code
Anyway, I guess I see the appeal of the GUI dialect working in a single-executable deliverable. It may be a good marketing angle. Guess time will tell.
@MarkI My notion of redo :return has a drawback over redo 'return, and I'm going to sound kind of BrianH-micro-optimizery here, but that's because it takes two lookups. You have to fetch the FUNCTION! out of the :return and then extract the FRAME! from it, vs. where 'return is "unevaluated" (no Get_Var(), just passes the raw WORD! in minus the LIT in the header) and the frame is extracted from that.
But there's another reason, if you want to do a "sibling tail call" and restart the frame not at the function it was dispatched for, but a compatible frame, you pass in that function e.g. redo/other 'return :some-compatible-function. It gets confusing if you're passing in two FUNCTION!s, redo/other :return :some-compatible-function
 
12:40 PM
So I wonder if there is some third answer we have not thought of in the length? vs length-of debate. Is there some less-"wordy" way of saying -of that doesn't completely mess with the ?-is-logic convention? length-> ... length@ ...
I notice that Red added context? (Ren-C had added CONTEXT-OF) and there is some sway over how it looks, but it's terrible because you want any-context? system to be true and any-context? 14 to be false, and CONTEXT? ruins that. If we had a happy medium like context-> system and context-> 14 you elide the -OF and it seems readable. or <-context system
Or there's *, unused for this purpose and often an "extended" version of the thing. length* x, context* x
length$ x, length% x, but in the above I kind of like length-> for some reason. "length-of... that-thing-over-there ->"
Or just >. Consider, e.g. head: head> x. I know on the one hand this may seem to be stomping on TAG!'s territory, but @rgchris has already argued for more lax thinking in that area, e.g. not thinking --> if a tag isn't open should be contentious with if it is. If we bow to that, we can accept head> is a tag terminator if a tag was open, and a WORD! if it was not.
 
Hi guys, I'm back again
 
If we prohibit multiline tags without <{ ... }> then you only have one line to scan for opening tag marks, and that's not a huge scan distance.
It is asymmetrical, e.g. <head is not a natural word but head> can be, and we've previously discussed this asymmetry disallowing <-- but allowing -->
Fact is, other asymmetries exist. 4chan is illegal as a word natural, but chan4 is not.
Rambling aside, I think context-> 'n vs. context> 'n is both more readable and helps give you more assurance that it's not closing a tag, because it's atypical to close a tag with ->, but not with someletters>
 
 
1 hour later…
2:24 PM
posted on November 21, 2017 by @hostilefork Brian Dickens

@hostilefork wrote: The stated goal of Ren-C was experimentation, to try things that may-or-may-not be good ideas... push them around and get experience with them, and possibly revert ideas that turn out to be bad (or create new ideas). There is a long description on the Trello card for getting rid of the name LENGTH?. This is one of the operations fo

 
🀄testing windows key + . emoji thing
Sadly, there's no emoji for windows :(
 
@GeekyI Sure there is: đź’©
I wonder how terrible it would be if we said => and <= were not defined in Rebol. You'd have to use >= and =<. Then, in some far future, well trained individuals who only see => as right arrow and <= as left arrow can safely use them without getting confused.
By leaving them undefined, you give more power to someone who decides to use them to say "I'm trained enough to tell the difference so I'll use them specially in my code."
Someone trying to write Red-or-Rebol2 compatible code would be one such agenda-oriented person, who would say <=: enfix :less-or-equal?
@rgchris ^-- speaking of which, given your work on this question, I think a do <red> or import <red> would be helpful to establish... (there's basically going to be 0 demand for <r3-legacy>, but the methods it used will be helpful to implement <red>)
And I guess pursuant to =< and >= being the defaults, the pairing should be equal-or-lesser? and greater-or-equal?
if x =< 10 [print "you only think this looks weird because you've been brainwashed!"]
if x >= 10 [print "after all, this looks fine, right?"]
if x => 10 [print "you think *that* looks like an arrow, right?"]
if x <= 10 [print "now that I've pointed it out, doesn't that seem like an arrow?"]
 
3:14 PM
@HostileFork all [yes]
this >=> also looks like an arrow
 
@GeekyI Yes, we want a lot of those operators. >>= and such. Just a matter of coming up with the rules for them, and I'm now saying <-foo and bar-> should be words. We've seen things in clojure with symbols like foo->bar being the name of a function, even...and I was skeptical back when, but not as skeptical now.
 
The more acrobatic the evaluator becomes, the more of an excuse you have for pushing boundaries with the notation, because there are so many cool things you could do with it.
It would be nice if we could parse Haskell, or a close approximation of it, to be a front end or handle the IL
GHC's IL is ugly as sin
 
@HostileFork If not for that, haskell's syntax is the cleanest programming language source I've read
For the basic functions at least
 
Looking around for the layer I'm talking about
There's some step in the compilation that goes through a fairly ugly-looking made up syntax
 
3:26 PM
@HostileFork I think it's called c--
 
I thought it was a layer before that, but maybe it was just that.
Haskell is a good medium and was long been anticipated or expected in engineering academic circles that programming would be more functional and that existing methods would collapse, so it seems all the more baffling to those people that JavaScript took over the world and Haskell/F#/OCaml/Clojure etc. are scarcely applied in the scheme of things.
Anyway, I want Rebol to get more of the "clean and composable" feeling one gets out of Haskell... not the mechanism, just the spirit/feeling.
 
@GeekyI Composition operators, CHAIN and ADAPT and SPECIALIZE and HIJACK and such... now with ENCLOSE, make a huge difference in composability.
 
Arrow like syntax isn't entirely uncommon:
r : `var <- assignment()`
r : `alsoAssignment() -> var`
js: modern "arrow" lambda functions
ruby: `=>` rocket and `->`
@HostileFork enclose is new!
Btw, @HostileFork, how much do you know about Machine Learning?
 
3:43 PM
Not much.
 
I'd been learning about it..
If I were to relate to our discussion here..
You know what bipartite graphs are right?
In the mathematical field of graph theory, a bipartite graph (or bigraph) is a graph whose vertices can be divided into two disjoint and independent sets U {\displaystyle U} and V {\displaystyle V} such that every edge connects a vertex in U {\displaystyle U} to one in V {\displaystyle V} . Vertex sets U {\displaystyle U} and V {\displaystyle V...
Imagine each side is a (set of) functions, taking multiple inputs
For simplicities sake, we have the restriction that the functions have only one output
(If it has more, we modify it to be equivalent)
So in ML, we have a model of how the data flows between the functions
That's kinda it
It's functional composition at the next level of abstraction
 
That's set theory.
 
A bigger picture
@HostileFork Conceptually? Or practically?
 
I need to get around to reading Category Theory for Programmers, I know the guy who wrote that.
 
@HostileFork Yeah, but it's simpler than that in ML
It's like two ends of a spectrum
At one end we have the statisticians and probability theorists with ML
 
3:52 PM
Well if you have applications and can frame up something Rebol can't do that it seems reasonable that it should be able to do, let me know. The compositions I'm coming up with are based on trying to do some practical things in a machine with mutable state and layering it around in certain ways.
 
At the other, the type theorists with proofs and categories
 
For instance, if you look at ENCLOSE and think about what it does, it is receiving a function that has been fulfilled with its arguments but not yet executed, and it may choose a moment of execution for that function. (It may execute it multiple times, if it does do copy f, but once a specific FRAME! is DO'd it is dead.)
So the function frame can be examined and mutated before execution, the function may be executed and the result examined also (but not the state of the locals or args after execution is finished, unless the function returned a copy of its own frame in the result somehow or otherwise leaked it at some moment, but that would be a snapshot)
If you think about this as a general mechanism for a hook, you could have a function that gets called before every function gets applied in the evaluator.
So imagine a usermode TRACE facility. It gets a chance to examine the frame, dump it out, then run the function, dump the result.
(Obviously it cannot run the trace while it's running itself, so the trace hook must be disengaged while the trace hook is running.)
Same idea for a userspace debugger that makes decisions about when to kick into the console at a breakpoint. The composition features are geared toward practical scenarios like this to make a very hackable evaluator. I'm not sure how it will tie into domains other than scripting, but we'll see.
 
4:09 PM
Smalltalk environments have this nice "you get in the box, you stay in the box" feeling, and I want more of that, except that doesn't have the bendability/formability/feeling of the "Minecraft"-style building Rebol can have. But it's not enough to feel "toy-like" and "machine-like", I want that feeling of consistency and composability like Haskell has.
 
 
3 hours later…
6:45 PM
posted on November 21, 2017 by hostilefork

Ren-C has a sophisticated model of frame reuse in function composition. Functions like ADAPT and SPECIALIZE are able to reuse a frame, as opposed to adding layers to the call stack. This makes them similar in nature to tail-calls. The original conception of REDO was that the only functions you could REDO would be ones that were part of the current composition. By definition, those funct

 
@MarkI At some point, this just becomes mad science. But...how about THIS?
I make the important point that none of the REDO or REDO/OTHER mechanics should be able to tunnel parameters that you couldn't pass in via an ordinary call. That means jumping to a specialization must re-initialize the specialized-out parameters, and locals must always be voided out, etc. Even though you're using the same frame in memory, anything that isn't on the function interface (args, refinements) has to be reset.
 
 
2 hours later…
9:19 PM
posted on November 21, 2017 by Steven White

If you copy lines of text to the clipboard, like from a text editor, and then read them with REBOL, they come in as a string.  I would like to get my hands on each individual line so I can do some processing on each line, and then write the lines back into the clipboard.  I am wondering if that can be done.  The best I can think of so far is to parse them on the li

 
@HostileFork Far out!! Keep going, man!!
 
@Edoc I'm a bit off track from the UTF-8 Everywhere project, but the reason I got off track is because there's all this junky C-based string code, and it seems easier to tear it out and make userspace stuff than to try and rewrite it. But, I'm going to get back on the UTF-8 train shortly.
And I just got "derived binding" working as a proof of concept. Instead of walking inside the bodies of FUNCTION! values that are in objects to rebind them, one simply tweaks a binding in the function value to update it from the "parent" object to the "child" object. Then, when the function is called, this property weaves its way through and recombines with appropriate bits of matter to forward the bindings of anything in the function's body that was bound to the parent, to the child...
This doesn't cover any kind of multiple inheritance, however. It's apparently possible today to write o1: make object! [x: 10 px: does [print x] and o2: make object! [y: 20 px: does [print y] and then o3: make o1 o2. :-(
As with many Rebolisms, it seems like a semantic nightmare to me, though. One object wins out? So if you had o1 with x y and o2 with y z, then o3 gets x y z but methods from o2 which referred to y z get o1's y and o2's z? (!) How does anyone expect code like that to work?
Multiple inheritance is a dicey and crazy thing even in languages with fairly strict semantics. In Rebol it's crazy squared.
 
 
2 hours later…
11:15 PM
@giuliolunati I think ENCLOSE is something you wanted, so please try it out...see if you can break it. :-)
 
11:41 PM
@HostileFork sure, it's cool!
You're working very hard :-)
 
@giuliolunati Yeah, trying to make up for some lost time! It'll never get finished otherwise. :-)
 
@HostileFork sorry that I have so little time for coding atm...
 
@giuliolunati No worries, but do mention if there's something you need that would be able to get you to use it (instead of Python or whatever). If you're not doing coding there's not much to do about that...!
 
@HostileFork my two main wishes are emscripten build and user types
 
@giuliolunati Of the two, emscripten build is the more likely sooner target
A lot of streamlining has been happening in the host and API. It's cleaning up and the core is untangling from all those REBDEV devices and other junk
 
11:52 PM
Good enough! Now I'm working (very slowly) at rebol webserver, to use it as sort of GUI
 
@giuliolunati To see the difference of how Rebol runs "from the outside" to call core, scroll around through the old main.c
Then look at the newer main.c. What you see in that difference is how the core is getting packaged up more easily to be used from outside.
 
ok, nice.
 
It's less and less code and more and more comments :-)
 
About user types: I wonder if maps may be a natural candidate -- if there's a free slot in map type I could use it to store a pointer to another map, the 'user type'
 

« first day (2578 days earlier)      last day (1202 days later) »