»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
raiph vendethiel: i'm using chrome; some key stuff isn't displaying right 00:14
vendethiel raiph: explain?
raiph "... 3 usages, when there’s only one.\n $ perl6 ./main.p6 --help \n Usage: \n tmp.p6 \n tmp.p6 (File)" 00:16
er
vendethiel not sure I get it
raiph i'm wrong
er 00:17
no, i think i'm right
vendethiel can you screenshot it? 00:17
I'm not sure I Get what's wrong
raiph gimme a mo 00:18
(will screenshot)
vendethiel thanks! 00:21
raiph vendethiel: The first couple screenshot apps aren't working for me 00:27
vendethiel raiph: how old is your rakudo :-)? 00:28
raiph here's what the html source is for one bit: "<pre>$ perl6 ./main.p6 --help Usage: tmp.p6</pre>" 00:29
that's from your advent
immediately preceded by "<p>And now, the USAGE is correct:</p>" 00:30
vendethiel raiph: how old is your rakudo :-)?
raiph not the gist, but perl6advent.wordpress.com/2014/12/2...t-of-main/
vendethiel raiph: how old is your rakudo ? 00:31
raiph i last rakudobrew'd yesterday but why is that relevant?
i'm not using it in relation to your advent
i'm just reading the page 00:32
vendethiel ôh...
raiph and some of the text that was in your gist is missing on wordpress
vendethiel I get it now
those are considered HTML tags 00:33
raiph: should be fixed 00:34
raiph \o/ 00:35
vendethiel raiph: I copy-pasted as HTML, and obviously the outputted <..> got in :-) 00:36
raiph :) 00:37
vendethiel: how far off am I thinking `subset` might reasonably have been called `ducktype`? 00:39
vendethiel it's not part of it
raiph completely unrelated? 00:40
vendethiel it's part of it*. My bad.
vendethiel raiph: you can see subset as 1) type alias 2) untagged type union/intersection 3) duck typing (.^can) 4)... 00:42
raiph ok, yeah, that's the sort of thing i was thinking, thx 00:43
yeah, ducktype would not do subset justice, thx 00:44
what's 4)... ? :)
vendethiel something like the custom wheres 00:47
I don't consider "* > 10" to be "duck typing" 00:48
Timbus its like... the opposite? youre somewhat saying it specifically cannot quack.. 00:57
but its not really to do with object interfaces at that point 00:58
Timbus i think i should have just said 'its very different.' 00:59
Mouq vendethiel++: Your post should use #| instead of #= towards the end, on adding descriptive comments :) 03:45
census anybody around? 05:13
bcode i'm not around sorry :(
lumimies vendethiel++: Nice advent article! In the usage example, you have: {{{“” is because the arguments}}}, I think the fancyquotes need to be &lt;Any&gt; instead 06:17
dsm What's the best way to convert utf8 object into Buf object? 06:29
FROGGS good morning 07:33
moritz \o
doc.perl6.org/type/Lock # review welcome 07:34
dsm m: Buf.new: "raw characters\r\n".encode 07:35
camelia ( no output )
moritz m: say Buf.new: "raw characters\r\n".encode
camelia rakudo-moar 284c09: OUTPUT«Buf:0x<72 61 77 20 63 68 61 72 61 63 74 65 72 73 0d 0a>␤»
dsm are there any better ways to convert utf8 type into Buf type? 07:37
moritz I'm not aware of any 07:38
Juerd dsm: What do you mean by better?
dsm encode string directly into Buf type maybe? 07:39
moritz Juerd: the feather replacement server is now running, and the perl6.org DNS has been updated to point to the new server 07:41
Juerd moritz: That's great!
moritz Juerd: but the DNS has max-TTL of 7 days, which will end on Christmas Eve
Juerd: so my plan is to then shut down apache on feather, see if anybody complains 07:42
Juerd: also add a notice to the MOTD that feather will be shut down
FROGGS m: say "raw characters\r\n".encode
camelia rakudo-moar 284c09: OUTPUT«Buf:0x<72 61 77 20 63 68 61 72 61 63 74 65 72 73 0d 0a>␤»
FROGGS dsm: ^^ 07:43
moritz that's just Buf -> Buf :-)
Juerd moritz: How about 2 and 3?
moritz Juerd: 3 was only used for dalek, that one is migrated
Juerd: 2 hosted the perl6.org websites, so that's also covered
Juerd Dalek had its own virtual server? Haha :)
dsm m: sub f(Buf $b) {}; f("raw characters\r\n".encode)
camelia rakudo-moar 284c09: OUTPUT«Type check failed in binding $b; expected 'Buf' but got 'utf8'␤ in sub f at /tmp/rFYl1buBq9:1␤ in block <unit> at /tmp/rFYl1buBq9:1␤␤»
Juerd moritz: Thanks for taking care of all this 07:44
moritz Juerd: 1 is what worries me a bit, because it has > 100 user accounts, and we have < 10 on the new server
Juerd It never did come with any guarantees
moritz Juerd: do you have the infrastructure to archive the homes on feather1 for a few months?
Juerd Of course
I'll simply tgz the home dirs 07:45
Or txz perhaps :)
dsm m: sub f(Buf $b) {}; f(Buf.new: "raw characters\r\n".encode) 07:46
camelia ( no output )
dsm are there a reason why utf8 type exists? 07:48
moritz dsm: yes; to encode the information that a byte stream is valid UTF-8
Juerd Is, or is supposed to be? 07:49
moritz is
dsm then if I want to pass byte stream which is valid UTF-8 into function like 'f' above, should I convert it to Buf type everytime? 07:49
Juerd 'cause Perl 5's "utf8 flag" sort of encodes the same information, and having it on data that isn't actually valid UTF-8 can lead to security holes.
Also, "encode" is a weird term for going from bytes-with-metadata to bytes-without-metadata. 07:50
Are you sure it's utf8 we're talking about, not unicode?
moritz Str (on which you call "encode") isn't bytes 07:51
it's list of codepoints, and in future list of graphemes
Juerd Str isn't utf8 either
moritz correct 07:52
Juerd Don't call it that, or allow others to call it that. It scares me to death :P
moritz the .ccache dirs in the feather homes make up a total of 2.5G :-) 07:57
Juerd Yeah, they used to be shared 07:59
Which theoretically shouldn't be an issue, but in practice lead to weird bugs
moritz deletes all of those that haven't been touched in half a year 08:00
dsm I'm talking about compatibility of utf8 type and Buf type 08:01
Juerd dsm: As I understand it, there is no utf8 type.
dsm: Do you mean Str?
moritz Juerd: there is an utf8 type
Juerd: it's a buffer type that enforces utf-8 validity
dsm m: "raw characters\r\n".encode.WHAT.say
camelia rakudo-moar 284c09: OUTPUT«(utf8)␤»
moritz m: say utf8 ~~ Blob 08:02
camelia rakudo-moar 284c09: OUTPUT«True␤»
Juerd I see
Juerd Why is it called utf8, not Utf8? 08:02
dsm sorry
moritz because it's a native/low-level/packed type
Juerd Ah
moritz just like int vs. Int 08:03
Juerd Low level, but it does enforce things. Sounds a bit odd.
dsm if I want to pass type constraint, should I convert it into Buf type everytime?
moritz dsm: what type constraint should it pass?
dsm: and why is that type contraint Buf and not Blob?
dsm pass a type constraint? sorry about my English
moritz dsm: who made the type constraint? 08:04
dsm github.com/rakudo/rakudo/blob/nom/...t/Async.pm here write method
moritz dsm: should probably be corrected to Blob 08:05
dsm thanks
moritz dsm: can you test it locally if it works when changed to Blob? 08:06
dsm i'll try
dsm I think it's working(don't need to convert manually) 08:18
mathw good $localtime 08:19
woolfy Juerd++ moritz++ 09:21
woolfy Juerd & moritz so much thanks for the servers and the work and the time!!! 09:21
Juerd moritz is doing all the work now :)
woolfy Juerd: you have done a lot of work too, and now you have spend some time again here to discussi things with moritz, so the thanks are just! 09:22
Juerd And although I never did mind much, I'm glad I won't have to fix feather anymore :)
woolfy feather can be an angel...
Juerd It looks like feather won't live to be 10 years old. 09:23
It will die at 9.
moritz wonders how much work it is to deploy and configure selinux to a level where it actually improves security noticably 09:54
mathw Usually it just gets in the way it seems :( 09:55
moritz mathw: well, it seems mostly to separate service, for example prevent accidentally serving files on the www 09:56
mathw: ... which is pretty pointless if you have an extra VM for the web server 09:57
mathw well... it's still nice 09:58
mathw mostly I've found it to be annoying because Fedora went through a phase of shipping core packages without appropriate SELinux profiles so there were warnings triggering regularly for utterly benign things. 09:59
moritz I've just given dalek its own private /tmp and /var/tmp 10:03
let's see if it still works
dalek c/test: 379f6a7 | moritz++ | META.info:
Test commit
c/test: e2aa35d | moritz++ | util/new-type.p6:
Another test
10:05
c/test: fcd4bec | moritz++ | util/new-type.p6:
Revert "Another test"

This reverts commit e2aa35df198abc215a60c7ee1598759499ee7f34.
10:06
dalek c/test: 9d7b761 | moritz++ | META.info:
Revert "Test commit"

This reverts commit 379f6a7c28ba1943b6f74df5b309d7c3ddae322a.
10:09
nwc10 moritz: so that it can't DOS the machine by filling the real /tmp ? 10:11
moritz nwc10: or if it's compromised, read other people's /tmp/ files, or try IPC via socket files in /tmp (for example with mysql) 10:12
I'm stepping throw 0pointer.net/public/systemd-nluug-2014.pdf
nwc10 aha, interesting. thanks 10:13
moritz I've now given both dalek services (IRC and HTTP) PrivateTmp=yes, PrivateDevices=yes, ProtectSystem=full, NoNewPrivileges=yes 10:14
the ProtectSystem=full prevents write access to /usr and /etc
now I'd just need mode that supervises a process to see what resources it uses in normal operation, and then suggests capabilities to restrict 10:17
moritz iirc AppArmor has such a mode 10:21
mathw ah that stuff is really cool 10:24
especially as almost nothing actually needs to write to /usr or /etc
psch hi #perl6 10:25
mathw hi psch 10:27
psch o/ mathw
i have to revise my statement re: what's missing for jvm-interop - i had forgotten about marshalling of arrays :/ 10:28
itz anyone building new servers might be interest in StartSSL which offers free certs 10:29
I was able to easily add https to pl6anet.org within a few mins 10:30
psch a more complete list is 1) field accessors 2) method resolution from widest to narrowest fitting type 3) array marshalling 4) metamodel-y things 5) Cool things
which is actually kinda much, looking at it... :)
masak good antenoon, #perl6 10:38
moritz \o masak 10:39
psch hi masak
masak census: nice to see you back on the channel :)
mathw psch: doesn't look easy 10:47
from the little I know about it the method resolution stuff could be quite tricky
psch mathw: there was a comment on my advent post. i think the cleanest solution would be always treating our Int as long and require native int coercion for narrower types 10:48
mathw: although that'd mean using BigInts towards Java needs to always work with the Java BigInts, whatever they're called
but i guess shoving our Int into a Java BigInt constructor could be made to work somehow, probably with a module though 10:49
mathw I think they are called BigInt 10:50
my Java's a bit hazy though
I did SCJP years ago and it put me right off :)
brrt java.math.BigInteger :-) 10:51
psch i guess i could special-case BigInteger as well 10:58
as in, just treat it as a possible marshalling target for Int, assuming we need it to match a method
mathw how would you choose between void foo(long a) and void foo(BigInteger a) 11:01
psch it depends :) 11:02
i mean, our Int are arbitrarily sized, i.e. pretty much BigInts
psch so if we can/have to we probably should marshal them to BigInteger on the Java size 11:03
and explicitly choosing the long candidate would be with $cl.foo(int64($myInt)) 11:04
i'm not sure if that coercer works on the perl6-side yet though, but it definitely isn't implemented for the interop 11:05
if we didn't want to rely on BigInteger as a default-marshalling target we'd always go take the long candidate and calling the BigInteger candidate would mean creating a java BigInteger object first 11:08
although i'm fairly sure it'd be safe to assume that any jvm we run on has BigInteger 11:09
dalek : 1481153 | lizmat++ | misc/perl6advent-2014/schedule:
Bring schedule up to date
11:43
dalek Heuristic branch merge: pushed 16 commits to rakudo/newio by lizmat 12:04
dalek ast: bccc45e | lizmat++ | S06-signature/positional-placeholders.t:
Fudge block $a vs $^a on JVM and Parrot

They're throwing like AdHoc, not X::Placeholder::NonPlaceholder
12:25
dalek ast/newio: e7857a4 | lizmat++ | integration/advent2014-day13.t:
Add tests for advent day #13
12:45
roast/newio: 89a9309 | lizmat++ | integration/advent2014-day16.t:
roast/newio: Add tests for advent day #16
lizmat sorry dalek 12:45
Juerd moritz: It's much less trouble to set up separate services on a dozen separate virtual servers, than to properly use selinux on a single one :) 12:47
moritz Juerd: i get that impression too, especially if you have some sort of automated configuration management 12:48
Juerd Which config management tool do you use? I like Ansible. 12:49
moritz none privately; $work uses puppet
(but at work I don't do ops, so I'm in little contact with it)
Juerd Didn't want Puppet myself because it requires Ruby on the servers and it uses a pull model. 12:50
So I haven't even tried it 12:51
moritz jnthn, lizmat, other concurrency experts: what's the rationale for having both 'done' and 'quit' in Supply? (both as method and callbacks) 12:52
they seem to do quit similar things
Juerd: do you have a feeling how many hosts you need for Ansible to pay off? 12:53
Juerd moritz: 1
lizmat moritz: starting to dig into that
Juerd moritz: First time I used it was on a small cluster of 3 hosts. After 4 hours of reading docs and writing "playbooks" (Ansible scripts), I felt I was done and spent roughly as much time as I would have, had I done it manually. 12:54
dalek kudo/newio: e51bead | lizmat++ | src/core/IO/Dir.pm:
Fix type constraint
12:54
kudo/newio: 84c7427 | lizmat++ | src/core/IOU.pm:
Fix error message
Juerd moritz: After that, I think it has definitely saved me a lot of time. 12:55
moritz Juerd: I guess I should investigate it then
Juerd Especially with things like the shellshock bug, it was definitely worth having around.
psch from S17:Supplies it looks like quit is an implicit CATCH block, while end is a LEAVE block
synopsebot Link: perlcabal.org/syn/S17.html#Supplies...ATCH_block
lizmat moritz: done is for a clean shutdown, and quit is for an shutdown thorugh an exception
*though 12:56
*through
*sigh*
psch not sure i like what synopsebot did there o.o
lizmat S17:Supplies more spaces
synopsebot Link: perlcabal.org/syn/S17.html#Supplies...ore_spaces
lizmat not sure either 12:57
Juerd moritz: You don't have to use Ansible for everything to benefit from having it. Just keep separate playbooks (or roles) for hosts that are fully Ansible-managed, and for those that were installed manually.
vendethiel lumimies++ # thanks, nice catch :) 13:18
moritz psch: then patch it 13:25
psch moritz: in a bit, i'm just testing primitive array marshalling :) 13:26
dalek kudo/newio: 7b20782 | lizmat++ | src/core/IO.pm:
Remove FILETEST-ALL for now, it was a bad idea
13:32
abraxxa 39 5515 13:40
lizmat 39 5155 # close, but no cigar
abraxxa sorry, wrong tab
moritz lizmat: (re quit vs. done) then what's the difference between .close and .done? 13:42
lizmat close either closes the indicated tap, or all taps
it does *not* do anything with the supply 13:43
you can still create new taps after a .close
moritz .done also doesn't shut down the supply 13:46
lizmat moritz: hmmmm.... indeed.... don't see a diff either from functioning either, maybe jnthn has better insight 13:58
*pov
psch m: my $sup = Supply.new; my ($t1, $t2) = $sup.tap({ say "t1: $^a"}, done => { say "t1 done" }), $sup.tap({ say "t2: $^a"}, done => { say "t2 done" }); $sup.emit(1); $t1.close; $sup.emit(2); $sup.done 13:59
camelia rakudo-moar 284c09: OUTPUT«t1: 1␤t2: 1␤t2: 2␤t2 done␤»
psch the done callback on a tap happens when .done is closed and the tap isn't closed yet 14:00
s/is closed/is called on the Supply/
psch Tap doesn't have a .done method afaics 14:01
maybe i'm missing the point here, but it seems clear to me... :) 14:02
m: my $s = Supply.new; my $t = $s.tap(&say); $s.close; $s.emit(1); 14:03
camelia ( no output )
census good to see you too masak 14:05
dalek kudo/newio: c4b4821 | lizmat++ | t/01-sanity/ (5 files):
Add sanity tests for filetest primitives
psch although i wonder if emit()ting on a closed Supply should complain... 14:06
moritz m: say Tap.^methods 14:08
camelia rakudo-moar 284c09: OUTPUT«close <anon> <anon> <anon> <anon> <anon>␤»
psch and .close on a Supply doesn't run :done on the Taps 14:09
moritz psch: Tap has &.emit, &.done, &.quit, &.closing
moritz psch: it runs .closing on the Tap 14:09
dalek frastructure-doc: 970d55f | moritz++ | hosts/ (2 files):
Mention git for /etc
14:10
psch m: my $s = Supply.new; my $t = $s.tap({ .say }, done => { say "done" }); $t.done()(); $s.emit(1); $s.done 14:11
camelia rakudo-moar 284c09: OUTPUT«done␤1␤done␤»
moritz reading S17, I get the impression that there's just one .close / .done 14:12
but it's called .done on the Supply and .close on the Tap
itz I just ran rakudobrew and panda seg faults
is this a known issue?
psch moritz: i'm afraid i still don't see the problem. &.done, &.emit, &.quit, &.closing get called on a Tap when the tapped Supply is called with methods of the same name 14:13
s/methods of the same name/methods of the corresponding semantics/
lizmat moritz: I recently added a bare .close on Supply, maybe I shouldn't have
moritz lizmat: it's not just that, it's also the callbacks
I'll open some tickets 14:14
dalek kudo/newio: 3fd4600 | lizmat++ | t/01-sanity/5 (2 files):
Should probably test path primitives first
14:20
moritz lizmat: could it be that .done is a Supply operation ("this whole stream is closing down"), while .close is a Tap operation? ("We're closing just this tap, but the whole stream keeps going")? 14:24
moritz lizmat: if so, it would make sense for .done to forbid further .emit() calls 14:24
github.com/perl6/specs/issues/77 opened 14:26
psch oh
lizmat moritz: fwiw, if a tap is done, it should not longer allow emits
psch so issue was in S17, not in "how does it work in rakudo atm?"
moritz psch: both 14:27
psch: I'm trying to write documentation, and I'm thoroughly confused by both the implementation and the specs
lizmat: did you mean s/tap/supply/ ?
psch alternatively s/allow// 14:27
lizmat ah, duh, yes 14:28
psch and s/s$//
moritz lizmat: I see nothing in Supply.emit or Supply.done that would prevent further emits 14:28
lizmat pls rakudobug that
my mind is really on other things atm :-) 14:29
psch m: my $s = Supply.new; my $t = $s.tap(&say); $s.emit(1); $s.done; $s.emit(2)
camelia rakudo-moar 284c09: OUTPUT«1␤2␤»
psch m: my $s = Supply.new; my $t = $s.tap(&say); $s.emit(1); $s.close; $s.emit(2)
camelia rakudo-moar 284c09: OUTPUT«1␤»
psch moritz++ for documentation and clarifications 14:29
moritz lizmat: willdo 14:30
lizmat thinking about it more: .done basically marks all current taps as done 14:31
mullagain so i perl6 stable enough for me to start development on a new project that will be released next year?
masak mullagain: it all depends.
lizmat it doesn't say anything on future taps
moritz so does close, it seems 14:32
masak mullagain: best answer to that is to figure out the level of stability you need, and then compare with the level we can provide right now.
moritz and neither actually terminates anything
lizmat m: my $s = Supply.new; my $t = $s.tap(&say); $s.emit(1); $s.done; sat $t.done
camelia rakudo-moar 284c09: OUTPUT«===SORRY!=== Error while compiling /tmp/W5ImKDhvXM␤Undeclared routine:␤ sat used at line 1. Did you mean 'say', 'set'?␤␤»
lizmat m: my $s = Supply.new; my $t = $s.tap(&say); $s.emit(1); $s.done; say $t.done
camelia rakudo-moar 284c09: OUTPUT«1␤(Callable)␤»
lizmat hmmm....
ah, duh
mullagain stability was a bad choice of words. I am more worried about if the code with work in the future or not.
like syntax changes, etc.
masak right. 14:32
I took your meaning that way.
moritz m: my $s = Supply.new; $s.tap(&say); $s.done; $s.emit('still here') 14:33
mullagain ok
camelia rakudo-moar 284c09: OUTPUT«still here␤»
masak don't see any syntax changes on the horizon these days.
moritz m: my $s = Supply.new; $s.tap(&say); $s.close; $s.emit('still here')
masak we know how to spell Perl 6 now. :)
camelia ( no output )
masak but there are a few semantic changes planned, and I don't think anyone knows exactly how deep they'll go.
lizmat masak: well, but there may be subtle changes because of the GLR
indeed 14:34
masak was thinking of the GLR.
"Great List Refactor", for those just tuning in.
mullagain hmm, ok
lizmat any syntax changes will be handled by a year of deprecation and very clear deprecation messages 14:35
listing the locations in the source that need changes and what needs changed
masak that includes things such as API changes, subs and methods changing.
so that's not the problem.
the GLR will have *some* sort of measurable effect on the code out there. hard to say what. 14:36
lizmat well, speedup for one :-)
we're not doing this just because we can
masak right. 14:37
moritz and clearer distinction about what flattens and what doesn't
m: my $s = Supply.new; $s.tap(&say); $s.quit('oh noez'); $s.emit(42) 14:41
camelia rakudo-moar 284c09: OUTPUT«oh noez␤ in block at src/gen/m-CORE.setting:21121␤ in method quit at src/gen/m-CORE.setting:21180␤ in block <unit> at /tmp/x4aVtg67nq:1␤␤»
moritz m: my $s = Supply.new; $s.tap(&say, :quit({})); $s.quit('oh noez'); $s.emit(42) 14:42
camelia rakudo-moar 284c09: OUTPUT«Type check failed in binding &quit; expected 'Callable' but got 'Hash'␤ in method tap at src/gen/m-CORE.setting:21121␤ in block <unit> at /tmp/ckWpCA0bB0:1␤␤»
moritz m: my $s = Supply.new; $s.tap(&say, :quit(-> $ex {})); $s.quit('oh noez'); $s.emit(42)
camelia rakudo-moar 284c09: OUTPUT«42␤»
dalek c: 1c2bb13 | moritz++ | lib/Type/Supply.pod:
Start to document Supply

my, is this confusing (and much to do)
14:50
lizmat moritz++
dalek ecs: 213ff41 | lumimies++ | S17-concurrency.pod:
Fix broken markup
15:29
mrcko can someone help me? 15:45
lizmat good *, mrcko: depends on what the problem is
mrcko how to split this string intro an array? "1 v=3362&t=2420&h=4400";
i try everything but it doesnt work 15:46
i have to work with split and regex, right?
lizmat split on what ?
mrcko spit into $data[0], $data[1] and so on 15:47
colomon ack. $work script broke because $*DISTRO no longer returns some form of "linux". is there a replacement for that? 15:47
mrcko so $data[0] is 1, and $data[1] is 3362
lizmat colomon: $*KERNEL.name ? 15:48
mrcko $data[2] 2420 and so on
lizmat m: $*KERNEL.name ?
camelia rakudo-moar 284c09: OUTPUT«===SORRY!=== Error while compiling /tmp/EyCNXvRfms␤Two terms in a row␤at /tmp/EyCNXvRfms:1␤------> $*KERNEL.name ⏏?␤ expecting any of:␤ infix stopper␤ infix or meta-infix␤ stateme…»
lizmat m: $*KERNEL.name
camelia ( no output )
lizmat m: say $*KERNEL.name
camelia rakudo-moar 284c09: OUTPUT«linux␤»
colomon mrcko: try comb(/\d+)
lizmat: > $*KERNEL.name
unknown
lizmat also with recent?
colomon lizmat: trying to build a new rakudo-moar now 15:49
lizmat m: say "1 v=3362&t=2420&h=4400".comb(/\d+/) 15:50
camelia rakudo-moar 284c09: OUTPUT«1 3362 2420 4400␤»
mrcko will try
lizmat m: may @a = "1 v=3362&t=2420&h=4400".comb(/\d+/); say @a.perl 15:51
camelia rakudo-moar 284c09: OUTPUT«===SORRY!=== Error while compiling /tmp/WNSU5V1w6n␤Variable '@a' is not declared␤at /tmp/WNSU5V1w6n:1␤------> may @a⏏ = "1 v=3362&t=2420&h=4400".comb(/\d+/);␤ expecting any of:␤ postfix␤»
lizmat m: my @a = "1 v=3362&t=2420&h=4400".comb(/\d+/); say @a.perl
camelia rakudo-moar 284c09: OUTPUT«Array.new("1", "3362", "2420", "4400")␤»
colomon lizmat: I see that latest moar (which I have built for user smoker on the same machine) has $*KERNEL.linux. lizmat++ 15:52
lizmat yw, TimToady++ for those changes, I thnk
*think
colomon lizmat: you told me about them, that's worth a ++
lizmat :-)
mullagain is there anything out there to convert perl5 modules to perl6? 15:54
colomon is having yet another one of those days where everything he does leads to something else that needs to be done first, and so on recursively. meant to do some "fun" $work this morning, ending up rebuilding moar in order to get $*KERNEL.name in order to get $work script running in order to build $work libraries in order to test not fun $work stuff properly... 15:55
psch mullagain: there's currently no way to generate a perl6 module from a perl5 module, but you can use perl5 modules with v5 or Inline::Perl5
psch Inline::Perl5 is probably the more sensible solution at the moment, as it runs perl5 code with perl5 15:56
v5 is a reimplementation and far from finished
mrcko lizmat, how to get and csv like string like "1,3362,2420,4400" ? iam not familiar with perl :) thank you. 15:59
psch hm, i'm actually not sure how far from finished v5 is, but i think FROGGS++ has had other things on his plate recently
colomon mrcko: if all you want to do is extract the integers from a string, comb(/\d+/) should work well 16:00
lizmat m: say "1 v=3362&t=2420&h=4400".comb(/\d+/).join(",") # mrcko 16:00
camelia rakudo-moar 284c09: OUTPUT«1,3362,2420,4400␤»
colomon mrcko: if you want to get whatever separated by commas, then split(",") is an approach.
colomon realizes he may be answering the wrong question.
dalek kudo/newio: c43d3b0 | lizmat++ | src/core/CompUnitRepo/Locally.pm:
CHANGE-DIRECTORY only takes Str
16:08
kudo/newio: c08b117 | lizmat++ | src/core/IOU.pm:
MAKE-ABSOLUTE-PATH only takes Str
mrcko this doesnt work in perl5, right? 16:09
lizmat no, this is perl 6 16:10
isBEKaml mrcko: no -- were you looking at perl5 code?
lizmat the fact that you must use . instead of -> to call a method
should have told you that :-)
isBEKaml lizmat: perl5 doesn't have comb :-) 16:11
mrcko This is perl 5, version 14, subversion 2 (v5.14.2)
lizmat mrcko: then you're on the wrong channel :-(
isBEKaml mrcko: ah, you'd get a lot more help if you ask on #perl
mrcko omg :(
isBEKaml mrcko: perl5 and perl6 are two very different beasts.
mrcko ok, nobody has an answer in perl5 :) 16:12
isBEKaml mrcko: that's because we don't want to stray too far off-topic :-)
mrcko thanks anyway guys 16:14
colomon thinks it shouldn't be too hard to implement comb in p5... 16:15
lizmat mrcko: you're welcome, hope to see you back when you're ready for Perl 6
mrcko yes. cheers
psch hm, we have something for converting in one direction i think? istr that's only perl5 regex to perl6 regex...? 16:33
isBEKaml psch: I'm not sure - there may be something in mu repo 16:34
lizmat m: say "foo" ~~ m:P5/\w+/ # psch isBEKaml you don't mean this? 16:36
camelia rakudo-moar 284c09: OUTPUT«「foo」␤␤»
isBEKaml lizmat: I thought psch meant something like v6 to v5. I surely recall m:P5, which was somewhat non-existent a couple years or so ago 16:38
isBEKaml should fix irssi highlighter 16:39
psch isBEKaml, lizmat: i was looking for p56/p5-to-p6 for camelia 16:40
seeing as mullagain was asking about converting perl5 modules to perl6
TimToady to translate v6 regex to v5 you pretty much have to ignore v5 regex and just translate to lazy lists of closures as STD does
that direction should be easier 16:41
psch although i don't know whether big-ish modules would convert well
where "big-ish" probably means "production ready" :)
TimToady depends on what percent of esoteric P5 features it takes advantage of 16:42
and what style of OO it uses...
isBEKaml psch: okay - my information is a little out of date :-) 16:44
psch p56: $_="krJhruaesrltre c a cnp,ohet";$_.=$1,print$2while s/(..)(.)//; 16:45
camelia p5-to-p6 : OUTPUT«$_ = 'krJhruaesrltre c a cnp,ohet';␤$_ ~= $0, print($1)␤ while s:P5!(..)(.)!!␤»
psch m: $_ = 'krJhruaesrltre c a cnp,ohet';␤$_ ~= $0, print($1)␤ while s:P5!(..)(.)!!␤
camelia rakudo-moar 284c09: OUTPUT«Just another perl hacker
psch that's probably really far from esoteric :)
psch .tell mullagain you could check converting perl5 modules to perl6 modules with perlito, see the following link for how camelia does it here github.com/perl6/evalbot/blob/94f9...ot.pl#L182 16:47
yoleaux psch: I'll pass your message to mullagain.
psch now back to figuring out how i can sensibly marshal different array types for non-mmd interop methods... 16:50
dalek kudo/newio: 7e4d70f | lizmat++ | src/core/IO.pm:
Fix/Optimize MAKE-ABSOLUTE-PATH using native str
16:51
dalek kudo/newio: f182b5e | lizmat++ | t/01-sanity/50-path.t:
Initial batch of path sanity tests
16:52
lizmat dinner& 16:53
mullagain is there a IO::Socket::INET module for perl6? 17:00
yoleaux 16:47Z <psch> mullagain: you could check converting perl5 modules to perl6 modules with perlito, see the following link for how camelia does it here github.com/perl6/evalbot/blob/94f9...ot.pl#L182
FROGGS m: say IO::Socket::INET 17:02
camelia rakudo-moar 284c09: OUTPUT«(IO::Socket::INET)␤»
FROGGS mullagain: yes ---- ^
mullagain hmm, I cant "use" it and I didnt see it listed in the modules list. 17:05
psch m: my $sock = IO::Socket::INET.new 17:06
camelia rakudo-moar 284c09: OUTPUT«Unhandled exception: Nothing given for new socket to connect or bind to␤ at <unknown>:1 (/home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:13877 (/home/camelia/rakudo-inst-2/langu…»
psch thinks with params it'll complain as well, 'cause RESTRICTED 17:07
mullagain what about Data::Dumper? 17:10
masak mullagain: that's a Perl 5 module. 17:14
mullagain: in Perl 6, you have .perl
moritz m: my $s = Supply.new; $s.interval(0.1).tap(&say); sleep 1; $s.done; 18:06
camelia rakudo-moar 284c09: OUTPUT«Invocant requires a type object, but an object instance was passed␤ in method interval at src/gen/m-CORE.setting:21260␤ in block <unit> at /tmp/stycUi053v:1␤␤»
moritz m: my $s = Supply.interval(0.1).tap(&say); sleep 1; $s.done; 18:07
camelia rakudo-moar 284c09: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»
isBEKaml What would the error message look like if a method parameter were to be a type object? (Rare, I know, just curious) 18:09
moritz m: my $s = Supply.interval(0.1).tap({.say; $s.done }); sleep 0.3; $s.done;
camelia rakudo-moar 284c09: OUTPUT«0␤1␤2␤3␤»
moritz m: class A { method x(Int:U) { } }; A.new.x(42) # for isBEKaml
camelia rakudo-moar 284c09: OUTPUT«Parameter '<anon>' requires a type object, but an object instance was passed␤ in method x at /tmp/3QcxMCRxS9:1␤ in block <unit> at /tmp/3QcxMCRxS9:1␤␤»
isBEKaml moritz: thanks 18:10
dalek kudo/nom: f57427b | moritz++ | src/core/Supply.pm:
Simplify Supply.list
18:11
raydiak good morning #perl6 18:25
masak ahoy, raydiak. 18:51
lizmat moritz: good catch on Supply.list 18:55
moritz: from your testing, should I assume you think it's a good idea to run .interval on an instantiated Supply ? 18:56
if so, I guess it should "inherit" its scheduler, right > 18:57
?
masak saves the day using lots and lots of debug say statements 19:10
masak moritz: everything on track for tomorrow's post? 19:11
TimToady: how's day-after-tomorrow's post going? :)
lizmat masak: I think moritz' post is already scheduled 19:17
masak ooh
masak reads it
lizmat has put on some old Joe Cocker 19:18
lizmat en.wikipedia.org/wiki/Joe_Cocker#Personal_life :-( 19:20
TimToady masak: I have some ideas
masak looking forward to it. 19:22
masak fixed a minor whitespace typo in moritz++' scheduled post 19:23
masak enjoyed research.swtch.com/yaccalive 19:24
moritz masak++ # whitespace fix 19:35
dalek c: cb087f6 | moritz++ | lib/Type/Supply.pod:
[Supply] document more methods
19:43
lizmat hmmm.... in light of the GLR, having a method .for on Supply, may be confusing 19:52
moritz lizmat: aye 19:52
lizmat: what does it do anyway?
lizmat it basically emits all the values 19:53
lizmat so maybe "emit-for" would be a better name 19:55
ah, and it creates a supply with the emitted values 19:56
hmmm.... emit-for would be a bad name
hmmm... maybe .with? Supply.with( 1..10 ) 19:58
moritz .from 20:03
moritz Supply.from( 1..10 ) 20:03
lizmat won't that interfere with some of TimToady's recent changes? 20:04
I like it, but... :-)
moritz which recent changes? 20:07
moritz feels out-of-the-loop
lizmat moritz: 1eb7fada843b75468e15d7e29b90008d68327ea4 20:15
moritz lizmat: eeks 20:16
lizmat: ok, List.Supply
lizmat it probably won't interfere technically, but it will in conceptually I think 20:17
*interfere
moritz .from-list 20:20
.seeded
lizmat from-list feels best, I guess 20:24
lizmat m: for 1,2,3, { .say } 20:33
camelia rakudo-moar f57427: OUTPUT«===SORRY!===␤Expression needs parens to avoid gobbling block␤at /tmp/H5RjtMfuYi:1␤------> for 1,2,3, { .say }⏏<EOL>␤Missing block (apparently taken by expression)␤at /tmp/H5RjtMfuYi:1␤------> for 1,2,…» 20:33
lizmat I guess here we miss the for () parens :-) 20:34
moritz aye
psch m: for 1,2,3,() { .say } # these () ? 20:37
camelia rakudo-moar f57427: OUTPUT«1␤2␤3␤»
psch ooh
nevermind that 20:38
moritz psch: for (1, 2, 3) { .say } # i guess lizmat++ meant those
psch yeah
moritz too slow
lizmat psch++ another way to fix my problem
psch didn't realize he could've played this as witty instead of misreading the problem :) 20:39
psch lizmat: could Deprecations be accessible/instantiatable in ModuleLoader.nqp? i'm not quite sure how to look into getting the deprecation for :from<java> proper 20:41
dalek kudo/newio: 885d6ab | lizmat++ | src/core/IO.pm:
Fix /foo/../../ case
psch currently i'm just nqp::say()ing a message similar to the one from Deprecations, but that's clearly LTA 20:42
lizmat psch: I'm actually not sure how to access P6 things inside NQP...
something with hllsym comes to mind... but am foggy about that right now
psch thanks lizmat++, i think i can get somewhere with that 20:43
lizmat ++psch 20:43
psch still have to figure out the array-from-a-non-mmd-interop-method thingy
but nqp::say()ing for a deprecation of the interop mechanic isn't really great, considering we advertise jakudo for long-running multi threaded scripts... 20:44
dalek c: 128499a | moritz++ | type-graph.txt:
PromiseStatus is an enum, not class
lizmat psch: agree 20:45
dalek c: d3311df | moritz++ | util/new-type.p6:
make new-type utility executable
kudo/newio: 85c2fa3 | lizmat++ | src/core/IO.pm:
Don't linger on empty //
20:51
[Coke] reads a few chapters of the Modula-3 book. 20:57
masak [Coke]: tell us more :) 21:00
dalek c: 7d7d839 | moritz++ | lib/Type/ (2 files):
Document type Tap

one of the few types we have covered completely, I believe :-)
21:04
moritz guesses he should make a website for the community server at some point, including mirrors to use, acknowledgements for the donors and all that 21:05
masak .oO( you certainly tapped that one for what it was worth ) 21:09
[Coke] was thinking about a perl 6 book, and so was reading the "competition". It was pretty awesome for the time. 21:18
masak m: sub foo($*x) { bar }; sub bar { say $*x }; foo("OH HAI") 21:23
camelia rakudo-moar f57427: OUTPUT«OH HAI␤»
masak <3 Perl 6
I was like "ooh, will this work?" -- and it does! 21:24
psch masak++ # for brane-bendy application of known concepts
masak m: sub foo(:$*x) { bar }; sub bar { say $*x }; foo(:x("OH HAI"))
camelia rakudo-moar f57427: OUTPUT«OH HAI␤»
lizmat masak: it works in BUILD, why wouldn't it there ?
psch BUILD uses dynvars? 21:25
lizmat submethod BUILD(:$!foo) {}
masak I've never done dynamic params in a BUILD either.
lizmat no, vars with tiwgils
masak well, that's a completely different twigil :)
lizmat *twigils
masak I guess I wasn't sure how special-cased it was...
I wouldn't have been that surprised if dynamicals wouldn't work like that.
[Coke] now that jnthn++ fixed os x, upgrading xcode... 21:26
lizmat I guess in a way, they're the easiest, as they're completely runtime
[Coke] lizmat: unless you'd recommend against?
lizmat well... let me double check with a fresh tarball
psch for me, the surprising bit is probably easiest summarized as "signature declarations are actually the same as explicit declarations" 21:27
which has "dynvars work" as fallout, and could've been obvious with BUILD 21:28
the *-sigil is somewhat trait-y, and thus we get what masak demonstrated 21:29
lizmat [Coke]: are you on Mavericks or Yosemite ?
seems the problem I had was only with the new Xcode on Mavericks 21:30
now that I've moved to Yosemite, rakudo builds out of the box
masak 'night, #perl6 21:34
lizmat gnight, masak
psch gnight, masak 21:35
El_Che moritz: I stopped ntpd while waiting the debian update 21:37
moritz: on hack 21:38
moritz: support.ntp.org/bin/view/Main/Secur...tl_putdata 21:39
lizmat support.apple.com/kb/DL1782 # update for NTP vulnaribility
dalek kudo/newio: f5e8dfe | lizmat++ | t/01-sanity/50-path.t:
Add more path related sanity checks
21:46
lizmat *vulnerability 21:55
dalek kudo/newio: f4d46c0 | lizmat++ | src/core/ (4 files):
MAKE-ABSOLUTE-PATH only takes Str,Str
22:01
moritz El_Che: thanks 22:09
El_Che: wait, ntpd, or openntpd?
El_Che: I thought I didn't have ntpd running 22:10
dalek kudo/nom: 828d0df | lizmat++ | src/core/Supply (2 files):
Deprecate Supply.for in favour of .from-list
kudo/nom: d45c53a | lizmat++ | docs/ChangeLog:
Update ChangeLog for Supply.from-list
22:13
lizmat .tell jnthn I'm thinking about prefixing "on-" to all Tap attributes so that you get a better message when e.g. trying to emit on a tap 22:16
yoleaux lizmat: I'll pass your message to jnthn.
lizmat m: Supply.new.tap.emit(42) 22:17
camelia rakudo-moar f57427: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in method <anon> at src/gen/m-CORE.setting:3277␤ in block <unit> at /tmp/dBWoquEjHY:1␤␤»
lizmat .tell jnthn manufactured case: m: Supply.new.tap.emit(42) # should complain about not having an emit method 22:18
yoleaux lizmat: I'll pass your message to jnthn.
[Coke] lizmat: mav
lizmat then I would not recommend upgrading Xcode 22:19
[Coke] k. thanks!
lizmat fwiw, upgrade to Yosemite worked out ok
it just took long (about 3.5 hours on my MBP)
.tell jnthn www.engadget.com/2014/12/22/the-pro...reativity/ # served / available in Copenhagen :-) 22:24
yoleaux lizmat: I'll pass your message to jnthn.
lizmat gnight, #perl6! 22:26
psch g'night, lizmat 22:29
colomon is recording the Good Omens radio show for future study. 23:03