00:01:10 | * | BitPuffin|osx quit (Ping timeout: 250 seconds) |
00:03:41 | krux02 | is 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:33 | def- | 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:14 | Varriount | krux02: Don't forget to set the --debugger:native switch. |
00:56:37 | Varriount | krux02: I used Visual Studio + GDB Extension the other day to debug the compiler. |
00:59:23 | krux02 | varriount i am on linux |
01:00:15 | Varriount | krux02: 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:05 | vegansk | cheatfate, 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:26 | vegansk | It was broken before my commit |
02:33:35 | * | pandada8 joined #nim |
02:52:16 | vegansk | But 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:18 | cheatfate | vegansk, ok, i see |
06:52:16 | * | yglukhov joined #nim |
07:01:34 | cheatfate | Araq 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:03 | Araq | cheatfate: well there is little I can do. |
07:16:13 | Araq | we can use .unchecked arrays instead |
07:16:32 | Araq | but then repr doesn't know the length either and needs to assume len=0 |
07:16:42 | Araq | and then you don't see what's in the table at all. |
07:17:04 | Araq | you need to write a $ for sharedtable. |
07:18:01 | cheatfate | Araq, if req knows type is it possible to check is there repr_<TYPE> function available? |
07:18:40 | cheatfate | so repr() can use user-defined reprs of their types? |
07:25:45 | Araq | repr could do a lot but the impl is ancient and I dont work on it |
07:26:04 | Araq | I 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:20 | Araq | cheatfate: IMO repr should move into its own module and use macros.getType() rather than the old RTTI based stuff |
09:18:41 | vegansk | Is there a function in stdlib that can parse uint64 from string |
09:18:48 | vegansk | ? |
09:19:17 | cheatfate | Araq, 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:55 | cheatfate | vegansk, https://gist.github.com/cheatfate/44f6412fe58ac2cc2fdfd1a128194ae5 |
09:21:18 | cheatfate | vegansk, sorry i dont understand you properly |
09:21:34 | cheatfate | you need to make it from string |
09:22:33 | Araq | cheatfate: no it's in system.nim so it cannot use tables.nim etc |
09:22:44 | Araq | which would be nice for the cycle checking that it needs to do |
09:23:04 | Araq | vegansk: parseutils.nim? dunno. |
09:23:08 | cheatfate | i think there no such function only intToStr but it support only int64 i think |
09:24:27 | vegansk | It's time for new PR :-) |
09:26:15 | cheatfate | Araq, tables.nim is ok because repr has special proc for handling sequences |
09:26:51 | * | gokr1 quit (Quit: Leaving.) |
09:27:03 | cheatfate | vegansk, for some reason Araq dont like unsigned types :) so there not so many support for it |
09:30:54 | Araq | cheatfate: not my point, but whatever. give us a repr.nim module. |
09:32:21 | * | Arrrr joined #nim |
09:32:22 | vegansk | cheatfate, I agree with it when it applies to high level only language like Java, but not to Nim |
09:32:45 | cheatfate | Araq, sorry but `macro magic` is not my forte |
09:33:50 | Araq | vegansk: lots of systems programming is done in Java, like it or not. |
09:34:07 | Araq | "high level only" is rather meaningless. |
09:37:14 | cheatfate | Araq, you know kernels programmed in Java? |
09:37:47 | cheatfate | Araq, or maybe debuggers programmed in Java? |
09:39:26 | vegansk | Araq, 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:19 | vegansk | Araq, so, do you mind if I add parseBiggestUInt to parseutils/strutils? |
09:40:35 | Araq | vegansk: not at all, go ahead. |
09:40:38 | vegansk | Ok! |
09:40:39 | * | Trustable joined #nim |
09:40:40 | Araq | cheatfate: https://en.wikipedia.org/wiki/JavaOS |
09:42:31 | vegansk | Araq, there is no BiggestUInt in system.nim. Should I use uint64, or create this type alias? |
09:43:13 | Araq | just use uint64 |
09:43:17 | vegansk | Ok |
09:43:27 | Araq | there also was a Python based OS project called unununium |
09:47:21 | cheatfate | Araq, 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:19 | cheatfate | Araq, 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:49 | cheatfate | I think its possible to make Java OS only on specific processor/platform which have java core inside |
09:50:32 | Araq | ha ha touché |
09:52:14 | cheatfate | When 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:56 | vegansk | Araq, whats the need for ``extern: "npuParseBiggestInt"`` pragma in parseutils.nim? |
09:53:48 | Araq | vegansk: nimrtl.dll support. |
09:53:48 | * | krux02 joined #nim |
09:54:54 | vegansk | Thanks! |
09:55:00 | cheatfate | vegansk, i think you trying to move very big and heavy stone :) |
09:59:51 | cheatfate | in future i will try to kick out `msvcrt.dll` dependancy from nim executable |
10:00:00 | vegansk | cheatfate, 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:41 | krux02 | vegansk: don't you like the awesome java class loading mechanism and the heavy optimized boot time? |
10:03:10 | cheatfate | vegansk, heavy and big stone is the "uint" in nim :) |
10:06:14 | vegansk | krux02, I'm a little tired of this *perfect* things :-) |
10:07:48 | krux02 | I thought Rust would be cool, and it sounds cool, but practically I don't like it |
10:09:04 | krux02 | I 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:50 | krux02 | but 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:13 | krux02 | but it's worth watching, since he is a very smart guy with a lot of experience |
10:11:15 | vegansk | Rust is like the new C++ with templates magic. Go is lack of the generics and too verbose. Nim is the variant :-) |
10:13:34 | federico3 | krux02: Jai? |
10:18:15 | * | rok quit (Quit: rok) |
10:20:22 | * | gokr joined #nim |
10:24:50 | cheatfate | Araq, i think compiler is broken with "--threads:on" |
10:27:20 | cheatfate | Araq, this is callstack https://gist.github.com/cheatfate/0047b940e5658b98e071e46a906dd604 |
10:27:29 | cheatfate | from msvc debugger |
10:27:45 | Araq | fix it, I know |
10:28:34 | * | desophos joined #nim |
10:28:47 | Araq | Jai is cool but I am still shocked that he re-invented thread local storage without noticing ;-) |
10:29:16 | cheatfate | Araq, you fixing or you already fixed and i'm using old compiler? |
10:30:29 | Araq | *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:30 | vegansk | Araq, 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:51 | Araq | it cannot work, hence they were missing. |
10:48:14 | Araq | want to update every place in the compiler where n.intVal is used? me neither. |
10:49:23 | vegansk | got it |
10:50:14 | Araq | you could add a uintVal: uint64 field to PNode |
10:50:36 | Araq | and then update 80_000 lines of compiler source to handle it everywhere properly. |
10:50:52 | Araq | and then you also add it to macros.nim and make every macro out there handle it. |
10:51:16 | Araq | it never stops causing work. |
10:51:25 | Araq | there are real costs to C's type zoo. |
10:52:11 | Araq | so 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:01 | Araq | and for what? so that you can continue to confuse Natural with unsigned arithmetic? |
10:56:31 | cheatfate | Araq, GC -> [sharedlist] -> [locks], in PreMain GC initialized first before locks initialized with system functions... |
10:57:13 | cheatfate | Araq, 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:37 | cheatfate | and also i have found csprintf() in nimGetProcAddr() which can cause stack overflow |
11:06:22 | Araq | hu? how so? |
11:07:12 | Araq | and why must locks be initialized? |
11:08:02 | cheatfate | Araq, but how locks can get their proper system values InitalizeCriticalSection and others? |
11:08:22 | Araq | it's inialized as part of the Gc initialization? |
11:09:09 | cheatfate | nope its initialization called after GC initialization |
11:10:41 | cheatfate | this is how PreMain looks like https://gist.github.com/cheatfate/ec0edfe7e37e95b34fd8e5a6463483c2 |
11:11:08 | Araq | why does it matter? |
11:11:17 | Araq | shouldn't stdlib_locksDatInit000 be empty? |
11:12:34 | cheatfate | Araq, https://gist.github.com/cheatfate/6c45f47465347d61968d7f6bd00c1905 |
11:12:50 | Araq | the sprintf call needs to be eliminated, we need inline code for that then. *sigh* |
11:14:01 | Araq | cheatfate: ah. well, use header: "windows.h" rather than .dynlib for these procs then? |
11:15:03 | cheatfate | Araq, ok i can try |
11:16:56 | cheatfate | Araq, but there can be a problem because of defined SysLock structure |
11:17:14 | cheatfate | CRITICAL_SECTION structure is undocumented in windows api |
11:17:30 | cheatfate | is there can be type casting problems? |
11:22:36 | cheatfate | ahh ok its now documented in winnt.h i'l try |
11:31:30 | * | anoisz joined #nim |
11:38:30 | cheatfate | Araq, with vcc - ok, but with gcc i have received this https://gist.github.com/cheatfate/21ca75137ada4b45091d9ee4aef90f7a |
11:39:50 | cheatfate | Araq, 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:47 | cheatfate | and i really dont understand why sharedlist in stdlib_math.c... |
11:51:13 | Araq | ha, me neither |
11:51:28 | Araq | well it could be an .inline proc from the GC |
11:55:14 | * | vegansk is now known as veganskaway |
11:57:53 | cheatfate | Araq, math is used by sharedtables |
11:58:31 | * | kulelu88 quit (Quit: Leaving) |
11:58:31 | cheatfate | Araq, gc dont using math and sharedlist not using math... |
11:58:51 | Araq | that's weird |
12:02:42 | cheatfate | Araq, 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:42 | cheatfate | i'm in deadlock |
12:05:52 | cheatfate | Araq, do you really need sharedlist here? if you just iterating over it? |
12:06:08 | Araq | I really need it, yes. |
12:06:38 | Araq | the GC used to lack this crucial feature. |
12:07:52 | Araq | get a mingw that has a windows.h with CRITICAL_SECTION ? |
12:09:21 | cheatfate | Araq, problem not in windows.h problem is that all files with error dont have "#include <windows.h>" |
12:09:29 | cheatfate | for some reason |
12:10:09 | Araq | ah, where does CRITICAL_SECTION come from? |
12:10:36 | krux02 | federico3: yes |
12:14:03 | cheatfate | Araq, from here https://gist.github.com/cheatfate/2fef1cdf9c7f8c875ba8ef78d3ef8d22 |
12:14:13 | cheatfate | Araq, system/syslocks.nim |
12:17:10 | * | Sembei joined #nim |
12:20:07 | fredrik92 | Just 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:14 | cheatfate | Araq, 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:49 | Araq | fredrik92: right. |
12:47:17 | Araq | cheatfate: 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:31 | krux02 | it 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:57 | cheatfate | Araq, you can watch diff of the generated code for simple file etcpriv.nim |
13:13:58 | cheatfate | https://gist.github.com/cheatfate/f866e008ce292c4372aa2283f5469523/revisions |
13:17:27 | * | gokr1 quit (Ping timeout: 260 seconds) |
13:17:49 | Araq | cheatfate: so it's the difference in the thread local storage implementations |
13:18:04 | Araq | with 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:00 | cheatfate | Araq, then I give up, do you need something more from me? |
13:25:19 | Araq | cheatfate: fix the compiler, file ccgtypes.nim, line 285 |
13:25:35 | Araq | add something like |
13:26:09 | Araq | if t.sym != nil: useHeader(m, t.sym) |
13:26:12 | Araq | before |
13:26:16 | Araq | result = getTypePre(m, t) |
13:26:37 | Araq | see proc getTypeDescAux for an example |
13:35:31 | cheatfate | Araq, add [var t = getUniqueType(typ)]? |
13:35:33 | cheatfate | too? |
13:35:54 | Araq | dunno. better not. |
13:36:13 | Araq | don't mess with the unique type logic if you can avoid it, it's complex. |
13:36:23 | veganskaway | Araq, 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:11 | Araq | why do you need high(uint64) anyway. |
13:38:28 | Araq | every value is <= than that value by definition. |
13:40:45 | vegansk | I 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:45 | Araq | you only need it because you use highUInt rather than intmaxCheck() where you could return 'true' for 64 bit uints |
13:44:47 | Araq | bbs |
13:44:56 | cheatfate | Araq, 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:57 | vegansk | What 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:53 | Arrrr | have 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:51 | Araq | veganskaway: 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:57 | Arrrr | Does nim have any proc for string -> arra[char] ? |
16:12:01 | Arrrr | *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:59 | flyx | Arrrr: 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:07 | flyx | what would you need the array for? |
16:21:39 | Arrrr | But there could be a proc fillArray[T](a: var array[T, char], s: string) |
16:21:48 | Arrrr | networking |
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:12 | bbl | proc sp_link_type*(link: ptr sp_link): sp_linktype # damn libspotify and your naming |
19:51:37 | bbl | I 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:29 | cheatfate | Araq, 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:36 | gokr | Hey guys |
21:08:47 | * | desophos joined #nim |
21:09:49 | Araq | cheatfate: hey |
21:11:23 | cheatfate | Araq, i just want to remember you about --threads:on windows gcc showstopper :) |
21:11:48 | Araq | hu? I told you how to fix it :P |
21:12:00 | cheatfate | Araq, i told you that fix not working :) |
21:12:02 | Araq | so prepare your PR and let me do the rest |
21:13:05 | cheatfate | Also i want to replace csrpintf in dyncalls.nim but i dont know what i can use "&" and "$"? or only some c functions? |
21:13:25 | Araq | no, neither $ nor C functions. |
21:13:38 | Araq | you need to do it all on your own, writing to the char array buffer. |
21:13:46 | Araq | it's a challenge ;-) |
21:15:12 | cheatfate | its 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:55 | cheatfate | and why you need this decoration staff? |
21:16:18 | Araq | I don't need it, others do. |
21:16:41 | cheatfate | they so lazy? |
21:16:42 | cheatfate | :) |
21:18:29 | * | desophos quit (Remote host closed the connection) |
21:19:31 | cheatfate | jyelon - author of this autodecoration made this only PR |
21:19:47 | cheatfate | so i dont think others wants this :) |
21:19:54 | * | Jesin quit (Quit: Leaving) |
21:20:17 | Araq | there 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:19 | cheatfate | ok its not a problem any way i can patch it, but i still need your help with compiler :) |
21:23:45 | Araq | want me to debug it or do you want to learn more about the compiler? |
21:24:25 | * | Jesin joined #nim |
21:25:55 | cheatfate | Araq, 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:51 | Araq | cheatfate: PR ready? |
21:37:11 | cheatfate | Araq, what PR? with CRITICAL_SECTION |
21:37:12 | cheatfate | ? |
21:38:35 | Araq | yes |
21:39:12 | * | desophos joined #nim |
21:39:30 | cheatfate | wait 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:25 | cheatfate | Araq, https://github.com/nim-lang/Nim/pull/4017 |
21:50:47 | Araq | some test program with --threads:on is enough to trigger the bug? |
21:54:51 | cheatfate | Araq, https://gist.github.com/cheatfate/7827f22db446e0284d5316e95abfbc91 |
21:56:30 | * | desophos quit (Remote host closed the connection) |
21:56:33 | PMunch | Hmm, what are the performance characteristics of a seq? |
21:57:49 | cheatfate | PMunch, nobody test it, i think it slow but def- assures me that it fast enough |
21:58:13 | PMunch | Fast enough.. |
21:58:42 | * | enthus1ast quit (Ping timeout: 244 seconds) |
21:59:20 | cheatfate | PMunch, i dont like seqs... but strings are based on seqs, so seqs is like core feature... |
21:59:24 | * | enthus1ast joined #nim |
21:59:38 | PMunch | You don't like them? |
21:59:51 | PMunch | What do you use instead |
22:00:38 | cheatfate | if i need iterations only i use lists |
22:01:01 | cheatfate | if i need indexing only i'm using arrays |
22:02:52 | * | desophos joined #nim |
22:04:39 | Araq | lists are slow. |
22:04:49 | Araq | and suck. |
22:07:57 | * | desophos quit (Read error: Connection reset by peer) |
22:08:22 | * | desophos joined #nim |
22:10:51 | cheatfate | Araq, it depends... |
22:11:16 | cheatfate | Araq, but seqs are slow too |
22:14:36 | Araq | yeah I can imagine they are slow for your coding FP coding style |
22:16:03 | Araq | but that's not a coding style that is used for anything performance critical ;-) |
22:19:01 | PMunch | Okay, just did some simple testing |
22:21:05 | PMunch | Running 100 rounds |
22:21:16 | PMunch | Each round adding 10_000 elements to the sequence |
22:21:57 | PMunch | Then running 100 indexations of random positions (random calculated outside timing, obviously). |
22:23:05 | Araq | random access is not why you use seqs though. and you cannot compare it to lists then. |
22:23:17 | * | darkf joined #nim |
22:23:29 | Araq | you use seqs because of their memory packing nature |
22:23:48 | PMunch | Well, it is what I was going to use it for. Random access on a variable length list |
22:24:10 | Araq | ok, but then you cannot use lists anyway. |
22:24:52 | PMunch | They both increase linearly, but not to anything too crazy |
22:28:23 | Araq | cheatfate: it's because SysLock is aliased in locks.nim |
22:29:46 | cheatfate | Araq, you mean Lock* = SysLock? |
22:30:04 | Araq | exactly |
22:30:13 | PMunch | Araq, 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:33 | Araq | they are done with reallocs yes. |
22:30:47 | PMunch | Ah okay |
22:30:49 | Araq | I wonder why people keep wondering about that. |
22:31:05 | Araq | Python, C++, Lua, ... they all use growable arrays |
22:31:15 | Araq | nobody uses lists under the hood. |
22:31:32 | PMunch | Well, Clojure does |
22:31:38 | PMunch | Or actually a trie of some sort |
22:31:45 | PMunch | But that's because it's functional |
22:32:23 | Araq | ah yeah, it's caused by the Clojure hype. |
22:32:58 | Araq | but that's done for immutability. |
22:33:05 | Araq | in Nim seqs are not immutable. |
22:33:16 | PMunch | Clojure has recent hype? Or was that a joke :P |
22:33:32 | PMunch | They could still be doing something strange under the hood for whatever reason |
22:33:54 | Araq | I don't think it has "recent" hype. it surely had its amount of hype. |
22:34:12 | PMunch | Understandable, it's a great language |
22:34:48 | PMunch | But it's got some flaws, the most pressing IMHO being that it runs in the JVM.. |
22:37:14 | Araq | I still don't like dynamic typing. |
22:37:50 | Araq | when I write code in a dynamic language my poor brain constantly needs to do the type checker's job. all the time. |
22:37:58 | PMunch | That's true |
22:38:07 | Araq | human compiler at work. |
22:38:10 | Araq | hate it. |
22:38:14 | PMunch | But it has it's benefits |
22:38:31 | krux02 | how do I debug nim code properly? |
22:38:34 | PMunch | And it works in a functional language |
22:38:59 | Araq | no it doesn't. FP is orthogonal. |
22:39:08 | krux02 | I 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:19 | Araq | got some data structure? does it change from 2 dimensions to 3? |
22:39:36 | * | Trustable quit (Remote host closed the connection) |
22:39:44 | Araq | do you have to update the code to deal with this change? |
22:39:58 | Araq | yes. and yes. |
22:40:16 | PMunch | Yea, in those cases it's a pain |
22:40:22 | Araq | here you go. with static type checking you get all the nested iterations right. |
22:40:26 | PMunch | Especially with seldom visited branches of your go |
22:40:31 | Araq | with dynamic typing you don't. |
22:40:42 | PMunch | s/go/code |
22:41:05 | Araq | krux02: use visual studio plugin? |
22:41:23 | krux02 | Araq: how do I do that on arch linux? |
22:42:05 | Araq | pfff, you cannot tell me you care about your productivity on arch |
22:42:09 | * | Araq ducks |
22:42:41 | PMunch | Haha |
22:43:04 | Araq | seriously though any GDB frontend will do |
22:43:12 | Araq | use --debugger:native |
22:43:27 | PMunch | krux02, https://gist.github.com/flaviut/487be89b8abfae2612e8 |
22:43:46 | krux02 | actually 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:00 | krux02 | the 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:40 | Araq | the only problem is that the debuggers mostly support C++ syntax |
22:46:20 | Araq | but nim's name mangline is crippled to the point that it produces bugs |
22:46:42 | Araq | so that debugging becomes managable |
22:47:48 | Araq | not sure I like it though, I'd rather have bullet proof name mangling, no bugs and slightly more inconvinient debugging |
22:48:00 | Araq | and no, I cannot write 'convenient' |
22:48:16 | krux02 | I don't understand how name magline crippling produces bugs that make debugging managable |
22:48:38 | Araq | proc main = |
22:48:56 | Araq | var sin = 34 # oops, 'sin' is not mangled and a C #define |
22:49:20 | Araq | # yay, a code generation bug. |
22:49:32 | Araq | # C's preprocessor is so awesome. |
22:50:32 | krux02 | ok, but wouldn't it be possible, to generate code that doesn't require any preprocessor of c anymore? |
22:50:48 | Araq | C -- the ultimate hippie language where the 70ies never ended. |
22:51:37 | Araq | krux02: .header pragma? |
22:51:42 | Araq | .emit ? |
22:51:55 | Araq | in theory you can do it. |
22:52:11 | Araq | in practice there is not a single Nim project out there where that would be feasible. |
22:52:55 | cheatfate | Araq, https://gist.github.com/cheatfate/c35cb0310e5989286d0410301258faea |
22:53:53 | cheatfate | this is replacement for csprintf() |
22:54:10 | Araq | no ascii based counting? no loop invariant code motion? |
22:57:00 | cheatfate | Araq, i dont understand you |
22:57:32 | Araq | it's great, but you can move the '_' & name operation out of the for loop |
22:58:07 | cheatfate | yep you are right |
22:58:26 | Araq | the ascii based counting was a joke. |
22:58:44 | krux02 | ok, 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:00 | Araq | 0,4,8,12,16,20,24,28,32 # hmm |
23:00:00 | Araq | krux02: that's the point though. the Nim compiler doesn't have enough information when you use the .header pragma |
23:04:06 | cheatfate | Araq, you dont like numbers? |
23:04:54 | Araq | I respect the inc ascii, 4; on overflow do weird stuff; logic |
23:05:07 | Araq | that I'm thinking about. |
23:05:08 | krux02 | ok, now I read about the header pragma (I was searching for a C pragma before) and now I understand it better, |
23:07:11 | krux02 | but 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:59 | Araq | --debugger:native is a single command line option that you need to learn. |
23:08:15 | Araq | then you load the produced binary into your debugger. |
23:08:22 | Araq | like you would with C++ code. |
23:08:39 | Araq | I don't know what else you're after. |
23:09:27 | krux02 | I 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:49 | ldlework | You should totally learn emacs though, its great. |
23:09:59 | ldlework | I can even help you with the basics if you'd like. |
23:10:23 | krux02 | ldlework: that would be really nice |
23:10:31 | krux02 | I am still setting up everything. |
23:10:48 | ldlework | krux02: The first advice I can give you is to move your control key to the left of your spacebar |
23:11:01 | ldlework | So you have the main modifier on the left, and the meta modifier on the right. |
23:11:27 | krux02 | in general, or just for emacs? |
23:11:46 | ldlework | Well, I do it generally. Its generally useful to have both modifiers available centrally with the thumbs. |
23:11:52 | ldlework | But for emacs, its how it was designed. |
23:12:15 | ldlework | The old spacemacs keyboards on lisp machines had modifiers ordered centrally, rather than the inverse that we have today. |
23:12:34 | krux02 | yes that would prevent the emacs pinkey |
23:12:46 | ldlework | [hyper][super][meta][control][ space ][control][meta][super][hyper] |
23:13:02 | ldlework | I make one improvement in that, I change it to |
23:13:12 | ldlework | well |
23:13:17 | ldlework | on a modern keyboard its more like |
23:13:44 | krux02 | http://www.ifis.uni-luebeck.de/~moeller/symbolics-info/symbolics-images/keyboard.JPG |
23:13:47 | ldlework | [alt][fn][win][control][ space ][alt][control] |
23:14:02 | cheatfate | Araq, there is a problem with old code and my modification length of imported function name can be more than 250 |
23:14:03 | krux02 | doesn't look like it, but they had playstation keys :P |
23:14:16 | ldlework | hehe, yup just like that |
23:14:32 | ldlework | But I recommend having control on the left, and alt/mod on the right. |
23:16:44 | cheatfate | Araq, but my code could not cause stack overflow |
23:17:12 | krux02 | the problem is, I really do not like to rebind my system keys |
23:17:29 | Araq | your code is beautiful and we don't import function names longer than 250 chars |
23:17:32 | krux02 | feels like yet another thing I have to think about |
23:17:40 | krux02 | so can I rebind it emacs locals |
23:17:43 | krux02 | local? |
23:18:58 | ldlework | krux02: I don't know that seems silly. |
23:19:20 | krux02 | just 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:47 | ldlework | Half the battle is turning "consciously invoking commands" to "unconsciouslly treating commands like any other automatic input operation" |
23:21:22 | krux02 | I recently installed nim-mode, but I do not feel any difference |
23:21:30 | krux02 | can you help me a bit in using it |
23:22:11 | ldlework | krux02: I can't actually vouch for nim-mode |
23:22:20 | ldlework | haven't been writing a whole lot of nim lately |
23:22:38 | ldlework | but I imagine it you don't notice a lot of difference because emacs's default indentation is pretty smart |
23:22:52 | ldlework | nim-mode is likely adding correct indentation and syntax highlighting |
23:23:00 | ldlework | it might not do anything more fancy |
23:23:56 | krux02 | what I really want is auto completion, compile on a button, and jump to declaration |
23:24:39 | Araq | emacs with nimsuggest integration can indeed do that, though I've never tried it myself. |
23:25:04 | krux02 | I 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:30 | krux02 | so how do I trigger autocompletion? |
23:25:48 | krux02 | YCM did it all the time automatically |
23:28:00 | Araq | ask reactormonk |
23:31:15 | * | fredrik92 joined #nim |
23:32:07 | cheatfate | Araq, 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:36 | Araq | cheatfate: 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:30 | krux02 | Araq: Are you using Visual Studio for all nim development? |
23:41:46 | Araq | no, I use NimEdit. |
23:44:21 | krux02 | ok, I did not see that coming. |
23:44:40 | PMunch | Hmm, 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:08 | Araq | PMunch: your stuff is not passed by 'var T' most likely |
23:45:16 | krux02 | Ok I did not see that coming. |
23:45:16 | cheatfate | Araq, is it bad screenshots or font rendering is so weird? |
23:45:47 | Araq | font rendering is indeed the no 1 issue that keps me from developing it further |
23:46:15 | krux02 | very interesting to me is, that it needs sdl |
23:46:21 | Araq | I'm waiting for yuriy's shiney new font rendering engine |
23:47:53 | Araq | another problem is that's not open source and building binaries for 3 OSes is too painful to do it frequently |
23:49:04 | krux02 | first of all, why not open source? Second why not include a nice pixel font? |
23:49:15 | krux02 | like terminus |
23:49:54 | Araq | I wanted to take little money for it, that's why. |
23:49:59 | krux02 | a nice monospace pixelfont, and fontrendering is just blitting textures |
23:50:44 | Araq | why not a nice pixel font? because I don't think there are many out there who support enough of Unicode. |
23:50:54 | Araq | but frankly, it's a good point. |
23:51:25 | Araq | I didn't really consider it. |
23:51:41 | Araq | can these by now support different font sizes? |
23:52:33 | krux02 | yes, but limited |
23:52:46 | krux02 | just only the scales that are supported by the font |
23:52:54 | krux02 | like I said, I like terminus |
23:54:19 | PMunch | Araq, 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:40 | Araq | PMunch: told you. |
23:56:57 | Araq | you need to use 'list: var NumList' to be able to modify it. |
23:57:06 | Araq | and yeah I know the error message sucks. |
23:58:54 | PMunch | Aaah |
23:59:08 | PMunch | Had this issue before actually |
23:59:18 | PMunch | But yea, error messages in Nim are not the greatest |