Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-11-07

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:07 rangerprice joined #perl6
00:09 rangerprice Hi
00:09 rangerprice i need some help
00:12 rangerprice i'm on a forum, and the subject is general discussion. Someone tell me "What i should learn Perl instead of Python ?" and wants concrete a answer.
00:13 rangerprice and wants a concrete answer*
00:13 * psch doesn't know an answer to that question
00:13 konobi there's nothing concrete
00:14 konobi _but_ i would say that perl tooling for authors is much better in my experience
00:14 konobi in terms of deployment too
00:15 raoulvdberge and perl is more fun! altough that is subjective
00:17 konobi things like overuse of things like decorators in python are also a turn off
00:24 * psch .oO( maybe the best reason is that pythonistas want to convince you their language is better... )
00:35 BenGoldberg joined #perl6
00:36 Juerd joined #perl6
00:37 vendethiel joined #perl6
00:40 aborazmeh joined #perl6
00:40 aborazmeh joined #perl6
00:40 adu joined #perl6
00:43 vendethiel o/
00:44 Juerd joined #perl6
00:45 tokuhiro_ joined #perl6
00:45 dalek nqp: 19a7c2e | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/tools/EvalServer.java:
00:45 dalek nqp: Print the StackTrace to the client.
00:45 dalek nqp:
00:45 dalek nqp: Other solutions like e.g. printing only the classname to the client or somesuch
00:45 dalek nqp: end up printing out of order and even duplicate information when running
00:45 dalek nqp: spectest, so this seems least weird.
00:45 dalek nqp: review: https://github.com/perl6/nqp/commit/19a7c2e0df
00:46 psch now when does camelia rebuild..?
00:48 dalek rakudo/nom: ff9e6de | peschwa++ | src/ (4 files):
00:48 dalek rakudo/nom: Teach JVM about the BOOTSTRAP Binder.
00:48 dalek rakudo/nom:
00:48 dalek rakudo/nom: Also use it for its trial_bind implementation and remove
00:48 dalek rakudo/nom: org.perl6.rakudo.Binder.trialBind.
00:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ff9e6def5a
00:51 sprocket joined #perl6
00:55 BenGoldberg joined #perl6
00:57 robinsmidsrod joined #perl6
01:07 Ven joined #perl6
01:10 Juerd joined #perl6
01:19 bpmedley joined #perl6
01:19 Ben_Goldberg joined #perl6
01:24 Ven joined #perl6
01:27 colomon I have a moar process running using up 9.43 GB of memory.  I don’t think it’s attached to any terminal window?
01:28 colomon 99% CPU, too.
01:30 raiph joined #perl6
01:42 TimToady howdy from Hackers
01:45 raoulvdberge hi!
01:53 BenGoldberg_ joined #perl6
02:00 ugexe perl6 -e 'my $x = shell("ls", :out); $x.out.close;'
02:00 ugexe The spawned process exited unsuccessfully (exit code: 141)
02:00 ugexe im aware of the recent change, but doesn't that seem wrong?
02:00 ugexe the jvm does not do that fwiw
02:01 ugexe ah it does... so it must have to do with how soon .out is closed
02:02 ugexe or is intended behavior now that .out will have to be read entirely before closing it?
02:03 sprocket question about slurp
02:03 sprocket i’m trying to read in a file using slurp (/proc/cpuinfo) but it doesn’t return any lines
02:03 sprocket however, when i use $FILENAME.IO.lines, it gives the correct result
02:04 sprocket https://gist.github.com/cspencer/5b7ec50a4917c0e2a2f6
02:04 sprocket there’s a gist of the code
02:04 sprocket am i slurp()’ing incorrectly?
02:14 ugexe or how do i launch a proc i expect to fail but want to examine the exitcode?
02:17 ugexe try/catch?
02:18 AlexDaniel ugexe: $proc.exitcode ?
02:18 b2gills joined #perl6
02:19 ugexe hmm calling exitcode before the .out.close makes it work, so screw it
02:20 AlexDaniel ugexe: exitcode lies if you call it before .out.close
02:20 ugexe i *think* that might have changed the other day with a Proc related pr
02:21 AlexDaniel well, two bug reports are still there #126561 #126037
02:21 ugexe ah yeah a bogus command gives exitcode 0 while its still open
02:22 ugexe looks like on a non-zero exit code it throws an exception and the Proc
02:36 BenGoldberg_ joined #perl6
02:39 timotimo huh, how can slurp be broken and our test suites don't catch it :|
02:41 ugexe i guess im not sure how you are now supposed to launch a process you expect to fail where you want to also capture its output and exitcode once its finished
02:42 ugexe but the process might also succeed
02:45 ugexe perl6 -e 'my $proc; try { my $x = shell("ls", :out); $x.out.close; CATCH { default { $proc = $_.proc } } }; say $proc.exitcode' # exitcode of 141 now
02:45 Juerd joined #perl6
02:46 ilbot3 joined #perl6
02:46 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
02:46 tokuhiro_ joined #perl6
02:48 ugexe and i'd want it to not print anything to the terminal, just capture the exitcode
02:49 AlexDaniel ugexe: then you have to do something with stderr perhaps
02:49 AlexDaniel e.g. capture it or redirect to /dev/null
02:49 ugexe doesnt seem to help
02:49 ugexe i already redirect it
02:49 ugexe this is a change from the last day or two
02:50 AlexDaniel hmmm I don't have the latest version
02:52 ugexe i have to wonder if Proc shoudl really decide what is a failure...  i thought some whacky programs use non-0 exit codes for success
02:54 AlexDaniel only shell stuff but you are not going to use these anyway
02:54 ugexe even then if i CATCH it, $promise.keep($proc) just throws it when it re-sinks it
02:54 AlexDaniel I have not seen any normal program that would do that
02:57 ugexe so you cant close .out before its done or it will be an exception. and if you try to get the exit code before closing it its wrong. and if you catch the proc in an exception it will just rethrow if you sink it again. i dont see how you are supposed to handle a non-zero exitcode process given this
02:58 ugexe maybe it should only throw an exception the first time its sunk?
03:01 AlexDaniel well, on my setup slurp-rest blocks until it ends
03:02 AlexDaniel and then you can get exitcode. What happens if stdout is closed earlier? I have no idea
03:03 AlexDaniel (I mean what if it is closed by the process itself. Not sure if that's even possible)
03:04 ugexe nickl@li685-90:~/perl6/http-useragent$ perl6 -e 'my $proc = run("xxx", :out); my $out = $proc.out.slurp-rest; $proc.out.close; my $exitcode = $proc.exitcode;'
03:04 ugexe The spawned process exited unsuccessfully (exit code: 127)
03:04 ugexe in block <unit> at -e:1
03:08 ugexe but i'd expect what you said to happen
03:10 AlexDaniel ugexe: indeed, it seems to be broken if you run weird stuff
03:10 AlexDaniel for example “xxx”
03:10 AlexDaniel say run(‘xxx’).exitcode;
03:11 AlexDaniel prints -1
03:11 AlexDaniel which means that the program did not even start
03:12 AlexDaniel and it's ok, but why is it 127 when you attempt to get the output?
03:12 AlexDaniel sounds like a bug
03:12 ugexe but say i do something else like git clone repo exiting-folder/, it would do the same thing
03:13 ugexe existing
03:14 AlexDaniel ugexe: what is the command that you are trying to run?
03:14 AlexDaniel ugexe: because that's weird
03:15 AlexDaniel I get 128 :)
03:15 AlexDaniel which is correct, I think
03:16 ugexe before i could do `git clone $repo $exiting-directory` which would clone the repo, but if it existed it would exit 127. because i expect this to happen a lot, i use .out to hide the output of the git command, and then look at the exit code and decide if i should actually fetch/pull or throw a real exception
03:16 ugexe 128 yea probably
03:19 AlexDaniel ugexe: say run('git', 'clone', '-q', 'https://github.com/TiMBuS/Net--IRC.git', 'repo2', :err('/dev/null')).exitcode;
03:19 AlexDaniel for me it is 128 if the directory already exists or 0 if everything is OK
03:22 ugexe but i need to capture out as well
03:22 ugexe which means i need to close it
03:23 ugexe so this throws the exception:
03:23 ugexe 'my $proc = run("git", "clone", "-q", "https://github.com/TiMBuS/Net--IRC.git", "repo2", :out, :err("/dev/null")); say $proc.out.lines; $proc.out.close; say $proc.exitcode;'
03:23 ugexe after its been cloned already
03:26 AlexDaniel ugexe: with or without -q, it seems like git clone prints only to stderr
03:26 AlexDaniel and stdout is empty in any case
03:26 ugexe right, but i do use it for more than that one command
03:29 ugexe i seem to be able to catch the proc and still use it if i wrap all the stuff in a try instead of just the run or the .out.close i see. so i'll be able to figure it out now yay
03:33 rurban joined #perl6
03:50 telex joined #perl6
03:50 liufeng joined #perl6
03:52 zengargoyle sproket: i would guess linux's /proc filesystem is special with regards to slurp.  i've seen mention in places of ways you can/can't read from /proc files.  not sure of slurp's implementation.  would have expected .open.slurp-rest to work but it doesn't...
03:53 zengargoyle you can probably only do the equivalent of getline on /proc files or something like that.
03:53 uruwi joined #perl6
03:54 telex joined #perl6
03:55 BenGoldberg m: say + .lines;
03:55 camelia rakudo-moar ff9e6d: OUTPUT«Method 'lines' not found for invocant of class 'Any'␤  in block <unit> at /tmp/YLRehYqJyt:1␤␤»
03:55 BenGoldberg m: say +lines;
03:55 camelia rakudo-moar ff9e6d: OUTPUT«20␤»
04:37 MadcapJake_ joined #perl6
04:39 MadcapJake_ joined #perl6
04:41 MadcapJake_ joined #perl6
04:42 MadcapJake joined #perl6
04:43 MadcapJake joined #perl6
04:44 MadcapJake joined #perl6
04:45 advwp joined #perl6
04:48 tokuhiro_ joined #perl6
04:52 ugexe the secret to getting the old Proc behavior back straight up was just `$proc does role { method sink(|) { } }`... now i feel dumb
05:13 liufeng` joined #perl6
05:35 zengargoyle joined #perl6
05:40 dalek rakudo/nom: 9e4902f | TimToady++ | src/Perl6/Actions.nqp:
05:40 dalek rakudo/nom: failed S/// should return original string
05:40 dalek rakudo/nom:
05:40 dalek rakudo/nom: fixes RT #126476
05:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9e4902f772
05:40 dalek roast: ffe19e0 | TimToady++ | S05-substitution/subst.t:
05:40 dalek roast: RT #126476 fixed, untodo
05:40 dalek roast: review: https://github.com/perl6/roast/commit/ffe19e06f6
05:55 ribasushi joined #perl6
05:57 sprocket joined #perl6
06:06 Timbus so when using \r\n delimited lines, somesing in zee .lines Supply method causes it to buffer the last line until a new line comes through.
06:09 Timbus also, .chars-supply does not ever seem to run my taps and I'm not sure if that's my fault? But if I put an empty .do supply on it, stuff works. one sec while I paste an example..
06:17 Timbus https://gist.github.com/TiMBuS/3d3ca10471e175c8358e
06:37 dalek rakudo/nom: e1e03e6 | TimToady++ | src/Perl6/Grammar.nqp:
06:37 dalek rakudo/nom: don't typocheck types that actually exist
06:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e1e03e6ed5
06:38 tokuhiro_ joined #perl6
07:14 kmel joined #perl6
07:42 kmel hello
07:44 tokuhiro_ joined #perl6
08:01 rindolf joined #perl6
08:09 moritz \o
08:10 kmel \o
08:14 moritz https://www.mikeash.com/pyblog/friday-qa-2015-11-06-why-is-swifts-string-api-so-hard.html "Swift has settled on the grapheme cluster as its idea of a "character.""
08:16 darutoko joined #perl6
08:18 pmurias joined #perl6
08:18 pmurias hi
08:20 kmel joined #perl6
08:20 hankache joined #perl6
08:21 hankache joined #perl6
08:24 moritz hi pmurias
08:25 * moritz is glad that Task::Star builds again with current rakudo
08:27 virtualsue joined #perl6
08:30 leont joined #perl6
08:31 firstdayonthejob joined #perl6
08:36 spider-mario joined #perl6
08:36 dalek nqp: 02f0f5e | (Pawel Murias)++ | src/vm/js/nqp-runtime/ (3 files):
08:36 dalek nqp: [js] Support associative access on type objects.
08:36 dalek nqp: review: https://github.com/perl6/nqp/commit/02f0f5e494
08:36 dalek nqp: ac51c16 | (Pawel Murias)++ | src/vm/js/ (2 files):
08:36 dalek nqp: [js] Hack around the lack of typed attributes support to unbreak nqp-js-on-js.
08:36 dalek nqp: review: https://github.com/perl6/nqp/commit/ac51c16a6c
08:37 konobi pmurias: how goes?
08:43 pmurias konobi: hi
08:44 pmurias planning to work this week on the getting the failing nqp-js tests passing
08:45 RabidGravy joined #perl6
08:45 konobi cool
08:45 konobi i should look again... was trying to get moarvm working on illumos of late
08:47 pmurias haven't really worked on the packaging the generated code up for npm yet, as trying to build up monentum first so that I don't get bogged down and discouraged by Makefiles ;)
08:47 _28_ria joined #perl6
08:48 pmurias konobi: if you have any questions about the nqp-js code base, feel free to ask as I should likely document/clean up any confusing stuff
08:49 konobi pmurias: i suppose a lot of it comes down to the split of responsibilities for each thing generated
08:52 stmuk https://www.youtube.com/watch?v=R4_rBlodftU
08:52 stmuk in Spanish oddly enough
08:53 pmurias I'm thinking that the way we have a mechanism that resolves NQP/Perl 6 modules to file paths, something like that should resolve to npm packages
08:54 pmurias I should look into the CURLI etc. stuff more
09:00 _28_ria joined #perl6
09:07 Ven joined #perl6
09:17 vendethiel joined #perl6
09:28 xfix joined #perl6
09:29 RabidGravy This is about Java, but it should probably be read by everyone http://foxglovesecurity.com/2015/11/06/what-do-weblogic-websphere-jboss-jenkins-opennms-and-your-application-have-in-common-this-vulnerability/
09:31 Psyche^ joined #perl6
09:38 Begi1115 joined #perl6
09:42 Ven joined #perl6
09:45 tokuhiro_ joined #perl6
09:47 Woodi hi #perl6 :)
09:47 RabidGravy marning!
09:47 Woodi RabidGravy: "Nearly two years ago, we decided we wanted 0-day in WebSphere application server." ;)
09:48 moritz I tried to skim the article for the actual vulnerability, but didn't found it very clear
09:48 moritz something with unsafe deserialization
09:48 RabidGravy yeah
09:49 moritz but why do they give the user access to serialized objects?
09:51 RabidGravy because "dumb"
09:52 RabidGravy http://www.masteringperl.org/2012/12/the-storable-security-problem/, slides from a talk I gave on this *moree than ten years ago* http://gellyfish.co.uk/old/yapc_talk/
09:52 Ven joined #perl6
09:55 moritz one could also sign the data, and verify the signature to ensure that it hasn't been tampered with
09:55 moritz as Mojolicious does for session cookies
09:59 Woodi becouse "Java LOVES sending serialized objects all over the place." :)
09:59 RabidGravy however in an RPC or data sharing context that may give a false sense of security
09:59 _mg_ joined #perl6
09:59 moritz aye
10:05 nine "Every application server comes with its own bundle of libraries, even worse, every application you deploy on the server often comes with its own set as well"
10:06 nine That's why after all the hype of local::lib, containers and whatnot, I'm still a fan of using system perl and system libraries.
10:08 moritz it's a different situation if you make in-house applications
10:09 moritz if you want to update a library, you just rebuild the application and deploy it
10:09 RabidGravy quite a while ago I worked at an ISP where the provisioning system use three different versions of Perl :(
10:09 moritz (provided build and deployment are somewhat automated)
10:09 moritz RabidGravy: hey, they had a provisioning system!
10:09 pink_mist my alma mater just announced they're switching away from Java as their primary language for teaching ... I kindof wish they'd switch to perl6, but I don't think there'd be enough competence yet to teach that :/
10:09 rurban joined #perl6
10:10 pink_mist seems they've chosen Scala
10:10 nine moritz: that assumes that I actually know that I need to update a library. Which again means that I'd have to follow changelogs of 100s of modules we use. I'd much rather have our Linux distribution do that for us.
10:11 moritz nine: agreed, if you have that option; otherwise https://www.versioneye.com/ exists, at least
10:13 RabidGravy though for a lot of even quite large applications there are only a relatively few direct dependencies and the rest are dependencies of those dependencies
10:14 espadrine joined #perl6
10:26 [Tux] T::C seriously broken after recent commit.
10:27 lizmat [Tux] ah?  perhaps my :k/:v etc work ?
10:27 moritz or the CRLF grapheme?
10:27 [Tux] I think *my* :k work committing in the wrong branch
10:27 lizmat :-)
10:28 [Tux] yup, much better
10:28 RabidGravy yay!
10:33 [Tux] test             50000    35.260    35.148
10:33 [Tux] test-t           50000    18.171    18.059
10:33 tadzik :o
10:35 moritz wow
10:37 RabidGravy half
10:38 Woodi ok, I see numbers second time but what generate them ?? ;)
10:40 arnsholt That's a really nice speedup! What's changed between the two versions of the code?
10:41 RabidGravy harder whipping of the hamsters
10:42 lizmat afk for a few hours
10:46 Woodi btw. today I finished very interesting article about history of SmallTalk. one of the features (early 70s or earlier) was safe serialization ability :)  and there is so many interesting things to note that I do not put them becouse someone/something will kick me from the chanell :)
10:46 Woodi link is:  http://gagne.homedns.org/~tgagne/contrib/EarlyHistoryST.html
10:48 RabidGravy :)
10:49 Woodi just one note: at the end of article is chapter "Coda", just random things from the past and about future... *THAT* is why I am realy sad IT "oldtimers" do not do blogs or more such perspective view talks...
11:00 [Tux] Woodi, the test suite for Text::CSV
11:00 [Tux] arnsholt, split (@needles, ...) instead of split (rx{...}, ...)
11:01 diakopter joined #perl6
11:02 pmurias nine: re follow the changelogs, why not just update to the latest version?
11:04 nine pmurias: that's the exact opposite of what people using local::lib or containers want. They use exactly specified versions because they tested those. New versions break things far too often.
11:05 pmurias using the version the distribution provides will also break things
11:08 nine Only on upgrades. Security fixes are mostly backported
11:09 pmurias nine: I really dislike distributions doing things like patching perl
11:09 pmurias when debian perl prints out that a few hundred patches are applied I'm all "Leave my perl alone you bastard"
11:11 pmurias the way debian handled node.js was really horrible
11:13 nine Maybe debian is just not the prime example :)
11:14 arnsholt The thing that annoys me the most is Ubuntu splitting core Perl into several packages, so that perldoc isn't installed by default, for example
11:17 RabidGravy a lot of LInux packagers do that
11:17 RabidGravy waaaay annoying
11:28 MARTIMM joined #perl6
11:31 spider-mario luckily, arch linux doesn’t
11:31 MARTIMM reading through S10 section Autoloading; is the use of CANDO() already implemented in rakudo?
11:32 spider-mario even most of Qt4 is just in one big “qt4” package
11:32 spider-mario including the development tools :-°
11:33 Skarsnik joined #perl6
11:36 stmuk but embedded systems! blah blah
11:37 iH2O joined #perl6
11:38 stmuk in an "enterprise" vendor backported security patches do add "value"
11:39 iH2O left #perl6
11:40 Ven joined #perl6
11:40 ^elyse^ joined #perl6
11:44 moritz MARTIMM: no
11:44 moritz MARTIMM: and I don't think we will for christmas; we have FALLBACK though
11:48 Zoffix joined #perl6
11:48 Zoffix joined #perl6
11:48 MARTIMM moritz: Can I find that in the documents
11:49 timotimo o/
11:51 MARTIMM moritz: found something in S12, thanks
11:52 timotimo moritz: i don't think signatures on the serialization blobs would help this issue at all
11:53 timotimo moritz: because you use serialized blobs for unauthorized commands against the server and the general setup requires everyone to have access to the programs that generate these blobs as commands
11:54 timotimo what would help is a whitelist of classes that any given serialized blob is allowed to generate
11:56 timotimo because for a command like "hey what's your version?" why accept anything but List, Map, String, Int, Float?
11:56 timotimo (and at that point you have a complicated, binary version of JSON)
11:59 timotimo if there was some way to only allow deserialization of things that don't have a "post-deserialize" method, that'd also be A Thing
12:02 moritz timotimo: yes, I was commenting on the use case of session storage, not the RPC use case
12:02 timotimo ah, yes
12:02 timotimo for that, signature is a good idea
12:23 weihan joined #perl6
12:26 Ven joined #perl6
12:28 weihan joined #perl6
12:35 kid51 joined #perl6
12:37 weihan joined #perl6
12:39 Ven joined #perl6
12:49 raoulvdberge joined #perl6
12:50 ChoHag joined #perl6
12:53 Ven joined #perl6
12:54 weihan joined #perl6
12:59 weihan joined #perl6
13:04 hankache joined #perl6
13:08 dayangkun joined #perl6
13:09 dayangkun joined #perl6
13:09 Sqirrel joined #perl6
13:10 dayangkun joined #perl6
13:13 RabidGravy If one had a thing that indicated either "Optional" or "Mandatory" what would you call it
13:14 psch neccessity marker?
13:15 RabidGravy Hmm, bit wordy
13:15 psch need-it bit? :P
13:15 RabidGravy specifically if I had "enum Something <Mandatory Optional>" what would work for Something ;-)
13:16 psch m: A: for 1 { A.Str.say }
13:16 camelia rakudo-moar e1e03e: OUTPUT«Label<139845112624704>␤»
13:16 Ven joined #perl6
13:16 psch m: A: for 1 { A.chars.say }
13:16 camelia rakudo-moar e1e03e: OUTPUT«Method 'chars' not found for invocant of class 'Label'␤  in block <unit> at /tmp/pUT7Y3acaN:1␤␤»
13:17 psch m: A: for 1 { A.perl.say }
13:17 camelia rakudo-moar e1e03e: OUTPUT«Label.new␤»
13:17 raiph joined #perl6
13:18 psch RabidGravy: http://english.stackexchange.com/questions/110394/
13:19 RabidGravy hahaha, Optionality
13:19 RabidGravy Ordinality is a weird metaphor really
13:19 * RabidGravy goes with Optionality as it's better than sitting here worrying about it
13:20 RabidGravy cheers
13:20 lizmat Mandatum
13:20 * lizmat likes Optionality
13:20 lizmat works with Whipuptitude and Manuplexity
13:20 RabidGravy :)
13:21 psch m: A: for 1 { for 1 { A.last }; CONTROL { default { .perl.say } } } # this used to segfault afair
13:21 camelia rakudo-moar e1e03e: OUTPUT«chars requires a concrete string, but got null␤  in block  at /tmp/Mtjls394hH:1␤  in block  at /tmp/Mtjls394hH:1␤  in block <unit> at /tmp/Mtjls394hH:1␤␤»
13:21 psch now it just doesn't know how to .chars the Label
13:21 RabidGravy psch, because of the above I just discovered one can apply a role to a Label like that, haven't a clue what you could do with it
13:21 timotimo could very well be; .chars on a null thingie used to just segfault
13:22 psch m: A: for 1 { for 1 { A.last }; CONTROL { default { .Str.say } } }
13:22 camelia rakudo-moar e1e03e: OUTPUT«concatenate requires a concrete string, but got null␤  in block  at /tmp/QX0OWZbKlk:1␤  in block  at /tmp/QX0OWZbKlk:1␤  in block <unit> at /tmp/QX0OWZbKlk:1␤␤»
13:22 psch m: A: for 1 { for 1 { A.last }; CONTROL { default { .WHAT.say } } }
13:22 camelia rakudo-moar e1e03e: OUTPUT«(X::AdHoc)␤»
13:22 psch m: A: for 1 { for 1 { A.last }; CONTROL { default { .message.say } } }
13:22 camelia rakudo-moar e1e03e: OUTPUT«concatenate requires a concrete string, but got null␤  in block  at /tmp/r0enFXXACy:1␤  in block  at /tmp/r0enFXXACy:1␤  in block <unit> at /tmp/r0enFXXACy:1␤␤»
13:22 psch vOv
13:22 psch it's clearly a miswrapped CX::Last
13:22 psch really though, something about exception handling and labels is just utterly opaque to me
13:23 psch as in, the P6-level seems to bypass the NQP layer and is handled directly in the vm
13:23 timotimo i wonder if the CONTROL block wraps it for you?
13:24 psch m: use nqp; A: for 1 { for 1 { A.last }; CONTROL { default { say nqp::getextype(nqp::decont($_)) } } }
13:24 camelia rakudo-moar e1e03e: OUTPUT«getexcategory needs a VMException␤  in block  at /tmp/zdboewrxj1:1␤  in block  at /tmp/zdboewrxj1:1␤  in block <unit> at /tmp/zdboewrxj1:1␤␤»
13:25 psch m: use nqp; A: for 1 { for 1 { A.last }; CONTROL { default { say nqp::getextype(nqp::getattr(nqp::decont($_), '$!ex', Exception)) } } }  # uhh
13:25 camelia rakudo-moar e1e03e: OUTPUT«Cannot unbox a type object␤  in block  at /tmp/cmaHQEfveO:1␤  in block  at /tmp/cmaHQEfveO:1␤  in block <unit> at /tmp/cmaHQEfveO:1␤␤»
13:25 psch timotimo: i think the X::AdHoc isn't even the CX::Last i want, maybe..?
13:26 timotimo you mean something else could potentially be thrown in there?
13:26 dayangkun joined #perl6
13:27 psch yeah, something like that
13:27 psch maybe it breaks differently too, as mentioned i don't see through that at all :/
13:27 psch m: for 1 { last; CONTROL { default { .perl.say } } }
13:27 camelia rakudo-moar e1e03e: OUTPUT«CX::Last.new␤»
13:27 psch labels man
13:27 RabidGravy I don't suppose that anyone has compiled a list of "customary" extensions to the S22 META spec as might be used by various tools?
13:27 psch m: A: for 1 { A.last; CONTROL { default { .perl.say } } }
13:27 camelia rakudo-moar e1e03e: OUTPUT«chars requires a concrete string, but got null␤  in block  at /tmp/zCF0XdToYG:1␤  in block <unit> at /tmp/zCF0XdToYG:1␤␤»
13:30 AlexDaniel joined #perl6
13:32 psch j: A: for 1 { for 1 { last A }; CONTROL { default { .perl.say } } }
13:32 camelia rakudo-jvm e1e03e: OUTPUT«X::AdHoc.new(payload => "Died")␤»
13:32 _mg_ joined #perl6
13:32 psch m: say X::AdHoc.payload
13:32 camelia rakudo-moar e1e03e: OUTPUT«Invocant requires an instance of type X::AdHoc, but a type object was passed.  Did you forget a .new?␤  in block <unit> at /tmp/arMb4vz58J:1␤␤»
13:32 psch m: say X::AdHoc.new.payload
13:32 camelia rakudo-moar e1e03e: OUTPUT«Unexplained error␤»
13:32 psch j: say X::AdHoc.new.payload
13:32 camelia rakudo-jvm e1e03e: OUTPUT«Unexplained error␤»
13:36 ilbelkyr joined #perl6
13:37 psch r: use nqp; A: for 1 { for 1 { last A; }; CONTROL { default { say nqp::getextype(nqp::getattr($_, Exception, '$!ex')) } } }
13:37 camelia rakudo-{moar,jvm} e1e03e: OUTPUT«4112␤»
13:37 psch getattr is hard :l
13:37 psch at least they agree its a labeled last
13:39 Ven joined #perl6
13:39 Skarsnik Hello, is there a way to get a counter in a for loop without setting/inc a var for it?
13:40 psch Skarsnik: do you have an example (maybe in another language) that shows what you mean?
13:41 lizmat m: my @a = <a b c d e>; for @a.kv => $index, $letter { dd :$index, :$letter }
13:41 camelia rakudo-moar e1e03e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GklweIJCls␤Variable '$index' is not declared. Did you mean any of these?␤    &index␤    &rindex␤␤at /tmp/GklweIJCls:1␤------> 3my @a = <a b c d e>; for @a.kv => 7⏏5$index, $letter { dd :$index,…»
13:41 lizmat m: my @a = <a b c d e>; for @a.kv -> $index, $letter { dd :$index, :$letter }
13:41 camelia rakudo-moar e1e03e: OUTPUT«Str letter = "a"␤Int index = 0␤Str letter = "b"␤Int index = 1␤Str letter = "c"␤Int index = 2␤Str letter = "d"␤Int index = 3␤Str letter = "e"␤Int index = 4␤»
13:41 lizmat m: my @a = <a b c d e>; for @a.kv -> $index, $letter { say "$index: $letter" }  # clearer ?
13:41 camelia rakudo-moar e1e03e: OUTPUT«0: a␤1: b␤2: c␤3: d␤4: e␤»
13:42 lizmat Skarsnik:  ^^^ that what you mean ?
13:42 Skarsnik I mean I have ,for example, for @tab -> $t {}; and I want to count each loop; like if I write my $cpt = 0; for @tab -> $t {$cpt++}
13:42 Skarsnik Ah yes
13:44 Skarsnik or can I loop through 2 array at the same time? like for @t1, @t2 -> $t1, $t2 ?
13:46 lizmat m: my @a = <a b c d e>; my @b = ^5; dd @a Z @b   # something with Z maybe ?
13:46 camelia rakudo-moar e1e03e: OUTPUT«Seq $var = (("a", 0), ("b", 1), ("c", 2), ("d", 3), ("e", 4)).Seq␤»
13:47 RabidGravy or
13:48 RabidGravy m: my @a = <1 2 3 4>; my @b = <a b c d>; for (@a Z @b).flat -> $a, $b { say $a, $b }
13:48 camelia rakudo-moar e1e03e: OUTPUT«1a␤2b␤3c␤4d␤»
13:48 RabidGravy depending on your requirement
13:48 lizmat m: my @a = <a b c d e>; my @b = ^5; for @a Z=> @b { .say }   # another alternative
13:48 camelia rakudo-moar e1e03e: OUTPUT«a => 0␤b => 1␤c => 2␤d => 3␤e => 4␤»
13:49 Skarsnik Thx :)
13:49 AlexDaniel m: my @a = <a b c>; my @b = <x y z>; for (flat @a Z @b) -> $x, $y { say $x ~ $y, $++ }
13:49 camelia rakudo-moar e1e03e: OUTPUT«ax0␤by1␤cz2␤»
13:49 AlexDaniel another way to get counter
13:50 dalek rakudo/nom: 4aa63f0 | lizmat++ | src/core/Str.pm:
13:50 dalek rakudo/nom: Implement :v/k/kv/p also for Str.split(Regex:D)
13:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4aa63f0f81
13:51 lizmat next step, documentation, then more tests
13:52 AlexDaniel oh wow
13:52 AlexDaniel m: my @array1 = <a b c>; my @array2 = <x y z>; for @array1 Z @array2 -> $one, $two { say $one, $two }
13:52 camelia rakudo-moar e1e03e: OUTPUT«(a x)(b y)␤Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at /tmp/Qvu3QWsFNO:1␤␤»
13:52 AlexDaniel example taken from https://perl6advent.wordpress.com/2009/12/07/day-7-looping-for-fun-and-profi/
13:53 AlexDaniel perhaps it should be corrected?
13:54 AlexDaniel m: my @array = <a b c>; for ^Inf Z @array -> $index, $item { say $index, $item }
13:54 camelia rakudo-moar e1e03e: OUTPUT«(0 a)(1 b)␤Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at /tmp/sdUOLoQ1Uf:1␤␤»
13:54 AlexDaniel that's another example from this post
13:57 psch single-arg rule /o\
13:57 timotimo you would want @array.kv instead, no?
13:57 timotimo oh, wait
13:57 timotimo m: say <a b c> Z <x y z>
13:57 camelia rakudo-moar e1e03e: OUTPUT«((a x) (b y) (c z))␤»
13:57 psch m: my @array = <a b c>; for (^Inf Z @array).flat -> $index, $item { say $index, $item }
13:57 camelia rakudo-moar e1e03e: OUTPUT«0a␤1b␤2c␤»
13:57 timotimo right, that wants a .flat
13:58 psch AlexDaniel: not that $index is (0 a) and $item is (1 b) in your example
13:58 psch so, yeah, semantics changed
13:58 timotimo yeah
13:58 psch s/not/note/
13:58 timotimo for a post from 2009, that's ... fine?
13:58 psch well, the question is whether the advent posts should be kept up to date or at least have errata
13:58 Ven joined #perl6
13:58 AlexDaniel timotimo: I'm not sure. If it is outdated, then why keep it at all?
13:59 psch they are kind of a documentation precursor
13:59 AlexDaniel timotimo: or we can just fix it
14:00 psch fwiw, i know from experience that any author for perl6advent can edit any post
14:00 psch (because i got my post edited... :) )
14:00 psch i think moritz++ has "add author" authority
14:01 Skarsnik m: use NativeCall; my $a; $a.^set_name("int32"); say nativesizeof($a.WHAT);
14:01 camelia rakudo-moar e1e03e: OUTPUT«NativeCall op sizeof expected type with CPointer, CStruct, CArray, P6int or P6num representation, but got a P6opaque␤  in sub nativesizeof at lib/NativeCall.pm:335␤  in block <unit> at /tmp/79RatZRdx1:1␤␤»
14:01 psch i don't know who Matthew Walton is, is why i bring this up
14:01 psch Skarsnik: .WHAT isn't .HOW.name
14:02 Skarsnik m: use NativeCall; my $a; $a.^set_name("int32"); say $a.WHAT;
14:02 camelia rakudo-moar e1e03e: OUTPUT«(int32)␤»
14:03 psch oh, it is..?
14:03 psch that's curious :P
14:03 psch well, i guess that means that isn't the problem, but the repr is
14:03 Skarsnik m: use NativeCall; my $a; $a.^set_name("int32"); say nativesizeof(int32);
14:03 camelia rakudo-moar e1e03e: OUTPUT«4␤»
14:03 psch m: use NativeCall; my $a; $a.^set_name("int32"); say $a ~~ int32
14:03 camelia rakudo-moar e1e03e: OUTPUT«False␤»
14:04 psch m: use NativeCall; my $a; $a.^set_name("int32"); say $a.WHAT === int32
14:04 camelia rakudo-moar e1e03e: OUTPUT«True␤»
14:04 RabidGravy that's odd
14:04 psch m: use NativeCall; say int32.REPR; my $a; say $a.REPR
14:04 camelia rakudo-moar e1e03e: OUTPUT«P6int␤P6opaque␤»
14:05 psch m: use NativeCall; my int32 $a; say $a.REPR
14:05 camelia rakudo-moar e1e03e: OUTPUT«P6opaque␤»
14:05 psch m: use NativeCall; my int32 $a; say nqp::decont($a).REPR
14:05 camelia rakudo-moar e1e03e: OUTPUT«P6opaque␤»
14:05 psch m: use NativeCall; my int32 $a; say nativesizeof($a.WHAT)
14:05 camelia rakudo-moar e1e03e: OUTPUT«NativeCall op sizeof expected type with CPointer, CStruct, CArray, P6int or P6num representation, but got a P6opaque␤  in sub nativesizeof at lib/NativeCall.pm:335␤  in block <unit> at /tmp/sq3kV4eWpI:1␤␤»
14:05 psch m: use NativeCall; my int32 \a; say nativesizeof(a.WHAT)
14:06 camelia rakudo-moar e1e03e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/wZ7eMuJwIJ␤Term definition requires an initializer␤at /tmp/wZ7eMuJwIJ:1␤------> 3use NativeCall; my int32 \a7⏏5; say nativesizeof(a.WHAT)␤»
14:06 psch m: use NativeCall; my int32 \a = 5; say nativesizeof(a.WHAT)
14:06 camelia rakudo-moar e1e03e: OUTPUT«Type check failed in binding; expected int32 but got Int␤  in block <unit> at /tmp/dkPl5zDbMo:1␤␤»
14:06 psch m: use NativeCall; my int32 $a; say nativesizeof($a.VAR.of)
14:06 camelia rakudo-moar e1e03e: OUTPUT«Method 'of' not found for invocant of class 'Int'␤  in block <unit> at /tmp/59qMYdvzCW:1␤␤»
14:08 Skarsnik m: use NativeCall; my int32 $a; say nativesizeof($a.WHAT);
14:08 camelia rakudo-moar e1e03e: OUTPUT«NativeCall op sizeof expected type with CPointer, CStruct, CArray, P6int or P6num representation, but got a P6opaque␤  in sub nativesizeof at lib/NativeCall.pm:335␤  in block <unit> at /tmp/yKLLjaOzdp:1␤␤»
14:08 MARTIMM joined #perl6
14:09 Ven joined #perl6
14:11 Skarsnik m: use NativeCall; my $a = "int32"; say EVAL("nativesizeof($a)");
14:11 camelia rakudo-moar 4aa63f: OUTPUT«4␤»
14:12 psch well, that's just < nativesizeof(int32) >
14:12 Skarsnik I know x)
14:12 mrf ugexe: you about?
14:13 psch Skarsnik: ooc, what's the use case?  or are you just looking for WATs?
14:13 Skarsnik I am not sure to understand why nativesizeof($var.WHAT) does not work still x)
14:13 arnsholt m: my int32 $x; say $x.WHAT; # What about this?
14:13 camelia rakudo-moar 4aa63f: OUTPUT«(Int)␤»
14:14 arnsholt Huh. 's odd
14:14 psch arnsholt: method calls box
14:14 psch arnsholt: because natives don't know methods
14:14 Skarsnik I am writing something that compare C struct size and their defined size in perl6
14:15 dalek rakudo/nom: f4266f2 | lizmat++ | src/core/Cool.pm:
14:15 dalek rakudo/nom: Make sure sub split() passes all nameds as well
14:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f4266f234f
14:15 lizmat oddly enough, we seem to be low on test on split()
14:15 psch m: say int32.WHAT
14:15 camelia rakudo-moar 4aa63f: OUTPUT«(int32)␤»
14:15 psch well, .WHAT isn't a method, but it somehow still promotes... :/
14:15 timotimo "promotes"?
14:16 timotimo oh, i see
14:16 timotimo yeah, that's right
14:16 arnsholt Skarsnik: "C struct size" and "defined size in Perl 6"?
14:16 sprocket joined #perl6
14:17 lizmat https://github.com/rakudo/rakudo/pull/578   # leont++ does dogfooding
14:17 leont :-)
14:18 arnsholt Yeah, leont++
14:18 timotimo m: say nativesizeof(int32)
14:18 camelia rakudo-moar 4aa63f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gUIQ8cDxSc␤Undeclared routine:␤    nativesizeof used at line 1␤␤»
14:18 timotimo m: say nqp::nativecallsizeof(int32)
14:18 camelia rakudo-moar 4aa63f: OUTPUT«4␤»
14:18 timotimo m: say nqp::nativecallsizeof(int64)
14:18 camelia rakudo-moar 4aa63f: OUTPUT«8␤»
14:18 arnsholt That's a seriously important task, I think
14:19 timotimo m: use NativeCall; say nativesizeof(int32)
14:19 camelia rakudo-moar 4aa63f: OUTPUT«4␤»
14:19 arnsholt I've been meaning to look into a Perl 6 test harness for ages, but never getting around to it
14:19 timotimo m: use NativeCall; say nativesizeof(int64)
14:19 camelia rakudo-moar 4aa63f: OUTPUT«8␤»
14:19 Skarsnik Well you want to bind a C lib that has struct ex { int a; char *ag} to perl6 code: class ex is repr('CStruct') { has int $a; has Str *ag} it's a good thing to check if their size match
14:19 timotimo m: use NativeCall; my int32 $foo = 0; say nativesizeof($foo)
14:19 camelia rakudo-moar 4aa63f: OUTPUT«NativeCall op sizeof expected type with CPointer, CStruct, CArray, P6int or P6num representation, but got a P6opaque␤  in sub nativesizeof at lib/NativeCall.pm:335␤  in block <unit> at /tmp/rHjdIhJDoO:1␤␤»
14:19 timotimo m: use NativeCall; my int32 $foo = 0; say nativesizeof($foo.VAR)
14:19 camelia rakudo-moar 4aa63f: OUTPUT«NativeCall op sizeof expected type with CPointer, CStruct, CArray, P6int or P6num representation, but got a NativeRef␤  in sub nativesizeof at lib/NativeCall.pm:335␤  in block <unit> at /tmp/s0xpapD01k:1␤␤»
14:19 timotimo m: use NativeCall; my int32 $foo = 0; say nativesizeof(nqp::decont($foo))
14:19 camelia rakudo-moar 4aa63f: OUTPUT«NativeCall op sizeof expected type with CPointer, CStruct, CArray, P6int or P6num representation, but got a P6opaque␤  in sub nativesizeof at lib/NativeCall.pm:335␤  in block <unit> at /tmp/sLf2cXWWG2:1␤␤»
14:19 timotimo mhm, mhm.
14:19 timotimo m: use NativeCall; my int32 $foo = 0; say nqp::nativecallsizeof(nqp::decont($foo))
14:19 camelia rakudo-moar 4aa63f: OUTPUT«NativeCall op sizeof expected type with CPointer, CStruct, CArray, P6int or P6num representation, but got a P6opaque␤  in block <unit> at /tmp/uRSjeadre1:1␤␤»
14:20 arnsholt m: my int32 $x = 3; say $x.WHAT
14:20 camelia rakudo-moar 4aa63f: OUTPUT«(Int)␤»
14:20 leont The fudge tools are other targets to dogfood, IMO
14:20 arnsholt It's still not clear to me why the .WHAT of an int32 is Int though
14:21 nine arnsholt: because my native int32 is repr('P6int') is Int is nativesize(32) { }
14:22 lizmat leont: if they live in roast, they should not be
14:22 lizmat or at least, not remove the perl 5 ones
14:22 leont Yeah, I figured we can't remove the perl 5 ones
14:23 leont But that's no reason to use them if we have a working perl 6
14:23 lizmat cycling&
14:23 lizmat agree  :-)
14:23 lizmat really afk&
14:23 Skarsnik hm EVAL does not work for me because it can't find the type defined in a module even with EVAL("require $modulename; nativesizeof($ncname);")
14:23 arnsholt nine: But how does that make the .WHAT be Int?
14:24 pmurias_ joined #perl6
14:24 Skarsnik m: my str $x; say $x.WHAT;
14:24 camelia rakudo-moar 4aa63f: OUTPUT«(Str)␤»
14:24 nine arnsholt: int32 is just an Int with an added trait
14:24 timotimo welllll
14:24 timotimo if you look at the --target=ast, the WHAT will be called on a lexicalref
14:24 timotimo it might just be it has no clue to resolve the actual lexical behind that
14:25 timotimo m: my int32 $foo = 0; say $foo.VAR.WHAT
14:25 camelia rakudo-moar 4aa63f: OUTPUT«(IntLexRef)␤»
14:25 Skarsnik m: my str $x = "a"; my $p := $x; say $p.WHAT;
14:25 camelia rakudo-moar 4aa63f: OUTPUT«(Str)␤»
14:25 arnsholt Yeah, that sounds more reasonable. `is Int` means it's a subclass of Int, after all
14:25 psch m: my int32 $foo = 0; say $foo.VAR.of
14:25 camelia rakudo-moar 4aa63f: OUTPUT«Method 'of' not found for invocant of class 'Int'␤  in block <unit> at /tmp/zmq_1b3C8_:1␤␤»
14:27 psch m: my int32 $foo = 0; say $foo.VAR.^native_type
14:27 camelia rakudo-moar 4aa63f: OUTPUT«Cannot find method 'gist': no method cache and no .^find_method␤  in block <unit> at /tmp/BFHixWxCza:1␤␤»
14:27 psch m: my int32 $foo = 0; say $foo.VAR.^native_type === int32
14:27 camelia rakudo-moar 4aa63f: OUTPUT«Cannot call infix:<===>(int, int32); none of these signatures match:␤    ($?)␤    ($a, $b)␤    (Int:D \a, Int:D \b)␤    (int $a, int $b)␤    (Num:D \a, Num:D \b)␤    (Num $ where { ... }, Num $ where { ... })␤    (num $a, num $b --> Bool:D)…»
14:27 Skarsnik m: use NativeCall; class T is repr('CStruct'){has int32 $.a}; my T $b; say nativesizeof($b.WHAT);
14:27 camelia rakudo-moar 4aa63f: OUTPUT«4␤»
14:27 arnsholt Skarsnik: That sounds reasonable. But how are you going to query for the C size of the struct?
14:28 Skarsnik m: use NativeCall; class T is repr('CStruct'){has int32 $.a}; my $b; $b.^set_name("T"); say $b.WHAT; nativesizeof($b.WHAT);
14:28 timotimo arnsholt: nativesizeof can handle CStruct
14:28 camelia rakudo-moar 4aa63f: OUTPUT«(T)␤NativeCall op sizeof expected type with CPointer, CStruct, CArray, P6int or P6num representation, but got a P6opaque␤  in sub nativesizeof at lib/NativeCall.pm:335␤  in block <unit> at /tmp/TOWtuQb8na:1␤␤»
14:28 psch hm, can i pull a PR from github?
14:28 timotimo m: use NativeCall; class T is repr('CStruct'){has int32 $.a}; say nativesizeof(T)
14:28 psch i'd like to look at what the EvalServer isn't doing for leont++'s work
14:28 camelia rakudo-moar 4aa63f: OUTPUT«4␤»
14:29 arnsholt Well yeah. But that's the Perl 6 side size. How are you going to find out what size the C side operates with?
14:29 leont psch: awesome
14:29 Skarsnik I compile a small C file that just printf sizeof(cstruct)
14:29 arnsholt Without resorting to on-the-fly C compilation
14:29 arnsholt Right =)
14:29 RabidGravy psch, pull the branch the PR comes from
14:29 leont You need to uncomment the jvm specific code at the end of harness6 to re-enable that
14:30 psch RabidGravy: yeah, i found the CLI instructions on github... (reading before asking)++
14:30 Skarsnik m: use NativeCall; class T is repr('CStruct'){has int32 $.a}; my $b; $b.^set_name("T"); say $b.WHAT;
14:30 camelia rakudo-moar 4aa63f: OUTPUT«(T)␤»
14:30 RabidGravy :)
14:30 Skarsnik but why I can't nativesizeof this WHAT?
14:30 timotimo what do you .^set_name for?
14:30 timotimo just curious
14:31 timotimo m: use NativeCall; class T is repr('CStruct'){has int32 $.a}; my $b; $b.^set_name("T"); say $b.WHAT; say nativesizeof($b); say nativesizeof($b.WHAT)
14:31 camelia rakudo-moar 4aa63f: OUTPUT«(T)␤NativeCall op sizeof expected type with CPointer, CStruct, CArray, P6int or P6num representation, but got a P6opaque␤  in sub nativesizeof at lib/NativeCall.pm:335␤  in block <unit> at /tmp/PCaZAX17EW:1␤␤»
14:31 timotimo m: use NativeCall; class T is repr('CStruct'){has int32 $.a}; my $b; $b.^set_name("T"); say $b.WHAT; try say nativesizeof($b); try say nativesizeof($b.WHAT)
14:31 camelia rakudo-moar 4aa63f: OUTPUT«(T)␤»
14:31 timotimo er, wait ...
14:31 arnsholt Why the .^set_name to the name it already has?
14:31 timotimo what the hell are you doing :)
14:31 Skarsnik to construct something with the name of the type.
14:32 timotimo "my $b" does NOT give you a T-typed thing
14:32 timotimo even if you set its name to T
14:32 timotimo just like if you call yourself "timo", you're not me
14:32 Skarsnik well .WHAT give T
14:32 psch m: sub f(Int $x) { }; my $x; $x.^set_name('Int'); f $x
14:32 arnsholt Well it says that it's *name* is T
14:32 camelia rakudo-moar f4266f: OUTPUT«Type check failed in binding $x; expected Int but got Int␤  in sub f at /tmp/0IguzjNYY0:1␤  in block <unit> at /tmp/0IguzjNYY0:1␤␤»
14:32 psch DIHWIDT
14:32 arnsholt Which makes sense, since you just renamed its type to T =)
14:33 arnsholt m: use NativeCall; class T is repr('CStruct') { has int32 $x; }; my T $x; say $x.WHAT # Here you go
14:33 camelia rakudo-moar f4266f: OUTPUT«(T)␤»
14:33 Skarsnik yes but WHAT give the exact same thing x)
14:33 arnsholt m: my $x; say $x.WHAT; $x.^set_name("T"); say $x.WHAT
14:33 camelia rakudo-moar f4266f: OUTPUT«(Any)␤(T)␤»
14:33 psch m: my $x; $x.^set_name("int32"); say $x.WHAT =:= int32
14:33 camelia rakudo-moar f4266f: OUTPUT«False␤»
14:34 psch it doesn't give the exact same name, infix:<===> is just the wrong tool for the job
14:34 arnsholt You just reconfigured Any to say its name is T
14:34 psch s/name/thing/
14:34 RabidGravy m: my Int $a;  $a.^set_name("Str"); say $a.WHAT; say $a.^mro;
14:34 camelia rakudo-moar f4266f: OUTPUT«(Str)␤((Str) (Cool) (Any) (Mu))␤»
14:35 Skarsnik Ok, so how I create something with T type (given I only have his name)?
14:35 RabidGravy weird
14:35 psch m: my $type = "Int"; my ::($type) $x; say $x.WHAT
14:35 camelia rakudo-moar f4266f: OUTPUT«Method 'gist' not found for invocant of class '($type)'␤  in block <unit> at /tmp/brUDD27eD6:1␤␤»
14:35 psch well, that's how i thought it would work vOv
14:36 arnsholt m: my $x = ::("Str"); say $x
14:36 camelia rakudo-moar f4266f: OUTPUT«(Str)␤»
14:36 RabidGravy m: class T { };  my ::("T") $a;  say $a.WHAT
14:36 camelia rakudo-moar f4266f: OUTPUT«Method 'gist' not found for invocant of class '("T")'␤  in block <unit> at /tmp/xz3ZwPJcT2:1␤␤»
14:36 arnsholt Skarsnik: But remember that types can be passed around just like any other object
14:37 psch well, indirect lookup for container constraints is apparently different than type object lookup...
14:37 psch not sure if that's even supposed to work, anyway
14:37 psch leont: can you expand on your "SourceHandler" comment?
14:38 Skarsnik m: use NativeCall; sub foo ($t) { say nativesizeof($t)}; foo(int32);
14:38 camelia rakudo-moar f4266f: OUTPUT«4␤»
14:38 mr-foobar joined #perl6
14:38 Skarsnik Ah nice x)
14:39 leont eval-client is a small p5 script that makes a connection with the eval-server, tells it what to run, and then copies anything it gets back to the harness
14:39 timotimo m: my ::Foo $test = 1; say Foo
14:39 camelia rakudo-moar f4266f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GmDBhhmytb␤Undeclared name:␤    Foo used at line 1␤␤»
14:39 leont This gluing together could/should be done without shelling out, IMO
14:39 timotimo i would expect that'd be parsed as a type capture, TBH
14:40 leont SourceHandlers are the objects in TAP::Harness that turn an input (currently always a filename) into a Source object (e.g. something that runs that file as a perl 6 script)
14:41 leont So we'd need a SourceHandler that sets up that connection with the eval server instead of running it directly
14:42 arnsholt Skarsnik: Yeah, that's what I meant with passing around types. The problem, AFAICT is that .WHAT on some things doesn't return what you want
14:42 arnsholt jnthn: The .WHAT on a scalar declared as int32 is apparently Int. Bug or feature?
14:43 Skarsnik it's the int32 is bind from a clib func call I think it remain int32
14:43 Skarsnik *if
14:45 psch leont: the "it" that's ran directly is the eval client?
14:45 leont Yes
14:45 leont See nqp/tools/jvm/eval-client.pl
14:46 leont It does very little, really
14:46 Skarsnik does %hash.keys and %hash.values give the contents in the same orders?
14:46 psch yeah, that does sound generally useful, to have a "feed this into a socket" kind of handler for a harness
14:47 psch ...apparently i can't build panda on r-j
14:48 psch "java.lang.RuntimeException: Cannot access a native attribute as a reference attribute4~
14:48 psch grml
14:50 BooK in perl6, there is no need for try because CATCH is "attached" to the enclosing scope. did I get that right?
14:51 moritz aye
14:51 leont Usually
14:51 moritz though of course, 'try' is still a very handy shortcut
14:51 RabidGravy in that sense yes,  but try is still useful to "try and get a value or undef"
14:51 psch our try is notably different than e.g. javas
14:52 arnsholt Skarsnik: If you're iterating a hash, for %hash will give you the pairs in it though. So no need to zip together the keys and values separately
14:52 BooK ok, I should have actually looked for a try keyword :-)
14:52 psch in that the latter uses it to denote a "we care about the Exception" scope, while we use it for a "we don't care about the Exception, just don't die" scope
14:52 arnsholt In case that's what you're doing =)
14:52 BooK but the doc for Exception pointed to CATCH only
14:52 leont try without a catch swallows the exception
14:53 BooK and http://design.perl6.org/S04.html#Phasers said "A CATCH block is just a trait of the closure containing it"
14:53 leont I tend to use try with catch, but that's probably more out of habit from other languages
14:53 BooK so I assumed I didn't even need try, and leont comment makes me understand why it's still needed
14:53 Skarsnik arnsholt, I am putting the keys and the values in separate arrays
14:53 psch leont: uhm, how do i run harness6? the make invocations i tried use harness5
14:54 arnsholt Skarsnik: Right, in that case it's not what you want =)
14:54 leont I hadn't enabled it because of said issues
14:54 psch oh, so manually
14:54 leont Just run ./perl6 -Ilib t/harness6 t/<whatever>
14:54 leont ./perl6-j -Ilib t/harness6 t/01-sanity t/04-nativecall
14:55 timotimo m: my $b; $b.^set_name('MyClass'); my $c; say $c.WHAT
14:55 camelia rakudo-moar f4266f: OUTPUT«(MyClass)␤»
14:55 BooK I should probably have read that whole section
14:55 timotimo Skarsnik: that's how you change every untyped variable into MyClass instead!
14:56 ^elyse^ joined #perl6
14:56 leont I should have added that incantation as a comment to the jvm Makefile
14:57 Skarsnik What?! $c get the last type?
14:57 timotimo no
14:57 timotimo $b's type is Any. you set Any's name to MyClass
14:57 arnsholt Skarsnik: It changes the *name* of the Any type
14:57 Skarsnik oohh
14:57 timotimo now every Any is actually called MyClass
14:58 leont Dogfooding TAP::Harness in its travis configuration, it works :-)
14:58 isBEKaml joined #perl6
14:58 RabidGravy haha, that's evil
14:58 arnsholt m: class T {}; Any.^set_name("T"); my $a; my T $b; say $a.WHAT, $a.WHAT.WHERE; say $b.WHAT,  $b.WHAT.WHERE # Observe
14:58 camelia rakudo-moar f4266f: OUTPUT«(T)33942928␤(T)140221499061984␤»
14:58 arnsholt The two objects report types with the same names, but the object identities, crucially, are different
14:59 arnsholt Declaring the type of a variable is done between the "my" and the variable name, not MOP shenanigans (which is what anything using .^ is)
14:59 hankache joined #perl6
15:02 BooK interestingly, it's try { CATCH { ... } } and not try { ... } catch { ... }
15:02 psch leont: fwiw, running the eval-server separately (with commenting it out in harness6) gives me "All 24 subtests passed" for 01-sanity/01-literals.t, but still shows "Dubious, test returned 255"
15:02 leont Hmmmm
15:03 timotimo BooK: yeah, the good thing about that is you have all your lexicals still valid inside the CATCH block like that
15:03 timotimo psch: does that mean it doesn't have a plan in it?
15:03 timotimo or doesn't have a done()?
15:03 Skarsnik m: use NativeCall; my %h = "I32" => int32, "I8" => int8; for %h.kv -> $k, $v {say $k, nativesizeof($v)}
15:03 arnsholt Oh, also relevant to the .^set_name shenanigans is that it's only the *reported* name of Any that's changed. It's still spelled Any in the code =)
15:03 camelia rakudo-moar f4266f: OUTPUT«I324␤I81␤»
15:03 BooK timotimo: the other nice thing is you can put it at the beginning, or wherever you want
15:04 timotimo that's true, too
15:04 psch timotimo: i guess, it manually outputs "1..24" at the start
15:04 psch no &plan, no &done-testing
15:04 timotimo hm, if the 1..24 gets to the tap parser, that should work
15:04 zakharyas joined #perl6
15:05 RabidGravy BooK. also you can CATCH { } specific exceptions in the scope, but leave unexpected ones to the try { }
15:06 BooK RabidGravy: I'm trying to work that out
15:06 BooK a bare CATCH {} just lets it go through
15:06 psch same for a file with plan, though
15:06 psch BooK: CATCH { } is similar to given { }, in that regard
15:06 BooK so I need to mark it as handled, I guess
15:06 timotimo so something makes it crash in the end?
15:06 psch BooK: a given { } without anything inside also doesn't do anything
15:07 BooK the doc says the exception is in $_, but that's because of the similarity to given {} you just mentionned
15:07 Skarsnik hm why I get an undeclared routine error writing use Gumbo::Binding; test-cstruct-size(:cheaders(@headers), :types(("GumboOutput" => gumbo_ouput_s, "GumboNode" => gumbo_node_s)), :clibs(@libs), :modulename("Gumbo::Binding")); for the gumbo_* stuff
15:08 BooK I'm not familiart yet with .perl or .gist, and say @!.perl dies in a weird way
15:08 hankache m: say 'abc' ~~ m/ a?c /;
15:08 camelia rakudo-moar f4266f: OUTPUT«「c」␤»
15:08 BooK m: say @!.perl
15:08 camelia rakudo-moar f4266f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TwCrboHyTs␤Cannot negate . because dotty infix operators are too fiddly␤at /tmp/TwCrboHyTs:1␤------> 3say @!.7⏏5perl␤»
15:08 RabidGravy m : class X::Foo is Exception { };   { CATCH { when X::Foo { say "woo" } }; Bool.pick && X::Foo.new.throw }
15:08 hankache shouldn't this return Nil?
15:08 RabidGravy m: class X::Foo is Exception { };   { CATCH { when X::Foo { say "woo" } }; Bool.pick && X::Foo.new.throw }
15:08 camelia rakudo-moar f4266f: ( no output )
15:08 RabidGravy m: class X::Foo is Exception { };   { CATCH { when X::Foo { say "woo" } }; Bool.pick && X::Foo.new.throw }
15:08 camelia rakudo-moar f4266f: OUTPUT«woo␤»
15:09 psch hankache: you didn't anchor anything
15:09 RabidGravy m: class X::Foo is Exception { };   { CATCH { when X::Foo { say "woo" } }; Bool.pick && X::Foo.new.throw; die "bah" }
15:09 camelia rakudo-moar f4266f: OUTPUT«bah␤  in block <unit> at /tmp/_be_QY_o2A:1␤␤»
15:09 RabidGravy m: class X::Foo is Exception { };   { CATCH { when X::Foo { say "woo" } }; Bool.pick && X::Foo.new.throw; die "bah" }
15:09 camelia rakudo-moar f4266f: OUTPUT«woo␤»
15:09 BooK ok so when implicitely handles the exception
15:09 leont psch: what happens if you add exit 0 to the end of the test?
15:09 RabidGravy that is
15:09 RabidGravy BooK: yep
15:10 RabidGravy the "default" case can be used for any others
15:10 hankache psch: i am new to regex
15:10 leont Also, it worked for me, but I did it with another test, could you try t/02-op-match.t or some such?
15:11 hankache psch can you kindly tell me how to "anchor"
15:11 psch hankache: http://doc.perl6.org/language/regexes
15:11 hankache coming from SQL ? and * are wildcards
15:11 timotimo ah, yeah, ? and * work differently in regex
15:12 timotimo i think ? means "any single character"?
15:12 timotimo in SQL, i mean
15:12 hankache yes timotimo
15:12 moritz % is the wildcard in LIKE queries
15:12 timotimo the equivalent of that is the dot in regex
15:12 moritz corresponding to .* in a regex
15:12 BooK and m: CATCH { $_.handled = True }; die "aaahhh";
15:12 BooK m: CATCH { $_.handled = True }; die "aaahhh";
15:12 camelia rakudo-moar f4266f: OUTPUT«Method 'handled' not found for invocant of class 'X::AdHoc'␤  in block <unit> at /tmp/5klJXEGBW9:1␤␤»
15:12 psch leont: i tried t/spec/S05-operators/match.t, cause that exists, and still get the dubious 255
15:12 BooK m: CATCH { default {} }; die "aaahhh";
15:12 camelia rakudo-moar f4266f: ( no output )
15:12 hankache psch thanks i'll read it
15:13 BooK and m: CATCH { say $_.handled; default { say $_.handled } }; die "aaahhh";
15:13 psch leont: note though it still passes every test
15:13 yqt joined #perl6
15:13 BooK m: CATCH { say $_.handled; default { say $_.handled } }; die "aaahhh";
15:13 camelia rakudo-moar f4266f: OUTPUT«Method 'handled' not found for invocant of class 'X::AdHoc'␤  in block <unit> at /tmp/ZSNf7YzHBo:1␤␤»
15:14 BooK ok, there's something I don't know how to do
15:14 timotimo i think handled may be a private attribute
15:14 psch it is
15:14 psch accessed by Booling
15:14 psch (amongst others afair)
15:14 leont What do they return when run by hand?
15:14 BooK but S04 says : $!.handled = 1;
15:15 psch leont: when ran through eval-client.pl, $? is 0
15:15 psch (bash $? that is)
15:15 psch and all tests pass
15:15 psch same EvalServer instance as the harness6 invocation uses
15:16 hankache is there a wildcard other than .
15:17 hankache . is only one character
15:17 hankache something that allows many characters
15:17 psch hankache: that's what quantifiers are for
15:17 timotimo instead of multi-character-matching wildcards, regex has "quantifiers"
15:18 psch m: say "aaaa" ~~ / a+ /
15:18 camelia rakudo-moar f4266f: OUTPUT«「aaaa」␤»
15:18 timotimo every kind of wildcard matches exactly once
15:18 pmurias nqp-m: say(nqp::escape("line2\r\n"))
15:18 camelia nqp-moarvm: OUTPUT«line2
15:18 timotimo ? is actually also a quantifier; it means "match the previous thing either once or not at all"
15:18 pmurias nqp-p: say(nqp::escape("line2\r\n"))
15:19 pmurias is nqp-m behaving correctly? it seems like some unicody refactor broke nqp::escape
15:19 timotimo could be
15:19 camelia joined #perl6
15:19 timotimo it does the opposite of what it's supposed to do %)
15:20 timotimo ah, no, it just does nothing to it
15:20 hankache ok but say you have "abcdef" and "aef" and you want to check if it starts with "a" and ends with "f"
15:20 camelia nqp-parrot: OUTPUT«Can't exec "./rakudo-inst/bin/nqp-p": No such file or directory at lib/EvalbotExecuter.pm line 193.␤exec (./rakudo-inst/bin/nqp-p /tmp/J_UNGEpZZl) failed: No such file or directory␤Server error occurred! Closing Link: ns1.niner.name (Quit: camelia)␤Lost conn…»
15:20 timotimo right, then you do / ^ a .* f $ /
15:21 pmurias it seems like \r\n was turned into one grapheme and nqp::escape wasn't updated
15:21 timotimo alternatively $foo.startswith("a") && $foo.endswith("f")
15:21 hankache ok
15:21 timotimo m: say "abcdef".startswith("a")
15:21 camelia rakudo-moar f4266f: OUTPUT«Method 'startswith' not found for invocant of class 'Str'␤  in block <unit> at /tmp/taCufjiHor:1␤␤»
15:21 * pmurias puts on his MoarVM hat and starts assembling a pull request
15:21 timotimo oops
15:21 timotimo disregard that!
15:21 psch timotimo: ENOKEBAB
15:21 timotimo those methods don't exist!
15:21 timotimo m: say "abcdef".starts-with("a")
15:21 camelia rakudo-moar f4266f: OUTPUT«True␤»
15:22 timotimo m: say "abcdef".ends-with("f")
15:22 camelia rakudo-moar f4266f: OUTPUT«True␤»
15:22 RabidGravy chilli SAUCE?
15:22 hankache i can also quantify \D
15:22 hankache right?
15:22 timotimo of course
15:22 timotimo what is \D?
15:22 psch \D is probably our \d
15:22 RabidGravy anything that is a literal or stands for a literal can be quantified
15:22 timotimo oh, "not digit"
15:23 timotimo RabidGravy: what do you call what % and %% do?
15:23 psch at least i think SQL escapes are case insensitive as well, but i might be misremembering
15:23 timotimo because they modify a quantifier
15:23 timotimo well, \d is "a digit" and \D is "anything but a digit"
15:24 BooK so a failed parse returns Nil, but where do I find details about the failure?
15:24 RabidGravy "quantifier modifying thingies"
15:25 timotimo BooK: it's very hard to generally figure out things about a failure to match
15:25 * leont is observing the return value of MAIN not being the return value of the program; is that deliberate?
15:25 timotimo because matches usually do backtracking and scanning
15:25 timotimo leont: i think it's very easy to accidentally return something you don't mean to return in a sub MAIN
15:26 BooK timotimo: Perl6 manages to give nice error messages about itself, doesn't it?
15:26 timotimo but if you throw an exception, you get a failing exit code, right?
15:26 timotimo that's right; the perl6 grammar has a "high water mark" system
15:26 timotimo it remembers what's the farthest that it had matched and what possibilities there were to continue matching
15:27 BooK timotimo: I'm trying to give a more useful error than this one: https://github.com/moritz/json/blob/master/lib/JSON/Tiny.pm#L59
15:27 timotimo that's what you get "expected: postfix, semicolon, ..." from
15:29 BooK at the stage the exception is thrown, it's too late to have access to the useful info, I assume
15:30 timotimo "the exception"?
15:30 timotimo oh
15:30 timotimo when i said "the perl6 grammar", i meant the one that rakudo has internally to parse perl6 code
15:30 timotimo sadly, you don't get that for free in any grammar
15:31 timotimo so in this case, the "useful info" doesn't actually exist :(
15:32 RabidGravy I suppose that you would have to keep track of where you got to in the actions
15:32 BooK I was wondering
15:33 BooK so the info would be in the action object handed to the grammar
15:33 spider-mario joined #perl6
15:33 RabidGravy could be
15:34 BooK for a first contribution to that module, I'd like to be able to say something like "parsing stopped at character 1234"
15:34 pmurias the high mark thing should be made pluggable
15:34 timotimo i think it'd be better to put code for that in the grammar rather than the actions
15:34 BooK how do you get access to the data?
15:35 BooK attributes of the grammar?
15:35 BooK which need to be reset when entering TOP?
15:35 timotimo the current position is a property of the match object, or rather, the cursor
15:35 BooK the doc on Cursor was very sparse, kinda "nothing to see here, move along"
15:35 timotimo yeah
15:36 BooK http://doc.perl6.org/type/Cursor
15:36 timotimo m: "foo bar baz quux 123" ~~ / (\w+ { say $/.CURSOR.pos } ) + % \s+
15:36 camelia rakudo-moar f4266f: OUTPUT«5===SORRY!5===␤Regex not terminated.␤at /tmp/8M6BNDcEhg:1␤------> 3~ / (\w+ { say $/.CURSOR.pos } ) + % \s+7⏏5<EOL>␤Unable to parse regex; couldn't find final '/'␤at /tmp/8M6BNDcEhg:1␤------> 3~ / (\w+ { say $/.CURSOR.pos } ) + % \s+…»
15:36 timotimo m: "foo bar baz quux 123" ~~ / (\w+ { say $/.CURSOR.pos } ) + % \s+ /
15:36 camelia rakudo-moar f4266f: OUTPUT«3␤7␤11␤16␤20␤»
15:37 timotimo m: "foo bar baz quux 123".substr(20)
15:37 camelia rakudo-moar f4266f: ( no output )
15:37 timotimo m: "foo bar baz quux 123".substr(20).say
15:37 camelia rakudo-moar f4266f: OUTPUT«␤»
15:37 timotimo m: say "1" ~~ / \w /
15:37 camelia rakudo-moar f4266f: OUTPUT«「1」␤»
15:37 timotimo oh, duh :)
15:37 timotimo m: "foo bar baz quux 123" ~~ / (\a+ { say $/.CURSOR.pos } ) + % \s+ /
15:37 camelia rakudo-moar f4266f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/txeLOrfZs1␤Unrecognized backslash sequence: '\a'␤at /tmp/txeLOrfZs1:1␤------> 3"foo bar baz quux 123" ~~ / (\7⏏5a+ { say $/.CURSOR.pos } ) + % \s+ /␤    expecting any of:␤        term␤»
15:37 timotimo how do i "alpha"?
15:37 timotimo m: "foo bar baz quux 123" ~~ / (<.alpha>+ { say $/.CURSOR.pos } ) + % \s+ /
15:37 camelia rakudo-moar f4266f: OUTPUT«3␤7␤11␤16␤»
15:38 timotimo m: my $highest_so_far = 0; (my $source = "foo bar baz quux 123") ~~ / (<.alpha>+ { $highest_so_far max= $/.CURSOR.pos } ) + % \s+ /; say $source.substr($highest_so_far)
15:38 camelia rakudo-moar f4266f: OUTPUT« 123␤»
15:38 timotimo do note that JSON::Tiny is already woefully slow; adding those closures in there won't make it any faster :(
15:39 tokuhiro_ joined #perl6
15:39 rangerprice joined #perl6
15:40 timotimo JSON::Fast is only 2x faster, but due to its implementation it's able to give you the last position it tried to match, and also what it was trying to match at that point
15:42 BooK is it using grammars too?
15:42 timotimo nah
15:42 timotimo https://github.com/timo/json_fast/blob/master/lib/JSON/Fast.pm
15:42 pmurias are the grapheme numbers for composed characters constant?
15:42 RabidGravy I found something that I considered perfectly valid that JSON::Fast borked on the other day, but forgot what it was
15:43 timotimo pmurias: you mean the generated numbers? don't rely on them
15:44 timotimo RabidGravy: that's potentially easy to do :)
15:45 _mg_ joined #perl6
15:45 kaare_ joined #perl6
15:45 BooK timotimo: so perl6 grammars are awesome, but don't use them because they're slow?
15:46 timotimo json doesn't need backtracking at all
15:46 timotimo so a big part of what makes grammars awesome is wasted on them
15:46 BooK but it's possible to not backtrack in grammar, I just read that
15:46 timotimo right, "ratchet" mode
15:46 timotimo i'm not sure if we generate much better code from that yet
15:46 mr_ron joined #perl6
15:46 timotimo it's been a while since i last touched that part of the code
15:49 timotimo on top of ratchet mode there's also more precise backtracking controls, but at least parts of that aren't implemented yet
15:50 _28_ria joined #perl6
15:54 dalek doc: bbc2e39 | (Philippe Bruhat (BooK))++ | doc/Language/grammars.pod:
15:54 dalek doc: Fix typo
15:54 dalek doc: review: https://github.com/perl6/doc/commit/bbc2e39f90
15:54 khw joined #perl6
15:57 skids joined #perl6
15:59 raiph .tell pmurias nwc10 on NFG attacks: http://irclog.perlgeek.de/perl6/2015-04-07#i_10400549
15:59 yoleaux raiph: I'll pass your message to pmurias.
16:04 pmurias I made a pull request on MoarVM to fix nqp::escape
16:04 yoleaux 15:59Z <raiph> pmurias: nwc10 on NFG attacks: http://irclog.perlgeek.de/perl6/2015-04-07#i_10400549
16:06 timotimo pmurias: looks good to me
16:07 timotimo i'll just wait for the travis checks to complete and i'll merge it
16:09 pmurias timotimo: travis runs tests for rakudo-m?
16:10 Ven joined #perl6
16:11 timotimo no, it only runs the nqp tests
16:11 timotimo god damn it, clang is slow
16:20 yeahnoob joined #perl6
16:23 grondilu pmurias: what's the status of the js backend?  I've just learnt about Emscripten (C/C++ compiler to javascript) and I was wondering if someone has ever tried to port MoarVM to it, or if that would make sense.
16:23 * awwaiid contemplates the concept of "Perl6 Axioms" -- the smallest possible part of the language upon which the rest could be built
16:24 grondilu awwaiid: that's almost certainly arbitrary.  In truth, any turing complete language would do.
16:25 awwaiid grondilu: pmurias and I talked about that a bit a while back, and they said that the emscripten performance/integration is good enough for demos of languages but not as much else -- I tried to counter with the two OCaml compilers, but then realized that neither of them work as just "run ocaml via enscripten" like I initially thought
16:26 grondilu ok
16:26 awwaiid grondilu: mmm. I don't mean what are the axioms of a perl6 _implementaiton_, I mean of the language itself. So like some LISP languages have a pretty small core language and the reset can be implemented (possibly inefficiently) in libraries.
16:26 awwaiid re emscripten -- that doesn't mean you shouldn't try!
16:26 Ven joined #perl6
16:27 grondilu wouldn't that be STD?
16:27 habamax joined #perl6
16:28 awwaiid well my hypothesis is that the STD is more than axioms -- it has shortcuts/optimizations and such, and is invented like before our future macro system.
16:33 Skarsnik m: class T {}; my %h = "T" => T; say %h;
16:33 camelia rakudo-moar f4266f: OUTPUT«T => (T)␤»
16:34 Skarsnik hm When I write
16:34 Skarsnik use Gumbo::Binding# contening the gumbo_ type; my gumbo_output_s $m;
16:34 Skarsnik my %typ = ("GumboOutput" => gumbo_ouput_s, "GumboNode" => gumbo_node_s);
16:35 Skarsnik the hash affection fail, saying it can't find gumbo_ouput_s routine
16:38 geekosaur right, that would be looking for a function, not a type. not sure how you write the type there but suspect it involves ::
16:38 sprocket hello, perl6!
16:39 Skarsnik m: use NativeCall; class T is repr('CStruct'){}; my %h = "T" => T; say %h;
16:39 camelia rakudo-moar f4266f: OUTPUT«T => (T)␤»
16:39 Skarsnik hm
16:40 geekosaur maybe not. so... exporting of types? hm
16:41 geekosaur that seems wrong too.
16:41 * geekosaur doesn't know :(
16:43 ugexe gumbo_output_s = ::($m) ?
16:43 moritz what's wrong with exporting types?
16:45 Skarsnik http://pastebin.com/MZ4yrz3p
16:48 Skarsnik Types can be find in https://github.com/Skarsnik/perl6-gumbo/blob/master/lib/Gumbo/Binding.pm6
16:48 Oatmeal joined #perl6
16:48 ugexe did you happen to try GumboOutput => ::("gumbo_output_s")?
16:49 ugexe the error doesn't happen until line 14, so im guessing the type applied fine to $m
16:49 Skarsnik yes
16:51 Skarsnik it work with ::(""), but why an imported type can't be used directly in this case?
16:51 ugexe how does it know its not a function?
16:52 moritz you need ::('&foo') or &::('foo') to dynamically lookup a function
16:52 Skarsnik well why my previous example work? m: use NativeCall; class T is repr('CStruct'){}; my %h = "T" => T; say %h;
16:55 ZoffixW joined #perl6
16:58 pmurias awwaiid: I haven't actually measured the performance of the enscripten approach
17:00 pmurias grondilu: re status, nqp-js-running-on-moar fails 4 t/nqp tests, nqp-js-compiled-by-nqp-js-running-on-node.js fails 10 t/nqp tests
17:01 pmurias grondilu: performance will be moar-with-jit-disabled-slightly-slower
17:02 pmurias grondilu: with slightly being an unknown factor
17:06 dalek modules.perl6.org: 31d6c3d | (Zoffix Znet)++ | web/build-project-list.pl:
17:06 dalek modules.perl6.org: Clean up useless code
17:06 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/31d6c3d338
17:06 dalek modules.perl6.org: 9a1ed6e | (Zoffix Znet)++ | web/build-project-list.pl:
17:06 dalek modules.perl6.org: Use system() safely
17:06 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/9a1ed6e0fd
17:06 Begi1115 joined #perl6
17:07 ^elyse^ joined #perl6
17:08 awwaiid pmurias: you keeping some repo up to date for us to stare at / mess with?
17:11 pmurias awwaiid: perl6/nqp on github
17:12 pmurias it's in the main nqp repo, in the src/vm/js
17:12 awwaiid oh right, I think you told me that. no branch or anything?
17:13 pmurias awwaiid: it's merged in
17:13 pmurias keeps bitrot from piling in
17:13 awwaiid awesomesauce
17:13 awwaiid that's the way to go
17:17 RabidGravy I'm sure I've asked this before but how does one extract the version from a module i.e. "class F:ver<v0.0.1> { }" <- the value of ver
17:18 moritz m: class F:ver<v0.0.1> { }; say F.^ver
17:18 camelia rakudo-moar f4266f: OUTPUT«Method 'gist' not found for invocant of class 'NQPMu'␤  in block <unit> at /tmp/bZPqTLZB0y:1␤␤»
17:18 RabidGravy ah yes
17:18 moritz :(
17:18 moritz doesn't seem to work, though
17:18 moritz m: class F:ver<1> { }; say F.^ver
17:18 camelia rakudo-moar f4266f: OUTPUT«Method 'gist' not found for invocant of class 'NQPMu'␤  in block <unit> at /tmp/18FlOiHyVM:1␤␤»
17:19 RabidGravy I think I worked it out myself, found it didn't work and wandered off on another problem
17:19 sprocket moritz: what does the “^” imean for that method call?
17:19 RabidGravy "on the HOW"
17:19 sprocket aah, ok
17:19 RabidGravy i.e. the meta-object
17:19 sprocket gotcha
17:23 rindolf joined #perl6
17:34 zakharyas joined #perl6
17:35 RabidGravy I RT'd the "ver not working properly" with RT #126583 for information
17:36 RabidGravy it may have already been in there but it was difficult to search for
17:42 grondilu joined #perl6
17:43 ugexe yea i kinda dread using rt
17:45 tokuhiro_ joined #perl6
17:51 zacts joined #perl6
17:53 eliasr joined #perl6
18:07 Begi1115 joined #perl6
18:07 lizmat joined #perl6
18:08 colomon joined #perl6
18:17 Ven_ joined #perl6
18:21 cognominal joined #perl6
18:25 Ven_ joined #perl6
18:28 zengargoyle hrm, i think NativeCall is beyond me at the moment.
18:30 zengargoyle is CArray[uint32].new( "string".comb».ord )  a reasonable thing to do?
18:32 zengargoyle when the C version is (uint32 *)L"strint"
18:32 psch m: use NativeCall; my $arr = CArray[uint32].new( "string".comb>>.ord ); say $arr[0]; say "s".ord # seems to work fine..?
18:32 camelia rakudo-moar f4266f: OUTPUT«115␤115␤»
18:32 moritz "string".comb».ord # shorter: "string".ords
18:34 zengargoyle ah, i guess my Segfault is maybe something else... :P
18:37 Ven_ joined #perl6
18:39 brrt joined #perl6
18:40 telex joined #perl6
18:40 llfourn does p6 have something like __DATA__?
18:40 psch zengargoyle: that might be NativeCall free()-ing before the lib expects it
18:41 psch zengargoyle: i'm not really into that, though, so take that as a "there might be something spooky somewhere", nothing else :)
18:41 psch llfourn: q:to//
18:41 Ven_ joined #perl6
18:41 psch llfourn: the difference there is that __DATA__ (afair) can be wherever in the file, but q:to// expects it directly after the statement
18:42 psch well, almost, __DATA__ still has to be at the end of the file i think?
18:42 llfourn psch: q:to// is like HEREDOC then?
18:42 llfourn psch: yeah data has to be at the end
18:42 psch llfourn: right, q:to// is probably more like HEREDOC
18:42 llfourn psch: kk thanks :)
18:44 psch llfourn: http://design.perl6.org/S02.html#Double-underscore_forms for reference
18:45 zengargoyle psych: found my bug, a rogue '-' snuck in somewhere and my lack of adding || fail bit me.
18:47 zengargoyle do submethod DESTROY {…} get called when you do $obj = Type, or how do the Perl 5 like $obj=undef to get DESTROY to free something?
18:47 zengargoyle i'm not seeing my debug note in the DESTROY happening.
18:50 psch zengargoyle: you can't really rely on DESTROY being called if you don't call it yourself, due to GC-specifics i don't understand
18:51 psch zengargoyle: note that it was added primarily to make Inline::Perl5 not leak things, and Inline::Perl5 calls it manually
18:51 psch zengargoyle: it gets called whenever an object gets GC collected, but this might not happen on program exit
18:52 Skarsnik nativecall has a explicitly-manage to avoid the GC to do work on stuff
18:52 Skarsnik *not
18:58 AlexDaniel m: say ^1000.pick
18:58 camelia rakudo-moar f4266f: OUTPUT«Potential difficulties:␤    Precedence of ^ is looser than method call; please parenthesize␤    at /tmp/6GzxSAlgWN:1␤    ------> 3say ^10007⏏5.pick␤^1000␤»
18:58 AlexDaniel m: say (^1000).pick
18:58 camelia rakudo-moar f4266f: OUTPUT«615␤»
18:58 uruwi joined #perl6
18:59 dalek modules.perl6.org: 1877371 | (Zoffix Znet)++ | web/ (2 files):
18:59 dalek modules.perl6.org: Add P6Project::SpriteMaker module
18:59 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/1877371cd0
19:03 psch AlexDaniel: we got auto-unspace for dotty ops
19:03 psch m: say ^1000 .pick
19:03 camelia rakudo-moar f4266f: OUTPUT«931␤»
19:04 psch (actually i think it's precedence lowering relative to before..?)
19:04 AlexDaniel psch: oh nice! Thanks!
19:12 yqt joined #perl6
19:17 nys joined #perl6
19:19 arnsholt Skarsnik, zengargoyle: explicitly-manage is only for strings, and also a terrible terrible hack
19:20 arnsholt And the reason you can't rely on DESTROY being fired is that when a process is exiting, it's cheaper to just free all of the memory you've allocated (or just exit without freeing) than doing a GC run
19:21 arnsholt After all, it's all garbage at that point
19:21 pmurias joined #perl6
19:21 arnsholt And if your process is short enough to not trigger a GC during execution of the mainline, no DESTROYS will be fired
19:25 Ven joined #perl6
19:26 psch there is nqp::force_gc, but it still relies on some sort of internals knowledge
19:26 psch m: use nqp; class A { submethod DESTROY { say "destroyed" } }; for ^1000 { A.new }; nqp::force_gc
19:26 camelia rakudo-moar f4266f: ( no output )
19:26 psch m: use nqp; class A { submethod DESTROY { say "destroyed" } }; for ^10000 { A.new }; nqp::force_gc
19:26 camelia rakudo-moar f4266f: OUTPUT«destroyed␤destroyed␤destroyed␤destroyed␤destroyed␤destroyed␤destroyed␤destroyed␤destroyed␤destroyed␤destroyed␤destroyed␤destroyed␤destroyed␤destroyed␤destroyed␤destroyed␤destroyed␤destroyed␤destroyed␤destroyed␤dest…»
19:26 psch as in, the different gc gens have sizes and whatnot
19:27 psch as i said, i don't really know anything about the moar gc
19:37 zengargoyle i'm more concerned that the library will have done something (lockfile, other permanent thing) that doesn't get cleaned up unless the free() is called at some point.
19:37 zengargoyle probably not in this case...
19:39 psch zengargoyle: that's probably best served by an END block
19:40 Ven joined #perl6
19:43 Praise joined #perl6
19:47 tokuhiro_ joined #perl6
19:53 dalek rakudo/nom: 4b8937f | lizmat++ | src/core/Str.pm:
19:53 dalek rakudo/nom: Fix some off-by-one and skip-empty issues
19:53 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4b8937fa7d
19:56 Ven joined #perl6
20:02 lizmat m: dd "abcde".split("",:all)  # historically, this would *not* put any delimiters in the result
20:02 camelia rakudo-moar f4266f: OUTPUT«List $var = $("", "a", "b", "c", "d", "e", "")␤»
20:03 lizmat in the light of the new :v,:k,:kv,:p on split, I think this is inconsistent
20:03 lizmat TimToady: do you agree ??  ^^
20:03 Begi1115 joined #perl6
20:11 Ven joined #perl6
20:18 dalek rakudo/nom: 8b834cc | lizmat++ | src/core/Str.pm:
20:18 dalek rakudo/nom: Fix an off-by-one just introduced :-(
20:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8b834cca9a
20:20 moritz did anybody mention http://libcello.org/learn/garbage-collection yet?
20:25 dalek doc: fa86569 | lizmat++ | doc/Type/Str.pod:
20:25 dalek doc: Document all old/new features of Str.split
20:25 dalek doc: review: https://github.com/perl6/doc/commit/fa86569f51
20:31 Ven joined #perl6
20:37 Ulti looks like done is now a reserved word? what do you use to end tests?
20:38 lizmat done-testing
20:38 lizmat done is now part of the supply { } sugar
20:38 lizmat as is emit()
20:39 Ulti okedoke, thanks
20:39 lizmat yw  :-)
20:39 lizmat Ulti: of course, using a plan is always better!
20:39 Ulti ahh yeah I remember changing from done_testing with my other tests
20:39 Ulti :P
20:40 Ven joined #perl6
20:40 lizmat m: &&::{}[];;
20:40 camelia rakudo-moar 8b834c: ( no output )
20:40 lizmat m: say &&::{}[];;
20:40 camelia rakudo-moar 8b834c: OUTPUT«Nil␤»
20:41 dalek nqp: fb0aad7 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
20:41 dalek nqp: [js] Implement QAST::Stmt.
20:41 dalek nqp: review: https://github.com/perl6/nqp/commit/fb0aad78ec
20:41 dalek nqp: 61f36ca | (Pawel Murias)++ | tools/build/MOAR_REVISION:
20:41 dalek nqp: Bump Moar for fix with nqp::escape
20:41 dalek nqp: review: https://github.com/perl6/nqp/commit/61f36ca55d
20:41 dalek nqp: c4c2b73 | (Pawel Murias)++ | t/nqp/59-nqpop.t:
20:41 dalek nqp: Test that nqp::escape works on \r\n.
20:41 dalek nqp: review: https://github.com/perl6/nqp/commit/c4c2b73a65
20:48 dalek roast: 73f6740 | lizmat++ | integration/weird-errors.t:
20:48 dalek roast: Fudge what seems to be a bogus test now
20:48 dalek roast: review: https://github.com/perl6/roast/commit/73f6740511
20:55 lizmat m: sub a($x is rw) { $x; }; a 42    # dies as expected
20:55 camelia rakudo-moar 8b834c: OUTPUT«Parameter '$x' expected a writable container, but got Int value␤  in sub a at /tmp/2NK1Hbv1Ub:1␤  in block <unit> at /tmp/2NK1Hbv1Ub:1␤␤»
20:56 lizmat m: sub a($x is rw) { $x; }; { a 42 }()   # but not if within a block ?
20:56 camelia rakudo-moar 8b834c: ( no output )
20:58 lizmat m: sub a($x is rw) { $x; }; { a 42 }   # seems to be optimizer related
20:58 camelia rakudo-moar 8b834c: ( no output )
20:58 lizmat $ perl6 --optimize=off -e  'sub a($x is rw) { $x }; { a 42 }'
20:58 lizmat Parameter '$x' expected a writable container, but got Int value
21:01 lizmat RT #126585
21:02 dalek roast: 4ab8381 | lizmat++ | S06-traits/misc.t:
21:02 dalek roast: Fudge test for RT #126585
21:02 dalek roast: review: https://github.com/perl6/roast/commit/4ab8381c16
21:04 fjk joined #perl6
21:04 fjk left #perl6
21:08 lizmat All tests successful.
21:08 lizmat Files=1071, Tests=49769, 225 wallclock secs (12.20 usr  3.41 sys + 1383.10 cusr 125.43 csys = 1524.14 CPU)
21:08 lizmat .oO( just a nice sight :-)
21:09 psch lizmat: that "is rw" thing is weird.  before my patch relating that "sub f (int $x is rw) { 'int' }" would dispatch successfully, but it's clearly wrong
21:09 lizmat psch: well, it's an optimizer issue, as it fails correctly if switched off or the body of the sub is more than just $x
21:09 psch lizmat: i have no clue how exactly my patch interacts with what we had before to make it work as-is currently, though...
21:10 psch lizmat: yeah, my patch was indirectly Optimizer related as well
21:10 ^elyse^ joined #perl6
21:10 lizmat m: sub a($x is rw) { $x; say "huh" }; { a 42 }
21:10 camelia rakudo-moar 8b834c: OUTPUT«Parameter '$x' expected a writable container, but got Int value␤  in sub a at /tmp/AkQtodCfhj:1␤  in block <unit> at /tmp/AkQtodCfhj:1␤␤»
21:10 lizmat so as soon as the body is more than just $x, it fails correctly
21:11 psch star-m: sub a($x is rw) { "foo" }; say a 5
21:11 camelia star-m 2015.09: OUTPUT«foo␤»
21:11 psch star-m: sub a($x is rw) { $x }; say a 5
21:11 camelia star-m 2015.09: OUTPUT«5␤»
21:11 psch star-m: sub a($x is rw) { $x = $x + 1 }; say a 5
21:11 camelia star-m 2015.09: OUTPUT«Cannot assign to an immutable value␤  in sub a at /tmp/lJnKvlKbm5:1␤  in block <unit> at /tmp/lJnKvlKbm5:1␤␤»
21:11 Ven joined #perl6
21:11 psch note that's not Parameter::RW
21:11 psch so yeah, my patch is definitely just a side-grade... :)
21:12 lizmat well, at least it's not changing the value of the constant 5  :-)
21:12 lizmat like in Perl 5, you could change the value of undef
21:15 dalek modules.perl6.org: cf95cb4 | (Zoffix Znet)++ | / (23 files):
21:15 dalek modules.perl6.org: Use a sprite instead of multiple images (Closes #21)
21:15 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/cf95cb4ea4
21:17 raoulvdberge joined #perl6
21:18 eliasr joined #perl6
21:22 psch lizmat: yeah, it's weird.  i'll look at it again tomorrow, jvm ExceptionHandling is a bit too tough atm and xmas kinda matters more anyway
21:22 dalek ecosystem: 72a76b1 | (Zoffix Znet)++ | README.md:
21:22 dalek ecosystem: Suggest to check for common errors in META file
21:22 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/72a76b1095
21:23 lizmat yeah, and it seems to fail when it really matters
21:24 Timbus could I get a very quick rundown on how newline parsing now works in perl6, and if theres any way to redefine the delimiter, or what have you? I'm specifically pointing at this CCLASS_NEWLINE thingy
21:24 Timbus its now matching \n but I guess it used to match \r sometimes?
21:25 Timbus is there a uhh $INPUT_RECORD_SEPARATOR that I can use now
21:26 Ven joined #perl6
21:26 lizmat $?NL ?
21:26 lizmat m: say ?NL
21:26 camelia rakudo-moar 8b834c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7zdDPEAfTP␤Undeclared name:␤    NL used at line 1␤␤»
21:27 lizmat m: say $?NL
21:27 camelia rakudo-moar 8b834c: OUTPUT«␤␤»
21:27 lizmat m: print $?NL
21:27 camelia rakudo-moar 8b834c: OUTPUT«␤»
21:27 RabidGravy Zoffix, strangely I am just making a thing to test META files
21:27 Timbus lizmat, does this change the behaviour of matching CCLASS_NEWLINE in nqp?
21:28 lizmat afaik, it doesn't
21:28 Timbus oh
21:28 Timbus then Supply.lines needs a fix
21:28 lizmat the synthetic takes the properties of the base char, which is CR, which is CCLASS_NEWLINE
21:28 lizmat Timbus: it probably does...  :-)
21:28 lizmat busy with Str.split testing now... will look at it after that unless someone beats me to it :-)
21:29 raoulvdberge joined #perl6
21:30 ZoffixW RabidGravy, I'm secretly watching you.
21:30 ZoffixW :)
21:30 ZoffixW RabidGravy, I've also made this checker https://github.com/zoffixznet/p6-ecosystem-meta-checker and the modules.perl6.org builder also has a checker that outputs any errors at the end of the log file: http://modules.perl6.org/log/update.log
21:32 ZoffixW moritz, the log tells me Mojolicious::Plugin::AssetPack module is not installed
21:32 RabidGravy my plan is to just have a "meta-ok" sub which just laughs if there is no hope of it working
21:32 ZoffixW moritz, and the sprite stuff would also need Imager::File::PNG installed
21:36 khw joined #perl6
21:36 dalek ecosystem: 6c47654 | (Zoffix Znet)++ | README.md:
21:36 dalek ecosystem: Fix typo
21:36 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/6c476549c0
21:46 advwp joined #perl6
21:46 pmurias_ joined #perl6
21:46 dalek problem_solver_tutorial: 8ad43f9 | lichtkind++ | chapter/text0.md:
21:46 dalek problem_solver_tutorial: about demo program
21:46 dalek problem_solver_tutorial: review: https://github.com/perl6/problem_solver_tutorial/commit/8ad43f9ee2
21:46 dalek problem_solver_tutorial: d2ab7e2 | lichtkind++ | chapter/text0.md:
21:46 dalek problem_solver_tutorial: Merge branch 'master' of https://github.com/perl6/problem_solver_tutorial
21:46 dalek problem_solver_tutorial: review: https://github.com/perl6/problem_solver_tutorial/commit/d2ab7e26b9
21:48 tokuhiro_ joined #perl6
21:51 zakharyas joined #perl6
21:55 Ven joined #perl6
21:57 ugexe and thats 1 years of commits. what a terrible idea that was...
21:57 cognominal joined #perl6
21:58 zengargoyle can you do casting in NativeCall?  i.e. sub foo(Pointer[void]) is native(…); my CArray[uint32] $a.=new; foo(Pointer[void]($a)); # or something like that
21:58 TEttinger joined #perl6
21:59 pmurias_ ugexe: ?
21:59 zengargoyle or would it be better to have multi sub foo(<each type>) or sub foo(type1|type2|type3)
22:01 zengargoyle the library i'm trying to wrap returns a few things that it expects me to free()
22:01 dalek modules.perl6.org: c50c8b3 | (Zoffix Znet)++ | Build.PL:
22:01 dalek modules.perl6.org: Add new modules needed by spriter to the prereqs
22:01 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/c50c8b3965
22:01 ugexe pmurias: i did at least 1 perl/perl6 github commit every day for the last year
22:02 Begi1116 joined #perl6
22:04 AlexDaniel ugexe: and why is that a terrible idea?
22:04 pink_mist AlexDaniel: sounds like a terrible schedule to haveto stick to
22:04 ugexe ^
22:05 AlexDaniel actually, I did the same thing. But somehow it slipped simply because I had a really busy week
22:05 AlexDaniel and then I decided not to keep it
22:06 AlexDaniel only 179 days though
22:06 pink_mist it's the 'decided not to keep it' bit that's different I think...
22:09 TEttinger ugexe: congrats. keep it up, I'm at 511 days (512 if/when I commit something today)
22:10 TEttinger vendethiel has us both beat on longest streak
22:10 ugexe heh i at this point im not sure i could stop without actively trying
22:10 TEttinger same here
22:11 vendethiel *g*
22:11 TEttinger my commits haven't been to one project, and they've been in a number of languages
22:12 Ven joined #perl6
22:14 ugexe hmm so what kind of mental problems should i look forward to developing?
22:15 ZoffixW OCD :)
22:15 ugexe that got me this far already
22:15 ZoffixW Then nothing to worry about :P
22:16 ugexe so much for scoring some drugs out of it
22:17 virtualsue joined #perl6
22:18 moritz ZoffixW: re modules.perl6.org, I installed the modules, but fucked up the perlbrew environment
22:18 ZoffixW :)
22:18 moritz the updating script uses "source ~/perl5/perlbrew/etc/bashrc"
22:18 moritz but from cron I start it with "sh update-modules.perl6.org"
22:18 moritz and sh != bash
22:19 moritz should run again in one minute
22:20 dalek modules.perl6.org: 3dae26d | (Zoffix Znet)++ | web/ (8 files):
22:20 dalek modules.perl6.org: Use pure CSS instead of images for travis stuff
22:20 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/3dae26d61c
22:24 dalek modules.perl6.org: cd6a3bc | (Zoffix Znet)++ | web/assets/css/style.css:
22:24 dalek modules.perl6.org: Make travis buttons fill the cell and change on hover
22:24 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/cd6a3bc013
22:28 Ven joined #perl6
22:32 ZoffixW moritz++ sweet :D modules.perl6.org works now
22:32 * ZoffixW leaves for a beer
22:35 dalek rakudo-star-daily: 8b7e4eb | coke++ | log/ (9 files):
22:35 dalek rakudo-star-daily: today (automated commit)
22:35 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/8b7e4ebfbb
22:35 dalek rakudo-star-daily: a5a33d2 | coke++ | log/ (9 files):
22:35 dalek rakudo-star-daily: today (automated commit)
22:35 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/a5a33d25c0
22:35 dalek perl6-roast-data: bb2876a | coke++ | / (9 files):
22:35 dalek perl6-roast-data: today (automated commit)
22:35 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/bb2876af66
22:35 dalek perl6-roast-data: eb9022c | coke++ | / (9 files):
22:35 dalek perl6-roast-data: today (automated commit)
22:35 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/eb9022ce7f
22:37 raiph joined #perl6
22:38 dalek rakudo/nom: 4988c70 | lizmat++ | src/core/Str.pm:
22:38 dalek rakudo/nom: Fix :skip-empty handling on empty splitter
22:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4988c7082e
22:40 alexine m: say ^2**128 .pick.base(36); # hm, this kinda works as a password generator
22:40 camelia rakudo-moar 8b834c: OUTPUT«8TK82I6IS9BMZ25SZI2RAHSY4␤»
22:41 pink_mist nice .. except most places require mixed-case passwords :/
22:43 Ven joined #perl6
22:56 BenGoldberg joined #perl6
22:57 dalek ecosystem: 31c458d | RabidGravy++ | META.list:
22:57 dalek ecosystem: Add META6
22:57 dalek ecosystem:
22:57 dalek ecosystem: https://github.com/jonathanstowe/META6
22:57 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/31c458d7bd
22:57 RabidGravy Zoffix, there you go ;-)
22:58 RabidGravy If anyone can think of any "customary" usage in META files that I have missed please PR me ;-)
22:59 RabidGravy I'll do the Test::META tomorrow
23:08 RabidGravy It's interesting that the "numbers of modules per author" goes almost exactly as you would predict
23:08 Skarsnik ?
23:10 RabidGravy number -> number of modules per author:
23:10 RabidGravy 37 1
23:10 RabidGravy 16 2
23:10 RabidGravy 10 3
23:10 RabidGravy 8 4
23:10 RabidGravy 7 5
23:10 RabidGravy 5 6
23:10 RabidGravy 5 7
23:10 RabidGravy 4 8
23:10 RabidGravy 1 10
23:10 RabidGravy 2 11
23:10 RabidGravy 1 13
23:10 RabidGravy 1 14
23:10 RabidGravy 1 18
23:10 RabidGravy 1 22
23:10 RabidGravy 1 24
23:10 RabidGravy 1 25
23:10 RabidGravy 1 27
23:10 RabidGravy :)
23:10 RabidGravy cat META.list | sed -e 's/https:\/\/raw.githubusercontent.com\///' -e 's/\/.*$//' | sort | uniq -c | sort -n | awk ' { print $1 }' | uniq -c
23:10 RabidGravy for the interested
23:11 Skarsnik I am still not sure to understand how to read this, I am probably too tired x)
23:12 RabidGravy There are lots of authors with one module, and the number of authors with more modules goes down in a curve
23:12 RabidGravy until it gets to 10 where it sort of asymptotes out
23:12 Skarsnik Oh I see
23:13 Skarsnik who has 27 modules x)
23:13 RabidGravy retupmoca
23:14 Ven joined #perl6
23:15 RabidGravy the strange thing is that the people in the top ten hasn't changed much just the order slightly but I guess the more prolific people are, er, more prolific
23:24 RabidGravy Skarsnik, BTW "Invalid json found at: https://raw.githubusercontent.com/Skarsnik/perl6-gumbo/master/META.info" from the http://modules.perl6.org/log/update.log
23:30 Ven joined #perl6
23:30 RabidGravy tony-o # Module::Does utter crack but fab
23:30 virtualsue joined #perl6
23:30 RabidGravy tony-o++ # Module::Does utter crack but fab even
23:32 pink_mist might need a (tony-o)++ ... not sure how sensitive the karma bots are about - in the identifier
23:34 RabidGravy :)
23:34 RabidGravy who knows
23:34 lizmat good night, #perl6!
23:34 RabidGravy goonight
23:36 Zoffix Skarsnik, I've sent a PR to fix that couple of hours ago
23:36 yoleaux 4 Nov 2015 09:38Z <Ven> Zoffix: yes, thanks for your PR. I'll try to take a look at the noncrossed ones soon-ish
23:37 RabidGravy Zoffix++ # star
23:37 N joined #perl6
23:37 Guest53701 is :kv argument to grep function recent I can not seem to get it to work
23:38 RabidGravy yes
23:38 Guest53701 thanks I will try to download latest thing
23:39 RabidGravy m: say <a b c d>.grep(/d/, :kv)
23:39 camelia rakudo-moar 4988c7: OUTPUT«(3 d)␤»
23:41 Guest53701 it must be recent I have 2015.06
23:41 RabidGravy oh yes waaaay old, lots and lots of changes since then
23:41 Ven_ joined #perl6
23:44 RabidGravy right now, it's probably a good move to keep as up to date as possible so the small changes don't build up :)
23:48 Guest53701 m: my $max = [max] ("asdas","qweqwe","gfdgdfg").map({.chars}); say @arr.grep({.chars==$max},:kv);
23:48 camelia rakudo-moar 4988c7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6Jx7judgn_␤Variable '@arr' is not declared␤at /tmp/6Jx7judgn_:1␤------> 3,"qweqwe","gfdgdfg").map({.chars}); say 7⏏5@arr.grep({.chars==$max},:kv);␤»
23:49 Guest53701 m: my @arr = "asdas","qweqwe","gfdgdfg"; my $max = [max] @arr.map({.chars}); say @arr.grep({.chars==$max},:kv);
23:49 camelia rakudo-moar 4988c7: OUTPUT«(2 gfdgdfg)␤»
23:49 Guest53701 hm it does not output that on my machine
23:50 tokuhiro_ joined #perl6
23:50 Guest53701 it only gives me (gfdgdfg)
23:50 Guest53701 I upgraded
23:51 Guest53701 perl6.bat -v says This is perl6 version 2015.09 built on MoarVM version 2015.09
23:52 llfourn Guest53701: that's still old :P
23:52 RabidGravy that's still nearly two months old
23:52 RabidGravy camelia is updated very frequently
23:54 Guest53701 there seems to be no windows download for latest thing I guess I better find linux
23:55 RabidGravy don't know what the status of packaged build is, sorry
23:55 Guest53701 thanks
23:56 Zoffix Guest22572, there's a Sept. build of Rakudo Star: http://rakudo.org/downloads/star/rakudo-star-2015.09-x86_64%20(JIT).msi
23:56 Zoffix Oh, they left.
23:57 llfourn isn't that what he had?
23:57 Ven joined #perl6
23:58 Zoffix Ah, right. I only saw the "I have 2015.06" above and not the "I upgraded" bit

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

Perl 6 | Reference Documentation | Rakudo