»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:06 atweiden joined 00:11 maybekoo5 joined, prammer_ joined, M-matthew left, M-Illandan left, eternaleye left, olinkl_ joined 00:12 firstdayonthejob left 00:14 AlexDani` joined, molaf_ joined 00:15 olinkl left, prammer left, SmokeMachine____ left, molaf left, AlexDaniel left, xinming left, prammer_ is now known as prammer, SmokeMachine____ joined, olinkl_ is now known as olinkl
MadcapJake I haven't made a slideshow in years, should I be doing 16:9 or 4:3? 00:15
00:15 xinming joined, mrsolo left 00:16 mrsolo joined
MadcapJake 16:9 probably, (weird that LibreOffice still defaults to 4:3 at this point...) 00:16
00:19 nekrodesk joined, nekrodesk left 00:21 nekrodesk joined, nekrodesk left 00:25 AlexDani` left 00:28 M-eternaleye joined 00:32 nekrodesk joined 00:36 wamba left, wamba joined 00:37 M-matthew joined, M-Illandan joined, AlexDani` joined 00:38 AlexDani` is now known as AlexDaniel 00:40 dolmen left 00:43 idiosyncrat_ joined 00:46 SCHAAP137 left 00:49 Actualeyes joined 00:55 M-matthew left 01:02 apiw left 01:09 idiosyncrat_ left 01:10 apiw joined, RabidGravy left
b2gills sortiz: If you want to see what I was talking about earlier github.com/perl6/roast/pull/104 my be able to shine a light on it. 01:14
01:15 wamba left
sortiz b2gills, thank you. I'll comment there. 01:22
01:33 cdg left 01:37 apiw left 01:43 apiw joined, wamba joined 01:46 addison left 01:54 addison_ joined 02:06 addison_ left 02:08 cognominal left 02:09 mr-foobar left, mr-foobar joined, cognominal joined 02:18 addison_ joined 02:21 kamel left
dalek c: ff69616 | (Shlomi Fish)++ | doc/Language/5to6-nutshell.pod:
Add the equivalent of backticks - capture stdout.
02:22
c: e0c27d6 | (Shlomi Fish)++ | doc/Language/5to6-nutshell.pod:
Add equivalent to each
c: 18da27a | (Shlomi Fish)++ | doc/Language/5to6-nutshell.pod:
Revise the qqx section.

Thanks to @AlexDaniel 's comment on the pull-req.
c: 81552ba | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/5to6-nutshell.pod:
Merge pull request #387 from shlomif/shlomif--enhance-5to6

Enhance the 5-to-6 documents .
02:25 addison_ left 02:26 molaf__ joined 02:30 molaf_ left 02:41 wamba left 02:48 apiw left 02:50 mr-foobar left 02:52 kid51 left 02:57 Xor_ joined
Hotkeys is there something similar to smartmatch for regex that will return a boolean rather than me doing so $x ~~ $pattern' 02:58
er
quote before 'so' too
llfourn Hotkeys: don't think so 02:59
02:59 apiw joined
Hotkeys darn 02:59
llfourn m: $_ = 'abc'; say /ab/.so # well there's this 03:00
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
llfourn Hotkeys: ^ 03:01
Hotkeys weird
03:02 apiw left 03:03 apiw joined
AlexDaniel m: $_ = ‘abc’; say ?m/ab/ 03:05
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel Hotkeys: ↑
golfing again?
Hotkeys yeah
AlexDaniel 1 symbol is probably as short as it could get
Hotkeys I need it for two positionals though 03:06
so $_ is a no-go
Juerd m: "foo" ~~ /oo/ . Bool
camelia ( no output )
Hotkeys I'll have to stick with so
Juerd m: say("foo" ~~ /oo/ . Bool)
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
llfourn Hotkeys: what's wrong with match objects in this case?
Juerd Hotkeys: ? is shorter than so :)
AlexDaniel m: say ?(‘abc’~~?m/ab/)
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Juerd ?() is longer than so :) 03:07
AlexDaniel m: say so ‘abc’~~?m/ab/
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel same length
ahhh
no
m: say so‘abc’~~?m/ab/
Juerd What's ~~? :)
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel didn't know you can omit space after so…
Juerd: smartmatch
llfourn m: say &infix:<~~?> # I don't think it's a thing
camelia rakudo-moar 72dbb3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/eKLy48ucXx␤Undeclared routine:␤ infix:<~~?> used at line 1. Did you mean 'infix:<~|>', 'infix:<∖>', 'infix:<lt>'?␤␤»
Juerd m: say "misleading" ~~? "nope"
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel whoah 03:08
I didn't notice it
Juerd AlexDaniel: No, you're actually doing FOO ~~ ?BAR
AlexDaniel yeah didn't notice it
Juerd $anything ~~ True is true.
AlexDaniel hey, but it works
m: say ‘abc’~~?m/abc/
Juerd "works" :)
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel m: say ‘abc’~~?m/abd/
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
llfourn it does?
AlexDaniel yup
llfourn so ~~ sets $_?
AlexDaniel m: say ‘abc’~~?m/abd{say $_}/ 03:09
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
konobi are there any "large" projects using perl6 yet at all?
AlexDaniel m: say ‘abc’~~?m/{say $_}abd/
camelia rakudo-moar 72dbb3: OUTPUT«abc␤abc␤abc␤abc␤False␤»
llfourn AlexDaniel: cool
Juerd konobi: That's not very likely
AlexDaniel konobi: depends on what you mean by “large”
llfourn I am building a large project in Perl 6. Not public yet though.
Hotkeys this the golf fn I have
m: my &f = {so$^a~$^b~~m:i/^[2|t0|t[w|o]?o][b[ee?|3]?]$/}; say f("2", "bee") 03:10
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys etc.
AlexDaniel Holy sh!
03:10 noganex_ joined
Juerd konobi: Or, well, since much of Perl 6 is written in Perl 6, and since Perl 6 is a large project: yep, there is! :) 03:10
konobi AlexDaniel: a good hierarchy
Hotkeys codegolf.stackexchange.com/question...1793#71793
AlexDaniel ok, let's see :)
konobi Juerd: =0P
Hotkeys that's why I can't use $_
I don't know if my regex is as minimal as can be there 03:11
oh
I can get rid of the group on the right
konobi AlexDaniel: i think i have a project idea that would really show off perl6 features... but trying to see if there's another that's a good example already
Juerd What's with this "bytes" thing? 03:12
Seems horribly antique
AlexDaniel konobi: I'd say just go with it if it makes sense
Hotkeys blame stack exchange
llfourn konobi: what's it do?
Hotkeys or actually
shoot
this doesn't work
AlexDaniel konobi: who knows, maybe somebody else will come with the same question and we will show off your project :)
konobi AlexDaniel: thinking a nix replacement
Hotkeys I'm a goof
llfourn what's a nix?
konobi mst and I have been throwing it back and forth for a while
03:13 noganex left
AlexDaniel Hotkeys: yeah, just replace so with ~~? 03:13
03:13 nekrodesk left
AlexDaniel Hotkeys: and you'll save one character 03:13
konobi llfourn: nixos.org/nix/
Hotkeys hm?
AlexDaniel m: my &f = {$^a~$^b~~?m:i/^[2|t0|t[w|o]?o][b[ee?|3]?]$/}; say f("2", "beez")
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
AlexDaniel m: my &f = {$^a~$^b~~?m:i/^[2|t0|t[w|o]?o][b[ee?|3]?]$/}; say f("2", "bee")
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys This regex is bad
I need to change it
llfourn checks it out
AlexDaniel I have no idea why that works but don't ask
Hotkeys m: my &f = {so$^a~$^b~~m:i/^[2|t0|t[w|o]?o][b[ee?|3]?]$/}; say f("2b", "ee")
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys see
I need to separate them 03:14
comma or something
Juerd t[w|o]?o is just obfuscation... too?|two is just as long.
Hotkeys hm
well this is golf
so it can stay
konobi llfourn: make sense? 03:15
Juerd Obfuscation isn't golf :)
Hotkeys m: {"$^a,$^b"~~?m:i/^[2|t0|t[w|o]?o]\,b[ee?|3]?$/}("2","Bee").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Juerd Making shorter is
Hotkeys m: {"$^a,$^b"~~?m:i/^[2|t0|t[w|o]?o]\,b[ee?|3]?$/}("2B","ee").say
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
Hotkeys there
llfourn konobi: still absorbing gimmie a min :)
Hotkeys m: {"$^ax$^b"~~?m:i/^[2|t0|t[w|o]?o]xb[ee?|3]?$/}("2B","ee").say
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
Hotkeys m: {"$^ax$^b"~~?m:i/^[2|t0|t[w|o]?o]xb[ee?|3]?$/}("2","Bee").say 03:16
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
konobi Juerd: could be up your street too
Hotkeys m: {"$^a=$^b"~~?m:i/^[2|t0|t[w|o]?o]=b[ee?|3]?$/}("2","Bee").say
camelia rakudo-moar 72dbb3: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter = (must be quoted to match literally)␤at /tmp/EJLlcgHD2E:1␤------> 3{"$^a=$^b"~~?m:i/^[2|t0|t[w|o]?o]7⏏5=b[ee?|3]?$/}("2","Bee").say␤Couldn't find terminator / (corresponding / was at line 1…»
Hotkeys hmm
trying to not have to use an escape in there
Juerd konobi: I don't understand.
Hotkeys: _ 03:17
Hotkeys m: {"$^a,$^b"~~?m:i/^[2|t0|t[w|o]?o]\,b[ee?|3]?$/}("2B","ee").say
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
Hotkeys oops
didn't mean to do that
m: {"$^a_$^b"~~?m:i/^[2|t0|t[w|o]?o]_b[ee?|3]?$/}("2B","ee").say
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
konobi Juerd: it's a fully declarative package manager
Hotkeys m: {"$^a_$^b"~~?m:i/^[2|t0|t[w|o]?o]_b[ee?|3]?$/}("2","Bee").say
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
Juerd _ is the only non-alphanumeric ascii that doesn't need escaping, iirc
konobi with guarantees of versioning, etc. 03:18
AlexDaniel what about - and '?
Hotkeys I think it is being interpolated as part of the var name
Juerd konobi: What is?
Hotkeys in that string
konobi Juerd: nix
Juerd That's confusing. "Nix" sounds like "niks", which is Dutch for "nothing".
konobi but it has it's issues... but i think perl6 would excel at fixing em
llfourn konobi: it looks interesting. I am actually building something not similar but in the same realm. I'm making a cfg language.
AlexDaniel Hotkeys: once you smashed it into one string I don't think that there is a way out 03:19
konobi llfourn: oh nice! yeah... there's an aspect of that too
Hotkeys true
AlexDaniel Hotkeys: you need this 03:20
m: say so (‘hello’, ‘world’) ~~ (/‘hello’/, /‘world’/)
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel m: say so (‘hello’, ‘world’) ~~ (/‘hallo’/, /‘world’/)
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
llfourn konobi: I should have something up in the next week or two will appreciate your feedback :)
Hotkeys hmm
konobi llfourn: mst would have an interest too i think
llfourn Awesome. It needs some input from ppl with a lot of unix knowledge. 03:21
Juerd Hotkeys: "@_[]" and \s
llfourn it's essentially a glorified shell script transpiler designed for curl | sh usage
03:22 cpage_ left
llfourn so you write shell scripts in Perl 6 basically 03:22
konobi Juerd: nix gives you a verifiabily reproduceable system based on declarative configs
Juerd konobi: That's nice.
konobi and they have a nixos linux distro 03:23
Hotkeys m: {($^a,$^b) ~~ (/^[2|t0|t[w|o]?o]$/,/^b[ee?|3]?$/)}("2", "bee")
camelia ( no output )
Juerd Hotkeys: Ooh, ~@_ even
Hotkeys m: {($^a,$^b) ~~ (/^[2|t0|t[w|o]?o]$/,/^b[ee?|3]?$/)}("2", "bee").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys Juerd: fancy
AlexDaniel konobi: what I can say is that if you're building something big then expect to report a few bugs. It's not too bad, with a 50% chance your bug will be fixed very quickly :) but just don't expect it to go too smoothly 03:24
Hotkeys m: {~@_ ~~ ?m:i/^[2|t0|t[w|o]?o]\sb[ee?|3]?$/}("2", "bee").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys m: {~@_ ~~ ?m:i/^[2|t0|t[w|o]?o]\sb[ee?|3]?$/}("2", "Bee").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys m: {~@_ ~~ ?m:i/^[2|t0|t[w|o]?o]\sb[ee?|3]?$/}("2B", "Bee").say
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
Hotkeys Juerd++
m: {~@_~~?m:i/^[2|t0|t[w|o]?o]\sb[ee?|3]?$/}("2B", "Bee").say
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
AlexDaniel Hotkeys: so what about making it right??
Hotkeys m: {~@_~~?m:i/^[2|t0|t[w|o]?o]\sb[ee?|3]?$/}("2", "Bee").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys AlexDaniel: hm?
m: {~@_~~?m:i/^[2|t0|too|two?]\sb[ee?|3]?$/}("2", "Bee").say # less obfuscated 03:25
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
konobi AlexDaniel: heh... perl6 doesn't scare me... more interested in a way to really use the new functionality... roles feature heavily in my head
Juerd Hotkeys: too|two? looks wrong. ITYM too?|two
Hotkeys oops you're right 03:26
m: {~@_~~?m:i/^[2|t0|too?|two]\sb[ee?|3]?$/}("2", "Bee").say # less obfuscated
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys I inserted the |two in the wrong place
Juerd Darn, t[0|oo?|wo] isn't shorter :)
Hotkeys shh
er
darn
AlexDaniel m: {so@_~~(/:i^[2|t0|t[w|o]?o]$/,/:i^b[ee?|3]?$/)}("2", "Bee").say 03:27
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel Hotkeys: ↑
Hotkeys oh
AlexDaniel and yeah, I just shove off 2 chars just by getting :i in
Hotkeys you see I couldn't get the adverbs to work when I tried it
when I did m:i with that
AlexDaniel yup because that's not how it works :)
Hotkeys well it should 03:28
AlexDaniel nope? Here we are smartmatching on a list of regexes
Hotkeys you actually don't need so with that
btw
AlexDaniel ooh right
Juerd Oh, heh, the ~ in front of @_ isn't even needed :)
Hotkeys m: {@_~~(/:i^[2|t0|t[w|o]?o]$/,/:i^b[ee?|3]?$/)}("2", "Bee").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel Juerd: ~ makes it wrong.
Hotkeys what do you mean wrong
Juerd AlexDaniel: Not if you match one thing, and use \s
AlexDaniel Juerd: ("2 Bee", "")
Hotkeys: ↑ 03:29
Juerd Hm. True.
AlexDaniel just use a list of regexes. It works this way
Hotkeys m: {~@_~~?m:i/^[2|t0|too?|two]\sb[ee?|3]?$/}("2 Bee". "").say # less obfuscated
camelia rakudo-moar 72dbb3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/78iKHh3FVn␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at /tmp/78iKHh3FVn:1␤------> 3/^[2|t0|too?|two]\sb[ee?|3]?$/}("2 Bee".7⏏5 "").say # less obfuscated␤»
Hotkeys beat
neat
konobi AlexDaniel: it's also a good excuse to get up to date on perl6
03:29 colomon left
AlexDaniel konobi: :) 03:29
03:30 colomon joined, mohae_ left
konobi has been quite a while since i was added to pugs =0) 03:30
Juerd AlexDaniel: @_~~/foo/,/bar/ ends up with ($something, /bar/), though. 03:31
03:31 mohae joined
AlexDaniel Juerd: yup, you need parens 03:31
Juerd Meh
I like the wrong version better :)
AlexDaniel it's wrong >:( 03:32
and honestly, the right version is not very longer
Hotkeys nope
it's actually very competitive
even with the golf langs
thank regex for that
Juerd But parens :( 03:33
AlexDaniel Juerd: yeah yeah, I know!
Hotkeys darn 03:34
1 byte more than the javascript answer
konobi AlexDaniel, llfourn: i think it's also an interesting thought exercise... what's the best way to model "packaging" and "software"
AlexDaniel Hotkeys: I think I can fix that 03:35
Hotkeys er actually
the javascript one doesn't look correct
"(a,b)=>/^(2|t[ow]?o|t0)b(3|e?e)?$/.test(a+b)"
that would have the same problem as my string mashing one no? 03:36
Juerd Worse
Hotkeys I don't know how to test a JS lambda
AlexDaniel m: {@_~~(/:i^[2|t0|two|to?o]$/,/:i^be?e?|3$/)}("2", "Bee").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel Hotkeys: I think that this is 2 chars shorter
Hotkeys: please verify
Hotkeys yep 03:37
Juerd Hotkeys: Test with (() => ...)(args)
03:37 mr-foobar joined
llfourn konobi: I think you don't. Just start with a blank VM/container each time and write tests to make sure it got where it needs to be. 03:37
AlexDaniel OH
Juerd Hotkeys: Or var x = () => ...; x(args)
AlexDaniel m: {@_~~(/:i^2|t0|two|to?o$/,/:i^be?e?|3$/)}("2", "Bee").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel ok we're getting closer to 0 bytes 03:38
Hotkeys are you sure that works
AlexDaniel Hotkeys: test it
Hotkeys my first try was without that group
Juerd AlexDaniel: It should test for b3, not 3
AlexDaniel Hotkeys: sure enough, but you had everything smashed together
Hotkeys m: {@_~~(/:i^2|t0|two|to?o$/,/:i^be?e?|3$/)}("2to", "Bee").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys it lumps the $ in the | bit 03:39
AlexDaniel m: {@_~~(/:i^[2|t0|two|to?o]$/,/:i^b[e?e?3]$/)}("too", "b3").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel Hotkeys: oh really? Dammit! 03:40
indeed
llfourn m: say 'a','b' ~~ (/a/,/b/) # didn't know this worked
camelia rakudo-moar 72dbb3: OUTPUT«aFalse␤»
AlexDaniel m: {@_~~(/:i^[2|t0|two|to?o]$/,/:i^b[e?e?3]$/)}("too", "bee3").say # WRONG!
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys it needs the ? on the be group too
llfourn m: say ('a','b') ~~ (/a/,/b/) # didn't know this worked
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys cause it can test for b
AlexDaniel Hotkeys: ok then I don't know
konobi llfourn: well no... there's a fair amount of thought that needs to go into it
Hotkeys yeah
looks like 45 is where it stays 03:41
45 is good enough
that JS answer is wrong anyway
I think
I still haven't tested
Juerd Most answers are wrong because of string concat.
AlexDaniel ↑ point it out in your answer
Juerd Or reply to the wrong one 03:42
Off to bed, ciao!
Hotkeys I replied to the JS one 03:43
AlexDaniel xD 03:44
Hotkeys: I have a gut feeling that this could be shorter
let's see…
Hotkeys maybe
m: {**~~(/:i^[2|t0|two|to?o]$/,/:i^b[e?e?3]$/)}("too", "bee").say 03:45
camelia rakudo-moar 72dbb3: OUTPUT«Too many positionals passed; expected 0 or 1 arguments but got 2␤ in block <unit> at /tmp/_nLh0dl4V0 line 1␤␤»
Hotkeys darn
m: {** ~~(/:i^[2|t0|two|to?o]$/,/:i^b[e?e?3]$/)}("too", "bee").say
camelia rakudo-moar 72dbb3: OUTPUT«Too many positionals passed; expected 0 or 1 arguments but got 2␤ in block <unit> at /tmp/QmskbJCkLj line 1␤␤»
Hotkeys thought I'd be cheeky
flussence m: {@_~~(~2|/:i^t[0|wo|o?o]$/,/:i^b[e?e?3]$/)}("too", "b3").say 03:46
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
03:46 japhb left
konobi llfourn: i mean, perl6 took a while to get into shape =0) 03:46
03:47 japhb joined
llfourn konobi: What I meant was I try to avoid issues with package versions by as much as possible by locking them down in docker and writing tests. 03:47
I never do apt-get updgrade etc 03:48
or try and model anything
but I am mostly developing software for myself no idea what it's like in enterprise :P
AlexDaniel Hotkeys: why are we doing this with regexes???
Hotkeys idk 03:49
everyone else was
I got tunnel vision
>_>
konobi llfourn: docker doesn't give you that.
llfourn give what?
atweiden konobi: yes on nix replacemen 03:50
something more like guix except in p6? 03:51
Hotkeys regex seems like it'd be the shortest, but then again I'm a bit tired
AlexDaniel m: {@_~~(any(<to too two t0 2>), any(<b be bee b3>))}("too", "b3").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel honestly that is not much longer
konobi atweiden: well... still trying to work it out... mst too
AlexDaniel Hotkeys: perhaps list that as an alternative non-golfy variant 03:52
Hotkeys: because hey, that's just some regular code
konobi atweiden: things like being able to apply a role to a package like "build::cmake" or "build::automake" or "build::gem" or "build::npm", etc. 03:53
atweiden sounds like guix
ugexe see %?RESOURCE build-time in s22
atweiden i really like the idea of replacing guile scheme with p6 though 03:54
AlexDaniel Hotkeys: -1 character if you remove parens in the second 「any」
Juerd m: {@_~~any(<t0 to too two 2>X,<b be bee b3>)}("2", "b3")
camelia ( no output )
Juerd m: {@_~~any(<t0 to too two 2>X,<b be bee b3>)}("2", "b3").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Juerd Couldn't resist.
mspo Juerd: case insensitive 03:55
Juerd It throws an exception instead of returning false, when invalid values are given, though
Oh, case :(
Regexes then :P
Hotkeys m: {@_~~(any(<to too two t0 2>), any(<b be bee b3>))}("too", "B3").say
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
Hotkeys AlexDaniel:
konobi atweiden: not too familiar with guix... that's a fsf thing, right?
AlexDaniel nooooooo case sensitivity!!
Juerd @_>>.lc is *long*
Hotkeys I was just about to add it to my post too 03:56
Juerd (Don't go for @_».lc because that's more bytes :P)
AlexDaniel m: {@_».lc~~(any(<to too two t0 2>), any <b be bee b3>)}("too", "B3").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys it's the same amount of bytes actually
Juerd Is it?
Oh, it is
flussence m: '»'.encode('windows-1252').bytes.say # :)
camelia rakudo-moar 72dbb3: OUTPUT«1␤»
Hotkeys AlexDaniel: I'll include that one
AlexDaniel flussence: oh come on
Hotkeys flussence: heh
konobi oh! 03:57
AlexDaniel flussence: don't bring your cave things here please :D
Hotkeys m: '»'.encode('C-1252').bytes.say # :)
camelia rakudo-moar 72dbb3: OUTPUT«Unknown string encoding: 'c-1252'␤ in block <unit> at /tmp/7jdaiot_4c line 1␤␤»
Hotkeys er
there's one that this other golf lang uses
flussence well if html5 says that's the default, why not...
konobi anyone know of any good articles on using perl6 for data analytics?
Juerd {@_».lc~~any(<t0 to too two 2>X,<b be bee b3>)} is shorter but I don't get why it errors on invalid values.
atweiden konobi: afaik guix wraps the nix pkg manager gnu.org/software/guix/
konobi ah yeah... i stop at gnu/fsf i'm afraid 03:58
AlexDaniel but I've never liked how all these golf tasks say “hey, in the fewest bytes possible”… bytes of what??
03:58 nekrodesk joined, nekrodesk left
Juerd And with '?try ' in front it's 1 char longer than the any,any 03:58
AlexDaniel if I give them compiled C file is that going to count?
Hotkeys There's actually a guy that posts with some lang 03:59
AlexDaniel but then oh god, which architecture?
Hotkeys and specifies "Using blah encoding"
Juerd Oh, miscounted. It's the same length.
m: {?try @_».lc~~any(<t0 to too two 2>X,<b be bee b3>)}("twa", "ba").say
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
Juerd m: {?try @_».lc~~any(<t0 to too two 2>X,<b be bee b3>)}("two", "be").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Juerd Oh, it doesn't need the ()! 04:00
Hotkeys I'll stick with {@_».lc~~(any(<to too two t0 2>), any(<b be bee b3>))} as the fairly readable non-competing alternative
Juerd m: {?try @_».lc~~any <t0 to too two 2>X,<b be bee b3>}("two", "be").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Juerd Shaved one off :)
AlexDaniel Hotkeys: don't you want to get it to 53 by removing a space and parens? :)
Hotkeys Nah
AlexDaniel fine
Hotkeys It's non-competing
it looks nicer with those in
:p
Juerd Hotkeys: ^
Hotkeys actually I'll remove a space 04:01
there it's at 53
er
54
04:01 nekrodesk joined
AlexDaniel do we even need “any”? 04:02
Juerd Yes.
Hotkeys m: {@_».lc~~(<to too two t0 2>,<b be bee b3>)}("too", "B3").say 04:03
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
Juerd {?try @_>>.lc~~any <t0 to too two 2>X,<b be bee b3>} is 52, isn't it?
Hotkeys hmm
AlexDaniel m: {@_».lc~~(<to too two t0 2>.any,<b be bee b3>.any)}("too", "b3").say 04:05
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel Hotkeys: ↑ no parens
Hotkeys yeah Juerd
nice AlexDaniel
Juerd I already had a parenless one :)
Somehow, a golf without parens feels like earning bonus points 04:06
Anyhow, I should really get some sleep. Golf is addictive.
AlexDaniel yeah it is
procrastination
04:07 tardisx left
AlexDaniel I just ran some script which is going to take forever to finish… so, I guess I can play with golf for quite some time :) 04:07
Hotkeys: I am not satisfied. I want it shorter
04:07 Herby_ joined
Herby_ Evening, everyone! 04:07
Hotkeys AlexDaniel: I'm working on something 04:08
hold on
m: {?all @_ Z∈<to too two t0 2>».Str,<b be bee b3>}("2","bee") 04:10
camelia ( no output )
Hotkeys m: {?all @_ Z∈<to too two t0 2>».Str,<b be bee b3>}("2","bee").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys if you can find a way for me to not have to string the whole first match list
I would love you forever
because
AlexDaniel ooooooooh
04:10 apiw left
Hotkeys m: <2 to>.perl.say 04:10
camelia rakudo-moar 72dbb3: OUTPUT«(IntStr.new(2, "2"), "to")␤»
Hotkeys it does that
which doesn't element
AlexDaniel m: <to 2>.perl.say 04:11
camelia rakudo-moar 72dbb3: OUTPUT«("to", IntStr.new(2, "2"))␤»
Hotkeys quite annoying
AlexDaniel ~« ?
Hotkeys I did try that
I think
04:11 azawawi joined
Hotkeys m: say ~«<to too two 2 t0> 04:11
camelia rakudo-moar 72dbb3: OUTPUT«(to too two 2 t0)␤»
Hotkeys m: say ~«<to too two 2 t0>.perl
camelia rakudo-moar 72dbb3: OUTPUT«(("to", "too", "two", IntStr.new(2, "2"), "t0"))␤»
Hotkeys m: say (~«<to too two 2 t0>).perl
camelia rakudo-moar 72dbb3: OUTPUT«("to", "too", "two", IntStr.new(2, "2"), "t0")␤»
Hotkeys nope
azawawi hi
AlexDaniel seems like intstr is still a str 04:12
azawawi pasteboard.co/1uqPo9c8.png # Camelia The gray attacks Atom :)
Hotkeys ∈ is very strict though
llfourn m: say IntStr ~~ Str
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys m: "2" ∈ <2 to>
camelia rakudo-moar 72dbb3: OUTPUT«WARNINGS for /tmp/kwWL8IoifH:␤Useless use of "∈" in expression "\"2\" ∈ <2 to>" in sink context (line 1)␤»
Hotkeys m: say "2" ∈ <2 to>
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
AlexDaniel m: say "2" ∈ <to 2>
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
AlexDaniel m: say 2 ∈ <to 2>
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
AlexDaniel m: say "to" ∈ <to 2> 04:13
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel isn't it a bug?…
Hotkeys could be
llfourn m: say "to" ∈ set(<to 2>)
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
llfourn m: say "2" ∈ set(<to 2>)
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
llfourn m: say "2".Int ∈ set(<to 2>) 04:14
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
AlexDaniel “Returns True if $a is an element of $b.”
so it's not an element so fuck off? :/
Hotkeys idk
m: say <2 to> ∋ "2"
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
Hotkeys darn
llfourn m: <to 2>.map: *.^name..say
camelia rakudo-moar 72dbb3: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at /tmp/f_hSe984uD:1␤------> 3<to 2>.map: *.^name..say7⏏5<EOL>␤Other potential difficulties:␤ Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an …»
llfourn m: <to 2>.map: *.^name.say
camelia rakudo-moar 72dbb3: OUTPUT«Str␤IntStr␤»
llfourn m: say "2".IntStr ∈ set(<to 2>) 04:15
camelia rakudo-moar 72dbb3: OUTPUT«Method 'IntStr' not found for invocant of class 'Str'␤ in block <unit> at /tmp/uZuWao4YxI line 1␤␤»
masak ah, the joys of hybrid types.
llfourn m: <2>.map: { say "2" ~~ $_ } 04:16
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys why doesn't qw just do it as a string
llfourn m: <2>.map: { say .^name; say "2" ~~ $_ }
camelia rakudo-moar 72dbb3: OUTPUT«IntStr␤True␤»
Hotkeys m: say qw|2 to| ∋ "2"
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys OH
that's shorter than ».Str
04:17 mr-foobar left
AlexDaniel Hotkeys: so what's the final variant? 04:17
Hotkeys m: {?all @_ Z∈qw|to too two t0 2|,<b be bee b3>}("2","bee").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys I don't think there's any more whitespace I can remove
AlexDaniel remove something else then
Hotkeys heh
we're down to 47 bytes 04:18
if I can somehow lose 2 more I'll include it as an alternative
Juerd Nope. .lc
Hotkeys oh 04:19
right
darn
way to be a buzzkill Juerd
Juerd Closing laptop now :)
AlexDaniel Juerd: go get some rest…
llfourn (Juered still not in bed)
Hotkeys m: {?all @_».lc Z∈qw|to too two t0 2|,<b be bee b3>}("2","bee").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys that's another 5
back to 52
AlexDaniel ok well we should get rid of ‘all’, it gets in the way 04:20
Hotkeys m: {? @_».lc Z∈qw|to too two t0 2|,<b be bee b3>}("2","bee").say
camelia rakudo-moar 72dbb3: OUTPUT«(False)␤»
Hotkeys m: {so @_».lc Z∈qw|to too two t0 2|,<b be bee b3>}("2","bee").say
camelia rakudo-moar 72dbb3: OUTPUT«(False)␤»
Hotkeys m: {@_».lc Z∈qw|to too two t0 2|,<b be bee b3>}("2","bee").say
camelia rakudo-moar 72dbb3: OUTPUT«(True True)␤»
Hotkeys that's why I had ?all 04:21
hmm
m: {[&&] @_».lc Z∈qw|to too two t0 2|,<b be bee b3>}("2","bee").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys same number of bytes though
m: {[&&]@_».lc Z∈qw|to too two t0 2|,<b be bee b3>}("2","bee").say
camelia rakudo-moar 72dbb3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Sb_3aOeuQV␤Two terms in a row␤at /tmp/Sb_3aOeuQV:1␤------> 3{[&&]7⏏5@_».lc Z∈qw|to too two t0 2|,<b be bee b␤ expecting any of:␤ infix␤ infix stopper␤ statement en…»
AlexDaniel hmm 04:22
04:22 tardisx joined
AlexDaniel hey look 04:22
04:23 azawawi left
AlexDaniel m: {@_».lc~~([&]<to too two t0 2>,[&]<b be bee b3>)}("too", "b3").say 04:23
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel Hotkeys: that's two bytes shorter than <>.any
Hotkeys crazy
AlexDaniel how long is that by the way
Hotkeys m: say [&]<to too two t0 2>
camelia rakudo-moar 72dbb3: OUTPUT«all()␤»
Hotkeys ...
m: {[&&]@_».lc Z∈qw|to too two t0 2|,<b be bee b3>}("2","farts").say
camelia rakudo-moar 72dbb3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xiZFjk6Aja␤Two terms in a row␤at /tmp/xiZFjk6Aja:1␤------> 3{[&&]7⏏5@_».lc Z∈qw|to too two t0 2|,<b be bee b␤ expecting any of:␤ infix␤ infix stopper␤ statement en…»
Hotkeys m: {@_».lc~~([&]<to too two t0 2>,[&]<b be bee b3>)}("too", "farts").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel ah geez, it doesn't work
Hotkeys :p 04:24
AlexDaniel why?
Hotkeys sec
m: {@_».lc~~([|]<to too two t0 2>,[|]<b be bee b3>)}("too", "farts").say
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
Hotkeys m: {@_».lc~~([|]<to too two t0 2>,[|]<b be bee b3>)}("too", "b3").say
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
Hotkeys darn
AlexDaniel it needs parens 04:25
m: {@_».lc~~([|](<to too two t0 2>),[|](<b be bee b3>))}("too", "b3").say 04:26
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel m: {@_».lc~~([|](<to too two t0 2>),[|](<b be bee b3>))}("too", "b4").say
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
AlexDaniel meh!
too long
m: {?[*] @_».lc Z∈qw{to too two t0 2},<b be bee b3>}("2","bee").say 04:32
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel m: {?[*] @_».lc Z∈qw{to too two t0 2},<b be bee b3>}("2","beez").say
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
AlexDaniel Hotkeys: now that's crazy, but not shorter
Hotkeys heh
m: {?[&] @_».lc Z∈qw{to too two t0 2},<b be bee b3>}("2","beez").say 04:33
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
Hotkeys m: {?[&] @_».lc Z∈qw{to too two t0 2},<b be bee b3>}("2","bee").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys might as well
although that brings us back to ?all
AlexDaniel Hotkeys: it is funny how pyth solution is 39 bytes 04:34
and perl6 is 45 :D
04:35 Herby_ left
AlexDaniel that's really huge readability per byte ratio :) 04:35
Hotkeys yeah 04:36
AlexDaniel Hotkeys: you wouldn't believe it!
ah no…
Hotkeys he didn't even do a breakdown
like the other golf langs do
s/he/they/
the page he links is just a list of char -> instruction 04:37
s/he/they/
AlexDaniel m: {$^a.lc∈qw{to too two t0 2}&&$^b.lc∈<b be bee b3>}("2","bee").say 04:38
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel I thought that this is shorter but then I realized there is no .lc
04:42 cpage_ joined
AlexDaniel Hotkeys: well 04:49
-1 char 04:50
m: {?+(@_».lc Z∈<to too two t0 2>,<b be bee b3>)}("2","bee").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel oops
m: {?+(@_».lc Z∈qw{to too two t0 2},<b be bee b3>)}("2","bee").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys wait 04:51
but that worked
without qw
m: {?+(@_».lc Z∈<to too two t0 2>,<b be bee b3>)}("2b","bee").say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys oh
nvm
er
oh 04:52
that won't work
AlexDaniel hahaha
right…
my bad
Hotkeys cause truthy is anything > 0
well actually that'll always be 2
so
AlexDaniel yup I see
but maybe we can do that with slip somehow? 04:53
actually, I've just noticed 04:56
Hotkeys: that this alternative has to use qw as well
gfldex .oO( use v6; to beat them at their own game. )
AlexDaniel m: say {@_».lc~~((qw<to too two t0 2>,<b be bee b3>)».any)}(‘2’,‘bee’) 04:59
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel same amount of bytes
Hotkeys smells longer
AlexDaniel Hotkeys: exactly the same 05:00
oooooh
m: say {@_».lc~~(qw<to too two t0 2>,<b be bee b3>)».any}(‘2’,‘bee’)
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel Hotkeys: now that is two characters shorter! 05:01
Hotkeys same length in bytes actually
{@_».lc~~(qw<to too two t0 2>,<b be bee b3>)».any}
{?all @_».lc Z∈qw|to too two t0 2|,<b be bee b3>}
AlexDaniel I didn't try to get it to compete, but… 05:02
Hotkeys neither of those are competing
AlexDaniel there's one thing I often find crazy in code golf
gfldex m: -> Int $a, Str $b {1}(1,"2") 05:03
camelia ( no output )
AlexDaniel just look at this example! it is as short as it could be
Hotkeys what do you find crazy?
AlexDaniel Hotkeys: that it is not going to be shorter ever 05:04
Hotkeys oh
05:04 molaf__ left
AlexDaniel and yet comes somebody who says “hey look, here it is, twice shorter than that” 05:04
and I'm like “whyyyy”
Hotkeys lol 05:05
like how the regex example is still 7 bytes shorter than the above
gfldex m: say sub f($a){$a}(1);
camelia rakudo-moar 72dbb3: OUTPUT«1␤»
gfldex calling functions (and blocks) in place seams not to be docked 05:07
AlexDaniel m: say {@_».lc~~qw<to too two t0 2 b be bee b3>[^5,5..*]».any}(‘2’,‘bee’) # nope
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
Hotkeys lol 05:08
05:08 gcole left 05:09 gcole joined, azawawi joined, [particle] left, flaviusb left, [particle] joined 05:10 flaviusb joined, tardisx left, skarn left, nekrodesk left
azawawi about %?RESOURCES, does on have to specify every folder/file to be copied in META.info "resources" key? (e.g. resources/sample_dir) 05:10
AlexDaniel Hotkeys: hang on, it looks like regex example is -2 bytes 05:11
05:11 kent\n left 05:12 skarn joined 05:13 kent\n joined, kent\n left, kent\n joined
AlexDaniel m: {@_~~(/:i^t[0|oo?|wo]$/|2,/:i^b[ee?|3]?$/)}(‘to’,‘bee’).say 05:16
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel Hotkeys: the problem is that it errors out if you do this 05:17
m: {@_~~(/:i^t[0|oo?|wo]$/|2,/:i^b[ee?|3]?$/)}(‘HAHA’,‘bee’).say
camelia rakudo-moar 72dbb3: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5HAHA' (indicated by ⏏)␤ in block <unit> at /tmp/MKPkUUV3Gi line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/MKPkUUV3Gi line 1␤␤»
Hotkeys lol
AlexDaniel but for valid inputs it works, yeah
:/
Hotkeys: you can put '2' in quotes but then it ruins everything 05:18
oh, but wait!
no, nothing 05:19
Hotkeys lol
AlexDaniel Hotkeys: oh, YEAH! 05:21
m: {@_~~(~2|/:i^t[0|oo?|wo]$/,/:i^b[ee?|3]?$/)}(‘MWAHAHAHA’,‘bee’).say
camelia rakudo-moar 72dbb3: OUTPUT«False␤»
AlexDaniel m: {@_~~(~2|/:i^t[0|oo?|wo]$/,/:i^b[ee?|3]?$/)}(‘2’,‘bee’).say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel m: {@_~~(~2|/:i^t[0|oo?|wo]$/,/:i^b[ee?|3]?$/)}(2,‘bee’).say
camelia rakudo-moar 72dbb3: OUTPUT«True␤»
AlexDaniel Hotkeys: that's -1 byte as far as I can see 05:22
Hotkeys cheeky
I like it
05:22 eone joined 05:25 AlexDaniel left 05:27 AlexDaniel joined
Hotkeys didn't mean to italics there 05:28
azawawi where can i find Distribution.install(...) source code? 05:29
jdv79 grep src/core ? 05:30
05:30 frew left
azawawi seems to me it does not handle recursive directories copying in %resources 05:30
jdv79 i bet you'll find it in src/core/Distribution.pm. wild guess. 05:31
05:31 frew joined
AlexDaniel Hotkeys: HA-HA! 05:36
ah,no…
xD
Hotkeys lol
azawawi jdv79: nearly correct :) github.com/rakudo/rakudo/blob/nom/...on.pm#L112 05:37
AlexDaniel Hotkeys: Shakespeare answer is really cool 05:39
Hotkeys yeash 05:40
yeah 05:41
jdv79 cool
AlexDaniel Hotkeys: so will you change it to 44 byte version? 05:42
I don't think there is any way to make it shorter. That's it
05:43 khw left 05:44 Cabanossi left
Hotkeys oh 05:46
yeah
sec
05:47 Cabanossi joined 05:51 khw joined
Hotkeys AlexDaniel: there we go 05:52
tied with JS now
AlexDaniel Hotkeys: kay. It seems like my edit did not make it through, please fix <to too two t0 2> 05:53
Hotkeys: it has to be qw<>
Hotkeys oh
AlexDaniel you can change any() to .any to keep the byte count 05:54
05:55 azawawi left
Hotkeys good catch 05:56
Why does <> do IntStr but qw<> (s/<>/etc./) does Str 05:58
AlexDaniel m: say {("0."~.flip for ^$_)}(25) 06:03
camelia rakudo-moar 72dbb3: OUTPUT«(0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.01 0.11 0.21 0.31 0.41 0.51 0.61 0.71 0.81 0.91 0.02 0.12 0.22 0.32 0.42)␤»
AlexDaniel m: say {(^$_)».&{"0."~.flip}(25)
camelia rakudo-moar 72dbb3: OUTPUT«5===SORRY!5===␤Expression needs parens to avoid gobbling block␤at /tmp/NQ1yQR5tUH:1␤------> 3say {(^$_)».&{"0."~.flip}7⏏5(25)␤Missing block (apparently claimed by expression)␤at /tmp/NQ1yQR5tUH:1␤------> 3say 7⏏5{(^$_)».&{"0."~…»
AlexDaniel m: say {(^$_)».&{"0."~.flip}}(25)
camelia rakudo-moar 72dbb3: OUTPUT«(0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.01 0.11 0.21 0.31 0.41 0.51 0.61 0.71 0.81 0.91 0.02 0.12 0.22 0.32 0.42)␤»
AlexDaniel m: say {map ^$_: "0."~*.flip}(25) 06:05
camelia rakudo-moar 72dbb3: OUTPUT«(0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.01 0.11 0.21 0.31 0.41 0.51 0.61 0.71 0.81 0.91 0.02 0.12 0.22 0.32 0.42)␤»
AlexDaniel Hotkeys: come on… same character count
Hotkeys lol 06:07
06:07 khw left
AlexDaniel Hotkeys: perhaps you can also include the last one :) 06:07
Hotkeys Sure 06:08
06:09 _Gustaf_ joined
Hotkeys I always instinctively go for the 'for' version 06:10
plus it usually ends up being about the same length
m: {map ^$_: "0."~.flip}(25).say
camelia rakudo-moar 72dbb3: OUTPUT«Cannot call map(Range: Str); none of these signatures match:␤ ($: Hash \h, *%_)␤ (\SELF: &block;; :$label, :$item, *%_)␤ (HyperIterable:D $: &block;; :$label, *%_)␤ in block <unit> at /tmp/dnORgOcmgb line 1␤␤»
Hotkeys aww
m: {map ^$_:"0."~*.flip}(25).say 06:11
camelia rakudo-moar 72dbb3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xCQtBYTYT1␤Confused␤at /tmp/xCQtBYTYT1:1␤------> 3{map ^$_:7⏏5"0."~*.flip}(25).say␤ expecting any of:␤ colon pair␤»
AlexDaniel m: say {"0."xx$_ Z~(^$_)».flip}(25) # slightly longer
camelia rakudo-moar 72dbb3: OUTPUT«(0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.01 0.11 0.21 0.31 0.41 0.51 0.61 0.71 0.81 0.91 0.02 0.12 0.22 0.32 0.42)␤»
AlexDaniel m: say {"0."X~(^$_)».flip}(25) 06:13
camelia rakudo-moar 72dbb3: OUTPUT«(0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.01 0.11 0.21 0.31 0.41 0.51 0.61 0.71 0.81 0.91 0.02 0.12 0.22 0.32 0.42)␤»
AlexDaniel Hotkeys: HA
Hotkeys damn
_Gustaf_ o/ 06:14
AlexDaniel Hotkeys: I liked this one 06:15
Hotkeys: that's one of these moments. Look how readable it was
and I only made it much uglier
19 bytes, right? 06:16
Hotkeys: perhaps keep previous attempts. People seem to like it 06:17
Hotkeys 20
AlexDaniel right. Forgot about » 06:18
Hotkeys What's your stackoverflow name 06:19
I'll credit you
AlexDaniel Hotkeys: codegolf.stackexchange.com/users/49...akimenko-a
goddamn thing can't accept my name properly
stupid length limits 06:20
Hotkeys lol 06:21
06:24 nekrodesk joined, nekrodesk left 06:30 nekrodesk joined, nekrodesk left 06:36 nekrodesk joined, nekrodesk left 06:39 grondilu joined, nekrodesk joined, nekrodesk left 06:40 eone left 06:41 nekrodesk joined
AlexDaniel Hotkeys: this one is easy 06:42
Hotkeys: codegolf.stackexchange.com/question...1393#71393
Hotkeys: replace 「$_ <1」 with 「1>$_」
Hotkeys: replace 「by(*.chars)」 with 「by(&chars)」 06:43
Hotkeys: 「* <10」 with 「10>*」
06:44 rurban joined
Hotkeys can you chain 1 <= 10 > * the same as I have it? 06:44
er
do you mean 10 > * <= 1 06:45
AlexDaniel no idea actually
I didn't notice the chaining
Hotkeys: but yeah reverse the whole thing 06:46
1 <= * < 10 → 10 > * >= 1
Hotkeys: actually I still can't read it so I don't know :) 06:47
Hotkeys {my \s=($_,*×(1>$_??10!!.1)…10>*>=1);min(s[*-1]~"x10^"~s-(1>$_??s*2!!1),$_,:by(&chars))}
is where we're at
that post was just me attempting while half awake 06:48
AlexDaniel Hotkeys: by=>&chars 06:51
06:52 buharin joined 06:56 sortiz left 06:57 geraud left
AlexDaniel Hotkeys: it is interesting that @a[*-1] is equal in length to @a.tail 06:58
Hotkeys they don't do quite the same thing though 06:59
AlexDaniel @a.tail(2) and @a[*-2..*] are same too
Hotkeys m: my @a = ^5; @a.tail.WHAT.say; @a[*-1].WHAT.say 07:00
camelia rakudo-moar 72dbb3: OUTPUT«(Seq)␤(Int)␤»
AlexDaniel Hotkeys: I'd say that tail is cooler because it returns a seq
for one element it is not relevant though :)
Hotkeys right
m: my @a = ^5; @a.tail(3) # more interesting
camelia ( no output )
Hotkeys m: my @a = ^5; @a.tail(3).say # more interesting
camelia rakudo-moar 72dbb3: OUTPUT«(2 3 4)␤»
07:02 CIAvash joined 07:11 Anx joined
Hotkeys I'll go to bed, if you want AlexDaniel leave your shortened version of the golf as a comment and I'll update the post tomorrow 07:11
(the codegolf board generally doesn't like edits for improvements not sure why)
AlexDaniel Hotkeys: I wont look at it anymore
Hotkeys: it is boring
Hotkeys lol 07:12
fair enough
'night
AlexDaniel so just get the latest version there, I guess
07:14 Anx left 07:15 atweiden left
dalek osystem: 3f4fd5f | (Sam Gillespie)++ | META.list:
Update META.list

Adding the Net::OSC module to the ecosystem :)
07:20
osystem: c1d4465 | sylvarant++ | META.list:
Merge pull request #152 from samgwise/patch-1

Update META.list
07:25 domidumont joined 07:31 nakiro joined, domidumont left 07:32 maybekoo5 left, domidumont joined
[Tux] test 22.228 07:36
test-t 12.130
csv-parser 51.622
07:42 FROGGS joined 07:44 firstdayonthejob joined 07:55 M-eternaleye is now known as eternaleye 07:56 eternaleye left, eternaleye joined 08:05 kurahaupo joined 08:12 darutoko joined, kurahaupo left 08:17 rurban left 08:21 nekrodesk left, dolmen joined 08:25 dolmen left 08:28 ely-se joined 08:38 sevvie left, firstdayonthejob left 08:39 Guest83108 left
lizmat good *, #perl6! 08:40
I hope the test-t > 12 is noise, and not cause by the Failure.handled changes
*caused
08:41 bowtie joined, bowtie is now known as Guest26264 08:49 CIAvash left
dalek kudo/nom: aaf5c26 | (Salvador Ortiz)++ | src/core/Setty.pm:
Fix for RT#127402: Set.hash stringifies its objects
08:51
kudo/nom: 691b39b | lizmat++ | src/core/Setty.pm:
Merge pull request #711 from salortiz/setty_hash

Fix for RT#127402: Set.hash stringifies its objects
08:59 CIAvash joined 09:02 abraxxa joined 09:10 ely-se left 09:19 Guest26264 left 09:25 fireartist joined 09:26 nekrodesk joined, nekrodesk left 09:29 nekrodesk joined, nekrodesk left 09:32 nekrodesk joined, nekrodesk left 09:33 nekrodesk joined, nekrodesk left 09:34 RabidGravy joined 09:35 luiz_lha joined, CIAvash left, rindolf joined, luiz_lha is now known as Guest6876 09:36 nekrodesk joined, nekrodesk left 09:37 ocbtec joined, Guest6876 is now known as luiz_lha 09:39 nekrodesk joined, nekrodesk left 09:41 nekrodesk joined 09:43 leont joined
RabidGravy wh'appen peoples! 09:46
09:47 brrt joined
DrForr Nada mucho. 09:51
10:04 dj_goku left 10:06 wamba joined 10:07 Gothmog_ joined
dalek ar: 4b44be8 | FROGGS++ | tools/star/mac-dmg.pod:
fix typo
10:15
10:16 espadrine joined 10:19 Actualeyes left 10:27 abraxxa left 10:31 ely-se joined 10:33 apiw joined, rurban joined 10:37 leont left 10:39 Actualeyes joined 10:43 kid51 joined 10:53 kid51 left, kid51 joined 10:56 rurban left 10:57 maybekoo5 joined 11:04 ely-se left 11:07 nekrodesk left 11:20 Averna joined 11:22 apiw left 11:24 ely-se joined
brrt fwiw, the perlsecco wine i got at FOSDEM was really nice :-) 11:25
11:26 apiw joined
fireartist just wrote a little script to pretty-print resursive directory listing - wow! - perl6 IO is *nice* 11:30
brrt perl6 is nice, in general :-) 11:36
i'm wondering if there is a perl6 equivalent of this
11:36 kaare_ joined
brrt my %hash = $string =~ m/(\w+) = (\w+)/g; 11:36
11:37 kamel joined
RabidGravy something with a split and map I would go for 11:38
got something very similar in the code I'm working on right now
11:39 TEttinger left, Skarsnik joined
brrt i think the perl5 idiom is really nice 11:41
RabidGravy m: say "foo=bar".match(/$<key>=(\w+) "=" $<value>=(\w+)/, :g).map({ ~$_<key> => ~$_<value>}) 11:42
camelia rakudo-moar 691b39: OUTPUT«(foo => bar)␤»
11:44 luiz_lha left, luiz_lha joined 11:45 luiz_lha is now known as Guest99693
timotimo personally, i'd .comb 11:47
11:48 apiw left
timotimo m: say "foo=bar baz=quux what=that".comb(/(\w+) "=" (\w+)/, :match)>>.list.perl 11:48
camelia rakudo-moar 691b39: OUTPUT«((Match.new(ast => Any, list => (), hash => Map.new(()), orig => "foo=bar baz=quux what=that", to => 3, from => 0), Match.new(ast => Any, list => (), hash => Map.new(()), orig => "foo=bar baz=quux what=that", to => 7, from => 4)), (Match.new(ast => Any, li…»
timotimo m: say "foo=bar baz=quux what=that".comb(/(\w+) "=" (\w+)/, :match)>>.list>>.Str.perl
camelia rakudo-moar 691b39: OUTPUT«($("foo", "bar"), $("baz", "quux"), $("what", "that"))␤»
timotimo m: say "foo=bar baz=quux what=that".comb(/(\w+) "=" (\w+)/, :match)>>.list>>.Str.flat.perl
camelia rakudo-moar 691b39: OUTPUT«($("foo", "bar"), $("baz", "quux"), $("what", "that")).Seq␤»
timotimo m: say "foo=bar baz=quux what=that".comb(/(\w+) "=" (\w+)/, :match)>>.list>>.Str>>.flat.perl
camelia rakudo-moar 691b39: OUTPUT«($(("foo",).Seq, ("bar",).Seq), $(("baz",).Seq, ("quux",).Seq), $(("what",).Seq, ("that",).Seq))␤»
timotimo that's terrible %)
m: say "foo=bar baz=quux what=that".comb(/(\w+) "=" (\w+)/, :match)>>.list>>.Slip>>.Str.perl 11:49
camelia rakudo-moar 691b39: OUTPUT«("foo", "bar", "baz", "quux", "what", "that")␤»
timotimo m: my %result = "foo=bar baz=quux what=that".comb(/(\w+) "=" (\w+)/, :match)>>.list>>.Slip>>.Str; say %result.perl
camelia rakudo-moar 691b39: OUTPUT«{:baz("quux"), :foo("bar"), :what("that")}␤»
timotimo m: my %result = "foo=bar baz=quux what=that".comb(/(\w+) "=" (\w+)/, :match)>>.Slip>>.Str; say %result.perl
camelia rakudo-moar 691b39: OUTPUT«{:baz("quux"), :foo("bar"), :what("that")}␤»
timotimo cool, i can drop the .list because .Slip does that already
moritz Slip is a subtype of List anyway 11:50
timotimo aye
moritz m: say Slip ~~ List
camelia rakudo-moar 691b39: OUTPUT«True␤»
11:50 orbus left
timotimo is my solution acceptable? 11:50
i must admit, the .match one looks a bit nicer
though ... 11:51
m: say "foo=bar yours=mine".match(/$<key>=(\w+) "=" $<value>=(\w+) { make ~$<key> => ~$<value> /, :g)>>.ast
camelia rakudo-moar 691b39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/h6oolbsQP7␤Preceding context expects a term, but found infix , instead␤at /tmp/h6oolbsQP7:1␤------> 3ue>=(\w+) { make ~$<key> => ~$<value> /,7⏏5 :g)>>.ast␤»
timotimo m: say "foo=bar yours=mine".match(/$<key>=(\w+) "=" $<value>=(\w+) { make ~$<key> => ~$<value> } /, :g)>>.ast
camelia rakudo-moar 691b39: OUTPUT«(foo => bar yours => mine)␤»
moritz m: my %result = flat "foo=bar baz=quux what=that".words>>.split('='); say %result.perl
camelia rakudo-moar 691b39: OUTPUT«{:baz("quux"), :foo("bar"), :what("that")}␤»
timotimo m: say "foo=bar yours=mine".match(/$<key>=(\w+) "=" $<value>=(\w+) { make ~$<key> => ~$<value> } /, :g)>>.ast.perl
camelia rakudo-moar 691b39: OUTPUT«(:foo("bar"), :yours("mine"))␤»
11:54 apiw joined 11:55 jkva joined
brrt acceptable, just not as well-worn-down, i'd say :-) 11:56
timotimo thing is, if we did it more like your idiom, we'd end up with a hash filled with match objects 11:57
so there has to be at least a .Str in there somewhere
or a ~*
brrt hmmm......
here's an idea though
way, way to late, but here it is
what if we give the hash a Cool method that converts all its keys and all its values to strings 11:58
timotimo .Coolize
brrt or, Cool objects at any rate
Coler
.Cooler
timotimo .refridgerate
brrt anyway, lunch & 11:59
timotimo lunch well
12:06 RabidGravy left 12:08 FROGGS left 12:11 FROGGS joined 12:17 avenj left, khagan left 12:18 ugexe left 12:22 bitmap left
brrt ok, naive question 12:22
timotimo if it's a native question, you spell it with a lower-case q :) 12:23
brrt is a Match a descendant of Str, or does it at least does Stringy
why ask i
timotimo m: say Str ~~ Stringy
camelia rakudo-moar 691b39: OUTPUT«True␤»
timotimo er
m: say Match ~~ Stringy
camelia rakudo-moar 691b39: OUTPUT«False␤»
timotimo it does not, but it has .Str
brrt because.. this would make sense
a Match is always a part-of-a-string 12:24
hence, it *is* a string
moritz no
brrt why not
12:24 rindolf left
masak because a Match is not a kind of Str 12:24
moritz right
brrt why not
masak it's pointing into a Str
brrt well, yes, but it never incorrect to refer to it as a Str 12:25
12:25 bitmap joined
moritz it's information about how a regex matched a string 12:25
masak it's not a Str
brrt it is Stringy, at least
masak no
you are misinformed about what it is
brrt yes
i said it was a naive question
moritz lots of things can be coerced to Str, but they don't do the Stringy role
12:26 apiw left
masak right. exactly the same argument could be made about Bool 12:26
12:26 khagan joined
brrt no, but a Match always (refers to) a part of a Str 12:26
hmmmm
masak both True and False have Str-y representations
brrt that is actually a decent enough point
masak pause for breathing.
brrt thinks
masak :)
brrt but still, always a subset-of-matched string
well, reference is not identity, of course 12:27
hmm
masak brrt: designing type relationships is bloody hard. you're experiencing a *desire* for the model to be in a certain way. it isn't.
12:27 skids left
brrt aye 12:27
well, i was thinking about it, because if it *were* Stringy, then timotimo's sample would be simpler 12:28
12:28 molaf joined
masak in a sense, you're akin to the people who want Int to be a kind of Rat and Rat to be a kind of Num. 12:28
moritz or you always talk about a customer by name, which is a string. That doesn't make Customer a Str
masak I don't feel a great compulsion to make Match ~~ Stringy. it feels like conflating two things.
brrt in fact, i experience a revulsion to the idea :-) 12:29
(from you)
masak sometimes I do +$0 and coerce my Match to a Numeric type. doesn't mean I want Match ~~ Numeric
12:29 rindolf joined
brrt but my counterargument remains. a match *is* always a subset-of-a-Str, it has certain string-like-behaviour; it also has very un-string-like behaviour, like being a decent target for assignment, whereas a substring - i think - is not 12:30
but yeah, it is hard
masak brrt: where you see an is-a, I see a has-a. a Match object has many properties, one of which is referring into part of a Str. 12:31
12:31 apiw joined
moritz there's also the representational aspect to consider 12:31
Match actually stores a references to the original string, and start and end indexes of the match 12:32
Juerd I think one of the most important distinctions between a Match's substring and a real string, is that a Match can "be" (have) an empty string, but it will still be true.
brrt well, that's not a terribly strong argument; you could have javastrings, and then match being a subset of String would be the most logical thing in the world
moritz if you make it inherit from Str, you *have* to store the matched string again
masak Juerd: good point. which spoils the monoidal aspect of Str, quite a strong deviation. 12:33
Juerd What does monoidal mean?
brrt (javastring as a representation)
masak thinks
Juerd: monoidal means having an associative operation with a unit. like (Int, +, 0) or (Bool, ||, False) or (Str, ~, "") 12:34
Juerd Also, a Match thingy can have multiple strings 12:35
brrt hmm.. can it
ok, well, i can't continue this now, will be back later :-)
12:35 brrt left
Juerd m: say "foo" ~~ m:g/o/ 12:35
camelia rakudo-moar 691b39: OUTPUT«(「o」 「o」)␤»
masak m: say ("foo" ~~ m:g/o/).^name 12:36
camelia rakudo-moar 691b39: OUTPUT«List␤»
Juerd Oh, that's a list of Matches
Never mind this argument then :)
masak yeah.
but the fact that this was even a *question* means that Match is not an obvious Str.
Juerd m: say "foo" ~~ /(f)(o+)/
camelia rakudo-moar 691b39: OUTPUT«「foo」␤ 0 => 「f」␤ 1 => 「oo」␤»
12:37 sail0r left 12:42 kamel left 12:44 rurban joined, sufrostico joined 12:45 ugexe joined 12:50 domidumont left 12:51 domidumont joined 12:52 kid51 left 12:53 orbus joined 13:03 apiw left 13:04 Guest99693 is now known as luiz_lha, bioexpress joined 13:05 bowtie joined, maybekoo5 left, bowtie is now known as Guest2113
bioexpress Hello! "sub one { some_func( $_[0] ) }": was is the most similirar construct (with the smalles overhead regarding passing the parameter) in Perl 6 ? 13:08
timotimo what exactly do you want the sub to accept? 13:09
masak m: sub one { some_func(@_[0]) }; sub some_func($s) { say $s }; one("OH HAI")
camelia rakudo-moar 691b39: OUTPUT«OH HAI␤»
masak bioexpress: like that?
m: sub one { some_func(@_[0]) }; sub some_func($s) { say $s }; one("OH HAI", "I can send more stuff", "but it doesn't get printed") 13:10
camelia rakudo-moar 691b39: OUTPUT«OH HAI␤»
timotimo masak: it looks to me like they want a sub that extracts the first item in the first parameter passed
but what do i know
masak yes, I'm not sure either. :)
13:11 apiw joined
bioexpress timotimo: I think that is what I am searching for 13:11
timotimo okay, then the code is literally the same you already had :) 13:12
m: sub first_of_first { some_func($_[0]) }; sub some_func { say "i got ", $_ }; first_of_first([10, 20, 30]);
camelia rakudo-moar 691b39: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤ in sub first_of_first at /tmp/3hWl12_ERk line 1␤ in block <unit> at /tmp/3hWl12_ERk line 1␤␤»
timotimo whoops.
m: sub first_of_first($_) { some_func($_[0]) }; sub some_func { say "i got ", $_ }; first_of_first([10, 20, 30]); 13:13
camelia rakudo-moar 691b39: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤ in sub some_func at /tmp/rTwdAsJ51m line 1␤ in sub first_of_first at /tmp/rTwdAsJ51m line 1␤ in block <unit> at /tmp/rTwdAsJ51m line 1␤␤»
timotimo oh, *in* the sub
m: sub first_of_first($_) { some_func($_[0]) }; sub some_func($_) { say "i got ", $_ }; first_of_first([10, 20, 30]);
camelia rakudo-moar 691b39: OUTPUT«i got 10␤»
timotimo m: sub first_of_first { some_func($^thing[0]) }; sub some_func { say "i got ", $^thing }; first_of_first([10, 20, 30]);
camelia rakudo-moar 691b39: OUTPUT«i got 10␤»
timotimo m: sub first_of_first { some_func($^thing[0]) }; sub some_func { say "i got ", $^thing }; first_of_first([10, 20, 30], <foo bar baz>);
camelia rakudo-moar 691b39: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in sub first_of_first at /tmp/uGfhwZysPy line 1␤ in block <unit> at /tmp/uGfhwZysPy line 1␤␤»
garu_ is doc.perl6.org/type/Signature the ultimate-goto-if-its-not-there-it-doesnt-exist reference on sub/method signatures in P6? Or should I look elsewhere as well? 13:14
timotimo if you want it to accept as many positional arguments, you'd add a "*@" in the signature
bioexpress I need only one argument
timotimo OK
bioexpress Thx!
13:16 bioexpress left 13:18 apiw left 13:23 pmurias joined 13:24 apiw joined 13:27 Perl6Newbie joined 13:28 Perl6Newbie left
timotimo what can we do to make /downloads/star prettier? 13:28
FROGGS garu_: it seems pretty complete
timotimo like, perhaps putting all files that belong to the same month into columns?
or friendlier icons?
FROGGS garu_: though from skimming it, constant expressions are just mentioned on return types, which is unfortunate I think 13:29
mspo you mean rakudo.org/downloads/star/ ?
awwaiid mmm. I think you could do just about anything and it would be prettier than it is
timotimo yes, that's the one
FROGGS garu_: like: sub foo("bar", $baz) { ... }
mspo Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 Server at rakudo.org Port 80
timotimo without forcing people to spend more effort on this 13:30
mspo is that real?
awwaiid ideally big buttons at the top for the current version is all you want, and then only show the others if people go out of their way to get an outdated version
timotimo is that an OpenSSL version susceptible to heartbleed or something?
and yeah, it is real.
13:30 jkva left
mspo old apache :) 13:30
awwaiid oh, zero-effort. hmm. maybe there are some like apache themes or something
timotimo rakudo.org isn't well maintained. the owner doesn't have time to work on it
FROGGS mspo: could be worse
(could be IIS)
mspo FROGGS: that's always true 13:31
timotimo i think the wordpress is also quite old
mspo ugh wordpress
13:31 jkva joined, jkva left
moritz pmichaud runs rakudo.org; somebody should contact him 13:31
timotimo it says "update is available! please update now", but i'm *not* going to be the one doing the update click.
awwaiid mostly I think if you move /downloads/star to the main site as a regular page that links to the current versions, and then make this full-list page something almost nobody goes to
moritz if he doesn't want to maintain the server, we could host it on www.p6c.org (same as perl6.org) 13:32
awwaiid yeah, that sort of update is scary
13:32 rurban left
moritz you only do that sort of update if you have shell access to the host *and* a recent backup 13:32
mspo yeah probably best to just have a button and hide that dirlist
timotimo: the lowest effort would be to fix the icons in the mod_dirlist :) 13:33
timotimo we could build a little something something that takes the dirlist apache generates (can it also generate it as .json or .xml or .txt?) and generate a nice little html page from it?
perhaps then we could remote-upload that to rakudo.org
awwaiid timotimo: is the goal that you drop a new version in the dir and don't do anything else? 13:34
timotimo aye
*perhaps* trigger the rebuild of the page and check if it doesn't crap itself due to unexpected filenames or something
awwaiid hmm. I'm still leaning toward having another wordpress download page being the best, but that would mean editing it to point to the lastest version 13:35
timotimo yeah
awwaiid well gimme edit access to it (wordpress side) and let's see if we can work it out? We don't do releases THAT often :)
timotimo i'm not sure i'd be allowed to extend trust from rakudo.org to you. also no clue if i have the rights to do that 13:36
let's see
awwaiid yeah, no worries
timotimo wow, i can! 13:37
would you be an author? editor? administrator?
contributor, maybe?
13:37 apiw left
awwaiid for initial setup of a new page I think I'd need more (editor or admin, can't remember) -- thereafter less 13:38
timotimo i can easily set up a page for you
msg me your wanted e-mail address and username please?
awwaiid ideally, imo, right next to "Home" would be "Download" -- that page would have the most up-to-date / popular downloads and then link to the directories
fireartist need to be an editor to edit pages - contributor/author are blog-post only 13:39
codex.wordpress.org/Roles_and_Capabilities
13:40 cdg joined
timotimo thank you, fireartist, that helps :) 13:40
13:47 apiw joined
[Coke] . 13:51
13:52 rurban joined 14:01 skids joined 14:04 ggoebel16 left 14:06 apiw left 14:09 Actualeyes left 14:11 apiw joined
[Coke] m: say sqrt(-1+0i) * 2**3 * sum pi 14:15
camelia rakudo-moar 691b39: OUTPUT«0+25.1327412287183i␤»
timotimo "sum pi"? %) 14:16
moritz m: say pi == sum pi
camelia rakudo-moar 691b39: OUTPUT«True␤»
14:16 avenj joined, avenj left, avenj joined
timotimo is that supposed to read like a poem or something? 14:16
[Coke] i 8 sum pi 14:18
moritz groans 14:19
[Coke] usually written as √-1 2³ ∑ π
m: say sqrt(-1+0i) * 2³ * sum pi # slightly better 14:20
camelia rakudo-moar 691b39: OUTPUT«0+25.1327412287183i␤»
timotimo oh lord 14:21
14:23 marmay joined 14:25 cdg left 14:26 buharin left, cdg joined 14:28 wamba left 14:31 Actualeyes joined
dalek kudo/experiment-multi-line-repl: 398a92c | hoelzro++ | src/Perl6/Compiler.nqp:
Multi-line input: Don't segfault if an exception has no payload

We extract BOOTException's payloads via nqp::getpayload to detect X::Syntax::Missing errors; sometimes, an exception has no payload, which (until now) causes a segmentation fault
14:33
garu_ FROGGS: that looks interesting. can you show me an example of where it would be useful? I might try and append to that doc 14:34
timotimo hoelzro: i'm on that segfault
14:35 maybekoo5 joined
timotimo pushed, please test :) 14:37
14:38 wamba joined
FROGGS garu_: github.com/tadzik/panda/blob/maste.../panda#L14 14:39
14:40 raiph joined 14:41 xenu left
FROGGS m: #| do something sensible␤multi MAIN("doit") { ... };␤#| more verbose help␤multi MAIN("WAT") { ... } 14:42
camelia rakudo-moar 691b39: OUTPUT«Usage:␤ /tmp/3p3fJNo0eD doit -- do something sensible␤ /tmp/3p3fJNo0eD WAT -- more verbose help␤»
garu_ FROGGS: thanks!
FROGGS garu_: so one usage is subcommand style things#
-#
garu_ FROGGS: yeah, really interesting! 14:46
14:47 virtualsue joined, cmh-fn left 14:50 rje_ joined
timotimo hoelzro: well? :) 14:50
rje_ Is +camelia written in Perl6? 14:55
moritz rje_: no
I guess it could be now 14:56
but back then, Perl 6 wasn't stable enough
timotimo only if enough hours in the day
14:56 _Gustaf_ left
rje_ Gotcha. Hey, due to the bad rep Perl5 has from the millennials here at work, maybe I should refer to Perl6 as "Camelia". 14:57
[Coke] rje_: the main implementation is Rakudo - just lead with that.
timotimo moritz: i think i already asked this, but i don't know if there was an answer yet. should we get collectd onto more than just hack.p6c.org?
14:57 cdg_ joined
moritz timotimo: you mean on the webserver too? 14:58
rje_ Code: I was thinking that last week, but it's weirder-sounding.
moritz timotimo: +1 from me
rje_ er, Coke
timotimo or on the VM host?
moritz timotimo: maybe that too
stmuk the most simple solution for rakudo.org/downloads/ and similar might be to create an 'archive' directory and move anything preXmas into it 14:59
moritz or maybe start to introduce subdirs for the years
rje_ Coke: your server is in TX. Are you in Texas?
moritz downloads/rakudo/2016/
14:59 cdg left
rje_ Coke: I'm in Plano 15:00
timotimo stmuk: awwaiid is already working on a pretty little page for downloadingus
[Coke] rje_: I am not logged in from texas. :)
stmuk ah good 15:01
[Coke] Coincidentally, I lived in Houston for 2 years, worked for Enron.
timotimo moritz: strange. my reading of collectd.org/wiki/index.php/Plugin:CPU makes it seem like we're running some other cpu plugin on our collectd ... but how is that possible? 15:02
dalek href="https://perl6.org:">perl6.org: 9d04254 | (Steve Mynott)++ | source/downloads/index.html:
refer to Mac binary .dmg
rje_ Coke: unfortunately, our young over here are an opinionated lot. 15:03
moritz timotimo: dunno; I did a pretty minimal installation and stopped working on at as soon as it works 15:07
15:07 kurahaupo joined, Zero_Dogg left
timotimo hum. interesting 15:07
why don't i have my password on my desktop?
timotimo grabs laptop
15:08 Zero_Dogg joined, Zero_Dogg left, Zero_Dogg joined, apiw left
timotimo better now 15:09
15:10 RabidGravy joined 15:16 Foxcool_ left 15:18 FROGGS left
hoelzro timotimo: sorry, was commuting; which segfault? 15:21
15:24 apiw joined
timotimo hoelzro: getexpayload on unitialized exceptions 15:24
15:25 AlexDaniel left 15:26 rurban left, secwang joined
hoelzro ahhh 15:26
getpayload is fine; it just fails when I do my $inner := nqp::getpayload($_); my $ex-type := nqp::what($inner).HOW.name(nqp::what($inner)) 15:27
status update on the multi-line input branch: it now passes roast 15:29
timotimo damn, i misread your commit in that case
so my patch is useless? :<
hoelzro timotimo: that just means I miswrote it =/
sorry =(
jnthn Fixing Moar SEGVs isn't really useless :)
timotimo moritz: how do we feel about having a notification from collectd when we have a process that's been eating too much cpu time? perhaps something like that is possible 15:30
15:30 sufrostico left
timotimo (otherwise, it could probably be written in perl6 ;) ) 15:30
hoelzro jnthn: it certainly doesn't hurt =)
timotimo jnthn: i didn't actually check if you could get a segfault from that ... :|
i didn't know what would be required to reproduce hoelzro's segfault from getexpayload 15:31
15:31 apiw left
hoelzro it wasn't getexpayload that was segfaulting 15:31
but nqp::what(nqp::getpayload($ex)) should probably never segfault
timotimo well, if it was returning c-level null, it could be causing the segfault
hoelzro mhmm
timotimo i put in a line that makes sure when it's null it gives VMNull instead
which can be WHAT'd
15:32 sufrostico joined, apiw joined
hoelzro oh, then it wasn't for nothing! 15:32
timotimo++ # fixing other's bug
*bugs
15:33 secwang left
timotimo great! 15:34
15:36 apiw left
timotimo i activated the "aggregation" plugin for collectd. it should now show a "all cpu usages added" graph on the cpu page, too 15:38
geekosaur misreads "aggravation"...
timotimo but i don't really know when that'll kick in. i've "systemctl restart collectd"
MadcapJake timotimo, wrt rakudo.org/downloads: adamwhitcroft.com/apaxy/ looks really nice 15:48
timotimo pretty! 15:49
we'd have to have someone with shell access to rakudo.org, though, i imagine
or we just use one of the probably millions of applicable wordpress exploits on it ... 15:50
MadcapJake lol
hoelzro oh, I forgot to finish my status report! the multi-line stuff works pretty well, except for class definitions
it really doesn't like those =/
MadcapJake anyone been following @perlhex? Curious if people are enjoying the content. Could use some more retweets to get the account more followers too! 15:52
timotimo is following it
the last few tweets i saw, i enjoyed 15:53
the ~= i found a bit strange, though
MadcapJake lol, i was trying to evoke "this was recently added to the docs" and thought I'd do something perl6ish :D
timotimo heh 15:54
okay, that's cute :)
15:58 Actualeyes left
ugexe should i be concerned if --profile always crashes a program? or is it just --profile is kinda fragile? 15:59
timotimo --profile might immediately die if you use anything multi-threaded or asynchronous I/O
ugexe ah
timotimo HA! 16:00
the aggregation plugin works now and has the cpu sum
16:05 Cabanossi left 16:07 khw joined
moritz /w 10 16:07
16:08 Cabanossi joined
kaare_ In Perl 5 it's rather common to pass a scalar to a sub, and then in there decide what to do based on the type [if (ref $parm eq 'ARRAY') {...}] 16:10
hoelzro multi subs?
kaare_ is there a common idiom to handle that in Perl 6?
That's not always really efficient.
hoelzro multi sub handle-it(Int $n) { ... } multi sub handle-it(Str $s) { ... }
[Coke] hoelzro++ is correct.
kaare_ But I guess that's the canonical answer :-) 16:11
[Coke] What makes you say it's not efficient?
Have you profiled it?
16:11 Actualeyes joined 16:12 rindolf left
kaare_ Ah, no. Don't mean performance. 16:12
Just that it leads to too much clutter in some cases. 16:14
16:15 hankache joined
kaare_ I guess I'll try to rewire it one step further up. 16:15
16:15 Cabanossi left 16:17 rindolf joined
alpha123 How's that cluttered? IMO it's *way* nicer than a bunch of if ... { ... } 16:17
hoelzro I think (personally) that multi subs are a lot less cluttered than if($type_check_1) { ... } elsif($type_check2) { ... }
16:18 Cabanossi joined 16:19 hankache left
kaare_ I agree that the perl 5 way is ugly too. Or rather that the construct probably never should have existed in the old code. 16:19
16:22 musiKk joined
RabidGravy I actually remade a large given/when into a bunch of multis with literal parameters yesterday, much prettier 16:23
16:23 virtualsue left 16:29 hankache joined 16:30 domidumont left
hankache hola #perl6 16:30
MadcapJake kaare_, as RabidGravy pointed out, given/when is another possible solution
fireartist m: Str.WHAT.say
camelia rakudo-moar 691b39: OUTPUT«(Str)␤»
fireartist say( "X: " ~ Str.WHAT ) 16:31
why doesn't .WHAT want to concat?
hankache m: say( "X: " ~ Str.WHAT ) 16:32
camelia rakudo-moar 691b39: OUTPUT«Use of uninitialized value of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/UWxEQCR6OI line 1␤X: ␤»
fireartist ok, right, thanks :-)
timotimo kaare_: probably better than having a bunch of ifs is to have a given/when
hankache m: say( "X: " ~ .WHAT )
camelia rakudo-moar 691b39: OUTPUT«Use of uninitialized value of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/8NJRRE5veT line 1␤X: ␤»
hankache m: say( "X: " "X"~ .WHAT )
camelia rakudo-moar 691b39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DkY8hUlwTu␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/DkY8hUlwTu:1␤------> 3say( "X: "7⏏5 "X"~ .WHAT )␤ expecting any of:␤ infix␤ infix stop…»
timotimo hankache: you want .WHAT.^name
or .WHAT.gist
hankache timotimo i was helping fireartist 16:33
timotimo oh
OK
hankache fireartist what are you trying to do?
MadcapJake fireartist, or Str.WHICH
timotimo .WHICH has a quite different use-case
m: say "hello how are you".WHICH 16:34
camelia rakudo-moar 691b39: OUTPUT«Str|hello how are you␤»
fireartist just printing some debugging - was surprised it didn't do as I expected
MadcapJake m: say( "X: " ~ Str.WHICH )
camelia rakudo-moar 691b39: OUTPUT«X: Str␤»
kaare_ thanks hankache/timotimo but I'm stepping back a little to see if I can avoid the ugliness completely.
MadcapJake timotimo, on a type, WHICH seems to just concatenate the type name 16:35
16:35 ely-se left
MadcapJake *when used with ~ 16:35
timotimo kaare_: you can also just try to call a method on something and catch exceptions and stuff like that 16:36
or try to coerce to a different type and catch exceptions when it doesn't work
RabidGravy this diff shows refactoring a given/when to multi with literal parameters github.com/jonathanstowe/Audio-Liq...fe4de3b687 16:38
MadcapJake with the lovely github showing it's syntax highlighting muscles... 16:40
s/it's/its/
timotimo yeah 16:42
16:44 apiw joined, mamadama joined 16:46 fireartist left 16:48 apiw left 16:50 abaugher left 16:51 abaugher joined 16:52 raiph left 16:57 nakiro left, cdg_ left
timotimo i'm not sure how to remove the aggregation/ stuff, since apparently collectd-web keeps that around 17:00
even though since i moved the output into the cpu plugin's tab there'll not be new data there
17:02 domidumont joined, Vitrifur left
hoelzro should I merge in the multi-line input work, in spite of its problem with classes? 17:05
I think it's better than nothing, but at the same time I think it might irritate users
17:09 mamadama left, hankache left
geekosaur can you make it switchable? 17:10
skids Rabidgravy: you shouldn't need the else { Empty } these days. 17:11
m: say (if (0) { }); say (Empty)
camelia rakudo-moar 691b39: OUTPUT«()␤()␤»
hoelzro geekosaur: switchable? so one can turn off the feature? 17:13
RabidGravy yeah, I think it's superstitious after I found a case where it did matter
17:14 avenj left
geekosaur yeh. $*MULTILINE-INPUT or some such so they can play with it and if it's too annoying push it out of the way 17:14
jnthn Maybe an env var 17:19
17:20 lostinfog joined
hoelzro ok 17:22
I'll add that later and merge it
17:25 ZoffixW joined
ZoffixW m: say "㊤".uniname.words.first: :end 17:26
camelia rakudo-moar 691b39: OUTPUT«This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤ in block <unit> at /tmp/o5PFGbXALC line 1␤␤»
ZoffixW :/
17:26 maybekoo5 left
ZoffixW m: say "㊤".uniname.words.first 17:26
camelia rakudo-moar 691b39: OUTPUT«CIRCLED␤»
17:27 musiKk left 17:28 jts joined
ZoffixW m: say "㊤৫".comb».uniname».words».[*-1] 17:29
camelia rakudo-moar 691b39: OUTPUT«(HIGH FIVE)␤»
ZoffixW :D
17:29 telex left 17:30 telex joined 17:31 jts left
TimToady m: say "㊤৫".uninames».words»[*-1] 17:31
camelia rakudo-moar 691b39: OUTPUT«(HIGH FIVE)␤»
timotimo oh hey TimToady 17:32
ZoffixW: i see your twitter exchange and ... oh well ...
ZoffixW heh 17:36
It's the equivalent of shouting "get a horse" at the dawn of automobile age :)
17:43 leont joined
jnthn o/ TimToady 17:46
17:48 Actualeyes left 17:49 ZoffixW left 17:53 pmurias left
RabidGravy I might finally write Test::Kinda so I can express a "to be honest if only one or two fail then it's a pass" ;-) 17:54
xiaomiao RabidGravy: have a look at glibc test suite then 17:55
17:55 ely-se joined
RabidGravy I think at this stage I'd rather not to be frank ;-) 17:55
17:57 dolmen joined
RabidGravy testing against an external software that has its own view of deterministic scheduling with several distinct clocks is proving to be quite annoying 17:57
17:59 Guest2113 left
RabidGravy oh well, my back, my rod .... 18:00
18:02 firstdayonthejob joined, Kermi joined
Kermi Hi, I am reading perl6intro.com/#_what_is_perl_6 and I wonder Can we use perl6 with apache with mod_perl ? 18:04
[Coke] mod_perl is perl5 18:05
(so, no)
TimToady m: say "􏿽xEF􏿽xA9􏿽x9E" 18:06
camelia rakudo-moar 691b39: OUTPUT«艹␤»
TimToady I don't want to canonicalize that character
stmuk most perl 5 people have moved from mod_perl anyway
TimToady I want to be able to mention that variant in my file without it going away. 18:07
jnthn: ^^ 18:08
18:08 ggoebel16 joined
Kermi :) Thanks 18:08
What can I use for Apache and Perl6? 18:09
RabidGravy I'm not even clear in my mind how a mod_rakudo fir instance would work 18:10
18:10 sufrostico left
RabidGravy Kermi, right now it's start a separate server and use Apache as a proxy 18:10
stmuk kermi: psgi
Kermi RabidGravy, where can read more about this? 18:11
18:11 sufrostico joined
RabidGravy about which part? 18:12
Kermi [20:10] <RabidGravy> Kermi, right now it's start a separate server and use Apache as a proxy
RabidGravy right, which part?
Kermi How to connect perl6 with apache
RabidGravy er
the Apache documentation describes how to use it as a frontend proxy for another application 18:13
(though I think all the cool kids are using nginx or something else for this purpose these days) 18:14
jnthn TimToady: That'd be part of NFC, no? 18:15
18:15 bowtie joined, bowtie is now known as Guest95177
jnthn .u 􏿽xEF􏿽xA9􏿽x9E 18:15
yoleaux U+FA5E CJK COMPATIBILITY IDEOGRAPH-FA5E [Lo] (􏿽xEF􏿽xA9􏿽x9E)
jnthn m: say Uni.new(0xFA5E) 18:16
camelia rakudo-moar 691b39: OUTPUT«Uni:0x<fa5e>␤»
jnthn m: say Uni.new(0xFA5E).NFC
camelia rakudo-moar 691b39: OUTPUT«NFC:0x<8279>␤»
jnthn Yeah
Almost certainly a singleton decomposition.
There's not a good way yet, anyways. It's in Uni territory. 18:17
Kermi RabidGravy thanks 18:18
jnthn But we don't have uni literals yet.
And even when we do, we'll need to work out what happens if you try to concatenate them with Str.
.oO( NFG is a good default, but perhaps sometimes a bit too good... :P )
18:19
RabidGravy Kermi, there are several things in the Perl 6 ecosystem that allow making a web application server, Bailador, Crust and so forth, you probably want to peruse a couple of those in the first instance 18:20
18:20 dbrunton joined 18:21 eyck left
stmuk Kermi: examples.perl6.org/categories/cookb...cript.html 18:21
that's one miminal way of doing it and you would probably proxypass off apache or nginx to that port 18:22
18:22 mamadama joined 18:24 addison_ joined
Kermi I will read how to proxypass it. Thanks 18:24
timotimo i'm showing the "An Earthshaking Announcement" to a friend right now %)
18:27 Kermi left 18:29 dolmen left
jnthn noms & 18:29
18:29 hankache joined 18:31 Vitrifur joined 18:33 Laurent_R joined 18:35 wamba left 18:36 espadrine left 18:37 cdg joined 18:39 leont left, spider-mario joined 18:40 Guest95177 left
TimToady m: say "􏿽xEF􏿽xAB􏿽x8F" 18:41
camelia rakudo-moar 691b39: OUTPUT«(signal SEGV)»
TimToady jnthn: ^^ there's another glitch :) 18:42
18:42 bowtie_ joined
timotimo can you also make that with a \x literal, so that i can more easily copy-paste it? 18:43
TimToady m: say "\xfacf" 18:47
camelia rakudo-moar 691b39: OUTPUT«(signal SEGV)»
TimToady m: say "\xfad0"
camelia rakudo-moar 691b39: OUTPUT«(signal SEGV)»
[Coke] O_o 18:48
TimToady m: say "\xfad9"
camelia rakudo-moar 691b39: OUTPUT«龎␤»
TimToady m: say "\xfad8" 18:49
camelia rakudo-moar 691b39: OUTPUT«齃␤»
TimToady m: say "\xfad7"
camelia rakudo-moar 691b39: OUTPUT«(signal SEGV)»
TimToady there's the boundary
that trailing boundary, facf is the leading boundary 18:50
timotimo: thanks
18:50 FROGGS joined
timotimo er, thanks why exactly? 18:51
TimToady for copy-pasting it :) 18:52
timotimo damn, you expect me to fix that bug now? ;)
TimToady or at least for wanting to copy-paste it :)
timotimo 48543 const MVMint32 *pcs = comp_p[plane][upper][lower]; 18:53
the values of the indices are, respectively, <optimized out>, <optimized out>, and <optimized out>
:P
18:53 dbrunton left
TimToady cool! 18:53
"Nobody will ever use those characters!" 18:54
timotimo 2, 126, and 211
(gdb) print comp_p[2][126] 18:55
$5 = (const MVMint32 **) 0x0
TimToady notes that those are, in fact, plane 0 characters 18:56
timotimo so ... do we actually expect there to be something?
TimToady I wouldn't expect to find something in plane 2 for them, no :) 18:57
19:00 prammer left 19:01 domidumont1 joined
timotimo i personally haven't a clue what that particular piece of code is precisely supposed to achieve; you said it's supposed to be plane 0, do you know why it'd get plane 2 instead? 19:01
given plane is just (l >> 16) & 0xF 19:02
19:03 _mg_ joined, domidumont left
TimToady maybe upstream, the same remapping thingy that turns 􏿽xEF􏿽xA9􏿽x9E into 艹 is turning those compat chars into something in plane 2? 19:03
but then they should find something
m: say "􏿽xEF􏿽xAB􏿽x8F".ord.base(16) 19:04
camelia rakudo-moar 691b39: OUTPUT«2284A␤»
19:04 prammer joined
TimToady yeah, looks like that's what's going on 19:04
m: say "􏿽xEF􏿽xAB􏿽x8F".ord.base(16).chr 19:05
camelia rakudo-moar 691b39: OUTPUT«Cannot convert string to number: trailing characters after number in '032284⏏5A' (indicated by ⏏)␤ in block <unit> at /tmp/fFGuCOiKMA line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/fFGuCOiKMA line 1␤␤»
TimToady m: say "􏿽xEF􏿽xAB􏿽x8F".ord..chr
camelia rakudo-moar 691b39: OUTPUT«5===SORRY!5===␤Argument to "chr" seems to be malformed␤at /tmp/EXvSTh8KTb:1␤------> 3say "𢡊".ord..chr7⏏5<EOL>␤Other potential difficulties:␤ Unsupported use of bare "chr"; in Perl 6 please use .chr if you meant $_, or use an expli…»
TimToady m: say "􏿽xEF􏿽xAB􏿽x8F".ord.chr
camelia rakudo-moar 691b39: OUTPUT«(signal SEGV)»
TimToady m: say "\x2284a"
camelia rakudo-moar 691b39: OUTPUT«(signal SEGV)»
timotimo gist.github.com/timo/0566aa167dbf0996bab9 19:06
that's the full backtrace of the thing you originally made copy-pastable
19:06 jack_rabbit left
TimToady m: say "𢡊" 19:06
camelia rakudo-moar 691b39: OUTPUT«(signal SEGV)»
TimToady that's the actual plane 2 character that can't print
19:08 prammer left 19:11 avenj joined 19:14 FROGGS left 19:17 ocbtec left, mr-foobar joined 19:18 alpha123 left, leont joined 19:20 peter joined 19:21 peter is now known as Guest36813, Guest36813 is now known as alpha123 19:24 mamadama left 19:26 eyck joined 19:27 rurban joined, marmay left 19:30 prammer joined, AlexDaniel joined 19:31 ely-se left
b2gills TimToady: should storing a fail in a variable stop it from going into $! ( unless you ask it the wrong question ) 「{my $ = sub {fail 'e'}();Nil}; say $! === Nil」 19:32
arnsholt timotimo: IME, those <optimised out> values can frequently be recovered if you are one of those people who are able to remember which registers are used to pass arguments into a function 19:33
Sadly, I'm not one of those people =(
19:34 [particle] left 19:35 [particle] joined 19:36 addison_ left
b2gills TimToady: I'm thinking it shouldn't fail at the end of the scope 「{my @a = { Bool.pick ?? ++$ !! sub {fail}() } ... *;Nil}」 Otherwise the only way to deal with this example would be to look at the internals of Array and handle the Failures that have already been generated. 19:37
19:40 addison_ joined 19:42 rurban left
skids b2gills: it is not that it is stored, it is that it is not sunk. 19:57
timotimo arnsholt: oh, that's a good idea actually. from the moar jit i know that a little bit 20:00
arnsholt Yeah, if you know it, it's useful 20:01
And there's a command to dump the contents of the registers as well, obv
20:05 kamel joined
timotimo print %foo should already do it, i think? 20:05
arnsholt Probably 20:06
20:07 brrt joined
moritz \o 20:08
20:09 hanekomu joined
timotimo moritz: do you happen to know if collectd-web has its own data store somewhere? that may need a tiny bi tof cleanup so that the aggregated cpu thingies that no longer get updates won't show any more 20:10
moritz timotimo: I don't think so; I think it just looks a the list of rrd files in some directories
timotimo: so just delete the old rrd files
timotimo ah. but i looked into the folder where it seemed like collectd was putting the rrd files and i didn't see the "old"/obsolete ones there 20:11
moritz hm
timotimo does collectd-web run on hack? if so, how should i transport the data from other hosts over to hack or make it reachable for collectd-web? 20:12
moritz yes to the first
and to the second: you can configure collectd on a second host to forward the data to hack 20:13
20:13 hankache left
moritz collectd.org/wiki/index.php/Networ...troduction 20:14
20:16 darutoko left 20:28 kamel left
dalek rl6-roast-data: 3d732a0 | (Heiko Jansen)++ | perl6_pass_rates.csv:
Remove incomplete entries

A bunch of rows for rakudo.moar-jit with an insufficient number of fields broke github CSV formatting. Since there are other entries from the same day and with the same sha1 hash I simply deleted the corrupted data sets.
20:32
rl6-roast-data: 473e8d5 | (Will Coleda)++ | perl6_pass_rates.csv:
Merge pull request #12 from heikojansen/patch-1

Remove incomplete entries
20:32 kamel joined 20:33 ChoHag left
[Coke] so, the daily tests I'm running on hack are getting stuck again. 20:34
no one else is seeing weird hangs running stresstest?
20:35 _mg_ left, ely-se joined
bartolin [Coke]: I've seen integration/advent2013-day14.t hanging lately (see irclog.perlgeek.de/perl6/2016-02-08#i_12007689) 20:37
[Coke]: but this week I saw no hangs
20:40 ChoHag joined 20:43 ryan__ joined 20:44 sufrostico left, brrt left, [particle] left 20:45 [Coke] left 20:46 prammer left, [Coke] joined 20:47 rurban joined 20:48 [particle] joined
[Coke] argh, killed my screen session accidentally. 20:48
20:49 prammer joined
dalek rl6-roast-data: 4c3e1d0 | coke++ | / (7 files):
today (automated commit)
20:49
rl6-roast-data: 197eac5 | coke++ | / (2 files):
today (automated commit)
20:52 [particle]1 joined, [particle] left 20:54 prammer left 20:56 prammer joined 20:58 [particle]1 left 20:59 cpage_ left
timotimo video.fosdem.org/2016/STATUS.txt - has significantly changed 20:59
luckily we were in 2214, not in 2215
20:59 [particle] joined
timotimo because in 2215, more than half the videos got lost 20:59
21:01 raiph joined 21:04 lostinfog left
hoelzro was so confused reading that 21:05
21:05 dolmen joined
hoelzro I was going to say "2215?! Perl 6 really *is* a one-hundred year language!" 21:05
jnthn TimToady: 'fraid I'm too tired to go SEGV hunting tonight on that one...please do RT it. 21:07
21:17 leobut joined 21:22 pmurias joined, [particle]1 joined 21:23 [particle] left 21:24 ryan__ left 21:30 revhippie joined, leobut left, leobut joined 21:32 leobut left 21:33 leobut joined, prammer left 21:34 prammer joined 21:35 domidumont1 left 21:45 prammer left 21:47 ggoebel16 left 21:50 prammer joined 21:52 prammer left 21:58 brrt joined 22:01 brrt left, skids left 22:05 leobut left 22:08 cpage_ joined
AlexDaniel I see that all bugs in RT have 0 priority. Is it OK use priority other than 0? 22:10
e.g. for segfaults? 22:16
22:18 spider-mario left
moritz AlexDaniel: I don't think it'll accomplish anything 22:19
AlexDaniel: people who work on bugs have their own judgment about their relative priorities 22:20
22:22 TEttinger joined 22:23 raiph left, perlpilot left, perlpilot joined
[Coke] make sure the title has [SEGV] or Segmentation Fault in it. 22:30
AlexDaniel okay 22:31
22:39 virtualsue joined 22:46 test joined
pmurias AlexDaniel: are segfaults really higher priority? 22:46
AlexDaniel pmurias: imo yes
22:46 test is now known as Guest38288 22:47 hippie joined 22:48 apiw joined
Hotkeys b2gills: are you around? 22:48
22:48 hippie1 left, ChoHag left
b2gills Hotkeys: nope ... wait a minute 22:48
that was meant as a joke 22:49
Hotkeys :p
I have a solution for "How even is a number" that is 23 bytes, but it's significantly different from yours
Should I post it as my own?
Or would it be better for you to add it to yours
I'm not sure what the protocol is here 22:50
22:50 Guest38288 left
Hotkeys b2gills: 22:51
b2gills If it is a vastly different approach, go ahead and post it if you want 22:52
really there is no hard and fast rules
Hotkeys mmkay
posted 22:54
m: my &f = {elems $_,*/2...^*!%%2}; say f(14); say f(20); say f(94208); say f(7); say f(-4)
camelia rakudo-moar 691b39: OUTPUT«1␤2␤12␤0␤2␤»
Hotkeys actually 22:55
22:55 apiw left
Hotkeys m: my &f = {+($_,*/2...^*!%%2)}; say f(14); say f(20); say f(94208); say f(7); say f(-4) 22:55
camelia rakudo-moar 691b39: OUTPUT«1␤2␤12␤0␤2␤»
Hotkeys neat
b2gills {+($_,*/2...^*%2)} 22:56
Hotkeys :p
oh
I didn't realize that would work 22:57
22:58 apiw joined
Hotkeys oh 22:58
right
22:59 rindolf left, pmurias left
Hotkeys I forgot that it would be okay with a truthy value 22:59
23:00 ely-se left
Hotkeys and not just a True 23:00
weird
I can't get !% to work outside that example
b2gills In Perl 5 there is no True and False, but there are still if statements
Hotkeys m: say 3 !% 2
camelia rakudo-moar 691b39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Rd78q5E7l3␤Cannot negate % because multiplicative operators are not iffy enough␤at /tmp/Rd78q5E7l3:1␤------> 3say 3 !7⏏5% 2␤ expecting any of:␤ infix␤ infix stopper␤»
Hotkeys I mean I know that it would accept a truthy value logically 23:01
I just didn't think about it
because I'm used to doing like * > 10 or whatever in a sequence 23:02
so my mind was like "It's gotta be a boolean"
rje_ m: say "hello?"
camelia rakudo-moar 691b39: OUTPUT«hello?␤»
rje_ wow, cool
b2gills m: say "hello?".comb(/\w/).perl 23:03
camelia rakudo-moar 691b39: OUTPUT«("h", "e", "l", "l", "o").Seq␤»
rje_ comb! So that's what I should be using instead of split!
23:03 apiw left
rje_ thanks for that 23:03
m: say "hello?".split('') 23:04
camelia rakudo-moar 691b39: OUTPUT«( h e l l o ? )␤»
b2gills m: say "hello?".split('').perl
camelia rakudo-moar 691b39: OUTPUT«("", "h", "e", "l", "l", "o", "?", "")␤»
rje_ it inserts undef thingies, see
unlike perl5
23:04 cpage_ left
rje_ not the principle of least surprise to a Perl5 person :) 23:05
b2gills You can get Perl 5 to return them as well
Hotkeys sometimes split can be the same bytecount for a problem
rje_ eeek
m: say "hello?".split('').gist
camelia rakudo-moar 691b39: OUTPUT«( h e l l o ? )␤»
rje_ d'oh 23:06
23:07 rje_ left
b2gills I guess it's only the trailing empty string that you can get from Perl 5 「split "", "hello", -1」 23:07
Hotkeys m: say "11a1".comb(/\d+/).sum == "11a1".split(/\D/).sum
camelia rakudo-moar 691b39: OUTPUT«True␤»
23:07 atweiden joined
Hotkeys :D 23:07
b2gills: perhaps you could add the split version as an alternate on your filter and add answer?
I know they're effectively the same 23:08
byte count and all
23:08 sortiz joined
Hotkeys up to you 23:08
sortiz \o #perl6
Hotkeys \o
23:08 cpage_ joined
sortiz Still golfing Hotkeys? :) 23:09
Hotkeys of courwse 23:10
atweiden m: %h[0] = :zero(0); say %h.perl
camelia rakudo-moar 691b39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3Q5_xJEohQ␤Variable '%h' is not declared␤at /tmp/3Q5_xJEohQ:1␤------> 3<BOL>7⏏5%h[0] = :zero(0); say %h.perl␤»
atweiden m: my %h; %h[0] = :zero(0); say %h.perl
camelia rakudo-moar 691b39: OUTPUT«{:zero(0)}␤»
atweiden can anyone say what indexing a Hash type with a [0] accessor does?
23:11 Skarsnik left
Hotkeys m: my %h = a=>foo, b=>bar, c=>baz; say %h[0] 23:11
camelia rakudo-moar 691b39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/z9ci6P85Yw␤Undeclared routines:␤ bar used at line 1. Did you mean 'VAR', 'bag'?␤ baz used at line 1. Did you mean 'bag'?␤ foo used at line 1␤␤»
Hotkeys m: my %h = a=>'foo', b=>'bar', c=>'baz'; say %h[0]
camelia rakudo-moar 691b39: OUTPUT«a => foo, b => bar, c => baz␤»
Hotkeys m: my %h = a=>'foo', b=>'bar', c=>'baz'; say %h[1] 23:12
camelia rakudo-moar 691b39: OUTPUT«Index out of range. Is: 1, should be in 0..0␤ in block <unit> at /tmp/GWFIZK16H9 line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/GWFIZK16H9 line 1␤␤»
b2gills Any non-positional will return itself when you use [0]
Hotkeys m: my %h = a=>'foo', b=>'bar', c=>'baz'; say %h.pairs[1]
camelia rakudo-moar 691b39: OUTPUT«c => baz␤»
Hotkeys m: my %h = a=>'foo', b=>'bar', c=>'baz'; say %h.pairs
camelia rakudo-moar 691b39: OUTPUT«(a => foo c => baz b => bar)␤»
Hotkeys oh hashes
ohhhh you
b2gills m: my %h; %h[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0] = :zero(0); say %h.perl 23:13
camelia rakudo-moar 691b39: OUTPUT«{:zero(0)}␤»
dalek osystem: 809e5ff | (Claudio Ramirez)++ | META.list:
Move to META6.json
osystem: cb66171 | nxadm++ | META.list:
Merge pull request #153 from nxadm/master

Move to META6.json
Hotkeys that's a lot of zeroes
b2gills It's a lot of zeros that don't matter
sortiz atweiden, indexing any not Positional returns its type if index == 0, otherwise a Failure
timotimo i'd be glad if ecosystem commits were a bit more informative about what they do ... like, in the first line of the commit ... 23:14
and extra nice if they include a line that points at the github repository page of the module itself
23:14 rurban left
b2gills some of them have had a line that pointed at the repository 23:15
timotimo yes 23:16
i was really glad about those when i wrote one of the weeklies
atweiden i'm having difficult seeing where indexing a non-positional with [0] would be practically useful. any hints? 23:17
why wouldn't it raise an exception?
timotimo that's the thing where single things pretend to be a list of a single thing 23:19
m: my $foo = 10; $foo[1] = "hi";
camelia rakudo-moar 691b39: OUTPUT«Index out of range. Is: 1, should be in 0..0␤ in block <unit> at /tmp/L_XsAgqY9h line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/L_XsAgqY9h line 1␤␤»
timotimo that kind of thing still b0rks
sortiz m: 1.elems
camelia ( no output )
sortiz m: 1.elems.say
camelia rakudo-moar 691b39: OUTPUT«1␤»
sortiz m: "foo".elems.say 23:20
camelia rakudo-moar 691b39: OUTPUT«1␤»
sortiz atweiden, that way other common operations degrade gratefully 23:21
23:22 kurahaupo left
Hotkeys is .reverse the shortest way to reverse a list? 23:23
er nevermind
23:25 dolmen left, Zero_Dogg left, Zero_Dogg joined
atweiden m: try { @a[-8]; CATCH { default { say $_.perl } } } 23:28
camelia rakudo-moar 691b39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oJWzT1pOHZ␤Unsupported use of a negative -8 subscript to index from the end; in Perl 6 please use a function such as *-8␤at /tmp/oJWzT1pOHZ:1␤------> 3try { @a[-8]7⏏5; CATCH { default { say $_.perl }…»
atweiden is there a way to catch that error?
m: try { my @a = 0, 1, 2; @a[-8]; CATCH { default { say $_.perl } } }
camelia rakudo-moar 691b39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ou_oO_IAUq␤Unsupported use of a negative -8 subscript to index from the end; in Perl 6 please use a function such as *-8␤at /tmp/ou_oO_IAUq:1␤------> 3try { my @a = 0, 1, 2; @a[-8]7⏏5; CATCH { defaul…»
sortiz A CATCH block
geekosaur atweiden, the ==SORRY== tells you it's compile time
hard to use runtime code to catch a compile time error 23:29
atweiden i see
sortiz .. can be used to catch runtime... early <ENTER> 23:31
Ups: 23:36
m: my @A[-1];
camelia rakudo-moar 691b39: OUTPUT«Memory allocation failed; could not allocate 18446744073709551608 bytes␤»
AlexDaniel m: my $x = -8; try { @a[$x]; CATCH { default { say $_.perl } } }
camelia rakudo-moar 691b39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hwg3DIh7YM␤Variable '@a' is not declared␤at /tmp/hwg3DIh7YM:1␤------> 3my $x = -8; try { 7⏏5@a[$x]; CATCH { default { say $_.perl } ␤»
AlexDaniel m: my @a; my $x = -8; try { @a[$x]; CATCH { default { say $_.perl } } }
camelia rakudo-moar 691b39: OUTPUT«X::OutOfRange.new(what => "Index", got => -8, range => "0..Inf", comment => Any)␤»
AlexDaniel ? 23:37
23:37 BenGoldberg joined
sortiz AlexDaniel, that's the runtime Failure 23:38
AlexDaniel sortiz: sure, why would you want to catch your typos?
RabidGravy right that's me done for the day. toodles.
AlexDaniel Hotkeys: did you figure it out? :)
m: my @a = <a b c>; say [R,] @a 23:39
camelia rakudo-moar 691b39: OUTPUT«(c b a)␤»
Hotkeys I just did something else
AlexDaniel Hotkeys: ↑ this is probably shorter
sortiz AlexDaniel, May be not _your_ typos, you are working with someone data.
AlexDaniel sortiz: you mean if I'm EVAL-ing someone's code? 23:40
Hotkeys m: my @a = <a b c d e f>; say [R,] @a
camelia rakudo-moar 691b39: OUTPUT«(f e d c b a)␤»
Hotkeys neat
23:40 apiw joined
sortiz AlexDaniel, your $x can be anything, not necessarily declared or assigned in the same scope. 23:41
23:43 RabidGravy left
sortiz AlexDaniel, That the general idea of a try { CATCH {} }, when your expectations can fail. 23:43
AlexDaniel sortiz: if $x is anything then you can use try { CATCH {} } without any problems 23:46
because it becomes a runtime problem
sortiz Exactly.
AlexDaniel the original snippet above had -8 hard coded, and there is no reason to try to catch that 23:47
that's what I was trying to say
23:48 Pukku joined
sortiz There are other methods, but try/CATCH becomes a general way for handling Exceptions and Failures 23:48
23:49 Pukku left
sortiz Indeed, if the compiler can see a problem, it is reported at compiler time, otherwise is a runtime problem that can be handled with a try BLOCK 23:51
23:54 leont left
AlexDaniel Hotkeys: anything fun for today? :) 23:54
23:56 Laurent_R left 23:57 Ben_Goldberg joined 23:59 BenGoldberg left