<< 27-10-2019 >>

00:00:02*junland quit (Quit: %ZNC Disconnected%)
00:01:24GordonBGoodmanual says the Nim strings are compatible with cstring, so there would need to be the terminating null
00:04:02*Hideki_ quit (Ping timeout: 276 seconds)
00:04:48*junland joined #nim
00:07:51*setenforce joined #nim
00:08:30GordonBGoodcast[ptr int8](cast[int](s[0].unsafeAddr) + 5)[].echo shows that the zero terminator is there
00:09:02*FromGitter quit (Remote host closed the connection)
00:09:21*FromGitter joined #nim
00:10:10*zedeus joined #nim
00:10:11GordonBGoodTo get the entire memory used by a string, likely that isn't correct either...
00:10:53GordonBGoodAs you would have the space occupied by the "len" are shown in "hello".sizeof.echo...
00:11:29GordonBGoodplus the size on the stack occupied by the other parts of the header as in capacity and any other reserved bytes...
00:11:45GordonBGoodsize on the heap
00:12:07GordonBGoodreserved fields
00:13:08GordonBGoodin short, there is no exact way to get a string size that isn't guaranteed to break with new versions of compiler changes to the definition of string
00:14:04GordonBGoodBut getting the memory used by cstring is as per what I wrote with the plus 1
00:16:41lmariscalHi jken
00:17:09lmariscalI pushed today the changes to ImGui and released a new version
00:17:13lmariscalsorry for the delay
00:18:42lmariscalalso would like to know your opinion on: For making the Vulkan bindings is it okay if it depends on the SDK provided on LunarG or would bindings like vulkano that pretty much reimplement everything would be better?
00:35:09jkenlmariscal, sweet ill check it out!
00:35:09*snooptek quit (Remote host closed the connection)
00:36:00jkenregarding vulkano vs lunarg, I am probably not the right person to provide an opinion
00:36:25jkenI am still fairly new to both graphics programming and nim
00:36:53jkenI did get your imgui package rendering and updating in my sdl2 + opengl application :)
00:36:55*snooptek joined #nim
00:57:39*ng0 quit (Quit: Alexa, when is the end of world?)
00:59:42disrupteki dreamt in nim last night.
01:00:04disrupteki know, right?
01:00:26disrupteki lived in a house with some teenagers. they weren't my kids.
01:00:33disrupteki think maybe they were my drug dealers.
01:00:54disruptekoh, and the house was, like, suspended. floating. floating down the road.
01:01:04disruptekand we just hung out and ate frogs all day.
01:01:08disruptekactually, i think they were toads.
01:01:15disruptekno electricity in the house.
01:01:24disruptekit's okay, it was pretty comfortable, weather-wise.
01:01:34jkenwow, that's a vivid dream
01:01:55disruptekyeah, i think there was an earthquake or something but it was cool.
01:01:59disruptekwe just floating right over it.
01:02:24disruptektoads aren't that bad. you get used to the crunch.
01:02:38disruptekadmittedly, you don't ever really get used to the juicy part.
01:02:52jkenI couldn't tell you the last dream I had, never remember them
01:03:27disrupteki only dream during withdrawal.
01:03:41disruptekusually it's just nameless nameful.
01:04:17disrupteklogic puzzles and exhaustive mind games. nothing based on reality or even a system of logic in our reality. no cause and effect. mostly just terror.
01:06:35disrupteki never want to eat big toads.
01:06:51disruptekjust little ones. i couldn't possible eat properly large toads.
01:08:41*baysao quit (Remote host closed the connection)
01:09:49disrupteki want toads that are, like, not packaged for individual sale.
01:11:08disrupteklike they better not come in a 6-pack unless they are, like, $2.69. i want like a bag full or something.
02:00:08*Manny8888 joined #nim
02:15:17jkenIs it possible to match only part the value of an enum type in a case statement?
02:15:39*NimBot joined #nim
02:15:51*disruptek o7 NimBot
02:16:02jkenI suppose I could check that the ord is within a range, and have my enum ordered to for that
02:16:15disruptekwhat are you trying to do?
02:16:28jkenI was wondering if there might be any type of wildcard or regex stuff baked into case
02:16:32jkenlike a match statement
02:17:00jkenof Enum.ParitialKey*:
02:17:17jkenwhere a matching key might be Enum.PartialKeyExample
02:17:31disruptekoh, it's easier to use ranges or sets.
02:18:00disruptekyou can $SomeEnum and set the string value of the enum, optionally, if it helps, but that rarely makes sense.
02:18:21jkenoh yeah, sets
02:18:22disrupteki do some enum-fu in here: https://github.com/disruptek/gully/blob/master/src/gully.nim -- sets and ranges.
02:20:10jkenthanks
02:51:53disruptek!eval import os, md5; echo readFile(getApplicationPath()).toMD5
02:51:56NimBotCompile failed: /usercode/in.nim(1, 31) Error: undeclared identifier: 'getApplicationPath'
02:52:45disruptek!eval import os, md5; echo readFile(getAppFilename()).toMD5
02:52:49NimBotef78fee758b7f22a8f1a8e9ed8eb7ab6
02:52:51disruptekc'mon goat licker
03:21:12*ftsf joined #nim
03:23:20*ftsf quit (Client Quit)
04:01:13*Hideki_ joined #nim
04:05:43*Hideki_ quit (Ping timeout: 245 seconds)
04:18:39*chemist69 quit (Ping timeout: 264 seconds)
04:20:03*chemist69 joined #nim
05:07:59*GordonBGood quit (Excess Flood)
05:09:43*GordonBGood joined #nim
05:10:59*GordonBGood quit (Excess Flood)
05:11:58*GordonBGood joined #nim
05:13:38*narimiran joined #nim
05:34:14FromDiscord<badassiel> so I just installed nim from snapstore on brand new manjaro, it created all binaries with nim-lang prefix, it was fine when i installed it on arch linux? anyone tried snap before?
05:48:23narimiranthere is a known problem with snaps. why don't you install it via pacman, manjaro has nim 1.0.0
05:48:45narimiran*pamac
05:49:48FromDiscord<badassiel> okay will try, on aur it was outdated so i didn't think to check via pacman. thanks
05:50:33narimirangeneral tip: first check manjaro repos, and if nothing's there then use aur
06:03:48FromDiscord<badassiel> ok, will keep in mind
06:06:21*dddddd quit (Read error: Connection reset by peer)
06:12:10*Romanson joined #nim
06:18:18*theelous3_ quit (Ping timeout: 268 seconds)
06:20:58*theelous3 joined #nim
06:37:39*Trustable joined #nim
06:42:15*solitudesf joined #nim
07:00:00*gmpreussner_ quit (Quit: kthxbye)
07:04:55*gmpreussner joined #nim
07:09:29*theelous3 quit (Ping timeout: 268 seconds)
07:40:35*Vladar joined #nim
08:02:51*Hideki_ joined #nim
08:03:33*gmpreussner_ joined #nim
08:03:38*gmpreussner quit (Ping timeout: 240 seconds)
08:07:27*Hideki_ quit (Ping timeout: 268 seconds)
08:18:22*filcuc joined #nim
08:20:40*tklohna_ joined #nim
08:24:45*Trustable quit (Remote host closed the connection)
08:29:17*jjido joined #nim
08:34:10*narimiran quit (Remote host closed the connection)
09:35:54*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:38:45FromGitter<alehander42> kodkuce
09:38:47FromGitter<alehander42> is in our place
09:38:55FromGitter<alehander42> disruptek
09:39:35FromGitter<alehander42> if you can call the best geographic region east of texas "our place"
09:45:37*solitudesf quit (Ping timeout: 240 seconds)
09:47:42*jjido joined #nim
09:54:48*solitudesf joined #nim
09:56:24*ng0 joined #nim
09:56:56*nsf joined #nim
10:05:50*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:06:25*fanta1 joined #nim
10:18:27*jjido joined #nim
10:28:08FromDiscord<kodkuce> kodkuce==athome
10:29:30*clyybber joined #nim
10:31:14FromGitter<alehander42> wow actually true
10:31:19FromGitter<alehander42> didnt have any idea
10:33:54FromGitter<alehander42> i thought it means something like "code dog"
10:34:02FromGitter<alehander42> because thats what it is in bulgarian
10:34:44*filcuc quit (Ping timeout: 246 seconds)
10:35:17*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:36:02AraqGordonBGood, https://github.com/nim-lang/Nim/pull/12533
10:39:44clyybberAraq: Should https://github.com/nim-lang/Nim/pull/12520#event-2746564912 really be backported?
10:39:56clyybberLooks like a breaking change to me.
10:40:25GordonBGoodAraq: thank you, looking at it...
10:43:14FromDiscord<kodkuce> oh its empty 😦
10:52:30Araqclyybber, yeah we decided pragmatism wins for this
10:52:44Araqyour code shouldn't rely on our wrong compile-time engine
11:06:22clyybberk
11:06:53clyybberthough arguably wrong is subjective here
11:11:27FromDiscord<kodkuce> it can mean that too , kod = code , kuce = puppy/dog 🙂
11:21:28*ng0 quit (Quit: Alexa, when is the end of world?)
11:22:26*ng0 joined #nim
11:25:18*ng0 quit (Client Quit)
11:26:18*ng0 joined #nim
11:31:14*Romanson quit (Quit: Connection closed for inactivity)
11:33:53*tklohna_ quit (Ping timeout: 246 seconds)
11:35:15GordonBGoodAraq: see your PR does what we tested plus a few refinements...
11:35:40GordonBGoodAraq: re your comment "I'm beginning to like it, it won't break nearly as much code as 'owned' would break", where do we go from here?
11:36:28GordonBGoodI had originally intended to do something within "newruntime" that built on "owned", adding something like biased ref counts...
11:36:57GordonBGoodBut if you are starting to not like "owned" then maybe we need to start with something else as base?
11:37:43*lritter joined #nim
11:39:03GordonBGoodStarting from default as we tested doesn't seem to provide ref destructor hook at end of proc?
11:39:27GordonBGoodSome would seem to apply to starting from --gc:destructors...
11:39:57GordonBGoodSame would...
11:42:19*clyybber quit (Quit: WeeChat 2.6)
11:42:29*Hideki_ joined #nim
11:58:14FromDiscord<mratsim> clyyber that made compile-time produce different result than runtime
11:58:25FromDiscord<mratsim> @Clyybber*
11:59:44AraqGordonBGood, use --newruntime but disable optOwnedRefs
12:00:49Araqand then in liftdestructors.nim you adapt the logic
12:01:11Araqbbl
12:01:22*krux02 joined #nim
12:29:21GordonBGoodAraq: okay, will try...
12:33:32*lbartoletti is now known as lbart
12:43:39*Hideki_ quit (Remote host closed the connection)
12:44:32*Hideki_ joined #nim
12:45:32federico3dom96: does Nimble have a way to compare version numbers?
12:48:10*Hideki_ quit (Remote host closed the connection)
12:48:23*Hideki_ joined #nim
12:51:09federico3findLatest, getLatestByTag
12:58:38*Hideki_ quit (Remote host closed the connection)
12:59:56*Hideki_ joined #nim
13:00:47*filcuc joined #nim
13:04:41*Hideki_ quit (Ping timeout: 268 seconds)
13:04:50*filcuc quit (Ping timeout: 240 seconds)
13:09:13federico3is there something like Python's zip() ?
13:09:57federico3ahem, sequtils.zip
13:17:30planetis[m]federico3: try https://github.com/b3liever/looper
13:20:24federico3" invalid integer: Just use our own `csize`"
13:25:28*Hideki_ joined #nim
13:26:50enthus1asthas someone used cligen to make multiple subcommands?
13:27:11enthus1astlike: ./app keys list
13:28:12enthus1astto me it seems that it's not supporting multiple subcommands
13:30:46*GordonBGood quit (Remote host closed the connection)
13:32:17FromDiscord<exelotl> is there any way to support compound assignment and such with 'setter' procs/templates?
13:33:08FromDiscord<Rika> what do you mean?
13:33:25FromDiscord<exelotl> if I have ``` template foo() ``` and ``` template `foo=`() ```
13:33:40FromDiscord<exelotl> it doesn't seem like i can do ``` a.foo += 1 ```
13:33:55FromDiscord<exelotl> i have to do ``` a.foo = a.foo + 1 ```
13:34:08FromDiscord<Rika> add a `+=` proc?
13:34:39FromDiscord<Rika> i think theres a good reason augmented assignment isnt automatically generated when normal operations are defined
13:35:01FromDiscord<Rika> oh, its a method
13:35:06FromDiscord<exelotl> yeah
13:35:40FromDiscord<Rika> i think you still need a `+=` proc (or i think it would be `foo+=` proc)
13:35:45FromDiscord<Rika> or template sorry
13:37:08solitudesfdoes your template takes and returns a `var`?
13:39:16FromDiscord<exelotl> no but it doesn't really matter whether I use a proc with a var parameter or a template
13:39:26FromDiscord<exelotl> I think `foo+=` just isn't a thing
13:40:25dom96federico3, yep, its got a version module that you can reuse
13:40:53Zevvexelotl: what is your problem, does proc `+=`(...) not work for you?
13:41:32Zevvbecause it just works as you'd expect: http://ix.io/1ZYm
13:43:22federico3dom96: the tracebacks from async + jester are extremely messy. Any tip on making them readable?
13:43:40*Hideki_ quit (Remote host closed the connection)
13:44:26*Hideki_ joined #nim
13:44:36dom96nope, we need a pass in the async code that filters out the duplication
13:44:45dom96and outputs a nicer stack trace
13:44:53dom96if you'd like you can contribute that
13:44:54FromDiscord<exelotl> Zevv: https://gist.github.com/exelotl/0b50b4465daa4eb22035bbce507ab18c
13:45:27FromDiscord<exelotl> basically I'm treating a distinct uint32 as a bitfield, so I want getters and setters for each group of bits
13:46:52FromDiscord<exelotl> nim's bitsize pragma for object fields doesn't cut it for me because sizeof() stops working if you use it, which breaks other parts of my code.
13:47:55*nif quit (Quit: ...)
13:48:06*nif joined #nim
13:49:05*Hideki_ quit (Ping timeout: 268 seconds)
14:01:37federico3dom96: why this names? https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/packageparser.nim#L19
14:01:53*luis_ joined #nim
14:04:19Zevvexeltl: well, that's nasty stuff you're doing there :)
14:05:07disruptekyou have my attention now.
14:05:24disruptekhad another nim dream last night.
14:06:35jkendisruptek, how were the toads?
14:06:59Zevvexelotl: the `+=` that matches your call here is proc `+=`(v1: int, v2: int)
14:07:26ZevvSo the source is lost. It first calls your `objCount=`, gets the result (int) and then calls `+=` on that.
14:08:04Zevvdisruptek: you dream with syntax highlighting?
14:08:48disruptekon second thought, i had better not share this dream.
14:09:04*theelous3_ joined #nim
14:11:18disruptekZevv: are you keeping track of my longest uncomfortable silence on irc?
14:11:32disrupteki feel like i need a dashboard or something.
14:14:47Zevvdisruptek: no, the other day was long enough
14:20:20disruptekif you walk into a store and you're missing a shoe/sock on one foot, and you've peeled the wrapped back on a bar of soap and eat half of it while you shop, you can walk out with three 10lb. bags of kitty litter without paying for 'em and no one will blink an eye.
14:20:50disrupteki mean, it's not toads, but hey, that's good kitty litter.
14:22:23*ng0 quit (Remote host closed the connection)
14:23:58*ng0 joined #nim
14:24:49*filcuc_ joined #nim
14:25:52jkenIll have one of what you've had, disruptek
14:25:53*Hideki_ joined #nim
14:27:24*filcuc__ joined #nim
14:29:14*filcuc_ quit (Ping timeout: 240 seconds)
14:29:48*luis__ joined #nim
14:30:47*luis_ quit (Read error: Connection reset by peer)
14:32:20*Hideki_ quit (Remote host closed the connection)
14:32:36*Hideki_ joined #nim
14:34:12jkenHow can I convert a char to a unicode codepoint? I found runeAt in the unicode module but i don't think that's exactly what I want.. or I am using it wrong
14:34:40jken'a'.ord appears to produce 97, which is ascii i think
14:36:07FromGitter<auxym> ascii == utf8 for codepoints < 127
14:38:17jkenhmm, okay! I must have another issue somewhere else then
14:38:48*filcuc joined #nim
14:38:51FromDiscord<Rika> i dont understand the issue
14:41:24*dddddd joined #nim
14:42:23*filcuc__ quit (Ping timeout: 245 seconds)
14:44:33*Hideki_ quit (Remote host closed the connection)
14:45:14*Hideki_ joined #nim
14:49:45*Hideki_ quit (Ping timeout: 265 seconds)
14:52:35*luis__ quit (Ping timeout: 276 seconds)
14:53:43lqdev[m]does `macros.sameType` work exactly like `is`?
15:00:58*stefantalpalaru quit (Quit: ZNC 1.7.5 - https://znc.in)
15:01:07*stefantalpalaru joined #nim
15:04:19*stefantalpalaru_ joined #nim
15:06:14*stefantalpalaru quit (Ping timeout: 276 seconds)
15:06:16*stefantalpalaru_ is now known as stefantalpalaru
15:06:26*stefantalpalaru quit (Changing host)
15:06:26*stefantalpalaru joined #nim
15:11:36lqdev[m]hm, doesn't seem to work. I have a symbol `ty` and running `sameType(ty, ident"SomeNumber")` doesn't seem to work
15:12:12lqdev[m]wait, this compares the underlying types of the nodes, right?
15:15:15*seni joined #nim
15:16:36lqdev[m]is there any way I can check if two symbols represent the same type?
15:16:57lqdev[m]including aliases, of course, so `bindSym"int" == bindSym"SomeNumber"` should be true.
15:19:26*Hideki_ joined #nim
15:20:06FromDiscord<badassiel> I'm following following Nim in Action, I just got to part where you have generate html code using filters, found out my editor (vscode) extension highlights all code (prefixed with #) as commented block
15:20:56FromDiscord<badassiel> I was wondering if its vscode extension or all other editors highlight it the same?
15:27:47*filcuc_ joined #nim
15:30:39*filcuc quit (Ping timeout: 264 seconds)
15:34:32*Hideki_ quit (Ping timeout: 268 seconds)
15:47:40jkenlmariscal, you around?
15:57:08FromGitter<xmonader> is there a tracker for ⏎ "are we X yet" like the rust guys?
15:57:16disruptekyes.
15:57:29disruptekhttps://github.com/nim-lang/needed-libraries
15:58:29FromGitter<xmonader> thank you @disruptek
15:59:17*solitudesf quit (Ping timeout: 240 seconds)
15:59:39FromGitter<xmonader> lots of things i still need to give nim another shot in the company :'(
15:59:46disrupteksuch as?
16:00:38FromGitter<xmonader> crypto, tls, webdav
16:00:57disruptekwhat kinda crypto?
16:01:32FromGitter<xmonader> nothing fancy reliable public key encryption & sodium
16:01:57disruptekthere's a sodium wrapper, also nimcrypto works for me.
16:02:54*solitudesf joined #nim
16:03:08FromGitter<xmonader> i'll check, but the issue itself isn't resolved in the tracker
16:04:49FromGitter<xmonader> @Willyboar I'm planning to write a template engine if you want to jump in
16:04:51disruptekthe issue might represent more ambition than need.
16:08:32*fanta1 quit (Quit: fanta1)
16:15:47*filcuc_ quit (Ping timeout: 276 seconds)
16:22:10*krux02 quit (Remote host closed the connection)
16:23:37FromGitter<Willyboar> @xmonader i would like to help with any way i can.
16:26:55FromGitter<xmonader> perfect thank you so much
16:39:14*mal`` quit (Ping timeout: 240 seconds)
16:40:18*mal`` joined #nim
16:45:17lqdev[m]anyone could help me with my problem perhaps?
16:45:45lqdev[m]I'm trying to compare two types in a macro.
16:48:10*filcuc_ joined #nim
16:51:58*nsf quit (Quit: WeeChat 2.6)
16:52:54FromDiscord<Rika> got code?
17:05:07*solitudesf quit (Remote host closed the connection)
17:09:38*solitudesf joined #nim
17:18:29*filcuc_ quit (Quit: Konversation terminated!)
17:18:47*filcuc_ joined #nim
17:22:53*jjido joined #nim
17:24:52*filcuc joined #nim
17:27:23*filcuc_ quit (Ping timeout: 268 seconds)
17:30:43*filcuc quit (Ping timeout: 245 seconds)
17:33:32*narimiran joined #nim
17:41:34FromDiscord<badassiel> my dir structure
17:41:34FromDiscord<badassiel> root
17:41:34FromDiscord<badassiel> views
17:41:35FromDiscord<badassiel> user.nim
17:41:40lqdev[m]@Rika https://play.nim-lang.org/#ix=1ZZY
17:41:42lqdev[m]I want it to return true, because `int is SomeNumber`
17:42:07*lqdev joined #nim
17:42:31FromDiscord<badassiel> i'm getting `cannot open file: view/user`
17:42:31FromDiscord<badassiel> my dir structure
17:42:31FromDiscord<badassiel> root
17:42:31FromDiscord<badassiel> src
17:42:32FromDiscord<badassiel> main.nim
17:42:32FromDiscord<badassiel> views
17:42:32FromDiscord<badassiel> user.nim
17:42:33FromDiscord<badassiel> any ideas?
17:42:47disrupteknaïveté is a wonderful thing.
17:43:12lqdevand matrix is lagging again
17:43:15narimiranview != views
17:43:33lqdevanyways, how can I compare two types, so that this: https://play.nim-lang.org/#ix=1ZZY returns true?
17:43:39lqdevas in `int is SomeNumber`
17:44:04FromDiscord<badassiel> oh sorry, typing mistake its `cannot open file: views/user`
17:45:00narimirando you need to do `../views/user` maybe? i don't know where are you starting from
17:45:25FromDiscord<badassiel> running `nim c src/main.nim`
17:45:46*solitudesf quit (Read error: Connection reset by peer)
17:46:06FromDiscord<badassiel> well... `../views/user` worked. hmm..
17:47:26*solitudesf joined #nim
17:47:46FromDiscord<badassiel> did import strategy changed since Nim in Action? also why `..` is needed when I'm in root already, is it because my starting point is in `src` dir?
17:48:07*zyklon joined #nim
17:48:16lqdev@badassiel: the import resolution hasn't changed since then, what you're doing should work fine
17:48:21*uvegbot quit (Ping timeout: 268 seconds)
18:00:46*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:01:23lqdevanyone? please, I've been sitting there for a long while now. even a "no" would be appreciated.
18:04:07lqdevcurrently I just have an array enumerating all the possible number types, but I don't like that solution
18:05:23disruptekhttps://play.nim-lang.org/#ix=2002
18:05:50disruptekhttps://play.nim-lang.org/#ix=2003
18:06:12disruptekwhy isn't this acceptable?
18:06:38lqdevwell, I'm doing this in an `if` statement branch
18:06:42lqdevso it's not really viable
18:06:54lqdevsorry for the bad example, should've considered that
18:07:52miprihttps://play.nim-lang.org/#ix=2005
18:08:51lqdevmipri: not viable either, `x` is a NimNode of kind nnkSym
18:08:58lqdevnot a typedesc
18:09:46*Hideki_ joined #nim
18:11:04lqdevguess I'll stick with my overly verbose solution for the time being.
18:11:07Araqlqdev: what's the problem?
18:12:29miprisounds like you're doing string comparison in an untyped matter, which makes SomeNumber annoying because "SomeNumber" isn't a string that matches all the possible string representations of numerical types.
18:13:19lqdevAraq: I'm trying to check if a type sym is referring to SomeNumber
18:14:02*Hideki_ quit (Ping timeout: 240 seconds)
18:14:30AraqgetType(x).kind in {ntyInt, ...}
18:14:56AraqgetType(x).typeKind in {ntyInt, ...}
18:15:01Araqsomething like that
18:15:09lqdevthat's roughly what I'm doing right now, but your solution seems better
18:15:34disruptekit's almost like he knows how to do it.
18:16:28lqdevdisruptek: I know how to do it, I was just looking for a more compact solution.
18:18:22Araqwell wrap it in a helper and create a PR for macros.nim
18:18:44miprithe direction I'd go in, is having the macro generate code that does the test, and deferring the decision. templates and 'when T is SomeNumber' are part of the language, too. macros can produce that.
18:18:52Araqor even better: write a getType() tutorial, nobody really knows about it
18:19:17lqdevAraq: I didn't need getType() here, the NimNode I have is already a type
18:19:27lqdevand I don't think it needs a helper
18:19:32Araqmipri: that's also a very good solution but produces some code bloat that the compiler then optimizes away
18:21:35*nsf joined #nim
18:24:04*jjido joined #nim
18:36:04dom96badassiel: is your `views` folder inside `src`?
18:36:34dom96here is the code for chapter 7 for reference if you want to compare: https://github.com/dom96/nim-in-action-code/tree/master/Chapter7/Tweeter
19:00:02*ng0 quit (Remote host closed the connection)
19:01:26*ng0 joined #nim
19:02:54*Balu_ quit (Quit: Leaving)
19:12:46FromGitter<auxym> so... what's the currently recommended tool to use for tests? unittest? einheit? unittest2? testament?
19:16:53*lqdev quit (Ping timeout: 252 seconds)
19:19:25FromDiscord<Chiqqum_Ngbata> From what I've gathered: unittest if it works for you, unittest2 if it doesn't, and almost certainly not testament
19:23:22*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:23:53*exelotl joined #nim
19:27:26*clyybber joined #nim
19:28:41*jjido joined #nim
19:30:34FromGitter<auxym> funny how the first thing in the official unittest docs is recommending testament. Then it's almost impossible to find good information on testament.
19:30:59disruptektestament docs are in the compiler section.
19:42:22*lqdev joined #nim
19:51:58lmariscalHi jken I'm now
19:53:42clyybberHi now I'm dad
19:54:25*lqdev quit (Remote host closed the connection)
19:55:02narimiranclyybber: joke theft is not a joke! miiichaaaeeel!!!
19:56:13clyybberits only a gaem y u haf 2 be maad
19:57:14narimiran(i don't know that reference, and now i'll go to bed ashamed)
19:59:46clyybberlemme help you: https://www.youtube.com/watch?v=SQvb2Oy0ph8
20:04:38*narimiran quit (Ping timeout: 268 seconds)
20:21:37*clyybber quit (Quit: WeeChat 2.6)
20:31:04*nsf quit (Quit: WeeChat 2.6)
20:32:14*thomasross quit (Remote host closed the connection)
20:32:34*thomasross joined #nim
20:35:12*clyybber joined #nim
20:53:10*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:01:58*GordonBGood joined #nim
21:14:42GordonBGoodAraq and all: I'd like to raise the issue of a couple of compiler switch names that are a little ambiguous or don't really describe what they do...
21:15:15GordonBGoodSuch as the new --seq2v2 that has be pulled out of --gc:destructors...
21:15:27*krux02 joined #nim
21:15:59GordonBGoodWhich actually also applies to strings and not just seqs in making them also destructor based...
21:16:39GordonBGoodSo should we name it --seqsstrsv2? or --seqstrv2?
21:17:44GordonBGoodAnd since this has been extracted from --gc:destructors, what remains doesn't have much left to do with destructors...
21:18:45GordonBGood--gc:destructors is now really --gc:noCruftGCPlugin or --gc:noCruftGCHooks...
21:19:13GordonBGoodAlthough it currently only works when --seqsv2 is also turned on...
21:19:32*clyybber quit (Quit: WeeChat 2.6)
21:19:43GordonBGoodIt could actually be backported to also work with version 1 seqs and strings
21:19:56*Vladar quit (Quit: Leaving)
21:21:00GordonBGoodChanging --seqsv2 to something else isn't a problem as it isn't released yet and is still barely usable...
21:21:56GordonBGoodBut --gc:destructors is in version 1.0; however, it isn't usable with ref's unless one supplies the hooks; and...
21:22:30GordonBGooduntil araq finishes "araqsgc", I don't know that there are any others uses...
21:23:28GordonBGoodOne can hook newObjHook with alloc and traverseObjHook with discard to get a cruft-less --gc:none, but...
21:23:44GordonBGoodI doubt anyone has done that other than to "play around"
21:25:15GordonBGood--newruntime isn't an issue as it is entirely destructor based and thus turns --...v2 when enabled
21:25:38GordonBGood*turns on --...v2
21:38:20hashbjornDoes nim have something similar to what I know as a "Discriminated Union" type from F#?
21:38:36hashbjornI'm want to have a type `Shape`
21:38:53hashbjornwhich could be an instance of e.g. `Rect` `Circle`, `Triangle`, etc
21:39:02disruptekthat sounds like a variant object.
21:39:08hashbjornbut I'm tryoing to avoid using inheritance
21:39:22*hashbjorn looks up variant objects
21:39:28disruptekaka `case object`.
21:41:28hashbjornthat looks like exactly what i need, thanks!
21:41:37disruptekyep.
21:42:15hashbjornin case it interests anyone, I'm making a "tanks"-style multiplayer game in nim
21:42:25disruptektrajectory tanks or...?
21:42:35hashbjornlike top-down view of tanks
21:42:49hashbjornwalls in between, projectiles ricochet from walls.
21:43:14hashbjornanyway I've been making it with a friend, and we've been writing it in a strictly functional style
21:43:26disruptekneat.
21:43:29hashbjornso far we don't have a single `proc`, heh
21:43:33hashbjornit's been a ton of fun
21:43:42disruptekis it oss?
21:43:48hashbjornyeah
21:43:56hashbjornhttps://github.com/kofoednielsen/pure-tanks
21:44:03hashbjornit's not playable at all yet
21:44:15disruptekthanks, i will watch your progress. 😁
21:44:43hashbjornthe idea is also to not include a front-end, but just expose a UDP port that players can send packets to
21:44:49hashbjornand then send json objects back representing game state
21:44:59hashbjorn(we have a pretty tight hacker group who likes this kind of stuff - heh)
21:45:18disrupteki mean, who the hell wants to play a game with a front-end?
21:45:39hashbjornmore like: who wants to write a good front end 😂
21:46:16hashbjornbut no I'm looking forward to writing a couple clients (bots?) in different languages. think the first one will be in elm
21:48:59disrupteksounds pretty fun.
21:49:37disrupteki spent hours and hours playing tank wars back in the day. scorched earth always felt like a rip off, though it was better in a lot of ways.
21:53:12hashbjorni played a flash version of those games a bunch
21:53:47disrupteki get it, i'm old. 😝
21:54:30hashbjornhah I'm feeling old myself right now looking for my flash game. doesn't seem to be online anymore, but it's /flash/ so eh anyways
21:55:09disruptekyeah, plus never meet your heroes.
21:56:51disruptekthere was a really simply one for commodore and another for apple ][ i played around the same time, but those EGA graphics, man.
22:10:03*sagax quit (Read error: Connection reset by peer)
22:11:20*Hideki_ joined #nim
22:15:48*Hideki_ quit (Ping timeout: 246 seconds)
22:39:05*luis_ joined #nim
22:50:58*nif quit (Quit: ...)
22:51:09*nif joined #nim
22:59:26*solitudesf quit (Ping timeout: 276 seconds)
23:01:21*Hideki_ joined #nim
23:01:26*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
23:01:39*pbb joined #nim
23:22:56*stefantalpalaru quit (Ping timeout: 240 seconds)
23:23:39*GordonBGood quit (Ping timeout: 260 seconds)
23:23:50*exelotl quit (Quit: Leaving)
23:25:29*xace quit (Ping timeout: 252 seconds)
23:26:52*luis_ quit (Quit: luis_)
23:27:20*luis_ joined #nim
23:27:21*xace joined #nim
23:34:28*seni quit (Quit: Leaving)
23:44:50*lritter quit (Ping timeout: 240 seconds)
23:46:24*Hideki_ quit (Remote host closed the connection)
23:46:41*Hideki_ joined #nim
23:57:12*Hideki_ quit ()
23:59:38*Hideki_ joined #nim