Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-lwp-gsoc, 2014-07-09

| Channels | #perl6-lwp-gsoc index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:58 FROGGS joined #perl6-lwp-gsoc
06:31 sergot morning o/
07:28 FROGGS joined #perl6-lwp-gsoc
08:11 dalek openssl: d3e3ffa | sergot++ | / (8 files):
08:11 dalek openssl: prototype of the OpenSSL wrapper
08:11 dalek openssl: review: https://github.com/sergot/openssl/commit/d3e3ffac18
08:14 FROGGS sergot: a class is our scoped by default: https://github.com/sergot/openssl/blob/master/lib/OpenSSL/Ctx.pm6#L6
08:15 FROGGS subs are my scoped by default, so you only need to do that there
08:22 sergot FROGGS++: thanks
08:28 dalek openssl: 683fa5e | sergot++ | / (2 files):
08:28 dalek openssl: client/server handling added
08:28 dalek openssl: review: https://github.com/sergot/openssl/commit/683fa5e90c
08:29 dalek openssl: 62a1e60 | sergot++ | lib/OpenSSL/ (4 files):
08:29 dalek openssl: classes are our scoped
08:29 dalek openssl: review: https://github.com/sergot/openssl/commit/62a1e6096d
08:30 dalek openssl: 136003c | sergot++ | t/01-basic.t:
08:30 dalek openssl: plan fixed
08:30 dalek openssl: review: https://github.com/sergot/openssl/commit/136003c895
08:33 sergot FROGGS: btw, I use my .c lib in Io::Socket::SSL, will panda handle it properly?
08:34 FROGGS sergot: probably not
08:34 sergot It works for NativeCall (in testing phase)
08:35 FROGGS the testing phase is not the problem, the problem is that only certain kinds of files get installed
08:35 FROGGS but we will tell panda to do the right thing, one way or the other
08:36 sergot Ok :)
08:43 dalek openssl: 8804f9f | sergot++ | / (2 files):
08:43 dalek openssl: set-fd, connect, accept, write, read added
08:43 dalek openssl: review: https://github.com/sergot/openssl/commit/8804f9f17d
08:45 FROGGS sergot: you can also access the private attr $!ssl here: https://github.com/sergot/openssl/commit/8804f9f17d#diff-4232204bc64eb3f0f0a3b69760ca1c67R28
08:45 FROGGS it is potentially faster
08:45 FROGGS atm you call the public accessort method that return $!ssl
08:45 FROGGS returns*
08:48 sergot hmm
08:49 sergot I wanted to make $.ssl private first
08:50 FROGGS you can make it private, in either way $!ssl would work
08:51 FROGGS but I would not make it private unless there is a reason to
08:52 dalek openssl: e85a38c | sergot++ | lib/OpenSSL.pm6:
08:52 dalek openssl: use $!ssl instead of $.ssl
08:52 dalek openssl: review: https://github.com/sergot/openssl/commit/e85a38c89c
08:53 sergot done :)
08:53 sergot Why ois this faster?
08:53 FROGGS sergot++
08:53 sergot Why is *
08:53 FROGGS what?
08:53 FROGGS ahh
08:53 sergot $! than $.
08:54 FROGGS because $!ssl accesses the attribute, and $.ssl accesses the method that returns the attribute
08:54 FROGGS so $.something is one indirection
08:54 sergot oohhh, ok :)
09:04 dalek openssl: 4b96749 | sergot++ | / (2 files):
09:04 dalek openssl: implement read and write
09:04 dalek openssl: review: https://github.com/sergot/openssl/commit/4b96749daf
09:06 sergot hmm
09:06 sergot should .read be so high lvl?
09:07 FROGGS I think so, yes
09:08 sergot ok :)
09:08 FROGGS though, read should return a buf8
09:08 FROGGS and it should try harder to read $n bytes
09:09 FROGGS recv should return buf8 or Str whether :bin was passed or not
09:09 FROGGS exactly like IO::Socket does it
09:20 sergot ok :)
09:42 dalek openssl: 85f52eb | sergot++ | lib/OpenSSL.pm6:
09:42 dalek openssl: :$bin added to .read
09:42 dalek openssl: review: https://github.com/sergot/openssl/commit/85f52eb7c2
09:42 dalek openssl: a00ab55 | sergot++ | t/01-basic.t:
09:42 dalek openssl: tests fixed
09:42 dalek openssl: review: https://github.com/sergot/openssl/commit/a00ab55010
09:42 dalek openssl: 98f2870 | sergot++ | lib/OpenSSL/SSL.pm6:
09:42 dalek openssl: cleaning
09:42 dalek openssl: review: https://github.com/sergot/openssl/commit/98f28700a4
09:42 sergot .connect behaves odd
09:43 sergot it seems not to return int32
09:53 dalek openssl: 6d7e4d1 | sergot++ | lib/OpenSSL.pm6:
09:53 dalek openssl: shutdown/close added
09:53 dalek openssl: review: https://github.com/sergot/openssl/commit/6d7e4d16d0
09:54 dalek openssl: 6c0efaf | sergot++ | t/01-basic.t:
09:54 dalek openssl: tests cleaning
09:54 dalek openssl: review: https://github.com/sergot/openssl/commit/6c0efaf1fd
09:54 sergot FROGGS: see:
09:54 sergot gcc -shared -o libbuf.so -fPIC buf.c
09:54 sergot perl6 -Ilib t/01-basic.t
09:55 FROGGS and the output?
09:59 sergot not ok 6 - connect
09:59 sergot if I print $ssl.connect it shows:
09:59 sergot (OpenSSL::SSL)
10:00 sergot should be an int
10:01 sergot nothing important now, we ca do this later
10:43 FROGGS that's weird
10:44 FROGGS that does not make sense at all
10:45 FROGGS it cannot be of type OpenSSL::SSL, because that type will not be returned
11:20 sergot https://github.com/sergot/openssl/blob/master/lib/OpenSSL.pm6#L43
11:20 sergot here is the bug, only one ':' there
11:22 FROGGS wow
11:23 dalek openssl: 139d28e | sergot++ | lib/OpenSSL.pm6:
11:23 dalek openssl: bug fixed
11:23 dalek openssl: review: https://github.com/sergot/openssl/commit/139d28e5fe
11:23 FROGGS sergot++ # good catch
11:23 sergot works
11:26 dalek openssl: 5d14406 | sergot++ | t/01-basic.t:
11:26 dalek openssl: test fixed
11:26 dalek openssl: review: https://github.com/sergot/openssl/commit/5d144060e6
11:41 dalek io-socket-ssl: e8da693 | sergot++ | lib/IO/Socket/SSL.pm6:
11:41 dalek io-socket-ssl: use new OpenSSL module
11:41 dalek io-socket-ssl: review: https://github.com/sergot/io-socket-ssl/commit/e8da693305
11:46 dalek io-socket-ssl: 098240f | sergot++ | lib/IO/Socket/SSL.pm6:
11:46 dalek io-socket-ssl: recv, send implemented, prototype of handling server stuff added
11:46 dalek io-socket-ssl: review: https://github.com/sergot/io-socket-ssl/commit/098240f3a1
11:47 FROGGS nice :o)
11:57 sergot where do NativeCall look for native libs?
11:58 sergot I mean, does is native('./libbuf') look for it in currect dir or in dir where the executing file is
11:58 FROGGS the gcc knows where to look at
11:59 FROGGS ./ would be the current dir
11:59 FROGGS because that's absolute
11:59 FROGGS or, wait, gcc is not in charge...
11:59 dalek openssl: 54ea3b5 | sergot++ | t/01-basic.t:
11:59 dalek openssl: read, write tests added
11:59 dalek openssl: review: https://github.com/sergot/openssl/commit/54ea3b57b6
11:59 sergot could you run those tests?
11:59 sergot dont forget about gcc -shared -o libbuf.so -fPIC buf.c
12:00 sergot If I point to './libbuf' where should this file be when panda install it?
12:00 FROGGS perhaps dyncall in MoarVM does the library lookup, not sure
12:00 FROGGS sergot: panda does not install it yet
12:00 sergot I just can't handle with this error
12:01 sergot Will be great if you run those tests :)
12:01 FROGGS yes, give me a sec
12:01 sergot okok :0
12:02 sergot I put libbbuf.so inside ./. lib/, and t/ and it cant find it
12:02 sergot libbuf.so*
12:03 FROGGS damn, I have a conflict in openssl repo
12:03 FROGGS did you force push anything?
12:03 sergot you should remove the old one
12:03 sergot It's totally new now
12:03 FROGGS ahh, okay
12:03 sergot clone it again
12:04 FROGGS got it
12:04 sergot great :)
12:04 FROGGS Cannot locate native library 'libbuf.so'
12:05 sergot right
12:05 sergot same here
12:05 FROGGS -sub get_buf(int32) returns CArray[uint8] is native('libbuf') { * }
12:05 FROGGS +sub get_buf(int32) returns CArray[uint8] is native('./libbuf') { * }
12:06 sergot I was sure I wrote ./ there...
12:26 dalek openssl: 2f26ee4 | sergot++ | t/01-basic.t:
12:26 dalek openssl: tests fixed
12:26 dalek openssl: review: https://github.com/sergot/openssl/commit/2f26ee4425
12:26 dalek openssl: cc79c1b | sergot++ | lib/OpenSSL.pm6:
12:26 dalek openssl: get_buf fixed
12:26 dalek openssl: review: https://github.com/sergot/openssl/commit/cc79c1ba0a
12:31 sergot could you pull and panda install . it?
12:31 sergot then clone https://github.com/sergot/io-socket-ssl
12:32 dalek io-socket-ssl: b1f0f76 | sergot++ | test.p6:
12:32 dalek io-socket-ssl: test.p6 added
12:32 dalek io-socket-ssl: review: https://github.com/sergot/io-socket-ssl/commit/b1f0f76f07
12:32 dalek io-socket-ssl: 1d9af6d | sergot++ | lib/IO/Socket/SSL.pm6:
12:32 dalek io-socket-ssl: hotfix
12:32 dalek io-socket-ssl: review: https://github.com/sergot/io-socket-ssl/commit/1d9af6d237
12:32 sergot and could you try to run test.p6?
12:32 sergot it fails and I have no clue why
12:37 sergot Cannot look up attributes in a type object
12:38 sergot or...
12:39 sergot ok, I know why
12:57 dalek io-socket-ssl: e8ad643 | sergot++ | lib/IO/Socket/SSL.pm6:
12:57 dalek io-socket-ssl: ! instead of .
12:57 dalek io-socket-ssl: review: https://github.com/sergot/io-socket-ssl/commit/e8ad643043
12:57 dalek io-socket-ssl: 58face7 | sergot++ | test.p6:
12:57 dalek io-socket-ssl: make it works
12:57 dalek io-socket-ssl: review: https://github.com/sergot/io-socket-ssl/commit/58face765e
12:57 sergot it works !
13:03 FROGGS \o/
13:04 FROGGS sergot++
13:05 sergot quite big step forward :)
13:09 FROGGS indeed!
13:10 FROGGS and when the api is close enough to IO:Socket::INET we can just switch from ::INET to ::SSL, pass some more options to LQP and we're done
13:10 FROGGS well, "some more options", but still
13:14 sergot yeah, sounds like a pleasure :)
13:17 FROGGS *g*
14:13 ilbot3 joined #perl6-lwp-gsoc
14:13 Topic for #perl6-lwp-gsoc is now logs at http://irclog.perlgeek.de/perl6-lwp-gsoc/
15:54 FROGGS[mobile] joined #perl6-lwp-gsoc
16:13 FROGGS joined #perl6-lwp-gsoc
22:53 dalek joined #perl6-lwp-gsoc

| Channels | #perl6-lwp-gsoc index | Today | | Search | Google Search | Plain-Text | summary