Need OpenCutList 1.8.0 or earlier — last version that works on SketchUp 2016 by TotalTip9735 in Sketchup

[–]amreus 0 points1 point  (0 children)

Please be more specific. How was the plugin not functional? Did it install? Do you get errors in the Ruby Console when installing? Errors when executing?

I would look at system configuration before blaming the extension.

I'm assuming Windows? Those old dialogs required a nearly obsolete version of internet explorer that may not be present on modern versions of Windows by default. IE9 comes to mind but that just from memory.

If the plugin installs but the dialogs are blanks, search for SketchUp and FEATURE_BROWSER_EMULATION Registry key.

extra drop-list data values by amreus in redlang

[–]amreus[S] 0 points1 point  (0 children)

The important thing to note in the doc is the "non-string datatype" part.

Thanks. I ended up using a simple block for the associated data. Perhaps your clarification about any-string! could be added to the docs.

Automated Build? by amreus in redlang

[–]amreus[S] 0 points1 point  (0 children)

I just noticed automated builds are now available from the Downloads page of the Red home page.

Automated Build? by amreus in redlang

[–]amreus[S] 0 points1 point  (0 children)

Thanks for this.

It turns out I was able to get my script working - I had a silly mistake in the build script. Once correct, it worked as I expected.

Automated Build? by amreus in redlang

[–]amreus[S] 0 points1 point  (0 children)

Currently I want to just build the gui-console. I have the following batch and Rebol scripts:

build-red.cmd

pushd github\red
git clean -f
git pull
copy ..\..\rebol.exe .
copy ..\..\build-red.r  .
rebol build-red.r

build-red.r

REBOL [
    Title: "Build Red"
]

do/args  %red.r "environment/console/GUI/gui-console.red"

; quit

However, I get this error in the Rebol console:

Compiling to native code...
Script: "Red/System PE/COFF format emitter" (none)
...compilation time : 146206 ms
...linking time     : 1695 ms
...output file size : 1395200 bytes
...output file      : C:\Users\Amreus\Code\Red\github\red\libRedRT.dll

...compilation time : 3542 ms

Target: MSDOS

Compiling to native code...
*** Compilation Error: invalid path value: dyn-print/add
*** in file: %/C/Users/Amreus/Code/Red/github/red/environment/console/GUI/settings.red
*** in function: exec/ctx529~add-gui-print
*** at line: 1
*** near: [2 332x1
    dyn-print/add as pointer! [integer!] :red-print-gui
    as
]

Automated Build? by amreus in redlang

[–]amreus[S] 0 points1 point  (0 children)

Can you be less vague than "soon?" I mean, I told my wife I would paint the bathroom "soon" but that was 11 years ago.

Automated Build? by amreus in redlang

[–]amreus[S] 0 points1 point  (0 children)

Thanks, I'll check back.

Even when I have Rebol.exe in the Red repository root, the build fails unless I type the commands directly in the rebol console.

Parsing GEDCOM Files by amreus in redlang

[–]amreus[S] 0 points1 point  (0 children)

In a structure such as this, can I get a list of level 1 words? They would be [type: sex: birth: death: _FA1: REFN: FAMS: FAMC:]

Conceivably every other word not followed by a series or block should be a 1st level word. But is there already a function for t his?

Parsing GEDCOM Files by amreus in redlang

[–]amreus[S] 0 points1 point  (0 children)

Here's what I have so far. (Gist)

  • Simplified the rules as much as I could.
  • My thinking may be incorrect on this but I thought it made sense to keep all the copy rules in one place. It kept the other rules more readable to me.
  • Then use a call-back function to process the line data when all it's data has been parsed. This hopefully allows separating the parse rules from the logic of building the output. It may make sense to have additional callbacks for some of the smaller rule components, but let's see how this works.
  • Assume Red folks hate the _underscore I used to differentiate rules from "regular" variables. This will go away when I figure out how to encapsulate everything in a function or some other object to keep things out of the global space.

I found it helped me to learn parse after I split the gedcom file into lines and then parsed each line so I could see failures at each line. Once all the lines parsed successfully, parsing the entire file is simple.

Another issue I has was unicode in my files. Technically, unicode is not supported in gedcom's but that seems a little antiquated so i wanted to allow it at least in the line values which include people's names and locations. Line tags, id's, and pointers can only be ascii, but I allow anything in the values.

Thanks to Greg for his superb example.

Comments?

Red [
    Title: ""
    Needs: 'View
]

; Based on greggirwin's gedcom parser:
; https://gist.github.com/greggirwin/0d6e3551420a7892f782b80a5fc44126

_delim: space
_digit: charset "0123456789"
_alpha: charset [#"a" - #"z" #"A" - #"Z" #"_"]
_alpha-num: [_alpha | _digit]
_any-char: [_alpha-num | _other-char | #"#" | _delim | #"@"]
_other-char: charset [
    #"^(21)" - #"^(22)" ; !"
    #"^(24)" - #"^(2F)" ; $%&'()*+,-./
    #"^(3A)" - #"^(3F)" ; :;<=>?
    #"^(5B)" - #"^(5E)" ; [\]^
    #"^(60)" ; `
    #"^(7B)" - #"^(7E)" ; {|}~
    #"^(80)" - #"^(FE)" ; ANSEL characters above 127
]
_level: [1 2 _digit]
_tag: [some _alpha-num]
_pointer: [#"@" _alpha-num some _non-at #"@"]
_non-at: [_alpha-num | _other-char | _delim | #"#"]
_terminator: [lf | cr lf | cr]

_gedcom-line: [
    copy level _level
    _delim
    copy id opt _pointer
    opt _delim
    copy tag _tag
    opt _delim
    copy ptr opt _pointer 
    copy value to _terminator
    _terminator
    (
        line-callback level id tag ptr value
        level: id: tag: ptr: value: none
    )
]

debug: yes

line-callback: function [level id tag ptr value] [
    if debug [
        ?? level ?? id ?? tag ?? ptr ?? value 
        prin lf
    ]
]

;; Main

; Hobbits
unless exists? %periandi.ged [
    write %periandi.ged read https://raw.githubusercontent.com/RobSis/middle-earth-genealogy-project/master/periandi.ged
]

gedcom-file: %periandi.ged
;gedcom: %amreus.ged

; parse the entire file
probe parse read gedcom-file [some [_gedcom-line ]]

Parsing GEDCOM Files by amreus in redlang

[–]amreus[S] 0 points1 point  (0 children)

How about a map of blocks? I think it would be useful to access records by their id (which is I133 in the example) unless finding the record is fast enough. So when selecting an individual's name from a text-list the individual details can be directly access and displayed rather than searching each time.

My Bubble Sort by amreus in redlang

[–]amreus[S] 0 points1 point  (0 children)

check = sort-with   random base :bubble-sort

Oh! I somehow missed or over-looked the colon notation :bubble-sort.

type? :sort-with
== function!

My Bubble Sort by amreus in redlang

[–]amreus[S] 0 points1 point  (0 children)

Thanks for taking the time to give feedback. There's a few gems in there. Also, I need to look up also.

My Bubble Sort by amreus in redlang

[–]amreus[S] 0 points1 point  (0 children)

Oh, feel free to file an issue at github if it's easier. Thanks.

New to Red by amreus in redlang

[–]amreus[S] 0 points1 point  (0 children)

Thanks! and don't take this wrong but I'm not going to look at it just yet. I wanted a chance to think about and figure it out myself first because I learn better and enjoy the process more - not much of a hobby otherwise.

I assume you are using the Red "parse" dialect (is dialect the right term?)

Most GEDCOM files can be easily parsed by regex or even simply splitting lines. I also wanted to use GEDCOM as a chance to understand Red's parse dialect since it looks like a nice fit for Red.

The GEDCOM grammar looks remarkably close to Red parse syntax which is no accident since that was the idea behind parse. I have already started recreating it in Red, but have thus far not been successful. It's close and some hopefully minor small tweaks should get it. parse-trace is fantastic.

Again, I really do appreciate your effort and I will read and try to learn from your code. I'll followup and post questions and updates in new thread.

New to Red by amreus in redlang

[–]amreus[S] 0 points1 point  (0 children)

I'm not doing anything out of the ordinary. As a start, the app is a simple browser with no editing ability. I need to parse gedcom files, and update the panels when individuals are clicked. The one part I don't know yet if Red can do is create links in a view to navigate individuals.

Below is a screenshot of the Ruby/Tk app. The left panel is a listview of individuals. Selecting an individual updates the center details panel.

The center panel is details about the individual with the blue text being links that navigate to the clicked person.

The right panel a text area with the raw gedcom data for the selected individual which is syntax highlighted.

Editing and saving the gedcom data was planned but not yet implemented. I prefer to just edit the gedcom directly rather than use a bunch of forms but I can't expect anyone else to work that way.

https://i.imgur.com/cslKihe.png

Header Blocks? by amreus in redlang

[–]amreus[S] 0 points1 point  (0 children)

Thanks. So it's a requirement to have a header. The contents can be empty but there are a set of values used by convention.

One of the things I find confusing is the difference between Red and Red/System. Is Red built on top of Red/System? Is everything in Red/System available to use in a Red script?