« first day (3245 days earlier)      last day (535 days later) » 

8:18 AM
posted on September 19, 2019 by Oldes

I often need to create image from foreign data and these data are usually not in two binaries which Rebol is now using to describe an image (RGB and ALPHA). I think that there should be possible to use this to get the binaries from an image: i: make image! 1x1 i/1: 1.2.3.100 i/rgba ;== #{01020364} i/rgbo ;== #{0102039B} i/argb ;== #{64010203} i/orgb ;== #{9B010203} i/bgra ;== #{03020164} i/bgr

 
 
2 hours later…
9:48 AM
@HostileFork I'm trying to add an inputarea / contenteditable div to the replpad page, to add an editor.
Trouble is it always only accepts at most one keystroke, the next and all further keystrokes always end up in the replpad input line. Do you have any idea, why this happens?
I have tried to use DeactivateInput and ActivateInput, but it doesn't help.
 
 
2 hours later…
11:25 AM
@ingo Awesome, we need that! Reason is there's a key handler that jumps you... re-watch the video section on the test-repl for why. github.com/hostilefork/replpad-js/blob/…
If an editor is active, that behavior needs to be suppressed.
I like to think the code is commented reasonably. :-)
 
12:22 PM
... but I'm not a reasonable good javascript programmer. :-)
How do I remove an eventListener, if I don't have the function that has been used?
If you want to have a look:
https://raw.githubusercontent.com/IngoHohmann/rebol-web-scripts/master/editor.r
or
https://github.com/IngoHohmann/rebol-web-scripts
 
@ingo Worst case scenario, we can give you an API that controls a boolean in the REPL... I am not a particularly in-the-know JavaScript programmer either.
e.g. SET-CONSOLE-JUMPING ON and SET-CONSOLE-JUMPING OFF, that then is heeded by that event handler. If you can't find a better way, I'll add that.
 
 
2 hours later…
2:50 PM
@HostileFork OK, I found the better way: I add listeners to the same events to my pane and stop propagation, as your handlers are put onto the document, this means that they don't interfere at all.
 
Cool hybrid ui. halfwaycrooks.beer WASM has potential make the interactivity of UIs more interesting, provided it isn't overdone.
2
 
 
1 hour later…
4:04 PM
@HostileFork is it possible to return either text! or void!? It seems, that <opt> is the only one out of <opt> <blank> <null> which works together with other return: values.
 
4:20 PM
@ingo Yes, [text! void!] Should work... (?)
<void> forces a void!, but void! is otherwise a type like any other
 
5:04 PM
@HostileFork Ah, yes, that works.
 
6:04 PM
posted on September 19, 2019 by @IngoHohmann Ingo Hohmann

@IngoHohmann wrote: I've had a discussion with @hostilefork about this topic a while ago in chat, but I think it is better if it is in a more permanent medium. So the questions are: should it be possible to get the source of functions from within Rebol? what should be displayed, when viewed? Possible answer: You should be able to get the source as i

 
6:50 PM
@HostileFork What do I have to do to "do" a text! in javascript? reb.Value() seems not to like a rebol header, and reb.Value( "do ", element.value) gives me an error.
 
@ingo You don't need spaces like that, e.g. reb.Value("1 ", "+ 2") does not need the space after the 1. Spaces are implicit at every comma. I think it's one of the kind of neat aspects of the API.
@ingo If element.value is a TEXT! that should work, so you'll have to give me a full example.
 
@HostileFork https://github.com/IngoHohmann/rebol-web-scripts/blob/92721ba6b2cc7745bb5ee79d54939c2aeb119a6f/editor.r#L62 if I add the "do" here, it doesn't work, but with only Value it doesn't like a script header.
Maybe I should remove the really insufficient error handling to see the real error.
 
7:06 PM
@ingo Without looking precisely at details, I will remind you there is a difference between reb.Value("{x}") and reb.Value("x")... e.g. if you are bringing in a JS string raw, it won't be treated as TEXT!. You'd have to reb.T() it.
A raw JS string is code, not TEXT!.
I've talked about what devices we might use to work around this; in the C++ API (RenCpp) I distinguished std::string from const char *, e.g. string literals could be code, and string variables could proxy as TEXT!.
@ingo In JavaScript maybe there could be a parallel idea. See "auto-conversion": forum.rebol.info/t/…
 
@HostileFork Agreed. No need for Flash abuse. I know I'm in the minority, but I'd enjoy a command-line interactive fiction UI-- one which breaks the 4th wall of that genre to incorporate modern conveniences.
 
@HostileFork I've already been bitten by auto-conversion :-)
 
@Edoc I think, that a good Rebol console a la Ren Garden, with multiline and undo, could become my tool of choice on my phone... with a bit of work.
If I could say count-up n 5 [write as file! unspaced ["photo" n ".png"] take-photo | wait 10] and get 5 pics written out taken 10 seconds apart, we're talking about something significant, methinks.
I'd probably never leave the console.
@ingo It's a good time for you to weigh in on all those Language Bridging posts with any remarks.
 
@HostileFork reb.T() was it.
 
@ingo I am likely going to follow up on the design point where reb.T() is purely an optimization over reb.Text() and JS programmers don't have to know the difference unless they care about performance: forum.rebol.info/t/…
C, as a systems language, does not really have this as an option.
 
7:30 PM
@HostileFork Yiss!
 
@Edoc The work @giuliolunati has done points in some directions that I would not naturally have thought of. If we're trying to be more focused (which I really do want to push for) then the mobile market may seem like a tangent from where my own personal gaming/"Minecraft of Programming" ideas are going to a global web audience... but... the way the APK is being built is such that maybe this isn't an either/or situation.
It doesn't necessarily matter whether you're using the web-served console or the .APK; you just get more control over your device in the latter case.
Perhaps lure people in with the non-APK, served over http into the phone browser, but then say "hm, wanna take pics? want to do file management on your phone? install this one app..."
And (sigh, hate to suggest it) maybe that's an upsell and costs $5 or something.
Or the $5 is for support, or a forum, or something...and you always can build it yourself.
Anyway, I have been wondering today if any of this does have some business model. Certainly Red is obsessed with asking that question.
 

« first day (3245 days earlier)      last day (535 days later) »