# IRC log for #parrot, 2012-07-10

All times shown according to UTC.

Time Nick Message
00:00 benabik Going alright, I suppose.  Starting to adapt...  Not sure if we're managing to get more sleep or if we're dealing better with what we're getting.
00:00 benabik Days are alright though.  Newborns are sessile enough that I'm starting to spend time on the computer again.
00:01 benabik (obviously)
00:01 whiteknight it is amazing how quickly your body can get accustomed to the new sleep schedule.
00:01 whiteknight it's never perfect, but it's not as bad as you'd expect
00:03 whiteknight some people get lucky, and theirs sleep through the night from day one
00:03 whiteknight my wife and I were not among that select few
00:03 whiteknight on his first birthday we finally decided enough was enough
00:13 whiteknight okay, here's my new algorithm for the readline:
00:14 whiteknight 1) setup a temporary STRING header for the buffer. Scan it. Search the contents for the substring.
00:14 whiteknight 2) if found, return everything up to the terminator and discard the terminator
00:14 whiteknight 3) if not found, return the first half of the buffer contents. Shift everything forward and fill the buffer. Repeat
00:16 whiteknight well, that's the algorithm for the buffer-related parts
00:45 benabik whiteknight: Oh, he's not sleeping through the night (which is good, because of the jaundice, we need to feed him very regularly)...  But he's sleeping in long enough chunks that I'm not going crazy...
00:45 benabik whiteknight: Except when he just decides to start crying and crying...  Oy.
00:45 benabik (which was right now, if you couldn't guess.)
00:46 benabik whiteknight: Why half?
01:09 whiteknight benabik: just because of the way buffers work. They read from the beginning and fill from the end. When the buffer is less than half full we can memcpy things forward and fill at the end
01:10 whiteknight so if the terminator is more than x/2, there's a chance we read up to the first character, not find enough, and not have enough space to memcpy it
01:10 benabik Ah.  Makes sense.
01:13 whiteknight the old system would try a memmove after every read
01:14 benabik sounds like a lot of extra spinning
01:21 whiteknight the new buffers are definitely faster in the small benchmarks I've tried
01:26 whiteknight anyway, it's go time
01:26 whiteknight later
01:54 aloha joined #parrot
02:18 kid51 aloha, sessile?
02:18 aloha kid51: No clue. Sorry.
04:09 dngor_ joined #parrot
06:22 dalek mod_parrot: de058db | (Bart Wiegmans)++ | / (8 files):
06:22 dalek mod_parrot: more tests and initial work on psgi loader
06:22 dalek mod_parrot: review: https://github.com/bdw/mod​_parrot/commit/de058db752
07:04 brrt joined #parrot
07:24 plobsing joined #parrot
08:05 moritz whiteknight++ # fix the read-beyond-end-of-buf bug in io_cleanup1
08:07 brrt hey, moritz :-)
08:07 moritz \o brrt
08:08 moritz brrt: did you fill out the midterm evaluations already?
08:08 brrt ... i knew i was forgetting something
08:08 moritz go, go, go!
08:08 brrt yes, will do
08:08 brrt oh, as an aside
08:09 brrt what language would you recommend on me teaching my (relatively non-technical) girlfriend as her first language
08:10 brrt .. but I don't know Go
08:11 brrt (isn't that the google language?)
08:11 brrt fair enough
08:11 brrt thats not actually so bad an idea
08:11 tadzik better gather some more opinions, I'm not at all experienced in recommending a first language to anyone :)
08:12 moritz brrt: what does she want to do with it?
08:12 moritz I think I'd teach my wife VBA, because she does lots of work in office
08:12 moritz and none with plain text files
08:12 cotto python's not too bad as a starting language.
08:12 brrt i'm not exactly sure
08:13 brrt i was doubting between python and ruby myself
08:14 cotto perl family languages are great, but you have to ease in to timtowtdi
08:14 * brrt thinks perl is a great language to use, not so much to teach
08:14 brrt there is really a /lot/ to know
08:15 moritz well, if I were to teach a general purpose scripting language it would be perl, because that's the only I know well enough to teach :-)
08:16 lucian joined #parrot
08:27 brrt submitted :-)
08:28 moritz brrt++
08:48 lucian joined #parrot
09:31 brrt anyway.. did anybody ever read and consider my email about the enviroment hash
09:32 moritz I did
09:33 moritz curiously we had a related discussion in #perl6 one or two days before you sent it
09:33 moritz the problem is really that from the outside, a process has just one environment
09:34 moritz and that outside view matters whenever you interact with the outside world (spawn a process, dyncall a C function)
09:34 moritz so if you have per-interpreter or per-thread env hashes, you need to synchronize the outside view with the inside view of your environment
09:35 moritz (which also implies that synchronizing env and doing the call must be an atomic operation)
09:36 moritz which shifts the costs from manipulating ENV to doing external calls
09:36 moritz which might not be desirable for a general-purpose VM
09:41 moritz brrt: though for your purpose it might be desirable to go ahead nonetheless, and have an API for "publishing" and ENV has to the process-level ENV view manually
09:48 brrt oh, sorry, was away
09:49 brrt i see
09:50 brrt ... that sound.. hard
09:50 moritz which part?
09:51 brrt synchronizing the enviroment for dynamic calls
09:51 brrt because, in my planned system
09:51 moritz if you do it automatically, yes
09:51 brrt there might be multiple threads with each a different enviroment
09:52 brrt dyncall would be a locking operation
09:52 brrt each with a different interpreter, even
10:20 Psyche^ joined #parrot
10:30 brambles joined #parrot
11:50 * brrt just noted that there is a [vtable] modifier for winxed
11:50 brrt teh awesome
12:23 kid51 joined #parrot
12:38 whiteknight joined #parrot
12:40 JimmyZ joined #parrot
12:45 mtk joined #parrot
12:54 PacoAir joined #parrot
13:09 brrt ping whiteknight
13:10 whiteknight pong brrt
13:10 brrt hows life :-)
13:10 brrt moritz++ told me to fill in my mid-term evaluation, so i did
13:11 brrt and he also responded to my e-mail about making the enviroment an interpreter-local hash
13:12 moritz (though I replied on IRC; it's in today's backlog)
13:12 brrt saying that it was important (for parrots general purposes) to have the enviroment for the program equal to the enviroment on the outside world
13:12 brrt which is uhm, a hard problem
13:14 whiteknight yes
13:16 moritz which is the reason that mod_perl doesn't use CGI as its API
13:16 moritz that's my guess, at least
13:17 arnsholt More likely that it's an interface to Apache's module functionality, which is pretty different from CGI, I think
13:26 mtk joined #parrot
13:28 brrt ... of course, i can still check modperl
13:28 brrt which would be an awesome idea if that code was remotely readable
13:28 TonyC joined #parrot
13:29 brrt anyway, i can (easily) supply psgi as an api
13:29 brrt but is is a bit more of a setup
13:29 brrt oh, whats more
13:33 bluescreen joined #parrot
13:34 nopaste joined #parrot
14:37 dmalcolm joined #parrot
15:36 brrt folks, i have a quick question
15:36 brrt is there a PIR or winxed equivalent of running bytecode with a specific interpreter
15:36 brrt i.e. Parrot_api_run_bytecode(interp, byteCode, params)
15:36 brrt that would be awesome for my purposes
15:42 whiteknight interp.run(), I think
15:42 whiteknight let me look
15:43 brrt ok
15:44 whiteknight no, that doesn't seem to exist
15:44 whiteknight hmmm....
15:44 whiteknight long ago, An "interp" was synonymous with a "thread". 1 thread = 1 interp
15:44 whiteknight but that isn't really the case anymore, necessarily
15:44 brrt .. no
15:46 JimmyZ_ joined #parrot
15:49 brrt .. i'm going to try constructing 10.000 interpreters
15:49 brrt lets see how long that takes
15:51 brrt 100 interpreters takes 0.675 sec
15:52 jashwanth joined #parrot
15:52 brrt oh, interpreter pmc's do have invoke
15:52 brrt 10 thousand interpreters take 52 seconds
15:53 brrt ergo. 0,0052 s / interpreter
15:55 brrt oh, only about 19 seconds of that is user
15:58 * brrt will experiment with child interpreters
16:00 whiteknight the interp does have an invoke vtable, but that doesn't look extremely useful. If you need a new method added, let me know
16:04 JimmyZ joined #parrot
16:36 Coke at the time I was thinking about doing tcl-level interpreters for partcl, I'm pretty sure parrot wasn't ready. This unhelpful historical comment brought to you by the letter P.
16:36 Coke If time ever permits, I'll get back to it. hopefully brrt will have dealt with it by then. ;)
16:39 whiteknight A lot of improvements to the interp and it's capabilities will fall out of the threading work and the security work
16:40 dalek mod_parrot: 73043aa | (Bart Wiegmans)++ | loader/ (2 files):
16:40 dalek mod_parrot: PSGI loader should work in theory
16:40 dalek mod_parrot: review: https://github.com/bdw/mod​_parrot/commit/73043aaf66
16:40 dalek mod_parrot: d98b20f | (Bart Wiegmans)++ | loader/ (2 files):
16:40 dalek mod_parrot: Bugfix in psgi.winxed
16:40 whiteknight I hope so, anyway
16:40 dalek mod_parrot: review: https://github.com/bdw/mod​_parrot/commit/d98b20fb00
16:45 whiteknight I don't think the ParrotInterp PMC can become any more jumbled or less functional, that's for sure
16:56 jashwanth joined #parrot
17:01 mtk joined #parrot
17:04 contingencyplan joined #parrot
17:56 benabik ~~
18:03 dalek parrot: 29fb14e | alvis++ | docs/project/release_manager_guide.pod:
18:03 dalek parrot: Added myself as release manger for 4.8.0.
18:03 dalek parrot: review: https://github.com/parrot/parrot/commit/29fb14e97d
18:07 alvis left #parrot
18:08 alvis joined #parrot
18:22 travis-ci joined #parrot
18:22 travis-ci [travis-ci] parrot/parrot#474 (master - 29fb14e : Alvis Yardley): The build was fixed.
18:22 travis-ci [travis-ci] Change view : https://github.com/parrot/parrot/c​ompare/66923d2f091f...29fb14e97d1e
18:22 travis-ci [travis-ci] Build details : http://travis-ci.org/parrot/parrot/builds/1828568
18:22 travis-ci left #parrot
18:28 dalek nqp/toqast: d11e353 | jnthn++ | src/QAST/Var.nqp:
18:28 dalek nqp/toqast: Add QAST::Var.default (not needed for Rakudo, but it's part of what replaces viviself, and NQP will need it).
18:28 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/d11e353f40
18:37 brrt joined #parrot
18:45 bluescreen joined #parrot
19:08 brrt joined #parrot
19:11 brrt hey everybody, i'm looking throught the parrot api source files
19:12 brrt i read the comment ' todo this works only for the initial bytecode file ' on Parrot_api_load_bytecode_file
19:12 brrt however
19:12 brrt that function works very well for me, loading multiple bytecode files
19:12 moritz then remove that comment
19:13 brrt :-)
19:19 brrt oh, by the way, calling invoke on a parrot interpreter pmc really quickly leads to core dumps
19:20 brrt so i'm not sure if i'm doing that right
19:26 NotFound joined #parrot
19:26 NotFound ~~
19:27 brrt \o NotFound
19:28 NotFound Hi
19:29 lucian joined #parrot
19:32 cotto #ps time
19:40 sivoais joined #parrot
20:00 dalek PACT: 7d71f38 | benabik++ | src/disasm.winxed:
20:00 dalek PACT: disasm: Remove unused "useful opcodes"
20:00 dalek PACT: review: https://github.com/parrot/PACT/commit/7d71f3826b
20:16 tuxit joined #parrot
20:18 dukeleto joined #parrot
20:18 dukeleto ~~
20:18 dalek PACT: e1b0435 | benabik++ | / (3 files):
20:18 dalek PACT: Introducing PACT.Packfile.Decompile
20:18 dalek PACT:
20:18 dalek PACT: It's just the real guts of disasm pulled out into a 'library'.  Not a
20:18 dalek PACT: good interface right now, but it's enough that I can start trying to
20:18 dalek PACT: test this mess.
20:18 dalek PACT: review: https://github.com/parrot/PACT/commit/e1b0435599
20:58 perlite_ joined #parrot
21:15 bluescreen joined #parrot
21:19 kid51 joined #parrot
22:51 dalek nqp/toqast: b6e9580 | jnthn++ | src/QAST/Operations.nqp:
22:51 dalek nqp/toqast: Start sketching out various exception related operations.
22:51 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/b6e95805b5
23:08 whiteknight joined #parrot
23:44 whiteknight good evening, #parrot