Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

factor: update for Factor 0.98 #605

Closed
wants to merge 4 commits into from
Closed

factor: update for Factor 0.98 #605

wants to merge 4 commits into from

Conversation

mrjbq7
Copy link
Contributor

@mrjbq7 mrjbq7 commented Jan 26, 2022

Updating syntax for small changes in Factor 0.98.

@mrjbq7
Copy link
Contributor Author

mrjbq7 commented Jan 26, 2022

The Factor 0.98 release was in 2018. I expect a Factor 0.99 release in 2022.

Both should work with this slight change.

Copy link
Collaborator

@dubek dubek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mrjbq7 for your contribution to Mal.

I ran into several problems when testing this PR locally, see comments below:

@@ -24,8 +24,7 @@ WORKDIR /mal
# Factor
RUN apt-get -y install libgtkglext1
RUN cd /usr/lib/x86_64-linux-gnu/ \
&& curl -O http://downloads.factorcode.org/releases/0.97/factor-linux-x86-64-0.97.tar.gz \
&& tar xvzf factor-linux-x86-64-0.97.tar.gz \
&& curl -O http://downloads.factorcode.org/releases/0.98/factor-linux-x86-64-0.98.tar.gz \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change the URL from http:// to https:// .

&& ln -sf /usr/lib/x86_64-linux-gnu/factor/factor /usr/bin/factor \
&& rm factor-linux-x86-64-0.97.tar.gz

&& rm factor-linux-x86-64-0.98.tar.gz
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the following line at the end of Dockefile:


ENV HOME /mal

This will allow factor to create the $HOME/.cache directory.

@@ -24,8 +24,7 @@ WORKDIR /mal
# Factor
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please modify the top of the Dockerfile: change FROM ubuntu:vivid to FROM ubuntu:20.04 (just to modernize the images).

@@ -11,7 +11,7 @@ SYMBOL: repl-env

DEFER: EVAL

GENERIC# eval-ast 1 ( ast env -- ast )
GENERIC#: eval-ast 1 ( ast env -- ast )
Copy link
Collaborator

@dubek dubek Jan 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

besides this, there's another GENERIC# in line 52 which needs fixing (missing colon). I get an error:

Started with:
../factor/step7_quote/step7_quote.factor

52: GENERIC# apply 0 ( args fn -- maltype newenv/f )
            ^
No word named “GENERIC#” found in current vocabulary search path
(U) Quotation: [ c-to-factor
Testing cons function
TEST: '(cons 1 (list))' -> ['',(1)]
Exception: IOError(5, 'Input/output error')
Output before exception:
]
    Word: c-to-factor
(U) Quotation: [ [ (get-catchstack) push ] dip call => (get-catchstack) pop* ]
(O) Word: command-line-startup
(O) Word: run-script
(O) Word: run-file
(O) Word: parse-file
(O) Word: parse-stream
(O) Word: parse-fresh
(O) Word: (parse-lines)
(O) Word: (parse-until)
(O) Word: parse-until-step
(O) Word: no-word
(O) Word: throw-restarts
(O) Method: M\ object throw
(U) Quotation: [
        OBJ-CURRENT-THREAD special-object error-thread set-global
        current-continuation => error-continuation set-global
        [ original-error set-global ] [ rethrow ] bi
    ]
(cons 1 (list))

make: *** [Makefile:238: test^factor^step7] Error 1

(similarly for steps 8, 9, A)

@mrjbq7
Copy link
Contributor Author

mrjbq7 commented Jan 30, 2022

Hi @dubek, thank you for the review.

I believe I have fixed all of those issues, but the "Build and Test / linux" Github Action is still using old Factor, which is why it is erroring.

Copy link
Collaborator

@dubek dubek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mrjbq7 , now everything works for me locally (with your updated Dockerfile).

In order for it to work correctly, we need to wait for @kanaka to build and push the kanaka/mal-test-factor docker image from your new Dockerfile, and then re-run the "Build and Test" job.

@asarhaddon
Copy link
Contributor

Hello. Just for the record, this duplicates some parts of #588

@mrjbq7
Copy link
Contributor Author

mrjbq7 commented Feb 2, 2022

The Dockerfile in #588 looks pretty good, the only thing it's missing from this is ENV HOME /mal.

I'd be happy to be added as a maintainer of this if it's useful.

I am one of the Factor core developers.

@mrjbq7 mrjbq7 closed this by deleting the head repository Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants