Comments (13)
So in helix I just construct a require statement from the module location, like this:
let res = guard.run_with_reference(
cx,
"*helix.cx*",
&format!(r#"(require "{}")"#, helix_module_path.to_str().unwrap()),
);
The biggest thing is that I neglected to remember that 1. windows existed and 2. Steel from what I understand does work agnostically of the paths, but in general if you want the code to be portable there should be a single representation that gets used for referring to modules. At the moment, that representation is just the unix one - so for this I think I can just get away with properly escaping the /
in the string when requiring - and then everything from there should work as intended.
Moving forward I'd like to have a windows machine set up so I can test against it every once in a while, but I haven't made the time for that
from steel.
latest commit on my fork should have the update which I think will fix this for windows. I can't test it myself just yet, but if you're willing you can give it a shot in the mean time while I get an environment set up in the next few days
from steel.
latest commit on my fork should have the update which I think will fix this for windows. I can't test it myself just yet, but if you're willing you can give it a shot in the mean time while I get an environment set up in the next few days
Works, I can do basic stuff on the fork now on windows, THANKS! I think issue can be closed if you want.
from steel.
Unfortunately I don't have easy access to a windows machine at the moment - for the first one, it looks like I'll have to escape the path which I'm currently not doing.
Per the second one - what are the contents of imp.scm
and also test.scm
?
from steel.
test.scm:
(require (prefix-in impl. "imp.scm"))
(imp.yolo)
imp.scm:
(require "provide.scm")
(define (yolo)
(displayln "YOLO"))
(provde yolo)
from steel.
Does provide.scm exist?
from steel.
How do I check if it exists? I thought it is in built to steel, and not one of the cogs we install, or atleast that's the idea I got from looking at the README.md
from steel.
Ah I see - this is just an example, where provide.scm
is its own file - I was just designating that provide.scm
had those contents with that filename.
Can you remove the (require "provide.scm")
from your file and also fix the type in (provide yolo)
?
from steel.
It now gives the following error when I try run test.scm:
from steel.
Just add (provide yolo)
at the top of that file (imp.scm)
from steel.
Works fine now.
thanks. So I guess on the helix side is the only issue left?
from steel.
Yeah, I'll take a look there
from steel.
for the first one, it looks like I'll have to escape the path which I'm currently not doing.
Would the \
have to be escaped by the user not by steel? Or am I reading this weekend
from steel.
Related Issues (20)
- to-string adds extra space HOT 2
- Escaping backquotes HOT 2
- Successful redefinition of functions is inconsistent. HOT 3
- filter does not consider lists as true HOT 2
- [feature] self-contained steel program executables HOT 7
- Add `make-string` primitive HOT 5
- Issues building steel inside docker HOT 6
- Host documentation GitHub pages HOT 2
- WebAssembly HOT 3
- Steel REPL Cursor "Bug" HOT 11
- Installation error HOT 12
- REPL prompt is incorrectly fed a path name even though the loading has failed
- Deregister exeternal value HOT 11
- `cargo run -- install.scm` fails with `os error 2`: no such file or directory HOT 8
- add steel-language-server to nix flake HOT 1
- `panic!` when a rational number's denominator is exact 0 HOT 2
- Dependency `lasso` fails to compile on nightly toolchain HOT 4
- `register_value_with_doc` doesn't utilize the doc part HOT 2
- `integer?` behavior HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from steel.