@Araq
I probably mistook the general spirit of your answer for an answer to this
particular thing. Sorry then.
Well, I'm puzzled about this particular case (searching for float formating)
too, as... well, I've already said this --- if you're looking for a single
specific function (which is, l
> It seems Araq doesn't really like my way of thinking. I can also see how Araq
> reacted to pointing out formatFloat's odd behaviour for 0 (which was quite
> odd to me, too). I, for instance, didn't notice it myself as I don't really
> use Nim for numerical calculations (I use Fortran). And I t
@dom96
> Doc writing is boring
>
> Creating documentation PRs is the easiest thing in the world (but also the
> most boring)
It depends. I, for instance, quite like it. I care (although "deeply" may be a
big word) about my users so even if I have no time, energy or I'd like to move
to another
>From a formatting point of view, please don't use the `code` syntax for bold,
>it's painful to read.
I think it's completely misplaced to criticize dom96 for not contributing to
documentation, he took two years of his time to write an excellent book, make
sure that his examples are useful and
@jzakiya: You seem like a proponent of constructive, positive criticism so I'll
offer my own. In every conversation you have a choice to be cordial, even if
you think the other side isn't doing you the same favor. When met with
antagonism, perceived or real, you can escalate and attack back or t
@dom96 if you want people to voluntarily, out of their concern for the project,
and goodness of their own `heart`, contribute to Nim, first you need to `check
your attitude`, and learn how not to chase people away.
[https://medium.freecodecamp.org/how-to-attract-new-contributors-to-your-open-sou
> 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
@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
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
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(
@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
@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
@jzakiya, you are right that Nim documentation could be improved. Especially
theindex could be made more visible, like a link "Looking for a proc? Try
theindex" on the website or the manual. If it exists it's probably not visible
enough.
Then, Nim has 2 core devs, and no one full-time on it. At
Jzakiya, you are absolutely right when you say
> the only limits of what you can provide in documentation are self imposed
and I also agree that, in general, there is a lot of space to improve nim
documentation since there are lots of parts that are undocumented in practice
(or at least assume
Hi all, my humble 2ct to the docu topic:
it took me also 1hr to find out what a Slice is and how it`s constructed and
especially whats the difference between Slice and range (I think range is
compiler built in). One example would be very nice.
@jzakiya you can also use printf native in Nim (I p
@Udiknedormin I strongly think it should be part of the language. Developers
fear dependencies[*], so people will continue to use workarounds instead of
using string interpolation via an external dependency. Also, the Nim core
itself could benefit from it in some places ([random
example](https:
I will just quote myself again:
> At this point you need to be able to read Nim's type signatures. More
> examples for this proc would be nice indeed (!!!) but I don't see how they
> would have helped you in finding the proc in the first place.
There were some hidden questions for you, you migh
Actually, `the only limits of what you can provide in documentation are self
imposed`.
`Writing documentation is an attitude!` Either you care about doing it (to
benefit/help users) or you don't.
Nim has to compete against lots of other languages, and like cars, smartphones,
etc, having the be
> The Docs really need to get better by showing clear examples like this for
> just about everything. It took way too long for me to search and not even
> find this, and had to resort to asking how to do this here.
When I go to
[https://nim-lang.org/docs/theindex.html](https://nim-lang.org/docs
@bluenote
Correct me if I'm wrong but wasn't string interpolation ("borrowed" from Swift)
already done long time ago? Can't it stay library-provided? It's not like every
language has it in the core.
RFC:
if strutils has `toBin()`, `toHex()`, `toOctal()`, `intToStr()`
and from system.nim, the `$` operator is described as
`The stringify operator for an integer argument. Returns x converted to a
decimal string. $ is Nim's general way of spelling toString.`
why not add a helper proc to struti
Thanks a whole lot!
The Docs really need to get better by showing clear examples like this for just
about everything. It took way too long for me to search and not even find this,
and had to resort to asking how to do this here. I also agree the semantics for
doing this has to become a lot shor
import strutils
let num = 10.123456789
echo num.formatFloat(ffDecimal, 4)
let num = 10.123456789
echo( formatFloat(num) )
Could I get a little help here to make this work.
And hopefully we will soon have string interpolation in Nim
([PR](https://github.com/nim-lang/Nim/pull/6507)). Then it would be something
like this (or similar, language is still in discussion):
echo "$x%.4f"
read
[here](https://nim-lang.org/docs/strutils.html#formatFloat,float,FloatFormatMode,range\[\],Char)
I compute a floating point number `x`. How do I use `echo|write.stdout` to
output it with just 4 decimal digits showing?
34 matches
Mail list logo