<< 16-12-2018 >>

00:07:22*Trustable quit (Remote host closed the connection)
00:09:23*wildlander quit (Quit: Konversation terminated!)
00:16:55*fthe quit (Ping timeout: 250 seconds)
00:21:54shashlick@mratsim: that screenshot of the performance per proc is nifty
00:22:03shashlickHow'd they get that
00:22:33shashlickYou looks like
00:25:22shashlickedcragg: list.head is not a ref object
00:36:04FromGitter<mratsim> @shashlick, Apple Instruments
00:36:26FromGitter<mratsim> it’s the time profiler
00:38:53*zachk quit (Quit: Leaving)
00:45:21shashlickMac only then
00:46:10FromGitter<mratsim> Intel VTune can give the same data
00:46:15shashlickNim devel is still broken with nimble packages
00:46:17FromGitter<mratsim> and `perf` as well
00:46:23shashlickWill check it out
01:00:55edcraggshashlick: ah yes, indeed, thanks
01:03:15*ng0 quit (Remote host closed the connection)
01:03:50shashlickI don't know if it's possible to get a ref to an existing object
01:04:13*ng0 joined #nim
01:08:21*Notkea joined #nim
01:17:20*smt quit (Quit: Leaving)
02:06:07*lritter joined #nim
02:14:33*rayman22201 quit (Ping timeout: 256 seconds)
02:16:17*ng0 quit (Quit: Alexa, when is the end of world?)
02:18:59*kapil____ quit (Quit: Connection closed for inactivity)
02:23:41*kapil____ joined #nim
02:30:21FromGitter<deech> What is the difference between `let i {.compileTime.} : int = 0` and `const i : int = 0`?
02:31:23shashlickIf compile time only then i won't be present at runtime
02:31:41shashlickconst i will be present at runtime
02:32:12shashlickThat's my experience at least
02:33:33FromGitter<deech> So the following `echo ...` is be a compile time error? ⏎ ⏎ ```let i {.compileTime.} = 0 ⏎ echo i``` [https://gitter.im/nim-lang/Nim?at=5c15b97cc428e9539d461c9f]
03:08:48*banc quit (Quit: Bye)
03:17:05shashlicklooks like you found a bug
03:17:21shashlickit compiles fine in Nim but the resulting C code doesn't compile
03:24:54*Tyresc quit (Quit: WeeChat 2.3-dev)
03:25:00FromGitter<deech> I reported it. https://github.com/nim-lang/Nim/issues/9970. I was going to take a shot at fixing it and wanted to know if it was supported behavior.
03:25:00*banc joined #nim
03:25:38shashlicki'm not really sure if it's a regression or not
03:26:22shashlickif you try `static: echo i` it will print at compile time
03:33:12FromGitter<deech> Is there ever a time when the `{.compileTime.}` does something different from`static: ...`?.
03:54:18*onionhammer quit (Quit: WeeChat 1.9.1)
04:28:11*rayman22201 joined #nim
04:32:06*theelous3 quit (Ping timeout: 250 seconds)
04:35:08*abm quit (Ping timeout: 250 seconds)
04:38:39*banc quit (Ping timeout: 250 seconds)
04:45:22*banc joined #nim
04:48:08*lritter quit (Ping timeout: 250 seconds)
04:48:58*lritter joined #nim
04:52:08FromGitter<timotheecour> @araq @nc-x @kaushalmodi @narimiran I fixed the nims regression here: https://github.com/nim-lang/Nim/pull/10007
05:01:23*gmpreussner_ joined #nim
05:01:43*gmpreussner quit (Ping timeout: 245 seconds)
05:31:52*dddddd quit (Remote host closed the connection)
05:34:34FromDiscord_<exelotl> yeet https://i.imgur.com/YcpoABl.png
05:39:53shashlick@timotheecour: does it fix the nimble issue as well?
05:42:11*nc-x joined #nim
05:45:12nc-x@timotheecour haven't looked at your changes, but they seem wrong because https://travis-ci.org/nim-lang/Nim/builds/468568083 travis has been going for 2 hours.
05:47:56nc-xBut travis should have timed out by now.
05:48:04nc-xSo no idea what is going on here.
05:48:15FromGitter<zacharycarter> exelotl: nice
05:49:19nc-xshashlick: most probably not. Because nimble isn't broken due to nimscript changes.
05:50:50nc-xAnyone having access to nim-lang travis account? I think they should stop the above mentioned travis build.
05:51:25nc-xAraq, dom96, narimiran ^^^
05:52:00FromGitter<timotheecour> @nc-x but my local travis succeeded: https://travis-ci.com/timotheecour/Nim/builds/94882738
05:53:03FromGitter<timotheecour> > I think they should stop the above mentioned travis build. ⏎ ⏎ IIRC travis already has a timeout feature
05:55:20nc-xNo idea then what is going on here.
05:56:45FromGitter<timotheecour> @nc-x also, you’re looking at the wrong travis for a past commit (which was updated since)
05:57:33FromGitter<timotheecour> the one for the correct commit (that succeeded on my local travis) is still queued: https://travis-ci.org/nim-lang/Nim/builds/468574011?utm_source=github_status&utm_medium=notification
05:59:24nc-xYes this commit no longer exists because you force-pushed
06:00:15FromGitter<timotheecour> Yup; i could try to kill travis for old travis job but is that really needed? (it’ll timeout as per usual)
06:01:28FromGitter<timotheecour> @shahlick @nc-x regarding nimble issue, whats the link again?
06:01:29nc-xThe timeout is 50 (or 60) minutes AFAIK but it has been going for 2 hours.
06:01:42*narimiran joined #nim
06:02:03nc-x@timotheecour https://github.com/nim-lang/Nim/issues/9991
06:02:42FromGitter<timotheecour> the please submit a bug report regarding fact that travis didn’t timeout (even if u immediately close that bug report, we’ll have a placeholder to investigate)
06:03:45FromGitter<timotheecour> just checked: nimble issue not fixed by my PR, its a separate issue
06:15:55*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
06:16:05nc-xWell, i don't know whether to open the bug in travis repo on nim repo. It could very well be a travis bug. Travis also timeouts if there is no output for 10 minutes.Here it has been stuck with no new output for a very long time.'
06:17:39FromGitter<timotheecour> its probably a travis bug but it affects us, so maybe open and close, so we have a placeholder for further discussion
06:18:16FromGitter<timotheecour> and we can also report to travis but theyre extremely unresponsive from multiple past experiences
06:18:56FromGitter<zacharycarter> will destructors work with gc:none ?
06:19:02FromGitter<zacharycarter> I take it no?
06:22:24nc-xThey should work I think
06:22:48nc-xBut right now they are behind --gc:destructors AFAIK
06:23:03nc-xOnce the work will be completed, they should work with every gc
06:23:08nc-xThat's my guess
06:24:36FromGitter<zacharycarter> yeah - they definitely don't seem to
06:24:50FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c15efb2ae1ab5539ef346d6]
06:24:54FromGitter<zacharycarter> prints 0
06:25:20FromGitter<zacharycarter> and doesn't compile with `--gc:destructors`
06:26:09nc-x@timotheecour https://github.com/nim-lang/Nim/issues/10013
06:26:57nc-xzacharycarter: I think cdome/cooldome uses destructors a lot. He or Araq might be able to answer your questions better.
06:26:59*anamok joined #nim
06:27:01anamokhello
06:27:08FromGitter<zacharycarter> I guess I could potentially use `gc:none` and instead of destructors, implement my own destroy method on all my objects
06:27:11FromGitter<zacharycarter> but it sounds very hacky
06:27:27FromGitter<zacharycarter> nc-x: from my understanding they're not ready...
06:27:31anamokCan we store functions in an array?
06:27:42FromGitter<zacharycarter> you can store pointers to them in an array
06:28:31FromGitter<zacharycarter> meh - I'll just continue on my C++ journey
06:28:35nc-xIn --gc:destructors, gc is only run for refs AFAIK, so that should work fine instead of --gc:none. But, that is, if you think they are ready enough.
06:28:38FromGitter<zacharycarter> at least there I'm making progress
06:29:51anamokzacharycarter: Do you have an example? Let's take this function: `func twice(n: int) = 2 * n`. How to store it in an array? Then how to use it from the array?
06:32:29FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c15f17d539aca60b21951ac]
06:33:18FromGitter<zacharycarter> sorry
06:33:23FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c15f1b30a86bc6f8db60b8f]
06:34:16*kungtotte joined #nim
06:34:32FromGitter<zacharycarter> nc-x: well `gc:detructors` won't compile on 0.19.0 or devel - so IME it's not worth exploring
06:35:59*nsf quit (Quit: WeeChat 2.3)
06:39:27anamokzacharycarter: Thanks!
06:39:37FromGitter<zacharycarter> sure thing
06:40:35shashlickI don't see why it is stuck
06:40:37shashlicki can kill it
06:41:50nc-xzacharycarter: Ah! In that case, yeah, either you will have to wait some time. Or write in some other language. Or do without destructors.
06:42:01nc-xshashlick: Okay. Thank you.
06:43:32FromGitter<zacharycarter> well I need both destructors and hot code reloading heh
06:43:59FromGitter<zacharycarter> so yeah - C++ it is
06:44:00shashlicknc-x: should I restart it?
06:45:38nc-xshashlick: Nope
06:45:47nc-xThat commit is no longer in use anywhere
06:46:03shashlickokay cool
06:46:32nc-x@zacharycarter: 👍
06:50:21nc-xLooks like a travis bug to me. No new build is being started. https://travis-ci.org/nim-lang/Nim/pull_requests.
06:52:07*ftsf joined #nim
06:55:59*vlad1777d joined #nim
07:06:40*nc-x quit (Quit: Page closed)
07:18:55*vlad1777d quit (Ping timeout: 246 seconds)
08:02:07*narimiran quit (Ping timeout: 240 seconds)
08:16:02anamokzacharycarter: When I call a function from an array, is there a way to figure out the function's name (from inside the function)?
08:16:52anamokSo I call a function from an array, and I want to know the name of the function that was just called.
08:17:10FromGitter<zacharycarter> at runtime?
08:17:17anamokYes.
08:17:45FromGitter<zacharycarter> in a debug build you can use `getFrame().procname` - but that won't be available in a release build
08:18:27FromGitter<zacharycarter> if you're calling the function - don't you already know its name?
08:18:39FromGitter<zacharycarter> I'm not sure what you're trying to do - that's why I'm asking questions
08:19:06FromGitter<zacharycarter> can you do this in C?
08:20:05anamokI have an array that contains lots of function pointers. I call each of them with some input and if the return value satisfies a condition, I want to know which function produced the good output.
08:20:41*dorelix quit (Remote host closed the connection)
08:21:12anamokI have a workaround idea.
08:21:33anamokI build another array with function names as strings.
08:21:34FromGitter<zacharycarter> okay
08:21:49FromGitter<zacharycarter> it sounds like you need an associative array
08:21:52FromGitter<zacharycarter> or a map
08:22:08FromGitter<zacharycarter> in Nim's case - a table
08:22:31anamokthanks, now I can proceed
08:23:45FromGitter<zacharycarter> sure thing
08:52:08*xet7 quit (Ping timeout: 245 seconds)
08:53:16*stefanos82 joined #nim
08:58:14*xet7 joined #nim
08:59:25*azuri5 joined #nim
09:31:03*rockcavera quit (Read error: Connection reset by peer)
09:31:52*rockcavera joined #nim
09:31:52*rockcavera quit (Changing host)
09:31:52*rockcavera joined #nim
09:48:42*nsf joined #nim
09:49:15*azuri5 quit (Quit: azuri5)
09:49:58*narimiran joined #nim
10:09:36anamokbye
10:09:43*anamok quit (Remote host closed the connection)
11:00:48*lritter quit (Ping timeout: 250 seconds)
11:05:42*azuri5 joined #nim
11:06:36*azuri5 quit (Client Quit)
11:09:04*endragor joined #nim
11:17:18*vlad1777d joined #nim
11:18:59*kapil____ quit (Quit: Connection closed for inactivity)
11:20:25*endragor quit (Remote host closed the connection)
11:21:15FromGitter<mratsim> @zacharycarter gc:destructors is only implemented for seq and strings by default, otherwise you need to create your own object type with =destroy.
11:21:33FromGitter<mratsim> gc:none prevents you from using any ref, seq string
11:21:44FromGitter<mratsim> gc:destructor will fallback to ref counting for ref.
11:22:42*endragor joined #nim
11:26:02*ng0 joined #nim
11:30:18*nc-x joined #nim
11:34:51nc-xAraq: Regarding nimscript stuff -> I think the best way forward is to have a cleaned up mini-system.nim, There are too many arguments that the compiler can take, so it is pretty difficult to test them all. Also, `cmdlinehelper.nim` would become a mess if we keep putting all the hacks there.
11:36:55*azuri5 joined #nim
11:46:59*vlad1777d quit (Remote host closed the connection)
11:48:54*vlad1777d joined #nim
11:49:07*ftsf quit (Ping timeout: 240 seconds)
11:50:11*kapil____ joined #nim
11:58:11*Perkol joined #nim
11:58:56nc-xAnd it would probably be a good time to split up system.nim into multiple parts so that mini-system.nim can use some of those parts. Else there will be too much code duplication.
11:59:51*nc-x quit (Quit: Page closed)
12:12:18*Perkol quit (Ping timeout: 250 seconds)
12:18:12*endragor quit (Remote host closed the connection)
12:19:52*endragor joined #nim
12:21:12Araqnc-x: agreed. The common stuff can be put into an include file
12:24:21*endragor quit (Ping timeout: 246 seconds)
12:25:04*dddddd joined #nim
12:30:19FromGitter<Clyybber> Araq: Can we use concepts in the stdlibrary/system.nim yet?
12:35:23*elrood joined #nim
12:48:19*nc-x joined #nim
12:50:09nc-x@Clyybber Currently concepts lead to slow compile times https://github.com/nim-lang/Nim/issues/9422, and so some people are against using concepts in the compiler/stdlib till (atleast) this is fixed.
12:50:53*nc-x quit (Client Quit)
13:11:38FromGitter<Clyybber> Oh, so no progress on that :(
13:13:55*fthe joined #nim
13:22:47*azuri5 quit (Quit: azuri5)
13:27:09FromDiscord_<Fumbleforce> How can I get the string value of an enum?
13:27:39*theelous3 joined #nim
13:28:41FromGitter<Clyybber> Have you tried `$`?
13:29:28*azuri5 joined #nim
13:29:45FromDiscord_<Fumbleforce> Um, I totally forgot about that operator! thanks!
13:31:38FromGitter<Clyybber> Np
13:33:03*nsf quit (Quit: WeeChat 2.3)
13:35:54*elrood quit (Remote host closed the connection)
13:39:47FromGitter<GULPF> @Araq Does `{.push debugger:off.}` still have a purpose in the stdlib or can it be removed? Newer modules don't have it.
13:47:55*ftsf joined #nim
13:55:48*slug_ joined #nim
14:06:51*slug_ quit (Ping timeout: 256 seconds)
14:08:57FromDiscord_<PusiteGA> are there securewebsockets in nim
14:10:32FromGitter<zacharycarter> @mratsim - that's what I'm after, so I can introduce RAII semantics
14:10:34FromGitter<zacharycarter> and custom allocators
14:11:05FromGitter<zacharycarter> and I don't want to deal with thread local storage
14:11:21FromGitter<zacharycarter> not sure if gc:destructors get me there or not - I guess if I just don't use any refs?
14:14:05*NimBot joined #nim
14:22:53*Snircle joined #nim
14:35:07ftheman, AOC day 12 (pt2) is killing me
14:38:07narimiranfthe: day 12 was the most boring for me
14:39:13ftheMy plants are growing by 1 to the right every generation, so while I got pt1, with pt2 my plant array/string is growing towards 50bn...
14:44:51*abm joined #nim
14:46:37fthenarimiran: I'm actually reading your solution, but I really don't get that early exit trick you are using
14:48:38narimiranfthe: try to print for example 200th, 201st, 202nd generation
14:48:47narimiranyou'll notice a pattern
14:49:55ftheI see. Wow. I guess you really have to figure out that the automaton will "stabilize" at one point
14:51:15narimiranfthe: that 'figure out' part is why i find that task meh
14:51:50narimiranwell, at least i've solved it, unlike day15, which i didn't even bother to read till the end
14:52:26edcraggthe last few have been very, lets say, long-winded
14:53:10narimiranedcragg: yeah, but at least day16 (today) was kinda fun
14:54:12edcraggyeah, the "let's make a VM" tasks, they've had them i think the last two years too iirc
14:54:37edcraggalways kinda fun
14:55:09narimiranyup, so called 'assembunny', they have it every year
14:55:21edcragghaha, that's it yeah :D
14:56:29*azuri5 quit (Quit: azuri5)
15:02:11*ftsf quit (Ping timeout: 246 seconds)
15:05:38FromGitter<Clyybber> Is it possible to create a macro that overwrites existing proc definitions
15:05:43FromGitter<Clyybber> ?
15:06:33edcraggnarimiran: this one, where part 2 is basically compiler optimisation, hmm https://adventofcode.com/2017/day/23
15:07:36narimiranedcragg: i liked that one, solved it "manually", by writing on paper what's going on
15:09:56fthewell, nailed day12 with narimiran's trick, thanks. Pretty sure it would have taken me weeks to figure it out :\
15:11:18*endragor joined #nim
15:14:28*edcragg has a feeling the "trick" could be the only practical way to solve it :)
15:15:38narimiranfthe: btw, who are you on our leaderboard?
15:18:51fthedidn't register, since I'm really not doing it competitively (ie still on day 12)
15:19:31narimiranfthe: doesn't matter, lots of players who are not up to date. join the fun ;)
15:20:38ftheedcragg: I have a feeling you are correct. I guess the "50 billion" number should be a hint towards that
15:22:40*endragor quit (Remote host closed the connection)
15:23:06fthenarimiran: alright, just joined as auxym (I lost my freenode password for that nick a while ago). #41, not too bad
15:23:20*narimiran thumbs up
15:25:04*azuri5 joined #nim
15:30:18*fthe quit (Remote host closed the connection)
15:30:40*fthe joined #nim
15:32:12FromGitter<Clyybber> It really sucks that nimble doesn't work with devel nim atm
15:35:40*wildlander joined #nim
15:37:30*azuri5 quit (Quit: azuri5)
15:41:35*azuri5 joined #nim
15:42:15*azuri5 quit (Client Quit)
15:42:56*azuri5 joined #nim
15:48:59*nsf joined #nim
16:00:11FromDiscord_<exelotl> if I'm importing a struct type from C, and that struct has some alignment attributes specified, can things go wrong when I try to use it from Nim?
16:03:25*Vladar joined #nim
16:04:42edcraggwould that just be handled by the c compiler, and the nim bindings just refer to structs by field names at an abi level? (i'm a nim noob so don't know, but interesting question)
16:05:47FromDiscord_<exelotl> it looks like it's OK according to this issue: https://github.com/nim-lang/Nim/issues/1930
16:06:43FromDiscord_<exelotl> I can just use header and importc and the nim compiler won't try to make any assumptions about the size or layout of the struct
16:17:05narimiranpushed my day16 solution. here's a thank you to Zevv for the enum idea!
16:29:28edcraggis there a way to assign an array from a seq? casting it appears to do some odd things
16:32:40FromGitter<zacharycarter> well yes - I don't think casting would work
16:33:05FromGitter<zacharycarter> I would think you would have to iterate over the sequence and assign its contents to the array
16:33:12FromGitter<zacharycarter> but there might be some shortcut - I'm just not aware of one
16:34:25narimiranedcragg: what are you trying to do?
16:34:51narimiranor to put it differently: why do you need that?
16:35:17FromGitter<zacharycarter> edcragg: see https://forum.nim-lang.org/t/3991
16:36:23FromGitter<zacharycarter> and it's a good idea to read all the way through - because the initial suggestion results in a size increase for the resulting binary
16:38:40*l1x joined #nim
16:38:51l1xhi
16:38:59narimiranl1x: hi
16:39:17l1xwhat is the way of exporting a function in nim? I am trying to use jester as a module
16:39:27narimiranl1x: funcname*
16:39:47l1xhttps://gist.github.com/l1x/cacc2c63c11ea3af61ca7141336875e8
16:40:14l1xrunForever() is the function
16:40:25l1xnarimiran: I wanted to ask what is *?
16:40:34l1xsomething* < what does this mean?
16:40:47narimiranit's a flag that the function is exported/public
16:40:55edcraggnarimiran: i have objects which contain fields which are lists of values, of known length. for that a fixed array would suffice, but i have processing that results in a seq and i just want to copy from the seq to the array by value. I'm hesitant from putting a seq in an object for performance reasons, since i assumed they would be dynamically allocated, though i guess in practice it's probably not that bad
16:41:14l1xnarimiran: thanks
16:41:25l1xand runForever() can be export?
16:41:33FromGitter<zacharycarter> it already is exported
16:41:52FromGitter<zacharycarter> I think there is conflation going on here
16:42:04l1xzacharycarter[m4: not sure what you mean
16:42:16FromGitter<zacharycarter> there is a difference between exporting an identifier and exposing it
16:42:24l1xahh
16:42:27FromGitter<zacharycarter> so for instance `var foo* = 1`
16:42:30FromGitter<zacharycarter> is not the same as
16:42:39FromGitter<zacharycarter> `var foo = 1; export foo;`
16:43:19FromGitter<zacharycarter> in fact - the second example is probably invalid
16:43:24FromGitter<zacharycarter> the second example should look like
16:43:29narimiranedcragg: now for the stupid question: can you change your processing to output an array?
16:43:33l1xzacharycarter[m4: so what is the idiomatic way of using jester with runForever() called from the other file?
16:43:48FromGitter<zacharycarter> ```type Foo = object ⏎ export foo``` [https://gitter.im/nim-lang/Nim?at=5c1680c472f31355cd653c8b]
16:44:13FromGitter<zacharycarter> l1x: `runForever` doesn't reside in Jester - it resides in the stdlib module `asyncdispatch`
16:44:19FromGitter<zacharycarter> so what you're looking for is -
16:44:36FromGitter<zacharycarter> ```import runForever from asyncdispatch ⏎ ⏎ export runForever``` [https://gitter.im/nim-lang/Nim?at=5c1680f4039551387fa9721b]
16:44:51FromGitter<l1x> hmm, interestng
16:45:08FromGitter<l1x> let me check this
16:45:09narimiranis `import foo from bar` valid syntax? it should be `from bar import foo`, AFAIK
16:45:12FromGitter<zacharycarter> https://github.com/nim-lang/Nim/blob/master/lib/pure/asyncdispatch.nim#L1646
16:45:23FromGitter<zacharycarter> yeah - you're right narimiran
16:45:36edcraggnarimiran: hehe, well, for some reason, my nice neat `array.map(parseInt)` seems to return a seq
16:45:37*Trustable joined #nim
16:45:40FromGitter<zacharycarter> sorry - I'm forgetting Nim already since the switch to cpp :P
16:46:03narimiranedcragg: hehe, i thougth it might be something from sequtils :)
16:46:47edcraggmakes sense actually :P
16:47:03FromGitter<zacharycarter> one nice thing I missed about C++ is - there's so much already-existing code out there, it's quite easy to get the core of a game engine cobbled together in a couple of days
16:47:12FromGitter<zacharycarter> https://github.com/zacharycarter/zeal
16:47:43FromGitter<zacharycarter> I plan on using Nim for the editor - and other tools, and I plan on supporting game code residing in shared libraries, so you'll be able to use Nim to write gameplay code
16:47:51*endragor joined #nim
16:48:48*Arch joined #nim
16:49:33edcraggnarimiran: it just seems to me that it could be easier than it seems to be to convert between the two types, certainly if a seq is implemented anything like, a c++ vector, for example
16:49:36*Arch quit (Client Quit)
16:50:20FromGitter<l1x> @zacharycarter https://github.com/LambdaInsight/tillage/blob/master/nimrod/src/http.nim https://github.com/LambdaInsight/tillage/blob/master/nimrod/src/http.nim
16:50:47narimiranedcragg: in the mean time, instead of map, you can do for-loop in a block (give me a minute for an example)
16:51:04FromGitter<l1x> ... http.nim(2, 8) Error: cannot open file: runForever
16:51:11FromGitter<zacharycarter> remove the http.
16:51:20FromGitter<zacharycarter> also - you don't need to surround your module name in quotes in the import statement
16:51:55FromGitter<l1x> @zacharycarter done
16:52:11FromGitter<zacharycarter> did that fix it?
16:52:18FromGitter<l1x> still ... http.nim(2, 8) Error: cannot open file: runForever
16:52:47FromGitter<zacharycarter> oh... sorry l1x - I thought you had seen narimiran's message
16:52:54FromGitter<zacharycarter> I got the syntax wrong on the import from statement
16:53:03FromGitter<zacharycarter> it should be - `from asyncdispatch import runForever`
16:53:08FromGitter<zacharycarter> my bad
16:53:23narimiranedcragg: http://ix.io/1w9d/nim (not as clean as `map`, i know)
16:54:14FromGitter<l1x> @zacharycarter excellent this works
16:54:25FromGitter<zacharycarter> 👍
16:55:39FromGitter<l1x> hmm the only problem that the http server starts automatically
16:57:15AraqGULPF: it has no point
16:58:47FromGitter<zacharycarter> l1x that's because you have `runForever()` at the entry point of your application
16:59:09FromGitter<l1x> even if I remove it it is called somewhere implicitly
16:59:14FromGitter<zacharycarter> that's going to start the polling loop
16:59:24FromGitter<zacharycarter> probably by Jester I imagine?
17:00:10FromGitter<l1x> yes
17:01:30FromGitter<zacharycarter> the routes macro starts up the server
17:01:40FromGitter<zacharycarter> https://github.com/dom96/jester/blob/master/jester.nim#L1323
17:02:28edcraggnarimiran: thanks, interesting :) block is a new keyword for me... seems like a neat way of doing rust-like expression evaluation, which is something i have been yearning for in nim actually
17:03:02FromGitter<l1x> @zacharycarter thanks!
17:03:09FromGitter<zacharycarter> np!
17:03:19FromGitter<l1x> can Jester be used as a proper lib with explicit start?
17:03:26FromGitter<l1x> maybe it is not even supported
17:04:41FromGitter<zacharycarter> well the serve proc is exposed by the jester module - https://github.com/dom96/jester/blob/master/jester.nim#L444
17:04:51FromGitter<zacharycarter> so yes, but then you'd have to figure out how to live without the routes macro
17:05:01FromGitter<l1x> well
17:05:13narimiranedcragg: i usually wrote procedures for these kinds of stuff, before i discovered `block` :)
17:05:15FromGitter<l1x> maybe I flip the thing and put jester in the main and call everything before that
17:06:00FromGitter<zacharycarter> that's an idea
17:06:26FromGitter<zacharycarter> orrrr you could issue a RFC / PR to Jester to ask for a way to still leverage the routes macro and not have the httpserver started as a side effect
17:07:44FromGitter<zacharycarter> but then you need to convince the author, and possibly others, that the change is worth it
17:07:46*azuri5 quit (Quit: azuri5)
17:13:08*azuri5 joined #nim
17:14:33dom96You can create routes without jester implicitly adding the `runForever`
17:14:43dom96try: routes myRouteName: ...
17:17:44FromGitter<zacharycarter> no that's not the problem dom96
17:17:50FromGitter<zacharycarter> he's worried about the implicit http.serve
17:17:54FromGitter<zacharycarter> via routes
17:18:45dom96yeah, that should also be prevented if he gives his route a name
17:18:47*narimiran quit (Remote host closed the connection)
17:19:28FromGitter<zacharycarter> @l1x ^
17:28:39*narimiran joined #nim
17:40:47*fthe quit (Ping timeout: 240 seconds)
17:45:08*Vladar quit (Remote host closed the connection)
17:45:49*abm quit (Quit: Leaving)
17:51:41*Trustable quit (Remote host closed the connection)
17:53:08*stefanos82 quit (Read error: Connection reset by peer)
18:00:45xaceis there a nim equivalent of the `static` from C? or should i use `var persistentVariable {.global.}` ?
18:01:10xace(I need the function to remember the value from previous executions)
18:02:29*stefanos82 joined #nim
18:03:49*endragor quit (Remote host closed the connection)
18:04:03FromGitter<zacharycarter> xace: yes - you need the global pragma for that
18:04:20FromGitter<zacharycarter> Nim's `static` is not C's `static`
18:05:03FromGitter<zacharycarter> https://nim-lang.org/docs/manual.html#statements-and-expressions-static-statementslashexpression
18:05:18xacethanks ill check it out
18:05:26FromGitter<zacharycarter> sure thing
18:10:32*narimiran quit (Remote host closed the connection)
18:40:19*theelous3 quit (Ping timeout: 244 seconds)
18:43:13FromGitter<deech> Anyone know of any Nim communities in the US? Maybe even the Midwest?
18:44:37FromGitter<kinkinkijkin> I think the entire nim community is online
18:45:31FromGitter<deech> haha! But you people are all real humans, right? :)
18:45:41FromGitter<l1x> @dom96 is there any reason to use this many implicit in Jester?
18:46:27FromGitter<l1x> I mean, I would rather not have to figure out that route macros has 2 different behaviours based on named or unnamed routes
18:46:35sendell[m]is there a nim lib for reading exif data from files? couldn't find one
18:48:53FromGitter<zacharycarter> @deech - Nim users are very scattered, a lot of the core contributors are not US based
18:49:03FromGitter<zacharycarter> or core devs rather
18:49:30FromGitter<zacharycarter> there are a few users in VA, and then a bunch scattered across the US, but the only meetups / conferences I've seen Nim featured at have been Europe based
18:49:59FromGitter<kinkinkijkin> I've yet to see another québecois who uses nim
18:50:04FromGitter<zacharycarter> @l1x - dom doesn't always use gitter, best to try just pinging him with his irc handle dom96
18:50:14FromGitter<zacharycarter> in case you didn't know - gitter and IRC are bridged together
18:50:57FromGitter<kinkinkijkin> where again is the irc ? freenode ? gitter slows down the computer I'm on right now quite a bit but irc does not
18:53:12Araqfreenode, yes
18:53:33FromGitter<deech> @zacharycarter That makes sense. I don't see much representation in US tech circles.
18:53:50*kinkinkijkin joined #nim
18:54:23FromGitter<zacharycarter> well - I don't think many tech companies have become Nim adopters yet, for varying reasons I suppose
18:54:26kinkinkijkinalright, thanks
18:54:52FromGitter<zacharycarter> or at least, not many companies are using it as their primary language that they develop software in
18:55:42kinkinkijkinI think of programming in a mix of nim and C#, but this is not a common case
19:03:45shashlick@deech: I'm in the midwest timezone at least
19:05:57FromGitter<deech> @zacharycarter It has a lot to offer.
19:06:31FromGitter<zacharycarter> it does - but it has a ways to go to be better or even a viable alternative to the competition in certain areas
19:06:46shashlickdom96: I seem to have found a bug with nimble - when you install nimterop, nimble installs its dependencies (treesitter_c) just fine but compile fails since nimble points to the temp directory where treesitter_c was installed from instead of the ~/.nimble/pkgs dir
19:06:48dom96l1x: mainly because most of the time it's what you want to do and also it's how Sinatra works and Jester emulates it
19:07:05shashlicki suspect it is because treesitter modules are subdirs but have no evidence yet
19:07:10FromGitter<deech> @zacharycarter Oh absolutely.
19:07:20l1x@dom96 thanks for the explanation
19:08:08shashlickdom96: --path:"C:\Users\gt\AppData\Local\Temp\nimble_4336\githubcom_genotrancenimtreesitter_0.1.0\treesitter_c" shows up in the compile path
19:08:29shashlickif I try nimble install again, it works since packages are already installed
19:11:11dom96sounds like an edge case that only your package runs into because it generates the modules at install time?
19:11:39shashlickwell, everything is in place in the pkgs directory but nimble still points to the temp directory
19:15:22*littleli joined #nim
19:22:34*Vladar joined #nim
19:22:42*mr_yogurt quit (Quit: quit)
19:33:06FromGitter<Clyybber> @deech Did you do a presentation of ATS sometime?
19:42:00FromGitter<deech> Yes
19:48:24livcdtreeform: are you around ?
19:49:36*narimiran joined #nim
19:54:56*nsf quit (Quit: WeeChat 2.3)
20:00:03*thomasross quit (Ping timeout: 268 seconds)
20:04:02FromGitter<Clyybber> @deech Cool, really good talk!
20:06:05*azuri5 quit (Quit: azuri5)
20:06:58*azuri5 joined #nim
20:15:57FromGitter<zacharycarter> \o/ project is building again
20:28:27*Tyresc joined #nim
20:29:06*druonysus quit (Quit: druonysus)
20:31:30*thomasross joined #nim
20:33:39*azuri5 quit (Ping timeout: 264 seconds)
20:34:41*istvan joined #nim
20:36:20*istvan quit (Client Quit)
20:37:50*miran joined #nim
20:40:13*narimiran quit (Ping timeout: 250 seconds)
20:48:58*fthe joined #nim
20:54:47*fthe quit (Remote host closed the connection)
21:03:48*nograve joined #nim
21:04:48*nograve quit (Client Quit)
21:05:14*miran quit (Remote host closed the connection)
21:06:01*thomasross quit (Quit: Leaving)
21:06:19*thomasross joined #nim
21:12:40*Vladar quit (Remote host closed the connection)
21:13:28FromGitter<deech> @Clyybber Thanks!
21:28:59*kapil____ quit (Quit: Connection closed for inactivity)
21:32:58*littleli quit (Read error: Connection reset by peer)
21:38:59*fthe joined #nim
22:48:42kinkinkijkinI can't seem to find this and unfortunately forgot, how do I iterate over the items of a seq ?
22:49:10kinkinkijkini havent actually programmed in a few months
22:50:42shashlickfor i in seq:
22:51:20kinkinkijkinthanks
22:51:36shashlickOr for i in 0 .. seq.len-1: seq[i]
22:51:36FromDiscord_<exelotl> oh, fug
22:51:57FromDiscord_<exelotl> I can't do sizeof on types that are imported from C
23:07:35*theelous3 joined #nim
23:08:01*rayman22201 quit (Ping timeout: 256 seconds)
23:11:27FromGitter<zacharycarter> exelotol: ``` ⏎ {.emit: """/*TYPESECTION*/ ⏎ typedef struct{ ⏎ float a; float b; ⏎ } Foo; ... [https://gitter.im/nim-lang/Nim?at=5c16db9fb4c74555ccdb7b1f]
23:11:53FromGitter<zacharycarter> sorry
23:11:56FromGitter<zacharycarter> that didn't format properly
23:12:00FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c16dbc0c428e9539d4cd636]
23:22:26FromDiscord_<exelotl> zacharycarter: ah I see, the problem isn't what I thought then
23:22:42FromDiscord_<exelotl> but rather, it's not possible to use sizeof at compile time, at all
23:23:25FromDiscord_<exelotl> at least not for object types
23:36:42kinkinkijkinhow long is a "very long" string, to be considerable for using a rope instead of a string ?
23:39:30kinkinkijkinim going to be using one or the other to store loaded code of essentially a compression-based macro language
23:40:42kinkinkijkinthe average file would be maybe 70 lines of 50-100 chars per line
23:47:32FromGitter<zacharycarter> kinkinkijkin: I think ropes are mostly used for building long strings
23:47:42FromGitter<zacharycarter> where you need lots of concatenation
23:47:55FromGitter<zacharycarter> you ultimately end up converting them to Nim strings anyay
23:48:00FromGitter<zacharycarter> anyway*
23:50:31*stefanos82 quit (Remote host closed the connection)
23:52:01kinkinkijkinah
23:56:48*fthe quit (Remote host closed the connection)
23:57:02FromGitter<zacharycarter> if you search for usages of the ropes module in the stdlib, you'll see they're used substantially in the compiler code
23:57:43FromGitter<zacharycarter> well I guess the compiler isn't the std - but just search in the Nim sources in general
23:57:52FromGitter<zacharycarter> and you can get a gist of how they're being used