<< 30-03-2016 >>

00:01:10*BitPuffin|osx quit (Ping timeout: 250 seconds)
00:03:41krux02is there a demo on how to debug nim code?
00:14:38*desophos quit (Remote host closed the connection)
00:22:04*elrood quit (Remote host closed the connection)
00:24:16*chrisheller joined #nim
00:41:16*PMunch quit (Quit: leaving)
00:46:33def-krux02: echo/writeStackTrace, valgrind and gdb work fine. small gdb example here: http://hookrace.net/blog/what-makes-nim-practical/#debugging-nim
00:54:00*brson quit (Quit: leaving)
00:56:14Varriountkrux02: Don't forget to set the --debugger:native switch.
00:56:37Varriountkrux02: I used Visual Studio + GDB Extension the other day to debug the compiler.
00:59:23krux02varriount i am on linux
01:00:15Varriountkrux02: Then a GDB frontend (or GDB in tui mode) should be sufficient.
01:02:29*Demos_ quit (Quit: Leaving)
01:14:32*pregressive joined #nim
01:18:44*pregressive quit (Ping timeout: 250 seconds)
01:37:43*saml_ joined #nim
01:44:05*darkf quit (Read error: Connection reset by peer)
01:44:30*darkf joined #nim
01:50:42*pandada8 quit (Ping timeout: 276 seconds)
01:55:26*pandada8 joined #nim
02:00:01*pandada8 quit (Ping timeout: 244 seconds)
02:00:39*desophos joined #nim
02:11:40*krux02 quit (Remote host closed the connection)
02:12:48*veganskaway quit (Remote host closed the connection)
02:13:32*pandada8 joined #nim
02:23:41*vegansk joined #nim
02:26:28*desophos_ joined #nim
02:26:53*pandada8 quit (Ping timeout: 244 seconds)
02:27:22*ozra quit (Ping timeout: 244 seconds)
02:31:03*desophos_ quit (Ping timeout: 240 seconds)
02:31:05veganskcheatfate, hi! About PR #4000. I checked and it doesn't break the tests, try to exec ``./koch boot -d:release && ./koch tests r cpp/tthread_createthread.nim`` with Nim's commit b4e2a84
02:31:26veganskIt was broken before my commit
02:33:35*pandada8 joined #nim
02:52:16veganskBut this test works with the latest devel
03:08:11*rgv151 joined #nim
03:08:24*rgv151 quit (Changing host)
03:08:24*rgv151 joined #nim
03:09:11*rgv151 quit (Client Quit)
03:09:50*rgv151 joined #nim
03:23:58*darkf quit (Read error: Connection reset by peer)
03:24:28*darkf joined #nim
03:26:58*rgv151 quit (Quit: rcirc on GNU Emacs 24.5.1)
03:35:22*endragor quit (Remote host closed the connection)
03:35:43*ludocode joined #nim
03:47:19*apotheon quit (Ping timeout: 260 seconds)
03:57:34*endragor joined #nim
04:01:02*saml_ quit (Quit: Leaving)
04:04:19*endragor quit (Remote host closed the connection)
04:04:48*endragor joined #nim
04:16:36*endragor quit ()
04:24:10*rgv151 joined #nim
04:32:22*endragor joined #nim
04:44:09*rkj-b joined #nim
04:46:21*rkj-b quit (Client Quit)
04:48:03*gokr joined #nim
04:52:58*apotheon joined #nim
05:02:14*anoisz joined #nim
05:04:31*bjz joined #nim
05:08:28*bjz_ joined #nim
05:08:45*bjz quit (Ping timeout: 248 seconds)
05:08:49*gokr quit (Quit: Leaving.)
05:10:45*bjz_ quit (Client Quit)
05:32:40*qwertfisch left #nim (#nim)
05:37:18*tulayang joined #nim
05:37:53*tulayang left #nim (#nim)
05:48:51*desophos quit (Read error: Connection reset by peer)
05:57:02*gokr joined #nim
06:02:52*anoisz quit (Read error: Connection reset by peer)
06:15:31*endragor_ joined #nim
06:16:48*bjz joined #nim
06:19:03*endragor quit (Ping timeout: 264 seconds)
06:23:57*bjz quit (Ping timeout: 248 seconds)
06:29:47*bjz joined #nim
06:34:29*endragor_ quit (Remote host closed the connection)
06:35:13*endragor joined #nim
06:48:18cheatfatevegansk, ok, i see
06:52:16*yglukhov joined #nim
07:01:34cheatfateAraq could you please take a look https://github.com/nim-lang/Nim/issues/4012
07:04:40*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
07:16:03Araqcheatfate: well there is little I can do.
07:16:13Araqwe can use .unchecked arrays instead
07:16:32Araqbut then repr doesn't know the length either and needs to assume len=0
07:16:42Araqand then you don't see what's in the table at all.
07:17:04Araqyou need to write a $ for sharedtable.
07:18:01cheatfateAraq, if req knows type is it possible to check is there repr_<TYPE> function available?
07:18:40cheatfateso repr() can use user-defined reprs of their types?
07:25:45Araqrepr could do a lot but the impl is ancient and I dont work on it
07:26:04AraqI never use it ;-)
07:40:04*M-Quora quit (Ping timeout: 260 seconds)
07:40:29*Demon_Fox quit (Quit: Leaving)
07:43:29*gokr quit (Read error: Connection reset by peer)
07:43:34*gokr1 joined #nim
07:45:41*M-Quora joined #nim
08:00:51*autumnl_ quit (Quit: My Mac has gone to sleep. ZZZzzz…)
08:01:35*desophos joined #nim
08:03:03*onionhammer1 quit (Ping timeout: 246 seconds)
08:03:20*onionhammer1 joined #nim
08:04:59*dorei joined #nim
08:06:32*desophos quit (Ping timeout: 260 seconds)
08:15:07*zaquest quit (Ping timeout: 244 seconds)
08:23:11*bjz joined #nim
08:27:11*zaquest joined #nim
08:27:33*bjz quit (Ping timeout: 246 seconds)
08:53:18*elrood joined #nim
08:59:50*ozra joined #nim
09:01:08*rok joined #nim
09:14:45*enthus1ast joined #nim
09:17:20Araqcheatfate: IMO repr should move into its own module and use macros.getType() rather than the old RTTI based stuff
09:18:41veganskIs there a function in stdlib that can parse uint64 from string
09:18:48vegansk?
09:19:17cheatfateAraq, but repr has its own module :) and do you think macros.getType() helps with "KeyValuePairSeq[A, B] = ptr array[10_000_000, KeyValuePair[A, B]]"?
09:20:55cheatfatevegansk, https://gist.github.com/cheatfate/44f6412fe58ac2cc2fdfd1a128194ae5
09:21:18cheatfatevegansk, sorry i dont understand you properly
09:21:34cheatfateyou need to make it from string
09:22:33Araqcheatfate: no it's in system.nim so it cannot use tables.nim etc
09:22:44Araqwhich would be nice for the cycle checking that it needs to do
09:23:04Araqvegansk: parseutils.nim? dunno.
09:23:08cheatfatei think there no such function only intToStr but it support only int64 i think
09:24:27veganskIt's time for new PR :-)
09:26:15cheatfateAraq, tables.nim is ok because repr has special proc for handling sequences
09:26:51*gokr1 quit (Quit: Leaving.)
09:27:03cheatfatevegansk, for some reason Araq dont like unsigned types :) so there not so many support for it
09:30:54Araqcheatfate: not my point, but whatever. give us a repr.nim module.
09:32:21*Arrrr joined #nim
09:32:22veganskcheatfate, I agree with it when it applies to high level only language like Java, but not to Nim
09:32:45cheatfateAraq, sorry but `macro magic` is not my forte
09:33:50Araqvegansk: lots of systems programming is done in Java, like it or not.
09:34:07Araq"high level only" is rather meaningless.
09:37:14cheatfateAraq, you know kernels programmed in Java?
09:37:47cheatfateAraq, or maybe debuggers programmed in Java?
09:39:26veganskAraq, I know, 5 years of Java expirience before we migrate to Scala, where we have lack of uints too, thanks to JVM. But it's some kind of holywars :-)
09:40:19veganskAraq, so, do you mind if I add parseBiggestUInt to parseutils/strutils?
09:40:35Araqvegansk: not at all, go ahead.
09:40:38veganskOk!
09:40:39*Trustable joined #nim
09:40:40Araqcheatfate: https://en.wikipedia.org/wiki/JavaOS
09:42:31veganskAraq, there is no BiggestUInt in system.nim. Should I use uint64, or create this type alias?
09:43:13Araqjust use uint64
09:43:17veganskOk
09:43:27Araqthere also was a Python based OS project called unununium
09:47:21cheatfateAraq, i dont find sources for JavaOS but from your link i followed to "JX is a microkernel operating system with both the kernel and applications implemented using the Java programming language"
09:48:19cheatfateAraq, so i get it sources and what i have found? i have found ASM/C files, because you can't run java in realmode
09:49:49cheatfateI think its possible to make Java OS only on specific processor/platform which have java core inside
09:50:32Araqha ha touché
09:52:14cheatfateWhen i have started learning programming, C was named as "High level programming language" and there was only one "System programming language" and it was Assembler
09:52:56veganskAraq, whats the need for ``extern: "npuParseBiggestInt"`` pragma in parseutils.nim?
09:53:48Araqvegansk: nimrtl.dll support.
09:53:48*krux02 joined #nim
09:54:54veganskThanks!
09:55:00cheatfatevegansk, i think you trying to move very big and heavy stone :)
09:59:51cheatfatein future i will try to kick out `msvcrt.dll` dependancy from nim executable
10:00:00veganskcheatfate, noooo :-) Look at this: https://gist.github.com/vegansk/af99639d725388b6b344, it's like the Scala, but without JVM, tomcats and other bull... staff. My dreams are comming true :-)
10:02:41krux02vegansk: don't you like the awesome java class loading mechanism and the heavy optimized boot time?
10:03:10cheatfatevegansk, heavy and big stone is the "uint" in nim :)
10:06:14veganskkrux02, I'm a little tired of this *perfect* things :-)
10:07:48krux02I thought Rust would be cool, and it sounds cool, but practically I don't like it
10:09:04krux02I thought it had macros, because printf was a macro call but it was implemented in the compiler :/ so I switched to nim and I like it.
10:09:50krux02but Jonathan blow is developing on a language, that several things I like about nim, and makes them even better, but it is by far not as mature as nim is
10:10:13krux02but it's worth watching, since he is a very smart guy with a lot of experience
10:11:15veganskRust is like the new C++ with templates magic. Go is lack of the generics and too verbose. Nim is the variant :-)
10:13:34federico3krux02: Jai?
10:18:15*rok quit (Quit: rok)
10:20:22*gokr joined #nim
10:24:50cheatfateAraq, i think compiler is broken with "--threads:on"
10:27:20cheatfateAraq, this is callstack https://gist.github.com/cheatfate/0047b940e5658b98e071e46a906dd604
10:27:29cheatfatefrom msvc debugger
10:27:45Araqfix it, I know
10:28:34*desophos joined #nim
10:28:47AraqJai is cool but I am still shocked that he re-invented thread local storage without noticing ;-)
10:29:16cheatfateAraq, you fixing or you already fixed and i'm using old compiler?
10:30:29Araq*you* should fix it.
10:33:32*desophos quit (Ping timeout: 260 seconds)
10:34:56*gokr1 joined #nim
10:36:45*arnetheduck joined #nim
10:36:52*fredrik92 joined #nim
10:38:15*gokr quit (Ping timeout: 264 seconds)
10:47:30veganskAraq, where was no high/low magic for uint64, uint types in the compiler. I added them to semexprs.semLowHigh, and it works. Are there any other places to pay attention?
10:47:51Araqit cannot work, hence they were missing.
10:48:14Araqwant to update every place in the compiler where n.intVal is used? me neither.
10:49:23veganskgot it
10:50:14Araqyou could add a uintVal: uint64 field to PNode
10:50:36Araqand then update 80_000 lines of compiler source to handle it everywhere properly.
10:50:52Araqand then you also add it to macros.nim and make every macro out there handle it.
10:51:16Araqit never stops causing work.
10:51:25Araqthere are real costs to C's type zoo.
10:52:11Araqso you hide C's printf implementation in libc and pretend C produces small binaries.
10:52:28*kulelu88 joined #nim
10:52:28*kulelu88 quit (Changing host)
10:52:28*kulelu88 joined #nim
10:55:01Araqand for what? so that you can continue to confuse Natural with unsigned arithmetic?
10:56:31cheatfateAraq, GC -> [sharedlist] -> [locks], in PreMain GC initialized first before locks initialized with system functions...
10:57:13cheatfateAraq, when i add "import locks" before "import sharedtables" in nim i got "Error: system module needs 'copyString'"
10:57:21*PMunch joined #nim
10:59:37cheatfateand also i have found csprintf() in nimGetProcAddr() which can cause stack overflow
11:06:22Araqhu? how so?
11:07:12Araqand why must locks be initialized?
11:08:02cheatfateAraq, but how locks can get their proper system values InitalizeCriticalSection and others?
11:08:22Araqit's inialized as part of the Gc initialization?
11:09:09cheatfatenope its initialization called after GC initialization
11:10:41cheatfatethis is how PreMain looks like https://gist.github.com/cheatfate/ec0edfe7e37e95b34fd8e5a6463483c2
11:11:08Araqwhy does it matter?
11:11:17Araqshouldn't stdlib_locksDatInit000 be empty?
11:12:34cheatfateAraq, https://gist.github.com/cheatfate/6c45f47465347d61968d7f6bd00c1905
11:12:50Araqthe sprintf call needs to be eliminated, we need inline code for that then. *sigh*
11:14:01Araqcheatfate: ah. well, use header: "windows.h" rather than .dynlib for these procs then?
11:15:03cheatfateAraq, ok i can try
11:16:56cheatfateAraq, but there can be a problem because of defined SysLock structure
11:17:14cheatfateCRITICAL_SECTION structure is undocumented in windows api
11:17:30cheatfateis there can be type casting problems?
11:22:36cheatfateahh ok its now documented in winnt.h i'l try
11:31:30*anoisz joined #nim
11:38:30cheatfateAraq, with vcc - ok, but with gcc i have received this https://gist.github.com/cheatfate/21ca75137ada4b45091d9ee4aef90f7a
11:39:50cheatfateAraq, modified syslocks.nim https://gist.github.com/cheatfate/2fef1cdf9c7f8c875ba8ef78d3ef8d22
11:40:46*vendethiel- quit (Ping timeout: 248 seconds)
11:41:49*vendethiel joined #nim
11:43:47cheatfateand i really dont understand why sharedlist in stdlib_math.c...
11:51:13Araqha, me neither
11:51:28Araqwell it could be an .inline proc from the GC
11:55:14*vegansk is now known as veganskaway
11:57:53cheatfateAraq, math is used by sharedtables
11:58:31*kulelu88 quit (Quit: Leaving)
11:58:31cheatfateAraq, gc dont using math and sharedlist not using math...
11:58:51Araqthat's weird
12:02:42cheatfateAraq, i'm wrong i have cleaned nimcache and make one more compilation so we can see more usefull errors https://gist.github.com/cheatfate/6a708fb815c4d778f431d4f1ac114fba
12:04:42cheatfatei'm in deadlock
12:05:52cheatfateAraq, do you really need sharedlist here? if you just iterating over it?
12:06:08AraqI really need it, yes.
12:06:38Araqthe GC used to lack this crucial feature.
12:07:52Araqget a mingw that has a windows.h with CRITICAL_SECTION ?
12:09:21cheatfateAraq, problem not in windows.h problem is that all files with error dont have "#include <windows.h>"
12:09:29cheatfatefor some reason
12:10:09Araqah, where does CRITICAL_SECTION come from?
12:10:36krux02federico3: yes
12:14:03cheatfateAraq, from here https://gist.github.com/cheatfate/2fef1cdf9c7f8c875ba8ef78d3ef8d22
12:14:13cheatfateAraq, system/syslocks.nim
12:17:10*Sembei joined #nim
12:20:07fredrik92Just to be sure, static linking means in best case that I create a completely standalone executable, right?
12:26:15*Guest15833 is now known as Vivek
12:26:23*Vivek quit (Changing host)
12:26:23*Vivek joined #nim
12:36:14cheatfateAraq, i think it helps when i'm generating code with vcc (stdlib_etcpriv.c, stdlib_math.c, stdlib_hashes.c) dont have CRITICAL_SECTION...
12:39:04*BitPuffin joined #nim
12:43:46*alexsystemf_ quit (Quit: Connection closed for inactivity)
12:44:43*PMunch quit (Quit: leaving)
12:46:49Araqfredrik92: right.
12:47:17Araqcheatfate: well math.nim has GCC/VCC specific code. still weird.
12:49:33*BitPuffin quit (Ping timeout: 240 seconds)
12:52:03*BitPuffin joined #nim
12:53:12*ozra left #nim ("Konversation terminated!")
12:57:42*BitPuffin quit (Ping timeout: 244 seconds)
13:02:24*Varriount quit (Ping timeout: 244 seconds)
13:05:03*Varriount joined #nim
13:09:31krux02it would be nice, if math.nim would not depend on a platform dependent math.h from c, because I know that the game factorio had problems implementing the multiplayer, because different platforms had tiny differences in the results produced from math.h
13:13:27*gokr joined #nim
13:13:57cheatfateAraq, you can watch diff of the generated code for simple file etcpriv.nim
13:13:58cheatfatehttps://gist.github.com/cheatfate/f866e008ce292c4372aa2283f5469523/revisions
13:17:27*gokr1 quit (Ping timeout: 260 seconds)
13:17:49Araqcheatfate: so it's the difference in the thread local storage implementations
13:18:04Araqwith a combination of a codegen bug I guess.
13:19:06*zxtx quit (Read error: Connection reset by peer)
13:19:19*zxtx joined #nim
13:19:24*flyx quit (Excess Flood)
13:19:31*flyx joined #nim
13:21:00cheatfateAraq, then I give up, do you need something more from me?
13:25:19Araqcheatfate: fix the compiler, file ccgtypes.nim, line 285
13:25:35Araqadd something like
13:26:09Araq if t.sym != nil: useHeader(m, t.sym)
13:26:12Araqbefore
13:26:16Araq result = getTypePre(m, t)
13:26:37Araqsee proc getTypeDescAux for an example
13:35:31cheatfateAraq, add [var t = getUniqueType(typ)]?
13:35:33cheatfatetoo?
13:35:54Araqdunno. better not.
13:36:13Araqdon't mess with the unique type logic if you can avoid it, it's complex.
13:36:23veganskawayAraq, if there is a problem with high/low magic, maybe we can add module ``limits`` to stdlib which will hold type parameters, like high/low values and so on?
13:36:28*veganskaway is now known as vegansk
13:38:11Araqwhy do you need high(uint64) anyway.
13:38:28Araqevery value is <= than that value by definition.
13:40:45veganskI want to have an extesible system to detect type parameters. And see my PR 4013 where I need high(uint) as uint64 value
13:44:45Araqyou only need it because you use highUInt rather than intmaxCheck() where you could return 'true' for 64 bit uints
13:44:47Araqbbs
13:44:56cheatfateAraq, i'm too ignorant to patch compiler code... i dont understand it :) i made "if typ.sym != nil: useHeader(m, typ.sim)" but this patch doesnt help
13:47:34*gokr quit (Quit: Leaving.)
13:53:57veganskWhat is intmaxCheck?
13:55:56*pregressive joined #nim
13:56:59*fredrik92 quit (Quit: Gotta go . . .)
13:59:28*AckZ joined #nim
14:13:10*darkf quit (Quit: Leaving)
14:24:25*vegansk is now known as veganskaway
14:25:03*anoisz quit (Ping timeout: 240 seconds)
14:26:52*pregressive quit (Remote host closed the connection)
14:27:26*pregressive joined #nim
14:41:05*BitPuffin joined #nim
14:46:55*BitPuffin quit (Ping timeout: 252 seconds)
14:51:53Arrrrhave you found it out?
15:21:18*BitPuffin joined #nim
15:24:43*pregressive quit (Read error: No route to host)
15:25:28*pregressive joined #nim
15:26:33*BitPuffin quit (Ping timeout: 240 seconds)
15:30:28*dorei quit (Quit: Page closed)
15:42:51Araqveganskaway: a template you need to write
15:43:36*onionhammer1 quit (Ping timeout: 244 seconds)
15:44:30*brson joined #nim
15:49:45*BitPuffin joined #nim
15:55:27*BitPuffin quit (Ping timeout: 244 seconds)
16:10:32*onionhammer1 joined #nim
16:11:57ArrrrDoes nim have any proc for string -> arra[char] ?
16:12:01Arrrr*array[char]
16:15:25*arnetheduck quit (Ping timeout: 248 seconds)
16:15:44*Demon_Fox joined #nim
16:17:25*exebook joined #nim
16:19:59flyxArrrr: I guess not, because the size of an array must be constant at compile time, while the size of a string is not
16:21:07flyxwhat would you need the array for?
16:21:39ArrrrBut there could be a proc fillArray[T](a: var array[T, char], s: string)
16:21:48Arrrrnetworking
16:23:56*boopsiesisaway is now known as boopsies
16:26:46*gokr joined #nim
16:31:47*yglukhov quit (Ping timeout: 250 seconds)
16:38:13*Ven joined #nim
16:41:33*BitPuffin joined #nim
16:41:54*Ven quit (Client Quit)
16:47:42*BitPuffin quit (Ping timeout: 268 seconds)
16:52:07*desophos joined #nim
16:53:17*rgv151 quit (Ping timeout: 248 seconds)
16:57:25*Ven joined #nim
16:59:16*Ven quit (Client Quit)
17:09:50*Ven joined #nim
17:10:18*Ven quit (Client Quit)
17:13:03*enthus1ast quit (Ping timeout: 276 seconds)
17:16:45*Ven joined #nim
17:17:54*Ven quit (Client Quit)
17:22:11*def- quit (Ping timeout: 248 seconds)
17:23:34*Ven joined #nim
17:23:39*Ven quit (Client Quit)
17:26:04*def- joined #nim
17:28:12*BitPuffin joined #nim
17:30:01*rok joined #nim
17:33:02*Varriount quit (Disconnected by services)
17:33:02*Varriount_ joined #nim
17:33:33*BitPuffin quit (Ping timeout: 240 seconds)
17:33:46*Ven joined #nim
17:34:09*Ven quit (Client Quit)
17:34:59*yglukhov joined #nim
17:39:15*yglukhov quit (Ping timeout: 248 seconds)
17:43:49*rok quit (Quit: rok)
17:46:02*Ven joined #nim
17:57:23*Matthias247 joined #nim
18:00:21*GangstaCat quit (Quit: Leaving)
18:05:43*yglukhov joined #nim
18:06:00*Varriount joined #nim
18:06:38*Varriount_ quit (Ping timeout: 268 seconds)
18:08:15*BitPuffin joined #nim
18:09:31*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:11:17*Demon_Fox quit (Quit: Leaving)
18:13:47*Arne joined #nim
18:13:54*BitPuffin quit (Ping timeout: 244 seconds)
18:21:04*GangstaCat joined #nim
18:22:30*Arne quit (Ping timeout: 250 seconds)
18:22:39*Sembei quit (Ping timeout: 264 seconds)
18:23:12*Ven joined #nim
18:27:46*endragor_ joined #nim
18:31:22*endragor quit (Ping timeout: 250 seconds)
18:32:32*endragor_ quit (Ping timeout: 268 seconds)
18:33:11*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:38:16*Ven joined #nim
18:38:34*Ven quit (Client Quit)
18:56:35*PMunch joined #nim
18:57:50*Sembei joined #nim
19:04:02*Ven joined #nim
19:08:22*onionhammer1 is now known as onionhammer
19:09:18*Varriount_ joined #nim
19:09:18*Varriount quit (Disconnected by services)
19:11:22*BitPuffin joined #nim
19:13:02*BitPuffin quit (Read error: Connection reset by peer)
19:20:17*enthus1ast joined #nim
19:29:13*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:30:54*autumnl joined #nim
19:34:00*Varriount_ quit (Ping timeout: 244 seconds)
19:35:19*Varriount joined #nim
19:46:53*enthus1ast1 joined #nim
19:49:00*enthus1ast quit (Ping timeout: 244 seconds)
19:50:12bblproc sp_link_type*(link: ptr sp_link): sp_linktype # damn libspotify and your naming
19:51:37bblI think Araq is right when it comes to the identifier equality
20:02:03*enthus1ast1 quit (Ping timeout: 276 seconds)
20:19:40*elrood quit (Quit: Leaving)
20:59:16*desophos quit (Remote host closed the connection)
20:59:39*desophos joined #nim
21:00:43*enthus1ast joined #nim
21:02:29cheatfateAraq, how are you?
21:04:07*desophos quit (Remote host closed the connection)
21:04:26*desophos joined #nim
21:08:32*desophos quit (Remote host closed the connection)
21:08:36gokrHey guys
21:08:47*desophos joined #nim
21:09:49Araqcheatfate: hey
21:11:23cheatfateAraq, i just want to remember you about --threads:on windows gcc showstopper :)
21:11:48Araqhu? I told you how to fix it :P
21:12:00cheatfateAraq, i told you that fix not working :)
21:12:02Araqso prepare your PR and let me do the rest
21:13:05cheatfateAlso i want to replace csrpintf in dyncalls.nim but i dont know what i can use "&" and "$"? or only some c functions?
21:13:25Araqno, neither $ nor C functions.
21:13:38Araqyou need to do it all on your own, writing to the char array buffer.
21:13:46Araqit's a challenge ;-)
21:15:12cheatfateits not a problem but i need to make function for int to str conversion
21:15:39*yglukhov quit (Remote host closed the connection)
21:15:55cheatfateand why you need this decoration staff?
21:16:18AraqI don't need it, others do.
21:16:41cheatfatethey so lazy?
21:16:42cheatfate:)
21:18:29*desophos quit (Remote host closed the connection)
21:19:31cheatfatejyelon - author of this autodecoration made this only PR
21:19:47cheatfateso i dont think others wants this :)
21:19:54*Jesin quit (Quit: Leaving)
21:20:17Araqthere was some forum discussion about it and it was the best choice
21:21:14*Demon_Fox joined #nim
21:22:07*Arrrr quit (Quit: WeeChat 1.4)
21:23:19cheatfateok its not a problem any way i can patch it, but i still need your help with compiler :)
21:23:45Araqwant me to debug it or do you want to learn more about the compiler?
21:24:25*Jesin joined #nim
21:25:55cheatfateAraq, i prefer first way, just because it takes too much time to learn compiler
21:30:52*Sembei quit (Read error: No route to host)
21:30:58*pregressive quit (Remote host closed the connection)
21:31:34*pregressive joined #nim
21:31:41*pregressive quit (Read error: Connection reset by peer)
21:32:12*pregressive joined #nim
21:32:13*Sembei joined #nim
21:32:40*BitPuffin|osx joined #nim
21:33:01*JAZMINE joined #nim
21:33:16*JAZMINE left #nim (#nim)
21:36:27*pregressive quit (Ping timeout: 246 seconds)
21:36:51Araqcheatfate: PR ready?
21:37:11cheatfateAraq, what PR? with CRITICAL_SECTION
21:37:12cheatfate?
21:38:35Araqyes
21:39:12*desophos joined #nim
21:39:30cheatfatewait a moment
21:40:23*Varriount quit (Disconnected by services)
21:40:23*Varriount_ joined #nim
21:45:24*Varriount_ quit (Ping timeout: 276 seconds)
21:45:25cheatfateAraq, https://github.com/nim-lang/Nim/pull/4017
21:50:47Araqsome test program with --threads:on is enough to trigger the bug?
21:54:51cheatfateAraq, https://gist.github.com/cheatfate/7827f22db446e0284d5316e95abfbc91
21:56:30*desophos quit (Remote host closed the connection)
21:56:33PMunchHmm, what are the performance characteristics of a seq?
21:57:49cheatfatePMunch, nobody test it, i think it slow but def- assures me that it fast enough
21:58:13PMunchFast enough..
21:58:42*enthus1ast quit (Ping timeout: 244 seconds)
21:59:20cheatfatePMunch, i dont like seqs... but strings are based on seqs, so seqs is like core feature...
21:59:24*enthus1ast joined #nim
21:59:38PMunchYou don't like them?
21:59:51PMunchWhat do you use instead
22:00:38cheatfateif i need iterations only i use lists
22:01:01cheatfateif i need indexing only i'm using arrays
22:02:52*desophos joined #nim
22:04:39Araqlists are slow.
22:04:49Araqand suck.
22:07:57*desophos quit (Read error: Connection reset by peer)
22:08:22*desophos joined #nim
22:10:51cheatfateAraq, it depends...
22:11:16cheatfateAraq, but seqs are slow too
22:14:36Araqyeah I can imagine they are slow for your coding FP coding style
22:16:03Araqbut that's not a coding style that is used for anything performance critical ;-)
22:19:01PMunchOkay, just did some simple testing
22:21:05PMunchRunning 100 rounds
22:21:16PMunchEach round adding 10_000 elements to the sequence
22:21:57PMunchThen running 100 indexations of random positions (random calculated outside timing, obviously).
22:23:05Araqrandom access is not why you use seqs though. and you cannot compare it to lists then.
22:23:17*darkf joined #nim
22:23:29Araqyou use seqs because of their memory packing nature
22:23:48PMunchWell, it is what I was going to use it for. Random access on a variable length list
22:24:10Araqok, but then you cannot use lists anyway.
22:24:52PMunchThey both increase linearly, but not to anything too crazy
22:28:23Araqcheatfate: it's because SysLock is aliased in locks.nim
22:29:46cheatfateAraq, you mean Lock* = SysLock?
22:30:04Araqexactly
22:30:13PMunchAraq, I was just wondering as I don't know how the seqs are implemented. If they were implemented with reallocs on arrays they would be fairly bad on inserts, if they were a double linked list then inserts would be good but indexing would be horrible.
22:30:33Araqthey are done with reallocs yes.
22:30:47PMunchAh okay
22:30:49AraqI wonder why people keep wondering about that.
22:31:05AraqPython, C++, Lua, ... they all use growable arrays
22:31:15Araqnobody uses lists under the hood.
22:31:32PMunchWell, Clojure does
22:31:38PMunchOr actually a trie of some sort
22:31:45PMunchBut that's because it's functional
22:32:23Araqah yeah, it's caused by the Clojure hype.
22:32:58Araqbut that's done for immutability.
22:33:05Araqin Nim seqs are not immutable.
22:33:16PMunchClojure has recent hype? Or was that a joke :P
22:33:32PMunchThey could still be doing something strange under the hood for whatever reason
22:33:54AraqI don't think it has "recent" hype. it surely had its amount of hype.
22:34:12PMunchUnderstandable, it's a great language
22:34:48PMunchBut it's got some flaws, the most pressing IMHO being that it runs in the JVM..
22:37:14AraqI still don't like dynamic typing.
22:37:50Araqwhen I write code in a dynamic language my poor brain constantly needs to do the type checker's job. all the time.
22:37:58PMunchThat's true
22:38:07Araqhuman compiler at work.
22:38:10Araqhate it.
22:38:14PMunchBut it has it's benefits
22:38:31krux02how do I debug nim code properly?
22:38:34PMunchAnd it works in a functional language
22:38:59Araqno it doesn't. FP is orthogonal.
22:39:08krux02I mean with a nice frontend, where I see my local variables and call stack, and I can step through my code with hotkeys
22:39:19Araqgot some data structure? does it change from 2 dimensions to 3?
22:39:36*Trustable quit (Remote host closed the connection)
22:39:44Araqdo you have to update the code to deal with this change?
22:39:58Araqyes. and yes.
22:40:16PMunchYea, in those cases it's a pain
22:40:22Araqhere you go. with static type checking you get all the nested iterations right.
22:40:26PMunchEspecially with seldom visited branches of your go
22:40:31Araqwith dynamic typing you don't.
22:40:42PMunchs/go/code
22:41:05Araqkrux02: use visual studio plugin?
22:41:23krux02Araq: how do I do that on arch linux?
22:42:05Araqpfff, you cannot tell me you care about your productivity on arch
22:42:09*Araq ducks
22:42:41PMunchHaha
22:43:04Araqseriously though any GDB frontend will do
22:43:12Araquse --debugger:native
22:43:27PMunchkrux02, https://gist.github.com/flaviut/487be89b8abfae2612e8
22:43:46krux02actually the productivity on arch is quite high, once it is installed (was a pain in the ass) it is really nice to use, keeps being up to date in almost everything, and has all packages imaginable, if you take AUR into concideration (even without it it's great) but that's not the topic
22:45:00krux02the problem is, that there is basically no documentation on how to debug nim code, and I used always the builtin gdb frontend in qt creator
22:45:40Araqthe only problem is that the debuggers mostly support C++ syntax
22:46:20Araqbut nim's name mangline is crippled to the point that it produces bugs
22:46:42Araqso that debugging becomes managable
22:47:48Araqnot sure I like it though, I'd rather have bullet proof name mangling, no bugs and slightly more inconvinient debugging
22:48:00Araqand no, I cannot write 'convenient'
22:48:16krux02I don't understand how name magline crippling produces bugs that make debugging managable
22:48:38Araqproc main =
22:48:56Araq var sin = 34 # oops, 'sin' is not mangled and a C #define
22:49:20Araq# yay, a code generation bug.
22:49:32Araq# C's preprocessor is so awesome.
22:50:32krux02ok, but wouldn't it be possible, to generate code that doesn't require any preprocessor of c anymore?
22:50:48AraqC -- the ultimate hippie language where the 70ies never ended.
22:51:37Araqkrux02: .header pragma?
22:51:42Araq.emit ?
22:51:55Araqin theory you can do it.
22:52:11Araqin practice there is not a single Nim project out there where that would be feasible.
22:52:55cheatfateAraq, https://gist.github.com/cheatfate/c35cb0310e5989286d0410301258faea
22:53:53cheatfatethis is replacement for csprintf()
22:54:10Araqno ascii based counting? no loop invariant code motion?
22:57:00cheatfateAraq, i dont understand you
22:57:32Araqit's great, but you can move the '_' & name operation out of the for loop
22:58:07cheatfateyep you are right
22:58:26Araqthe ascii based counting was a joke.
22:58:44krux02ok, I am not an expert in preprocessor backend magics, but from using the preprocessor, it doesn't seem too complicated to reimplement it on the nim side, and resolve everything it does
22:59:00Araq0,4,8,12,16,20,24,28,32 # hmm
23:00:00Araqkrux02: that's the point though. the Nim compiler doesn't have enough information when you use the .header pragma
23:04:06cheatfateAraq, you dont like numbers?
23:04:54AraqI respect the inc ascii, 4; on overflow do weird stuff; logic
23:05:07Araqthat I'm thinking about.
23:05:08krux02ok, now I read about the header pragma (I was searching for a C pragma before) and now I understand it better,
23:07:11krux02but I am still looking for a debugger solution, that simply works, and works simply, meaning I would like to have a single document that I need to read in order to understand it, I don't really like to learn a tool by searching everywhere on the web how each piece works
23:07:59Araq--debugger:native is a single command line option that you need to learn.
23:08:15Araqthen you load the produced binary into your debugger.
23:08:22Araqlike you would with C++ code.
23:08:39AraqI don't know what else you're after.
23:09:27krux02I tried to use emacs, but that means I need to read the documentation about emacs (I am new to emacs), I need to learn gdb (I always used a graphical frontend where no documentation was required), and eventually I need to learn the right arguments I need to pass to nim/nimble but at least the last part is very simple
23:09:49ldleworkYou should totally learn emacs though, its great.
23:09:59ldleworkI can even help you with the basics if you'd like.
23:10:23krux02ldlework: that would be really nice
23:10:31krux02I am still setting up everything.
23:10:48ldleworkkrux02: The first advice I can give you is to move your control key to the left of your spacebar
23:11:01ldleworkSo you have the main modifier on the left, and the meta modifier on the right.
23:11:27krux02in general, or just for emacs?
23:11:46ldleworkWell, I do it generally. Its generally useful to have both modifiers available centrally with the thumbs.
23:11:52ldleworkBut for emacs, its how it was designed.
23:12:15ldleworkThe old spacemacs keyboards on lisp machines had modifiers ordered centrally, rather than the inverse that we have today.
23:12:34krux02yes that would prevent the emacs pinkey
23:12:46ldlework[hyper][super][meta][control][ space ][control][meta][super][hyper]
23:13:02ldleworkI make one improvement in that, I change it to
23:13:12ldleworkwell
23:13:17ldleworkon a modern keyboard its more like
23:13:44krux02http://www.ifis.uni-luebeck.de/~moeller/symbolics-info/symbolics-images/keyboard.JPG
23:13:47ldlework[alt][fn][win][control][ space ][alt][control]
23:14:02cheatfateAraq, there is a problem with old code and my modification length of imported function name can be more than 250
23:14:03krux02doesn't look like it, but they had playstation keys :P
23:14:16ldleworkhehe, yup just like that
23:14:32ldleworkBut I recommend having control on the left, and alt/mod on the right.
23:16:44cheatfateAraq, but my code could not cause stack overflow
23:17:12krux02the problem is, I really do not like to rebind my system keys
23:17:29Araqyour code is beautiful and we don't import function names longer than 250 chars
23:17:32krux02feels like yet another thing I have to think about
23:17:40krux02so can I rebind it emacs locals
23:17:43krux02local?
23:18:58ldleworkkrux02: I don't know that seems silly.
23:19:20krux02just a side node, I use the neo keyboard layout, where I need the right alt, to have navigation keys on the home row
23:19:47ldleworkHalf the battle is turning "consciously invoking commands" to "unconsciouslly treating commands like any other automatic input operation"
23:21:22krux02I recently installed nim-mode, but I do not feel any difference
23:21:30krux02can you help me a bit in using it
23:22:11ldleworkkrux02: I can't actually vouch for nim-mode
23:22:20ldleworkhaven't been writing a whole lot of nim lately
23:22:38ldleworkbut I imagine it you don't notice a lot of difference because emacs's default indentation is pretty smart
23:22:52ldleworknim-mode is likely adding correct indentation and syntax highlighting
23:23:00ldleworkit might not do anything more fancy
23:23:56krux02what I really want is auto completion, compile on a button, and jump to declaration
23:24:39Araqemacs with nimsuggest integration can indeed do that, though I've never tried it myself.
23:25:04krux02I am a bit spoiled by youcompleteme for vim c++, but I don't like vim's modal editing, it's horrible despite the fact that so many people love it
23:25:30krux02so how do I trigger autocompletion?
23:25:48krux02YCM did it all the time automatically
23:28:00Araqask reactormonk
23:31:15*fredrik92 joined #nim
23:32:07cheatfateAraq, but if Lock* = SysLock made an error, why c code generated for vcc is better and for gcc
23:32:29*fredrik92 quit (Client Quit)
23:32:36Araqcheatfate: I was wrong, it's something else
23:33:25*fredrik92 joined #nim
23:33:35*Matthias247 quit (Read error: Connection reset by peer)
23:39:12*gunn quit (Quit: My Mac has gone to sleep. ZZZzzz…)
23:41:30krux02Araq: Are you using Visual Studio for all nim development?
23:41:46Araqno, I use NimEdit.
23:44:21krux02ok, I did not see that coming.
23:44:40PMunchHmm, I've got "type NumList = seq[tuple[base:int64,nums:seq[int64]]]". But when I try to add something to it I get: Error: type mismatch: got (List, tuple[base: int64, nums: seq[int64]]). Why isn't this working?
23:45:08AraqPMunch: your stuff is not passed by 'var T' most likely
23:45:16krux02Ok I did not see that coming.
23:45:16cheatfateAraq, is it bad screenshots or font rendering is so weird?
23:45:47Araqfont rendering is indeed the no 1 issue that keps me from developing it further
23:46:15krux02very interesting to me is, that it needs sdl
23:46:21AraqI'm waiting for yuriy's shiney new font rendering engine
23:47:53Araqanother problem is that's not open source and building binaries for 3 OSes is too painful to do it frequently
23:49:04krux02first of all, why not open source? Second why not include a nice pixel font?
23:49:15krux02like terminus
23:49:54AraqI wanted to take little money for it, that's why.
23:49:59krux02a nice monospace pixelfont, and fontrendering is just blitting textures
23:50:44Araqwhy not a nice pixel font? because I don't think there are many out there who support enough of Unicode.
23:50:54Araqbut frankly, it's a good point.
23:51:25AraqI didn't really consider it.
23:51:41Araqcan these by now support different font sizes?
23:52:33krux02yes, but limited
23:52:46krux02just only the scales that are supported by the font
23:52:54krux02like I said, I like terminus
23:54:19PMunchAraq, this is the code that doesn't work. The problem is on line 16, it complains about the wrong type (which is strange because the createNumList works fine).http://hastebin.com/riqopoqapu.go
23:56:40AraqPMunch: told you.
23:56:57Araqyou need to use 'list: var NumList' to be able to modify it.
23:57:06Araqand yeah I know the error message sucks.
23:58:54PMunchAaah
23:59:08PMunchHad this issue before actually
23:59:18PMunchBut yea, error messages in Nim are not the greatest