<< 29-03-2015 >>

00:04:24*reem joined #nim
00:15:58*irrequietus quit ()
00:16:30*flaviu joined #nim
00:25:34*reem quit (Remote host closed the connection)
00:34:24*reem joined #nim
00:35:18tghumePowered by Nim thanks to Araq’s help: http://ratewith.science/
00:36:51EXetoCcool. I'll post it on reddit
00:36:56EXetoCjk
00:48:54*MyMind quit (Read error: Connection reset by peer)
00:50:54flaviutghume: What does it do?
00:52:15*MyMind joined #nim
00:52:41tghumeflaviu: Breadth first searches the link graph of Wikipedia. But the stated purpose is to find rating scales for things like “On a scale of The Pope to Benedict Cumberbatch how awesome do you feel today?”
00:53:01flaviuAh, I didn't notice the github link at the bottom.
00:53:30tghumeflaviu: it was originally written for a “stupid shit noone needs” hackathon in Rust, but I had trouble getting the Rust web framework iron to work so it ended up being a total hack.
00:53:50*MyMind quit (Read error: Connection reset by peer)
00:54:18tghumeSo yesterday I rewrote it in Nim. The hard part is generating the dense binary link graph file of Wikipedia that can fit in memory and allow efficient searching, but I already had that so porting the rest to Nim was easy.
00:54:28flaviuBtw, comparing Me to Someone Else doesn't return any results.
00:54:58tghumeAs I said it works by the Wikipedia link graph, so if the thing doesn’t have a Wikipedia page, it won’t work.
00:55:58flaviuWell, it does have a wikipedia page, but it looks like they aren't connected.
00:56:07flaviuAnyway, cool toy.
00:56:28*MyMind joined #nim
00:56:38flaviuGetting a scale from Reddit to Hacker News is interesting.
01:00:20*MyMind quit (Read error: Connection reset by peer)
01:02:30*MyMind joined #nim
01:03:09*fizzbooze quit (Ping timeout: 245 seconds)
01:04:15dom96tghume: Really cool, the results don't really make sense most of the time though.
01:04:27dom96It's cool to see Jester being used.
01:05:15tghumedom96: I find it fun to try to figure out the connection. One thing to know is that if the white circles are pulsing then it is a bidirectional connection, which means each page links in both ways, which should mean a strong connection between the two things.
01:05:44def-tghume: cool stuff, how long does it take to do such a search?
01:05:49tghumedom96: Also just so you know I had to start using the latest Nim because Jester segfaults on hello world with 10.2
01:06:05tghumedom96: And the latest version with the new indexing notation doesn’t compile at all.
01:06:17tghumedom96: Might want to mention that you need the development version in the Readme
01:07:13tghumedef-: It actually takes less than a second in many cases but can take up to maybe 2 seconds in pathological cases.
01:07:33tghumedef-: which actually makes me think it might be able to handle a small subreddit or lower down on Hacker News
01:07:59dom96tghume: I think you should just set some limits.
01:08:22dom96tghume: Create a backlog and tell people to wait if there is too much activity.
01:08:36def-that should be fine, even if you get to the top of HN, that seems to be about 1 request/second
01:08:58tghumedom96: I guess I could, currently I’m just directly running the search in the Jester handler. With a mutex on the data structure since I can’t figure out if Jester is actually concurrent or just queues requests under load.
01:09:03dom96tghume: I applied a patch by Araq which should have fixed it with the new indexing notation.
01:09:13dom96tghume: Have you tried updating the jester repo recently?
01:09:52tghumedom96: Yah I’m on the latest commit. What I’m saying is that it doesn’t work on the *older* release version of Nim. Only the latest unreleased developer version.
01:09:59dom96tghume: Jester does not create threads so you don't need mutexes.
01:10:14dom96oh right, yeah.
01:10:42tghumedom96: So requests that come in before the last one is done just queue up? Or do they get dropped?
01:11:52dom96tghume: Jester is async so it will not block on IO intensive tasks but it will block on CPU intensive tasks.
01:12:03*MyMind quit (Read error: Connection reset by peer)
01:12:12tghumedom96: Because if Jester doesn’t create threads, then I’m not sure how to set limits. What if 10 new requests come in while a search is going on? How do I turn them away?
01:13:01dom96Yeah, that's tricky.
01:13:09*MyMind joined #nim
01:14:58dom96You can try running your search in another thread but I must warn you that so far my experience when mixing threads and async has resulted in odd crashes.
01:15:07tghumedom96: I bet I could wrap some kind of worker thread in an async context so that the searches wouldn’t block the web serving but that would be tricky and this is a stupid side project.
01:15:52*girvo joined #nim
01:16:13dom96That would probably work, yes.
01:20:25*girvo quit (Ping timeout: 252 seconds)
01:25:39*gsingh93 quit (Quit: Connection closed for inactivity)
01:30:47k1idom96: implementing kqueue atm
01:31:11k1idom96: i didnt look at the epoll implementation used in asyncnet/asyndispatch, but do you know off the top of your head if you are using epoll in edge-triggered mode?
01:31:32dom96k1i: Awesome. Nope, can't remember.
01:31:45k1ii don't know that my implementation of kq/epoll will be compatible with asyncnet/asyncdispatch
01:31:52*tghume_ joined #nim
01:32:37dom96why don't you make it compatible and add it to asyncdispatch?
01:32:41k1ii am building a high-perf web server implementation which will use epoll in ET mode, kq in its equivalent, and a threadpool ($nproc threads) to do ET'd waits
01:33:24k1ithe threadpool + ET epoll/kqueue approach isn't friendly to a windows implementation (completion-based aio) typically
01:33:54k1iand isn't compatible with select() implementations usually
01:33:57k1iill look at it, but i wasn't sure
01:34:58*tghume quit (Ping timeout: 272 seconds)
01:34:58*tghume_ is now known as tghume
01:35:20*brson quit (Quit: leaving)
01:36:08dom96k1i: I see. If you do choose to implement it for the stdlib all you need to do is implement it in the selectors module.
01:36:10k1idom96: i'd like to see how you abstracted windows iocp and epoll
01:36:24k1icompletion vs. readiness
01:36:32dom96Asyncdispatch is basically a completion-based API.
01:36:34k1iah.
01:36:50k1ithat was the feeling I got
01:36:54dom96I can emulate it pretty easily for epoll/select
01:37:26k1ii am going to need to have a closer look at your epoll impl. - does your epoll_wait block?
01:38:09dom96IIRC no
01:38:26k1iyeah so in non-edge-triggered mode it behaves a lot like select()
01:38:43k1iin ET mode epoll blocks the thread until an event is dispatched to it
01:38:51k1ithe readiness event also only fires once
01:39:21k1iso you can have N threads all blocking on a single epoll FD and are given the "guarantee" that only one of them will be awoken with any single event
01:40:41dom96ahh
01:41:17k1ilevel triggered epoll behaves a lot more like select iirc, it constantly returns readiness status with every loop cycle w/o blocking
01:42:14k1ithe other thing, being a nim newb, i wasn't sure about, was the assumption about IO and threading
01:42:34dom96yeah, in that case I am using level triggered epoll.
01:43:05k1iwasn't sure if it were "okay" to have a library manage an event loop/thread pool behind the scenes
01:45:24k1idom96: if i saw correctly, if using asyncdispatch, the user initiates the event loop in their own thread, via runForever?
01:45:34dom96indeed
01:46:56k1iwill need to think about how to expose the "sleeping thread-pool" side of the API
01:49:14k1icant wait to see the perf numbers though :)
01:51:10k1idom96: would there be value in an abstracted HTTP parser?
01:51:58dom96I don't think so. Parsing HTTP isn't really that bad.
01:52:44k1i:D braver than i
01:52:53dom96But if you want to create a nimble package which provides it then go right ahead :)
01:53:11k1iive never implemented 2.0 either
01:55:30reemPSA: the fastest http parsers are push parsers which don't keep state
01:55:49reemso definitely use one vs. a pull parser if you are doing non-blocking io already
01:55:58dom96oh yeah, forgot about 2.0.
01:56:04reemthey're also way easier to write because you need no state
01:56:23*reem goes back to lurking
01:57:06dom96what is a 'push parser'?
01:57:26reembasically you give the parser the entire request up front
01:57:39reemand it tries to parse, and if it can't parse a complete request or there is too much it errors
01:58:13reemand you try to read some more data and try again (hence push, since you try, push more data, then give it to the parser, whereas a pull parser takes a "stream" and controls reading itself)
01:59:14dom96The current asynchttpserver parser just reads lines and parses them.
02:03:12*a5i quit (Quit: Connection closed for inactivity)
02:05:20*darkf joined #nim
02:09:30*rational quit (Quit: Lost terminal)
02:13:57*MyMind quit (Read error: Connection reset by peer)
02:15:12*MyMind joined #nim
02:19:41*fizzbooze joined #nim
02:20:58*bjz_ quit (Quit: Textual IRC Client: www.textualapp.com)
02:23:36*bjz joined #nim
02:31:43*MyMind quit (Read error: Connection reset by peer)
02:32:30*tghume quit (Quit: tghume)
02:32:52*MyMind joined #nim
02:37:34*MyMind quit (Read error: Connection reset by peer)
02:42:37*MyMind joined #nim
02:43:36*TEttinger joined #nim
03:02:00*filwit quit (Quit: Leaving)
03:04:39*girvo joined #nim
03:08:57*girvo quit (Ping timeout: 246 seconds)
03:09:51*reem quit (Remote host closed the connection)
03:16:18*EXetoC quit (Ping timeout: 272 seconds)
03:18:37*reem joined #nim
03:26:28*brson joined #nim
03:35:35*arnetheduck joined #nim
03:40:46*reem quit (Remote host closed the connection)
03:56:34*MyMind quit (Read error: Connection reset by peer)
03:59:34*reem joined #nim
04:05:25*girvo joined #nim
04:10:01*girvo quit (Ping timeout: 264 seconds)
04:13:07*Kingsquee joined #nim
04:17:22*vendethiel quit (Ping timeout: 244 seconds)
04:21:32*jefus quit (Ping timeout: 272 seconds)
04:26:23*reem quit (Remote host closed the connection)
04:28:13*reem joined #nim
04:29:37*reem quit (Remote host closed the connection)
04:32:38*vendethiel joined #nim
04:43:43*MyMind joined #nim
04:48:25*jefus joined #nim
04:58:14*MyMind quit (Read error: Connection reset by peer)
05:03:22*MyMind joined #nim
05:08:09*MyMind quit (Read error: Connection reset by peer)
05:10:27*MyMind joined #nim
05:22:07*reem joined #nim
05:22:16*jefus_ joined #nim
05:23:30*reem quit (Remote host closed the connection)
05:25:37*jefus quit (Ping timeout: 264 seconds)
05:39:00*vendethiel quit (Ping timeout: 244 seconds)
05:43:44*MyMind quit (Read error: Connection reset by peer)
05:45:55*MyMind joined #nim
05:51:13*girvo joined #nim
05:52:38*vendethiel joined #nim
05:56:16*girvo quit (Ping timeout: 264 seconds)
06:03:44*nande joined #nim
06:24:28*johnsoft quit (Ping timeout: 244 seconds)
06:25:35*johnsoft joined #nim
06:36:54*brson quit (Quit: leaving)
06:38:22*vendethiel quit (Ping timeout: 255 seconds)
06:43:34*gokr joined #nim
06:44:16*vendethiel joined #nim
06:52:19*fizzbooze quit (Ping timeout: 250 seconds)
07:05:57*vendethiel quit (Ping timeout: 248 seconds)
07:08:22*Kingsquee quit (Quit: Konversation terminated!)
07:09:47*Kingsquee joined #nim
07:11:34*brson joined #nim
07:18:12*vendethiel joined #nim
07:28:57*MyMind quit (Read error: Connection reset by peer)
07:30:09*MyMind joined #nim
07:30:24*brson quit (Quit: leaving)
07:30:52*reem joined #nim
07:39:59*girvo joined #nim
07:40:06*Senketsu quit (Read error: Connection reset by peer)
07:42:26*HakanD joined #nim
07:43:01*HakanD_ joined #nim
07:44:34*girvo quit (Ping timeout: 250 seconds)
07:46:51*HakanD quit (Ping timeout: 246 seconds)
07:53:43*egrep joined #nim
08:01:32*HakanD_ is now known as HakanD
08:02:02*gmpreussner|work quit (Read error: Connection reset by peer)
08:02:56*nande quit (Remote host closed the connection)
08:03:44*askatasuna joined #nim
08:07:12*vendethiel quit (Ping timeout: 252 seconds)
08:16:53*vendethiel joined #nim
08:25:17*egrep quit (Remote host closed the connection)
08:26:45*egrep joined #nim
08:49:37*gokr quit (Read error: Connection reset by peer)
08:58:43*BlaXpirit joined #nim
09:00:09*vendethiel quit (Ping timeout: 250 seconds)
09:15:29*vendethiel joined #nim
09:25:38*singul42 joined #nim
09:26:31singul42morning
09:28:45*girvo joined #nim
09:29:08singul42I am getting a SIGSEV when using repr on a win32 api struct in an array. It looks like repr doesn't like the last entry in the array, where the members need to be set to NULL (required by the following winapi function https://msdn.microsoft.com/en-us/library/windows/desktop/ms686324%28v=vs.85%29.aspx). does anybody know why am I getting the SIGSEV?
09:29:28singul42the nim code: https://bpaste.net/show/498442d331f5
09:33:25*girvo quit (Ping timeout: 255 seconds)
09:36:22*filwit joined #nim
09:37:47fowlsingul42, it seems that repr(nil.cstring) causes a segfault
09:38:30BlaXpiritgoddammit
09:38:49BlaXpiritnil.anything makes me cringe
09:40:10singul42the winapi function also crashes with the array structure, maybe it is related
09:41:52*irrequietus joined #nim
09:47:47*gokr joined #nim
09:53:50*gokr quit (Quit: Leaving.)
09:58:15*gokr joined #nim
10:06:08*Kingsquee quit (Quit: Konversation terminated!)
10:45:46*reem quit (Remote host closed the connection)
10:54:33*HakanD quit (Quit: Be back later ...)
11:02:54*HakanD joined #nim
11:08:30BlaXpiritlol finally i realize that regex needs backtracking and i never took it into account
11:09:07BlaXpiritso forget about that "another implementation"
11:09:43*BlaXpirit quit (Quit: Quit Konversation)
11:12:44*BlaXpirit joined #nim
11:17:33*girvo joined #nim
11:22:32*girvo quit (Ping timeout: 265 seconds)
11:28:48*gokr quit (Quit: Leaving.)
11:30:14*filwit quit (Quit: Leaving)
11:43:11*vendethiel quit (Ping timeout: 256 seconds)
11:47:19*zama quit (Ping timeout: 245 seconds)
11:50:43*vendethiel joined #nim
11:58:56*irrequietus quit ()
12:02:19*EXetoC joined #nim
12:07:33singul42*sigh* guess I am giving up. I'll try to write the windows service in freepascal/VC++ and see if I encounter the same problems as in nim.
12:09:40*zama joined #nim
12:13:58*Trustable joined #nim
12:14:09*davidhq joined #nim
12:32:25*irrequietus joined #nim
12:35:26*vendethiel quit (Ping timeout: 244 seconds)
12:47:35*vendethiel joined #nim
12:49:55*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:50:30*HakanD quit (Quit: Be back later ...)
12:53:16*HakanD joined #nim
12:53:18*TEttinger quit (Ping timeout: 256 seconds)
12:57:59*cir0x joined #nim
12:58:39*gokr joined #nim
12:59:05*gokr quit (Client Quit)
13:02:15singul42mhm
13:04:36singul42I couldn't stop debugging and it looks like the real problem is --threads:on when compiling my service. when I omit --threads:on the windows service control manager calls my callback just fine and with --threads:on my service crashes. the funny thing is, I don't use any thread stuff at all in my (test) service.
13:06:19*girvo joined #nim
13:09:58singul42in case someone wants to take a look: http://pastebin.com/nivu6ZBS
13:11:01*girvo quit (Ping timeout: 256 seconds)
13:11:39*Trustable_2 joined #nim
13:13:17*Trustable quit (Ping timeout: 256 seconds)
13:23:29*askatasuna quit (Ping timeout: 256 seconds)
13:24:37*johnsoft quit (Ping timeout: 256 seconds)
13:25:01*johnsoft joined #nim
13:27:36flaviusingul42: If windows has something like gdb, you could try that and see exactly where it crashes.
13:43:32singul42mhm, not sure if that works, because windows is starting my service. However, I am a nim/C/C++ noob and don't know gdb very well.
13:50:37*askatasuna joined #nim
13:54:17singul42flaviu: just tried it. I guess it doesn't work as I need to start the application in gdb, but I cannot do that as windows will start it when I am pressing the "Start" link of the service in the service control manager.
13:55:10flaviuDoes it crash immediately after pressing start?
13:55:51flaviuIn linux, you can attach GDB to a certain PID, that might be possible here if it takes a few moments to crash.
13:55:56*Strikecarl joined #nim
13:56:32singul42kind of. My main procedure is called and inside that I register the callback. After registering the callback it crashes immediatetly
13:56:34StrikecarlIf i want to write stuff to an .txt what lib am i going to use?
13:56:55singul42Strikecarl: import streams
13:57:25flaviusingul42: If you can sleep for 20 seconds or so before registering the callback, you might be able to get GDB hooked on the process.
13:58:05singul42cool, will try that
13:58:47singul42Strikecarl: you can use a FileStream to write stuff to a txt file
13:59:02StrikecarlThanks!
13:59:45flaviuStrikecarl: If this is a single string you're writing, see system.writeFile
13:59:46*leonlee joined #nim
14:02:05*darkf quit (Quit: Leaving)
14:03:36*cir0x1 joined #nim
14:05:14*cir0x quit (Ping timeout: 245 seconds)
14:14:19singul42flaviu: looks like gdb has problems. when using "attach" with the current pid of the waiting service it always tells me "Can't attach to proces"
14:16:56flaviuAre you running it as admin? http://stackoverflow.com/questions/20337870/what-is-the-equivalent-of-system-diagnostics-debugger-launch-in-unmanaged-code might also be helpful
14:19:07singul42flaviu: I am running it under the same user gdb is run
14:19:26flaviuNo, GDB should be run as admin
14:23:53pigmejhmm, what's the recommended debugger ?
14:24:44flaviuWhatever C debugger you prefer. Make sure to use --debuginfo --linedir:on
14:25:06*askatasuna quit (Ping timeout: 272 seconds)
14:26:10pigmejoh cool
14:26:13singul42flaviu: thanks for your help. working now. gdb tells me a SIGSEV happened while exiting nimFrame()
14:26:54flaviusingul42: type "bt" and get the full stack trace. "i lo" to inspect local variables.
14:28:29singul42those are the first 3 entries:
14:28:32singul42#0 0x0042efe6 in nimFrame () #1 0x0042f4be in servicemain_190048@8 () #2 0x761375a8 in SECHOST!I_ScIsSecurityProcess ()
14:29:05singul42servicemain_... is my callback procedure
14:29:26dom96perhaps try --tlsEmulation:on
14:33:09EXetoCdo any gdb frontends come close to the functionality provided by VS? displaying trees and such in ddd is highly inconvenient
14:33:56flaviuEXetoC: You can always eval C expressions, so you can include your own pretty-printer with the program.
14:36:46singul42dom96: same error with --tlsEmulation:on
14:36:56singul42here's the full stacktrace: https://bpaste.net/show/3e8050292e9e
14:40:04flaviuDoes nim need to do some sort of intialization on new thread creation?
14:40:32flaviuI think windows is creating a new thread here, but nim doesn't initialize things
14:40:42singul42I don't know. The segfault only occurs with --threads:on
14:41:06flaviuTry --threads:on and -d:release
14:41:24singul42flaviu: yes, according to msdn docs a new thread is created which then immediatetly calls the given callback function
14:41:48EXetoCflaviu: ok. that's something at least
14:41:49*Sembei quit (Ping timeout: 264 seconds)
14:43:01*untitaker quit (Ping timeout: 264 seconds)
14:46:51singul42flaviu: looks different now with -d:release: https://bpaste.net/show/68b3af2aa7ac
14:47:53*untitaker joined #nim
14:50:29flaviusingul42: Try asking Araq, I have no idea.
14:54:26singul42flaviu: no problem. you already helped a lot. thanks for that :-)
14:55:06*girvo joined #nim
14:57:37*Sembei joined #nim
14:59:33*girvo quit (Ping timeout: 248 seconds)
15:02:25*Strikecarl quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
15:04:35Araqsingul42: is the callback run in a different thread by windows?
15:04:59Araqif so, you need to call setupForeignThreadGc as the first statement in your callback
15:05:32Araqalso --threads:on sometimes causes problems with --tlsEmulation:on and --stackTrace:on
15:05:37Araqon windows
15:05:45Araqtry stackTrace:off please
15:06:15singul42ok, will do
15:06:34singul42Araq: the callback is run in a different thread
15:06:56Araqthen it merely works by chance with --threads:off
15:07:54AraqBlaXpirit: I have a native regex implementation, will push it soon
15:09:32AraqI'm doing regex->NFA->DFA-> optimize DFA -> generate state machine though
15:09:49Araqso it's actually a lexer generator, not a regex engine
15:09:55EXetoCcool
15:11:26*vendethiel quit (Ping timeout: 252 seconds)
15:11:33singul42Araq: it works with --threads:off. I am still unsure why it doesn't work with --threads:on and if possible I want to use threading support.
15:12:02Araqsingul42: stress tested it with --threads:off?
15:12:05singul42Araq: added setupForeignThreadGC() and compiled with --stackTrace:off
15:12:08Araqcause it shouldn't work
15:12:27singul42Araq: still get a segfault
15:12:33singul42Araq: not stress tested yet
15:12:48Araqsingul42: turn off --tlsEmulation
15:15:09singul42Araq: compiled with: nim c --threads:on --lineDir:on --debuginfo --stackTrace:off --tlsEmulation:off
15:15:10*vendethiel joined #nim
15:15:37flaviuAraq: Does it properly handle split? :P
15:15:40singul42Araq: still getting a segfault: #0 0x004140f1 in reallocshared_6089 ()
15:15:51Araqreallocshared?
15:15:56Araqwhat do you do?
15:16:26Araqdo you use some crappy unprotected shared heap logging?
15:17:19singul42Araq: nope, I don't use that anymore :-)
15:17:33singul42Araq: also I don't use any threading stuff for the test
15:17:38singul42Araq: https://bpaste.net/show/bc8917531b4a
15:19:40*leonlee quit (Ping timeout: 264 seconds)
15:19:59Araqstr = newWideCString("SCLogService")
15:20:01Araqarr[0].lpServiceName = cast[LPTSTR](addr str[0])
15:20:11Araq<-- extremely fishy
15:20:24AraqnewWideCString can be collected
15:20:46Araqthough a bit unlikely
15:21:19Araqdoes StartServiceCtrlDispatcher return immediately? I guess not
15:21:52Araqbtw there is os.changeFileExt(getAppFilename(), "log")
15:22:13singul42Araq: thanks for the hint
15:22:36singul42Araq: no, it doesn't come back immediately.
15:24:01singul42Araq: "If StartServiceCtrlDispatcher succeeds, it connects the calling thread to the service control manager and does not return until all running services in the process have entered the SERVICE_STOPPED state." <-- from msdn
15:24:20Araq ServiceMain(
15:24:22Araq _In_ DWORD dwArgc,
15:24:23Araq _In_ LPTSTR *lpszArgv
15:24:25Araq)
15:24:39Araqbut you use Dword, LPTSTR without the *
15:24:48Araqnot that it matters
15:24:56Araqsince you don't access the params anyway
15:27:03Araqget rid of these
15:27:06Araqarr[1].lpServiceName = cast[LPTSTR](0) #NULL
15:27:08Araq arr[1].lpServiceProc = cast[LPSERVICE_MAIN_FUNCTION](0) #NULL
15:27:17singul42LPTSTR is PWideChar which is defined as PWideChar* = ptr uint16.
15:27:19Araqthe array is initialized to 0 already for you
15:27:46singul42msdn says that the last two entries in the array need to be NULL, but I'll try
15:27:54singul42oh, cool
15:27:59Araqthey are NULL already.
15:28:32Araqwhy is this cast[LPSERVICE_TABLE_ENTRY] required?
15:29:46singul42LPSERVICE_TABLE_ENTRY* = ptr SERVICE_TABLE_ENTRY
15:30:11singul42if I don't cast it, I get an compilation error
15:30:19*askatasuna joined #nim
15:30:57Araqwell you shouldn't really
15:31:14Araqthe addr produces a 'ptr' of the right type afaict
15:31:32singul42ok, will change it
15:32:04singul42yes, works with addr only
15:32:31Araqwell I dunno. all I do know is that windows has like 2 different threading models for services
15:32:43Araqor even 4 and it's weird
15:33:31singul42omg
15:33:35singul42WORKS
15:33:43singul42serviceMain is called now
15:33:44AraqI usually used a supervisor script and called the exe on my own. :P
15:34:06Araqit's not like the retarded windows service UI buys you anything anyway :P
15:36:14singul42so, one or more of the last 5 changes did the trick. rolling back now to see what really helped
15:36:34singul42thanks a lot Araq!
15:38:21Araqbtw you can use the RollingLogger as a global variable
15:38:26singul42and also thanks to flaviu for the good gdb advice. much appreciated.
15:38:30Araqbut not its 'ref' variant
15:38:48Araqand even then it kinda relies on implementation details
15:38:52*HakanD quit (Quit: Be back later ...)
15:38:53Araqand is fragile
15:40:42singul42ok, I tested the RollingFileLogger in an separate thread and used a channel to send text to be logged to that thread. that looked like it worked ok. however, I still have to get used to local heaps and channels.
15:42:06*HakanD joined #nim
15:43:58singul42nim is really nice but also very different in some aspects compared to other (high) level languages, such as java.
15:50:09*arnetheduck quit (Ping timeout: 252 seconds)
15:56:07singul42Araq: --tlsEmulation:off did the trick
15:57:13singul42however, I will stress test now with all the changes
16:02:58*banister joined #nim
16:03:06*banister quit (Max SendQ exceeded)
16:04:32*askatasuna quit (Ping timeout: 246 seconds)
16:17:39*jefus__ joined #nim
16:20:38*jefus_ quit (Ping timeout: 246 seconds)
16:43:54*girvo joined #nim
16:48:52*girvo quit (Ping timeout: 272 seconds)
16:49:37*vendethiel quit (Ping timeout: 264 seconds)
16:53:00*banister joined #nim
16:53:05*banister quit (Max SendQ exceeded)
16:58:28*banister joined #nim
16:59:43EXetoCdom96: there's no email authentication associated with password resetting?
17:16:46*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
17:33:11*vendethiel joined #nim
17:40:28*HakanD quit (Quit: Be back later ...)
17:48:47*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:59:11onionhammerwhy is nimble update timing out...
18:05:24BlaXpirithmmm
18:06:15BlaXpirityeah, onionhammer, same
18:06:19BlaXpiritnimble update just hangs
18:06:23BlaXpiritbut the link itself works
18:07:31BlaXpiritworks now
18:07:38BlaXpiritgithub seemed to be partially down
18:09:01*BlaXpirit_ joined #nim
18:09:10*HakanD joined #nim
18:09:47flaviuGithub is under DDOS
18:11:47*BlaXpirit_ quit (Read error: Connection reset by peer)
18:12:23*BlaXpirit_ joined #nim
18:28:44*HakanD quit (Quit: Be back later ...)
18:29:17flaviuhuh, https://raw.githubusercontent.com/nim-lang/packages/master/packages.json works, but https://github.com/nim-lang/packages/raw/master/packages.json fails
18:29:34flaviumight be internal changes, not the ddos
18:29:39*singul42 quit (Quit: Page closed)
18:32:40*girvo joined #nim
18:36:59*girvo quit (Ping timeout: 252 seconds)
18:40:39*gokr joined #nim
18:40:44*gokr quit (Client Quit)
18:40:56*gokr joined #nim
18:42:08*BlaXpirit_ quit (Read error: Connection reset by peer)
18:42:44*matkuki joined #nim
18:42:49*BlaXpirit_ joined #nim
18:50:49*HakanD joined #nim
18:52:48*matkuki quit (Quit: ChatZilla 0.9.91.1 [Firefox 36.0.4/20150320202338])
19:08:38*Varriount joined #nim
19:21:01*BlaXpirit_ quit (Quit: Quit Konversation)
19:24:18*MagusOTB joined #nim
19:24:51*Varriount looks around
19:24:54MagusOTBhow do I seek() and tell() on a file?
19:28:16def-MagusOTB: setFilePos and getFilePos?
19:29:21MagusOTByep, thanks
19:38:09reactormonkhow well does nim-suggest work?
19:41:51*fizzbooze joined #nim
19:51:31dom96EXetoC: I can only reset passwords for now on the forum.
19:53:27*Senketsu joined #nim
20:21:20*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
20:21:27*girvo joined #nim
20:23:17*fizzbooze quit (Ping timeout: 248 seconds)
20:25:01*cir0x1 quit (Quit: Leaving.)
20:26:02*girvo quit (Ping timeout: 252 seconds)
20:51:25*MyMind quit (Ping timeout: 265 seconds)
20:57:21*reem joined #nim
21:04:34*Etheco quit (Quit: Leaving)
21:06:43Trustable_2Hi guys, can iterators be recursive?
21:15:07*Trixar_za joined #nim
21:16:42*fizzbooze joined #nim
21:18:00*Trixar_za quit (Read error: Connection reset by peer)
21:18:10*Trixar_za joined #nim
21:18:39*TEttinger joined #nim
21:21:18Araqno.
21:23:50*EXetoC quit (Quit: WeeChat 1.1.1)
21:25:48*perturbation joined #nim
21:26:36*perturbation quit (Client Quit)
21:26:42*jefus__ quit (Ping timeout: 265 seconds)
21:28:54Trustable_2Araq: ok, I solved my problem without recursion. I just found out , that they are really useful :)
21:29:07Trustable_2the iterators in general
21:32:30*perturbation joined #nim
21:33:15*Trixar_za quit (Quit: Leaving)
21:37:00*Kingsquee joined #nim
21:37:13*girvo joined #nim
21:37:30Araqhi Kingsquee welcome
21:38:06Kingsqueehey Araq, thanks!
21:40:27perturbationanyone else have problems with github today b/c of ddos?
21:42:00*girvo quit (Ping timeout: 256 seconds)
21:43:06TEttingerperturbation: https://status.github.com/messages
21:43:12TEttingerapparently not just today
21:43:17TEttingerbut I haven't had trouble
21:43:51perturbationit's been intermittent in-and-out for me... glad to hear doing better for others
21:43:55perturbationseems to be mostly okay now though
21:44:56TEttingermy commit streak is steady at 289 days on crappy game projects :)
21:45:25TEttingerI haven't been interrupted by DDoS
21:46:32*reem quit (Ping timeout: 256 seconds)
21:47:15VarriountHappily for me, the DDoS started just as I was going to bed.
21:56:38*cyraxjoe joined #nim
22:06:31onionhammerhey varriount
22:06:38onionhammerhows the plugin comin
22:09:36Varriountonionhammer: I think I'm going to have to release it as-is. I'm being overwhelmed by classwork
22:09:52onionhammermmm okay. have u merged it back?
22:10:46*irrequietus quit ()
22:13:32MagusOTBHow do I read some ascii bytes from a file into a string?
22:14:15flaviu.eval let x: string = readFile("/etc/passwd")
22:14:18Mimbusflaviu: <no output>
22:14:50MagusOTBnot the whole file, I have a File f and I want to read exactly 64 bytes out of the file into the string.
22:15:55MagusOTBalso I'm somewhat confused as to what 's: var string' in a proc declaration means.
22:16:27flaviuBasically string &s.
22:16:35flaviuYou have to pass in a mutable string.
22:16:36*flaviu quit (Remote host closed the connection)
22:17:03*flaviu joined #nim
22:18:03MagusOTBwell, I passed it a static string once, and it compiled and segfaulted
22:18:49MagusOTBproc scan(f: File, ret: var string, len: int) = discard f.readBytes(ret, len)
22:19:17MagusOTBit seems to work, and then segfaults when I try to print what I passed in.
22:19:37MagusOTBerr, nevermind, that isn't the version I meant to post
22:20:03MagusOTBf.readBuffer(addr(ret), len)
22:20:20flaviutry addr(ret[0])
22:21:21MagusOTBthat appears to have worked
22:21:51MagusOTBbut now the string contains trailing nulls and when I echo it, it ends instead of printing the stuff that comes after it
22:21:54flaviuI'm not sure, but addr(ret) might have given you an address on the stack.
22:21:59*perturbation quit (Remote host closed the connection)
22:22:05Araqnah.
22:22:17cazovaddr(ret) will give the address of the string, whcih is different from the data subfield
22:22:25MagusOTBaaaah
22:22:27MagusOTBok that makes sense
22:22:44flaviuIf you'd like, use clang and --passC:-fsanitize=address --passL:-fsanitize=address
22:23:16*reem joined #nim
22:23:18MagusOTBthat sounds complicated.
22:24:02flaviuNot really, it just makes clang pop up with a colorful error message on segfault.
22:24:42*perturbation joined #nim
22:24:54MagusOTBhow do I make it use clang?
22:25:01MagusOTBI'm using the out of the box nim on archlinux atm
22:25:10flaviuJust curious, how would I get the address of the string on the stack?
22:25:32flaviutry --cc:clang
22:28:22MagusOTBI lack clang
22:28:24*MagusOTB installs i
22:35:09Varriountflaviu: addr myString?
22:38:00*replace-bot quit (Remote host closed the connection)
22:40:40*girvo joined #nim
22:42:37*perturbation quit (Quit: back later)
22:45:49*girvo quit (Read error: Connection reset by peer)
22:54:08*HakanD quit (Quit: Be back later ...)
23:13:45gokrMagusOTB: http://pastebin.com/sUtCtyVY
23:14:00gokrOr perhaps you had your reasons.
23:19:46*BlaXpirit quit (Remote host closed the connection)
23:32:50MagusOTBgokr: that's different, but I got what I wanted wokring
23:33:19gokrMagusOTB: Yeah, I know, just wanted to mention it so that you weren't complicating things.
23:35:00MagusOTBAlthough now I ave a string which has len 64 and has a bunch of nulls in it and when I format it into another string, the string ends
23:38:31MagusOTBis there a nim equivalent of zip() from python?
23:38:42MagusOTB(takes 2 iterators and returns one iterator which returns tuples)
23:41:07*gokr quit (Quit: Leaving.)
23:48:43*JStoker quit (Excess Flood)
23:48:54*JStoker joined #nim
23:49:45*Maxdamantus quit (Ping timeout: 252 seconds)
23:50:54def-MagusOTB: zip from iterutils should do that, but the module doesn't work with the current devel compiler I think: http://hookrace.net/nim-iterutils/iterutils.html#zip,,Iterable[S]