<< 06-10-2019 >>

00:00:04*junland quit (Quit: %ZNC Disconnected%)
00:00:47*junland joined #nim
00:37:37FromDiscord<jejPony> how do i use "downloadFile"?
00:37:42FromDiscord<jejPony> I want to try downloading a file
00:37:50FromDiscord<jejPony> but the documentation is confusing me
00:40:51FromGitter<OdinTech3> What are some cool projects people have built with Nim. Maybe it's my lack of creativity but i find it hard to think about what i can build with Nim
00:42:23FromDiscord<juan_carlos> `client.downloadFile(url = "http://foo.io/file", filename = "/tmp/bar.ext")`
00:42:38FromDiscord<jejPony> ok, thanks
00:42:42FromDiscord<jejPony> let me try it
00:43:32FromDiscord<juan_carlos> From `macro` is there a way to know if a name is a stropping?. Ot its meant to be transparent.
00:43:33FromDiscord<jejPony>
00:43:33FromDiscord<jejPony> https://cdn.discordapp.com/attachments/371759389889003532/630203448603836426/unknown.png
00:44:18disruptekno, you kinda have to look at keywords.txt from the compiler.
00:44:49FromDiscord<juan_carlos> Make a client, like `let client = newHttpClient()`
00:44:56FromDiscord<juan_carlos> Then use the `client`
00:45:06FromDiscord<jejPony> ok
00:49:24FromDiscord<jejPony> I feel dumb
00:49:24FromDiscord<jejPony> https://cdn.discordapp.com/attachments/371759389889003532/630204927402180618/unknown.png
00:53:42FromDiscord<exelotl> @jejPony you need to import the httpclient module
00:54:06FromDiscord<jejPony> ok
00:56:25FromDiscord<juan_carlos> My url and filename are fake BTW you must provide a real ones.
00:57:36FromDiscord<jejPony> ok
00:58:33FromDiscord<jejPony>
00:58:33FromDiscord<jejPony> https://cdn.discordapp.com/attachments/371759389889003532/630207224127684608/unknown.png
01:01:03FromDiscord<juan_carlos> `import httpclient`
01:01:18FromDiscord<juan_carlos> Imports here are not function call like JS/TS.
01:01:28FromDiscord<jejPony>
01:01:28FromDiscord<jejPony> https://cdn.discordapp.com/attachments/371759389889003532/630207962924711947/unknown.png
01:01:37FromDiscord<jejPony> i tried this before and it resulted in the same error
01:03:48FromDiscord<juan_carlos> Save it, run it. Pastebin better than photos probably.
01:04:34FromDiscord<juan_carlos> Maybe making the Tutorial first can save you time in the long run.
01:06:00FromDiscord<exelotl> can confirm that code works for me
01:20:57*Jjp137 joined #nim
01:24:46*Hideki_ joined #nim
01:31:51*laaron joined #nim
01:51:45*sealmove joined #nim
01:53:16FromDiscord<jejPony> Forgot to save it, thank you.
01:53:29FromDiscord<jejPony> I keep forgetting I have to save it for it to update.
01:59:53*sealmove quit (Ping timeout: 245 seconds)
02:02:07*sealmove joined #nim
02:07:50*gangstacat quit (Quit: ฤœis!)
02:24:13*laaron quit (Remote host closed the connection)
02:25:10*laaron joined #nim
02:28:29*laaron quit (Remote host closed the connection)
02:31:14*Hideki_ quit (Remote host closed the connection)
02:32:10*Hideki_ joined #nim
02:32:48*laaron joined #nim
02:36:26*Hideki_ quit (Ping timeout: 240 seconds)
02:41:59*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
02:42:16*laaron joined #nim
02:46:32*theelous3 joined #nim
02:52:30*Hideki_ joined #nim
02:53:09*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
02:53:36*laaron joined #nim
02:53:48*Hideki_ quit (Remote host closed the connection)
02:55:13*Hideki_ joined #nim
03:06:16*lritter quit (Ping timeout: 240 seconds)
03:07:08*lritter joined #nim
03:07:53*Hideki_ quit (Remote host closed the connection)
03:08:36*laaron quit (Remote host closed the connection)
03:09:10*laaron joined #nim
03:14:30*Hideki_ joined #nim
03:17:56*laaron quit (Remote host closed the connection)
03:19:44*Hideki_ quit (Ping timeout: 276 seconds)
03:25:30*Hideki_ joined #nim
03:30:37FromDiscord<jejPony> https://pastebin.com/bVPKEPtE
03:30:38FromDiscord<jejPony> https://cdn.discordapp.com/attachments/371759389889003532/630245502666932264/unknown.png
03:32:46FromDiscord<juan_carlos> Add `-d:ssl` to compile command.
03:33:53FromDiscord<jejPony> I did that
03:33:57FromDiscord<jejPony> and it did compile
03:34:12FromDiscord<jejPony> but the program downloads this
03:34:12FromDiscord<jejPony> https://cdn.discordapp.com/attachments/371759389889003532/630246404618715166/test.html
03:42:20*laaron joined #nim
03:46:38*chemist69 quit (Ping timeout: 246 seconds)
03:48:42*chemist69 joined #nim
04:08:43*dddddd quit (Remote host closed the connection)
04:12:17*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
04:13:38*laaron joined #nim
04:30:56*nsf joined #nim
04:35:38*theelous3 quit (Ping timeout: 240 seconds)
04:44:52*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
04:45:45*laaron joined #nim
04:47:37*Hideki_ quit (Remote host closed the connection)
04:48:58*Hideki_ joined #nim
04:52:01*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
04:52:15*Hideki_ quit (Remote host closed the connection)
04:52:31*Hideki_ joined #nim
04:52:40*laaron joined #nim
05:05:02*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
05:05:40*laaron joined #nim
05:10:04*radsoc joined #nim
05:12:37*laaron quit (Remote host closed the connection)
05:29:14*laaron joined #nim
05:31:30*laaron quit (Client Quit)
05:32:38*laaron joined #nim
05:37:00*laaron quit (Client Quit)
05:37:28*laaron joined #nim
05:52:15*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
05:53:29*laaron joined #nim
05:58:45*laaron quit (Remote host closed the connection)
06:09:00*Hideki_ quit (Remote host closed the connection)
06:09:41*Hideki_ joined #nim
06:13:36*solitudesf joined #nim
06:14:30*Hideki_ quit (Ping timeout: 268 seconds)
06:27:20*solitudesf quit (Ping timeout: 265 seconds)
06:28:11*Hideki_ joined #nim
06:29:30*Hideki_ quit (Remote host closed the connection)
06:30:15*Hideki_ joined #nim
06:32:58*odinfinch quit (Quit: The Lounge - https://thelounge.chat)
06:34:26*Hideki_ quit (Ping timeout: 240 seconds)
06:37:51*Hideki_ joined #nim
06:38:15*solitudesf joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:02:02*actuallybatman quit (Ping timeout: 276 seconds)
07:03:48*gangstacat joined #nim
07:04:51*gmpreussner joined #nim
07:08:41*radsoc quit (Quit: radsoc)
08:06:23*Vladar joined #nim
08:09:40*SodaScripter joined #nim
08:11:14*solitudesf quit (Ping timeout: 240 seconds)
08:15:58*SodaScripter left #nim ("Leaving")
08:17:16*Jjp137 quit (Read error: Connection reset by peer)
08:19:16*Senketsu joined #nim
08:21:32*Jjp137 joined #nim
08:31:17*SodaScripter joined #nim
08:35:45*asymptotically joined #nim
08:38:10*SodaScripter quit (Remote host closed the connection)
08:38:11*lritter quit (Ping timeout: 268 seconds)
08:49:16*Senketsu quit (Quit: WeeChat 2.5)
09:09:36*sealmove quit (Quit: WeeChat 2.6)
09:09:54*sealmove joined #nim
09:21:20*radsoc joined #nim
09:23:06*Vladar quit (Remote host closed the connection)
09:26:41FromGitter<nickdex> So a really basic question how do you read integer in nim/nimscript. I thought it would work like python - read string (or TaintedString in this case) then convert it (int() or toInt())
09:38:36sealmovesure you can do that
09:38:52sealmovethere is parseInt()
09:39:47FromDiscord<juan_carlos> parseInt(), theres lots of parse* stuff they named similar.
09:40:04sealmoveor you can read directly using streams
09:40:23*sealmove quit (Quit: WeeChat 2.6)
09:40:42FromGitter<nickdex> ahh... okay, i was looking along python style int(), str() etc thanks :)
09:41:08FromGitter<nickdex> ๐Ÿ‘ will look for streams way too
09:43:02FromGitter<nickdex> surprisingly parse<type> style didn't work on stdin.readLine
09:45:05FromDiscord<juan_carlos> `rdstdin.readLineFromStdin("wat?").normalize.parseInt`
09:45:18FromDiscord<juan_carlos> Or somethin' like that.
09:47:59*radsoc quit (Quit: radsoc)
09:50:20FromGitter<nickdex> thanks juan, that seems to be working. For streams I found more strange behavior, created a `newFileStream(stdin)` then when I tried to readInt<byte> and tried to echo it, echoed some very different values
10:03:04*clyybber joined #nim
10:56:03*Hideki_ quit (Remote host closed the connection)
11:05:04*fanta1 joined #nim
11:13:10*Hideki_ joined #nim
11:17:07*Hideki_ quit (Remote host closed the connection)
11:17:23*Hideki_ joined #nim
11:19:48clyybberAraq: Are you there?
11:23:28*shomodj joined #nim
11:54:07*ronny quit (Write error: Connection reset by peer)
11:54:08*nc-x[m] quit (Read error: Connection reset by peer)
11:54:09*narimiran[m] quit (Read error: Connection reset by peer)
11:54:13*spymasterd[m] quit (Read error: Connection reset by peer)
11:54:13*xomachine[m] quit (Read error: Connection reset by peer)
11:54:16*Demos[m] quit (Read error: Connection reset by peer)
11:54:16*GitterIntegratio quit (Read error: Connection reset by peer)
11:54:21*planetis[m] quit (Read error: Connection reset by peer)
11:54:22*muxueqz[m] quit (Read error: Connection reset by peer)
11:54:22*skrylar[m] quit (Read error: Connection reset by peer)
11:54:22*ee7[m] quit (Read error: Connection reset by peer)
11:54:22*Connor[m] quit (Read error: Connection reset by peer)
11:54:22*macsek1911[m] quit (Read error: Connection reset by peer)
11:54:31*nergal[m] quit (Read error: Connection reset by peer)
11:54:32*Miguelngel[m] quit (Read error: Connection reset by peer)
11:54:32*encryptize[m] quit (Read error: Connection reset by peer)
11:54:33*yglukhov[m] quit (Read error: Connection reset by peer)
11:54:34*swisscowbell[m] quit (Remote host closed the connection)
11:54:34*zielmicha[m]1 quit (Remote host closed the connection)
11:54:35*testgovno[m] quit (Read error: Connection reset by peer)
11:54:36*Kameleon quit (Read error: Connection reset by peer)
11:54:38*lqdev[m] quit (Read error: Connection reset by peer)
11:54:38*TheManiac[m] quit (Read error: Connection reset by peer)
11:54:38*LEdoian[m] quit (Read error: Connection reset by peer)
11:54:40*pigmej quit (Read error: Connection reset by peer)
11:54:41*leorize[m] quit (Remote host closed the connection)
11:54:43*meff[m] quit (Remote host closed the connection)
11:54:44*isaac[m]1 quit (Remote host closed the connection)
11:54:45*k0mpjut0r quit (Write error: Connection reset by peer)
11:54:46*jaens[m] quit (Remote host closed the connection)
11:54:46*MrAxilus quit (Read error: Connection reset by peer)
11:54:46*BitPuffin quit (Read error: Connection reset by peer)
11:54:46*gh0st[m] quit (Read error: Connection reset by peer)
11:59:56clyybberbb matrix
12:02:38*Connor[m] joined #nim
12:08:34*sealmove joined #nim
12:11:47FromDiscord<Rika> can i do structural typing in nim?
12:14:24clyybberConcepts are akin to that
12:15:23clyybberAnd tuples can be considered structural typing
12:15:49clyybberor rather, anonymous tuples
12:17:59FromDiscord<Rika> do concepts have docu? search doesnt yield much, find in manual neither
12:19:10clyybberits in the experimental manual https://nim-lang.github.io/Nim/manual_experimental.html
12:19:54clyybberBe aware that this 'of' syntax in concept refinement is not yet implemented
12:19:57FromDiscord<Rika> is it in stable or do i have to add a compiler flag
12:24:11clyybberIts in stable
12:26:09*Demos[m] joined #nim
12:26:09*k0mpjut0r joined #nim
12:26:09*BitPuffin joined #nim
12:26:09*LEdoian[m] joined #nim
12:26:09*GitterIntegratio joined #nim
12:26:10*planetis[m] joined #nim
12:26:10*leorize[m] joined #nim
12:26:10*gh0st[m] joined #nim
12:26:10*nergal[m] joined #nim
12:26:10*jaens[m] joined #nim
12:26:10*lqdev[m] joined #nim
12:26:11*isaac[m]1 joined #nim
12:26:11*pigmej joined #nim
12:26:11*MrAxilus joined #nim
12:26:11*ronny joined #nim
12:26:12*swisscowbell[m] joined #nim
12:26:14FromDiscord<Rika> so everything EXCEPT the concept refinement section is good to use?
12:26:16*spymasterd[m] joined #nim
12:26:16*TheManiac[m] joined #nim
12:26:16*encryptize[m] joined #nim
12:26:16*ee7[m] joined #nim
12:26:17*skrylar[m] joined #nim
12:26:17*macsek1911[m] joined #nim
12:26:17*muxueqz[m] joined #nim
12:26:17*meff[m] joined #nim
12:26:17*nc-x[m] joined #nim
12:26:17*narimiran[m] joined #nim
12:26:18*Kameleon joined #nim
12:26:18*testgovno[m] joined #nim
12:26:18*Miguelngel[m] joined #nim
12:26:18*yglukhov[m] joined #nim
12:26:18*xomachine[m] joined #nim
12:26:19*zielmicha[m]1 joined #nim
12:28:18clyybberRika: Should be. Well it *is* experimental, but yeah. Just go ahead
12:29:01FromGitter<gogolxdong> Which is the document describing async and await?
12:37:50Zevvhttps://nim-lang.org/docs/asyncdispatch.html?
12:52:05*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzzโ€ฆ)
12:56:05FromGitter<gogolxdong> exactly, thanks!
12:57:51lqdev[m]TIL this syntax `for i, (n, f) in fields:` is supported
13:03:06FromDiscord<Rika> what.
13:03:17FromDiscord<Rika> ty for share
13:15:14*Tyresc joined #nim
13:23:55*Trustable joined #nim
13:24:13*dddddd joined #nim
13:29:25*Kameleon_ joined #nim
13:29:38FromDiscord<kodkuce> how to trow/raise Exception whitout try ?
13:30:59*Kameleon_ left #nim (#nim)
13:31:40FromDiscord<kodkuce> something like if x<10 rise Exception
13:32:03lqdev[m]@Rika this does tuple unpacking, by the way
13:32:27lqdev[m]I ended up not using this since I need to iterate my seq backwards, but it was intriguing to learn anyways
13:33:34*Kameleon_ joined #nim
13:33:47*nsf quit (Quit: WeeChat 2.5)
13:34:47*Kameleon left #nim ("User left")
13:37:43*Kameleon_ quit (Client Quit)
13:41:21FromDiscord<Rika> yeah which was what i thought you mean
13:42:20*Kameleon joined #nim
13:43:44*Hideki_ quit (Remote host closed the connection)
13:52:10FromGitter<ZeeQyu> Hi! I'm trying to understand how nimsuggest works, but I can only find documentation on how to use a subset of the commands displayed in the usage displayed after you start the --stdin mode. Is the rest of the commands described somewhere? (dus, chk, mod, highlight, outline,known)
13:56:32FromGitter<nickdex> Any idea why an empty set (hashset from sets module) when intersects (using *) with another non-empty set gives non-empty set as result?
13:57:11FromGitter<nickdex> Pretty sure it should be empty set
14:01:11FromDiscord<Rika> can you send a play link or whatever its called
14:01:29FromDiscord<Rika> https://play.nim-lang.org/#ix=1XMN is {} and {}
14:01:40FromDiscord<Rika> oh hashset
14:01:45FromDiscord<Rika> let me check that
14:03:05FromDiscord<Rika> https://play.nim-lang.org/#ix=1XMP still {} and {}
14:03:29FromGitter<nickdex> yeah, I am trying to build an example in play ground. The thing is my original code uses stdin for reading bunch of input
14:03:48FromGitter<nickdex> and repl supports inputs, but has old version of nim
14:04:34FromDiscord<Rika> yeah... 0.17... very old
14:05:25FromDiscord<Rika> ideone has 0.19
14:08:04FromGitter<nickdex> (https://files.gitter.im/nim-lang/Nim/UmJW/rsz_archlabs-03-3840x1080.png)
14:08:13FromGitter<nickdex> Here's the screenshot of input/output
14:08:42FromGitter<nickdex> https://play.nim-lang.org/#ix=1XMS
14:08:48FromGitter<nickdex> code for reading
14:11:10FromGitter<nickdex> I think toHashSet is 0.19+ feature, ideone didn't recognize it
14:11:35FromGitter<nickdex> AUR is also outdated so Im using docker for v1
14:14:30FromGitter<nickdex> hmm, very weird on Nim playground it seems to be working fine
14:14:35leorize@ZeeQyu you need to ask someone that's knowledgable about it
14:14:49leorizeI happen to be one of them if you need any help :P
14:15:16*dv^_^ joined #nim
14:16:07FromGitter<nickdex> ok nvmind, found my mistake
14:16:31FromGitter<nickdex> now I have search how assign a nil value to var variable, if thats possible
14:17:22FromDiscord<Rika> has to be nillable i think
14:18:08FromGitter<ZeeQyu> <leorize> I'd love to. I'm not above writing it down and creating a pull request for nimsuggest, too, to solve this more permanently.
14:18:13lqdev[m]nickdex: the type of that variable has to be `ref` or `ptr`, otherwise it's impossible
14:18:40FromGitter<ZeeQyu> For starters, what does mod, dus and known do? The rest, I have a clue about.
14:18:49FromGitter<ZeeQyu> But I have no idea about those three
14:19:28FromGitter<nickdex> oh okay, so what do you guys if you checking for null/undefined condition, I mean you just declared a variable and want to assign first value or do some other thing otherwise
14:20:59leorizeZeeQyu: `dus` is what `use` is nowadays
14:21:28leorize`mod` and `known` are debugging artifacts
14:21:39leorize`known` let you know if a file is in the modulegraph
14:22:21leorizenot sure what `mod` do though, it never returns anything from my testing
14:22:30FromGitter<ZeeQyu> so dus = display usages?
14:22:44FromDiscord<Chiqqum_Ngbata> `const m__thing = 10` -> `Error: invalid token: trailing underscore`
14:22:46FromDiscord<Chiqqum_Ngbata> Why is this
14:23:07FromGitter<ZeeQyu> And do you mean use is broken/deprecated? Why's there a new one?
14:23:41*Vladar joined #nim
14:25:03*whaletechno quit (Remote host closed the connection)
14:25:25*whaletechno joined #nim
14:27:58FromDiscord<jejPony> I am having trouble figuring out how to use the information I am getting from the documentation. I don't know the proper way to use it. In this instance, I'm confused as to how to use HttpCode from httpcore.
14:29:19FromDiscord<Rika> what're you tryin to do?
14:29:25FromDiscord<juan_carlos> You need practice basically you mean(?) :P
14:30:40FromDiscord<jejPony> I'm trying to get the HttpCode of a page, before I try to download it, to make sure it's valid.
14:31:45FromDiscord<Rika> uh you have to load the page to get a code technically
14:31:57FromDiscord<Rika> so basically you're trying to pause the download
14:32:04FromDiscord<jejPony> Yeah
14:32:09FromDiscord<Rika> maybe try sending a HEAD request instead actually
14:32:17FromDiscord<juan_carlos> You usually do something like `requestObject.code == Http200` (Pseudocode)
14:33:23FromDiscord<juan_carlos> But yeah you have to download the thing to get the code of the thing.
14:33:26FromGitter<ZeeQyu> Furthermore, from what I've understood, con is invocation context, which should be used in the cases of โŽ let world = "world!" โŽ discard hello.add( โŽ Where you'd give the position of the parenthesis to be suggested to use the world variable. However, it doesn't seem to do what I expect. Is my understanding correct? How is it intended to be used? [https://gitter.im/nim-lang/Nim?at=5d99fb360e67130aae250270]
14:35:05FromDiscord<Rika> try smth like this maybe? disclaimer i'm pretty much a noob too
14:35:05FromDiscord<Rika> `client.request(url, HttpHead)`
14:35:23FromDiscord<Rika> im not sure if the codes returned by HEAD requests are the same when you GET the page
14:36:57FromDiscord<Rika> i tried it out, i think theyre equal
14:37:00FromDiscord<Chiqqum_Ngbata> Should be, in practice. Seems like you'll probably just want to return some error if status code is not 200, otherwise proceed with response body as normal. Taking a guess
14:37:05FromDiscord<Rika> but i think it's also dependent on the server
14:37:32FromDiscord<Rika> ah if you're gonna use the data on 200 then better just directly do the GET request
14:37:38FromDiscord<Chiqqum_Ngbata> HEAD should respect status codes but of course these things are at the discretion of whomever wrote the server
14:37:47FromDiscord<Rika> ehem
14:37:48FromDiscord<jejPony> I'm actually trying to look for a 302
14:38:03FromDiscord<Rika> 302 is nothing changed right
14:38:04FromDiscord<jejPony> Because of the thing im trying to download
14:38:12FromDiscord<jejPony> 302 is redirect, I thought
14:38:24*whaletechno quit (Ping timeout: 265 seconds)
14:38:26FromDiscord<Rika> ah no that's 304 i thoughto f'
14:40:02FromDiscord<Chiqqum_Ngbata> You just want to GET, check if status code == 302, loop w/ URL pointed to by Location header, or something like this
14:43:39FromDiscord<Rika> not safe to rely on a maybe (this case being "maybe HEAD request code == GET request code") so yeah
14:45:29*shomodj joined #nim
14:45:59*shomodj quit (Client Quit)
14:47:35*fanta1 quit (Quit: fanta1)
14:50:35FromDiscord<kodkuce> hmm can i pass string as ref whitout having to wrap it in some new type?
14:53:16FromDiscord<jejPony> this isnt working so far
14:53:16FromDiscord<jejPony> https://cdn.discordapp.com/attachments/371759389889003532/630417292282429445/unknown.png
14:53:57FromDiscord<Rika> change `url2 string` to `url2: string`
14:54:13FromDiscord<jejPony> ok
14:54:16*actuallybatman joined #nim
14:54:28FromDiscord<Rika> i think you need to learn the basic syntax first before going here
14:54:48FromDiscord<jejPony> ok
14:55:25FromDiscord<kodkuce> how to pass a pointer to string, or ref or whater if i can ?
14:55:56FromDiscord<Rika> what
14:59:36*nsf joined #nim
14:59:55FromDiscord<kodkuce> proc changeinputedstring( inputedstring: string):
14:59:55FromDiscord<kodkuce> inputedstring = "somechange"
14:59:56FromDiscord<kodkuce>
14:59:56FromDiscord<kodkuce> var
14:59:56FromDiscord<kodkuce> mystring:string = "vanila"
14:59:56FromDiscord<kodkuce>
14:59:56FromDiscord<kodkuce> changeinputedstring(mystring)
14:59:58FromDiscord<kodkuce>
15:00:00FromDiscord<kodkuce> echo mystring << SHOULD BE "somechange" and not vanila , i want proc changeinputedstring() to change oreginal var
15:00:23FromDiscord<kodkuce> and no i dont want to do
15:00:23FromDiscord<kodkuce> mystring = changeinputedstring( mystring)
15:00:48FromDiscord<kodkuce> i want changeinputedstring( TOPASSREFERECE, AKA POINTER)
15:02:11FromGitter<ZeeQyu> @kodkuce I think you're looking for proc changeinputedstring(inputedstring: var string)
15:03:59FromDiscord<kodkuce> default is passing by value, and i want by ref
15:04:09FromDiscord<Rika> this is making the parameter mutable
15:04:11FromDiscord<Rika> which is what you want
15:04:13FromGitter<ZeeQyu> notice the var keyword
15:04:32FromDiscord<Rika> inputedstring: var string
15:04:32FromDiscord<Rika> instead of
15:04:32FromDiscord<Rika> inputedstring: string
15:04:34FromDiscord<kodkuce> i think var just passes it by value but as variable
15:04:42FromDiscord<Rika> and? it does what you want afaik
15:04:45FromDiscord<kodkuce> will try but i dont hink it wokrs
15:04:58FromDiscord<Rika> try it
15:06:58FromDiscord<kodkuce> ok it works sorry my bad,
15:07:05FromDiscord<jejPony> this is driving me insane, i think im gonna stop
15:07:49FromDiscord<Rika> jejPony: take it slow; dont force info into your head
15:08:00FromDiscord<Rika> if you dont get it, drop it for the moment and do something else
15:08:12FromDiscord<Rika> try again at another time, when you feel like it
15:09:02FromDiscord<kodkuce> whats driving you insane?
15:10:29FromDiscord<Rika> think it was trying to figure out how to do what he was trying to code
15:10:37FromDiscord<Rika> but that is just an assumptuion
15:11:08FromGitter<nickdex> can someone send link for discord room
15:11:43FromGitter<nickdex> nvmind got it :)
15:17:09FromDiscord<Rika> ๐Ÿ‘€
15:18:15FromDiscord<badassiel> @jejPony might be better to start with simpler stuff, thats what I'm doing ๐Ÿ™‚ sources - opengenus/cosmos (github), hackerrank, codechef etc
15:18:56FromDiscord<Rika> are you nickdex or
15:21:14*fanta1 joined #nim
15:22:46FromDiscord<kodkuce> i already did whole poker logic in nim, but i find doining exercism quests realy nice for learning up
15:27:33FromDiscord<Kiloneie> If any of you new names are a beginner, you might find my videos on Nim useful.
15:27:40*al_ joined #nim
15:27:46FromDiscord<badassiel> @Rika yeah, this is my gamer profile
15:28:22FromDiscord<Rika> i'm not that beginner; im just here trying to store objects like this one python library did
15:28:33FromDiscord<Kiloneie> not talking about you
15:28:38FromDiscord<Rika> ;w;
15:28:40FromDiscord<Rika> okay
15:28:56FromDiscord<Rika> ***oof***
15:36:23FromDiscord<badassiel> @kodkuce thanks for recommending exercism, looks good for levelling up
15:38:50FromDiscord<Rika> so i have an issue; i need to make an object that contains any one of four types in one of its fields BUT i cannot have a generic because the object itself should be able to be put in a seq with other objects (containing a seq of different types)
15:39:01FromDiscord<kodkuce> @badassiel when you do some , and publish be sure to check some other people solutions you see a lot of ways to simplefay stuff sometimes or opposite ๐Ÿ™‚
15:39:29FromDiscord<Rika> wasnt an issue in python ofc but i cant think of an elegant solution to this other than making a tuple inside and just making a function that gets the right seq in that tuple
15:39:39FromDiscord<Kiloneie> Maybe use a Tuple ?
15:39:40FromDiscord<Kiloneie> idk
15:39:58FromDiscord<Kiloneie> oh wait.
15:40:07FromDiscord<Rika> ?
15:40:16FromDiscord<kodkuce> did you post this on reddit too?
15:40:21FromDiscord<Rika> nope not yet
15:40:25FromDiscord<Rika> only got to this issue now
15:40:31FromDiscord<kodkuce> i think i saw somone writing about it
15:40:39FromDiscord<kodkuce> or meybe i worng
15:40:51FromDiscord<Rika> if you look at my profile right now, i'm making a curve object with "curve segments" in a seq
15:41:12FromDiscord<Rika> curves can be bezier, linear, or etc but they dont mix inside the curve object
15:41:26FromDiscord<kodkuce> https://www.reddit.com/r/nim/comments/dbre8v/storing_type_in_seq/ i thinked this but i was wrong
15:41:31FromDiscord<kodkuce> i thinkk xD
15:41:35FromDiscord<Rika> ill look into it
15:42:57FromDiscord<Rika> er ill just try the "tuple and procedure" thing i mentioned
15:43:01Araqdon't store "types" anywhere
15:43:02FromDiscord<ZeeQyu> Yeah, I was about to suggest the case of in type definition syntax, whatever it's called, which is mentioned in one of the comments there. Can you store those in a seq?
15:43:03FromDiscord<Rika> sounds like its the only way
15:43:07FromDiscord<badassiel> @kodkuce sure, will keep in mind ๐Ÿ™‚
15:43:07FromDiscord<Rika> i didnt mean type sorry
15:43:09Araqtypes only exist at compile-time
15:43:10FromDiscord<Rika> i meant another object
15:43:47clyybberAraq: Hey, making the default field thing work for ref objects is a bit harder than expected.
15:44:03clyybberTheir loc.lode.kind == nkEmpty
15:44:06FromDiscord<Kiloneie> @Araq what did you mean by, no love for "result" variable ? Did i overshadow it too much via "return" keyword D:, is that way you meant D: ?
15:44:26AraqKiloneie: you only showed 'return'
15:44:40FromDiscord<Kiloneie> no..
15:44:51Araqno? sorry, I skimmed it
15:45:00FromDiscord<ZeeQyu> Hi Araq, nice to meet you. This is my first time in this chat, and I just wanted to let you know that it's a wonderful language you've designed here.
15:45:13FromDiscord<Kiloneie> https://www.youtube.com/watch?v=THOQLLT9RJk&feature=youtu.be
15:45:14Araqthanks
15:45:23FromDiscord<Kiloneie> this is where i used it, and i used it before return
15:45:50Araqsorry
15:45:59FromDiscord<Kiloneie> i do have timestamps, so if you wanna skip trough the video, try the stamps ๐Ÿ˜›
15:46:06Araqmissed it completely, I'm debugging
15:46:34FromDiscord<kodkuce> comming form c# i used to use return alwies now i am starting to feele result good too ๐Ÿ™‚
15:46:59FromDiscord<Rika> https://play.nim-lang.org/#ix=1XFk something like this ;n;
15:47:00FromDiscord<kodkuce> or even not writing result
15:47:08FromDiscord<Kiloneie> both are useful.
15:47:31Araqclyybber: why look at 'lode' and not at the type?
15:47:33FromDiscord<Rika> oh yeah i love this language too i just cant understand it
15:47:51AraqRika: what do you want to know?
15:48:12FromDiscord<ZeeQyu> Araq: While you're getting bombarded with questions, let me add another one on top. Nimsuggest: what does mod do? And what is the story behind dus and use, considering leorize said they're related?
15:48:36clyybberAraq: I need lode to construct a nkDotExpr so I generate an assignment.
15:48:50clyybberBut maybe I'm overthinking this and theres a much better way to assign the fields
15:48:53FromDiscord<Rika> i dont know what to do for the scenario i said above ;w; i clarified it in the play.nim-lang.org link to the best of my ability
15:48:56Araq'dus' tries to be smart, it means "goto definition if you're on a usage and goto usages if you're on a definition"
15:49:37Araq'mod <file>' means "assume <file> has been changed"
15:50:10Araqiirc 'mod' is mostly for writing tests
15:51:02FromDiscord<ZeeQyu> So you would call mod <file>, then, in a new row, call f.ex. def to assure you're using the newest version of the file?
15:51:36FromDiscord<ZeeQyu> Or does it have no purpose in an actual IDE-assisting situation?
15:51:37Araqand 'dus' is what every editor should do but doesn't. it's like a "jump around" command, I hate the context switch and the thinking about "goto definition" vs "goto usage(s)"
15:51:42FromDiscord<Kiloneie> Does anyone have a better title name than Slices and More on Strings ? Video talks about slices, to string conversion and string contentation...
15:52:04FromDiscord<Rika> contentation? concatenation?
15:52:27FromDiscord<Kiloneie> i don't know how to spell that word
15:52:29FromDiscord<juan_carlos> Makes strings happy/
15:52:30disruptekAraq: ah, that makes a lot of sense.
15:52:51FromDiscord<Kiloneie> Slices and Strings in Depth ?
15:52:52AraqZeeQyu: to the best of my knowledge 'mod' has no purpose for text-editor integration, nimsuggest tracks file changes on its own anyway
15:53:47FromDiscord<Rika> did you record the video already?
15:53:52FromDiscord<Kiloneie> No
15:53:59FromDiscord<Kiloneie> i am about to
15:54:15shashlick@disruptek aah
15:54:24FromDiscord<ZeeQyu> Araq: Alright. Would you mind if I asked a lot of questions about nimsuggest for the purpose of then using the information to create a pull request for the editor integration page and the tool itself, adding a help section, so you don't need to answer these questions agan?
15:54:26shashlickChecked out golden a bit
15:54:53shashlickUse a config.nims, nim.cfg seems to have an issue with define values
15:55:07disruptekjust pushed it.
15:55:44shashlickAlso git_last_error does get wrapped but you need to use $ since message is a cstring
15:55:58AraqRika: set intersection is defined as "all the elements that exist in both sets"
15:56:05disruptekyeah, that's old code.
15:56:09FromDiscord<ZeeQyu> I'm intending to create a sorely needed JetBrains language support plugin, so I'd need to learn the details of nimsuggest anyway.
15:56:17Araqand so x * {} is {}
15:56:33Araqmaybe you want '+' instead? (set union)
15:57:06FromDiscord<Rika> uh
15:57:11AraqZeeQyu: I don't mind PRs like that, I welcome them
15:57:12FromDiscord<Rika> i think i copied the wrong link
15:57:26FromDiscord<Rika> did i???
15:57:43FromDiscord<ZeeQyu> Araq: I was asking more about if you were okay with the questions. ^.^
15:57:44FromDiscord<Rika> i dont seem to have copied the wrong one; just in case, it's this one https://play.nim-lang.org/#ix=1XFk
15:58:41shashlick@disruptek ok any other blockers?
15:59:39disruptekshashlick: no, i tol' you -- i'm sorted, thanks! ๐Ÿ˜
15:59:46shashlickI think it is worth logging the nim.cfg issue with values
15:59:50Araqhttps://play.nim-lang.org/#ix=1XNA Rika
15:59:58disruptekzeeqyu: leorize knows too much about nimsuggest.
16:00:12disruptekalright, i'll issue it.
16:01:13FromDiscord<Rika> Araq: i mean the comments below; what should i do regarding the Curve; I want (theoretical) Curve[Bezier] to live in a seq with Curve[Linear]s ๐Ÿ˜ฆ sorry i feel like this is consuming a lot of time
16:01:14Araqbut I think https://play.nim-lang.org/#ix=1XNB is much easier to use
16:01:28FromDiscord<Rika> ah hmm okay
16:01:46shashlickSo you are using dynamic and not static?
16:01:53FromDiscord<Rika> i'll go with that, thanks
16:03:00FromDiscord<ZeeQyu> Araq: For starters, I'd like to confirm that the undocumented commands do what I'm guessing they do and what it looks like they're doing. Outline is used to create an outline of a file in some sidebar, which contains all the definitions in a file, with their nesting information? highlight is intended to be used for syntax highlighting, to color words different colors based on what function it fills in the code? leorize said known is for know
16:03:39Araqeverything leorize said is true
16:04:03FromDiscord<ZeeQyu> I'm guessing chk is to check for errors in a file, but when I run it on a file, I get errors within the system.nim file, so I don't think I'm using it correctly (chk test.nim)
16:04:19AraqI don't remember 'outline' :-) but what you say makes sense
16:04:35FromDiscord<badassiel> erm we dont have conditional operator (? : ) in nim ? have any inline binary conditional syntax or just if else?
16:05:00Araq (if cond: exprA else: exprB) badassiel
16:05:05FromDiscord<ZeeQyu> I'm not doubting the veracity of leorize's claims. I'm just trying to make sense of them.
16:05:34FromDiscord<kodkuce> @badassiel you do var x = if 5<3: 22 else: 55
16:05:42Araqas for your question, I don't know why 'chk' fails on system.nim, maybe a wrong setup
16:05:43FromDiscord<badassiel> oh, kinda like python version then
16:05:43FromDiscord<kodkuce> if asking about terrary like operator
16:06:30FromDiscord<ZeeQyu> For memory: the help once you start nimsuggest in nim 1.0.0 is
16:06:30FromDiscord<ZeeQyu> usage: sug|con|def|use|dus|chk|mod|highlight|outline|known file.nim[;dirtyfile.nim]:line:col
16:06:58*Trustable quit (Remote host closed the connection)
16:07:03Araqyeah, I don't know 'outline'
16:07:12Araqeverything else was covered
16:08:00*Trustable joined #nim
16:08:26FromDiscord<ZeeQyu> Apparently it was a wrong setup, updating with choosenim to 1.0.0 from 0.20.2 gave me only errors in the current file. Not sure what I did to cause that though, there shouldn't be such a difference between the RC and the release, I'm guessing.
16:08:46clyybberAraq: The problem is this: in genNew (or rawGenNew) I need to generate field assignments for all the fields of the ref object that have a default value, but for that I need the nkSym of the ref object.
16:09:21clyybberThis works for normal objects because their loc.lode is the nkSym of the object. But for ref objects it doesn't
16:11:04FromDiscord<ZeeQyu> What is the purpose of specifying a file at startup of nimsuggest? Which file should be specified, the "main" file calling everything else, or whichever file is currently open?
16:11:24FromDiscord<ZeeQyu> What does "in the modulegraph" mean? Is that as in if it's included (or in a dependency of an included file) in the file you specified in the nimsuggest startup command?
16:11:38AraqZeeQyu: you should specify a *directory* these days
16:11:49FromDiscord<ZeeQyu> Oh, that makes more sense
16:12:14Araqbut according to Zevv our auto-detection for the "main Nim project file" could be better (I'm waiting for his PR)
16:12:50Araq"in the modulegraph" means it's some file that belongs to the project
16:13:42FromDiscord<ZeeQyu> When you say "these days", do you mean bleeding edge or, 1.0.0? calling nimsuggest --stdin .
16:13:42FromDiscord<ZeeQyu> gives
16:13:43FromDiscord<ZeeQyu> cannot find file: <path to current directory>
16:14:26FromDiscord<ZeeQyu> Belongs to the project. If I hadn't included f.ex. macros from the stdlib, would that yield false then?
16:15:31AraqI mean since 0.20
16:15:38Araqmaybe earlier
16:16:04Araqwhat do you mean "cannot fine file"? the directory should have a .nim file
16:16:43Araqclyybber: I am not sure, patch the code so that loc.lode contains something useful?
16:17:22Mister_Magisterhow do you do inline if in nim like in c++ ?: ?
16:17:58FromDiscord<ZeeQyu> My directory structure is {SOMEPATH}/extras/test.nim
16:17:58FromDiscord<ZeeQyu> I am in the extras folder and I call
16:17:58FromDiscord<ZeeQyu> nimsuggest --stdin .
16:17:58FromDiscord<ZeeQyu> and get that {SOMEPATH}/extras is a file that cannot be found.
16:17:59*solitudesf joined #nim
16:18:07FromDiscord<ZeeQyu> The folder only has the one file
16:18:57FromDiscord<Rika> are non-exported procedures seen by the rest of the "module", or is it only within the file?
16:19:18clyybberAraq: Yeah, I'll try a few things. Also how should I handle case objects?
16:19:47clyybberIs there some part of the compiler I can reuse for them?
16:20:17clyybberAs in determining which case branch they are "on"
16:21:54FromDiscord<ZeeQyu> I'm on windows 10, using powershell inside visual studio code, in case it has relevance
16:22:44Araqtry 'nimsuggest --stdin somepath/extras'
16:23:07FromDiscord<Kiloneie> echo sequence1[0 .. < 2] this is deprecated ? what is to be used instead ?
16:23:33Araq..< without the space
16:23:36FromDiscord<ZeeQyu> It's the ..< instead of .. <, right? Removing the space
16:23:41FromDiscord<ZeeQyu> Too slow ^.^
16:24:06FromDiscord<Kiloneie> oO okay... i don't see the point of this deprecation but okay.
16:24:23clyybberits unambiguous
16:24:48FromDiscord<kodkuce> is there some way to deduct 1 seq form other , something like this
16:24:48FromDiscord<kodkuce> var
16:24:48FromDiscord<kodkuce> g1:seq[string] = @["m1","m2","m3","m4","m5"]
16:24:48FromDiscord<kodkuce> g2:seq[string] = @["m1","m2","m5"]
16:24:48FromDiscord<kodkuce> g3:seq[string] = g1 - g2 <<< GIVE ME @["m3","m4"]
16:25:24FromDiscord<Rika> you can do that with sets but you know sets
16:25:36FromDiscord<Rika> no dupes, order lost too i think
16:25:49FromDiscord<kodkuce> but i need dupes ๐Ÿ˜ฆ
16:25:57FromDiscord<kodkuce> guess will manualy for loop it
16:26:30ZevvI have nothing to do with autodetection araq, you need leorize
16:27:48*radsoc joined #nim
16:29:29FromDiscord<ZeeQyu> Araq: Here's something more comprehensive describing the problem
16:29:30FromDiscord<ZeeQyu> https://gist.github.com/ZeeQyu/53b643fa741a27b7b57ec4a1e14e8f3b
16:29:32leorizeAraq, ZeeQyu: the current autodetection is terrible
16:30:06FromDiscord<ZeeQyu> So what's the recommended workaround? Give nimsuggest the current main file?
16:30:19leorizeyes
16:30:31leorizeit can auto detect if a nim configuration file is found
16:31:08leorizeor a nimble file
16:31:10FromDiscord<ZeeQyu> But in the future, give the entire project folder to it? What does specifying the file do, preload files/folder?
16:31:18leorizebut it will never work with the current nimble structure
16:31:47leorizespecifying the project file makes it the entry file of the project
16:32:04leorizenimsuggest will start parsing from there to get the types, etc.
16:32:20leorizeit's not important until you have to deal with `include` files
16:33:10Araqkodkuce: sequtils.deduplicate
16:34:18FromDiscord<ZeeQyu> And once you do include files, how should you reason about it? I'm guessing include doesn't use the import order, so does include files get interpreted relative to the selected file's folder?
16:35:31leorizenah, include files get interpreted relative to the file that includes it
16:35:35leorizelike how Nim does
16:36:04Araqgive nimsuggest the main Nim file and 'include files' do work, we have tests that prove it
16:36:20leorizeso for big projects like the compiler itself
16:36:39leorizesem.nim is splitted into semexprs.nim, semstmts.nim, etc.
16:36:54FromDiscord<Kiloneie> Should i include the ^ different syntax for slices ? i don't personally get really...
16:37:00FromDiscord<Kiloneie> it *
16:37:02leorizeif you run nimsuggest on semexprs.nim, nimsuggest wouldn't know where all the types and proc in there came from
16:37:13FromDiscord<ZeeQyu> Ooh, I see
16:41:08FromDiscord<ZeeQyu> What is the quality and prefix values returned by sug, as described here https://github.com/nim-lang/nimsuggest/issues/86 ?
16:42:05leorizeprefix is if the suggestion share the same prefix with the current text I think
16:42:31leorizequality is just a number for the epc backend
16:42:35FromDiscord<ZeeQyu> So it's either "Prefix" or ""?
16:42:59leorizeso far I only see quality 100
16:43:07leorizehttps://github.com/nim-lang/Nim/blob/27b081d1f77604ee47c886e69dbc52f53ea3741f/compiler/prefixmatches.nim#L13
16:43:11leorizethat's all the prefixes
16:43:39FromDiscord<ZeeQyu> How would you use the prefixes in an ide implementation scenario?
16:44:06leorizeit can be used for order of suggestions
16:44:16leorizeNone gets the lowest priority
16:44:27leorizeAbbrev gets the higher one
16:44:32leorizeSubstr even higher
16:44:36leorizePrefix the highest
16:44:43FromDiscord<ZeeQyu> But doesn't nimsuggest order its results anyway?
16:44:54leorizenope
16:44:57leorizeit doesn't
16:46:58leorizeare you writing an editor plugin?
16:47:01FromDiscord<ZeeQyu> Oh, it's in order of discovery? Huh. That's interesting.
16:47:01FromDiscord<ZeeQyu> So what's epc again? I think I read it related to emacs.
16:47:25FromDiscord<ZeeQyu> I intend to create a Jetbrains nim support plugin, as well as improve the documentation for nimsuggest.
16:48:08*Senketsu joined #nim
16:48:17leorizeepc is a lisp-based ipc for emacs
16:48:33leorizeif you need any help, please let me know :)
16:48:53FromDiscord<ZeeQyu> For especially the second one, I'd like to be sure I've understood how the nimsuggest interface works in detail.
16:49:00*hami joined #nim
16:49:04FromDiscord<ZeeQyu> And not guessing ^.^
16:49:13FromDiscord<ZeeQyu> That's why I'm asking so many questions.
16:49:35FromDiscord<ZeeQyu> I will!
16:49:40leorizeI can assure you that my answers are from actual reading of nim's source code :P
16:49:52FromDiscord<ZeeQyu> Not writing it?
16:49:56FromDiscord<ZeeQyu> Who wrote it?
16:50:16leorizealso, I'm the author of https://github.com/alaviss/nim.nvim, so feel free to take any parts that you need to implement there
16:50:25FromDiscord<ZeeQyu> Sure will!
16:50:27leorizeAraq wrote it
16:50:52leorizeyou can assume that most of nim was initially written by araq :P
16:50:54FromDiscord<ZeeQyu> But I'm guessing he's taken some pull requests, considering he didn't recognize the outline command
16:51:12FromDiscord<ZeeQyu> And yeah, that seems to be the theme
16:51:28leorizenah, he implemented it :P you can read the commit log
16:51:37FromDiscord<ZeeQyu> Huh, funny
16:51:56FromDiscord<ZeeQyu> I suppose it gets hard to keep track of this amount of code
16:52:04FromDiscord<ZeeQyu> So IPC, as in inter-process communication? in epc, what is quality used for?
16:52:19leorizefor their completion engine I presume
16:52:20FromDiscord<Chiqqum_Ngbata> Is there a way to trick nim into accepting leading/trailing underscores in identifiers?
16:52:22leorizenot an emacs user
16:52:34leorizeChiqqum_Ngbata: there aren't any
16:52:38leorizeplease don't use them
16:52:46FromDiscord<Chiqqum_Ngbata> Trying to generate a binding and it wants a __thing__
16:52:57FromDiscord<Chiqqum_Ngbata> `__thing__` *
16:53:01leorizegive it a better name :P
16:53:10disruptekyou can use both at the same time if your identifier is short enough.
16:54:01FromDiscord<ZeeQyu> disruptek: I just tried it, It doesn't seem to work.
16:54:13disruptekmake the identifier shorter.
16:54:29leorizelike real short
16:54:32FromDiscord<ZeeQyu> shorter than
16:54:32FromDiscord<ZeeQyu> let _ = 5
16:54:32FromDiscord<ZeeQyu> ?
16:54:39leorize!eval let _ = 5
16:54:41NimBot<no output>
16:54:45disrupteknone more short.
16:54:59FromDiscord<ZeeQyu> !eval let _ = 5
16:54:59FromDiscord<ZeeQyu> echo _
16:55:01NimBot<no output>
16:55:10leorizeit can't do multiline
16:55:17FromDiscord<ZeeQyu> Can you send multiline- darn.
16:55:32disruptekuse a semicolon.
16:55:56FromDiscord<ZeeQyu> !eval let _ = 5; echo _
16:55:58NimBotCompile failed: /usercode/in.nim(1, 17) Error: undeclared identifier: '_'
16:56:04FromDiscord<ZeeQyu> Yeah, same as I get
16:56:08leorize`_` is a special identifier
16:56:15leorizeit's a blackhole
16:56:19FromDiscord<ZeeQyu> Oh, nice
16:56:56FromDiscord<ZeeQyu> But your guess is that quality is a priority thing? First in the list if highest quality or something?
16:57:10leorizeyea
16:57:15leorizebut I ignore it always
16:57:27FromDiscord<ZeeQyu> Lol
16:57:48leorizemost completion engine can resolve all that prefix abbrev thingy anyway
16:57:52leorizeso I skip that part also
16:58:17*Senketsu quit (Quit: WeeChat 2.5)
16:58:20*fanta1 quit (Quit: fanta1)
16:59:28FromDiscord<ZeeQyu> I think I have a lot to go on. Now I need to sit down and understand the Jetbrains plugin interface to see if I can make the two parts play ball. My plan is to create some level of this plugin, and then, when I know all about it, write in-program documentation for nimsuggest, update the ide integration guide and the idetools page, and create pull-requests for all that when I have a good grasp of the details.
16:59:40FromDiscord<ZeeQyu> leorize, Araq, thanks for all your help
17:00:02FromDiscord<ZeeQyu> And leorize, considering you already have the knowledge base, feel free to beat me to updating the documentation. I won't be upset.
17:00:31*Senketsu joined #nim
17:00:37FromDiscord<ZeeQyu> But if you don't feel like it, it's cool. I rather enjoy writing documentation.
17:01:00leorizeI don't :P writing documentation is booring
17:01:27FromDiscord<ZeeQyu> Good thing you seem to enjoy answering questions then. ^.^
17:01:30FromDiscord<ZeeQyu> Almost as good
17:06:03*Senketsu quit (Quit: WeeChat 2.5)
17:07:28*Senketsu joined #nim
17:15:15*traviss quit (Quit: Leaving)
17:17:26*traviss joined #nim
17:19:32FromDiscord<Karl Marx> So you can communicate with the Gitter people via here
17:19:43FromDiscord<Karl Marx> This is super smart
17:24:28*actuallybatman quit (Ping timeout: 245 seconds)
17:26:07*Senketsu quit (Quit: WeeChat 2.5)
17:31:28*Senketsu joined #nim
17:31:36*whaletechno joined #nim
17:32:59*Senketsu quit (Client Quit)
17:34:53Araqhttps://www.swb-marathon.de/files/bilder/2019/M_Bremen_Marathon_org.jpg I did it
17:35:15Araqin 4 hours 36 minutes
17:36:16Zevvdude
17:36:33Zevvcongrats
17:36:57Araqthanks
17:38:14*Zevv is impressed - that'd take me at least two days :)
17:38:31disruptekthat's ridonkulous.
17:38:43disruptekwere you on a bicycle?
17:39:34AraqMarathon on a bicycle? lol, no, I used my feet
17:40:48*Senketsu joined #nim
17:41:19disruptekall the more remarkable an achievment.
17:42:10Araqthanks, I tried to beat 4:30 though. had some lovely storm against me for km 34 until 38 though, so I have a good excuse
17:42:17disrupteki was fast when i was a kid, can't seem to get motivated now. how much do you run during a normal week?
17:42:31Araq4 times.
17:42:54FromDiscord<Kiloneie> That's both healthy and unhealthy. Marathons do nothing good for your body.
17:43:48Zevvall the more for your soul :)
17:44:11Araqit's quite comparable to inventing your own programming language. A very bad idea.
17:44:15disruptekit's pretty healthy from a mental perspective.
17:44:44FromDiscord<Kiloneie> nah language is awesome, it's very healthy, as long as you don't stress yourself, then you grow cancer in time
17:44:45nixfreakdude why negative just say congrats
17:45:03*narimiran joined #nim
17:45:11Araqnixfreak: it's fine, don't worry
17:45:15disrupteki have a buddy that runs 5 miles/day 4x per week and 12 miles/day the other days. he's about 60, been doing it for 30 years at least.
17:45:21FromDiscord<Kiloneie> Sorry, congrats
17:46:22FromDiscord<Kiloneie> i am just trying to say that shorter runs are healthy, long ones aren't...
17:46:28nixfreakAraq would say that much exercise has improved metal capability (programming lets say) or stayed about the same
17:46:42FromDiscord<Kiloneie> you feel more alive
17:47:12FromDiscord<Kiloneie> i can't start doing anything as good without workout in the morning
17:47:12nixfreakkiloneie no evidence to back that up
17:47:34FromDiscord<Kiloneie> i feel sleepy as hells if i don't workout
17:48:26Araqnixfreak: I don't really know. However, the best ideas I had for Nim occured to me during jogging
17:49:13FromDiscord<Kiloneie> I did a lot of thinking in my previous job, since my body went on auto pilot after i learned how to do my job.
17:49:53FromDiscord<Kiloneie> To help time fly one tries to think.
17:50:26*shomodj joined #nim
17:51:04nixfreakAraq that makes sense, and very interesting
17:51:08FromDiscord<Kiloneie> https://youtu.be/eN2cjLn1Y1w
17:52:30*ofelas joined #nim
17:53:41nixfreakwell congrats man
17:54:09nixfreakDoes anyone know of a nim gui lib / wrapper that works cross compiled lets say from osx/unix to windows?
17:54:46Araqany UI lib that supports Windows should work fine and you can use 'wine' to test it
17:56:25nixfreakThats true , forgot about WINE , thanks
18:03:41FromDiscord<ZeeQyu> Good job, Araq!
18:04:36*Senketsu quit (Quit: WeeChat 2.5)
18:05:13*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzzโ€ฆ)
18:05:38*Senketsu joined #nim
18:07:48Araqthanks!
18:08:05clyybberwhy would Marathons be bad for your body?
18:08:29Araqit's bad for your knees
18:08:31clyybberOh well
18:08:36clyybberEverythings bad for your knees
18:08:41Araqlol
18:08:49clyybberAlso, congrats
18:09:17AraqI think I'll switch to half marathons next year
18:09:37disrupteka friend did the leadville 100 last year.
18:09:51Araqwhat's that, 100 miles?
18:10:10disruptekyeah, in 24hrs. and at altitude. and with varied altitude. in the mountains.
18:10:32disruptekhe made it in 23.5hrs.
18:10:54disruptekyou people are insane.
18:11:48Araqcan't disagree, it's quite mad
18:12:16Araqbut 21km is just right
18:12:20*radsoc quit (Quit: radsoc)
18:12:51*actuallybatman joined #nim
18:13:30*shomodj joined #nim
18:15:03*shomodj quit (Client Quit)
18:15:11FromDiscord<Kiloneie> I know about marathon problems trough my sister who kept doing them, and then could barely walk. Over exertion.
18:15:31disruptekit's different when you're running from cops.
18:15:57clyybberthat I'm proficient in
18:16:09FromDiscord<Kiloneie> To me personally, i just do a 20 min workout + 2x 5 min running on the treadmill. Because i sit all day and i will probably die of heart attack, gotta move.
18:16:45AraqKiloneie: well "barely walk" is only after the run
18:16:57FromDiscord<Kiloneie> for her it was for days after xD
18:17:13FromDiscord<Kiloneie> she was doing public marathons, and was in top runners always.
18:17:18Araqand it's kinda the point to test your limits
18:17:19clyybberOoh I had a few fights were walking was hard afterwards
18:17:30clyybberI guess it happens in every sport with feet
18:17:46disruptekwhen i first moved to colorado, i was living at 10,000' on top of a mountain. i had to pause to catch my breath every time i ran down a mountain lion.
18:17:49AraqI can barely walk too now fwiw
18:18:15FromDiscord<Kiloneie> Now eat some protein D:
18:18:16disrupteknot mountain lion. not sure why i said that. every time i walked up stairs. that's what i meant.
18:18:22FromDiscord<Kiloneie> xD
18:18:32clyybberwth
18:18:43clyybberlol
18:19:18disruptekyeah don't do that.
18:19:29disruptekit's one thing to chase a bear, it's another to chase a cougar.
18:19:36*tdc quit (Ping timeout: 240 seconds)
18:19:56FromDiscord<Kiloneie> oO, what pretty sure you die in both instances
18:20:13FromDiscord<Kiloneie> unless you are sporting an assault rifle, or an elephant gun
18:20:22disruptekthey are really fast and they get very grumpy when you grab their tails.
18:24:07*solitudesf quit (Remote host closed the connection)
18:28:26*Senketsu quit (Ping timeout: 240 seconds)
18:28:30AraqKiloneie: what are/were her times?
18:28:48*NimBot joined #nim
18:29:07*solitudesf joined #nim
18:29:34FromDiscord<Kiloneie> That i don't know, as she was a terrible sister... She got plenty of medals when she was younger and in the recent few years.
18:29:53FromDiscord<Kiloneie> We barely talk ever.
18:41:54*tdc joined #nim
18:44:34*lritter joined #nim
18:45:09FromDiscord<Chiqqum_Ngbata> I assume someone here has familiarity with nimgen
18:46:26FromDiscord<Chiqqum_Ngbata> ```
18:46:26FromDiscord<Chiqqum_Ngbata> search.0 = "define ERL_NIF_INLINE __inline__"
18:46:27FromDiscord<Chiqqum_Ngbata> replace.0 = "XXX"
18:46:27FromDiscord<Chiqqum_Ngbata> ```
18:46:45FromDiscord<Chiqqum_Ngbata> Somehow when I add this clause to nimgen .cfg it all hangs. Am I doing something obviously wrong?
18:47:30*radsoc joined #nim
18:58:30FromDiscord<Chiqqum_Ngbata> Just trying to do a string replace on a header file before preprocessor
19:05:04FromDiscord<Lunar> Chiqqum: no clue
19:05:32FromDiscord<Lunar> How can I create a task that runs two things at the same time? I.E A server port listener, and a client to send stuff to the port?
19:05:59FromDiscord<Lunar> Right now I have a functioning chat client, except it's only one way texting. I can't get anything back
19:06:09FromDiscord<Lunar> Unless... What if I use UDP instead of TCP?
19:06:34*sentreen_ quit (Ping timeout: 268 seconds)
19:07:15FromDiscord<Chiqqum_Ngbata> Concurrency. I think there is an asyncnet example in the documentation; should be able to create server and client
19:07:38FromDiscord<Chiqqum_Ngbata> UDP/TCP is irrelevant
19:08:52*Kameleon quit (Read error: Connection reset by peer)
19:09:44FromDiscord<Lunar> I thought UDP could send and receive at the same time?
19:11:58FromDiscord<Kiloneie> Pretty sure that's not how it works ?...
19:13:41FromDiscord<Lunar> I'm probably wrong ๐Ÿ˜…
19:14:39FromDiscord<Kiloneie> Just like how electric current shifts directions at crazy speeds, that's probably how UDP works, although i am not 100% sure.
19:15:10FromDiscord<Kiloneie> google says, multi threading
19:15:45FromDiscord<Rothmoss> Hi, new to nim. I have been looking for a way to check what language (c or js) that the program is currently being compiled to. is there a way to do this? I've been searching for a few hours but just cant find it. like
19:15:45FromDiscord<Rothmoss> ```
19:15:46FromDiscord<Rothmoss> var message: string
19:15:46FromDiscord<Rothmoss> when compiledToJavascript:
19:15:46FromDiscord<Rothmoss> message = "its javascript!"
19:15:46FromDiscord<Rothmoss> else compiledToC:
19:15:46FromDiscord<Rothmoss> message = "its C"
19:15:48FromDiscord<Rothmoss> echo message
19:15:49FromDiscord<Rothmoss> ```
19:15:56disruptekplease use a pastebin in the future.
19:16:29disruptekyou can use `when` to determine the platform at compile-time.
19:18:31*absolutejam joined #nim
19:22:37*al_ quit (Quit: al_)
19:23:59*sentreen joined #nim
19:33:29FromDiscord<Lunar> Can someone describe to me how this works? <https://nim-lang.org/docs/threads.html#createThread%2CThread%5Bvoid%5D%2Cproc%29>
19:34:13FromDiscord<Lunar> How do I use the ``createThread`` function, and why are there two ``createThread`` shortcuts on the left side?
19:38:39FromGitter<Varriount> Hello my fellow Nimsters! :D
19:39:18FromDiscord<Lunar> Hello!
19:39:22FromGitter<Varriount> Lunar: There are two `createThread` links, because there are two overloads/variants of the `createThread` procedure.
19:39:30FromDiscord<Lunar> O.o
19:39:38FromDiscord<Lunar> I wish they would clarify that
19:39:55FromDiscord<Lunar> At first look, it just seems like Gibberish
19:40:04FromGitter<Varriount> Well, it's part of the language
19:40:35FromGitter<Varriount> https://nim-lang.org/docs/manual.html#overloading-resolution
19:41:18FromDiscord<Lunar> That's fair ๐Ÿ˜…
19:41:51FromGitter<Varriount> Though, I do agree that it's not obvious if you haven't dealt with a language that supports overloaded identifiers before.
19:42:27FromDiscord<Lunar> That's me! ๐Ÿ‘‹
19:42:38FromGitter<Varriount> And the manual tends to be written from a more technical specification perspective, rather than a teaching perspective.
19:42:51FromDiscord<Lunar> So how do you suggest I learn?
19:42:55FromDiscord<Lunar> and do you happen to know how to use multithreading?
19:42:59FromGitter<Varriount> Lunar: https://nim-lang.org/docs/tut1.html#procedures-overloaded-procedures
19:43:14FromGitter<Varriount> Lunar: Depends on what you mean by "how to use".
19:43:48FromGitter<Varriount> Do I know how to use multithreading as a non-language-specific technique? Yes. Have I used multithreading with Nim? Not really.
19:44:02FromGitter<Varriount> What are you trying to accomplish, as you general goal?
19:44:03FromDiscord<Lunar> Ah, I meant how to multithread in Nim
19:45:34ZevvOi Varriount, whats up!
19:46:01FromGitter<Varriount> Zevv! :D
19:46:29Zevvwhat are you nimming these days then?
19:47:07FromGitter<Varriount> Zevv: Unfortunately, not much. I have some distant plans for Commandant, but right now I'm dealing with real life stuff
19:48:07FromDiscord<Lunar> What's commandant?
19:48:44Zevvreal life stuff, how mundane
19:49:43FromDiscord<Kiloneie> This is real life
19:51:13FromDiscord<Lunar> Nim is life
19:51:14FromDiscord<Lunar> ๐Ÿ˜‚
19:53:35*shomodj joined #nim
19:54:40FromGitter<Varriount> Lunar: https://github.com/Varriount/commandant
19:54:48FromDiscord<Lunar> Ah, thank you!
19:55:20FromDiscord<Lunar> So I'm using ``spawn`` from the ``threadpool`` import, which wants me to compile with the ``--threads:on`` option, which then gives me the error: ``Error: 'spawn' takes a GC safe call expression``
19:55:55FromDiscord<Lunar> Anyone else confused?
19:55:57FromDiscord<Lunar> ๐Ÿ˜‚
19:58:06FromGitter<Varriount> Lunar: Have you read about Nim's memory model with regards to threading?
19:58:17FromDiscord<Lunar> I have not
19:58:20FromDiscord<Lunar> I'll look for it now
19:58:22FromGitter<Varriount> Also, what language are you coming from?
19:58:47FromGitter<Varriount> Lunar: https://nim-lang.org/docs/manual.html#threads-gc-safetyhttps://nim-lang.org/docs/manual.html#threads-gc-safety
19:58:50FromGitter<Varriount> https://nim-lang.org/docs/manual.html#threads-gc-safety
19:59:17FromDiscord<Lunar> Many. C#, Java, the WebDev package, Python, I tried Fortran, didn't go very well
19:59:24FromDiscord<Lunar> Thanks for the links though
19:59:56FromDiscord<Lunar> Why'd you post the same link three times?
20:00:54FromGitter<Varriount> I accidentally pressed ctrl+v and then enter the first time, and then pressed ctrl+v again so that you would have a proper link.
20:01:01*tdc quit (Quit: Leaving)
20:01:16FromDiscord<Lunar> Whoops ๐Ÿ˜‚
20:01:29*nsf quit (Quit: WeeChat 2.5)
20:01:37FromGitter<Varriount> Lunar: The long and short of it is that (at least for now) Nim's memory model is very strict when it comes to shared memory.
20:02:07FromGitter<Varriount> Objects allocated in one thread's heap cannot be safely shared with another thread, unless one passes pointers (rather than references) around.
20:02:47FromDiscord<Lunar> So in order to create a IO chat client, multithreading is not the way to go?
20:02:51FromDiscord<Lunar> *I/O
20:03:11Zevvvarriount: when you start passing pointers around, your "safety" is down the drain anyway
20:03:23Zevvso the "unless..." part voids your warrenty
20:03:48FromGitter<Varriount> Lunar: If you want to create a chat client, I would recommend using the asyncio framework
20:04:18FromGitter<Varriount> Though, I don't know of a good tutorial for it. Hm.
20:04:37FromDiscord<Lunar> <https://nim-lang.org/0.19.0/asyncio.html>
20:04:39FromDiscord<Lunar> > Warning: This module is deprecated since version 0.10.2. Use the brand new asyncdispatch module together with the asyncnet module.
20:04:41ZevvPMunch has a writeup in progress, maybe he's willing to share a draft
20:05:02FromGitter<Varriount> https://nim-lang.org/docs/asyncnet.html
20:05:12FromDiscord<Lunar> I'm an idiot ๐Ÿ˜‚
20:05:19FromGitter<Varriount> Nah
20:06:16FromGitter<Varriount> To be honest, while Nim is a great language, there are definitely some major pain points.
20:06:38FromGitter<Varriount> Documentation is one, things like multithreading are another.
20:06:55FromGitter<Varriount> Though, there is work being done to improve both.
20:07:15FromDiscord<Lunar> I'd being willing to redo the documentation if someone could explain to me how the current one works
20:07:50FromDiscord<Lunar> Although, since I don't have any overloading experience, I'm not sure if I should be the one doing it
20:08:18FromDiscord<Lunar> I say overloading xp because I don't know how it works nor how to show examples
20:08:25FromDiscord<Lunar> so
20:08:25FromDiscord<Lunar> ยฏ\_(ใƒ„)_/ยฏ
20:09:28FromGitter<Varriount> You never worked with overloaded functions in C# or Java?
20:10:36FromDiscord<Kiloneie> overloading is basically just having multiple functions with the same name, but with different types and outcomes, the compiler then determines which one to use based on the type(something like that)
20:10:48FromDiscord<Kiloneie> It's real simple
20:11:12FromDiscord<Kiloneie> Nothing in programming is hard, it's just another layer on top of another layer. Baby steps.
20:12:45FromGitter<Varriount> ROM -> BIOS -> Bootloader -> OS
20:17:16Mister_Magister@Varriount if it only was this simpleโ€ฆ
20:19:00FromGitter<Varriount> Mister_Magister: Well, yeah. You also have the whole UEFI hardware structures, drivers, memory/processor modes, etc.
20:19:29Mister_Magisterand if you go to qualcomm it's staring to become sick
20:19:35Mister_Magister@Varriount also microos in cpu
20:19:44FromGitter<Varriount> UEFI especially seems to add *a lot* of complexity - you even need your own mini-interpreter for it.
20:23:01FromGitter<Varriount> Mister_Magister: And don't forget AML - https://wiki.osdev.org/AML
20:23:24Mister_Magisterhueh :P
20:23:32Mister_Magisteryeah we totally scared beginners xd
20:23:57*Trustable quit (Remote host closed the connection)
20:24:19FromDiscord<Kiloneie> i am technically a beginners myself ๐Ÿ˜›
20:28:22FromDiscord<Lunar> I'm only slightly terrified
20:28:38FromDiscord<Lunar> But having multiple functions with the same name is definitely confusing
20:28:46FromDiscord<Lunar> Personally, I wouldn't allow it on my own language
20:31:23Mister_Magister@Lunar it's really useful
20:31:49Mister_Magisterlike you want your function withch does same thing accept argument of multiple types
20:32:56FromDiscord<Lunar> I'm about to show how secluded I am from the rest of the world, but
20:33:17FromDiscord<Lunar> Can't you choose multiple types of inputs when making the function? I.E
20:33:53FromDiscord<Lunar> ```
20:33:53FromDiscord<Lunar> function main(String:Int Args) {
20:33:53FromDiscord<Lunar> ...
20:33:53FromDiscord<Lunar> }
20:33:54FromDiscord<Lunar> ```
20:33:58FromDiscord<Lunar> Letme pastebin that
20:34:03FromDiscord<Lunar> Well
20:34:05Mister_Magisterwell that doesn't work in irc lmao
20:34:08FromDiscord<Lunar> There isn't anything to pastebin
20:34:13FromDiscord<Lunar> ``function main(String:Int Args) {``
20:34:20Mister_Magisternah
20:34:26Mister_Magisterthat would be weird
20:35:07FromDiscord<Lunar> The syntax? Yes. The concept of choosing what types of arguments wanted? No
20:35:26Mister_Magisterwell not really
20:35:32Mister_Magisterboth concepts are good
20:36:05Mister_Magisterand with overloading if you need slight change of how function works depending on type but same outcome oveloading is really the way
20:36:18Mister_Magisteralso if it's hardly typed you can't just mix variables types
20:36:21FromDiscord<speckledlemon> Can someone point me to where in the docs repo the tutorials are generated from? There's a bug I want to fix
20:36:34FromDiscord<Lunar> What's the bug? *Just curious*
20:36:41FromDiscord<Karl Marx> I think they are on the
20:36:47FromDiscord<Karl Marx> Git readme
20:36:52FromDiscord<Karl Marx> Wiki*
20:36:53FromDiscord<Karl Marx> Sorry
20:38:02*narimiran quit (Ping timeout: 240 seconds)
20:38:04FromDiscord<speckledlemon> Ah, found them: https://github.com/nim-lang/Nim/blob/devel/doc/tut1.rst
20:38:11FromDiscord<speckledlemon> Ah, found them: <https://github.com/nim-lang/Nim/blob/devel/doc/tut1.rst>
20:38:15FromGitter<Varriount> Yep
20:38:22FromDiscord<speckledlemon> That's...confusing
20:39:32FromGitter<Varriount> What might be neat is a "tour" through the Nim language and standard library
20:39:51FromDiscord<Karl Marx> wdym
20:40:06FromGitter<Varriount> Wdym?
20:40:12FromDiscord<Karl Marx> What do u mean
20:40:15FromDiscord<Kiloneie> Araq told me i should do that... but i have no freaking clue where to begin.
20:40:20FromDiscord<Karl Marx> Of the "tour"
20:40:33FromGitter<Varriount> https://tour.golang.org/welcome/1
20:40:35FromDiscord<Karl Marx> Like a hello world style thing?
20:40:42FromDiscord<Karl Marx> Oh yeah
20:40:46FromDiscord<Karl Marx> That would be cool
20:41:04*clyybber quit (Quit: WeeChat 2.6)
20:42:20FromDiscord<speckledlemon> @Lunar What I _think_ is a bug is https://github.com/nim-lang/Nim/blob/5be8e0b0883c5d88db8f24db36d114290dffcae3/doc/tut1.rst#L1751, "ambiguous" implies that the example won't compile, but it does
20:43:20FromDiscord<Lunar> I *believe* you sent me the wrong link
20:43:32FromDiscord<Kiloneie> that opens the doc at beginning
20:43:52FromDiscord<speckledlemon> it shouldn't...
20:44:02FromDiscord<Lunar> Is that your bug?
20:44:10FromDiscord<Lunar> I can see that too ๐Ÿ˜‚
20:44:28FromGitter<Varriount> speckledlemon: Github renders markdown by default - perhaps you have some setting that disables that?
20:44:51FromDiscord<speckledlemon> it just takes a moment for GH to switch from the render to the source view
20:45:06FromDiscord<Kiloneie> both chrome and firefox open nim tutorial(part1)
20:45:27FromDiscord<Karl Marx> Yeah readme is rendered by default
20:45:31FromDiscord<Karl Marx> I am on Firefox
20:45:44FromDiscord<Lunar> I'm on Opera
20:45:48FromDiscord<speckledlemon> then click the little switcher at the top of the page and reload
20:45:53FromDiscord<Lunar> Which has an Chromium engine
20:45:53FromDiscord<Lunar> so
20:45:55FromDiscord<Karl Marx> Try Firefox or something
20:45:56FromDiscord<Lunar> Doesn't matter
20:45:57FromDiscord<Lunar> ยฏ\_(ใƒ„)_/ยฏ
20:45:59FromDiscord<Karl Marx> True
20:46:16FromDiscord<Karl Marx> Maybe try another browser (?) could be a setting in opera
20:47:24FromDiscord<speckledlemon> click the angle brackets and reload
20:47:24FromDiscord<speckledlemon> https://cdn.discordapp.com/attachments/371759389889003532/630506414577680397/Screen_Shot_2019-10-06_at_4.47.07_PM.png
20:48:01shashlick@Chiqqum_Ngbata - just saw your nimgen question
20:48:06shashlickyou still having an issue?
20:50:32FromGitter<Varriount> Try this - https://github.com/nim-lang/Nim/blame/5be8e0b0883c5d88db8f24db36d114290dffcae3/doc/tut1.rst#L1751
20:50:53FromDiscord<Kiloneie> this works
20:52:32FromDiscord<Kiloneie> that is ambigious
20:52:53FromDiscord<Lunar> That works
20:55:06FromGitter<Varriount> speckledlemon: Yeah, that does seem ambiguous, I would check with araq whether the documentation is correct, and the language is wrong, or vice-versa
20:57:02FromDiscord<Kiloneie> The first call outputs 3, the second is empty, and the third gets discarded because...
20:57:08FromDiscord<Kiloneie> Meh, voodoo
20:58:04FromDiscord<Kiloneie> i think... the discard one overrides the rest
20:58:20FromDiscord<Kiloneie> if you put the discarded one above the rest, nothing will output at all
20:58:25FromDiscord<speckledlemon> Just so we're all on the same page, I am saying that the result it clear: yes, the discard one overrides the rest, and the tutorial implies something else is supposed to happen
20:58:43FromDiscord<Kiloneie> really ?
20:58:55FromDiscord<Kiloneie> i had no clue this is how things worked xD
20:59:28FromDiscord<speckledlemon> It's not ambiguous at all if the expected behavior is to allow redefinition of the proc
21:00:02FromDiscord<speckledlemon> You saw it yourself that the one from module A isn't getting called
21:01:17FromDiscord<Kiloneie> This is supposed to be a tutorial or something ? i don't really use github.
21:01:48FromDiscord<speckledlemon> It's from <https://nim-lang.org/docs/tut1.html#modules>
21:02:02FromDiscord<speckledlemon> You know, the official tutorial
21:02:29FromDiscord<Kiloneie> yeah okay, was just thinking if there is maybe a button to jump to the output file on that line
21:04:08*radsoc quit (Quit: radsoc)
21:04:51FromDiscord<Kiloneie> Yeah that is weird, why end the second on ambigious when it actually isn't.
21:05:05FromDiscord<Kiloneie> section *
21:07:16FromDiscord<speckledlemon> Ok, since Varriount mentioned that it isn't clear where the problem is, I'll make an issue rather than a PR
21:07:47FromDiscord<Kiloneie> yeah do that.
21:08:32FromDiscord<Kiloneie> is it weird that i keep away from programming all the time, but then when i start i can barely stop ?
21:09:23*asymptotically quit (Quit: Leaving)
21:12:44*theelous3 joined #nim
21:17:44Tyreschow do I use two or more statements in a control flow function? 'and' or && didn't do the trick
21:18:58krux02_Tyresc: if (var x: int; x += 3; x > 2): echo 123
21:19:14*solitudesf quit (Ping timeout: 240 seconds)
21:21:02Tyreschmm I see, and what about loops?
21:23:05disruptekyou can `if foo or bar:` or `if foo and bar:` -- it's not clear that you mean "statements" and not "expressions".
21:23:15disruptekkrux02's example is for statements.
21:26:04TyrescOh I am sorry, I am looking for the way to use two or more requirements in a while loop ala 'while i > 0 and i < ceiling:'
21:26:23disruptekthat's it right there. most likely you have a bug.
21:27:35Tyrescoh the linter only suggested `and`
21:27:55disruptekyes, `and`, as you have used it, works just fine.
21:28:06disruptekyou can use `or` as well.
21:28:34Tyrescah no I meant "`and`" opposed to "and"
21:29:01Tyrescthe word by itself works like expected, thanks
21:29:05disruptekdon't quote your keywords; it makes them unhappy.
21:29:15disruptekunless of course you want to name an identifier after a keyword.
21:29:23disruptekin which case, use backquotes `thusly`.
21:29:47disruptek!eval let `and` = "and"; echo `and`
21:29:48NimBotand
21:29:59TyrescI only got the backquotes variant suggested so I suppose that's where the error came from
21:30:00disruptek!eval let `and` = "or"; echo `and`
21:30:03NimBotor
21:30:16disruptek!eval let and = "or"; echo and
21:30:17NimBotCompile failed: /usercode/in.nim(1, 5) Error: identifier expected, but got 'keyword and'
21:50:01*Vladar quit (Remote host closed the connection)
22:07:24*Pistos joined #nim
22:08:36PistosHi. I've skimmed the nim-lang website, but I'm still looking for an "elevator pitch" type of article for Nim. I've seen the feature list on the front page, and the headings of the tutorials.
22:10:11disruptekis the pitch for you or someone else?
22:10:46FromDiscord<Kiloneie> you can check my tutorials if you want in depth step by step
22:28:02rayman22201Yay. Just found a bug in ioselectors_epoll.nim. Opinion, do I submit the fix as a separate PR, or roll it into my AsyncEvents PR? I already know the answer is to make a seperate PR, I just don't want to do the work :-(
22:31:23FromDiscord<treeform> I think you know what you need to do.
22:31:42disruptekdom96 tol' me he's looking for more bugs to fix.
22:32:09*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
22:32:26*pbb joined #nim
22:34:20rayman22201I have the fix already. I just have to pull it out of my huge monster PR
22:35:17Pistosdisruptek: Let's say both. :) Though, in my case, I'm convinced enough by what I've read to actually try to write some test-the-waters programs myself now.
22:35:26PistosKiloneie: Link(s)?
22:35:48rayman22201This will only make sense if you are familiar with the io selector code, but the User key type does not properly unregister itself from selector. The `unregister` proc just completely skips that case :-/
22:36:25disrupteki'm asking because it's helpful for others to have a way to frame their arguments, and there are different camps here -- pl people, devops people, game creators, web folks, gui folks, etc.
22:36:34rayman22201guess what key type AsyncEvents use? :-P
22:37:21disruptekyou may want to hold off until a decision is made on what to do about unregister as per my issue. not clear whether such a change gets backported or w/e.
22:37:39disruptekat least you should create another issue to move the discussion along.
22:38:58rayman22201what is your issue disruptek? can you link it to me?
22:39:39*absolutejam quit (Ping timeout: 240 seconds)
22:39:45disrupteki don't have a url, but it's #12354
22:40:01rayman22201that'll do. Let me look and see if it's related
22:40:24Pistosdisruptek: In my case, my primary initial use case for Nim would be writing REST API backends for webapps. So I'll be needing a framework/package for that, plus an ORM, and easy JSON operations. I've found jester, norm, and the stdlib json package, respectively. Any alternate recommendations welcome.
22:40:46disruptekPistos: look at my openapi package.
22:41:01disruptekit needs someone to write backend support. ๐Ÿ˜‰
22:41:23disruptekthe only notable orm is `ormin`, but docs are skimpy.
22:41:44disrupteki take that back; i'm not familiar with norm.
22:42:26rayman22201disruptek, ah yes. My bug is slightly different. My bug is that even when you correctly and explicitly call "unregister" on the epoll event, depending on the event type, it does the wrong thing.
22:43:07disruptekyeah, i get it. i'm just sayin' that it's not clear when/how this module can be changed for whatever reason.
22:43:15*beatmox quit (Ping timeout: 240 seconds)
22:43:25disrupteki dunno... opinions.
22:43:29*nif_ quit (Quit: ...)
22:43:39*nif joined #nim
22:43:45rayman22201I don't see why that should stop me from submitting a PR to fix my thing? it needs to be fixed either way.
22:43:54*oxymoron joined #nim
22:44:25disrupteki agree.
22:45:27rayman22201almost a good excuse to do nothing and drink beer instead :-P
22:45:58*beatmox joined #nim
22:46:24rayman22201I should check if the other selector backends have the same bug. If epoll has it, chances are the others do to :-/
22:46:43*hami quit (Ping timeout: 268 seconds)
23:07:34FromDiscord<Kiloneie> @Pistos just type my name in youtube
23:08:38FromDiscord<Kiloneie> https://youtu.be/5tVIsDYPClA
23:11:09*krux02__ joined #nim
23:12:19*oxymoron quit (Quit: Leaving)
23:13:52*krux02_ quit (Ping timeout: 264 seconds)
23:15:50rayman22201https://github.com/nim-lang/Nim/pull/12371
23:23:37*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzzโ€ฆ)
23:24:18*shomodj joined #nim
23:24:24*shomodj quit (Client Quit)
23:24:31leorizePistos: packedjson is faster and is more memory conservative
23:25:19leorizeit doesn't share the same api with stdlib json though
23:25:44leorizeas for orm I'd say that ormin looks better
23:26:09leorizenorm lacks a proper custom querying api last time I checked
23:26:37leorizewhich means that you will pull the entire object from the database everytime you wanted to access anything, not really a nice thing
23:35:55rayman22201Does anybody know which ioselector backend Mac uses?
23:42:30Pistosleorize: At this point, I am aiming for ease of development, so, whichever has the nicer interface/syntax.
23:42:40Pistosre: json
23:43:02disrupteki would stick with stdlib version until you need to move away from it.
23:44:14Pistosdisruptek: That's my thinking, too.
23:44:45Pistosleorize: ormin looks really skimpy on documentation, though.
23:50:17*Tyresc quit (Ping timeout: 240 seconds)
23:56:28sealmovewow, I think we got many fresh Nim users since v1 was released!
23:57:51*laaron joined #nim