REBOL Forum Recent REBOL Forum Topics http://rebolforum.com Rebol [2019] Info and Registration http://2019.reb4.me/ 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 http://rebolforum.com/index.cgi?f=printtopic&topicnumber=46&archiveflag=new 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 http://rebolforum.com/index.cgi?f=printtopic&topicnumber=45&archiveflag=new 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 http://rebolforum.com/index.cgi?f=printtopic&topicnumber=44&archiveflag=new 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: http://reb4.me/r/sqlite , Posted by: Endo 9-Jun-2019/14:17:39-7:00 http://rebolforum.com/index.cgi?f=printtopic&topicnumber=43&archiveflag=new 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 http://rebolforum.com/index.cgi?f=printtopic&topicnumber=42&archiveflag=new 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: https://github.com/metaeducation/ren-c/tree/master/extensions/tcc 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: https://github.com/metaeducation/ren-c/blob/master/tests/misc/fib.r 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 http://rebolforum.com/index.cgi?f=printtopic&topicnumber=41&archiveflag=new 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 http://rebolforum.com/index.cgi?f=printtopic&topicnumber=40&archiveflag=new 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? http://www.re-bol.com/rebol.html It would be possible to go down the "draw your own scrollbar" kind of path in WASM, which would kind of be rehashing history: http://floooh.github.io/oryol-samples/wasm/TurboBadgerDemo.html 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: https://vuejsexamples.com/ 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: http://rebol.brianotto.com/game/?do=game 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 http://rebolforum.com/index.cgi?f=printtopic&topicnumber=39&archiveflag=new 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): https://github.com/metaeducation/ren-c/blob/65fcd12516f220a08893b9045bfd6ec79e72cabb/tools/common.r#L386 > 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?) https://forum.rebol.info/t/changing-set-word-and-get-word-in-parse/1139 > 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 iteration...like 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: https://forum.rebol.info/t/parses-advancement-rule-bad/1159, Posted by: Fork 8-May-2019/17:34:54-7:00 http://rebolforum.com/index.cgi?f=printtopic&topicnumber=38&archiveflag=new 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 http://rebolforum.com/index.cgi?f=printtopic&topicnumber=37&archiveflag=new