»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:04 Chillance left 00:20 whiteknight joined, cognominal_ left, whiteknight is now known as Guest83593 00:27 gongyiliao left, benabik joined 00:50 leprevost joined 01:25 alester_ joined, alester left, alester_ is now known as alester 01:26 zhutingting joined 01:44 Guest83593 left 01:52 echo joined
moritz japhb: sync'ed 01:53
echo Hi, I am playing perl6 and find that 24*(1+0.06)**384.0 and 24*(1+0.06)**384 will give different answers. Is the later the wrong way to write? thanks. 02:00
I am using rakudo 2012.07
benabik r: say 24*(1+0.06)**384.0 ; say 24*(1+0.06)**384 02:01
p6eval rakudo d71ad1: OUTPUT«125217060205.887␤125217060160.84␤»
moritz nr: say 24*(1+0.06)**384.0 ; say 24*(1+0.06)**384
p6eval niecza v19-15-g051783d: OUTPUT«125217060205.88733␤125217060205.88733␤»
..rakudo d71ad1: OUTPUT«125217060205.887␤125217060160.84␤»
moritz that is... not good 02:02
echo: I fear that's an artifact of how our numbers are stored, and me being too stupid to properly implement arithmetics on them :(
benabik r: say (1.06)**384.0 ; say (1.06)**384
p6eval rakudo d71ad1: OUTPUT«5217377508.57864␤5217377506.70165␤»
moritz that's Rat**Int which seems... less than awesome 02:03
r: 1.06.Num ** 384
p6eval rakudo d71ad1: ( no output )
moritz r: say 1.06.Num ** 384
p6eval rakudo d71ad1: OUTPUT«5217377508.57864␤»
moritz that goes through floating point numbers 02:04
echo I will always write the first one for the moment. Thanks. 02:05
It is tricky. 02:06
another question. If I find something not normal,Is there any place to verify or find if anyone have found that before? 02:08
moritz rt.perl.org/rt3/ has a list of bugs
but the searchability of the RT queue is less than awesome 02:09
echo I read a lot of your tutorial and really thanks.
moritz you're welcome 02:10
colomon echo: easiest thing to do is to ask here (about bugs). :) 02:22
r: say (1.06)**384
p6eval rakudo d71ad1: OUTPUT«5217377506.70165␤»
colomon n: say (1.06)**384
p6eval niecza v19-15-g051783d: OUTPUT«5217377508.578639␤»
colomon n: say (1.06.FatRat)**384 02:23
p6eval niecza v19-15-g051783d: OUTPUT«NaN␤»
02:23 scott__ joined
colomon n: say 1.06.FatRat 02:23
p6eval niecza v19-15-g051783d: OUTPUT«1.06␤»
moritz r: say 1.06.perl
p6eval rakudo d71ad1: OUTPUT«53/50␤»
moritz nr: say (53**384).chars 02:24
p6eval rakudo d71ad1, niecza v19-15-g051783d: OUTPUT«663␤»
colomon n: say ((1.06.FatRat)**384).perl
p6eval niecza v19-15-g051783d: OUTPUT«FatRat.new(13241400660091156056334719701338260226764002303147813802454285456612311964653211447415649668659283876494128843861273631330687331673632294634852991128151336619315546065563567471038214779542711878205563401264431722452303302076085050815665733142294…
colomon oh
moritz why does it stringify as NaN then? 02:25
colomon division issues, I'm guessing
moritz anyway, the problem in Rakudo seems to be an inaccuracy in infix:</>(bigint, bigint)
r: say 1.06.FatRat ** 384
p6eval rakudo d71ad1: OUTPUT«5217377508.57853678158367471577558896911296684033702009137685882134998813049278425115338102763067168317575441624721824489951738517181649000430145886166955575568251095916135729057151636896645750392722496766026338071272892232751692201166059811032002441617787626320865…
colomon n: say ((1.06.FatRat)**384).numerator.Num 02:30
p6eval niecza v19-15-g051783d: OUTPUT«Inf␤»
colomon Ah, that's the problem.
echo Thanks. If I want to read some source code, which part should I start? perl is my first language, then I learn a little bit haskell. 02:33
moritz rakudo does it a bit smarter than first coercing both ints to Num
echo to be frank, I do not know what your are talk about. 02:34
about FatRat issues
moritz echo: FatRat is a way to store rational numbers, with arbitrary precision numerator and denominator 02:35
echo: and niecza has trouble printing 1.06.FatRat ** 384, because both numerator and denominator are too large to fit into a floating point value 02:36
whereas rakudo can print it, but has trouble converting the result to a floating point value again
echo: so, what kind of source code you want to read?
colomon moritz: you can't coerce that Int to a Num, that's the problem. 02:37
echo If just the numeric part in rakudo?
02:37 gongyiliao joined
moritz echo: well, that's a bit spread out :-) 02:38
parsing of numbers is in src/Perl6/Grammar.pm
(number literals, that is)
the core types are defined in src/core/{Int,Rat,Num,Real,Numeric}.pm
and bigint stuff happens in nqp 02:39
colomon: yes. But you don't need to for stringification
02:42 Psyche^ joined, Psyche^ is now known as Patterner
colomon moritz: oh, right, sorry, I read your "bit smarter than first coercing both ints to Num" exactly backwards. 02:42
echo I happen to have a question. several days ago. there is a question in reddit. to get the 10000 digit after the decimal of sqrt(2). It is easy to get arbitrary Int. but it's not easy to get arbitrary precision of float. I just do not have any idea. 02:43
02:44 gongyiliao left
moritz fwiw code that leads to rakudo's wrong results is either in github.com/perl6/nqp/blob/master/s...t.ops#L307 or github.com/perl6/nqp/blob/master/s...nt.ops#L22 02:45
echo: now what's your question?
echo get the sqrt(2) but need 10000 digits after the decimal 02:46
colomon right
moritz echo: do it with integers 02:47
colomon there's no built in way to get that info
moritz basically you need to calculate round(2 * 10^20000)
erm, sqrt(round(2 * 10 **20000))
and get the last digit 02:48
echo I understand
thanks.
moritz our sqrt implementation isn't good enough for that, so you need to write your own iterative sqrt solver
colomon .... that's a lot simpler solution than I was going to suggest
moritz which isn't hard
colomon oh, not so much.
echo I know a little bit of it.
but never think about to change it to an Int problem 02:49
Thanks.
colomon justrakudoit.wordpress.com/?s=pi+spigot might be a start for a different approach.
moritz oh right, spigot algorithms for sqrt(2) exist too 02:50
they are even easier than for pi, iirc
echo thanks.
colomon I need to get the continued fraction module up and running, that would make it easy. 02:51
echo I am curious about your background. You are a phd in physics if i am not wrong. How can you know so much about cs?
moritz echo: it's my hobby :-)
also my minor subject 02:52
colomon moritz++
echo I am not a cs student too. but self learning is not easy. maybe i am not smart.
which books are most useful to know something about the core stuff? 02:53
moritz well, since we are now on the subject of programming and discrete math, Knuth is a good recommendation :-) 02:54
The Art of Computer Programming by D. Knuth
echo they are too big. haha
benabik But informative.
echo I mean several volumes
moritz gist.github.com/3243897 # spoiler 02:56
and it's slooooow 02:57
about a second per iteration or so
echo wow. thanks.
moritz oh
one can start off a bit smarter 02:58
my Int $sqrt = 10 ** 10_000
starting with a guess in the right ballpark makes it run in 13s on my machine
instead of, like, forever :-)
nr: gist.github.com/3243897 03:00
p6eval rakudo d71ad1, niecza v19-15-g051783d: OUTPUT«1␤»
moritz so, that's your answer :-)
just hope it's correct :-)
echo thanks. 03:01
moritz I haven't proven that my sqrt implementation converges on the right number
03:01 orafu joined
TimToady not sure rounding is the correct algorithm either 03:01
moritz it would be much more robust to start with 2 * 10**20_002 03:02
TimToady is the 4th digit of pi 5 or 6?
moritz and take the second-to-last digit
doing that still gives 1 03:03
so, lucky me :-)
niecza++ # running the thing in oly 3s 03:04
n: gist.github.com/3243897
p6eval niecza v19-15-g051783d: OUTPUT«1␤»
moritz now a wee bit robuster
now that $smallone is asleep again, I'll try to do the same 03:05
resleep&
echo I do not know why start point is important?
just for speed? 03:09
diakopter TimToady: you and your rhetorical inquiries.. :P 03:10
echo substr(*-2, 1)->substr(1,*-2) 03:16
03:16 dayangkun joined
echo why I have to put * in front of -2, instead of perl5's way? 03:18
03:20 gongyiliao joined 03:21 zhutingting left
colomon echo: Perl 6 tries to get rid of all the "negative numbers do something magical" things like that. 03:21
diakopter instead, * does something magical 03:22
colomon So *-2 is a simple anonymous function, something like sub ($x) { $x - 2 }
and when functions like substr get a function where they expect to get an Integer, they apply the length of what they are dealing with to the function and use the result as their integer. 03:23
echo understand. It is more uniform. kind of like section in haskell.
colomon nr: my @a = 0..10; say @a[*-1]
p6eval rakudo d71ad1, niecza v19-15-g051783d: OUTPUT«10␤»
colomon nr: my @a = 0..10; say @a[*/2]
p6eval rakudo d71ad1, niecza v19-15-g051783d: OUTPUT«5␤» 03:24
colomon nr: my @a = 0..10; say @a[*.sqrt]
p6eval rakudo d71ad1, niecza v19-15-g051783d: OUTPUT«3␤»
colomon it's one more character to type, but it's more flexible and harder to trigger accidentally. 03:25
echo Yes. but only if you understand. I think.
Your answer help's a lot. 03:26
TimToady n: say $_[-1]
p6eval niecza v19-15-g051783d: OUTPUT«===SORRY!===␤␤Unsupported use of [-1] subscript to access from end of array; in Perl 6 please use [*-1] at /tmp/Ee_E8eyOZB line 1 (EOF):␤------> say $_[-1]⏏<EOL>␤␤Parse failed␤␤»
TimToady at least you can get a decent error message telling you what to do 03:27
03:27 zhutingting joined
colomon n: say substr("This is a test", *-2) 03:27
p6eval niecza v19-15-g051783d: OUTPUT«st␤»
colomon n: say substr("This is a test", -2)
p6eval niecza v19-15-g051783d: OUTPUT«Str()␤»
colomon ...sometimes...
diakopter n: say $_[0-1]
p6eval niecza v19-15-g051783d: OUTPUT«Any()␤»
diakopter r: say $_[0-1] 03:29
p6eval rakudo d71ad1: OUTPUT«Cannot use negative index -1 on Any␤ in method gist at src/gen/CORE.setting:9636␤ in sub say at src/gen/CORE.setting:7028␤ in block at /tmp/rEWeoWV8NT:1␤␤»
diakopter r: say [5][0-1] 03:30
p6eval rakudo d71ad1: OUTPUT«Cannot use negative index -1 on Array␤ in method gist at src/gen/CORE.setting:9636␤ in sub say at src/gen/CORE.setting:7028␤ in block at /tmp/Io2v_sy3oB:1␤␤»
diakopter n: say [5][0-1] 03:31
p6eval niecza v19-15-g051783d: OUTPUT«Any()␤»
echo Is it possible to input multiline sub in the repl. 03:33
for the moment, i can only input one line sub in the repl.
thanks.
03:34 zhutingting left 03:35 zhutingting joined
echo my @a = 1..10; say @a[*/2-1] this works too. 03:40
my @a = 1..10; say @a[*/2-1] this works too
easy way to get the median 03:41
03:47 zhutingting1 joined
sorear you need to sort it first 03:48
echo yes. thanks.
03:49 zhutingting left 03:56 echo left 04:02 echo joined 04:03 echo left 04:08 okiraku_neko joined 04:11 okiraku_neko left 04:15 dayangkun left 04:21 xinming joined 04:39 leprevost left 04:45 skids left 04:52 benabik left 04:54 benabik joined
japhb moritz++ # thank you for syncing the docs 05:13
jnthn, hopefully you will find doc.perl6.org/images/type-graph-Numeric.png more to your liking now. :-)
05:41 zhutingting1 left 05:47 zhutingting1 joined
moritz japhb++ # that one is really cool 05:57
05:58 zhutingting joined 05:59 zhutingting1 left, wtw joined 06:00 cxreg joined 06:18 birdwindupbird joined 06:21 jdrab joined 06:35 kaleem joined 06:53 kaleem left 06:58 kaleem joined
cosimo built the current rakudo. ready to get back on track, testing my modules at least :-) 07:07
and good $morning, #perl6
moritz \o cosimo 07:08
MIME::Base64 is currently broken (on which LWP::Simple depends). Ive submitted a pull request, but snarkyboojum didn't merge it yet 07:11
07:11 SamuraiJack joined
moritz and LWP::Simply might need to replace $str.bytes with $str.encode.bytes 07:15
in fact, LWP::Simply should be switched to use Buf for binary data, but IO::Socket.recv can't handle that yet :( 07:16
07:20 zhutingting left
sorear o/ moritz 07:24
cosimo moritz: saw that 07:29
lately I was wondering if following the p5 model is the correct thing to do 07:30
I mean, it would be easier I guess for people to try out something called LWP::Simple
07:30 zhutingting joined
cosimo but, is that really using the power of perl6? 07:30
I've been reading a bit too many Alan Kay's articles lately :-) 07:31
moritz for any non-Perl user, "LWP" is a terrible name 07:34
07:34 spider-mario joined 07:37 zhutingting left
diakopter acronyms of acronyms usually are 07:38
(imho) 07:39
cosimo there is other perl6 http clients out there, right?
I remember having seen one or two
moritz github.com/supernovus/perl6-http-client/ 07:40
07:41 fhelmberger joined
sorear moritz: so uh. 2 weeks. I need to work out travel and lodging ASAP. stress, ton of bricks, go. 07:41
cosimo github is having some problems for me 07:42
moritz: if that's good, we should probably let LWP::Simple die? 07:43
meanwhile, make spectest is failing for me on t/spec/S02-types/version.t 07:44
moritz that's an odd test to fail on 07:47
cosimo I'm trying (and failing) to obtain verbose test results 07:49
moritz ./perl6 -Ilib t/spec/S02-types/version.t 07:50
tadzik good morning
07:51 zhutingting joined
cosimo moritz: doh 07:53
moritz: paste.scsys.co.uk/204670 07:55
moritz all those greek letters 07:57
cosimo: lemme guess, you don't have ICU installed?
r: say $*VM<config><has_icu> 07:58
p6eval rakudo d71ad1: OUTPUT«1␤»
cosimo moritz: has_icu=0 07:59
08:03 GlitchMr joined
cosimo moritz: what do you say of skipping those tests if has_icu=0 ? 08:05
I can try to write a patch
:)
moritz it's just adding an # icu marker to t/spectest.data 08:06
08:12 b1rkh0ff joined 08:16 xinming left
cosimo moritz: ok 08:19
am I the only one seeing "Something went wrong" all over the place at github? 08:23
no files or commit info showing... 08:25
moritz the things I've looked just now seem to work
cosimo github.com/rakudo/rakudo/ for example is broken for me
tadzik looks good from here
cosimo ? 08:26
moritz loks fiine here too
cosimo my browser probably. using Opera 12.50 ;-) 08:27
08:27 zhutingting left
moritz browserbug! 08:28
cosimo filed too 08:33
12.50 is not out yet
masak good antenoon, #perl6 08:34
GlitchMr You should expect surprises with dev version of browser 08:35
masak moritz: I just found your RFC for the AST docs. (was a little distracted with $family yesterday.) 08:36
moritz: it looks good overall.
moritz: "partially processed" -- I'm thinking whether there is a more exact description than that. 08:37
08:37 crab2313 joined
masak also, it is a good bet that an API will emerge out of the macros work. the trick will be to have it be implementable across implementations. 08:37
cosimo GlitchMr: I use our alphas all the time, even for mail :) 08:38
GlitchMr "On this site, on IRC, and at YAPC::NA 2012 I heard many people comment that Windows users really wanted a binary install option." 08:39
:)
Well, I've moved to Linux, but it's nice nevertheless :) 08:40
cosimo I'm on Linux too 08:42
sorear i wanted a binary install option when I was on a Linux machine with 384 MB of RAM 08:43
hoelzro that's actually an interesting point
GlitchMr 384MB?
That's... really low
sorear now I'm on an OSX machine with 8G, and the need is less pressing
hoelzro I can't install Rakudo Star on my VPS because I run out of RAM =(
GlitchMr But, I guess I had 10 years machine with 128MB of RAM, so whatever
years ago*
sorear GlitchMr: tell that to kid51 and lue both of whom are still on 256
GlitchMr Heh, I'm making a blog layout now :P 08:44
dl.dropbox.com/u/63913412/webdesign.png
I know that I'm not designer :P
tadzik ha, Opera 08:45
tadzik approves
GlitchMr Yes, it's a nice browser
Just don't laugh at my site source: paste.uk.to/b220dee0 and paste.uk.to/abecce20 08:47
Yes, testing
Everything aside of layout is placeholder
08:48 mucker joined
GlitchMr ... actually... I just have noticed placeholderish url() in my CSS :P 08:49
cosimo html5 yea
GlitchMr I would call it pseudo HTML5
sorear sleep& 08:50
GlitchMr I mean, all it uses from HTML5 is DOCTYPE
jnthn morning
tadzik hello jnthn
GlitchMr jnthn proposed me to blog about this DuckDuckGo thing, so I'm now making layout for blog :P 08:51
jnthn \o/ 08:52
GlitchMr++
GlitchMr tadzik: I even use Opera Mini at my phone :P.
Opera Link is so useful
jnthn japhb++ # doc.perl6.org/images/type-graph-Numeric.png is awesome 08:54
GlitchMr It would be nicer if bookmarks would sync between Opera Mini and Opera Desktop, but whatever. As long... "Quick Select" or whatever it is called in English version works it's fine
Just wondering, would it be possible to add my blog to planetsix.perl.org when I will push it to server? 08:58
09:03 mucker left, mucker joined
masak that would most certainly be possible, yes. 09:03
jnthn Should be.
I always forget who has the access to do it.
masak well, if you have an RSS or Atom feed, at least.
GlitchMr I can make RSS feed... 09:06
09:11 Coleoid joined 09:13 brrt joined
cosimo GlitchMr: bookmarks do sync between desktop and mini 09:30
09:31 lauper_cyndi joined
lauper_cyndi I just talked to Keanu Reeves yesterday 09:31
and he made this funny pic on the quickmeme i.qkme.me/3q1yr9.jpg
tadzik heh, I just wanted to paste this as "Look what just appeared on #perl"
masak it's funny, but untrue. I've been using Perl 6 for the past seven years and a half years. it's not impossible to implement. 09:39
s/ years// 09:40
jnthn But it's bloody hard!
:P
09:43 lauper_cyndi left
jnthn
.oO( If it was boringly easy, I'd probably not be here, though, so... :) )
09:44
09:48 driador joined
felher moritz: would you be so kind as to take a brief look and maybe even apply gist.github.com/3240741 ? It didn't introduce any spectest failures :) 09:53
10:00 huf joined
masak felher: looks good -- but allow me to play devil's advocate a little. 10:00
felher masak: sure, go ahead :) 10:01
masak felher: what's the use case? what's the worst thing that happens if we don't give Date.new these defaults?
specifically, do you consider Date.new(2014, 5) more readable than Date.new(2014, 5, 1) ? 10:02
or less?
jnthn masak: This is the constructor taht takes named args
masak oh!
I immediately drop all my complaints. 10:03
felher masak: this is only for the named parameters. So you may write Date.new(year => 1) instead of Date.new(year => 1, motnh =>1, day => 1)
:)
masak but we should maybe consider the option of making all three nameds obligatory instead of giving them defaults.
though I admit my case for that is smaller than if they were positional.
10:04 daxim joined 10:05 SamuraiJack left 10:06 SamuraiJack joined
felher I like to be able to say Date.new(year => 2012). If this isn't used as a abbreviation for 2012-01-01 specifically (in wich case i really would write Date.new(2012,1,1)), it tells me that the other two values are either unimportant or will be filled in later. 10:11
masak: i understand your point, though :)
10:16 scott__ left 10:23 xinming joined 10:28 spider-mario left 10:33 brrt left
felher r: my @array = <blar blubb>; say "blar" ~~ /^ @array $/; 10:44
p6eval rakudo d71ad1: OUTPUT«#<failed match>␤»
felher Hm.. I guess array interpolation into regex is not working yet? :)
hoelzro felher: I don't think any interpolation is working 10:47
wrt rakudo
also, wouldn't it be /^ @array[] /?
hoelzro is not sure
masak I don't think regex interpolation needs the []
10:48 MayDaniel joined
felher hoelzro: thnx :) 10:48
hoelzro oh, good to know!
felher Hm, whatever. I just put a extra testfile in my testsuite, testing array interpolation and assuming it to fail. And as soon as rakudo gets to interpolate @arrays into regex, the test fails and i can substitute the old code with cute new code :) 10:52
10:53 jdrab left, alester left, c1sung_ joined, sftp_ joined, mathw left, Patterner left, preflex_ joined, sporous joined 10:54 preflex_ is now known as preflex, sorear joined, robinsmidsrod joined 10:55 alester_ joined, jdrab_ joined, mathw_ joined, alester_ is now known as alester, rhr_ joined
hoelzro felher: try /^ <@array> $/, maybe 10:55
I'm pretty sure that works with scalars
r: my $o = 'o'; say 'foo' ~~ / <$o> /
p6eval rakudo d71ad1: OUTPUT«q[o]␤␤»
10:55 Psyche^ joined, Psyche^ is now known as Patterner, Pleiades` joined, Pleiades` left, Pleiades` joined
felher r: my @array = <blar blubb>; say "blar" ~~ /^ <@array> $/; 10:56
p6eval rakudo d71ad1: OUTPUT«#<failed match>␤»
10:57 jevin joined
felher hoelzro: thanks, but it doesn't seem to work :) 10:57
hoelzro felher: well, that might not be interpolation-related 10:59
r: my @arry = <o>; say 'foo' ~~ / <@arry> /
p6eval rakudo d71ad1: OUTPUT«q[o]␤␤»
gfldex @array / is correct, see perlcabal.org/syn/S05.html#line_1265
hoelzro your regex just doesn't match!
gfldex: ah, thank you
gfldex if you want to match against the array "foo" ~~ @array will do 11:00
11:00 cognominal joined
gfldex if you want to match against a list of patterns you may be out of luck 11:00
GlitchMr paste.uk.to/6ae1cd74 11:01
felher hoelzro: i guess it is interpolated as a string, currently.
GlitchMr Bored...
felher r: my @array = <blar blubb>; say "blar blubb" ~~ /^ @array $/;
p6eval rakudo d71ad1: OUTPUT«q[blar blubb]␤␤»
felher \o/
looks like string interpolation. :) Not the kind of interpolation i want, but you can't say @arrays don't get interpolated into regex ;)
gfldex felher: it depends whatis in that variable 11:02
if you got a Regexp object, it will call that subrule
that should work for arrays too
11:02 spider-mario joined
gfldex there is some funky syntax to turn a string into a regexp object (and as such a subrule) on the fly 11:03
timotimo r: my @array = <blar blubb>; say "blubb blar" ~~ /^ @array $/; 11:04
p6eval rakudo d71ad1: OUTPUT«#<failed match>␤»
timotimo heh.
11:04 kaleem left, kaleem joined
felher gfldex: good to know, thnx :) 11:05
timotimo: i guess @array gets interpolated into the regex as a string. And since "@array[]" gets you "blar blubb", it matches only "blar blubb", and not "blubb blar". :) 11:06
GlitchMr huh?
Shouldn't interpolating @array in regexp make alternations dynamically?
timotimo it would certainly be pretty cool.
r: my @array = <blar blubb>; my $alt = any(@array); say "blubb blar" ~~ /^ $alt $/;
p6eval rakudo d71ad1: OUTPUT«Can not get non-existent attribute '$!pos' on class 'Cursor'␤ in regex at /tmp/FSbHUNMFab:1␤ in method ACCEPTS at src/gen/CORE.setting:9866␤ in block at /tmp/FSbHUNMFab:1␤␤»
GlitchMr n: my @array = <blar blubb>; say "blubb blar" ~~ /^ @array $/;
timotimo r: my @array = <blar blubb>; my $alt = any(|@array); say "blubb blar" ~~ /^ $alt $/;
p6eval niecza v19-15-g051783d: OUTPUT«Match()␤»
rakudo d71ad1: OUTPUT«Can not get non-existent attribute '$!pos' on class 'Cursor'␤ in regex at /tmp/tyXz46lJbE:1␤ in method ACCEPTS at src/gen/CORE.setting:9866␤ in block at /tmp/tyXz46lJbE:1␤␤»
felher GlitchMr: it should. I just NYI, i guess :) 11:07
GlitchMr n: my @array = <blar blubb>; say "blar blubb" ~~ /^ @array $/;
p6eval niecza v19-15-g051783d: OUTPUT«Match()␤»
GlitchMr n: my @array = <blar blubb>; say ">>" ~~ /^ @array $/;
p6eval niecza v19-15-g051783d: OUTPUT«Match()␤»
GlitchMr huh?
timotimo heh, whoops
that gist (?) of Match is pretty useless ;)
GlitchMr Well, it seems to work in Niecza 11:08
But why it still isn't implemented?
paste.uk.to/3e88451e 11:09
gfldex star: my @array = <blar blubb>; say "blubb blar" ~~ /^ @array $/;
GlitchMr I'm crazy enough to use Jekyll
p6eval star 2012.07: OUTPUT«#<failed match>␤»
GlitchMr It shouldn't match ever
timotimo n: say "blubb blar" ~~ /^ blubb|blar $/;
p6eval niecza v19-15-g051783d: OUTPUT«#<match from(0) to(5) text(blubb) pos([].list) named({}.hash)>␤»
timotimo that's very different from the one where you matched @array 11:10
it seems Match() is nieczas way of saying "no match"
GlitchMr timotimo: are you sure you wanted /[^ blubb]|[blah $]/
timotimo i'm very much not
but that would explain the match
n: say "blubb blar" ~~ /^ (blubb|blar) $/;
p6eval niecza v19-15-g051783d: OUTPUT«Match()␤»
timotimo ah, in that case, it would even be correct
n: my @array = <blar blubb>; say "blubb blar" ~~ /^ @array /; 11:11
p6eval niecza v19-15-g051783d: OUTPUT«#<match from(0) to(5) text(blubb) pos([].list) named({}.hash)>␤»
11:11 cognominal left
gfldex is there any reason why you stick that stuff into a regexp? 11:12
GlitchMr Just wondering, if my array would look like (/./, /../) would it match one or two charcters when inserted to regexp? 11:14
felher gfldex: not for those little examples :) but for someting like "regex date { (\d\d?) '.'? \h* (@month-names) , to match someting like "7. Decemeber". :)
gfldex i would do that with a subrule 11:15
because i doubt the month-names change at runtime
GlitchMr ('a', 'b') should be converted into ['a'|'b'] dynamically 11:16
Simple as that
If I do / @array+ / it should do what I mean 11:17
And + only on last element isn't what I mean
felher gfldex: if you need @month-names somewhere else in your program, you already got it. There is no need for writing them down again. 11:18
Yeah, according to spec /@array/ is the same as /[@array[0] | @array[1] | ... ]/
11:21 JimmyZ_ joined 11:24 crab2313 left 11:31 kaleem left 11:41 birdwindupbird left 11:43 mtk joined 11:46 jaldhar joined 11:49 birdwindupbird joined 11:52 cognominal joined, b1rkh0ff left 12:05 b1rkh0ff joined 12:07 Coleoid left
dalek kudo/nom: 1f662c9 | (Felix Herrmann)++ | src/core/Temporal.pm:
change constructor of Date to use default values for year/month/day

Signed-off-by: Moritz Lenz [email@hidden.address]
12:09
felher moritz++ :) 12:13
moritz felher++ for the patch
JimmyZ_ rn: for (1, 2, 3, 4, 5) -> $x, $y? = 0 { say "$x $y";}
p6eval niecza v19-15-g051783d: OUTPUT«1 2␤3 4␤» 12:14
..rakudo d71ad1: OUTPUT«1 2␤3 4␤5 0␤»
12:14 jaldhar left
moritz r: say Date.new(2012) 12:14
p6eval rakudo d71ad1: OUTPUT«Default constructor only takes named arguments␤ in method new at src/gen/CORE.setting:609␤ in block at /tmp/xz3q5yj59f:1␤␤»
dalek c: a90f472 | moritz++ | lib/Date.pod:
[Date] fix/update constructor signature
12:16
12:18 jdrab_ left 12:19 JimmyZ_ left
moritz continuousdelivery.com/2012/08/why-...gies-suck/ 12:24
arnsholt r: sub foo { nqp::isnull([]) } 12:26
p6eval rakudo d71ad1: ( no output )
12:26 tokuhiro_ joined, gongyiliao left
moritz ok, bad news: I can't attend YAPC::EU 12:29
and I have two of the four accepted Perl 6 talks :(
dalek p: 553ee86 | (Arne Skjærholt)++ | src/ (2 files):
Expose nativecall write-barriering through an nqp::op.
moritz does anybody want to do one of my talks for me? (or both :-)
I have one on exceptions (40 minutes) and one on documentation (20 minutes)
act.yapc.eu/ye2012/talk/4055 12:30
act.yapc.eu/ye2012/talk/4202
dalek volaj: 3bf6712 | (Arne Skjærholt)++ | / (3 files):
Expose refresh op through function, tests for refresh().
12:35
masak moritz: aww :( 12:36
12:36 mucker left 12:37 mucker joined
moritz "aww" indeed 12:39
tadzik sad :(
jnthn :(
moritz: Woulda been really nice to see you again. Hopefully some other time... :)
masak moritz: if jnthn takes one of your talks, I'll volunteer to take the other. unless pmichaud wants the other. 12:40
moritz or tadzik maybe?
masak or tadzik.
tadzik but I'm scared of talks! :)
masak anyway, I volunteer to one of them.
ok, tadzik clearly wants one.
moritz masak: nothing against you, but you already have two talks accepted, no? 12:41
masak aye. consider me a last resort.
GlitchMr dl.dropbox.com/u/63913412/commenting.png
Seems to work...
moritz tadzik: which one do you want? :-)
masak GlitchMr: nice!
GlitchMr I'm testing comments box :)
This is very simple blog layout, but as long it works 12:42
moritz jnthn, pmichaud: what about you? want to take over a talk from me?
starting simple is good 12:43
GlitchMr The only CSS3 thing there is box-shadow 12:44
masak <3 the Perl 6 community
GlitchMr But that's really small thing :)
tadzik GlitchMr: is that written in Perl 6?
GlitchMr No, it isn't
I plan to use glitchmr.github.com for that 12:45
So, it uses Jekyll...
tadzik cool
moritz: why, a shorter one :)
GlitchMr I just want something that works...
mowyw would work too, but whatever :)
tadzik if there's no one better to take it
I didn't even contribute to the docs yet
moritz docs is shorter :-) 12:46
let's wait until pmichaud shows up
tadzik: take is a cue to start contributing to docs :-) 12:47
masak GlitchMr: my blogging platform is based on Jekyll. (that's why it's called "psyde", like "Perl Six Mr Hyde", get it?)
GlitchMr: but I'm not yet ready to package it and recommend it to others.
GlitchMr I like design of your site, masak 12:48
masak thank you.
GlitchMr Especially typography
masak I stole fairly liberally from tomayko.com/ , to be honest. 12:49
GlitchMr Actually, I should use less gray in my layouts, but whatever :P
It's still more colorful than my pastebin (paste.uk.to?) 12:50
I have feeling that this title won't be possible to search on Google or DuckDuckGo, but I don't care about SEO :P 12:51
moritz twitter.com/_Tomalak/status/231305...84/photo/1 12:56
and www.codinghorror.com/blog/2006/11/t...te-ui.html 12:58
in the latter I like it that there's another button for "Pro Mode" :-)
GlitchMr This is obviously the webpage done correct way: glitchmr.pl/~smith/
(well, actually it's old thing, but whatever :P)
moritz Su-Shee's twitter feed is a regular source of delight for me :-) 13:00
GlitchMr ... finally that "Bulk Rename Utility" picture loaded...
You know, I would prefer command line interface
You know, Perl 13:01
Or even... PHP
moritz rename 's/\.txt$/.log/' * 13:02
yes, perl is handy :-)
GlitchMr You know, foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir))) { }
But seriously... RecursiveIteratorIterator O_o? 13:03
jnthn yo dawg...
GlitchMr as $file 13:04
Forgot about this, but whatever
Without RecursiveIteratorIterator it works... except it's not recursive
masak I read a quotation today: "It isn't that they can't see the solution. It is that they can't see the problem." -- G. K. Chesterton, The Scandal of Father Brown (1935) 13:06
GlitchMr I once attempted to make recursive PHP tokenizer
masak made me think about PHP.
GlitchMr Result: github.com/Dirbaio/ABXD/blob/maste...enizer.php
This is my attempt to statistically parse PHP files in order to generate tools which for example generate translations 13:07
But... somehow it works 13:08
moritz r: say Iterable.^mro 13:13
p6eval rakudo 1f662c: OUTPUT«Iterable() Cool() Any() Mu()␤»
moritz r: say Iterator.^mro
p6eval rakudo 1f662c: OUTPUT«Iterator() Iterable() Cool() Any() Mu()␤»
moritz pmichaud: I find it dubious that Iterable inherits from Cool. That might work out well for core types, but might cause problems for non-core types that want to be iterable 13:14
jnthn I think Iterable is meant to be a role
Eventually
moritz and Iterator too? 13:16
jnthn No, Iterator is probably a class.
moritz I think roles fit better for both of them
r: say Range.^mro 13:19
p6eval rakudo 1f662c: OUTPUT«Range() Iterable() Cool() Any() Mu()␤»
moritz I thought Range was also its own iterator? shouldn't it inherit from Iterator then? 13:20
13:20 bluescreen10 joined
moritz r: say Hash.^mro 13:20
p6eval rakudo 1f662c: OUTPUT«Hash() EnumMap() Iterable() Cool() Any() Mu()␤»
13:23 JimmyZ joined 13:29 kaxing joined 13:31 skids joined 13:37 thou joined
arnsholt jnthn: BTW, I've been thinking of starting on some proper documentation for Zavolaj. You have any thoughts on what the proper way to do that would be? 13:41
masak .oO( show, don't tell ) 13:44
arnsholt Troo 13:45
But also thinking of purely practical matters, like where the docs live
moritz pod6 in NativeCall.pm6
masak +1
arnsholt I could go with inline POD, but a lot of the things we want to document are actually not implemented in Zavolaj, but NQP 13:46
moritz a user doesn't care where it's implemented
arnsholt Although, I guess that's not necessarily a problem
moritz a user cares for the API she uses 13:47
JimmyZ pod6 in NQP
arnsholt No. Docs in NQP are definitely not an option
moritz: Definitely 13:48
JimmyZ docs dir in Zavolaj ? 13:49
masak arnsholt: here's the thing: your job is to pretend really hard to be a user thirsting for information, and then putting the information where the user is likely to go, and have it be of the nature that the user is likely to need.
arnsholt pod6 in NativeCall.pm6 it is =)
Or possibly NativeCall.pod6 13:50
Since I suspect the docs may end up being at least as long as the code
masak "f you have extra docs (in addition to the Pod docs in your module(s)), create a doc directory for them." -- wiki.perl6.org/Create%20and%20Distr...%20Modules
If*
moritz that's all fine, but do we support installing docs from a doc dir?
masak arnsholt: the docs being at least as long as the code doesn't stop most CPAN modules from putting the docs right in the .pm file.
moritz perl6/doc has all the docs in .pod files in lib/ 13:51
arnsholt Hmm. I think the conclusion is: stop thinking, start writing 13:55
As always, when it comes to me and writing stuff, I guess ^_^
masak cult of done. 13:56
13:57 wtw left
PerlJam arnsholt++ (does karma encourage you to start writing? ;) 13:57
arnsholt: fwiw, I'd probably go with NativeCall.pod6 13:58
13:59 fhelmberger left 14:00 TBA joined, tokuhiro_ left
TBA hi all, quick p6 question 14:00
masak shoot
arnsholt PerlJam: Karma isn't an important motivator for me, but thanks for the thought =)
TBA i can do this: my $a = sub { "abc" }, and pass $a to a method as a parameter
how do I refer to one inside a class, i.e.
masak TBA: aye.
TBA class X { method Y { "abc"; } }; 14:01
and pass X.Y() as a parameter?
moritz X.^find_method('Y')
TBA that wouldn't pass to the instance though right?
moritz it is not done often for methods, because then you have to supply invocant yourself 14:02
masak r: class A { method foo { say "OH HAI" }; method bar($method) { say "calling method $method.name()..."; $method() } }; A.new.bar( A.^find_method('foo') )
moritz (invocant = the object on which the method is called)
p6eval rakudo 1f662c: OUTPUT«calling method foo...␤Not enough positional parameters passed; got 0 but expected 1␤ in method foo at /tmp/3oQxpnOjit:1␤ in method bar at /tmp/3oQxpnOjit:1␤ in block at /tmp/3oQxpnOjit:1␤␤»
masak r: class A { method foo { say "OH HAI" }; method bar($method) { say "calling method $method.name()..."; self.$method() } }; A.new.bar( A.^find_method('foo') )
p6eval rakudo 1f662c: OUTPUT«calling method foo...␤OH HAI␤»
masak \o/
PerlJam Apparently the invocant is very important :) 14:03
moritz if you want to supply your own invcant, you can also pass { $obj.Y } to the sub
TBA hm, neat, but no easier way? my specific use case is to pass a method to HTTP::Server::Simple::PSGI's app parameter, but a method of a class instance
i.e.
my $app = App.new; given HTTP::Server::Simple::PSGI.new(81) { .host = '0.0.0.0'; .app(); .run; }
or do I just need to write a sub that dispatches to the method in the instance and pass that in?
moritz that's the easiest way 14:04
though a block will do
TBA the sub bit I get, how would I do it as a block?
moritz as a sub: sub () { $obj.app } as a block: { $obj.app }
erm, wait 14:05
masak TBA: "a method of a class instance"? instances don't have methods, classes do.
moritz somehow your question doesn't really fit the example you posted
masak indeed.
moritz given $obj { ... } sets $_ = $obj
so .app() calls $_.app, which is now $obj.app 14:06
it's not passing a code object to anything at all
14:07 cognominal left
masak yes, the use case doesn't require any trickery with method objects. 14:07
it Just Works. 14:08
dalek c: e9f2f73 | moritz++ | lib/Itera (2 files):
Iterator, Iterable (very incomplete)
14:09
14:12 PacoAir joined
TBA ok let me try again :) 14:12
arnsholt masak: Cult of done was pretty good. Thanks
TBA here's what I had: 14:13
my $app = sub { return [200, ["Content-Type" => "text/plain"], "This is plain text"]; }; given HTTP::Server::Simple::PSGI.new(81) { .host = "0.0.0.0"; .app($app); .run; } 14:14
masak arnsholt: yeah, I like it. 14:15
TBA what I'd like to do is make the "my $app = sub" bit part of a class, e.g.
masak arnsholt: strangelyconsistent.org/blog/the-cult-of-done
TBA class A { method run ($env) { return [200, [ "Content-Type" => "text/plain" ], "This is plain text"]; } }
then
my $app = App.new; given HTTP::Server::Simple::PSGI.new(81) { .host = "0.0.0.0"; .app(???); .run; }
im just confused about what I put in the .app() bit 14:16
masak TBA: I still have the feeling that you're trying to fit a square piece into a round hole somehow. 14:17
14:17 JimmyZ left
masak but I can't quite put my finger on it. 14:17
TBA er, well, thats quite possible...
[Coke] are you trying to pass in the new PSGI object? $_ then. 14:18
moritz what does the documentation say?
TBA no, I'm trying to pass in a method inside an object to .app when constructing the PSGI object 14:19
masak TBA: just post the object on which the method can be called!
TBA: then call the method in the callee.
why dislodge the method and pass only it?
TBA your probably right 14:20
but that would require changing PSGI module?
masak if you have something callable *inside of a class*, it's probably because it needs its surrounding object environment, no?
TBA yes, but I was hoping t.... oooohh wait
i was hoping to pass the invocant too
but i've just realised how stupid i'm being :)
masak if you want to pass the invocant, then a sub is your best bet. 14:21
like moritz++ said.
moritz or you just pass the object
then you also have the invocant :-)
but you need to know which method to call
TBA I think I should probably just construct the PSGI inside the App class...
i'm confusing myself now, long day! i'm not even sure what I want anymore.... 14:22
I don't think I even need (or want) the App class, I can just use a sub like I was in the first place! 14:23
will have a think about this over the weekend, I might be back first thing monday though :p
thanks all :)
masak np
14:24 TBA left, mucker left 14:41 kaxing left 14:42 thelazydeveloper joined
masak "If you declare that you support a platform, you don't just TODO failing tests for it when introducing a mostly unrelated feature. If you do, the support for the platform is second class [...]" -- moritz++ on parrot-dev 14:49
pmichaud moritz++ # parrot-dev post 14:52
good morning, #perl6
colomon o
masak pmichaud! \o/
colomon is apparently too tired to lift an arm
masak colomon: that's the first *non*-wave I've seen on the channel!
colomon \o/
pmichaud colomon: either that, or you're just disarmed by my presence :-)
masak colomon++ # novelty
pmichaud++ # punitude 14:53
pmichaud moritz: I'll take over a talk.
pmichaud skims backscroll, sees his name 14:54
masak \o/
pmichaud I'll happily take either talk.
pmichaud reads backscroll for detail
masak moritz: will you still be able to write proceedings for your talks? or were you not planning to do that? 14:55
pmichaud I'm somewhat assuming that "taking the talk" also involves "write the proceedings" if needed :) 14:56
masak me too; just thought I'd raise the matter.
jnthn morning, pmichaud 14:57
pmichaud I'll also happily defer to anyone else that wants to take a talk. I'm attending YAPC::EU regardless, although I do so love to have an opportunity to present. :) 15:00
...and I'm very sad that moritz++ apparently won't make it. :-(
at this point I don't want Range to inherit from Iterator; the latest incarnation of flattening behavior seems to make a strong distinction between Iterable and Iterator 15:01
the point about Iterable needing to be !~ Cool is an extremely good one.
of the two talks, I feel like I'd prefer the docs talks. 15:04
*talk
jnthn If I'm gonna take one, I'd be more suited to the exceptions one.
jnthn should check what's in it though 15:05
pmichaud yeah, I can do either talk; but I'm slightly more passionate about the docs one :)
jnthn is better at more technical talks :) 15:06
pmichaud jnthn: yes, and given that you had to work on exceptions for the qast conversion, I suspect you're more tuned to it than I am at the moment. 15:07
masak briefly considers writing both his talks but letting tadzik deliver one of them...
jnthn pmichaud: "had to" captures my feelings on it quite well :P 15:09
(I like what moritz++ has done, and the Perl 6 exception model. But the mapping of it down to the VM is little fun to hack on...)
Thankfully the talk seems quite clearly about the things I like. :) 15:10
pmichaud (in fact, p6doc was a talk I considered proposing, but didn't because I knew that moritz++ would be proposing the talk :) 15:14
15:27 UncleFester6 joined 15:29 zhutingting joined 15:34 sftp_ left 15:35 cognominal joined 15:36 sftp joined, sftp left
[Coke] Anyone have a *bsd setup available for continuous integration for rakudo/parrot? could we perhaps setup another vm on feather running a *bsd? 15:37
15:42 sftp joined 15:43 sftp left 15:52 sftp joined 15:57 SamuraiJack left, benabik left 15:58 benabik joined 16:01 SamuraiJack joined 16:05 cognominal left 16:09 birdwindupbird left 16:18 kaare_ joined
PerlJam xkcd.com/1090/ 16:25
16:28 cognominal joined 16:30 cognominal_ joined
masak *lol* 16:30
au that was remarkably context-free. 16:31
GlitchMr I once have made language where every program is valid grammatically 16:33
geekosaur *headdesk* at context-free "grammar"s
16:33 cognominal left
PerlJam be free from the tyranny of context! 16:34
(use Perl ;)
UncleFester6 r: my $x = Buf.new(10, 13); my $y = Buf.new(65, 10, 13); if $x ne $y {say "ok"}; say $y[1 .. 2].perl; if $x eq $y[1 .. 2] { say "ok" }
p6eval rakudo 1f662c: OUTPUT«ok␤(10, 13)␤Cannot use a Buf as a string, but you called the Str method on it␤ in method Str at src/gen/CORE.setting:6789␤ in method Stringy at src/gen/CORE.setting:726␤ in sub infix:<eq> at src/gen/CORE.setting:1038␤ in block at /tmp/OOHiXZ_I31:1␤␤»…
UncleFester6 with the eq at the end - am I asking for a feature or can I complain about a bug? 16:35
16:35 pmurias joined
PerlJam Hmm. 16:35
pmurias jnthn: what would be the best way to make the js backend pluggable into the normal rakudo? (so I won't have to maintain/merge over the fork) 16:37
jnthn: by pluggable I mean having it in a seperate repo but making it possible to "combine" it with rakudo somehow
the backend is mostly isolate in one file for now 16:38
masak UncleFester6: yeah, I don't think Bufs should be comparable with 'eq' or 'ne'. too confusing. 16:39
they're really more lists in that regard.
UncleFester6 masak: Does not agree with S34 see perlcabal.org/syn/S32/Containers.ht..._Operators 16:40
s/S34/S32
GlitchMr perl6: sub infix:[]($a, $b) { say 'GRAMMAR!' #`(I know that it's invalid according to STD, but who cares? ) }; 'GRAMMAR' '!!!'
p6eval niecza v19-15-g051783d: OUTPUT«Potential difficulties:␤ $a is declared but not used at /tmp/AO8ZwnAMAy line 1:␤------> sub infix:[](⏏$a, $b) { say 'GRAMMAR!' #`(I know that ␤ $b is declared but not used at /tmp/AO8ZwnAMAy line 1:␤------> sub infix:[]($a, ⏏…
..rakudo 1f662c: OUTPUT«GRAMMAR!␤»
GlitchMr std: sub infix:[]($a, $b) { say 'GRAMMAR!' #`(I know that it's invalid according to STD, but who cares? ) }; 'GRAMMAR' '!!!' 16:41
p6eval std f43a358: OUTPUT«===SORRY!===␤Null operator is not allowed at /tmp/HZmAGkXjk6 line 1:␤------> sub infix:[]⏏($a, $b) { say 'GRAMMAR!' #`(I know that␤Parse failed␤FAILED 00:00 40m␤»
PerlJam UncleFester6: $y[1..2] isn't a Buf though.
r: my $x = Buf.new(10, 13); my $y = Buf.new(65, 10, 13); my $z = Buf.new($y[1..2]); say "ok" if $x eq $z; 16:43
p6eval rakudo 1f662c: OUTPUT«ok␤»
16:45 fgomez joined
UncleFester6 r: my $y = Buf.new(65, 10, 13); say $y[1 .. 2].WHAT 16:45
p6eval rakudo 1f662c: OUTPUT«Parcel()␤»
PerlJam Though that error message was LTA as far as helping you figure out what's going on. That's the real bug IMHO 16:46
jnthn pmurias: One way is to just have a different frontend.
pmurias: You'll note there's a src/main.nqp
pmurias: You can have it declare a subclass of Perl6::Compiler that has a js method, and then write it up as a compilation stage. 16:47
*wire
That is to say, make a copy of main.nqp and call it js.nqp or so 16:48
Somewhere I made a gist where I showed cognominal++ how to do something like this but to get it to spit out the parse tree as JSON instead...
pmurias: gist.github.com/3079610 16:50
TimToady r: my $x = Buf.new(10, 13); my $y = Buf.new(65, 10, 13); if $x ne $y {say "ok"}; if $x eq $y.subbuf(1,2) { say "ok" } 16:52
p6eval rakudo 1f662c: OUTPUT«ok␤ok␤»
PerlJam subbuf? nice.
masak any good reason .[] doesn't do what .subbuf does? 16:54
16:54 sisar joined
sisar o/ 16:54
PerlJam any good reason .[] doesn't do what .substr does? ;) 16:55
masak sisar! \o/
PerlJam: yes. strings are scalars in Perl.
they don't have list nature.
TimToady because listy things stringify with spaces?
UncleFester6 Search for subbuf in synopses came up empty. Where documented? 16:57
nice feature 16:58
PerlJam UncleFester6: seems like there should be a S32-setting-library/Buf.pod doesn't it? 16:59
masak I hadn't heard about it before, and I think it looks like a poor man's .[]
what's the use of being able to overload .[] et al. if we don't even do it ourselves in the core library?
s/use/point/ 17:00
jnthn r: my $b = Buf.new(65, 66, 67); say $b[1] # you mean like this? 17:01
p6eval rakudo 1f662c: OUTPUT«66␤»
jnthn The point of subbuf is presumably that you want another Buf back, whereas a slice gives you a Parcel. 17:02
masak yeah.
I'm wondering if .[] couldn't give a Buf back, too.
jnthn Only in the slice case? 17:03
That may be a little too surprising...
masak hm.
TimToady druther have it consistent with array slicing
masak yeah, maybe that's not possible...
moritz there's doc.perl6.org/type/Buf 17:06
in some places doc.perl6.org is more complete or accurate than the specs
sorear good * #perl6 17:07
UncleFester6 also perlcabal.org/syn/S32/Containers.html#Methods
PerlJam does anyone else find the sentence "Decode the Buf into a Str." weird? I always think of Buf->Str as *encoding* and Str->Buf as *decoding* 17:09
[Coke] perhaps "transform"
masak PerlJam: no, Str->Buf is encoding, however you happen to think of it :) 17:10
PerlJam: the encoding in question is finding integers to represent the characters.
PerlJam aye. that's decoding :)
masak nope.
moritz PerlJam: is UTF-8 a string encoding, or a string decoding?
masak when you choose "encoding" in your browser, you're choosing the particular mapping of characters to integers. 17:11
or to bytes, depending how you view the integers.
PerlJam I tend to think of the numbers as "raw" and encoding them turns them into something with more meaning (a utf8 string). 17:12
cognominal_ the material is already encoded within a Buf, the Str just makes the encoding explicit.
huf on the contrary. conceptually, it does away with the encoding 17:14
cognominal_ well I suppose that with compression there is an more explicit step between a Buf and a Str
huf and suddenly you have a series of codepoints
TimToady in crypto, the encoding is what you send through enemy lines
you decode it on the other end to get the plaintext
masak PerlJam: I used to think backwards about those terms too. 17:15
TimToady so a Str is plaintext, a Buf can hold an encoding
masak PerlJam: it's not about which one has more meaning, it's just about different formats.
cognominal_ what is plain text, it is text with a known encoding?
you need a set of chars, a mapping and an encoding anyway 17:16
moritz cognominal_: it's text in abstract, without having to care about encodings
huf yes, ultimately everything is a series of bytes
but this is about APIs
masak aye. 17:17
cognominal_ set a chars is simplifying things with unicode anyway.
masak the point of the Str type (and the strict division with Buf) is that we want to hide encodings and just focus on characters.
pmichaud I think of it more along the lines of "Str is the abstract representation of a string. Buf is a specific encoding."
thue one encodes a Str to produce a Buf 17:18
and decodes a buf to produce a Str
cognominal_ surprising how slippery this concepts are.
pmichaud basically, if you're thinking that strings in Perl 6 have an encoding, you're doing it rong :-)
huf or mucking about deep in the internals :) 17:19
i assume they have some encoding there, but that's fairly irrelevant ;)
moritz aye
cognominal_ When you got a Str, you have an API to manipulates stuff. With a buffer it sounds just like a stream of bytes.
moritz well, both have APIs
PerlJam pmichaud: actually that last statement helps rewire my brain the most.
cognominal_ moritz, yes but Buffer API is low level. 17:20
moritz correct
a buffer doesn't know about things like case folding 17:21
huf it's got an "encoding" too, but it's just bytes. at least it isnt apples or bits of pocket lint...
cognominal_ like says pmichaud, the Str API relieve you from low level details implementation like encoding.
PerlJam "encoding" is an extrinsic property of the string, not an intrinsic one. 17:22
pmichaud note that Buf doesn't have to be bytes, as some values in a Buf are larger than a byte.
s/are/can be
UncleFester6 masak: I think that when you select an encoding in your browser you are choosing a mapping of integers (bytes) to characters
masak aye.
that's a better way of putting it.
pmichaud r: say "Buf".succ # also note
p6eval rakudo 1f662c: OUTPUT«Bug␤» 17:23
masak :P
PerlJam it's a bufbug
masak I consistently mistype "Buf" as "Bug", but I'm so used to it now that I catch virtually all of the typos.
pmichaud I was thinking about bufs a bit yesterday w.r.t. the io_cleanup branch in Parrot, specially the ".encoding on sockets" part. Do we think that other platforms are likely to provide encoding on sockets? 17:24
GlitchMr robert.duckduckgo.com/?q=perl6+str
pmichaud that whole notion of encoding on sockets feels a bit weird to me.
17:24 zhutingting left
pmichaud anyway, I'm afk for a bit 17:26
UncleFester6 Planning to file two RT's. If no subbuf documented in a few days then RT for that. Also LTA error message for [] compare as Str method for Buf not the problem.
17:31 sisar left 17:38 fgomez left 17:40 crab2313 joined, spider-mario left 17:41 cognominal__ joined 17:43 phenny joined 17:44 cognominal_ left, crab2313 left, alester left
moritz pmichaud: I'd find it great if we supported both binary operations on sockets and a Str interface 17:46
pmichaud: for example for multi-byte encodings it makes a whole lot of sense to buffer incomplete multi-byte sequences 17:47
17:49 cognominal__ left, cognominal joined 17:56 GlitchMr left, AEIRIA joined 17:58 crab2313 joined 17:59 AEIRIA left 18:02 Chillance joined
[Coke] hurm. roast-data seems to have not completed properly today, redoing by hand. 18:04
18:07 daxim left 18:10 seldon joined, GlitchMr joined
[Coke] lots of HP fans here: Anyone remember this: www.dailymail.co.uk/tvshowbiz/artic...-wish.html ? I worked with Larry at my current job, he just died a few weeks ago. :| 18:10
seldon I would be very careful about believing anything that has "dailymail.co.uk" in the url. 18:12
[Coke] seldon: thank you for the concern, but this is an actual thing.
moritz [Coke]: :( 18:14
18:14 spider-mario joined, cognominal left
masak feels more like a HPMoR fan than a HP fan... 18:15
moritz me too, but before I was a HP fan
masak I've always liked HP. the books more than the movies. they're not great literature, but they're exciting and entertaining. 18:16
moritz aye
[Coke] not to mention, also involves 2 different people dying to cancer. Your desire to correct might be a little off base here.
s/to cancer/of cancer/
masak sorry, I didn't meant to correct. :/ 18:17
it is a touching article.
colomon I'm kind of jealous of kids today, so many more great kids' books these days....
18:17 lestrrat joined 18:24 Effilry joined 18:25 Effilry left, Effilry joined, Effilry is now known as FireFly, sftp left, thelazydeveloper left, b1rkh0ff left, mathw_ left 18:26 simcop2387 left, betterworld joined, sftp joined, thelazydeveloper joined, b1rkh0ff joined, simcop2387 joined, mattp_ joined, Exodist joined, ruoso joined, apejens joined, LoRe joined, _sri joined 18:36 pmurias left, bluescreen10 left, Pleiades` left, rhr_ left, huf left, cxreg left, driador left, Chillance left, crab2313 left, SamuraiJack left, Patterner left, MayDaniel left 18:37 daniel-s joined, nodmonkey joined, mathw joined, moritz joined, Chillance joined, crab2313 joined, pmurias joined, SamuraiJack joined, bluescreen10 joined, Pleiades` joined, Patterner joined, rhr_ joined, MayDaniel joined, huf joined, cxreg joined, t0rn joined, _ilbot joined, spacebat_ joined, Guest7858 joined, tomaw joined, timotimo joined, kcwu_ joined, au joined, jtpalmer joined, hanekomu joined, rjbs joined, takesako_ joined, literal joined, diakopter joined, broquaint joined, Timbus joined, carlin joined, Ulti joined, buubot_backup joined, estrai_ joined, integral joined, pochi joined, yeltzooo7 joined, PZt joined, BinGOs joined, rafl joined, TimToady joined, avar joined, HarryS joined, Gesh joined, zb joined, BooK joined, arnsholt joined, ponbiki joined, nuba joined, geekosaur joined, hoelzro|away joined, felipe joined, smash joined, dju joined, imarcusthis joined, cj joined, clkao joined, awwaiid joined, ironcamel joined, Celelibi joined, jlaire joined, Bucciarati joined, Tedd1 joined, Util joined, p6eval joined, zamolxes joined, DarthGandalf joined, Khisanth joined, bbkr joined, mikemol joined, dalek joined, dbr joined, bruges joined, nebuchadnezzar joined, Vlavv_ joined, telex joined, sudokode joined, p6rd joined, lue joined, [particle] joined, pyrimidine joined, pjcj joined, ranguard joined, PerlJam joined, charsbar_____ joined, Tene joined, card.freenode.net sets mode: +vv p6eval dalek, shinobicl joined 18:38 [Coke] joined, Woodi joined 18:40 daniel-s left, HarryS left 18:41 HarryS joined, daniel-s joined 18:42 cognominal joined 18:46 UncleFester6 left 18:51 driador joined, erkan joined, tadzik joined, cotto joined, masak joined, BlueT_ joined, cosimo joined 18:52 crab2313 left, crab2313 joined, spider-mario left 18:53 spaceships joined, benabik left 19:03 benabik joined 19:12 cognominal left
dalek rl6-roast-data: 7334254 | coke++ | / (4 files):
today

this run done from the command line instead of cron, so minor differences in results/output.
19:17
19:19 GlitchMr left 19:22 kaare_ left 19:27 birdwindupbird joined, cogno joined 19:30 fgomez joined 19:53 crab2313 left, cogno left, sirrobert joined 19:56 cogno joined
masak rn: say so '_' ~~ /<alpha>/ 20:01
p6eval rakudo 1f662c, niecza v19-15-g051783d: OUTPUT«True␤»
sirrobert What are the current options (if any) for shared-memory stuff in p6?
shared between two processes, in particular
masak rn: say so '_' ~~ /<+alpha-[_]>/
p6eval rakudo 1f662c, niecza v19-15-g051783d: OUTPUT«False␤» 20:02
masak is there a shorter way to say the above regex?
sirrobert: I know Niecza supports threading. I haven't tried it, so I don't know how well shared-memory stuff works.
jnthn Well, that's not between processes though :)
masak sirrobert: should be no worse than the underlying VM's support, I guess.
oh!
I missed that bit. 20:03
sirrobert =)
20:03 birdwind1pbird joined, birdwind1pbird left
jnthn What are you needing to do, ooc? 20:04
masak jnthn++ # de-X/Y-ing
jnthn We do have some IPC bits (sockets, and I think japhb++ added pipes recently)
PerlJam r: say so "_" ~~ /<:Letter>/;
p6eval rakudo 1f662c: OUTPUT«False␤»
sirrobert So ... let's see how to say it succinctly... 20:05
PerlJam masak: dunno if that's precisely what you wanted
sorear niecza will NOT support putting objects in shared memory
the GC wouldn't like that very much
20:05 zby_home joined
sirrobert I've divided our product into two parts/projects. Information travels this way: 20:06
sorear niecza MAY suport shared byte arrays with mmap and clr interop, or not, because the clr's support for pointers + reflection is dicey
masak PerlJam: it probably is.
sorear for some idiotic reason pointers are outside of the clr type system and can't be coerced to Object
masak PerlJam: what's the difference between <+alpha-[_]> and <Letter>, ooc?
sorear even though both Int32 and Int64 autobox
sirrobert jnthn: were you talking to me or masak about what we are needing to do? =) (and what does ooc mean?) 20:08
jnthn sirrobert: You :)
sirrobert ok heh.
jnthn "out of curiosity"
20:09 lue left
diakopter sorear: is this bad? Marshal::PtrToStructure 20:09
PerlJam masak: I'm not entirely sure. All I know is that <:Letter> matches the unicode property "Letter" and "_" isn't one of those :)
sirrobert jnthn: our product is an analytics engine. It does some ... heavy lifting and lots of conceptual manipulation.
20:09 cogno left
sirrobert I'm writing the front-end (server) in perl6, which will be used to map real-world concepts (in the user's mind) to technological concepts (that the back-end knows about). 20:10
the back end is lisp, and does a lot of the analysis part.
when the user makes a request in the form of "real-world" ideas, the front end (p6) translates it into some instructions to the back end. The back-end gives a back a token. 20:11
masak PerlJam: oh, <:Letter>. right.
sirrobert when the back-end is done calculating stuff, it (async) posts the data back to the front end, passing along the token.
masak I think I will go with <:Letter> for my program. it conveys intent the best, IMO. 20:12
sirrobert then the front-end completes the user's request with the answer (translated back into user's real-world concepts).
masak PerlJam++ # <:Letter>
sirrobert I want a p6-ish way of handling the async bit of this.
In the current design idea, the front-end keeps the request open until the back-end sends the results. 20:14
but the results will get posted into a different process (probably?). I guess I could have a single process handling everything...
jnthn How are requests being passed to the frontend in the first place ooc?
moritz what is a "request" in this sense?
sirrobert JSON 20:15
it's a JSON specification of a particular kind of analysis on particular data.
20:16 cogno joined
sirrobert =) 20:17
jnthn sirrobert: How is the request arriving, though? 20:18
sirrobert something like REST
sending the data to a port via http 20:19
jnthn Using Perl 6 HTTP server module?
sirrobert mmm maybe
sure
(we're still in the design phase for this part =)
jnthn tadzik++'s github.com/tadzik/MuEvent may be worth a look 20:20
sirrobert looking now
hmm thanks 20:21
jnthn Also, I dunno how you're invoking the lisp code
(or what the options are there)
sirrobert clojure in a separate process running some kind of server
also REST 20:22
jnthn Hm, so essentially you're doing filtering of HTTP request/response :) 20:23
sirrobert for this part, yes =)
PerlJam sirrobert: why does it have to be async? Will the front-end be a GUI or something?
sirrobert PerlJam: it *can* be, but might not.
some of the analysis is fast, some is slow
allows for canceling things if needed, and other features 20:24
[Coke] rakudo failure: github.com/coke/perl6-roast-data/b....out#L2075 20:28
(hurm. easier to paste this:
S02-types/bool.t aborted 1 test(s)
20:30 SamuraiJack left 20:32 UncleFester6 joined
dalek c: 97dabe1 | moritz++ | README:
[README] add vision; update outdated answer
20:40
masak moritz++ # well-scoped vision
moritz lexically scoped :-) 20:43
masak :P 20:44
jnthn
.oO( I hope we don't block on achieving it... )
20:44 bluescreen10 left 20:46 cogno left, cognominal joined 20:48 cognominal left, skids left 20:50 pmurias left 20:52 sirrobert left 20:56 shinobicl left 20:57 bluescreen10 joined 21:00 gv joined 21:01 pmurias joined
moritz actually it was a discussion with tadzik++ that made me think about and write down the vision 21:04
masak .oO( tadzik++ is 20/20 ) 21:06
21:08 gv left
dalek c: 681795c | jnthn++ | lib/objects.pod:
Try fleshing out the classes section a little.
21:17
jnthn moritz: Is documenting Metamodel:: bits in doc reasonable? 21:22
jnthn may do that a bit in the coming $time-period :)
21:25 cognominal joined 21:26 birdwindupbird left 21:38 nodmonkey left 21:50 zby_home left 21:57 eternaleye_ joined 22:01 zby_home joined, zby_home left 22:12 Tedd1^ joined, Tedd1 left 22:14 pmurias_ joined 22:16 Tedd1 joined 22:17 Tedd1^ left 22:20 skids joined 22:21 pyrimidine left 22:23 MayDaniel left 22:25 ingy joined 22:30 MayDaniel joined 22:31 cognominal_ joined
masak good ♞, #perl6. 22:32
tadzik good knight masak
masak .oO( dobry rycerz )
22:32 MayDaniel left
tadzik (: 22:33
22:34 cognominal left, mtk left 22:37 mtk joined 22:43 cognominal_ left, cognominal_ joined 22:47 fire_ joined 22:56 fire_ left 23:10 cognominal_ left 23:12 benabik left 23:17 ingy left 23:19 cognominal joined 23:40 Tedd1^ joined, thou left 23:42 Tedd1 left 23:43 cognominal_ joined, benabik joined 23:45 Tedd1^ left, Tedd1 joined, cognominal left 23:46 Coleoid joined 23:47 pmurias left, pmurias_ left 23:50 Tedd1 left 23:51 topo_ joined 23:56 UncleFester6 left 23:59 facefox_com joined