<< 13-12-2019 >>

00:00:40disrupteknimph now knows when your project is missing tags and warns you about 'em with the commit hash in which the version was first published.
00:03:30*abm quit (Read error: Connection reset by peer)
00:04:40FromDiscord<Clyybber> fixing the ecosystem
00:04:44FromDiscord<Clyybber> one tag at a time
00:08:56*hexeratops joined #nim
00:17:59FromDiscord<Fern & Simula (They/Them)> is there a way to get all methods attached to a certain object?
00:30:20*zedeus quit (Quit: WeeChat 2.5)
00:31:38FromDiscord<Fern & Simula (They/Them)> alternatively, is there a way to send a method call to an object without knowing if it implements the method?
00:35:33FromDiscord<Fern & Simula (They/Them)> nvm, second one won't work
00:37:36*leorize quit (Ping timeout: 260 seconds)
00:38:38*leorize joined #nim
00:59:17*lkw quit (Ping timeout: 240 seconds)
01:48:11*liam_ quit (Quit: Leaving)
02:27:22*lkw joined #nim
02:30:40*Hideki_ joined #nim
02:35:26*Hideki_ quit (Ping timeout: 276 seconds)
02:56:14*gangstacat quit (Ping timeout: 276 seconds)
03:27:01*endragor joined #nim
03:36:52*rockcavera quit (Remote host closed the connection)
03:38:58FromDiscord<snluu> If I have a `ss: var seq[T]` where `T` is an object type, what is the syntax to reference `ss[i]` with a variable so I don't have to call `ss[i]` all the time/pay the array access penalty for `address at zero + i`?
03:39:21FromDiscord<snluu> I tried `var s = ss[i]` and it seems like that is doing a copy?
03:44:23*Marquisdefalbala quit ()
03:45:57FromDiscord<snluu> ```
03:45:57FromDiscord<snluu> var s = ss[i]
03:45:58FromDiscord<snluu> s.x = 1
03:45:58FromDiscord<snluu> ```
03:46:05FromDiscord<snluu> that seems to create a opy
03:46:08FromDiscord<snluu> copy
04:00:35*drewr quit (Ping timeout: 250 seconds)
04:03:23*gangstacat joined #nim
04:07:18*Tanger quit (Quit: Leaving)
04:26:15*nsf joined #nim
04:30:44*hexeratops quit (Remote host closed the connection)
04:32:36*artemis_coven joined #nim
04:32:37*artemis_coven quit (Client Quit)
04:32:55*dddddd quit (Remote host closed the connection)
04:55:47*chemist69 quit (Ping timeout: 246 seconds)
04:57:30*narimiran joined #nim
04:57:51*chemist69 joined #nim
04:58:30FromDiscord<Kaynato> You could have T be a ref object type instead.
05:05:47FromDiscord<snluu> what would get on the heap tho?
05:21:48*endragor quit (Remote host closed the connection)
05:22:54*endragor joined #nim
06:06:03FromDiscord<demotomohiro> I think `var s = addr ss[i]` is what you want, but just write simple code and let Nim or backend compiler optimize your code would be bettter.
06:07:21FromDiscord<snluu> oh, let me give that a try
06:07:30FromDiscord<demotomohiro> Nim language is designed so that simple code generate fastest code
06:09:27FromDiscord<demotomohiro> addr operator is supposed to be used only when you need to use C code.
06:09:47FromDiscord<snluu> in my case tho, not sure what is the "right" way to do things?
06:10:18FromDiscord<snluu> i dont want to keep typing `myListThing[index]`, rather just have an alias at the beginning of the loop
06:10:20FromDiscord<snluu> which does not work
06:11:02FromDiscord<Kaynato> Instead of passing pointers around (dangerous C conventions), make a type which is a ref object, fill the seq with the ref objects, and then `let s = ss[i]` will give you the reference, which you can use to mutate the internal contents
06:11:37FromDiscord<Kaynato> It is basically (?) the same as passing by addr, except this is how you "should" do it in nim
06:11:44FromDiscord<Kaynato> please correct me if I am wrong
06:11:49FromDiscord<snluu> afaik, `ref object` will always guarantee GC/heap allocation--which is unnecessary in this case
06:12:06FromDiscord<snluu> addr is different, it's just getting the memory address of something, which could be on the stack
06:12:16FromDiscord<Kaynato> right, I suppose you could just do that instead, then
06:12:26FromDiscord<Kaynato> then addr sounds like a fit for your use case :x
06:12:34FromDiscord<snluu> yeah, thanks!
06:18:18FromDiscord<snluu> @Kaynato, the thing I'm looking for is basically the equivalent of `T&` in C++
06:18:44FromDiscord<Kaynato> Oh. Then yes, addr and ptr are exactly what you want
06:19:38FromDiscord<Kaynato> calling addr on x gives you the pointer to x. The pointer will be of type `ptr T` where T is the type of x.
06:21:17FromDiscord<demotomohiro> You can write `template ss: untyped = myListThing[index]` and `ss` in your code are replaced with `myListThing[index]`.
06:22:17FromDiscord<snluu> hmm... that's one angle
06:23:40FromDiscord<demotomohiro> You cannot use addr operator to let or const variable.
06:27:55FromDiscord<demotomohiro> `with` macro might be better. https://github.com/zevv/with
06:32:20*Hideki_ joined #nim
06:36:51*Hideki_ quit (Ping timeout: 252 seconds)
06:38:04lqdev[m]@demotomohiro you can use unsafeAddr if you seriously need to get the address, though.
06:45:07leorizesnluu: you've over optimizing, just write idiomatic code and it'll be fast
06:46:15leorizebut if you love micro-optimizations, @mratsim can help you with that
06:47:32lqdev[m]yeah, if you need to pass by reference you almost always want to declare your type as ref
06:47:41leorizejust use `var`
06:47:46leorizeit'll be by-ref
06:47:53FromDiscord<snluu> huh?
06:48:10lqdev[m]but Nim's pretty fast anyways, I'm doing many, many table lookups per frame in my game and it works well
06:48:11FromDiscord<snluu> no, what i have is something like this:
06:48:40leorizebut the compiler will auto pass by ref if the type size is 3x ref
06:48:40lqdev[m]please use a pastebin.
06:48:47leorizes/ref/float
06:50:27*narimiran quit (Ping timeout: 250 seconds)
06:50:58FromDiscord<snluu> https://pastebin.com/3mKKnCb6
06:51:04FromDiscord<snluu> that's what I have.
06:51:27FromDiscord<snluu> i don't want to repeatedly type `myObjects[i]`. `var o = myObjects[i]` seem to make a copy
06:55:18FromDiscord<snluu> https://play.nim-lang.org/#ix=24h4
06:55:25FromDiscord<snluu> ^ the last loop does not work
06:55:44FromDiscord<snluu> well it works, but it only mutates the copy πŸ˜›
06:56:23FromDiscord<snluu> `addr` seem to do the trick
06:56:46leorizehttps://play.nim-lang.org/#ix=24h5 :P
06:57:02FromDiscord<snluu> πŸ˜†
07:00:13leorizeZevv's with macro is a good choice also
07:00:20FromDiscord<snluu> thats a neat trick.
07:01:19leorizehttps://play.nim-lang.org/#ix=24h7
07:01:22leorizeeven more tricks :P
07:02:18FromDiscord<snluu> that would be my preferred approach, unfortunately i'm doing a bunch of puzzling thing (Advent Code) that requires index jumping around and stuff
07:03:36leorizewell, template or `with` is a good choice
07:03:49leorizeI'd say `with` is better :p
07:03:52FromDiscord<snluu> Thanks!
07:06:30FromDiscord<snluu> i'll stick with my sinful `addr` for now until i understand how that magic `with` template works
07:06:31FromDiscord<snluu> πŸ™‚
07:08:27*endragor quit (Remote host closed the connection)
07:14:15leorizeplease use a template instead :P
07:14:30leorizegood Nim code avoids unsafe features when unneeded
07:17:17*gangstacat quit (Quit: Ĝis!)
07:24:58FromDiscord<snluu> yeah template works too
07:30:59*solitudesf joined #nim
07:51:15*letto joined #nim
07:58:13*gour joined #nim
08:00:00*gmpreussner quit (Quit: kthxbye)
08:04:20*PMunch joined #nim
08:05:15*gmpreussner joined #nim
08:06:51FromDiscord<mratsim> @snluu, not sure about your use case but I use cast[ptr UncheckedArray[T](mySeq[0].addr) when I will need to do a lot of indexing
08:07:24*FromGitter quit (Remote host closed the connection)
08:07:42*FromGitter joined #nim
08:08:11FromDiscord<mratsim> my main goal is to be able to pass "restrict" and "assume_aligned" though: https://github.com/numforge/laser/blob/master/laser/tensor/datatypes.nim#L69-L71
08:09:02FromDiscord<mratsim> Seq indexing is as lightweight as array indexing in C, and if they are indexed in a hot loop, the compiler should hoist the seq accesses. And it will also be in L1 cache
08:18:12FromGitter<cndkhuong> hi, Nim's authors, I'm falling love with Nim, can I translate your nim-lang.org to Vietnamese ? All download, forum and irc still link back to nim-lang.org , I just try to translate introduction, learning resource
08:18:35*NimBot joined #nim
08:19:35*letto quit (Quit: Konversation terminated!)
08:20:00*letto joined #nim
08:20:19*gangstacat joined #nim
08:24:27FromDiscord<mratsim> I don't think there is any issue, have a look into: https://nim-cn.com/
08:24:36FromDiscord<mratsim> and: https://forum.nim-lang.org/t/5045
08:24:59*letto quit (Quit: Konversation terminated!)
08:25:03FromDiscord<mratsim> ideally you should create an organization on Github like the Chinese community: https://github.com/nim-lang-cn
08:26:03FromDiscord<mratsim> and you give someone core admin rights also so that there is always a fallback
08:30:24FromDiscord<Rika> is it not possible to get the position of the cursor
08:30:30FromDiscord<Rika> in terminal
08:34:10FromDiscord<mratsim> If there is anything you can do in the terminal, ncurses probably does it
08:34:14FromGitter<cndkhuong> thanks mratsim
08:34:16FromDiscord<mratsim> or emacs
08:35:18PMunchHmm, `var x, y {.compileTime.}: int` leads to a very strange error
08:35:29PMunchWhen you try to assign to the variables
08:36:16PMunchhttps://play.nim-lang.org/#ix=24hi
08:38:59FromDiscord<mratsim> that's new
08:39:12PMunchhttps://play.nim-lang.org/#ix=24hj
08:40:09FromDiscord<mratsim> maybe @Zevv broke it :p
08:40:21FromDiscord<mratsim> you have to do arithmetics in npeg now
08:40:27FromDiscord<mratsim> I'm pretty sure it's Turing complete
08:45:30livcdOops. I am getting SIGSEGV: Illegal storage access. (Attempt to read from nil?) with d:danger but not with d:release
08:45:41livcdnot with just d:release*
08:47:40FromDiscord<mratsim> compile with --debugger:native and launch with gdb/lldb
08:47:48FromDiscord<mratsim> you'll get a stackTrace
08:52:34livcdthanks
08:54:53*endragor joined #nim
09:01:25*letto joined #nim
09:04:49*floppydh joined #nim
09:19:42Zevvwhat did I break
09:22:48Zevvworks fine in devel?
09:29:47FromDiscord<mratsim> this: https://play.nim-lang.org/#ix=24hi
09:29:56madpropsdoes os.nim have a way to decontruct a path like /some/dir to ["some", "dir"] ?
09:30:12madpropsi could just split at /
09:30:19madpropsbut might be too os specific
09:30:50FromDiscord<mratsim> yes it has
09:30:53FromDiscord<Rika> @mratsim I meant, with nim, the "in terminal" was to clarify where this cursor is
09:32:31FromDiscord<mratsim> @madprops, use splitpath in os module or rsplit/lsplit in strutils
09:32:41FromDiscord<mratsim> see usage: https://github.com/status-im/nim-secp256k1/blob/master/secp256k1.nim#L4
09:32:47madpropsim checking splitPath, but seems to only split on the last component
09:32:56FromDiscord<mratsim> rsplit and lsplit should be passed "DirSep" to be OS independant
09:37:00*ng0 joined #nim
09:40:07FromDiscord<mratsim> @Rika ah I see, no idea. Me and user interfaces == 2.
10:07:31*zedeus joined #nim
10:15:24*tklohna joined #nim
10:19:32ZevvI didn't do it
10:20:29*kevinchau joined #nim
10:26:16Araqnever use rsplit/spit for Path operations!
10:26:44Araqyeah, I broke .compileTime vars for 1.0 in an attempt to fix a design problem
10:27:02*kevinchau quit (Quit: ERC (IRC client for Emacs 26.3))
10:27:05Araqmy cure seems to be worse than we were previously though
10:28:06Araqso ... do we want --gc:arc vs --gc:orc ?
10:32:44Zevvyou deserve your 'a' in there
10:33:41Araqyeah but 'arc' would be the MM without the cycle detection and 'orc' would detect cycles
10:34:05*Hideki_ joined #nim
10:34:12Araq'o' because it's a circle, so it can detect cycles. it also does it like an Orc, via brute-force
10:38:56*Hideki_ quit (Ping timeout: 268 seconds)
10:40:50ZevvDude, really? You are willingly offending the Orc minority group here
10:42:15*nc-x joined #nim
10:42:27nc-xAraq: regarding nimscript.nim / os.nim issue
10:42:36Araqnc-x, I had an idea
10:42:55nc-xmoving paramStr() and paramCount() only to os is a bad idea IMO
10:43:02nc-xbecause then you have to import os
10:43:14nc-xand that causes ambiguos calls
10:43:19Araqbut os nowadays works in the NimScript environment!
10:43:31nc-xfor other symbols defined in nimscript.nim
10:43:35Araqthe only real issue is that nimscript.nim is part of freaking system.nim
10:43:54Araqnimscript should import os.nim and export paramStr
10:44:02nc-xyeah
10:44:47Araqwe must turn nimscript into an explicit import
10:45:09Araqnimble packages are not affected since nimble writes a wrapper that imports more stuff already
10:45:09nc-xbut that will break almost every nims file
10:45:35Araqyes, every nims file, but not the .nimble files
10:46:13nc-xor we could just deprecate nimscript and use nake, because it has uses proper nim and not nims :D, but yeah people here love nims
10:46:39nc-xwell, i can move nimscript out of system if that is what you want
10:47:10Araqwe can also do nothing whatsoever
10:47:29Araqso kaushalmodi has to write os.paramStr or system.paramStr, big deal...
10:49:06Araqbtw ever since Nim got caching support for '-r' nake lost its relevance IMO
10:50:08nc-xactually os.paramStr is an error in nims right now. so IMO my previous patch, removing paramStr from os.nim for would be fine.
10:51:11Araqmeh
10:51:18nc-xor there are plenty of os.nim stuff in nimscript.nim which is not exported like `removeDir`, and nimscript.nim then defines a short named function for it.
10:51:28nc-xwe could do the same for paramstr and paramcount
10:51:34nc-xbut that would be breaking too.
10:51:43nc-xdo just let me know whatever you want.
10:51:45Araqit's also not consistent with the design
10:51:47nc-x*so
10:52:08Araqthe short names are because it's a different operation with the Whatif support and logging going on
10:52:35AraqI don't know what I want :-)
10:53:31nc-xwell, i do know what i want, but nobody agrees with me ;P
10:53:36FromDiscord<mratsim> "-r" caching is a bit flaky, sometimes I recompile just to see my dumpTree / toStrLit output
10:54:02Araqnc-x, and that's 'nake'?
10:54:42nc-xi have not used nake
10:54:45nc-xbut yeah similar idea
10:54:51nc-xof using proper nim
10:54:55nc-xinstead of nims
10:55:02nc-xzig and jai also do the same iirc
10:55:06nc-xand rust also has build.rs
10:55:08Araqsame here so I added caching for '-r'
10:55:15*nsf quit (Quit: WeeChat 2.6)
10:55:35Araqmratsim: I don't understand your remark.
10:55:37*tklohna quit (Ping timeout: 240 seconds)
10:56:51nc-xwell i guess then we should just close this issue and pr for now. and think of a proper design/rfc for moving forward.
10:58:00*nc-x quit (Remote host closed the connection)
10:58:28FromDiscord<mratsim> sometimes I need to delete the binary to ensure my macro gets triggered again and I can see the nim code generated
10:58:57FromDiscord<mratsim> and sometimes even if the macro actually change the resulting code, it doesn't get recompiled
10:59:03Araqbut every edit causes a recompile
10:59:18FromDiscord<mratsim> mmm
10:59:32FromDiscord<mratsim> maybe it's VS code which is buffering edits then
10:59:36Araqit even tracks the nim.exe you used to build it
10:59:56Araqso if you change the compiler and nothing in your project, it gets recompiled anyway since the compiler changed
11:17:38*narimiran joined #nim
11:33:50shashlick@nc-x I'll look into it a bit and see if I have any ideas
11:35:48shashlickNimscript doesn't import os
11:42:25Zevvaraq, about the deque autoinit: why is the tableimpl.nim way "more elegant"? It boils down to the same? You initialize if it is not inialized, otherwise you dont? What obvious thing do I miss here?
11:46:28shashlick@nc-x why was your original pr not good enough
11:56:11*dddddd joined #nim
11:58:33*rockcavera joined #nim
12:19:51*luis_ joined #nim
12:20:06*rockcavera quit (Read error: Connection reset by peer)
12:20:48*rockcavera joined #nim
12:20:48*rockcavera quit (Changing host)
12:20:48*rockcavera joined #nim
12:21:11*tklohna joined #nim
12:32:00FromGitter<alehander92> Araq
12:32:05FromGitter<alehander92> can i make an async iterator
12:41:33*luis_ quit (Ping timeout: 245 seconds)
12:41:45ZevvI bet you can alehander92, we all believe in you. You can *do* it, go for it!
12:42:18*tklohna quit (Remote host closed the connection)
12:43:32FromDiscord<michalm> Hi. Is is possible to use channels with some kind of generic messages?
12:43:34FromGitter<alehander92> *sounds of callbacks crashing in the ocean*
12:44:02FromGitter<alehander92> Zevv i tried
12:44:13FromGitter<alehander92> but the compiler SAYS NO
12:44:28FromGitter<alehander92> https://www.youtube.com/watch?v=AJQ3TM-p2QI
12:51:01ZevvI'm not in any position to say anything sensible about these things, but given my assumptions that async rewrites your procs into closure iterators *might* be a complicating factor in what you are trying to accomplish
12:53:00FromGitter<alehander92> thats what i also thought
12:53:11FromGitter<alehander92> but i thought that the smart people here
12:53:16FromGitter<alehander92> might have thought of something man
12:53:19FromGitter<alehander92> come on man
12:53:21FromGitter<alehander92> its 2019
12:53:38FromGitter<alehander92> man
12:54:22FromGitter<alehander92> (and realistically this shouldn't be fatal imo)
12:54:43*nsf joined #nim
12:56:39FromGitter<alehander92> and actually we can do it in asyncjs
12:56:46FromGitter<alehander92> if we target es2018 iirc
13:08:59*luis_ joined #nim
13:14:00*MarquisdeFalbala joined #nim
13:15:17*Hideki_ joined #nim
13:17:29*luis_ quit (Quit: luis_)
13:21:12*solitudesf- joined #nim
13:23:17*solitudesf quit (Ping timeout: 240 seconds)
13:28:18FromGitter<bung87> `error: member reference base type 'natural_t' (aka 'unsigned int') is not a structure or union ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5df391f1ac14cc652c78395e]
13:29:46FromGitter<bung87> the code gen make `cpu_ticks` as structure?
13:30:09leorizedepends on your code
13:30:16leorizewhat's the nim code of that structure?
13:30:37FromGitter<bung87> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5df3927cac14cc652c783de8]
13:30:56leorizeuse UncheckedArray[Natural] instead
13:31:10leorizeyou're interfacing with C, and they don't have seq
13:33:18FromGitter<bung87> ` Error: invalid type: 'UncheckedArray[Natural]' in this context: 'host_cpu_load_info_data_t' for var`
13:34:25FromGitter<bung87> actually it is a array with length, but the length assign through c define
13:36:29leorizethe length probably wouldn't change, so just hardcode it in
13:37:43FromGitter<bung87> it named as CPU_STATE_MAX, I dont know it means what and depends on what
13:37:52FromDiscord<mratsim> I suggest you just use RDTSC instead of fiddling with Mac stuff: https://github.com/status-im/nim-beacon-chain/blob/aec3d5ac98c65850fb5716adf1a307a85edd98d9/nbench/platforms/x86.nim#L51
13:38:23FromDiscord<mratsim> it's probably the number of frequencies state the CPU supports
13:39:56FromGitter<bung87> so it ’s not constant,
13:40:35leorizebung87: for ABI stability they wouldn't meddle with that struct too much
13:40:47FromDiscord<mratsim> but you can use UncheckedArray, don't use Natural, it's probably int32/cint
13:42:07*Hideki_ quit (Remote host closed the connection)
13:42:20*Hideki_ joined #nim
13:42:38FromGitter<bung87> @ leorize so it’s the os supported number right?
13:42:54FromGitter<bung87> @ mratsim Ok, I β€˜ ll try it
13:49:23*abm joined #nim
13:50:17FromGitter<bung87> using UncheckedArray make `var r_load: host_cpu_load_info_data_t ` impossible pass compile time.
13:50:41FromGitter<bung87> hmm ,hard code it to 4 ,simplly work.
14:01:43*sealmove joined #nim
14:02:17sealmovehey, i have an issue. when i do `nimble install kaitai_struct_nim_runtime` only the .nimble file is installed
14:03:09leorizesrcDir = "src"
14:03:20leorizeremove that :P
14:03:24sealmoveoh thanks!
14:03:45disruptekpeople still use nimble?
14:03:50FromGitter<bung87> `error: must use 'struct' tag to refer to type 'vmmeter' ⏎ ⏎ ``` vmmeter vmstat;` I think I almost there``` [https://gitter.im/nim-lang/Nim?at=5df39a4555d939230003e7b6]
14:03:56FromGitter<Willyboar> :P
14:05:11*lritter joined #nim
14:06:36*krux02 joined #nim
14:13:30*tane joined #nim
14:17:42sealmovewhat's so bad about nimble?
14:30:40lqdev[m]↑
14:31:24*PMunch quit (Quit: Leaving)
14:32:11*nsf quit (Quit: WeeChat 2.6)
14:32:26FromGitter<Willyboar> disruptek advertises nimph :)
14:35:56AraqZevv, maybe I misread but queries shouldn't cause an init
14:36:25Araqbung87: .importc: "struct vmmeter" is the syntax then
14:37:16disruptekshashlick: hmm, if you kept nim.cfg in your repo and then you removed it, you might not be able to roll to a previous version due to an existing nim.cfg (and one in the target version).
14:38:01disruptekwhich causes my auto-tag-my-repo feature to not work with such versions.
14:38:21disrupteki'm sure it's good enough, though.
14:39:28disruptekalso, the auto-tag-my-repo will not be optional.
14:41:20disruptekwell, it can default to ON, okay/
14:41:39disrupteki mean, the whole idea here is to make it easier to do the right thing than it is to do the wrong thing.
14:41:42disruptekso, we do that.
14:42:13disruptekwe do that FOR YOU.
14:44:51FromGitter<bung87> @Araq yes, I just tried out ,
14:46:01FromGitter<bung87> ah I wish I see you reply earlier ,thank you !
14:48:22FromGitter<bung87> other types declared as typedef in c, this one is different, so it throw must use 'struct' tag to refer to type 'vmmeter'
14:49:08*zahary quit (Quit: Connection closed for inactivity)
14:49:50FromGitter<bung87> I thought import c type as object in nim is same thing months ago. I misunderstood.
14:52:20*Hideki_ quit (Remote host closed the connection)
14:53:04*Hideki_ joined #nim
14:55:04Araquh oh
14:57:17*Hideki_ quit (Ping timeout: 240 seconds)
14:59:15*Hideki_ joined #nim
15:01:10*ng0_ joined #nim
15:01:14*ng0 quit (Disconnected by services)
15:01:16*ng0_ is now known as ng0
15:01:36disruptekhearts and minds, people; hearts and minds!
15:04:06*Hideki_ quit (Ping timeout: 268 seconds)
15:09:23*m_v_m_v joined #nim
15:12:30*Vladar joined #nim
15:13:51m_v_m_vHi all. I am struggling with it for a couple of hours. Do you know how I can pass message from channel X to channel Y and inside that message put address of the generic message creator like a "sender: ptr to channel which satisfy some kind of interface"?
15:15:42leorizerecv it from X then send to Y?
15:16:11leorizeI'm not sure about the latter constraints, can you elaborate, example use case maybe?
15:19:42m_v_m_vSure. For example I have an ChannelMessage definition: https://pastebin.com/4s2u6k3Y now based on that definition if I will create group of channels they will by able to pass only a one type of messages. I would like to do it more generic.
15:21:10*Hideki_ joined #nim
15:22:04m_v_m_vIn that example my mainChannel can not send message to cmdChannel: https://pastebin.com/teH8GSba
15:22:17FromGitter<bung87> https://github.com/jangko/msgpack4nim sounds like this one ?
15:23:42m_v_m_vI thought about it. But to be honest I am thinking that I am missing something in the channel definition.
15:25:27disruptekseems like a problem of inception.
15:26:20*Hideki_ quit (Ping timeout: 276 seconds)
15:26:42Araqm_v_m_v, easiest is to make your message type a case object
15:26:59m_v_m_vHmm so something like: Channel #1: I am sending you a CustomMathTask to solve and I am waiting for result. Channel #2: Cool dude. This is your float as an message. Is not possible ?
15:27:27disrupteki think generics are easier, but both solve the problem.
15:27:52disruptekprobably a case object is the right choice because it's the simplest.
15:28:05Araqm_v_m_v, or use different request/result channels
15:28:54m_v_m_vI don't think that case object would solve my problem in a scalable way.
15:29:05m_v_m_vRequest/result?
15:29:29disruptekyou move one type on request and another on result.
15:30:39Araqthere is this word again, it always triggers me, "scalable". Struggling with 50 lines solutions but anticipating problems for when you have 5 million lines
15:31:06disruptekwell, you have to enter at the right magnitude.
15:31:13m_v_m_vaaa....but then still I have only two types. Then for example I am implementing a new Channel with new type...
15:31:25m_v_m_vIs it possible to use generics for that?
15:31:34disrupteksure.
15:31:38Araqno, it's possible ot use json for that
15:32:09disruptekaraqlogic describes a series of semaphores...
15:32:28Araqjson is "scalable", everything compiles, you can pass every kind of message, you never get any compiletime checking, enjoy
15:33:58FromGitter<bung87> @Araq Today best joke! : )
15:34:36m_v_m_v... thx
15:36:21*MarquisdeFalbala quit (Remote host closed the connection)
15:38:49*m_v_m_v quit (Remote host closed the connection)
15:41:17*njoseph quit (Ping timeout: 250 seconds)
15:44:35*couven92 joined #nim
15:55:20*Mike[m]2 quit (Ping timeout: 250 seconds)
16:00:42*couven92 quit (Read error: Connection reset by peer)
16:01:05*couven92 joined #nim
16:01:23*floppydh quit (Quit: WeeChat 2.6)
16:04:49*Hideki_ joined #nim
16:10:56*ng0 quit (Ping timeout: 260 seconds)
16:12:28*ng0 joined #nim
16:16:45shashlickdisruptek the direction I'm going with is to use project.nim.cfg 100% for Nimble interop
16:17:15shashlickAnd if a user already using it, just grumble and fail
16:17:47shashlickI'm not fond of a solution that mixed manual and automated processing of the cfg
16:18:13shashlickStill don't get your scenario but I suspect it might still impact me
16:18:59*fanta1 joined #nim
16:21:57*Hideki_ quit (Ping timeout: 240 seconds)
16:23:23*kungtotte joined #nim
16:25:17*Hideki_ joined #nim
16:27:05*Hideki_ quit (Remote host closed the connection)
16:29:42*couven92 quit (Read error: Connection reset by peer)
16:30:10*couven92 joined #nim
16:40:43*Hideki_ joined #nim
16:41:16FromGitter<sheerluck> hi. I use cxxopts::Options (https://github.com/jarro2783/cxxopts) in c++, is there similar lib for Nim? Thank you.
16:42:16leorizecheckout: https://nimble.directory/pkg/argparse
16:42:18leorizehttps://nimble.directory/pkg/cligen
16:42:24leorizeand stdlib's parseopt
16:42:44FromGitter<sheerluck> Great!
16:44:59*Hideki_ quit (Ping timeout: 250 seconds)
16:52:02*endragor quit (Remote host closed the connection)
16:56:36*clyybber joined #nim
17:02:27disruptekgithub seems to be struggling.
17:02:27*njoseph joined #nim
17:02:57*clyybber quit (Remote host closed the connection)
17:04:23disruptekshashlick: i thought we were using flags in project.nim.cfg, which makes sense, because that's when you set compile-time options for the program. then nim.cfg can hold paths and get fully managed by the package manager.
17:04:41disruptekthis has the result we want, which is that projects below can share the same paths.
17:05:00disruptekbut this doesn't impact the main project in any negative way, because they have project.nim.cfg to work with.
17:05:54disruptekyou can see an example of this in the way nimph's project is setup.
17:07:58disruptekanyway, as araq says, "get used to editing nim.cfg"
17:08:04disruptekmay as well do it up right.
17:11:15sealmovesoftware engineering question: if you have a bunch of flags, and not all combinations are valid, how do you handle the checking?
17:12:27sealmovefor example "if A is enabled, then B shouldn't be enabled"
17:12:53sealmovedo you make a big block of if .. elses ?
17:14:26disruptekcompare sets, probably.
17:14:33disruptek!pull jsfetch
17:14:44*JustASlacker joined #nim
17:14:49disruptekwtf where is the bot
17:16:33sealmoveso i need to make sets with all valid (or all invalid) combinations?
17:17:24disrupteksure, but they can be constants and you can build them from each other, etc.
17:17:36disruptek!pull jsfetch
17:17:37disbothttps://github.com/nim-lang/Nim/pull/12531 -- 3Add module jsfetch
17:18:08*ng0 quit (Ping timeout: 260 seconds)
17:18:54sealmovenice disruptek, thx
17:20:24*Hideki_ joined #nim
17:23:36*abm quit (Quit: Leaving)
17:31:59FromDiscord<mratsim> lol @solitudesf: https://forum.nim-lang.org/t/5623#35264
17:33:45FromDiscord<mratsim> @m_v_m_v use 2 channels, a channel where one can both read from and write to will be a mess
17:34:29FromDiscord<mratsim> and yes you can pass a callback channel in your channels
17:40:29FromDiscord<Clyybber> solitudesf spittin straight fax
17:40:42FromDiscord<Clyybber> disruptek: Are you using wayfire?
17:41:16disruptekno, sway. you actually use wayfire?
17:41:32FromDiscord<Clyybber> tried it just now
17:41:36FromDiscord<Clyybber> but I have to configure it
17:41:38disruptekyeah?
17:42:01disruptektoo much candy and not enough fibre for me; i'm old, man.
17:42:53FromDiscord<Clyybber> from the introduction blog post it seems great
17:43:07FromDiscord<Clyybber> I like it being modular
17:43:34FromDiscord<Clyybber> thats also why I currently use bspwm and not i3wm
17:43:41disruptekit looks cool, but i don't use any window decoration. not sure it's got something i want.
17:44:07FromDiscord<Clyybber> I don't use window decorations either
17:44:11FromDiscord<Clyybber> I don't even use a bar
17:44:39disrupteki have a bar on a hotkey but i go days without using it.
17:45:21disrupteki need to be able to drive it with software. if i can do that, and it's robust, i'm down.
17:45:32disruptek!repo swayipc
17:45:33disbothttps://github.com/disruptek/swayipc -- 9swayipc: 11swayipc (i3ipc) for Nim 15 3⭐ 0🍴
17:46:22*kungtotte quit (Read error: No route to host)
17:46:47FromGitter<bung87> lib `segfaults` needs to using `include` ?
17:46:52federico3!repo i3ipc
17:46:53disbothttps://github.com/disruptek/swayipc -- 9swayipc: 11swayipc (i3ipc) for Nim 15 3⭐ 0🍴 7& 1 more...
17:46:59disrupteklol
17:47:03disruptek!package i3ipc
17:47:04disbothttps://github.com/FedericoCeratto/nim-i3ipc -- 9i3ipc: 11i3 IPC client library
17:47:28disrupteksomehow, i couldn't find it. but i think swayipc is a little more complete now.
17:48:24FromDiscord<Clyybber> disruptek: wayfire seems to be designed for that
17:48:38disrupteklet us know how it goes.
17:48:45*kungtotte joined #nim
17:50:09FromDiscord<Clyybber> sure
17:52:35*nsf joined #nim
17:54:06*Hideki_ quit (Ping timeout: 252 seconds)
17:55:14solitudesf-same guy who wrote that suggested procedures list is too long to scroll wrote that he uses verbosity:3
17:55:21solitudesf-is this some kind of trolling?
17:55:37disruptekyes, a very poor kind.
17:55:50*njoseph quit (Ping timeout: 276 seconds)
17:56:48*endragor joined #nim
17:59:16solitudesf-uhhhh, my nimble broke
17:59:35solitudesf-why the heck does it think that its directory is ~/.nimble/pkgs/pkgs
18:00:25disruptekrmdir ~/.nimble/pkgs/pkgs; it's from nimph running nimble with a --nimbleDir that it couldn't grok.
18:00:30disruptekfixed.
18:01:15*endragor quit (Ping timeout: 250 seconds)
18:05:43FromDiscord<Clyybber> disruptek: Used wf-shell to test if I could start anything
18:05:45FromDiscord<Clyybber> But I can't
18:06:06FromDiscord<Clyybber> I don't necessarily think wayfire is to blame, since I'm trying this with an optimus setup
18:06:08disruptekhe didn't start wayfire.
18:06:12disruptekit was always burning,
18:06:16disrupteksince the world's been turnin'.
18:06:59FromDiscord<Clyybber> no I didn't start it but I still broke it
18:07:15disruptekthis is why we can't have nice things.
18:07:17solitudesf-disruptek, `Exception: unparsable version `2.0.10.0` in sdl2_nim`. why does nimph struggle with that?
18:07:49disruptekit doesn't know how to handle 4 digits.
18:07:56solitudesf-cool
18:08:04disruptekbut i think it's supposed to parse that as 2.0.10.
18:08:09sealmovehow do I get size of object? `sizeof`?
18:08:09disruptekwhere is that version?
18:08:27solitudesf-what do you mean where?
18:08:35disruptekwhere can i test that package?
18:08:52disruptekthe npeg-based loose parser i just added should slurp that up happily.
18:09:04disruptek!package sdl2_nim
18:09:05disbothttps://github.com/Vladar4/sdl2_nim -- 9sdl2_nim: 11Wrapper of the SDL 2 library for the Nim language.
18:09:10disruptekah, okay.
18:09:12disrupteki will fix it.
18:10:37*fanta1 quit (Quit: fanta1)
18:10:38disruptekis that nimph or bump that yielded that message?
18:11:09solitudesf-nimph
18:11:14disruptekok, thanks.
18:14:59dom96why don't you just use Nimble's version parser?
18:27:19*njoseph joined #nim
18:37:45FromDiscord<Clyybber> disruptek: Can nimph work with repos without a nimble file?
18:43:34sealmovenimitai is starting to pass some of the first official tests :)
18:45:10FromGitter<indiscible> hello, I cannot create seq of string with repeat, it always concatenate all the string into one single string. how do I do :repeat("hello",3)=["hello","hello","hello"] ?
18:45:24FromGitter<indiscible> instead of "hellohellohello"
18:46:01FromGitter<sheerluck> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5df3dc6942784416abe00d8f]
18:48:01*endragor joined #nim
18:52:37*endragor quit (Ping timeout: 240 seconds)
18:58:40*couven92 quit (Read error: Connection reset by peer)
18:59:05*couven92 joined #nim
18:59:21sealmoveindiscible: you need to use sequtils's repeat
18:59:54sealmoveboth strutils.repeat() and sequtils.repeat() exist
19:01:05federico3this kaitai is interesting, actually
19:01:13sealmovesheerluck: sorry, the project needs the very new changes to the VM (https://github.com/nim-lang/Nim/pull/12775, https://github.com/nim-lang/Nim/pull/12777)
19:01:14disbotβž₯ Increased TInstr field sizes: allow long jumps and 65535 VM registers
19:01:27federico3https://kaitai.io/
19:02:37sealmovefederico3, the implementation though is disappointing. I think the language-agnostic approach they used leads to bad quality.
19:03:10federico3how so?
19:03:32sealmovethe source code is constructed with strings (instead of AST)
19:03:49federico3you are talking about the compiler?
19:04:08sealmoveyes, Kaitai Struct compiler does code generation using strings.
19:04:39federico3yes, it's mean to generate valid code
19:04:41sealmovethe ksy language design is great, I haven't seen anything more powerful for parsing binary data
19:04:55Zevvanyone any lodging tips for @ fosdem?
19:06:21sealmovesheerluck: nim 1.1.1 is nim devel
19:06:27sealmovethere is no package yet
19:06:30federico3sealmove: I suppose a common use case could be to use kaitai to genere parsers and protocol handlers and release them as libraries
19:07:45sealmovefederico3: not necessarily, for example https://github.com/kaitai-io/kaitai_fs
19:08:43sealmoveksy files should work as parsers on demand
19:09:29sealmovenimitai is able to inject the parser with a macro, so you don't have to have a library for each file format
19:09:58sealmovei plan to implement dll generation too (if someone prefers dynamic over static linking)
19:10:14*solitudesf- quit (Remote host closed the connection)
19:10:37*solitudesf- joined #nim
19:12:05*ng0 joined #nim
19:13:57FromGitter<indiscible> @sealmove: doh!! thankyou
19:15:35federico3sealmove: sure it's possible to parse the ksy files at build time or even run time but it's not always practical or efficient
19:17:04sealmovefederico3: that's why there should be alternatives like ddl
19:17:08sealmovedll*
19:17:56sealmovebut only providing the source code (and especially building it with strings) is bad style
19:18:27sealmoveobtaining the source code is the edge case, and you only need to do it if you want to optimize the parser
19:19:08sealmovethese stuff should be integrated into the language
19:19:32FromDiscord<Clyybber> Araq: What was your argument against making sink a default? Because it might be worthwhile in the light of the cycle detector
19:20:40federico3sealmove: if you want to provide a client rather than a raw parser and let people use it without having the keitai compiler as a build dependency, a library makes sense
19:22:05federico3sealmove: especially if parsing is just a fraction of the work (e.g. a png decoder, a music player)
19:23:31sealmovei think in any case it's work having it installed (especially if kaitai is just a library in your language), because then you can use a ksy file as the parser
19:23:37sealmoveit's worth*
19:24:03sealmovebut your argument makes sense
19:24:50sealmovenot detaching the parser generation from your project has benefits
19:25:49sealmovefor example if the ksy file is updated/improved, the changes are applied automatically
19:25:56FromGitter<sheerluck> @sealmove Thank you, I've got myself a Nim Compiler Version 1.1.1 [Linux: amd64] from 2019-12-13-devel-22b2684 nightly build ⏎ ⏎ ``` Success: kaitai_struct_nim_runtime installed successfully.``` [https://gitter.im/nim-lang/Nim?at=5df3e5c4578ecf4b1f9a76b0]
19:26:34sealmovesheerluck: you are welcome, thanks for trying it out! :) although it's still completely not functional...
19:27:58*Vladar quit (Quit: Leaving)
19:29:22sealmovethe example in README.md works though
19:29:40disruptekclyybber: not really, no.
19:30:05FromDiscord<Clyybber> disruptek: Can you make it?
19:30:09disruptekit uses the .nimble to figure out where the project root is. that could be fixed, i guess.
19:30:15FromDiscord<Clyybber> Nice
19:30:19disruptekwhy don't you want a .nimble?
19:30:50FromDiscord<Clyybber> I don't care, but its kinda overkill for wrappers
19:31:01FromDiscord<Clyybber> (some wrappers IMO)
19:31:06disruptekbut they don't work in the existing ecosystem otherwise, right?
19:31:13disruptekie. you cannot install them with nimble.
19:31:25FromDiscord<Clyybber> I dont care about nimble
19:31:31FromDiscord<Clyybber> I actually don't care at all
19:31:35FromDiscord<Clyybber> wrappers are single files
19:31:40FromDiscord<Clyybber> so ppl will just copy them
19:31:56disruptekin that case, maybe nimph doesn't need to operate upon them at all.
19:32:04FromDiscord<Clyybber> No, but it could?
19:32:14FromDiscord<Clyybber> Like I still approve of versioning/tagging
19:32:17disrupteki mean, maybe you don't need a package manager for a single file you're going to copy into your repo.
19:32:37FromDiscord<Clyybber> disruptek: Sure, but some ppl might still want it managed
19:33:04disruptekalright, but what does that even mean? i'm asking what it does for you. i don't even know.
19:33:23FromDiscord<Clyybber> Treat it like an empty nimble file?
19:33:25FromDiscord<Clyybber> The name of the package is the repo name?
19:33:38disruptekyeah, but what does nimph do inside such a repository?
19:33:52disruptekwe're talking about a directory that isn't git versioned? or, it is?
19:33:56FromDiscord<Clyybber> Nothing, except I guess locking and updating
19:34:11FromDiscord<Clyybber> disruptek: No, it is a git repo that I'm talking about
19:34:54disruptekokay, so it's a versioned directory with one file in it. and you can generate lockfiles against it, but you can't tag it with nimph because there's no concept of versions except as tags.
19:35:05disruptekso it's the inception problem -- you have to tag it manually.
19:35:31FromDiscord<Clyybber> hmm
19:36:04FromDiscord<Clyybber> I mean, I don't care wether to tag with nimph or git
19:36:15FromDiscord<Clyybber> why cant you tag it with nimph?
19:36:42disruptekyou can issue tags with nimph or git, but nimph cannot auto-tag it because there's no concept of versions, just commit hashes.
19:36:50disruptekie. there's nowhere to store a version number.
19:37:36disruptekthe way nimph solves tags-for-versions is that it actually rolls the repo to every commit of the .nimble file and measures the version it finds within.
19:38:06disruptekthen it's like, "hey, there's no tag for this commit that changed your project to version X".
19:38:43FromDiscord<Clyybber> disruptek: Ah, alright that makes sense
19:38:54FromDiscord<Clyybber> commit hashes it is then
19:39:27federico3sealmove: are you aware of https://github.com/xomachine/NESM ?
19:39:58shashlick@disruptek so nim.cfg is inherited by local deps but not project.nim.cfg? Makes sense what you say
19:40:38shashlickSo if a user already has a nim.cfg we grumble asking them to rename to project.nim.cfg
19:40:46shashlickAssuming they want to usecfg
19:41:24shashlickAnd nimble starts managing the nim.cfg going forward
19:41:32shashlick^^ Araq
19:42:04sealmovefederico3: yup
19:43:42sealmove(de)serialization is different from parsing binaries. the reason is serialization formats are intentionally simple, whereas not all binary formats are simple.
19:44:23federico3indeed, and I feel the need for good tooling around network protocols in Nim
19:44:40sealmoveso de(serialization) tools can't help you parse arbitarily complex formats. well, protobuf allows extension, but thats... bad hacking.
19:45:01FromGitter<sheerluck> @sealmove oh so `generateParser` does not actually generate files with nim code, with xxx.fromFile("bin")
19:45:25sealmovesheerluck: exactly! it injects the parser directly in your binary
19:46:04federico3pity kaitai uses yaml + custom grammar instead of something more expressive
19:46:05sealmovefromFile() feels in an object with the data read from the file
19:46:24sealmovehmm, federico3 what could it use instead?
19:46:36disruptekshashlick: yes, that's the assumptiong i'm making. that we can blow away what we find in the nim.cfg at the root of the project. that's where we'll manipulate the environment for the project.
19:46:58disruptekthen it doesn't have to be checked in and can be recreated from scratch, etc.
19:48:15disruptekclyybber: so what should nimph do for you when there's no .nimble??
19:49:11disrupteka lockfile seems overkill for a project with no dependencies.
19:49:20federico3sealmove: ASN.1 for example
19:50:14FromDiscord<Clyybber> disruptek: nimph updates your dependencies for you right? Doesn't seem overkill to support a lockfile then IMO
19:52:15*JustASlacker quit (Quit: Leaving)
19:52:20FromDiscord<Clyybber> disruptek: In general, why limit it to nim projects? I might wonna include some C library.
19:53:33sealmovewell, Kaitai is not ideal for network protocols imo; it tries to be more general and has features for describing ridiculously complex formats which ASN.1 can't.
19:54:02sealmoveI got interested in it because it's very useful in computer forensics
19:54:02FromDiscord<Clyybber> disruptek: Does nimph use git submodules?
19:54:21sealmoveparsing stuff like the windows registry
19:54:33FromDiscord<Clyybber> sealmove: ##FUN##
19:54:40FromDiscord<Clyybber> :p
19:55:58federico3urgh
19:56:17FromGitter<sheerluck> @sealmove if it injects the parser directly it does not allow me to `seek` to some offset before parsing. Well I guess I have to imitate my generated.cpp by hand then. Thank you for your work!
19:57:16sealmovesheerluck: ksy grammar has features for seeking
19:57:44disruptekclyybber: we should make it support submodules.
19:59:33sealmovesheerluck: you can even simply do:
19:59:34sealmove- id: skip_bytes
19:59:36sealmove size: 256
20:00:36sealmovebut if you don't want to involve the grammar, then you can (not yet implemented) a string to fromFile() instead of a file path.
20:00:41FromGitter<sheerluck> @sealmove my seeking is way beyond abilities of ksy grammar: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5df3ede9e47fb31eb7a85d33]
20:00:47sealmovea stream*
20:01:45sealmovehmm, are you sure? what does find_mvhd() do?
20:02:06FromDiscord<niv> hello! i'm trying to link a .cpp-sourced object file into a nim program. the .cpp file requires -std=c++14 to compile. i can't use {.compile: } because that doesn't allow me to pass this arg, and i can't pass -std=c++14 to nim (via passC) itself because then everything else blows up (i.e. i the compilation of C files doesn't work anymore, including stdlib). i know i can write my own shim via {.link} but if there's a cleaner solution, i'd wa
20:02:14sealmoveif it's not independent of the file you are parsing then I am sure KS can do it
20:03:54sealmovesheerluck: KS has an expression language with functions and all: https://doc.kaitai.io/user_guide.html#_expression_language
20:04:17sealmovebut again if it's easier to do in your host language then you should pass a stream to fromFile()
20:04:45FromGitter<sheerluck> @sealmove thank you for your help
20:14:07FromGitter<bung87> federico3 you may just need zeromq
20:45:33FromDiscord<mratsim> wow those are some bat shit crazy coroutines: https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html I think we can now rewrite asyncdispatch with coroutines. I do not guarantee the usability of the stacktraces πŸ˜›
20:46:02FromDiscord<mratsim> @niv use {.passC:-std=c++14.}
20:46:12FromDiscord<mratsim> ah
20:46:20FromDiscord<mratsim> use file specific nim.cfg
20:46:50FromDiscord<mratsim> for example: https://github.com/mratsim/weave/blob/master/benchmarks/matmul_gemm_blas/gemm_pure_nim/nim.cfg
20:47:20FromDiscord<mratsim> so that the flag don't infect the other SIMD files: https://github.com/mratsim/weave/tree/master/benchmarks/matmul_gemm_blas/gemm_pure_nim/common
20:47:34FromGitter<Milerius> Hello
20:47:43FromGitter<Milerius> I tried to install nim on my osx but got
20:47:46FromGitter<Milerius> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5df3f8f2c6ce6027ebb72fe6]
20:47:49FromGitter<Milerius> Is it normal ?
20:48:10*couven92 quit (Read error: Connection reset by peer)
20:48:24FromDiscord<mratsim> or apparently there is this new localPassc pragma that I didn't hear about: https://github.com/nim-lang/Nim/pull/12706
20:48:25disbotβž₯ implemented a new localPassc pragma
20:48:37*couven92 joined #nim
20:49:10FromDiscord<mratsim> @Milerius, no, and it seems like a choosenim crash
20:49:41*endragor joined #nim
20:50:51FromGitter<Asc2011> @Milerius hi roman, i installed from git yesterday, took < 10min to compile. never tried choosenim
20:51:39FromGitter<Asc2011> @Milerius brew has nim, too.
20:51:55FromGitter<Milerius> Yeah but choosetim install everything important
20:52:01FromGitter<Milerius> choosenim*
20:52:06FromGitter<Milerius> Nimble, Nim, Nimpretty etc
20:52:45FromGitter<Asc2011> i tried brew first and AFAIK nimble was in the box
20:53:29FromGitter<Milerius> ok i will try with brew
20:53:30FromGitter<Milerius> thanks
20:54:22*endragor quit (Ping timeout: 268 seconds)
20:57:15*nsf quit (Quit: WeeChat 2.6)
20:57:28FromGitter<Milerius> @Asc2011 Work's like a charm.
20:57:29FromGitter<Milerius> Thank's
20:58:00FromGitter<Milerius> Can I ask about design here ? ⏎ ⏎ I try to move from my c++ app to here, I would appreciate some advice
20:58:31FromGitter<Milerius> Not exactly move everything, but understand how I can do the equivalent of some c++ as nim idiom
21:05:16FromGitter<Asc2011> @Milerius i'm new to nim, better ask the pros around here :)
21:12:40FromDiscord<niv> @mratsim that nim.cfg trick is exactly what i wanted, thank you
21:15:46*narimiran quit (Ping timeout: 252 seconds)
21:23:26FromDiscord<mratsim> check the localPassC pragma as well, I asked Araq to add it because I didn't want to ship my cfg all the time
21:23:30FromDiscord<mratsim> I didn't try it though
21:23:48FromDiscord<mratsim> cc @niv
21:28:15FromDiscord<niv> i got the code to work by passing -std=c++14 globally meanwhile. maybe i had some stale cache somewhere
21:31:09disrupteksolitudesf-: fixed #62.
21:31:11disbothttps://github.com/nim-lang/Nim/issues/62 -- 5lispRepr() crashes with SIGSEGV ; snippet at 12https://play.nim-lang.org/#ix=24kp
21:31:21disrupteker,
21:31:25solitudesf-disbot, you played yourself
21:31:34disruptekdummy.
21:32:01disrupteknow there's no excuse for missing tags.
21:34:29disruptek!search require release tags
21:34:30disbothttps://github.com/nim-lang/packages/issues/1051 -- 3Require Release Tags 7& 13 more...
21:34:46*filcuc joined #nim
21:34:51disrupteki'm calling that one, and lockfiles, fully solved.
21:39:54*Kaynatwo joined #nim
21:42:05*filcuc quit (Quit: Konversation terminated!)
21:43:01*filcuc joined #nim
21:43:23FromDiscord<mratsim> mmmh, how do you normalize Nim identifiers in macros?
21:43:30*filcuc quit (Client Quit)
21:43:56disruptekmratsim: i pulled sanitize out of openapi code. it works well. it's in nimph.
21:44:10*Kanato quit (Ping timeout: 265 seconds)
21:44:17disruptekhttps://github.com/disruptek/nimph/blob/master/src/nimph/sanitize.nim
21:45:37FromDiscord<mratsim> camel_Case with underscore?
21:45:51disruptekyeah, but there's a const you can override...
21:46:08FromDiscord<mratsim> this looks quite costly
21:46:16disruptekyep.
21:47:08FromDiscord<mratsim> It's for compile-time use before hashing for tables for codegen, I fear slwing down compile to a crawl
21:47:21*filcuc joined #nim
21:47:26FromDiscord<mratsim> I'm playing with a state machine generator as well πŸ˜‰
21:47:26*filcuc quit (Remote host closed the connection)
21:47:36disruptekwell, optimize it for me.
21:48:02disruptekopenapi is slow. this could be one reason for that.
21:49:27FromDiscord<mratsim> I'll just assume people don't make the mistake :p
21:50:05disrupteki wish this was magic but, eh, it ain't.
21:50:34FromDiscord<mratsim> Yeah, even for macro that would be very useful
21:51:02*Hideki_ joined #nim
21:54:45*gour quit (Remote host closed the connection)
21:55:21*Hideki_ quit (Ping timeout: 246 seconds)
22:08:41*odc quit (Ping timeout: 276 seconds)
22:10:12*odc joined #nim
22:10:50*Kanato joined #nim
22:10:57disruptekwow, nimph just found a broken tag for me.
22:11:28disrupteki'm one of those bozos.
22:14:37*Kaynatwo quit (Ping timeout: 265 seconds)
22:28:39*hexeratops joined #nim
22:45:59*solitudesf- quit (Ping timeout: 268 seconds)
22:50:28*endragor joined #nim
22:54:46*endragor quit (Ping timeout: 252 seconds)
23:22:39*sealmove quit (Quit: WeeChat 2.6)
23:23:33*lritter quit (Ping timeout: 246 seconds)
23:27:50*endragor joined #nim
23:28:14*lritter joined #nim
23:31:57*endragor quit (Ping timeout: 240 seconds)
23:36:09*Hideki_ joined #nim
23:50:03*Hideki_ quit (Remote host closed the connection)
23:50:50*Hideki_ joined #nim
23:55:12*tane quit (Quit: Leaving)
23:55:17*Hideki_ quit (Ping timeout: 250 seconds)