REBOL Forum Recent REBOL Forum Topics Rebol [2019] Info and Registration Updated web site for the R E B O L [2019] developer conference. Includes some info on the talks, speakers and location and a link to the event registration. Be sure to register as soon as you can so I can get a close-to-accurate head count ahead of time. Also on the registration site, I'm accepting donations to help offset some of the costs (it's unlikely registrations alone will cover everything--I've deliberately kept the registration fee down to encourage wider participation). At this time, there is help available if accommodation is still needed. Just drop me a line. Only a week away now, hope to see you there!, Posted by: Chris 28-Jun-2019/20:45:35-7:00 Rebol Conference plus Rebol Talk to Philly Lambda I will also mention that if your hesitance to attend is based on not being able to navigate Philadelphia or not being sure where to stay, we can help. There are boots on the ground here. :-), Posted by: Fork 24-Jun-2019/12:16:11-7:00 Parsing a Python line; why does this even work? Parse in Rebol 2 (and Rebol 3 Alpha) in 'Split' mode has one or two quirks, one of which is to skip content within quotes (if a quote character immediately follows a delimiter). I suspect the reason for this is rooted in handling a certain CSV pattern more common when the interpreter was first written, but could also just be a bug. Red and Ren-C both deprecated 'Split' mode in favour of a separate SPLIT function., Posted by: Chris 13-Jun-2019/16:45:08-7:00 Dobeash SQLite Driver: SQLite ROW error? SQLite Driver is old and may not support CTEs (I don't know if this is the case) but you may try with /direct refinement sql/direct "..." and also give a try newer version: , Posted by: Endo 9-Jun-2019/14:17:39-7:00 Another parsing struggle colchar: charset [#"0" - #"9" #"A" - #"Z" #"a" - #"z" ] blanks: charset [" '"] parse/all sql-cmd [ some [ [ "from" to end ] | ["as" some blanks copy col some colchar (print col) ] | skip ] ], Posted by: _ 6-Jun-2019/4:53:22-7:00 Putting the C in 'Ren-C': User Natives An experimental feature of Ren-C added by Shixin Zeng years ago has been getting some reworking since the new year, and it's really quite nice. It's the ability to code a Rebol function with what looks like an ordinary spec BLOCK!, but whose body is a textual string of C code. As an example, here's a Fibonacci function: c-fib: make-native [ "nth Fibonacci Number" n [integer!] ]{ int n = rebUnboxInteger(rebArgR("n")); if (n < 0) { return rebInteger(-1); } if (n <= 1) { return rebInteger(n); } int i0 = 0; int i1 = 1; while (n > 1) { int t = i1; i1 = i0 + i1; i0 = t; --n; } return rebInteger(i1); } There's an elegantly designed set of routines for picking apart and building up Rebol values--which deserve a whole discussion in its own right! But here you see a basic extraction of a C `int` from a parameter that's a Rebol value, and a few return statements that produce Rebol values from C integers. This is achieved by way of an extension that integrates the TCC "TinyC" compiler. The extension is optional in the build settings when you compile Ren-C: Although TCC isn't an optimizing compiler, the performance is not actually that bad. As users of Red/System have observed, GCC's optimizations get you maybe a factor of 2 or 3 advantage overall on the average code. For many things you won't notice, especially relative to the *much* slower speed of an interpreter. A single addition takes hundreds of CPU cycles instead of just a few! Just as a random example, the user native above is about 60x faster or so than the equivalent Rebol code: Anyway, just one of the interesting things we'll be talking about at the conference. I'm already in Philadelphia--planning to take in the 4th-of-July events beforehand..., Posted by: Fork 4-Jun-2019/0:39:49-7:00 Question about 'call' function That was a little hack. The 'call function simply requires the user to respond to the security requestor immediately when the app starts. That way, when the sound is played, the app has already been given the security permission it needs to continue, without having to pause at that point. The 'call function doesn't perform any action - it's just a dummy forcing Rebol to raise the security dialogue (any other function which raises the security dialogue could be use in its place). You could also choose to run Rebol from the command line with the -s option, to provide the same permission without any user interaction., Posted by: Nick 15-May-2019/7:43:06-7:00 Rebol Developers Conference 2019 > That's slick. How much money do you anticipate is needed? You mean to get a VID-like system that's capable of doing most of what's in your tutorial here? It would be possible to go down the "draw your own scrollbar" kind of path in WASM, which would kind of be rehashing history: I don't recommend that. To me it seems more forward-looking to be able to compose in html in a familiar way...and today's web devs expect to go to the browser DOM inspector and see the parts. So I'd with something like what Brian Otto and Graham are looking into, like vue.js: Your tutorial would thus need some adjusting and you'd have to establish expectations with the dev(s) about what would please you in a more "page oriented" spin. So I think an important aspect is your availability to stay involved as management. And we're also looking at putting tutorial material itself into the console. Here's a rough little proof of concept that Brian Otto put together in a couple of evenings, to spur some thinking: Given JavaScript developer average salary in the US is $72k/yr, I don't know exactly what the right financial tradeoff is to get someone's time who is good enough to pull it off. Though I think several factors come into play to make working on JS in Rebol more attractive that would get a talented person to want to be involved. (ability to work remotely, being fully open source, and for the right person it would be more 'fun' than a 'normal' job) People who work with international candidates might have better ideas. I'd suggest looking on StackOverflow for people who show a good working style in Q&A, and seeing who might be recruited for that. But we'd have to know exactly what we were asking them to do before they'd be able to price it out. , Posted by: Fork 9-May-2019/8:43:47-7:00 More parsing confusion This method of comment removal doesn't actually work, because you have to consider comments inside strings. Interestingly enough, I was writing a parse rule that did actual comment removal last week (uses the Ren-C/Red-ism AHEAD, but shows the general method): > What does the "begin:" mean? Rebol has historically used SET-WORD!s to capture the current parse position into a variable. Hence the SET is referring to setting the variable. Correspondingly it has used GET-WORD!s to seek the parse position to the position held in that variable. I think this is questionable. For one thing it was hard for me in the beginning to know SET-WORD! didn't mean "set the parse position", and GET-WORD! didn't mean "get the parse position". But also it seems a keyword like SEEK would be clearer (you'd have been less confused, right?) > And why is there the ":begin" at the end of the "remove" line? The parse position was at the end of the line. If you remove material from the start of the comment to the end of the line, the parse position will now be out of date, and somewhere on a future line. Seeking to the index saved in the `begin` variable puts you at the right place for processing the next comment. R3-Alpha and Red have a REMOVE command in the parse dialect that takes care of this problem in one swoop. You say `remove [...rule...]` and it will effectively mark the begin, end, and fix up the position. > And why is there the "any" in the rule? The rule inside the ANY finds and removes one comment. If your goal is to remove several comments, you need some rule that does ANY or SOME. In writing my own comment removal rule linked above, I gained an understanding of how WHILE is different from ANY, and why it is necessary to have:, Posted by: Fork 8-May-2019/17:34:54-7:00 Parsing to find a multi-word phrase OK, that's funny (as in ha ha). It looks like your response mentioned above was a response to a question I asked. We have come in a circle. I will read it again. I seem to be experiencing a steepening "forgetting curve" where things that are not reinforced often enough are forgotten. Time to retire perhaps. But some good has come of it. I never have heard of "gist" until just now. , Posted by: Steven White 26-Apr-2019/16:20:34-7:00