»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by masak on 12 May 2015. |
|||
00:01
bpmedley left
00:07
rangerprice joined
|
|||
rangerprice | Hi | 00:09 | |
i need some help | |||
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:12 | ||
and wants a concrete answer* | 00:13 | ||
psch doesn't know an answer to that question | |||
konobi | there's nothing concrete | ||
_but_ i would say that perl tooling for authors is much better in my experience | 00:14 | ||
in terms of deployment too | |||
00:15
firstdayonthejob left
|
|||
raoulvdberge | and perl is more fun! altough that is subjective | 00:15 | |
konobi | things like overuse of things like decorators in python are also a turn off | 00:17 | |
psch .oO( maybe the best reason is that pythonistas want to convince you their language is better... ) | 00:24 | ||
00:27
Skarsnik left
00:28
rangerprice left
00:31
robinsmidsrod left
00:35
BenGoldberg joined
00:36
Juerd left,
Juerd joined
00:37
vendethiel joined
00:40
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
adu joined
00:42
Juerd left
|
|||
vendethiel | o/ | 00:43 | |
00:44
Juerd joined
00:45
tokuhiro_ joined
|
|||
dalek | p: 19a7c2e | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/tools/EvalServer.java: Print the StackTrace to the client. Other solutions like e.g. printing only the classname to the client or somesuch end up printing out of order and even duplicate information when running spectest, so this seems least weird. |
00:45 | |
psch | now when does camelia rebuild..? | 00:46 | |
dalek | kudo/nom: ff9e6de | peschwa++ | src/ (4 files): Teach JVM about the BOOTSTRAP Binder. Also use it for its trial_bind implementation and remove org.perl6.rakudo.Binder.trialBind. |
00:48 | |
00:49
tokuhiro_ left
00:51
sprocket joined
00:53
BenGoldberg left
00:55
BenGoldberg joined
00:57
robinsmidsrod joined
01:07
Ven joined
01:08
Juerd left,
vendethiel left
01:10
Juerd joined
01:19
bpmedley joined,
Ben_Goldberg joined
01:21
raiph left,
Ven left
01:22
BenGoldberg left
01:24
Ven joined
01:26
Juerd left
|
|||
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:27 | |
01:28
Ven left
|
|||
colomon | 99% CPU, too. | 01:28 | |
01:30
raiph joined
|
|||
TimToady | howdy from Hackers | 01:42 | |
raoulvdberge | hi! | 01:45 | |
01:53
BenGoldberg_ joined
01:56
Ben_Goldberg left
|
|||
ugexe | perl6 -e 'my $x = shell("ls", :out); $x.out.close;' | 02:00 | |
The spawned process exited unsuccessfully (exit code: 141) | |||
im aware of the recent change, but doesn't that seem wrong? | |||
the jvm does not do that fwiw | |||
ah it does... so it must have to do with how soon .out is closed | 02:01 | ||
or is intended behavior now that .out will have to be read entirely before closing it? | 02:02 | ||
sprocket | question about slurp | 02:03 | |
i’m trying to read in a file using slurp (/proc/cpuinfo) but it doesn’t return any lines | |||
however, when i use $FILENAME.IO.lines, it gives the correct result | 02:04 | ||
gist.github.com/cspencer/5b7ec50a4917c0e2a2f6 | |||
there’s a gist of the code | |||
am i slurp()’ing incorrectly? | |||
ugexe | or how do i launch a proc i expect to fail but want to examine the exitcode? | 02:14 | |
try/catch? | 02:17 | ||
AlexDaniel | ugexe: $proc.exitcode ? | 02:18 | |
02:18
b2gills joined
|
|||
ugexe | hmm calling exitcode before the .out.close makes it work, so screw it | 02:19 | |
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 | ||
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
raiph left
|
|||
ugexe | looks like on a non-zero exit code it throws an exception and the Proc | 02:22 | |
02:24
nys left
02:36
BenGoldberg_ left,
BenGoldberg_ joined
|
|||
timotimo | huh, how can slurp be broken and our test suites don't catch it :| | 02:39 | |
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:41 | |
but the process might also succeed | 02:42 | ||
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:43
sprocket left
02:44
Juerd joined,
ilbot3 left
|
|||
AlexDaniel | ugexe: my $proc = run(‘xxx’, :out); my $out = $proc.out.slurp-rest; $proc.out.close; my $exitcode = $proc.exitcode; | 02:44 | |
ugexe: and what about this? | 02:45 | ||
ugexe | The spawned process exited unsuccessfully (exit code: 127) | 02:46 | |
02:46
ilbot3 joined,
tokuhiro_ joined
02:48
sufrostico left,
sufrosti1o left
|
|||
ugexe | and i'd want it to not print anything to the terminal, just capture the exitcode | 02:48 | |
AlexDaniel | ugexe: then you have to do something with stderr perhaps | 02:49 | |
e.g. capture it or redirect to /dev/null | |||
ugexe | doesnt seem to help | ||
i already redirect it | |||
this is a change from the last day or two | |||
AlexDaniel | hmmm I don't have the latest version | 02:50 | |
02:51
tokuhiro_ left
|
|||
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:52 | |
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 | ||
AlexDaniel | I have not seen any normal program that would do that | ||
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:57 | |
maybe it should only throw an exception the first time its sunk? | 02:58 | ||
AlexDaniel | well, on my setup slurp-rest blocks until it ends | 03:01 | |
and then you can get exitcode. What happens if stdout is closed earlier? I have no idea | 03:02 | ||
(I mean what if it is closed by the process itself. Not sure if that's even possible) | 03:03 | ||
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 | |
The spawned process exited unsuccessfully (exit code: 127) | |||
in block <unit> at -e:1 | |||
but i'd expect what you said to happen | 03:08 | ||
AlexDaniel | ugexe: indeed, it seems to be broken if you run weird stuff | 03:10 | |
for example “xxx” | |||
say run(‘xxx’).exitcode; | |||
prints -1 | 03:11 | ||
which means that the program did not even start | |||
and it's ok, but why is it 127 when you attempt to get the output? | 03:12 | ||
sounds like a bug | |||
ugexe | but say i do something else like git clone repo exiting-folder/, it would do the same thing | ||
existing | 03:13 | ||
AlexDaniel | ugexe: what is the command that you are trying to run? | 03:14 | |
ugexe: because that's weird | |||
I get 128 :) | 03:15 | ||
which is correct, I think | |||
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 | |
128 yea probably | |||
AlexDaniel | ugexe: say run('git', 'clone', '-q', 'github.com/TiMBuS/Net--IRC.git', 'repo2', :err('/dev/null')).exitcode; | 03:19 | |
for me it is 128 if the directory already exists or 0 if everything is OK | |||
03:20
liufeng left
|
|||
ugexe | but i need to capture out as well | 03:22 | |
which means i need to close it | |||
so this throws the exception: | 03:23 | ||
'my $proc = run("git", "clone", "-q", "github.com/TiMBuS/Net--IRC.git", "repo2", :out, :err("/dev/null")); say $proc.out.lines; $proc.out.close; say $proc.exitcode;' | |||
after its been cloned already | |||
03:24
kid51 left
|
|||
AlexDaniel | ugexe: with or without -q, it seems like git clone prints only to stderr | 03:26 | |
and stdout is empty in any case | |||
ugexe | right, but i do use it for more than that one command | 03:27 | |
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:29 | ||
03:32
cognominal left
03:33
rurban joined
03:36
yqt left
03:46
telex left
03:50
telex joined,
liufeng joined
|
|||
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:52 | |
03:53
telex left
|
|||
zengargoyle | you can probably only do the equivalent of getline on /proc files or something like that. | 03:53 | |
03:53
BenGoldberg_ is now known as BenGoldberg,
uruwi joined
03:54
telex joined
|
|||
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» | ||
BenGoldberg | m: say +lines; | ||
camelia | rakudo-moar ff9e6d: OUTPUT«20» | ||
04:15
advwp left
04:32
raoulvdberge left
04:37
MadcapJake_ joined
04:38
MadcapJake left,
MadcapJake_ left
04:39
MadcapJake_ joined
04:40
MadcapJake_ left
04:41
MadcapJake_ joined,
MadcapJake_ left
04:42
MadcapJake joined,
MadcapJake is now known as MadcapJake_,
MadcapJake_ left
04:43
MadcapJake joined,
MadcapJake is now known as MadcapJake_,
MadcapJake_ left
04:44
MadcapJake joined,
MadcapJake is now known as MadcapJake_
04:45
MadcapJake_ is now known as MadcapJake,
advwp joined
04:48
tokuhiro_ joined
|
|||
ugexe | the secret to getting the old Proc behavior back straight up was just `$proc does role { method sink(|) { } }`... now i feel dumb | 04:52 | |
04:53
tokuhiro_ left
05:07
uruwi left
05:13
liufeng` joined
05:16
liufeng left
05:22
AlexDaniel left
05:34
zengargoyle left
05:35
zengargoyle joined
|
|||
dalek | kudo/nom: 9e4902f | TimToady++ | src/Perl6/Actions.nqp: failed S/// should return original string fixes RT #126476 |
05:40 | |
ast: ffe19e0 | TimToady++ | S05-substitution/subst.t: RT #126476 fixed, untodo |
|||
05:43
adu left
05:53
ribasushi left
05:55
ribasushi joined
05:57
sprocket joined
|
|||
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:06 | |
06:08
khw left
|
|||
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:09 | |
gist.github.com/TiMBuS/3d3ca10471e175c8358e | 06:17 | ||
06:19
sprocket left
06:31
aborazmeh left
06:32
skids left
|
|||
dalek | kudo/nom: e1e03e6 | TimToady++ | src/Perl6/Grammar.nqp: don't typocheck types that actually exist |
06:37 | |
06:38
tokuhiro_ joined
06:39
liufeng` left
06:41
rurban left
06:43
tokuhiro_ left
07:14
kmel joined
|
|||
kmel | hello | 07:42 | |
07:44
tokuhiro_ joined
07:48
tokuhiro_ left
08:01
rindolf joined
|
|||
moritz | \o | 08:09 | |
kmel | \o | 08:10 | |
moritz | www.mikeash.com/pyblog/friday-qa-2...-hard.html "Swift has settled on the grapheme cluster as its idea of a "character."" | 08:14 | |
08:16
kmel is now known as hankache,
darutoko joined
08:18
pmurias joined
|
|||
pmurias | hi | 08:18 | |
08:19
hankache left
08:20
kmel joined,
hankache joined,
kmel left,
hankache left
08:21
hankache joined
|
|||
moritz | hi pmurias | 08:24 | |
moritz is glad that Task::Star builds again with current rakudo | 08:25 | ||
08:27
virtualsue joined
08:30
leont joined
08:31
firstdayonthejob joined
08:36
spider-mario joined
|
|||
dalek | p: 02f0f5e | (Pawel Murias)++ | src/vm/js/nqp-runtime/ (3 files): [js] Support associative access on type objects. |
08:36 | |
p: ac51c16 | (Pawel Murias)++ | src/vm/js/ (2 files): [js] Hack around the lack of typed attributes support to unbreak nqp-js-on-js. |
|||
konobi | pmurias: how goes? | 08:37 | |
pmurias | konobi: hi | 08:43 | |
planning to work this week on the getting the failing nqp-js tests passing | 08:44 | ||
08:45
RabidGravy joined
|
|||
konobi | cool | 08:45 | |
i should look again... was trying to get moarvm working on illumos of late | |||
08:47
_28_ria left
|
|||
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 | |
08:47
_28_ria joined
|
|||
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:48 | |
konobi | pmurias: i suppose a lot of it comes down to the split of responsibilities for each thing generated | 08:49 | |
stmuk | www.youtube.com/watch?v=R4_rBlodftU | 08:52 | |
in Spanish oddly enough | |||
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:53 | |
I should look into the CURLI etc. stuff more | 08:54 | ||
08:59
_28_ria left
09:00
_28_ria joined
09:07
Ven joined
09:17
vendethiel joined
09:28
xfix joined
|
|||
RabidGravy | This is about Java, but it should probably be read by everyone foxglovesecurity.com/2015/11/06/wha...erability/ | 09:29 | |
09:31
Psyche^ joined
09:35
Psyche^_ left
09:37
Ven left
09:38
Begi1115 joined
09:42
Ven joined
09:45
tokuhiro_ joined
|
|||
Woodi | hi #perl6 :) | 09:47 | |
RabidGravy | marning! | ||
Woodi | RabidGravy: "Nearly two years ago, we decided we wanted 0-day in WebSphere application server." ;) | ||
moritz | I tried to skim the article for the actual vulnerability, but didn't found it very clear | 09:48 | |
something with unsafe deserialization | |||
RabidGravy | yeah | ||
moritz | but why do they give the user access to serialized objects? | 09:49 | |
09:50
tokuhiro_ left
|
|||
RabidGravy | because "dumb" | 09:51 | |
09:52
Ven left
|
|||
RabidGravy | www.masteringperl.org/2012/12/the-s...-problem/, slides from a talk I gave on this *moree than ten years ago* gellyfish.co.uk/old/yapc_talk/ | 09:52 | |
09:52
Ven joined
09:54
BenGoldberg left
|
|||
moritz | one could also sign the data, and verify the signature to ensure that it hasn't been tampered with | 09:55 | |
as Mojolicious does for session cookies | |||
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
|
|||
moritz | aye | 09:59 | |
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:05 | |
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:06 | ||
moritz | it's a different situation if you make in-house applications | 10:08 | |
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 :( | ||
moritz | (provided build and deployment are somewhat automated) | ||
RabidGravy: hey, they had a provisioning system! | |||
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:10
rurban joined
|
|||
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. | ||
moritz | nine: agreed, if you have that option; otherwise www.versioneye.com/ exists, at least | 10:11 | |
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:13 | |
10:14
espadrine joined
|
|||
[Tux] | T::C seriously broken after recent commit. | 10:26 | |
10:26
hankache left
|
|||
lizmat | [Tux] ah? perhaps my :k/:v etc work ? | 10:27 | |
moritz | or the CRLF grapheme? | ||
[Tux] | I think *my* :k work committing in the wrong branch | ||
lizmat | :-) | ||
[Tux] | yup, much better | 10:28 | |
RabidGravy | yay! | ||
[Tux] | test 50000 35.260 35.148 | 10:33 | |
test-t 50000 18.171 18.059 | |||
tadzik | :o | ||
moritz | wow | 10:35 | |
RabidGravy | half | 10:37 | |
Woodi | ok, I see numbers second time but what generate them ?? ;) | 10:38 | |
arnsholt | That's a really nice speedup! What's changed between the two versions of the code? | 10:40 | |
RabidGravy | harder whipping of the hamsters | 10:41 | |
lizmat | afk for a few hours | 10:42 | |
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 | |
link is: gagne.homedns.org/~tgagne/contrib/E...oryST.html | |||
10:47
Ven left
|
|||
RabidGravy | :) | 10:48 | |
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... | 10:49 | |
[Tux] | Woodi, the test suite for Text::CSV | 11:00 | |
arnsholt, split (@needles, ...) instead of split (rx{...}, ...) | |||
11:01
diakopter joined
|
|||
pmurias | nine: re follow the changelogs, why not just update to the latest version? | 11:02 | |
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:04 | |
pmurias | using the version the distribution provides will also break things | 11:05 | |
nine | Only on upgrades. Security fixes are mostly backported | 11:08 | |
pmurias | nine: I really dislike distributions doing things like patching perl | 11:09 | |
when debian perl prints out that a few hundred patches are applied I'm all "Leave my perl alone you bastard" | |||
the way debian handled node.js was really horrible | 11:11 | ||
nine | Maybe debian is just not the prime example :) | 11:13 | |
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:14 | |
RabidGravy | a lot of LInux packagers do that | 11:17 | |
waaaay annoying | |||
11:20
_mg_ left
11:28
TEttinger left,
MARTIMM joined
|
|||
spider-mario | luckily, arch linux doesn’t | 11:31 | |
MARTIMM | reading through S10 section Autoloading; is the use of CANDO() already implemented in rakudo? | ||
spider-mario | even most of Qt4 is just in one big “qt4” package | 11:32 | |
including the development tools :-° | |||
11:33
Skarsnik joined
|
|||
stmuk | but embedded systems! blah blah | 11:36 | |
11:36
Sqirrel left
11:37
iH2O joined
|
|||
stmuk | in an "enterprise" vendor backported security patches do add "value" | 11:38 | |
11:39
iH2O left
11:40
Ven joined,
^elyse^ joined
|
|||
moritz | MARTIMM: no | 11:44 | |
MARTIMM: and I don't think we will for christmas; we have FALLBACK though | |||
11:48
Ven left,
Zoffix joined,
Zoffix left,
Zoffix joined
|
|||
MARTIMM | moritz: Can I find that in the documents | 11:48 | |
timotimo | o/ | 11:49 | |
MARTIMM | moritz: found something in S12, thanks | 11:51 | |
timotimo | moritz: i don't think signatures on the serialization blobs would help this issue at all | 11:52 | |
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:53 | ||
what would help is a whitelist of classes that any given serialized blob is allowed to generate | 11:54 | ||
because for a command like "hey what's your version?" why accept anything but List, Map, String, Int, Float? | 11:56 | ||
(and at that point you have a complicated, binary version of JSON) | |||
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 | 11:59 | ||
moritz | timotimo: yes, I was commenting on the use case of session storage, not the RPC use case | 12:02 | |
timotimo | ah, yes | ||
for that, signature is a good idea | |||
12:16
MARTIMM left
12:23
weihan joined
12:24
virtualsue left
12:26
Ven joined
12:27
weihan left
12:28
weihan joined
12:34
weihan left
12:35
kid51 joined
12:37
Ven left,
weihan joined
12:39
Ven joined
12:48
ChoHag left
12:50
raoulvdberge joined,
ChoHag joined
12:51
weihan left
12:53
Ven left,
Ven joined
12:54
weihan joined
12:55
weihan left
12:59
weihan joined
13:04
hankache joined
13:08
dayangkun joined
13:09
dayangkun left,
dayangkun joined,
Sqirrel joined
13:10
dayangkun left,
dayangkun joined
|
|||
RabidGravy | If one had a thing that indicated either "Optional" or "Mandatory" what would you call it | 13:13 | |
psch | neccessity marker? | 13:14 | |
13:14
Ven left
|
|||
RabidGravy | Hmm, bit wordy | 13:15 | |
psch | need-it bit? :P | ||
RabidGravy | specifically if I had "enum Something <Mandatory Optional>" what would work for Something ;-) | ||
psch | m: A: for 1 { A.Str.say } | 13:16 | |
camelia | rakudo-moar e1e03e: OUTPUT«Label<139845112624704>» | ||
13:16
Ven joined
|
|||
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» | ||
psch | m: A: for 1 { A.perl.say } | 13:17 | |
camelia | rakudo-moar e1e03e: OUTPUT«Label.new» | ||
13:17
raiph joined
|
|||
psch | RabidGravy: english.stackexchange.com/questions/110394/ | 13:18 | |
RabidGravy | hahaha, Optionality | 13:19 | |
Ordinality is a weird metaphor really | |||
RabidGravy goes with Optionality as it's better than sitting here worrying about it | |||
cheers | 13:20 | ||
lizmat | Mandatum | ||
lizmat likes Optionality | |||
works with Whipuptitude and Manuplexity | |||
RabidGravy | :) | ||
13:21
colomon left
|
|||
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» | ||
psch | now it just doesn't know how to .chars the Label | ||
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 | ||
timotimo | could very well be; .chars on a null thingie used to just segfault | ||
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» | ||
psch | m: A: for 1 { for 1 { A.last }; CONTROL { default { .WHAT.say } } } | ||
camelia | rakudo-moar e1e03e: OUTPUT«(X::AdHoc)» | ||
psch | m: A: for 1 { for 1 { A.last }; CONTROL { default { .message.say } } } | ||
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» | ||
psch | vOv | ||
it's clearly a miswrapped CX::Last | |||
really though, something about exception handling and labels is just utterly opaque to me | |||
13:23
dayangkun left
|
|||
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? | ||
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» | ||
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» | ||
psch | timotimo: i think the X::AdHoc isn't even the CX::Last i want, maybe..? | ||
timotimo | you mean something else could potentially be thrown in there? | 13:26 | |
13:26
dayangkun joined
|
|||
psch | yeah, something like that | 13:27 | |
maybe it breaks differently too, as mentioned i don't see through that at all :/ | |||
m: for 1 { last; CONTROL { default { .perl.say } } } | |||
camelia | rakudo-moar e1e03e: OUTPUT«CX::Last.new» | ||
psch | labels man | ||
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? | ||
psch | m: A: for 1 { A.last; CONTROL { default { .perl.say } } } | ||
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
|
|||
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
|
|||
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» | ||
psch | m: say X::AdHoc.new.payload | ||
camelia | rakudo-moar e1e03e: OUTPUT«Unexplained error» | ||
psch | j: say X::AdHoc.new.payload | ||
camelia | rakudo-jvm e1e03e: OUTPUT«Unexplained error» | ||
13:35
ilbelkyr left
13:36
ilbelkyr joined
13:37
dayangkun left
|
|||
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» | ||
psch | getattr is hard :l | ||
13:37
pecastro_ left
|
|||
psch | at least they agree its a labeled last | 13:37 | |
13:38
Ven left
13:39
Ven joined
|
|||
Skarsnik | Hello, is there a way to get a counter in a for loop without setting/inc a var for it? | 13:39 | |
psch | Skarsnik: do you have an example (maybe in another language) that shows what you mean? | 13:40 | |
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/GklweIJClsVariable '$index' is not declared. Did you mean any of these? &index &rindexat /tmp/GklweIJCls:1------> 3my @a = <a b c d e>; for @a.kv => 7⏏5$index, $letter { dd :$index,…» | ||
lizmat | m: my @a = <a b c d e>; for @a.kv -> $index, $letter { dd :$index, :$letter } | ||
camelia | rakudo-moar e1e03e: OUTPUT«Str letter = "a"Int index = 0Str letter = "b"Int index = 1Str letter = "c"Int index = 2Str letter = "d"Int index = 3Str letter = "e"Int index = 4» | ||
lizmat | m: my @a = <a b c d e>; for @a.kv -> $index, $letter { say "$index: $letter" } # clearer ? | ||
camelia | rakudo-moar e1e03e: OUTPUT«0: a1: b2: c3: d4: e» | ||
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++} | ||
Ah yes | |||
or can I loop through 2 array at the same time? like for @t1, @t2 -> $t1, $t2 ? | 13:44 | ||
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» | ||
RabidGravy | or | 13:47 | |
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«1a2b3c4d» | ||
RabidGravy | depending on your requirement | ||
lizmat | m: my @a = <a b c d e>; my @b = ^5; for @a Z=> @b { .say } # another alternative | ||
camelia | rakudo-moar e1e03e: OUTPUT«a => 0b => 1c => 2d => 3e => 4» | ||
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, $++ } | ||
camelia | rakudo-moar e1e03e: OUTPUT«ax0by1cz2» | ||
AlexDaniel | another way to get counter | ||
dalek | kudo/nom: 4aa63f0 | lizmat++ | src/core/Str.pm: Implement :v/k/kv/p also for Str.split(Regex:D) |
13:50 | |
lizmat | next step, documentation, then more tests | 13:51 | |
AlexDaniel | oh wow | 13:52 | |
m: my @array1 = <a b c>; my @array2 = <x y z>; for @array1 Z @array2 -> $one, $two { say $one, $two } | |||
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» | ||
AlexDaniel | example taken from perl6advent.wordpress.com/2009/12/...and-profi/ | ||
perhaps it should be corrected? | 13:53 | ||
13:53
Ven left
|
|||
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» | ||
AlexDaniel | that's another example from this post | ||
psch | single-arg rule /o\ | 13:57 | |
timotimo | you would want @array.kv instead, no? | ||
oh, wait | |||
m: say <a b c> Z <x y z> | |||
camelia | rakudo-moar e1e03e: OUTPUT«((a x) (b y) (c z))» | ||
psch | m: my @array = <a b c>; for (^Inf Z @array).flat -> $index, $item { say $index, $item } | ||
camelia | rakudo-moar e1e03e: OUTPUT«0a1b2c» | ||
timotimo | right, that wants a .flat | ||
psch | AlexDaniel: not that $index is (0 a) and $item is (1 b) in your example | 13:58 | |
so, yeah, semantics changed | |||
timotimo | yeah | ||
psch | s/not/note/ | ||
timotimo | for a post from 2009, that's ... fine? | ||
psch | well, the question is whether the advent posts should be kept up to date or at least have errata | ||
13:58
Ven joined
|
|||
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 | ||
AlexDaniel | timotimo: or we can just fix it | ||
psch | fwiw, i know from experience that any author for perl6advent can edit any post | 14:00 | |
(because i got my post edited... :) ) | |||
i think moritz++ has "add author" authority | |||
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» | ||
psch | i don't know who Matthew Walton is, is why i bring this up | ||
Skarsnik: .WHAT isn't .HOW.name | |||
Skarsnik | m: use NativeCall; my $a; $a.^set_name("int32"); say $a.WHAT; | 14:02 | |
camelia | rakudo-moar e1e03e: OUTPUT«(int32)» | ||
14:03
hankache left
|
|||
psch | oh, it is..? | 14:03 | |
that's curious :P | |||
well, i guess that means that isn't the problem, but the repr is | |||
Skarsnik | m: use NativeCall; my $a; $a.^set_name("int32"); say nativesizeof(int32); | ||
camelia | rakudo-moar e1e03e: OUTPUT«4» | ||
psch | m: use NativeCall; my $a; $a.^set_name("int32"); say $a ~~ int32 | ||
camelia | rakudo-moar e1e03e: OUTPUT«False» | ||
psch | m: use NativeCall; my $a; $a.^set_name("int32"); say $a.WHAT === int32 | 14:04 | |
camelia | rakudo-moar e1e03e: OUTPUT«True» | ||
RabidGravy | that's odd | ||
psch | m: use NativeCall; say int32.REPR; my $a; say $a.REPR | ||
camelia | rakudo-moar e1e03e: OUTPUT«P6intP6opaque» | ||
psch | m: use NativeCall; my int32 $a; say $a.REPR | 14:05 | |
camelia | rakudo-moar e1e03e: OUTPUT«P6opaque» | ||
psch | m: use NativeCall; my int32 $a; say nqp::decont($a).REPR | ||
camelia | rakudo-moar e1e03e: OUTPUT«P6opaque» | ||
psch | m: use NativeCall; my int32 $a; say nativesizeof($a.WHAT) | ||
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» | ||
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/wZ7eMuJwIJTerm definition requires an initializerat /tmp/wZ7eMuJwIJ:1------> 3use NativeCall; my int32 \a7⏏5; say nativesizeof(a.WHAT)» | ||
psch | m: use NativeCall; my int32 \a = 5; say nativesizeof(a.WHAT) | ||
camelia | rakudo-moar e1e03e: OUTPUT«Type check failed in binding; expected int32 but got Int in block <unit> at /tmp/dkPl5zDbMo:1» | ||
psch | m: use NativeCall; my int32 $a; say nativesizeof($a.VAR.of) | ||
camelia | rakudo-moar e1e03e: OUTPUT«Method 'of' not found for invocant of class 'Int' in block <unit> at /tmp/59qMYdvzCW:1» | ||
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,
Ven left
14:09
Ven joined
|
|||
Skarsnik | m: use NativeCall; my $a = "int32"; say EVAL("nativesizeof($a)"); | 14:11 | |
camelia | rakudo-moar 4aa63f: OUTPUT«4» | ||
psch | well, that's just < nativesizeof(int32) > | 14:12 | |
Skarsnik | I know x) | ||
mrf | ugexe: you about? | ||
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) | ||
arnsholt | m: my int32 $x; say $x.WHAT; # What about this? | ||
camelia | rakudo-moar 4aa63f: OUTPUT«(Int)» | ||
arnsholt | Huh. 's odd | 14:14 | |
psch | arnsholt: method calls box | ||
arnsholt: because natives don't know methods | |||
Skarsnik | I am writing something that compare C struct size and their defined size in perl6 | ||
dalek | kudo/nom: f4266f2 | lizmat++ | src/core/Cool.pm: Make sure sub split() passes all nameds as well |
14:15 | |
lizmat | oddly enough, we seem to be low on test on split() | ||
psch | m: say int32.WHAT | ||
camelia | rakudo-moar 4aa63f: OUTPUT«(int32)» | ||
psch | well, .WHAT isn't a method, but it somehow still promotes... :/ | ||
timotimo | "promotes"? | ||
oh, i see | 14:16 | ||
yeah, that's right | |||
arnsholt | Skarsnik: "C struct size" and "defined size in Perl 6"? | ||
14:16
sprocket joined
|
|||
lizmat | github.com/rakudo/rakudo/pull/578 # leont++ does dogfooding | 14:17 | |
leont | :-) | ||
arnsholt | Yeah, leont++ | 14:18 | |
timotimo | m: say nativesizeof(int32) | ||
camelia | rakudo-moar 4aa63f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gUIQ8cDxScUndeclared routine: nativesizeof used at line 1» | ||
timotimo | m: say nqp::nativecallsizeof(int32) | ||
camelia | rakudo-moar 4aa63f: OUTPUT«4» | ||
timotimo | m: say nqp::nativecallsizeof(int64) | ||
camelia | rakudo-moar 4aa63f: OUTPUT«8» | ||
arnsholt | That's a seriously important task, I think | ||
timotimo | m: use NativeCall; say nativesizeof(int32) | 14:19 | |
camelia | rakudo-moar 4aa63f: OUTPUT«4» | ||
arnsholt | I've been meaning to look into a Perl 6 test harness for ages, but never getting around to it | ||
timotimo | m: use NativeCall; say nativesizeof(int64) | ||
camelia | rakudo-moar 4aa63f: OUTPUT«8» | ||
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 | ||
timotimo | m: use NativeCall; my int32 $foo = 0; say nativesizeof($foo) | ||
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» | ||
timotimo | m: use NativeCall; my int32 $foo = 0; say nativesizeof($foo.VAR) | ||
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» | ||
timotimo | m: use NativeCall; my int32 $foo = 0; say nativesizeof(nqp::decont($foo)) | ||
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» | ||
timotimo | mhm, mhm. | ||
m: use NativeCall; my int32 $foo = 0; say nqp::nativecallsizeof(nqp::decont($foo)) | |||
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» | ||
arnsholt | m: my int32 $x = 3; say $x.WHAT | 14:20 | |
camelia | rakudo-moar 4aa63f: OUTPUT«(Int)» | ||
leont | The fudge tools are other targets to dogfood, IMO | ||
arnsholt | It's still not clear to me why the .WHAT of an int32 is Int though | ||
nine | arnsholt: because my native int32 is repr('P6int') is Int is nativesize(32) { } | 14:21 | |
lizmat | leont: if they live in roast, they should not be | 14:22 | |
or at least, not remove the perl 5 ones | |||
leont | Yeah, I figured we can't remove the perl 5 ones | ||
But that's no reason to use them if we have a working perl 6 | 14:23 | ||
lizmat | cycling& | ||
agree :-) | |||
really afk& | |||
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);") | ||
arnsholt | nine: But how does that make the .WHAT be Int? | ||
14:24
pmurias_ joined
|
|||
Skarsnik | m: my str $x; say $x.WHAT; | 14:24 | |
camelia | rakudo-moar 4aa63f: OUTPUT«(Str)» | ||
nine | arnsholt: int32 is just an Int with an added trait | ||
timotimo | welllll | ||
if you look at the --target=ast, the WHAT will be called on a lexicalref | |||
it might just be it has no clue to resolve the actual lexical behind that | |||
m: my int32 $foo = 0; say $foo.VAR.WHAT | 14:25 | ||
camelia | rakudo-moar 4aa63f: OUTPUT«(IntLexRef)» | ||
Skarsnik | m: my str $x = "a"; my $p := $x; say $p.WHAT; | ||
camelia | rakudo-moar 4aa63f: OUTPUT«(Str)» | ||
arnsholt | Yeah, that sounds more reasonable. `is Int` means it's a subclass of Int, after all | ||
psch | m: my int32 $foo = 0; say $foo.VAR.of | ||
camelia | rakudo-moar 4aa63f: OUTPUT«Method 'of' not found for invocant of class 'Int' in block <unit> at /tmp/zmq_1b3C8_:1» | ||
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» | ||
psch | m: my int32 $foo = 0; say $foo.VAR.^native_type === int32 | ||
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)…» | ||
Skarsnik | m: use NativeCall; class T is repr('CStruct'){has int32 $.a}; my T $b; say nativesizeof($b.WHAT); | ||
camelia | rakudo-moar 4aa63f: OUTPUT«4» | ||
14:27
pmurias left
|
|||
arnsholt | Skarsnik: That sounds reasonable. But how are you going to query for the C size of the struct? | 14:27 | |
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 | ||
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» | ||
psch | hm, can i pull a PR from github? | ||
timotimo | m: use NativeCall; class T is repr('CStruct'){has int32 $.a}; say nativesizeof(T) | ||
psch | i'd like to look at what the EvalServer isn't doing for leont++'s work | ||
camelia | rakudo-moar 4aa63f: OUTPUT«4» | ||
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? | ||
leont | psch: awesome | 14:29 | |
Skarsnik | I compile a small C file that just printf sizeof(cstruct) | ||
arnsholt | Without resorting to on-the-fly C compilation | ||
Right =) | |||
RabidGravy | psch, pull the branch the PR comes from | ||
leont | You need to uncomment the jvm specific code at the end of harness6 to re-enable that | ||
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; | ||
camelia | rakudo-moar 4aa63f: OUTPUT«(T)» | ||
RabidGravy | :) | ||
Skarsnik | but why I can't nativesizeof this WHAT? | ||
timotimo | what do you .^set_name for? | ||
just curious | |||
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» | ||
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) | ||
camelia | rakudo-moar 4aa63f: OUTPUT«(T)» | ||
timotimo | er, wait ... | ||
arnsholt | Why the .^set_name to the name it already has? | ||
timotimo | what the hell are you doing :) | ||
Skarsnik | to construct something with the name of the type. | ||
timotimo | "my $b" does NOT give you a T-typed thing | 14:32 | |
even if you set its name to T | |||
just like if you call yourself "timo", you're not me | |||
Skarsnik | well .WHAT give T | ||
psch | m: sub f(Int $x) { }; my $x; $x.^set_name('Int'); f $x | ||
arnsholt | Well it says that it's *name* is T | ||
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» | ||
psch | DIHWIDT | ||
arnsholt | Which makes sense, since you just renamed its type to T =) | ||
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
lizmat left
|
|||
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 | ||
camelia | rakudo-moar f4266f: OUTPUT«(Any)(T)» | ||
psch | m: my $x; $x.^set_name("int32"); say $x.WHAT =:= int32 | ||
camelia | rakudo-moar f4266f: OUTPUT«False» | ||
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 | ||
psch | s/name/thing/ | ||
RabidGravy | m: my Int $a; $a.^set_name("Str"); say $a.WHAT; say $a.^mro; | ||
camelia | rakudo-moar f4266f: OUTPUT«(Str)((Str) (Cool) (Any) (Mu))» | ||
Skarsnik | Ok, so how I create something with T type (given I only have his name)? | 14:35 | |
RabidGravy | weird | ||
psch | m: my $type = "Int"; my ::($type) $x; say $x.WHAT | ||
camelia | rakudo-moar f4266f: OUTPUT«Method 'gist' not found for invocant of class '($type)' in block <unit> at /tmp/brUDD27eD6:1» | ||
psch | well, that's how i thought it would work vOv | ||
arnsholt | m: my $x = ::("Str"); say $x | 14:36 | |
camelia | rakudo-moar f4266f: OUTPUT«(Str)» | ||
RabidGravy | m: class T { }; my ::("T") $a; say $a.WHAT | ||
camelia | rakudo-moar f4266f: OUTPUT«Method 'gist' not found for invocant of class '("T")' in block <unit> at /tmp/xz3ZwPJcT2:1» | ||
arnsholt | Skarsnik: But remember that types can be passed around just like any other object | ||
psch | well, indirect lookup for container constraints is apparently different than type object lookup... | 14:37 | |
not sure if that's even supposed to work, anyway | |||
leont: can you expand on your "SourceHandler" comment? | |||
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
|
|||
Skarsnik | Ah nice x) | 14:38 | |
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 | |
14:39
^elyse^ left
|
|||
timotimo | m: my ::Foo $test = 1; say Foo | 14:39 | |
camelia | rakudo-moar f4266f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GmDBhhmytbUndeclared name: Foo used at line 1» | ||
leont | This gluing together could/should be done without shelling out, IMO | ||
timotimo | i would expect that'd be parsed as a type capture, TBH | ||
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:40 | |
So we'd need a SourceHandler that sets up that connection with the eval server instead of running it directly | 14:41 | ||
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 | |
jnthn: The .WHAT on a scalar declared as int32 is apparently Int. Bug or feature? | |||
Skarsnik | it's the int32 is bind from a clib func call I think it remain int32 | 14:43 | |
*if | |||
psch | leont: the "it" that's ran directly is the eval client? | 14:45 | |
leont | Yes | ||
See nqp/tools/jvm/eval-client.pl | |||
It does very little, really | 14:46 | ||
Skarsnik | does %hash.keys and %hash.values give the contents in the same orders? | ||
psch | yeah, that does sound generally useful, to have a "feed this into a socket" kind of handler for a harness | ||
...apparently i can't build panda on r-j | 14:47 | ||
14:47
pmurias_ is now known as pmurias
|
|||
psch | "java.lang.RuntimeException: Cannot access a native attribute as a reference attribute4~ | 14:48 | |
grml | |||
BooK | in perl6, there is no need for try because CATCH is "attached" to the enclosing scope. did I get that right? | 14:50 | |
moritz | aye | 14:51 | |
leont | Usually | ||
moritz | though of course, 'try' is still a very handy shortcut | ||
RabidGravy | in that sense yes, but try is still useful to "try and get a value or undef" | ||
psch | our try is notably different than e.g. javas | ||
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 :-) | ||
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 | ||
arnsholt | In case that's what you're doing =) | ||
BooK | but the doc for Exception pointed to CATCH only | ||
leont | try without a catch swallows the exception | ||
BooK | and 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 | ||
BooK | so I assumed I didn't even need try, and leont comment makes me understand why it's still needed | ||
Skarsnik | arnsholt, I am putting the keys and the values in separate arrays | ||
psch | leont: uhm, how do i run harness6? the make invocations i tried use harness5 | ||
arnsholt | Skarsnik: Right, in that case it's not what you want =) | 14:54 | |
leont | I hadn't enabled it because of said issues | ||
psch | oh, so manually | ||
leont | Just run ./perl6 -Ilib t/harness6 t/<whatever> | ||
./perl6-j -Ilib t/harness6 t/01-sanity t/04-nativecall | |||
timotimo | m: my $b; $b.^set_name('MyClass'); my $c; say $c.WHAT | 14:55 | |
camelia | rakudo-moar f4266f: OUTPUT«(MyClass)» | ||
BooK | I should probably have read that whole section | ||
timotimo | Skarsnik: that's how you change every untyped variable into MyClass instead! | ||
14:56
^elyse^ joined
|
|||
leont | I should have added that incantation as a comment to the jvm Makefile | 14:56 | |
Skarsnik | What?! $c get the last type? | 14:57 | |
timotimo | no | ||
$b's type is Any. you set Any's name to MyClass | |||
arnsholt | Skarsnik: It changes the *name* of the Any type | ||
Skarsnik | oohh | ||
timotimo | now every Any is actually called MyClass | ||
leont | Dogfooding TAP::Harness in its travis configuration, it works :-) | 14:58 | |
14:58
isBEKaml joined
|
|||
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 | ||
camelia | rakudo-moar f4266f: OUTPUT«(T)33942928(T)140221499061984» | ||
arnsholt | The two objects report types with the same names, but the object identities, crucially, are different | ||
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 | ||
14:59
hankache joined
|
|||
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" | ||
leont | Hmmmm | ||
timotimo | BooK: yeah, the good thing about that is you have all your lexicals still valid inside the CATCH block like that | 15:03 | |
15:03
_mg_ left
|
|||
timotimo | psch: does that mean it doesn't have a plan in it? | 15:03 | |
or doesn't have a done()? | |||
Skarsnik | m: use NativeCall; my %h = "I32" => int32, "I8" => int8; for %h.kv -> $k, $v {say $k, nativesizeof($v)} | ||
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 =) | ||
camelia | rakudo-moar f4266f: OUTPUT«I324I81» | ||
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 | ||
psch | timotimo: i guess, it manually outputs "1..24" at the start | ||
no &plan, no &done-testing | |||
timotimo | hm, if the 1..24 gets to the tap parser, that should work | ||
15:04
zakharyas joined
15:05
ponpon is now known as ponbiki
|
|||
RabidGravy | BooK. also you can CATCH { } specific exceptions in the scope, but leave unexpected ones to the try { } | 15:05 | |
15:05
weihan left
|
|||
BooK | RabidGravy: I'm trying to work that out | 15:06 | |
a bare CATCH {} just lets it go through | |||
psch | same for a file with plan, though | ||
BooK: CATCH { } is similar to given { }, in that regard | |||
BooK | so I need to mark it as handled, I guess | ||
timotimo | so something makes it crash in the end? | ||
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 | ||
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 | ||
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 /; | ||
camelia | rakudo-moar f4266f: OUTPUT«「c」» | ||
BooK | m: say @!.perl | ||
camelia | rakudo-moar f4266f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TwCrboHyTsCannot negate . because dotty infix operators are too fiddlyat /tmp/TwCrboHyTs:1------> 3say @!.7⏏5perl» | ||
RabidGravy | m : class X::Foo is Exception { }; { CATCH { when X::Foo { say "woo" } }; Bool.pick && X::Foo.new.throw } | ||
hankache | shouldn't this return Nil? | ||
RabidGravy | m: class X::Foo is Exception { }; { CATCH { when X::Foo { say "woo" } }; Bool.pick && X::Foo.new.throw } | ||
camelia | ( no output ) | ||
RabidGravy | m: class X::Foo is Exception { }; { CATCH { when X::Foo { say "woo" } }; Bool.pick && X::Foo.new.throw } | ||
camelia | rakudo-moar f4266f: OUTPUT«woo» | ||
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" } | ||
camelia | rakudo-moar f4266f: OUTPUT«bah in block <unit> at /tmp/_be_QY_o2A:1» | ||
RabidGravy | m: class X::Foo is Exception { }; { CATCH { when X::Foo { say "woo" } }; Bool.pick && X::Foo.new.throw; die "bah" } | ||
camelia | rakudo-moar f4266f: OUTPUT«woo» | ||
BooK | ok so when implicitely handles the exception | ||
leont | psch: what happens if you add exit 0 to the end of the test? | ||
RabidGravy | that is | ||
BooK: yep | |||
the "default" case can be used for any others | 15:10 | ||
hankache | psch: i am new to regex | ||
leont | Also, it worked for me, but I did it with another test, could you try t/02-op-match.t or some such? | ||
hankache | psch can you kindly tell me how to "anchor" | 15:11 | |
psch | hankache: doc.perl6.org/language/regexes | ||
hankache | coming from SQL ? and * are wildcards | ||
timotimo | ah, yeah, ? and * work differently in regex | ||
i think ? means "any single character"? | 15:12 | ||
in SQL, i mean | |||
hankache | yes timotimo | ||
moritz | % is the wildcard in LIKE queries | ||
corresponding to .* in a regex | |||
timotimo | the equivalent of that is the dot in regex | ||
BooK | and m: CATCH { $_.handled = True }; die "aaahhh"; | ||
m: CATCH { $_.handled = True }; die "aaahhh"; | |||
camelia | rakudo-moar f4266f: OUTPUT«Method 'handled' not found for invocant of class 'X::AdHoc' in block <unit> at /tmp/5klJXEGBW9:1» | ||
psch | leont: i tried t/spec/S05-operators/match.t, cause that exists, and still get the dubious 255 | ||
BooK | m: CATCH { default {} }; die "aaahhh"; | ||
camelia | ( no output ) | ||
hankache | psch thanks i'll read it | ||
BooK | and m: CATCH { say $_.handled; default { say $_.handled } }; die "aaahhh"; | 15:13 | |
psch | leont: note though it still passes every test | ||
15:13
Ven left,
yqt joined
|
|||
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» | ||
BooK | ok, there's something I don't know how to do | 15:14 | |
timotimo | i think handled may be a private attribute | ||
psch | it is | ||
accessed by Booling | |||
(amongst others afair) | |||
leont | What do they return when run by hand? | ||
BooK | but S04 says : $!.handled = 1; | ||
psch | leont: when ran through eval-client.pl, $? is 0 | 15:15 | |
(bash $? that is) | |||
and all tests pass | |||
same EvalServer instance as the harness6 invocation uses | |||
hankache | is there a wildcard other than . | 15:16 | |
. is only one character | 15:17 | ||
something that allows many characters | |||
psch | hankache: that's what quantifiers are for | ||
timotimo | instead of multi-character-matching wildcards, regex has "quantifiers" | ||
psch | m: say "aaaa" ~~ / a+ / | 15:18 | |
camelia | rakudo-moar f4266f: OUTPUT«「aaaa」» | ||
timotimo | every kind of wildcard matches exactly once | ||
pmurias | nqp-m: say(nqp::escape("line2\r\n")) | ||
camelia | nqp-moarvm: OUTPUT«line2 | ||
15:18
MARTIMM left
|
|||
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:18
camelia left
|
|||
pmurias | is nqp-m behaving correctly? it seems like some unicody refactor broke nqp::escape | 15:19 | |
timotimo | could be | ||
15:19
camelia joined
|
|||
timotimo | it does the opposite of what it's supposed to do %) | 15:19 | |
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" | ||
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 directoryServer error occurred! Closing Link: ns1.niner.name (Quit: camelia)Lost conn…» | ||
15:20
ChanServ sets mode: +v camelia
|
|||
timotimo | right, then you do / ^ a .* f $ / | 15:20 | |
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") | ||
hankache | ok | ||
timotimo | m: say "abcdef".startswith("a") | ||
camelia | rakudo-moar f4266f: OUTPUT«Method 'startswith' not found for invocant of class 'Str' in block <unit> at /tmp/taCufjiHor:1» | ||
pmurias puts on his MoarVM hat and starts assembling a pull request | |||
timotimo | oops | ||
disregard that! | |||
psch | timotimo: ENOKEBAB | ||
timotimo | those methods don't exist! | ||
m: say "abcdef".starts-with("a") | 15:22 | ||
camelia | rakudo-moar f4266f: OUTPUT«True» | ||
timotimo | m: say "abcdef".ends-with("f") | ||
camelia | rakudo-moar f4266f: OUTPUT«True» | ||
RabidGravy | chilli SAUCE? | ||
hankache | i can also quantify \D | ||
right? | |||
timotimo | of course | ||
what is \D? | |||
psch | \D is probably our \d | ||
RabidGravy | anything that is a literal or stands for a literal can be quantified | ||
timotimo | oh, "not digit" | ||
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 | ||
timotimo | because they modify a quantifier | ||
well, \d is "a digit" and \D is "anything but a digit" | |||
BooK | so a failed parse returns Nil, but where do I find details about the failure? | 15:24 | |
RabidGravy | "quantifier modifying thingies" | ||
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? | |||
timotimo | because matches usually do backtracking and scanning | ||
leont: i think it's very easy to accidentally return something you don't mean to return in a sub MAIN | |||
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? | ||
that's right; the perl6 grammar has a "high water mark" system | |||
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: github.com/moritz/json/blob/master...iny.pm#L59 | ||
timotimo | that's what you get "expected: postfix, semicolon, ..." from | ||
15:29
spider-mario left
|
|||
BooK | at the stage the exception is thrown, it's too late to have access to the useful info, I assume | 15:29 | |
timotimo | "the exception"? | 15:30 | |
oh | |||
when i said "the perl6 grammar", i meant the one that rakudo has internally to parse perl6 code | |||
sadly, you don't get that for free in any grammar | |||
so in this case, the "useful info" doesn't actually exist :( | 15:31 | ||
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 | |
so the info would be in the action object handed to the grammar | |||
15:33
spider-mario joined
|
|||
RabidGravy | could be | 15:33 | |
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 | ||
timotimo | i think it'd be better to put code for that in the grammar rather than the actions | ||
BooK | how do you get access to the data? | ||
attributes of the grammar? | 15:35 | ||
which need to be reset when entering TOP? | |||
timotimo | the current position is a property of the match object, or rather, the cursor | ||
BooK | the doc on Cursor was very sparse, kinda "nothing to see here, move along" | ||
timotimo | yeah | ||
BooK | doc.perl6.org/type/Cursor | 15:36 | |
15:36
isBEKaml left
|
|||
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+…» | ||
timotimo | m: "foo bar baz quux 123" ~~ / (\w+ { say $/.CURSOR.pos } ) + % \s+ / | ||
camelia | rakudo-moar f4266f: OUTPUT«37111620» | ||
timotimo | m: "foo bar baz quux 123".substr(20) | 15:37 | |
camelia | ( no output ) | ||
timotimo | m: "foo bar baz quux 123".substr(20).say | ||
camelia | rakudo-moar f4266f: OUTPUT«» | ||
timotimo | m: say "1" ~~ / \w / | ||
camelia | rakudo-moar f4266f: OUTPUT«「1」» | ||
timotimo | oh, duh :) | ||
m: "foo bar baz quux 123" ~~ / (\a+ { say $/.CURSOR.pos } ) + % \s+ / | |||
camelia | rakudo-moar f4266f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/txeLOrfZs1Unrecognized backslash sequence: '\a'at /tmp/txeLOrfZs1:1------> 3"foo bar baz quux 123" ~~ / (\7⏏5a+ { say $/.CURSOR.pos } ) + % \s+ / expecting any of: term» | ||
timotimo | how do i "alpha"? | ||
m: "foo bar baz quux 123" ~~ / (<.alpha>+ { say $/.CURSOR.pos } ) + % \s+ / | |||
camelia | rakudo-moar f4266f: OUTPUT«371116» | ||
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» | ||
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,
rangerprice joined
|
|||
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:40 | |
BooK | is it using grammars too? | 15:42 | |
timotimo | nah | ||
github.com/timo/json_fast/blob/mas...ON/Fast.pm | |||
pmurias | are the grapheme numbers for composed characters constant? | ||
RabidGravy | I found something that I considered perfectly valid that JSON::Fast borked on the other day, but forgot what it was | ||
timotimo | pmurias: you mean the generated numbers? don't rely on them | 15:43 | |
RabidGravy: that's potentially easy to do :) | 15:44 | ||
15:45
_28_ria left,
_mg_ joined,
kaare_ joined
|
|||
BooK | timotimo: so perl6 grammars are awesome, but don't use them because they're slow? | 15:45 | |
timotimo | json doesn't need backtracking at all | 15:46 | |
so a big part of what makes grammars awesome is wasted on them | |||
BooK | but it's possible to not backtrack in grammar, I just read that | ||
timotimo | right, "ratchet" mode | ||
i'm not sure if we generate much better code from that yet | |||
15:46
mr_ron joined
|
|||
timotimo | it's been a while since i last touched that part of the code | 15:46 | |
15:48
tokuhiro_ left
|
|||
timotimo | on top of ratchet mode there's also more precise backtracking controls, but at least parts of that aren't implemented yet | 15:49 | |
15:50
_28_ria joined
|
|||
dalek | c: bbc2e39 | (Philippe Bruhat (BooK))++ | doc/Language/grammars.pod: Fix typo |
15:54 | |
15:54
khw joined
15:56
rurban left
15:57
skids joined
|
|||
raiph | .tell pmurias nwc10 on NFG attacks: irclog.perlgeek.de/perl6/2015-04-07#i_10400549 | 15:59 | |
yoleaux | raiph: I'll pass your message to pmurias. | ||
16:02
zakharyas left
|
|||
pmurias | I made a pull request on MoarVM to fix nqp::escape | 16:04 | |
yoleaux | 15:59Z <raiph> pmurias: nwc10 on NFG attacks: irclog.perlgeek.de/perl6/2015-04-07#i_10400549 | ||
timotimo | pmurias: looks good to me | 16:06 | |
i'll just wait for the travis checks to complete and i'll merge it | 16:07 | ||
pmurias | timotimo: travis runs tests for rakudo-m? | 16:09 | |
16:10
Ven joined
|
|||
timotimo | no, it only runs the nqp tests | 16:11 | |
god damn it, clang is slow | |||
16:20
yeahnoob joined
|
|||
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:23
Ven left
|
|||
grondilu | awwaiid: that's almost certainly arbitrary. In truth, any turing complete language would do. | 16:24 | |
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:25 | |
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. | ||
re emscripten -- that doesn't mean you shouldn't try! | |||
16:26
Ven joined
|
|||
grondilu | wouldn't that be STD? | 16:27 | |
16:27
habamax joined
|
|||
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:28 | |
Skarsnik | m: class T {}; my %h = "T" => T; say %h; | 16:33 | |
camelia | rakudo-moar f4266f: OUTPUT«T => (T)» | ||
16:33
^elyse^ left
|
|||
Skarsnik | hm When I write | 16:34 | |
use Gumbo::Binding# contening the gumbo_ type; my gumbo_output_s $m; | |||
my %typ = ("GumboOutput" => gumbo_ouput_s, "GumboNode" => gumbo_node_s); | |||
16:35
Oatmeal left
|
|||
Skarsnik | the hash affection fail, saying it can't find gumbo_ouput_s routine | 16:35 | |
16:37
rindolf left
|
|||
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; | ||
camelia | rakudo-moar f4266f: OUTPUT«T => (T)» | ||
Skarsnik | hm | ||
16:40
hankache left
|
|||
geekosaur | maybe not. so... exporting of types? hm | 16:40 | |
that seems wrong too. | 16:41 | ||
geekosaur doesn't know :( | |||
ugexe | gumbo_output_s = ::($m) ? | 16:43 | |
moritz | what's wrong with exporting types? | ||
Skarsnik | pastebin.com/MZ4yrz3p | 16:45 | |
Types can be find in github.com/Skarsnik/perl6-gumbo/bl...inding.pm6 | 16:48 | ||
16:48
Oatmeal joined
|
|||
ugexe | did you happen to try GumboOutput => ::("gumbo_output_s")? | 16:48 | |
the error doesn't happen until line 14, so im guessing the type applied fine to $m | 16:49 | ||
Skarsnik | yes | ||
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? | ||
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
|
|||
pmurias | awwaiid: I haven't actually measured the performance of the enscripten approach | 16:58 | |
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:00 | ||
grondilu: performance will be moar-with-jit-disabled-slightly-slower | 17:01 | ||
17:01
Begi1115 left
17:02
raoulvdberge left
|
|||
pmurias | grondilu: with slightly being an unknown factor | 17:02 | |
dalek | href="https://modules.perl6.org:">modules.perl6.org: 31d6c3d | (Zoffix Znet)++ | web/build-project-list.pl: Clean up useless code |
17:06 | |
href="https://modules.perl6.org:">modules.perl6.org: 9a1ed6e | (Zoffix Znet)++ | web/build-project-list.pl: Use system() safely |
|||
17:06
_mg_ left,
yeahnoob left,
Begi1115 joined
17:07
^elyse^ joined
|
|||
awwaiid | pmurias: you keeping some repo up to date for us to stare at / mess with? | 17:08 | |
pmurias | awwaiid: perl6/nqp on github | 17:11 | |
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:12
spider-mario is now known as spidermario,
spidermario is now known as spider-mario
|
|||
pmurias | awwaiid: it's merged in | 17:13 | |
keeps bitrot from piling in | |||
awwaiid | awesomesauce | ||
that's the way to go | |||
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:17 | |
17:18
skids left
|
|||
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» | ||
RabidGravy | ah yes | ||
moritz | :( | ||
doesn't seem to work, though | |||
m: class F:ver<1> { }; say F.^ver | 17:19 | ||
camelia | rakudo-moar f4266f: OUTPUT«Method 'gist' not found for invocant of class 'NQPMu' in block <unit> at /tmp/18FlOiHyVM:1» | ||
RabidGravy | I think I worked it out myself, found it didn't work and wandered off on another problem | ||
sprocket | moritz: what does the “^” imean for that method call? | ||
RabidGravy | "on the HOW" | ||
sprocket | aah, ok | ||
RabidGravy | i.e. the meta-object | ||
sprocket | gotcha | ||
17:21
habamax left
17:23
rindolf joined
17:27
zacts left
17:29
Ven left
17:32
grondilu left
17:34
zakharyas joined
|
|||
RabidGravy | I RT'd the "ver not working properly" with RT #126583 for information | 17:35 | |
it may have already been in there but it was difficult to search for | 17:36 | ||
17:42
grondilu joined
|
|||
ugexe | yea i kinda dread using rt | 17:43 | |
17:45
tokuhiro_ joined
17:49
Actualeyes left,
tokuhiro_ left
17:51
zacts joined
17:53
eliasr joined
18:04
Begi1115 left
18:07
Begi1115 joined,
lizmat joined
18:08
colomon joined
18:14
zakharyas left
18:17
Ven_ joined
18:21
cognominal joined
18:24
Ven_ left
18:25
yqt left
18:26
Ven_ joined
|
|||
zengargoyle | hrm, i think NativeCall is beyond me at the moment. | 18:28 | |
is CArray[uint32].new( "string".comb».ord ) a reasonable thing to do? | 18:30 | ||
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..? | ||
camelia | rakudo-moar f4266f: OUTPUT«115115» | ||
moritz | "string".comb».ord # shorter: "string".ords | ||
zengargoyle | ah, i guess my Segfault is maybe something else... :P | 18:34 | |
18:36
Ven_ left
18:37
Ven_ joined
18:38
telex left
18:39
Ven_ left,
brrt joined
18:40
telex joined,
brrt left
|
|||
llfourn | does p6 have something like __DATA__? | 18:40 | |
psch | zengargoyle: that might be NativeCall free()-ing before the lib expects it | ||
zengargoyle: i'm not really into that, though, so take that as a "there might be something spooky somewhere", nothing else :) | 18:41 | ||
llfourn: q:to// | |||
18:41
Ven_ joined
|
|||
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:41 | |
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? | ||
psch: yeah data has to be at the end | |||
psch | llfourn: right, q:to// is probably more like HEREDOC | ||
llfourn | psch: kk thanks :) | ||
psch | llfourn: design.perl6.org/S02.html#Double-un...core_forms for reference | 18:44 | |
zengargoyle | psych: found my bug, a rogue '-' snuck in somewhere and my lack of adding || fail bit me. | 18:45 | |
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 | ||
i'm not seeing my debug note in the DESTROY happening. | |||
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:50 | |
zengargoyle: note that it was added primarily to make Inline::Perl5 not leak things, and Inline::Perl5 calls it manually | 18:51 | ||
zengargoyle: it gets called whenever an object gets GC collected, but this might not happen on program exit | |||
Skarsnik | nativecall has a explicitly-manage to avoid the GC to do work on stuff | 18:52 | |
*not | |||
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» | ||
AlexDaniel | m: say (^1000).pick | ||
camelia | rakudo-moar f4266f: OUTPUT«615» | ||
18:58
uruwi joined
|
|||
dalek | href="https://modules.perl6.org:">modules.perl6.org: 1877371 | (Zoffix Znet)++ | web/ (2 files): Add P6Project::SpriteMaker module |
18:59 | |
psch | AlexDaniel: we got auto-unspace for dotty ops | 19:03 | |
m: say ^1000 .pick | |||
camelia | rakudo-moar f4266f: OUTPUT«931» | ||
psch | (actually i think it's precedence lowering relative to before..?) | 19:04 | |
AlexDaniel | psch: oh nice! Thanks! | ||
19:12
yqt joined
19:17
nys joined
19:18
rindolf left
19:19
pmurias left
|
|||
arnsholt | Skarsnik, zengargoyle: explicitly-manage is only for strings, and also a terrible terrible hack | 19:19 | |
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:20 | ||
After all, it's all garbage at that point | 19:21 | ||
19:21
pmurias joined
|
|||
arnsholt | And if your process is short enough to not trigger a GC during execution of the mainline, no DESTROYS will be fired | 19:21 | |
19:24
Ven_ left
19:25
Ven joined
|
|||
psch | there is nqp::force_gc, but it still relies on some sort of internals knowledge | 19:26 | |
m: use nqp; class A { submethod DESTROY { say "destroyed" } }; for ^1000 { A.new }; nqp::force_gc | |||
camelia | ( no output ) | ||
psch | m: use nqp; class A { submethod DESTROY { say "destroyed" } }; for ^10000 { A.new }; nqp::force_gc | ||
camelia | rakudo-moar f4266f: OUTPUT«destroyeddestroyeddestroyeddestroyeddestroyeddestroyeddestroyeddestroyeddestroyeddestroyeddestroyeddestroyeddestroyeddestroyeddestroyeddestroyeddestroyeddestroyeddestroyeddestroyeddestroyeddest…» | ||
psch | as in, the different gc gens have sizes and whatnot | ||
as i said, i don't really know anything about the moar gc | 19:27 | ||
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 | |
probably not in this case... | |||
psch | zengargoyle: that's probably best served by an END block | 19:39 | |
19:39
Ven left
19:40
Ven joined,
Praise left
19:43
Praise joined,
Praise left,
Praise joined
19:47
tokuhiro_ joined
19:51
tokuhiro_ left
|
|||
dalek | kudo/nom: 4b8937f | lizmat++ | src/core/Str.pm: Fix some off-by-one and skip-empty issues |
19:53 | |
19:55
Ven left
19:56
Ven joined
20:02
Begi1115 left
|
|||
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", "")» | ||
lizmat | in the light of the new :v,:k,:kv,:p on split, I think this is inconsistent | 20:03 | |
TimToady: do you agree ?? ^^ | |||
20:03
Begi1115 joined
20:06
khw left
20:10
Ven left
20:11
Ven joined
20:14
^elyse^ left
|
|||
dalek | kudo/nom: 8b834cc | lizmat++ | src/core/Str.pm: Fix an off-by-one just introduced :-( |
20:18 | |
moritz | did anybody mention libcello.org/learn/garbage-collection yet? | 20:20 | |
20:24
Ven left
|
|||
dalek | c: fa86569 | lizmat++ | doc/Type/Str.pod: Document all old/new features of Str.split |
20:25 | |
20:27
darutoko left
20:31
Ven joined
|
|||
Ulti | looks like done is now a reserved word? what do you use to end tests? | 20:37 | |
lizmat | done-testing | 20:38 | |
done is now part of the supply { } sugar | |||
as is emit() | |||
Ulti | okedoke, thanks | 20:39 | |
lizmat | yw :-) | ||
Ulti: of course, using a plan is always better! | |||
Ulti | ahh yeah I remember changing from done_testing with my other tests | ||
:P | |||
20:40
Ven left,
Ven joined
|
|||
lizmat | m: &&::{}[];; | 20:40 | |
camelia | ( no output ) | ||
lizmat | m: say &&::{}[];; | ||
camelia | rakudo-moar 8b834c: OUTPUT«Nil» | ||
dalek | p: fb0aad7 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp: [js] Implement QAST::Stmt. |
20:41 | |
p: 61f36ca | (Pawel Murias)++ | tools/build/MOAR_REVISION: Bump Moar for fix with nqp::escape |
|||
p: c4c2b73 | (Pawel Murias)++ | t/nqp/59-nqpop.t: Test that nqp::escape works on \r\n. |
|||
ast: 73f6740 | lizmat++ | integration/weird-errors.t: Fudge what seems to be a bogus test now |
20:48 | ||
20:54
kaare_ left
|
|||
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» | ||
lizmat | m: sub a($x is rw) { $x; }; { a 42 }() # but not if within a block ? | 20:56 | |
camelia | ( no output ) | ||
lizmat | m: sub a($x is rw) { $x; }; { a 42 } # seems to be optimizer related | 20:58 | |
camelia | ( no output ) | ||
lizmat | $ perl6 --optimize=off -e 'sub a($x is rw) { $x }; { a 42 }' | ||
Parameter '$x' expected a writable container, but got Int value | |||
RT #126585 | 21:01 | ||
dalek | ast: 4ab8381 | lizmat++ | S06-traits/misc.t: Fudge test for RT #126585 |
21:02 | |
21:04
fjk joined,
fjk left
|
|||
lizmat | All tests successful. | 21:08 | |
Files=1071, Tests=49769, 225 wallclock secs (12.20 usr 3.41 sys + 1383.10 cusr 125.43 csys = 1524.14 CPU) | |||
.oO( just a nice sight :-) |
|||
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 | ||
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
Ven left
|
|||
psch | lizmat: yeah, my patch was indirectly Optimizer related as well | 21:10 | |
21:10
^elyse^ joined
|
|||
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» | ||
lizmat | so as soon as the body is more than just $x, it fails correctly | ||
psch | star-m: sub a($x is rw) { "foo" }; say a 5 | 21:11 | |
camelia | star-m 2015.09: OUTPUT«foo» | ||
psch | star-m: sub a($x is rw) { $x }; say a 5 | ||
camelia | star-m 2015.09: OUTPUT«5» | ||
psch | star-m: sub a($x is rw) { $x = $x + 1 }; say a 5 | ||
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
|
|||
psch | note that's not Parameter::RW | 21:11 | |
so yeah, my patch is definitely just a side-grade... :) | |||
lizmat | well, at least it's not changing the value of the constant 5 :-) | 21:12 | |
like in Perl 5, you could change the value of undef | |||
dalek | href="https://modules.perl6.org:">modules.perl6.org: cf95cb4 | (Zoffix Znet)++ | / (23 files): Use a sprite instead of multiple images (Closes #21) |
21:15 | |
21:16
advwp left,
eliasr left
21:17
raoulvdberge joined
21:18
eliasr joined
|
|||
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 | osystem: 72a76b1 | (Zoffix Znet)++ | README.md: Suggest to check for common errors in META file |
21:23 | |
lizmat | yeah, and it seems to fail when it really matters | ||
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 | |
its now matching \n but I guess it used to match \r sometimes? | |||
21:25
Ven left
|
|||
Timbus | is there a uhh $INPUT_RECORD_SEPARATOR that I can use now | 21:25 | |
21:26
Ven joined
|
|||
lizmat | $?NL ? | 21:26 | |
m: say ?NL | |||
camelia | rakudo-moar 8b834c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7zdDPEAfTPUndeclared name: NL used at line 1» | ||
lizmat | m: say $?NL | 21:27 | |
camelia | rakudo-moar 8b834c: OUTPUT«» | ||
lizmat | m: print $?NL | ||
camelia | rakudo-moar 8b834c: OUTPUT«» | ||
RabidGravy | Zoffix, strangely I am just making a thing to test META files | ||
Timbus | lizmat, does this change the behaviour of matching CCLASS_NEWLINE in nqp? | ||
lizmat | afaik, it doesn't | 21:28 | |
Timbus | oh | ||
then Supply.lines needs a fix | |||
lizmat | the synthetic takes the properties of the base char, which is CR, which is CCLASS_NEWLINE | ||
21:28
raoulvdberge left
|
|||
lizmat | Timbus: it probably does... :-) | 21:28 | |
busy with Str.split testing now... will look at it after that unless someone beats me to it :-) | 21:29 | ||
21:29
raoulvdberge joined
|
|||
ZoffixW | RabidGravy, I'm secretly watching you. | 21:30 | |
:) | |||
RabidGravy, I've also made this checker 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: modules.perl6.org/log/update.log | |||
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 | ||
ZoffixW | moritz, and the sprite stuff would also need Imager::File::PNG installed | ||
21:36
khw joined
|
|||
dalek | osystem: 6c47654 | (Zoffix Znet)++ | README.md: Fix typo |
21:36 | |
21:37
xfix left
21:44
espadrine left
21:46
advwp joined,
pmurias_ joined
|
|||
dalek | oblem_solver_tutorial: 8ad43f9 | lichtkind++ | chapter/text0.md: about demo program |
21:46 | |
oblem_solver_tutorial: d2ab7e2 | lichtkind++ | chapter/text0.md: Merge branch 'master' of github.com/perl6/problem_solver_tutorial |
|||
21:48
tokuhiro_ joined
21:50
pmurias left
21:51
zakharyas joined
21:53
tokuhiro_ left
21:55
Ven left,
Ven joined
21:56
cognominal left
|
|||
ugexe | and thats 1 years of commits. what a terrible idea that was... | 21:57 | |
21:57
cognominal joined
|
|||
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 | |
21:58
TEttinger joined
|
|||
pmurias_ | ugexe: ? | 21:59 | |
21:59
pmurias_ is now known as pmurias
|
|||
zengargoyle | or would it be better to have multi sub foo(<each type>) or sub foo(type1|type2|type3) | 21:59 | |
the library i'm trying to wrap returns a few things that it expects me to free() | 22:01 | ||
dalek | href="https://modules.perl6.org:">modules.perl6.org: c50c8b3 | (Zoffix Znet)++ | Build.PL: Add new modules needed by spriter to the prereqs |
||
ugexe | pmurias: i did at least 1 perl/perl6 github commit every day for the last year | ||
22:02
Begi1116 joined
|
|||
AlexDaniel | ugexe: and why is that a terrible idea? | 22:04 | |
22:04
Begi1115 left
|
|||
pink_mist | AlexDaniel: sounds like a terrible schedule to haveto stick to | 22:04 | |
ugexe | ^ | ||
AlexDaniel | actually, I did the same thing. But somehow it slipped simply because I had a really busy week | 22:05 | |
and then I decided not to keep it | |||
only 179 days though | 22:06 | ||
pink_mist | it's the 'decided not to keep it' bit that's different I think... | ||
TEttinger | ugexe: congrats. keep it up, I'm at 511 days (512 if/when I commit something today) | 22:09 | |
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
Ven left
|
|||
TEttinger | same here | 22:10 | |
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
|
|||
ugexe | hmm so what kind of mental problems should i look forward to developing? | 22:14 | |
ZoffixW | OCD :) | 22:15 | |
ugexe | that got me this far already | ||
ZoffixW | Then nothing to worry about :P | ||
ugexe | so much for scoring some drugs out of it | 22:16 | |
22:17
virtualsue joined
|
|||
moritz | ZoffixW: re modules.perl6.org, I installed the modules, but fucked up the perlbrew environment | 22:18 | |
ZoffixW | :) | ||
moritz | the updating script uses "source ~/perl5/perlbrew/etc/bashrc" | ||
but from cron I start it with "sh update-modules.perl6.org" | |||
and sh != bash | |||
should run again in one minute | 22:19 | ||
dalek | href="https://modules.perl6.org:">modules.perl6.org: 3dae26d | (Zoffix Znet)++ | web/ (8 files): Use pure CSS instead of images for travis stuff |
22:20 | |
22:22
zakharyas left
|
|||
dalek | href="https://modules.perl6.org:">modules.perl6.org: cd6a3bc | (Zoffix Znet)++ | web/assets/css/style.css: Make travis buttons fill the cell and change on hover |
22:24 | |
22:25
Ven left
22:28
Ven joined
22:30
AlexDaniel is now known as alexine`,
alexine` is now known as alexine
|
|||
ZoffixW | moritz++ sweet :D modules.perl6.org works now | 22:32 | |
ZoffixW leaves for a beer | |||
22:32
ZoffixW left
22:33
raiph left
|
|||
dalek | kudo-star-daily: 8b7e4eb | coke++ | log/ (9 files): today (automated commit) |
22:35 | |
kudo-star-daily: a5a33d2 | coke++ | log/ (9 files): today (automated commit) |
|||
rl6-roast-data: bb2876a | coke++ | / (9 files): today (automated commit) |
|||
rl6-roast-data: eb9022c | coke++ | / (9 files): today (automated commit) |
|||
22:37
raiph joined,
eliasr left
|
|||
dalek | kudo/nom: 4988c70 | lizmat++ | src/core/Str.pm: Fix :skip-empty handling on empty splitter |
22:38 | |
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:40
Ven left
|
|||
pink_mist | nice .. except most places require mixed-case passwords :/ | 22:41 | |
22:43
Ven joined
22:55
^elyse^ left
22:56
BenGoldberg joined
|
|||
dalek | osystem: 31c458d | RabidGravy++ | META.list: Add META6 github.com/jonathanstowe/META6 |
22:57 | |
RabidGravy | Zoffix, there you go ;-) | ||
If anyone can think of any "customary" usage in META files that I have missed please PR me ;-) | 22:58 | ||
I'll do the Test::META tomorrow | 22:59 | ||
22:59
Begi1116 left
|
|||
RabidGravy | It's interesting that the "numbers of modules per author" goes almost exactly as you would predict | 23:08 | |
Skarsnik | ? | ||
RabidGravy | number -> number of modules per author: | 23:10 | |
37 1 | |||
16 2 | |||
10 3 | |||
8 4 | |||
7 5 | |||
5 6 | |||
5 7 | |||
4 8 | |||
1 10 | |||
2 11 | |||
1 13 | |||
1 14 | |||
1 18 | |||
1 22 | |||
1 24 | |||
1 25 | |||
1 27 | |||
:) | |||
cat META.list | sed -e 's/https:\/\/raw.githubusercontent.com\///' -e 's/\/.*$//' | sort | uniq -c | sort -n | awk ' { print $1 }' | uniq -c | |||
for the interested | |||
23:10
Ven left
|
|||
Skarsnik | I am still not sure to understand how to read this, I am probably too tired x) | 23:11 | |
RabidGravy | There are lots of authors with one module, and the number of authors with more modules goes down in a curve | 23:12 | |
until it gets to 10 where it sort of asymptotes out | |||
Skarsnik | Oh I see | 23:13 | |
who has 27 modules x) | |||
RabidGravy | retupmoca | ||
23:14
Ven joined
|
|||
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:15 | |
23:19
virtualsue left
23:20
pmurias left
|
|||
RabidGravy | Skarsnik, BTW "Invalid json found at: raw.githubusercontent.com/Skarsnik...META.info" from the modules.perl6.org/log/update.log | 23:24 | |
23:26
Ven left
23:30
Ven joined
|
|||
RabidGravy | tony-o # Module::Does utter crack but fab | 23:30 | |
23:30
virtualsue joined
|
|||
RabidGravy | tony-o++ # Module::Does utter crack but fab even | 23:30 | |
pink_mist | might need a (tony-o)++ ... not sure how sensitive the karma bots are about - in the identifier | 23:32 | |
RabidGravy | :) | 23:34 | |
who knows | |||
lizmat | good night, #perl6! | ||
RabidGravy | goonight | ||
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 | ||
RabidGravy | Zoffix++ # star | 23:37 | |
23:37
N joined,
N is now known as Guest53701
|
|||
Guest53701 | is :kv argument to grep function recent I can not seem to get it to work | 23:37 | |
RabidGravy | yes | 23:38 | |
Guest53701 | thanks I will try to download latest thing | ||
RabidGravy | m: say <a b c d>.grep(/d/, :kv) | 23:39 | |
camelia | rakudo-moar 4988c7: OUTPUT«(3 d)» | ||
Guest53701 | it must be recent I have 2015.06 | 23:41 | |
23:41
Ven left
|
|||
RabidGravy | oh yes waaaay old, lots and lots of changes since then | 23:41 | |
23:41
Ven_ joined
23:44
alexine left
|
|||
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:44 | |
23:45
virtualsue left
|
|||
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 declaredat /tmp/6Jx7judgn_:1------> 3,"qweqwe","gfdgdfg").map({.chars}); say 7⏏5@arr.grep({.chars==$max},:kv);» | ||
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)» | ||
Guest53701 | hm it does not output that on my machine | ||
23:50
tokuhiro_ joined
|
|||
Guest53701 | it only gives me (gfdgdfg) | 23:50 | |
I upgraded | |||
perl6.bat -v says This is perl6 version 2015.09 built on MoarVM version 2015.09 | 23:51 | ||
llfourn | Guest53701: that's still old :P | 23:52 | |
RabidGravy | that's still nearly two months old | ||
23:52
raoulvdberge left
|
|||
RabidGravy | camelia is updated very frequently | 23:52 | |
Guest53701 | there seems to be no windows download for latest thing I guess I better find linux | 23:54 | |
23:54
tokuhiro_ left
|
|||
RabidGravy | don't know what the status of packaged build is, sorry | 23:55 | |
Guest53701 | thanks | ||
23:55
Ven_ left
23:56
Guest53701 left
|
|||
Zoffix | Guest22572, there's a Sept. build of Rakudo Star: rakudo.org/downloads/star/rakudo-st...0(JIT).msi | 23:56 | |
Oh, they left. | |||
llfourn | isn't that what he had? | 23:57 | |
23:57
Ven joined
|
|||
Zoffix | Ah, right. I only saw the "I have 2015.06" above and not the "I upgraded" bit | 23:58 |