Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2014-02-04

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:04 timotimo it appears that get_bigint gets a pointer-pointer sometimes and a single-pointer at other times from the get_boxed_ref fucntion
00:04 timotimo function*
00:06 timotimo i should do a comparison of the address against likely heap positions and if it seems to be a pointer-pointer, deallocate once more!
00:06 timotimo that's a totally sensible thing to do!
00:07 timotimo i think i fixed it now >_>
00:08 timotimo yeah, it works now
00:08 timotimo but i don't know why i had to do that
00:10 timotimo this is a foundation upon which i can start working with littlebigints
00:20 timotimo now i know why it was wrong
00:20 timotimo so there's something
01:10 japhb__ Knowing why it's wrong is a big thing!
01:21 timotimo :)
01:21 timotimo indeed it is
01:21 timotimo i fear i'll have to endure lots and lots and lots of pain while implementing little_big_int
01:39 japhb__ But just think of the upside!  :-)
01:46 timotimo that's right
01:50 ggoebel1113 joined #moarvm
01:51 timotimo i think we may already win a crapton of memory just by reducing the "how much data to allocate for a fresh mp_int"
01:51 timotimo down from 32 longs to ... 4 longs for example?
01:58 jnap joined #moarvm
02:06 timotimo yeah, -DMP_LOW_MEM already makes a measurable difference to even -e "say 1"
02:06 timotimo not terribly big, but still measurable
02:21 timotimo nope, not actually measurable.
02:21 timotimo er, hold on
02:21 timotimo i built another one with LOW_MEM
02:22 diakopter timotimo: what are you doing awake :)
02:22 timotimo yeah, i'm going to bed right now.
02:22 timotimo gnite
02:22 diakopter o/////
03:17 tokuhirom joined #moarvm
04:15 ingy hi diakopter
04:21 jnap joined #moarvm
05:22 jnap joined #moarvm
05:50 krunen joined #moarvm
06:06 TimToady joined #moarvm
06:23 jnap joined #moarvm
06:39 PerlJam joined #moarvm
06:40 lee__ joined #moarvm
06:45 lue joined #moarvm
06:46 woolfy joined #moarvm
07:27 TimToady1 joined #moarvm
07:59 FROGGS joined #moarvm
08:24 jnap joined #moarvm
09:25 jnap joined #moarvm
10:26 jnap joined #moarvm
10:41 FROGGS joined #moarvm
11:01 diakopter joined #moarvm
11:27 jnap joined #moarvm
12:20 odc joined #moarvm
12:23 JimmyZ joined #moarvm
12:27 jnap joined #moarvm
12:36 nwc10 I have a git submodules question, which will involve a *lot* of swearing soon. :-(
12:36 nwc10 How come Confgure.pl keeps insisting on winding 3rdparty/libuv back to commit 3e054c36294f9d8fc197c9d1b715ea2db334f6bf (Sept 3rd)
12:36 nwc10 which breaks the build
12:37 nwc10 and contradicts the commit I can see in history which says that the correct commit is 666aa2f0683dc8b80954c01e5799d476e4068350
12:37 diakopter did you git submodule update to update it? or update it from within?
12:38 diakopter (I found it makes a difference :S)
12:40 nwc10 I tried from within
12:40 nwc10 in which case, they seem to be a FUCKING STUPID thing.
12:42 nwc10 OK, if I cherry-pick the commit which did the update (ee5a5bd1e4695bc96f9040f4582bc9f2499fe370) then it works
12:42 nwc10 *but* I don't see that commit in the log for the directory
12:45 timotimo as far as i know, you cd to the submodule, checkout the commit you want, cd outwards, git add the submodule and git commit the result
12:45 timotimo and then it should DTRT
12:46 nwc10 no, somewhat confused (oops, I have 3 checkouts) but I do have to cherry-pick that commit
12:46 nwc10 so there is something fucked up here
12:46 timotimo bleh. the task of setting up little_big_int is very daunting
12:46 timotimo it'll most probably be a big chunk of work and in the middle, nothing will work :(
12:47 nwc10 ah shit, I see. I have a cherry-picked commit locally that also unwinds that. Gah.
12:47 nwc10 this stuff is painful
12:48 nwc10 right, because if I check out a different branch, the submodules don't update, but are now different, and git add will suck them in
12:49 timotimo maybe we should switch over to subtree merges at some point :\
12:55 nwc10 FUCK FUCK FUCK FUCK I can't unwind this with git rebase -i
12:55 nwc10 even when I can see what I need to do
12:56 nwc10 this is really blood stupid.
12:56 nwc10 bloody. I can't type.
12:58 timotimo git rebase -i is nothing more than an automatic application of a series of git cherry-pick operations
12:58 timotimo plus it can squash commits into single commits
12:59 timotimo if you can conceive it, you can achieve it!
13:02 nwc10 yes, I did eventually work out which part of this was PEBKAC
13:03 nwc10 but I still don't *like* the submodules
13:03 timotimo yeah, submodules should be amazing and simple and convenient in theory
13:03 timotimo but somehow they end up being super obnoxious
13:28 jnap joined #moarvm
13:32 diakopter nwc10++ # persistence
13:33 dalek joined #moarvm
13:42 tadzik everybody seems to hate submodules
13:56 moritz I mostly hate them because support for them in most git commands is lousy
14:02 tadzik I wonder if subtrees are old enough so we can start using them
14:02 tadzik they're supposed to be less painful
14:02 diakopter ingy made a subcommand that is supposed to be best of both worlds
14:02 diakopter I don't remember what its called
14:06 FROGGS T'Pol?
14:06 FROGGS ohh no, that was a sub commander :o)
14:07 diakopter *snort
14:08 FROGGS sneeze*
14:18 jnap joined #moarvm
15:25 masak tadzik: it always seemed to me that the 'git submodule' command is rather OK, but the essential complexity of submodules is quite horrible.
15:26 masak tadzik: basically, you start asking non-obvious questions of the form "how do submodules interact with feature X" for various values of X, and before you know it, sweat is breaking out on your forehead.
15:26 tadzik heh, yeah
15:29 * masak backlogs and finds this to be the cause of nwc10's swearing
15:30 masak nwc10: I don't know if this helps, but ISTR that the submodule commit information is stored in two places: one is in the appropriate tree object, and one is in the .gitmodules file.
15:30 masak nwc10: but my memory is fuzzy, so don't take my word for it. then again, that may help.
15:40 timotimo the .gitmodules only stores where to clone the commit from
15:40 timotimo iirc
16:15 hoelzro FROGGS: did you finish impl'ing openpipe?
16:15 hoelzro I ended up not bringing my laptop to FOSDEM, so I didn't get to work on it at all =(
16:16 FROGGS hoelzro: http://irclog.perlgeek.de/moarvm/2014-02-03#i_8226084
16:17 FROGGS hoelzro: no worries :o)
16:17 hoelzro ah ha
16:17 hoelzro damn, I was hoping to get my first feature into Moar =/
16:17 hoelzro oh well
16:17 hoelzro the best code is the code you don't have to write, right? =P
16:17 FROGGS so we can write to a pipe, but not read from it
16:17 hoelzro oh, really?
16:17 hoelzro I had it the other way
16:17 FROGGS hoelzro: I have not committed yet :O)
16:17 hoelzro by our powers combined...
16:18 hoelzro I have a party to go to tonight, but I think I have tomorrow to hack on stuff
16:18 hoelzro and I'm going to a Perl hackathon this weekend; most/all of my time there will be on P6
16:18 FROGGS hoelzro: but you used unix's pipe(), and I think we should use lib_uv's stuff
16:18 FROGGS cool!
16:18 hoelzro right, I looked into that
16:18 hoelzro libuv's pipe isn't really a pipe
16:18 hoelzro I mean, it *can* be
16:19 FROGGS the reading-from-a-pipe thing is very weird (when you apply my gist)
16:19 hoelzro but there was some oddness working with them
16:19 timotimo it's just sockets, no?
16:19 hoelzro timotimo: I think on Unix it's impl'd as a socket pair
16:20 FROGGS if I'd know how I would test it on windows
16:20 FROGGS (reading from a child process)
16:20 FROGGS err, writing too
16:23 * FROGGS is totally bamboozled by all these buttons and knobs
16:25 timotimo mhm
16:33 timotimo i'm not feeling up to the task of little big ints right now :(
16:34 timotimo i'll work on ADT instead i guess
16:35 FROGGS I know that feeling
16:35 FROGGS labels... *shudder*
16:35 timotimo :|
16:37 * FROGGS .oO( SHUDDER: )
16:37 timotimo :D
17:16 jnthn evneing o/
17:17 timotimo hey jnthn :)
17:19 * jnthn survived a busy day's teaching
17:20 timotimo does the evening hold some hacking? :3
17:21 jnthn uh...
17:22 jnthn ...one of my colleagues is in town. And he likes curry and beer every bit as much as me. So I fear not.
17:22 jnthn Will have time agian soon, though.
17:23 jnthn Can hack tomorrow evening after the train home....and probably a bit on Thursday too :)
17:23 timotimo that's fair enough :)
17:24 jnthn My first half of next week is weird. I either have teaching in Oslo or teaching on Goteborg or nothing and I still don't actually know. :)
17:27 * moritz recommends teaching nothing in Oslo to stundents from Goteborg
17:29 jnthn :P
17:32 benabik joined #moarvm
17:49 Util joined #moarvm
18:17 FROGGS joined #moarvm
18:38 ingy tadzik, moritz, diakopter, masak: https://github.com/ingydotnet/git-subrepo#readme
18:40 moritz ingy: is that basically infrastructure for the subtree merge strategy?
18:49 FROGGS umm, I can read from a pipe now
18:50 ingy moritz: bbiab
18:52 FROGGS MVMObject * MVM_file_openpipe(MVMThreadContext *tc, MVMString *cmd, MVMString *cwd, MVMObject *env, MVMString *err_path)
18:52 FROGGS does somebody know what the err_path is supposed to be?
18:53 FROGGS that openpipe op really is weird, there is no way I can tell it to open a :rp or :wp (or even :rwp)
18:58 FROGGS jnthn: ping
18:59 moritz I don't think pipes can be :rwp
18:59 moritz I mean, pipes are unidirectional
19:00 moritz (not sure about named pipes, but I don't think they are handled with the same syscalls)
19:01 FROGGS moritz: but what if I want to: $fh = "wc".IO.open(:r, :w, p:); say $fh.print("hello world") ?
19:01 moritz FROGGS: then you need to open two pipes
19:01 FROGGS it would be about two pipes internally (or two streams in case of libuv)
19:02 FROGGS would be more like: $fh = "wc".IO.open(:r, :w, p:); $fh.print("hello world"); say $fh.get
19:03 FROGGS but either way, the current openpipe op has no option about the direction(s)
19:04 FROGGS and then the next question: how do you do Capture::Tiny in perl6?
19:05 FROGGS I can open two pipes, one for stdout and one for stderr... but how do we present this to perl6 land?
19:07 * FROGGS reads http://perlcabal.org/syn/S32/IO.html#IO%3A%3APipe
19:12 FROGGS so: my ($r, $w) = open("/usr/bin/wc", :r, :w, :p).pair( :err(...) ) ?
19:14 moritz maybe we really want my $handle = run('wc', :pipein, :pipeout); $handle.in.say: 'A line'; $handle.in.clone;
19:14 moritz s/clone/close/
19:15 FROGGS it is definitely more about run() then open(), aye
19:15 FROGGS but then again, I do like :r :w :p
19:16 FROGGS stderr does not fit in there sadly
19:16 moritz it fits nicely into run
19:16 FROGGS troo
19:16 FROGGS p: say IO::Pipe
19:16 camelia rakudo-parrot 44ab3c: OUTPUT«Could not find symbol '&Pipe'␤  in method <anon> at gen/parrot/CORE.setting:12232␤  in any  at gen/parrot/Metamodel.nqp:2693␤  in any find_method_fallback at gen/parrot/Metamodel.nqp:2681␤  in any find_method at gen/parrot/Metamodel.nqp:948␤  i…»
19:16 FROGGS k
19:16 moritz and .run really needs to return an object anyway
19:17 FROGGS run('wc', :in, :out, :err) ==> IO::Pipe
19:17 FROGGS what about redirection?
19:18 FROGGS run('wc', :in, :out, :err(:out)) ?
19:21 FROGGS I almost like it
19:24 FROGGS my $word-count = run('wc', :in, :out, :err(:out)); $word-count.in.say: "hooray!"; say $word-count.out.lines; $word-count.close
19:24 FROGGS I am not sure about the close...
19:25 FROGGS should I call it on .in? or this way which calls it on .in/.out/.err?
19:33 TimToady joined #moarvm
20:09 FROGGS qx/qqx does work now too
20:11 nwc10 moritz: IIRC pipes are official unidrectional, but at least something (BSD, so is that everything now) used socketpair() behind the scenes, so pipe were actually bidirectional
20:11 nwc10 FROGGS: yay
20:11 nwc10 I can haz Moar Star?
20:12 FROGGS libuv does not use anonymous pipes... it is a (tcp?) stream or so
20:12 FROGGS but I don't really are as long as it works cross platform
20:14 dalek MoarVM/wip-openpipe: 67a0f6f | (Tobias Leich)++ | src/ (6 files):
20:14 dalek MoarVM/wip-openpipe: implement openpipe, hoelzro++
20:14 dalek MoarVM/wip-openpipe: review: https://github.com/MoarVM/MoarVM/commit/67a0f6fc76
20:23 FROGGS moritz: if we rename IO::Pipe.from/.to to IO::Pipe.in/.out/.err the we can hand that type back for run(Str, :in, :out) *as well as* open(Str, :r, :p)
20:23 FROGGS moritz / TimToady: is that a bad idea?
20:23 FROGGS IO::Pipe.get could then be an alias to IO::Pipe.in.get
20:23 FROGGS etc
20:24 FROGGS print/say would default to .out instead of .err
20:32 jnap joined #moarvm
21:01 FROGGS if there is no intervention until tomorrow evening I'll change openpipe to my needs
21:02 diakopter on windows it uses anonymous pipes I thought
21:04 FROGGS http://nikhilm.github.io/uvbook/processes.html#pipes
21:04 FROGGS Pipes
21:04 FROGGS libuv’s uv_pipe_t structure is slightly confusing to Unix programmers, because it immediately conjures up | and pipe(7). But uv_pipe_t is not related to anonymous pipes, rather it has two uses:
21:04 FROGGS [...]
21:05 FROGGS diakopter: is there a command line utility on windows that reads from stdin?
21:05 diakopter and does what with it
21:05 FROGGS I just wanna tets that I can print to it
21:06 FROGGS wc on linux is nice for testing
21:06 diakopter maybe copy con? :S
21:06 FROGGS I'll find something :o)
23:31 jnap joined #moarvm
23:32 lizmat joined #moarvm

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary