firesloth
But I think the std/strutils/split counter example isn't strong for two reasons:
1. When you disambiguate in Nim, you use just the module name, not it's full path. So it would still just be `strutils/split`.
2. If we were to introduce such a syntax, we could also introduce an `import foobarbazqux as foo` alias syntax, which is present in many languages (eg JavaScript, Clojure, etc). This would also be useful if we ever had module name collisions, which has never happened to me in Nim, but doesn't seem impossible.
Right now, if I have the `foo` module and `bar` function, I can call `arg1.bar()`, or `foo.bar(arg1)`. But if the namespace didn't also use `.`, then it wouldn't be an issue.
For sake of argument, lets choose `/` like Clojure. Then we'd get: `arg1.foo/bar()` so we can specify the namespace and uniform function call syntax is preserved.
I made my judgement a few years ago, when the technical bus factor might have legitimately been 1, but there are a lot more people involved now, and some of them may have sufficient motivation to maintain Nim themselves rather than just move off of it ASAP. I'm still not sure exactly how it would shake out, but I think Nim would survive the absence of Araq, at least for a time.
Sorry for my earlier comment. I can't edit it anymore, but I will not make it again.
My concern is leadership, not technical ability per se. There are a number of people capable of maintaining Nim or advancing it (off the top of my head I can think of 6). The important question is, _will they?_ Has anyone involved made commitments about what they'd do? Has any such commitment been accepted by the rest of the community? Maybe I've missed such statements, but Araq's comment makes me think there just aren't any such plans.
If Araq is hit by a bus, what _will_ happen? I could think of a number of scenarios that seem _possible_ to me, some good, some bad, the problem is that I don't know which if any it would be. For example, maybe diverse contributors organize and take over the project, maybe just contributors from status take over, maybe it's forked repeatedly and the community fragments, maybe it putters along with just bug fixes, maybe it never sees another release, maybe Araq has it in his will that no one can ever use Nim again, etc.
Is there anyone we _know_ would take over for Araq? Do we have a a "Vicearaq"? If not, then I believe a bus factor of 1 is justified.
To be clear, I like Nim a lot and I introduce it to other devs given half a chance, but I don't feel comfortable betting other people's jobs on it at this time. Maybe it's just that Elm has made me wary of BDFLs and I should be less paranoid.
As a response to "Is there a Nim foundation?" it can be interpreted as "No, and there won't be, and this is why..."
Having said that, I like Nim, but have advised against using it in important projects for exactly this issue: it has bus factor 1 (ref https://en.wikipedia.org/wiki/Bus_factor ).
function git-commit-fixup() {
git commit --fixup ":/$*"
}
# usage: suppose there's a commit "fix: the thing"
git-commit-fixup thing
# now there's a new commit "fixup! fix: the thing" which can be autosquashed git tag -f pre-rebase function git-commit-fixup() {
git commit --fixup ":/$*"
}
alias gcf="git-commit-fixup"
# Looks for the most recent commit that matches its arg
# eg: we have three commits with messages:
# "fix: the thing"
# "feat: 5 percent cooler"
# "test: test coolness"
# then we do some work and git add, then do:
gcf cooler"
# now we have 4 commits: "
# "fix: the thing"
# "feat: 5 percent cooler"
# "test: test coolness"
# "fixup! feat: 5 percent cooler"
# And autosquash will combine the fixup commit with the appropriate semantic commit as you say.
Sadly I've stopped using it as someone introduced a bunch of commit lint git hooks that choke horribly on the "fixup!" part. And you can't pass --no-verify while rebasing. function git-checkout-branch-by-search-string() {
local maybe_branch_name
maybe_branch_name=$(git branch --sort=-committerdate | grep $1 | head -n 1)
if [ -n "$maybe_branch_name" ]; then
git checkout "${maybe_branch_name:2}"
else
echo "Could not find branch matching $1"
fi
}
alias gcos="git-checkout-branch-by-search-string"
Branches often include things like ticket numbers and project keys, so you can do $ gcos 1234
and save some typing.I have a pair of fixup commit functions, which make it faster to target fixup commits prior to rebasing:
function git-commit-fixup() {
git commit --fixup ":/$*"
}
function git-add-all-then-git-commit-fixup() {
git add .
git commit --fixup ":/$*"
}
Long function names that are then assigned to an alias can make it easier to find them later if you forget rarely used ones. That is you can do:$ alias | grep fixup
to see the list of relevant aliases and the functions they call.
I also have two functions I use like a linear git bisect:
function git-checkout-parent-commit() {
local prev
prev=$(git rev-parse HEAD~1)
git checkout "$prev"
}
function git-checkout-child-commit() {
local forward
forward=$(git-children-of HEAD | tail -1)
git checkout "$forward"
}
function git-children-of() {
for arg in "$@"; do
for commit in $(git rev-parse $arg^0); do
for child in $(git log --format='%H %P' --all | grep -F " $commit" | cut -f1 -d' '); do
echo $child
done
done
done
} export CDPATH=.:~/.marks/
function mark {
ln -sv "$(pwd)" ~/.marks/"$1"
}
I prefix all the "marks" with a symbol (eg "@") then if I do $ cd @
then press tab it will list all the marks, or autocomplete if I type more.In config.nims:
switch("hints", "off")
task hello, "say hello world":
echo "hello world"
In bash: $ nim hello
hello worldeg:
$ code script.nim
#!/usr/bin/env nimcr
echo "hello world"
$ ./script.nim
hello world
edit:There's also the possibility of using nimscript, using nim e. It works similarly but you'd change the shebang line to something like
#!/usr/bin/env nim e --hints:off