« first day (2180 days earlier)      last day (1600 days later) » 

06:45
0
Q: How can I pass around a function with args, in red?

Wolfram KriesingHow can I pass a function as an argument in red? Or would I not need that in red? Using does I can define a function "with no arguments or local variables" f: does [print 1] do f >> 1 How can I make this work with (multiple) args? does is no the way, what is? I want something like: (the foll...

 
1 hour later…
07:47
0
A: What's the difference between `a: [b 1]` and `a: [b: 1]`, in red?

DocKimbel And the 2nd is a set, what is the 1st? It seems you are looking at both [b 1] and [b: 1] as code, but they are actually just data. More precisely, they are lists of two elements: a word! or set-word! value followed by an integer! value. a/b is a syntactic sugar for select a 'b, which retrie...

08:47
Improved auto-completion in Red's #VSCode extension: https://marketplace.visualstudio.com/items?itemName=red-auto.red https://t.co/9ZdD8aPU2E
 
7 hours later…
15:50
0
A: How can I pass around a function with args, in red?

rgchris How can I pass a function as an argument in red? It doesn't seem this is the essence of your question, but you can pass a function as an argument in a couple of ways: my-func: func [their-func [any-function!]][their-func "Stuff"] my-func :print my-func func [thing][probe uppercase thing] ...

 
2 hours later…
17:50
1
Q: Rebol 2 esmtp cannot decode AUTH parameter

Bo ThompsonSet set-net with appropriate values, but get this message when trying to send an email using esmtp.r from rebol.org. Any ideas what this means?

@Feeds It seems to me to be a problem with the username or password entered into set-net, but can't be sure without seeing the trace/net log.
18:19
1
A: Rebol 2 esmtp cannot decode AUTH parameter

RespectechOK. I tried and was successful sending a message using Rebol2's built-in 'send function. Here is a transcript of my session: >> help set-net USAGE: SET-NET settings DESCRIPTION: Network setup. All values after default are optional. Words OK for server names. SET-NET is a functio...

 
3 hours later…
21:31
>> find next join [a:] [get-word! set-word! lit-word!] set-word!
; Brought to you by: try.rebol.nl
== [set-word! lit-word!]
>> find join [a:] [get-word! set-word! lit-word!] set-word!
; Brought to you by: try.rebol.nl
== [a: get-word! set-word! lit-word!]
The pitfall here is not that I fell into it, but that there is none, zero, zip, zilcho documentation for this "fall-back" behaviour of FIND.
(I expected the first example to produce NONE, as there are no set-words in what I'm handing to FIND.)
@MarkI I didn't know FIND had this "parse like" logic to it. It seems to me FIND should be more base mechanical. But definitely weird to consider both.
@redbot
find next join [a:] [get-word! set-word! lit-word!] set-word!
21:44
; Brought to you by: try.rebol.nl
== none
@redbot
find join [a:] [get-word! set-word! lit-word!] set-word!
; Brought to you by: try.rebol.nl
== [a: get-word! set-word! lit-word!]
@HostileFork Yeah, that's actually documented in %core.pdf, but it doesn't say anything about it trying to do both like that.
>> select [foo a: bar] set-word!
; Brought to you by: try.rebol.nl
== bar
21:48
My suggestion of PARSE returning a position of last match in source series (possibly the END) and PARSE? returning a logic of if that position is actually the END would allow for parse data [to set-word!] to be a pretty succinct way of getting these positions.
22:02
>> parse [foo a: bar] [to set-word! accept]
; Brought to you by: try.rebol.nl
== false
There should be at least a one-word way of saying that. I will reiterate my hesitance toward RETURN (TRUE) due to not liking the idea of parenthesized expressions being parameters that are heeded vs. code-to-run-if-match-reached
"accept" is "to end" currently. I know that's disappointing ...
But there is no need, nor will there ever be a need, for return (true), IMO.
@MarkI Well, anyway, with FIND you want the position, so it would be pos: return (pos)
>> parse [foo a: bar] [to set-word! mark: to end] mark
22:12
; Brought to you by: try.rebol.nl
== [a: bar]
You beat me to it!
Would you guys mind upvoting the question above so that Bo Thompson can chat here?
@Respectech Done.
@MarkI Thanks!
@Respectech Sure, NP. And welcome back. Any Rebol news? We've got some in the star bar... Shixin and Giulio are doing a lot of Android stuff... OpenGL and Ren-C-based R3/View on the horizon, somewhere...
22:15
@HostileFork I've been super busy. Bo Thompson is actually a new hire of mine. So now we have 3 people named Bo at Respectech. :-)
Mixing C and Rebol, in a streamlined way: github.com/metaeducation/ren-c/blob/master/tests/misc/fib.r#L5
@Respectech Namepotism. :-)
Thompson (as we call him to keep him distinct from me and the other Bo) is starting to learn Rebol.
>> parse [foo a: bar] [to set-word! mark: return (mark)]
; Brought to you by: try.rebol.nl
== [a: bar]
Hey, that does work @HostileFork! I take back what I said earlier.
But I agree with you that it's hokey.
22:17
His first project is to write a "hack" that monitors AltME chat files and sends emails (and texts via email) to users. We use AltME in-house as a messaging and file sharing solution, and this will help notify employees of important information immediately.
Once he gets that done, we'll have him add more features.
Thompson now has a rep of 19, 1 short of chatting here....
It's a quiet room these days sadly.
But full of lots of interesting things getting done just the same!
@HostileFork Wow! That's super cool! Writing natives in C from within Rebol. :-)
@Respectech All still coming from one single executable... (embeds the TCC tiny C compiler into Rebol)
@HostileFork That's awesome! Maybe even awesome enough for me to get my feet wet in C again (after 25 years).
Do you have a primer on getting started with Ren/C?
If only TCC was written in Rebol ...
22:21
Incidentally, it is called Ren/C, right?
I think we settled on Ren-C, @HostileFork?
@MarkI In any case, now there are even fewer excuses for my staff that program in C to not use Rebol, via Ren-C. :-)
I don't know what we're doing about names, and there's actually a new spin on what used to be sort of thought of as "hostkit" which may be more appropriately called Ren-C, e.g. an API that lets you use Rebol from C without worrying about garbage collection or the various guts...and can handle variadic calls something like a printf except you're splicing bits of strings and values together
Like in the Ren-Cpp examples, but using C variadic functions.
I've seen that Shixin and Giulio have been busy. That's great!
We may call that API Ren-C, as parity with Ren-Cpp, and then call the other API "libRebol" or "Ren-Native" or who knows what.
22:24
@HostileFork I'd love to see an example. I'm sure your description is picturesque, but I'm having trouble seeing the big picture.
Or perhaps the details that make up the picture.
I've been working more with my JSID dialect (like PHP but better). Successfully linked my R3 JSID-based backend system with Shipstation shipping software via their Auth API. That took about 8 hours, mostly due to having to piece together the Shipstation API documentation into something that actually works.
@Respectech Well, understanding the "native API" you can read the now-fairly-well-documented source for something like CASE... or how COMPOSE works. That is an API where you have to be very sensitive to the details in the system.
@HostileFork Yes, that is handy!
The "Ren-C" API would be much more like:
REBVAL *block = reb_do("make block! 10", END_CELL);
REBVAL *i = reb_integer(3);
reb_do("append", block, i, END_CELL);
reb_do("print", block, END_CELL);
I'm paraphrasing, but something along those lines.
@Respectech 20 rep to chat? He has
@HostileFork Hmm, looks a bit cumbersome, but I bet it is a lot faster than native Rebol.
@GeekyI Thanks!
22:35
@Respectech Speed wouldn't be the huge draw there; it's about interfacing. User natives are probably a better way to get speed from Rebol, but if you have C code and want to script with it then you need some way. I prefer C++ which is cleaner, but some people want C. Anyway, there'd be an answer for sort of every usage case.
In any case, I am not doing a whole lot of Rebol stuff last couple of months, I'm traveling. But I have addressed some things when I could.
@HostileFork Options are good!
Here's a sample of what I've been doing. These two screenshots are from an internal inventory transfer, but I treated it like I was going to ship it instead of do an internal transfer:
The first image is the Rebol3 JSID-created "invoice" on our backend which runs on an ODROID-U3.
If you click the label printer icon near the upper right corner, it will send the order to Shipstation, as you can see in the second screenshot.
@Respectech Cool... well we'll have to get you to be a guinea pig for the new R3/View. If you haven't seen the Trello, there's lots to read there... and more to come... trello.com/b/l385BE7a/ren-c-porting-guide
Before, we had to import all the orders from our webstore and then make manual changes to them where necessary. It was a huge time waster.
@HostileFork How is it different from the current R3/View (in a nutshell)?
One of the next steps is to implement communications with the Amazon API as we're selling a lot more through that channel lately. That will help automate a lot of our processes.
@Respectech The new R3/View will be based on Ren-C's evaluator and general reforms, and use OpenGL instead of AGG. There's not much of a nutshell summary of Ren-C. If you want some of just the bug fixing aspects and code tightening and review, see presentation given at Atronix a couple months ago: docs.google.com/presentation/d/…
@HostileFork I saw that presentation a couple of months ago, but not at Atronix. :-)
22:50
There's a lot of design still left to do, but there's been a lot of progress. It will take more people being interested to come to the table and solve problems...I just wanted to have as much of the basic questions nailed down so that when those people arrive they're looking at something coherent.

« first day (2180 days earlier)      last day (1600 days later) »