Where to start
Ok I get it. I'm sold and ready to ditch JS and Python. Rebol is awesome. Wish I had discovered it years ago. Yet after days of research I still can't figure out where I should start. R2, some R3, Red... I'd like to complete a current client project in Rebol which is a Windows based scheduler app for a Hospital ER. I'm terrified to choose Red, for example, only to find out later X feature is not ready. I feel like I'm back in JS (ES5/6) and Python (2/3) land except, because of community size, has better resources to help you make an informed decision. I guess what I'm asking is if there is somewhere that maintains the current state of all this mess so someone can confidently choose their starting point.
posted by: adam16ster 5-Mar-2016/16:24:08-8:00
Hi Adam16ster! I don’t know what your scheduler app requires, so it’s hard to recommend right version... R2 is most mature, but lacks things like Unicode, etc. R3 is wonderful replacement, but OTOH, lot of R2 extensions do not work in R3 because of i.e. different (much better) port model. Red is still alpha, but so far is great. If you know the limitations, you can overcome them usually. As I said before, if you can be more specific what your requirements are, I can give you more specific recommendations. And it’s also possible that JS/Python would be the best way, Rebol&Red are wonderful, but no silver bullet (yet ;) ) certainly.
posted by: rebolek 5-Mar-2016/17:08:21-8:00
First off, thank you for reaching out and lending a hand especially on a Saturday! A million thanks to you sir. I could absolutely knock this out in either JS, python or a combination of the two but I need to scratch this itch and learn Rebol already. The grass definitely looks greener on the other side and Red seems like it has a good chance of doing big things in the near future. Based on your response though I unfortunately have to rule out Red. I suppose I should play it safe and just opt for R2 but I'd like to be on what the community at large is using. The project is essentially a local-only CRUD with GUI app. However I think it will grow beyond the current scope to include networking which is a concern. I still think though that either R2/R3 can get the job done. So if you can answer which version I'd find the best community support and learning materials currently is the one I'd choose.
posted by: adam16ster 5-Mar-2016/21:32:03-8:00
There is much more existing publicly available code for R2. For an in-house CRUD app, if the older look of VID, or perhaps RebGUI is acceptable, R2 will likely satisfy your needs best, and you'll find the greatest support among the community for it. Also, Doc is basing Red primarily on R2, so the potential process of porting from it to Red will likely offer the path of least resistance, as Red becomes more mature.
posted by: Nick 5-Mar-2016/22:19:46-8:00
For a local-only CRUD with a gui with no need for UTF-8 characters, you should be fine with R2. For the GUI I would probably start out using with VID and then check-out RebGUI if you need a more modern design or better widgets. (RebGUI: http://www.dobeash.com/rebgui.html) At my company I write small desktop apps for my teams to use, but I avoid trying to display lots of records within Rebol, instead opting to export report/data files to Excel. In my experience VID is too slow for rendering grids of hundreds/thousands of records, but your mileage may vary.
posted by: Edoc 7-Mar-2016/10:20:31-8:00
Well then, R2 with VID it is. Thanks for all the advice guys I appreciate it.
posted by: adam16ster 7-Mar-2016/22:53:42-8:00
Edoc, I've used the native VID list widget with millions of items, without any slowdown. It's optimized to only manipulate data currently being displayed, instead of the entire series.
posted by: Nick 7-Mar-2016/23:18:05-8:00
For example, change this example so that the initial repeat is any number you want. Initial delay is only from the creation of the random list (you can see that by the alert pop-up). The list display of even 1 million items is produced instantly, and experiences absolutely no slow-down, even when manually editing data fields: R E B O L [title: "List Widget Example"] x: copy [] random/seed now/time ; generate 100000 rows of random data: repeat i 100000 [ append/only x reduce [random "asdfqwertyiop" form random 1000 form i] ] y: copy x Alert help-txt: {Be sure to try the following features: 1) Resize the GUI window to see the list automatically adjust to fit 2) Click column headers to sort by field 3) Use the arrow keys and page-up/page-down keys to scroll 4) Use the Insert, Delete and "M" keys to add, remove and move rows (by default, at the currently highlighted row) 5) Click the small "r" header button in the top right corner to reset the list back to its original values 6) Click any individual data cell to edit the selected value.} sort-column: func [field] [ either sort-order: not sort-order [ sort/compare x func [a b] [(at a field) > (at b field)] ] [ sort/compare x func [a b] [(at a field) < (at b field)] ] show li ] key-scroll: func [scroll-amount] [ s-pos: s-pos + scroll-amount if s-pos > (length? x) [s-pos: length? x] if s-pos < 0 [s-pos: 0] sl/data: s-pos / (length? x) show li show sl ] resize-grid: func [percentage] [ gui-size: system/view/screen-face/pane/1/size ; - 10x0 list-size/1: list-size/1 * percentage list-size/2: gui-size/2 - 95 t-size: round (list-size/1 / 3) sl-size: as-pair 16 list-size/2 unview/only gui view/options center-face layout gui-block [resize] ] resize-fit: does [ gui-size: system/view/screen-face/pane/1/size resize-grid (gui-size/1 / list-size/1 - .1) ] insert-event-func [either event/type = 'resize [resize-fit none] [event]] gui-size: system/view/screen-face/size - 0x50 list-size: gui-size - 60x95 sl-size: as-pair 16 list-size/2 t-size: round (list-size/1 / 3) s-pos: 0 sort-order: true ovr-cnt: none svv/vid-face/color: white view/options center-face gui: layout gui-block: [ size gui-size across btn "Smaller" [resize-grid .75] btn "Bigger" [resize-grid 1.3333] btn "Fit" [resize-fit] btn #"^~" "Remove" [attempt [ indx: to-integer request-text/title/default "Row to remove:" form to-integer ovr-cnt if indx = 0 [return] if true <> request rejoin ["Remove: " pick x indx "?"] [return] remove (at x indx) show li ]] insert-btn: btn "Add" [attempt [ indx: to-integer request-text/title/default "Add values at row #:" form to-integer ovr-cnt if indx = 0 [return] new-values: reduce [ request-text request-text (form ((length? x) + 1)) ] insert/only (at x indx) new-values show li ]] btn #"m" "Move" [ old-indx: to-integer request-text/title/default "Move from row #:" form to-integer ovr-cnt new-indx: to-integer request-text/title "Move to row #:" if ((new-indx = 0) or (old-indx = 0)) [return] if true <> request rejoin ["Move: " pick x old-indx "?"] [return] move/to (at x old-indx) new-indx show li ] btn "Save" [save to-file request-file/save x] btn "Load" [y: copy x: copy load request-file/only show li] btn "Read Me" [alert help-txt] btn "View Data" [editor x] return space 0x0 style header button as-pair t-size 20 black white bold header "Random Text" [sort-column 1] header "Random Number" [sort-column 2] header "Unique Key" [sort-column 3] button black "r" 17x20 [if true = request "Reset?"[x: copy y show li]] return li: list list-size [ style cell text t-size feel [ over: func [f o] [ if (o and (ovr-cnt <> f/data)) [ovr-cnt: f/data show li] ] engage: func [f a e] [ if a = 'up [ f/text: request-text/default f/text show li ] ] ] across space 0x0 col1: cell blue col2: cell col3: cell red ] supply [ either even? count [face/color: white] [face/color: 240.240.255] count: count + s-pos if none? q: pick x count [face/text: copy "" exit] if ovr-cnt = count [face/color: 200.200.255] face/data: count face/text: pick q index ] sl: scroller sl-size [s-pos: (length? x) * value show li] key keycode [up] [key-scroll -1] key keycode [down] [key-scroll 1] key keycode [page-up] [key-scroll -20] key keycode [page-down] [key-scroll 20] key keycode [insert] [do-face insert-btn 1] ] [resize]
posted by: Nick 7-Mar-2016/23:37:44-8:00
Thanks for clearing that up Nick. Possible slow down on just hundreds of records was a bit alarming. On another note I've been having issues with Mac 10.7.5 running my rebol 2 scripts. All the scripts from Viewtop run just fine however. It's the scripts I create, save, then double click that just open in a code editor. I've seen the R3 and Mac thread in this forum but it didn't help. It seems Windows is the preferred environment.
posted by: adam16ster 8-Mar-2016/2:06:34-8:00
That sounds like a file association issue with the system (the file is being opened by a text editor instead of Rebol interpreter). I'm not a Mac user, but you can Google "file association Mac". Here's the first result: http://osxdaily.com/2009/10/25/change-file-associations-in-mac-os-x/
posted by: Nick 8-Mar-2016/7:16:05-8:00
Thanks for setting that straight Nick. This is reaching back quite a bit, it may have been that scrolling through a long/densely populated Area element that was slow. When building Excel reports, I use Allen Kamp's tip often: http://www.rebol.org/ml-display-message.r?m=rmlHLYK
posted by: Edoc 8-Mar-2016/13:43:56-8:00
Wow, Nick, that List Widget example is dynamite! Thanks for sharing that, I will definitely be putting that to good use!!!!
posted by: Edoc 8-Mar-2016/13:46:40-8:00
I put that functionality into a kind of library: R E B O L [title: "Data Grid Lib Example"] headers: ["Column1" "Column2"] x: data: [ ["Item 01-01" "Item 02-01"] ["Item 01-02" "Item 02-02"] ["Item 01-03" "Item 02-03"] ["Item 01-04" "Item 02-04"] ["Item 01-05" "Item 02-05"] ] do http://re-bol.com/gridlib.r I have a section in the tutorial that explains all of the code: http://business-programming.com/business_programming.html#section-16.21
posted by: Nick 9-Mar-2016/7:31:11-8:00
The day this makes it over to R3 or Red I will be a very happy man. Currently I have to deal with almost 20 languages. (Also: Is it me, or does R3 not handle UTF-8 character very well? I often get "botched" characters in R3.)
posted by: Edoc 9-Mar-2016/15:01:20-8:00
|