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
<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?
Vindaar
@Vindaar
@me2beats the problem is that while the functionality of strfmt is basically the same as strformat from the stdlib, the naming is not. See the docs here: https://nim-lang.github.io/Nim/strformat.html
so replace interp by fmt or &
From IRC (bridge bot)
@FromIRC
<FromDiscord_> <me2beats> seems to work, cool! thank you
From IRC (bridge bot)
@FromIRC
<FromDiscord_> <DeltaPHC> Within pure Nim code, assuming you don't use ptr nor compile with checks disabled, is it still possible to trigger undefined behavior?
<FromDiscord_> <DeltaPHC> I know there have been recent efforts to make things safer, so I'm kinda wondering where things are at
<FromDiscord_> <DeltaPHC> I'm thinking that threading can still throw a wrench in things, but let's ignore that for a sec :⁠P
From IRC (bridge bot)
@FromIRC
<shashlick> Not bad - 1250 words in 3 hours
<Zevv> you're a slow reader!
<xace> shashlick: do you have a link to your blog or do I have to wait until the article is completed?
From IRC (bridge bot)
@FromIRC
<shashlick> First draft really
<shashlick> I will post it after some time for review
<shashlick> Hope to get it on the nim lang blog, let's see
Mamy Ratsimbazafy
@mratsim
@deech you can use astToStr if you need the field names
From IRC (bridge bot)
@FromIRC
<FromDiscord_> <me2beats> let me clarify pls - is this the official Nim discord server?
<FromDiscord_> <Shield> Yes
<FromDiscord_> <me2beats> thanks
liuxiaodong
@gogolxdong
koch --latest nimble also works for my issue , thanks.
From IRC (bridge bot)
@FromIRC
<shashlick> What are you seeing
Aditya Siram
@deech
IIUC method is a runtime dispatch construct so some type information must be kept around at runtime, is there any documentation that specifies what and when that happens?
liuxiaodong
@gogolxdong
the error has gone.
Vindaar
@Vindaar
@deech the only place I'm aware of that mentions RTTI at all is the typeinfo module: https://nim-lang.github.io/Nim/typeinfo.html
I'm off to bed now. Good night :)