»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
psch although i'm not completely sure if gather/take in a Supply DWIMs like that 00:00
my (limited) understanding says it probably should, but YMMV
Timbus dont you want a suppluy from_list
thats what I assumed at least
00:01 bjz left
psch Timbus: i think you're right. gather/take builds a lazy list and from-list Supply's from a List... 00:01
00:07 virtualsue left
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:09
00:11 pmurias left
psch mickcy_ca: can you paste the code you're running somewhere? 00:12
mickcy_ca psch: can upload to a dropbox account. 00:13
psch mickcy_ca: some pastebin would be easier i'd figure
i.e. pastebin.org, paste.debian.net, something like that 00:14
mickcy_ca pastebin.com/Q6jdHDQZ, as Perl6 Supplies 00:17
00:21 bcode_ joined
mickcy_ca psch: for the other side of the pipe, I simulate ffmpeg timings ... both scripts are up now at pastebin.com/i8vmAEHz 00:23
psch mickcy_ca: i'm looking at it, give me a moment 00:24
00:27 bcode is now known as zombcode, bcode_ is now known as bcode 00:28 BenGoldberg joined 00:29 spider-mario left 00:32 zombcode left, raiph left 00:34 raiph joined 00:40 atroxaper joined
psch mickcy_ca: gist.github.com/anonymous/2424e15f65f444715d3e this works for me 00:41
mickcy_ca: note: my fifo is called "blargl" :)
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:43
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
00:44 davido__ joined
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:44
the main difference is you're "stuck" in the while instead of having to sleep 00:45
00:45 atroxaper left 00:46 davido___ left
tony-o toss a start { } around it 00:48
psch tony-o: well, it's in a start { }, but it still needs to be await()ed, doesn't it? 00:52
that's the assumption i was operating under at least
tony-o does gather start it's own thread?
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
while testing http-server-async ^
00:56 erkan left
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
00:57 dayangkun joined
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:58
psch: Also, the script you provided outputs nothing on my machine. 00:59
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:01
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
also, the await can go, turns out i misunderstood its purpose :) 01:03
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) }»
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})>
tony-o i see, the gist that psch posted looks correct 01:07
it works for me 01:08
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 ␤»
tony-o perl bot is faster than the VM running on my surface
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:11
tony-o you want to see 'tail -f' in a loop in p6? 01:12
mickcy_ca Nope, pulling statistical data from ffmpeg through a named pipe. 01:13
psch mickcy_ca: i'm not sure what you think is missing from my gist 01:15
mickcy_ca: you can just replace the $s.say with process_data($s)
and do all you need to do with each line in there
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:16
mickcy_ca psch: Nothing apparently missing, just the pipe is somehow being consumed without being displayed on the receiving end. 01:18
psch: no array processing needs to happen, just a dispach table based on key words come from the statistical model. 01:19
tony-o mickcy_ca: you're not getting anything on stdout? 01:20
mickcy_ca Correct 01:23
Not even line feeds.
tony-o are you using psch's script? 01:24
psch to clarify: gist.github.com/anonymous/885de3685de84ce7fa67
tony-o if you didn't cp & paste, add CATCH { .say } to anywhere you have a 'start {' block 01:25
those errors aren't bubbled up, just silently ignored
psch i'm off to bed, good luck further mickcy_ca :) 01:26
tony-o i'm leaving work
mickcy_ca psch: Thanks for all of the help.
tony-o: Thank you as well.
dalek rl6-roast-data: 2612095 | coke++ | / (5 files):
today (automated commit)
01:28
01:30 psch left
naddiseo Is the order that expressions are executed in, defined? 01:33
@a.push(Foo(@a.pop, @a.pop))
01:36 KCL_ joined
Timbus well, yeah. defined by the direction of the operator i guess? 01:37
m: (say(5),say(10))
camelia rakudo-moar 8154bd: OUTPUT«5␤10␤»
Timbus m: (say(5)R,say(10))
camelia rakudo-moar 8154bd: OUTPUT«10␤5␤»
naddiseo So, if Foo was: sub Foo($a, $b) { return [$a, $b]; } 01:38
THe result of my @a = (1, 2); @a.push(Foo(@a.pop, @a.pop)) should be @a == ([1,2]) 01:39
Interesting.
It's odd thinking of a comma as an operator
Okay, It should do what I want it too then. Thanks. 01:40
Timbus its odd not thinking of it as one, actually :p
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␤»
Timbus you got the order wrong
pop takes from the end
naddiseo ah, yeah, pop takes from the right. 01:42
Timbus you want shift
TimToady well, either of them is assuming execution order
naddiseo yeah
TimToady Foo(|@a) would enforce order
Timbus oo
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
m: say reduce(&[,], <a b c d e>).perl 01:45
camelia rakudo-moar 8154bd: OUTPUT«Memory allocation failed; could not allocate 206848 bytes␤»
TimToady cool
Timbus lmao
TimToady anywa, &[op] is supposed to force binary, even if op is list associative
m: say reduce(&[~], <a b c d e>).perl 01:46
camelia rakudo-moar 8154bd: OUTPUT«"abcde"␤»
naddiseo hm,
TimToady m: say reduce(&[=>], <a b c d e>).perl
camelia rakudo-moar 8154bd: OUTPUT«((("a" => "b") => "c") => "d") => "e"␤»
naddiseo oo, that's interesting
TimToady m: say [=>](<a b c d e>).perl
camelia rakudo-moar 8154bd: OUTPUT«"a" => "b" => "c" => "d" => "e"␤»
TimToady so you can get left associative, even though => is right associative
but why it doesn't work with &[,] looks like a bug 01:47
Timbus you somehow made an infinite tree? 01:48
TimToady shouldn't'a
naddiseo So, how do I invert an enum constructed with `enum A (B => 'b', C => 'c');` ? 01:49
So far I've got %(A.enums.invert) 01:50
TimToady looks about right
naddiseo (I want to be able to get the enum from a value, ie, I have 'b' and I want A::B
TimToady m: enum A (B => 'b', C => 'c'); say A.enums.WHAT
camelia rakudo-moar 8154bd: OUTPUT«(Hash)␤»
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␤»
TimToady m: enum A (B => 'b', C => 'c'); say A.enums.invert{}.perl
camelia rakudo-moar 8154bd: OUTPUT«("b" => "B", "c" => "C").list␤»
TimToady I guess that doesn't quite imply .hash
Timbus i think you are having the issue i had, where you want to not only convert, but get 'the' enum
naddiseo so, enum A (); does make a new Enum class type?
Timbus with the type attached 01:52
TimToady yes
but it's an empty enum, so not terribly useful
and you can't add to it later, since it's a declaration
naddiseo How did you solve it Timbus ?
Timbus A::<$string> 01:53
uh
A::<<$string>>
TimToady m: enum A (B => 'b', C => 'c'); say A::{'B'}
camelia rakudo-moar 8154bd: OUTPUT«b␤»
Timbus or A::{$string} in that case ^ yea 01:54
TimToady seems {} would be a little more straightforward
m: enum A (B => 'b', C => 'c'); say A('B')
camelia rakudo-moar 8154bd: OUTPUT«(A)␤»
01:54 Akagi201 joined
Timbus !!! 01:54
TimToady hmm, thought that was specced
01:54 isBEKaml joined
Timbus that would be neat 01:54
oh 01:57
TimToady well, maybe it used to be, and was removed for some reason
Timbus m: enum A (B => 'b', C => 'c'); say A('b')
camelia rakudo-moar 8154bd: OUTPUT«b␤»
TimToady m: enum A (B => 'b', C => 'c'); say A('b').WHAT
camelia rakudo-moar 8154bd: OUTPUT«(A)␤»
Timbus m: enum A (B => 'b', C => 'c'); say A('b').perl
camelia rakudo-moar 8154bd: OUTPUT«A::B␤»
TimToady yeah
Timbus thats neat
TimToady but the other dir 01:58
01:58 dayangkun left
Timbus thats what he needed in the first place 01:58
naddiseo Yup
Timbus haha
naddiseo That's what I was looking for
01:58 Akagi201_ left
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
naddiseo Is there a way to `bind` functions (in the javascript sense)? 02:03
Timbus uhh. in what sense is that 02:07
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? design.perl6.org/S12.html#Delegation
geekosaur (in *this* channel, you never know...)
Timbus im making my own version of emberjs data binding, but thats probably not what you mean
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
oh
geekosaur isn't that :assuming? 02:10
Ulti multis and delegation are around that
Timbus its more like.. just using a sub in place of a method
in this case
or the opposite, using .assuming yes 02:11
02:12 mickcy_ca left
naddiseo Hm, yeah, assuming looks like it should work. 02:12
Timbus it should be exactly what you want... if that's what you want. :P 02:15
naddiseo Yeah, just need to read up on how to pass-by-ref 02:18
Timbus you always pass by ref
naddiseo Oh. that makes things easier then.
Timbus not always! 02:19
m: sub mod($a is rw) { $a+1 }; my $z = 10; mod($z); say $z
camelia rakudo-moar 8154bd: OUTPUT«10␤»
Timbus m: sub mod($a is rw) { $a+=1 }; my $z = 10; mod($z); say $z
camelia rakudo-moar 8154bd: OUTPUT«11␤»
Timbus typo
02:20 rmgk_ joined, rmgk is now known as Guest14938, Guest14938 left, rmgk_ is now known as rmgk 02:31 atroxaper joined 02:33 chenryn joined 02:39 atroxaper left 02:50 isBEKaml left 02:51 isBEKaml joined 02:52 Ugator2 joined 02:54 Ugator1 left 02:59 bjz joined 03:02 isBEKaml left 03:11 awoodland joined 03:15 Mso150 joined 03:31 Mso150_f joined, Mso150 left 03:33 anaeem1_ left 03:36 ninjazach left 03:48 mickcy_ca joined
mickcy_ca Does anybody have a good recommendation for a Perl6 syntax highlighting editor? 03:49
03:49 Mso150_f left
Timbus vim has a good one, the only other i can think of is padre 03:50
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.
Timbus oh?
03:52 xinming_ joined
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
03:52 noganex joined
Timbus ah 03:53
it thinks the : is the terminator
terminator? .. quote separator? i dont know the term for that. 03:54
ive had that issue with perl 5 highlighters too.
mickcy_ca Rakudo does not like sg:/// or s:g:/// only s:g/// 03:55
03:55 noganex_ left, xinming left
mickcy_ca Is sublimetext a KDE app? 03:56
Timbus ah, no. it's a paid app sorry. 03:57
mickcy_ca Ok. 03:58
How much?
Just saw ... $70US 04:00
Timbus im not recommending you get it. just saying i use perl 5 syntax
mickcy_ca Ok.
Timbus :)
but vim is good for perl 6 if you like using it 04:01
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:02
Timbus yeah.. 04:03
04:04 anaeem1_ joined, anaeem1_ left 04:05 anaeem1_ joined
mickcy_ca Timbus: Apparently vim-gnome is around .... installing right now ... will let you know what I think 04:05
Vim-gnome ... good highlighter slow as heck. 04:07
Timbus really? i haven't noticed it being too bad, but i run a beefy PC i guess 04:09
04:12 chenryn left
mickcy_ca perhaps it is because I am running an h265 encode in the background at this moment. 04:15
Timbus .. well that certainly wouldnt help :p 04:16
it's still probably not an optimal highlighter, i recall alester mentioning that when he wrote it 04:17
mickcy_ca While not optimal, Gnome emacs-24 has some nice P5 highlighting ... usable in P6 04:20
04:27 BenGoldberg left
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
:(
Timbus yeah.. making tools for a language is not fun enough for most people 04:32
04:40 chenryn joined 05:02 sunnavy left 05:03 sunnavy joined 05:42 vendethiel left 05:44 koo6 left 05:52 vendethiel joined 05:55 atroxaper joined 06:01 atroxaper left 06:08 adu joined 06:13 kaleem joined 06:23 mr-foobar left 06:37 isBEKaml joined 06:46 chenryn left 06:49 erkan joined, erkan left, erkan joined 06:51 rindolf joined 06:52 chenryn joined 07:03 isBEKaml_ joined 07:04 raiph left 07:06 isBEKaml left 07:17 brrt joined, isBEKaml_ is now known as isBEKaml, isBEKaml left, isBEKaml joined 07:18 telex left, chenryn left 07:20 telex joined 07:21 chenryn joined
brrt \o 07:21
07:24 isBEKaml left 07:32 rindolf left
moritz o/ 07:35
merry christmas!
07:38 yakudza left
adu merry christmas moritz 07:46
07:47 atroxaper joined 07:49 adu left 07:54 atroxaper left 07:59 virtualsue joined 08:01 rindolf joined
brrt merry christmas moritz 08:01
and merry christmas adu 08:02
08:10 vendethiel left
JimmyZ merry christams all 08:15
08:15 kjs_ joined 08:16 vendethiel joined
sjn Merry Christmas, #perl6 08:17
brrt TimToady++ 's post is really nice I think
sjn also, today's advent post was really nice :)
08:17 darutoko joined
sjn TimToady++ # Of course, I could be wrong; But not this time. :) 08:18
08:20 Woodi left, Woodi joined 08:28 rurban joined 08:34 Mso150_f joined 08:38 vendethiel left 08:40 LLamaRider joined 08:41 vendethiel joined 08:42 ptc_p6 joined 08:52 ptc_p6 left, kjs_ left 08:53 yakudza joined 09:00 andreoss joined 09:03 awoodland left
andreoss why do Parcel and List have no .last-index, .first-index methods? 09:04
09:04 vendethiel left 09:05 awoodland joined, erkan left 09:06 virtualsue left 09:08 erkan joined
FROGGS__ TimToady++ 09:09
just read it :o)
sjn moritz: btw, I think I found a typo in your artile from monday
moritz: it says "(if you’re wondering, the “” is because the arguments both are unnamed and untyped)" 09:10
should there be something inside those quotes?
sjn guesses something was interpreted as invalid html, and removed 09:11
09:12 kaare_ joined, molaf left, molaf joined 09:14 vendethiel joined
FROGGS__ sjn: I fixed it... 09:16
it was Ven++'s post: perl6advent.wordpress.com/2014/12/2...t-of-main/
sjn aah 09:18
brrt that was also a pretty nice post yes
sjn any other posts that aren't attributed correctly? :)
(or did I just misread?) 09:19
09:23 awoodland left 09:30 carlin left, FROGGS__ left, prammer left, awoodland joined, carlin_ joined, FROGGS__ joined, yeltzooo9 left, prammer joined, synopsebot left, itz_ left 09:37 yeltzooo joined, itz joined, telex left, telex_ joined, synopsebot joined, telex_ is now known as telex, vendethiel left 09:42 mvuets joined
moritz sjn: I thikn you just misread 09:43
09:43 andreoss left 09:48 vendethiel joined 09:51 sqirrel joined 09:53 koo6 joined 09:57 chenryn left 09:59 chenryn joined 10:10 spider-mario joined 10:16 Ugator2 left 10:25 awoodland left 10:27 awoodland joined 10:30 sqirrel left
lizmat good *, #perl6! 10:33
10:33 awoodland left 10:34 awoodland joined
moritz god jul, lizmat 10:34
lizmat .tell andreoss re.last-index on Parcel/List: but they do? inherited
yoleaux lizmat: I'll pass your message to andreoss.
lizmat fijne feestdagen, moritz! 10:35
m: <a b c>.last-index(* eq "b").say
camelia rakudo-moar 8154bd: OUTPUT«1␤»
lizmat <a b c>.list.first-index(* eq "b").say 10:36
m: <a b c>.list.first-index(* eq "b").say
camelia rakudo-moar 8154bd: OUTPUT«1␤»
10:38 sqirrel joined
moritz m: for <first last> -> $dir { say <a b c>."{$dir}-index"('b') } 10:50
camelia rakudo-moar 8154bd: OUTPUT«1␤1␤»
moritz m: for <first last> -> $dir { say <a b c d c b a>."{$dir}-index"('b') }
camelia rakudo-moar 8154bd: OUTPUT«1␤5␤»
10:51 xfix joined 10:55 vendethiel left 10:57 vendethiel joined 11:00 Mso150_f left 11:02 anaeem1__ joined 11:05 anaeem1_ left
vendethiel o/, #perl6 11:06
FROGGS__ o/
11:06 FROGGS__ is now known as FROGGS
dalek kudo/nom: 4206b6c | lizmat++ | src/core/CompUnitRepo.pm:
parse-spec -> helper sub named PARSE-INCLUDE-SPEC
11:08
kudo/nom: ddddcd3 | lizmat++ | t/spectest.data:
No longre try to do parse-spec tests
kudo/nom: be2b982 | lizmat++ | t/01-sanity/52-parse-include-spec.t:
Move parse-spec tests to sanity test
kudo/nom: e861672 | lizmat++ | t/01-sanity/52-parse-include-spec.t:
Sanity test is not fudged, so fudge manually
ast: 8a8d0de | lizmat++ | S22-package-format/parse-spec.t:
parse-include-spec tests moved to sanity
11:09
lizmat vendethiel FROGGS /o 11:10
FROGGS hi liz
11:11 masaq joined
masaq good antenoon, #perl6 11:11
TimToady++ # 24 post
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.
moritz: ...but I left screen running... :/
so now an inaccessible copy of me is squatting my nick.
damn, the future is so confusing 11:13
lizmat .o( konfusing even :-)
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.
(yeah, I didn't really follow Perl 6 news lately) 11:15
masaq xfix: if you're still wondering, then p6c.org/ is probably a good summary.
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
masaq it's probably hosted closer to you geographically :P 11:16
11:16 rurban1 left
xfix Well, it is, but not really much. 11:16
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
moritz: the database is already transferred, but I need to generate static pages, and that will take its time 11:18
11:19 rurban1 joined, rurban1 left 11:22 anaeem1_ joined, anaeem1__ left
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:25
11:26 chenryn left
xfix Ok, IO::Socket::Async. 11:27
11:27 chenryn joined 11:28 anaeem1_ left, atroxaper joined, anaeem1_ joined 11:33 brrt left 11:34 FROGGS[mobile] left, atroxaper left 11:35 FROGGS[mobile] joined
moritz FROGGS: ok, sounds good 11:42
the data center in which p6c.org lives has a pretty good uplink :-)
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:45
moritz xfix: parrot backend? 11:46
nqp doesn't use ffi at all, it uses dyncall
JimmyZ hmm,p6c.org and perl6.org have the same content?
moritz JimmyZ: they shouldn't; refresh your browser? 11:47
xfix JimmyZ, probably browser cache, perhaps CTRL+F5 will work.
I'm trying to install aur.archlinux.org/packages/rakudo-star/, but it depends on nqp.
JimmyZ oh,ctrl+f5 works
xfix (I believe this package installs both Parrot and MoarVM backend)
Hm, but I guess I should just modify the package to install 2014.12. 11:48
11:48 chenryn left
xfix Considering it was released 12 hours ago. 11:48
Oh wait, it wasn't. 11:49
dalek ar: 96d0428 | moritz++ | tools/lib/NQP/Configure.pm:
Partially import NQP::Configure from rakudo
11:51
11:52 kaleem left
moritz current star state: moar passes all module tests, parrot has some regressions (nativecall, doc, jsonrpc) 11:53
11:54 smls joined
smls Merry Christmas, all! 11:54
xfix Merry Christmas.
moritz MIME::Base64 also fails on parrot
merry christmas, smls
smls TimToady: "Which I guess makes them righty or wrongy, I guess." -- You guess that you guess? :P 11:55
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
Nice post though.
xfix Ok, so `parrot_config ccflags` shows `-I/usr/lib/libffi-3.1/include`. 12:00
Hm, that probably means Parrot was built with old version of ffi.
I guess it means I have to abs parrot. 12:01
12:04 erkan left
xfix Ok, so I recompiled Parrot using PKGBUILD, and now I can install nqp. 12:06
12:06 erkan joined
masaq smls: now I'm also curious about the "strong features" vs "weak features" point. :) 12:07
feels like each of those pithy one-line things could be a blog post of its own.
smls Probably?
s/?// 12:08
masaq could someone with access to feather please kill by screen and/or irssi on there?
I would myself, but lately I've taken to running /bin/false as a shell.
xfix /bin/false best UNIX shell. 12:09
masaq I especially like how bug-free it is.
xfix (why not /sbin/nologin)
12:12 erkan left 12:15 erkan joined 12:21 erkan left 12:23 erkan joined 12:27 cognominal joined 12:31 erkan left
xfix Hm, so I installed Rakudo Star, and perl6 runs in 0.3 seconds. Fast. 12:31
(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.
it's been on our feature list for quite some time.
"faster" is on the list too, but it had "fast" as a hard dependency.
12:34 erkan joined, erkan left, erkan joined
xfix I also checked www.perlmonks.org/?node_id=952765, and it's 0.6 seconds for me. I actually wonder how fast Perl 6 can get. 12:37
(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
12:38 simpleirc1 joined 12:40 simpleirc1 left 12:42 erkan left
sergot hi o/ 12:43
masaq merry 24th, sergot 12:44
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, erkan left, erkan joined
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
I don't know how practical this is.
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
but that never ends well.
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.
there could be several layers, of course. like 1%, 5%, 20% and 100%.
12:49 sqirrel left
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.
it would still be Perl 6, in both syntax and semantics. 12:50
it's just that you wouldn't be paying cost, startup and runtime, for features you don't use.
xfix Of course, but without most of Perl 6 features.
masaq well, realistically, most of the time I don't use most of the features.
xfix One liners are different. For example, sometimes user may want to print JSON.
masaq of course, as my program's size goes to infinity, the likelyhood that I will use 100% goes to 100% :) 12:51
but my point is, many one-liners are dead simple. and I still enjoy Perl 6 over AWK even for dead simple things.
timotimo oh hey xfix 12:52
nice to see you again :)
xfix Hi, timotimo.
12:53 erkan left
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 anaeem1_ left
masaq xfix: your argument boils down to "there are many things that use more than 1%". and you're right. 12:55
xfix: but for the things that don't it might still be a useful speedup.
lue: yes, the underlying principle being "don't pay for features you don't use". 12:56
12:56 erkan joined
xfix I'm rather wondering about dynamically including stuff. 12:56
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.
timotimo nim (formerly nimrod) is very agressive at dead code elimination
12:58 kjs_ joined, awoodland left
xfix The heurestics to do so in Turbo C sometimes did the wrong thing, however - stackoverflow.com/questions/123665...ot-linked. But I think with JIT, it's less of issue. 13:00
13:04 erkan left 13:06 smls left 13:19 atroxaper joined 13:25 atroxaper left 13:27 KCL joined, koo6 left 13:29 KCL_ left
xfix Hm, bot doesn't report changes in p6c.org? 13:30
13:36 erkan joined
lizmat masaq: a large part of perl6 startup time, is caused by initializing stuff you might not need for one liners 13:39
one big part of that is @*INC initialization
I once had startup at 0.15 seconds
but that broke panda (although I think I'm getting closer to figuring that one out, finally!) 13:40
xfix Does @*INC really need to initialize in 0.15 seconds? 13:42
In Perl 5, @INC initialization is not an issue.
13:42 bjz left
lizmat xfix: in Perl 5, -use- is dead simple 13:45
in Perl 6, it is not
xfix Then, perhaps @*INC in Perl 6 has flawed design?
lizmat fwiw, I'm not happy with @*INC at all myself 13:46
for one, I'm not sure we want to expose this at all
as an array, I mean
13:46 bjz joined
lizmat we want to expose it, sure, but probably not as a dynamic array 13:47
xfix: open to suggestions there (basically S11 and S22)
13:49 anaeem1 joined
xfix I'm not exactly sure. How is @*INC different to @INC in Perl 5 and sys.path in Python? 13:49
What does it do that Perl 5 doesn't? 13:50
vendethiel xfix: :version, :author and stuff, I guess
lizmat vendethiel: yes, and its pluggable with a specced API
xfix So, it loads every single package to determine which one the user wants?
lizmat rather than the vague ad-hoc API that Perl 5 provides 13:51
xfix: no, @*INC contains a CompUnitRepo object
each CompUnitRepo object is asked to provide candidates for a given module/auth/version/lang
if it has 0 candidates, the next one is interrogated 13:52
if it has 1 candidate, it will be loaded
if it has >1 candidate, an exception will be thrown
xfix So, where is the issue? If there is one module of given name, it should just simply load it.
13:52 erkan left
xfix That shouldn't take 0.15 seconds. 13:53
(especially when the module itself is cached)
lizmat apart from initializing @*INC, we're also initializing %CUSTOM_LIB
xfix %*CUSTOM_LIB, right? 13:54
lizmat eh, yes
without that, panda dies
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"
lizmat so it's an intricate web of dependencies that goes deep into the nqp rabbithole
xfix I don't exactly see what the issue is. There are three predefined path, and one dynamic in my home directory.
paths*
Or am I missing something?
lizmat the issue, afaik, is in the setting up @*INC and %*CUSTOM_LIB 13:55
13:56 erkan joined
lizmat now, if you're doing perl6 -e 'say 42' 13:56
you don't need all of that
xfix Ok, checked src/core/Inc.pm. This is quite complex.
lizmat yes, and it goes deeper into Perl6/ModuleLoader.nqp 13:57
changing things there, even thought a clean spectest, breaks panda
or worse, breaks panda only on one VM 13:58
so any changes there need to be checked thoroughly, otherwise the ecosystem suffers
and rebuilding rakudo on parrot is like 10x slower
than on moar
and testing on jvm is like 10x slower 13:59
so it just takes a lot of time
and then there's differences between OS's
so we basically got a 2 x 3 matrix of versions to check 14:00
need to run now, will check on mobile later...
&
colomon lizmat: wouldn't that be a 3 x 3 matrix? 3 VMs, 3 major OSes? 14:02
14:03 erkan left 14:06 araujo left, erkan joined
xfix Profiller doesn't see time spent initializing Perl 6... 14:06
(by the way, neat HTML profiller) 14:07
'Output from --profile can be visualized by kcachegrind.' - yeah, sure. 14:08
14:10 araujo joined, araujo left, araujo joined 14:15 atroxaper joined 14:16 erkan left 14:19 [Sno] left 14:22 kjs_ left 14:25 anaeem1 left 14:26 liztormato joined
liztormato xfix: yup, 3x3 14:26
xfix liztormato, you probably meant to say colomon:. 14:27
(redirected that for you)
liztormato xfix: thank you
Wrt --profile: well volunteered ;-) 14:28
14:29 [Sno] joined
xfix feather.perl6.nl/ 14:30
Why this page still exists?
JimmyZ xfix: --profile-compile? 14:31
xfix (I think it should redirect to p6c.org or something)
JimmyZ, thanks.
liztormato moritz: xfix suggestion ^^ 14:32
14:32 kjs_ joined
jdv79 TimToady++ # nice post - i would pay (not sure how much though) for a more thorough elaboration on that list. 14:35
xfix Anyway, will go now, Christmas. 14:36
14:36 xfix left
liztormato xfix: o/ 14:36
14:38 liztormato left 14:51 kjs_ left
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 :) 14:57
"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
^ this is just great :)
timotimo %) 15:03
15:04 fhelmberger joined
FROGGS[mobile] tadzik: yeah, we should do that in panda... 15:11
tadzik oh, right 15:12
15:13 fhelmberger left 15:14 anaeem1 joined
tadzik should we though? Panda only sends metainfo as-is 15:14
FROGGS[mobile] I think we should, aye
15:15 guru joined
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
but only when neither of auth/author/athority is set 15:16
(without typos)
15:20 kaleem joined 15:26 xfix joined 15:28 kaleem left 15:33 sqirrel joined 15:36 mvuets left, kjs_ joined 15:37 kjs_ left 15:40 rurban left 15:41 spider-mario left 15:47 mario1955 joined
mario1955 !list 15:47
ciao 15:48
!listt
15:48 mario1955 left
mickcy_ca Curious ... is there a perl 6 directive to convert total seconds to hours, min, sec? 15:49
15:49 erkan joined, erkan left, erkan joined
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.
mickcy_ca That would be appreciated.
15:52 ninjazach joined
FROGGS[mobile] m: say DateTime.new( now) 15:54
camelia rakudo-moar e86167: OUTPUT«2014-12-24T15:54:05Z␤»
xfix Currently Duration is pretty much contained FatRat.
FROGGS[mobile] m: say DateTime.new( now - 86400)
camelia rakudo-moar e86167: OUTPUT«2014-12-23T15:54:35Z␤»
FROGGS[mobile] mickcy_ca: do you mean that by any chance? 15:55
xfix No.
Rather.
m: say Duration.new(1932942) div 3600
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␤␤»
xfix Right...
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␤␤»
FROGGS[mobile] but that depends on when this duration happens
xfix # SELECT justify_hours('30000 seconds');
08:20:00
15:56 ptc_p6 joined
xfix In PostgreSQL, I can do this. 15:56
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.
FROGGS[mobile] ahh
mickcy_ca: I see
xfix m: say Duration.new(1932942).Int div 3600 15:58
camelia rakudo-moar e86167: OUTPUT«536␤»
xfix m: say Duration.new(1932942).Int div 60 % 60
camelia rakudo-moar e86167: OUTPUT«55␤»
xfix m: say Duration.new(1932942) % 60
camelia rakudo-moar e86167: OUTPUT«42␤»
xfix 536:55:42, but quite ugly. 15:59
In fact, I did a mistake. You don't even need justify_hours in PostgreSQL.
mickcy_ca Nicer to just do it longhand, without Duration. Same thing anyway.
16:00 telex left, erkan left
mickcy_ca Not storing any info in a database at this time. 16:00
xfix SELECT cast('1932942' AS interval);
536:55:42
16:00 jack_rabbit joined
xfix Yeah, I'm just looking at the possible interval API in Perl 6. 16:00
16:00 telex joined
xfix And PostgreSQL has a quite neat interval API. 16:00
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.
But why Perl 6 shouldn't be able to do as well?
to do that*
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 atroxaper left
xfix Even PHP has its interval math (although with lots of quirks, because it's PHP). 16:03
16:03 atroxaper joined 16:04 atroxaper left
vendethiel xfix: hey, I've been told php is getting operator overloading for c types stuff 16:05
xfix It does.
Of course, the issue with intervals and time is timezones. 16:07
(I hate timezones)
TimToady well, Durations have nothing to do with timezones in p6 16:09
they're just atomic intervals
16:09 jack_rabbit left
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
FROGGS since when do statement level while not gather the value of the body?
TimToady m: say now.WHAT
camelia rakudo-moar e86167: OUTPUT«(Instant)␤»
TimToady Instants are not even supposed to be aware of leap seconds, just like TAI ignores them 16:11
the OS support for that is sometimes a bit lacking htough 16:12
*th
xfix It would be neat to say # SELECT now() + '10 days'; and get "2015-01-03 17:12:13.468842+01" as an answer.
But that would also cause some issues.
Related to timezones, leap seconds, and stuff like that.
TimToady you're confusing atomic time with civil time there
xfix I probably am confusing those. 16:14
TimToady m: say DateTime.new(now).later(days => 10) 16:16
camelia rakudo-moar e86167: OUTPUT«2015-01-03T16:16:10Z␤»
TimToady you can construct civil time from the current instant though
whoever picked T for the separator had a tin eye 16:17
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␤»
xfix Oh right.
m: use MONKEY_TYPING; augment class Duration { method minutes { $.Int div 60 % 60 } }; say Duration.new(299).minutes
camelia rakudo-moar e86167: OUTPUT«4␤»
xfix I'm confusing everything, when what's the important thing is are methods on Duration to get hours, minutes, and seconds. 16:19
TimToady as I say, I'd rather see a more general operator for that 16:20
mickcy_ca Went away for a bit ... after reading all of that ... xfix: That is exactly what I am looking at. 16:21
xfix Sure you can write $duration divmod 60. But I also think that $duration.minutes is more readable. 16:22
Is it specific? Yes. Is it useful? Yes.
16:24 rurban joined
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␤»
FROGGS rather then the last value of the condition...
TimToady yes
returning the condition is p5think 16:25
FROGGS and not very helpful
TimToady and contrary to spec 16:26
FROGGS m: say do if 42 { 21 } else { 10.5 }
camelia rakudo-moar e86167: OUTPUT«21␤»
FROGGS how does that even work O.o
xfix By returning last value in a block. 16:27
vendethiel FROGGS: what's surprising here? 16:28
xfix m: say 42 ?? 21 !! 10.5
camelia rakudo-moar e86167: OUTPUT«21␤»
vendethiel that's what "do" does
FROGGS yes, but I don't see what makes if/else work and while not in Perl6::Actions
xfix I'm not sure what's surprising here. It works like ternary operator.
FROGGS I am talking about its implementation 16:29
TimToady m: say do given 42 { when .so { 21 }; when .not { 10.5 }}
camelia rakudo-moar e86167: OUTPUT«21␤»
FROGGS m: my $i = 0; say do while $i > 10 { $i++ }
camelia rakudo-moar e86167: OUTPUT«False␤»
FROGGS m: my $i = 0; say do until $i > 10 { $i++ }
camelia rakudo-moar e86167: OUTPUT«True␤»
FROGGS m: my $i = 0; say do loop($i = 0; $i++; $i < 10 { 42 } 16:30
camelia rakudo-moar e86167: OUTPUT«===SORRY!=== Error while compiling /tmp/ce7SMVaTUJ␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/ce7SMVaTUJ:1␤------> = 0; say do loop($i = 0; $i++; $i < 10 ⏏{ 42 }␤ expecti…»
FROGGS m: my $i = 0; say do loop $i = 0; $i++; $i < 10 { 42 }
camelia rakudo-moar e86167: OUTPUT«===SORRY!=== Error while compiling /tmp/UGdkR6UMNG␤Missing block␤at /tmp/UGdkR6UMNG:1␤------> my $i = 0; say do loop ⏏$i = 0; $i++; $i < 10 { 42 }␤ expecting any of:␤ scoped block␤»
FROGGS err
m: my $i = 0; say do loop ($i = 0; $i++; $i < 10) { 42 }
camelia rakudo-moar e86167: OUTPUT«0␤»
TimToady um, reversed 2nd and 3rd 16:31
FROGGS hehe
m: my $i = 0; say do loop ($i = 0; $i < 10; $i++) { 42 }
camelia rakudo-moar e86167: OUTPUT«False␤»
TimToady the last time I did that was only a couple weeks ago :)
xfix I wonder...
16:32 ptc_p6 left
xfix m: say (do if 2 {}).perl 16:32
camelia rakudo-moar e86167: OUTPUT«Nil␤»
xfix ok
16:32 ptc_p6 joined
dalek ecs: 627f2a8 | hoelzro++ | S17-concurrency.pod:
Fix -> vs . method call typo in S17
16:35
FROGGS ahh, for the given/when case we add a SUCCEED handler.... 16:38
TimToady crud, plumbing is backed up, offline for a while 16:39
mst 'crud' would be apposite then, I guess. 16:40
tony-o my thought too
need to get rid of that orangeburg pipe
hoelzro o/ #perl6 16:41
16:41 ptc_p6 left
hoelzro are fails supposed to work in a start construct? 16:41
example:
m: start({ sleep 1; fail '' }).result
camelia rakudo-moar e86167: OUTPUT«===SORRY!===␤Could not find symbol '&Return'␤»
tony-o hoelzro: start usually squelches errors for me 16:42
moritz hoelzro: fail only makes sense in a routine
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)␤…»
moritz m: start(sub { sleep 1; fail 'something wrong' }).result
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…»
tony-o m: start { sleep 1; die 'dead'; }; sleep 2;
camelia ( no output )
hoelzro ahhhh 16:44
thanks for the explanation, moritz
tony-o hoelzro: did you author template::mustache? 16:45
16:49 Ven joined 16:50 Ven left, Ven joined 16:51 Ven left 16:52 spider-mario joined 16:57 anaeem1 left 16:58 andreoss joined
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
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;
camelia rakudo-moar e86167: OUTPUT«50␤»
tony-o that's pretty hokey though 17:02
17:02 ptc_p6 joined
tony-o m: my \pi = 3.5; pi := 50; pi.say; 17:02
camelia rakudo-moar e86167: OUTPUT«===SORRY!=== Error while compiling /tmp/3owFpXRQEf␤Cannot use bind operator with this left-hand side␤at /tmp/3owFpXRQEf:1␤------> my \pi = 3.5; pi := 50⏏; pi.say;␤»
andreoss m: my \x =0 ; x = x + 1; x.say;
camelia rakudo-moar e86167: OUTPUT«Cannot modify an immutable Int␤ in block <unit> at /tmp/_Y63JwjTD9:1␤␤»
tony-o andreoss:
m: my \pi = (my $pi = 3.5); pi = 50; pi.say;
camelia rakudo-moar e86167: OUTPUT«50␤»
17:03 Ven joined
andreoss why don't -= += work ? 17:03
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
andreoss it doenst work for me 17:04
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?
tony-o andreoss: it's not working for you because your example above is equivalent to saying: 0 = 0 + 1;
Ven should perl6 -v print about the JIT? I thought it did, but apparently doesn't 17:06
well, moar --version does anyway, so that's fine
tony-o m: my \pi = (my $pi = 3.5); pi = pi * 2; pi.say;
camelia rakudo-moar e86167: OUTPUT«7␤»
tony-o that binds it to $pi, it's also pollutey iirc 17:07
m: my \pi = (my $pi = 3.5); pi = pi * 2; pi.say; $pi.say;
camelia rakudo-moar e86167: OUTPUT«7␤7␤»
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
it's hokey that way though
andreoss are there any guidelines about sigiless variables?
looks like they were meant for something special
17:09 sqirrel left
tony-o i haven't looked into it much, just how to exploit it for profit 17:11
17:11 sqirrel joined, atroxaper left
andreoss also, having optional immutability would fit nice with other FP features of perl 17:13
may be some pragma to turn off mutation within a block 17:14
Ven "class" "role" "subset" create a new type. is that exhaustive?
tony-o andreoss: it's been discussed extensively, i just don't remember the outcome. it's in the perl logs somewhere 17:16
well, i remember the outcome, just not the reasoning 17:17
17:18 fhelmberger joined
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:20
17:21 fhelmberger left
tony-o mickcy_ca: gist? 17:21
masaq yes, a gist would help a lot. 17:22
preferably of the smallest possible code that does the wrong thing :)
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 pastebin.com/hvsmWcHa for the offending part.
tony-o where does it hang?
mickcy_ca if my $fh = ... is removed, everything goes well. 17:24
Inside get_file_listing
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
hoelzro tony-o: I did not 17:25
tony-o hoelzro: have you been using it?
mickcy_ca tony-o: Should be :r ... hangs there too.
tony-o i don't see a sub for get_file_listing
mickcy_ca Sorry %attr<src_dir> //= "/home/mickyc/Media/Videos/DVDRip";
%attr<file-list> = find(dir => %attr<src_dir>, name => /.+?vob/);
That is the entire sub. 17:26
17:27 ninjazach left
timotimo stub the sub 17:27
mickcy_ca ?
timotimo just a pun 17:28
mickcy_ca Ah.
pastebin.com/zqAn1H60 update with get_file_listing 17:29
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:30
tony-o it crashes in get_file_listing? 17:32
or in the $fh read
mickcy_ca Hangs in get_file_listing.
I have had it going since before talking about it ... and still has not completed. 17:33
To boot, the pipe and the directory listing are not even on the same hard drive.
17:36 kjs_ joined 17:40 raiph joined
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:43
tony-o can you add CATCH { .say; } at line 10 in your gist 17:45
mickcy_ca No output. 17:47
17:48 mr-foobar joined 17:49 jack_rabbit joined
tony-o give me a few, im in a mtg 17:50
17:53 koo6 joined, guru left
raydiak g'mornin #perl6 17:55
17:57 ptc_p6 left
moritz \o raydiak, merry christmas! 17:57
raydiak \o Merry Christmas moritz, #perl6 18:00
tony-o mickcy_ca: where is %attr defined
mickcy_ca Further up in my script ... it is just built up as I use it. 18:01
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:02
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:04
heh except now I can't get the seek error, just the blocking on open 18:06
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 :)
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:09
18:10 atroxaper joined
mickcy_ca Gotta Go ... talk late. 18:15
18:15 mickcy_ca left 18:16 atroxaper left 18:18 pdcawley left 18:26 jack_rabbit left
raydiak how do I add info to an existing RT ticket instead of creating a new one when e-mailing? 18:37
FROGGS raydiak: I don't know if that is possible.... but you can log into RT and add comments 18:39
but you can try so send an email with [perl #123456] in the subject 18:40
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123456
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 18:41 erkan joined
raydiak yep that works, FROGGS++...is #123484 for anyone who was interested 18:46
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123484
18:46 Ven left 18:52 xfix left
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:53
and tired of typing synopseseses 18:54
18:55 erkan left 18:57 erkan joined
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:03
19:03 kjs_ left 19:04 anaeem1 joined
raydiak raiph: heh I like it...the best solution is the one thats already implemented 19:07
moritz: what do you think about github.com/perl6/www.p6c.org/pull/2 ? 19:08
19:08 erkan left 19:09 rindolf left 19:13 sqirrel left 19:15 atroxaper joined 19:20 atroxaper left 19:21 koo6 left, pmurias joined
pmurias masak: is instant starup for one liner 19:23
a big niche?
19:27 Mso150_f left 19:28 Mso150_f joined 19:30 kjs_ joined 19:35 anaeem___ joined 19:37 anaeem1 left 19:48 FROGGS_ joined
hoelzro tony-o: I started using it for perl6/syntax a bit 19:51
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:52
19:52 FROGGS left
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:53
hoelzro tony-o: I don't recall bugs or anything 19:54
FROGGS_ m: class Foo { method bar { 42 } }; say Foo.bar # naddiseo 19:55
camelia rakudo-moar e86167: OUTPUT«42␤»
naddiseo k
FROGGS_ naddiseo: methods that dont use self and dont access attributes are just called on the class itself
naddiseo My problem was I used "sub" instead of "method" 19:56
20:02 raiph left 20:03 BenGoldberg joined
tony-o who is softmoth on github? 20:08
20:13 darutoko left 20:15 raiph joined 20:22 kjs_ left 20:24 anaeem___ left 20:26 andreoss` joined 20:28 andreoss left 20:31 Mso150_f left, Mso150_f_x joined
masaq pmurias: maybe not. 20:37
pmurias: there are a lot of reasons not to do that layered thing.
20:42 Sqirrel joined 20:50 jack_rabbit joined
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:55
masaq you'd need a way to save the state of the whole program to disk, I guess. 20:58
vendethiel masaq: just save the ram :P 20:59
FROGGS_ yeah, pull it out and put it in a box 21:00
raydiak or hibernate the computer and put that in a box...then you can actually restore it 21:01
I volunteer to make boxes!
FROGGS_ so... we want to wrap our running program in another VM we can suspend? 21:02
raiph Does program state directly map to NQP objects? 21:05
er, 6model objects 21:06
21:06 atroxaper joined
raiph I was thinking it did and the objects could be serialized/deserialized 21:07
21:08 mr-foobar left 21:10 atroxaper left 21:16 kjs_ joined 21:21 andreoss` left
FROGGS_ I think that one is strange: 21:27
m: my $i = 0; say do while $i < 10 { $i++; last if $i == 3 }
camelia rakudo-moar e86167: OUTPUT«sub infix:<==> ($?, $?) { #`(Sub+{<anon>}+{Precedence}|51229904) ... }␤»
masaq that's a bit strange, yes. 21:29
not sure what I'd want it to be... Nil?
FROGGS_ I'd expect a list of Nils or so in that case 21:38
the funny thing is, --optimize=off changes it:
perl6-m --optimize=off -e 'my $i = 0; say (while $i < 10 { $i++; last if $i == 3 })'
True
perl6-m -e 'my $i = 0; say (while $i < 10 { $i++; last if $i == 3 })' 21:39
sub infix:<==> ($?, $?) { #`(Sub+{<anon>}+{Precedence}|56096624) ... }
so I guess the optimizer messes with the 'return value' of while loops
and that would also explain why my other attempts did not change anything
21:41 ninjazach joined
masaq hm, how do I configure my hack.p6c.org shell to love Unicode a bit more? 21:43
21:46 dj_goku left
flussence LC_ALL=$lang.utf-8 ought to do it... 21:47
(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
raiph merry xmas #perl6, gnite 21:49
21:49 raiph left
flussence you too o/ 21:49
21:49 zakharyas joined
andreoss is there a way to run perl6 code but keep perl5 in shebang? 21:51
21:55 erkan joined, erkan left, erkan joined
andreoss i mean some wrapper to redirect file to rakudo, not a translator of course. 21:55
21:55 mr-foobar joined
timotimo yeah, with Inline::Perl5 you can do that (if i remember correctly) 21:56
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.
you could also make a perl -> perl6 symlink somewhere in your $PATH
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
FROGGS_ next step: unify PHP and Python 22:00
flussence shhh, don't give them ideas :)
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:05
FROGGS_ but it won't happen that a 'perl' in path is perl6 22:06
22:06 dj_goku joined, dj_goku left, dj_goku joined
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.
andreoss: I think such a script could be written, and be made quite reliable.
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 22:11 dj_goku left 22:17 dj_goku joined, dj_goku left, dj_goku joined 22:20 FROGGS[mobile] left
Woodi hallo #perl6 :) 22:23
masaq \o
Woodi happy Christmas :)
masaq to you too, sir! 22:24
Woodi thank you :)
I wonder can we have some perl6 -switch(es) to use on oneliners to not load some thing(s) ? 22:25
22:25 Mso150_f_x left
Woodi but maybe compilation cares about that :) 22:25
eg. no load OO stuff for particular oneliner ? 22:26
and probably this would be cheating on perl5 :) 22:27
masaq .oO( committing perl5 adultery ) 22:28
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␤␤»
naddiseo so.. how do you use .assuming with a class method? 22:35
masaq 'night, #perl6
22:36 bjz left, cognominal left 22:39 bjz joined 22:44 awoodland joined 22:50 rurban left, virtualsue joined, ninjazach left 22:52 bjz left, LLamaRider left 22:55 ninjazach joined 22:57 pmurias left 23:00 zakharyas left
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␤»
raydiak though surely theres a better way to get that method ref? *shrug* 23:05
naddiseo yeah. don't think I can rely on it being the nth method 23:06
raydiak well, there's this:
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);
camelia rakudo-moar e86167: OUTPUT«1 2 3 4␤»
raydiak but still, it feels clumsy, I suspect there's a better syntax, I just don't know it personally
naddiseo well TMTOWTDI 23:08
raydiak true enough :)
naddiseo So far I've just settled for wrapping it in another function: sub helper($a) { return Foo.bar($a, b => @c); } 23:09
23:09 jack_rabbit left
naddiseo Thanks for trying though. 23:09
raydiak you're welcome 23:11
23:11 virtualsue left 23:13 Ven joined 23:18 kjs_ left 23:20 kaare_ left 23:48 koo6 joined 23:51 Ven left