Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Apr 04 12:26
    @dom96 banned @acroobat
  • Mar 03 2017 15:52
    @dom96 banned @Octopoda7
  • Feb 12 2017 23:57
    @dom96 banned @zzz125
  • Dec 23 2016 19:43
    @dom96 banned @Izrab
Thanks again. :smiley:
Another my stupid question. How to convert a int to Port? or how to convert a string to Port?
From IRC (bridge bot)
<FromDiscord> <ElegantBeef> int to port is just the Port(int) or int.Port
<FromDiscord> <ElegantBeef> string requires you to parseint from strutils

<FromDiscord> <ElegantBeef> int to port is just the Port(int) or int.Port

Thank you very much.

From IRC (bridge bot)
<bung> await request.client.recvInto(request.buf[0].addr, maxLine,flags = {}) stucked but recvLine works on macos, any idea ?
Aditya Siram
Why does calling varargsLen in a proc always 1 but in a template it returns the right number of varargs?
Boy that was a train wreck, let me try again:
Why does calling varargsLen in a proc always return 1 but in a template it returns the right number of varargs? eg. https://play.nim-lang.org/#ix=2F3a
From IRC (bridge bot)
<FromDiscord> <ElegantBeef> I have no idea why, but you can just use .len in a proc
<FromDiscord> <ElegantBeef> Actually it's a macro so that's probably the reason 😄
<FromDiscord> <iWonderAboutTuatara> I noticed this earlier
<FromDiscord> <iWonderAboutTuatara> probably a bug
<FromDiscord> <iWonderAboutTuatara> oh mayeb
<FromDiscord> <iWonderAboutTuatara> probably
<FromDiscord> <iWonderAboutTuatara> if it's a proc just use .len I think
<FromDiscord> <iWonderAboutTuatara> yeah beef is right
Aditya Siram
That makes sense. Thanks! Should probably be part of varargsLen docs.
Or better yet a warning if used in a proc that way, it's almost certainly not what was intended.
From IRC (bridge bot)
<FromDiscord> <ElegantBeef> Weirdly it's just len
From IRC (bridge bot)
<FromDiscord> <Elizabeth Afton> I have, could you please describe the error?
<FromDiscord> <Elizabeth Afton> If you're using the files generated from https://github.com/Guevara-chan/Raylib-Forever, id on't know why it doesn't work even after i tried many things
<FromDiscord> <Elizabeth Afton> But then i found https://github.com/tomc1998/nim-raylib which uses a few of those files and has some extra utilities and it works fine for me with no issues
<FromDiscord> <Elizabeth Afton> Hope that helps!
From IRC (bridge bot)
<FromDiscord> <iWonderAboutTuatara> I'll eb sure to take a look into that! thanks
<FromDiscord> <Elizabeth Afton> No worries!
<FromDiscord> <iWonderAboutTuatara> It seems slightly out of date
<FromDiscord> <iWonderAboutTuatara> A month or so
<FromDiscord> <iWonderAboutTuatara> shouldn't be a hueg problem, but idk
<FromDiscord> <Elizabeth Afton> Yeah, but it works fine
<FromDiscord> <iWonderAboutTuatara> I tried wrapping it myself using c2nim, but got the weirdest of errors
<FromDiscord> <iWonderAboutTuatara> /mnt/d/Scripts/Misc/Nim/Nim/raylib-nim/raylib/src/raylib.h(99, 1) Error: did not expect #
<FromDiscord> <Elizabeth Afton> I used it a few weeks ago and i tested out the examples (i rewritten them into Nim code but eh)
<FromDiscord> <Elizabeth Afton> Hm
<FromDiscord> <iWonderAboutTuatara> If I can get it to work, I think I will try using nimterop
<FromDiscord> <Elizabeth Afton> I'm not an expert at that type of stuff but maybe Nimterop would be better?
<FromDiscord> <Elizabeth Afton> Oki!
<FromDiscord> <iWonderAboutTuatara> I tried using the toast tool
<FromDiscord> <iWonderAboutTuatara> which is commandline for nimterop I think
<FromDiscord> <iWonderAboutTuatara> but it doesn't seemt o want to actually convert the code
<FromDiscord> <Elizabeth Afton> Hm
<FromDiscord> <iWonderAboutTuatara> It just gives me the first x lines of the acualy raylib.h file
<FromDiscord> <iWonderAboutTuatara> toast raylib.h -p -o=raylib.nim --check
<FromDiscord> <iWonderAboutTuatara> is the ammand I used
<FromDiscord> <iWonderAboutTuatara> command
From IRC (bridge bot)
<FromDiscord> <Elizabeth Afton> There should be an alternative wrapper you can use which is better, but idk
<FromDiscord> <iWonderAboutTuatara> I couldn't find any
<FromDiscord> <Elizabeth Afton> Hm
<FromDiscord> <iWonderAboutTuatara> Worst case I use the one you sent, which is completely ok
<FromDiscord> <iWonderAboutTuatara> latest release I think was aug 1