Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-12-24

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 psch although i'm not completely sure if gather/take in a Supply DWIMs like that
00:00 psch my (limited) understanding says it probably should, but YMMV
00:00 Timbus dont you want a suppluy from_list
00:00 Timbus thats what I assumed at least
00:01 psch Timbus: i think you're right.  gather/take builds a lazy list and from-list Supply's from a List...
00:09 mickcy_ca psch: Seems to sort of work, with some minor corrections ... when I tap it, though, I get an item of type block that contains "-> ($_? is parcel) { #`(Block|63430928) ... }"
00:12 psch mickcy_ca: can you paste the code you're running somewhere?
00:13 mickcy_ca psch: can upload to a dropbox account.
00:13 psch mickcy_ca: some pastebin would be easier i'd figure
00:14 psch i.e. pastebin.org, paste.debian.net, something like that
00:17 mickcy_ca http://pastebin.com/Q6jdHDQZ,  as Perl6 Supplies
00:21 bcode_ joined #perl6
00:23 mickcy_ca psch:  for the other side of the pipe, I simulate ffmpeg timings ... both scripts are up now at http://pastebin.com/i8vmAEHz
00:24 psch mickcy_ca: i'm looking at it, give me a moment
00:28 BenGoldberg joined #perl6
00:34 raiph joined #perl6
00:40 atroxaper joined #perl6
00:41 psch mickcy_ca: https://gist.github.com/anonymous/2424e15f65f444715d3e this works for me
00:41 psch mickcy_ca: note: my fifo is called "blargl" :)
00:43 psch mickcy_ca: noteable differences: "othertest.pl6" - which is the emitter - opens with :w, i.e. only for writing - i think plain open defaults to :rw, not sure though
00:44 psch mickcy_ca: as for the consumer, i'm starting a Promise that contains the while which emits - i think .list or .from-list could work as mentioned with gather/take, but i didn't figure out how that'd work
00:44 davido__ joined #perl6
00:44 psch mickcy_ca: the difference there is that i set up the promise to execute after i've tapped.  i supposed you could also tap first and then just run the emit while
00:45 psch the main difference is you're "stuck" in the while instead of having to sleep
00:48 tony-o toss a start { } around it
00:52 psch tony-o: well, it's in a start { }, but it still needs to be await()ed, doesn't it?
00:52 psch that's the assumption i was operating under at least
00:52 tony-o does gather start it's own thread?
00:53 tony-o async stuff is lasting a lot longer than it used, it seems..i'm getting to 30 seconds before i segfault on moar
00:53 tony-o while testing http-server-async ^
00:57 tony-o don't know if that's the earth's magnetic field influencing the test but it was only going 5 to 10 seconds last time i took a look
00:57 dayangkun joined #perl6
00:58 mickcy_ca psch: My whole reason for going down this road is that I want not to be stuck in a procedural loop.  The thread spawn is what I am looking for so that I can continue to process the data while other data is coming ine.
00:59 mickcy_ca psch:  Also, the script you provided outputs nothing on my machine.
01:01 psch mickcy_ca: it's two scripts, sorry for not clarifying that in the gist.  the two lines of "=" x $n separate the two scripts
01:02 tony-o mickcy_ca: one of those loops needs to happen async .. also, why are you using gather/take?
01:02 psch tony-o: that was my first attempt, see my latest gist re what actually works
01:03 psch also, the await can go, turns out i misunderstood its purpose :)
01:05 tony-o oh i confused who posted what gists
01:05 psch mickcy_ca: the processing of data would go into the .tap anyway, wouldn't it? e.g. instead of «-> $s { $s.say}» you'd put «-> $s { process_input($s) }»
01:05 mickcy_ca tony-o: Suggested to me by psch:  and that road was travelled because of my desire to not use <my $supply = Supply.interva(1).map({read a file})>
01:07 tony-o i see, the gist that psch posted looks correct
01:08 tony-o it works for me
01:09 tony-o m: my $s = Supply.new; start { for 0..Inf -> $i { $s.emit($i); sleep $i/500; } }; $s.tap(-> $r { "$r\t".say}); sleep 1
01:09 camelia rakudo-moar 8154bd: OUTPUT«0    ␤1      ␤2      ␤3      ␤4      ␤5      ␤6      ␤7      ␤8      ␤9      ␤10     ␤11     ␤12     ␤13     ␤14     ␤15     ␤16     ␤17     ␤18     ␤19     ␤20     ␤21     ␤22     ␤23     ␤24     ␤25     ␤26     ␤27     ␤28     ␤29     ␤30     ␤31     ␤»
01:09 tony-o perl bot is faster than the VM running on my surface
01:11 mickcy_ca tony-o:  That is great for a loop in the definition, but I am doing pipe input with the Supply and there has been no way suggested to do that without setting the Supply up with an interval, or the gather/take mechanism.
01:12 tony-o you want to see 'tail -f' in a loop in p6?
01:13 mickcy_ca Nope, pulling statistical data from ffmpeg through a named pipe.
01:15 psch mickcy_ca: i'm not sure what you think is missing from my gist
01:15 psch mickcy_ca: you can just replace the $s.say with process_data($s)
01:15 psch and do all you need to do with each line in there
01:16 psch except if you need all the lines in an array or somesuch, but then you don't need it async anymore, because you need all of it...
01:18 mickcy_ca psch: Nothing apparently missing, just the pipe is somehow being consumed without being displayed on the receiving end.
01:19 mickcy_ca psch: no array processing needs to happen, just a dispach table based on key words come from the statistical model.
01:20 tony-o mickcy_ca: you're not getting anything on stdout?
01:23 mickcy_ca Correct
01:23 mickcy_ca Not even line feeds.
01:24 tony-o are you using psch's script?
01:24 psch to clarify: https://gist.github.com/anonymous/885de3685de84ce7fa67
01:25 tony-o if you didn't cp & paste, add CATCH { .say }  to anywhere you have a 'start {' block
01:25 tony-o those errors aren't bubbled up, just silently ignored
01:26 psch i'm off to bed, good luck further mickcy_ca :)
01:26 tony-o i'm leaving work
01:26 mickcy_ca psch: Thanks for all of the help.
01:26 mickcy_ca tony-o:  Thank you as well.
01:28 dalek perl6-roast-data: 2612095 | coke++ | / (5 files):
01:28 dalek perl6-roast-data: today (automated commit)
01:28 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/26120954c6
01:33 naddiseo Is the order that expressions are executed in, defined?
01:33 naddiseo @a.push(Foo(@a.pop, @a.pop))
01:36 KCL_ joined #perl6
01:37 Timbus well, yeah. defined by the direction of the operator i guess?
01:37 Timbus m: (say(5),say(10))
01:37 camelia rakudo-moar 8154bd: OUTPUT«5␤10␤»
01:37 Timbus m: (say(5)R,say(10))
01:37 camelia rakudo-moar 8154bd: OUTPUT«10␤5␤»
01:38 naddiseo So, if Foo was: sub Foo($a, $b) { return [$a, $b]; }
01:39 naddiseo THe result of my @a = (1, 2); @a.push(Foo(@a.pop, @a.pop)) should be @a == ([1,2])
01:39 naddiseo Interesting.
01:39 naddiseo It's odd thinking of a comma as an operator
01:40 naddiseo Okay, It should do what I want it too then. Thanks.
01:40 Timbus its odd not thinking of it as one, actually :p
01:41 Timbus m: sub Foo($a, $b) { return [$a, $b]; }; my @a = 1,2; @a.push(Foo(@a.pop, @a.pop)); say @a;
01:41 camelia rakudo-moar 8154bd: OUTPUT«2 1␤»
01:41 Timbus you got the order wrong
01:41 Timbus pop takes from the end
01:42 naddiseo ah, yeah, pop takes from the right.
01:42 Timbus you want shift
01:42 TimToady well, either of them is assuming execution order
01:42 naddiseo yeah
01:42 TimToady Foo(|@a) would enforce order
01:42 Timbus oo
01:43 naddiseo Well, I'm actually doing a reduce-like operation on a like two elements at a time.
01:43 TimToady though I would rarely name with uppercase, since it looks like a coercion
01:45 TimToady m: say reduce(&[,], <a b c d e>).perl
01:45 camelia rakudo-moar 8154bd: OUTPUT«Memory allocation failed; could not allocate 206848 bytes␤»
01:45 TimToady cool
01:45 Timbus lmao
01:45 TimToady anywa, &[op] is supposed to force binary, even if op is list associative
01:46 TimToady m: say reduce(&[~], <a b c d e>).perl
01:46 camelia rakudo-moar 8154bd: OUTPUT«"abcde"␤»
01:46 naddiseo hm,
01:46 TimToady m: say reduce(&[=>], <a b c d e>).perl
01:46 camelia rakudo-moar 8154bd: OUTPUT«((("a" => "b") => "c") => "d") => "e"␤»
01:46 naddiseo oo, that's interesting
01:46 TimToady m: say [=>](<a b c d e>).perl
01:46 camelia rakudo-moar 8154bd: OUTPUT«"a" => "b" => "c" => "d" => "e"␤»
01:46 TimToady so you can get left associative, even though => is right associative
01:47 TimToady but why it doesn't work with &[,] looks like a bug
01:48 Timbus you somehow made an infinite tree?
01:48 TimToady shouldn't'a
01:49 naddiseo So, how do I invert an enum constructed with `enum A (B => 'b', C => 'c');` ?
01:50 naddiseo So far I've got %(A.enums.invert)
01:50 TimToady looks about right
01:50 naddiseo (I want to be able to get the enum from a value, ie, I have 'b' and I want A::B
01:50 TimToady m: enum A (B => 'b', C => 'c'); say A.enums.WHAT
01:50 camelia rakudo-moar 8154bd: OUTPUT«(Hash)␤»
01:51 TimToady m: enum A (B => 'b', C => 'c'); say A.enums.invert.hash.perl
01:51 camelia rakudo-moar 8154bd: OUTPUT«("c" => "C", "b" => "B").hash␤»
01:51 TimToady m: enum A (B => 'b', C => 'c'); say A.enums.invert{}.perl
01:51 camelia rakudo-moar 8154bd: OUTPUT«("b" => "B", "c" => "C").list␤»
01:51 TimToady I guess that doesn't quite imply .hash
01:51 Timbus i think you are having the issue i had, where you want to not only convert, but get 'the' enum
01:51 naddiseo so, enum A (); does make a new Enum class type?
01:52 Timbus with the type attached
01:52 TimToady yes
01:52 TimToady but it's an empty enum, so not terribly useful
01:52 TimToady and you can't add to it later, since it's a declaration
01:52 naddiseo How did you solve it Timbus ?
01:53 Timbus A::<$string>
01:53 Timbus uh
01:53 Timbus A::<<$string>>
01:53 TimToady m: enum A (B => 'b', C => 'c'); say A::{'B'}
01:53 camelia rakudo-moar 8154bd: OUTPUT«b␤»
01:54 Timbus or A::{$string} in that case ^ yea
01:54 TimToady seems {} would be a little more straightforward
01:54 TimToady m: enum A (B => 'b', C => 'c'); say A('B')
01:54 camelia rakudo-moar 8154bd: OUTPUT«(A)␤»
01:54 Akagi201 joined #perl6
01:54 Timbus !!!
01:54 TimToady hmm, thought that was specced
01:54 isBEKaml joined #perl6
01:54 Timbus that would be neat
01:57 Timbus oh
01:57 TimToady well, maybe it used to be, and was removed for some reason
01:57 Timbus m: enum A (B => 'b', C => 'c'); say A('b')
01:57 camelia rakudo-moar 8154bd: OUTPUT«b␤»
01:57 TimToady m: enum A (B => 'b', C => 'c'); say A('b').WHAT
01:57 camelia rakudo-moar 8154bd: OUTPUT«(A)␤»
01:57 Timbus m: enum A (B => 'b', C => 'c'); say A('b').perl
01:57 camelia rakudo-moar 8154bd: OUTPUT«A::B␤»
01:57 TimToady yeah
01:57 Timbus thats neat
01:58 TimToady but the other dir
01:58 Timbus thats what he needed in the first place
01:58 naddiseo Yup
01:58 Timbus haha
01:58 naddiseo That's what I was looking for
01:59 TimToady .oO(not all those who wander are lost)
01:59 * TimToady had better wander off and cook mounds of tilapia for hoards of relatives
02:00 ninjazach joined #perl6
02:03 naddiseo Is there a way to `bind` functions (in the javascript sense)?
02:07 Timbus uhh. in what sense is that
02:08 geekosaur wouldn't that be hordes, or do you store your relatives when they're not in use?
02:08 Ulti naddiseo you mean like delegation? http://design.perl6.org/S12.html#Delegation
02:08 geekosaur (in *this* channel, you never know...)
02:08 Timbus im making my own version of emberjs data binding, but thats probably not what you mean
02:09 Timbus The bind() method creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.
02:09 Timbus oh
02:10 geekosaur isn't that :assuming?
02:10 Ulti multis and delegation are around that
02:10 Timbus its more like.. just using a sub in place of a method
02:10 Timbus in this case
02:11 Timbus or the opposite, using .assuming yes
02:12 mickcy_ca left #perl6
02:12 naddiseo Hm, yeah, assuming looks like it should work.
02:15 Timbus it should be exactly what you want... if that's what you want. :P
02:18 naddiseo Yeah, just need to read up on how to pass-by-ref
02:18 Timbus you always pass by ref
02:18 naddiseo Oh. that makes things easier then.
02:19 Timbus not always!
02:19 Timbus m: sub mod($a is rw) { $a+1 }; my $z = 10; mod($z); say $z
02:19 camelia rakudo-moar 8154bd: OUTPUT«10␤»
02:19 Timbus m: sub mod($a is rw) { $a+=1 }; my $z = 10; mod($z); say $z
02:19 camelia rakudo-moar 8154bd: OUTPUT«11␤»
02:19 Timbus typo
02:20 rmgk_ joined #perl6
02:31 atroxaper joined #perl6
02:33 chenryn joined #perl6
02:51 isBEKaml joined #perl6
02:52 Ugator2 joined #perl6
02:59 bjz joined #perl6
03:11 awoodland joined #perl6
03:15 Mso150 joined #perl6
03:31 Mso150_f joined #perl6
03:48 mickcy_ca joined #perl6
03:49 mickcy_ca Does anybody have a good recommendation for a Perl6 syntax highlighting editor?
03:50 Timbus vim has a good one, the only other i can think of is padre
03:51 Timbus i just use sublimetext and use perl 5 syntax. its not bad
03:51 mickcy_ca I have been using padre ... from my point of view it botches the Perl 6 highlighting.
03:51 Timbus oh?
03:52 xinming_ joined #perl6
03:52 mickcy_ca I am looking at a piece of code that compiles without error, but padre has everything after s:g/// coloured pink.
03:52 noganex joined #perl6
03:53 Timbus ah
03:53 Timbus it thinks the : is the terminator
03:54 Timbus terminator? .. quote separator? i dont know the term for that.
03:54 Timbus ive had that issue with perl 5 highlighters too.
03:55 mickcy_ca Rakudo does not like sg:/// or s:g:/// only s:g///
03:56 mickcy_ca Is sublimetext a KDE app?
03:57 Timbus ah, no. it's a paid app sorry.
03:58 mickcy_ca Ok.
03:58 mickcy_ca How much?
04:00 mickcy_ca Just saw ... $70US
04:00 Timbus im not recommending you get it. just saying i use perl 5 syntax
04:00 mickcy_ca Ok.
04:00 Timbus :)
04:01 Timbus but vim is good for perl 6 if you like using it
04:02 mickcy_ca I have love/hate with Vim ... love all of the bells and whistles ... but I have no interest in really learning the editor itself.
04:03 Timbus yeah..
04:04 anaeem1_ joined #perl6
04:05 anaeem1_ joined #perl6
04:05 mickcy_ca Timbus: Apparently vim-gnome is around .... installing right now ... will let you know what I think
04:07 mickcy_ca Vim-gnome ... good highlighter slow as heck.
04:09 Timbus really? i haven't noticed it being too bad, but i run a beefy PC i guess
04:15 mickcy_ca perhaps it is because I am running an h265 encode in the background at this moment.
04:16 Timbus .. well that certainly wouldnt help :p
04:17 Timbus it's still probably not an optimal highlighter, i recall alester mentioning that when he wrote it
04:20 mickcy_ca While not optimal, Gnome emacs-24 has some nice P5 highlighting ... usable in P6
04:28 mickcy_ca I guess that there is not very much uptake on the editor side of things ... as long as it does perl 5  ...
04:28 mickcy_ca :(
04:32 Timbus yeah.. making tools for a language is not fun enough for most people
04:40 chenryn joined #perl6
05:03 sunnavy joined #perl6
05:52 vendethiel joined #perl6
05:55 atroxaper joined #perl6
06:08 adu joined #perl6
06:13 kaleem joined #perl6
06:37 isBEKaml joined #perl6
06:49 erkan joined #perl6
06:49 erkan joined #perl6
06:51 rindolf joined #perl6
06:52 chenryn joined #perl6
07:03 isBEKaml_ joined #perl6
07:17 brrt joined #perl6
07:17 isBEKaml joined #perl6
07:20 telex joined #perl6
07:21 chenryn joined #perl6
07:21 brrt \o
07:35 moritz o/
07:35 moritz merry christmas!
07:46 adu merry christmas moritz
07:47 atroxaper joined #perl6
07:59 virtualsue joined #perl6
08:01 rindolf joined #perl6
08:01 brrt merry christmas moritz
08:02 brrt and merry christmas adu
08:15 JimmyZ merry christams all
08:15 kjs_ joined #perl6
08:16 vendethiel joined #perl6
08:17 sjn Merry Christmas, #perl6
08:17 brrt TimToady++ 's post is really nice I think
08:17 sjn also, today's advent post was really nice :)
08:17 darutoko joined #perl6
08:18 sjn TimToady++ # Of course, I could be wrong; But not this time. :)
08:20 Woodi joined #perl6
08:28 rurban joined #perl6
08:34 Mso150_f joined #perl6
08:40 LLamaRider joined #perl6
08:41 vendethiel joined #perl6
08:42 ptc_p6 joined #perl6
08:53 yakudza joined #perl6
09:00 andreoss joined #perl6
09:04 andreoss why do Parcel and List have no .last-index, .first-index methods?
09:05 awoodland joined #perl6
09:08 erkan joined #perl6
09:09 FROGGS__ TimToady++
09:09 FROGGS__ just read it :o)
09:09 sjn moritz: btw, I think I found a typo in your artile from monday
09:10 sjn moritz: it says "(if you’re wondering, the “” is because the arguments both are unnamed and untyped)"
09:10 sjn should there be something inside those quotes?
09:11 * sjn guesses something was interpreted as invalid html, and removed
09:12 kaare_ joined #perl6
09:12 molaf joined #perl6
09:14 vendethiel joined #perl6
09:16 FROGGS__ sjn: I fixed it...
09:16 FROGGS__ it was Ven++'s post: http://perl6advent.wordpress.com/2014/12/22/the-cool-subset-of-main/
09:18 sjn aah
09:18 brrt that was also a pretty nice post yes
09:18 sjn any other posts that aren't attributed correctly? :)
09:19 sjn (or did I just misread?)
09:24 awoodland joined #perl6
09:26 prammer joined #perl6
09:28 carlin_ joined #perl6
09:28 FROGGS__ joined #perl6
09:30 yeltzooo joined #perl6
09:31 itz joined #perl6
09:35 telex_ joined #perl6
09:35 synopsebot joined #perl6
09:42 mvuets joined #perl6
09:43 moritz sjn: I thikn you just misread
09:43 andreoss left #perl6
09:48 vendethiel joined #perl6
09:51 sqirrel joined #perl6
09:53 koo6 joined #perl6
09:59 chenryn joined #perl6
10:10 spider-mario joined #perl6
10:26 awoodland joined #perl6
10:33 lizmat good *, #perl6!
10:34 awoodland joined #perl6
10:34 moritz god jul, lizmat
10:34 lizmat .tell andreoss re.last-index on Parcel/List: but they do?  inherited
10:34 yoleaux lizmat: I'll pass your message to andreoss.
10:35 lizmat fijne feestdagen, moritz!
10:35 lizmat m: <a b c>.last-index(* eq "b").say
10:35 camelia rakudo-moar 8154bd: OUTPUT«1␤»
10:36 lizmat <a b c>.list.first-index(* eq "b").say
10:36 lizmat m: <a b c>.list.first-index(* eq "b").say
10:36 camelia rakudo-moar 8154bd: OUTPUT«1␤»
10:38 sqirrel joined #perl6
10:50 moritz m: for <first last> -> $dir { say <a b c>."{$dir}-index"('b') }
10:50 camelia rakudo-moar 8154bd: OUTPUT«1␤1␤»
10:50 moritz m: for <first last> -> $dir { say <a b c d c b a>."{$dir}-index"('b') }
10:50 camelia rakudo-moar 8154bd: OUTPUT«1␤5␤»
10:51 xfix joined #perl6
10:57 vendethiel joined #perl6
11:02 anaeem1__ joined #perl6
11:06 vendethiel o/, #perl6
11:06 FROGGS__ o/
11:08 dalek rakudo/nom: 4206b6c | lizmat++ | src/core/CompUnitRepo.pm:
11:08 dalek rakudo/nom: parse-spec -> helper sub named PARSE-INCLUDE-SPEC
11:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4206b6c8d9
11:08 dalek rakudo/nom: ddddcd3 | lizmat++ | t/spectest.data:
11:08 dalek rakudo/nom: No longre try to do parse-spec tests
11:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ddddcd37e1
11:08 dalek rakudo/nom: be2b982 | lizmat++ | t/01-sanity/52-parse-include-spec.t:
11:08 dalek rakudo/nom: Move parse-spec tests to sanity test
11:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/be2b9822eb
11:08 dalek rakudo/nom: e861672 | lizmat++ | t/01-sanity/52-parse-include-spec.t:
11:08 dalek rakudo/nom: Sanity test is not fudged, so fudge manually
11:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e861672af1
11:09 dalek roast: 8a8d0de | lizmat++ | S22-package-format/parse-spec.t:
11:09 dalek roast: parse-include-spec tests moved to sanity
11:09 dalek roast: review: https://github.com/perl6/roast/commit/8a8d0def6c
11:10 lizmat vendethiel FROGGS  /o
11:10 FROGGS hi liz
11:11 masaq joined #perl6
11:11 masaq good antenoon, #perl6
11:11 masaq TimToady++ # 24 post
11:12 lizmat TimToady++ indeed (I even Like-d it  :-)
11:12 masaq moritz: I feel silly. I logged out as usual from feather, even checked that I couldn't log in again.
11:12 masaq moritz: ...but I left screen running... :/
11:12 masaq so now an inaccessible copy of me is squatting my nick.
11:13 masaq damn, the future is so confusing
11:13 lizmat .o( konfusing even :-)
11:14 * masaq .oO( The future is so Confusing! -- Confucius )
11:14 xfix I noticed an e-mail about getting having access to perl6/p6c.org repository, and I was curious what is this about.
11:15 xfix (yeah, I didn't really follow Perl 6 news lately)
11:15 masaq xfix: if you're still wondering, then http://p6c.org/ is probably a good summary.
11:15 xfix It's awesome. I don't have access to the server, but from browsing perl6.org, the website is way faster than it used to be :-).
11:16 rurban1 joined #perl6
11:16 masaq it's probably hosted closer to you geographically :P
11:16 xfix Well, it is, but not really much.
11:17 xfix Germany and Netherlands... it's rather close.
11:17 FROGGS moritz: btw, I started to work on testers.perl6.org wrt moving it to hack/www
11:18 FROGGS moritz: the database is already transferred, but I need to generate static pages, and that will take its time
11:19 rurban1 joined #perl6
11:22 anaeem1_ joined #perl6
11:25 xfix I've a question. Is there a library for Perl 6 for asynchronous socket servers. I'm interested in writting WebSockets web application in Perl 6.
11:27 xfix Ok, IO::Socket::Async.
11:27 chenryn joined #perl6
11:28 atroxaper joined #perl6
11:28 anaeem1_ joined #perl6
11:35 FROGGS[mobile] joined #perl6
11:42 moritz FROGGS: ok, sounds good
11:42 moritz the data center in which p6c.org lives has a pretty good uplink :-)
11:45 xfix Ok, I have a weird problem with nqp package in AUR. For some reason it tries to include ffi 3.1 header files (-I/usr/lib/libffi-3.1/include), but my version is 3.2.1. Any idea why?
11:46 moritz xfix: parrot backend?
11:46 moritz nqp doesn't use ffi at all, it uses dyncall
11:46 JimmyZ hmm,p6c.org and perl6.org have the same content?
11:47 moritz JimmyZ: they shouldn't; refresh your browser?
11:47 xfix JimmyZ, probably browser cache, perhaps CTRL+F5 will work.
11:47 xfix I'm trying to install https://aur.archlinux.org/packages/rakudo-star/, but it depends on nqp.
11:47 JimmyZ oh,ctrl+f5 works
11:47 xfix (I believe this package installs both Parrot and MoarVM backend)
11:48 xfix Hm, but I guess I should just modify the package to install 2014.12.
11:48 xfix Considering it was released 12 hours ago.
11:49 xfix Oh wait, it wasn't.
11:51 dalek star: 96d0428 | moritz++ | tools/lib/NQP/Configure.pm:
11:51 dalek star: Partially import NQP::Configure from rakudo
11:51 dalek star: review: https://github.com/rakudo/star/commit/96d0428697
11:53 moritz current star state: moar passes all module tests, parrot has some regressions (nativecall, doc, jsonrpc)
11:54 smls joined #perl6
11:54 smls Merry Christmas, all!
11:54 xfix Merry Christmas.
11:54 moritz MIME::Base64 also fails on parrot
11:54 moritz merry christmas, smls
11:55 smls TimToady: "Which I guess makes them righty or wrongy, I guess." -- You guess that you guess? :P
11:58 smls TimToady: "Substitute strong features for weak ones that degenerate to the weak case." -- What does that mean? Why don't we want strong features?
11:58 smls Nice post though.
12:00 xfix Ok, so `parrot_config ccflags` shows `-I/usr/lib/libffi-3.1/include`.
12:00 xfix Hm, that probably means Parrot was built with old version of ffi.
12:01 xfix I guess it means I have to abs parrot.
12:06 xfix Ok, so I recompiled Parrot using PKGBUILD, and now I can install nqp.
12:06 erkan joined #perl6
12:07 masaq smls: now I'm also curious about the "strong features" vs "weak features" point. :)
12:07 masaq feels like each of those pithy one-line things could be a blog post of its own.
12:07 smls Probably?
12:07 smls s/?//
12:08 masaq could someone with access to feather please kill by screen and/or irssi on there?
12:08 masaq I would myself, but lately I've taken to running /bin/false as a shell.
12:09 xfix /bin/false best UNIX shell.
12:09 masaq I especially like how bug-free it is.
12:09 xfix (why not /sbin/nologin)
12:15 erkan joined #perl6
12:23 erkan joined #perl6
12:27 cognominal joined #perl6
12:31 xfix Hm, so I installed Rakudo Star, and perl6 runs in 0.3 seconds. Fast.
12:32 xfix (of course, it would be better if it would be even faster, but 0.3 seconds is fast, compared to what it was before)
12:32 masaq yes, a number of people implemented "fast" during 2013 and 2014.
12:32 masaq it's been on our feature list for quite some time.
12:32 masaq "faster" is on the list too, but it had "fast" as a hard dependency.
12:34 erkan joined #perl6
12:34 erkan joined #perl6
12:36 xfix I also checked http://www.perlmonks.org/?node_id=952765, and it's 0.6 seconds for me. I actually wonder how fast Perl 6 can get.
12:38 xfix (I get 0.5 seconds if I replace $_**2 with ($_*$_), and there is 0.3 seconds of boot time that could be optimized somehow)
12:38 simpleirc1 joined #perl6
12:43 sergot hi o/
12:44 masaq merry 24th, sergot
12:44 masaq I keep having the thought that there could be "layers" of Perl 6. if you just run a couple of lines of code from the command line, you probably use something like 1% of all the features. such a feature set could be identified, and made into a system of its own. and that small system would run faster.
12:44 erkan joined #perl6
12:44 erkan joined #perl6
12:45 masaq then there just needs to be a way for the parser or whatever to detect if you're using features outside of that 1%, and to "fall back" to the full runtime.
12:45 masaq I don't know how practical this is.
12:46 masaq as I say it out loud, I realize the big risk would be having separate code paths for small and big runtimes. which would be virtually unavoidable, I think.
12:46 masaq but that never ends well.
12:48 xfix But what if you use 1% of features, and something odd that isn't in that 1% once.
12:49 masaq then you'd fall back to big.
12:49 masaq there could be several layers, of course. like 1%, 5%, 20% and 100%.
12:49 xfix Seems to be slightly pointless to implement AWK-like language for oneliners to speed up Perl 6.
12:49 masaq the trick is to make the layers not be seen by the user, only felt in terms of speed.
12:50 masaq it would still be Perl 6, in both syntax and semantics.
12:50 masaq it's just that you wouldn't be paying cost, startup and runtime, for features you don't use.
12:50 xfix Of course, but without most of Perl 6 features.
12:50 masaq well, realistically, most of the time I don't use most of the features.
12:50 xfix One liners are different. For example, sometimes user may want to print JSON.
12:51 masaq of course, as my program's size goes to infinity, the likelyhood that I will use 100% goes to 100% :)
12:51 masaq but my point is, many one-liners are dead simple. and I still enjoy Perl 6 over AWK even for dead simple things.
12:52 timotimo oh hey xfix
12:52 timotimo nice to see you again :)
12:52 xfix Hi, timotimo.
12:54 xfix It's often the case that oneliners use modules. Those modules may as well do things that usually aren't seen in oneliners (for example, because they are needlessly verbose).
12:54 lue masaq: perhaps you're asking for an automated version of the  #include <iostream>  method of language features? (That is, a hybrid of "the language gives you everything" and "the language makes you ask for stuff")
12:55 masaq xfix: your argument boils down to "there are many things that use more than 1%". and you're right.
12:55 masaq xfix: but for the things that don't it might still be a useful speedup.
12:56 masaq lue: yes, the underlying principle being "don't pay for features you don't use".
12:56 erkan joined #perl6
12:56 erkan joined #perl6
12:56 xfix I'm rather wondering about dynamically including stuff.
12:57 timotimo "autoload,?
12:57 xfix For example, some old C compilers didn't compile floating point support into printf when they determined that program doesn't use floating point numbers.
12:57 timotimo nim (formerly nimrod) is very agressive at dead code elimination
12:58 kjs_ joined #perl6
13:00 xfix The heurestics to do so in Turbo C sometimes did the wrong thing, however - https://stackoverflow.com/questions/12366565/scanf-floating-point-format-not-linked. But I think with JIT, it's less of issue.
13:19 atroxaper joined #perl6
13:27 KCL joined #perl6
13:30 xfix Hm, bot doesn't report changes in p6c.org?
13:36 erkan joined #perl6
13:36 erkan joined #perl6
13:39 lizmat masaq: a large part of perl6 startup time, is caused by initializing stuff you might not need for one liners
13:39 lizmat one big part of that is @*INC initialization
13:39 lizmat I once had startup at 0.15 seconds
13:40 lizmat but that broke panda (although I think I'm getting closer to figuring that one out, finally!)
13:42 xfix Does @*INC really need to initialize in 0.15 seconds?
13:42 xfix In Perl 5, @INC initialization is not an issue.
13:45 lizmat xfix: in Perl 5, -use- is dead simple
13:45 lizmat in Perl 6, it is not
13:45 xfix Then, perhaps @*INC in Perl 6 has flawed design?
13:46 lizmat fwiw, I'm not happy with @*INC at all myself
13:46 lizmat for one, I'm not sure we want to expose this at all
13:46 lizmat as an array, I mean
13:46 bjz joined #perl6
13:47 lizmat we want to expose it, sure, but probably not as a dynamic array
13:47 lizmat xfix: open to suggestions there  (basically S11 and S22)
13:49 anaeem1 joined #perl6
13:49 xfix I'm not exactly sure. How is @*INC different to @INC in Perl 5 and sys.path in Python?
13:50 xfix What does it do that Perl 5 doesn't?
13:50 vendethiel xfix: :version, :author and stuff, I guess
13:50 lizmat vendethiel: yes, and its pluggable with a specced API
13:50 xfix So, it loads every single package to determine which one the user wants?
13:51 lizmat rather than the vague ad-hoc API that Perl 5 provides
13:51 lizmat xfix: no, @*INC contains a CompUnitRepo object
13:51 lizmat each CompUnitRepo object is asked to provide candidates for a given module/auth/version/lang
13:52 lizmat if it has 0 candidates, the next one is interrogated
13:52 lizmat if it has 1 candidate, it will be loaded
13:52 lizmat if it has >1 candidate, an exception will be thrown
13:52 xfix So, where is the issue? If there is one module of given name, it should just simply load it.
13:53 xfix That shouldn't take 0.15 seconds.
13:53 xfix (especially when the module itself is cached)
13:53 lizmat apart from initializing @*INC, we're also initializing %CUSTOM_LIB
13:54 xfix %*CUSTOM_LIB, right?
13:54 lizmat eh, yes
13:54 lizmat without that, panda dies
13:54 xfix "home" => "/home/xfix/.perl6/2014.09", "perl" => CompUnitRepo.new('inst:/usr/languages/perl6'), "site" => CompUnitRepo.new('inst:/usr/languages/perl6/site'), "vendor" => "/usr/languages/perl6/vendor"
13:54 lizmat so it's an intricate web of dependencies that goes deep into the nqp rabbithole
13:54 xfix I don't exactly see what the issue is. There are three predefined path, and one dynamic in my home directory.
13:54 xfix paths*
13:54 xfix Or am I missing something?
13:55 lizmat the issue, afaik, is in the setting up @*INC and %*CUSTOM_LIB
13:56 erkan joined #perl6
13:56 lizmat now, if you're doing perl6 -e 'say 42'
13:56 lizmat you don't need all of that
13:56 xfix Ok, checked src/core/Inc.pm. This is quite complex.
13:57 lizmat yes, and it goes deeper into Perl6/ModuleLoader.nqp
13:57 lizmat changing things there, even thought a clean spectest, breaks panda
13:58 lizmat or worse, breaks panda only on one VM
13:58 lizmat so any changes there need to be checked thoroughly, otherwise the ecosystem suffers
13:58 lizmat and rebuilding rakudo on parrot is like 10x slower
13:58 lizmat than on moar
13:59 lizmat and testing on jvm is like 10x slower
13:59 lizmat so it just takes a lot of time
13:59 lizmat and then there's differences between OS's
14:00 lizmat so we basically got a 2 x 3 matrix of versions to check
14:00 lizmat need to run now, will check on mobile later...
14:00 lizmat &
14:02 colomon lizmat: wouldn't that be a 3 x 3 matrix?  3 VMs, 3 major OSes?
14:06 erkan joined #perl6
14:06 xfix Profiller doesn't see time spent initializing Perl 6...
14:07 xfix (by the way, neat HTML profiller)
14:08 xfix 'Output from --profile can be visualized by kcachegrind.' - yeah, sure.
14:10 araujo joined #perl6
14:10 araujo joined #perl6
14:15 atroxaper joined #perl6
14:26 liztormato joined #perl6
14:26 liztormato xfix: yup, 3x3
14:27 xfix liztormato, you probably meant to say colomon:.
14:27 xfix (redirected that for you)
14:27 liztormato xfix: thank you
14:28 liztormato Wrt --profile: well volunteered ;-)
14:29 [Sno] joined #perl6
14:30 xfix http://feather.perl6.nl/
14:30 xfix Why this page still exists?
14:31 JimmyZ xfix: --profile-compile?
14:31 xfix (I think it should redirect to p6c.org or something)
14:31 xfix JimmyZ, thanks.
14:32 liztormato moritz: xfix suggestion ^^
14:32 kjs_ joined #perl6
14:35 jdv79 TimToady++ # nice post - i would pay (not sure how much though) for a more thorough elaboration on that list.
14:36 xfix Anyway, will go now, Christmas.
14:36 liztormato xfix: o/
14:38 liztormato left #perl6
14:57 tadzik FROGGS: could we make cpandatesters to try to deduce authors from the git repo URL? I looked at the code but I don't see any other way than adjusting stdin that submits reports :)
15:00 tadzik "You can imagine the ! character is like a portcullis dropping down at the entrance of a castle – blocking external access to the attribute behind. The . twigil is used for public attributes"
15:00 tadzik ^ this is just great :)
15:03 timotimo %)
15:04 fhelmberger joined #perl6
15:11 FROGGS[mobile] tadzik: yeah, we should do that in panda...
15:12 tadzik oh, right
15:14 anaeem1 joined #perl6
15:14 tadzik should we though? Panda only sends metainfo as-is
15:14 FROGGS[mobile] I think we should, aye
15:15 guru joined #perl6
15:15 tadzik so have panda mangle metainfo in the first place/
15:15 FROGGS[mobile] we make it "github:FROGGS", and then it is clear where it comes from
15:16 FROGGS[mobile] but only when neither of auth/author/athority is set
15:16 FROGGS[mobile] (without typos)
15:20 kaleem joined #perl6
15:26 xfix joined #perl6
15:33 sqirrel joined #perl6
15:36 kjs_ joined #perl6
15:47 mario1955 joined #perl6
15:47 mario1955 !list
15:48 mario1955 ciao
15:48 mario1955 !listt
15:48 mario1955 left #perl6
15:49 mickcy_ca Curious ... is there a perl 6 directive to convert total seconds to hours, min, sec?
15:49 erkan joined #perl6
15:49 erkan joined #perl6
15:51 xfix I would say Duration should have one... but it doesn't.
15:51 mickcy_ca xfix:  That is what I thought, as well ... I have it implemented in Perl 5, and was just wondering if I was re-inventing the wheel for Perl 6.
15:52 xfix Odd, I may propose some interval API, or something.
15:52 mickcy_ca That would be appreciated.
15:52 ninjazach joined #perl6
15:54 FROGGS[mobile] m: say DateTime.new( now)
15:54 camelia rakudo-moar e86167: OUTPUT«2014-12-24T15:54:05Z␤»
15:54 xfix Currently Duration is pretty much contained FatRat.
15:54 FROGGS[mobile] m: say DateTime.new( now - 86400)
15:54 camelia rakudo-moar e86167: OUTPUT«2014-12-23T15:54:35Z␤»
15:55 FROGGS[mobile] mickcy_ca: do you mean that by any chance?
15:55 xfix No.
15:55 xfix Rather.
15:55 xfix m: say Duration.new(1932942) div 3600
15:55 camelia rakudo-moar e86167: OUTPUT«Cannot call 'infix:<div>'; none of these signatures match:␤:(Int:D \a, Int:D \b)␤:(int $a, int $b --> int)␤  in block <unit> at /tmp/pKyuJSUaAM:1␤␤»
15:55 xfix Right...
15:56 xfix m: say +Duration.new(1932942) div 3600
15:56 camelia rakudo-moar e86167: OUTPUT«Cannot call 'infix:<div>'; none of these signatures match:␤:(Int:D \a, Int:D \b)␤:(int $a, int $b --> int)␤  in block <unit> at /tmp/UatGJ0IRwg:1␤␤»
15:56 FROGGS[mobile] but that depends on when this duration happens
15:56 xfix # SELECT justify_hours('30000 seconds');
15:56 xfix 08:20:00
15:56 ptc_p6 joined #perl6
15:56 xfix In PostgreSQL, I can do this.
15:57 mickcy_ca The duration is just a measurement of total seconds that a video ecode takes.
15:57 xfix I believe this is what he wants.
15:57 FROGGS[mobile] ahh
15:57 FROGGS[mobile] mickcy_ca: I see
15:58 xfix m: say Duration.new(1932942).Int div 3600
15:58 camelia rakudo-moar e86167: OUTPUT«536␤»
15:58 xfix m: say Duration.new(1932942).Int div 60 % 60
15:58 camelia rakudo-moar e86167: OUTPUT«55␤»
15:58 xfix m: say Duration.new(1932942) % 60
15:58 camelia rakudo-moar e86167: OUTPUT«42␤»
15:58 xfix 536:55:42, but quite ugly.
15:59 xfix In fact, I did a mistake. You don't even need justify_hours in PostgreSQL.
15:59 mickcy_ca Nicer to just do it longhand, without Duration.  Same thing anyway.
16:00 mickcy_ca Not storing any info in a database at this time.
16:00 xfix SELECT cast('1932942' AS interval);
16:00 xfix 536:55:42
16:00 jack_rabbit joined #perl6
16:00 xfix Yeah, I'm just looking at the possible interval API in Perl 6.
16:00 telex joined #perl6
16:00 xfix And PostgreSQL has a quite neat interval API.
16:01 TimToady we would probably add it as a more general feature, a listy divmod
16:01 xfix PostgreSQL has it, because databases should be able to deal with timestamps.
16:01 xfix But why Perl 6 shouldn't be able to do as well?
16:01 xfix to do that*
16:02 TimToady $number divmod 60,60,24 or some such
16:02 mickcy_ca I may sound a little geeky ... but that would be WAY Cool.
16:03 xfix Even PHP has its interval math (although with lots of quirks, because it's PHP).
16:03 atroxaper joined #perl6
16:05 vendethiel xfix: hey, I've been told php is getting operator overloading for c types stuff
16:05 xfix It does.
16:06 xfix Of course, the issue with intervals and time is timezones.
16:07 xfix (I hate timezones)
16:09 TimToady well, Durations have nothing to do with timezones in p6
16:09 TimToady they're just atomic intervals
16:10 xfix But well, `now - now` gives... a Duration.
16:10 TimToady just the difference betweeen two Instant values, which are also agnostic about any kind of civil time
16:10 FROGGS since when do statement level while not gather the value of the body?
16:10 TimToady m: say now.WHAT
16:10 camelia rakudo-moar e86167: OUTPUT«(Instant)␤»
16:11 TimToady Instants are not even supposed to be aware of leap seconds, just like TAI ignores them
16:12 TimToady the OS support for that is sometimes a bit lacking htough
16:12 TimToady *th
16:12 xfix It would be neat to say # SELECT now() + '10 days'; and get "2015-01-03 17:12:13.468842+01" as an answer.
16:12 xfix But that would also cause some issues.
16:12 xfix Related to timezones, leap seconds, and stuff like that.
16:12 TimToady you're confusing atomic time with civil time there
16:13 xfix I probably am confusing those.
16:16 TimToady m: say DateTime.new(now).later(days => 10)
16:16 camelia rakudo-moar e86167: OUTPUT«2015-01-03T16:16:10Z␤»
16:16 TimToady you can construct civil time from the current instant though
16:17 TimToady whoever picked T for the separator had a tin eye
16:18 xfix m: use MONKEY_TYPING; augment class Duration { method minutes { .Int div 60 % 60 } }; say Duration.new(299).minutes
16:18 camelia rakudo-moar e86167: OUTPUT«0␤»
16:18 xfix Oh right.
16:18 xfix m: use MONKEY_TYPING; augment class Duration { method minutes { $.Int div 60 % 60 } }; say Duration.new(299).minutes
16:18 camelia rakudo-moar e86167: OUTPUT«4␤»
16:19 xfix I'm confusing everything, when what's the important thing is are methods on Duration to get hours, minutes, and seconds.
16:20 TimToady as I say, I'd rather see a more general operator for that
16:21 mickcy_ca Went away for a bit ... after reading all of that ... xfix:  That is exactly what I am looking at.
16:22 xfix Sure you can write $duration divmod 60. But I also think that $duration.minutes is more readable.
16:22 xfix Is it specific? Yes. Is it useful? Yes.
16:24 rurban joined #perl6
16:24 FROGGS m: my $i = 0; say do while $i < 10 { $i++ } # TimToady: is that supposed to say() the $i++s?
16:24 camelia rakudo-moar e86167: OUTPUT«False␤»
16:24 FROGGS rather then the last value of the condition...
16:24 TimToady yes
16:25 TimToady returning the condition is p5think
16:25 FROGGS and not very helpful
16:25 TimToady and contrary to spec
16:26 FROGGS m: say do if 42 { 21 } else { 10.5 }
16:26 camelia rakudo-moar e86167: OUTPUT«21␤»
16:26 FROGGS how does that even work O.o
16:27 xfix By returning last value in a block.
16:28 vendethiel FROGGS: what's surprising here?
16:28 xfix m: say 42 ?? 21 !! 10.5
16:28 camelia rakudo-moar e86167: OUTPUT«21␤»
16:28 vendethiel that's what "do" does
16:28 FROGGS yes, but I don't see what makes if/else work and while not in Perl6::Actions
16:28 xfix I'm not sure what's surprising here. It works like ternary operator.
16:29 FROGGS I am talking about its implementation
16:29 TimToady m: say do given 42 { when .so { 21 }; when .not { 10.5 }}
16:29 camelia rakudo-moar e86167: OUTPUT«21␤»
16:29 FROGGS m: my $i = 0; say do while $i > 10 { $i++ }
16:29 camelia rakudo-moar e86167: OUTPUT«False␤»
16:29 FROGGS m: my $i = 0; say do until $i > 10 { $i++ }
16:29 camelia rakudo-moar e86167: OUTPUT«True␤»
16:30 FROGGS m: my $i = 0; say do loop($i = 0; $i++; $i < 10 { 42 }
16:30 camelia rakudo-moar e86167: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ce7SMVaTUJâ�¤Unable to parse expression in argument list; couldn't find final ')' â�¤at /tmp/ce7SMVaTUJ:1â�¤------> [32m = 0; say do loop($i = 0; $i++; $i < 10 [33mâ��[31m{ 42 }[0mâ�¤    expecti…»
16:30 FROGGS m: my $i = 0; say do loop $i = 0; $i++; $i < 10 { 42 }
16:30 camelia rakudo-moar e86167: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/UGdkR6UMNGâ�¤Missing blockâ�¤at /tmp/UGdkR6UMNG:1â�¤------> [32mmy $i = 0; say do loop [33mâ��[31m$i = 0; $i++; $i < 10 { 42 }[0mâ�¤    expecting any of:â�¤        scoped blockâ�¤Â»
16:30 FROGGS err
16:30 FROGGS m: my $i = 0; say do loop ($i = 0; $i++; $i < 10) { 42 }
16:30 camelia rakudo-moar e86167: OUTPUT«0␤»
16:31 TimToady um, reversed 2nd and 3rd
16:31 FROGGS hehe
16:31 FROGGS m: my $i = 0; say do loop ($i = 0; $i < 10; $i++) { 42 }
16:31 camelia rakudo-moar e86167: OUTPUT«False␤»
16:31 TimToady the last time I did that was only a couple weeks ago :)
16:31 xfix I wonder...
16:32 xfix m: say (do if 2 {}).perl
16:32 camelia rakudo-moar e86167: OUTPUT«Nil␤»
16:32 xfix ok
16:32 ptc_p6 joined #perl6
16:35 dalek specs: 627f2a8 | hoelzro++ | S17-concurrency.pod:
16:35 dalek specs: Fix -> vs . method call typo in S17
16:35 dalek specs: review: https://github.com/perl6/specs/commit/627f2a8ad1
16:38 FROGGS ahh, for the given/when case we add a SUCCEED handler....
16:39 TimToady crud, plumbing is backed up, offline for a while
16:40 mst 'crud' would be apposite then, I guess.
16:40 tony-o my thought too
16:40 tony-o need to get rid of that orangeburg pipe
16:41 hoelzro o/ #perl6
16:41 hoelzro are fails supposed to work in a start construct?
16:41 hoelzro example:
16:41 hoelzro m: start({ sleep 1; fail '' }).result
16:41 camelia rakudo-moar e86167: OUTPUT«===SORRY!===␤Could not find symbol '&Return'␤»
16:42 tony-o hoelzro: start usually squelches errors for me
16:42 moritz hoelzro: fail only makes sense in a routine
16:43 moritz m: start(sub { sleep 1; fail '' }).result
16:43 camelia rakudo-moar e86167: OUTPUT«Unhandled exception: ␤   at <unknown>:1  (/home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:13877  (/home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:sink:29)␤…»
16:43 moritz m: start(sub { sleep 1; fail 'something wrong' }).result
16:43 camelia rakudo-moar e86167: OUTPUT«Unhandled exception: something wrong␤   at <unknown>:1  (/home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:13877  (/home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moa…»
16:43 tony-o m: start { sleep 1; die 'dead'; }; sleep 2;
16:43 camelia rakudo-moar e86167: ( no output )
16:44 hoelzro ahhhh
16:44 hoelzro thanks for the explanation, moritz
16:45 tony-o hoelzro: did you author template::mustache?
16:49 Ven joined #perl6
16:50 Ven joined #perl6
16:52 spider-mario joined #perl6
16:58 andreoss joined #perl6
17:00 andreoss how make a sigilless variable mutable?
17:00 yoleaux 10:34Z <lizmat> andreoss: re.last-index on Parcel/List: but they do?  inherited
17:01 pdcawley joined #perl6
17:01 timotimo andreoss: since it doesn't have a container, you cannot replace it with stuff, but you can re-bind a value into it instead of trying to assign
17:01 tony-o m: my \pi = (my $pi = 3.5);  pi = 50; pi.say;
17:01 camelia rakudo-moar e86167: OUTPUT«50␤»
17:02 tony-o that's pretty hokey though
17:02 ptc_p6 joined #perl6
17:02 tony-o m: my \pi = 3.5; pi := 50; pi.say;
17:02 camelia rakudo-moar e86167: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/3owFpXRQEf�Cannot use bind operator with this left-hand side�at /tmp/3owFpXRQEf:1�------> [32mmy \pi = 3.5; pi := 50[33m�[31m; pi.say;[0m�»
17:02 andreoss m: my \x =0 ; x = x + 1; x.say;
17:02 camelia rakudo-moar e86167: OUTPUT«Cannot modify an immutable Int␤  in block <unit> at /tmp/_Y63JwjTD9:1␤␤»
17:02 tony-o andreoss:
17:02 tony-o m: my \pi = (my $pi = 3.5);  pi = 50; pi.say;
17:02 camelia rakudo-moar e86167: OUTPUT«50␤»
17:03 Ven joined #perl6
17:03 andreoss why don't -= += work ?
17:04 tony-o m: my \pi = (my $pi = 3.5);  pi++; pi.say;
17:04 camelia rakudo-moar e86167: OUTPUT«4.5␤»
17:04 atroxaper joined #perl6
17:04 andreoss it doenst work for me
17:05 tony-o andreoss: sigilless variables are bound to something, so if you bind it to something immutable then your variable is immutable (ie, it's equivalent to saying: 50 = 45;), if you bind it to a variable or some kind of container then you can perform operations on that container
17:05 andreoss how does this differ from constants?
17:05 tony-o andreoss: it's not working for you because your example above is equivalent to saying:  0 = 0 + 1;
17:06 Ven should perl6 -v print about the JIT? I thought it did, but apparently doesn't
17:06 Ven well, moar --version does anyway, so that's fine
17:06 tony-o m: my \pi = (my $pi = 3.5);  pi = pi * 2; pi.say;
17:06 camelia rakudo-moar e86167: OUTPUT«7␤»
17:06 tony-o that binds it to $pi, it's also pollutey iirc
17:07 tony-o m: my \pi = (my $pi = 3.5);  pi = pi * 2; pi.say; $pi.say;
17:07 camelia rakudo-moar e86167: OUTPUT«7␤7␤»
17:08 andreoss okay.
17:08 tony-o so if you bind your sigilless variable to a mutable variable then you can reassign as you were you trying to above because the operation is performed on the mutable variable
17:08 tony-o it's hokey that way though
17:08 andreoss are there any guidelines about sigiless variables?
17:08 andreoss looks like they were meant for something special
17:11 tony-o i haven't looked into it much, just how to exploit it for profit
17:11 sqirrel joined #perl6
17:13 andreoss also, having optional immutability would fit nice with other FP features of perl
17:14 andreoss may be some pragma to turn off mutation within a block
17:14 Ven "class" "role" "subset" create a new type. is that exhaustive?
17:16 tony-o andreoss: it's been discussed extensively, i just don't remember the outcome.  it's in the perl logs somewhere
17:17 tony-o well, i remember the outcome, just not the reasoning
17:18 fhelmberger joined #perl6
17:20 mickcy_ca Here is a kicker ... I was asking about pipes and Perl 6 yesterday ... came to a solution for a simulation of what I want to do.  Come to actual implementation, my application hangs when I have a line that opens a named pipe in a Supply that is not even executed.
17:21 tony-o mickcy_ca: gist?
17:22 masaq yes, a gist would help a lot.
17:22 masaq preferably of the smallest possible code that does the wrong thing :)
17:23 Ven ok, just commited a big "refactor" to the tutorial. I removed a lot of "white rabbit holes" and moved some operators (like ff) to some "appendix"
17:23 mickcy_ca See http://pastebin.com/hvsmWcHa for the offending part.
17:23 tony-o where does it hang?
17:24 mickcy_ca if my $fh = ... is removed, everything goes well.
17:24 mickcy_ca Inside get_file_listing
17:24 tony-o mickcy_ca: should the $fh really be :rw?  also - throw a CATCH { .say; } in that 'start' block and see if you get an error
17:25 hoelzro tony-o: I did not
17:25 tony-o hoelzro: have you been using it?
17:25 mickcy_ca tony-o: Should be :r ... hangs there too.
17:25 tony-o i don't see a sub for get_file_listing
17:25 mickcy_ca Sorry %attr<src_dir> //= "/home/mickyc/Media/Videos/DVDRip";
17:25 mickcy_ca %attr<file-list> = find(dir => %attr<src_dir>, name => /.+?vob/);
17:26 mickcy_ca That is the entire sub.
17:27 timotimo stub the sub
17:27 mickcy_ca ?
17:28 timotimo just a pun
17:28 mickcy_ca Ah.
17:29 mickcy_ca http://pastebin.com/zqAn1H60 update with get_file_listing
17:30 mickcy_ca It doesn't really "crash," it just hangs.  This behaviour is evident whether I executer get_file_listing before or after the Supply setup.
17:32 tony-o it crashes in get_file_listing?
17:32 tony-o or in the $fh read
17:32 mickcy_ca Hangs in get_file_listing.
17:33 mickcy_ca I have had it going since before talking about it ... and still has not completed.
17:33 mickcy_ca To boot, the pipe and the directory listing are not even on the same hard drive.
17:36 kjs_ joined #perl6
17:40 raiph joined #perl6
17:43 mickcy_ca tony-o: The thing about the $fh.read ... is that it currently is not in the execution path.  All that has happened is that $fh.open complies and that appears to interfere with the file find.
17:45 tony-o can you add CATCH { .say; } at line 10 in your gist
17:47 mickcy_ca No output.
17:48 mr-foobar joined #perl6
17:49 jack_rabbit joined #perl6
17:50 tony-o give me a few, im in a mtg
17:53 koo6 joined #perl6
17:55 raydiak g'mornin #perl6
17:57 moritz \o raydiak, merry christmas!
18:00 raydiak \o Merry Christmas moritz, #perl6
18:00 tony-o mickcy_ca: where is %attr defined
18:01 mickcy_ca Further up in my script ... it is just built up as I use it.
18:02 mickcy_ca tony-o: you may notice that I am just assigning to it at this point.  For interest, this usage is the first time it gets used.
18:04 raydiak anyone looking at the pipe problem should be aware that we noticed yesterday that rakudo, when opening (not reading) a pipe, tries to read from it then seek back to 0...so it blocks until there's something to read, then dies trying to seek on a pipe, all just from calling open
18:06 raydiak heh except now I can't get the seek error, just the blocking on open
18:07 mickcy_ca You get the seek error when reading from the pipe using a IO::Path object and use anything except .read.
18:07 raydiak ah, thanks...will add that to the bug report I should have filed yesterday :)
18:09 mickcy_ca Also, if you actually open the pipe and something comes through it, even with a IO::Handle object NOTHING but read can do it.
18:10 atroxaper joined #perl6
18:15 mickcy_ca Gotta Go ... talk late.
18:15 mickcy_ca left #perl6
18:37 raydiak how do I add info to an existing RT ticket instead of creating a new one when e-mailing?
18:39 FROGGS raydiak: I don't know if that is possible.... but you can log into RT and add comments
18:40 FROGGS but you can try so send an email with [perl #123456] in the subject
18:40 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=123456
18:40 raydiak FROGGS: thanks, I'll give that a shot...typed the whole thing up in mutt on my vps before noticing there was already a relevant ticket :)
18:40 Mso150_f joined #perl6
18:41 erkan joined #perl6
18:46 raydiak yep that works, FROGGS++...is #123484 for anyone who was interested
18:46 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=123484
18:53 * raydiak keeps trying to think of something short to call the design docs since they are not specs and "syns" sounds like a series of offensive transgressions
18:54 raydiak and tired of typing synopseseses
18:57 erkan joined #perl6
19:03 raiph raydiak: Maybe 'specs' is short for 'speculations that lead to tests that become specifications' and you/we just keep using the word 'specs'
19:04 anaeem1 joined #perl6
19:07 raydiak raiph: heh I like it...the best solution is the one thats already implemented
19:08 raydiak moritz: what do you think about https://github.com/perl6/www.p6c.org/pull/2 ?
19:15 atroxaper joined #perl6
19:21 pmurias joined #perl6
19:23 pmurias masak: is instant starup for one liner
19:23 pmurias a big niche?
19:28 Mso150_f joined #perl6
19:30 kjs_ joined #perl6
19:35 anaeem___ joined #perl6
19:48 FROGGS_ joined #perl6
19:51 hoelzro tony-o: I started using it for perl6/syntax a bit
19:52 tony-o hoelzro: any issues with it so far?  i submitted a PR to clean up deprecated .IO stuff earlier, i want to use it for a perl6 site similar to npm
19:53 naddiseo Is there a way to specify class methods (a routine that doesn't use/need `self`)? If so, how do you refer to them outside the class?
19:54 hoelzro tony-o: I don't recall bugs or anything
19:55 FROGGS_ m: class Foo { method bar { 42 } }; say Foo.bar # naddiseo
19:55 camelia rakudo-moar e86167: OUTPUT«42␤»
19:55 naddiseo k
19:55 FROGGS_ naddiseo: methods that dont use self and dont access attributes are just called on the class itself
19:56 naddiseo My problem was I used "sub" instead of "method"
20:03 BenGoldberg joined #perl6
20:08 tony-o who is softmoth on github?
20:15 raiph joined #perl6
20:26 andreoss` joined #perl6
20:31 Mso150_f_x joined #perl6
20:37 masaq pmurias: maybe not.
20:37 masaq pmurias: there are a lot of reasons not to do that layered thing.
20:42 Sqirrel joined #perl6
20:50 jack_rabbit joined #perl6
20:55 raiph Going somewhat the opposite direction from instant start one liner use: what are the top technical challenges in the way of building nqp/rakudo based "Image" systems (ala smalltalk)?
20:58 masaq you'd need a way to save the state of the whole program to disk, I guess.
20:59 vendethiel masaq: just save the ram :P
21:00 FROGGS_ yeah, pull it out and put it in a box
21:01 raydiak or hibernate the computer and put that in a box...then you can actually restore it
21:01 raydiak I volunteer to make boxes!
21:02 FROGGS_ so... we want to wrap our running program in another VM we can suspend?
21:05 raiph Does program state directly map to NQP objects?
21:06 raiph er, 6model objects
21:06 atroxaper joined #perl6
21:07 raiph I was thinking it did and the objects could be serialized/deserialized
21:16 kjs_ joined #perl6
21:27 FROGGS_ I think that one is strange:
21:27 FROGGS_ m: my $i = 0; say do while $i < 10 { $i++; last if $i == 3 }
21:27 camelia rakudo-moar e86167: OUTPUT«sub infix:<==> ($?, $?) { #`(Sub+{<anon>}+{Precedence}|51229904) ... }␤»
21:29 masaq that's a bit strange, yes.
21:29 masaq not sure what I'd want it to be... Nil?
21:38 FROGGS_ I'd expect a list of Nils or so in that case
21:38 FROGGS_ the funny thing is, --optimize=off changes it:
21:38 FROGGS_ perl6-m --optimize=off -e 'my $i = 0; say (while $i < 10 { $i++; last if $i == 3 })'
21:38 FROGGS_ True
21:39 FROGGS_ perl6-m -e 'my $i = 0; say (while $i < 10 { $i++; last if $i == 3 })'
21:39 FROGGS_ sub infix:<==> ($?, $?) { #`(Sub+{<anon>}+{Precedence}|56096624) ... }
21:39 FROGGS_ so I guess the optimizer messes with the 'return value' of while loops
21:39 FROGGS_ and that would also explain why my other attempts did not change anything
21:41 ninjazach joined #perl6
21:43 masaq hm, how do I configure my hack.p6c.org shell to love Unicode a bit more?
21:47 flussence LC_ALL=$lang.utf-8 ought to do it...
21:47 flussence (I'm not sure how case-sensitive it is though; mine's en_GB.UTF-8, but I've also seen a ".utf8" and been told to avoid it...)
21:49 andreoss joined #perl6
21:49 raiph merry xmas #perl6, gnite
21:49 flussence you too o/
21:49 zakharyas joined #perl6
21:51 andreoss is there a way to run perl6 code but keep perl5 in shebang?
21:54 erkan joined #perl6
21:55 erkan joined #perl6
21:55 andreoss i mean some wrapper to redirect file to rakudo, not a translator of course.
21:55 mr-foobar joined #perl6
21:56 timotimo yeah, with Inline::Perl5 you can do that (if i remember correctly)
21:57 masaq andreoss: that sounds like a weird request to me. why do you want to keep perl5 in the shebang line?
21:57 flussence running it like `perl6 thing.pl` ought to do something... though the first thing I tried that on bailed out at the first "use" line.
21:57 flussence you could also make a perl -> perl6 symlink somewhere in your $PATH
21:58 masaq andreoss: I don't believe you can do this without changing what `perl` means in your system.
21:58 andreoss masaq: just for unification
22:00 FROGGS_ next step: unify PHP and Python
22:00 flussence shhh, don't give them ideas :)
22:05 andreoss masaq: i want "use 6.000;" and if there's no rakudo installed the interpreter would say so, with modified shebang the programm just fails with "no such command: perl6"
22:06 FROGGS_ but it won't happen that a 'perl' in path is perl6
22:06 dj_goku joined #perl6
22:06 dj_goku joined #perl6
22:07 andreoss FROGGS_: it will broke the p5 stuff though
22:07 masaq andreoss: aha. kind of like a dispatch mechanism to either Perl 5 or Perl 6.
22:07 masaq andreoss: I think such a script could be written, and be made quite reliable.
22:07 masaq andreoss: ...but I wouldn't, if I were you. you'd end up having a system that behaves like no-one else's.
22:08 Rounin joined #perl6
22:17 dj_goku joined #perl6
22:17 dj_goku joined #perl6
22:23 Woodi hallo #perl6 :)
22:23 masaq \o
22:23 Woodi happy Christmas :)
22:24 masaq to you too, sir!
22:24 Woodi thank you :)
22:25 Woodi I wonder can we have some perl6 -switch(es) to use on oneliners to not load some thing(s) ?
22:25 Woodi but maybe compilation cares about that :)
22:26 Woodi eg. no load OO stuff for particular oneliner ?
22:27 Woodi and probably this would be cheating on perl5 :)
22:28 * masaq .oO( committing perl5 adultery )
22:34 naddiseo m: class Foo { method bar($a, :@b) { [@b, $a] } }; my @c = (1,2,3); my &f := &(Foo.bar).assuming(b => @c); say f(4, 5);
22:34 camelia rakudo-moar e86167: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in method bar at /tmp/GEN95lSi8w:1␤  in block <unit> at /tmp/GEN95lSi8w:1␤␤»
22:35 naddiseo so.. how do you use .assuming with a class method?
22:35 masaq 'night, #perl6
22:39 bjz joined #perl6
22:44 awoodland joined #perl6
22:50 virtualsue joined #perl6
22:55 ninjazach joined #perl6
23:04 raydiak m: class Foo { method bar($a, :@b) { [@b, $a] } }; my @c = (1,2,3); my &f := Foo.^methods[0].assuming(b => @c); say Foo.&f(4); # naddiseo
23:04 camelia rakudo-moar e86167: OUTPUT«1 2 3 4␤»
23:05 raydiak though surely theres a better way to get that method ref? *shrug*
23:06 naddiseo yeah. don't think I can rely on it being the nth method
23:06 raydiak well, there's this:
23:06 raydiak m: class Foo { method bar($a, :@b) { [@b, $a] } }; my @c = (1,2,3); my &f := Foo.^methods.first(*.name eq 'bar').assuming(b => @c); say Foo.&f(4);
23:06 camelia rakudo-moar e86167: OUTPUT«1 2 3 4␤»
23:06 raydiak but still, it feels clumsy, I suspect there's a better syntax, I just don't know it personally
23:08 naddiseo well TMTOWTDI
23:08 raydiak true enough :)
23:09 naddiseo So far I've just settled for wrapping it in another function: sub helper($a) { return Foo.bar($a, b => @c); }
23:09 naddiseo Thanks for trying though.
23:11 raydiak you're welcome
23:13 Ven joined #perl6
23:48 koo6 joined #perl6

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

Perl 6 | Reference Documentation | Rakudo