<< 15-03-2020 >>

00:00:01*junland_ quit (Quit: %ZNC Disconnected%)
00:02:19*junland joined #nim
00:02:53*Hideki_ joined #nim
00:12:17*disrupteq joined #nim
00:13:21sealmovecan I execute a process within Nim and redirect stdout in a non-shell dependent way?
00:13:56disrupteqsee asynctools or asyncproc
00:14:05disrupteq!repo asynctools
00:14:05disbothttps://github.com/cheatfate/asynctools -- 9asynctools: 11Various asynchronous tools for Nim language 15 51⭐ 11🍴
00:14:28disrupteqor just use startProcess for sync
00:17:28sealmovehow do I do it with startProcess?
00:19:53*filcuc_ quit (Quit: Konversation terminated!)
00:20:09*filcuc_ joined #nim
00:20:24*filcuc_ quit (Client Quit)
00:34:32*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
00:36:56*Lord_Nightmare joined #nim
00:40:28*krux02 joined #nim
00:51:58*actuallybatman joined #nim
01:09:10PMunchdisrupteq, leorize, anything in particular you had in mind for the playground?
01:13:41*PMunch quit (Quit: leaving)
01:31:40*MarderIII quit (Quit: Leaving)
01:33:11leorize!last PMunch
01:33:11disbotPMunch quit 719 minutes ago and last spoke 24 minutes ago
01:33:31leorizelol you can't ask that and quit :P
01:35:35*Hideki_ quit (Remote host closed the connection)
01:36:21*Hideki_ joined #nim
01:40:44*Hideki_ quit (Ping timeout: 258 seconds)
01:40:56*zama quit (Ping timeout: 265 seconds)
01:41:33*zama joined #nim
01:44:52*Hideki_ joined #nim
01:46:50*Hideki_ quit (Remote host closed the connection)
01:47:36*Hideki_ joined #nim
01:50:32*Hideki_ quit (Remote host closed the connection)
01:50:46*Hideki_ joined #nim
01:51:55FromGitter<timotheecour> @araq I think this explains azure outage https://developercommunity.visualstudio.com/content/problem/948822/azure-pipelines-ci-is-not-running-for-pushes-to-ht.html
02:02:07*disrupteq quit (Ping timeout: 260 seconds)
02:07:15*dwdv quit (Ping timeout: 260 seconds)
02:08:06watzonThere were list comprehensions at one point right? But they were replaced with something?
02:08:39leorizethe collect macro in devel
02:09:35watzonThat's right, thanks :)
02:38:12*krux02 quit (Remote host closed the connection)
02:47:02*chemist69 quit (Ping timeout: 256 seconds)
02:49:09*chemist69 joined #nim
02:49:59*Hideki_ quit (Remote host closed the connection)
03:06:57*Hideki_ joined #nim
03:09:47*Hideki_ quit (Remote host closed the connection)
03:10:01*Hideki_ joined #nim
03:13:19*muffindrake quit (Ping timeout: 272 seconds)
03:15:21*muffindrake joined #nim
03:18:17*Guest63878 quit (Ping timeout: 268 seconds)
03:19:31*dadada joined #nim
03:19:55*dadada is now known as Guest46298
03:27:45FromGitter<awr1> hello all
03:32:35*couven92 quit (Quit: Client Disconnecting)
03:40:18*Hideki_ quit (Remote host closed the connection)
03:41:14*Hideki_ joined #nim
03:46:07*Hideki_ quit (Ping timeout: 265 seconds)
03:58:51*Hideki_ joined #nim
04:00:12shashlickwhat's up
04:16:34*sealmove quit (Quit: WeeChat 2.7.1)
04:18:25FromGitter<awr1> nm, it's been a few months since i've been in here/done anything with nim
04:20:23FromGitter<awr1> got demotivated what with IRL issues (like my university telling me "yeah sorry, you can't graduate because you need these two science labs we never told you about") plus my laptop is falling apart
04:23:59FromGitter<awr1> i see there is a new GC :O
04:24:34leorizenot really a gc :)
04:24:45leorize~arc
04:24:45disbotarc: 11a new memory manager for Nim; see https://forum.nim-lang.org/t/5734
04:24:52leorizehere's what you need to get up to speed
04:25:26leorizearaq also added the new --exceptions:goto that's much more lightweight than normal exceptions
04:26:39FromGitter<awr1> hmm interesting!
05:11:36*Guest46298 is now known as dadada
05:12:05*dadada is now known as Guest75065
05:12:28*Guest75065 is now known as dadada
05:32:16*Hideki_ quit (Remote host closed the connection)
05:32:58*Hideki_ joined #nim
05:37:16*Hideki_ quit (Ping timeout: 256 seconds)
05:39:48*silvernode joined #nim
05:45:38silvernodeGood morning
05:45:58silvernodetime to work on space-nim again
05:53:15*dddddd quit (Ping timeout: 240 seconds)
05:59:46*Hideki_ joined #nim
06:02:37*solitudesf joined #nim
06:02:46*opal quit (Remote host closed the connection)
06:04:02*Hideki_ quit (Ping timeout: 240 seconds)
06:10:12*opal joined #nim
06:22:03*silvernode quit (Ping timeout: 268 seconds)
06:22:54*silvernode joined #nim
06:25:42*nsf joined #nim
06:31:13silvernodeI am trying to decide what a good simple way to determine and construct a merket price rate for each space station in my game. People here recommended the getMonoTime() proc which will determine when prices change at each station.
06:32:13*sagax quit (Remote host closed the connection)
06:33:08silvernodeOther than "when" I need to figure out "how" I am going to populate each item at each station with a different price. I am thinking that I will generate a random number but the issue is mostly how to distribute a different number for each station.
06:33:48*Hideki_ joined #nim
06:33:52silvernodealso how to distribute a different price number for each item in a given station.
06:47:20*Hideki_ quit (Ping timeout: 268 seconds)
06:54:20*silvernode quit (Ping timeout: 256 seconds)
07:00:00*gmpreussner quit (Quit: kthxbye)
07:05:12*gmpreussner joined #nim
08:05:38axioncan a proc parameter be typed to be a specific field of an enum type?
08:09:06FromDiscord<Lantos> !repo automation
08:09:07disbothttps://github.com/miere43/autome -- 9autome: 11Dumb GUI automation library for Nim 15 15⭐ 1🍴 7& 3 more...
08:09:42FromDiscord<Lantos> !repo open cv
08:09:44disbothttps://github.com/jayrambhia/Install-OpenCV -- 9Install-OpenCV: 11shell scripts to install different version of OpenCV in different distributions of Linux 15 949⭐ 944🍴 7& 29 more...
08:10:10FromDiscord<Lantos> !repo opencv
08:10:10disbothttps://github.com/dom96/nim-opencv -- 9nim-opencv: 11Nim OpenCV wrapper 15 20⭐ 4🍴 7& 1 more...
08:19:29Araqaxion: param: range[enumValue..enumValue]
08:19:47Araqif you can pass only a single value though, why pass it at all
08:21:24axionAlright, just trying to think of ways to clean this code up.
08:24:08axiondo closures have any runtime overhead?
08:37:09*kitech1 quit (Max SendQ exceeded)
08:37:37*kitech1 joined #nim
08:58:49FromDiscord<mratsim> they are heap allocated
09:07:58FromDiscord<mratsim> @Araq, is it fine if I raise this to high priority? https://github.com/nim-lang/Nim/issues/9679 I don't not about timotheecour's solution but finding workaround for this is quite tedious
09:07:59disbotGeneric types as static parameters: type mismatch
09:08:38*deech quit (Ping timeout: 256 seconds)
09:19:15*jjido joined #nim
09:26:21axionis there a macro like Common Lisp's `rotatef` somewhere in the stdlib?
09:30:12FromDiscord<mratsim> what does rotatef do?
09:30:21axionlike if i had 2 vars x = 1, and y = 2, calling rotatef(x, y) and the vars' values would be swapped, and done so with gensym'ing. Should also work with object member, like rotatef(foo.x, bar.x)
09:34:32FromDiscord<Varriount> axion: the swap procedure, I think
09:37:01axionThanks
09:37:36*couven92 joined #nim
09:38:05*filcuc joined #nim
09:40:17*krux02 joined #nim
09:41:49FromDiscord<mratsim> yes, use swap
09:42:06FromDiscord<mratsim> it works on NimNode as well
09:45:34*sagax joined #nim
09:45:55FromDiscord<mratsim> I've discovered that 3 days ago and it seems like a neat way to optimize register usage when doing intrinsics (i.e. this https://github.com/mratsim/finite-fields/blob/master/montgomery_mul.nim#L365 instead of playing with indices: https://github.com/mratsim/weave/blob/master/benchmarks/matmul_gemm_blas/gemm_pure_nim/common/gemm_ukernel_generator.nim#L217-L230
09:51:35*actuallybatman quit (Ping timeout: 260 seconds)
09:53:07*Trustable joined #nim
09:58:10dadadahey
09:58:16dadadahello
09:58:48dadadahit on this bug: https://play.nim-lang.org/#ix=2ehK
09:59:07dadadathe code is made specifically made for showing the bug
09:59:09dadadaa testcase
09:59:36*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:59:43dadadain my understanding the code should expand to
09:59:50dadadathestring[BackwardsIndex(1)] = 'z'
10:00:03dadadaand work
10:01:25dadadahowever the compiler says thestring[BackwardsIndex(1)] can't be assigned to
10:05:20FromDiscord<mratsim> let me have a look
10:06:02*dwdv joined #nim
10:06:19dadadathanks dude
10:07:41FromDiscord<mratsim> this works: https://play.nim-lang.org/#ix=2ehL
10:07:49FromDiscord<mratsim> let me see with quote do
10:09:02FromDiscord<mratsim> this as well: https://play.nim-lang.org/#ix=2ehM
10:10:03dadadamratsim: when you add BackwardsIndex to the mix, it fails
10:10:09FromDiscord<mratsim> The error message is probably wrong but in the macro "thestring[BackwardsIndex(1)]" this part may not capture the existing "thestring" and try to create/bind to a symbol that doesn't exist
10:10:23FromDiscord<mratsim> ah
10:10:30FromDiscord<mratsim> then it's distinct type that is buggy
10:11:43FromDiscord<mratsim> indeed "result = nnkBracketExpr.newTree(s, newCall("BackwardsIndex", bIdx))"
10:11:46FromDiscord<mratsim> mmm
10:12:32FromDiscord<mratsim> I think Nim is missing proc `[]`[N, T](a: var array[N, T], idx: BackwardsIndex): var T
10:13:20FromDiscord<mratsim> or not array but string
10:14:51FromDiscord<mratsim> this works now: https://play.nim-lang.org/#ix=2ehM
10:14:54dadadawhy does it work with manually written code though?
10:15:25FromDiscord<mratsim> raise a bug, in the past ^1 was magic, and it changed to use distinct to ease usage in macros
10:15:31FromDiscord<mratsim> it seems like there are leftovers
10:20:26dadadajust a note: it works when on the right side of an assignment
10:20:35dadadaso when not writing to it
10:21:32FromDiscord<mratsim> if you look on the signature of my proc, I return "var T"
10:21:41*filcuc quit (Ping timeout: 258 seconds)
10:21:43FromDiscord<mratsim> I thin the one that returns T is working
10:21:51FromDiscord<mratsim> the one that returns var T is still magic
10:21:53dadadamratsim: did you send the wrong link, I don#t see any var T
10:47:04*filcuc joined #nim
10:50:37*tdc joined #nim
10:52:03*Hideki_ joined #nim
10:52:07*Hideki_ quit (Remote host closed the connection)
10:52:42*Hideki_ joined #nim
10:55:24*Hideki_ quit (Remote host closed the connection)
10:55:31*jjido joined #nim
10:55:39*Hideki_ joined #nim
11:00:39*tdc_ joined #nim
11:01:36*filcuc quit (Ping timeout: 265 seconds)
11:03:05*tdc quit (Ping timeout: 258 seconds)
11:15:27*Hideki_ quit (Remote host closed the connection)
11:16:27*Hideki_ joined #nim
11:20:50*Hideki_ quit (Ping timeout: 240 seconds)
11:23:01*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:30:51*lritter joined #nim
11:44:08*Hideki_ joined #nim
11:48:53*okcc joined #nim
11:49:38*alexander92 quit (Quit: leaving)
11:51:54okcccan i add a proc as an element of a tuple which is passed as a paramater of a Thread function?
11:55:32*tane joined #nim
12:01:35okcchere's the code which gives me a type mismatch: got <XRecordThreadData> error, https://play.nim-lang.org/#ix=2ei8
12:03:04okcci'll be grateful if anyone can help :), here is the error detail: https://carbon.now.sh/?bg=rgba(171%2C%20184%2C%20195%2C%201)&t=seti&wt=none&l=auto&ds=true&dsyoff=20px&dsblur=68px&wc=true&wa=true&pv=56px&ph=56px&ln=false&fl=1&fm=Hack&fs=14px&lh=133%25&si=false&es=2x&wm=false&code=%252Fhome%252Fokcy%252Ftmp%252Ftest_x11.nim(34%252C%25209)%2520Error%253A%2520type%2520mismatch%253A%2520got%2520%253CXRecordThreadData%253E%250Abut%2520expected%2520one%2520of%253A%2520
12:03:04okcc%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%25
12:03:04okcc20%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%250Aproc%2520xRecordEventCallback(p%253A%2520TXPointer%253B%2520pdata%253A%2520PXRecordInterceptData)%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%252
12:03:09okcc0%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%250A%2520%2520first%2520type%2520mismatch%2520at%2520position%253A%25201%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%252
12:03:16okcc0%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%250A%2520%2520required%2520type%2520
12:03:21okccfor%2520p%253A%2520TXPointer%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520
12:03:26okcc%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%250A%2520%2520but%2520expression%2520'data'%2520is%2520of%2520type%253A%2520XRecordThreadData
12:03:30okccoh, i' so sorry
12:03:35okcci'm not excepting that
12:03:53*nsf quit (Quit: WeeChat 2.7)
12:04:27okccthis url is so long, i feel so bad about that, please ignore
12:07:28*PMunch joined #nim
12:22:54dadadaokcc: :-) don't worry ... it's a slow day in this channel
12:24:59okcc:) ,but, can i store a callback proc in tuple?
12:25:07PMunchYes
12:27:05FromDiscord<Rika> what the hell isthat url lmao
12:28:21*solitudesf- joined #nim
12:28:51*solitudesf quit (Ping timeout: 240 seconds)
12:29:16PMunchleorize, haha sorry for quitting right after asking a question yesterday :P
12:29:50okccsry,haha
12:30:08PMunchHaha, okcc, just looked at the log after Rika mentioned a URL. Happens to the best of us :P
12:30:44PMunchAny reason why you want to keep XRecordThreadData as a tuple and not an object by the way?
12:32:36*solitudesf- is now known as solitudesf
12:33:34okcci learned it from Nim in action: Part 2 Nim in practice -> 6 Parallelism -> 6.2 Using threads in Nim, so it's dom96 told me to do that xD
12:34:11okcci have no experenice so i follow someone better
12:34:47okccmy code will thought a error like this: https://paste.ofcode.org/rid6ACLFdMQcA4EyFpF4kS
12:35:27okcci just changed a code snippet provider, no more long url include :D
12:36:26okcci update some code: https://paste.ofcode.org/hbXEWFyMUCEEerXbApZDGd
12:37:34okccin this code, i want to listen to ctrl+c keypress input event using xlib
12:40:52okcci'm trying to use obejct as thread data
12:42:33PMunchAh, not actually sure why he's using a tuple there
12:42:53PMunchI think it might just be because he preferred the syntax of them
12:44:14okcci just use data[2] instead of data.xRecordEventCallback to access the proc in the tuple, and now it works!
12:44:31PMunchUhm, that's weird..
12:44:51okcci think the compiler here is translate data.xRecordEventCallback to xRecordEvenetCallback(data)
12:45:22okccmaybe because xRecordEventCallback is callable
12:45:24PMunchYes, that's the UFCS
12:47:54okccwhat's UFCS?
12:48:19PMunchUniversal function call syntax
12:48:34okcci get it
12:49:46okcci have another error now, 'xRecordEnable' is not GC-safe as it performs an indirect call here
12:51:05PMunchecho isn't GC-safe I don't think
12:51:38okccno, not the xRecordEventCallback proc, is xRecordEnable
12:52:24okcci think compiler is saying the data[2] indirect call
13:23:58*nsf joined #nim
13:34:58*Hideki_ quit (Remote host closed the connection)
13:35:45*Hideki_ joined #nim
13:36:06PMunchHmm, I tried to implement the TOTP algorithm that Google Authenticator uses http://ix.io/2eiN
13:36:24PMunchBut it doesn't give me the same values as the Google Authenticator app..
13:38:48PMunchI verified everything after the hash against the RFC, so I'm not entirely sure what's wrong here..
13:40:04*Hideki_ quit (Ping timeout: 256 seconds)
13:58:23*dddddd joined #nim
14:02:10*tdog joined #nim
14:04:37*tdc_ quit (Ping timeout: 255 seconds)
14:05:58FromDiscord<mratsim> @dadada, there is a var T but indeed I sent the wrong link
14:06:32FromDiscord<mratsim> here you go: https://play.nim-lang.org/#ix=2eiS
14:09:26PMunchAhh, I was treating the timestamp incorrectly, this works: http://ix.io/2eiU/nim
14:11:42*Hideki_ joined #nim
14:16:40*dwdv quit (Ping timeout: 258 seconds)
14:27:00PMunchHmm, now I've spent a lot of time on something I have absolutely no use for... Back to doing something actually useful
14:28:28*Hideki_ quit (Ping timeout: 255 seconds)
14:35:56dadadamratsim: thank you very much, can you explain if this proc `[]` you wrote is the idiomatic solution to this, and if it should be in the official stdlib, or would there need there to be a different more general solution/fix needed to fix this in the compiler?
14:36:10dadadaminus one there
14:36:48dadadasince it is working one might think this could be the official bugfix
14:46:48*dwdv joined #nim
15:06:26*filcuc joined #nim
15:07:23PMunchHmm, where is this error from, and what does it mean? "Error: wrong number of variables"
15:07:40*NimBot joined #nim
15:10:22PMunchOh, it was from calling "for i, _ in 0..1"
15:13:01*filcuc quit (Ping timeout: 258 seconds)
15:32:31*Hideki_ joined #nim
15:35:32leorize~playground
15:35:32disbotplayground: 11an online in-the-browser IDE for simple Nim experiments at http://argentina-ni.ml/
15:35:39leorizePMunch: ^ see that
15:36:00leorizeit has lots of features :P
15:36:09leorizethe ui there is terrible tho
15:44:52PMunchOh wow, that is a lot of features!
15:46:56FromDiscord<Recruit_main70007> whats the Nim equivalent of:
15:46:56FromDiscord<Recruit_main70007> (LPTHREAD_START_ROUTINE)GetProcAddress(...)
15:47:41*Hideki_ quit (Remote host closed the connection)
15:48:37*Hideki_ joined #nim
15:50:25PMunchcast[LPTHREAD_START_ROUTINE](symAddr(...))
15:53:04*Hideki_ quit (Ping timeout: 255 seconds)
15:54:04FromDiscord<Recruit_main70007> thx
15:55:51PMunchCrap.. My simple fix won't work for `extract` I need to write some helper procs into the DSL..
16:15:11*solitudesf quit (Ping timeout: 260 seconds)
16:21:00*cyraxjoe quit (Ping timeout: 256 seconds)
16:21:10*MightyJoe joined #nim
16:22:40*solitudesf joined #nim
16:23:48*Hideki_ joined #nim
16:31:33*filcuc joined #nim
16:34:14FromDiscord<Recruit_main70007> leorize: how do i declare an APIENTRY in Nim?
16:35:28shashlickhttps://github.com/dom96/choosenim/issues/183#issuecomment-599230880
16:35:30disbotchoosenim binary builds for macOS need 10.13 ; snippet at 12https://play.nim-lang.org/#ix=2ejS
16:36:36*kenran joined #nim
16:40:51*Hideki_ quit (Ping timeout: 260 seconds)
16:43:06*actuallybatman joined #nim
16:56:04*filcuc quit (Ping timeout: 255 seconds)
16:57:33*sealmove joined #nim
16:59:40*Trustable quit (Remote host closed the connection)
17:04:43PMunchHmm, is there a way to check if there exists a variable in the current scope?
17:04:59PMunchI know about `declared` but that also picks up procs of the same name
17:08:02leorizebindSym then look into the symbol?
17:09:57lqdev[m]PMunch: declaredInScope?
17:10:17PMunchWouldn't that also take closure procs?
17:13:37leorizebindSym then look seems to be a better idea imo
17:23:00PMunchHmm, I tried to create this: `macro isVariable(x: typed): bool = newLit(x.symKind() == nskVar)` and then do `when not declared(test) or not isVariable(test)` but that didn't work for some reason..
17:24:53sealmovewhat code does a segfault process return?
17:25:16Zevvit doesnt
17:26:15sealmovehum.. but if you do like `let c = execCmd(&"nim c file.nim")` then c will be what?
17:28:57leorizeos-dependant :)
17:29:16sealmovewow, this sucks
17:29:52*filcuc joined #nim
17:30:59disruptek~stream
17:31:00disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
17:42:42FromDiscord<mratsim> @dadada, yes it should be the official implementation, it should be in system.nim along the other BackwardsIndex proc, the way to proceed is open an issue with your bug, and the example fix and then open a PR to fix it
17:43:23FromDiscord<mratsim> The thing is, I'm not too sure how to find and remove the "magic" that makes it working when not inside a macro
17:52:55*filcuc quit (Ping timeout: 265 seconds)
18:00:21PMunchOkay wtf.. This doesn't work: http://ix.io/2ekn but this does http://ix.io/2eko
18:01:34*okcc_ joined #nim
18:03:03PMunchBTW I get an undeclared error
18:04:02*okcc quit (Ping timeout: 240 seconds)
18:16:39PMunchSweet, now it works: http://ix.io/2eks which outputs: http://ix.io/2ekt
18:18:06FromDiscord<Recruit_main70007> leorize, u there?
18:18:36leorizeo/
18:18:45leorizeah, I don't know much about windows api, sorry :P
18:18:55FromDiscord<Recruit_main70007> ok :/
18:19:04FromDiscord<Recruit_main70007> thanks anyway
18:19:08leorizeif you can show me how to do it in C, then I can show you how to in Nim :)
18:19:25FromDiscord<Recruit_main70007> cpp?
18:19:32leorizethat works too I guess
18:20:21FromDiscord<Recruit_main70007> #include <Windows.h>
18:20:21FromDiscord<Recruit_main70007> BOOL APIENTRY DllMain(...)
18:20:21FromDiscord<Recruit_main70007> That apientry thing, it seems to not exist in winlean nor winim
18:20:40PMunchThis module also passed it's 1000th line of code with the addition of the extract macro
18:21:27PMunchhttps://stackoverflow.com/questions/2081409/what-does-apientry-do
18:21:33PMunchIt's basically just an alias for stdcall
18:22:13PMunchJust to tell the C++ code to generate the correct calling convention so that it can be loaded by e.g. a C library
18:22:53leorizetag your function with {.stdcall.}
18:22:57leorizethat's APIENTRY
18:23:40*solitudesf quit (Read error: Connection reset by peer)
18:23:48*solitudesf- joined #nim
18:27:10FromDiscord<Recruit_main70007> thanks both, now i have to find why its not working
18:27:24*solitudesf- quit (Read error: Connection reset by peer)
18:27:42PMunchI've done a bit of work on dynamic libraries in Nim (even have one in production at work), so just ask if you need any help :)
18:28:09PMunchWell, two actually, one for Linux and one for Windows, sharing parts of their codebase :)
18:28:16leorizeoh yea, make sure you exportc your DllMain :)
18:28:26FromDiscord<Recruit_main70007> i am trying to inject a dll (educational purposes at least for now :p )
18:28:38FromDiscord<Recruit_main70007> leorize, yeah, i already had that
18:38:31PMunchMan, this macroutils module is coming along nicely :)
18:38:47PMunchI think I'm actually done with the stuff I wanted to create to begin with..
18:39:05PMunchNow just do document the whole thing properly so that you guys can actually use it :D
18:39:18*koltrast_ quit (*.net *.split)
18:39:19*shashlick quit (*.net *.split)
18:39:21*golechwi quit (*.net *.split)
18:39:22*sknebel quit (*.net *.split)
18:39:33FromDiscord<Recruit_main70007> Nice
18:39:38*golechwi joined #nim
18:39:56*sknebel joined #nim
18:40:01*shashlick joined #nim
18:41:29*koltrast joined #nim
18:42:12*natrys joined #nim
18:43:41sealmoveguys, I had this idea !repo testify
18:43:55sealmovehttps://github.com/sealmove/testify
18:44:15sealmoveno actual code yet, but it's very simple to implement
18:45:14federico3sealmove: https://github.com/FedericoCeratto/nim-testrunner does that afaict
18:46:03sealmovedoes it produce a single unified JUnit report?
18:46:18sealmovealso the last time I tried running it it was broken :/
18:46:23federico3if it doesn't open a bug
18:46:38*solitudesf joined #nim
18:47:49sealmovenim-testrunner/testrunner.nim(377, 36) Error: undeclared identifier: 'Created'
18:51:18sealmoveI think I will write this one, nim-testrunner seems a little complex for the task and also seems unmaintained...
18:52:36federico3I'll chase it
18:53:01leorize!repo testutils ?
18:53:02disbotno results 😢
18:53:05leorize!repo testutils
18:53:05disbothttps://github.com/status-im/nim-testutils -- 9nim-testutils: 11testrunner et al 15 5⭐ 2🍴
18:55:14sealmoveOh this looks reallt nice, didn't know about it.
18:56:26*okcc_ quit (Quit: Leaving)
18:57:00disruptekyou may as well consider testament.
18:57:11sealmoveseems new
18:57:27disruptekit's a thing i pulled out of chronicles for general use.
18:57:31sealmovedisruptek, I never figured out how to use testament. there are no docs
18:57:40leorizeread specs.nim
18:57:45leorizeit's sad but that's the only way :P
18:57:45disruptekthey are in doc/contributing.rst or w/e.
18:57:55leorizeah that too
19:04:34sealmoveI don't know, testament is also complex and is meant for Nim project. I want something simple, and ideally JUnit output.
19:06:47sealmovenim-testutils seems cool
19:24:01*shashlick quit (Quit: quit)
19:25:55*shashlick joined #nim
19:27:19FromDiscord<fluxinator2000> `var mem:seq[byte]
19:27:20FromDiscord<fluxinator2000>
19:27:20FromDiscord<fluxinator2000> proc init():
19:27:20FromDiscord<fluxinator2000> mem = newSeq[byte](0x10000)
19:27:20FromDiscord<fluxinator2000>
19:27:20FromDiscord<fluxinator2000> init()`
19:27:26FromDiscord<fluxinator2000> this doesn't compile
19:27:35FromDiscord<fluxinator2000> what am I missing?
19:27:51leorizes/:/=/
19:28:07FromDiscord<Recruit_main70007> bridge doesnt like multiline nor code messages
19:28:38sealmove`proc init() = `
19:28:58FromDiscord<fluxinator2000> I'm an idiot
19:29:07FromDiscord<Recruit_main70007> happens to the best of us
19:29:09FromDiscord<Elegant Beef> Do people not read compilation errors?
19:29:09FromDiscord<Elegant Beef> `(4, 5) Error: type expected`
19:29:22FromDiscord<fluxinator2000> yeah that error message didn't help me
19:29:28leorizeI mean how are you supposed to figure it out from that
19:29:34leorizeeven I got stuck on that message once
19:29:36FromDiscord<Elegant Beef> it's expecting a type
19:29:36FromDiscord<Recruit_main70007> true XD
19:29:51FromDiscord<Elegant Beef> meaning you have something declaring a type, albiet that's on the wrong line
19:30:27FromDiscord<Recruit_main70007> its obvius if you have experience with the language
19:31:59FromDiscord<fluxinator2000> thanks guys!
19:32:10FromDiscord<Elegant Beef> No problem, i can be a dick whenever 😛
19:33:25leorizewe really need some Hint to help spot errors like this
19:34:00FromDiscord<Elegant Beef> well it'd be more helpful if it was on the proper line
19:34:49leorizeit's on the proper line :P
19:34:55FromDiscord<Elegant Beef> alternatively a simple "proc defining type but did not declare type"
19:35:05leorizeit expected the following expression to result in a typedesc
19:35:37FromDiscord<Elegant Beef> Sure it's on the properline, totally not off by one
19:35:52FromDiscord<Elegant Beef> Get outta here with that multiline declaration
19:36:33*Amun_Ra quit (*.net *.split)
19:36:34*d10n quit (*.net *.split)
19:36:34*dom96 quit (*.net *.split)
19:36:37*yumaikas quit (*.net *.split)
19:36:38*dv^_^ quit (*.net *.split)
19:36:40*mwbrown quit (*.net *.split)
19:36:46*dv^_^ joined #nim
19:36:55*mwbrown joined #nim
19:37:12*yumaikas joined #nim
19:37:45*d10n joined #nim
19:37:45*d10n quit (Changing host)
19:37:45*d10n joined #nim
19:38:17*dom96 joined #nim
19:38:17*dom96 quit (Changing host)
19:38:17*dom96 joined #nim
19:38:28*solitudesf quit (Remote host closed the connection)
19:38:29*solitudesf- joined #nim
19:39:05FromDiscord<Lantos> @dom96 with your nim-opencv what opencv were you using? I
19:39:13FromDiscord<Lantos> @dom96 with your nim-opencv what opencv were you using?
19:42:40*Zectbumo joined #nim
19:43:40FromDiscord<Lantos> 249
19:54:13*jjido joined #nim
20:00:11*Trustable joined #nim
20:07:15*nsf quit (Quit: WeeChat 2.7)
20:11:59FromDiscord<Kenran> Sorry for the absolute beginner question, but I'm just trying to find stuff in Nim to start writing code: I'm looking for the `openpty` procedure, or, alternatively, `posix_openpt`. I checked the module `posix` but not finding it there, so I'm guessing there's no standard binding for those?
20:13:16FromDiscord<Kenran> (I found `asyncpty` when googling, which seems to import some procedures from C; I could probably use that library, but since I'm totally new to nim, I wanted to stay away from asynchronous stuff for a while)
20:13:18leorizeyea, but it shouldn't be too hard to bind it yourself
20:13:42leorizePR welcome :)
20:22:07dom96@Lantos: cannot remember I'm afraid
20:30:20*Yardanico quit (*.net *.split)
20:30:29*Yardanico_ joined #nim
20:30:47*Yardanico_ quit (Client Quit)
20:31:41*Yardanico joined #nim
20:37:34*Hideki_ joined #nim
20:41:55*couven92 quit (Ping timeout: 258 seconds)
20:42:14*Hideki_ quit (Ping timeout: 256 seconds)
20:45:57*PMunch quit (Quit: leaving)
20:51:33*muffindrake quit (Quit: muffindrake)
20:51:52*muffindrake joined #nim
20:55:00*Yardanico quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
20:55:37*Yardanico joined #nim
20:55:48*couven92 joined #nim
20:56:48*couven92 quit (Client Quit)
21:04:07FromDiscord<Winton> a small gift for the community, so they can continue having their coffee
21:04:07FromDiscord<Winton> https://cdn.discordapp.com/attachments/371759389889003532/688855068115861615/descargar.jpg
21:04:08FromDiscord<Winton> jajaja
21:04:16FromDiscord<Winton>
21:04:16FromDiscord<Winton> https://cdn.discordapp.com/attachments/371759389889003532/688855103951601684/unknown.png
21:06:09FromDiscord<Recruit_main70007> why the movistar thingy though
21:07:06FromDiscord<Winton> it was just there i didn't delete it :p
21:07:17FromDiscord<Recruit_main70007> ah XD
21:07:22FromDiscord<Recruit_main70007> its really cool still
21:09:05FromDiscord<Winton>
21:09:05FromDiscord<Winton> https://cdn.discordapp.com/attachments/371759389889003532/688856318203002906/descargar.jpg
21:09:08FromDiscord<Winton> 😄
21:11:09*kenran quit (Quit: leaving)
21:24:24*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:30:44disruptek~stream
21:30:45disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
21:31:14*tdog quit (Ping timeout: 240 seconds)
21:36:05*jjido joined #nim
21:42:06sealmove--stdout:off doesn't work...
21:46:49*arecaceae quit (Remote host closed the connection)
21:47:12*arecaceae joined #nim
21:52:06sealmovehow to supress compiler output?
21:52:35*natrys quit (Quit: natrys)
21:53:50FromDiscord<Rika> --hints:off? not sure i dont actually know
21:54:07sealmoveI want to supress everything
21:54:56sealmovefor some reason not even `nim c myprogram >/dev/null` works
21:55:46*solitudesf- quit (Ping timeout: 255 seconds)
21:59:15leorizesealmove: 2>&1 >/dev/null
21:59:34sealmoveis this shell agnostic though?
21:59:38*solitudesf- joined #nim
21:59:53FromDiscord<bottle> https://gist.github.com/astronotter/b5ae1f59ff4a48796a480aa55122eafd this fails to compile if i have a negative value... works if i remove the negative sign
21:59:58leorizesealmove: posix-compatible
22:00:15FromDiscord<bottle> want to confirm this is a bug before i post an issue, if someone can take a look thanks in advance
22:01:27leorizeit's both a bug and not
22:01:41leorizeuse a space as a walkaround: https://play.nim-lang.org/#ix=2elX
22:01:53leorizein Nim, if your code don't look nice, it won't compile :p
22:02:08FromDiscord<bottle> yeah i noticed if i wrap with parenthesis it also works
22:02:10FromDiscord<bottle> so this is intended?
22:02:26leorizeyea, what happened is that `:-` was resolved to be one symbol
22:02:42FromDiscord<bottle> ahh
22:10:59*lritter quit (Remote host closed the connection)
22:13:32*tane quit (Quit: Leaving)
22:30:22*Hideki_ joined #nim
22:35:43*opal quit (Ping timeout: 240 seconds)
22:37:46*opal joined #nim
22:47:07*Hideki_ quit (Remote host closed the connection)
22:47:50*Hideki_ joined #nim
22:49:55FromDiscord<Recruit_main70007> what does the dynlib pragma?
22:50:12Yardanicohttps://nim-lang.org/docs/manual.html#foreign-function-interface-dynlib-pragma-for-import
22:50:18Yardanicoand https://nim-lang.org/docs/manual.html#foreign-function-interface-dynlib-pragma-for-export
22:50:57*abm joined #nim
22:51:01Yardanicobasically to export/import procedures to/from dynamic libraries (dll on windows, .so on linux and .dylib on macos)
22:51:42FromDiscord<Recruit_main70007> but not using it doesnt seem to affect the program
22:51:53Yardanicowhat does your program do?
22:51:58Yardanicoand why did you try to add dynlib pragma?
22:52:13FromDiscord<Recruit_main70007> i thought it was neccesary
22:52:17*Hideki_ quit (Ping timeout: 246 seconds)
22:52:23YardanicoIt's only needed when you're either creating a dynamic lib or interfacing with one, it's not needed if you interface with C code
22:52:52FromDiscord<Recruit_main70007> the dll is being injected
22:53:26*couven92 joined #nim
22:53:34leorizethen `{.dynlib.}` is required
22:53:40leorizehow are you building your dll?
22:54:04FromDiscord<Recruit_main70007> nim c --app:lib --NoMain name.nim
22:54:16FromDiscord<Recruit_main70007> works without dynlib
22:54:58leorizewell you will need it for nim >= 1.1
22:55:41FromDiscord<Recruit_main70007> ok, kind of strange its not needed, exportc seems to be enough
22:55:59leorizeyea that's why I fixed that in the next release :P
22:56:20FromDiscord<Recruit_main70007> ah ok :), anyway gn all
22:57:41Yardanicogood night :)
22:59:21*ftsf joined #nim
23:22:21*Hideki_ joined #nim
23:23:21*Irregulator joined #nim
23:34:47*Hideki_ quit (Ping timeout: 250 seconds)
23:39:44*Zectbumo quit (Remote host closed the connection)
23:59:36*couven92 quit (Read error: Connection reset by peer)