»ö« 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.
arnsholt If you pass a closure to the series operator (which is what whatever currying produces), the closure gets passed previous items from the list (IIRC), not the index 00:00
Also, each star introduces a new argument, I think 00:01
[Coke] .. 00:02
00:03 spider-mario left, yoleaux joined, ChanServ sets mode: +v yoleaux 00:14 autarch1 left
RabidGravy I don't know why I was worrying so about this logging thing, it proved to be really simple 00:19
of course no-one else but me will use it but hey 00:20
anyway toodles people 00:21
00:25 RabidGravy left 00:27 Begi left 00:35 autarch joined 00:37 cpage_ left 00:38 cpage_ joined 00:40 cpage_ left, cpage_ joined 00:41 BenGoldberg joined 00:42 Ben_Goldberg left 00:52 Skarsnik left 00:57 znpy joined 01:00 autarch left, BenGoldberg left 01:02 BenGoldberg joined 01:06 ZoffixWin joined
ZoffixWin m: for ^9 .hyper: :3batch { say "Doing $_"; sleep 1; } say now - INIT now; 01:07
camelia rakudo-moar 47d21b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vzhdhFIqvr␤Strange text after block (missing semicolon or comma?)␤at /tmp/vzhdhFIqvr:1␤------> 3er: :3batch { say "Doing $_"; sleep 1; }7⏏5 say now - INIT now;␤»
ZoffixWin m: for ^9 .hyper: :3batch { say "Doing $_"; sleep 1; }; say now - INIT now;
camelia rakudo-moar 47d21b: OUTPUT«Doing 0␤Doing 3␤Doing 6␤0.00635797␤»
01:08 dvinciguerra left
ZoffixWin What's a good example of .hyper as counterposed against .race? When is "preserving order of elements" a useful thing, when it seems like they're NOT executed in correct order. Or is that just a bugglet? 01:08
01:09 skids joined, AlexDaniel joined
ZoffixWin m: for ^12 .hyper: :3batch { say "Doing $_"; sleep 1; }; say now - INIT now; 01:09
camelia rakudo-moar 47d21b: OUTPUT«Doing 0␤Doing 3␤Doing 6␤Doing 9␤Doing 1␤Doing 7␤Doing 4␤Doing 10␤Doing 2␤Doing 8␤Doing 5␤Doing 11␤3.0091360␤»
AlexDaniel ZoffixWin: slides are boring. I am interested in videos :) 01:10
oh geez, hyper!
Hiiiide!
ZoffixWin AlexDaniel, it'll be on this channel and it'll look just like this except with Perl 6 slides :) www.youtube.com/watch?v=FaPdlkkSvV8 01:11
geekosaur ZoffixWin, "executed in correct order" implies sequential instead of parallel? preserving order of elements is useful mainly so you don't have to add in an extra value to indicate the input order and sort the result to get that back out. sometimes you care about this, sometimes you don't 01:12
ZoffixWin geekosaur, ah, right, that would be the implication. I guess I'm not understanding how you "get result back out". 01:13
AlexDaniel ZoffixWin: don't use hyper 01:14
ZoffixWin: that's it.
until it is fixed, of course
ZoffixWin hm, it's on "the menu" for my talk
(with caveats that it's still buggy of course)
AlexDaniel I recommend you not to talk about it 01:15
01:15 vendethiel joined
ZoffixWin AlexDaniel, what about .race? 01:15
AlexDaniel it is completely broken, therefore it is not relevant for people who want to try out perl 6
ZoffixWin: .race is probably ok, but I am not sure 01:16
ZoffixWin k
AlexDaniel ZoffixWin: These are the ones that I've stumbled upon personally: RT #127190, RT #127452, RT #127099 01:17
01:18 solarbunny left, solarbunny joined, pnu left, solarbunny left
AlexDaniel ZoffixWin: I've tried .race several times and it worked as advertised, but I've never used it in real code 01:19
ZoffixWin: sometimes .hyper returns nothing, maybe there's a similar bug with .race? I don't know 01:20
ZoffixWin Alright.
AlexDaniel hmm, one way to know is to check tests
01:20 autarch joined
AlexDaniel ZoffixWin: rt.perl.org/Ticket/Display.html?id=126597 01:21
in other words: no, .race is also not worth mentioning 01:22
01:22 autarch left
ZoffixWin m: @array.combinations(3).race.grep(&is-match).say 01:22
camelia rakudo-moar 47d21b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/b22aAZ6VMd␤Variable '@array' is not declared. Did you mean any of these?␤ Array␤ array␤␤at /tmp/b22aAZ6VMd:1␤------> 3<BOL>7⏏5@array.combinations(3).race.grep(&is-mat␤»
ZoffixWin m: ^10 .combinations(3).race.grep(&is-match).say
camelia rakudo-moar 47d21b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/L4ILeOyfRZ␤Undeclared routine:␤ is-match used at line 1. Did you mean 'unimatch'?␤␤»
ZoffixWin ~_~ 01:23
01:23 molaf_ joined, autarch joined 01:24 pnu joined, pnu left, pnu joined 01:26 molaf__ left
AlexDaniel m: ^10 .combinations(3).race.grep({True}).say 01:26
camelia rakudo-moar 47d21b: OUTPUT«()␤»
01:29 johndau joined
Xliff .race, .hyper..... :3batch?!? 01:31
Aw man... so much to learn.
Please, please tell me there is not a .wtf!
I will die.
Laffing.
01:32 telex left 01:35 AlexDani` joined 01:37 vendethiel left 01:38 johndau left 01:39 AlexDaniel left, johndau joined
ZoffixWin Xliff, :3batch is the same as :batch(3), which is same as batch => 3 01:41
And .hyper: :3batch is same as .hyper( batch => 3 ) 01:42
Xliff, blogs.perl.org/users/zoffix_znet/20...art-1.html
01:43 pnu left, autarch left 01:44 ilbot3 left 01:45 autarch joined, kalkin- left, kalkin-_ joined 01:46 telex joined 01:47 ilbot3 joined 01:59 AlexDani` is now known as AlexDaniel
Xliff ZoffixWin, thanks! 02:01
AlexDaniel ZoffixWin: are there any other ways to write named arguments?
besides these three
geekosaur :$foo is foo => $foo, iirc? 02:07
...or maybe that only works in signatures 02:08
skids Should work generally. 02:09
AlexDaniel m: my $foo = 42; :$foo .say # works everywhere
camelia rakudo-moar 47d21b: OUTPUT«foo => 42␤»
skids note that twigils are not counted so :$*foo is foo => $*foo.
AlexDaniel m: :$*VM .say 02:10
camelia rakudo-moar 47d21b: OUTPUT«VM => moar (2016.03.46.g.50.c.7.f.6.a)␤»
skids m: :%*ENV.say
camelia rakudo-moar 47d21b: OUTPUT«ENV => HOME => /home/camelia, LANG => POSIX, LC_CTYPE => en_US.UTF-8, LOGNAME => camelia, MANPATH => /home/camelia/perl5/perlbrew/perls/perl-5.20.1/man:, ME => skids, PATH => /home/camelia/perl5/perlbrew/bin:/home/camelia/perl5/perlbrew/perls/perl-5.20.1/b…»
AlexDaniel g.50.c.7.f what?
Timbus its probs the git sha 02:11
AlexDaniel sure, but these dots?
Timbus number/letter comb?
AlexDaniel :/
m: say %ENV<ME>, ‘, yes! It does not look right!’ 02:12
camelia rakudo-moar 47d21b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YYahVhwyiQ␤Variable '%ENV' is not declared␤at /tmp/YYahVhwyiQ:1␤------> 3say 7⏏5%ENV<ME>, ‘, yes! It does not look right␤»
skids crowbarred into a Version probably.
geekosaur yeh. looks to me like it's treating git describe's result as a version string, which would break on letter/digit transitions
AlexDaniel m: say %*ENV<ME>, ‘, yes! It does not look right!’
camelia rakudo-moar 47d21b: OUTPUT«AlexDaniel, yes! It does not look right!␤»
ZoffixWin All the aforementioned ways are the only ways I know of. 02:16
Well, :foo<bar ber boor> is another one, if you wanna count it.
m: say :foo<bar>, :mer<meow moo>; 02:17
camelia rakudo-moar 47d21b: OUTPUT«Unexpected named parameter 'foo' passed␤ in block <unit> at /tmp/KPumJt_9Mb line 1␤␤»
ZoffixWin m: my %h = :foo<bar>, :mer<meow moo>; say %h;
camelia rakudo-moar 47d21b: OUTPUT«foo => bar, mer => (meow moo)␤»
skids You could count |%nameds I guess 02:20
timotimo heyo ZoffixWin, how'd your talk go? :) 02:21
ZoffixWin timotimo, still writing it. It's next Wednesday. I recently realized I'll be the only speaker that day, so I'm kinda nervous that the success or failure of the meeting depends entirely on the quality of my presentation. :) 02:25
But at least I'll have a bit of practice speaking to crowds: I'm also doing a presentation about company websites at work on Tuesday lol 02:26
timotimo oh! 02:28
OK, understood 02:29
02:29 tmch joined
timotimo so you'll talk about things like how company websites really must offer a way to create an account, and share to myspace, orkut, geocities, and stumbleupon from every single page 02:29
and the 404 page has to be some vastly humourous thingie
02:35 BenGoldberg left
kid511 In p6, how do I push a reference to a hash onto an array? Once I've done that, what is the best way to view the contents of that array? 02:45
timotimo m: my @foo = <a b c>; my %ah = heyo => 1, bye => 2; @foo.push($%ah); say @foo.perl 02:46
camelia rakudo-moar 47d21b: OUTPUT«["a", "b", "c", {:bye(2), :heyo(1)}]␤»
jdv79 how does one prevent flattening again? 02:48
m: my @a; @a.push({foo => 1});@a.say # like here
camelia rakudo-moar 47d21b: OUTPUT«[foo => 1]␤»
skids That's not flattened... 02:49
02:50 ZoffixWin left, noganex joined, yqt left
jdv79 oh, gist's inaccuracy bites again 02:50
m: my @a; @a.push({foo => 1});dd @a
camelia rakudo-moar 47d21b: OUTPUT«Array @a = [{:foo(1)},]␤»
skids Erm I mean .push isn't SUPPOSED to flatten. 02:51
kmwallio if you call sort with a &by, does it store the &by for remaining sort calls?
jdv79 i really don't appreciate that
skids kmwallio: no, it shoudn't. 02:52
02:53 noganex_ left
kmwallio I'm running into an issue where if I sort a hash and use a &by to sort the keys by the values, sorts on lists don't work 02:54
currently I just specify a &by to get around it
is the e-mail the only way to report possible bugs? 02:55
skids kmwallio: unless you have an RT account, yes. 02:56
Let's try to replicate it first though.
kid511 timotimo: Thanks! 02:59
skids m: my %h = :b,:a,:c; %h.sort({$^b.key cmp $^a.key}).say; (4,3,5,1).sort.say; 03:00
camelia rakudo-moar 47d21b: OUTPUT«(c => True b => True a => True)␤(1 3 4 5)␤»
kmwallio hm... 03:02
I just updated Perl6 and it now works... 03:03
skids: thanks, I should update and check before messaging next time :S
skids np. glad it was that easy. 03:04
timotimo i wonder how old that rakudo was :)
kmwallio timotimo, not that old I think... at most 2 weeks or so... 03:05
timotimo oh, bedtime!
ttyl :) 03:06
kmwallio dream of butterflies?
timotimo perhaps :)
03:08 solarbunny joined 03:16 solarbunny left 03:22 bjz left, solarbunny joined 03:24 bjz joined 03:30 aleogen_ left, znpy left 03:34 kid511 left 03:36 frank__ left 03:37 solarbunny left, solarbunny joined, solarbunny left, solarbunny joined, solarbunny left 03:47 solarbunny joined 03:53 geekosaur left 03:54 geekosaur joined 03:55 Fleurety left 03:58 Fleurety joined 04:02 solarbunny left 04:04 solarbunny joined 04:06 solarbunny left, solarbunny joined 04:11 solarbunny left
kmwallio m: my @a = (5, 4, 3, 2, 1); say @a[0..3].sort; 04:11
camelia rakudo-moar 47d21b: OUTPUT«(2 3 4 5)␤»
kmwallio m: my %h = :b,:a,:c; %h.sort({$^b.key cmp $^a.key}).say; my @a = (4,3,5,1); @a[0..2].sort.say; 04:12
camelia rakudo-moar 47d21b: OUTPUT«(c => True b => True a => True)␤(3 4 5)␤»
04:12 atweiden joined
atweiden i have a program that produces two different results depending on whether it's run by perl6 or perl6-debug-m 04:13
perl6-debug-m produces Match object, perl6 produces Nil
perl6-j also produces a Match
in short, parsing this toml with Config::TOML ix.io/uZU 04:14
04:20 pnu joined, pnu left, pnu joined, solarbunny joined 04:29 solarbunny left, solarbunny joined, pnu left 04:31 solarbunny left 04:37 pnu joined, solarbunny joined, pnu left, pnu joined
skids Maybe the difference is --optimize? I don't know if the debugger turn s it off or not. 04:37
atweiden --optimize makes no difference 04:45
04:48 Cabanossi left
jdv79 isn't there a terser way to write func(foo => $foo)? 04:48
Hotkeys func(:$foo) 04:50
if they're the same name
jdv79 i tried that. gah.
at least my reflex wasn't wrong
04:50 AlexDaniel left 04:51 Cabanossi joined
jdv79 oh, just shitty coding 04:53
Hotkeys i'm sure your code is beautiful
04:56 solarbunny left, pnu left 04:57 pnu joined, pnu left 05:03 solarbunny joined, pnu joined, pnu left, pnu joined 05:04 pnu left, pnu joined
jdv79 m: { say $_ }␤for <a b c>; # why is this? 05:10
camelia rakudo-moar 47d21b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sVVtDf5jZp␤Missing block␤at /tmp/sVVtDf5jZp:2␤------> 3for <a b c>7⏏5; # why is this?␤ expecting any of:␤ block or pointy block␤»
05:11 solarbunny left
jdv79 having to unspace that seems a bit ridiculous 05:14
05:14 pnu left 05:18 pnu joined 05:22 perlawhirl joined 05:23 khw left, pnu left
Hotkeys <jdv79> m: { say $_ }␤for <a b c>; # why is this? 05:26
why have a new line there
and if you do
why not have the for bit come first 05:27
jdv79 in situ its because of line length/code formatting
Hotkeys does camelia interpret '␤'?
jdv79 yes
Hotkeys neat
m: for <a b c>␤{ say $_ }; 05:28
camelia rakudo-moar 47d21b: OUTPUT«a␤b␤c␤»
Hotkeys why not this
jdv79 m: { say $_ }\␤for <a b c>; # to prove
camelia rakudo-moar 47d21b: OUTPUT«a␤b␤c␤»
05:28 geekosaur left
jdv79 because its too long 05:28
its not a big deal. just irritating.
Hotkeys it's just as long as yours though 05:29
just swapped around
05:29 perlawhirl left 05:30 geekosaur joined
Timbus number/letter comb? 05:30
uh, whoops
05:30 pnu joined
Timbus was going to say, isnt it because a } at the end of a line means something in perl6 05:31
05:31 geekosaur left 05:32 geekosaur joined
Timbus like it basically implies a semicolon 05:32
jdv79 yeah, i guess that's it. 05:34
05:34 solarbunny joined 05:49 jack_rabbit joined 05:58 kaare_ joined 05:59 perlawhirl joined 06:03 jack_rabbit left 06:12 perlawhirl left 06:14 CIAvash joined 06:23 perlawhirl joined 06:27 skids left 07:00 molaf_ left 07:09 perlawhirl left 07:18 atweiden left 07:22 kurahaupo joined
dalek osystem: 4c08c33 | kmwallio++ | META.list:
Add Text::TFIdf

See github.com/kmwallio/p6-Text-TFIdf
07:22
osystem: 9470aac | azawawi++ | META.list:
Merge pull request #179 from kmwallio/master

Add Text::TFIdf
07:22 cpage left
07:29 kurahaupo left 07:37 nadim joined 07:51 CIAvash left 08:00 firstdayonthejob joined 08:02 solarbunny left, pnu left 08:08 rindolf joined 08:14 darutoko joined 08:17 johndau left 08:18 Actualeyes joined 08:22 Actualeyes left 08:26 Actualeyes joined 08:35 perlawhirl joined
masak good summertime, #perl6 08:40
timotimo hola masak
masak encantado, señor 08:43
timotimo enchanté
masak attendons -- ne nous passons juste de l'espagnol vers le français? 08:44
tutte queste lingue mi fanno un po 'di fame 08:45
timotimo u'u sai mi to'e certu lo fraso
masak what's that, Lojban?
timotimo it is
masak that breaks the pattern of Romance languages :P
timotimo "terribly sorry, i'm anti-proficient in french stuff"
masak I used Google Translate :P 08:46
08:49 perlawhirl left 08:50 TEttinger left 08:52 TEttinger joined 08:55 tmch left 08:58 wamba joined 09:06 solarbunny joined, solarbunny left
masak general question: is there an example somewhere of a Bailador POST doing a redirect back to some page? 09:09
09:09 edjsu left
masak I could figure it out the hard way, but I've had much luck so far just copying code from elsewhere. 09:10
09:10 edjsu joined 09:11 RabidGravy joined
masak also, I note that I write *vastly* different commit messages when my goal is to push to heroku in order to try something 09:12
latest commit message: "wait, does this work?\n\nIt would simplify things quite a bit."
:)
timotimo :D
i tend to use --amend and force-pushes in such a situation :\
masak I could, yes 09:13
but I see no harm in this case in exposing my ineptitude and blundering 09:14
latest commit message: "...no, it didn't" 09:15
timotimo right
masak tadzik: re github.com/tadzik/Bailador/blob/a4...pl#L15-L17
tadzik: I was excited to find that example, because it looked as if I didn't have to parse out the POST form parameters on my own (as I do currently)
tadzik: but I get an empty hash when I do it that way (admittedly in my own code) 09:16
tadzik: are you able to confirm that `request.params` is an empty hash in a POST situation?
(a result either way would be interesting)
tadzik: if... if you'd prefer me not to bother you with Bailador things (because you've moved on to other things in life or whatever), then I will keep a respectful distance, and try to pester your issue tracker instead 09:17
masak .oO( cool idea for a module: easily expose the examples/ scripts as tests ) 09:18
jdv79: what Timbus said. irclog.perlgeek.de/perl6/2016-03-27#i_12244283 09:23
jdv79: I'm bitten by that rule sometimes too. not usually in the case you have, because I'd just drop the braces there.
jdv79: but for blocks and ==> pipes it's annoying
ok, I tried the obvious thing, and did a `header("Location", "/");` call in the POST handler where I want to redirect 09:27
it just emits a "/" into the resulting document
how should I have done it? :)
timotimo :o
masak if I were to theorize, I think the most likely thing that's happening is that some other part of Bailador is going "oh, status 200, here's your document" 09:29
but I don't know enough about the Bailador internals to continue from that hunch
sortiz \o #perl6 09:31
dalek Iish: 0ada5e8 | (Salvador Ortiz)++ | lib/DBDish/StatementHandle.pm6:
Changed $sth!done-execute signature.

Now expect as second argument the number of fields, and assume that 0 means non SELECT. 940848d | (Salvador Ortiz)++ | .travis.yml:
  travis-ci: separate installdeps and install
09:32
09:32 dalek left 09:33 dalek joined, ChanServ sets mode: +v dalek
sortiz poor dalek ;) 09:35
RabidGravy masak, looking at the code it should be something like "status 302; header 'Location', '/';" etc 09:37
masak RabidGravy: thank you. trying that.
is it always 302 (and not 301) for POST-related redirects? 09:38
RabidGravy dunno, I always have to look it up ;-)
09:38 Actualeyes left 09:39 ecocode joined
masak RabidGravy: 302 worked! thank you! 09:42
RabidGravy wahay! 09:43
09:47 TEttinger left
masak next up: trying to plug in a database 09:47
pnu: are you there? I'm curious how one achieves database persistence across deploys. 09:48
this feels like such a common question that I'm pretty sure there's a very standard answer
09:48 bjz_ joined, wamba left 09:49 vendethiel joined
RabidGravy "database persistence" ? You want to have the same data to start with on each deploy? 09:50
09:50 Ven joined, bjz left
masak yes. 09:50
I want the database to survive a deploy.
actually, I think I'm interested in general in how to manage a database "in parallel" with a heroku instance. 09:51
09:52 grondilu joined
grondilu m: our @ = 1 xx *; 09:53
camelia rakudo-moar 47d21b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TuvhBrXySR␤Cannot have an anonymous 'our'-scoped variable␤at /tmp/TuvhBrXySR:1␤------> 3our @7⏏5 = 1 xx *;␤ expecting any of:␤ constraint␤»
Timbus google says you use heroku-postgres
grondilu m: package { our @ = 1 xx * }
camelia rakudo-moar 47d21b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Q0ZPL78dbG␤Cannot have an anonymous 'our'-scoped variable␤at /tmp/Q0ZPL78dbG:1␤------> 3package { our @7⏏5 = 1 xx * }␤ expecting any of:␤ constraint␤»
RabidGravy don't really understand the heroku lifecycle
grondilu m: our @a = 1 xx *;
camelia ( no output )
grondilu m: our @a of Int = 1 xx *;
camelia rakudo-moar 47d21b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KGvl3y5Ss4␤Cannot put a type constraint on an 'our'-scoped variable␤at /tmp/KGvl3y5Ss4:1␤------> 3our @a of Int7⏏5 = 1 xx *;␤ expecting any of:␤ constraint␤»
grondilu why cab't "our" variables be constrained?
*can't 09:54
RabidGravy someone did explain to me once but I can't remember the answer 09:55
why can't I have "orange" and "grey" in ANSI terminal colours? BOO 10:01
timotimo you can 10:02
10:02 musiKk_ joined
timotimo some terminal emulators support full 24bit RGB 10:02
Konsole for example
and are you sure 256 colors aren't yet enough for you?
10:05 Ven left
masak Timbus: thanks 10:08
Timbus: that's consistent with what I see here: github.com/perl6/cpandatesters.per...ter/app.pl
RabidGravy timotimo, er, there are only 8 ANSI "color codes" 10:09
timotimo .tell FROGGS we should put our heads together and come up with a good solution for cpandatesters updates
yoleaux timotimo: I'll pass your message to FROGGS.
timotimo RabidGravy: well, if you're limiting yourself to what the 50 year old terminals supported, then yeah 10:10
otherwise you usually have a minimum of 88 colors, usually 256
10:12 vendethiel left 10:22 Ven joined, wamba joined 10:27 Ven left 10:34 Begi joined
Begi « C'est vraiment du bon boulot pour un boutonneux. :) » 10:37
10:37 Begi left 10:40 Begi joined 10:41 vendethiel joined
Woodi_ Happy Holidays :) 10:43
I just watched presentation of Red language and they have RedSystem which looks totally like NQP in asm :) 10:44
and it is quite fast: 4 x C speed for development version... 10:45
10:46 Begi1 joined 10:47 musiKk_ left 10:48 Begi left, Begi1 is now known as Begi 10:52 labster left 10:53 espadrine_ joined, espadrine_ is now known as espadrine, RabidGravy left
10:59 FROGGS joined 11:04 vendethiel left 11:05 musiKk_ joined
dalek Iish: a0e0e48 | (Salvador Ortiz)++ | .travis.yml:
travis-ci: fix a typo
11:11
tadzik masak: I don't mind being bothered, by I totally don't remember what most of the bailador things do :) 11:17
so I may not be very helpful
11:17 spider-mario joined
tadzik I'll also happily welcome suggestions or changes regarding both code or its documentation 11:17
since it's clearly quite lacking
masak: code clearly indicates that it should work, I wonder if it did at time of being commited 11:18
Begi tadzik : I will try to create the repository for the bailador-website in the day ( github.com/tadzik/Bailador/issues/45 ) 11:20
tadzik Begi: awesome! 11:22
it'll also be a bit of a stress test 11:23
or a regular test, which we clearly need too :)
11:27 perlawhirl joined
Begi tadzik (or someone else) : have you alreadt made benchmarks on Bailador ? 11:27
it'll be interesting
DrForr I need to poke at benchmarking, siege(1) revealed a problem somewhere. 11:29
masak Begi: is «boutonneux» something like a pimply teenager, or a millennial, or a script kiddie? :) 11:34
Begi masak : yes, that's it ! and sorry, wrong channel c: 11:36
masak .oO( knowing it write on the right channel is clearly a job for the pimply-faced ) :P
to*
tadzik: right now after using Bailador a bit, I feel like there's one or two issues I could submit 11:47
but I'm not sure I have the tuits -- have to context-switch away from Perl 6 for a bit :/
11:50 Ven joined 11:52 vendethiel joined 11:56 Ven left 12:01 kid51 joined
sortiz glad that DBIish's tests systematically run 10% faster on latest vs 2016.01 in travis-ci 12:10
masak \o/ 12:11
12:22 kid511 joined
tadzik Begi: I did, but that was ages ago :) 12:22
12:22 kid51 left
tadzik I think I can do some as a followup for my GPW talk, I already did some measurements but they were quite bad so I didn't include them in the talk :P 12:23
the overhead of calling Dancer from Perl 6 and back a couple of times was quite huge
pure-perl6 thing may be faster in some cases 12:24
Begi I think for now we have a lack of perfs 12:26
12:26 espadrine left 12:41 araujo__ joined 12:42 araujo_ left, araujo__ left 12:43 araujo__ joined 12:45 araujo__ left, araujo__ joined 12:46 ecocode` joined, Ven joined 12:47 bjz_ left, ecocode left 12:49 araujo__ left 12:50 bjz joined 12:51 Ven left, araujo__ joined
Begi tadzik : empty for now, WIP : github.com/Emeric54/bailador-website 12:53
12:56 RabidGravy joined 12:59 Ven joined 13:01 Ven left 13:07 Actualeyes joined 13:14 Praise left 13:19 araujo__ left 13:24 bjz_ joined, bjz left 13:27 tokomer joined 13:34 musiKk_ left 13:46 nadim left 13:48 nadim joined 13:56 Ven joined 14:09 bjz_ left, bjz joined
masak the stunning similarities between p5:p6 and ng1:ng2 continue: 14:12
"In many ways, Angular 2 isn’t really a new framework at all, just a new implementation of the same one we’ve come to know and love." -- blog.ionic.io/angular-is-a-design-pattern/
masak .oO( greetings from one Second System Syndrome to another ) 14:13
Juerd I see Perl 6 as a sequel to Perl 5. It doesn't replace the older one, and you can enjoy the new one even if you haven't seen the old one. But if you know both, you can definitely tell that it's the same story. 14:15
And many will say that the first was better, even if that's not true.
14:16 perlawhirl left
masak I don't spend all that much time with people who insist the first was better ;) 14:18
(though I do appreciate that they do exist here and there) 14:19
Ven many people will say the migration was poorly handled :P
masak migration? oh shucks, I knew we had forgotten something! 14:20
:P
14:21 ufobat joined
Juerd Ven: It's a subtle balance between proper migration and preventing spoilers. 14:21
ufobat hey perl6
Juerd Hey ufobat
masak ufobat! greetings!
m: say "Perl 6 says hi, too :)"
camelia rakudo-moar 47d21b: OUTPUT«Perl 6 says hi, too :)␤»
Ven Juerd: I'd argue "lol, it's now all deprecated, rewrite all your code because we're not gonna provide a migration path" is not anything near "subtle" 14:22
Woodi_ Juerd: nicely said :) But v5 vs v6 is so funny or facepalmy topic... Just imagine Mr. Wright was denied to work on Modula, Modula2 then Oberon... And Wiki says Modula-3 was influential in creating languages like Java and Python and C# ;) 14:23
masak what's all this obsession with rewriting code?
code that delivers value, that took person-years or person-decades to get into that shape...
Juerd Ven: Migrating from Perl 5 to Perl 6 is not much unlike migrating from Python to Ruby. 14:24
ufobat i've got a question (again) regarding the Test Module. if i do a use-ok("My::Grammar") it successes but then i need to load the module anyways.. *confused* otherwise i get a ok 1 - The module can be use-d ok Could not find symbol '&Grammar'
Juerd Ven: It's a different languge, even though many of the constructs are available in both, and your program will get slower.
Ven Juerd: i have no idea what you're answering here
masak ufobat: right.
Juerd Ven: The last thing you said.
masak ufobat: `use-ok` doesn't actually `use` the module into your current program.
ufobat what am i doing wrong? it used to be different in the perl5 require test
Ven Juerd: I still don't understand how it's related to my point
masak ufobat: I'm not sure it *can*. 14:25
(unless it's a macro or something)
ufobat but wouldn't use module break before use-ok() would fail or succeed?
Juerd Ven: Perl 6 does not deprecate Perl 5.
Ven Juerd: but angular 2 deprecates angular 1 14:26
and I still don't understand your point
Juerd Ven: I wasn't talking about Angular anymore.
ufobat i am just wondering how to write a proper test case
masak ufobat: it is a good question. I haven't thought of that.
Ven okay
masak ufobat: I'm not advocating anything, but the reason I don't run into this is that I don't use `use-ok` :) 14:27
ufobat: I think it's a bit silly. I just use the module, and if the test file fails (dies) because the module can't be used, I know something needs to be fixed.
14:27 espadrine joined
masak I think there might have been a use case for `use-ok` in p5, but I don't see one in p6, to be honest 14:27
someone might know of a use case, though. I don't. 14:28
Juerd I can see how someone can interpret that as advocating something ;)
Woodi_ ufobat: I think use-ok is in new scope, scope ends and use disappear. but if you got OK then you just use it again :)
ufobat i am not sure but that would mean that the "use my::Grammar" must not be done at compile time. I think thats when use is executed. 14:31
i think i could live with a dying testcase ;-)
14:51 bjz left 15:00 bjz joined
sortiz In fact 'use-ok' should be named 'need-ok', 'cus the module is loaded, but the 'import' part is done in another context. 15:03
RabidGravy I like to (possibly superstitiously) have a test file with just use-ok in it to catch any weird dependency issues
15:03 Begi left
RabidGravy and that it doesn't import the symbols helps that as it shows where a module may be using a symbol that it got by "accident" in another context 15:04
ufobat i just uploaded my first p6 module to github. I am pretty much a newbie so any comment on it would be appreciated. github.com/ufobat/p6-time-crontab 15:05
RabidGravy y'know that I had already implemented 90% of that in github.com/jonathanstowe/Chronic? ;-) 15:06
but the more the merrier 15:07
ufobat :D 15:08
FROGGS o/ 15:12
yoleaux 10:09Z <timotimo> FROGGS: we should put our heads together and come up with a good solution for cpandatesters updates
DrForr Damn. Now I have to write Acme::Bluntman.
FROGGS timotimo: aye
ufobat I wrote a piece of software that could parse crontab-like strings and check if it must be executed now or calculate when it actually needs to be executed. your code goes even further, you can really do stuff ;) that was never in my scope 15:13
RabidGravy yeah, I just added the 'cron-like' expressions to keep the unix-beards happy ;-) 15:14
ufobat this was in perl5 though. so i thought to myself this would be a good exercise 15:16
ha :D
15:28 bjz_ joined 15:29 bjz left, tmch joined 15:32 ChoHag left 15:33 ChoHag joined 15:42 wamba left
DrForr Hurr. Crust doesn't respond well to siege. The Crust side responds to the initial connection, nothing else. 15:43
dalek osystem: 38ea17b | jnthn++ | META.list:
Add Docker::File.
jnthn Finally got that one done :)
15:46 wamba joined 15:48 wamba1 joined, wamba left 15:49 tmch left, cdg joined 15:51 ZoffixWin joined
ZoffixWin What's the default precedence level in custom-defined operators? 15:53
jnthn ZoffixWin: Depends on the fixity 15:54
15:54 wamba1 left
ZoffixWin What is that? 15:54
15:54 zakharyas joined
ZoffixWin Ah, the prefix/infix/postfix 15:54
jnthn Right
ZoffixWin Thanks.
jnthn %additive for infix, %symbolic_unary for prefix, %autoincrement for postfix 15:55
15:55 khw joined
jnthn So same as infix:<+>, prefix:<+>, and postfix:<++> 15:55
ZoffixWin Thanks 15:56
jnthn
.oO( "If you're nonplussed about your precedence level, Perl 6 will be plussed for you..." :P )
ZoffixWin :D
15:57 pmurias joined
pmurias feels old using angular1 when it was still completely bug-ridden and now it's being deprecated 16:00
jnthn That's not age, that's just JavaScript's breakneck pace :P 16:04
jnthn got sucked into doing a little client-side JS recently, and ended up using React/Redux 16:06
Frontend dev is still not my cup of tea, but at least this lets me FP it :P 16:07
16:07 _nadim joined, nadim left
jnthn Then I thought "oh, maybe writing a little async backend code in node.js won't be so bad" and a few hours later I was like "aarrgh...where's my await?!" and was re-writing the thing in C# :P 16:08
16:08 Ven left
DrForr jnthn: 'neck' there is a bit redundant :) 16:12
RabidGravy I wrote a little AMQP <-> websockets <-> REST thing with node.js a year or so ago, I quite liked it 16:13
16:14 espadrine left
RabidGravy is there any prior art in the ecosystem for arbitrary sprintf like formats? I mean it's not particularly difficult but don't want to reinvent if not necessary 16:17
otherwise I go with "$str.subst(/'%'(<{%expressions.keys}>)/, -> $/ { %expressions{~$0}.() }, :g);" 16:19
jnthn To be fair, the fact the team I was working with had some C# experienced folks and little collective node.js experience was a much bigger factor than me missing my async creature comforts. :) 16:20
(So node.js had to wow me quite a bit for me to feel like suggesting we try it out for some service or other...) 16:21
RabidGravy: I don't recall seeing anything like that 16:22
16:22 _nadim left 16:23 _nadim joined
RabidGravy it's just for a simple dispatcher for Lumberjack before I think of a better one, so just date, pid, program etc 16:24
It's only kind to provide at least one stock dispatcher after all ;-)
16:29 domidumont joined, domidumont left 16:30 cdg left
masak RabidGravy: all I can say is, I've never used `use-ok`, not even in a separate file, and I don't feel that *not* getting the `use` error separately has in any way detracted from the testing experience. 16:31
16:31 vendethiel left
masak in fact, the usual reason I get `use` errors in the first place is because I forgot to `export PERL6LIB=lib` :) 16:31
and that's easily fixed, no matter whether I have a separate test file with `use-ok` or not 16:32
16:32 domidumont joined
RabidGravy masak, your tests, your choice ;-) I'm certainly not advocating that anyone other than myself should do it 16:33
masak yes, and your-tests-your-choice too, of course 16:34
but I can confirm your conjecture that such a test file does seem like superstition, at least from my point of view :)
jnthn: some future version of EcmaScript will get async and await. it's in the works. 16:35
jnthn: and due to the nature of compile-to-JS languages... there are ways to have it today. :)
16:36 vendethiel joined
RabidGravy I think, for me, it goes back to testing very large programs using moose where it was easy to miss circular dependencies at a distance (e.g. where A uses B uses C uses D uses A) and things would stop loading under sertain circumstances 16:37
moritz today I listedn to a podcast about transcrypt.org/
it's a python-to-js compiler 16:38
with the interesting concept that you can use pragmas to specify how pythonic you want it it to be
16:38 wamba joined
moritz so for example bool([]) in python is False, and in JS, it's true 16:39
and to save the overhead of wrapping every boolean conversion, the default is JS semantics, but you can switch to python semantics if you really want to 16:40
masak RabidGravy: I was going to say that "we don't allow that kind of circular dependencies to happen in Perl 6"
16:40 dvinciguerra joined
masak RabidGravy: ...but then I tried it, and it puts Rakudo in an infinite loop :( 16:40
just A.pm containing `use B;` and vice versa triggers it
is that by spec?
does the spec have an opinion?
masak submits rakudobug 16:41
if nothing else, it's a crappy default
moritz masak: there's a rakudobug open already
masak oh, ok
masak stands down
if I find it, I can add this discussion
ah, rt.perl.org/Ticket/Display.html?id=126688 16:42
also rt.perl.org/Ticket/Display.html?id=127487
that latter one is probably a dupe of the former
anyone mind if I merge them?
RabidGravy I was going to suggest that 16:43
16:44 musiKk_ joined
masak done. 16:44
pmurias moritz: if the default is not fully pythonic can it handle existing libraries?
moritz: or is it an almost python sort of thing? 16:45
16:47 dvinciguerra left
moritz pmurias: an almost python 16:49
16:50 Success joined, Success left
ZoffixWin There's no way to redefine already-existing operators, like change + to do - instead? 16:50
masak ZoffixWin: of course you can. 16:51
moritz within a lexical scope, you can shadow an operation
masak m: sub infix:<+>($l, $r) { $l - $r }; say 5 + 2
camelia rakudo-moar d0c675: OUTPUT«3␤»
moritz m: { sub infix:<+>($, $) { 42 }; say 1 + 2; }; say 1 + 2 16:52
camelia rakudo-moar d0c675: OUTPUT«42␤3␤»
ZoffixWin :o
I recall this wasn't working several months go. Awesome!
masak it's been working for a good while
definitely more than months
pmurias moritz: Implementing an almost version of a language allows you achieve a lot of things much more easily
moritz probably for several years
pmurias: I know
ZoffixWin Hm. I remember getting "ambiguity" error. Maybe I was doing something wrong.
Ahhh 16:53
m: multi infix:<+> (Int $x, Int $y ) { $x - $y }; say 2 + 5;
camelia rakudo-moar d0c675: OUTPUT«Ambiguous call to 'infix:<+>'; these signatures all match:␤:(Int:D \a, Int:D \b --> Int:D)␤:(Int $x, Int $y)␤ in block <unit> at /tmp/JRQHy4hf0F line 1␤␤»
moritz pmurias: which is why I find the concept interesting to use pragmas to control how almost it is
masak heads up, though. because operators are functions and functions can be invoked-before-declaration, an operator can change semantics before its overriding declaration
m: { say 1 + 2; sub infix:<+>($, $) { 42 } }; say 1 + 2
camelia rakudo-moar d0c675: OUTPUT«42␤3␤»
masak that's a bit unexpected (though consistent)
caught me off guard when I was implementing 007 :)
moritz ZoffixWin: with multi you're adding a multi candidate to an existing multi
ZoffixWin moritz, thanks. I see why I was having trouble before. 16:54
moritz ZoffixWin: if you leave out the multi, you are shadowing it instead
16:54 bjz_ left
masak what moritz said. `multi` keeps building on top of the built-in (with the possibility of multi conflicts) 16:54
pmurias moritz: for rakudo-js by plan to allow cheating for performance is to add a 'js' native type
timotimo the thing is when you redeclare an operator lexically, language features that do stuff for you will not pick up the extra stuff 16:55
masak whereas `sub` basically installs a new thing in your scope, saying "this is how it is now"
timotimo: thankfully.
timotimo well, we're still hoping to be able to make something work in that respect to let a user's operators be used by things
16:56 bjz joined
masak I'm pretty impressed this works lexically :) 16:56
m: { sub infix:<o>($l, $r) { $l + $r }; say [o] 1, 2, 3, 4 }; say (&sin o &abs)(-2)
camelia rakudo-moar d0c675: OUTPUT«10␤0.909297426825682␤»
masak m: { sub infix:<o>($l, $r) { $l + $r }; say [o] 1, 2, 3, 4 }; say ([o] &sin, &abs)(-2)
camelia rakudo-moar d0c675: OUTPUT«10␤0.909297426825682␤»
16:59 vendethiel left
MadcapJake is there a module generator script? Like interactive script for generating folders, META6.json, .gitignore, etc. 17:06
RabidGravy I think sergot made one 17:07
timotimo mi6 isn't interactive, right? 17:08
17:10 skids joined
MadcapJake I see sergot has bamboo (which is neat but I thought dependencies couldn't be installed locally to a project?) but it's more about dependencies than scaffolding a module 17:10
mi6 looks closer still but is more for after you've finished and want to write a readme 17:11
timotimo mhh
i thought mi6 was a full lifecycle management for module authors
there's Module::Starter, isn't there?
MadcapJake timotimo: Module::Minter this looks to be what I'm looking for thanks! 17:12
(not interactive though)
timotimo ah, ok
MadcapJake Module::Minter says module names must be alphanumeric, is that true? 17:13
RabidGravy I just use a bunch of individual scripts to generate stub module, stub tests, stub meta
timotimo no, that's not true
RabidGravy they have to be valid perl identifiers 17:14
timotimo oh, sorry, my head was at "alphanumeric == a-zA-Z0-9"
but we support the "letter" stuff from unicode
17:14 Success joined
MadcapJake but can't a module also be named 💩? 17:15
I thought that was the whole point of the CUR effort
timotimo .u
yoleaux Search for a Unicode character by codepoint, name, or raw character
timotimo i don't see anything there
oh, it's the pile of poo 17:16
MadcapJake weird, my irc client turns unicode into colored emoji, but I thought it'd at least send the unicode version :(
17:16 dvinciguerra joined
Success MadcapJake, what client do you have? 17:16
MadcapJake IRCCloud, it's an IRC-based response to Slack :) 17:17
RabidGravy yeah, I can't seem to create a class called <pile-of-poo-character> but that might be something else
ugexe module minter doesnt even mint modules, it mints distributions 17:18
being interactive might end up cumbersome to the user... "Ok what do you want to name your distribution? do you want a module named that too? ok is it a module, package, or class? " etc (related to the number of ways to do anything) 17:19
MadcapJake On Gnome, I created an epiphany web app for IRCCloud and changed the theme to dark (in client and via GTK_THEME) and it looks like a regular application xD
timotimo i think we can only have operators and terms made out of emoji
MadcapJake ugexe: it says that in the description but then read the rest of the readme and it's just creating modules
timotimo which is sad, because some other languages (swift or something?) allow emoji as variable names
MadcapJake but wasn't CUR about allowing modules be unicode? So that other language users could just naturally write modules like the rest of us 17:20
ugexe plus you can have multiple namespaces in a single file
MadcapJake language as in Japanese, Chinese, Korean, etc. 17:21
17:21 musiKk_ left
timotimo yeah, you can try CKJ characters. they differ very strongly from emoji, though 17:22
MadcapJake ugexe: well they are both unicode, how could you have one without the other?
timotimo just "you can use unicode as module names" doesn't make much sense, since \a, the backspace character, newline, space, page-feed, ... those are all also unicode
MadcapJake meant to mention timotimo :P
timotimo: not control characters obviously 17:23
timotimo also not emoji.
MadcapJake why? :P
I specifically remember a pile of poo mentioned in regards to CUR and the mangled file/folder names
RabidGravy and any character that might be reserved for something else ... and ...
timotimo well, we're currently not allowing emoji.
i'm having difficulty finding out the category emoji are put into 17:24
we probably want to explicitly allow emoji in addition to regular letters
RabidGravy the first time I see an "emoji" variable name I am going to burn my computer
MadcapJake RabidGravy: xD
I will dance with glee
ugexe half of my throw away variables are named $shit and $shittttt anyway 17:25
masak ugexe: I don't remember when I stopped doing that
I don't mean bad words as variable names. I mean not taking the opportunity to properly name a variable 17:26
wow, that sounds like elitism. :)
but somewhere along the road I stopped viewing it as a chore, and started seeing it as an opportunity
it's a slot where you put something to make your program clearer and more intentful 17:27
timotimo m: say uniprop("a")
camelia rakudo-moar d0c675: OUTPUT«Ll␤»
timotimo ^- could you please put an emoji in there?
m: say uniprop("☺")
camelia rakudo-moar d0c675: OUTPUT«So␤»
timotimo is that "an emoji"?
m: say uniprop("☺", "Emoji")
camelia rakudo-moar d0c675: OUTPUT«0␤»
ugexe its its not throw away code then sure. if its throw away code its a bunch of $shitt and $fuckmes
17:27 zakharyas left
timotimo m: say uniprop("☺", "Emoji_Presentation") 17:27
camelia rakudo-moar d0c675: OUTPUT«0␤»
masak ugexe: are you by any chance Russian? 17:28
timotimo The following four binary character properties are available for emoji characters. These are not formally part of the Unicode Character Database (UCD) as of Unicode 8.0, but share the same namespace and structure.
^- that'd answer why we wouldn't have "Emoji" in there. but do we perhaps want that?
17:28 domidumont left
ugexe masak: nah, american 17:29
17:29 vendethiel joined
MadcapJake timotimo: nice, glad to see there's uniformity in Unicode ;) 17:29
timotimo LOL as if. 17:30
MadcapJake total sarcasm there
timotimo twitter.com/FakeUnicode :)
masak ugexe: I confess to being a lot less careful when it's just private code. but only to the point of, let's say, one-letter names, not to the point of random unrelated words :)
timotimo Let's have an egg hunt for next year. Tweet U+1F95A 'EGG' (Unicode 9.0) and then try to find them all in a year, when they are supported. 🥚 17:31
MadcapJake lol 17:32
timotimo ^- from that twitter account
MadcapJake ok so maybe I need to write an interactive module scaffolder (ADHD to the rescue!) 17:33
17:34 abaugher left
tadzik I wouldn't mind an existence of Sane Unicode subset, which only includes actual letters 17:34
17:35 abaugher joined
MadcapJake just something simple: create t folder with some test files (one file for each provides entry with some basic test file stuff in there), create lib folders and one file for each provides entry, the META6.json with details pulled from prompts, a basic gitignore, and anything else? 17:35
tadzik hm, I have my github.com/tadzik/Module-Starter 17:38
doesn't quite conform to what the module ecosystem is today though :)
MadcapJake nice! I looked on modules.perl6.org and that wasn't on there 17:39
tadzik yeah, I was surprised too :P It has a META.info, must've gotten removed
feel free to hijack that namespace :)
MadcapJake I could submit some PRs to your Module::Starter 17:41
RabidGravy MadcapJake, somewhere down the back of the sofa I have something that takes a UML/XMI file and turns it into a complete bunch of class files, stub tests and everything
MadcapJake nice! 17:42
RabidGravy I ought to make it fit for public consumption at some point
MadcapJake yeah that'd be sweet 17:43
RabidGravy do people even use UML tools like umbrello any more
MadcapJake I've only ever used things like Dia to make UML-like stuff
RabidGravy I know it's not in keeping with the hipster new order zeitgeist but hey
17:44 tokomer left
MadcapJake RabidGravy: flow-based programming is still just over the horizon noflojs.org/ 17:44
tadzik: would you prefer PRs or just starting from a fork? (wrt Module::Starter) 17:46
RabidGravy It feels like I've been making software so long that I have seen so many "programming paradigms that are going to save us all" that I've lost count
17:46 Actualeyes left
Woodi_ jnthn: about JS -> C# switch: how throw-away-prototyping functionalities influenced/improved later C# implementation ? I specially wonder how good such "prototype" can be for replacing design papers :) 17:46
Woodi_ Woodi
17:47 Woodi_ is now known as Woodi
Woodi better... ;) 17:47
MadcapJake RabidGravy: yeah I've always been interested in FBP but it's never felt like it's really become viable (there was a cool FBP video on HackerNews last week or so)
17:49 Success left 17:50 Success joined, vendethiel left 17:56 cdg joined
timotimo www.unicode.org/Public/emoji/2.0//emoji-data.txt - i don't understand why it seems to be separate from the regular unicode stuff 17:59
18:01 flaviusb joined
timotimo but we may want to include this in our own unicode db for moarvm somehow 18:01
18:03 cdg left
RabidGravy does his weekly "reassure a DJ that his show is streaming fine however it might sound where they are" 18:05
18:06 dvinciguerra left
pmurias MadcapJake: using a touch based interface to create programs doesn't seem very fun :/ 18:06
RabidGravy stream.futuremusic.fm:8000/mp3 if anyone is curious 18:07
timotimo m: say "👧".graphs; say "👦🏻".graphs 18:08
camelia rakudo-moar d0c675: OUTPUT«Method 'graphs' not found for invocant of class 'Str'␤ in block <unit> at /tmp/jFfAe6hM3_ line 1␤␤»
timotimo er
18:08 kurahaupo joined
timotimo m: say "👧".chars; say "👦🏻".chars 18:09
camelia rakudo-moar d0c675: OUTPUT«1␤2␤»
timotimo ^- unicode bug; we shouldn't claim unicode 8 support until those both give 1.
MadcapJake RabidGravy: sounds good on my end! 18:13
pmurias: yeah I wish it would be, but it just never is :P
RabidGravy noxgenus, mad dutch crew :)
18:13 ufobat left 18:17 atweiden joined
MadcapJake m: 1.1e-10.base(10).say # wish this would go to the closest non-zero digit rather than just 8 for Nums 18:17
camelia rakudo-moar d0c675: OUTPUT«0.00000000␤»
MadcapJake is there another way to do that? 18:18
timotimo m: 1.1e-10.fmt("%d").say
camelia rakudo-moar d0c675: OUTPUT«0␤»
timotimo m: 1.1e-10.fmt("%f").say
camelia rakudo-moar d0c675: OUTPUT«0.000000␤»
timotimo that gives even fewer digits
m: 1.1e-10.fmt("%99f").say
camelia rakudo-moar d0c675: OUTPUT« 0.000000␤»
timotimo m)
wtf even
MadcapJake lol 18:19
18:19 domidumont joined
MadcapJake timotimo: perhaps 99 is being interpreted as LHS precision 18:21
timotimo m: 1.1e-10.fmt("%10f").say
camelia rakudo-moar d0c675: OUTPUT« 0.000000␤»
timotimo m: 1.1e-10.fmt("%4f").say
camelia rakudo-moar d0c675: OUTPUT«0.000000␤»
timotimo fffffffuuuuuuuuuuuuuuuuuuu~
MadcapJake m: 1.1e10.fmt("%4f").say 18:22
camelia rakudo-moar d0c675: OUTPUT«11000000000.000000␤»
RabidGravy m: 1.1e-10.fmt("%10.10f").say
camelia rakudo-moar d0c675: OUTPUT«0.0000000001␤»
MadcapJake boom
m: 1.1e-10.fmt("%.10f").say 18:23
camelia rakudo-moar d0c675: OUTPUT«0.0000000001␤»
timotimo ah
that's a bit better
MadcapJake still wish there was a "chop to nearest non-zero" rather than this arbitrary precision in both fmt and base
18:23 domidumont left
jnthn Woodi: Unless there was a particular library I was wanting to use that was going to make things crazy easy, I'd probably not turn to C# for quick prototyping very often...especially not when it's stuff that isn't really needing libraries and I've got Perl 6 to hand. ;) C# *has* got a lot better over the years though...it's a much better language today than I ever imagined it becoming when I first saw 1.0. :) 18:24
18:24 domidumont joined
jnthn timotimo: On emoji things - they have at least folded the emoji grapheme boundary related things into the grapheme boundary annex in Unicode 9. 18:25
timotimo oh? i thought it was already in unicode 8
MadcapJake How would you find the nearest non-zero? Iteratively fmt, testing the last char? (only non-iterative approach I can think of is rounding to a specific digit and then fmt/base to that same digit but that means loss of data)
timotimo so we will get that, that's good
jnthn timotimo: No
Which is why we got RTs about NFG + emoji interaction 18:26
timotimo oh, ok
we could make a Unicode 8-errata1 supported moar :P
jnthn I'd rather wait it out until Unicode 9 lands to do anything abou tit.
timotimo that's fine with me 18:27
jnthn Otherwise we risk missing a detail or something.
Whereas if it's in annex 29 then it should be fairly easy to transliterate the chances into our code :)
*changes
MadcapJake can you pull the exponent out of a Num? 18:28
timotimo that's fair
18:28 dvinciguerra joined, Success left
timotimo MadcapJake: you can nativecast a Pointer to num to a Pointer to int and grab the lower n bits 18:28
jnthn It's possible that there's other places they've folded emoji stuff into the Unicode standard in 9.0. tbh, I mostly skimmed it from a "what's going to make work for me" point of view. ;)
18:28 Success joined 18:29 Success left, Success joined, infina joined
MadcapJake timotimo: but is there a way to do « 1.1e-10.exp == -10 » 18:29
timotimo i just told you! :P 18:30
well, what you really want is logarithms
18:33 Success left 18:34 Success joined
MadcapJake timotimo: What I am trying to get is the value of e in a Num, I think you need that number to even do the logarithms 18:34
timotimo um, wat? :)
m: say log(1.1e-10)
camelia rakudo-moar d0c675: OUTPUT«-22.9305407501361␤»
timotimo ah, that's not the 1og10
m: say log10(1.1e-10)
camelia rakudo-moar d0c675: OUTPUT«-9.95860731484177␤»
timotimo m: say log10(1.0e-10)
camelia rakudo-moar d0c675: OUTPUT«-10␤»
timotimo m: say log10(1.0e99) 18:35
camelia rakudo-moar d0c675: OUTPUT«99␤»
timotimo you just have to round it properly
MadcapJake I don't want to round it though, I want to maintain accuracy
I could just round it to gather the e though 18:36
m: 1.1e-10.perl.split('e')[1].say # or this works :P
camelia rakudo-moar d0c675: OUTPUT«-10␤»
timotimo well, you did say you want the value after the e
the value after the e is always rounded with that representation of the num
so ... i really don't get wtf it is you want? :)
MadcapJake i want to be able to convert Nums to JSON-writable numbers without losing any precision 18:37
moritz m: say log(1.1e-10, 10)
camelia rakudo-moar d0c675: OUTPUT«-9.95860731484177␤»
timotimo i'm not sure how exactly json requires nums to be
MadcapJake +/-d+.d+ 18:38
moritz iirc JSON::Tiny simply replaces e with d
timotimo ah, so just not scientific notation
MadcapJake wait just looked at the spec and it does support scientific notation
xD
written the same as Perl 6 actually 18:39
www.json.org/number.gif 18:40
json.org's graphs
18:41 Praise joined, Praise left, Praise joined, Sgeo joined 18:42 Sgeo__ left
timotimo sqlite also has those <3 18:42
pmurias having a tool to build such graphs for Perl 6 grammars would be cool
tadzik MadcapJake: whatever you prefer, you be the boss of that :) 18:43
18:45 Fatalnix_ joined
Fatalnix_ Is it possible to write annotations for Perl6 on the JVM? 18:45
yet*
18:49 labster joined
MadcapJake pmurias: that'd be really slick 18:49
18:53 tmch joined 18:55 Success left
timotimo buh. something's wrong with the internet connection here :( 18:55
19:03 kurahaupo left
Fatalnix_ timotimo: fn gettin ddos'd btw 19:04
a bunch of servers were unresponsive half an hour ago at least
and then there was massive lag from every server I could connect from 19:05
so may not be you :)
19:07 yqt joined
timotimo fn? 19:08
Fatalnix_ freenode
timotimo oh
but irc was the most responsive part i could find :P
Fatalnix_ LOL
timotimo just web stuff didn't work
Fatalnix_ I see now
pmurias MadcapJake: there seem to be quite a few open source visualizers for regular regexes ;) 19:09
MadcapJake pmurias: how hard would it be to handle all the various P6 re stuff? xD 19:10
pmurias assuming we reused the existing Perl 6 grammar to parse not that hard to get a LTA version with basic stuff 19:14
jnthn Given it all reduces to few enough node types you can count them on your fingers, perhaps not too hard...
pmurias should likely get some sleep and focus on getting nqp-js-on-js to pass the last remaining t/nqp/ test rather then invent exiting side-projects ;) 19:17
MadcapJake lol 19:24
19:35 tmch left 19:39 petercommand left 19:47 domidumont left 19:54 musiKk_ joined 19:59 tmch joined 20:03 dvinciguerra left 20:11 darutoko left 20:17 Coleoid joined 20:40 pmurias left 20:46 zakharyas joined 20:53 Begi joined 21:01 firstdayonthejob left 21:02 verzit joined
Coleoid Hi, #perl6! 21:02
21:02 firstdayonthejob joined
Begi Hi, Coleoid ! :) 21:03
Coleoid I'm having trouble trying to get a grammar to end its statement when it sees a newline.
masak m: say "Hi, Coleoid! :)"
camelia rakudo-moar d0c675: OUTPUT«Hi, Coleoid! :)␤»
masak Coleoid: do you have a really small example of what's troubling you? 21:04
Coleoid nopaste.me/view/447d17f6
masak ugh... not really small ;)
(we tend to ask people to minimize for us, 'cus it benefits both us and them)
Coleoid No, true. I can golf it for a bit and come back for round two. 21:05
masak that would be most kind. 21:06
thank you, and see you again soon :>
21:06 chris2 left
masak (if anyone wants to tackle the bigger example, that's fine too) 21:06
FROGGS m: gist.github.com/FROGGS/acffbcdec3956092e1db 21:08
camelia rakudo-moar d0c675: OUTPUT«===SORRY!===␤Could not find Grammar::Tracer in:␤ /home/camelia/.perl6␤ /home/camelia/rakudo-m-inst-1/share/perl6/site␤ /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤ /home/camelia/rakudo-m-inst-1/share/perl6␤ CompUnit::Reposit…»
FROGGS m: gist.github.com/FROGGS/acffbcdec3956092e1db
camelia rakudo-moar d0c675: OUTPUT«True␤「scenario: "Eat the ripe apples"␤spawn 7 ripe apples␤spawn 3 unripe apples␤pick apples // should only pick ripe␤? verify 7 in basket␤eat 2␤? verify they were tasty␤? verify 5 in basket」␤ Scenario => 「scenario: "Eat the ripe ap…»
FROGGS Coleoid: looks like it parses, no? 21:09
Coleoid Yes. It parses the two 'spawn' lines as a single statement, though. 21:10
21:10 dvinciguerra joined
FROGGS Coleoid: what if you try that: token Step { '?'? <.ws> <Symbol>+ % \h } 21:18
21:21 chris2 joined
Coleoid Trying that. 21:26
21:26 musiKk_ left
Coleoid FROGGS: Works! Many thanks! I just need to understand the % now... the \h is "horizontal whitespace", right? 21:29
FROGGS Coleoid: aye 21:33
% is, like the character shows "a thing separated by another thing" 21:34
so it follows a * or a +
21:38 Begi1 joined
Hotkeys 'for example a+ % ',' will match a or a,a or a,a,a or so on, but it will not match a, or a,a,. To match those as well, you may use %% instead of %.' 21:38
21:38 TEttinger joined 21:40 Begi left, Begi1 is now known as Begi 21:41 cpage joined
masak note that this makes % and %% quantifier *modifiers* 21:41
not altogether different from metaops
they were quite late additions to the regex syntax. for a long while, we liked to overload infix:<**> with both numeric repetition and repetition-by-separator (what's now *%) 21:42
m: say "1,2,3" ~~ /\d ** 3 % ","/ 21:43
camelia rakudo-moar d0c675: OUTPUT«「1,2,3」␤»
masak I guess we couldn't do that (easily) before the separation :) 21:44
21:44 kaare_ left
RabidGravy ZoffixWin, if you're about I just sent a tiny PR for IO::Middleman :) 21:46
21:46 petercommand joined
teatime I found those the other day. 21:46
made me think the answer to my Q the other day was probably: token TOP { <LINE> %% \v }
jnthn My weekly "what I got up to in Perl 6 this week" post: 6guts.wordpress.com/2016/03/27/happy-heapster/ 21:48
Fun one this time :) 21:49
Packed arrays, parallel processing, leak hunting, and a little complexity theory for good measure :P 21:50
masak teatime: that looks incomplete
sjn yay!
masak teatime: did you mean `<LINE>+ %% \v` (or `<LINE>+ %% \v`)?
jnthn++ # just on general principle; haven't read the post yet 21:51
actually, jnthn++ # for the bad pun in the URL :P
jnthn Couldn't resist :P
teatime masak: yes. but both of your suggestions are the same? 21:52
masak oops 21:53
second one was meant to have a *
21:53 zakharyas left
masak difference is whether you accept the empty string or not 21:53
just as usual with + and *
teatime will { <LINE>* %% \v } match forever 21:54
masak no
this is what I meant by % being a quantifier *modifier*
you still need the quantifier itself
that's the biggest difference between the old infix:<**> and the new postfix:<%>
diakopter heapster groan 21:55
masak puns are the lowest common demoninator, the level at which we all connect 21:56
diakopter I bought some heapster shoes last week
teatime I love this channel. you guys are so friendly and accessible.
masak diakopter: then you too can walk the heap :P
teatime: <3
teatime: tell your friends! :D 21:57
jnthn++ # pressing 'y' on those Github links 21:58
jnthn: s/horrid slow/horridly slow/ ? 22:01
diakopter /hella slow/
it's the heapster way of speaking
masak jnthn: just so you know, that was one of the best posts in quite a while
I'm really eager to go look at the heap snapshot analyzer now 22:02
diakopter masak: you're a shared table
jnthn masak: "horrid slow" was a deliberate common-ism or whatever :) 22:03
22:03 labster left
masak .oO( I was being ungrammatical on purpose! ) 22:03
jnthn :D
masak ok, fine!
the Brit wins this time 22:04
jnthn :P
masak I wonder if "horrid slow" is an example of a well-recorded type of slang
kind of like "hella slow"
jnthn And "the roads are wicked slippy" 22:05
masak right
jnthn Though sadly it appears winter is over, so I have to wait another 8+ months for that again :P
masak languagelog.ldc.upenn.edu/nll/?p=10848 :) 22:06
RabidGravy hahahaha, reuuid.org/
jnthn haha
masak RabidGravy: it's about time people came together and provided such a useful service 22:07
RabidGravy :)
22:08 labster joined
diakopter I just donated some 000000 ones 22:08
hopefully someone will be pleased with them
my hands are great RNGs
masak RabidGravy: our hearts and prayers go out to the person on StackOverflow who tried to iterate through all GUIDs 22:09
RabidGravy :-0
diakopter masak: well, sometimes you need to check them all 22:11
masak oh, found it: stackoverflow.com/questions/1705008...not-unique 22:13
diakopter yeah, proofs without evidence of computational requirements aren't too useful 22:14
masak "you must pay me $0.0001 per hour per CPU core you run it on" :D
22:14 perlawhirl joined
perlawhirl hi perlers 22:16
masak hi perlawhirl
perlawhirl i asked yesterday but got no solution, so perhaps this is a bug...
m: class Foo { method bar {%_<baz>??2!!1}; method qux {self.bar} };my $foo=Foo.new; say [$foo.bar(:baz),$foo.qux(:baz)];
camelia rakudo-moar d0c675: OUTPUT«[2 1]␤»
perlawhirl why is the lexical %_ not seen by bar when coming via qux? 22:17
masak m: say sprintf "Take %s for a %s", |<perl whirl>.roll(2) for ^3
camelia rakudo-moar d0c675: OUTPUT«Take whirl for a perl␤Take whirl for a whirl␤Take perl for a whirl␤»
masak :)
perlawhirl: ...because you're not passing it on...? 22:18
jnthn Would have to be self.bar(|%_) or so
masak m: class Foo { method bar {%_<baz>??2!!1}; method qux {self.bar(|%_)} };my $foo=Foo.new; say [$foo.bar(:baz),$foo.qux(:baz)]
camelia rakudo-moar d0c675: OUTPUT«[2 2]␤»
masak there ya go 22:19
perlawhirl thanks jnthn. i knew you would have the answer :D
jnthn masak++ did also :)
perlawhirl yes
masak++ jnthn++ 22:20
but the only way i'd figured out was passing manually, ie %_<baz>??self.bar(:baz)!!self.bar 22:21
masak m: say sprintf "%sa%s++", |<perl whirl>.roll(2) for ^3
camelia rakudo-moar d0c675: OUTPUT«perlaperl++␤whirlawhirl++␤whirlawhirl++␤»
perlawhirl so when he said 'passing it on'... i knew there had to be a better way than what i was doing
masak it still bothers me sometimes that we didn't end up with the same symbol for slurping as for flattening 22:23
jnthn masak: We kinda did if you want the whole capture :)
masak people insist that there was a good reason for that... but languages like Python and JavaScript somehow managed to use the same symbol
jnthn sub foo(|c) { bar(|c) } 22:24
22:24 er2 joined
diakopter jnthn: surely all the integers are indexes/labels for objects while compiling? 22:25
masak jnthn: yeah, but...
jnthn diakopter: No, I suspect they're NFAs 22:26
diakopter oh
perlawhirl if i augment Any, is there a way to re-compose all the child classes? (without manually calling (Str,Int,List,etc...).map(*.^compose)
jnthn perlawhirl: No...though we do plan to fix that issue. :)
masak: Also, *@foo vs **@foo :) 22:27
masak jnthn: meh. is that even implemented yet?
TEttinger DID SOMEBODY SAY NFA??? I've been reading regex engine papers and my brain is about to explode 22:28
masak TEttinger: welcome to #perl6, where brains are constantly exploding
diakopter explode in this direction
sjn goes looking for the brainwashing equipment again 22:29
TEttinger I'm trying to get a DFA engine (that somebody else wrote, it hasn't updated in 5 years so I can assume it won't break tomorrow unless I break it) to support capturing groups
FROGGS jnthn++
perlawhirl jnthn: thought so, though it's been unfixed for quite a while. maybe add a special variable that lists all the classes, as a stop-gap :D
masak .oO( www.youtube.com/watch?v=E1jf2hOkec4 ) 22:31
22:32 firstdayonthejob left
RabidGravy there, coloured logging messages 22:32
of course the first bug report will be to "correct" my spelling of colour 22:34
22:38 BenGoldberg joined, rindolf left
RabidGravy right, duncodin for the day 22:45
toodles
22:48 Ben_Goldberg joined
er2 I'm trying to get the AST of some perl6 code using THE grammar github.com/rakudo/rakudo/blob/nom/...rammar.nqp but I'm having trouble with `use`ing the grammar. Here's what I have gist.github.com/er2/34cb1d4a7c342dcd59f5 22:48
22:48 Begi left 22:49 Begi joined
er2 I'm not sure if my perl 6 install is messed up because panda didn't get installed when I compiled from source 22:49
22:49 BenGoldberg left 22:50 Begi left, RabidGravy left, perlawhirl left
Hotkeys er2: you mean when you compiled panda from source? 22:52
22:52 perlawhirl joined
er2 yes, after installing perl 6 per rakudo.org/how-to-get-rakudo/ 22:53
well I pulled panda from the git repo and ran bootstrap.pl. Not sure if that technically compiles it, but that's how I installed it. 22:56
22:57 wamba left
er2 I should say I did the "manual installation" to get rakudo 22:57
masak er2: this might help: github.com/masak/007/blob/6baecb3f...ishblock.t 23:00
er2: I think the simple reason `use Perl6::Grammar;` doesn't work is that the environment the compiler is running in is not the same as the envornment your program is running in
er2: but the code I linked to actually works, and actually gets the AST 23:01
er2 masak: thank you, I'll play around with that 23:03
masak er2: might also be good to know that we're aiming for something slightly less messy in the long run (which is why things are still in a branch) 23:04
timotimo jnthn: in your blerg perst, what is "static_framesdata"? :) 23:05
masak if you want to dream along with us, please enjoy gist.github.com/masak/3a018a8eeef9acbf397f and then gist.github.com/masak/ba06dbb58fc01228ef5e
23:11 jack_rabbit joined
er2 masak: where is qast-of coming from? I can't find it in the 007 repo. 23:16
23:20 vendethiel joined
masak er2: that's part of the dreaming, as in not-yet-reality 23:21
23:24 jack_rabbit left, BenGoldberg_ joined 23:25 Ben_Goldberg left
BenGoldberg_ m: my $x; $x ??= 1 :: 2; say $x; 23:25
camelia rakudo-moar d0c675: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ap_2moqHnK␤Preceding context expects a term, but found infix = instead␤at /tmp/ap_2moqHnK:1␤------> 3my $x; $x ??=7⏏5 1 :: 2; say $x;␤»
er2 is there a way to get the qast from `perl6 --target=ast ...` before it gets printed out, or to parse the output from that
23:26 FROGGS left
masak BenGoldberg_: you meant ??= !! 23:29
BenGoldberg_: (but ?? !! still doesn't ??= !!, sorry)
er2: I thought that's what I gave you 23:30
er2: check out $node.dump
BenGoldberg_ m: my $x; $x ??= 1 !! 2; say $x;
camelia rakudo-moar d0c675: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rmemVA6L27␤Preceding context expects a term, but found infix = instead␤at /tmp/rmemVA6L27:1␤------> 3my $x; $x ??=7⏏5 1 !! 2; say $x;␤»
teatime BenGoldberg_: what is that supposed to do? 23:32
BenGoldberg_ m: my $x; $x = $x ?? 1 !! 2; say $x;
camelia rakudo-moar d0c675: OUTPUT«2␤»
BenGoldberg_ ^ that, but conceivable more optimized. 23:33
masak 'night, #perl6 23:37
jdv79 nite
23:40 ecocode` left 23:42 yqt left
er2 masak: bingo! that's working splendidly. Thanks again 23:43
23:44 vendethiel left