Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-08-27

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 Skarsnik m: my uint32 $u32; $u32 = -4; say $u32;
00:00 camelia rakudo-moar 6a8278: OUTPUT«4294967292␤»
00:00 Skarsnik m: my uint32 $u32 = 0; $u32 -= 5; say $u32;
00:00 camelia rakudo-moar 6a8278: OUTPUT«4294967291␤»
00:01 Skarsnik I think all intxx and uintxx are not equal on constraint
00:01 tbrowder p6: my uint64 $n = 232; say sprintf "%0x", $n
00:01 camelia rakudo-moar 6a8278: OUTPUT«e8␤»
00:01 Skarsnik m: my uint64 $u64 = 0; $u64 -= 5; say $u64;
00:01 camelia rakudo-moar 6a8278: OUTPUT«-5␤»
00:01 Skarsnik probably a bug
00:01 tbrowder say UINT_MAX
00:02 tbrowder p6: say UINT_MAX
00:02 camelia rakudo-moar 6a8278: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    UINT_MAX used at line 1␤␤»
00:03 tbrowder p6: say UINT32_MAX
00:03 camelia rakudo-moar 6a8278: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    UINT32_MAX used at line 1␤␤»
00:05 tbrowder p6: my uint32 $n = 0xffffffffffffffff; say $n
00:05 camelia rakudo-moar 6a8278: OUTPUT«4294967295␤»
00:09 tbrowder p6: my $uint32-max= 0xffffffffffffffff; my $x = -4; my $xuint = $uint32-max + $x + 1; say sprintf "%x", $xuint
00:09 camelia rakudo-moar 6a8278: OUTPUT«fffffffffffffffc␤»
00:10 tbrowder okay, i think i may know how to do it
00:12 pierre_ joined #perl6
00:21 timotimo oh hey Skarsnik
00:40 pierre_ joined #perl6
00:42 MilkmanDan joined #perl6
01:00 BenGoldberg joined #perl6
01:08 johnjohn101 joined #perl6
01:20 SmokeMachine____ joined #perl6
01:22 MilkmanDan joined #perl6
01:23 mithaldu_ joined #perl6
01:24 Lucas_One joined #perl6
01:26 BuildTheRobots joined #perl6
01:28 pierre_ joined #perl6
01:29 kipd joined #perl6
01:33 olinkl joined #perl6
01:36 notbenh_ joined #perl6
01:37 AngeloMichael joined #perl6
02:12 zacts_pi joined #perl6
02:14 pierre_ joined #perl6
02:45 noganex_ joined #perl6
02:54 Ben_Goldberg joined #perl6
03:23 dj_goku joined #perl6
03:23 dj_goku joined #perl6
03:34 skids m: my $f = Channel.new; start { react { whenever $f { .say; $f.close; } }; "done".say }; sleep 1; $f.send(42); sleep 1;'
03:34 camelia rakudo-moar 6a8278: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in single quotes; couldn't find final "'" ␤at <tmp>:1␤------> 3".say }; sleep 1; $f.send(42); sleep 1;'7⏏5<EOL>␤    expecting any of:␤        single quotes␤        …»
03:34 skids m: my $f = Channel.new; start { react { whenever $f { .say; $f.close; } }; "done".say }; sleep 1; $f.send(42); sleep 1;
03:34 camelia rakudo-moar 6a8278: OUTPUT«42␤done␤»
03:34 skids m: my $f = Channel.new; my $g = Channel.new; start { react { whenever $f { .say; $g.close; }; whenever $g { .say } }; "done".say }; sleep 1; $f.send(42); $g.send(1); sleep 1;
03:34 camelia rakudo-moar 6a8278: OUTPUT«42␤1␤»
03:46 dj_goku anyone else noticing a lot of fuzzy testing lately?
03:47 dj_goku I think I have seen 3-4 posts on reddit/hacker news about people fuzzing an app or language.
03:48 timotimo http://hack.p6c.org/~timo/ :P
03:51 dj_goku lol nice
03:52 dj_goku timotimo: prior to the recent trend
03:52 timotimo oh, yes
03:52 timotimo that's true
03:52 dj_goku timotimo: is there a reason this isn't done periodically?
03:52 dj_goku btw all I see is numbers not sure what it all means.
03:53 timotimo hehe
03:53 timotimo yeah, it doesn't mean terribly much
03:53 timotimo if i really "meant it", i'd write a custom harness that makes it unnecessary to launch a full moar process for each single test case
03:54 timotimo also, this fuzzing is only for loading (and other fuzzing runs for running) .moarvm files
03:54 timotimo with a start-up time of about 0.1 seconds, it's kind of hard to fuzz rakudo with strings for programs
03:54 timotimo though perhaps i'll give that a try some time :D
03:56 dj_goku :D
04:03 Xliff joined #perl6
04:04 timotimo here's something mildly interesting
04:04 timotimo bind_key is somewhat expensive during startup
04:05 timotimo (from MVMHash)
04:05 timotimo 28 strings have more than 100 occurences during startup
04:06 timotimo the "long tail" after that is 5389 different strings
04:06 timotimo 1778 of those only occur once
04:07 timotimo now, it doesn't seem like we're storing the hash code in a string object after calculating it
04:08 bjz joined #perl6
04:08 dj_goku all greek to me. :D
04:10 timotimo oh, huh
04:10 Cabanossi joined #perl6
04:11 timotimo seems like perhaps we *are* using the cached hash code ... somehow
04:12 timotimo but we're not using the hash code for MVMHash ?!?
04:24 DrForr_ joined #perl6
04:26 timotimo callgrind seems to think we spend most of our time allocating bits of memory through malloc, then deserialization (first place being serialization_read_int, second place being serialization_read_ref), then validating static frames, then binding data to hash keys, then doing running in the interpreter itself, then allocating stuff in the old generation, then allocating stuff in the garbage collector "in
04:26 timotimo general", then more validation of bytecode, then more deserialization
04:27 timotimo but going by inclusive, the work_loop function (which is what does deserialization) really is a very expensive thing
04:28 timotimo even though validate_static_frame is one of the more expensive functions "self"-wise, it's very low in the ranking when it comes to inclusive timings
04:29 pierre_ joined #perl6
04:33 MasterDuke timotimo: have you ever re-run your coverage report?
04:39 mempko joined #perl6
04:40 timotimo not recently. i'm farther past bedtime than i've been in many, many weeks. remind me again after i've had some sleep? :)
04:41 darutoko joined #perl6
04:42 MasterDuke will do. and speaking of coverage and fuzzing and such, has anybody seen if coverity or pvs-studio will do a free analysis of MoarVM? they've done a bunch of other open-source stuff projects (e.g., WINE, Libre Office)
04:45 ufobat joined #perl6
04:51 cyphase joined #perl6
04:53 NlkIoUxhGD joined #perl6
04:58 setty1 joined #perl6
05:16 nadim joined #perl6
05:36 firstdayonthejob joined #perl6
05:43 uDMCIOLLth joined #perl6
05:55 jambun left #perl6
06:01 timotimo MasterDuke: irclog search reveals that we've had a few changes in moar due to coverity scans already
06:02 domidumont joined #perl6
06:02 timotimo moritz: requesting support for "literal" matches; i can't search for "coverity" in #perl6
06:02 timotimo moritz: because it finds everything that has "cover" in it, apparently
06:03 timotimo MasterDuke: https://github.com/MoarVM/MoarVM/commit/688eecdd22 - example
06:07 domidumont joined #perl6
06:17 timotimo .tell [ptc] were you the one who got coverity for moarvm?
06:17 yoleaux timotimo: I'll pass your message to [ptc].
06:18 firstdayonthejob joined #perl6
06:20 timotimo MasterDuke: https://scan.coverity.com/pr​ojects/paultcochrane-moarvm
06:21 timotimo last analyzed was sep 02 2015, but i guess you can just hit the "add me to project" button if you want to put a new scan up, MasterDuke?
06:24 CIAvash joined #perl6
06:28 wamba joined #perl6
06:33 rindolf joined #perl6
06:37 benjikins joined #perl6
06:44 nadim joined #perl6
06:52 ufobat what does the * in '... method new($x){ self.bless(*, :$x)} ...' mean?
06:52 timotimo it means your code is out of date and needs you to remove the "*, " from it :)
06:53 ufobat and what did it mean? :)
06:53 benjikins How do I check if a string contains any element in an array
06:53 benjikins in the shortest possible way
06:53 timotimo it meant nothing
06:53 ufobat yay :D
06:53 timotimo benjikins: you can try $mystring.contains(any(@foobar))
06:53 benjikins I didn't realize I could use any that way
06:53 benjikins thank you
06:53 timotimo m: my @pieces = <hello world how are you>; say "oh well this is weird".contains(any(@pieces))
06:53 camelia rakudo-moar 6a8278: OUTPUT«any(False, False, False, False, False)␤»
06:53 timotimo m: my @pieces = <hello world how are you>; say so "oh well this is weird".contains(any(@pieces))
06:53 camelia rakudo-moar 6a8278: OUTPUT«False␤»
06:54 timotimo m: my @pieces = <hello world how are you>; say so "oh well this is world".contains(any(@pieces))
06:54 camelia rakudo-moar 6a8278: OUTPUT«True␤»
06:54 timotimo m: my @pieces = <hello world how are you>; say "oh well this is world".contains(any(@pieces))
06:54 camelia rakudo-moar 6a8278: OUTPUT«any(False, True, False, False, False)␤»
06:54 timotimo junctions are cool that way.
06:58 aindilis joined #perl6
07:07 leont joined #perl6
07:10 [particle]1 joined #perl6
07:11 sQuEE joined #perl6
07:11 aindilis` joined #perl6
07:11 peteretep_ joined #perl6
07:12 Ulti_ joined #perl6
07:13 Jonis_ joined #perl6
07:14 nemo_ joined #perl6
07:14 ranguard_ joined #perl6
07:14 rudi_s_ joined #perl6
07:14 bonsaikitten joined #perl6
07:14 zoosha_ joined #perl6
07:14 mr-fooba_ joined #perl6
07:14 luis` joined #perl6
07:14 El_Che_ joined #perl6
07:14 erdic_ joined #perl6
07:15 ribasushi_ joined #perl6
07:16 bitmap_ joined #perl6
07:17 shadowpaste joined #perl6
07:18 raydiak joined #perl6
07:18 bhm joined #perl6
07:18 konobi joined #perl6
07:19 markk joined #perl6
07:19 faubi joined #perl6
07:19 cgfbee joined #perl6
07:21 sergot joined #perl6
07:22 RabidGravy joined #perl6
07:24 krunen joined #perl6
07:25 smls joined #perl6
07:26 smls m: say "aaa {("bbb" for ^3)} ccc"
07:26 yoleaux 26 Aug 2016 21:58Z <tbrowder> smls: thanks! the "+$0" did the trick
07:26 camelia rakudo-moar 6a8278: OUTPUT«aaa bbb bbb bbb ccc␤»
07:26 smls m: say "aaa {"bbb" for ^3} ccc"
07:26 camelia rakudo-moar 6a8278: OUTPUT«Use of Nil in string context  in block <unit> at <tmp> line 1␤aaa  ccc␤»
07:26 smls ^^ Why does the for loop not return a value without parens there?
07:27 smls m: say "aaa {"bbb" if 1} ccc"
07:27 camelia rakudo-moar 6a8278: OUTPUT«aaa bbb ccc␤»
07:27 smls ^^ works for `if` but not `for`
07:30 TimToady loops at statementlist level are autosunk because people don't expect them to suddenly be lazy
07:30 yoleaux 25 Aug 2016 11:10Z <ab6tract> TimToady: do you by any chance have the notes for your ballistic programming talk(s) online?
07:31 smls TimToady: Ah, so {} in strings is statement-list context like a sub
07:31 TimToady m: say "aaa {do "bbb" for ^3} ccc"
07:31 camelia rakudo-moar 6a8278: OUTPUT«aaa bbb bbb bbb ccc␤»
07:31 canopus joined #perl6
07:31 TimToady do also works
07:32 smls oh, didn't know one could `do` a statement modifier
07:32 TimToady it's just a block, so there's a sequence of statements expected
07:32 TimToady do is a statement prefix
07:32 TimToady and modifier is part of a statement
07:33 TimToady it actually parses do ("bbb" for ^3)
07:46 smls TimToady: In the case of {} in strings, it wouldn't make the loop lazy though
07:47 labster joined #perl6
07:47 smls as it is immediately stringified
07:48 smls and I don't thing there's a use-case where you'd *want* to interpolate Nil into a string, as it just throws a warning
07:55 edehont joined #perl6
07:59 gfldex joined #perl6
08:00 espadrine joined #perl6
08:03 xtt joined #perl6
08:07 leont joined #perl6
08:09 moritz \o
08:09 timotimo o/ moritz
08:09 timotimo i highlighted you instead of .tell; is that okay?
08:11 moritz timotimo: it's OK; an issue on http://github.com/moritz/ilbot/issues would have been even better :-)
08:11 timotimo ah, i didn't realize the ilbot repo would also be the right spot for the html pages
08:11 smls Does anyone know a "try Perl 6 online" thing that runs Perl 6.c?
08:12 smls https://ideone.com runs ancient parrot-based rakudo
08:12 timotimo did you see the pull request MasterDuke made to your ilbot repo?
08:12 moritz timotimo: the problem is that the search index I use goes through a stemmer, so a substring search on unstemmed words isn't easily possible
08:12 smls http://dev.perltuts.com/try runs 2015.11
08:12 timotimo there's the thing that perl6.party uses, but i forgot its name
08:12 moritz timotimo: I'd have to maintain a second search index
08:13 moritz timotimo: yes, https://github.com/moritz/ilbot/issues/47 has the discussion
08:14 timotimo i didn't see it
08:14 timotimo MasterDuke: seems like a simple fix ought to be possible to make that pull request mergable
08:15 timotimo smls: https://glot.io/ - that one supports perl6 and has a new-ish version available
08:15 smls thanks
08:15 timotimo a 2016.04 moar rakudo
08:42 Woodi open source vs lawyers approach in Linux from yesterday: https://lists.linuxfoundation.org/pipermai​l/ksummit-discuss/2016-August/003580.html
08:42 mvorg joined #perl6
08:43 Woodi looks open source is a not bit like traditional academia :)
08:49 Woodi btw. SSE4.2 have "Four string/text processing instructions providin
08:49 Woodi ...g a rich set of primitives"
08:50 Woodi ...for eg. XML parsing in few CPU instructions ? :)
09:03 ufobat joined #perl6
09:25 kjs_ joined #perl6
09:30 dataangel left #perl6
09:32 pecastro joined #perl6
10:00 telex joined #perl6
10:00 Ven joined #perl6
10:33 pierre_ joined #perl6
10:33 rindolf joined #perl6
10:41 mcmillhj joined #perl6
10:47 pierre_ joined #perl6
11:11 dalek joined #perl6
11:13 timotimo MasterDuke: the coverity scans are only up to date because i just submitted a new scan :)
11:14 MasterDuke oh, ha
11:15 MasterDuke nice it was that easy
11:17 timotimo well, yeah. just had to ping [ptc] so he could add me to the project
11:18 MasterDuke also, moritz++ cherry-picked the second commit in my ilbot PR. i'm still trying to find a better modification to the regex than my first commit that doesn't blow it up to an absurd size
11:20 ufobat joined #perl6
11:21 timotimo [ptc]: did you realize that "ptc" could also be short for "pretty cool"?
11:22 [ptc] timotimo: hehe :-)
11:22 yoleaux 06:17Z <timotimo> [ptc]: were you the one who got coverity for moarvm?
11:23 timotimo %)
11:23 mcmillhj joined #perl6
11:24 iH2O joined #perl6
11:25 MasterDuke timotimo: since evidence suggests you're awake now, this is me reminding you to re-run your coverage report
11:25 timotimo oh
11:41 iH2O left #perl6
11:45 domm what would I use to get something like Term::ReadKey ReadMode 2 in Perl 6 (i.e. a prompt without echo, eg for passwords)?
11:45 domm oh, and greetings from the train from Budapest to Vienna
11:47 mst domm: this is probably not the right answer, but due to ReadKeybeing XS, when writing fatpackable code I just do system('stty -echo'); ... system('stty echo');
11:47 mst so you can always stick that in with a '# blame mst' and replace it with the right answer when somebody provides it
11:47 antipsychiatry joined #perl6
11:48 gfldex domm: see https://gist.github.com/gfldex/7​d716436aa88c8261734bfabd7106c3d
11:48 gfldex mst: right answer ^^^ :)
11:49 mst \o/
11:49 kurahaupo joined #perl6
11:49 mcmillhj joined #perl6
11:49 gfldex domm: please note that '/dev/tty' may prove difficult on windows
11:50 timotimo gfldex: if you had a supply block there, you could have a phaser for when the supply gets closed, so that the "max" logic could wander into the whenever! :)
11:50 timotimo but the ENTER and LEAVE is nice, too
11:50 domm thx
11:50 mst wow but Term::termios has a bizarre calling convention
11:50 domm it's a private tool I use, so /dev/tty is no problem
11:51 gfldex mst: it surely does
11:51 gfldex it's a fairly thin layer on the c-stuff that shows its age
11:52 mst the C calling convention for getattr() and setattr() is not bizarre, just old-school C
11:52 mst I'm perfectly familiar with this
11:52 timotimo time to build Term::termios:api<2> :)
11:52 mst it's the way it's been translated that's making my eyes cross ;)
11:53 gfldex CLI::Promt::Password may actually what most ppl look for
11:55 domm I can try to implement CLI::Prompt::Password, but probably only next week (at Alpine Perl, with the help of Liz and nine)
11:57 mst I'm guessing by the way gfldex said that that there is one somewhere?
11:59 gfldex there is https://github.com/titsuki/p6-Terminal-Readsecret what comes with a dep. to readsecret. No idea if that is portable.
12:01 mst ah, ok
12:01 domm good enough for me for now
12:03 Ven joined #perl6
12:05 domm another question: how can I convert a Buf (as returned by Digest::MD5.md5_buf) into an Int?
12:07 mst can you not .Hex.Int it or something?
12:07 domm reason: I calc a md5-sum (actually I'd prefer SHA1, but could not find it), convert the first few bytes to int, and seed the random number generator with that
12:07 cpage_ joined #perl6
12:07 domm mst: I tried, but was offline and did not get any results
12:07 domm But not sure if i tried .Hex.Int
12:08 mst I may bbe imagining it
12:08 domm Method 'Hex' not found for invocant of class 'Buf'
12:08 mst but it seems like you're trying to go buf -> hex -> int
12:09 MasterDuke the docs suggest 'use experimental :pack;' and then the unpack method
12:09 domm .Int returns the number of bytes in the buffer
12:09 domm MasterDuke: ok, thanks, I'll try that
12:09 domm (as I said I was offline and could only grep the source/docs for stuff, and google > grep)
12:12 domm nice, this works
12:12 domm and it seems that my offline docs are rather old..
12:19 MasterDuke the docs have seen a lot of action the last couple months: https://github.com/perl6/d​oc/graphs/commit-activity
12:28 jameslenz joined #perl6
12:33 domm use experimental :pack; use Digest::MD5; my  $d = Digest::MD5.new;  $d.md5_buf(<"The","European","Perl","C​onference">).unpack("CCCCCC").reduce: * ~ *
12:34 domm not exactly what I'm doing, but it works - thanks!
12:35 domm ah, and one last questions: how can do the folling Perl 5 code in 6
12:35 domm sub foo { say "foo" }; my $name = 'foo'; $foo->(); &$foo;
12:36 domm ah, soory
12:36 domm sub foo { say "foo" }; my $name = 'foo'; $name->(); &$name;
12:37 mcmillhj joined #perl6
12:37 domm perl -E 'sub foo { say shift }; my $name = "foo"; $name->("A"); &$name("B")'
12:40 dalek modules.perl6.org: 1d2db63 | (Tom Browder)++ | templates/root/index.html.ep:
12:40 dalek modules.perl6.org: correct grammar
12:40 dalek modules.perl6.org: review: https://github.com/perl6/modul​es.perl6.org/commit/1d2db6388e
12:48 dalek perl6-most-wanted: 8501b88 | (Tom Browder)++ | most-wanted/modules.md:
12:48 dalek perl6-most-wanted: add new module WIP
12:48 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/8501b883d1
12:50 dalek perl6-most-wanted: 559712a | (Tom Browder)++ | most-wanted/modules.md:
12:50 dalek perl6-most-wanted: fix typo
12:50 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/559712a74b
12:52 mra90 joined #perl6
12:53 mra90 left #perl6
12:57 MasterDuke m: class A { method foo { say "foo" } }; my $name = "foo"; A."$name"()
12:57 camelia rakudo-moar 6a8278: OUTPUT«foo␤»
12:57 MasterDuke domm: ^^^ for methods at least
13:02 tbrowder ref modules: I've been trying to use Digest::xxHash, which uses naticecast, and see that somehow p6 translates uint64 into a bigint. how can we preserve the unsignedness in p6?
13:04 gfldex m: sub foo(){ 'oi!' }; my $foo = '&foo'; say ::($foo).();
13:04 camelia rakudo-moar 6a8278: OUTPUT«oi!␤»
13:04 gfldex domm: ^^^
13:04 gfldex m: sub foo(){ 'oi!' }; my $foo = '&foo'; say ::($foo)();
13:04 camelia rakudo-moar 6a8278: OUTPUT«oi!␤»
13:06 MasterDuke m: sub foo(){ 'oi!' }; my $foo = 'foo'; say ::("&$foo")();
13:06 camelia rakudo-moar 6a8278: OUTPUT«oi!␤»
13:11 MasterDuke tbrowder: there are a couple tickets (e.g., RT #124294, RT #127210, RT #127144) about uint types, it looks like they aren't quite working as people expect
13:11 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124294
13:11 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=127210
13:11 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=127144
13:13 masak hi, #perl6
13:22 domm gfldex: thanks, again
13:30 pierre_ m: say "Bonjour!"
13:30 camelia rakudo-moar 6a8278: OUTPUT«Bonjour!␤»
13:31 pierre_ i have a small misunderstanding with defined
13:31 pierre_ and Nil, or any
13:31 pierre_ m: say Nil.defined
13:31 camelia rakudo-moar 6a8278: OUTPUT«False␤»
13:31 pierre_ Nil is not defined, which is expected
13:31 pierre_ however, if i use Nil as a key in a hash, and then
13:31 pierre_ let me show
13:32 MilkmanDan joined #perl6
13:32 pierre_ m: my %h = Nil => 'should not be defined'; for %h.kv -> $k, $v { say $k;say $k.defined; }
13:32 camelia rakudo-moar 6a8278: OUTPUT«Nil␤True␤»
13:32 pierre_ is that normal ?
13:32 gfldex pierre_: Nil is not _the_ undefined value. Using Nil by hand will almost always result in bugs.
13:33 gfldex see: https://docs.perl6.org/type/Nil and https://docs.perl6.org/langu​age/typesystem#Undefinedness
13:33 pierre_ yes,, i do not plan to use Nil
13:33 pierre_ it's for a test case
13:33 wphtech joined #perl6
13:33 jnthn I think the confusion here though is that some-identifier => blah will auto-quote the left hand side as a string
13:33 jnthn m: say (Nil => 'what').perl
13:33 camelia rakudo-moar 6a8278: OUTPUT«:Nil("what")␤»
13:33 pierre_ i have a function, that i want to test against several values
13:34 gfldex my %h = Nil => 'should not be defined'; dd %h;
13:34 jnthn m: say (Nil => 'what').key.WHAT
13:34 camelia rakudo-moar 6a8278: OUTPUT«(Str)␤»
13:34 gfldex m: my %h = Nil => 'should not be defined'; dd %h;
13:34 camelia rakudo-moar 6a8278: OUTPUT«Hash %h = {:Nil("should not be defined")}␤»
13:34 pierre_ oh, :)
13:34 pierre_ make sense
13:34 gfldex m: my %h{Any} = Nil => 'should not be defined'; dd %h;
13:34 camelia rakudo-moar 6a8278: OUTPUT«Hash[Any,Any] %h = (my Any %{Any} = :Nil("should not be defined"))␤»
13:34 pierre_ so if i want to store
13:34 gfldex m: my %h{Any}; %h{Nil}= 'should not be defined'; dd %h;
13:35 camelia rakudo-moar 6a8278: OUTPUT«Hash[Any,Any] %h = (my Any %{Any} = (Nil) => "should not be defined")␤»
13:35 gfldex m: my %h{Any}; %h{Nil}= 'should not be defined'; %h.keys.say
13:35 camelia rakudo-moar 6a8278: OUTPUT«(Nil)␤»
13:35 gfldex m: my %h{Any}; %h{Nil}= 'should not be defined'; %h.keys.put
13:35 camelia rakudo-moar 6a8278: OUTPUT«Use of Nil in string context  in block <unit> at <tmp> line 1␤␤»
13:35 pierre_ right
13:35 pierre_ pair is auto quoting
13:36 pierre_ just for the context, here is what i wanted to do
13:38 pierre_ m: sub f( Any $obj) { return 'undef' unless $obj.defined; return 'true' if $obj == True; return 'false';} ; my %h = True => 'true', False => 'false', Nil => 'undef';
13:38 camelia rakudo-moar 6a8278: ( no output )
13:39 pierre_ and use %h to run my tests, by adding entries there
13:41 TheGrimFandango joined #perl6
13:41 TheGrimFandango hi
13:41 pierre_ i will then use an array and take element 2 by 2
13:42 pierre_ m: my @a = Nil, 'should be undef'; for @a -> $k, $v { say $k.defined }
13:42 camelia rakudo-moar 6a8278: OUTPUT«False␤»
13:42 pierre_ Hi
13:42 gfldex if you want to hand Nil around like that you will have to use binding
13:43 pierre_ really, it's just in one test case
13:43 pierre_ ok, i think the correct solution
13:43 pierre_ i'll wirte a separate test for Nil :)
13:43 gfldex m: my Int $i is default(1); say $i; $i = Nil; say $i.defined;
13:43 camelia rakudo-moar 6a8278: OUTPUT«1␤True␤»
13:43 pierre_ and not use a hash
13:44 pierre_ actually, in my test, i'm using Any, not Nil
13:44 pierre_ but should be the same, no?
13:44 gfldex not at all
13:44 pierre_ just to check defineness
13:44 pierre_ not to use it
13:45 gfldex you can use Mu if you need to differentiate between Any and "some undefined value"
13:45 pierre_ m: my $undef; my %h = $undef => 'not defined'; for %h.kv -> $k, $v { say $k.defined }
13:45 camelia rakudo-moar 6a8278: OUTPUT«Use of uninitialized value of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.  in block <unit> at <tmp> line 1␤True␤»
13:46 MasterDuke timotimo: btw, wasn't there some functionality missing in parse_coverage_report.p6 that i said i'd add?
13:52 araujo_ joined #perl6
13:55 tbrowder .tell MasterDuke thanks!
13:55 yoleaux tbrowder: I'll pass your message to MasterDuke.
14:03 araujo__ joined #perl6
14:05 buggable joined #perl6
14:07 skink joined #perl6
14:10 skids joined #perl6
14:12 tbrowder jnthn: any plans to work on uint64 issues in near future?
14:24 tbrowder m: my $undef; say $undef.defined
14:24 camelia rakudo-moar 6a8278: OUTPUT«False␤»
14:25 tbrowder m: my $u = 1; say $u; $
14:25 camelia rakudo-moar 6a8278: OUTPUT«WARNINGS for <tmp>:␤Useless use of unnamed $ variable in sink context (line 1)␤1␤»
14:26 tbrowder m: my $u = 1; say $u; $u = Nil; say $u
14:26 camelia rakudo-moar 6a8278: OUTPUT«1␤(Any)␤»
14:28 tbrowder m: my $u = 1; $u = Mu; say $u
14:28 camelia rakudo-moar 6a8278: OUTPUT«(Mu)␤»
14:29 tbrowder m: my $u = Mu; say $u.defined
14:29 camelia rakudo-moar 6a8278: OUTPUT«False␤»
14:30 tbrowder m: my $u = Any; say $u.defined
14:30 camelia rakudo-moar 6a8278: OUTPUT«False␤»
14:30 mr-fooba_ is there any guide to get started with perl6 on js ?
14:32 RabidGravy joined #perl6
14:33 tbrowder m: my $u = Nil; say $u.defined
14:33 camelia rakudo-moar 6a8278: OUTPUT«False␤»
14:34 tbrowder so it looks to me that one can set a previously defined var to Mu, Any, or Nil to undefine it, no?
14:34 espadrine joined #perl6
14:35 moritz not really
14:35 moritz m: my Int $x = 42; $x = Any
14:35 camelia rakudo-moar 6a8278: OUTPUT«Type check failed in assignment to $x; expected Int but got Any (Any)␤  in block <unit> at <tmp> line 1␤␤»
14:35 moritz m: my Int $x = 42; $x = Nil; say $x.perl
14:35 camelia rakudo-moar 6a8278: OUTPUT«Int␤»
14:36 tbrowder m: my $u = 1; $u = Nil
14:36 camelia rakudo-moar 6a8278: ( no output )
14:37 ugexe ...
14:38 ugexe m: say Nil ~~ Any
14:38 camelia rakudo-moar 6a8278: OUTPUT«True␤»
14:38 tbrowder m: my $u = 6; say $u.defined; $u = Nil; say $u.defined
14:38 camelia rakudo-moar 6a8278: OUTPUT«True␤False␤»
14:39 tbrowder it looks like, if one doesn't explicitly type a defined var, then assigning Nil to it undefines it
14:40 ugexe or stores the value which may or may not be undefined
14:41 tbrowder ??
14:41 geekosaur I think they dropped a word. Nil stores the default value
14:42 geekosaur m: my Int $v is default(6); $v = 10; say $v; $v = Nil; $v.say
14:42 camelia rakudo-moar 6a8278: OUTPUT«10␤6␤»
14:42 tbrowder i'm just interested in ensuring a previously defined var can be forced to become undefined
14:43 tbrowder is there a best-practice way to do that?
14:44 geekosaur m: my Int $v is default(6); $v = 10; say $v; $v = Int; say $v.defined
14:44 camelia rakudo-moar 6a8278: OUTPUT«10␤False␤»
14:46 tbrowder m: my $u = 4; if $u say 'def'; $u = Nil; if !$u say 'undef or false'
14:46 camelia rakudo-moar 6a8278: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3my $u = 4; if $u7⏏5 say 'def'; $u = Nil; if !$u say 'undef ␤    expecting any of:␤        block or pointy block␤        infix␤        infix stopper␤»
14:46 ugexe my $x is default(1); say $x; $x = Nil:U; say $x.defined; say $x.WHAT
14:46 ugexe m: my $x is default(1); say $x; $x = Nil:U; say $x.defined; say $x.WHAT
14:46 camelia rakudo-moar 6a8278: OUTPUT«1␤False␤Nil␤»
14:47 ugexe gets around Nil setting default value of 1 which would be defined
14:48 mcmillhj joined #perl6
14:49 tbrowder i don't see a practical difference for my typical use case
14:49 tbrowder let me try the last case again co
14:51 ugexe if you want to ignore `is default` and any 3rd party who may set that trait, then no there is no difference
14:51 tbrowder m: my $x = 't'; say $x; say 'true' if defined $x
14:51 camelia rakudo-moar 6a8278: OUTPUT«t␤true␤»
14:52 tbrowder okay, thanks, i guess i just don't understand meta programming!!
14:52 geekosaur um
14:52 geekosaur are you confusing/conflating defined with existence?
14:53 geekosaur (because I see no metaprogramming here)
14:53 tbrowder too deep for my simple needs
15:07 mcmillhj joined #perl6
15:07 pecastro joined #perl6
15:10 pierre_ m: Blob.new( 65535.base(16).comb(2).map( {:16($_)} ) ).say
15:10 camelia rakudo-moar 6a8278: OUTPUT«Blob:0x<ff ff>␤»
15:10 pierre_ any shortcut to go from 65535 to Blob 0x<ff ff>
15:11 pierre_ my solution looks a bit too much :)
15:14 khw joined #perl6
15:16 zacts joined #perl6
15:17 mcmillhj joined #perl6
15:25 pierre_ Blob.new( 65535 )
15:25 pierre_ m: Blob.new( 65535 )
15:25 camelia rakudo-moar 6a8278: ( no output )
15:25 pierre_ m: Blob.new( 65535 ).say
15:25 camelia rakudo-moar 6a8278: OUTPUT«Blob:0x<ff>␤»
15:30 ugexe m: say Blob.new(65535 xx 2)
15:30 camelia rakudo-moar 6a8278: OUTPUT«Blob:0x<ff ff>␤»
15:30 pierre_ and my solution is broken on top of that
15:30 pierre_ m: 65539.base(16).comb(2)
15:30 camelia rakudo-moar 6a8278: ( no output )
15:30 pierre_ m: 65539.base(16).comb(2).say
15:30 camelia rakudo-moar 6a8278: OUTPUT«(10 00 3)␤»
15:30 pierre_ hum, interesting, with xx
15:31 geekosaur that doesn't actually work
15:31 geekosaur it's truncating the top byte of 65535 to get 255 and putting that in the Buf
15:31 pierre_ oh right :)
15:32 pierre_ it's doing Blob.new( 65535, 65535)
15:32 rudolfochrist joined #perl6
15:39 cyphase joined #perl6
15:41 pierre_ m: pack 'n', 65535
15:41 camelia rakudo-moar 6a8278: OUTPUT«Use of the 'pack' function is experimental; please 'use experimental :pack'␤  in block <unit> at <tmp> line 1␤␤»
15:42 mcmillhj joined #perl6
15:42 pierre_ m: 'use experimental :pack; pack('n', 65535).say
15:42 camelia rakudo-moar 6a8278: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3'use experimental :pack; pack('7⏏5n', 65535).say␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement m…»
15:44 pierre_ m: use experimental :pack; pack( 'n', 65535 ).say
15:44 camelia rakudo-moar 6a8278: OUTPUT«Buf:0x<ff ff>␤»
15:44 pierre_ experimental, but that would work
15:45 wamba joined #perl6
15:47 ufobat joined #perl6
15:54 zacts hi perl6 nerds
15:54 grondilu pack is one of the first function I've delved deeply into while learning perl.   I'm surprised it's experimental in Perl 6.
15:54 grondilu zacts: hi
15:55 zacts joined #perl6
15:57 AlexDaniel grondilu: perhaps you can help? :)
15:58 AlexDaniel trying to find previous discussions on this topic. Here is the pull request that made it experimental: https://github.com/rakudo/rakudo/pull/649
16:00 grondilu well, as written:  "There is currently no language specification for pack and unpack."
16:01 grondilu I vaguely recall discussing it long time ago with maybe jnthn or moritz.  Seemed that they were not very happy with just copying how Perl 5 does it.  Maybe they wanted a slang for the packing specification language or something.
16:02 AlexDaniel https://github.com/lizmat/PackUnpack
16:03 domidumont joined #perl6
16:14 pecastro joined #perl6
16:15 mcmillhj joined #perl6
16:21 domidumont joined #perl6
16:26 iH2O joined #perl6
16:26 moritz grondilu: the real problem is that with Perl 6, you typically want to deal not just with primitives, but with ojbects
16:26 mcmillhj joined #perl6
16:26 moritz grondilu: so a pack or unpack that doesn't work with user-defined classes is very short-sighed
16:27 moritz also, Perl 6 distiniguishes between Str and Buf, which makes some things more complicated
16:27 grondilu well to pack a string you'd have to encode it first, no?
16:31 cdg joined #perl6
16:37 kaare_ joined #perl6
16:39 iH2O left #perl6
16:43 mohae joined #perl6
16:43 grondilu (though encoding and packing are arguably the same thing, IDK)
16:44 mcmillhj joined #perl6
16:46 Ven joined #perl6
16:55 dalek doc: fdb41ec | titsuki++ | doc/Type/Pair.pod6:
16:55 dalek doc: Fix Pair examples
16:55 dalek doc: review: https://github.com/perl6/doc/commit/fdb41ec06a
16:55 dalek doc: 4357ca3 | titsuki++ | doc/Type/Pair.pod6:
16:55 dalek doc: Merge pull request #865 from titsuki/fix-pair
16:55 dalek doc:
16:55 dalek doc: Fix Pair examples
16:55 dalek doc: review: https://github.com/perl6/doc/commit/4357ca308e
17:01 mcmillhj joined #perl6
17:07 Ben_Goldberg joined #perl6
17:11 zacts joined #perl6
17:16 mohae_ joined #perl6
17:22 pecastro joined #perl6
17:22 cdg_ joined #perl6
17:30 cdg joined #perl6
17:46 gfldex joined #perl6
17:59 tbrowder is there any difference between a hash and a map?
18:02 tbrowder the reason i ask is that the docs on hash are a bit confusing for noobs, and there is no topic on hashes in Language that i see (kind of a part of Sets, Bags, etc.)
18:02 geekosaur the types document notes that Map is immutable
18:02 mayuresh joined #perl6
18:03 tbrowder also, the bits on hash don't consistently use the % sigil which is very confusing the way it's written
18:07 gfldex tbrowder: the sigils table in /language/variables should link to Hash (and the other types) but table rendering isn't there yet
18:13 cdg joined #perl6
18:14 pecastro joined #perl6
18:21 eythian joined #perl6
18:21 zacts_pi joined #perl6
18:26 eythian is there an equivalent of Proc::Daemon for p6, or a nice way to have a program daemonise itself?
18:45 El_Che_ run it with & and use one of the concurrency constructs?
18:47 pierre_ joined #perl6
18:47 timotimo El_Che: running with & is very much not daemonizing
18:51 eythian yeah, the thing I'm writing I'd like to be a real daemon.
18:53 timotimo use systemd :)
18:53 timotimo or any of those tools that do that stuff for you, really
18:53 mst eythian: Daemon::Control
18:54 mst eythian: is a perl5 module that will happily daemonize a perl6 program
18:54 mst or you could use runit or s6 or similar
18:54 eythian thanks
18:54 mst what are you trying to daemonize *for* is the question
18:54 eythian (I'm porting an old perl5 script to p6 as a learning exercise.)
18:55 mst timotimo: ok, but for those of us running actual unix ... :)
18:55 mst Proc::Daemon is shit and broken anyway
18:55 mst so you don't want to port that part
18:55 timotimo there's at least a hundred tools that will daemonize your stuff, just like systemd would
18:55 mst systemd doesn't actually daemonize things at all
18:55 timotimo well, systemd will control & own your tty instead of throwing it out
18:55 mst it runs services without daemonization
18:55 timotimo but at that point ... what's the difference?
18:55 eythian well, it's a process that runs and every minute checks for an update to some data, and if that's changed, does some stuff in response.
18:56 mst eythian: ok, so I would just run that under runit or s6
18:56 mst (which are newer daemontoolsish things)
18:56 mst whereas systemd is that, plus a broken dependency resolution system, plus a broken logging system, plus hentacles :D
18:56 timotimo when you get your stdout and stderr directly pushed into the journal, that's a nice feature that you can use. with a daemon, you don't really get stdout or stderr at all
18:56 mst timotimo: if you believe that, you don't know how to write a unix service.
18:56 timotimo broken dependency resolution system? were you thinking of upstart maybe?
18:57 eythian yeah, so I'm going to be running this on a debian platform and not willing to replace the init system :)
18:57 mst timotimo: no. systemd allows loops and picks a dependency at random to ignore, thereby resulting in systems that boot or don't boot at random
18:57 timotimo mst: well, you can surely output to stdout and stderr, but it just goes nowhere, because you specifically made sure to make them not connected to anything ... which is half of the point of daemonizing, isn't it?
18:57 timotimo wow, that seems clever
18:58 timotimo though perhaps with a loop you're really declaring you want systemd to do that thing for you?
18:58 El_Che timotimo: well, just use an initd script or systemd? I don't think that logic should be in the script itself
18:58 El_Che timotimo: it's just infrastructure
18:58 mst timotimo: no, daemonizing is about getting your own process group and detaching from the terminal - commonly you'd re-open STDOUT/STDERR as a pipe to syslog or whatever
18:58 mst if you want stdout/stderr
18:58 timotimo to me, that's far enough from "regular stdout/stderr" to not count :)
18:59 mst timotimo: er. but systemd does exactly the same thing.
18:59 mst it's just it re-opens them for you
18:59 timotimo that's like saying "bash allows you to pipe the output of any program to any target. you just have to compile the path you want the data to go into into your program every time before you run it"
18:59 mst ...
18:59 timotimo "yeah, you get stdout and stderr. you just have to manually open them to some specific path or pipe!"
19:00 mst yeah, and systemd opens them to some specific binary thing
19:00 mst that has a habit of losing messages during early boot
19:00 mst good luck if you have a kernel problem
19:00 mst I can make systemd do what I need it to
19:00 timotimo i thought journald was made specifically so you get all the early boot messages, too? instead of losing them?
19:00 mst no. journald specifically loses them.
19:00 timotimo haha, that's not good :)
19:01 mst because it doesn't always manage to come up in time, so then it has a fixed size buffer
19:01 mst and if you exceed that, sucks to be you
19:01 timotimo i never knew of those flaws
19:01 mst it's amateur hour all the way down
19:01 mst they also added a default setting where if you ssh into your postgres user, on logout it kills the database
19:02 mst because it does a bunch of brute force cleanup of running IPC stuff ... because gnome doesn't clean up reliably
19:02 masak moritz: is https://github.com/moritz/json under any kind of license?
19:02 timotimo yeah, i'm not a fan of that default. luckily distros will gladly kill that default with fire
19:02 masak moritz: (I just assumed that it had a permissive LICENSE file, but now that I look at the repo, I see that it in fact has none)
19:02 timotimo i haven't heard about that brute force cleanup stuff, though
19:03 mst the brute force cleanup *is* what kills postgres
19:03 mst also, there are shipped versions of ubuntu that don't override it
19:04 mst and of course ssh is the standard way to ship WAL files for master/slave
19:04 mst so you try and replicate your database for reliability and it kills your database
19:04 mst because of a bug in gnome
19:04 mst *slowclap*
19:04 timotimo i have to get going :(
19:04 timotimo this discussion is pretty enlightening, though
19:05 mst from my POV, systemd is an excellent desktop init system
19:05 mst since it optimises for speed of boot over reliability
19:05 mst which is totally correct for that
19:06 mst but really hateful when you have a real server that takes a couple minutes to memcheck etc. before booting
19:06 ejf joined #perl6
19:06 tbrowder gfldex: thanks
19:06 mst eythian: btw, I prefer running perl5 stuff under s6 and etc. too
19:07 mst eythian: I only use Daemon::COntrol when I need an /etc/init.d script
19:08 eythian OK. I'll take that under advisement :)
19:09 mst Proc::Daemon has the POSIX::Close bug that's common in daemonizers
19:10 mst where it force closes fds at the C level
19:10 mst this can seriously confuse perl
19:10 mst (like, "your app ends up logging into its pid file" confuse)
19:10 timotimo pff, just write your daemon as "crash-only software"
19:10 timotimo perl gets confused? crash the process and have it re-started!
19:10 eythian is it the case that you can 'use Foo::Bar' with most perl5 modules and they just work?
19:11 timotimo no, you have to write :from<Perl5> in order for that to work
19:11 mst err, I suggested Daemon::Control because it can invoke *processes*
19:11 mst so you'd tell it to run 'myperl6script'
19:11 * timotimo BBL
19:11 timotimo but yeah, perl5 modules usually Just Work in perl6 when using :from<Perl5>
19:12 eythian cool, ta
19:13 mst eythian: generally I'm using perl6 for clever things
19:14 mst and then when I run into a "perl6 has had lots of CS people and no sysadmins" type problem, I wrap some perl5 around the perl6 code, shrug, and go back to writing perl6
19:14 dalek perl6-most-wanted: 149a0f2 | (Tom Browder)++ | most-wanted/modules.md:
19:14 dalek perl6-most-wanted: change module name for clarity of purpose
19:14 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/149a0f223f
19:14 eythian in this case, it's a relatively simple program, but a good excuse to learn P6 anyway. So far, the differences from p5 are breaking my head :)
19:16 mst and in this case, Proc::Daemon is a bug in the perl5 script, so there's no reason to port the bug anyway
19:16 dalek perl6-most-wanted: ebdddb7 | (Tom Browder)++ | most-wanted/modules.md:
19:16 dalek perl6-most-wanted: get the spelling correct!
19:16 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/ebdddb7fe7
19:17 masak moritz: I think since you don't have a LICENSE file in that repo, and since I copy-pasted code from it into my project, technically I'm infringing on your copyright
19:17 eythian mst: sure, it's a chance to modernise the program a bit too
19:17 mst masak: it's derived from the rakudo code isn't it? so surely it can be presumed to be under the rakudo license
19:17 masak mst: no, I think the flow was the other way around
19:17 mst I mean, there should still be a LICENSE file or whatever
19:17 mst ah
19:18 mst but, submitting it to rakudo required saying "at least this version is under the rakufdo license"
19:18 masak troo
19:18 mst so you're possibly technically infringing on his copyright for the commits that haven't been pushed to rakudo yet
19:32 domidumont joined #perl6
19:32 canopus joined #perl6
19:35 pecastro joined #perl6
19:35 harmil joined #perl6
19:47 TEttinger joined #perl6
19:49 El_Che mst: mylinux dystopia within 5 years: Linux is just systemd + powershell :)
19:49 mst El_Che: that or poettering invents a cshell variant
19:50 El_Che well, at least we'll got rid of d'icaza additions (cough*registry*cough). Combat evil by greater evil!
19:54 Ven joined #perl6
20:02 mst hm?
20:09 zacts joined #perl6
20:09 Rawriful joined #perl6
20:10 zacts joined #perl6
20:11 El_Che mst: I meant gconf, but it was probably not d'icaza but Havoc Pennington
20:12 El_Che "if you want to change an interesting setting, you need to edit a registry key" sigh
20:12 smls joined #perl6
20:12 mst I don't run gnome
20:13 timotimo El_Che: better than implementing "watch this config file for changes and re-parse" from scratch for every single application :)
20:13 El_Che timotimo: you just described my life's philosophy :)
20:15 smls m: say 6.0221415⏨23;  # What's this, Perl 6 doesn't support the Unicode decimal expoinent symbol? :P
20:15 camelia rakudo-moar 6a8278: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Bogus postfix␤at <tmp>:1␤------> 3say 6.02214157⏏5⏨23;  # What's this, Perl 6 doesn't supp␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement en…»
20:15 arnsholt timotimo: Or "mountains and mountains of envvars, which may or may not be set (to the right thing!) when you need them to"
20:16 mst timotimo: how do you get auto-watching for gconf in a gnome app then?
20:17 * mst would suspect that it's a libsomething
20:17 mst in which case surely you could have a libsomething that provides the watching+parsing
20:19 timotimo arnsholt: you definitely can't change an env var while a program is running :D
20:19 timotimo mst: i thought that's just built into the thing?
20:20 mst timotimo: what 'the thing' are you referring to?
20:20 timotimo i might be imagining things again
20:20 timotimo the gconf thing
20:20 mst harghj
20:21 mst let me rephrase
20:21 mst what 'the gconf thing'
20:21 gfldex m: sub infix:<⏨>($n,$e){10 ** $e * $n}; say 6.0221415⏨23;
20:21 camelia rakudo-moar 6a8278: OUTPUT«602214150000000000000000␤»
20:21 gfldex smls: there ^^^ you go
20:21 mst how does gconf avoid reimplementing things on a per-application basis?
20:22 geekosaur it's wired into gtk and gnome, for most programmers you just set a gconf settings domain (~ "application name") and it handles the updates behind the scenes
20:22 geekosaur that said, being able to get notified that the specific value changed and then retrieve just that value, rather than parse a file and figure out which thing(s) changed, is also worth something
20:24 timotimo i'll be pretty much computer-less for the rest of the night
20:24 timotimo see ya!
20:26 eythian how do I tell if something is a Bool or a Str?
20:27 eythian oh, using ~~
20:28 geekosaur as for usage, if you do want to use it yourself, you are basically telling gconf "watch this setting or settings hierarchy, call this callback with the new value(s) if one of them changes"
20:33 geekosaur oh, also this is backed not (only) by files but by IPC. dbus may not be the best implementation of the idea, but the idea itself is good. (much the same applies to systemd, for that matter.)
20:34 geekosaur (of course both of those are just reinventing different aspects of a microkernel architecture, and arguably the reason they get away with it is hardware's fast enough now)
20:35 mst geekosaur: that all seems reasonable, except for the part where it isn't backed by sensible config files in ~/.application that I can edit with vi
20:36 geekosaur I don't know what gconf/dconf uses these days. gconf1 and iirc at least early 2 were backed by text files you could edit as long as gconfd wasn't running at the time (since it can update them on you)
20:36 geekosaur that said, I've gradually fallen out of love with text files. yes, they're simple. simple like something that works in simple situations and doesn't scale
20:37 geekosaur I want *recovery options*. I do not necessarily want or need text files über alles; that's just one option and not necessarily the right one for all situations
20:37 mst see, I'd like to be able to edit them, *and* have it write them
20:37 harmil Finally adding Math::Sequences to ecosystem. Still very few of the core OEIS sequences defined, but all stubbed and tests in place.
20:37 geekosaur so you're teaching your editor file locking?
20:37 mst and for configuration text files should be *an* option
20:38 mst ... no I'm not
20:38 mst I might lose an update occasionally
20:38 mst that happens if I update something another way while I've got a file open
20:38 mst I already had that problem
20:38 geekosaur I *really* dislike data loss situations
20:39 Ven joined #perl6
20:39 geekosaur frankly, if it's importaant enough that you want recovery options, it's important enough you don't want overwrites to lose data
20:39 mst ...
20:39 mst you're arguing against something I never said
20:39 geekosaur or, you want gtext files because text files
20:39 mst I don't know where this even came from
20:39 mst also
20:39 mst if I have stuff in git
20:39 geekosaur in which case I'm not arguing, Im just leaving you to yourself
20:39 mst I don't generally lose data
20:40 mst I am saying "having a text file format, where I can edit it, and the program can also write to it, can be useful"
20:40 mst there are combinations of ways for that to play out that lose an update
20:40 mst but trying to avoid all possible lost update situations doesn't scale
20:40 mst so shrug
20:41 dalek ecosystem: 6b3a84a | (Aaron Sherman)++ | META.list:
20:41 dalek ecosystem: Add Math::Sequences to ecosystem
20:41 dalek ecosystem:
20:41 dalek ecosystem: See https://github.com/ajs/perl6-Math-Sequences
20:41 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/6b3a84ac3b
20:41 dalek ecosystem: 9dcd3e3 | Altai-man++ | META.list:
20:41 dalek ecosystem: Merge pull request #244 from ajs/master
20:41 dalek ecosystem:
20:41 dalek ecosystem: Add Math::Sequences to ecosystem
20:41 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/9dcd3e37dd
20:41 harmil woo!
20:41 mcmillhj joined #perl6
20:43 harmil Math::Sequences::Integer is FULL of stub sequences from the OEIS. Any lurkers looking for an easy task: feel free to unstub some of those, run the tests for it in t/OEIS.t and submit a pull request!
20:45 harmil Even if I get to it before you, I'm always on the lookout for better implementations than my own. Many of mine are very naive and slow.
20:50 Ven joined #perl6
20:50 zacts joined #perl6
20:55 mvorg joined #perl6
20:56 mcmillhj joined #perl6
20:58 leont joined #perl6
20:59 tbrowder ref sprintf doc: please review PR "https://github.com/perl6/doc/pull/866"
21:09 nadim joined #perl6
21:09 mcmillhj joined #perl6
21:37 tbrowder going once...
21:37 eliasr joined #perl6
21:40 TEttinger joined #perl6
21:50 vendethiel joined #perl6
22:00 masak hurrying up a channel for feedback is seldom all that effective
22:00 mcmillhj joined #perl6
22:04 ugexe harmil: why do you have a depends on CompUnit::Util when you don't use it?
22:04 harmil ugexe: ah, that's a vestige. I'll get rid of it. I used to have a top-level module that re-exported my sub-modules
22:06 harmil ugexe: done. thanks
22:11 ugexe all these regular dependencies on Test::META for what is an author test is starting to get out of hand re: cargo culting
22:13 ugexe its like making everyone who installs your module test it against perl critic and test::pod or whatever from perl
22:14 TEttinger joined #perl6
22:14 masak 'night, #perl6
22:17 harmil ugexe: it does seem dubious...
22:18 harmil I'm off, all. Have a great night
22:33 mcmillhj joined #perl6
22:40 bjz joined #perl6
22:47 dalek doc: e7c91f5 | (Tom Browder)++ | doc/Type/Str.pod6:
22:47 dalek doc: add note about current state of the implementation
22:47 dalek doc: review: https://github.com/perl6/doc/commit/e7c91f5360
22:47 dalek doc: 5e16303 | Altai-man++ | doc/Type/Str.pod6:
22:47 dalek doc: Merge pull request #866 from tbrowder/sprintf-note
22:47 dalek doc:
22:47 dalek doc: add note about current state of the implementation
22:47 dalek doc: review: https://github.com/perl6/doc/commit/5e16303a20
22:48 pierre_ joined #perl6
22:49 matiaslina joined #perl6
22:49 dalek doc: 2fcd105 | Altai-man++ | doc/Type/Str.pod6:
22:49 dalek doc: Fix typo
22:49 dalek doc: review: https://github.com/perl6/doc/commit/2fcd10595d
22:52 labster joined #perl6
23:01 ugexe we need an author-depends type field
23:03 Ven joined #perl6
23:13 jameslen_ joined #perl6
23:26 mcmillhj joined #perl6
23:28 girafe joined #perl6
23:41 mcmillhj joined #perl6
23:47 _slade_ joined #perl6
23:54 obfusk joined #perl6

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

Perl 6 | Reference Documentation | Rakudo