»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
tbrowder SmokeMachine: when i try to iterate over a row's columns with nulls i get an error. is it due to the nulls or maybe some other problem. i started with the code jonathonstowe put in red for the rs formatter. 01:09
DrForr seen jnthn 05:41
.seen jnthn
yoleaux I saw jnthn 18 Mar 2019 23:12Z in #perl6-dev: <jnthn> m: subset S of Any where { True }; BEGIN say Any ~~ S
Geth doc: 0fbbb97342 | (JJ Merelo)++ | 2 files
Adds prefix for indexing, closes #2683
07:05
Geth doc: a913df2f12 | (JJ Merelo)++ | doc/Type/Any.pod6
Adds example and method to serial

Refs #2683. Previous one should have close #2680.
07:10
Geth doc: 202577dcff | (JJ Merelo)++ | doc/Type/Associative.pod6
Addd prefixes and reflow refs #2683
07:14
Xliff m: use NativeCall; my $ba = CArray[Str].new(1, 2, 3); my Blob $b = Blob.new($ba); say $b.gist; 08:03
camelia This type cannot unbox to a native string: P6opaque, Int
in method ASSIGN-POS at /home/camelia/rakudo-m-inst-2/share/perl6/sources/8660F65A7B3492675BB3B2058DB30E411A4C4E54 (NativeCall::Types) line 181
in method new at /home/camelia/rakudo-m-in…
Xliff m: use NativeCall; my $ba = CArray[Str].new('a', 'b', 'c'); my Blob $b = Blob.new($ba); say $b.gist;
camelia This type cannot unbox to a native integer: P6opaque, Str
in block <unit> at <tmp> line 1
Xliff m: use NativeCall; my $ba = CArray[Str].new; $ba[0] = 'a'; $ba[1] = 'b'; $ba[2] = 'c'; my Blob $b = Blob.new($ba); say $b.gist; 08:04
camelia This type cannot unbox to a native integer: P6opaque, Str
in block <unit> at <tmp> line 1
Xliff m: use NativeCall; my $ba = CArray[Str].new('a', 'b', 'c'); say $ba.gist
camelia NativeCall::Types::CArray[Str].new
Xliff m: use NativeCall; my $ba = CArray[Str].new('a', 'b', 'c'); my @ba; @ba[$_] = $ba.[$_].ord for @ba.split; @ba.gist.say 08:05
camelia Cannot resolve caller split(Str:D: ); none of these signatures match:
(Str:D: Regex:D $pat, $limit is copy = Inf;; :$v is copy, :$k, :$kv, :$p, :$skip-empty, *%_ --> Seq:D)
(Str:D: Str(Cool) $match;; :$v is copy, :$k, :$kv, :$p, :$skip-emp…
08:06
Xliff m: use NativeCall; my $ba = CArray[Str].new('a', 'b', 'c'); my @ba; @ba[$_] = $ba.[$_].ord for @ba.comb; @ba.gist.say
camelia []
SmokeMachine tbrowder: you can do something like this to fix that:
www.irccloud.com/pastebin/1AY5DXAu/
Xliff m: use NativeCall; my $ba = CArray[Str].new('a', 'b', 'c'); my @ba; @ba[$_] = $ba.[$_].ord for $ba[0].comb; @ba.gist.say
camelia This type cannot unbox to a native integer: P6opaque, Failure
in method <anon> at /home/camelia/rakudo-m-inst-2/share/perl6/sources/8660F65A7B3492675BB3B2058DB30E411A4C4E54 (NativeCall::Types) line 163
in block <unit> at <tmp> line 1
tbrowder .tell SmokeMachine thanks! 10:05
yoleaux tbrowder: I'll pass your message to SmokeMachine.
SmokeMachine .
yoleaux 10:05Z <tbrowder> SmokeMachine: thanks!
SmokeMachine tbrowder: did that work?
tbrowder i just awakened for the day and saw the message, good morning! (UTC-6) 10:07
SmokeMachine tbrowder: good morning! :)
tbrowder i'm sure it will work, read about seqs with holes and just haven't gotten the test correct yet. i should make some progress now and will report later. 10:08
SmokeMachine Iif someone would like to know and help Red, we are needing some help to documenting this issues (github.com/FCO/Red/issues?q=is%3Ai...needed%22) and testing this ones (github.com/FCO/Red/issues?q=is%3Ai...eeded%22). English is not my first language (and Im still learning it) so documenting is not a easy task for me... Any help is 10:19
Wellcome!
timotimo SmokeMachine: i'm a bit sad the audio quality on the recording of your talk is so bad :( 10:48
SmokeMachine timotimo: probably not a recording issue, but my English issue... :( 10:49
timotimo i really don't think so
it sounds like the audio just came straight from the camera's microphone
which is A Bad Idea 10:50
tbrowder SmokeMachine: no luck, it throws on a null column. going to try something else fooling with .iterator method per docs or some other place i saw it discussed. error keeps showing prob with pull-next 11:04
*pull-one 11:05
SmokeMachine tbrowder: I don't think it would help... 11:07
tbrowder: what's the error and the code?
tbrowder let me struggle with this a bit--too lazy to go to real computer and copy paste, learning is best with own struggles anyway... 11:09
i know lizmat had good article on sequences anyone know ref handy? 11:10
SmokeMachine tbrowder: in your case its not a Seq... its a ResultSeq... but it should behave the same... and if you want you can run a `.Seq` and get a real Seq... 11:27
tbrowder SmokeMachine: error looks busy and interesting. i am getting up from couch and getting serious. i will get some code to show in a while. 11:29
tbrowder SmokeMachine: code is in updated PR (query-db.p6), and error is in this paste: pastebin.com/6PsF44Yu 11:47
SmokeMachine: what time zone are you in? 11:49
SmokeMachine: the sqlite db shows the tables the way i expect them to look 11:50
although the sql shows the columns actually defined in a Red-defined order not apparent to me, and not in the order of the model attributes. 11:52
SmokeMachine: i just puched a new verison of quey-db.p6 using jonathanstowe's code with your // operator added. error code is at paste here: pastebin.com/4d8fdncS 11:58
antoniogamiz Hi! o/ 15:01
I keep seeing this line at the end of perl6 files: # vim: expandtab shiftwidth=4 ft=perl6
all of you use vim to code in perl6? 15:02
El_Che There is only 1 vim user needed to see that :)
moritz not all of us, just the best :D
antoniogamiz hahaha I see :) 15:03
El_Che antoniogamiz: I told you, there is always that guy 15:05
:P
hahainternet spaces? for indentation? might as well write everything in ASCII ;) 15:06
antoniogamiz El_Che: yep, you were right ahahahah 15:09
moritz we all indent with \c[PILE OF TABULATOR POO] :D
hahainternet as long as you use a rich character that's fine with me, although you run the risk of your code being mistaken for python moritz ;)
moritz there are worse thiings 15:10
hahainternet the modern push for no syntax highlighting and no braces or similar is going to end up with the no-indent crew too 15:12
like the no-semicolon gang for js
moritz let's just read code like it's the 60s 15:14
moritz in the days of punch cards, everybody was so much more careful.... and productive! /s 15:14
hahainternet i've yet to see a coffee shop with a guy reading continuous paper, but it's coming
SmokeMachine tbrowder: Ill not be able to see that until tonight... sorry... 16:07
tbrowder Okay,,thnx, but i have made progress since my last post 16:08
your time zone is? 16:09
scimon He's in GMT now I believe. 16:10
tbrowder scimon: thnx 16:33
jmerelo squashable6: status 17:02
squashable6 jmerelo, Next SQUASHathon in 16 days and ≈18 hours (2019-04-06 UTC-14⌁UTC+12). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
jmerelo Not so far...
jmerelo .tell AlexDaniel next one is going to be the never-before-done Perl 6 community most wanted. Are you OK or want to do another unbitrot? 17:06
yoleaux jmerelo: I'll pass your message to AlexDaniel.
AlexDaniel . 17:11
yoleaux 17:06Z <jmerelo> AlexDaniel: next one is going to be the never-before-done Perl 6 community most wanted. Are you OK or want to do another unbitrot?
jmerelo Hi, AlexDaniel 17:11
AlexDaniel jmerelo: I'm OK with anything as I won't be able to help organizing it 17:12
jmerelo AlexDaniel: so it's better if it's _not_ unbitrot... I might need help with setting up the hooks, but I think I'll manage.
AlexDaniel as always, the most difficult part is getting people engaged 17:13
jmerelo Right
jmerelo AlexDaniel: is there a new release manager for Rakudo, BTW? 17:15
AlexDaniel jmerelo: I think so
jmerelo AlexDaniel: but you don't happen to know who's that? Because next squashathons revolve around Rakudo... I like to plan stuff in advance (and actually do it in the last minute) 17:16
AlexDaniel we're waiting for kawaii's CLA :) 17:17
kawaii AlexDaniel: Do you think I should re-send it? Seems it has become lost in cyberspace by this point? :( 17:17
jmerelo kawaii: congrats! 17:18
MasterDuke kawaii: have you contacted [Coke] directly? 17:19
kawaii jmerelo: thanks! but I'll mostly be deferring to more senior/experienced members of the community for the next few weeks, until I know all the answers to my upcoming annoying questions ;)
MasterDuke: not yet, was not aware he was the one to speak to! 17:20
MasterDuke kawaii: he sped things along when i submitted mine
AlexDaniel MasterDuke: I did mail [Coke] asking if it was received, and got a reply that it wasn't… 17:26
AlexDaniel kawaii: OK, well… can you resend it then and CC [Coke]? 17:26
kawaii Will do later this evening! 17:27
discord6 <Vendethiel> I don't know much about sql server. I sthe ODBC client the one to use? 17:35
Geth ecosystem/add-api-perspective: 9269259338 | (Kane Valentine)++ (committed using GitHub Web editor) | META.list
Add API::Perspective to ecosystem
Geth ecosystem: kawaii++ created pull request #440:
Add API::Perspective to ecosystem
17:35
Geth doc: 9d23c2b5d2 | (JJ Merelo)++ | doc/Type/Test.pod6
Some reflow, refs #2683
17:39
doc: 88383891a7 | (JJ Merelo)++ | doc/Type/X/DateTime/TimezoneClash.pod6
Fixes X:D:TimezoneClash, refs #2683
Geth ecosystem: 9269259338 | (Kane Valentine)++ (committed using GitHub Web editor) | META.list
Add API::Perspective to ecosystem
17:44
ecosystem: 4b2f73832a | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Merge pull request #440 from perl6/add-api-perspective

Add API::Perspective to ecosystem
discord6 <Vendethiel> m: |{}<a b>:kv.hash 17:53
<Vendethiel> This gives "MVMArray: Can't pop from an empty array" here
discord6 <Vendethiel> is there any reason we don't have a :kv subscript equivalent that returns a hash, otherwise? : D 17:54
MasterDuke Vendethiel: i assume there's something bigger/more complex you want to do. because <a b>.hash does what i think you're trying to do with that example 17:57
jnthn MasterDuke: :kv filters keys that don't exist 17:57
yoleaux 06:36Z <DrForr> jnthn: I've added a bug report to Grammar::Debugger - the debugger is failing to initialize $!state and I'm not quite sure why.
06:37Z <DrForr> jnthn: The 'proto rule' may not be relevant, not sure.
timotimo m: say (:1a, :2b, :3c, :4d) (&) (:a, :c) 17:58
camelia set(a c) 17:59
MasterDuke jnthn: ah, right. i never remember it does that 18:07
m: say |({}<a b>:kv).hash' 18:08
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3say |({}<a b>:kv).hash7⏏5'
expecting any of:
infix
infix stopper
postfix
statement end
statement …
MasterDuke m: say |({}<a b>:kv).hash 18:09
camelia
MasterDuke jnthn, Vendethiel: ^^^ is that correct (my interpretation of what is desired, not the output)? 18:10
MasterDuke m: say ({}<a b>:kv.hash; say ({:1a :3c}<a b>:kv).hash # looks like the slip is incorrect in this case 18:18
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in parenthesized expression; couldn't find final ')' (corresponding starter was at line 1)
at <tmp>:1
------> 3 like the slip is incorrect in this case7⏏5<EOL>
MasterDuke m: say ({}<a b>:kv).hash; say ({:1a :3c}<a b>:kv).hash # looks like the slip is incorrect in this case
camelia {}
{a => 1}
MasterDuke m: say |({}<a b>:kv).hash; say |({:1a :3c}<a b>:kv).hash # looks like the slip is incorrect in this case
camelia
Unexpected named argument 'a' passed
in block <unit> at <tmp> line 1
discord6 <Vale> hi hi, Im having a compilation issue and Im trying to figure out where in my syntax its wrong It has todo with List Operations and comma separated statements 18:21
<Vale> use strict; use warnings; print sort { $b <=> $a } , grep{$_ % 2 == 1} split /:/, "1:3:4:5:71:8:9"; 18:22
<Vale> Perl spits out an syntax error at the end of the }
<timotimo> hi vale, is that perl 5 code?
discord6 <Vale> perl 5 18:23
<Vale> oh shit my bad
<timotimo> haha, don't worry
<timotimo> i think all you need is a space between grep and the block
discord6 <Vale> Still getting errors :c 18:24
<Vale> syntax error at 1b.pl line 4, near "} ," 18:25
<timotimo> do sort and grep perhaps not need a comma after the block?
<Vale> oh wow
discord6 <Vale> they don't, you are correct 18:25
<timotimo> return grep { $seen{$_} == @_ } keys %seen;, just grabbed that off of perldoc perlsub 18:26
<Vale> got it, going to take a read
discord6 <Vale> But so far that fixed my syntax error 18:26
<Vale> thank you!
<timotimo> \o/
DrForr waves. 18:32
rindolf DrForr: hi 18:44
kawaii I have a question! How do I write unit tests for my Perl 6 modules that depend on proprietary APIs (i.e. they require a key, or in a another case they require running some software which is the interface the module is designed to work with)? 18:55
timotimo you can perhaps mock the external stuff
kawaii You see, that's what Altreus suggested, but it seems harder than writing the module itself :/ 18:56
jmerelo timotimo: is there some module for mocking? Or just by hand? 19:00
timotimo there is a module
github.com/jnthn/test-mock
kawaii It might be viable in my case to create a mock API response for the first module, given that it should just spit out a very small amount of JSON. 19:01
timotimo also test how your module reacts to spurious errors :) 19:03
jmerelo timotimo: great!
discord6 <Vendethiel> MasterDuke: I think the underlying issue should be fixed nevertheless, I think we're not supposed to see error messages about MVMArray 19:24
MasterDuke Vendethiel: i believe it's coming from here github.com/perl6/nqp/blob/master/s...r.nqp#L540 19:38
tony-o .notable hub.docker.com/r/tonyodell/rakudo-nightly 19:43
MasterDuke notable6: help 19:44
notable6 MasterDuke, Like this: notable6: weekly rakudo is now 10x faster # See wiki for more examples: github.com/perl6/whateverable/wiki/Notable
MasterDuke tony-o: ^^^
tony-o thanks MasterDuke 19:45
El_Che 10x :) 19:47
tony-o weekly: hub.docker.com/r/tonyodell/rakudo-nightly 19:51
notable6 tony-o, Noted!
El_Che tony-o: may I guve some constructive criticism? 19:53
tony-o please 19:54
El_Che People like me, the paranoid kind, prefer to see a link to the repo with the Dockerfile. So I can fork it and build it myself. Running third party images is a big no-no (beside upstream OSes) in a lot of places (including my team, because of me). 19:55
While at it, it also inspire confidence if the image is autobuilt from github
it's fairly straightfwd 19:56
jmerelo MasterDuke++
10x overall?
El_Che I experimented somewhat with it for rakudo-pkg containers, but I paused it because of time.
tony-o El_Che: ah, it's built from circle-ci and the dockerfile is on github 20:14
i'll add that to the readme, though
El_Che that will certainly work 20:15
tony-o thank you 20:16
El_Che no, thank you, great initiative 20:17
Skarsnik Hello there 20:57
Skarsnik I am confused with supply and function. I have a function foo that return a supply block, then I do a whenever foo() -> @output { say "new output"; process-output(@output)} and the function process-output seems to not be called (there is a say at the beginning) 21:00
ugexe m: sub process-output($output) { say "processing $output"; }; sub foo { supply { for 1..10 { say "emit $_"; emit($_) } } }; react whenever foo() -> $output { say "new output"; process-output($output) } 21:08
camelia emit 1
new output
processing 1
emit 2
new output
processing 2
emit 3
new output
processing 3
emit 4
new output
processing 4
emit 5
new output
processing 5
emit 6
new output
processing 6
emit 7
new output
process…
Skarsnik m: sub process-output($output) { say "processing $output"; }; sub foo { supply { emit(1..10) } }; react whenever foo() -> @output { say "new output"; process-output($_) for @output} 21:10
camelia new output
processing 1
processing 2
processing 3
processing 4
processing 5
processing 6
processing 7
processing 8
processing 9
processing 10
Skarsnik m: sub process-output($output) { say "processing $output"; }; sub foo { supply { for ^2 {emit(1..10); sleep 1} }; react whenever foo() -> @output { say "new output"; process-output($_) for @output} 21:11
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3output"; process-output($_) for @output}7⏏5<EOL>
expecting any of:
postfix
statement end
Skarsnik m: sub process-output($output) { say "processing $output"; }; sub foo { supply { for ^2 {emit(1..10); sleep 1} }}; react whenever foo() -> @output { say "new output"; process-output($_) for @output} 21:12
camelia new output
processing 1
processing 2
processing 3
processing 4
processing 5
processing 6
processing 7
processing 8
processing 9
processing 10
new output
processing 1
processing 2
processing 3
processing 4
processing 5…
Skarsnik so this work, hm
evalable6, help
evalable6 Skarsnik, Like this: evalable6: say ‘hello’; say ‘world’ # See wiki for more examples: github.com/perl6/whateverable/wiki/Evalable
ugexe are you sure you are not emitting an infinite sequence and sinking it when passing to your process-output? something like 21:14
Skarsnik commit: g80397b20f sub process-output($output) { say "processing $output"; }; sub foo { supply { for ^2 {emit(1..10); sleep 1} }}; react whenever foo() -> @output { say "new output"; process-output($_) for @output} 21:15
ugexe m: sub process-output(@output) { say "processing @output"; }; sub foo { supply { emit(1..Inf) } }; react whenever foo() -> @output { say "new output"; process-output(|@output) }
committable6 Skarsnik, ¦g80397b20f: «Cannot find this revision (did you mean “f3f00fb”?)»
camelia (timeout)new output
Skarsnik the supply is a loop
that probably why
ryanth What's the cleanest way to say `my @squares = 1², 2², 3² ... 10²;` ? Best I have is `my @squares = (1 ... 10).map: { $_² };` but I'm not sure if there's a more canonical way to achieve that. 21:16
Skarsnik but I used an example that has the supply and the loop not ina function and this worked
it's like supply { loop { get github notification; emit notification; sleep 60} } 21:17
ugexe m: my @squares = (^10)>>²; say @squares[4] 21:18
camelia 16
ryanth Ooh, nice. Thanks. I'm still thinking like a p5 programmer. :-) 21:19
ugexe im not saying that is the cleanest way though. that is arguable 21:20
ryanth Fair enough. It's certainly a way I didn't know how to do 2 minutes ago, though!
discord6 <Rogue> Cleanst in my personal opinion would be this: 21:21
<Rogue> my @squares = (1..10)»²
<Rogue> using postfix exponentiation and the hyper operator 21:22
timotimo not cleaner, but a different approach that also works: (1..10) »**» 2 21:23
ryanth Yeah, that is nice, Rogue. Is 1..10 vs ^10 a personal preference in this case, or is there a reason behind it?
ugexe i was hoping * * * could be used somehow
Juerd ryanth: 1..10 and ^10 are not the same.
ryanth: ^10 is 0..9
discord6 <Rogue> ^10 actually is the same as 0..9 (or 0..^10)
timotimo (^10 + 1)
ryanth Ack, right, I was just reading off of Rogue's example. Hadn't fully thought it through yet. 21:24
timotimo m: ((1..10) »xx» 2).map(* * *).perl.say
camelia (4, 4, 4, 4, 4).Seq
discord6 <Rogue> .. is inclusive, but you can put a karat on either side to make it exclusive on that side, which is where the ^x shortcut comes from
Skarsnik hm, I guess it try to sink the loop? 21:25
timotimo m: (1..10).map({$_,$_}).map(* * *).perl.say
camelia (4, 4, 4, 4, 4).Seq
timotimo oh, duh
m: ((1..10) X 2).flat.map(* * *).perl.say
camelia (2, 4, 6, 8, 10, 12, 14, 16, 18, 20).Seq
discord6 <Rogue> I kinda wish .. was tighter than hyper ops 21:26
Skarsnik ugexe, How I can tell it that the @ emited is not the loop?
I mean it try to get everything emit the loop will provide as a single @ if I understand correctly
in the for @output part 21:27
timotimo emit should only ever "send one message" even if you have something with an @ somewhere
SmokeMachine m: say 1², 2², 3² ... 10²
camelia Unable to deduce arithmetic or geometric sequence from 1,4,9 (or did you really mean '..'?)
in block <unit> at <tmp> line 1
ryanth Yeah, I was hoping that'd work, but ... can't do anything that isn't geometric 21:28
(or arithmetic, of course)
SmokeMachine m: say 1, {++$²} ... 10² 21:29
camelia 5===SORRY!5=== Error while compiling <tmp>
Operators '++' and '²' are non-associative and require parentheses
at <tmp>:1
------> 3say 1, {++$²7⏏5} ... 10²
expecting any of:
postfix
ugexe well a for loop isnt lazy, so its always going to go through all its iterations
SmokeMachine m: say 1, {(++$)²} ... 10²
camelia (1 1 4 9 16 25 36 49 64 81 100)
ryanth Heh, that's a bit naughty. I love it. 21:30
Skarsnik well the issue timotimo it get stuck after the say "getting some output"; in the process-stuff($_) for @outputs; I guess it's because the @output try to get all the loop?
timotimo let me have a look at the code 21:31
Skarsnik gist.github.com/Skarsnik/36d62955b...feaaaa7a20
I put the supply out the module function 21:32
timotimo the sleep is probably the problem 21:33
supply doesn't introduce parallelism on its own
Skarsnik but why the emit happend and I get the text Getting GH notification : True 21:36
Notifications : 1 events
this should not even trigger the begining of the whenever block at all if the sleep was blocking 21:37
Skarsnik I though it will emit, process stuff that tap on the supply, then continue after the emit? 21:41
timotimo is $res<success> true? 21:42
Skarsnik yes
timotimo oh, you do get the whenever block run once 21:42
Skarsnik the beginning run
but not the gh-process-event
ugexe wouldnt you need whenever start supply { ... } ->
timotimo oh 21:43
Skarsnik I think the @event get the loop
and not just what is emited
timotimo could it be getting the number of entries in @events exhausts the underlying sequence and the for loop just after that just crashes, but the exception somehow gets swallowed?
Skarsnik dunno, it disrupt the rest of the supply 21:44
it crash on sleep $res<headers><X-Poll-Interval> || 60; because $res became Str 21:45
for whatever reason
timotimo it's not $res that's the str, but the X-Poll-interval, no? 21:45
m: sleep "10" 21:46
hm, that does work
camelia ( no output )
Skarsnik Died with the exception:
Type Str does not support associative indexing.
timotimo could also be what headers returns 21:47
Skarsnik hm right
but still the for @events prevent the gh-process-event to run :(
like basicly it will crash after the sleep is done 21:48
ugexe the readme says
my %res = $http.get("www.cpan.org/");
not my $res
maybe that will fix it?
Skarsnik why? There is already use of $res<stuff> that work x) 21:49
ugexe i'd prefer to not have to figure out the answer if its not the case 21:50
Skarsnik nvm, it crash in the process-event, but still why it block for 60 sec when the say in the whenever block happend imediatly after the emit :( 21:54
Skarsnik I guess I could use a Supply.Interval? but can I change the interval? 21:57
ugexe because the emit happens before the sleep 60 the first time only?
ugexe my $stuff := gather for 1..^Inf { take $_; sleep 60 }; # of course this "blocks" for 60 seconds everytime except for the first 21:58
Skarsnik what happend : the supply emit the @event; the whenever block start (it say "getting notification 1") then it block for 60 sec before even processing the event 22:00
then crash because the event is somehow empty now
Skarsnik damn brb 1h 22:01
tobs m: 1 < $p < 2 22:04
camelia Type check failed in binding to parameter '<anon>'; expected Any but got Mu (Mu)
in block <unit> at <tmp> line 1
tobs m: 1 < $x < 2
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$x' is not declared
at <tmp>:1
------> 031 < 7⏏5$x < 2
tobs Does anyone know what's special about $p?
ugexe m: say $p 22:05
camelia (Mu)
ugexe :o
ugexe bisectable6: say $p 22:07
bisectable6 ugexe, Bisecting by exit code (old=2015.12 new=6d8077c). Old exit code: 1
ugexe, bisect log: gist.github.com/aa8551ca66c0c91df4...5727dde46d
ugexe, There are 5 candidates for the first “new” revision. See the log for more details
tobs R#2366 seems related 22:09
R#2366
ugexe github.com/rakudo/rakudo/blob/774e...als.pm6#L8
tobs (didn't that use to trigger some bot?)
hah!
ugexe for brevity its because there is actually no blocks creating the lexical scope you kind of assume is there 22:11
MasterDuke m: say $res; say $iter;
camelia (Mu)
(Mu)
ugexe oh boy 22:12
$res is especially dubious. we were just talking about $res acting like something it wasnt :P
timotimo yeah, what the heck 22:15
SmokeMachine tbrowder: sorry, I haven’t had time to try it on my machine... but I was taking a look here on my mobile and wondering... have you tried to change the `my $rs = Person.^rs` for `my @rs := Person.^rs` (I have not tested and I’m far to be sure)...
timotimo that's not right at all :)
MasterDuke tobs: it was synopsysbot [sic], but it appears to be missing
timotimo m: say CORE::.keys>>.name.grep(*.starts-with("&"))
camelia No such method 'name' for invocant of type 'Str'. Did you mean any of these?
none
note
take

in block <unit> at <tmp> line 1
timotimo m: say CORE::.keys>>.name.grep(*.starts-with('$')) 22:16
camelia No such method 'name' for invocant of type 'Str'. Did you mean any of these?
none
note
take

in block <unit> at <tmp> line 1
timotimo m: say CORE::.keys.grep(*.starts-with('$'))
camelia ($RAKUDO-VERBOSE-STACKFRAME $! $CORE_METAOP_ASSIGN $iter $?COMPILATION-ID $/ $?NL $res $=pod $?BITS $?TABSTOP $_ $p)
timotimo there is res and iter and also p for some reason
ugexe we know why they are there 22:17
github.com/rakudo/rakudo/blame/774...pm6#L1-L14
tbrowder SmokeMachine: no i haven't but i did in passing and then convinced myself it wasn't needed. i will try it now!
tobs I bugged it as R#2773
timotimo oh, whoops.
tobs and thanks MasterDuke, you only miss them when they're gone 22:18
timotimo who wants to fix that? will just need some curlies
tobs someone who knows where to put them (not me) 22:22
my guess would be inside the nqp::stmts?
ugexe i suspect you would s/my enum/enum/, then wrap the entire enum in { } 22:23
m: { enum Foo ( my $a = 1 ); }; say $a
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$a' is not declared
at <tmp>:1
------> 3{ enum Foo ( my $a = 1 ); }; say 7⏏5$a
ugexe m: { enum Foo ( my $a = 1 ); }; say Foo 22:24
camelia (Foo)
timotimo that looks good already
jnthn Except that it's in CORE.setting so needs to be in the lexical scope of CORE.setting 22:25
timotimo ah, ok
jnthn And wrapping braces around that probably means it isn't
timotimo in that case just have my \Foo = do { ... }
or even enum Foo ( do { ... } );
jnthn That'd make it runtime-bound, though...
Right, the do inside of there is the way :)
timotimo right, would have been constant rather than my \Foo = do ... 22:27
tbrowder SmokeMachine: the binding caused an error!
timotimo shall we have a test that flags whenever someone accidentally leaves lexical variables around in the core setting? 22:28
m: say $?COMPILATION-ID
camelia CE00E8AC59A48479EAC0A2EB100AAA05A739DCB0
SmokeMachine tbrowder: what about `my @rs := Person.^rs.Seq`?
timotimo i see liz just self-assigned the issue 22:29
ugexe i'd say its a good idea
tbrowder SmokeMachine: i'll try that.
tbrowder still throws. it's interesting that the $rs.elems shows the correct number of rows in the table. i was just going to try taking an ^all on each row before you awakened me. i'll report results 22:36
tbrowder well that didn't work. maybe flat or | will help... 22:42
tbrowder no luck. is the ^all a sequence of sequences? or a single sequence that we need to treat in slices of column length sequences? i'm befuddled and will try studying the rsseq more... 22:51
Skarsnik bisectable6, say $res 23:07
bisectable6 Skarsnik, On both starting points (old=2015.12 new=76b6416) the exit code is 1 and the output is identical as well
Skarsnik, Output on both points: «04===SORRY!04=== Error while compiling /tmp/bPhLQihSo1␤Variable '$res' is not declared␤at /tmp/bPhLQihSo1:1␤------> 03say 08⏏04$res␤»
Skarsnik re 23:11
hm, how I can use Supply.interval to trigger the code in the supply every n time but I can also change the interval? 23:12
jnthn Skarsnik: What causes the interval to change? 23:25
Skarsnik github header that give you the interval to poll between 2 requests 23:26
jnthn So it changes for every request?
SmokeMachine Xliff: have you seen the possibilities I added? 23:27
Xliff Was just looking at them.
jnthn Perhaps something like sub do-stuff-with-interval($seconds) { whenever Promise.in($seconds) { ...do stuff...; do-stuff-with-interval $new-seconds } }
Xliff Not sure I get the point of 'Bla:ver<0.2>.a = “{ Bla:ver<0.1>.b } & { Bla:ver<0.1>.c }”'
Why the &? 23:28
SmokeMachine I was just concatenating 2 strings with a & between them... 23:28
Xliff Ah. OK.
SmokeMachine Just a example... 23:29
Xliff That's not bad, then.
But I still think that "migration" should be a ClassHOW
SmokeMachine None of them I’m sure it is possible...
Xliff That gives us methods for model level changes. 23:30
And field level changes can be handled in those methods.
Skarsnik I am legit confused
MasterDuke SmokeMachine: does Red support upserts? 23:31
Skarsnik why my dumb code get stuck by the sleep in the supply when I try to process what is emited >>
SmokeMachine Xliff: I didn’t get it...
MasterDuke: not yet...
Xliff SmokeMachine: github.com/FCO/Red/issues/15#issue...-473262397
MasterDuke SmokeMachine: ok, just idle curiosity 23:32
jnthn Skarsnik: sleep isn't a good idea in a supply/react generally; sleep blocks a real thread
Xliff SmokeMachine: Let me give it a little more thought. I think I may have an idea. 23:33
Skarsnik jnthn, So what the good solution to what I want : basicly react every poll of a github request (notification) I was thinking of setting the supply interval, but I don't think you can do that x) 23:35
ryanth What's a good, general way to unroll a lazy list (i.e., make it not lazy)? 23:36
O
jnthn Skarsnik: Probably the constrct I just showed you
Skarsnik: Or at least replace the sleep with an `await Promise.in($seconds)` 23:37
MasterDuke ryanth: assign it to a @ ?
jnthn ryanth: .eager
ryanth Ah, .eager. Thanks jnthn 23:38
SmokeMachine MasterDuke: but this should do what you want: `( do given MyModel.^load(:1id) // MyModel.new: :1id { .col1 = 42 }).^save` 23:40
Skarsnik jnthn, Can I do that in a supply or both need to be into a promise? 23:41
jnthn Skarsnik: Inside of a `supply`; the first solution I proposed has a `whenever`, so certainly must be within one :) 23:42
SmokeMachine MasterDuke: I forgot to return $_ 23:44
guifa p6: my %a; %a{Nil} = 1; say %a; 23:51
camelia Use of Nil in string context
{ => 1}
in block <unit> at <tmp> line 1
guifa my %a; try { %a{Nil} = 4 }; say %a 23:52
evalable6 Use of Nil in string context
{ => 4}
in block at /tmp/by_pD_7FrP line 1
jnthn It's a warning; use `quietly` instead of `try` if wanting to suppress it 23:53
Time for sleep o/ 23:54
guifa p6: my %a; quietly { %a{Nil} = 4 }; say %a
camelia { => 4}
guifa Should that be the expected output? My thinking is that by passing a bad key value, the hash shouldn’t be modified 23:55
Not sure if it’s that Nil is being converted to a blank string (which I don’t think it should) and the hash is blissfully unaware, or if it’s the hash that decides to interpret it as a blank string (but in which case, it makes less sense to toss a warning) 23:57