<< 16-10-2018 >>

00:09:51FromGitter<yyyc514> "Hi Jester, Thanks a lot for the tip. Today I started to get name conflicts on autogenerated imports. I have macro that scans all nim files and imports those that have tests in them."
00:09:55FromGitter<yyyc514> so maybe this is possible?
00:09:57FromGitter<yyyc514> https://forum.nim-lang.org/t/3154
00:12:47FromGitter<yyyc514> ok so now it works, damn why didn’t it work yesterday
00:13:40*dddddd quit (Remote host closed the connection)
00:14:17FromGitter<yyyc514> ok if you keep it in the top level with a chain of macros/templates it works, but throw a proc in there and it’s no longer “top-level” which makes sense i guess
00:21:33*Tortice quit (Remote host closed the connection)
00:22:00*Tortice joined #nim
00:30:50*Tyra joined #nim
00:32:36*vlad1777d__ quit (Ping timeout: 272 seconds)
00:35:15*Tyra quit (Ping timeout: 256 seconds)
00:42:26*zachk quit (Quit: Leaving)
00:51:57*vivus quit (Remote host closed the connection)
01:24:43*stefanos82 quit (Quit: Quitting for now...)
01:42:23*craigger joined #nim
01:43:51*craigger_ quit (Ping timeout: 260 seconds)
01:45:39*guin joined #nim
01:50:03*guin quit (Ping timeout: 256 seconds)
01:56:00*persi_ joined #nim
02:03:27*krux02 quit (Remote host closed the connection)
02:04:13*persi_ quit (Ping timeout: 256 seconds)
02:04:50*banc quit (Quit: ZNC - http://znc.in)
02:20:49*banc joined #nim
02:33:19*endragor joined #nim
02:34:46*craigger quit (Read error: Connection reset by peer)
02:36:24*craigger joined #nim
03:08:31*erasi12 joined #nim
03:08:42*erasi12 left #nim (#nim)
03:14:51*chemist69 quit (Ping timeout: 260 seconds)
03:16:31*chemist69 joined #nim
03:19:52FromGitter<Epictek> Hmm nimble seems to have randomly broke, any ideas? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bc558d882893a2f3beac982]
03:39:52FromGitter<Epictek> fixed it by using choosenim instead
03:40:01*flaviu quit (Ping timeout: 250 seconds)
03:44:17*flaviu joined #nim
04:30:35*darithorn quit ()
04:40:29*tiorock joined #nim
04:40:29*tiorock quit (Changing host)
04:40:29*tiorock joined #nim
04:40:29*rockcavera quit (Killed (leguin.freenode.net (Nickname regained by services)))
04:40:30*tiorock is now known as rockcavera
04:49:31*Pisuke joined #nim
04:50:26*MyMind quit (Ping timeout: 276 seconds)
05:06:47FromGitter<yyyc514> too bad overloads don’t also consider the return value
05:35:38*nsf joined #nim
05:44:45*smt quit (Read error: Connection reset by peer)
05:54:47*flaviu quit (Ping timeout: 276 seconds)
06:35:01*rewadz joined #nim
06:50:55copygirlMhh it's not possible to mark types as compile time only?
06:51:21FromGitter<yyyc514> i presume if they werne’t used they’d just be removed by the compiler?
06:52:54copygirlAlso possible, but the same could be true for unused methods, right? It would be nice to enforce and mark such types as such.
06:53:47FromGitter<yyyc514> sorry don’t know
06:54:10FromGitter<yyyc514> i think the methods might actually have a reason that you tag them but i’m not sure
06:55:00leorizecopygirl: I think the `static[T]` types are compile time only
07:00:59Araqtypes are *always* compile-time, all of them. you cannot "optimize them away" because they don't generate code to begin with.
07:02:37copygirlI was just thinking of marking them explicitly as such so they can't be used in a non compile-time context.
07:03:31Araqadd a 'field: NimNode' to get that :P but I don't think it's required
07:15:40*vegai left #nim (#nim)
07:24:06FromGitter<gogolxdong> Windows compile broke ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bc59216ef4afc4f288009b4]
07:28:24FromGitter<narimiran> @gogolxdong https://github.com/nim-lang/Nim/issues/9375 ?
07:50:14FromGitter<yyyc514> how does one typicall deal with the need for “nil”? Like if I search the DB for a record it either returns or it’s not found? what’s the right way to model that in Nim?
07:53:08FromGitter<gogolxdong> probably, I'm using gcc 8.1.0
07:57:40FromGitter<alehander42> @yyyc514 I'd use `Option`
07:57:45FromGitter<alehander42> from the options module
08:00:17FromGitter<mratsim> @yyyc514 you can write import with macros and templates as long as it puts imports at the top level
08:00:30FromGitter<yyyc514> yeah i think i got that sorted now
08:05:06FromGitter<yyyc514> hmmm options is weird/interesting
08:05:55*benjikun joined #nim
08:06:12*sagax_ joined #nim
08:15:58*Reslnqme joined #nim
08:16:04FromGitter<bpo217> @yyyc514 You could use optional
08:16:10FromGitter<bpo217> Or Option[T]
08:16:36FromGitter<bpo217> @yyyc514 Let me rephrase, you could use Option[T]
08:17:20FromGitter<bpo217> oh we already said this my b
08:20:29*Reslnqme quit (Ping timeout: 256 seconds)
08:24:10*redlegion quit (Quit: Ded.)
08:25:52FromGitter<yyyc514> looks kinda verbose
08:26:44FromGitter<yyyc514> https://gist.github.com/yyyc514/7dd53e95e1019e0848076bdd0daa51d5
08:28:14FromGitter<alehander42> you don't have to always use `()` (you can `tmp.isSome` and `tmp.get`, ofc, it's a matter of taste)
08:28:27FromGitter<alehander42> well, it's more type-safe
08:28:39FromGitter<yyyc514> oh sure, but that doesn’t make it shorter :)
08:28:59FromGitter<alehander42> `tmp.isSome` vs `tmp.isNil` is the same amount of code
08:29:00*redlegion joined #nim
08:29:00*redlegion quit (Changing host)
08:29:00*redlegion joined #nim
08:29:13FromGitter<alehander42> you do have `tmp.get` for now
08:29:32FromGitter<yyyc514> how do nils work? just with refs?
08:29:56FromGitter<alehander42> eventually pattern matching can remove this `.get` too (it does now in my lib and in PMunch's proposal, but none of this is in the stdlib)
08:30:11FromGitter<alehander42> I guess refs & ptrs
08:30:20FromGitter<yyyc514> link to your lib?
08:32:59FromGitter<narimiran> @yyyc514 your code with options looks fine to me. what's the problem?
08:33:04FromGitter<alehander42> this is an example, but I admit it's not yet optimized for options https://github.com/alehander42/gara/blob/master/tests/test_gara.nim#L174
08:33:22FromGitter<alehander42> but indeed, I think even in its current form, your code is fine
08:33:50FromGitter<mratsim> options are currently being overhaul’ed to allow `?.` for shorter unwrapping
08:34:47FromGitter<mratsim> but besides assuming that all is always well, there is no way to hide the complexity of null values coming from raw sql queries
08:35:49FromGitter<yyyc514> like tmp.?()
08:35:55FromGitter<yyyc514> vs get?
08:37:15FromGitter<yyyc514> !tmp is interesting too
08:37:58FromGitter<yyyc514> @miran just i’m coming from ruby, so could be i’m hopign for too much :)
08:39:13FromGitter<yyyc514> could also just do find! and have it raise when it can’t find
08:39:43FromGitter<yyyc514> are exceptions slower than normal code that just checks results?
08:46:43leorizeit depends
08:47:14FromGitter<yyyc514> i mean using exceptions for a common case
08:47:16FromGitter<yyyc514> like “not found"
08:47:23Araqthat's bad :P
08:47:25leorizethen it's expensive
08:47:30leorizenot to mention looks ugly as hell
08:48:18FromGitter<yyyc514> thought so
08:51:33*flaviu joined #nim
08:52:58*kapil____ joined #nim
08:54:13FromGitter<alehander42> and it's sometimes harder to reason about
08:55:46*idlebot_ joined #nim
09:00:09*idlebot_ quit (Ping timeout: 256 seconds)
09:00:19FromGitter<yyyc514> anyone familiar with nim-orm?
09:03:15FromGitter<yyyc514> template ormLoad*{user.field}(user: Model, field: expr{field}): expr =
09:03:25FromGitter<yyyc514> trying to understand the {} stuff going on there - never seen that syntax before
09:03:35*gmpreussner joined #nim
09:04:11Araqit a term-rewrite template.
09:04:13*gmpreussner_ quit (Ping timeout: 268 seconds)
09:05:24FromGitter<yyyc514> reading manual now
09:10:42FromGitter<yyyc514> ok starting to thing tempaltes are a lot cooler than i imaged before :)
09:15:01Araqit feels like an abuse of a TR template, I can break this code with --patterns:off
09:15:04AraqI bet :P
09:15:45Araqmaybe try Ormin but sadly I have no time to work on it, contributors welcome
09:17:29FromGitter<7sDream> How can I generate docstring for a type which defined in a macro?
09:19:31Araqtough :-)
09:22:26FromGitter<7sDream> 😛 that’s a bit sad
09:24:22FromGitter<alehander42> Can't we generate comment nodes? or they are just not picked up by the doc gen ?
09:25:32FromGitter<alehander42> on the other hand , why would somebody need those docstrings? for IDE intelligence? (as they might be unique for each compiled program)
09:27:11FromGitter<7sDream> I want to use it to generate document, just like offical document of stdlib
09:27:21FromGitter<7sDream> For my module
09:29:30FromGitter<narimiran> yeah somebody asked/tried that few days ago, but with no success
09:33:26*flaviu quit (Ping timeout: 260 seconds)
09:33:40FromGitter<7sDream> It’s me (I guess
09:34:08FromGitter<7sDream> Just ask if there is any progress...
09:34:30FromGitter<alehander42> I see, I thought the macro is used by users to define their own types(which would be different each time)
09:34:37*xace quit (Read error: Connection reset by peer)
09:35:43*flaviu joined #nim
09:36:39*xace joined #nim
09:37:47FromGitter<gogolxdong> Windows build failed with gcc 7.3.0 too.
09:46:08Araq7sDream: problem is it requires an AST extension/change
09:46:29Araqgogolxdong: try clang or the GCC that 'finish.exe' would download
09:51:09FromGitter<gogolxdong> ok
09:56:57FromGitter<gogolxdong> but what's the problem?
10:03:49FromGitter<gogolxdong> still broken with finish.exe downloaded mingw-6.3.0
10:03:54*freeman_ joined #nim
10:06:26*platoff joined #nim
10:08:09*freeman_ quit (Ping timeout: 256 seconds)
10:10:13*Pisuke quit (Read error: Connection reset by peer)
10:11:18*Pisuke joined #nim
10:17:10*zoro joined #nim
10:21:45*zoro quit (Ping timeout: 256 seconds)
10:26:32*Vladar joined #nim
10:32:09FromGitter<narimiran> "You can use `nim c --nep1:on myfile.nim` to get a style check." -> i've just tried this and nothing happens?
10:34:26FromGitter<narimiran> btw, how to install/use nimpretty?
10:35:53*Vladar quit (Ping timeout: 245 seconds)
10:36:35Araqgogolxdong: well appveyor disagrees and so does my PC
10:40:37*krux02 joined #nim
10:41:51Araqtemp.nim(6, 5) Hint: name should be: 'foo' [Name]
10:41:51*krux02 quit (Remote host closed the connection)
10:41:56Araqworks for me
10:42:48*rokups joined #nim
10:43:24FromGitter<narimiran> oh, it finds capital letter. i was testing it with spaces before :, unnecessary spaces, no spaces where needed, etc.
10:44:17FromGitter<narimiran> i guess nimpretty catches all of these: where can i find it? how to use it?
10:44:42FromGitter<narimiran> https://nim-lang.org/docs/tools.html no mention of nimpretty.
10:48:06*Vladar joined #nim
10:50:00Araq"koch tools"
10:50:14Araqit's not documented because its quality is not good enough
10:50:48*elrood joined #nim
10:53:11*Vladar quit (Remote host closed the connection)
10:55:06FromGitter<kaushalmodi> Araq: Is there a plan to allow a global config.nims?
10:55:30FromGitter<kaushalmodi> I see myself copy pasting the same config.nims tasks to each new project
10:56:45FromGitter<narimiran> is that a reason why it is in nimpretty folder, and not in tools/nimpretty?
11:02:05*abm joined #nim
11:03:26*nc-x joined #nim
11:04:46nc-x @kaushalmodi: What is the use of global config.nims? Isn't build configuration supposed to be bundled together with the source code so that someone else can also compile the project?
11:06:22*nc-x quit (Client Quit)
11:07:06FromGitter<mratsim> one config to rule them all and in the darkness bind them
11:08:08*Vladar joined #nim
11:08:51FromGitter<narimiran> ok, choosenim has made this more difficult than it should be, but i got nimpretty running
11:10:12Araqnarimiran: I hate directories with a passion, they are a productivity killer
11:10:30FromGitter<narimiran> lol, ok :D
11:14:12*Vladar quit (Remote host closed the connection)
11:15:49FromGitter<kaushalmodi> nc-x: I have developed test running, doc generating, binary generating tasks without any project-specific hard coding. I simply copy paste those to each new project. They are not needed for the project to be built by anyone else.
11:16:26FromGitter<kaushalmodi> Also the idea would be that project specific config.nims would append (to the end) of the proposed global config.nims
11:17:10FromGitter<kaushalmodi> So I can have the global config.nims to hold just my tasks, and the project config.nims for project-specific stuff. Araq?
11:19:24poopBothmm do in nim i have to code all my procs infront? Up from call?
11:20:03*tdc quit (Ping timeout: 245 seconds)
11:20:16FromGitter<kaushalmodi> poopBot (umm), yes, or you forward declare
11:20:29*tdc joined #nim
11:20:31poopBotsame for objects i guess
11:20:34Araqkaushalmodi: I don't know, there was a PR for that, maybe /etc/nim/config.nims works now
11:21:05*Vladar joined #nim
11:21:16FromGitter<kaushalmodi> Hmm, I cannot touch the /etc dir (no sudo rights on work machine)
11:22:05FromGitter<kaushalmodi> But I'll dig into the source. If it is you are say, may be change that to XDG_CONFIG_HOME like for the .cfg files
11:26:32Araqor it's ~/.config/nim/config.nims
11:27:07*seni joined #nim
11:32:03*kapil____ quit (Quit: Connection closed for inactivity)
11:35:28FromGitter<kaushalmodi> Thanks, I'll try that out soon.
11:39:05*dddddd joined #nim
11:42:41*Vladar quit (Remote host closed the connection)
11:51:52FromGitter<alehander42> i am almost sure ~/.config/nim.cfg works, I use it for quite some time
11:51:58FromGitter<alehander42> I am not sure about nims
11:57:24poopBotso my first projet i want to make simple alternative to kodi for rpi3, cuz i need it , kodi is troling me a lot on raspbian :)
11:58:11poopBotso number 1 question is i dont want to put all code in 1 file like idiot, so i should use moduls right?
11:59:16poopBotsorry if i offended somone with idiot word xD
11:59:52*Snircle joined #nim
12:00:49poopBotturtorial says module so guess will use that
12:02:37*radioactivity joined #nim
12:03:16*radioactivity quit (Client Quit)
12:11:06FromGitter<alehander42> of course, you should split your code in different files
12:14:12*Vladar joined #nim
12:17:49*sdfsdvavasdv joined #nim
12:24:48FromGitter<narimiran> Araq: you assigned https://github.com/nim-lang/Nim/issues/2361 to me, but i have no idea what to do with it. i've never used {.async.} and i even don't know what i need to import to get rid of "Error: invalid pragma: async" so i can test that snippet
12:25:18poopBotproc Something() {.async.} =
12:25:40poopBotawait somework
12:26:30poopBotfrom what i get {.async.} is used to mark that function/proc an async one
12:26:37poopBotand then you can use await in it
12:26:43Araqnarimiran: you only need to improve the compiler's error message with something like "capturing openArrays would violate memory safety"
12:27:01FromGitter<narimiran> oh, it is "import asyncdispatch"
12:27:05FromGitter<narimiran> ok, will try to do that
12:27:06poopBottought i am newbie sorry if dident hepl
12:27:48FromGitter<narimiran> so it is ok that it works for `seq[int]`?
12:28:17*sdfsdvavasdv quit (Quit: Page closed)
12:28:19Araqwell that's the workaround that needs to be used
12:28:54Araqthe error message could clarify that, ideally it links to some new short "article" in doc/manual/
12:29:19Araqit's 2018, error messages can now contain links
12:29:31FromGitter<narimiran> ok, i'll try to find where the current error is generated and improve on that. but i cannot promise anything
12:29:47Araqthe compiler is grepable
12:30:17Araqoh btw 'koch temp c foo.nim' produces a stack trace telling you where the error inside of the compiler came from
12:31:35AraqI thought it's time you start more interesting work than just merging test files :P
12:31:55*miniminimum joined #nim
12:32:16FromGitter<narimiran> haha, true true :D those merges are my way of relaxing of the usual job i do ;)
12:32:16*PMunch joined #nim
12:32:41FromGitter<narimiran> thanks for the "koch temp" tip — very useful
12:33:21FromGitter<narimiran> *relaxing from my day-job
12:34:41FromGitter<kaushalmodi> Araq: ~/.config/nim/config.nims works! Need to now update the nims.rst
12:35:05FromGitter<kaushalmodi> But now there's a problem.. I don't know how to figure out the nim invocation dir from the config.nims
12:35:25FromGitter<kaushalmodi> earlier I used `thisDir()`, but now `thisDir()` points to ~/.config/nim/
12:35:43AraqprojectDir was added to NimScript
12:35:49Araqcheck it out
12:36:37*miniminimum quit (Ping timeout: 256 seconds)
12:37:32*cei joined #nim
12:38:06*cei quit (Client Quit)
12:38:08*smt joined #nim
12:38:35FromGitter<kaushalmodi> thanks! `projectDir()` works
12:39:02poopBothmm newbie question, i got http token working, but now am converting to async , and i have issue , json now complains how http response is of Future , but i awaited first it so, hmm, anyone care to aleborate , if i await for it (wait for it to finish) should it be like normal or do i need to expiclity cast to nonfuture or what
12:39:53Araqawait is what you should use
12:40:25poopBoti did
12:40:31poopBotsec i hastebin it
12:45:22poopBothttps://hastebin.com/derameqiku.bash
12:45:37poopBotsorry it took a wile head to google Nim multyline comments
12:47:30poopBotAraq, you here?
12:49:30AraqparseJson(await response.body)
12:49:38Araqyou said it yourself...
12:50:40poopBotoh but why am i then 2 times awaiting response?
12:50:48poopBoti await.response
12:50:55poopBotthen await response.body
12:51:48poopBothmm thats wierd in my brain, cuz by my logick when i awaited respons , i waited whole respones, duno why i now how to w8 for body when is allready here
12:52:16poopBotguess thats to fallow sytax
12:52:21poopBotor duno
12:55:31Araqthe body is a stream of stuff that comes after the response, maybe, I hardly use async
12:56:50poopBotoh, i thinked response is like box and all gets filled in it body,header,... and when i awiat it it w8ts for whole box to be deliverd , anyway now it works so np :)
13:00:07*kapil____ joined #nim
13:01:22FromGitter<narimiran> Araq: i followed your hints and this is what i came up with: https://github.com/narimiran/Nim/commit/481cbe29a687a2d61318f019c356cde4e0051137 haven't sent a PR because i'm not sure this is what is needed or that should be fixed some other way
13:02:11FromGitter<alehander42> @poopBot in cases like this, look at the docs(e.g. httpclient here)
13:02:48Araqnarimiran: well this code path is not only for openArray
13:03:00Araq'$1' is of type <$2>, declared here: $3
13:03:04AraqI would make that
13:03:07FromGitter<alehander42> it might be a bit confusing, because the response has a `body` field, but notice it's not public (no `*`), so you have to look at the getter (the proc body )
13:03:45Araq'$1' is of type <$2> which cannot be captured as it would violate memory safety, declared here: $3
13:05:14FromGitter<narimiran> ok, i'll change the message. i wanted to make sure i'm at the right place and i don't need to have some other if-branch, or stuff like that
13:05:31poopBoti looked docs ofc , i try to look there before ask questions
13:06:08*endragor quit (Remote host closed the connection)
13:07:31FromGitter<narimiran> the best/preferred way to wrap too long strings?
13:13:58*flaviu quit (Ping timeout: 268 seconds)
13:14:35*craigger_ joined #nim
13:16:21*craigger quit (Ping timeout: 250 seconds)
13:22:41*xyxfnjpps joined #nim
13:22:55*xyxfnjpps quit (Client Quit)
13:23:01leorizenarimiran: most of the time I use `&`
13:23:09*stefanos82 joined #nim
13:23:30*flaviu joined #nim
13:24:00FromGitter<narimiran> thanks leorize
13:25:14*endragor joined #nim
13:25:48FromGitter<narimiran> nah, it doesn't play well with string interpolation
13:26:02FromDiscord<hotdog> Does anyone have a working example of hot code reloading? I'm looking at the docs here: https://nim-lang.org/docs/nimc.html#additional-features-hot-code-reloading
13:27:54*endragor quit (Remote host closed the connection)
13:29:34FromGitter<Vindaar> @narimiran something like this should work (taking the string from the commit above) ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ where I just defined some proc that only takes one string [https://gitter.im/nim-lang/Nim?at=5bc5e7bebbdc0b25054e386b]
13:29:45*endragor joined #nim
13:30:35*endragor quit (Remote host closed the connection)
13:33:49FromGitter<narimiran> @Vindaar nice one! i had `"foo $1" & "bar $2" % [a, b]`
13:33:59FromGitter<narimiran> that didn't work
13:34:04FromGitter<Vindaar> yep, good point
13:37:32Araq() % []
13:39:45FromGitter<narimiran> that works too
13:39:46FromGitter<Vindaar> oh, that works too. Makes sense, nice!
13:40:46FromGitter<narimiran> i've just submitted @Vindaar's version in the PR. if the second one is preferred, i'll change it
13:41:34FromGitter<Vindaar> Araq's version saves one call to `%`... :)
13:41:35FromGitter<kaushalmodi> Araq: I was working on a PR to update docs for nims
13:41:43leorizeefficency!
13:41:54FromGitter<kaushalmodi> I want to know if the `--skip*` switches apply to config.nims too
13:42:00FromGitter<Vindaar> Although on an error that stops the compilation that's not *really* important, is it? :P
13:42:09FromGitter<kaushalmodi> but cannot find out in the source where those switches are defined
13:42:26leorizekaushalmodi: try it yourself
13:42:29leorizeshould be simple :P
13:42:30FromGitter<kaushalmodi> searching the source just yields refs to their documentation
13:42:38FromGitter<kaushalmodi> leorize: but I want to submit a PR
13:42:42FromGitter<kaushalmodi> so want to be sure
13:42:53leorizelook for the PR that implement the entire thing
13:43:21FromGitter<kaushalmodi> hmm, let me find the commit that added the `--skip*` docs
13:43:33FromGitter<kaushalmodi> hopefully the same commit added that switch implementation too :P
13:43:35Araq#!nimpretty toggle
13:43:39Araqlike that?
13:43:41Araqor
13:43:47Araq#!nimpretty off
13:43:54Araq#!nimpretty on
13:43:59Araqwhat do you think?
13:44:13leorizekaushalmodi: https://github.com/nim-lang/Nim/pull/8682
13:44:21FromGitter<kaushalmodi> leorize: I assumed this :P ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bc5eb346e5a401c2d7ed03c]
13:45:14FromGitter<kaushalmodi> thanks. I now also know why grep failed..
13:45:27FromGitter<kaushalmodi> should have grepped for `skip.*cfg`
13:45:38Araqclang uses on/off, ok
13:47:16*krux02 joined #nim
13:48:55FromGitter<alehander42> I think off/on is much better
13:49:34FromGitter<alehander42> as otherwise you have to look at the whole file to see how many toggles were before the next one
13:50:33Araqok
13:51:41FromGitter<alehander42> btw is it possible to abuse this
13:52:08FromGitter<alehander42> e.g. if I add `#!nimpretty off` to the end of a module that people include a lot, would that apply to their files
13:52:59Araqnimpretty doesn't know shit about modules, it's just a parser over the current file
13:53:09FromGitter<alehander42> ah ok
13:57:44poopBotduno if i am blind but how to pass parameter on http get request
13:58:41*nsf quit (Quit: WeeChat 2.2)
14:00:36poopBotdo i need to manulay build get string?
14:01:08FromGitter<kaushalmodi> still on the topic of config.nims, is there a way to list all the available tasks?
14:01:22FromGitter<kaushalmodi> like `nimble tasks` but for .nims files?
14:02:46FromGitter<kaushalmodi> hmm.. asked too soon, found the answer but is strange ..
14:02:55FromGitter<kaushalmodi> so `nim help` lists all the available tasks
14:03:06FromGitter<kaushalmodi> but `nim --help` is the usual nim help
14:04:02leorizeit's not documented in `--fullhelp` so... maybe open a PR to document it?
14:04:38FromGitter<alehander42> @poopBot I think so, we still need a higher level wrapper
14:04:38FromGitter<alehander42> https://github.com/nim-lang/needed-libraries/issues/3
14:05:44FromGitter<kaushalmodi> leorize: I just added it here: https://github.com/nim-lang/Nim/pull/9388/files#diff-afcb89019b2e348ac1a95d3f024f3f97R93
14:05:58poopBotoh, that sux, i thinked that something simple evry lang hes
14:06:09FromGitter<kaushalmodi> may be fullhelp should also call `nim help`; do you want to send PR for that?
14:06:28poopBotduno if i can create one by loking how other langs do it
14:06:55FromGitter<kaushalmodi> leorize: Also I wish `nim tasks` was a thing instead of `nim help`
14:07:04FromGitter<alehander42> the point is that we do have http lib, it's just not high level enough
14:07:10poopBottought this isent high lvl library just parameter wraper to url
14:07:51poopBotor at least thats what i need atm :)
14:08:06leorizepoopBot: what are you trying to do? I can't really read your English :P
14:08:18leorizekaushalmodi: ask Araq for that lol
14:09:21FromGitter<kaushalmodi> leorize: not asking you :) but as we were talking on this topic, I did not want to confuse this discussion with the poopBot discussion in parallel
14:09:36poopBotleorize, making kodi alternative for rpi3 , am sending get request to TVDB and need to send ?name=Game%20of%20Thrones
14:10:03leorizeisn't that to be concat to the `url`?
14:10:04poopBotso i need name = Game of Thrones
14:10:10poopBotyep ofc
14:10:48poopBoti can manuly do it just asked cuz moste langs have params variable that goes with getReq
14:11:25leorizeI don't think something that simple needs some thing like that...
14:12:16leorizebut I could imagine building the string from a table
14:12:22leorizeshould be simple
14:12:26poopBotit is
14:12:51poopBotjust need to find how to switch spaces with %20
14:13:14*noonien joined #nim
14:13:37FromGitter<narimiran> strutils.replace?
14:13:44leorizepoopBot: see `uri.encodeUri`
14:13:53leorize`uri.encodeUrl`*
14:13:57poopBotwill try
14:14:06poopBotty
14:14:49poopBotyep think thats what i need
14:23:16*craigger_ quit (Read error: Connection reset by peer)
14:24:45*craigger joined #nim
14:29:57*flaviu quit (Read error: Connection reset by peer)
14:30:20*flaviu joined #nim
14:37:18*flaviu quit (Ping timeout: 252 seconds)
14:38:09*flaviu joined #nim
14:41:07*YueWang joined #nim
14:41:19*YueWang quit (Client Quit)
14:42:50*sagax_ quit (Quit: Konversation terminated!)
14:44:06*craigger quit (Read error: Connection reset by peer)
14:47:18*craigger joined #nim
14:52:00*gangstacat quit (Quit: Ĝis!)
14:55:27PMunchWith my local copy of the Nim repo, is it just to run "build_all.sh" and then use "choosenim <path to repo>" to have in choose that version?
14:57:56copygirlWhen using macros, how - if at all - should I deal with documentation comments?
14:58:20PMunchcopygirl, what do you mean?
14:58:22Araqyou shouldn't. the AST for this is still in the works
14:58:34FromGitter<alehander42> wow, so many request for this these days
14:58:49Araqyeah it always comes in waves
14:58:53Araqno idea why.
14:58:55copygirlI added doc comments to some "properties" and they don't appear in repr or similar, except for one which somehow sticks around.
15:00:52copygirlhttps://gist.github.com/copygirl/a22530d76eac5a98f9ca9d0324282af4
15:01:37copygirlOutput is from `echo repr(result)` in the macro that generates the code.
15:04:25PMunchHmm, I'm unable to build devel atm
15:04:56PMunchhttp://ix.io/1pix
15:05:07PMunchKoch was built using current stable
15:05:18*narimiran joined #nim
15:06:30AraqPMunch: corrupted system.nim file?
15:06:47PMunchThis is a fresh pull of the devel branc..
15:07:10PMunchTrying "choosenim update devel" now
15:08:40Araqhmm travis is red too, I wonder what happened
15:10:28*gangstacat joined #nim
15:12:50PMunchHmm, choosenim managed to do it somehow
15:22:03*kapil____ quit (Quit: Connection closed for inactivity)
15:22:43*shadowbane joined #nim
15:23:06*craigger_ joined #nim
15:24:57*craigger quit (Ping timeout: 252 seconds)
15:25:51*craigger joined #nim
15:27:33*craigger_ quit (Ping timeout: 244 seconds)
15:29:50xacehttps://github.com/dom96/choosenim/blob/master/scripts/choosenim-unix-init.sh#L28 # is there a reason linux_amd64 is not supported by choosenim.sh ?
15:30:16xacereason why*
15:31:56leorizexace: it doesn't look like that to me
15:32:11leorizeit's more like nothing but those are supported
15:33:03nolan_dIs it possible to install a library such that any Nim code can use it without specifying it as a nimble dependency?
15:33:19nolan_dAnd yes I realize this is ugly, I'm just asking.
15:33:29leorizenolan_d: `nimble install`?
15:33:39FromGitter<kaushalmodi> nolan_d: you can set the path
15:33:45xaceleorize: does that mean its safe to locally remove that test-case and force linux_amd64 to work witn choosenim.sh?
15:34:22leorizexace: that condition makes it work
15:34:42leorizethat case statement reads
15:35:00xaceleorize: oh, lol, reading the code again, linux_amd64 is fine, the the other case that results in a error... i should get some sleep...
15:35:25FromGitter<kaushalmodi> nolan_d: For example, if I have REPO/src/foo.nim and REPO/tests/tFoo.nim and I am doing `import foo` in tFoo.nim, I can add `--path:"../src/"` in REPO/tests/nim.cfg
15:37:17FromGitter<kaushalmodi> nolan_d: Or better.. `switch("path", "../src/")` in REPO/tests/config.nims
15:37:49nolan_dOK, that would work.And yes I realize this is ugly, I'm just asking.
15:38:04nolan_dEr, oopse, ignore that last bit. :)
15:38:16leorizeif you like "bundling" then checkout Araq's "nawabs"
15:38:26FromGitter<kaushalmodi> It's actually not ugly.. how else would you make the tests less ugly?
15:38:42FromGitter<kaushalmodi> it's better to have simple `import foo` and let the path handling be done in the .nims
15:53:29*darithorn joined #nim
16:01:58*rokups quit (Quit: Connection closed for inactivity)
16:04:44*smt quit (Read error: Connection reset by peer)
16:10:00*floppydh quit (Quit: WeeChat 2.2)
16:10:09*Trustable joined #nim
16:14:50*smt joined #nim
16:19:01*nsf joined #nim
16:19:21*kapil____ joined #nim
16:22:36*SenasOzys joined #nim
16:23:16*SenasOzys quit (Remote host closed the connection)
16:28:00*Vladar quit (Remote host closed the connection)
16:28:45*chemist69 quit (Ping timeout: 250 seconds)
16:29:10*chemist69 joined #nim
17:26:51krux02kaushalmodi: when do you implement dynamic scoping for Nim? :P
17:28:30FromGitter<kaushalmodi> krux02: ?
17:28:46krux02didn't you write the if_let for nim?
17:28:56krux02sorry out of context
17:29:03krux02I just thought about it
17:29:22FromGitter<kaushalmodi> technically @Vindaar did, but `if-let` is lexically scoped
17:29:37krux02in nim it is
17:29:42krux02in emacs lisp you never know
17:30:17FromGitter<kaushalmodi> you know because you enable lexical bindings
17:30:20FromGitter<kaushalmodi> that's a norm now
17:30:54FromGitter<kaushalmodi> you enable that at the very top of your elisp files: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bc6204e64cfc273f9d853c6]
17:30:57krux02i think there is the file variable that you can set -*- lexical-binding: t -*-
17:31:21FromGitter<kaushalmodi> yes, slowly and gradually all emacs core files are getting this var set
17:31:32krux02but even when that is enabled, I could use let in a dynamically scoped context
17:31:34FromGitter<kaushalmodi> once it is set everywhere and there are no complaints, the plan is to make that the default
17:32:11FromGitter<kaushalmodi> krux02: are you sure? i have seen many errors because of dynamic scoping in lexical binding enabled files
17:33:00FromGitter<kaushalmodi> krux02: ok, you have to go out of your way and declare global vars using `defvar`, `defconst` and such
17:33:10FromGitter<kaushalmodi> only those are allowed
17:33:16krux02https://github.com/krux02/nim-mode/blob/sql-string-literal-highlighting/nim-syntax.el#L419
17:33:39FromGitter<kaushalmodi> `case-fold-search` is a global var
17:33:44FromGitter<kaushalmodi> (what I said above)
17:34:08krux02but with let it is not
17:34:27krux02it is a local var case-fold-search that shadows the global var
17:34:33krux02using dynamic scoping
17:34:43FromGitter<kaushalmodi> krux02: yes, correct
17:34:51FromGitter<kaushalmodi> then I am not clear on how that is dynamic scoping
17:35:38krux02well, when everything would be lexically bound, a local scase-fold-search would not affect the call into search
17:35:50krux02only a setq would affect it
17:36:10FromGitter<kaushalmodi> got it.. my introduction to lexical-binding is just emacs lisp :)
17:36:28krux02mine, too
17:36:32FromGitter<kaushalmodi> so I thought that the `let` implementations are lexical binding
17:36:38krux02but I do know static binding very well
17:36:57krux02well I am not so sure what emacs lisp does
17:37:36FromGitter<kaushalmodi> see `C-h i g (elisp) Lexical Binding`
17:37:45*nsf quit (Quit: WeeChat 2.2)
17:37:47krux02all I know is that I need to be careful how I name my local variables, because they can shadow by accident global variables
17:38:05krux02even if lexical-binding is enabled
17:38:32FromGitter<kaushalmodi> " all I know is that I need to be careful how I name my local variables" hmm, yeah, I have always used that as a feature.. mistaken-shadowing has yet to happen in my use case
17:38:46FromGitter<kaushalmodi> for example, `case-fold-search` is a well-known global var
17:39:06FromGitter<kaushalmodi> the shadowing happening in that example is intended
17:39:19krux02in that example, yes it is intended
17:39:47krux02I still don't feel safe with local variable names
17:40:19FromGitter<kaushalmodi> the lexical binding enabled compilation is really helpful; look at the warnings (there must be 0)
17:40:36FromGitter<kaushalmodi> if you declare a lexically bound var in `let` and don't use it, you get a warn
17:40:49FromGitter<kaushalmodi> if you don't declare a lexically bound var, and try to use it, you get error
17:41:00krux02that is not the point
17:41:05FromGitter<kaushalmodi> so there's very little room where you shadow something unintentionally
17:41:46krux02the point is that I declare a local foo, assign (1 2 3) to it for whatever reason, use it, and then call into a function and it breaks because foo is a global variables that I was not aware of that I shadowed accidentally.
17:41:46FromGitter<kaushalmodi> well, in any case, look at http://www.gnu.org/software/emacs/manual/html_node/elisp/Lexical-Binding.html
17:42:10FromGitter<kaushalmodi> "because foo is a global variables that I was not aware of that I shadowed accidentally" yes, I understood the problem you faced
17:42:18FromGitter<kaushalmodi> but I have yet to come across that
17:42:22FromGitter<kaushalmodi> what var was that?
17:44:23FromGitter<kaushalmodi> also related: https://www.gnu.org/software/emacs/manual/html_node/elisp/Default-Value.html
17:44:37FromGitter<kaushalmodi> `default-toplevel-value`
17:46:17*Sembei joined #nim
17:46:32*Pisuke quit (Ping timeout: 276 seconds)
17:54:58*stefanos82 quit (Quit: Quitting for now...)
17:56:42krux02thanks for the info
17:57:03*krux02 quit (Quit: Leaving)
18:16:21*krux02 joined #nim
18:26:03*krux02_ joined #nim
18:26:34Calinouhmm, I have to use libraries from #head to fix clr build with Nim 0.19.0
18:26:43CalinouI should ask for tagged releases, I guess :P
18:26:52*dddddd quit (Ping timeout: 246 seconds)
18:27:00CalinouI'll just use a commit hash for now
18:28:39*krux02 quit (Ping timeout: 252 seconds)
18:36:03*flyx quit (Quit: ZNC - http://znc.in)
18:36:12*dddddd joined #nim
18:36:22*flyx joined #nim
18:42:03federico3please do
18:52:16*YueLi joined #nim
18:57:25*YueLi quit (Ping timeout: 256 seconds)
19:02:03*kapil____ quit (Quit: Connection closed for inactivity)
19:25:30PMunchWoop woop, 5 PRs now :)
19:25:49federico3PMunch: ?
19:26:33PMunchfederico3, for Hacktoberfest
19:26:40PMunch5 PRs and you get a T-shirt :P
19:28:12FromGitter<kaushalmodi> can we have nested openarrays?
19:28:31FromGitter<kaushalmodi> example code: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bc63bdebbdc0b25055078e7]
19:28:49FromGitter<kaushalmodi> the commented signature with `openArray[openArray[T]]` does not work
19:30:04*shadowbane quit (Read error: Connection reset by peer)
19:30:35FromGitter<kaushalmodi> `openArray[seq[T]]` works too
19:31:25FromGitter<kaushalmodi> OK, I got my answer: https://nim-lang.org/docs/tut1.html#advanced-types-open-arrays
19:31:48*shadowbane joined #nim
20:17:06*Trustable quit (Remote host closed the connection)
20:26:29*nsf joined #nim
20:34:53poopBotdoes "nimble build" build evry file with .nim in src or do i need to tell it explicitly
20:36:50*narimiran quit (Ping timeout: 276 seconds)
20:37:25poopBotbuilding with --debug reveled my answer
20:42:15*zachk joined #nim
20:44:15poopBothmm so if i create a modulB and i want to call it from modulA what i need to get autcomplite working
20:45:01*cozachk joined #nim
20:45:33*nsf quit (Quit: WeeChat 2.2)
20:46:40*cozachk quit (Read error: Connection reset by peer)
20:47:03*cozachk joined #nim
20:47:13*zachk quit (Ping timeout: 246 seconds)
21:05:42poopBothmm i just restarted vscode and it worked
21:11:14*cozachk quit (Quit: Leaving)
21:15:31*zachk joined #nim
21:16:23*zachk quit (Changing host)
21:16:23*zachk joined #nim
21:17:21*chemist69 quit (Ping timeout: 250 seconds)
21:18:23*chemist69 joined #nim
21:31:57*craigger_ joined #nim
21:32:58*craigger quit (Ping timeout: 245 seconds)
21:34:00*rewadz quit (Ping timeout: 252 seconds)
21:36:23*craigger joined #nim
21:38:23*craigger_ quit (Ping timeout: 245 seconds)
21:38:26*craigger- joined #nim
21:39:17*Jesin quit (Quit: Leaving)
21:41:11*craigger quit (Ping timeout: 250 seconds)
21:45:28*craigger joined #nim
21:46:57*platoff quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:48:46*craigger- quit (Ping timeout: 272 seconds)
21:58:39*vlad1777d__ joined #nim
22:08:09*krux02_ quit (Remote host closed the connection)
22:17:45poopBotis it bad if i have request in rows for each request to create new HttpClient
22:28:21FromGitter<zacharycarter> huh?
22:28:36FromGitter<zacharycarter> poopBot: I don't understand your last question
22:31:17poopBotzacharycarter[m], hmm i asked if its bad practice to instatient a new httpClient for each request, if i have more then 1 request in row :)
22:31:37poopBotprobbaly it is :)
22:32:43Araqiirc you *need* to inst one per request :-)
22:32:54Araqbad API, but I've complained about it before...
22:33:11Araqit also violates our guidelines
22:34:02poopBotsorry i dont get *need* was that ironic or i really need, am reading atm docs about it
22:34:27*craigger_ joined #nim
22:34:50*craigger quit (Ping timeout: 244 seconds)
22:36:03FromGitter<zacharycarter> I think you're right Araq / recalling correctly - I remember reading in a few places that asynchttp and long lived connections don't jive well atm
22:36:43poopBotok then for now i will leave it like this
22:37:23AraqpoopBot, no irony, you really need it
22:43:55*craigger joined #nim
22:44:23*craigger_ quit (Ping timeout: 268 seconds)
22:47:32*PMunch quit (Remote host closed the connection)
22:53:57*PrimHelios joined #nim
22:54:07*PrimHelios quit (Client Quit)
23:09:13*craigger_ joined #nim
23:10:29*craigger quit (Ping timeout: 244 seconds)
23:21:00*craigger joined #nim
23:23:51*craigger_ quit (Ping timeout: 268 seconds)
23:35:31*elrood quit (Quit: Leaving)