»ö« 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! | feather will shut down permanently on 2015-03-31 Set by jnthn on 28 February 2015. |
|||
japhb | timotimo: Is JSON::Fast now 100% correct? If so, can you replace the Rakudo built-in JSON parser with it? | 00:29 | |
00:48
Sqirrel left,
laouji joined
00:53
Sqirrel joined
01:11
skids joined
|
|||
TimToady | JVM very unhappy tonight, seems | 01:13 | |
01:15
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
TimToady | 67 test files failing | 01:16 | |
gist.github.com/anonymous/9dc73118674e46248155 is the boringly repetitious error message | 01:18 | ||
--ll-exception is no help | 01:20 | ||
01:21
tinyblak joined
01:23
aborazmeh left
01:27
yeahnoob joined
01:42
Sqirrel left
|
|||
ugexe | its the range operator i believe | 01:44 | |
my @encoding-chars = 'A'..'Z','a'..'z','0'..'9','+','/'; <-- exception on jvm... reason for MIME::Base64 failing on jvm | |||
01:45
fhelmberger joined
01:47
adu joined
|
|||
ugexe | replaced with an array of explicitly declared characters it works | 01:47 | |
01:48
colomon joined
01:49
fhelmberger left
01:50
Sqirrel joined
|
|||
ugexe | unless you are looking for why/where... cant help you there :) | 01:52 | |
although it will happen if you try to run that code, or just precompile it | 01:55 | ||
TimToady | probably my fault somehow then :) | 01:58 | |
since ranges turn into sequences, and I was just mucking with sequences | |||
ugexe | the only reason i caught that was because i saw you all talking about them earlier | 01:59 | |
TimToady | well, despite the terrible lack of info, I can probably hunt it down through divide-and-conquer | ||
yeah, say 1...5 blows it up | 02:00 | ||
well, I shoulda figgered it out myself, but thanks | 02:01 | ||
02:02
laouji_ joined
02:03
tinyblak left
02:05
laouji left
02:06
dwarring joined
02:12
Sqirrel left
02:14
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
tinyblak joined
02:20
adu left
02:28
Sqirrel joined
02:30
noganex_ joined
02:41
kaare_ joined
02:43
mr-fooba_ left
02:48
muraiki joined
02:55
adu joined
03:11
laouji joined
03:14
laouji_ left
03:17
aborazmeh left,
tinyblak left
03:18
anaeem1 joined
03:28
molaf__ left
03:31
yeahnoob left
|
|||
dalek | kudo/nom: 0354bb6 | TimToady++ | src/core/operators.pm: avoid last in loop in gather that blows up jvm |
03:32 | |
TimToady | .tell jnthn any idea why the lasts I removed in 0354bb6 cause the JVM to puke? | 03:33 | |
yoleaux | TimToady: I'll pass your message to jnthn. | ||
awwaiid | Can I do something like: sub MAIN(IO $filename ~~ :f); to say the param must be a file? | 03:34 | |
TimToady | use where intead of ~~ maybe | ||
but you might also need IO() to coerce it | 03:35 | ||
awwaiid | ah yes, where! I was looking for that but didn't search right | ||
ub MAIN(IO() $filename where { $filename ~~ :f }); # works perfectly, thanks! | 03:36 | ||
TimToady | where :f oughta work | 03:37 | |
it's just a smartmatch | |||
skids | m: { .say; succeed 43.say; }(1).perl.say # I can see no use for succeed hitting bottom without finding a when or topicalizer (?), so it should probably warn, at least. | ||
camelia | rakudo-moar 5a3f38: OUTPUT«143» | ||
TimToady | a bare block topicalizes $_, in fact, you used the top in .say | 03:38 | |
*topic | |||
03:38
muraiki left
|
|||
awwaiid | it does! neat | 03:38 | |
skids | Yes, and because there was no when { }, succeed did not stop there. It went a the way to the outermost scope. | 03:39 | |
*all | |||
m: (when * { succeed 43.say; }).perl.say | |||
camelia | rakudo-moar 5a3f38: OUTPUT«43» | ||
skids | That found the when but no topicalizer. | 03:40 | |
TimToady | yeah, seems a bit rinky-tink yet | 03:41 | |
skids | Unless there is a use case, I think if a succeed control exception hits the bottom, it shold just throw. | ||
(something other than a succeed control exception :-) | 03:42 | ||
TimToady | most of the lexotics in rakudo are still a bit rinky-tink | 03:43 | |
skids | Well, to be fair I don't think the behavior is addressed in spec. | 03:44 | |
TimToady | S04:952 is pretty detailed, but doesn't say how it should fail to be sure | 03:46 | |
m: { when * -> $_ { succeed .say }; say "Oops" }(42).say | 03:48 | ||
camelia | rakudo-moar 0354bb: OUTPUT«Too few positionals passed; expected 1 argument but got 0 in block at /tmp/Iz6taeDCrn:1 in block <unit> at /tmp/Iz6taeDCrn:1» | ||
TimToady | I guess when -> isn't implemented yet, but would be interesting to see if it is merely scanning for a topicalizer and ignoring the when | 03:49 | |
TimToady wonders if there are tests written... | 03:50 | ||
03:51
anaeem1 left
|
|||
skids | If a bare block topicalizes, is there an example of a non-topicalizing block? | 03:51 | |
TimToady | m: say "Here { $_ } is a non-topicalizing block" given 42 | 03:57 | |
camelia | rakudo-moar 0354bb: OUTPUT«Here is a non-topicalizing block» | ||
TimToady | m: say "Here { $^a } is a non-topicalizing block" given 42 | 03:58 | |
camelia | rakudo-moar 0354bb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DvN6528gibPlaceholder variable $^a may not be used here because the surrounding block takes no signatureat /tmp/DvN6528gib:1------> 3say "Here { $^a }7⏏5 is a non-topicalizing block" given 42 …» | ||
skids | m: (given 1 { -> $a { when * { succeed 43 }; }(1).say; 42; }).say; 41.say # Is a pointy considered topicalizing? | 03:59 | |
camelia | rakudo-moar 0354bb: OUTPUT«434241» | ||
TimToady | only if it declares $_ in the siggie | ||
04:01
anaeem1_ joined
04:03
BenGoldberg left
04:04
FROGGS_ joined
04:06
Sqirrel left
04:08
FROGGS left
04:16
anaeem1__ joined,
anaeem1_ left
04:17
tinyblak joined
04:18
gcole_ joined
04:23
laouji left
|
|||
dalek | c: 49755ef | skids++ | lib/Language/control.pod: Split up some long lines and go OCD on the code sample spacing |
04:35 | |
c: ade043f | skids++ | lib/Language/control.pod: Subdivide the given/when/default/proceed/succeed section Show a few examples of when/default without given For now, avoided giving examples with non-topicalized blocks (rakudo NYI) |
|||
skids | Now I wait to see how badly I screwed up markup. | ||
sjn | question. is it meaningful/correct to talk about "sigilless variables" as constants? | 04:44 | |
skids | m: my \d = 1; d = 2; d.say; | 04:45 | |
camelia | rakudo-moar 0354bb: OUTPUT«Cannot modify an immutable Int in block <unit> at /tmp/VlcXiG8pVX:1» | ||
skids | hrm. | 04:46 | |
m: sub foo (\d is rw) { d++ }; my $a = 1; foo($a); $a.say; | 04:47 | ||
camelia | rakudo-moar 0354bb: OUTPUT«2» | ||
04:48
laouji joined
|
|||
skids | m: my (\d); d++; d++; d.say; | 04:49 | |
camelia | rakudo-moar 0354bb: OUTPUT«2» | ||
dalek | c/sjn-twigil-1: 0949009 | (Salve J. Nilsen)++ | lib/Language/variables.pod: Update variables.pod Example should use $.b to demonstrate method calls to $.a |
04:55 | |
c: 0949009 | (Salve J. Nilsen)++ | lib/Language/variables.pod: Update variables.pod Example should use $.b to demonstrate method calls to $.a |
05:02 | ||
c: 796181f | paultcochrane++ | lib/Language/variables.pod: Merge pull request #73 from perl6/sjn-twigil-1 Update variables.pod |
|||
[ptc] | skids++ # doc corrections | 05:07 | |
05:11
anaeem1__ left
05:24
anaeem1 joined
|
|||
TimToady | we try to reserve the term "constant" for things that can never be rebound. at best \d would be a readonly since it can be rebound next time through, and it looks like sometimes it's bound to a container | 05:32 | |
m: my (\d); say VAR(d).WHAT; | 05:33 | ||
camelia | rakudo-moar 0354bb: OUTPUT«(Scalar)» | ||
TimToady | m: my (\d) ::= 42; say VAR(d).WHAT; | ||
camelia | rakudo-moar 0354bb: OUTPUT«Too few positionals passed; expected 1 argument but got 0 in block <unit> at /tmp/e7a60IHhI6:1» | ||
TimToady | m: my (\d) = 42; say VAR(d).WHAT; | ||
camelia | rakudo-moar 0354bb: OUTPUT«(Scalar)» | ||
TimToady | well, is arguably buggy anyway | ||
m: my \d = 42; say VAR(d).WHAT; | 05:34 | ||
camelia | rakudo-moar 0354bb: OUTPUT«(Int)» | ||
TimToady | that one is definitely readonly | ||
m: my \d = 42.item; say VAR(d).WHAT; | |||
camelia | rakudo-moar 0354bb: OUTPUT«(Int)» | ||
TimToady | m: my \d = $(42); say VAR(d).WHAT; | ||
camelia | rakudo-moar 0354bb: OUTPUT«(Int)» | ||
TimToady | m: my \d = Scalar.new(42); say VAR(d).WHAT; | 05:35 | |
camelia | rakudo-moar 0354bb: OUTPUT«Default constructor for 'Scalar' only takes named arguments in method new at src/gen/m-CORE.setting:974 in block <unit> at /tmp/PWXfh1bu46:1» | ||
TimToady | m: my \d = Scalar.new; say VAR(d).WHAT; | ||
camelia | rakudo-moar 0354bb: OUTPUT«Cannot call method 'BUILDALL' on a null object in method bless at src/gen/m-CORE.setting:985 in method new at src/gen/m-CORE.setting:971 in block <unit> at /tmp/x7Ep31OViP:1» | ||
05:36
lizmat left
05:39
lizmat joined
|
|||
labster | m: =begin pod =for pod :number(42) :zebras :!sheep=end pod say $=pod[0]; | 05:40 | |
camelia | rakudo-moar 0354bb: OUTPUT«Pod::Block::Named{:name("pod")}<> Pod::Block::Named{:config("\{:number(\"42\"), :sheep(\"0\"), :zebras(\"1\")}"), :name("pod")}<>» | ||
labster | shouldn't those be :sheep(False) and :zebras(True)? | 05:41 | |
skids | [ptc]++ docs in the first place | 05:43 | |
05:45
anaeem1 left,
Psyche^ joined,
fhelmberger joined
05:47
anaeem1_ joined
05:48
skids left
05:50
fhelmberger left
05:51
anaeem1_ left
|
|||
lizmat | NLPW& | 05:52 | |
05:53
lizmat left
06:04
anaeem1 joined
06:10
larion left
06:25
tinyblak left
06:26
tinyblak joined,
FROGGS_ left
06:30
Sqirrel joined
06:41
yvan1 left
06:42
diana_olhovik_ joined
06:46
RabidGravy joined
06:53
diana_olhovik_ left
06:56
Ven joined,
Rounin joined,
dwarring left
07:02
_mg_ joined,
adu left
07:06
lizmat joined
|
|||
lizmat | good morning from the NLPW in the lovely town of Utrecht | 07:06 | |
m: m: =begin pod =for pod :number(42) :zebras :!sheep=end pod say $=pod[0]; # labster: feels to me that should be False/True rather than 0/1 | 07:09 | ||
camelia | rakudo-moar 0354bb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/z1sBA2C2PVPreceding context expects a term, but found infix = insteadat /tmp/z1sBA2C2PV:1------> 3m: =7⏏5begin pod» | ||
lizmat | m: =begin pod =for pod :number(42) :zebras :!sheep=end pod say $=pod[0]; # labster: feels to me that should be False/True rather than 0/1 | ||
camelia | rakudo-moar 0354bb: OUTPUT«Pod::Block::Named{:name("pod")}<> Pod::Block::Named{:config("\{:number(\"42\"), :sheep(\"0\"), :zebras(\"1\")}"), :name("pod")}<>» | ||
lizmat | perhaps a missing nqp::p6bool() wrapper ? | ||
07:12
lizmat left
07:14
FROGGS joined
|
|||
Ven | github.com/Microsoft/openssl/blob/...project.pl microsoft totally uses perl as well | 07:14 | |
07:18
telex left
07:20
telex joined
|
|||
RabidGravy | Ven, if my memory serves me they actually paid for the first port of Perl 5 to windows | 07:29 | |
07:32
brrt joined
|
|||
FROGGS | RabidGravy: they supported ActivePerl IIRC | 07:34 | |
RabidGravy | yeah but there was a truly horrible port of 5.000m that was on the Windows NT resource kit CD that pre-dated ActivePerl | 07:39 | |
FROGGS | aye | 07:40 | |
07:43
cschwenz joined,
lizmat joined
07:47
diana_olhovik_ joined
|
|||
lizmat | .tell timotimo no, I didn't see your fast JSON parser yet, something to put in core ? | 07:47 | |
yoleaux | lizmat: I'll pass your message to timotimo. | ||
07:50
Ven left,
bjz joined
07:51
yvan1 joined
07:53
abraxxa joined
|
|||
brrt | lizmat: github.com/timo/json_fast | 07:56 | |
lizmat | cool! | 07:58 | |
brrt | yeah | ||
lizmat | .tell timotimo feels to me it could use a few native arrays and native str in some places still | 07:59 | |
yoleaux | lizmat: I'll pass your message to timotimo. | ||
dalek | Heuristic branch merge: pushed 26 commits to rakudo/newio by lizmat | 08:01 | |
brrt | .tell timotimo Fast.pm L66:L82 can be a hash? | 08:02 | |
yoleaux | brrt: I'll pass your message to timotimo. | ||
dalek | Heuristic branch merge: pushed 34 commits to roast/newio by lizmat | ||
08:04
bjz left,
zakharyas joined,
mr-foobar joined
|
|||
timotimo | yeah, i think a hash would be good, just not sure how to handle the \u case well | 08:05 | |
yoleaux | 07:47Z <lizmat> timotimo: no, I didn't see your fast JSON parser yet, something to put in core ? | ||
07:59Z <lizmat> timotimo: feels to me it could use a few native arrays and native str in some places still | |||
08:02Z <brrt> timotimo: Fast.pm L66:L82 can be a hash? | |||
timotimo | i thought a few more native things would be better, too. i have to do precise timings to see what is worth it and what isn't | 08:07 | |
it seems like there's a sort of trade-off between "my int $ord = nqp::ordat($text, $pos)" vs "my $ord := nqp::ordat($text, $pos)" | |||
and i don't have to use parenthesis notation everywhere for nqp "sub" calls, either | 08:08 | ||
08:08
WABVHN9 joined,
diana_olhovik_ left,
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
timotimo | at least with regards to allocations, it seems waterbeddy at the moment | 08:08 | |
as in: either you get Scalar allocations or Str/Int allocations | 08:09 | ||
and there's a LOT of those allocations | |||
and while $pos++ would work now, it still turns into a full sub call, if i saw correctly | |||
08:09
lizmat left
|
|||
timotimo | that's why i put $pos = $pos + 1 everywhere | 08:09 | |
brrt | kill all the allocations! | 08:10 | |
timotimo | i'd like to | ||
brrt | but yeah, looks pretty good timo :-) | ||
timotimo | no, it looks ugly :) | ||
brrt | you are not a true C programmer | ||
then :-P | |||
timotimo | :D | ||
brrt | why are most subs prefixed with my? don't want to expose them? | 08:11 | |
timotimo | correct | ||
their interface isn't exactly user-friendly | |||
brrt | also... i don't agree that a json string ought to start with a { or [ | ||
timotimo | blame the JSON::Tiny test suite | ||
i was looking for that in the ecma spec for json, too | 08:12 | ||
brrt | i think you can have totally valid numbers and strings | ||
timotimo | and couldn't find it | ||
brrt | as in "foo" is perfectly valid json imho | ||
but timotimo++ | |||
08:12
laouji left
|
|||
timotimo | # stolen from JSON::XS, 18_json_checker.t | 08:12 | |
Q<<"A JSON payload should be an object or array, not a string.">>, | |||
possibly stolen from there before that was changed in the spec or something like that? | 08:13 | ||
JSON::Tiny is pretty old already | |||
08:17
laouji joined,
darutoko joined,
lizmat joined
|
|||
RabidGravy | fwiw, Node.js won't parse a plain atom either | 08:18 | |
timotimo | the json checker test file from JSON::XS still seems to want the outermost value having to be an object or array | ||
RabidGravy | > var foo = JSON.parse('hshsh'); | ||
SyntaxError: Unexpected token h | |||
08:19
eli-se joined
|
|||
RabidGravy | no I'm talking shit | 08:20 | |
omitted the "" | |||
timotimo | ah | ||
RabidGravy | > var foo = JSON.parse('"hshsh"'); | 08:21 | |
undefined | |||
timotimo | ... undefined? | ||
RabidGravy | the Node.js REPL does that for any object | 08:22 | |
timotimo | that's weird. is it just so that it doesn't print a thousand lines of output for everything? | ||
RabidGravy | console.log(JSON.parse('{}')); | 08:23 | |
{} | |||
undefined | |||
> console.log(JSON.parse('"foooo"')); | |||
foooo | |||
undefined | |||
timotimo | OK | ||
RabidGravy | never been sufficiently curious to find out *why* it prints "undefined" | 08:24 | |
08:26
Ven joined
|
|||
bobkare | I seem to recall something about non-array/object json documents being a new thing in the new json standard last year | 08:27 | |
timotimo | i read the 2013 standard and it didn't have any restriction on that | 08:29 | |
labster | lizmat: Actually I'm pretty sure that it's in Perl6::Pod that's causing that pod error earlier, right under this comment: # and this is the worst hack of them all. # Hide your kids, hide your wife! | 08:32 | |
timotimo | oh tadzik %) | 08:33 | |
FROGGS | :D | ||
labster | much more entertaining that TODO FIXME | ||
*than | |||
08:35
diana_olhovik joined
|
|||
FROGGS | m: try use Flubber; | 08:37 | |
camelia | rakudo-moar 0354bb: OUTPUT«===SORRY!===Could not find Flubber in any of: /home/camelia/.perl6/2015.03-223-g0354bb6/lib, /home/camelia/.perl6/2015.03-223-g0354bb6, /home/camelia/rakudo-inst-2/share/perl6/lib, /home/camelia/rakudo-inst-2/share/perl6/vendor/lib, /home/camelia/rakudo…» | ||
08:39
dakkar joined
|
|||
RabidGravy | I'm trying to remember what software it was where it documented that it *extends* JSON to allow the atoms at the top level | 08:41 | |
08:42
rurban_ joined
|
|||
nwc10 | "YAML?" :-) | 08:44 | |
Ven | json5 probably | 08:46 | |
08:48
fhelmberger joined
|
|||
RabidGravy | no, no some actual software that uses JSON, I thought it was CouchDB but I can't find what I thought I read in the docs | 08:48 | |
08:50
diana_olhovik left
|
|||
RabidGravy | though it does have a useful round up of real world json parser behaviour in docs.couchdb.org/en/1.6.1/api/basic...son-basics | 08:51 | |
08:51
mr-foobar left,
andreoss joined
|
|||
jnthn | timotimo: "my" is the defualt for subs | 08:52 | |
yoleaux | 9 Apr 2015 22:12Z <lizmat> jnthn: that's what b6bc4ecd08b4792d73ab0ee9da01edac60a909c0 did (well, checking, not throwing, not sure what would be best in this case) | ||
9 Apr 2015 22:13Z <lizmat> jnthn: perhaps an X::OutOfRange exception would be best, to stay in line with .substr | |||
03:33Z <TimToady> jnthn: any idea why the lasts I removed in 0354bb6 cause the JVM to puke? | |||
08:53
andreoss` joined
|
|||
eli-se | .botsnack | 08:54 | |
yoleaux | :D | ||
jnthn | .tell TimToady Not immediately, no... :( | 08:55 | |
yoleaux | jnthn: I'll pass your message to TimToady. | ||
eli-se | I think yoleaux likes bones. "bot" is Dutch for "bone" | ||
08:56
andreoss left
08:57
diana_olhovik_ joined
|
|||
nine | I think we should end calling modules ::Tiny or ::Fast. Tiny things never stay tiny. And fast things get superseeded by things that are even faster. Why not just name it after what it does? It's a JSON::Parser, nothing more, nothing less. And in Perl 6, both JSON::Tiny and JSON::Fast could be called JSON::Parser, just by two different authorities. The one even is a reimplementation of the other. | 08:59 | |
yoleaux | 9 Apr 2015 22:11Z <lizmat> nine: the solution is simple: Inline::Perl6 -> Inline::Perl5 -> other version :-) | ||
08:59
oetiker left,
aborazmeh left,
lizmat left
|
|||
nine | .tell lizmat shame on me for not thinking about using Inline::Perl6 :) | 09:00 | |
yoleaux | nine: I'll pass your message to lizmat. | ||
09:04
diana_olhovik_ left
09:05
espadrine joined,
diana_olhovik joined
|
|||
dalek | ast: e35d2cf | labster++ | S (3 files): test that "0" is now True, fix tests for non-string pod options |
09:06 | |
kudo/nom: 82a1811 | labster++ | src/core/Str.pm: ?"0" is now True per spec change In particular perl6/specs@befb20c3b |
09:07 | ||
09:08
noganex joined
09:10
bjz joined
|
|||
moritz | labster: do you have some assessment of the ecosystem fallout caused by that change? | 09:11 | |
09:11
noganex_ left
|
|||
labster | not really, though it only broke 4 spectests (and some wrong tests). If you want to revert, go ahead. | 09:11 | |
FROGGS | no, we can measure the fallout | ||
moritz | labster: I don't want to revert right now | 09:12 | |
only if it turns out to be a disaster :-) | |||
labster | FROGGS: how do we measure now? | ||
FROGGS | run a panda smoke, copy the share/panda/reports.<compiler-version>, checkout to the commit before the change, smoke again, and compare both report files | 09:13 | |
moritz | then we can prepare branches for modules, and do the change right after a release | ||
FROGGS | ahh, and you've got to set PANDA_SUBMIT_TESTREPORTS=1 | ||
labster | :) | ||
09:18
lizmat joined
09:20
andreoss` left,
bjz left
09:22
grondilu joined
|
|||
RabidGravy | right off to the seaside to escape the pollution and pollen | 09:25 | |
09:29
diana_olhovik left
09:30
RabidGravy left
09:34
diana_olhovik_ joined
09:35
diana_olhovik_ left
09:38
fhelmberger left
09:39
diana_olhovik joined
09:40
fhelmberger joined
|
|||
dalek | pan style="color: #395be5">perl6-examples: 533535f | paultcochrane++ | categories/wsg/advanced-2008/event (2 files): Use consistent filename for event010-dwhipp.p6 |
09:42 | |
pan style="color: #395be5">perl6-examples: a294ef5 | paultcochrane++ | categories/wsg/ (8 files): Document examples for wsg category |
|||
09:43
fhelmberger left
09:44
fhelmberger joined
09:45
bjz joined
09:46
oetiker joined
09:47
Ven left,
[ptc]_ joined
09:51
noganex_ joined
|
|||
[ptc]_ | lizmat: does slurp still append a newline? | 09:53 | |
lizmat | not sure why it would, does it? | 09:54 | |
yoleaux | 09:00Z <nine> lizmat: shame on me for not thinking about using Inline::Perl6 :) | ||
09:54
noganex left
|
|||
[ptc]_ | lizmat: just found it mentioned in tests in the perl6-examples project, and after Tux' comment, wondered if it had been changed | 09:54 | |
lizmat | is you look at the result of a slurp with say, it will have a \n after it :-) | 09:55 | |
[ptc]_ | lizmat: aha, it's still there. Thanks :-) | ||
09:56
diana_olhovik left
10:05
diana_olhovik_ joined
10:06
lichtkind joined
10:07
grondilu left
10:08
chenryn joined
|
|||
lizmat | std: [42]<> | 10:09 | |
camelia | std 28329a7: OUTPUT«ok 00:00 137m» | ||
lizmat | m: say [42]<>.perl # did I miss a memo on that syntax? | ||
camelia | rakudo-moar 82a181: OUTPUT«[42]<>» | ||
lizmat | m: say [42].perl # did I miss a memo on that syntax? | 10:10 | |
camelia | rakudo-moar 82a181: OUTPUT«[42]» | ||
psch | m: say [42].flat.perl | ||
camelia | rakudo-moar 82a181: OUTPUT«[42]<>» | ||
psch | lizmat: i understood it as a container-independant zen slice | 10:11 | |
masak | good noon, #perl6 | ||
psch | lizmat: i think TimToady++ had some rational about a week back, let me see if i can find it | ||
lizmat | "switch to .<> as more visually distinct decont" | ||
10:11
molaf joined
|
|||
masak | lizmat: there's a bit of discussion about it in the backlog. | 10:11 | |
lizmat | ok | ||
masak | lizmat: I can't say I'm overly pleased with it. | ||
to me, .<> still rings of "hash access" | 10:12 | ||
psch | right, decont it was | ||
irclog.perlgeek.de/perl6/2015-04-02#i_10382903 | |||
eli-se | I want to add the <> operator as a slang exercise. | ||
masak | why a slang? it's just a normal non-magical operator, sugar for `.decont()` or whatever | 10:13 | |
eli-se | I mean the Perl 5 operator, like <$fh> | 10:14 | |
masak | oh! | 10:15 | |
moritz | that's a postcircumfix operator | ||
masak | no, it's a circumfix operator | ||
eli-se | normal circumfix operator | ||
moritz | erm | ||
sorry | |||
yes | |||
masak | we don't often talk about those :) | ||
eli-se | m: sub circumfix:<< < > >>($fh) { say $fh }; <'foo'> | 10:16 | |
camelia | rakudo-moar 82a181: OUTPUT«5===SORRY!5=== Error while compiling /tmp/XmiRRzxwHJMissing required term after infixat /tmp/XmiRRzxwHJ:1------> 3mfix:<< < > >>($fh) { say $fh }; <'foo'>7⏏5<EOL> expecting any of: prefix term» | ||
eli-se | lolwat | ||
psch | i don't think the rakudo parser is there yet | ||
quote ops are parsed special | |||
10:16
diana_olhovik_ left
|
|||
psch | m: &circumfix:«< >».perl.say | 10:16 | |
camelia | rakudo-moar 82a181: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QQME8pOr4ZUndeclared routine: &circumfix:<< >> used at line 1. Did you mean '&circumfix:<:{ }>', '&circumfix:<[ ]>', '&circumfix:<{ }>'?» | ||
psch | m: &circumfix:«[ ]».perl.say | 10:18 | |
camelia | rakudo-moar 82a181: OUTPUT«sub circumfix:<[ ]> (*@elems) { #`(Sub|36386456) ... }» | ||
eli-se | What does #` mean? | ||
psch | eli-se: delimited comment | ||
eli-se | ok | ||
psch | m: say #`[ not this ] "this" | ||
camelia | rakudo-moar 82a181: OUTPUT«this» | ||
psch wonders how in the world overriding infix:<;> is going to word | 10:20 | ||
10:20
VAAEMUL joined
|
|||
psch | *work | 10:20 | |
masak | psch: doing the overriding will work, but the operator will be of limited use. | ||
psch: as it will be picked up by other rules, like statement-ending rules. | 10:21 | ||
psch | masak: oh, so it'd only get picked up as overridden where it would work as LoL delimiter otherwise? | ||
that's less weird i suppose | 10:22 | ||
(or maybe "that'd be") | |||
10:22
_mg_ left
10:24
rindolf joined
10:28
eli-se left
|
|||
lizmat | lunch& | 10:32 | |
10:32
lizmat left
10:33
[ptc]_ left
10:38
chenryn left
10:41
chenryn joined
10:43
chenryn left
10:53
davido_ joined
10:54
chenryn joined
10:56
fhelmberger left
10:58
chenryn left
11:01
chenryn joined
11:04
chenryn left
11:06
_mg_ joined
11:09
chenryn joined
11:10
chenryn left,
fhelmberger joined
11:11
raiph joined
11:13
chenryn joined
11:23
diana_olhovik_ joined
11:32
diana_olhovik_ left
|
|||
timotimo | yo flussence | 11:33 | |
6.49user 0.05system 0:06.58elapsed 99%CPU (0avgtext+0avgdata 150996maxresident)k | 11:34 | ||
3.23user 0.04system 0:03.29elapsed 99%CPU (0avgtext+0avgdata 114532maxresident)k | |||
this is JSON::Tiny and then JSON::Fast | |||
moritz | timotimo: is JSON::Fast a reimplementation from the ground up? | 11:35 | |
timotimo: or incremental updates to JSON::Tiny? | |||
FROGGS | and without a grammar | ||
timotimo | reimplementation | 11:36 | |
FROGGS | moritz: github.com/timo/json_fast/blob/mas...ON/Fast.pm | ||
timotimo | the code is "butt-ugly" | ||
and if i uncomment the to-json proto and such, i get Redeclaration of routine to-json | |||
:( | |||
FROGGS | timotimo: nobody forces you to cuddle else :o) | ||
moritz | wow, it seems you *can* write Pascal in any language :-) | ||
timotimo | thanks | ||
FROGGS | m: sub to-json ($s) { } | 11:37 | |
camelia | ( no output ) | ||
FROGGS | m: proto to-json ($s) { } | ||
camelia | ( no output ) | ||
FROGGS | hmmm | ||
timotimo | moritz: i can make it prettier still, but the recent MoarVM and rakudo "regressions" make a few things a bit worse, performance-wise | ||
FROGGS | m: proto to-json is export {*} | ||
camelia | ( no output ) | ||
timotimo | it ought to be faster in general, but lots of blocks that could be inlined don't get inlined at the moment | ||
and we end up allocating a gigantic crapton of BOOTCode objects, for example | 11:38 | ||
FROGGS | m: proto to-json($) is export {*}; multi to-json(Real:D $d) { ~$d } | ||
camelia | ( no output ) | ||
timotimo | and $foo++ doesn't get optimized properly yet, either | ||
FROGGS | why don't I get that? | ||
timotimo | m: module JSON::Fast; proto to-json($) is export {*} | ||
camelia | ( no output ) | ||
timotimo | i have no clue | ||
FROGGS | timotimo: would be awesome to optimize the heck out of it... | 11:39 | |
timotimo | yes | ||
FROGGS | so that it can be inlined etc | ||
timotimo | at the moment, a few things are more or less waterbeddy | ||
FROGGS | though I don't understand nothing about that :o( | ||
11:39
fhelmberger left
|
|||
timotimo | i tried to make nom-ws not allocate any Scalar or Int objects, but at the moment it has to do either one or the other | 11:39 | |
11:39
diana_olhovik joined
|
|||
FROGGS | it would be also nice of course to get JSON::Tiny faster by smartifying spesh and the jit | 11:45 | |
11:45
lizmat joined
|
|||
FROGGS | but I see that this might not be trivial | 11:46 | |
timotimo | not only spesh and the jit, but also our regex compiler and optimizer need some love | 11:47 | |
FROGGS | yeah | 11:52 | |
though, one needs a good profile to see what exactly needs love | |||
brrt | true enough | 11:54 | |
FROGGS | I dunno if JSON::Tiny is too big or not for that task.... minimizing it might just make it unreal | 11:55 | |
I hope we will have some sort of feature freeze in Q4 this year, and only care about fixing bugs and speedup things | 11:56 | ||
nwc10 | I don't think that you can have a proper Christmas without snow | ||
FROGGS | umm, WAT? | 11:57 | |
nwc10 | (or, less obtusely, I don't think it will be possible to make a release without some sort of observance of a freeze) | ||
FROGGS | ahh | ||
yeah | |||
:o=) | |||
err | |||
:o) | |||
11:59
[ptc]_ joined
12:02
grondilu joined
|
|||
grondilu | hum weird. Now that ?"0" is True I thought I could remove the C<'' ne> in rosettacode.org/wiki/Temperature_co...on#Perl_6, but it does not work as I'd expect. | 12:10 | |
moritz | m: say so '0' | ||
camelia | rakudo-moar 82a181: OUTPUT«True» | ||
moritz | shouldn't that be False now? | 12:11 | |
psch | star-m: say so '0' | ||
camelia | star-m 2013.03: OUTPUT«False» | ||
moritz | erm | ||
yes | |||
I'm confused | |||
FROGGS | ===CONFUSED!=== | ||
grondilu | no it was concluded that it should be true | ||
moritz | right | 12:12 | |
grondilu | github.com/perl6/specs/issues/87 | ||
moritz | I just mis-remembered the direction of the change | ||
high time for the weekend | |||
grondilu | but strangly when I enter 0 the loop stops | ||
FROGGS | grondilu: what type is it for the 0 case? | 12:13 | |
12:13
Ven joined
|
|||
dalek | kudo/nom: 5a38b21 | lizmat++ | src/core/ (2 files): Make "say/note" look at .nl setting |
12:13 | |
FROGGS | m: my $i; while '0' && $i++ < 10 { }; say $i | 12:14 | |
camelia | rakudo-moar 82a181: OUTPUT«(Any)» | ||
grondilu | it comes from prompt so it should be Str | ||
12:14
laouji left
|
|||
grondilu | try this: while my $ = prompt "value? " { say "ok" } | 12:14 | |
FROGGS | m: my $i; while '0e0' && $i++ < 10 { }; say $i | ||
camelia | rakudo-moar 82a181: OUTPUT«11» | ||
FROGGS | :/ | ||
12:14
n0vacane joined
|
|||
FROGGS | m: say '0'.Bool | 12:14 | |
camelia | rakudo-moar 82a181: OUTPUT«True» | ||
FROGGS | m: my $i; while '0'.Bool && $i++ < 10 { }; say $i | ||
camelia | rakudo-moar 82a181: OUTPUT«11» | ||
FROGGS | so, what does while there? | ||
psch | m: say '0'.Stringy.Bool | ||
camelia | rakudo-moar 82a181: OUTPUT«True» | ||
12:15
diana_olhovik left
|
|||
FROGGS | the while op does not seem to call .Bool it seems | 12:15 | |
m: say nqp::p6bool('0') | |||
camelia | rakudo-moar 82a181: OUTPUT«False» | ||
FROGGS | ahh | ||
grondilu | well spotted | ||
awwaiid | Is there a way to do ruby-style "DSL" blocks called like "myfun $p1, $p2 { ... }" (with no comma between the params and the block). Doing it with the comma is easy with just a last &thing param for myfun. Just wondering. | 12:16 | |
FROGGS | m: say nqp::istrue_s('0') | ||
camelia | rakudo-moar 82a181: OUTPUT«===SORRY!===No registered operation handler for 'istrue_s'» | ||
FROGGS | hmmm, that's a MAST::Op | ||
psch | awwaiid: i think that's slang or macro territory | 12:17 | |
awwaiid | I can do a nested sub and then call it as myfun($p1, $p2){ ... } . The lack of space between the ")" and the "{" seems really important | ||
FROGGS | MVM_string_get_grapheme_at_nocheck(tc, str, 0) == 48) | ||
m: say '0'.ord | |||
camelia | rakudo-moar 82a181: OUTPUT«48» | ||
psch | j: my $i; while '0'.Bool && $i++ < 10 { }; say $i | ||
camelia | rakudo-jvm 82a181: OUTPUT«cannot connect to eval server: Connection refused» | ||
psch | grml | ||
awwaiid | I mean, the lack of space is important to p6, and makes me unhappy :) | 12:18 | |
psch .oO( nobody wants the unspace ) | |||
awwaiid | ah, ok :) | ||
12:19
fhelmberger joined
|
|||
awwaiid | alright well I should go to $work anyway :) | 12:19 | |
12:20
rurban_ left
|
|||
psch | anyway, nqp-j also special cases "0" in istrue_s and isfalse_s | 12:20 | |
masak | awwaiid: didn't quite get your nested sub syntax point above. | ||
awwaiid: `myfun($p1, $p2){ ... }` means "call the sub myfun with those two arguments, then hash-index the result with the expression ..." | 12:21 | ||
awwaiid: and yes, in that case, the lack of whitespace is significant. | |||
moritz | masak: but why are we even trying to parse a generic expression in a declaration? | 12:22 | |
masak | moritz: awwaiid said "and then call it" | ||
moritz | masak: oh | 12:23 | |
masak | moritz: so I got the impression that he was talking about a callsite, not a declaration. | ||
moritz | m: sub f(){ say 42 } | ||
camelia | ( no output ) | ||
moritz | right | ||
12:23
zakharyas left
|
|||
moritz | not an error in the declaration | 12:23 | |
moritz should go to bed right now | |||
masak hugs moritz :) | |||
moritz hugs back | 12:24 | ||
masak wishes he had an image readily available from the Scandinavia and the World webcomic, of Sweden and Norway hugging :) | 12:25 | ||
FROGGS | labster: are you going to smoke the '0'.Bool change? if not, I'll do it | 12:28 | |
labster: because of the nqp::p6bool glitch we found just now | |||
I already have a patch, but still need to spectest and ecosystemtest it... | 12:29 | ||
[Coke] wonders why it's VAR(d) and not d.VAR | 12:31 | ||
masak | [Coke]: isn't it both? | ||
FROGGS | [Coke]: where? | ||
I've only seen d.VAR so far fwiw | |||
12:32
zakharyas joined
12:38
Sqirrel left
12:41
chenryn left
12:42
chenryn joined
12:43
Sqirrel joined
|
|||
[Coke] | TT was using VAR() in backscroll | 12:43 | |
VAR(d).WHAT looked weird to me. :) | 12:44 | ||
moritz | VAT | ||
12:44
koo5 left
12:45
chenryn left
|
|||
[Coke] | ugh, I work in tax, that's a dirty word. :P | 12:46 | |
timotimo is AFK until the evening | 12:50 | ||
12:51
lizmat left
12:55
diana_olhovik_ joined,
koo5 joined
12:58
noganex joined
|
|||
dalek | ecs/newio: 0cd0cde | (Carl Masak)++ | S16-io.pod: rephrase slightly for clarity |
12:59 | |
masak | - eof file pointer reached end of file | 13:01 | |
+ eof file pointer reached end of information | |||
13:01
lizmat joined,
lizmat left
|
|||
masak | "end of information" is not a concept I'm familiar with. | 13:01 | |
13:01
noganex_ left
|
|||
masak | the change also breaks the nice implicit expansion/explanation of the acronym "eof" | 13:01 | |
yes, I know that not all of the things we reach the end of are files | 13:02 | ||
but for better or for worse, "eof" means "end of file" even when it's not a file | |||
moritz | also, not all data carries information | 13:03 | |
masak | it's like with `get`, we still say `get next line`. even though the record separator might have been altered to something other than "\n" and it's not actually a line. | ||
13:04
n0vacane left
|
|||
FROGGS | well, if it still states "file pointer" we can also say "end of file", no? | 13:04 | |
masak | the total sum of all the possibilities is just too general to sensibly talk about. | ||
all these notions, "file", "line", "end of file" end up being metasyntactic variables standing in for their general equivalents. | |||
FROGGS | aye | 13:05 | |
masak | but we use the simple terms with a shared understanding with the reader that it's more general than that. | ||
I'd much prefer if S16 did the same, perhaps with an early note that such is the case. | |||
moritz | .oO( let's call it .eos, which means "end of stream", and when that's not general enough, it could mean "end of something" ) |
13:06 | |
masak | :P | ||
- opened is the file open? | |||
+ opened is it not closed? | |||
here, too, I see that the intent was a good one. but the result (IMO) is worse. | |||
moritz | masak: I think I agree | 13:07 | |
masak | we go from clarifying a concept that's fairly clear already, to defining it in terms of its opposite, without clearly defining the opposite. | ||
FROGGS | yeah, add a disclaimer and then we stick to file/line | 13:08 | |
masak | also, I'm reading this as "hasn't it been closed yet?" -- and I'm not 100% sure that's all it takes for something to be opened. | ||
for example, if I just do "foo".IO, what I have is not something opened. | 13:09 | ||
(I think) | |||
so besides being less clear, the new explanation is actually wrong. | |||
13:12
Ven left
13:14
nbdsp joined
|
|||
masak | (by the way, I know writing these one-line blurbs about methods is quite hard. and easy to critique afterwards. I'll see if I can improve some of them myself.) | 13:14 | |
13:15
koo5 left,
Ven joined
|
|||
nbdsp | Greetings! Could someone advise please the proper way to declare multiline strings with interpolation? Here-docs AFAIK don't interpolate? | 13:16 | |
13:16
n0vacane joined
|
|||
psch | nbdsp: heredocs can interpolate | 13:16 | |
nbdsp: if you start them with an interpolating quote construct | |||
e.g. qq:to/END/ instead of q:to/END/ | |||
nbdsp | ohh - qq! thanks! | 13:17 | |
masak | nbdsp: also, ordinary strings can be multiline (but it might not look so nice) | ||
13:18
lizmat joined
|
|||
nbdsp | masak: Should ordinary strings be ended with quote on each line, or backslash should be used? | 13:19 | |
masak | m: say "foo bar" | ||
camelia | rakudo-moar 5a38b2: OUTPUT«foo bar» | ||
masak | m: say "foobar" | ||
camelia | rakudo-moar 5a38b2: OUTPUT«foobar» | ||
masak | nbdsp: just newlines works fine. | ||
nbdsp | masak: thanks! | 13:20 | |
masak | nbdsp: but (as opposed to heredocs), you don't get any indentation benefits. | ||
13:20
vytas joined
|
|||
FROGGS | nbdsp: as masak said you can indent heredocs, and the common indentation level will be removed from the string, so to say | 13:23 | |
which makes the actually nice :o) | |||
masak | heredocs are awesome | ||
arnsholt | Indeed. I've used them for SQL code (in Perl 5, admittedly) recently | 13:24 | |
Very nice way to separate code and (verbose) data | |||
PerlJam | good morning #perl6! | ||
FROGGS | ours are more awesome then P5's though :o) | ||
hi PerlJam | |||
arnsholt | Yes, they are =) | ||
masak | FROGGS: I used to think that Perl 6's improvements were just bloat/bells and whistles. but I'm completely on-board with them now, after having used heredocs for a while. | 13:25 | |
PerlJam | The heredoc discussion makes me wonder if heredocs have supplanted formats for most of the simpler uses of formats. | ||
arnsholt | But writing my webapp in Perl 6 was a bit more of an adventure than I felt comfortable with ATM | ||
FROGGS | masak: yeah... it is very nice to see here that we taken given things, and put that one little extra on top that is for one very sane make makes the thing twice as powerful | 13:26 | |
like I love P6's enums | |||
masak | Perl 6 enums turned out really nice too. | ||
it took ~3 tries, but we finally did it. | 13:27 | ||
well, TimToady++ did it, mostly. | |||
13:27
abraxxa left
|
|||
masak | - unlink remove as file | 13:27 | |
+ unlink remove as local entity | |||
PerlJam | masak: Energy and persistence conquer all things. --Ben Franklin | ||
masak | what non-file case are we considering here that merits this change? | ||
Ven | masak: what were the 2 previous ones? | 13:28 | |
masak | Ven: just iterations towards what we have now. they were decidedly less good. | ||
moritz | I don't remember much about them, but I do remember being frustrated by them | 13:29 | |
masak | Ven: I remember at one point throwing a bunch of use cases towards TimToady, which (I think) made him go off and ponder, and come back with a new better model for enums. | ||
Ven: it's all there in the spec commit log if you're really curious. | |||
moritz | however, I'm also frustrated when I try to hack at the current enum implementation, because I simply can't figure out how it all fits together | ||
masak | moritz: anything in particular? | ||
13:29
Rounin left
|
|||
moritz | m: enum A <b c>; say A ~~ Enumeration | 13:30 | |
camelia | rakudo-moar 5a38b2: OUTPUT«False» | ||
moritz | m: enum A <b c>; say b ~~ Enumeration | ||
camelia | rakudo-moar 5a38b2: OUTPUT«False» | ||
moritz | masak: what's that role for? | ||
masak | individual key/value pairs, it seems. | 13:31 | |
13:31
rmgk_ joined,
rmgk_ is now known as rmgk
|
|||
moritz | so it's an EnumItem or so | 13:32 | |
13:32
Ven_ joined
|
|||
masak | right. | 13:32 | |
moritz | but, isn't b in the example that? | ||
PerlJam | moritz: I'd go with "nothing" right now. It's not used anywhere that I can see | ||
moritz | or if not, how do I get one? | ||
masak | moritz: no, b is just one of the halves. the value, I'd say. | ||
13:32
fhelmberger left
|
|||
masak | m: enum A <b c>; say A.enums | 13:32 | |
camelia | rakudo-moar 5a38b2: OUTPUT«b => 0, c => 1» | ||
masak | m: enum A <b c>; say A.enums.WHAT | ||
moritz | m: enum A <b c>; say b.name | ||
camelia | rakudo-moar 5a38b2: OUTPUT«(Hash)» | ||
rakudo-moar 5a38b2: OUTPUT«No such method 'name' for invocant of type 'A' in block <unit> at /tmp/s13kdhDz0U:1» | |||
masak | m: enum A <b c>; say A.enums.list[0].WHAT | 13:33 | |
camelia | rakudo-moar 5a38b2: OUTPUT«(Pair)» | ||
masak | hm. | ||
13:33
nbdsp left
|
|||
masak | I see that Actions.nqp goes about creating Enumeration objects and (I think) stuffing them into the enum thing it's creating. | 13:33 | |
but that doesn't tell us how to get them out. | 13:34 | ||
13:34
Ven left
|
|||
moritz | m: enum A <b c>; A ~~ Enum | 13:34 | |
camelia | ( no output ) | ||
moritz | m: enum A <b c>; say A ~~ Enum | ||
camelia | rakudo-moar 5a38b2: OUTPUT«False» | ||
moritz | masak: second mystery: what's Enum? | 13:35 | |
masak | hehe | ||
moritz | cause class Enum { has $.key; has $.value } | ||
masak | waitaminute | ||
moritz | that *also* looks like an EnumItem to me | ||
masak | it does | ||
something is rotten in the state of enums | 13:36 | ||
PerlJam | moritz++ maybe enums aren't quite as nice as masak thinks ;) | ||
masak | to be fair, none of the above has hindered me in *using* enums in nice ways ;) | ||
but it's still an indication that something is... off | |||
PerlJam | yeah, same here | ||
masak | in the implementation | ||
moritz | so, we have two types that I can't figure out, but seem to represent a single enum item (k/v pair) | ||
13:36
Perl6_newbee joined
|
|||
moritz | oh | 13:36 | |
m: say Pair.^mro | |||
camelia | rakudo-moar 5a38b2: OUTPUT«(Pair) (Enum) (Any) (Mu)» | ||
moritz | right, Enum is simply an immutable Pair | 13:37 | |
the comment about role Enumeration says: # Method that we have on enumeration types | |||
and it has methods pick and roll | 13:38 | ||
m: enum A <b c>; say A.^roles | |||
camelia | rakudo-moar 5a38b2: OUTPUT«No such method 'roles' for invocant of type 'Perl6::Metamodel::EnumHOW' in block <unit> at /tmp/4ovsaGqH8a:1» | ||
masak | when I become dictator, the act of using inheritance to create a new mutable type from an immutable one is going to be a punishable crime. | ||
kinslayer | I have a problem figuring out why this code fails lpaste.net/130484 | 13:39 | |
moritz | masak: what's your approach? | ||
kinslayer | it only fails at the last line. | ||
masak | m: role R { method foo { say "OH HAI" } }; enum A does R <b c>; b.foo | ||
camelia | rakudo-moar 5a38b2: OUTPUT«OH HAI» | ||
masak | moritz: at the very least, wrap and delegate. | 13:40 | |
moritz: that way, the new class is a "mutable wrapper" for the old one. | |||
moritz | kinslayer: what do you mean by "fail"? | ||
m: role R { method foo { say "OH HAI" } }; enum A does R <b c>; say A ~~ R | |||
camelia | rakudo-moar 5a38b2: OUTPUT«False» | ||
moritz | oh | ||
maybe it's just type-checking enums against roles that's broken | 13:41 | ||
kinslayer | moritz: that it does do what I want that is giving me a hash I can do stuff with. | ||
masak | moritz: without fail, immutability will have been part of the contract/invariants of the old class. inheriting and adding mutability means breaking Liskov. | ||
moritz | masak: yes, I know | ||
kinslayer | It just says that postcircumfix {} not defined for array | ||
masak | m: role R { method foo { say "OH HAI" } }; enum A does R <b c>; A.foo | ||
camelia | rakudo-moar 5a38b2: OUTPUT«OH HAI» | ||
moritz | kinslayer: no line number? | 13:42 | |
masak | yeah, something is off there too. | ||
how can A.foo work if A ~~ R is false? | |||
kinslayer | moritz 15 31 | ||
13:42
kaare_ left
|
|||
moritz | lpaste.net/130484#line11 seems to be the problem | 13:43 | |
no dereferencing going on | |||
either my @rooms := $json<rooms> or my @rooms = @( $json<rooms> ) | |||
kinslayer: also, %room-graph<"$i.north"> probably wants to be %room-graph{"$i.north"} | 13:44 | ||
kinslayer | yeah the last one I would fix by myself, just found the other syntax but the other things seems more natural | 13:45 | |
PerlJam | kinslayer: you could also have used $rooms rather than @rooms | 13:46 | |
moritz | PerlJam: @rooms is more idiomatic | ||
kinslayer | moritz so what does := do spefically just so I can remember. | ||
moritz | and the iterate with for @rooms.kv -> $idx, $oom { ... } | 13:47 | |
kinslayer: binding | |||
doc.perl6.org/language/containers | |||
kinslayer | okay I might remember now that I now. :D | ||
13:47
rurban_ joined
|
|||
kinslayer | now to test whether this works. | 13:47 | |
PerlJam | I dunno. Part of the benefit of Perl6 was supposed to be that you didn't have to be concerned about arrays versus array references; either would Just Work. | ||
kinslayer | now to test whether this works. | 13:49 | |
sorry wrong window. | |||
so now it works at least on a small scale. | 13:51 | ||
13:55
yvan1 left
13:59
aborazmeh joined,
aborazmeh left,
aborazmeh joined
14:00
lucasb joined
14:03
lizmat left,
tinyblak left
14:04
lizmat joined
14:06
koo5 joined
14:09
chenryn joined,
rurban_ left
14:10
brrt left,
diana_olhovik_ left
14:12
aborazmeh left
14:15
diana_olhovik_ joined,
brrt joined
|
|||
lucasb | While reading the source, I thought about decreasing the indentation level of reify methods in GatherIter, HashIter, ListIter, MapIter and native_array. Unfortunately, the whitespace changes are messing with the diff output. :( | 14:15 | |
Maybe it is not worth it, but if you want to take a look, it is here: | |||
gist.github.com/lucasbuchala/28795...ed951663fa | |||
14:17
inokenty joined
14:18
brrt left
|
|||
moritz | lucasb: those methods are *carefully* optimized, and explicit returns are kinda slow | 14:18 | |
(because return is just a code object to be called) | |||
lucasb: so don't change anything unless you have also carefully benchmarked them | 14:19 | ||
14:19
diana_olhovik__ joined,
diana_olhovik_ left
|
|||
dalek | pan style="color: #395be5">perl6-examples: d326a14 | paultcochrane++ | lib/ (26 files): Purge old library code and tests After discussing this code with mberends++ at NLPW2015 it was decided that it was no longer current and could be removed. |
14:22 | |
pan style="color: #395be5">perl6-examples: 8fe55f9 | paultcochrane++ | t/categories/99-problems.t: [99-problems] Correct test filename after rename |
|||
pan style="color: #395be5">perl6-examples: 5171ca4 | paultcochrane++ | categories/shootout/fasta.p6.pl: Document the FASTA shootout example |
|||
pan style="color: #395be5">perl6-examples: 120c653 | paultcochrane++ | categories/shootout/revcomp.p6-v2.pl: Add author to revcomp-v2 example |
|||
pan style="color: #395be5">perl6-examples: e8dfb31 | paultcochrane++ | categories/shootout/n-body.p6-v2.pl: Add author info for nbody-v2 |
|||
pan style="color: #395be5">perl6-examples: d0ad0ef | paultcochrane++ | categories/shootout/ (14 files): [shootout] simplify shootout example filenames |
|||
pan style="color: #395be5">perl6-examples: aa6eb51 | paultcochrane++ | lib/Pod/Htmlify.pm6: Match .pl/.p6 at the end of the filename |
|||
14:22
_mg_ left
|
|||
lizmat | hmmm... [ptc]++ | 14:22 | |
14:23
diana_olhovik__ left
|
|||
lizmat | hmmm... seems that my spec change of line-input-separator to nl has struck back | 14:23 | |
14:23
diana_olhovik_ joined
|
|||
lizmat | .nl doesn't say whether it is input or output | 14:24 | |
my last patch makes uses it for output | |||
but what if you want different separators for input and output ? | |||
lucasb | I thought that maybe an explicit return could be less costly than having an if block, but I didn't think about optimization really, just code layout. Thanks for the tip, moritz++ | 14:25 | |
[ptc]_ | moritz: I'd like to reserve "examples.perl6.org" if I may (just so you know, you don't have to do anything at this stage) | 14:26 | |
moritz: btw: should I set up the examples.perl6.org site for you? Is there any way I can help reduce the admin load? | |||
moritz | [ptc]_: yes, do it :-) | 14:27 | |
[ptc]_: do you have access to www.p6c.org? | |||
[ptc]_ | no, was just about to ask | 14:28 | |
I'll make the examples.perl6.org user and then set up an rsync in much the same way doc.perl6.org works | |||
only have access to hack | |||
moritz | [ptc]_: +1 | 14:29 | |
lizmat | m: sub a { 42 }; for ^1000000 { a }; say now - INIT now # lucasb | ||
camelia | rakudo-moar 5a38b2: OUTPUT«0.2423389» | ||
lizmat | m: sub a { return 42 }; for ^1000000 { a }; say now - INIT now # lucasb | ||
camelia | rakudo-moar 5a38b2: OUTPUT«1.3662083» | ||
moritz | [ptc]_: and skim github.com/perl6/infrastructure-do...6c.org.pod if you haven't already | ||
(and update it to add yourself to the sudo list) | 14:30 | ||
14:31
lizmat left
14:36
lizmat joined
14:39
RabidGravy joined
|
|||
lucasb | lizmat: Thanks for the return tip. I hope this thing can get optimized in the future. | 14:39 | |
lizmat | it's on the radar, afaik | 14:40 | |
14:47
zakharyas left,
zakharyas joined
14:49
telex left
14:50
telex joined
14:52
davido_ left
|
|||
[ptc]_ | moritz: ok, thanks for the link | 14:52 | |
14:53
molaf_ joined
14:55
davido_ joined
14:56
molaf left
14:58
anaeem___ joined
14:59
anaeem1 left
|
|||
masak | am I missing something, or do the synopses not mention heredoc semantics at all? | 15:01 | |
15:01
lolisa joined
|
|||
masak | (I mean the thing where the string from the heredoc gets de-indented to the level of the terminator) | 15:02 | |
lizmat | S02:4468 | 15:04 | |
masak | thank you. | ||
lizmat | "Leading whitespace equivalent to the indentation of the delimiter will be removed from all preceding lines." | ||
15:05
Perl6_newbee left
|
|||
masak | that's exactly what I was looking for. some very specific type of blindness made me miss it, apparently. | 15:05 | |
lizmat | we've all been there :-) | 15:06 | |
15:07
lolisa left
15:08
chenryn left
|
|||
lizmat | m: say +"" # didn't this used to warn / should it not warn ? | 15:15 | |
camelia | rakudo-moar 5a38b2: OUTPUT«0» | ||
masak | it should most definitely, without any hesitation or doubt, warn. | 15:17 | |
"" is not a number | |||
[Coke] | m: say ?+"0" == ?"0" | ||
camelia | rakudo-moar 5a38b2: OUTPUT«False» | ||
[Coke] | whee. | ||
masak | I'm fine with that one :) | 15:18 | |
[Coke] | m: :m | 15:19 | |
camelia | ( no output ) | ||
[Coke] | m: say.say :m | ||
camelia | rakudo-moar 5a38b2: OUTPUT«5===SORRY!5===Argument to "say" seems to be malformedat /tmp/MzvwgzT6Wi:1------> 3say7⏏5.say :mOther potential difficulties: Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant o…» | ||
15:20
raiph left
15:21
yakudza left
15:25
yvan1 joined,
lizmat left
|
|||
awwaiid | m: sub wrap($p1){ sub with(&f) { say "$p1 wrap"; &f() }}; wrap("hello"){ say "yep" } | 15:29 | |
camelia | rakudo-moar 5a38b2: OUTPUT«yepUnhandled exception: postcircumfix:<{ }> not defined for type Sub at <unknown>:1 (/home/camelia/rakudo-inst-2/share/perl6/runtime/CORE.setting.moarvm:throw:4294967295) from src/gen/m-CORE.setting:15991 (/home/camelia/rakudo-inst-2/share/per…» | ||
15:35
Ven_ left
|
|||
awwaiid | ohhh.... I see. "works" in the REPL but not in -e. Interesting. | 15:35 | |
15:36
synopsebot joined
15:37
synopsebot left
15:39
[ptc]_ left
|
|||
masak | psch: even with the current '*' continuation on the REPL, heredocs still don't work :( | 15:41 | |
which means it's annoying *and* not useful enough | |||
15:41
yvan1 left
|
|||
masak | (I'm not saying I think heredocs should work on the REPL. but with the '*' continuation in place by default, I kind of expected them to) | 15:42 | |
15:44
gfldex joined
15:48
Ven joined
|
|||
raydiak | morning o/ | 15:48 | |
n0vacane | good morning sir and/or madam | 15:51 | |
masak | good morning radiant raydiak | ||
may your bright light shine on the antipode | 15:52 | ||
raydiak | wow thanks masak :) hello n0vacane | ||
masak: a few days ago, I decided to see what interesting thing I could do in the span of time you were asleep...a lot of mental circles and 80 lines later I had the cheesiest cheatingest self-compiling compiler ever, which targets P6 | 16:02 | ||
btyler | raydiak: github link? :D | 16:03 | |
raydiak | btyler: I have a habit of not putting things out there that will embarass me more than I do already :) but gimme a sec I'll gist it | 16:04 | |
16:05
zakharyas left
|
|||
raydiak | gist.github.com/raydiak/b6497a9641a6e53ce831 | 16:08 | |
so many cheatings I can't even tell you...but I just wanted to see what the result would look like and what ideas the exercise gave me | |||
Ven | raydiak: lol. that's pretty amazing | 16:09 | |
raydiak | heh thanks :) it'll be interesting to see how a real version turns out some day | 16:12 | |
16:16
FROGGS left
|
|||
masak | raydiak: wow | 16:16 | |
raydiak | if it had a little more structure and a little less brain-damage, it'd be simple to get it to target numerous languages...of course that's because it doesn't do much of anything else, but still... | 16:17 | |
16:29
cschwenz left,
gcole_ left
16:32
gcole joined
|
|||
raydiak | one of the things I found interesting to think about is the way you have to develop in "generations" once you throw away the bootstrap implementation...e.g. I can add any feature I want just by writing it in itself, but you have to add the feature using existing features, then recompile before you can actually make use of that feature in the *following* iteration | 16:34 | |
which totally makes sense, but nevertheless feels like walking down a hall of mirrors... | 16:35 | ||
16:36
Ven left
|
|||
masak | raydiak: at this point you would do yourself a great favor by googling "reflections on trusting trust ken thompson" | 16:36 | |
it's a not-too-long read, but very effective. | |||
raydiak: also, I guess, "I am a strange loop" by Hofstadter comes warmly recommended :) | 16:37 | ||
raydiak | masak: thanks! reading the first one now...the other one sounds familiar, I think I have it on a list somewhere...maybe even one of the list items I got from you :) | 16:39 | |
16:41
eli-se joined
|
|||
psch | masak: actually, heredoc is to me the strongest argument yet against a multiline REPL in core | 16:41 | |
maybe inline documentation is another | 16:42 | ||
'cause it feels a bit too special-cased to me to react to a q:to with a continuation prompt even if the line ended on ; | 16:43 | ||
16:43
diana_olhovik_ left
16:47
WAA1PER joined
|
|||
ugexe | is precompiling without reinvoking $*EXECUTABLE_NAME --target for each module something that could done? or is there a reason why it should be that way? i'm wondering if its worthwhile to add such functionality to reduce the time required to install a bunch of modules under JVM (which I assume is getting the startup penalty each time .precomp is called) | 16:47 | |
16:51
_mg_ joined
16:53
Sqirrel left
16:54
aborazmeh joined,
aborazmeh left,
aborazmeh joined
16:57
dakkar left
16:59
Sqirrel joined
17:01
_mg_ left
17:03
mr-foobar joined
17:05
aborazmeh left
17:11
espadrine left
|
|||
masak | psch: note how that problem, too, completely goes away if Enter is restored to meaning "execute" and something like Shift+Enter means "one more line" | 17:25 | |
fewer heuristics, fewer special cases, more predictability. | |||
raydiak: heh, I don't think I've recommended you (or anyone) "trusting trust" before. though it is a classic. | 17:26 | ||
TimToady | timotimo: 'my sub' is redundant, since subs are already 'my' by default | ||
yoleaux | 08:55Z <jnthn> TimToady: Not immediately, no... :( | ||
17:28
robinsmidsrod joined
17:29
_mg_ joined
|
|||
TimToady | oh, jnthn++ pointed it out already | 17:31 | |
17:31
rurban joined
|
|||
psch | masak: «my $s = q:to/END/;» and then enter can never compile succesfully then, and always needs shift+enter | 17:34 | |
which still strikes me as inconsistent | 17:35 | ||
masak | not me. the Enter keystroke under my model signifies "what I have here is a program unto itself" | 17:37 | |
17:37
rurban left
|
|||
psch | ah | 17:37 | |
masak | not including the heredoc terminator will fail under that model, becuase it *should* fail | ||
psch | i had a misconception then, i realize | 17:38 | |
eli-se | I want to make a video game. | ||
masak | again, this is just basically copying Chrome Devtools | ||
TimToady | imo, shift+enter just puts the blame onto the user when things go wrong; a good parser should always know when it has all its ducks in a row | 17:39 | |
and a heredoc is just another duck that can get out of line | 17:40 | ||
masak | I can buy that argument, too. it's consistent. | ||
there's always a well-defined, detectable "end-of-statement" point | |||
but both TimToady's semantics and mine are better than the current semicolon/double-Enter semantics that's currently in place | 17:41 | ||
either one would be an improvement | |||
mine has prior art :) | |||
TimToady | so does mine, if you don't count parser complexity :) | ||
psch | fwiw, i've been trying to improve it during the last week, it's just hard :P | 17:42 | |
i've definitely merged too early, sorry about that | 17:43 | ||
masak | no, it's good | ||
gives us something concrete to discuss | |||
things are allowed to get worse for a bit before they get better | |||
on the Internet, if you want to arrive at the correct answer, you should start by claiming something outrageous and disprovable :) | 17:44 | ||
TimToady would have fun working on that, if he didn't have eⁿ things on his plate already | |||
17:45
rurban_ joined
|
|||
psch | well, the current implementation cheats (and breaks) for <blockoid> | 17:48 | |
the next implementation i could arrive at never meets the closing bracket | |||
which confuses me to no end, and points at some oversight | |||
TimToady | how are you counting "ducks in a row" currently? | 17:49 | |
TimToady would probably try a dynvar first, since those automatically clear at the appropriate moment | |||
psch | TimToady: i wanted to try checking !highexpect next, because i evidently need something to know if the parser can stop | ||
TimToady thinks relying on highexpect would be fraught | 17:50 | ||
psch | TimToady: currently there's a $*MOREINPUT_BLOCK_DEPTH, but that's not granular enough | ||
(i'm not sure granular is the right word there...) | |||
in any case, blocks aren't the only thing left to expect, but many other things seem to work out fine on their own | 17:51 | ||
e.g. «1 +\n1» works with just calling readlineintfh in _ws | |||
(basically) | |||
the different ways to signify end-of-statement aren't quite transparent to me yet either | 17:52 | ||
e.g. the first <?before> in eat_terminator doesn't actually *eat* the terminator | 17:53 | ||
and it can't because the last statement in a block doesn't need a ; | |||
TimToady | well, inside a block you'll never want to eval anyway | 17:54 | |
dalek | osystem: 72f9a4a | tony-o++ | META.list: Extendable JS style 'Events' Can use regex, callable, or whatever to pick up events. Can use supplies or channels out of the box. Neat. |
||
TimToady | the final decision probably needs to be in the reduction of <statement> | 17:55 | |
though I don't know offhand whether that includes the heredoc | 17:56 | ||
ah well, now here I am working on it; told you it'd be fun for me :) | 17:57 | ||
back to backlogging... | |||
raydiak | masak: trusting trust definitely brings up one or two things I hadn't considered...apparently your recommendation rattling around in my memory was "books by Hofstadter" a couple months ago | ||
17:58
mr-foobar left
|
|||
psch is bound to learn loads about CURSOR it seems | 17:59 | ||
dinner & | |||
18:00
FROGGS joined,
baest joined
|
|||
[Coke] | m: 3.123456789 ~~ 3.123456788 | 18:02 | |
camelia | ( no output ) | ||
18:02
cschwenz joined
|
|||
[Coke] | m: say 3.123456789 ~~ 3.123456788 | 18:02 | |
camelia | rakudo-moar 5a38b2: OUTPUT«False» | ||
18:03
_mg_ left
|
|||
masak | raydiak: well, now that you've been delighted by Thompson, maybe Hofstadter is next ;) | 18:04 | |
TimToady | so, is there a backdoor hidden in our bootstrap yet? | ||
masak | ssssssh! | ||
I mean, um, no. of course not. | |||
masak glances around furtively | 18:05 | ||
cschwenz | is there a perl6 equivalent of starman? | 18:06 | |
TimToady | no, we only do et and independenceday | 18:07 | |
cschwenz | :-P | 18:08 | |
18:09
_mg_ joined
|
|||
cschwenz | okay, so what is needed to make something in perl6 approximating the functionality of starman? | 18:09 | |
colomon | “Starman? Why the cute name instead of more descriptive namespace? Are you on drugs?” Ah, CPAN. | 18:10 | |
tadzik | :) | ||
NO FUN ALLOWED | |||
raydiak | masak: sounds like it...though I'd s/delighted/more appropriately terrified and interested/ :) | ||
colomon hopes tadzik can answer cschwenz’s question | |||
TimToady | the first N pages of Google have nothing about a starman | 18:11 | |
except mostly the movie | |||
18:11
oyse joined
|
|||
cschwenz | metacpan.org/pod/Starman | 18:11 | |
raydiak | it's a psgi thing iirc | ||
TimToady | ah | ||
colomon | TimToady: I got search.cpan.org/~miyagawa/Starman-0...Starman.pm on the first page of my Google search | ||
TimToady | hmm, personalization strikes again... | 18:12 | |
colomon | Very last thing on the first page. | ||
cschwenz | or, first, is there a perl6 webserver? | ||
colomon | TimToady: you must really love the movie, eh? ;) | ||
TimToady | ah, there it is, I just dintseeyit | ||
18:13
zakharyas joined
|
|||
TimToady | I thought someone did something P6ish with PSGI... | 18:13 | |
or PSGIish with P6... | |||
tony-o | timotimo: that IO::Socket::INET gist i posted seems to work now, do you know of any changes | 18:14 | |
18:14
beastd joined
|
|||
TimToady | modules.perl6.org lists 3 modules that mention PSGI | 18:14 | |
cschwenz | Hmm, okay. I'll have a look there. :-) | 18:15 | |
Is modules.perl6.org the extent of CPAN for Perl6? | 18:16 | ||
raydiak | yep there are some http servers and psgi things listed there, though no idea what the state of any of them is precisely atm | ||
yes | 18:17 | ||
cschwenz | okay thanks! :-) | ||
raydiak | holy ssh lag batman | ||
you're welcome :) | |||
TimToady blames the microwave oven | |||
our new one is very leaky at 2.4Ghz | 18:18 | ||
maybe we should wrap it with tin foil... | |||
raydiak | well it does sit about 5 feet away, but that's how I know it's not running | ||
TimToady | neighbors? | ||
oyse | I have a problem building Rakudo for the JVM. I get jvm::runtime.jars value not available from <my path here>/rakudo/install/bin/nqp-j --show-config when doing perl Configure.pl --gen-nqp --backends=jvm | 18:19 | |
raydiak | roommates more likely...every time they walk around in the wrong places or play their MMOs it gets sluggish :) | ||
oyse | Is this a know problem? | ||
TimToady | where we live, sometimes it's the president flying into moffat jamming everything, and sometimes its someone arc-welding in their garage... | ||
oyse | I am on Ubuntu 14.04 with openjdk-7 and gcc installed | 18:20 | |
raydiak imagines his stimulant-addictied neighboars playing with arc welders | |||
18:20
lucasb left
|
|||
timotimo is back on-line | 18:21 | ||
tony-o: i don't know of any changes :( | |||
raydiak | wb timo o/ | 18:22 | |
timotimo | o/ | ||
tony-o | timotimo: really strange, i can curl from that HTTP::Server::Threaded without any issues now | ||
TimToady | oyse: on Ubuntu I succeed in building both backends with: /usr/bin/perl Configure.pl --backends=ALL --gen-nqp --gen-moar | ||
timotimo | super weird. | ||
tony-o | timotimo: nevermind, i'm silly | ||
timotimo | so it's still b0rken? :( | 18:23 | |
tony-o | yea | ||
TimToady | oyse: are you using the latest git version? | ||
that came out wrong | |||
are you cloning the nom branch, or using some brewer? | |||
tadzik | cschwenz, colomon we don't have any good webservers afaik :( | 18:24 | |
tony-o | cschwenz: i'm working on a couple but have some bugs | ||
oyse | timtoady: I just started with the instructions from INSTALL.txt on Github: github.com/rakudo/rakudo/blob/nom/INSTALL.txt | 18:25 | |
timtoady: I am trying the command you suggested now | |||
FROGGS | oyse: what's your exact javac version? | 18:26 | |
--> javac -version | |||
oyse | FROGGS: javac 1.7.0_75 | ||
FROGGS | that's new enough | ||
18:27
kaare_ joined
|
|||
oyse | timtoady: The --backends=ALL when worse than the other command: Perl API version v5.14.0 of Encode does not match v5.18.0 at /usr/share/perl/5.18/XSLoader.pm line 92. | 18:27 | |
TimToady | I'm using that one, as well as javac 1.7.0_51 | ||
ugexe | modules are failing to install due to 'No such method print-nl' on a fresh build | ||
FROGGS | oyse: what rakudo version do you try to build? | 18:28 | |
oyse: because just recently I applied a build fix for jvm... | |||
TimToady | that sounds like perl5 versions fighting each other | ||
oyse | FROGGS: I just started with a git clone git://github.com/rakudo/rakudo.git | ||
TimToady | try just perl instead of /usr/bin/perl | 18:29 | |
oyse | git branch says I am on nom | ||
FROGGS | oyse: hmmm, that really should do... my patch is six days old | ||
TimToady | you probably have a newer perl than the system perl in your path | ||
dalek | rl6-roast-data: 25845ff | coke++ | / (9 files): today (automated commit) |
||
FROGGS | oyse: that's the patch btw: github.com/perl6/nqp/commit/52b834...7f73210fc3 | 18:30 | |
oyse: it touches the jar's you've got problems with | |||
[Coke] | raydiak - are you killing hack? | ||
raydiak | [Coke]: running a rakudobrew build | 18:31 | |
oyse | TimToady: quite possible I have installed something a while back. I will check | ||
masak | lol, I blogged! strangelyconsistent.org/blog/here-be-heredocs | ||
raydiak | [Coke]: nothing important, can kill it if you need the resources for something meaningful :) | ||
[Coke] | running an awful lot of java processes. | 18:32 | |
raydiak | just a single rakudobrew build | ||
just finisheds | |||
s/s$// | |||
18:33
krunen left
|
|||
FROGGS | oyse: if nothing helps, please nopaste your entire build output | 18:34 | |
18:35
yvan1 joined
|
|||
raydiak | [Coke]: if you're still seeing sluggishness, I see a stuck module build maxing out a core and taking 8 gigs+ of ram with over 4 cpu hours under its belt so far :) | 18:37 | |
dalek | c: a2b0e77 | moritz++ | lib/Type/Str.pod: Str.starts-with |
18:40 | |
ugexe | m: class IO::Capture::Simple { sub capture_stderr(Callable $code) is export { my $result; my $*ERR = class { method print(*@args) { $result ~= @args.join; }; }; $code.(); $result; }; }; import IO::Capture::Simple; capture_stderr { note "blah" } | 18:41 | |
camelia | rakudo-moar 5a38b2: OUTPUT«No such method 'print-nl' for invocant of type '<anon>' in sub note at src/gen/m-CORE.setting:18840 in block <unit> at /tmp/guUOFRYET7:1» | ||
18:44
rurban_ left
18:45
synbot6 joined
|
|||
oyse | timtoady: --backends=ALL worked better after I had delete some old stuff in the perl path. At least I could start make now :) | 18:45 | |
raydiak | m: class IO::Capture::Simple { sub capture_stderr(Callable $code) is export { my $result; my $*ERR = class { method print(*@args) { $result ~= @args.join; }; method print-nl(*@args) { $result ~= @args.join ~ "\n" }; }; $code.(); $result; }; }; import IO::Capture::Simple; capture_stderr { note "blah" } # ugexe | 18:46 | |
camelia | ( no output ) | ||
raydiak | m: class IO::Capture::Simple { sub capture_stderr(Callable $code) is export { my $result; my $*ERR = class { method print(*@args) { $result ~= @args.join; }; method print-nl(*@args) { $result ~= @args.join ~ "\n" }; }; $code.(); $result; }; }; import IO::Capture::Simple; say capture_stderr { note "blah" } | 18:47 | |
camelia | rakudo-moar 5a38b2: OUTPUT«blah» | ||
18:47
rindolf left
|
|||
PerlJam | S99:WIP | 18:48 | |
synbot6 | Link: design.perl6.org/S99.html#WIP | ||
PerlJam | S99:Weekly_Changes | 18:49 | |
synbot6 | Link: design.perl6.org/S99.html#Weekly_Changes | ||
PerlJam | S02:2345 | ||
synbot6 | Link: design.perl6.org/S02.html#line_2345 | ||
ugexe | raydiak: is that because STDOUT/ERR/etc use print-nl now? | 18:50 | |
raydiak | ugexe: yeah looking at it now, it changed just hours ago...and that isn't what print-nl should do (my example is wrong I mean) | 18:51 | |
ugexe: github.com/rakudo/rakudo/commit/5a...65c12dc6c1 | |||
oyse | FROGGS: seems like the JVM build worked with --backends=ALL. At least I have a perl6-j now. I assume that is the jvm version | ||
FROGGS | oyse: aye | 18:52 | |
oyse: also check if you got a perl6-m | |||
that's the MoarVM version which starts up way faster | 18:53 | ||
oyse | FROGGS: it is there | ||
yes, it seems more responsive | |||
In the JVM version is there an API into the VM for doing introspection from Java? Could I for instance ask for all class, their methods etc? | |||
FROGGS | you'd have to ask psch++ for JVM interop | 18:54 | |
but in Perl 6 land it would be: | |||
m: say Int.^methods | 18:55 | ||
camelia | rakudo-moar 5a38b2: OUTPUT«Int Num Rat FatRat abs Bridge chr sqrt base polymod expmod is-prime floor ceiling round lsb msb narrow Range sign conj rand sin asin cos acos tan atan atan2 sec asec cosec acosec cotan acotan sinh asinh cosh acosh tanh atanh sech asech cosech acosech cotan…» | ||
FROGGS | or: | ||
m: say Int.HOW.methods(Int) | |||
camelia | rakudo-moar 5a38b2: OUTPUT«Int Num Rat FatRat abs Bridge chr sqrt base polymod expmod is-prime floor ceiling round lsb msb narrow Range sign conj rand sin asin cos acos tan atan atan2 sec asec cosec acosec cotan acotan sinh asinh cosh acosh tanh atanh sech asech cosech acosech cotan…» | ||
ugexe | raydiak: i see. yeah s/print/print-nl/ in the actual IO::Capture::Simple module then complains about method print | ||
FROGGS | oyse: perhaps you can call the latter from Java somehow | ||
raydiak | ugexe: yeah looks like print-nl is supposed to literally just print a newline | 18:56 | |
oyse | FROGGS: that seems like a good starting point at least. I have to poke around I bit I guess. | 18:57 | |
When are the Java people usually here? | |||
psch | oyse: check src/vm/jvm/runtime/org/perl6/rakudo/RakudoEvalServer.java | ||
oyse: and ./perl6-eval-server | |||
both of those relative to the git root | 18:58 | ||
FROGGS | oyse: here is the opposite way as an example: github.com/rakudo/rakudo/blob/nom/...-interop.t | ||
cdc | Hello #perl6 | 18:59 | |
raydiak | m: class IO::Capture::Simple { sub capture_stderr(Callable $code) is export { my $result; temp $*ERR = $*ERR but role { method print(*@args) { $result ~= @args.join; }; }; $code.(); $result; }; }; import IO::Capture::Simple; say capture_stderr { note "blah" } # ugexe you could do something like this too if you wanted | ||
camelia | rakudo-moar 5a38b2: OUTPUT«blah» | ||
psch | o/ cdc | ||
cdc | psch: \o | ||
18:59
_mg_ left
|
|||
raydiak | hello cdc | 18:59 | |
psch | cdc: did you get somewhere with that typed exception of your? i have to admit i forgot what exactly it was about... | ||
*yours | |||
TimToady | ⌽ <-- samurai about to attack | 19:00 | |
tony-o | looks like the info symbol to me | ||
i with a circle | |||
TimToady | fontfeyl | 19:01 | |
.u ⌽ | |||
yoleaux | U+233D APL FUNCTIONAL SYMBOL CIRCLE STILE [So] (⌽) | ||
cdc | psch: No, I failed to get a correct patch. That was about getting typed execeptions for yada operators, like X::CodeStub::Executed | ||
masak | looks like "this is as high as the waterline gets" on a ship that's been tilted 90 degrees | ||
raydiak | looks like phi to me but I suggest dodging instead of examining when a samurai is about to attack :) | ||
labster | FROGGS: go ahead, I was very asleep when you asked about smoketesting (and still backlogging) | 19:02 | |
TimToady | but the "don't be there" defense only works after he's committed to where "there" is | 19:03 | |
FROGGS | labster: k | ||
oyse | psch, FROGGS: thanks! | ||
ugexe | raydiak: i went with method print-nl { nextsame }; | ||
TimToady | or she, if we're in the universe that admits female samurai... | ||
cdc | FROGGS (or anyone having commit bit on panda), please could you take a look at this patch (I need it to get Panda working @work): github.com/tadzik/panda/pull/147 | 19:05 | |
FROGGS | cdc: you do we get our hands at MIME::Base64 there? | 19:07 | |
psch | cdc: do you want guidance wrt X::CodeStub::Executed? (although i'd prefer a shorter name) | ||
raydiak | ugexe: nice | 19:09 | |
FROGGS | cdc: beside the problem with MIME::Base64 I like it | ||
cdc | FROGGS: sorry I don't understand. What's the problem with MIME::Base64? | 19:11 | |
ugexe | how do you install it before panda | 19:12 | |
and, at that point, you may as well pull in http::useragent and/or uri | |||
19:12
cschwenz left
|
|||
raydiak | TimToady: can I hold my action for a dodge until after he's committed, then? or maybe just dodge with every action until another party member handles him/her? :) | 19:13 | |
19:14
robinsmidsrod left,
cschwenz joined
|
|||
raydiak usually ends up laying in a pool of his own hit points (all three of them) | 19:14 | ||
cdc | ugexe: right, I installed it with a previous version of panda + a trick to bypass proxy authentication. Do I have to borrow code from the module/rosettacode instead? | 19:15 | |
19:15
robinsmidsrod joined
|
|||
TimToady | raydiak: that depends totally on whether the sword is an it, or a him/her... | 19:15 | |
cdc | psch: with pleasure! Maybe next week? | 19:16 | |
psch: OK for a shorter name. | 19:17 | ||
psch | cdc: sure, i'll be around at times like now during the next week | ||
cdc: ISTR the first name idea was "X::Stub", but i might be making that up | 19:18 | ||
cdc | FROGGS, ugexe: is it possible to use the bootstrap mechanism to get MIME::Base64? | 19:20 | |
FROGGS | cdc: we'd have to put it in panda/ext | ||
ugexe | and you'd probably want to make it optional | ||
FROGGS | hmmm, I guess it is fine to put it in there | 19:21 | |
I'd like to know what tadzik thinks about that though | |||
cdc | no problem | 19:25 | |
FROGGS | hmmm, the p6bool change breaks the rakudo build :o( | ||
TimToady | we have a file named 0?!? | ||
masak | who's "we"? the rakudo repo? no. | 19:27 | |
19:27
virtualsue joined
|
|||
ugexe | wouldnt the first module that gets built be installed to site as 0? | 19:27 | |
FROGGS | TimToady: we have, but that's not my current problem... | 19:28 | |
ahh, I can just dump a backtrace when p6bool gets a "0" | 19:30 | ||
19:42
_mg_ joined
|
|||
tadzik | cdc: looking | 19:48 | |
oh, hmm | |||
we seem to desperately need HTTP::Tiny of sorts | 19:50 | ||
everyone is reimplementing this | |||
FROGGS | I'd prefer HTTP::UserAgent though | 19:51 | |
tadzik | we have one | ||
it's very dependency-heavy tohugh | |||
which is the reason why I didn't pull it into panda | |||
19:51
_mg_ left
|
|||
FROGGS | ohh yeah :/ | 19:51 | |
tadzik | anyway, if it helps you cdc I'm all for it :) | ||
RabidGravy | only URI and Mime::Base64 | 19:52 | |
TimToady | r: gather loop { take my $foo; last; } | ||
camelia | ( no output ) | ||
..rakudo-jvm 5a38b2: OUTPUT«cannot connect to eval server: Connection refused» | |||
FROGGS | let's just pull in MIME::Base64 for now | ||
RabidGravy | isn't it? | ||
FROGGS | and yeah, perhaps URI | ||
though, that will kill the jvm, right? | |||
ahh no, I fixed it :o) | 19:53 | ||
TimToady | masak: ^^^ there's a minimal test case to blow up perl6-j | ||
tadzik | cdc: your patch seems to use MIME::Base64 but it's not 'use'-ing it | ||
oh, it is | |||
but it is now a dependency of panda, can you make it 'require' so it's optional? | |||
FROGGS | try require* | 19:54 | |
TimToady | masak: (that produces the error at gist.github.com/anonymous/9dc73118674e46248155) | ||
FROGGS | and then check for ::('MIME::Base64') being true or so | ||
masak submits rakudobug | 19:55 | ||
FROGGS | masak: hold on | ||
might be the same as rt.perl.org/Ticket/Display.html?id=122134 | |||
TimToady | it might at that | 19:56 | |
otoh, if I remove the gather, it passes | |||
so maybe not | 19:57 | ||
19:57
oyse left
19:58
virtualsue left,
davido_ left
|
|||
masak | TimToady: re "why do people keep thinkingI'm not in favor of this change" -- I like how many people are surprised that Perl 6 still keeps the hash key auto-quoting syntax. it's almost as if they'd expect the higher standard set by Perl 6 to somehow exclude the sinning committed by using "barewords" in hash key position. | 19:58 | |
not sure why one sin reminded me of the other. anyway, I'm glad you're on board with the rest of the community on ?"0" ;) | 19:59 | ||
TimToady | say wot? we don't privilege hash keys anymore...pair keys maybe... | 20:00 | |
masak | meant pair keys. | ||
I just keep thinking of them as hash keys. | |||
right, foo => 42, not .{foo} | |||
ooh, maybe it's because one has to do .<foo> nowadays that people are surprised foo => 42 still works | 20:01 | ||
maybe they connect one with the other, subconsciously | |||
20:01
davido_ joined
|
|||
TimToady | .oO( <foo=> 42 ) |
20:01 | |
masak | aughr | ||
TimToady | :D | ||
masak | -me .oO( this is the guy we put in charge!? ) :P | 20:02 | |
masak .oO( this is the guy we put in charge!? ) :P | |||
20:02
Maddingue left
|
|||
masak | /msg fail | 20:02 | |
er, /me fail | 20:03 | ||
TimToady | .oO( the light brigade is in charge ) |
20:04 | |
masak | TimToady: #124279 | ||
synbot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124279 | ||
TimToady | excellent! | 20:05 | |
gah, got so interested in minimizing that test case that I minimized my lunch as well... | |||
masak | that happens to me more often than it should | 20:06 | |
dalek | p: 4409a04 | FROGGS++ | src/HLL/sprintf.nqp: check string explicitly for not containing zero ...since "0" if now true. |
||
p: d7b8b06 | FROGGS++ | src/how/NQPClassHOW.nqp: pass integer 0 instead of string "0" along to mean falseness |
|||
masak | wow, so there's nqp fallout for making "0" true? FROGGS++ for fixing it! | 20:07 | |
masak reviews those places | |||
FROGGS | module Digest suffers from "0" change | ||
masak: aye | |||
and about 15 spectests... | 20:08 | ||
TimToady | I suppose many of the failures are inadvertent Str/Int confusion | ||
masak | ok, first one. I don't have much sympathy for a variable $int that contains a string :) | ||
second one looks like it wanted to be (0) all along | 20:09 | ||
FROGGS | TimToady: aye | ||
masak | ok, good. | ||
20:09
lichtkind left
|
|||
masak | in other words, we didn't ruin someone's day. we just taught them to be a bit more careful with types. | 20:09 | |
I think that's a win both short-term and long-term | |||
20:10
virtualsue joined
|
|||
dalek | kudo/nom: 0b20921 | FROGGS++ | src/Perl6/Grammar.nqp: check for "1" to mean truth in method can_meta |
20:10 | |
TimToady | we'll make a pythonista of you yet | ||
20:11
darutoko left
|
|||
masak | Perl is about stealing the best from other languages. some of those good things just happen to have been in Python first :) | 20:11 | |
we're not above stealing them anyway | 20:14 | ||
eli-se | can we make an exception for Ruby? | 20:17 | |
PerlJam | what sort of exception? | ||
masak | I'm not sure Ruby is distinct enough from Perl to be worth stealing from ;) | 20:18 | |
PerlJam | we already stole monkey patching from ruby ;) | 20:19 | |
TimToady | we already stole the Ruby sigils and turned them into twigils | 20:20 | |
eli-se | Sigils are good. | 20:21 | |
TimToady | other than that, hmm.... | ||
20:21
avuserow joined
|
|||
TimToady | (that is, we stole the idea of including "weird scoping" in our mandatory hungarian notation) | 20:22 | |
PerlJam | TimToady: we already stole "stealing ideas from Perl" from ruby :) | ||
masak | I think we should top rather than steal outright the way Ruby can do cute DSLs. | ||
heh, Ruby was not alone in stealing ideas from Perl :) | |||
eli-se | I steal ideas from Perl! | 20:23 | |
sjn | One might consider renaming the language to "Thief" :-P | ||
avuserow | Hi all. I was just chatting with a coworker who was amused about the various ways to spell elsif/elif/elseif, and I was wondering if anyone knew why Perl went with elsif initially | 20:24 | |
TimToady | we even stole P5 regular expressions, just like everyone else | ||
though they're kinda bolted on the side... | 20:25 | ||
PerlJam | no, we stole them better! | ||
20:30
nbdsp joined
|
|||
itz | nlpw++ # good perl6 presence | 20:32 | |
nbdsp | Greetings! Could someone advise please the proper way to specify ranges in Str? For example in Python "abcdefghij"[3:-3] returns "defg". How to to it in Perl 6? | 20:33 | |
masak | m: say "abcdefghij".comb[3..*-4].join | 20:34 | |
camelia | rakudo-moar 5a38b2: OUTPUT«defg» | ||
masak | m: say "abcdefghij".comb[3 ..^ *-3].join | ||
camelia | rakudo-moar 5a38b2: OUTPUT«defg» | ||
masak | closenuff | ||
dalek | kudo-star-daily: 63912bd | coke++ | log/ (2 files): today (automated commit) |
20:35 | |
nbdsp | masak: thanks! | 20:36 | |
flussence | m: say 'abcdefghij'.substr(3, *-3); | ||
camelia | rakudo-moar 5a38b2: OUTPUT«defg» | ||
psch | m: say "abcdefghij".substr(3, *-3) | 20:37 | |
camelia | rakudo-moar 5a38b2: OUTPUT«defg» | ||
psch | flussence++ | ||
masak | oh, right | 20:38 | |
nbdsp | psch: that's more neat! | 20:39 | |
psch | although my braino surprised me there | 20:40 | |
m: say "abcdefghij".substr(*+3, *-3) | 20:41 | ||
camelia | rakudo-moar 5a38b2: OUTPUT«Failure.new(exception => X::OutOfRange.new(what => ("Start", "argument", "to", "substr"), got => 13, range => "0..10", comment => "use *13 if you want to index relative to the end"))» | ||
psch | but maybe that's actually sensible, cause substr doesn't know it could throw there | ||
and say just .gists | |||
[Coke] | m: say 0.deadbeefp2; | ||
camelia | rakudo-moar 5a38b2: OUTPUT«No such method 'deadbeefp2' for invocant of type 'Int' in block <unit> at /tmp/2GIiY2QMD0:1» | ||
masak | "use *13"? | ||
psch | masak: ... i didn't even see that | 20:42 | |
nwc10 | why do I see 9 spectest failures? eg | ||
$ ./perl6-m -Ilib t/spec/integration/advent2012-day23.t | |||
1..2 | |||
No such method 'print-nl' for invocant of type '<anon>' in sub say at src/gen/m-CORE.setting:18817 | |||
psch | m: say "abcdefghij".substr(*13, *-3) | 20:43 | |
camelia | rakudo-moar 5a38b2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/D5DwX5BY3BUnable to parse expression in argument list; couldn't find final ')' at /tmp/D5DwX5BY3B:1------> 3say "abcdefghij".substr(*7⏏0513, *-3) expecting any of: infix …» | ||
[Coke] | 9 failing -files-, causing 31 failures across the board. (jvm, moar, moar-jit). jvm has an additional few failures. | 20:45 | |
flussence | it looks like say no longer simply calls $*OUT.say? Did whoever made that change document the "new and improved" way to redirect $*OUT? I kinda need that functionality too. | 20:51 | |
20:53
vendethiel joined
20:54
espadrine joined
|
|||
nwc10 | flussence: I think that it's commit 5a38b210988e90f3b5053f3e3c5aaf65c12dc6c1 | 20:59 | |
(not checked this) | |||
and the fun seems to be because say now assumes that $out.print-nl exists and is usable | |||
and that's not the case in what (appear to be) (now) partial overrides | |||
and it's not clear to me if the more elegant solution is to declare the overrides wrong (and change them) or make say a bit more robust and default to a "\n" if $out.print-nl is not found | 21:00 | ||
21:01
espadrine left,
aindilis joined
|
|||
flussence | I guess I'll just stop hand-coding it and switch my code to IO::Capture::Simple. Once *that's* fixed... | 21:02 | |
21:03
kaare_ left,
telex left
21:04
telex joined,
laouji joined
|
|||
masak | nwc10: I think it's wrong to assume that a new method should suddenly be there, and die if it isn't. | 21:05 | |
[ptc] | masak++ # heredoc blog post | 21:06 | |
dalek | p: 7238985 | FROGGS++ | src/HLL/sprintf.nqp: track more int/str confusion when checking truthness in sprintf |
||
caymanboy | is it true that P6 will make me more well endowed? | 21:07 | |
21:07
laouji left
|
|||
TimToady | is your name Stanford or Harvard? | 21:09 | |
21:09
zakharyas left
|
|||
TimToady | the proper way to require a set of methods is to put them in a role | 21:10 | |
21:10
lucasb joined
|
|||
FROGGS | I need to fix istrue in parrot :o( | 21:11 | |
vendethiel | .oO( or do you? ) |
||
lucasb | In rakudo's source, is there any rule for knowing when to use P6 methods/ops and when to use nqp ops directly? Is one preferred over another? | 21:12 | |
flussence | masak, can you please add a "background: #fff" somewhere on your site so I can continue using unreasonable default fg/bg colours? :) | ||
masak | flussence: oh, it doesn't have that? will fix, immediately. | 21:13 | |
21:14
nbdsp left
|
|||
masak | flussence: fixed. might require you to do a hard reload on main.css | 21:16 | |
flussence: thanks for reporting | |||
flussence | much better, thank you :) | 21:17 | |
masak++ | |||
masak | \o/ | ||
21:26
virtualsue left
21:27
yvan1 left
21:41
yqt joined
|
|||
dalek | pan style="color: #395be5">perl6-examples: c2bc065 | paultcochrane++ | util/ (2 files): Add scripts to sync examples.perl6.org with repo build |
21:44 | |
p: d2d27cc | FROGGS++ | / (6 files): tweak istrue_s on jvm, every non-empty string is true now We also bump MoarVM to get the very same fix in. For Parrot we have to tweak Parrot_str_boolean, that means pull requesting the change and bumping its version. |
21:45 | ||
kudo/nom: fd3a7a8 | FROGGS++ | tools/build/NQP_REVISION: bump nqp version, to get ?"0" fix for moar/jvm |
21:46 | ||
pan style="color: #395be5">perl6-examples: 70de7ff | paultcochrane++ | util/update-and-sync: Use "make html" instead of htmlify |
21:47 | ||
pan style="color: #395be5">perl6-examples: 2feb1c8 | paultcochrane++ | util/sync-build-log: Add the missing sync-build-log script |
|||
masak | a small report. | 21:48 | |
irclog.perlgeek.de/perl6/2014-10-13#i_9500806 | |||
dalek | href="https://modules.perl6.org:">modules.perl6.org: a57bc71 | (Anthony Parsons)++ | web/index.tmpl: Ensure text contrast with odd browser colours (and add some minor polish on nearby CSS lines) |
||
masak | apparently, back in October, it took 12 and a half seconds to run my blogging software. | ||
21:49
virtualsue joined
|
|||
masak | nowadays, it takes around 10 seconds. | 21:49 | |
flussence | is that for the whole site? | 21:50 | |
masak | no, only things that are dirty. | ||
I don't have old numbers for whole-site, but let me check what it comes down to. | |||
24.5 seconds. | 21:51 | ||
i0.kym-cdn.com/photos/images/newsfe...a-face.jpg | |||
now there's a lot of shelling out there to Gruber's Perl 5 Markdown module. | 21:52 | ||
I'm hoping to eventually replace that, and to be faster than it. | |||
flussence | that's... about 15 pages per second. wow. | ||
(going by $$('.entry').length in /list-of-posts) | |||
kinslayer | masak: what are your blog ? | ||
masak | strangelyconsistent.org/ | 21:53 | |
flussence: yes, you got that right. plus the list-of-posts page itself and the main page. | |||
21:53
anaeem___ left
|
|||
kinslayer | masak oh it seems I have been by that site before. :D | 21:54 | |
masak | hehe | ||
flussence | I remember being impressed about 5 years ago when I got a php-fcgi site to handle 30 pages/s, and that was with some horribly hacky caching. | ||
kinslayer | I think perhaps from a video from a talk or a google search :D | ||
21:56
cschwenz left
|
|||
TimToady | masak: testing a fix for cheating heredocs | 21:58 | |
masak | \o/ | ||
vendethiel | TimToady++ :-) | ||
TimToady | works on constant, doesn't work on blorsts yet | 21:59 | |
masak | constants is quite enough | 22:00 | |
masak ponders printing up a community membership badge for himself with the title "The Squeakiest Wheel" :P | |||
dalek | ast: e4816ad | FROGGS++ | S0 (2 files): adjust tests for "0" being true |
22:05 | |
masak | well, truthy. :) | 22:07 | |
FROGGS | btw, fixing Parrot's istrue explodes quite spectacular: gist.github.com/FROGGS/f81a925bc8f5b6d72ddf | ||
masak: I'm tired :o) | |||
masak | anyway, FROGGS++ | 22:08 | |
vendethiel | FROGGS++ ! | 22:10 | |
FROGGS | the other spectest fails seem to be about that print-nl thingy | ||
gnight | 22:12 | ||
vendethiel | say I wanted to write a "low-level VM" (whatever that means) in C, and have maybe a native array | ||
of u8 (with fixed size). is there everything that needs to be done, say, to read 4 bytes into an int or something? | 22:13 | ||
night FROGGS! | |||
22:14
RabidGravy left
|
|||
dalek | kudo/nom: d5e2d1e | TimToady++ | src/Perl6/Grammar.nqp: cheat on constant heredocs that have nothing after |
22:14 | |
FROGGS | you can cast the position you care about to an int*, and then deref it | ||
dalek | pan style="color: #395be5">perl6-examples: eaed7b7 | paultcochrane++ | lib/Pod/Htmlify.pm6: Correct the url in pod-links |
||
FROGGS | like: int foo = *(int*)(array_ptr + idx); | 22:15 | |
vendethiel | FROGGS: my VM version has a `char tmp[sizeof(T)];`, I read byte by byte, and then casts the tmp to void* then T* then dereferences it | ||
FROGGS | though, the array must of course be idx + 3 bytes long | ||
dalek | frastructure-doc: 3b5890d | paultcochrane++ | hosts/hack.p6c.org.pod: Mention the examples.perl6.org rebuild |
22:16 | |
frastructure-doc: aa1857a | paultcochrane++ | hosts/www.p6c.org.pod: Mention where cron job runs for examples.perl6.org |
|||
FROGGS | you have to cast it to a char ptr first... | ||
like: int foo = *(int*)(((char *)array_ptr) + idx); | |||
otherwise the idx would not be about bytes | 22:17 | ||
vendethiel | FROGGS: that works fine: github.com/vendethiel/worldofcore....rs.c#L3-12 I'm just wondering how i'm supposed to do that in perl6 :-) | ||
[ptc] | yay! examples.perl6.org just went online. Thanks for your help moritz++! | 22:19 | |
FROGGS | m: use NativeCall; my $a = CArray[int8].new; $a[$_] = $_ for ^32; say my $ap = nativecast(Pointer, $a); say nativecast(int32, Pointer.new($ap + 4)) | 22:20 | |
camelia | rakudo-moar 0b2092: OUTPUT«Pointer<0x316ac90>117835012» | ||
FROGGS | vendethiel: ^^ | ||
vendethiel | FROGGS: amazing, thanks :) | ||
FROGGS | :o) | ||
vendethiel | but I guess I'll get astray from the school's pdf and have an int @array instead. no reason to follow the stupid stuff | 22:21 | |
FROGGS | that might also make it endian unaware then... | ||
vendethiel | haah | 22:22 | |
flussence | this is interesting - blog.rust-lang.org/2015/04/10/Fearl...rency.html - it looks like in Rust, function arguments get "used up" if they don't explicitly return them to the caller | 22:23 | |
(it explains there's other ways around that, but still, kinda a surprising default) | 22:25 | ||
22:25
skids joined
|
|||
timotimo | please explain? | 22:26 | |
you mean after you pass something to a function you're not allowed to re-use it? | |||
flussence | exactly! weird, huh? | ||
timotimo | interesting idea | 22:27 | |
22:27
sorear left
22:28
lucasb left
|
|||
masak | flussence: yes, this is known as "linear types". and it is very, very interesting. | 22:31 | |
basically, you get the type system to track ownership. the type system makes sure, statically, that there are never two simultaneous references to some value. | 22:32 | ||
I also find it interesting that there are parallels here to quantum computing, where this relation holds all the time due to the way qubits work. (if you measure them, you "destroy" them in some sense.) QC calls it the "no-cloning theorem". | 22:34 | ||
vendethiel | it's like they forked c++ value/references/foo before xvalues were added. (I'm just kidding) | 22:37 | |
masak | citeseerx.ist.psu.edu/viewdoc/downl...p;type=pdf seems relevant, and approachable | 22:38 | |
vendethiel | philip wadler, can recommend | ||
flussence | it does sound like they've put a ton of thought into making concurrency stuff good, rather than just accepting that the state of the art is that | 22:39 | |
masak | yeah, rust is exciting | ||
vendethiel | "shared memory" stuff :-). lifetimes, etc | ||
(that's a problem in general in C++ without having to add concurrency stuff. see move and all that... eh) | 22:40 | ||
22:40
davido_ left
|
|||
masak | gonna go to bed now, but I want to leave you with a parting challenge-oid | 22:41 | |
I just took this line gist.github.com/masak/db655cb7ab27...zes-p6-L26 | |||
and rewrote it to work on ints instead | |||
gist.github.com/masak/e54c64fc2d51cdd1a0b7 | |||
the resulting script runs in 10s if I turn off the `say` instructions | 22:42 | ||
which is exhiliratingly fast | |||
can you make it faster? :) | |||
I'm sure I've overlooked something -- it is my first attempt. | |||
I have verified that it's a correct replica of the original logic, though. | |||
22:43
andreoss joined
|
|||
masak | it outputs the exact same set of solutions. | 22:43 | |
andreoss | m: my @x := do 2 for 1..*; say @x[^10]; | ||
m: my @x := gather take 2 for 1..*; say @x[^10]; | |||
camelia | rakudo-moar 0b2092: OUTPUT«(timeout)» | ||
rakudo-moar 0b2092: OUTPUT«2 2 2 2 2 2 2 2 2 2» | |||
masak is not sure he has seen `gather take` together before | 22:44 | ||
andreoss++ | |||
anyway, 'night, #perl6 | |||
dalek | kudo/nom: 53593e5 | TimToady++ | src/Perl6/Grammar.nqp: heredoc cheating on blocks and on use as well |
||
masak | TimToady++ | 22:45 | |
tony-o | can arrays not be applied to regex subtraction? | ||
m: @a = qw<a b>; say "abc".subst(/ <[.] - [@a]> /, ''); | 22:46 | ||
camelia | rakudo-moar 0b2092: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ByLm01N8ZlVariable '@a' is not declaredat /tmp/ByLm01N8Zl:1------> 3@a7⏏5 = qw<a b>; say "abc".subst(/ <[.] - [@a expecting any of: postfix» | ||
tony-o | m: my @a = qw<a b>; say "abc".subst(/ <[.] - [@a]> /, ''); | ||
camelia | rakudo-moar 0b2092: OUTPUT«abc» | ||
vendethiel | [.]? | 22:47 | |
tony-o | i'd guess it should be 'ab' after the subst | ||
vendethiel | that's a literal one, right? | ||
tony-o | it isn't a literal '.' | ||
vendethiel | isn't it? i'm fairly sure it's a literal one in this context :o | 22:48 | |
tony-o | ah maybe it is, | ||
vendethiel | m: my @a = qw<a b>; say "abc".subst(/ <[a..z] - [@a]> /, ''); | ||
camelia | rakudo-moar 0b2092: OUTPUT«ac» | ||
tony-o | m: my @a = qw<a b>; say "abc".subst(/ <-[@a]> /, ''); | ||
camelia | rakudo-moar 0b2092: OUTPUT«ac» | ||
vendethiel | does seem to be a literal one ;-) | ||
tony-o | i stand corrected | 22:49 | |
why is it getting rid of the b instead of the c though? | |||
m: my @a = qw<a b>; say "abc".subst(/ <-[@a]> /, ''); | |||
camelia | rakudo-moar 0b2092: OUTPUT«ac» | ||
vendethiel | no idea, I don't know if @a is correct | ||
I just knew the . was literal because 'foo' warns for duplicated ' :) | 22:50 | ||
tony-o | ah :-) | ||
m: my @a = qw<a b>; say "abc".subst(/ [@a] /, ''); | |||
camelia | rakudo-moar 0b2092: OUTPUT«bc» | ||
tony-o | m: my @a = qw<a b>; say "abc".subst(/ @a /, ''); | ||
camelia | rakudo-moar 0b2092: OUTPUT«bc» | ||
dalek | ecs: 6fa2d87 | TimToady++ | S02-bits.pod: doc new heredoc cheating |
||
tony-o | maybe it's the sinus infection but none of those seem correct to me | 22:51 | |
vendethiel | spec say / @a / is the same as / [ $(@a[0]) | $(@a[1]) | ... ] | 22:52 | |
TimToady notes that the 'my @herestub_queue;' in the STD role is essentially a global variable, however | |||
vendethiel | i'll just go to bed and read backlog tomorrow :). good night, #perl6! | 22:53 | |
TimToady | o/ | ||
those all look correct to me | 22:54 | ||
tony-o | vendethiel: seems like [ 'a' | 'b' ] should match the "ab" section ? | ||
not the "bc" part?.. | |||
TimToady | there's no quantifier, so no way to match the b after a | 22:55 | |
or did you think it was gonna intuit a :g for you? | |||
TimToady knows about them sinus infections... | |||
tony-o | sacramento is terrible with it | ||
TimToady | just because @a is "plural" doesn't mean it matches more than one thing... | 22:56 | |
tony-o | m: my @a = qw<a b>; say "abc".subst(:g/ @a /, ''); | ||
camelia | rakudo-moar 0b2092: OUTPUT«5===SORRY!5=== Error while compiling /tmp/O8wCyXvpPQPreceding context expects a term, but found infix , insteadat /tmp/O8wCyXvpPQ:1------> 3 @a = qw<a b>; say "abc".subst(:g/ @a /,7⏏5 '');» | ||
tony-o | m: my @a = qw<a b>; say "abc".subst(r:g/ @a /, ''); | ||
camelia | rakudo-moar 0b2092: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ZqKQLeT6_3Preceding context expects a term, but found infix , insteadat /tmp/ZqKQLeT6_3:1------> 3@a = qw<a b>; say "abc".subst(r:g/ @a /,7⏏5 '');» | ||
tony-o | gah | ||
TimToady: i'll look at it some more if those are right, or just take a break - thanks ^ | |||
TimToady | m: my @a = qw<a b>; say "abc".subst(:g, / @a /, '') | ||
camelia | rakudo-moar 0b2092: OUTPUT«c» | ||
TimToady | m: my @a = qw<a b>; say "abc".subst(/ @a+ /, '') | 22:57 | |
camelia | rakudo-moar 0b2092: OUTPUT«c» | ||
labster | FROGGS++ for fixing all of the "0" things I didn't see | 22:59 | |
dalek | kudo/nom: be225ce | TimToady++ | src/Perl6/Grammar.nqp: don't cheat without a newline coming |
23:03 | |
labster | design.perl6.org/S26.html#Delimited_blocks mentions that :key<1 2 3> make a list, but right below it looks like it's trying to use :caption<Table of Contents> as a string. | 23:04 | |
TimToady | well, if you stringify the list, that's what you get | 23:05 | |
m: say :caption<Table of Contents>.value.WHAT | |||
camelia | rakudo-moar 0b2092: OUTPUT«(Parcel)» | ||
TimToady | m: say :caption<Table of Contents>.Str | ||
camelia | rakudo-moar 0b2092: OUTPUT«caption Table of Contents» | ||
TimToady | m: say :caption< Table of Contents>.value.Str | 23:06 | |
camelia | rakudo-moar 0b2092: OUTPUT«Table of Contents» | ||
labster | true enough. Now I just need to convince rakudo that all colonpairs in pod aren't strings. | ||
23:06
virtualsue left
|
|||
skids | class B { method foo { "" } }; class A is B { method foo { 0 || nextsame } }; A.new.foo.perl.say; | 23:14 | |
m: class B { method foo { "" } }; class A is B { method foo { 0 || nextsame } }; A.new.foo.perl.say; | |||
camelia | rakudo-moar 0b2092: OUTPUT«""» | ||
skids | m: class B { }; class A is B { method foo { 0 || nextsame } }; A.new.foo.perl.say; # Nil is as good as anything I guess | 23:15 | |
camelia | rakudo-moar 0b2092: OUTPUT«Nil» | ||
23:15
yqt left
|
|||
skids | But maybe nextsame should take an arg for use if it finds itself with no recourse. | 23:15 | |
eli-se | GitHub thinks my Perl 5 code is Perl 6 code. | 23:16 | |
My Perl 5 code must be really good! | |||
23:16
gfldex left
|
|||
TimToady | the nqp jvm build appears to be busticated | 23:23 | |
at least on my downstream server; trying again on my laptop | 23:24 | ||
eli-se | What happens if you next $label; on a different thread than the one the loop is running on? | ||
23:25
sorear joined
|
|||
TimToady | yep, kerblooey there too | 23:28 | |
hopefully the thread catches the control exception trying to escape, and punishes it for being desirous of freedom | |||
23:29
grondilu left
|
|||
TimToady | gist.github.com/anonymous/2d3e3d6de54f621af69e is the jvm build fale | 23:31 | |
caymanboy | nick caymanboy | 23:44 | |
23:51
sorear left
|