<< 14-09-2019 >>

00:05:45rockcaveramratsim thanks for confirming
00:17:33*ng0 quit (Quit: Alexa, when is the end of world?)
00:58:23*Hideki_ joined #nim
01:07:55*notcreative quit (Ping timeout: 260 seconds)
01:14:58*steshaw joined #nim
01:41:29*btop joined #nim
01:46:26*btop quit (Ping timeout: 240 seconds)
02:08:48*sealmove joined #nim
02:29:25*Hideki_ quit (Remote host closed the connection)
02:31:09*Hideki_ joined #nim
02:35:50*Hideki_ quit (Ping timeout: 276 seconds)
03:09:03*Hideki_ joined #nim
03:19:38*theelous3 joined #nim
03:19:58*Hideki_ quit (Ping timeout: 268 seconds)
03:24:20*steshaw quit (Quit: Connection closed for inactivity)
03:26:33*chemist69 quit (Ping timeout: 245 seconds)
03:28:30*chemist69 joined #nim
03:29:35*btop joined #nim
03:34:59*btop quit (Ping timeout: 276 seconds)
03:44:25*btop joined #nim
04:13:05*arecaceae quit (Remote host closed the connection)
04:13:28*arecaceae joined #nim
04:34:01*thomasross quit (Remote host closed the connection)
04:34:27*thomasross joined #nim
04:36:49*thomasross quit (Read error: Connection reset by peer)
04:37:17*thomasross joined #nim
04:42:58*sealmove quit (Quit: WeeChat 2.6)
04:44:49*dddddd quit (Remote host closed the connection)
04:46:33*theelous3 quit (Ping timeout: 245 seconds)
05:04:14*snooptek joined #nim
05:10:23*owl_000 quit (Ping timeout: 246 seconds)
05:22:58*owl_000 joined #nim
05:25:51FromGitter<zacharycarter> shashlick: can nimterop clone mercurial repos too? or just git?
05:27:42*thomasross quit (Remote host closed the connection)
05:28:34FromGitter<zacharycarter> eh nevermind it's not important - I'm just using a file instead
05:30:16FromGitter<zacharycarter> it doesn't look like nimterop auto extracts `.tar.bz2` files?
05:30:17FromGitter<zacharycarter> ugh
05:36:48FromGitter<zacharycarter> well - maybe it can, it wasn't working because I didn't have it in the static block
05:37:04FromGitter<zacharycarter> the curl command to get the file doesn't work on windows
05:37:14FromGitter<zacharycarter> so I guess I'm stuck placing the source files in my project
05:51:53FromGitter<zacharycarter> weird - I'm getting: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d7c7ff972fe125111a08560]
05:52:04FromGitter<zacharycarter> but I only see the PHYSFS_stat type defined once
05:54:56FromGitter<zacharycarter> but doing what was suggested fixed it - so \o/
06:01:04*solitudesf joined #nim
06:11:38*btop quit (Ping timeout: 276 seconds)
06:12:19*solitudesf quit (Remote host closed the connection)
06:12:43*solitudesf joined #nim
06:14:43*gangstacat quit (Quit: Ĝis!)
06:16:39*narimiran joined #nim
06:17:06*solitudesf quit (Ping timeout: 265 seconds)
06:30:02*absolutejam1 joined #nim
06:38:19*gangstacat joined #nim
06:43:37*blu quit (Remote host closed the connection)
06:46:35*absolutejam1 quit (Ping timeout: 265 seconds)
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:49*gmpreussner joined #nim
07:05:12*gangstacat quit (Quit: Ĝis!)
07:06:32*gangstacat joined #nim
07:16:36*Hideki_ joined #nim
07:20:43*Hideki_ quit (Ping timeout: 245 seconds)
07:23:15*steshaw_ joined #nim
07:23:38*actuallybatman quit (Ping timeout: 240 seconds)
07:28:54FromGitter<alehander42> so
07:29:08FromGitter<alehander42> i have to use withData
07:29:13FromGitter<alehander42> as a select loop? right?
07:30:55FromGitter<alehander42> or should i directly loop?
07:31:08FromGitter<alehander42> i guess they should be similar, ill see!
07:39:30*Trustable joined #nim
07:41:09*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
07:43:39*laaron joined #nim
07:48:28*laaron quit (Remote host closed the connection)
07:50:54*laaron joined #nim
07:57:37*steshaw_ is now known as steshaw
07:59:12FromGitter<kdheepak> `pacman -S nim` installs 0.18.0
07:59:29FromGitter<kdheepak> Does anyone know why it does not install a more recent version?
08:00:31FromGitter<zacharycarter> package probably hasn't been updated in the repo
08:02:23*absolutejam1 joined #nim
08:03:26*owl_000 quit (Ping timeout: 265 seconds)
08:07:06narimiran@kdheepak because the arch maintainer is lazy
08:07:28FromGitter<kdheepak> That's unfortunate
08:07:32narimirani contacted them, but no luck
08:08:00narimiranmanjaro had the same problem, but they fixed it by maintaining nim package by themselves now, so it is updated
08:08:34narimiranmuch much nicer community over at manjaro than on arch
08:09:38FromGitter<alehander42> do we have
08:09:46FromGitter<alehander42> up to date .deb packages
08:09:55narimiraniirc, yes
08:09:58FromGitter<alehander42> how often are they released? on each 0.x?
08:10:46narimiranwhen i mentioned that debian has the newest nim, and arch is 2 major releases behind, i was basically told by arch community to fuck off
08:11:01FromGitter<alehander42> hm, strange
08:11:22FromGitter<alehander42> do they prefer to keep older stuff as a "protection" against bleeding-edgeness
08:11:35FromGitter<alehander42> like, i guess some distros are somehow conservative
08:11:38narimiranand in the same time they are "hurr durrr, manjaro holds off some packages for a week or two"
08:11:53narimiran"we are the one true bleeding edge"
08:11:56FromGitter<alehander42> i totally dont know those communities, i am a simple ubuntu user
08:12:19FromGitter<alehander42> hm, well there must've been misunderstanding then
08:12:31narimiranno, they prefer to be as bleeding as possible. unless when they don't.
08:13:18narimiranusually it is "the new version of package xyz was released 2 hours ago, you can get it on arch"
08:13:35FromGitter<alehander42> wow, i found a "nalimilan>" in the julia channel
08:13:43FromGitter<alehander42> you have a unknown brother there :P
08:13:53narimiranhehe, yeah, i know about him :)
08:14:58FromGitter<alehander42> yeah, well, who is responsible to release new versions
08:15:19FromGitter<alehander42> on arch? only the individual maintainer, or should the distro maintainers also approve it
08:15:27FromGitter<alehander42> like, can't nim org take over
08:16:31narimiranafter my recent experience with them, i don't want to have any more business with them.
08:17:05narimiranit feels like a bunch of nerdy 15 year olds, trying to sound very smart. no thanks.
08:17:40FromGitter<alehander42> ok, i am sure somebody will find a way to fix it soon
08:17:58FromGitter<alehander42> what i want is more
08:18:25FromGitter<alehander42> compiler explorer support
08:18:31FromGitter<alehander42> i saw zig have it now as well
08:19:00FromGitter<alehander42> https://github.com/mattgodbolt/compiler-explorer/issues/206
08:19:02*absolutejam1 quit (Ping timeout: 276 seconds)
08:19:11FromGitter<alehander42> it seems they had to wait after 0.20?
08:19:30narimiransoon? 0.19 was released almost exactly one year ago. they are still on 0.18. (remember, the distro that is very proud to have new packages in a matter of hours)
08:19:49narimiranyeah, godbolt support would be great!!
08:20:11FromGitter<alehander42> but what is missing
08:20:26*owl_000 joined #nim
08:21:05narimiranthere was some attempt, i think by Rayman, but i don't know the exact details
08:22:53*crem quit (Ping timeout: 246 seconds)
08:22:58FromGitter<alehander42> pinging rayman22201
08:23:01FromGitter<alehander42> just in case
08:25:25*crem joined #nim
08:52:50*nsf joined #nim
09:17:30*Vladar joined #nim
09:31:29*steshaw quit (Quit: Connection closed for inactivity)
09:31:43FromGitter<mratsim> There is even a Stefan Karpinski (hidden Stefan Salewski in Julia)
09:31:55FromGitter<mratsim> Strange regarding arch. I can flag it outdated or raise it in the forum
09:32:14FromGitter<alehander42> hm, i found out select is what i need to use
09:32:46FromGitter<mratsim> I met some of the arch trusted users and maintainers at FOSDEM and they were nice folks
09:34:33narimiran@mratsim maybe wait a bit, so you can ping them about nim 1.0 ;)
09:50:02*laaron quit (Remote host closed the connection)
09:52:45*laaron joined #nim
09:57:41*ng0 joined #nim
09:59:46huj123[m]I find it ironic that Arch has an older version of Nim than Fedora
10:00:38huj123[m]Fedora has 0.19.6, which isn't the newest but hey it's the updates repository. they have krita and kdenlive versions which are about 1 year old at this point in time
10:06:45leorizeArch has an older version of Nim than Haiku :p
10:29:39*dddddd joined #nim
10:37:06*krux02 joined #nim
10:56:18FromGitter<moigagoo> Hi! Just asked in Telegram, reposting here for @Araq and other core developers. ⏎ ⏎ Is it at all possible to have a pair programming session with some of the core developers? Maybe make it a paid service (I'll be the first to pay!)?
10:58:23FromGitter<moigagoo> I'm having trouble understanding what happens with args being passed into macros. Apparently, their values get replaced with their reprs. I want to understand why that happens and what can be done about it. I believe having a 30 minute call with a person who thoroughly knows the subject may be the quickest way to learn.
10:58:27*Hideki_ joined #nim
10:59:07*laaron quit (Remote host closed the connection)
11:03:14*Hideki_ quit (Ping timeout: 265 seconds)
11:04:41*laaron joined #nim
11:16:04*krux02 quit (Remote host closed the connection)
11:37:23*Hideki_ joined #nim
11:39:45huj123[m]moigagoo: you don't pass values to the macros. you pass their syntax trees. basically, when you pass an argument to a macro, the argument is left as a NimNode, eg. `2` doesn't turn into an `int`, it's just a `NimNode`
11:40:12huj123[m]iirc `typed` arguments had different semantics but I never really tried
11:41:14*narimiran quit (Ping timeout: 240 seconds)
11:54:00*laaron quit (Remote host closed the connection)
11:56:37*laaron joined #nim
12:08:32FromGitter<moigagoo> @huj123[m] I'm dealing with typed args here. I'm passing args with concrete types like `seq[SqlQuery]` to a template, then getting its AST with getAst. Right before the getAst call the type is correct, at the first line of the template it's `array[0..3, string]`.
12:12:45*krux02 joined #nim
12:22:08Araqhttp://blog.marcocantu.com/blog/2018-october-Delphi-ARC-directions.html ARC is dead for Delphi. Quite a surprise
12:28:29*tyrion[m] joined #nim
12:30:56*Hideki_ quit (Remote host closed the connection)
12:31:26FromGitter<deech> Are there any compile time reflection functions that can search scope for all `distinct` types that match? So, eg. given `10` I want it to find `type MyInt = distinct int` for me. There are procs like `distinctBase` but they go the other way.
12:32:27Araqno. macros are top down by design, they don't get to query the symbols outside the macro invokation
12:39:37*huj123[m] is now known as lqdev[m]
12:40:37*tyrion[m] is now known as tyrion-mx
12:43:06FromGitter<deech> It would be a useful type system exploration tool. In general being able to look around query static information from the current scope would be very powerful.
12:43:07*krux02 quit (Remote host closed the connection)
12:44:04*laaron quit (Remote host closed the connection)
12:44:44*sealmove joined #nim
12:46:28sealmovehi, is it possible to use unittest but spread tests in multiple files?
12:46:32*tyrion-mx left #nim ("User left")
12:47:32lqdev[m]oh nice, seems that the matrix irc bridge is so damn buggy it literally bridges my nickname from another room to this room
12:47:35lqdev[m]how great
12:47:39lqdev[m]Node.JS™
12:48:36lqdev[m]and I set the nickname with /myroomname so this should've never happened.
12:54:35*laaron joined #nim
12:57:35Araqdeech: planned for v2, maybe
13:03:09FromGitter<deech> I suppose I can fake it now by using the compiler as a library? Idk, never tried it.
13:08:50Araqpossible
13:28:18*actuallybatman joined #nim
13:42:00FromGitter<YiyuanGH> When I first glanced at the system module, I found the styles of type names are mixture. Some were in lower case like int8 and others in PascalCase like Ordinal. Also, the type openArray is in camelCase. The Nim style guide just told me that Type identifiers should be in PascalCase. Until I have read the discussions (https://forum.nim-lang.org/t/4770#29816), I didn't know there were some exceptions. I think it will
13:42:00FromGitter... be better to add some explicit declarations in tutorial or manual to remove the confusions of newbies.
13:42:36FromGitter<YiyuanGH> https://forum.nim-lang.org/t/4770#29816
13:43:45leorizebuiltin types starts with lowercase
13:46:04sealmovehow to write a statement macro `addCodeToString(where, what)`?
14:10:53*NimBot joined #nim
14:20:23FromGitter<zacharycarter> @YiyuanGH - that's pretty similar to a lot of programming languages
14:20:27FromGitter<zacharycarter> like C
14:20:29leorizesealmove: uhmmm, what are you trying to do?
14:20:32FromGitter<zacharycarter> and C++
14:20:55FromGitter<zacharycarter> the fact is Nim is style insensitive, so you can name your types however you please
14:21:33sealmovezacharycarter: Pass a block to a macro and insert that into a string. I managed to do it.
14:21:45FromGitter<zacharycarter> PascalCase is just a recommendation, you can use snake_case for all NIm cares
14:21:53FromGitter<zacharycarter> sealmove: I think you meant to ping leorize :P
14:22:10sealmoveyes, sorry
14:22:15FromGitter<zacharycarter> no worries
14:22:17disruptekwell, the first character of an identifier is significant as far as capitalization goes. Foo != foo.
14:22:46leorizethe best hack to get rid of pascal-style T prefix :P
14:35:14*nsf quit (Quit: WeeChat 2.5)
14:46:33shashlick@zacharycarter I've added gz support in v020 branch
14:47:04shashlickYou need tar or 7z or 7za in your path
14:47:13shashlickDownloading is also improved
14:47:16*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
14:47:29FromGitter<zacharycarter> I just plugged the other project's source into a libs folder in mine
14:48:03*laaron joined #nim
14:49:07*NimBot joined #nim
14:50:26shashlickWhat are you wrapping
14:51:54owl_000https://github.com/yglukhov/nimpy is great, but the creator maybe in vacation not repling in issue. i want to pass python PIL image data to nimpy and do some operation in nim and return to python again. or is there any good nim image library?
14:52:39FromGitter<zacharycarter> well - the wrapper seems to be working now with Nimterop
14:52:43disruptekowl_000: this might work for you: https://github.com/SolitudeSF/imageman
14:52:48FromGitter<zacharycarter> but - https://icculus.org/physfs/
14:53:46Araqowl_000: fwiw I talked with its creator 3 days ago
14:54:30owl_000thanks, but i have some tif file, so i need to convert it before to use in imageman.
14:56:31owl_000nimpy is a great tool to combine nim and python (like a dream). i loved it.
15:02:41shashlickDo you need to compile it? Or just wrap
15:06:20FromGitter<zacharycarter> I'm compiling it
15:06:36shashlickOk there's support for cmake also now
15:06:46shashlickSo should be even easier
15:06:55shashlickShare your wrapper when you can
15:07:19FromGitter<zacharycarter> I will
15:07:22FromGitter<alehander42> @moigagoo btw i did something
15:07:30FromGitter<alehander42> like that with your norm
15:07:32FromGitter<alehander42> in my framework
15:10:26FromGitter<alehander42> https://github.com/alehander42/http/blob/master/src/http.nim
15:10:38FromGitter<alehander42> a workaround to define models in differetn files
15:10:59FromGitter<alehander42> i just use this to say thanks for the orm lib
15:11:19FromGitter<alehander42> i remember you added something like that, i guess now i can directly define those models in new files with the new version?
15:11:44FromGitter<alehander42> scroll to macro norm
15:12:18FromGitter<zacharycarter> does anyone have a recommendation for config files / parsing them as far as libraries go
15:12:30FromGitter<zacharycarter> I see a few options on nimble.directory - but looking for someone that actually has experiencing using one and liking it
15:13:01Araqstdlib's parsecfg is ok.
15:13:30Araqthere are probably also some crazy metaprogramming packages out there that do the same
15:13:58FromGitter<zacharycarter> yeah - maybe I'll just use parsecfg
15:14:03Araqbut these are all misguided :P
15:14:38*NotCreative joined #nim
15:15:01Araqbecause the declarative nature of it is (key, action) pairs where key is a string and Nim's case statement works on strings, so there, no need for meta programming this time.
15:19:21shashlick@Araq I have this config.nims - https://github.com/genotrance/nimarchive/blob/nimterop/config.nims
15:19:38shashlickIf I put it in the nimarchive sub directory, it doesn't work
15:20:11shashlickThe values are not present
15:20:24shashlickAny idea if I'm doing something wrong?
15:20:41Araqdo we claim we pick up configs in subdirs?
15:20:59AraqI hate this config system mess :-/
15:21:02shashlickBut I'm importing archive.nim in that subdir
15:21:21Araqthe config system doesn't care about your imports
15:21:27shashlickI've tried nim.cfg as well
15:21:43shashlickOh so it has to be next to the main module?
15:22:04shashlickOr in the execution directory?
15:22:57Araqnext to the main module
15:26:51disruptekat least the solution is simple.
15:26:57disrupteksimply don't use it.
15:27:40Araqdisruptek: the config system?
15:28:38shashlickI need a bunch of defines
15:28:47shashlickCannot do it in the Nim file since imports don't see it
15:28:57shashlickSame old request for a define pragma
15:32:42shashlickHopefully we import configs for nimble packages
15:33:07*NotCreative quit (Ping timeout: 260 seconds)
15:36:37lqdev[m]shashlick: while you're here, https://github.com/nimterop/nimterop/issues/141
15:37:23lqdev[m]in my attempts of troubleshooting why nimterop + soundio doesn't work on windows, I stumbled upon this issue
15:37:49lqdev[m]how hard would it be to add this in?
15:39:05*snooptek quit (Remote host closed the connection)
15:42:53shashlickShouldn't be too hard but just need to see how other compilers behave
15:43:12Araqshashlick: usually you can use consts and 'when myConst' instead of 'when defined(mysymbol)'
15:43:16shashlickBut for starters, need to change gcc to $CC everywhere
15:43:16*disruptek quit (Ping timeout: 258 seconds)
15:43:40*disruptek joined #nim
15:44:39shashlickThe main question is how the preprocessor behaves and if it is possible to access that data like gcc -E offers
15:45:18shashlickBut if I define a const in a file, you cannot check for it in a module that was imported in the file
15:48:14shashlickLast line for @Araq, others for @lqdev
15:48:37Araqjust ... don't use 'gcc -E' :P
15:51:22*krux02 joined #nim
15:58:06FromGitter<zacharycarter> how do I get around having to use `-d:nimOldCaseObjects` ?
15:58:28FromGitter<zacharycarter> like what exactly is causing this in - ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d7d0e24ba12e064486dbd9c]
16:03:03FromGitter<zacharycarter> or is it in the declaration of the discriminated type?
16:03:05*nc-x joined #nim
16:03:13FromGitter<zacharycarter> I'm looking at - https://nim-lang.org/docs/manual.html#types-object-variants
16:03:29FromGitter<zacharycarter> and I don't see the difference b/w what I'm doing and the example there
16:03:51nc-x@zacharycarter use entry(kind: cekInt, i = parseInt(e.value)) etc instead of what you are doing
16:03:52nc-xIIRC
16:04:04FromGitter<zacharycarter> thanks
16:04:44nc-xsorry i mean entry = objectname(...), i.e. the object constructor syntax
16:04:54FromGitter<zacharycarter> gotcha
16:06:43FromGitter<zacharycarter> that got rid of the error, thanks nc-x!
16:07:54nc-x😉👍
16:07:58*nc-x quit (Remote host closed the connection)
16:12:29ZevvQ: what would be the reason for "cannot generate code for: mDeepCopy" when trying to do a deepcopy at compile time?
16:13:15ZevvI want to copy the full contents of a ref variant object
16:15:16dom96magic not supported in the VM
16:15:35FromGitter<deech> Dumb noob question, is there a way of assigning a `ref object` to an `object` in one line, right now I'm doing: ⏎ ⏎ ```let r : ref A ⏎ r[] = A(...)``` [https://gitter.im/nim-lang/Nim?at=5d7d1227577fc14c7fc42a6d]
16:16:00*nc-x joined #nim
16:17:10Zevvso the solution is to make a proc that knows for each variant how to copy it?
16:17:40dom96deech: in general doing that kind of thing isn't recommended, what are you trying to do?
16:18:07FromGitter<deech> @dom96 I want to create an empty `ref` and fill it in.
16:18:12*owl_000 quit (Ping timeout: 246 seconds)
16:18:25FromGitter<deech> Why is it not recommended?
16:19:32dom96Either make your type a `ref` or use `var T`
16:20:03*nc-x quit (Remote host closed the connection)
16:21:16FromGitter<deech> I understand I can do this but is there a reason why my approach is not recommended?
16:26:30dom96Mainly because it's a non-standard way of doing this. You will likely run into annoyances because the language hasn't really been designed with this approach in mind.
16:30:45*exelotl joined #nim
16:32:18exelotlis the discord bridge still down?
16:32:34*krux02 quit (Remote host closed the connection)
16:34:05*solitudesf joined #nim
16:37:01exelotlI have a problem: I want to emit a const struct of an object type that I've defined in Nim. I annotated it with {.exportc.} but the module doesn't actually use the struct, it just defines it. So there's no way to guarantee that the type will make it into the generated C code.
16:38:28*nc-x[m] joined #nim
16:38:40exelotlpreviously I worked around this by doing `discard sizeof(MyType)` to trick the compiler into defining the whole type in the generated C. But this doesn't seem to work now :(
16:41:05*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
16:43:25exelotlis there some way to say 'Yo, I *need* this type to be available in the generated C for this module, even if it looks like I'm not using it'
16:43:29*laaron joined #nim
16:51:31ehmryexelotl: {.exportc.}?
16:51:49ehmrysorry, I should read more scrollback
16:55:57Araqexelotl: var someFakeVar {.exportc.}: TypeYouCareAbout
16:57:32sealmovequestion: Nim is not in this list, https://docs.travis-ci.com/user/languages/, so how do you use Travis with Nim code?
17:01:46FromGitter<zacharycarter> looking for some help w/ https://gist.github.com/zacharycarter/9853400e0b55fae708b1a21b0625a342
17:01:58*tiorock joined #nim
17:01:58*tiorock quit (Changing host)
17:01:58*tiorock joined #nim
17:01:58*rockcavera is now known as Guest35824
17:01:58*Guest35824 quit (Killed (karatkievich.freenode.net (Nickname regained by services)))
17:01:58*tiorock is now known as rockcavera
17:02:19FromGitter<zacharycarter> I guess e.value is always a string?
17:02:54FromGitter<zacharycarter> is there a way to tell if a string is actually an integer?
17:03:37sealmoveyou mean parse it?>
17:04:27FromGitter<zacharycarter> no - I know parseInt exists
17:04:49FromGitter<zacharycarter> oh I guess parseInt raises a value error
17:05:09FromGitter<zacharycarter> alright, nevermind then :)
17:05:34sealmove^_-
17:06:32sealmoveso for travis + nim you need custom docker image?
17:08:36FromGitter<zacharycarter> that still doesn't solve my problem though
17:08:48FromGitter<zacharycarter> I'm still getting an error about `i` being inaccessible
17:11:19FromGitter<zacharycarter> oh I think it's because the format of my cfg file is screwed up
17:12:02FromGitter<zacharycarter> yup - sorry for wasting time :P
17:12:29*ng0 quit (Quit: Alexa, when is the end of world?)
17:15:03ZevvIs this a bug? https://play.nim-lang.org/#ix=1V9I I have a pretty trivial proc that is ok at runtime but seems to mess up at compile time
17:16:36exelotlAraq: thanks, well that's gonna result in a *lot* of dummy vars but it does fix it
17:17:24Araqexelotl: alternatively write the header file manually, Nim is not a header file generator
17:17:59sealmoveZevv: interesting
17:18:31exelotlhm yeah that's fair
17:19:05Zevvfunny, right?
17:19:21sealmovemaybe it has to do with doAssert, the order in which is executed
17:19:24*narimiran joined #nim
17:19:31Zevvno, it's really like that, pretty sure
17:19:33sealmovesorry, I mean echo
17:19:51Zevvi've been hunting for this for some time in a different program, and minimized to this
17:20:15Zevvit seems that the refs get messed up at compile time so that b1 and b2 alias
17:23:10sealmovewell, some things can't be evaluated in compile time
17:23:29sealmovefor example if you try to wrap the whole test() body in a `static` block it won't compile
17:23:42sealmoveso it's normal to mess-up the aliases in compile-time
17:23:48sealmovesince it can't calculate them
17:24:36sealmoveof course ideally it shouldn't print 4 4 4, but rather exit with error
17:24:36Zevvhm compiles for me in a static block, can you show me on the playground?
17:25:31sealmovehttps://play.nim-lang.org/#ix=1V9O
17:26:37*nsf joined #nim
17:27:10Zevvright. I keep getting bitten. Every now and then I use refs for simple stuff and that just works
17:27:15Zevvso I forget that I shouldnt
17:28:03Zevvbut some stuff clearly *does* work at compile time
17:30:46sealmove"some stuff" is a little too general :P
17:31:12sealmovefrom this snipet in playground I suppose you can't even create a ref in compile-time...
17:31:54exelotlhm yeah that's fair
17:32:02exelotloops wrong window lmao
17:32:08Zevvwell, npeg is full of it, I totally got used to using refs :/
17:49:58*nsf quit (Quit: WeeChat 2.5)
17:56:01leorizesealmove: check Nim's wiki on github
17:56:05leorizethere's a config for travis
17:56:18sealmoveoh great, thanks
17:57:37*nsf joined #nim
18:08:33Zevvis it safe to say that refs are usable at compile time, as long as nothing is aliasing?
18:09:23*ng0 joined #nim
18:17:17Araqthey do work for aliasing IME
18:17:34Araqbut it's very hard for the VM to get the semantics right :-/
18:17:46Araqhowever, a ref must not end up in a const section
18:18:20Zevvthat makes sense, but how wrong is https://play.nim-lang.org/#ix=1V9I then?
18:19:32Araqvery wrong?
18:19:40Zevv:)
18:19:52Araqyou use both ref and the deref [] operator to create a copy
18:20:09Araqand that's where the VM gives up, nobody used that one before :P
18:20:18Zevvfair enough :)
18:20:39Araqso 'ref' works fine but don't deref it and expect to get a copy :P
18:20:43Zevvall I wanted was a deepcopy for variants without having to code them out for each case
18:20:49Araqdunno how hard is it to fix
18:20:57Araqcould be simple...
18:28:48Araqhttps://getkerf.wordpress.com/2016/03/30/the-best-algorithm-no-one-knows-about/ can somebody explain this algorithm to me?
18:28:52AraqI don't even understand the problem
18:31:54*natrys joined #nim
18:36:42Araqah never mind
18:44:37FromGitter<moigagoo> @alehander42 thanks for using Norm! Yes, I've added the ability to split models across different modules. You still glue them together in one place though with dbFromTypes macro.
18:50:10FromGitter<moigagoo> @alehander42 your project looks very interesting. Is it an attempt to create a full stack framework like RoR? Would be a killer, wish you all the luck! Also, I'll look into your code probably, because I see you're generating Nim code, and I’m currently thinking about implementing migrations and automatic migration generation for Norm, so I'll have to learn to do that.
18:50:37FromGitter<moigagoo> In fact, this issue with arg types in macros is what blocks me.
18:55:27Araqhuh? issue number?
19:02:46FromGitter<moigagoo> @Araq I believe this one https://github.com/nim-lang/Nim/issues/7375 ⏎ ⏎ I'm not sure though. My problem is that arg types inside macro bodyare different from the ones declared in its signature. seq[SqlQuery] is replaced with array[0..3, string], Table is replaced with its repr. Pls see an example in this thread: https://forum.nim-lang.org/t/5188
19:03:34Araqthat bug only affects bool and enums
19:04:09FromGitter<moigagoo> I think I'm just misunderstanding something in how Nim macros work. That's why I'm requesting this pair programming session with someone with greater expertise. Like you 😄
19:04:48FromGitter<moigagoo> > that bug only affects bool and enums ⏎ ⏎ Well then it's a different issue ¯\_(ツ)_/¯
19:21:49Zevvaraq: should I file a bug for that compile-time-poor-mans-copy-by-ref thing?
19:25:21*absolutejam1 joined #nim
19:46:43sealmoveleorize: I didn't find the config for travis, can you please link?
19:47:46leorizehttps://github.com/nim-lang/Nim/wiki/BuildServices
19:48:05leorizeit's on the sidebar :P
19:49:35*narimiran quit (Ping timeout: 265 seconds)
19:51:57FromGitter<moigagoo> @alehander42 FYI Article.getOne("id=?", id) can be replaced with Article.getOne(id) if id is int (and it looks like it is, in your code example from Readme).
19:53:57FromGitter<alehander42> thanks
19:54:04FromGitter<alehander42> yeah i wanted to do something like RoR
19:54:08FromGitter<alehander42> but dont have much time
19:54:40FromGitter<alehander42> that would be good
19:54:45FromGitter<alehander42> i wrote a library for migrations
19:54:53FromGitter<alehander42> and i think i used it with this `http`
19:54:59FromGitter<alehander42> but not sure if it got open sourced
19:55:03FromGitter<alehander42> it's still a bit rough
19:55:10FromGitter<alehander42> and i am not very happy with how i wrote it
19:55:31FromGitter<alehander42> because you still have to auto-build stuff currently while migrations run, as they are nim code
19:56:07FromGitter<alehander42> but if you're into that, i might open it if you want to compare implementations
19:56:34FromGitter<alehander42> i would love to see your migration project
19:58:40FromGitter<alehander42> yeah, that would be a good fix
20:03:40FromGitter<moigagoo> I don't have any implementation yet :-) I'm still not sure how to do it best. Also, I got sidetracked with this types-in-macro-body issue. ⏎ ⏎ Anyway, I'll put anything new I have in this area on Nimble and announce it in the Norm thread on the forum.
20:07:19FromGitter<alehander42> i know, but i mean future impl: one thing that i wondered was that maybe if
20:07:31FromGitter<alehander42> my migration dsl-s and model dsl-s are shared
20:07:39FromGitter<alehander42> i can make things very DIy
20:08:01FromGitter<alehander42> but this might be too much and for a framework i preferred things to be pluggable (so one can use migrations with different orm)
20:08:46sealmoveleorize: God bless you, helping blind people
20:10:25*natrys quit (Quit: natrys)
20:17:09*abm joined #nim
20:24:56*abm quit (Quit: Leaving)
20:40:40*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
20:41:31*laaron joined #nim
21:09:01*couven92 joined #nim
21:14:29*absolutejam1 quit (Ping timeout: 276 seconds)
21:19:26*nif_ quit (Quit: ...)
21:19:42*nif joined #nim
21:27:57*absolutejam1 joined #nim
21:32:57*solitudesf quit (Ping timeout: 245 seconds)
21:35:50*Trustable quit (Remote host closed the connection)
21:36:02*Vladar quit (Remote host closed the connection)
21:44:51*absolutejam1 quit (Ping timeout: 240 seconds)
22:31:12*nsf quit (Quit: WeeChat 2.5)
22:35:43*exelotl quit (Ping timeout: 245 seconds)
22:39:11*rockcavera quit (Remote host closed the connection)
22:41:14*actuallybatman quit (Ping timeout: 240 seconds)
22:45:22*couven92 quit (Quit: Client Disconnecting)
23:02:06*sagax quit (Ping timeout: 246 seconds)
23:06:44FromGitter<awr1> @deech i had run into that problem with `ref T` when i first started to use nim - "i wish there were more concise ctors for refs" - and eventually came to the conclusion its an overrated desire
23:07:20FromGitter<awr1> i came to like how that default ctors in Nim are relatively constricted
23:07:38FromGitter<awr1> you can do something like this but I can't say that i approve https://play.nim-lang.org/#ix=1VbI
23:07:48*exelotl joined #nim
23:27:09*sagax joined #nim
23:35:53*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
23:36:14*pbb joined #nim
23:43:23*actuallybatman joined #nim