I don't know anything about macOS so I can just propose an ugly workaroud,
probably someone else will come up with a better solution: create an alias in
your .bashrc
alias llvm-ar="ar"
Anyway, I may guess that either you don't have llvm-ar in your PATH, or it is
not installe
> type Any is the closest to what you want. It is also unsafe to use.
Hi,
I'm trying to create a static-lib from a nim source so that I can use it in my
other C projects. But, static-lib creation fails in macOS. Using version 0.17.2.
Here's the command-
nim cc -d:release --header --noMain --app:staticlib test.nim
It gives the error
> Would it be difficult to enamble doc tool to handle expanded macros? I love
> generating docs in Rust's macros so I thought it would be really nice when
> you have repetitive routines as I could use a macro and the user still have
> nice docs for each routine independently.
`nim doc2` does ex
> BTW, could anyone direct me to how index is built/generated ? I hope it is
> not manual work. I have something in mind I wish to explore.
`koch docs` builds the documentation. The index is eventually generated by a
command like
nim buildIndex -o:html/theindex.html destPath
It seems like you want dynamic typing in a statically typed language.
The proper way for heterogeneous collection of objects currently is:
* with ref objects inheriting from the same base class.
* with object variants
In the future you will also be able to use concepts and VTables.
I don't know how you got "invalid indentation". Even pressing the "Run" button
on the forum gives a different error. This is the correct version:
#? stdtmpl | standard
#proc greet(name = "world"): string =
# result = ""
Hello $name
#end proc
#
#echo greet()
@jzakiya I have read a lot in this post, but due to my own lack of time I
decided to skip most of it (so apologies if somebody mentioned this already).
Why doesn't Nim have better docs? Some reasons:
* Nim doesn't have full-time employees working on it (this is also why
telling us "you should
@bpr Not in the core (or std, I guess, but's more realistic). But I never said
I was talking about the core.
@rayman22201 I was referring to a GC library for Rust. I can see @mratsim
already mentioned one example (there are more, if my memory serves me well).
There are two main reasons for it
Well, it certainly helps a lot when you find some code which uses some cool
routines you know nothing about. It helped me with pegs that way if I recall.
Although I must admit that I've already assumed it was something similar to
regexes as ~= was used and Perl also uses it.
"the index" is good to have but it is helpful **only** if you already know what
you're searching for. Otherwise if you dont have any clue about what you are
searching, **how** certain things are done in Nim, It is only a huge pile of
unorganized identifiers.
BTW, could anyone direct me to how i
* ref \--- there is no such a thing. Reference always points at an entity of
a specific type.
* auto \--- it's not a type per se, it can just appear in several contexts a
type may appear.
* object \--- it's a kind of a type (as in: "this is an object type"), not
type per se
* any \--- we
Wow, I see most of you guys don't like the index & library list as much as I
do. They're not bad, in my opinion.
@bluenote Dependency avoidance... Well... It wouldn't be a real problem if
dependencies were solved automagically (see: Rust). ^^" Btw. that's a hell of a
nasty line you quoted! Ad
**Araq you need to chill out!**
I took the time to document for you unexpected, deficient, and incorrect
behavior of your documentation and you are not even `humble` enough to thank me
for it.
So why should I bother to keep using your `work in progress` language that you
can't even take `posit
How much more will be revealed once you know about
[https://play.nim-lang.org/?gist=3e9b43b91d956366d8e5ff1a13e1efc6](https://play.nim-lang.org/?gist=3e9b43b91d956366d8e5ff1a13e1efc6)
Btw thanks for never answering my questions.
Upon thinking about it, I think the case for `echo num.formatFloat(ffDecimial,
0)` is incorrect, and should be changed to be consistent with the intent of the
function.
The `0` option should produce a value (currently it would be `rounded`) with no
digits displayed.
`echo (10.456).formatFloat(
@Ar: Oh right, such a declarative Syntax was discussed, but apparently
not implemented for concepts, sry. No error occurred and I guess I just wanted
it to work too much..
oh sorry, I guess it's supposed to be `~/.nimble/packages_official.json`
@bluenote, also for `formatFloat`, it should also explain that it seems to
using `rounding` of the digits its displays and not truncation. If a user wants
to just truncate the displayed digits what function does that, or can this one
perform that too. It may be an option to include into this fun
Can someone point out what's wrong with this source filter (I'm trying samples
given here -
[https://nim-lang.org/docs/filters.html](https://nim-lang.org/docs/filters.html))
as it refuses to compile with an "invalid indentation" error message
#? stdtmpl | standard
#proc greet(n
I have placed packages.json in .nimble folder but I am still getting the same
problem.
How do I instantiate a hashtable in Nim that maps strings to objects of any
type? None of these seem to work:
import tables
var t = newTable[string, any]()
var t = newTable[string, ref]()
var t = newTable[string, auto]()
var t = newTable[string, object]()
I
It automatically [frees unreachable
memory](https://aturon.github.io/blog/2015/08/27/epoch/#freeing-memory) for you
and [collect garbage
(thread-safely)](https://aturon.github.io/blog/2015/08/27/epoch/#managing-garbage)
so you know the saying, if it quacks like a duck though the canonical name
@mratsim Very interesting read, but that's not a GC?
@bluenote I could kiss you!
Now just do that for at least everything in that module and that will be a
significant start, and benefit to all of us users.
@jzakiya: Do you think that is helpful:
[https://github.com/nim-lang/Nim/pull/6704](https://github.com/nim-lang/Nim/pull/6704)
Hey guys, stop being defensive. If I didn't think Nim is a worthy project, and
has great potential, I would have never bothered to take the time to tell you
how to improve your project, and it would be in your interest to take comments
as mine as `positive critical feedback`.
As further `positi
27 matches
Mail list logo