<< 25-06-2015 >>

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:11Araqapense: but there was no new release since then
00:12:53*BitPuffin|osx joined #nim
00:21:37*nande joined #nim
00:26:34apenseVarriount, wait is 2015-05-04 April 5 or May 4?
00:27:13apensesorry that was to Araq
00:27:33AraqMa 4
00:28:35Araqyear-month-day
00:30:15apenseah 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:04wanapense: https://xkcd.com/1179/
00:58:09apensewan, 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:49avsejis it possible to delete all items from table?
05:33:00fowlInteresting question
05:33:23*gyeates quit (Ping timeout: 252 seconds)
05:33:53fowlMay 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:43avsejthis is what i did.
06:14:00avsejanother question: why repr of object returns "[]"?
06:14:19reactormonkavsej, which object?
06:14:28reactormonkwu-lee, any developments?
06:15:55avsejreactormonk, https://gist.github.com/avsej/4043a17bef3ee8f1bc79
06:16:12reactormonkstrange
06:16:26avsejI'm on development branch
06:16:52avsejinitially 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:04r-kuwhere 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:02wu-leereactormonk: not much, I have a .nim compilation which half works
08:50:17wu-leeit turn the LED on, doesn't flash
08:50:56wu-leenim.cfg includes link="/usr/lib/avr/lib/avr5/crtm168.o"
08:51:37wu-leeoddly, if I compile/link the C source direclty, instead of using the nim linked binary, it works
08:51:51wu-leeLED flashes. no modifications to source required.
08:55:38wu-leeattempting 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:26wu-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:01Araqavsej: we need a 'clear' op for these things. it can make a huge diffference for performance
09:53:01avsejyes, iterating + del() does not seem like very good solution either
09:57:57VarriountAraq: Isn't there a 'reset'?
09:58:31AraqVarriount: that doesn't do the same. maybe it could.
09:59:09Araqbut ... 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:16Araqif somebody is looking for a challenge: https://github.com/nim-lang/Nim/issues/2672
11:20:31AraqLinux specific bug. No idea what really causes this.
11:21:05Araqaccording to Valgrind "somewhere in libc it's attempted to free thread local storage twice" or something like that
11:22:11Araqmy 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:18avsejAraq, 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:25sepisoadhi, i'm trying to conver a c header file to nim using c2nim, but it would stop at this line:
14:36:31sepisoadgui_command#define gui_command(t, c) ((const struct gui_command_##t*)c)
14:36:46sepisoad Error: ')' expected
14:37:36sepisoadisn't c2nim supposed to expand on `##`?
14:39:56Araqsepisoad: #define is not #def
14:40:24Araqavsej: it's an ID that's generated by incrementing a global counter. it's part of the PSym object
14:40:33Araqit's not stored separately "on the heap"
14:42:31avsejI see
14:44:04*jubalh quit (Quit: Leaving)
14:44:12Araqavsej: eventually I'll replace it with some stable hash value
14:44:23*jubalh joined #nim
14:44:31Araqso that C code caching works much better
14:46:55*Matthias247 joined #nim
14:48:22sepisoadAraq, OK, and what about this error i get:
14:48:27sepisoad did not expect [NewLine]
14:48:43sepisoadenum gui_layout_slot_index {
14:48:43sepisoad GUI_SLOT_TOP,
14:48:43sepisoad GUI_SLOT_BOTTOM,
14:48:43sepisoad GUI_SLOT_LEFT,
14:48:43sepisoad GUI_SLOT_CENTER,
14:48:43sepisoad GUI_SLOT_RIGHT,
14:48:45sepisoad GUI_SLOT_MAX
14:48:47sepisoad};
14:49:03sepisoadwhat does it mean, the enum look fine!
14:50:48Araqworks for me
14:51:26sepisoadAraq, when i copy the code fragment and paste it in a new file, it works fe mee too
14:51:57sepisoadbut calling c2nim on the original file ends up giving this error
14:52:31sepisoadthe header is fine, cuz i got it compiled using VC++
14:52:55Araqwell imagine for a second that you're Araq. How would you help yourself if you were me with this amount of information?
14:53:10sepisoaddunno ;)
14:53:37sepisoadmaybe i give you the link, actually it's just a header and source file
14:53:43Araq"cuz i got compiled using VC++" suggest to me that you haven't even read c2nim's short manual
14:53:44sepisoadnot a big project
14:54:14Araqc2nim doesn't parse C. it cannot. Parsing C requires a symbol table and lots of mumbo jumbo.
14:54:53Araqc2nim parses a strange dialect of C that happens to work well enough once got used to it.
14:55:09sepisoadok
14:55:32Araqand I'm using it to parse wxWidgets c++ headers btw, so it's not *that* bad
14:56:07Araqso .. gimme a link
14:57:13sepisoadsorry
14:57:19sepisoadjust a second
14:57:35sepisoadAraq, https://github.com/vurtun/gui
14:58:53*raza left #nim (#nim)
15:03:42sepisoadAraq, thanks, i got it working
15:03:48Araqsepisoad: me too :P
15:03:59Araq#define gui_foreach_panel(i, s) for (i = (s)->begin; i != NULL; i = (i)->next)
15:04:14Araq<-- c2nim wants to convert it to a template and fails
15:04:21Araqso making it a #def instead works
15:04:57sepisoadya, did so
15:05:15sepisoadthanks alot
15:06:36Araqpass --nep1 to c2nim and --cdecl btw
15:06:46Araqand perhaps a couple of other things
15:06:55*jubalh quit (Quit: Leaving)
15:07:11*jubalh joined #nim
15:07:40Araqor just translate the C code into Nim
15:08:12Araqthe header file is almost as big as the rest of the C code
15:09:13sepisoadAraq, 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:09ArrrrInteresting, 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:58FedeOmotoArrrr: are you working on 32bits?
15:29:47*jubalh joined #nim
15:30:41ArrrrYep
15:32:09FedeOmotook
15:33:06FedeOmoto"object of RootObj" translates to a C struct that has a field that points to a TNimType
15:33:38FedeOmotoso, that would be 4 bytes in your case and 8 on 64bits (because of the field pointer)
15:34:12FedeOmotowhereas "object" translates to a struct too, but I assume it's an empty object right?
15:34:48FedeOmotoso, to don't generate an empty C struct the compiler adds a dummy C char field
15:34:55FedeOmotothat's 1 byte
15:36:01ArrrrI see. Then, the question is, why it isn't needed that TNimType in the second example?
15:36:57ArrrrOh, now that i see it, with {.inheritable.} has the same size as "object of RootObj"
15:38:39FedeOmotobecause 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:55FedeOmotothis is the definition of TNimType so you can get an idea:
15:39:04FedeOmotostruct TNimType {
15:39:04FedeOmotoNI size;
15:39:05FedeOmotoNU8 kind;
15:39:05FedeOmotoNU8 flags;
15:39:05FedeOmotoTNimType* base;
15:39:05FedeOmotoTNimNode* node;
15:39:07FedeOmotovoid* finalizer;
15:39:11FedeOmotoTY3289 marker;
15:39:13FedeOmotoTY3294 deepcopy;
15:39:15FedeOmoto};
15:39:57ArrrrWhat 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:19FedeOmotostruct TNimNode {
15:53:20FedeOmotoNU8 kind;
15:53:20FedeOmotoNI offset;
15:53:20FedeOmotoTNimType* typ;
15:53:20FedeOmotoNCSTRING name;
15:53:20FedeOmotoNI len;
15:53:22FedeOmotoTNimNode** sons;
15:53:24FedeOmoto};
15:53:36FedeOmotoit 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:32avsejAraq, what is the API for thread locals in nim?
16:08:19avsejah, 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:31onionhammeraraq it'd be cool to have a c2nim -i flag where anything ambiguous c2nim prompts the user :P
17:08:03fowlHey 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:12r-kufowl: clang parser for c2nim?
17:09:51fowlYea
17:10:44fowlIf it doesnt work too well. #defines should be kept as const instead of expanded in place for ex
17:11:36r-kuthat will be kickass. should result in near-perfect wrapper generator
17:12:11r-kuperfect parser and handling of (pure) virtual function overriding.
17:16:32*edbond joined #nim
17:16:57edbondHi, 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:18fowledbond: i think a couple people are working on one
17:38:31*gokr_ joined #nim
17:38:42edbondfowl, hm, I can't find it. Where should I look?
17:39:34edbondaha, found one https://github.com/SPY/nim-memcached
17:40:57*dt__ joined #nim
17:41:07fowlThink avsej is working on one also
17:43:52avsejyes, but it is wip
17:48:06fowlavsej: software is only finished when it becomes systemd
17:48:14avsej:)
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:03reactormonkr-ku, pretty sure Araq is pulling it out of the main repo
18:00:29dt__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:33reactormonkwu-lee, neat. {.compile:"<path>"·} works then?
18:02:27*husanu7 joined #nim
18:10:02*^aurora^ joined #nim
18:11:10fowldt__ windows version of curses is called pdcurses iirc and theres a wrapper for it somewhere
18:11:47dt__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:44boopsiespdcurses is a bit finicky
18:20:51boopsieswindows doesn't have proper ansi-codes support
18:24:43*gyeates quit (Ping timeout: 276 seconds)
18:28:58*brson joined #nim
18:30:11federico3Any way to do an open with posix flags without using posix.open?
18:30:41*drewsrem joined #nim
18:31:41drewsremI 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:57fowlfederico3 open() takes a file mode param to open the file read/write is that you mean
18:35:04fowldrewsrem x = newstring(128): x.cstring
18:35:16fowlMeant ;
18:35:49drewsremfowl, are cstrings equivalent to array[..., char] ?
18:36:20fowlNo its char*
18:37:21drewsremfowl, thanks for the newstring, right, using some nim-wrapper already and it wants an array[0..255, char] passed
18:37:24fowldrewsrem whats the function signature
18:37:26federico3fowl: afaict those modes are a subset of all the posix flags
18:37:59fowlfederico3 right its a platform-safe subset, posix is only one platform
18:38:21drewsremfowl, 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:48fowldrewsrem is that the last field? It is possible a padding field
18:42:23drewsremfowl: http://ix.io/jjc
18:44:04drewsremahhh fowl: http://ix.io/jjd I think this works
18:44:06*sepisoad quit (Ping timeout: 252 seconds)
18:44:22drewsremthen cast it to array[char] I guess
18:45:37*fffdfdfdf joined #nim
18:45:43fowlI found an ex that declares sockname_un, fills in its fields and passes it to bind
18:46:23fowlCopymem() into sun_path from your string
18:50:30*Arrrrr quit (Ping timeout: 265 seconds)
18:52:33*Arrrrr joined #nim
18:52:54drewsremfowl, thanks, that worked
18:54:15*Demos quit (Remote host closed the connection)
18:56:18FedeOmotoAraq, regarding this one: https://github.com/nim-lang/Nim/issues/2672
18:56:58FedeOmotoit 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:33FedeOmotoand this for instance: https://sourceware.org/ml/libc-alpha/2014-10/msg00134.html
19:02:38FedeOmotoso, as a workaround we can dynamic/static link the needed libraries as in this:
19:02:39FedeOmoto[fomoto@terminus compiler]$ cat b.nim
19:02:40FedeOmotoimport strutils
19:02:40FedeOmotoimport llvm_core # Just importing any impure lib causes segfaults
19:02:40FedeOmotovar
19:02:40FedeOmoto thr: TThread[void]
19:02:41FedeOmotoproc consumer() {.thread.} =
19:02:43FedeOmoto discard
19:02:45FedeOmotoproc main =
19:02:47FedeOmoto createThread[void](thr, consumer)
19:02:49FedeOmoto joinThread(thr)
19:02:51FedeOmotowhen isMainModule:
19:02:53FedeOmoto main()
19:02:54dtscodesuch spam
19:02:55FedeOmoto[fomoto@terminus compiler]$ nim -d:dynamic_link --threads:on c b > /dev/null
19:02:55dtscodewow
19:02:57FedeOmoto[fomoto@terminus compiler]$ ./b
19:02:59FedeOmoto[fomoto@terminus compiler]$
19:03:42FedeOmotoor 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:33boopsiesdoes the endb debugger not work currently?
19:49:26*pregressive quit (Remote host closed the connection)
19:52:57*pregressive joined #nim
19:53:41reactormonkboopsies, Araq is a proponent of print-debugging :-)
20:04:16pigmejreactormonk: hmm something strange is with that 'temp buffer for coloring'
20:04:44*Matthias247 joined #nim
20:05:03reactormonkpigmej, what do you want the temp buffer for again?
20:05:18pigmejpretty thing-at-point :)
20:05:44pigmejI want to have minibuffer message colored with nim-mode rules :)
20:09:33avsejAraq, FedeOmoto https://github.com/nim-lang/Nim/pull/2995
20:16:09FedeOmotoavsej: nice job!!! :)
20:16:10Demosendb does not work that well, gdb works OK though
20:17:21avsejFedeOmoto, thanks. I wish all bugs had such a good description and sounded like a challenge
20:18:57dom96avsej: indeed, very nice job.
20:19:19dom96Araq: Hear that? Make every issue a challenge.
20:19:33cazovadd achievements too
20:23:33*Jesin joined #nim
20:30:17ArrrrrNow i want to read the description of that bug report
20:34:24pigmejreactormonk: ping
20:35:03dom96cazov: Being at the top of this is a pretty good achievement https://github.com/nim-lang/Nim/graphs/contributors :)
20:35:19cazovhah, fair enough :]
20:39:51reactormonkpigmej, hm?
20:41:31pigmejreactormonk: got a moment ?
20:41:36reactormonkpigmej, two if needed
20:42:15pigmejhttps://github.com/pigmej/nim-mode + thing-at-point branch
20:42:25pigmej(sorry github is not working for me now)
20:42:38*Arrrrr quit (Quit: WeeChat 1.2)
20:42:58pigmejand thing-at-point.el
20:43:10pigmejeval it, then nim-enable-thing-at-point
20:44:06Araqavsej: yay! omg, thanks a lot! :D
20:44:17Araqnow we're cooking
20:45:08reactormonkpigmej, I'll finish my first buttercup tests, then I'll take a lookk
20:47:12Araqbut I don't understand the fix :P
20:47:43Araqif we don't use TLS emulation we don't need to allocate a TLS slot either
20:48:04pigmejsorry, my net went down
20:48:23*jszymanski quit (Quit: computer sleeps...)
20:48:24pigmejreactormonk: and the question is, why the message thingy has no text properties ;/
20:48:36reactormonkpigmej, tried buffer-substring over buffer-string?
20:48:41pigmejyeah
20:48:55reactormonknot in the uploaded version, but eh
20:49:14pigmejwell, it has props when I remove (erase-buffer) and (insert)
20:50:21pigmejalso it has props, but all set to nil
20:50:54reactormonkhow about just generate-new-buffer?
20:52:24pigmejnot needed, it's not working for first entry too
20:52:45pigmejit's like wtf
20:53:14reactormonk#emacs? stackoverflow? It's not like I have any idea about that stuff ^^
20:55:33*edbond quit (Quit: Leaving)
20:58:17avsejAraq, we need to allocate this slot
20:58:24avsejwhy do you think we don't need it?
20:58:31Araqno, I think the proper fix is to do this:
20:58:32avsejeveryone will use zero?
20:58:39Araqwhen emulatedThreadVars:
20:58:49Araq var globalsSlot: ThreadVarSlot
20:59:05Araqlater some code just checks whether this var is declared
20:59:13avsejpthread_key_create() should be called if you are going to use TLS
20:59:16Araqbut it's declared unconditionally
20:59:42AraqI don't think so, that's the C compiler's job when we generate __thread
20:59:48avsejyes
21:00:02Araqand we do use __thread unless --tlsEmulation:on
21:00:43*infinity0 quit (Ping timeout: 276 seconds)
21:00:48avsejbut in this case we put our stuff into first entry of tls table
21:01:07avsejand libdl also storing it, but does it properly
21:01:18Araqno we don't. we usually *only* use __thread
21:01:37Araqthe globalsSlot is only active when we do the emulation
21:01:41avsejwhy globalsSlot does not use it?
21:01:50avsejno
21:01:56avsejit is active without emulation
21:02:03Araqyes and that's the bug
21:02:27avsejhttps://github.com/nim-lang/Nim/blob/devel/lib/system/threads.nim#L294
21:02:42Araqexactly my point
21:02:46avsejokay. lets me try it
21:02:50Araqwell
21:03:01Araqthere is still
21:03:07Araqproc myThreadId*[TArg](): ThreadId[TArg] =
21:03:08Araq result = cast[ThreadId[TArg]](threadVarGetValue(globalsSlot))
21:03:31Araqbut thread IDs need to be rethought anyway
21:03:46AraqI don't think anybody uses that one
21:04:59pigmejreactormonk: I will try ;-)
21:05:08*infinity0 joined #nim
21:05:11reactormonkpigmej, cool :D
21:05:13pigmejin fact that's quite last thing that we need to have thing-at-point working ;)
21:09:47avsejAraq, so shall I remove myThreadId for now?
21:10:02pigmejhmm, reactormonk stringe
21:10:04pigmejstrange*
21:10:11pigmejI disabled nim mode in that buffer
21:10:20pigmejI enabled rainbow-indentifiers-mode there
21:10:21pigmejand.. works
21:10:30apenseanyone on windows having trouble compiling with rawsockets?
21:10:50reactormonkpigmej, so it's a nim-mode problem?
21:11:15pigmejthat's a good question
21:11:29Araqavsej: yes
21:11:34avsejok
21:11:41pigmejreactormonk: well, it's not working with python-mode too
21:11:42dom96apense: hrm, did the PR I pulled break them?
21:11:53apenseI think #2976 did
21:11:58Araqalso do we really have to call dlerror()? sounds slow'ish
21:12:10apenseuses Posix-specific names instead of workarounds for Windows
21:12:24dom96apense: yeah
21:12:51apenseWant me to make an issue out of it?
21:14:07apenseThe `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:09reactormonkpigmej, meh, fuck.
21:15:24reactormonkpigmej, btw, set up buttercup tests, feel free to use it to see if your stuff work
21:15:26reactormonks
21:15:38pigmejreactormonk: cool, but my elisp-fu..... ;D
21:15:52dom96apense: sure
21:15:55reactormonkpigmej, to test for faces, just go with (get-text-property9
21:16:47reactormonkpigmej, just create a sample .nim file you wanna base on and see the before-each in the test-indent
21:18:11reactormonkpigmej, I can help you if you want
21:19:17avsejAraq, I've replaced my solution with this one https://github.com/avsej/Nim/commit/10df1ef81c81be1af72fe57a2dc31daac332d993
21:20:55Araqnice. does it work?
21:21:05*aziz quit (Remote host closed the connection)
21:21:08apenseOK it's #2996 whenever someone gets around to it
21:22:03*gyeates joined #nim
21:22:27reactormonkAraq, can I put that commit up as how we would like commit messages to be? :-)
21:22:43reactormonkOr is that too high of a bar
21:22:53Araqreactormonk: iirc I closed your PR :P
21:23:43reactormonkAraq, you say don't bother with PRs and just make the changes? :-P
21:24:38AraqI updated the contributing guide as I think it should be. I don't know why we need to further discuss this.
21:24:58Araqlet people use their brains
21:25:15Araqsometimes the commit history is valuable
21:25:19Araqoften it's not.
21:25:39avsejyes it works
21:25:47Araqdon't make people read pages of instructions just so they can contribute
21:26:30AraqI cannot remember a single case where the commit messages were bad. except my own commits of course.
21:26:44reactormonkAraq, so aggressively keep it slim?
21:27:11Araqwell there is still a section missing though
21:27:18Araq"how can I help?"
21:27:23avsejAraq, I verified with native TLS and with emulation
21:27:45reactormonkAraq, got a good idea about that one?
21:27:45Araq--> fix bugs marked as "easy" or "documentation" or perhaps "stdlib"
21:27:58Araq--> read our gsoc ideas.
21:28:12Araqso add that section to it and then it's done.
21:29:05fowldont you need something in there about welcoming people of all shapes, colors and species?
21:29:52reactormonkAraq, someone fucked up and deleted the contributing guide
21:30:01*Demos_ joined #nim
21:30:01*dt__ quit (Quit: Verlassend)
21:30:24avsejAraq, anything else to add? or I'm off for today
21:30:25Araqreactormonk: I moved it to docs/
21:30:43reactormonkAraq, it needs to be in root for github to see it
21:31:00reactormonkI mean I could symlink it but then again windows doesn't like that :-P
21:31:12reactormonkOr does windows support symlinks for files?
21:31:15Araqreactormonk: bah, I will upload it instead
21:31:29Araqavsej: looks good. Thank you so much!
21:31:44AraqThat's actually worth a 0.11.4 release.
21:31:48fowlreactormonk, yes since vista
21:32:10avsejI happy to make tomorrow build more stable and robust than today's
21:32:17reactormonkAraq, upload where to?
21:33:22*yglukhov__ joined #nim
21:33:42*Demos quit (Ping timeout: 252 seconds)
21:34:09avsejAraq, 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:28Araqavsej: yes.
21:34:50*Demos_ quit (Ping timeout: 265 seconds)
21:34:54Araqwell 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:03avsejalso I noticed that a lot of files missing here https://github.com/nim-lang/Nim/blob/devel/compiler/installer.ini
21:35:24Araqbut I do look at the test results in detail before every release
21:35:32reactormonkAraq, let's see if symlinking works.
21:35:37Araqreactormonk: no way
21:35:49Araqreactormonk: upload it to our website
21:36:18reactormonkAraq, it does work. And imo a contributing guide should be where people contribute.
21:36:36avsejAraq, do you use windows as main OS?
21:37:24Araqavsej: most of the time, but I have Linux and mac machines around me ;-)
21:37:51Araqreactormonk: no, move it back then
21:37:51*yglukhov__ quit (Ping timeout: 248 seconds)
21:38:05reactormonkAraq, you hate symlinks that much?
21:38:22AraqI don't want symlinks, symlinks suck, they turn an acylic tree into a general graph
21:38:33Araq*acyclic graph
21:38:52*needsomehelp_ joined #nim
21:39:25reactormonkok
21:39:29Araqnot worth the complexity they bring up.
21:39:55needsomehelp_httpclient raises exceptions on 401 response code. How can i disable it?
21:40:36Araqnow that's a good question. I think you can hack it via system.setRaiseHook
21:40:55dom96no.
21:40:59dom96use request()
21:41:01dom96instead of get()
21:41:16AraqI mean system.globalRaiseHook
21:42:16Araqdom96: pfff he should try to hack around, I'm curious if it works :P
21:43:11needsomehelp_I'll try request()
21:43:13needsomehelp_Thanks.
21:44:21needsomehelp_https://core.telegram.org/bots/api (trying to code API wrapper for this)
21:44:42*miglo joined #nim
21:46:31migloHello, I've tried today a chat server example and got the following warning during the compilation process
21:46:51reactormonkAraq, mind if I delete the last paragram on the trailing whitespaces?
21:46:52miglolib/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:23dom96needsomehelp_: cool
21:47:37dom96needsomehelp_: Add it to the nimble package repo once you're done :)
21:47:53needsomehelp_dom96: sure
21:48:08needsomehelp_Also
21:48:10Araqreactormonk: von mir aus
21:48:16dom96miglo: yeah, async does not work well with threads yet.
21:48:37dom96needsomehelp_: Make sure to use the async httpclient
21:48:43needsomehelp_Why there is still no some front-end to browse packages.json?
21:49:14reactormonkneedsomehelp_, nimble?
21:49:40Araqneedsomehelp_: that's a very good question
21:49:49Araqreactormonk: nimble is hardly a "front-end"
21:49:51reactormonkah, browse.
21:50:03reactormonkAraq, well, nimble list kinda
21:50:45Araqneedsomehelp_: there is http://nim-lang.org/docs/lib.html#nimble though
21:51:45*drewsrem quit (Quit: Leaving)
21:53:13Araqavsej: what is missing?
21:54:04dom96needsomehelp_: because nobody has time to finish one, ekarlso started one
21:54:35needsomehelp_Araq: It's still not a best way to browse packages. This list can't be sorted by tags or github stars.
22:00:14Araqof course but it's better than nothing
22:01:36reactormonkAraq, would a concept "items" which indicates a type has an items iterator be a good start for the stdlib?
22:02:29Araqyup
22:02:41migloI'm wondering whether the "async" pragma is still supported because I cannot find it in the documentation
22:03:06Araqmiglo: it's a macro ;-)
22:03:31Araqit's entirely implemented in the library, so it's not in the manual
22:03:49fowlIn asyncdispatch
22:03:51miglook, looks to me like what I've read about pragmas
22:04:19fowlmiglo you can apply a macro to a proc via pragma
22:04:46*dashed joined #nim
22:05:38needsomehelp_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:51fowl?
22:09:55fowlIs that a tuple?
22:10:13needsomehelp_Yep.
22:10:39fowltup[1]
22:10:50*gyeates joined #nim
22:11:14fowlThat will get the second member
22:11:18fowlThe string
22:12:01needsomehelp_Can't i just get tup["body"]?
22:13:17needsomehelp_echo newAsyncHttpClient().request("https://api.telegram.org/botSECRET_TOKEN/getMe", httpGET)["body"]
22:13:19needsomehelp_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:58Araqtup.body might also work
22:17:08Araqdepending on how the tuple has been declared
22:17:26needsomehelp_https://github.com/nim-lang/Nim/blob/master/lib/pure/httpclient.nim#L87
22:20:52Araqyeah, tup.body is it then
22:20:55fowlYou see that it returns a future right?
22:21:34fowlYou dont get to access the results of the future until it finishes
22:22:10Araqbtw we finally have a "Feedback required" tag for issues
22:28:01ekarlsodom96: what ?
22:32:24*needsomehelp_ quit (Quit: Page closed)
22:37:41fowlekarlso 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:15ekarlsofowl: dead -,,-
22:40:22ekarlsonever 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:32dom96Who's adding the "SOLVED" to the title on the forum?
23:14:43Araqthe OP?
23:15:07dom96it's distracting
23:15:15dom96or maybe that's just me.
23:15:36reactormonkdom96, I find it useful. That way I know which ones to skim
23:16:07AraqI agree with reactormonk
23:16:48*thepreacher quit ()
23:16:50dom96oh well, gives me a reason to implement it properly in the forum
23:17:29*FedeOmoto joined #nim
23:18:26Araqwhat about better spam deletion?
23:19:42dom96what do you have in mind?
23:22:59Araqadd an option so that every post is deleted when a user is banned
23:23:09Araqadd a simple spam keyword list
23:23:28Araqso I can add 'FIFA' and 'kitchen'
23:23:54reactormonkdom96, link it to github accounts? >:)
23:23:57Araqor implement the "first post is reviewed manually" feature
23:24:26reactormonkI mean if you would go the oauth only route, spam would virtually disappear...
23:24:55reactormonkBecause no one would care about creating a github account just to spam on our little forum
23:24:59dom96Araq: huh? When a user is banned they cannot post.
23:25:00reactormonk... or google or whatever
23:25:44dom96reactormonk: that makes things complex
23:26:07reactormonkdom96, I have no idea how oauth works :-(
23:26:14dom96I don't really either
23:26:26dom96but it means the forum will need to handle two types of accounts
23:26:43reactormonkNah, just two kinds of auths
23:27:27Araqdom96: but the existing spam posts are not removed
23:28:02dom96Araq: That's a convenience feature
23:28:12dom96It's not hard to delete the damn posts
23:28:37dom96and 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:51Araqwell removing spam is really tedious with the current UI
23:30:06Araqdon'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:01reactormonkAraq, 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:06reactormonk... or just call it stable
23:31:10dom96good night
23:31:19Araqbye
23:35:41Araqreactormonk: 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:50reactormonkAraq, yeah, but this will break PRs again ;-)
23:40:11Araqsymlink devel to master? :P
23:40:44reactormonkJust 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)