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

env does not work on mac os #29

Open
haroldcarr opened this issue Apr 27, 2021 · 15 comments
Open

env does not work on mac os #29

haroldcarr opened this issue Apr 27, 2021 · 15 comments

Comments

@haroldcarr
Copy link

> flk 
Fleck 24461e38
user> (env)
env: illegal option -- 0
usage: env [-iv] [-P utilpath] [-S string] [-u name]
           [name=value ...] [utility [argument ...]]
{}
@chr15m
Copy link
Owner

chr15m commented Apr 27, 2021

Hello, are you running this on bash 4?

@haroldcarr
Copy link
Author

I am on a mac 10.15.7

When I first tried flk, that error is what I got.

I was picking up /bin/bash

/bin/bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)

So I did

brew install bash
bash --version
GNU bash, version 5.1.4(1)-release (x86_64-apple-darwin19.6.0)

then flk worked

@chr15m
Copy link
Owner

chr15m commented Apr 28, 2021

Thanks for the detail.

@chr15m chr15m closed this as completed Apr 28, 2021
@haroldcarr
Copy link
Author

I'm curious, why closed? Is it fixed?

@chr15m
Copy link
Owner

chr15m commented Apr 28, 2021

It is not a bug. You said you were using bash 3.2.57 when you saw the error, but that version of bash is not supported.

@chr15m
Copy link
Owner

chr15m commented Apr 28, 2021

@haroldcarr wait a second - did uou see the (env) error on bash 5?

@haroldcarr
Copy link
Author

The bash 3.2.57 error had to do with declare -A

The env -0 IS a bug. -0 is not supported on FreeBSD and Mac OS.

THis bug should be reopened.

@chr15m
Copy link
Owner

chr15m commented Apr 28, 2021

👍 cool thank you for the detail.

@chr15m chr15m reopened this Apr 28, 2021
@Tobias-Fischer
Copy link

FYI - this can be worked around by conda install coreutils.

@joelmccracken
Copy link

Out of curiosity, do you have an idea of how difficult it would be to backport this project to bash for macos? It seems like the main challenge is usage of associative arrays.

@chr15m
Copy link
Owner

chr15m commented Apr 11, 2023

@joelmccracken It's conceivable but beyond my time and abilities. Here's an associative array implementation that works in Bash 3 for anybody who would like to tackle this in future: https://gist.github.com/chr15m/fb257ae8bb9774245b0ec67d9c7d388b

@joelmccracken
Copy link

thank you! There's another part to this in that I'm thinking of working on a bash implementation for Shen lisp, and I think a lot of the work you've done here could help me.

But also, I might just take this on, for a few reasons.

@chr15m
Copy link
Owner

chr15m commented Apr 14, 2023

@joelmccracken actually please don't use the associative array implementation I linked to, it is flawed. Most of the work in Fleck was done as part of the make-a-lisp project, I simply pulled together various threads to make Fleck. Best of luck with your Shen lisp implementation!

@joelmccracken
Copy link

Oh wow, I just read the comments; I didn't realize you generated this from a LLM. How interesting, what a warning.

fwiw I was planning on looking more deeply at that code before using it, it seems like a helpful starting point.

@chr15m
Copy link
Owner

chr15m commented Apr 14, 2023

Yeah at the very least Adam's ht function is certainly useful and you can probably figure out how to solve the collisions issue quite easily.

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

No branches or pull requests

4 participants