<< 15-03-2016 >>

00:05:56*francisl joined #nim
00:07:04*vonh2 joined #nim
00:08:25*vonh quit (Ping timeout: 240 seconds)
00:09:12*Jesin quit (Quit: Leaving)
00:15:42*Trustable quit (Quit: Leaving)
00:16:18*vegansk quit (Ping timeout: 276 seconds)
00:17:02Toad__http://pastebin.com/xSg7qymX i'm sure i'm just being an idiot but this isn't woring. C code it's based on is here: https://batchloaf.wordpress.com/2012/04/17/simulating-a-keystroke-in-win32-c-or-c-using-sendinput/
00:18:45Toad__I noticed there's a union in the input type on MSDN, but wasn't sure how to declare that properly.
00:18:51*vegansk joined #nim
00:21:30cheatfate_Toad__, there are some problems with union
00:22:03cheatfate_http://nim-lang.org/docs/manual.html#foreign-function-interface-union-pragma
00:22:26cheatfate_But better choice to declare windows structs without unions but with fields you need
00:22:41*Jesin joined #nim
00:22:49*jaco60 quit (Ping timeout: 240 seconds)
00:24:30cheatfate_and also mingw compiler (if you using it) dont properly packing structure members in windows, so check your sizeof() with c's sizeof()
00:25:41*desophos quit ()
00:25:58cheatfate_may be this pragma help you in future "{.passC: "-fpack-struct=8".}" - it works only for mingw compiler, if you using visual studio compiler you can avoid this pragma
00:26:46Toad__i am using mingw, would i put that on my type declarations?
00:29:08cheatfate_you can put it in the beginning of your file, this pragma just passing option "-fpack-struct=8" to compiler... but this is my workaround on x64, if you working with 32bits i think it must be "-fpack-struct=4" but i have not test it
00:29:40Toad__i'm on x64 but using 32 bit nim since x64 nim was buggy for me
00:31:47cheatfate_Toad__, working good as for me
00:32:59Toad__It presses the key?
00:33:14PMunchIs there a module to write CSV files?
00:33:17Toad__It compiles for me but it just doesn't press the key.
00:33:24Toad__even runs.
00:33:54Toad__pretty sure there's a csv module on nimble
00:34:09PMunchThere is one to parse csv
00:34:35PMunchOh yea, there is one
00:34:42PMunchSorry for that
00:34:51Toad__All good, glad you got it :)
00:35:53cheatfate_so your source working on win32 and dont working on win64?
00:36:30Toad__naww i think it was just the windows depenency error but i removed x64 nim and installed 32 trying to fix it
00:36:34Toad__lol
00:37:06Toad__i could try installing x64 nim, but everything's been working fine on 32 bit.
00:38:24*rok joined #nim
00:38:31cheatfate_I dont think you can sendinput on win64 app from wow64 app
00:39:34cheatfate_or something can be wrong with that
00:46:34*rok quit (Quit: rok)
00:50:43PMunchI'm trying to create an object with a field that holds key value bindings. I found the {"key1": "val1", "key2", "key3": "val2"} syntax which is syntactic sugar for an array constructor. I have been able to take this as a parameter to procs by declaring it as openarray[(string,string)]. However when I try to make a variable of this type or a field in an object I get an error saying invalid type.
00:54:55PMunchI'm guessing this has something to do with heap vs. stack and that setting the type to a type without a static size doesn't work. But how can I fix this? A reference to an openarray?
00:56:17*dorei quit ()
00:58:09PMunchAah, found it in the tutorial. Changing the type to sequence (heap based) and adding @ before the allocation worked
00:58:48cheatfate_Maybe its better to use tables?
00:59:11PMunchThat's what I was using. But I couldn't find a way to concatenate them so I figured a seq would be better
01:00:28PMunchHmm, tables are easier to work with though. So maybe I'll just write an iterator that combines two tables
01:06:41Toad__Compiled with x64 and it still doesn't press the key :\
01:08:15cheatfate_pastebin your source please
01:15:20*gokr quit (Ping timeout: 244 seconds)
01:18:53cheatfate_Toad__, in C sizeof(INPUT) == 40 and after compiling your code sizeof(INPUT) == 32
01:21:14PMunchError: type mismatch: got (OrderedTable[system.string, json.JsonNodeKind], proc (x: (string, JsonNodeKind), y: (string, JsonNodeKind)): int{.gcsafe, locks: 0.})
01:21:14PMunchbut expected one of:
01:21:14PMunchtables.sort(t: var OrderedTable[sort.A, sort.B], cmp: proc (x: (A, B), y: (A, B)): int{.closure.})
01:21:32PMunchWhat am I doing wrong here?
01:22:04PMunchCode is: cs.getFields().sort(proc (x,y: (string, JsonNodeKind)): int = cmp(x[0], y[0]))
01:22:32PMunchwith proc getFields(schema:Schema):OrderedTable[string,JsonNodeKind]
01:25:06cheatfate_Toad__, C compiler 64bit gives me sizeof(INPUT) = 40, 32bit gives me sizeof(INPUT) = 28
01:25:58*desophos joined #nim
01:29:23*beatmox joined #nim
01:45:28*Toad__ quit (Ping timeout: 252 seconds)
02:07:47*PMunch quit (Ping timeout: 250 seconds)
02:18:22*wuehlmaus quit (Quit: Lost terminal)
02:24:45*vendethiel joined #nim
02:36:28*GangstaCat quit (Quit: Leaving)
02:36:41*GangstaCat joined #nim
02:37:36*bozaloshtsh joined #nim
02:49:03*vendethiel quit (Ping timeout: 268 seconds)
02:49:19*brson quit (Ping timeout: 260 seconds)
03:19:02*endragor joined #nim
03:22:05*endragor quit (Remote host closed the connection)
03:22:07gmpreussner_Varriount_, any idea why travis fails on compiling koch?
03:22:23gmpreussner_it seems to work fine when compiling regular nim code
03:24:33gmpreussner_perhaps 'int' is not yet defined when reprEnum is being used?
03:25:37*endragor joined #nim
03:32:42*brson joined #nim
03:46:24*cnu- quit (Ping timeout: 268 seconds)
03:48:33*cnu- joined #nim
04:01:46Varriount_gmpreussner_: No idea.
04:03:05Varriount_Araq: Regarding string & sequence operations, what do you think about using an 'Into' prefix to signify operations that do in-place operations/modify an aready-instantiated variable?
04:09:02gmpreussner_Varriount_, i rewrote the whole thing. should be fixed now.
04:15:41Varriount_06+
04:15:42Varriount_.+
04:18:28*BitPuffin|osx quit (Ping timeout: 264 seconds)
04:43:00*francisl quit (Quit: francisl)
04:55:56endragorAraq: any plans to support "macros as pragmas" for types? Seems it is only supported for routines
06:17:23*yglukhov joined #nim
06:30:09*endragor_ joined #nim
06:34:03*endragor quit (Ping timeout: 240 seconds)
06:48:09*yglukhov quit (Remote host closed the connection)
06:52:42*brson quit (Quit: leaving)
06:56:04*exebook quit (Ping timeout: 260 seconds)
06:59:51*endragor_ quit (Remote host closed the connection)
07:00:26*endragor joined #nim
07:10:31*endragor quit (Remote host closed the connection)
07:17:41*desophos quit (Quit: Leaving)
07:19:17*endragor joined #nim
07:19:37*silven joined #nim
07:48:46*gokr joined #nim
07:48:53*gokr quit (Client Quit)
07:49:08*gokr joined #nim
07:56:06*Demon_Fox quit (Read error: Connection reset by peer)
08:09:31*endragor quit (Remote host closed the connection)
08:25:25*yglukhov joined #nim
08:33:44*dorei joined #nim
08:35:38*rok joined #nim
08:40:05*endragor joined #nim
08:59:02*jpX joined #nim
08:59:58*jpX left #nim ("Textual IRC Client: www.textualapp.com")
09:11:27*wuehlmaus joined #nim
09:14:28*xyproto left #nim ("bye")
09:21:19*Trustable joined #nim
09:22:45*darkf quit (Quit: Leaving)
09:27:22*bjz joined #nim
10:03:06*yglukhov_ joined #nim
10:03:11*yglukhov quit (Ping timeout: 268 seconds)
10:16:47*toaoMgeorge quit (Ping timeout: 244 seconds)
10:17:22*yglukhov_ quit (Remote host closed the connection)
10:26:59*toaoMgeorge joined #nim
10:28:32*bbl is now known as baabelfish
10:36:58*yglukhov joined #nim
10:37:18*yglukhov quit (Remote host closed the connection)
10:43:41*yglukhov joined #nim
10:43:44*yglukhov quit (Remote host closed the connection)
10:49:08*yglukhov joined #nim
10:49:25*yglukhov quit (Remote host closed the connection)
10:49:50*yglukhov joined #nim
10:49:56*yglukhov quit (Remote host closed the connection)
10:53:04*yglukhov joined #nim
10:57:34*rok quit (Quit: rok)
11:01:07*PMunch joined #nim
11:14:27*arnetheduck joined #nim
11:24:01*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
11:29:35*endragor quit (Remote host closed the connection)
11:37:00*boopsiesisaway is now known as boopsies
12:33:08*vonh2 quit (Ping timeout: 244 seconds)
12:33:41*vonh joined #nim
12:37:18*toaoMgeorge quit (Ping timeout: 276 seconds)
12:41:02*toaoMgeorge joined #nim
12:42:38*Varriount joined #nim
12:45:07*Varriount_ quit (Ping timeout: 260 seconds)
12:57:47*endragor joined #nim
12:59:16*irrequietus joined #nim
12:59:24*vonh quit (Ping timeout: 276 seconds)
12:59:34*vonh joined #nim
13:02:36*toaoMgeorge quit (Read error: Connection reset by peer)
13:02:54*toaoMgeorge joined #nim
13:03:51*vonh quit (Ping timeout: 250 seconds)
13:04:30*vonh joined #nim
13:05:59*irrequietus quit ()
13:09:15*ics joined #nim
13:20:01*mnemonikk quit (Ping timeout: 240 seconds)
13:20:17*mnemonikk joined #nim
13:20:17*mnemonikk quit (Changing host)
13:20:17*mnemonikk joined #nim
13:21:13*huonw quit (Ping timeout: 240 seconds)
13:27:13*huonw joined #nim
13:45:53*vonh quit (Ping timeout: 250 seconds)
13:46:01*dorei quit (Quit: Page closed)
13:51:58*boopsies is now known as boopsiesisaway
13:57:02*vonh joined #nim
13:58:42*vendethiel joined #nim
14:03:42*yglukhov quit (Ping timeout: 248 seconds)
14:11:12*irrequietus joined #nim
14:15:13*pregressive joined #nim
14:16:01*pregressive quit (Client Quit)
14:21:57*vendethiel quit (Ping timeout: 276 seconds)
14:24:51*BitPuffin joined #nim
14:28:44*Jesin quit (Quit: Leaving)
14:42:34*endragor quit (Remote host closed the connection)
14:44:29*yglukhov joined #nim
15:07:11PMunchFound another bug in the JSON module: https://github.com/nim-lang/Nim/issues/3967
15:10:36*Demon_Fox joined #nim
15:13:58*desophos joined #nim
15:16:13def-PMunch: oh right, forgot about that in my json PR
15:16:32def-I'll fix it
15:19:18def-PMunch: wait, for me they show up as equal
15:19:29def-PMunch: are you using devel branch?
15:25:16*dorei joined #nim
15:28:02PMunchI'm using 0.13.0
15:28:45PMunchSo it's fixed already, nice. Sorry for the superfluous bug report.
15:29:52*rok joined #nim
15:30:35*irrequietus quit ()
15:31:50def-PMunch: no problem, better than unreported bugs
15:32:03cheatfate_def-, could you please help me, i want to know if can i make instance of [ptr someobject] like var a = someobject()
15:32:25def-cheatfate_: not sure i understand, a ptr can be to anything
15:32:26cheatfate_if i can is this memory must be dealloced with dealloc()?
15:32:30def-yes
15:32:33def-well, depends
15:32:38def-if you allocated it manually, yes
15:32:54def-if it's on the stack you can only use it while that proc hasn't been left
15:32:59cheatfate_manually allocation is like alloc0()
15:33:20cheatfate_or i can just call var a = someobject() and compiler allocate memory for me?
15:33:31def-what's your goal?
15:33:49def-why not use garbage collected memory (ref someobject)?
15:33:51cheatfate_problem is to make singlethread/multithreaded defines
15:34:16def-then you should use allocShared() probably
15:34:26cheatfate_ref memory could not be used in multithreaded environment
15:35:16def-there are some shared data structures in the stdlib btw
15:35:33def-lib/pure/collections/shared{strings,tables}.nim might be of interest
15:36:27cheatfate_thank you
15:37:42def-generally it's a good idea to keep data of different threads separate, makes for cleaner multithreading, but you know about that probably
15:40:29cheatfate_the only problem i have how to fill allocShared object with many values... like we do for ref objects: someObject(key1: value, key2: value)
15:43:29def-easy way is to assign each value manually after allocating it
15:45:49def-like this: https://github.com/nim-lang/Nim/blob/devel/lib/pure/collections/sharedstrings.nim#L68-L73
15:46:54*jaco60 joined #nim
15:47:34def-alternatively you can do result[] = Foo(x: 1, y: 2)
15:56:11*arnetheduck quit (Ping timeout: 244 seconds)
15:58:53*adnan joined #nim
16:16:06*themagician joined #nim
16:22:32*dorei quit (Quit: Page closed)
16:26:23baabelfishdef-: were you a vim user?
16:26:57def-baabelfish: yes
16:27:51baabelfishI'm about to make the first proper release of my nim package, mind testing it out?
16:28:12*darkf joined #nim
16:28:15baabelfishIn a few days
16:28:40def-I guess. Don't have any experience with neovim yet
16:29:12baabelfishAh, it should also work with normal vim
16:29:39baabelfishAt least the first subset of features
16:30:11baabelfishI also aim to support the new vim channels
16:33:22cheatfate_do we have something like python's subprocess module?
16:34:37def-cheatfate_: osproc?
16:35:26cheatfate_looks like what i need, thanks again
16:36:54adnani have a joke
16:36:55adnanQ: How do you generate a random string?
16:37:04adnanA: Put a Windows user in front of vi, and tell them to exit
16:37:32baabelfishadnan: never heard that before ;D
16:40:53*samdoran joined #nim
16:40:58cheatfate_adnan, i think its only one thing i know about vim, is how to exit :)
16:41:57adnancheatfate_: you know how to enter it as well :p
17:01:37*brson joined #nim
17:17:19*boopsiesisaway is now known as boopsies
17:17:52*yglukhov quit (Read error: Connection reset by peer)
17:18:01*yglukhov joined #nim
17:30:01*vendethiel joined #nim
17:43:50*pregressive joined #nim
17:48:53*vendethiel quit (Ping timeout: 244 seconds)
17:49:37*vendethiel joined #nim
17:56:25*vendethiel quit (Ping timeout: 240 seconds)
18:13:15*yglukhov quit (Ping timeout: 250 seconds)
18:21:08*pregressive quit (Remote host closed the connection)
18:21:43*pregressive joined #nim
18:23:42*pregressive quit (Read error: Connection reset by peer)
18:23:44*pregress_ joined #nim
18:25:47*pregress_ quit (Remote host closed the connection)
18:32:04*francisl joined #nim
18:33:18*vendethiel joined #nim
18:48:01*Matthias247 joined #nim
18:51:20*BitPuffin quit (Ping timeout: 244 seconds)
18:52:47*yglukhov joined #nim
18:57:28*yglukhov quit (Ping timeout: 264 seconds)
18:57:51*yglukhov joined #nim
19:18:21*Matthias247 quit (Read error: Connection reset by peer)
19:20:30*yglukhov quit (Remote host closed the connection)
19:28:02*pregressive joined #nim
19:28:54*fredrik92 joined #nim
19:28:58*yglukhov joined #nim
19:29:55fredrik92Hi, I'm trying to build nimsuggest to use it in VSCode, but the build fails in Windows...
19:30:56fredrik92There's an issue on GitHub ( https://github.com/nim-lang/nimsuggest/issues/19 ), but is there a way to deal with this in the meantime?
19:33:37*brson quit (Ping timeout: 240 seconds)
19:40:22Araqfredrik92: the windows installer comes with a nimsuggest.exe
19:40:31Araqor you can use the compile_without_nimble script
19:40:34fredrik92Ah! Cool
19:40:53Araqor you get the 'plugins' dir from github
19:41:03Araqso that compilation can succeed
19:41:29fredrik92I just realized that my Nim runtime is 64-bit, but my GCC is a MinGW install (-> 32-bit)
19:42:10fredrik92That basically prevents me from compiling anything since Nim and GCC disagree on the size of a pointer ^^
19:44:44*irrequietus joined #nim
19:45:58cheatfate_Araq, you know that bundled mingw distro for x64 for some reason has GDB 32bit
19:46:20*cheatfate_ is now known as cheatfate
19:46:42Araqcheatfate: all I know is that GDB is bloatware.
19:46:54Araqit comes with a full Python installation.
19:47:13Araqunfortunately I couldn't build LLDB on Windows at all
19:47:31Araqso ... alternatively we could not ship GDB at all
19:47:49cheatfateGDB is only way to debug nim i think
19:48:01fredrik92Visual Studio!!! :-P
19:48:11cheatfatefor some reason msvc debugger do not handle nim lines properly
19:48:24PMunchYes, bundle Visual Studio with Nim, that's a good idea :P
19:49:33fredrik92Well you'd only have to write something that converts the GNU-Debuggings info from GCC into a .pdb file load that PDB in Visual Studio and you're good to go!
19:49:58cheatfateVisual studio debugger is only usefull to debug nim's generated c file
19:50:52cheatfatefredrik92, its funny i think if it will be so easy, than gcc already had pdb support
19:51:30*toaoMgeorge quit (Ping timeout: 276 seconds)
19:52:05fredrik92:P I wasn't really serious on it being easy
19:52:24*toaoMgeorge joined #nim
19:52:53fredrik92BUT: Microsoft just released its internal quirks on the PDB format a few months ago... It actually used to be a closely guarded secret of Microsoft
19:57:26*brson joined #nim
20:02:38fredrik92Araq, can you use the Visual Studio C/C++ Compiler with Nim?
20:05:19*silven quit (Ping timeout: 260 seconds)
20:05:37*silven joined #nim
20:13:57*yglukhov quit (Remote host closed the connection)
20:24:49cheatfateon windows vcc compiler working much faster
20:24:55cheatfatethan mingw
20:27:30*toaoMgeorge quit (Ping timeout: 244 seconds)
20:27:42*fredrik92 quit (Quit: Exiting)
20:28:14*fredrik92 joined #nim
20:28:50*yglukhov joined #nim
20:30:14*desophos quit (Remote host closed the connection)
20:31:49*desophos joined #nim
20:32:05*toaoMgeorge joined #nim
20:32:45*desophos quit (Remote host closed the connection)
20:48:20*desophos joined #nim
20:51:47*brson quit (Ping timeout: 244 seconds)
20:52:34*vonh quit (Ping timeout: 260 seconds)
20:55:45*vonh joined #nim
21:03:38*Demon_Fox quit (Quit: Leaving)
21:06:55*brson joined #nim
21:08:33*samdoran quit (Ping timeout: 246 seconds)
21:29:07Araqfredrik92: that's part of our FAQ iirc
21:29:17Araqyes you can
21:29:56fredrik92I'm sitting with the source code in Visual Studio now...
21:30:46*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:32:09*bjz joined #nim
21:32:36*desophos quit (Remote host closed the connection)
21:36:46*bjz quit (Client Quit)
21:37:45*desophos joined #nim
21:40:03fredrik92stdlib_times.c(113): error C2065: 'tzname': undeclared identifier
21:40:36fredrik92I guess you have to include some GNU/POSIX compliant headers (that include e.g. timezone information)?
21:54:23*bjz joined #nim
21:55:34Araqfredrik92: outch, please make a PR
21:59:17*bjz quit (Ping timeout: 260 seconds)
22:10:11*pregressive quit (Remote host closed the connection)
22:17:18PMunchIs there a way to get the index of a key in an OrderedTable?
22:18:50*Jesin joined #nim
22:35:26*Matthias247 joined #nim
22:41:54*krux02 joined #nim
22:45:55fredrik92Araq, kan I create build-command scripts for the Visual Studio compiler? Since the build*.bat still reference GCC?
22:47:20*rok quit (Quit: rok)
22:47:28*francisl quit (Ping timeout: 252 seconds)
22:50:38*boopsies is now known as boopsiesisaway
23:01:43*yglukhov_ joined #nim
23:01:43*yglukhov quit (Read error: Connection reset by peer)
23:03:49*yglukhov_ quit (Read error: Connection reset by peer)
23:04:04*yglukhov joined #nim
23:05:05Araqfredrik92: what do you mean?
23:05:14Araqyou want to generate the bat file for vcc?
23:05:23AraqI dunno if that's possible
23:05:57fredrik92Can try! :-D
23:06:45fredrik92VS2015 deprecates tzname, btw... So I changed it to _tzname and it worked! :-P
23:10:04*boopsiesisaway quit (Ping timeout: 240 seconds)
23:14:49*arnetheduck joined #nim
23:17:53*vendethiel quit (Ping timeout: 250 seconds)
23:21:56*yglukhov quit (Remote host closed the connection)
23:30:16*irrequietus quit ()
23:31:38*yglukhov joined #nim
23:31:40*GangstaCat quit (Quit: Leaving)
23:35:03*Jesin quit (Quit: Leaving)
23:37:12*boopsiesisaway joined #nim
23:45:21*arnetheduck quit (Ping timeout: 244 seconds)
23:47:44*GangstaCat joined #nim
23:48:09*toaoMgeorge quit (Ping timeout: 260 seconds)