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> <treeform> but its to foreign looking
<FromDiscord> <treeform> pixie is a real word and sounds like its ends on a y
<FromDiscord> <treeform> so we went with a real word
<FromDiscord> <ElegantBeef> I forgive you
<FromDiscord> <treeform> thanks, means a lot.
<FromDiscord> <ElegantBeef> Well i did respect you, but now you lie to my face
<disruptek> get used to it.
From IRC (bridge bot)
@FromIRC
<FromDiscord> <treeform> @ElegantBeef I am not laying to you, just playing along, cheer up!
<FromDiscord> <ElegantBeef> I was also joking around
<disruptek> not me.
From IRC (bridge bot)
@FromIRC
<planetis[m]> disruptek: whats genSym artifacts and how do i catch em?
<planetis[m]> Oops wrong choice of words, this can go south
From IRC (bridge bot)
@FromIRC
<disruptek> a symbol created with genSym needs to be rendered as ident(repr sym) in order to capture the unique name correctly.
From IRC (bridge bot)
@FromIRC
<planetis[m]> ok thanks will try that
From IRC (bridge bot)
@FromIRC
<FromDiscord> <iWonderAboutTuatara> Has anybody tried using raylib forever?
<FromDiscord> <iWonderAboutTuatara> For me, the raylib.nim file has errors
<FromDiscord> <iWonderAboutTuatara> and so I can't use it
<FromDiscord> <ElegantBeef> What are the errors?
From IRC (bridge bot)
@FromIRC
<FromDiscord> <iWonderAboutTuatara> I don't know
<FromDiscord> <iWonderAboutTuatara> how do I tell
<FromDiscord> <ElegantBeef> Compile it
咚咔
@cupen
Hello guys. I'm experiencing a little problem.
Here is my code.
import redis
import uri
import strutils

proc main(url: string): void =
  var u = uri.parseUri(url)
  var client =  redis.open(host=u.hostname, port=parseInt(u.port))
  client.setk("nim_redis:test", "Hello, World")
  let value = client.get("nim_redis:test")
  assert(value == "Hello, World")
  return

when isMainModule:
  main("redis://127.0.0.1:6380/0")
So, what is 6379.Port ?
proc open*(host = "localhost", port = 6379.Port): Redis =
From IRC (bridge bot)
@FromIRC
<FromDiscord> <ElegantBeef> Port is a distinct uint16, so that's converting 6379 to Port
咚咔
@cupen

<FromDiscord> <ElegantBeef> Port is a distinct uint16, so that's converting 6379 to Port

Thanks, where is the Port 's define?

From IRC (bridge bot)
@FromIRC
咚咔
@cupen
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)
@FromIRC
<FromDiscord> <ElegantBeef> int to port is just the Port(int) or int.Port
<FromDiscord> <ElegantBeef> string requires you to parseint from strutils
咚咔
@cupen

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

Thank you very much.

From IRC (bridge bot)
@FromIRC
<bung> await request.client.recvInto(request.buf[0].addr, maxLine,flags = {}) stucked but recvLine works on macos, any idea ?
Aditya Siram
@deech
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)
@FromIRC
<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
@deech
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)
@FromIRC
<FromDiscord> <ElegantBeef> Weirdly it's just len
From IRC (bridge bot)
@FromIRC
<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