00:00:34 | * | dddddd quit (Ping timeout: 255 seconds) |
00:01:45 | * | fowl joined #nim |
00:03:47 | * | fowl quit (Excess Flood) |
00:04:45 | * | fowl joined #nim |
00:09:14 | * | ^aurora^ quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
00:10:11 | Araq | apense: but there was no new release since then |
00:12:53 | * | BitPuffin|osx joined #nim |
00:21:37 | * | nande joined #nim |
00:26:34 | apense | Varriount, wait is 2015-05-04 April 5 or May 4? |
00:27:13 | apense | sorry that was to Araq |
00:27:33 | Araq | Ma 4 |
00:28:35 | Araq | year-month-day |
00:30:15 | apense | ah thanks. that gets me sometimes. I understand now |
00:43:36 | * | brson quit (Quit: leaving) |
00:47:40 | * | jaco60 quit (Ping timeout: 256 seconds) |
00:51:04 | wan | apense: https://xkcd.com/1179/ |
00:58:09 | apense | wan, haha thanks. I'll definitely remember it now |
01:24:46 | * | yglukhov joined #nim |
01:26:50 | * | fowl quit (Excess Flood) |
01:27:45 | * | fowl joined #nim |
01:29:08 | * | yglukhov quit (Ping timeout: 246 seconds) |
01:46:23 | * | gyeates quit (Ping timeout: 248 seconds) |
02:15:18 | * | BitPuffin|osx quit (Ping timeout: 246 seconds) |
02:18:08 | * | darkf joined #nim |
02:33:07 | * | JinShil joined #nim |
02:41:54 | * | vendethiel joined #nim |
02:58:12 | * | vikaton quit (Quit: Connection closed for inactivity) |
03:20:11 | * | doxavore quit (Quit: I said good day, sir.) |
03:33:52 | * | vendethiel quit (Ping timeout: 255 seconds) |
04:14:38 | * | vendethiel joined #nim |
04:29:35 | * | Demon_Fox_ quit (Ping timeout: 248 seconds) |
04:34:32 | * | Demon_Fox_ joined #nim |
04:38:20 | * | JinShil quit (Quit: Konversation terminated!) |
04:57:40 | * | Sembei joined #nim |
04:59:13 | * | vendethiel quit (Ping timeout: 264 seconds) |
04:59:22 | * | Pisuke quit (Ping timeout: 255 seconds) |
05:00:43 | * | gyeates joined #nim |
05:11:34 | * | vendethiel joined #nim |
05:23:49 | avsej | is it possible to delete all items from table? |
05:33:00 | fowl | Interesting question |
05:33:23 | * | gyeates quit (Ping timeout: 252 seconds) |
05:33:53 | fowl | May be just as good to initialize a new one |
05:34:33 | * | vendethiel quit (Ping timeout: 256 seconds) |
05:44:59 | * | vendethiel joined #nim |
05:55:26 | * | strcmp1 quit (Quit: Leaving) |
06:13:43 | avsej | this is what i did. |
06:14:00 | avsej | another question: why repr of object returns "[]"? |
06:14:19 | reactormonk | avsej, which object? |
06:14:28 | reactormonk | wu-lee, any developments? |
06:15:55 | avsej | reactormonk, https://gist.github.com/avsej/4043a17bef3ee8f1bc79 |
06:16:12 | reactormonk | strange |
06:16:26 | avsej | I'm on development branch |
06:16:52 | avsej | initially I though I have to implement repr() for the type, but then I found that nobody does it |
06:32:19 | * | vendethiel quit (Ping timeout: 276 seconds) |
06:40:44 | * | themagician quit (Ping timeout: 272 seconds) |
06:45:59 | * | themagician joined #nim |
06:46:09 | * | Ven joined #nim |
06:49:12 | * | jubalh joined #nim |
07:00:56 | * | yglukhov joined #nim |
07:02:07 | * | jszymanski joined #nim |
07:03:53 | * | JinShil joined #nim |
07:09:35 | * | vendethiel joined #nim |
07:28:46 | * | Trustable joined #nim |
07:33:03 | * | vendethiel quit (Ping timeout: 248 seconds) |
07:34:01 | * | Ven quit (Ping timeout: 250 seconds) |
07:43:11 | * | Ven joined #nim |
07:51:14 | * | nande quit (Remote host closed the connection) |
07:53:52 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:55:44 | * | vendethiel joined #nim |
08:05:48 | * | coffeepot- joined #nim |
08:14:04 | r-ku | where did zip wrapper go? |
08:20:42 | * | Ven joined #nim |
08:22:40 | * | jubalh quit (Quit: Leaving) |
08:30:46 | * | zahary1 joined #nim |
08:33:25 | * | zahary quit (Ping timeout: 264 seconds) |
08:35:52 | * | jubalh joined #nim |
08:39:45 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:50:02 | wu-lee | reactormonk: not much, I have a .nim compilation which half works |
08:50:17 | wu-lee | it turn the LED on, doesn't flash |
08:50:56 | wu-lee | nim.cfg includes link="/usr/lib/avr/lib/avr5/crtm168.o" |
08:51:37 | wu-lee | oddly, if I compile/link the C source direclty, instead of using the nim linked binary, it works |
08:51:51 | wu-lee | LED flashes. no modifications to source required. |
08:55:38 | wu-lee | attempting to discover what else needs to be linked. |
09:01:23 | * | vendethiel quit (Ping timeout: 256 seconds) |
09:09:24 | * | JinShil quit (Quit: Konversation terminated!) |
09:10:00 | * | Demon_Fox_ quit (Quit: Leaving) |
09:10:01 | * | vendethiel joined #nim |
09:13:26 | wu-lee | (using the files listed by ld --verbose seems to be insuffucient) |
09:29:07 | * | jubalh quit (Quit: Leaving) |
09:29:25 | * | jubalh joined #nim |
09:47:01 | Araq | avsej: we need a 'clear' op for these things. it can make a huge diffference for performance |
09:53:01 | avsej | yes, iterating + del() does not seem like very good solution either |
09:57:57 | Varriount | Araq: Isn't there a 'reset'? |
09:58:31 | Araq | Varriount: that doesn't do the same. maybe it could. |
09:59:09 | Araq | but ... that sets the seq to 'nil' defeating the purpose |
10:17:31 | * | dddddd joined #nim |
10:19:04 | * | husanu2 joined #nim |
10:19:23 | * | bjz joined #nim |
10:25:43 | * | husanu2 quit (Remote host closed the connection) |
10:26:15 | * | husanu2 joined #nim |
10:28:44 | * | husanu2 quit (Remote host closed the connection) |
10:30:05 | * | husanu1 joined #nim |
10:31:16 | * | husanu1 quit (Remote host closed the connection) |
10:45:32 | * | jaco60 joined #nim |
10:47:00 | * | Demon_Fox joined #nim |
11:02:19 | * | raza joined #nim |
11:20:16 | Araq | if somebody is looking for a challenge: https://github.com/nim-lang/Nim/issues/2672 |
11:20:31 | Araq | Linux specific bug. No idea what really causes this. |
11:21:05 | Araq | according to Valgrind "somewhere in libc it's attempted to free thread local storage twice" or something like that |
11:22:11 | Araq | my guess is that dlopen and TLS don't like each other but since Google is silent about this it might be something entirely different |
11:34:25 | * | aziz_ joined #nim |
11:46:17 | * | ozra_ joined #nim |
11:52:33 | * | aziz_ quit (Quit: Leaving) |
11:52:50 | * | aziz_ joined #nim |
11:58:16 | * | Ven joined #nim |
12:13:55 | * | boopsiesisaway is now known as boopsies |
12:21:56 | * | saml_ joined #nim |
12:50:56 | * | husanu1 joined #nim |
12:52:20 | * | husanu1 quit (Remote host closed the connection) |
12:56:56 | * | husanu3 joined #nim |
12:56:59 | * | aziz_ is now known as aziz |
13:00:53 | * | husanu3 quit (Remote host closed the connection) |
13:00:56 | * | yglukhov_ joined #nim |
13:01:00 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:01:49 | * | yglukhov__ joined #nim |
13:01:49 | * | yglukhov_ quit (Read error: Connection reset by peer) |
13:04:37 | * | yglukhov quit (Ping timeout: 264 seconds) |
13:13:03 | * | husanux7 joined #nim |
13:13:24 | * | husanux7 quit (Remote host closed the connection) |
13:14:49 | * | saml_ quit (Ping timeout: 255 seconds) |
13:14:58 | * | husanux3 joined #nim |
13:18:44 | * | husanux3 quit (Remote host closed the connection) |
13:20:14 | * | husanux9 joined #nim |
13:21:23 | * | husanux9 quit (Remote host closed the connection) |
13:23:19 | * | Ven joined #nim |
13:25:26 | * | husanux1 joined #nim |
13:29:28 | * | husanux1 quit (Remote host closed the connection) |
13:29:41 | * | FedeOmoto joined #nim |
13:37:14 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:46:24 | * | Ven joined #nim |
13:49:13 | * | ozra_ quit (Ping timeout: 246 seconds) |
13:56:07 | * | Arrrr joined #nim |
13:57:17 | * | coffeepot- quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
14:00:18 | * | coffeepot joined #nim |
14:01:18 | avsej | Araq, how nim stores symbols? For example I have 'var foo = 1', but in debugger there is "foo_XXXXX", where XXXXX is some number. Are these names static or they allocated on the heap? |
14:17:31 | * | gyeates joined #nim |
14:30:56 | * | sepisoad joined #nim |
14:36:25 | sepisoad | hi, i'm trying to conver a c header file to nim using c2nim, but it would stop at this line: |
14:36:31 | sepisoad | gui_command#define gui_command(t, c) ((const struct gui_command_##t*)c) |
14:36:46 | sepisoad | Error: ')' expected |
14:37:36 | sepisoad | isn't c2nim supposed to expand on `##`? |
14:39:56 | Araq | sepisoad: #define is not #def |
14:40:24 | Araq | avsej: it's an ID that's generated by incrementing a global counter. it's part of the PSym object |
14:40:33 | Araq | it's not stored separately "on the heap" |
14:42:31 | avsej | I see |
14:44:04 | * | jubalh quit (Quit: Leaving) |
14:44:12 | Araq | avsej: eventually I'll replace it with some stable hash value |
14:44:23 | * | jubalh joined #nim |
14:44:31 | Araq | so that C code caching works much better |
14:46:55 | * | Matthias247 joined #nim |
14:48:22 | sepisoad | Araq, OK, and what about this error i get: |
14:48:27 | sepisoad | did not expect [NewLine] |
14:48:43 | sepisoad | enum gui_layout_slot_index { |
14:48:43 | sepisoad | GUI_SLOT_TOP, |
14:48:43 | sepisoad | GUI_SLOT_BOTTOM, |
14:48:43 | sepisoad | GUI_SLOT_LEFT, |
14:48:43 | sepisoad | GUI_SLOT_CENTER, |
14:48:43 | sepisoad | GUI_SLOT_RIGHT, |
14:48:45 | sepisoad | GUI_SLOT_MAX |
14:48:47 | sepisoad | }; |
14:49:03 | sepisoad | what does it mean, the enum look fine! |
14:50:48 | Araq | works for me |
14:51:26 | sepisoad | Araq, when i copy the code fragment and paste it in a new file, it works fe mee too |
14:51:57 | sepisoad | but calling c2nim on the original file ends up giving this error |
14:52:31 | sepisoad | the header is fine, cuz i got it compiled using VC++ |
14:52:55 | Araq | well imagine for a second that you're Araq. How would you help yourself if you were me with this amount of information? |
14:53:10 | sepisoad | dunno ;) |
14:53:37 | sepisoad | maybe i give you the link, actually it's just a header and source file |
14:53:43 | Araq | "cuz i got compiled using VC++" suggest to me that you haven't even read c2nim's short manual |
14:53:44 | sepisoad | not a big project |
14:54:14 | Araq | c2nim doesn't parse C. it cannot. Parsing C requires a symbol table and lots of mumbo jumbo. |
14:54:53 | Araq | c2nim parses a strange dialect of C that happens to work well enough once got used to it. |
14:55:09 | sepisoad | ok |
14:55:32 | Araq | and I'm using it to parse wxWidgets c++ headers btw, so it's not *that* bad |
14:56:07 | Araq | so .. gimme a link |
14:57:13 | sepisoad | sorry |
14:57:19 | sepisoad | just a second |
14:57:35 | sepisoad | Araq, https://github.com/vurtun/gui |
14:58:53 | * | raza left #nim (#nim) |
15:03:42 | sepisoad | Araq, thanks, i got it working |
15:03:48 | Araq | sepisoad: me too :P |
15:03:59 | Araq | #define gui_foreach_panel(i, s) for (i = (s)->begin; i != NULL; i = (i)->next) |
15:04:14 | Araq | <-- c2nim wants to convert it to a template and fails |
15:04:21 | Araq | so making it a #def instead works |
15:04:57 | sepisoad | ya, did so |
15:05:15 | sepisoad | thanks alot |
15:06:36 | Araq | pass --nep1 to c2nim and --cdecl btw |
15:06:46 | Araq | and perhaps a couple of other things |
15:06:55 | * | jubalh quit (Quit: Leaving) |
15:07:11 | * | jubalh joined #nim |
15:07:40 | Araq | or just translate the C code into Nim |
15:08:12 | Araq | the header file is almost as big as the rest of the C code |
15:09:13 | sepisoad | Araq, yes, maybe translating the c code is the best choice after all |
15:12:12 | * | pregressive joined #nim |
15:14:02 | * | Sembei quit (Read error: Connection reset by peer) |
15:14:29 | * | Varriount_ joined #nim |
15:16:34 | * | Sembei joined #nim |
15:18:04 | * | Varriount quit (Ping timeout: 256 seconds) |
15:18:26 | * | jubalh quit (Quit: Leaving) |
15:22:08 | * | ErikBjare_ is now known as ErikBjare |
15:22:43 | * | gyeates quit (Ping timeout: 276 seconds) |
15:23:09 | Arrrr | Interesting, why "type A = object of RootObj" has a size of 4 bytes whereas "type A = object" only 1 |
15:25:18 | * | MyMind joined #nim |
15:25:35 | * | Sembei quit (Ping timeout: 248 seconds) |
15:27:58 | FedeOmoto | Arrrr: are you working on 32bits? |
15:29:47 | * | jubalh joined #nim |
15:30:41 | Arrrr | Yep |
15:32:09 | FedeOmoto | ok |
15:33:06 | FedeOmoto | "object of RootObj" translates to a C struct that has a field that points to a TNimType |
15:33:38 | FedeOmoto | so, that would be 4 bytes in your case and 8 on 64bits (because of the field pointer) |
15:34:12 | FedeOmoto | whereas "object" translates to a struct too, but I assume it's an empty object right? |
15:34:48 | FedeOmoto | so, to don't generate an empty C struct the compiler adds a dummy C char field |
15:34:55 | FedeOmoto | that's 1 byte |
15:36:01 | Arrrr | I see. Then, the question is, why it isn't needed that TNimType in the second example? |
15:36:57 | Arrrr | Oh, now that i see it, with {.inheritable.} has the same size as "object of RootObj" |
15:38:39 | FedeOmoto | because as you're "subclassing / inheriting" from RootObj, the compiler needs to know things like its "base class", any finalizers that might be registered, etc |
15:38:55 | FedeOmoto | this is the definition of TNimType so you can get an idea: |
15:39:04 | FedeOmoto | struct TNimType { |
15:39:04 | FedeOmoto | NI size; |
15:39:05 | FedeOmoto | NU8 kind; |
15:39:05 | FedeOmoto | NU8 flags; |
15:39:05 | FedeOmoto | TNimType* base; |
15:39:05 | FedeOmoto | TNimNode* node; |
15:39:07 | FedeOmoto | void* finalizer; |
15:39:11 | FedeOmoto | TY3289 marker; |
15:39:13 | FedeOmoto | TY3294 deepcopy; |
15:39:15 | FedeOmoto | }; |
15:39:57 | Arrrr | What is TNimNode ? |
15:40:49 | * | jubalh quit (Quit: Leaving) |
15:44:45 | * | MatrixBridge quit (Remote host closed the connection) |
15:45:06 | * | MatrixBridge joined #nim |
15:50:07 | * | Matthias247 quit (Read error: Connection reset by peer) |
15:50:31 | * | darkf quit (Quit: Leaving) |
15:52:33 | * | ChrisMAN_ quit (Remote host closed the connection) |
15:53:19 | FedeOmoto | struct TNimNode { |
15:53:20 | FedeOmoto | NU8 kind; |
15:53:20 | FedeOmoto | NI offset; |
15:53:20 | FedeOmoto | TNimType* typ; |
15:53:20 | FedeOmoto | NCSTRING name; |
15:53:20 | FedeOmoto | NI len; |
15:53:22 | FedeOmoto | TNimNode** sons; |
15:53:24 | FedeOmoto | }; |
15:53:36 | FedeOmoto | it seems to hold a list of TNimNode(s) |
15:54:10 | * | ChrisMAN joined #nim |
15:55:20 | * | yglukhov__ quit (Quit: Be back later ...) |
16:01:31 | * | gyeates joined #nim |
16:04:17 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:07:32 | avsej | Araq, what is the API for thread locals in nim? |
16:08:19 | avsej | ah, threadvar |
16:19:41 | * | pregressive quit (Remote host closed the connection) |
16:25:07 | * | wb__ quit (Ping timeout: 276 seconds) |
16:28:00 | * | wb__ joined #nim |
16:30:28 | * | pregressive joined #nim |
16:33:42 | * | brson joined #nim |
16:35:07 | * | doxavore joined #nim |
16:40:15 | * | jszymanski quit (Ping timeout: 248 seconds) |
16:42:48 | * | jszymanski joined #nim |
16:47:40 | * | Ven quit (Disconnected by services) |
16:54:06 | * | dalarmmst quit (Ping timeout: 252 seconds) |
17:00:10 | * | Ven_ joined #nim |
17:00:27 | * | brson quit (Ping timeout: 246 seconds) |
17:00:59 | * | brson joined #nim |
17:02:31 | onionhammer | araq it'd be cool to have a c2nim -i flag where anything ambiguous c2nim prompts the user :P |
17:08:03 | fowl | Hey im working with clangs parser atm, once i have a better handle on the api im going to make a dll to invoke it and pull out info |
17:09:12 | r-ku | fowl: clang parser for c2nim? |
17:09:51 | fowl | Yea |
17:10:44 | fowl | If it doesnt work too well. #defines should be kept as const instead of expanded in place for ex |
17:11:36 | r-ku | that will be kickass. should result in near-perfect wrapper generator |
17:12:11 | r-ku | perfect parser and handling of (pure) virtual function overriding. |
17:16:32 | * | edbond joined #nim |
17:16:57 | edbond | Hi, is there nim memcached library? |
17:25:03 | * | gyeates quit (Ping timeout: 248 seconds) |
17:34:16 | * | Arrrrr joined #nim |
17:36:47 | * | Arrrr quit (Ping timeout: 248 seconds) |
17:37:18 | fowl | edbond: i think a couple people are working on one |
17:38:31 | * | gokr_ joined #nim |
17:38:42 | edbond | fowl, hm, I can't find it. Where should I look? |
17:39:34 | edbond | aha, found one https://github.com/SPY/nim-memcached |
17:40:57 | * | dt__ joined #nim |
17:41:07 | fowl | Think avsej is working on one also |
17:43:52 | avsej | yes, but it is wip |
17:48:06 | fowl | avsej: software is only finished when it becomes systemd |
17:48:14 | avsej | :) |
17:54:19 | * | dalarmmst joined #nim |
17:56:06 | * | pregressive quit (Remote host closed the connection) |
17:56:29 | * | gyeates joined #nim |
17:56:51 | * | pregressive joined #nim |
17:57:49 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:00:03 | reactormonk | r-ku, pretty sure Araq is pulling it out of the main repo |
18:00:29 | dt__ | Hi, does anyone know how to use nim and ncurses on Windows? |
18:00:29 | * | gokr_ quit (Read error: Connection reset by peer) |
18:00:33 | reactormonk | wu-lee, neat. {.compile:"<path>"·} works then? |
18:02:27 | * | husanu7 joined #nim |
18:10:02 | * | ^aurora^ joined #nim |
18:11:10 | fowl | dt__ windows version of curses is called pdcurses iirc and theres a wrapper for it somewhere |
18:11:47 | dt__ | thanks, I'll check that out. |
18:11:53 | * | brson quit (Ping timeout: 250 seconds) |
18:14:23 | * | husanu7 quit (Remote host closed the connection) |
18:20:44 | boopsies | pdcurses is a bit finicky |
18:20:51 | boopsies | windows doesn't have proper ansi-codes support |
18:24:43 | * | gyeates quit (Ping timeout: 276 seconds) |
18:28:58 | * | brson joined #nim |
18:30:11 | federico3 | Any way to do an open with posix flags without using posix.open? |
18:30:41 | * | drewsrem joined #nim |
18:31:41 | drewsrem | I need to pass a char-array of fixed size to a cfunc, is there any shipped functionality to take a string of arbitrary size and return a char-array with its content clipped to the strings size? |
18:33:57 | fowl | federico3 open() takes a file mode param to open the file read/write is that you mean |
18:35:04 | fowl | drewsrem x = newstring(128): x.cstring |
18:35:16 | fowl | Meant ; |
18:35:49 | drewsrem | fowl, are cstrings equivalent to array[..., char] ? |
18:36:20 | fowl | No its char* |
18:37:21 | drewsrem | fowl, thanks for the newstring, right, using some nim-wrapper already and it wants an array[0..255, char] passed |
18:37:24 | fowl | drewsrem whats the function signature |
18:37:26 | federico3 | fowl: afaict those modes are a subset of all the posix flags |
18:37:59 | fowl | federico3 right its a platform-safe subset, posix is only one platform |
18:38:21 | drewsrem | fowl, pardon me, it's actually an object with a field of type: array[0..107, char] |
18:40:00 | * | Demos joined #nim |
18:40:05 | * | Demos quit (Client Quit) |
18:40:26 | * | Demos joined #nim |
18:40:48 | fowl | drewsrem is that the last field? It is possible a padding field |
18:42:23 | drewsrem | fowl: http://ix.io/jjc |
18:44:04 | drewsrem | ahhh fowl: http://ix.io/jjd I think this works |
18:44:06 | * | sepisoad quit (Ping timeout: 252 seconds) |
18:44:22 | drewsrem | then cast it to array[char] I guess |
18:45:37 | * | fffdfdfdf joined #nim |
18:45:43 | fowl | I found an ex that declares sockname_un, fills in its fields and passes it to bind |
18:46:23 | fowl | Copymem() into sun_path from your string |
18:50:30 | * | Arrrrr quit (Ping timeout: 265 seconds) |
18:52:33 | * | Arrrrr joined #nim |
18:52:54 | drewsrem | fowl, thanks, that worked |
18:54:15 | * | Demos quit (Remote host closed the connection) |
18:56:18 | FedeOmoto | Araq, regarding this one: https://github.com/nim-lang/Nim/issues/2672 |
18:56:58 | FedeOmoto | it seems to be a glibc issue, please take a look at this: https://www.cygwin.com/ml/libc-help/2013-11/msg00033.html |
18:57:33 | FedeOmoto | and this for instance: https://sourceware.org/ml/libc-alpha/2014-10/msg00134.html |
19:02:38 | FedeOmoto | so, as a workaround we can dynamic/static link the needed libraries as in this: |
19:02:39 | FedeOmoto | [fomoto@terminus compiler]$ cat b.nim |
19:02:40 | FedeOmoto | import strutils |
19:02:40 | FedeOmoto | import llvm_core # Just importing any impure lib causes segfaults |
19:02:40 | FedeOmoto | var |
19:02:40 | FedeOmoto | thr: TThread[void] |
19:02:41 | FedeOmoto | proc consumer() {.thread.} = |
19:02:43 | FedeOmoto | discard |
19:02:45 | FedeOmoto | proc main = |
19:02:47 | FedeOmoto | createThread[void](thr, consumer) |
19:02:49 | FedeOmoto | joinThread(thr) |
19:02:51 | FedeOmoto | when isMainModule: |
19:02:53 | FedeOmoto | main() |
19:02:54 | dtscode | such spam |
19:02:55 | FedeOmoto | [fomoto@terminus compiler]$ nim -d:dynamic_link --threads:on c b > /dev/null |
19:02:55 | dtscode | wow |
19:02:57 | FedeOmoto | [fomoto@terminus compiler]$ ./b |
19:02:59 | FedeOmoto | [fomoto@terminus compiler]$ |
19:03:42 | FedeOmoto | or we can turn TLS emulation on when using threads and dlopen |
19:10:56 | * | brson quit (Ping timeout: 244 seconds) |
19:14:57 | * | ^aurora^ quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
19:16:42 | * | brson joined #nim |
19:19:40 | * | zahary1 quit (Quit: Leaving.) |
19:31:14 | * | Demos joined #nim |
19:34:20 | * | ^aurora^ joined #nim |
19:44:33 | boopsies | does the endb debugger not work currently? |
19:49:26 | * | pregressive quit (Remote host closed the connection) |
19:52:57 | * | pregressive joined #nim |
19:53:41 | reactormonk | boopsies, Araq is a proponent of print-debugging :-) |
20:04:16 | pigmej | reactormonk: hmm something strange is with that 'temp buffer for coloring' |
20:04:44 | * | Matthias247 joined #nim |
20:05:03 | reactormonk | pigmej, what do you want the temp buffer for again? |
20:05:18 | pigmej | pretty thing-at-point :) |
20:05:44 | pigmej | I want to have minibuffer message colored with nim-mode rules :) |
20:09:33 | avsej | Araq, FedeOmoto https://github.com/nim-lang/Nim/pull/2995 |
20:16:09 | FedeOmoto | avsej: nice job!!! :) |
20:16:10 | Demos | endb does not work that well, gdb works OK though |
20:17:21 | avsej | FedeOmoto, thanks. I wish all bugs had such a good description and sounded like a challenge |
20:18:57 | dom96 | avsej: indeed, very nice job. |
20:19:19 | dom96 | Araq: Hear that? Make every issue a challenge. |
20:19:33 | cazov | add achievements too |
20:23:33 | * | Jesin joined #nim |
20:30:17 | Arrrrr | Now i want to read the description of that bug report |
20:34:24 | pigmej | reactormonk: ping |
20:35:03 | dom96 | cazov: Being at the top of this is a pretty good achievement https://github.com/nim-lang/Nim/graphs/contributors :) |
20:35:19 | cazov | hah, fair enough :] |
20:39:51 | reactormonk | pigmej, hm? |
20:41:31 | pigmej | reactormonk: got a moment ? |
20:41:36 | reactormonk | pigmej, two if needed |
20:42:15 | pigmej | https://github.com/pigmej/nim-mode + thing-at-point branch |
20:42:25 | pigmej | (sorry github is not working for me now) |
20:42:38 | * | Arrrrr quit (Quit: WeeChat 1.2) |
20:42:58 | pigmej | and thing-at-point.el |
20:43:10 | pigmej | eval it, then nim-enable-thing-at-point |
20:44:06 | Araq | avsej: yay! omg, thanks a lot! :D |
20:44:17 | Araq | now we're cooking |
20:45:08 | reactormonk | pigmej, I'll finish my first buttercup tests, then I'll take a lookk |
20:47:12 | Araq | but I don't understand the fix :P |
20:47:43 | Araq | if we don't use TLS emulation we don't need to allocate a TLS slot either |
20:48:04 | pigmej | sorry, my net went down |
20:48:23 | * | jszymanski quit (Quit: computer sleeps...) |
20:48:24 | pigmej | reactormonk: and the question is, why the message thingy has no text properties ;/ |
20:48:36 | reactormonk | pigmej, tried buffer-substring over buffer-string? |
20:48:41 | pigmej | yeah |
20:48:55 | reactormonk | not in the uploaded version, but eh |
20:49:14 | pigmej | well, it has props when I remove (erase-buffer) and (insert) |
20:50:21 | pigmej | also it has props, but all set to nil |
20:50:54 | reactormonk | how about just generate-new-buffer? |
20:52:24 | pigmej | not needed, it's not working for first entry too |
20:52:45 | pigmej | it's like wtf |
20:53:14 | reactormonk | #emacs? stackoverflow? It's not like I have any idea about that stuff ^^ |
20:55:33 | * | edbond quit (Quit: Leaving) |
20:58:17 | avsej | Araq, we need to allocate this slot |
20:58:24 | avsej | why do you think we don't need it? |
20:58:31 | Araq | no, I think the proper fix is to do this: |
20:58:32 | avsej | everyone will use zero? |
20:58:39 | Araq | when emulatedThreadVars: |
20:58:49 | Araq | var globalsSlot: ThreadVarSlot |
20:59:05 | Araq | later some code just checks whether this var is declared |
20:59:13 | avsej | pthread_key_create() should be called if you are going to use TLS |
20:59:16 | Araq | but it's declared unconditionally |
20:59:42 | Araq | I don't think so, that's the C compiler's job when we generate __thread |
20:59:48 | avsej | yes |
21:00:02 | Araq | and we do use __thread unless --tlsEmulation:on |
21:00:43 | * | infinity0 quit (Ping timeout: 276 seconds) |
21:00:48 | avsej | but in this case we put our stuff into first entry of tls table |
21:01:07 | avsej | and libdl also storing it, but does it properly |
21:01:18 | Araq | no we don't. we usually *only* use __thread |
21:01:37 | Araq | the globalsSlot is only active when we do the emulation |
21:01:41 | avsej | why globalsSlot does not use it? |
21:01:50 | avsej | no |
21:01:56 | avsej | it is active without emulation |
21:02:03 | Araq | yes and that's the bug |
21:02:27 | avsej | https://github.com/nim-lang/Nim/blob/devel/lib/system/threads.nim#L294 |
21:02:42 | Araq | exactly my point |
21:02:46 | avsej | okay. lets me try it |
21:02:50 | Araq | well |
21:03:01 | Araq | there is still |
21:03:07 | Araq | proc myThreadId*[TArg](): ThreadId[TArg] = |
21:03:08 | Araq | result = cast[ThreadId[TArg]](threadVarGetValue(globalsSlot)) |
21:03:31 | Araq | but thread IDs need to be rethought anyway |
21:03:46 | Araq | I don't think anybody uses that one |
21:04:59 | pigmej | reactormonk: I will try ;-) |
21:05:08 | * | infinity0 joined #nim |
21:05:11 | reactormonk | pigmej, cool :D |
21:05:13 | pigmej | in fact that's quite last thing that we need to have thing-at-point working ;) |
21:09:47 | avsej | Araq, so shall I remove myThreadId for now? |
21:10:02 | pigmej | hmm, reactormonk stringe |
21:10:04 | pigmej | strange* |
21:10:11 | pigmej | I disabled nim mode in that buffer |
21:10:20 | pigmej | I enabled rainbow-indentifiers-mode there |
21:10:21 | pigmej | and.. works |
21:10:30 | apense | anyone on windows having trouble compiling with rawsockets? |
21:10:50 | reactormonk | pigmej, so it's a nim-mode problem? |
21:11:15 | pigmej | that's a good question |
21:11:29 | Araq | avsej: yes |
21:11:34 | avsej | ok |
21:11:41 | pigmej | reactormonk: well, it's not working with python-mode too |
21:11:42 | dom96 | apense: hrm, did the PR I pulled break them? |
21:11:53 | apense | I think #2976 did |
21:11:58 | Araq | also do we really have to call dlerror()? sounds slow'ish |
21:12:10 | apense | uses Posix-specific names instead of workarounds for Windows |
21:12:24 | dom96 | apense: yeah |
21:12:51 | apense | Want me to make an issue out of it? |
21:14:07 | apense | The `when` directives from sockets.nim should provide examples of how to make it work for @ayourtch, if he wants to handle the changes |
21:15:09 | reactormonk | pigmej, meh, fuck. |
21:15:24 | reactormonk | pigmej, btw, set up buttercup tests, feel free to use it to see if your stuff work |
21:15:26 | reactormonk | s |
21:15:38 | pigmej | reactormonk: cool, but my elisp-fu..... ;D |
21:15:52 | dom96 | apense: sure |
21:15:55 | reactormonk | pigmej, to test for faces, just go with (get-text-property9 |
21:16:47 | reactormonk | pigmej, just create a sample .nim file you wanna base on and see the before-each in the test-indent |
21:18:11 | reactormonk | pigmej, I can help you if you want |
21:19:17 | avsej | Araq, I've replaced my solution with this one https://github.com/avsej/Nim/commit/10df1ef81c81be1af72fe57a2dc31daac332d993 |
21:20:55 | Araq | nice. does it work? |
21:21:05 | * | aziz quit (Remote host closed the connection) |
21:21:08 | apense | OK it's #2996 whenever someone gets around to it |
21:22:03 | * | gyeates joined #nim |
21:22:27 | reactormonk | Araq, can I put that commit up as how we would like commit messages to be? :-) |
21:22:43 | reactormonk | Or is that too high of a bar |
21:22:53 | Araq | reactormonk: iirc I closed your PR :P |
21:23:43 | reactormonk | Araq, you say don't bother with PRs and just make the changes? :-P |
21:24:38 | Araq | I updated the contributing guide as I think it should be. I don't know why we need to further discuss this. |
21:24:58 | Araq | let people use their brains |
21:25:15 | Araq | sometimes the commit history is valuable |
21:25:19 | Araq | often it's not. |
21:25:39 | avsej | yes it works |
21:25:47 | Araq | don't make people read pages of instructions just so they can contribute |
21:26:30 | Araq | I cannot remember a single case where the commit messages were bad. except my own commits of course. |
21:26:44 | reactormonk | Araq, so aggressively keep it slim? |
21:27:11 | Araq | well there is still a section missing though |
21:27:18 | Araq | "how can I help?" |
21:27:23 | avsej | Araq, I verified with native TLS and with emulation |
21:27:45 | reactormonk | Araq, got a good idea about that one? |
21:27:45 | Araq | --> fix bugs marked as "easy" or "documentation" or perhaps "stdlib" |
21:27:58 | Araq | --> read our gsoc ideas. |
21:28:12 | Araq | so add that section to it and then it's done. |
21:29:05 | fowl | dont you need something in there about welcoming people of all shapes, colors and species? |
21:29:52 | reactormonk | Araq, someone fucked up and deleted the contributing guide |
21:30:01 | * | Demos_ joined #nim |
21:30:01 | * | dt__ quit (Quit: Verlassend) |
21:30:24 | avsej | Araq, anything else to add? or I'm off for today |
21:30:25 | Araq | reactormonk: I moved it to docs/ |
21:30:43 | reactormonk | Araq, it needs to be in root for github to see it |
21:31:00 | reactormonk | I mean I could symlink it but then again windows doesn't like that :-P |
21:31:12 | reactormonk | Or does windows support symlinks for files? |
21:31:15 | Araq | reactormonk: bah, I will upload it instead |
21:31:29 | Araq | avsej: looks good. Thank you so much! |
21:31:44 | Araq | That's actually worth a 0.11.4 release. |
21:31:48 | fowl | reactormonk, yes since vista |
21:32:10 | avsej | I happy to make tomorrow build more stable and robust than today's |
21:32:17 | reactormonk | Araq, upload where to? |
21:33:22 | * | yglukhov__ joined #nim |
21:33:42 | * | Demos quit (Ping timeout: 252 seconds) |
21:34:09 | avsej | Araq, does release procedure includes ensuring that all tests are passing + all example compilable and working? |
21:34:22 | * | gyeates quit (Ping timeout: 272 seconds) |
21:34:28 | Araq | avsej: yes. |
21:34:50 | * | Demos_ quit (Ping timeout: 265 seconds) |
21:34:54 | Araq | well usually I am lazy and don't set the "failing but good enough anyway" tests to "ignore" |
21:35:03 | * | Trustable quit (Remote host closed the connection) |
21:35:03 | avsej | also I noticed that a lot of files missing here https://github.com/nim-lang/Nim/blob/devel/compiler/installer.ini |
21:35:24 | Araq | but I do look at the test results in detail before every release |
21:35:32 | reactormonk | Araq, let's see if symlinking works. |
21:35:37 | Araq | reactormonk: no way |
21:35:49 | Araq | reactormonk: upload it to our website |
21:36:18 | reactormonk | Araq, it does work. And imo a contributing guide should be where people contribute. |
21:36:36 | avsej | Araq, do you use windows as main OS? |
21:37:24 | Araq | avsej: most of the time, but I have Linux and mac machines around me ;-) |
21:37:51 | Araq | reactormonk: no, move it back then |
21:37:51 | * | yglukhov__ quit (Ping timeout: 248 seconds) |
21:38:05 | reactormonk | Araq, you hate symlinks that much? |
21:38:22 | Araq | I don't want symlinks, symlinks suck, they turn an acylic tree into a general graph |
21:38:33 | Araq | *acyclic graph |
21:38:52 | * | needsomehelp_ joined #nim |
21:39:25 | reactormonk | ok |
21:39:29 | Araq | not worth the complexity they bring up. |
21:39:55 | needsomehelp_ | httpclient raises exceptions on 401 response code. How can i disable it? |
21:40:36 | Araq | now that's a good question. I think you can hack it via system.setRaiseHook |
21:40:55 | dom96 | no. |
21:40:59 | dom96 | use request() |
21:41:01 | dom96 | instead of get() |
21:41:16 | Araq | I mean system.globalRaiseHook |
21:42:16 | Araq | dom96: pfff he should try to hack around, I'm curious if it works :P |
21:43:11 | needsomehelp_ | I'll try request() |
21:43:13 | needsomehelp_ | Thanks. |
21:44:21 | needsomehelp_ | https://core.telegram.org/bots/api (trying to code API wrapper for this) |
21:44:42 | * | miglo joined #nim |
21:46:31 | miglo | Hello, I've tried today a chat server example and got the following warning during the compilation process |
21:46:51 | reactormonk | Araq, mind if I delete the last paragram on the trailing whitespaces? |
21:46:52 | miglo | lib/pure/asyncdispatch.nim(1196, 8) Warning: 'cb' is not GC-safe as it accesses 'nameIterVar' which is a global using GC'ed memory |
21:47:23 | dom96 | needsomehelp_: cool |
21:47:37 | dom96 | needsomehelp_: Add it to the nimble package repo once you're done :) |
21:47:53 | needsomehelp_ | dom96: sure |
21:48:08 | needsomehelp_ | Also |
21:48:10 | Araq | reactormonk: von mir aus |
21:48:16 | dom96 | miglo: yeah, async does not work well with threads yet. |
21:48:37 | dom96 | needsomehelp_: Make sure to use the async httpclient |
21:48:43 | needsomehelp_ | Why there is still no some front-end to browse packages.json? |
21:49:14 | reactormonk | needsomehelp_, nimble? |
21:49:40 | Araq | needsomehelp_: that's a very good question |
21:49:49 | Araq | reactormonk: nimble is hardly a "front-end" |
21:49:51 | reactormonk | ah, browse. |
21:50:03 | reactormonk | Araq, well, nimble list kinda |
21:50:45 | Araq | needsomehelp_: there is http://nim-lang.org/docs/lib.html#nimble though |
21:51:45 | * | drewsrem quit (Quit: Leaving) |
21:53:13 | Araq | avsej: what is missing? |
21:54:04 | dom96 | needsomehelp_: because nobody has time to finish one, ekarlso started one |
21:54:35 | needsomehelp_ | Araq: It's still not a best way to browse packages. This list can't be sorted by tags or github stars. |
22:00:14 | Araq | of course but it's better than nothing |
22:01:36 | reactormonk | Araq, would a concept "items" which indicates a type has an items iterator be a good start for the stdlib? |
22:02:29 | Araq | yup |
22:02:41 | miglo | I'm wondering whether the "async" pragma is still supported because I cannot find it in the documentation |
22:03:06 | Araq | miglo: it's a macro ;-) |
22:03:31 | Araq | it's entirely implemented in the library, so it's not in the manual |
22:03:49 | fowl | In asyncdispatch |
22:03:51 | miglo | ok, looks to me like what I've read about pragmas |
22:04:19 | fowl | miglo you can apply a macro to a proc via pragma |
22:04:46 | * | dashed joined #nim |
22:05:38 | needsomehelp_ | How do i cast (Future[httpclient.Response], string) to string? |
22:07:47 | * | OnO quit (Quit: ZNC - 1.6.0 - http://znc.in) |
22:08:32 | * | pregressive quit () |
22:08:57 | * | gokr_ joined #nim |
22:09:51 | fowl | ? |
22:09:55 | fowl | Is that a tuple? |
22:10:13 | needsomehelp_ | Yep. |
22:10:39 | fowl | tup[1] |
22:10:50 | * | gyeates joined #nim |
22:11:14 | fowl | That will get the second member |
22:11:18 | fowl | The string |
22:12:01 | needsomehelp_ | Can't i just get tup["body"]? |
22:13:17 | needsomehelp_ | echo newAsyncHttpClient().request("https://api.telegram.org/botSECRET_TOKEN/getMe", httpGET)["body"] |
22:13:19 | needsomehelp_ | Error: type mismatch: got (Future[httpclient.Response], string) but expected one of: system.[](s: string, x: Slice[system.int]) system.[](a: array[Idx, T], x: Slice[system.int]) system.[](s: seq[T], x: Slice[system.int]) system.[](a: array[Idx, T], x: Slice[[].Idx]) json.[](node: JsonNode, name: string) json.[](node: JsonNode, index: int) |
22:14:48 | * | Jesin quit (Quit: Leaving) |
22:16:58 | Araq | tup.body might also work |
22:17:08 | Araq | depending on how the tuple has been declared |
22:17:26 | needsomehelp_ | https://github.com/nim-lang/Nim/blob/master/lib/pure/httpclient.nim#L87 |
22:20:52 | Araq | yeah, tup.body is it then |
22:20:55 | fowl | You see that it returns a future right? |
22:21:34 | fowl | You dont get to access the results of the future until it finishes |
22:22:10 | Araq | btw we finally have a "Feedback required" tag for issues |
22:28:01 | ekarlso | dom96: what ? |
22:32:24 | * | needsomehelp_ quit (Quit: Page closed) |
22:37:41 | fowl | ekarlso wheres nim play at these days |
22:38:35 | * | brson quit (Ping timeout: 252 seconds) |
22:39:38 | * | miglo left #nim ("http://quassel-irc.org - Chat comfortably. Anywhere.") |
22:40:15 | ekarlso | fowl: dead -,,- |
22:40:22 | ekarlso | never got around to fix the issues :p |
22:44:56 | * | dan_ joined #nim |
22:56:14 | * | NimBot joined #nim |
22:56:22 | * | vendethiel quit (Ping timeout: 252 seconds) |
23:02:24 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:03:35 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:04:39 | * | vendethiel joined #nim |
23:07:40 | * | drewsrem joined #nim |
23:10:22 | * | FedeOmoto quit (Quit: Leaving) |
23:14:32 | dom96 | Who's adding the "SOLVED" to the title on the forum? |
23:14:43 | Araq | the OP? |
23:15:07 | dom96 | it's distracting |
23:15:15 | dom96 | or maybe that's just me. |
23:15:36 | reactormonk | dom96, I find it useful. That way I know which ones to skim |
23:16:07 | Araq | I agree with reactormonk |
23:16:48 | * | thepreacher quit () |
23:16:50 | dom96 | oh well, gives me a reason to implement it properly in the forum |
23:17:29 | * | FedeOmoto joined #nim |
23:18:26 | Araq | what about better spam deletion? |
23:19:42 | dom96 | what do you have in mind? |
23:22:59 | Araq | add an option so that every post is deleted when a user is banned |
23:23:09 | Araq | add a simple spam keyword list |
23:23:28 | Araq | so I can add 'FIFA' and 'kitchen' |
23:23:54 | reactormonk | dom96, link it to github accounts? >:) |
23:23:57 | Araq | or implement the "first post is reviewed manually" feature |
23:24:26 | reactormonk | I mean if you would go the oauth only route, spam would virtually disappear... |
23:24:55 | reactormonk | Because no one would care about creating a github account just to spam on our little forum |
23:24:59 | dom96 | Araq: huh? When a user is banned they cannot post. |
23:25:00 | reactormonk | ... or google or whatever |
23:25:44 | dom96 | reactormonk: that makes things complex |
23:26:07 | reactormonk | dom96, I have no idea how oauth works :-( |
23:26:14 | dom96 | I don't really either |
23:26:26 | dom96 | but it means the forum will need to handle two types of accounts |
23:26:43 | reactormonk | Nah, just two kinds of auths |
23:27:27 | Araq | dom96: but the existing spam posts are not removed |
23:28:02 | dom96 | Araq: That's a convenience feature |
23:28:12 | dom96 | It's not hard to delete the damn posts |
23:28:37 | dom96 | and if somebody posts on a thread created by a spammer then you will need to remove their post manually anyway... |
23:28:54 | * | vendethiel quit (Ping timeout: 265 seconds) |
23:29:51 | Araq | well removing spam is really tedious with the current UI |
23:30:06 | Araq | don't tell me it's not, I'm removing enough spam to know better |
23:30:29 | * | elbow_jason joined #nim |
23:30:30 | * | brson joined #nim |
23:31:01 | reactormonk | Araq, what do you think of making master the main development branch again and using version branches? That way we won't have the "you merged against master" problem |
23:31:06 | reactormonk | ... or just call it stable |
23:31:10 | dom96 | good night |
23:31:19 | Araq | bye |
23:35:41 | Araq | reactormonk: dunno. we might get rid of the devel vs master split again. 'master' is rather pointless now. |
23:36:22 | * | duban joined #nim |
23:39:50 | reactormonk | Araq, yeah, but this will break PRs again ;-) |
23:40:11 | Araq | symlink devel to master? :P |
23:40:44 | reactormonk | Just means you'll have to merge each PR against devel against master locally |
23:42:34 | * | thotypous quit (Quit: WeeChat 1.2) |
23:44:12 | * | doxavore quit (Quit: I said good day, sir.) |
23:45:06 | * | BitPuffin|osx joined #nim |
23:46:42 | * | ^aurora^ quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
23:47:14 | * | thotypous joined #nim |
23:52:08 | * | gokr_ quit (Remote host closed the connection) |