Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 03 2017 15:52
    @dom96 banned @Octopoda7
  • Feb 12 2017 23:57
    @dom96 banned @zzz125
  • Dec 23 2016 19:43
    @dom96 banned @Izrab
From IRC (bridge bot)
@FromIRC
<FromDiscord_> <me2beats> doesn't nim have python-like import syntax like from X import Y?
<FromDiscord_> <me2beats> I mean my problem is this:
<FromDiscord_> <me2beats> I'm very very new to nim
<FromDiscord_> <me2beats> and I took this example
<FromDiscord_> <me2beats> And I'm here (see image)
From IRC (bridge bot)
@FromIRC
<FromDiscord_> <me2beats> I got that basic2d module is depreciated, but from this source code it's unclear for me what lines use that basic2d module
awr1
@awr1
all of the *2d is basic2d
you can install basic2d w/ nimble install basic2d
From IRC (bridge bot)
@FromIRC
<narimiran> @me2beats: read about the differences in imports between nim and python: https://narimiran.github.io/2019/07/01/nim-import.html
awr1
@awr1
and yes, you can import things with from X import Y in nim
it's kind of the opposite of what you're expected to though, read the article narimiran posted
From IRC (bridge bot)
@FromIRC
<FromDiscord_> <me2beats> yeah reading it now thanks
From IRC (bridge bot)
@FromIRC
<owl_000> how to get current working directory
<FromDiscord_> <exelotl> getCurrentDir() in os module: https://nim-lang.org/docs/os.html#getCurrentDir
<owl_000> wow thanks, it is easy as python.
<owl_000> thanks Nim, when i used python i can't share my program to my friends easily. but sharing nim program is awesomely easy.
From IRC (bridge bot)
@FromIRC
<FromDiscord_> <treeform> Just send them an .exe?
<dom96> ahh, when you spend a couple of hours trying to work around a bug in the compiler, and you finally get the program to compile only to be met by a C code gen error
From IRC (bridge bot)
@FromIRC
<shashlick> Going to work on a blog post on Nim wrapping
<Zevv> why would the 'when enabled' in assertImpl (system.nim:30) not be the first line in the template. Now loc and ploc are always defined but generate these "declared but not used" warnings for ploc`genymXXXX
<Zevv> If I move the 'when' to the top my prolem is gone
From IRC (bridge bot)
@FromIRC
<Zevv> also speeds up all my compilations by about 3%!
<Zevv> oh, 0.3% that is :⁠)
From IRC (bridge bot)
@FromIRC
<FromDiscord_> <me2beats> how to solve 'hg' not in PATH when nimble installing strfmt?
<Zevv> is 'hg' in your path?
<Zevv> if not, install mercurial
<narimiran> by using strformat from std.lib.
<Zevv> that's not the question
<narimiran> yep, that's the answer :⁠P
<Zevv> you are violating the permise "when installing strfmt"
<narimiran> i'm one step ahead on this XY problem ;⁠)
From IRC (bridge bot)
@FromIRC
<Zevv> :⁠)
From IRC (bridge bot)
@FromIRC
<FromDiscord_> <me2beats> so can I just import strformat instead of strfmt?
<FromDiscord_> <me2beats> to make that platformer work
From IRC (bridge bot)
@FromIRC
<FromDiscord_> <me2beats> I think yes because now I have "undeclared identifier 'interp'" in this line interp"${mins:02}:${secs:02}"
<luis_> Hi everyone, are you aware whether someone implemented logistic regression in Nim? Not for machine learning but for simpler inferences...
From IRC (bridge bot)
@FromIRC
<luis_> How do I type cast to float?
<luis_> say from string?
Aditya Siram
@deech
The use of when in the documentation seems to imply that fieldPairs is a compile time only construct can anyone verify if this is true? https://nim-lang.org/docs/iterators.html#fieldPairs.i%2CT
From IRC (bridge bot)
@FromIRC
<Zevv> afaik it is, it is not really an iterator, iirc it just transforms your for loop into linear code
Aditya Siram
@deech
So am I correct in assuming this is compile time reflection, as in the object's field names aren't around at runtime?
From IRC (bridge bot)
@FromIRC
<Zevv> I think that's correct
<Zevv> you won't find them as strings in the C code, for example
Aditya Siram
@deech
Ok good, thanks!
From IRC (bridge bot)
@FromIRC
<FromDiscord_> <me2beats> well I made the platformer example run (yay) but still can't get what's wrong in ths line: interp"${mins:02}:${secs:02}"
<FromDiscord_> <me2beats> undeclared identifier 'interp
Varriount
@Varriount
Hello fellow Nimsters! How are things going?