metaeducation / ren-c

Library for embedding a Rebol interpreter into C codebases
GNU Lesser General Public License v3.0
126 stars 27 forks source link

Prebuilt Mac binary is not available on Amazon S3 (link broken) #1108

Closed nmsmith closed 3 years ago

nmsmith commented 3 years ago

Per the README in the "prebuilt" directory, I'm supposed to be able to build master on MacOS using the binary found at this link: https://s3.amazonaws.com/r3bootstraps/r3-osx-x64-8994d23

However, the link is broken.

The links for other platforms appear to be working.

hostilefork commented 3 years ago

The OSX build appears to be a debug one, not a release one, so the file is:

https://s3.amazonaws.com/r3bootstraps/r3-osx-x64-8994d23-debug

I'm not really sure what the status of that is (no mac immediately in reach to test with)...but it might work. There was some historical issue with that, like the release build had been built with an ODBC dependency, and so it wasn't working on systems that didn't install ODBC with brew--or something like that.

You're quite welcome to tinker, and I can try to help as I can! But this is a niche experimental thing...intended for now to be used by a small group of people interested in the theory of the language. It's not really advertised and not targeting those looking for something to "get things done with" yet...

The build system is particularly weird and the person who made it isn't developing it any longer, so it's in need of replacement:

https://forum.rebol.info/t/new-build-executables-new-build-strategy/1432

And a lot of things are in flux. But precautions aside, it has some cool tricks in it (though appreciating them is somewhat contingent on understanding the medium...)

nmsmith commented 3 years ago

I'm hunting for Rebol derivatives that run on 64-bit Mac. Are you hinting I should stick to the 2014 Rebol alpha? 😃 I'm getting other build errors now, so perhaps Ren-C isn't going to work for me either way.

I'm just a curious language designer, looking to explore some interesting languages.

hostilefork commented 3 years ago

I'm getting other build errors now, so perhaps Ren-C isn't going to work for me either way.

If you post what the build errors are, that would be informative.

For idle exploration of "what does this language construct do", there's the web console to try things in. But really, there's little hope of getting much from building Ren-C yourself if you do not already know some Rebol...

A 32-bit emulator plus Rebol2 or Red is likely the right place to get started in the format at this time; as there are tutorials and such for it and they are relatively unchanging.

(Also, I think having a Linux VM on hand in a VirtualBox or whatever is pretty indispensible for developers...it's easy to tinker and throw away experiments without worrying much about dirtying up the host OS.)

nmsmith commented 3 years ago

"clang: error: no such file or directory: 'objs/serial/serial-posix.o'"

The error occurs after several minutes of compiling. Here is the full output from the compilation process.

Thanks for the pointers. I suppose I will set up a 32-bit platform then!

hostilefork commented 3 years ago

Thanks for the report, looks just to have been an oversight in a cleanup...hopefully if you pull this change it will build.

https://github.com/metaeducation/ren-c/commit/8ffad566bfcde02578866456e0f5825cec45e608

We're "between CI" right now due to Travis CI going evil, so these kinds of things are happening more. It's on the infinite agenda to set up a complete new CI, but the web build was a priority so just that is happening right at this moment.

nmsmith commented 3 years ago

The compilation process now seems to finish without errors, but when I run the r3 executable, I get the following error printed 1000000 times to my terminal, and then it eventually segfaults:

C Source File ../src/core/c-error.c, Line 300, Pointer 0x7fd26d7cb3c8 At evaluator tick: 65691 Series VARLIST detected. ...and that VARLIST is of an ERROR!... -- (context)=0x0x7fd26d7cb3c8 : Context Varlist : tick 65691 ../src/core/d-crash.c @142

hostilefork commented 3 years ago

Thanks for the information. I dug an old Mac out of the closet and it did reproduce the issue. I believe it is corrected here:

https://github.com/metaeducation/ren-c/commit/83ad35c8bd15b320a49883e7a7b7ae863a0d5a39

If you'd like any advice/guidance/opinions on the language for your specific interests, feel free to introduce yourself here:

https://forum.rebol.info/c/introductions/46

nmsmith commented 3 years ago

After pulling your changes and recompiling, running r3 now gives me this error:

C Source File ../src/core/c-error.c, Line 300, Pointer 0x7fddc4944f08 At evaluator tick: 14664 Series VARLIST detected. ...and that VARLIST is of an ERROR!... -- (context)=0x0x7fddc4944f08 : Context Varlist : tick 14664 ../src/core/d-crash.c @142 make error! [ type: id: message: "Bad path in spec: /length" near: [ fail ["Bad path in spec:" var] **] where: [fail if case subparse subparse subparse parse function] file: %-tmp-boot- line: 3643 ] managed series was likely created during evaluator tick: 14647 C Source File ../src/core/m-series.c, Line 437, Pointer 0x10ddf10d2 At evaluator tick: 14664 Rebol Internal Error If you need to file a bug in the issue tracker, please give thorough details on how to reproduce the problem:

https://github.com/metaeducation/ren-c/issues

Include the following information in the report: Executable not built with DEBUG_SERIES_ORIGINS, no more info

hostilefork commented 3 years ago

So the specific problem here (actually in both cases) is a debug feature of trying to be brief and clever running up against the fact that C and C++ don't guarantee parameter ordering.

Rather than try and enforce a tricky/fragile policy for the callsites, I've just reduced the debug feature to only offer a more robust form that avoids the problem:

https://github.com/metaeducation/ren-c/commit/459817ebe84d5e61268db2e2896e8f27fcf11b97

And hopefully that's all that was wrong... (!)

nmsmith commented 3 years ago

I can confirm that Ren-C now compiles and runs without (noticeable) error as a 64-bit executable on MacOS Big Sur! Good work.

I think I'll stick to Rebol 2 for the moment :)

hostilefork commented 3 years ago

Good it works. As I mentioned in the post I pointed at... Travis CI kind of left us hanging in terms of not being able to do our previously fairly diverse "wall of builds", and so it's going to be bumpy until we actually get a new setup for that.

...

A popular place to start looking at what makes Rebol's "box of parts" interesting is PARSE. There, you see the same pieces that are used in the language for basics like assignments and looping re-applied to do textual, binary, or structured parsing:

https://www.red-lang.org/2013/11/041-introducing-parse.html http://www.codeconscious.com/rebol/parse-tutorial.html

It's a more laissez-faire version of what you get from Haskell Parsec/etc. A big step up from RegEx with being able to break things into named subrules, and be much more literate. But without the benefits/constraints of a pure functional medium. And running in an executable whose dependencies have been kept down to a "zero-install" ethos.

But there's a lot to question about the foundational premises of the language itself...where everything (like IF) is a function. One of the first things Ren-C attacked was a question about how RETURN itself works (or does not work)...and introduced "definitional return". There's a write up of that here in this post:

https://forum.rebol.info/t/the-canonical-list-of-non-negotiables/1244

And there's a near-infinite number of things to question in the area of binding:

https://forum.rebol.info/t/relative-binding-and-frame-internals/1344

Anyway, Rebol2 (and Red) are to my tastes much more apps than they are languages...because they don't hold up particularly well to sophisticated compositions beyond the somewhat fixed set of examples. Ren-C attacks the issues across the board with things ranging from specialization to tail-calls...and really looks to pull out those language properties.

But given the existence of the not-thought-out forms... I'm not interested in hurrying showing people "the idea" of a Rebol-like-thing, and feeling rushed in doing that. It's been done. So the focus is on making the demos actually work...to the extent an imperative freeform tool in this medium can be said to "work".

Oldes commented 3 years ago

I'm hunting for Rebol derivatives that run on 64-bit Mac. Are you hinting I should stick to the 2014 Rebol alpha? 😃 I'm getting other build errors now, so perhaps Ren-C isn't going to work for me either way.

I'm just a curious language designer, looking to explore some interesting languages.

Hi @nmsmith, if you need more updated version of Rebol and Ren-C will not be good enough for you, you may try my version: https://github.com/Oldes/Rebol3

The last version I did for MacOS is from November 2020 so you may want to build your own version.

I'm not a regular macOS user, so any feedback would be good for me.

nmsmith commented 3 years ago

Wow, thanks @hostilefork for the detailed pointers! I'll check out those aspects of the language. You've probably saved me some time :)

@Oldes thanks for that too, I'll keep your fork in mind.