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:21 | sealmove | can I execute a process within Nim and redirect stdout in a non-shell dependent way? |
00:13:56 | disrupteq | see asynctools or asyncproc |
00:14:05 | disrupteq | !repo asynctools |
00:14:05 | disbot | https://github.com/cheatfate/asynctools -- 9asynctools: 11Various asynchronous tools for Nim language 15 51⭐ 11🍴 |
00:14:28 | disrupteq | or just use startProcess for sync |
00:17:28 | sealmove | how 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:10 | PMunch | disrupteq, 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:11 | leorize | !last PMunch |
01:33:11 | disbot | PMunch quit 719 minutes ago and last spoke 24 minutes ago |
01:33:31 | leorize | lol 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:55 | FromGitter | <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:06 | watzon | There were list comprehensions at one point right? But they were replaced with something? |
02:08:39 | leorize | the collect macro in devel |
02:09:35 | watzon | That'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:45 | FromGitter | <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:12 | shashlick | what's up |
04:16:34 | * | sealmove quit (Quit: WeeChat 2.7.1) |
04:18:25 | FromGitter | <awr1> nm, it's been a few months since i've been in here/done anything with nim |
04:20:23 | FromGitter | <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:59 | FromGitter | <awr1> i see there is a new GC :O |
04:24:34 | leorize | not really a gc :) |
04:24:45 | leorize | ~arc |
04:24:45 | disbot | arc: 11a new memory manager for Nim; see https://forum.nim-lang.org/t/5734 |
04:24:52 | leorize | here's what you need to get up to speed |
04:25:26 | leorize | araq also added the new --exceptions:goto that's much more lightweight than normal exceptions |
04:26:39 | FromGitter | <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:38 | silvernode | Good morning |
05:45:58 | silvernode | time 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:13 | silvernode | I 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:08 | silvernode | Other 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:52 | silvernode | also 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:38 | axion | can a proc parameter be typed to be a specific field of an enum type? |
08:09:06 | FromDiscord | <Lantos> !repo automation |
08:09:07 | disbot | https://github.com/miere43/autome -- 9autome: 11Dumb GUI automation library for Nim 15 15⭐ 1🍴 7& 3 more... |
08:09:42 | FromDiscord | <Lantos> !repo open cv |
08:09:44 | disbot | https://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:10 | FromDiscord | <Lantos> !repo opencv |
08:10:10 | disbot | https://github.com/dom96/nim-opencv -- 9nim-opencv: 11Nim OpenCV wrapper 15 20⭐ 4🍴 7& 1 more... |
08:19:29 | Araq | axion: param: range[enumValue..enumValue] |
08:19:47 | Araq | if you can pass only a single value though, why pass it at all |
08:21:24 | axion | Alright, just trying to think of ways to clean this code up. |
08:24:08 | axion | do closures have any runtime overhead? |
08:37:09 | * | kitech1 quit (Max SendQ exceeded) |
08:37:37 | * | kitech1 joined #nim |
08:58:49 | FromDiscord | <mratsim> they are heap allocated |
09:07:58 | FromDiscord | <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:59 | disbot | ➥ Generic types as static parameters: type mismatch |
09:08:38 | * | deech quit (Ping timeout: 256 seconds) |
09:19:15 | * | jjido joined #nim |
09:26:21 | axion | is there a macro like Common Lisp's `rotatef` somewhere in the stdlib? |
09:30:12 | FromDiscord | <mratsim> what does rotatef do? |
09:30:21 | axion | like 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:32 | FromDiscord | <Varriount> axion: the swap procedure, I think |
09:37:01 | axion | Thanks |
09:37:36 | * | couven92 joined #nim |
09:38:05 | * | filcuc joined #nim |
09:40:17 | * | krux02 joined #nim |
09:41:49 | FromDiscord | <mratsim> yes, use swap |
09:42:06 | FromDiscord | <mratsim> it works on NimNode as well |
09:45:34 | * | sagax joined #nim |
09:45:55 | FromDiscord | <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:10 | dadada | hey |
09:58:16 | dadada | hello |
09:58:48 | dadada | hit on this bug: https://play.nim-lang.org/#ix=2ehK |
09:59:07 | dadada | the code is made specifically made for showing the bug |
09:59:09 | dadada | a testcase |
09:59:36 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:59:43 | dadada | in my understanding the code should expand to |
09:59:50 | dadada | thestring[BackwardsIndex(1)] = 'z' |
10:00:03 | dadada | and work |
10:01:25 | dadada | however the compiler says thestring[BackwardsIndex(1)] can't be assigned to |
10:05:20 | FromDiscord | <mratsim> let me have a look |
10:06:02 | * | dwdv joined #nim |
10:06:19 | dadada | thanks dude |
10:07:41 | FromDiscord | <mratsim> this works: https://play.nim-lang.org/#ix=2ehL |
10:07:49 | FromDiscord | <mratsim> let me see with quote do |
10:09:02 | FromDiscord | <mratsim> this as well: https://play.nim-lang.org/#ix=2ehM |
10:10:03 | dadada | mratsim: when you add BackwardsIndex to the mix, it fails |
10:10:09 | FromDiscord | <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:23 | FromDiscord | <mratsim> ah |
10:10:30 | FromDiscord | <mratsim> then it's distinct type that is buggy |
10:11:43 | FromDiscord | <mratsim> indeed "result = nnkBracketExpr.newTree(s, newCall("BackwardsIndex", bIdx))" |
10:11:46 | FromDiscord | <mratsim> mmm |
10:12:32 | FromDiscord | <mratsim> I think Nim is missing proc `[]`[N, T](a: var array[N, T], idx: BackwardsIndex): var T |
10:13:20 | FromDiscord | <mratsim> or not array but string |
10:14:51 | FromDiscord | <mratsim> this works now: https://play.nim-lang.org/#ix=2ehM |
10:14:54 | dadada | why does it work with manually written code though? |
10:15:25 | FromDiscord | <mratsim> raise a bug, in the past ^1 was magic, and it changed to use distinct to ease usage in macros |
10:15:31 | FromDiscord | <mratsim> it seems like there are leftovers |
10:20:26 | dadada | just a note: it works when on the right side of an assignment |
10:20:35 | dadada | so when not writing to it |
10:21:32 | FromDiscord | <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:43 | FromDiscord | <mratsim> I thin the one that returns T is working |
10:21:51 | FromDiscord | <mratsim> the one that returns var T is still magic |
10:21:53 | dadada | mratsim: 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:54 | okcc | can 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:35 | okcc | here's the code which gives me a type mismatch: got <XRecordThreadData> error, https://play.nim-lang.org/#ix=2ei8 |
12:03:04 | okcc | i'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:04 | okcc | %2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%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:04 | okcc | 20%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%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:09 | okcc | 0%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%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:16 | okcc | 0%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%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:21 | okcc | for%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:26 | okcc | %2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%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:30 | okcc | oh, i' so sorry |
12:03:35 | okcc | i'm not excepting that |
12:03:53 | * | nsf quit (Quit: WeeChat 2.7) |
12:04:27 | okcc | this url is so long, i feel so bad about that, please ignore |
12:07:28 | * | PMunch joined #nim |
12:22:54 | dadada | okcc: :-) don't worry ... it's a slow day in this channel |
12:24:59 | okcc | :) ,but, can i store a callback proc in tuple? |
12:25:07 | PMunch | Yes |
12:27:05 | FromDiscord | <Rika> what the hell isthat url lmao |
12:28:21 | * | solitudesf- joined #nim |
12:28:51 | * | solitudesf quit (Ping timeout: 240 seconds) |
12:29:16 | PMunch | leorize, haha sorry for quitting right after asking a question yesterday :P |
12:29:50 | okcc | sry,haha |
12:30:08 | PMunch | Haha, okcc, just looked at the log after Rika mentioned a URL. Happens to the best of us :P |
12:30:44 | PMunch | Any 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:34 | okcc | i 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:11 | okcc | i have no experenice so i follow someone better |
12:34:47 | okcc | my code will thought a error like this: https://paste.ofcode.org/rid6ACLFdMQcA4EyFpF4kS |
12:35:27 | okcc | i just changed a code snippet provider, no more long url include :D |
12:36:26 | okcc | i update some code: https://paste.ofcode.org/hbXEWFyMUCEEerXbApZDGd |
12:37:34 | okcc | in this code, i want to listen to ctrl+c keypress input event using xlib |
12:40:52 | okcc | i'm trying to use obejct as thread data |
12:42:33 | PMunch | Ah, not actually sure why he's using a tuple there |
12:42:53 | PMunch | I think it might just be because he preferred the syntax of them |
12:44:14 | okcc | i just use data[2] instead of data.xRecordEventCallback to access the proc in the tuple, and now it works! |
12:44:31 | PMunch | Uhm, that's weird.. |
12:44:51 | okcc | i think the compiler here is translate data.xRecordEventCallback to xRecordEvenetCallback(data) |
12:45:22 | okcc | maybe because xRecordEventCallback is callable |
12:45:24 | PMunch | Yes, that's the UFCS |
12:47:54 | okcc | what's UFCS? |
12:48:19 | PMunch | Universal function call syntax |
12:48:34 | okcc | i get it |
12:49:46 | okcc | i have another error now, 'xRecordEnable' is not GC-safe as it performs an indirect call here |
12:51:05 | PMunch | echo isn't GC-safe I don't think |
12:51:38 | okcc | no, not the xRecordEventCallback proc, is xRecordEnable |
12:52:24 | okcc | i 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:06 | PMunch | Hmm, I tried to implement the TOTP algorithm that Google Authenticator uses http://ix.io/2eiN |
13:36:24 | PMunch | But it doesn't give me the same values as the Google Authenticator app.. |
13:38:48 | PMunch | I 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:58 | FromDiscord | <mratsim> @dadada, there is a var T but indeed I sent the wrong link |
14:06:32 | FromDiscord | <mratsim> here you go: https://play.nim-lang.org/#ix=2eiS |
14:09:26 | PMunch | Ahh, 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:00 | PMunch | Hmm, 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:56 | dadada | mratsim: 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:10 | dadada | minus one there |
14:36:48 | dadada | since 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:23 | PMunch | Hmm, where is this error from, and what does it mean? "Error: wrong number of variables" |
15:07:40 | * | NimBot joined #nim |
15:10:22 | PMunch | Oh, 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:32 | leorize | ~playground |
15:35:32 | disbot | playground: 11an online in-the-browser IDE for simple Nim experiments at http://argentina-ni.ml/ |
15:35:39 | leorize | PMunch: ^ see that |
15:36:00 | leorize | it has lots of features :P |
15:36:09 | leorize | the ui there is terrible tho |
15:44:52 | PMunch | Oh wow, that is a lot of features! |
15:46:56 | FromDiscord | <Recruit_main70007> whats the Nim equivalent of: |
15:46:56 | FromDiscord | <Recruit_main70007> (LPTHREAD_START_ROUTINE)GetProcAddress(...) |
15:47:41 | * | Hideki_ quit (Remote host closed the connection) |
15:48:37 | * | Hideki_ joined #nim |
15:50:25 | PMunch | cast[LPTHREAD_START_ROUTINE](symAddr(...)) |
15:53:04 | * | Hideki_ quit (Ping timeout: 255 seconds) |
15:54:04 | FromDiscord | <Recruit_main70007> thx |
15:55:51 | PMunch | Crap.. 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:14 | FromDiscord | <Recruit_main70007> leorize: how do i declare an APIENTRY in Nim? |
16:35:28 | shashlick | https://github.com/dom96/choosenim/issues/183#issuecomment-599230880 |
16:35:30 | disbot | ➥ choosenim 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:43 | PMunch | Hmm, is there a way to check if there exists a variable in the current scope? |
17:04:59 | PMunch | I know about `declared` but that also picks up procs of the same name |
17:08:02 | leorize | bindSym then look into the symbol? |
17:09:57 | lqdev[m] | PMunch: declaredInScope? |
17:10:17 | PMunch | Wouldn't that also take closure procs? |
17:13:37 | leorize | bindSym then look seems to be a better idea imo |
17:23:00 | PMunch | Hmm, 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:53 | sealmove | what code does a segfault process return? |
17:25:16 | Zevv | it doesnt |
17:26:15 | sealmove | hum.. but if you do like `let c = execCmd(&"nim c file.nim")` then c will be what? |
17:28:57 | leorize | os-dependant :) |
17:29:16 | sealmove | wow, this sucks |
17:29:52 | * | filcuc joined #nim |
17:30:59 | disruptek | ~stream |
17:31:00 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek |
17:42:42 | FromDiscord | <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:23 | FromDiscord | <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:21 | PMunch | Okay wtf.. This doesn't work: http://ix.io/2ekn but this does http://ix.io/2eko |
18:01:34 | * | okcc_ joined #nim |
18:03:03 | PMunch | BTW I get an undeclared error |
18:04:02 | * | okcc quit (Ping timeout: 240 seconds) |
18:16:39 | PMunch | Sweet, now it works: http://ix.io/2eks which outputs: http://ix.io/2ekt |
18:18:06 | FromDiscord | <Recruit_main70007> leorize, u there? |
18:18:36 | leorize | o/ |
18:18:45 | leorize | ah, I don't know much about windows api, sorry :P |
18:18:55 | FromDiscord | <Recruit_main70007> ok :/ |
18:19:04 | FromDiscord | <Recruit_main70007> thanks anyway |
18:19:08 | leorize | if you can show me how to do it in C, then I can show you how to in Nim :) |
18:19:25 | FromDiscord | <Recruit_main70007> cpp? |
18:19:32 | leorize | that works too I guess |
18:20:21 | FromDiscord | <Recruit_main70007> #include <Windows.h> |
18:20:21 | FromDiscord | <Recruit_main70007> BOOL APIENTRY DllMain(...) |
18:20:21 | FromDiscord | <Recruit_main70007> That apientry thing, it seems to not exist in winlean nor winim |
18:20:40 | PMunch | This module also passed it's 1000th line of code with the addition of the extract macro |
18:21:27 | PMunch | https://stackoverflow.com/questions/2081409/what-does-apientry-do |
18:21:33 | PMunch | It's basically just an alias for stdcall |
18:22:13 | PMunch | Just 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:53 | leorize | tag your function with {.stdcall.} |
18:22:57 | leorize | that's APIENTRY |
18:23:40 | * | solitudesf quit (Read error: Connection reset by peer) |
18:23:48 | * | solitudesf- joined #nim |
18:27:10 | FromDiscord | <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:42 | PMunch | I'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:09 | PMunch | Well, two actually, one for Linux and one for Windows, sharing parts of their codebase :) |
18:28:16 | leorize | oh yea, make sure you exportc your DllMain :) |
18:28:26 | FromDiscord | <Recruit_main70007> i am trying to inject a dll (educational purposes at least for now :p ) |
18:28:38 | FromDiscord | <Recruit_main70007> leorize, yeah, i already had that |
18:38:31 | PMunch | Man, this macroutils module is coming along nicely :) |
18:38:47 | PMunch | I think I'm actually done with the stuff I wanted to create to begin with.. |
18:39:05 | PMunch | Now 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:33 | FromDiscord | <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:41 | sealmove | guys, I had this idea !repo testify |
18:43:55 | sealmove | https://github.com/sealmove/testify |
18:44:15 | sealmove | no actual code yet, but it's very simple to implement |
18:45:14 | federico3 | sealmove: https://github.com/FedericoCeratto/nim-testrunner does that afaict |
18:46:03 | sealmove | does it produce a single unified JUnit report? |
18:46:18 | sealmove | also the last time I tried running it it was broken :/ |
18:46:23 | federico3 | if it doesn't open a bug |
18:46:38 | * | solitudesf joined #nim |
18:47:49 | sealmove | nim-testrunner/testrunner.nim(377, 36) Error: undeclared identifier: 'Created' |
18:51:18 | sealmove | I think I will write this one, nim-testrunner seems a little complex for the task and also seems unmaintained... |
18:52:36 | federico3 | I'll chase it |
18:53:01 | leorize | !repo testutils ? |
18:53:02 | disbot | no results 😢 |
18:53:05 | leorize | !repo testutils |
18:53:05 | disbot | https://github.com/status-im/nim-testutils -- 9nim-testutils: 11testrunner et al 15 5⭐ 2🍴 |
18:55:14 | sealmove | Oh this looks reallt nice, didn't know about it. |
18:56:26 | * | okcc_ quit (Quit: Leaving) |
18:57:00 | disruptek | you may as well consider testament. |
18:57:11 | sealmove | seems new |
18:57:27 | disruptek | it's a thing i pulled out of chronicles for general use. |
18:57:31 | sealmove | disruptek, I never figured out how to use testament. there are no docs |
18:57:40 | leorize | read specs.nim |
18:57:45 | leorize | it's sad but that's the only way :P |
18:57:45 | disruptek | they are in doc/contributing.rst or w/e. |
18:57:55 | leorize | ah that too |
19:04:34 | sealmove | I don't know, testament is also complex and is meant for Nim project. I want something simple, and ideally JUnit output. |
19:06:47 | sealmove | nim-testutils seems cool |
19:24:01 | * | shashlick quit (Quit: quit) |
19:25:55 | * | shashlick joined #nim |
19:27:19 | FromDiscord | <fluxinator2000> `var mem:seq[byte] |
19:27:20 | FromDiscord | <fluxinator2000> |
19:27:20 | FromDiscord | <fluxinator2000> proc init(): |
19:27:20 | FromDiscord | <fluxinator2000> mem = newSeq[byte](0x10000) |
19:27:20 | FromDiscord | <fluxinator2000> |
19:27:20 | FromDiscord | <fluxinator2000> init()` |
19:27:26 | FromDiscord | <fluxinator2000> this doesn't compile |
19:27:35 | FromDiscord | <fluxinator2000> what am I missing? |
19:27:51 | leorize | s/:/=/ |
19:28:07 | FromDiscord | <Recruit_main70007> bridge doesnt like multiline nor code messages |
19:28:38 | sealmove | `proc init() = ` |
19:28:58 | FromDiscord | <fluxinator2000> I'm an idiot |
19:29:07 | FromDiscord | <Recruit_main70007> happens to the best of us |
19:29:09 | FromDiscord | <Elegant Beef> Do people not read compilation errors? |
19:29:09 | FromDiscord | <Elegant Beef> `(4, 5) Error: type expected` |
19:29:22 | FromDiscord | <fluxinator2000> yeah that error message didn't help me |
19:29:28 | leorize | I mean how are you supposed to figure it out from that |
19:29:34 | leorize | even I got stuck on that message once |
19:29:36 | FromDiscord | <Elegant Beef> it's expecting a type |
19:29:36 | FromDiscord | <Recruit_main70007> true XD |
19:29:51 | FromDiscord | <Elegant Beef> meaning you have something declaring a type, albiet that's on the wrong line |
19:30:27 | FromDiscord | <Recruit_main70007> its obvius if you have experience with the language |
19:31:59 | FromDiscord | <fluxinator2000> thanks guys! |
19:32:10 | FromDiscord | <Elegant Beef> No problem, i can be a dick whenever 😛 |
19:33:25 | leorize | we really need some Hint to help spot errors like this |
19:34:00 | FromDiscord | <Elegant Beef> well it'd be more helpful if it was on the proper line |
19:34:49 | leorize | it's on the proper line :P |
19:34:55 | FromDiscord | <Elegant Beef> alternatively a simple "proc defining type but did not declare type" |
19:35:05 | leorize | it expected the following expression to result in a typedesc |
19:35:37 | FromDiscord | <Elegant Beef> Sure it's on the properline, totally not off by one |
19:35:52 | FromDiscord | <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:05 | FromDiscord | <Lantos> @dom96 with your nim-opencv what opencv were you using? I |
19:39:13 | FromDiscord | <Lantos> @dom96 with your nim-opencv what opencv were you using? |
19:42:40 | * | Zectbumo joined #nim |
19:43:40 | FromDiscord | <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:59 | FromDiscord | <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:16 | FromDiscord | <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:18 | leorize | yea, but it shouldn't be too hard to bind it yourself |
20:13:42 | leorize | PR welcome :) |
20:22:07 | dom96 | @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:07 | FromDiscord | <Winton> a small gift for the community, so they can continue having their coffee |
21:04:07 | FromDiscord | <Winton> https://cdn.discordapp.com/attachments/371759389889003532/688855068115861615/descargar.jpg |
21:04:08 | FromDiscord | <Winton> jajaja |
21:04:16 | FromDiscord | <Winton> |
21:04:16 | FromDiscord | <Winton> https://cdn.discordapp.com/attachments/371759389889003532/688855103951601684/unknown.png |
21:06:09 | FromDiscord | <Recruit_main70007> why the movistar thingy though |
21:07:06 | FromDiscord | <Winton> it was just there i didn't delete it :p |
21:07:17 | FromDiscord | <Recruit_main70007> ah XD |
21:07:22 | FromDiscord | <Recruit_main70007> its really cool still |
21:09:05 | FromDiscord | <Winton> |
21:09:05 | FromDiscord | <Winton> https://cdn.discordapp.com/attachments/371759389889003532/688856318203002906/descargar.jpg |
21:09:08 | FromDiscord | <Winton> 😄 |
21:11:09 | * | kenran quit (Quit: leaving) |
21:24:24 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:30:44 | disruptek | ~stream |
21:30:45 | disbot | stream: 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:06 | sealmove | --stdout:off doesn't work... |
21:46:49 | * | arecaceae quit (Remote host closed the connection) |
21:47:12 | * | arecaceae joined #nim |
21:52:06 | sealmove | how to supress compiler output? |
21:52:35 | * | natrys quit (Quit: natrys) |
21:53:50 | FromDiscord | <Rika> --hints:off? not sure i dont actually know |
21:54:07 | sealmove | I want to supress everything |
21:54:56 | sealmove | for some reason not even `nim c myprogram >/dev/null` works |
21:55:46 | * | solitudesf- quit (Ping timeout: 255 seconds) |
21:59:15 | leorize | sealmove: 2>&1 >/dev/null |
21:59:34 | sealmove | is this shell agnostic though? |
21:59:38 | * | solitudesf- joined #nim |
21:59:53 | FromDiscord | <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:58 | leorize | sealmove: posix-compatible |
22:00:15 | FromDiscord | <bottle> want to confirm this is a bug before i post an issue, if someone can take a look thanks in advance |
22:01:27 | leorize | it's both a bug and not |
22:01:41 | leorize | use a space as a walkaround: https://play.nim-lang.org/#ix=2elX |
22:01:53 | leorize | in Nim, if your code don't look nice, it won't compile :p |
22:02:08 | FromDiscord | <bottle> yeah i noticed if i wrap with parenthesis it also works |
22:02:10 | FromDiscord | <bottle> so this is intended? |
22:02:26 | leorize | yea, what happened is that `:-` was resolved to be one symbol |
22:02:42 | FromDiscord | <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:55 | FromDiscord | <Recruit_main70007> what does the dynlib pragma? |
22:50:12 | Yardanico | https://nim-lang.org/docs/manual.html#foreign-function-interface-dynlib-pragma-for-import |
22:50:18 | Yardanico | and https://nim-lang.org/docs/manual.html#foreign-function-interface-dynlib-pragma-for-export |
22:50:57 | * | abm joined #nim |
22:51:01 | Yardanico | basically to export/import procedures to/from dynamic libraries (dll on windows, .so on linux and .dylib on macos) |
22:51:42 | FromDiscord | <Recruit_main70007> but not using it doesnt seem to affect the program |
22:51:53 | Yardanico | what does your program do? |
22:51:58 | Yardanico | and why did you try to add dynlib pragma? |
22:52:13 | FromDiscord | <Recruit_main70007> i thought it was neccesary |
22:52:17 | * | Hideki_ quit (Ping timeout: 246 seconds) |
22:52:23 | Yardanico | It'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:52 | FromDiscord | <Recruit_main70007> the dll is being injected |
22:53:26 | * | couven92 joined #nim |
22:53:34 | leorize | then `{.dynlib.}` is required |
22:53:40 | leorize | how are you building your dll? |
22:54:04 | FromDiscord | <Recruit_main70007> nim c --app:lib --NoMain name.nim |
22:54:16 | FromDiscord | <Recruit_main70007> works without dynlib |
22:54:58 | leorize | well you will need it for nim >= 1.1 |
22:55:41 | FromDiscord | <Recruit_main70007> ok, kind of strange its not needed, exportc seems to be enough |
22:55:59 | leorize | yea that's why I fixed that in the next release :P |
22:56:20 | FromDiscord | <Recruit_main70007> ah ok :), anyway gn all |
22:57:41 | Yardanico | good 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) |