<< 06-11-2014 >>

00:00:08dom96Varriount: I'll give you an account on the VPS anyway though. Send me the username and pass you want for it through PM.
00:01:10*superfunc quit (Ping timeout: 250 seconds)
00:01:25Varriountdom96: Yeah, but the credit isn't indefinate
00:05:11dom96_it'll last for long though
00:14:21dom96Varriount: ok, can you PM me this info please?
00:15:10Varriountdom96: 100$ credit will last for a little less than 2 years.
00:15:43VarriountAlso, I'd rather not have something tied directly to my github account - what if I get run over by a bus?
00:15:43dom96ok, can you send that info?
00:15:55Varriountdom96: What info?
00:16:07dom96<dom96> Varriount: I'll give you an account on the VPS anyway though. Send me the username and pass you want for it through PM.
00:16:07*Trustable quit (Quit: Leaving)
00:19:54Varriountdom96: What is the server hosted on?
00:20:01VarriountErm, the website, I mean.
00:20:40flaviuVarriount: Digital Ocean
00:21:16NimBotAraq/Nimrod devel ee9c70e Araq [+0 ±2 -0]: user defined pragmas work for generics instantiated in different modules
00:21:47Varriountflaviu: Then does the website have ipv6 support?
00:23:02flaviuAsk dom96, I only pretend to know everything :P
00:23:20AraqI'm renaming the git repo to Nim now
00:23:23Araqany objections?
00:24:18dom96why now?
00:24:26dom960.10.0 hasn't been released yet
00:26:19Araqyes, but we can't do the release all at once anyway
00:26:36AraqI'd like to encourage people to already update their Nimble packages
00:26:57Araqnow that bigbreak is devel the exe is already named "nim"
00:28:22*Fran__ joined #nimrod
00:29:02Araqwell?
00:29:03Joe_knockis 0.10.0 being released soon?
00:29:05*Jehan_ joined #nimrod
00:29:31Joe_knockWait, I don't make much contribs, so my voice doesn't matter :P
00:29:48Araqtrue but raise your voice anyway
00:30:26*Francisco quit (Ping timeout: 256 seconds)
00:31:12Joe_knockdom96: makes a valid point. Changing the name to nim should be "step before final release" commit.
00:31:43Joe_knockBut its just a name. Doesn't matter too much.
00:33:51VarriountAraq: Will changing the repo name change the git url?
00:33:59Araqyes
00:34:33VarriountThen it might be better to do this on friday, when most of us will have time to spend picking up stuff.
00:34:45Araqok
00:34:56AraqI want to release this weekend anyway
00:35:24VarriountAraq: Everything that uses the old git url will need to be changed. koch, website, instructions, etc.
00:36:00flaviuVarriount: Github redirects automaticlly it iirc
00:36:35Jehan_I have to say that C keeps surprising me.
00:37:06VarriountJehan_: Howso?
00:37:06Jehan_If you have a call to a non-existent function in a static inline function, the program will still compile cleanly.
00:37:31VarriountEh... what happens if you run the program?
00:37:36Jehan_It'll just run.
00:37:59Jehan_I stumbled over it when trying to compile with nim cpp --threads:on
00:38:11Jehan_There's a reference to pthread_mutex_timedlock()
00:38:17Jehan_Which does not exist on some platforms.
00:38:33Jehan_But because it's hidden away in a static inline function and never used, it compiles on C.
00:38:46Jehan_Whereas on C++, you'll get a compilation error.
00:39:02VarriountJehan_: Is this ensured under the C standard?
00:39:08Jehan_Varriount: I have no idea.
00:39:37Jehan_But both gcc and clang allow it.
00:39:49Jehan_clang will generate a warning for the missing prototype by default, but that's all.
00:44:55Jehan_Araq: It looks like you've renamed branches, PRs w.r.t devel again?
00:45:09Araqyes
00:45:28Araqargh
00:45:35AraqI hunted a phantom again
00:45:52Araqmexport2b.nim vs mexportb.nim
00:46:23Araqseriously, these multi module tests are annoying
00:49:39Joe_knockWait, wouldn't renaming the git repo break older versions of nimrod?
00:49:54Joe_knockor rather, installing older versions
00:50:01VarriountJoe_knock: Howso?
00:50:20Araqnot really, but we have official releases for a reason
00:50:24Jehan_Varriount: I think he refers to scripts that rely on the existing URL.
00:50:40VarriountWhich is why such scripts should be changed.
00:50:55Araqand nimrod-lang.org will be kept for some time
00:51:00flaviuGithub redirects old repo names
00:51:19AraqGithub is really a nice piece of software
00:51:25flaviuhttps://github.com/blog/1508-repository-redirects-are-here
00:51:29Araqthere. I did it.
00:51:49Araqfor the first time in history I praised some software.
00:54:29NimBotAraq/Nimrod devel 9500dfc Araq [+0 ±4 -0]: fixes #1612
00:56:00*darkf joined #nimrod
00:56:44Jehan_Interesting, the compiler can't compile itself with --threads:on, but … because of some really obscure error.
00:57:06VarriountAraq: Oh my goodness. Are you feeling alright? You don't have a fever?
00:58:40VarriountJehan_: But the compiler can compile itself in C++ mode.
00:58:50Jehan_Varriount: That's a different issue now.
00:59:06Jehan_For some reason, --threads:on messes up type inference.
00:59:12Jehan_And I have no clue (yet) why.
00:59:47AraqJehan_: error in rstgen.nim?
00:59:54Jehan_Basically, there's a call to sort in rstgen that uses system.cmp
00:59:55Jehan_Yeah.
01:00:04Jehan_If you change it to system.cmp[string], everything works.
01:00:36Araqthat seems like yet another symbol table bug
01:00:58Araq--threads:on changes hash insertion order pseudo-randomly
01:01:13Araqand the compiler picks a different 'cmp' as default
01:01:16Jehan_Hmm.
01:01:19Araqa serious bug
01:01:22VarriountGah. I just had a horrid idea: A multi-threaded compiler.
01:01:28Araqbut not really thread related
01:01:41Jehan_Araq: Yeah, I mostly found it fascinating.
01:01:46Araqwell that's what I think happens
01:02:39Jehan_Varriount: Not all that bad if you do it right.
01:02:50Jehan_After all, that's pretty much what make -j N does.
01:03:11VarriountJehan_: Doesn't that spawn multiple processes though?
01:03:21Jehan_Varriount: Correct. So?
01:03:33AraqVarriount: visual studio's C# compiler is multi-threaded I think
01:04:03Jehan_Nothing says that a parallel program needs to have massive amounts of global shared state.
01:04:25Jehan_That's mostly because of the atrociously poor support for thread-local data, historically.
01:04:50AraqI disagree slightly
01:05:01*q66 quit (Quit: Leaving)
01:05:14Jehan_Araq: Well, there's more to it. But I think it's a big contributor.
01:05:17Araqthead-local vs global data is a minor issue. the heap itself is shared and continues to be.
01:05:35Araqfor C, C++, C#, D etc.
01:05:48Jehan_Araq: Controlling access to a shared heap (other than for a global GC) isn't hard.
01:06:18Jehan_Liskov and Meyer did it in the 1980s.
01:06:29Araqnot sure what you mean
01:06:34Jehan_We've continued to ignore their lessons for three decades straight.
01:06:45Jehan_Argus (concurrent CLU derivative), SCOOP for Eiffel.
01:07:06Jehan_They had pretty much sorted out how to do the shared heap thing in a safe fashion.
01:09:59*boydgreenfield joined #nimrod
01:11:40*bjz_ quit (Ping timeout: 255 seconds)
01:13:16AraqI'm not sure I agree, but you know much more about these things
01:14:40Jehan_I'm not saying that their solutions were optimal, but there were workable.
01:14:46Jehan_they*
01:15:18Araqjust one remark: when you say that OO lead to a natural solution (the monitor) for controlling concurrency
01:15:55Araqthen I disagree. it wasn't OO, it was the abstract data type.
01:17:34Jehan_Araq: Didn't say that.
01:17:52Araqwell that's what I got from some of your forum posts
01:18:19Jehan_OO has various aspects that often get mashed together.
01:18:55Jehan_I believe I was very specifically referring to object-based programming (i.e. disregarding inheritance) rather than object-oriented programming for this particular case.
01:20:11Jehan_Inheritance does not have much of an effect with respect to concurrency (well, not this aspect of it).
01:20:20Araqah ok
01:22:04*ehaliewicz joined #nimrod
01:26:05Araqgood night
01:27:56*ehaliewicz quit (Ping timeout: 255 seconds)
02:00:47*Joe_knock left #nimrod ("Leaving")
02:10:03*xenagi joined #nimrod
02:11:29*mko quit (Ping timeout: 258 seconds)
02:39:58*boydgreenfield quit (Quit: boydgreenfield)
02:41:48*Jesin quit (Quit: Leaving)
02:46:53*Jesin joined #nimrod
02:54:56*brson quit (Quit: leaving)
03:07:15*Jehan_ quit (Quit: Leaving)
03:12:08*AMorpork is now known as AFKMorpork
03:30:54*flaviu quit (Ping timeout: 244 seconds)
03:45:22*Hakaslak quit (Ping timeout: 256 seconds)
03:47:01*kemet joined #nimrod
03:47:53*BitPuffin quit (Ping timeout: 240 seconds)
03:54:11*kemet quit (Remote host closed the connection)
04:01:05*Boscop quit (Ping timeout: 264 seconds)
04:28:21*dsallbee joined #nimrod
04:28:39*dsallbee is now known as dallbee
04:31:35*dallbee left #nimrod (#nimrod)
04:33:17*mko joined #nimrod
04:34:25*ehaliewicz joined #nimrod
05:43:40*pscha joined #nimrod
05:46:10*pscha quit (Remote host closed the connection)
06:02:43*darkf_ joined #nimrod
06:04:52*xenagi quit (Quit: Leaving)
06:05:10*darkf quit (Ping timeout: 265 seconds)
06:05:56*darkf_ is now known as darkf
06:08:12*BlaXpirit joined #nimrod
06:08:22*boydgreenfield joined #nimrod
06:10:00*kemet joined #nimrod
06:30:46*darkf_ joined #nimrod
06:32:43*darkf quit (Ping timeout: 272 seconds)
06:33:41*darkf_ is now known as darkf
06:40:54*bjz joined #nimrod
07:13:19*kemet quit (Ping timeout: 265 seconds)
07:27:04*skroll1 quit (Ping timeout: 250 seconds)
07:30:28*Trustable joined #nimrod
07:34:41*gokr_ joined #nimrod
07:42:41*skroll1 joined #nimrod
07:46:54*mko quit (Quit: Bye.)
08:04:36*ehaliewicz quit (Read error: Connection reset by peer)
08:08:31gokrVarriount: There?
08:18:42*BlaXpirit quit (Quit: Quit Konversation)
08:26:06*lyro joined #nimrod
08:46:40*boydgreenfield quit (Quit: boydgreenfield)
09:01:39*nande quit (Read error: Connection reset by peer)
10:48:34*EXetoC quit (Read error: Connection reset by peer)
10:52:34*AFKMorpork is now known as AMorpork
11:00:23*rpag quit (Ping timeout: 240 seconds)
11:25:29*BitPuffin joined #nimrod
11:30:56*BlaXpirit joined #nimrod
12:11:42*rpag joined #nimrod
12:19:10*kemet joined #nimrod
12:31:14*BitPuffin quit (Ping timeout: 256 seconds)
12:36:30*Jehan_ joined #nimrod
12:52:54woodgiraffeI'm trying to index a seq via an uint8 and it fails, AFAIS the manual mentions all ordinal types to be legit indexes, uint8 is said to be an ordinal type. - e.g. http://ix.io/f4u - Any pointers on what I'm doing wrong?
13:11:40Jehan_seqs are indexed with ints, you can index an array[uint8, T] with a uint8, though.
13:12:40Jehan_Oh, wait, that's probably actually an unsigned <-> int issue.
13:12:55Jehan_small ints are automatically converted to ints, unsigned ints not.
13:13:22woodgiraffeShall I bug-report?
13:13:46Jehan_I don't think it's a bug.
13:13:59*kemet quit (Quit: Instantbird 1.5 -- http://www.instantbird.com)
13:14:01Jehan_unsigneds and ints don't autoconvert to each other for a reason.
13:15:27woodgiraffeWell, then the manual errs
13:15:41woodgiraffeOn array and seqs: "They can be indexed by any ordinal type."
13:16:40Jehan_Hmm.
13:16:59Jehan_No, it only says that for arrays.
13:17:15woodgiraffeNotice in my example I'm using an array
13:17:42woodgiraffeDoesn't seem to make a difference.
13:17:44Jehan_It works with array[uint8, T]
13:18:43Jehan_Index type has to be declared, otherwise it's a subrange of int.
13:19:30Jehan_Can't index an array[0..9,string] with an enum, either, or an array[SomeEnumType, T] with an int.
13:19:49woodgiraffeI see
14:01:15*gokr quit (Ping timeout: 265 seconds)
14:27:21*gokr joined #nimrod
14:33:20*Jehan_ quit (Quit: Leaving)
14:45:53*dom96_ quit (Ping timeout: 240 seconds)
14:47:38*darkf quit (Quit: Leaving)
14:53:14*kemet joined #nimrod
14:56:52*gokr_ quit (Ping timeout: 256 seconds)
15:03:03*gokr quit (Ping timeout: 265 seconds)
15:18:30*BitPuffin joined #nimrod
15:19:58*BitPuffin quit (Remote host closed the connection)
15:31:03*vendethiel quit (Ping timeout: 272 seconds)
15:33:12*vendethiel joined #nimrod
15:34:33*Jehan_ joined #nimrod
15:38:15*BitPuffin joined #nimrod
15:50:04*Jehan_ quit (Quit: Leaving)
15:55:07*Sembei quit (Ping timeout: 272 seconds)
15:55:23*Jehan_ joined #nimrod
15:59:52*Jehan_ quit (Ping timeout: 245 seconds)
16:00:14*untitaker quit (Ping timeout: 245 seconds)
16:06:02*untitaker joined #nimrod
16:13:55*EastByte joined #nimrod
16:13:55*EastByte____ quit (Read error: Connection reset by peer)
16:23:13*boydgreenfield joined #nimrod
16:35:35NimBotnimrod-code/nimforum new_async dd61f5b Dominik Picheta [+0 ±3 -0]: Implemented side bar.
16:58:52*TylerE joined #nimrod
17:08:39*Matthias247 joined #nimrod
17:14:31*johnsoft quit (Ping timeout: 265 seconds)
17:14:56*johnsoft joined #nimrod
17:16:46*Jehan_ joined #nimrod
17:18:47*dom96_ joined #nimrod
17:22:18*boydgreenfield quit (Quit: boydgreenfield)
17:24:41onionhammerdom96 around?
17:24:50onionhammerdom96_
17:25:58onionhammerdom96 i want to use the new async stuff for httpclient, but it looks like you neglected to include any way to add headers (extraHeaders) on the procs which return Futures
17:29:58*kemet quit (Ping timeout: 255 seconds)
17:35:21*gokr joined #nimrod
17:38:13dom96_yeah, newAsyncHttpClient should have that param.
17:41:41*q66 joined #nimrod
17:42:49*irrequietus joined #nimrod
17:43:41onionhammerdom96_ i think it has 'headers' but its private
17:43:53dom96_yeah, there should be a setter & getter for that I think
17:43:55dom96_make a PR
17:56:16dom96_oh no, headers is used for response headers I think
17:56:25dom96_add an reqHeaders field
17:56:59*Sembei joined #nimrod
17:58:32*BitPuffin quit (Read error: Connection reset by peer)
17:58:47onionhammerI think it'd probably make sense to not just use strings
17:59:07onionhammerthe user shouldnt have to know anything about needing an empty line between headers and content etc
18:01:04onionhammerbigbreak was merged into devel?
18:01:06onionhammer?
18:14:20*boydgreenfield joined #nimrod
18:14:40onionhammerI think all that needs to be done is marking PAsyncHttpClient.headers as public..
18:15:35onionhammeror else you have to add [] and []= for them
18:28:59*rpag quit (Ping timeout: 245 seconds)
18:30:30*johnsoft quit (Ping timeout: 250 seconds)
18:31:12*johnsoft joined #nimrod
18:32:54*tillzy joined #nimrod
18:34:35*Joe_knock joined #nimrod
18:46:27*boydgreenfield quit (Ping timeout: 250 seconds)
18:46:56*gokr quit (Ping timeout: 256 seconds)
18:52:58Araqonionhammer: yup. there is no bigbreak anymore
19:15:56Joe_knockHow did that happen? Did you abandon it?
19:16:31Araqit got merged into devel
19:16:43Araqand to avoid confusion I removed bigbreak afterwards
19:17:07Joe_knockoh, but it still is a bigbreak in terms of breaking the current packages?
19:17:15Araqyes
19:35:11*brson joined #nimrod
19:35:14*gokr_ joined #nimrod
19:36:09*enurlyx joined #nimrod
19:37:15gokr_How can i do -p:../foo in a cfg file?
19:37:34Araq--path: "../foo"
19:37:51Araqyou should be able to use -p, but single character commands are bad style
19:37:52gokr_oh, quotes, cool
19:38:17Araqping Jehan_
19:45:02*tillzy quit (Quit: tillzy)
19:48:51*brson quit (Ping timeout: 250 seconds)
19:58:25*xtagon joined #nimrod
19:59:56*Jehan_ quit (Quit: Leaving)
20:01:20enurlyxgokr_: Thank you for the nice articles. I like to read them :) Also I think it is good for nim
20:01:57ldleworkDid anyone post my article to the reddit?
20:02:04ldleworknpe.
20:17:06gokr_thanks :)
20:21:13*nullmove joined #nimrod
20:24:53nullmoveDoes threadpool have any doc page?
20:25:12*Jehan_ joined #nimrod
20:25:51*BitPuffin joined #nimrod
20:28:25*bjz quit (Ping timeout: 260 seconds)
20:29:45Araqnullmove: nah, I forgot to add it to the docgen process ...
20:30:21Araqping Jehan_
20:30:36Jehan_Araq: pong?
20:31:08Araqhere's the problem: in threadpool.nim:156
20:31:54Araqthe thread may need to wait until the thread that owns the ToFreeQueue clears the queue
20:32:15Araqthis is done in proc slave via cleanFlowVars
20:32:50Araqhowever, it's possible that 'slave' sleeps in line 265
20:33:07Araqand then boom, deadlock.
20:33:28Araqhowever, only the owning thread is allowd to do cleanFlowVars
20:33:31Jehan_Umm, why release before wait in that function?
20:34:03Araqbecause it's the proper way to do it?
20:34:36Jehan_No, pthread_cond_wait() must happen inside pthread_mutex_lock() … phtread_mutex_unlock().
20:35:30Jehan_"The pthread_cond_wait() and pthread_cond_timedwait() functions are used to block on a condition variable. They are called with mutex locked by the calling thread or undefined behaviour will result."
20:35:59*bjz joined #nimrod
20:36:21Jehan_Also, whatever you're waiting on, pthread_cond_wait() may get spurious signals.
20:36:56Jehan_Should always be in a loop: while not condition_represented_by_condvar: wait(condvar, mutex)
20:39:15Araqhrm yes, that should indeed by 'await'
20:39:42Araqbut the other issue remains
20:39:51Araq*indeed be
20:40:19Jehan_acquire(q.lock)
20:40:19Jehan_while not (q.len < q.data.len):
20:40:19Jehan_ wait(q.empty, q.lock)
20:40:19Jehan_ waited = true
20:40:19Jehan_q.data[q.len] = fv.data
20:40:20Jehan_inc q.len
20:40:20Jehan_release(q.lock)
20:40:35Jehan_Araq: Okay, now on to the other problem.
20:43:58*gokr joined #nimrod
20:48:46Jehan_My gut feeling would be to put the ToFreeQueue in a shared heap so that it can be resized when needed.
20:50:23*bjz quit (Ping timeout: 250 seconds)
20:50:30Araqthat dosn't solve anything
20:50:38Araqthe GC_unref is the important operation
20:50:51Araqand that needs to be done by the thread who owns the 'ref'
20:51:00*bjz joined #nimrod
20:51:22Araqbut hrm
20:51:32Jehan_Yup. But this way, you don't have to wait for there to be enough space in the queue.
20:52:03Jehan_The alternative is to keep all flow vars in a linked list of ptrs.
20:52:14Jehan_With a lock for each thread to access the list.
20:52:50Jehan_When you want to put a flowvar in the thread's to free queue, you acquire the lock, update the ptr, then release the lock.
20:53:40Jehan_This actually seems to be the (relatively) simplest solution overall.
20:55:39*bjz quit (Ping timeout: 245 seconds)
20:55:48onionhammeris there a functiokn for parsing a URL or detecting if a string is a url built in somewhere?
20:56:58Araqonionhammer: parseUrl, parseUri, use the index please
20:58:56onionhammeri did use the index
20:59:04onionhammerthere wre some 300 matches for "url"
20:59:09onionhammerand most of them had to do with curl
20:59:14Araqthis is not a simple solution either, Jehan_
20:59:15onionhammerwe need a better index
20:59:24Jehan_Araq: Why not?
20:59:31Araqwe need a trimmed down index, I agree, onionhammer
20:59:47AraqJehan_: because the flowVar is a 'ref'
21:00:03Jehan_Araq: Correct. Which is why you make it a linked list of ptrs.
21:00:37Araqhrm I think I don't get your idea
21:03:36Trustable@Araq: Is csources default branch now compatible with Nim bigbreak?
21:04:06AraqTrustable: csources branches reflect nim branches
21:04:21Trustablegood, I will test now
21:04:26Araqso csources has a devel that can build the devel branch
21:04:43Araqnote that master is still at 0.9.x
21:04:50Jehan_Araq: Give me an hour or so, I can write up the code.
21:05:11Jehan_Probably less, but having occasional RL interrupts.
21:05:11Araqok
21:09:53Trustablebootstrap works, good job :)
21:12:24nullmoveHi Araq , could you explain the disjoin check inside the parallel statement in a somewhat simpler terms?
21:13:23Araqnullmove: er ... that's highly experimental stuff which uses a home grown proof engine
21:14:07nullmoveI mean what is the general idea?
21:14:23Araqthat you want to split your data into disjoint parts
21:14:31*brson joined #nimrod
21:14:44Araqand every part is passed over to a worker thread
21:15:58*brson_ joined #nimrod
21:18:41Araqthe idea is that the compiler cannot do the partitioning for you because that depends on a non-existant cost model
21:19:06Araqbut it can at least check the partitioning you chose is logical
21:19:23nullmoveah ok
21:20:07*brson quit (Ping timeout: 265 seconds)
21:20:43*irrequietus quit ()
21:24:16*brson_ quit (Quit: leaving)
21:24:32*brson joined #nimrod
21:27:30onionhammeryay https://github.com/onionhammer/onion-nimrod/blob/master/pushbullet/pushbullet.nim
21:29:49*nullmove quit (Ping timeout: 246 seconds)
21:35:10Jehan_Araq: Okay, I have an implementation, but the problem seems to be actually that the GC_unref() occurs at all.
21:35:41AraqJehan_: that's another issue. I fixed that, but didn't push yet
21:35:53Araqunless you mean something else
21:35:59Jehan_Ah, alright.
21:36:17Jehan_Let me clean it up and put it where you can see it.
21:39:00*nande joined #nimrod
21:39:11VarriountMeeeep
21:39:32Varriountgokr: I'm here now.
21:39:41gokrHehe
21:40:10gokrSo yeah, you are working on getting buildbot up?
21:40:52*delian66 quit (Ping timeout: 240 seconds)
21:40:58gokrI think I am going to do the same for our internal use - I started with Jenkins but... well.
21:41:16Varriountgokr: Yeah. I was planning on working on the main configuration script.
21:41:45Jehan_Araq: https://github.com/rbehrends/nimrod/tree/flowvar-queue
21:42:04Varriountgokr: There's still a lot of work that needs to be done - I haven't started on the build configurations for manual builds, such as csource and installer generation.
21:42:15*delian66 joined #nimrod
21:42:21Jehan_First commit in that branch contains all the changes.
21:43:21gokrVarriount: I will fire up our box anyway, and perhaps install buildbot on it for our use. Whenever you reach the spot where I can configure it to do some slave work - let me know.
21:43:27*BitPuffin quit (Ping timeout: 272 seconds)
21:43:47gokrWhere is your box btw? Europe?
21:44:06Varriountgokr: At the moment, I'm using my laptop, which is located in the US
21:44:29gokrDoesn't matter of course, just curious.
21:44:33VarriountEventually, the plan is to use the vps hosting the (current, old) build bot.
21:44:45gokrWe have most of our infrastructure at cloudsigma, Las Vegas.
21:45:26Jehan_Araq: What I'm wondering, though, is whether the main thread ever calls cleanFlowVars.
21:45:36Jehan_As far as I can tell, the only call occurs in the worker loop.
21:45:52Varriountgokr: I'm going to make a repository on github that contains the master and slave configuration files for the builders.
21:46:01gokroki
21:46:02Joe_knockVarriount: Digital Ocean?
21:47:02VarriountJoe_knock: Yes.
21:47:14VarriountUnless someone has a better idea.
21:47:19Joe_knockThere are cheaper options
21:48:09*BitPuffin joined #nimrod
21:48:53VarriountJoe_knock: List them then. Again, if there are better options, I'll happily take them.
21:49:20Joe_knockhttps://vultr.com (Should I be giving referral links?)
21:49:40Joe_knockVultr is basically cheaper, with the same quality.
21:50:45AraqJehan_: no, but the main thread never returns a flow var either
21:50:53Araqit's never a worker thread
21:51:03Araqalso your patch can't work
21:51:09Jehan_Araq: Oh?
21:51:21Jehan_For what it's worth, I did test it ...
21:51:47*Mat3 joined #nimrod
21:51:49Araqthe flow var is a 'ref' belonging the thread that spawned
21:51:51Mat3hi all
21:51:59Araqit can be collected any time
21:52:08Araqand then the list is corrupted
21:52:17Jehan_Gotcha.
21:52:30Jehan_So, need a separate list for that, no big deal.
21:53:34Araqwell but it is, kind of
21:53:49Araqyou gonna need allocShared for that
21:53:53Jehan_Right.
21:54:24Jehan_And obviously, right now, allocShared() is a bit of a bottle neck because of the global lock.
21:55:03Jehan_No, actually, there is another solution.
21:55:19VarriountJoe_knock: Right now I'm trying to write an application for https://crissic.net/open-source_free-hosting
21:55:21Jehan_When we allocated the flowvar, we allocate another space for the queue.
21:55:55Jehan_Which gets freed along with the flowvar.
21:56:16Jehan_Eh, nevermind. That's again in the wrong thread.
21:57:13Araqhe he he, it is suprisingly tricky to get right
21:57:30Joe_knockwow, they're as cheap as the other options. Underlying hardware could be ...
21:57:45Jehan_I just want to point out that I've been arguing for multiple shared heaps since forever. :)
21:57:53Araqthe flowvar is from the spawn'ed thread, but the data it keeps alive comes from the worker thread
21:58:00Joe_knockWhat OSS project are you working on? Varriount
21:58:11Jehan_Because they trivialize this kind of problem.
21:58:27Araqyeah but on the other hand we only need to solve it once
21:58:38Araqplus the issue is rather academic
21:58:42Jehan_Well, it's a more general problem.
21:59:07Araqwe can make the array big enough and simply quit when it overflows
21:59:25Jehan_Sharing data between threads is a pretty common desire in multi-threaded applications.
21:59:59Araqor try to save the current solution
22:00:27Araqthe current solution is cool and can be made to work
22:00:40Jehan_The simplest solution is to have a queue that lives on the shared heap and simply allocates only infrequently.
22:00:50Jehan_So it doesn't become a bottleneck.
22:01:11Jehan_Basically, where each node can hold a few hundred fv references.
22:01:57*flaviu joined #nimrod
22:02:02Araqwith some timed await in the slave we can make it free the queue periodically
22:02:14Araqand that solves the problem too
22:02:46Jehan_Timed waiting is always a portability problem, though.
22:02:55Jehan_It's a solvable portability problem, but one all the same.
22:03:06flaviuJoe_knock: The Nim buildbot
22:03:24Araqwell the thing is, I can only produce the problem with ridiculously small queue sizes
22:03:46Jehan_Also has the bad habit of keeping applications on laptops and mobile alive when they don't need to be, thus draining battery life.
22:04:06Araqi can't imagine it can happen when the queue size is 512
22:04:37Araqthat means you have that many pending flowvars and at the same time will never again wake up the thread to do some work
22:04:39Jehan_Araq: I think you'd have to write code to trigger it, but I think it could be done.
22:05:05Araqthinking about it ...
22:05:20Araqit should simply wake up the owning thread ...
22:05:29*Araq feels stupid
22:05:33Jehan_Heh.
22:05:50Jehan_Yeah, that should solve it.
22:06:10Jehan_You'll just have to distinguish between what it's being woken up. Or have a no-op task for this purpose.
22:06:18Araqyeah
22:06:19Jehan_* up for
22:07:19VarriountJoe_knock: Uh, this one?
22:08:06AraqI have to say this thing is remarkably deterministic (on windows at least)
22:08:26Araqquite a joy to debug
22:11:53onionhammerwww.eoleary.me/Blog/Pushbullet
22:14:26flaviuonionhammer: Looks interesting, but 10 seconds isn't long at all. Perhaps 10m would bet better? :P
22:22:10onionhammerlol. it was an example
22:27:23Araqhrm I wonder if we need q.empty at all then
22:27:42Araqif finished simply wakes up the thread anyway
22:27:55Araqand pretends to hand a task over to it
22:27:59*Matthias247 quit (Read error: Connection reset by peer)
22:29:07Araqah but then there is no "task finished" event
22:29:33Araqso that would be the 'empty' event
22:34:11*mko joined #nimrod
22:35:34*Mat3 quit (Quit: Verlassend)
22:36:03VarriountAraq: What would you say were major influences for the design of Nim?
22:36:24Araqthe FAQ answers that
22:36:50Joe_knockPython
22:36:55Joe_knockPascal
22:36:59Joe_knockTurbo Pascal
22:37:16Joe_knockPHP
22:37:19Joe_knockPerl
22:37:26Araq"The language borrows heavily from (in order of impact): Modula 3, Delphi, Ada, C++, Python, Lisp, Oberon."
22:39:30Araqthough now I would argue the Delphi influence is stronger than the Modula 3 influence
22:40:40AraqJoe_knock: PHP and Perl are not in the list
22:40:52Joe_knockI kid I kid.
22:48:08ldlework:)
22:48:11*mko quit (Remote host closed the connection)
22:55:41*Fran__ quit (Ping timeout: 264 seconds)
22:57:05*Fran__ joined #nimrod
22:57:19*mko joined #nimrod
23:00:06*enurlyx quit (Quit: Leaving.)
23:00:43*BitPuffin quit (Ping timeout: 255 seconds)
23:01:20*BitPuffin joined #nimrod
23:07:50*johnsoft quit (Ping timeout: 250 seconds)
23:08:06*johnsoft joined #nimrod
23:09:21*AMorpork is now known as AFKMorpork
23:20:55*BlaXpirit quit (Quit: Quit Konversation)
23:22:00Araqwell this "wakeup" thing produces deterministic crashes
23:22:07Araqand I have no idea why
23:22:38dom96_onionhammer: No. Did you not read what I said? the headers field is used for response headers.
23:23:54Jehan_Araq: What did you change?
23:24:14Jehan_I.e. is there a diff somewhere that I could look at?
23:24:24Araqlet me push it
23:24:57dom96_<Varriount> Eventually, the plan is to use the vps hosting the (current, old) build bot.
23:25:06dom96_No, the plan is to use our new Digital Ocean VPS.
23:27:50NimBotAraq/Nimrod devel b558626 Araq [+1 ±1 -0]: broken attempt to fix queue exhaustion
23:28:08AraqI use the tconvexhull test case
23:37:21*AFKMorpork is now known as AMorpork
23:41:33Joe_knockWhat does the build bot do? dom96
23:41:40Joe_knockdom96_: ^^
23:41:50flaviuJoe_knock: It runs the tests on each commit
23:42:06Joe_knockflaviu: Unit tests, etc. ?
23:42:12flaviuYes, the unit tests
23:42:37dom96_Joe_knock: it bootstraps the compiler and runs the test suite (koch tests)
23:42:48flaviuAnd tests for the general operation of the compiler
23:43:15flaviuJoe_knock: Just an example: http://build.nimrod-lang.org/commits/linux-x86/634852e23df4/testresults.html
23:43:31Joe_knockSo the build bot will pull the commit onto the server, run the tests and send out "a log to say what tests passed/failed" ?
23:47:58AraqJoe_knock: yes and just to prevent rumors. we have such a thing for years now.
23:48:49Araqit's called "nimbuild". however dom96 has not the time to maintain it anymore and so Varriount is trying some alternative software
23:51:03Joe_knockIs this type of tool used for purposes of language/compiler assurance?
23:52:34Jehan_Araq: Hmm, the acquire statement in cleanFlowVars seems to hang.
23:53:03AraqJehan_: the thing is: it doesn't hang for me. it crashes.
23:53:13Jehan_I think that's because the sending thread reacquires the lock before the receiving thread gets the message.
23:53:29Jehan_Ah, I may have a different test case then. What are you using to test it?
23:54:14Araqnim c -r --threads:on tests/parallel/tconvexhull
23:54:55Jehan_Okay, let me look at that.
23:55:42Jehan_Hmm, crashes in GC_unref for me.
23:56:17Araqwell I fixed that in that commit
23:56:48*Trustable quit (Quit: Leaving)
23:56:53Araqbut you're right
23:56:58Araqif I disable that it works
23:57:29Jehan_refcount seems to be zero if I print it.
23:58:17Araqoh yeah
23:58:22Araqmy fix is totally wrong
23:58:33Araqit must not be a RootRef
23:58:41Araqcause that's then followed by the wrong GC
23:58:52Araqit needs to stay pointer
23:59:12Araqand we must make the codegen insert a GC_ref