Factor language template

I’m trying to make a template for the Factor programming language. The executable is called factorwhich is also the name of an existing executable. What do I do to be able to use the executable from the factor-lang package? I tried searching for it but the shell always hangs when I try.

Hey @linneadenvarg!

I made a super simple configuration for Factor, which you can find here: https://replit.com/@ShaneAtReplit/Factor-Lang#.replit

You can also find documentation for how to configure the packages/deps and functionality of a repl here: https://docs.replit.com/programming-ide/configuring-repl

1 Like

That’s what I did and it doesn’t work. When you just use factor it uses the unix tool instead.

1 Like

run in shell

sed -i "s/];/  pkgs.factor-lang\n  &/" replit.nix

@UMARismyname Already did that. As stated before, it still uses the built in factor tool by default.

https://replit.com/@linneadenvarg/Factor#.replit

Dang, I’ll create a ticket with the team to see if we can get this working. Is there a simple Factor script or intended behavior we can use to make sure that we have reached the solution?

Thank you! Here’s a hello world script that can be run with ./factor hello-world.factor (save it to a file with that name of course) and will output Hello world in the terminal:

USE: io
IN: hello-world

: hello ( -- ) "Hello world" print ;

MAIN: hello

When running the executable on its own, it’ll open a GUI of the listener (interpreter):