»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
Skarsnik | m: my uint32 $u32; $u32 = -4; say $u32; | 00:00 | |
camelia | rakudo-moar 6a8278: OUTPUT«4294967292» | ||
Skarsnik | m: my uint32 $u32 = 0; $u32 -= 5; say $u32; | ||
camelia | rakudo-moar 6a8278: OUTPUT«4294967291» | ||
Skarsnik | I think all intxx and uintxx are not equal on constraint | 00:01 | |
tbrowder | p6: my uint64 $n = 232; say sprintf "%0x", $n | ||
camelia | rakudo-moar 6a8278: OUTPUT«e8» | ||
Skarsnik | m: my uint64 $u64 = 0; $u64 -= 5; say $u64; | ||
camelia | rakudo-moar 6a8278: OUTPUT«-5» | ||
Skarsnik | probably a bug | ||
tbrowder | say UINT_MAX | ||
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» | ||
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» | ||
tbrowder | p6: my uint32 $n = 0xffffffffffffffff; say $n | 00:05 | |
camelia | rakudo-moar 6a8278: OUTPUT«4294967295» | ||
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» | ||
tbrowder | okay, i think i may know how to do it | 00:10 | |
00:12
pierre_ joined,
MilkmanDan left
00:15
gfldex left
00:19
ItayAlmog left
|
|||
timotimo | oh hey Skarsnik | 00:21 | |
00:25
kurahaupo left
00:40
pierre_ left,
pierre_ joined,
pierre_ left
00:42
MilkmanDan joined
01:00
BenGoldberg joined
01:03
Skarsnik left
01:07
mempko left
01:08
johnjohn101 joined
01:12
MilkmanDan left
01:20
SmokeMachine____ joined
01:23
MilkmanDan joined,
mithaldu_ joined
01:24
Lucas_One joined
01:26
BuildTheRobots joined
01:28
pierre_ joined
01:29
kipd joined
01:33
olinkl joined
01:36
sufrostico left,
notbenh_ joined
01:37
AngeloMichael joined
01:39
pierre_ left
02:01
dj_goku left
02:12
zacts_pi joined,
zacts_pi is now known as zacts
02:14
pierre_ joined
02:45
zacts left,
noganex_ joined
02:49
noganex left
02:54
Ben_Goldberg joined
02:55
BenGoldberg left,
pierre_ left
03:23
dj_goku joined,
dj_goku left,
dj_goku joined
|
|||
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 …» | ||
skids | m: my $f = Channel.new; start { react { whenever $f { .say; $f.close; } }; "done".say }; sleep 1; $f.send(42); sleep 1; | ||
camelia | rakudo-moar 6a8278: OUTPUT«42done» | ||
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; | ||
camelia | rakudo-moar 6a8278: OUTPUT«421» | ||
dj_goku | anyone else noticing a lot of fuzzy testing lately? | 03:46 | |
I think I have seen 3-4 posts on reddit/hacker news about people fuzzing an app or language. | 03:47 | ||
timotimo | hack.p6c.org/~timo/ :P | 03:48 | |
dj_goku | lol nice | 03:51 | |
timotimo: prior to the recent trend | 03:52 | ||
timotimo | oh, yes | ||
that's true | |||
dj_goku | timotimo: is there a reason this isn't done periodically? | ||
btw all I see is numbers not sure what it all means. | |||
timotimo | hehe | 03:53 | |
yeah, it doesn't mean terribly much | |||
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 | |||
also, this fuzzing is only for loading (and other fuzzing runs for running) .moarvm files | 03:54 | ||
with a start-up time of about 0.1 seconds, it's kind of hard to fuzz rakudo with strings for programs | |||
though perhaps i'll give that a try some time :D | |||
dj_goku | :D | 03:56 | |
04:03
Xliff joined
|
|||
timotimo | here's something mildly interesting | 04:04 | |
bind_key is somewhat expensive during startup | |||
(from MVMHash) | 04:05 | ||
28 strings have more than 100 occurences during startup | |||
04:06
johnjohn101 left
|
|||
timotimo | the "long tail" after that is 5389 different strings | 04:06 | |
04:06
bjz_ left
|
|||
timotimo | 1778 of those only occur once | 04:06 | |
now, it doesn't seem like we're storing the hash code in a string object after calculating it | 04:07 | ||
04:08
bjz joined
|
|||
dj_goku | all greek to me. :D | 04:08 | |
04:08
Cabanossi left
|
|||
timotimo | oh, huh | 04:10 | |
04:10
Cabanossi joined
|
|||
timotimo | seems like perhaps we *are* using the cached hash code ... somehow | 04:11 | |
but we're not using the hash code for MVMHash ?!? | 04:12 | ||
04:23
khw left
04:25
DrForr_ joined
|
|||
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 | |
general", then more validation of bytecode, then more deserialization | |||
but going by inclusive, the work_loop function (which is what does deserialization) really is a very expensive thing | 04:27 | ||
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:28 | ||
04:29
pierre_ joined
04:31
DrForr_ left
|
|||
MasterDuke | timotimo: have you ever re-run your coverage report? | 04:33 | |
04:34
bjz left
04:35
pierre_ left
04:39
mempko joined
|
|||
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:40 | |
04:41
darutoko joined
|
|||
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:42 | |
04:45
ufobat joined
04:46
cyphase left
04:51
cyphase joined
04:53
NlkIoUxhGD joined
04:58
setty1 joined
05:13
skids left
05:16
nadim joined
05:28
nadim left
05:30
NlkIoUxhGD left
05:36
firstdayonthejob joined
05:43
uDMCIOLLth joined
|
|||
timotimo | MasterDuke: irclog search reveals that we've had a few changes in moar due to coverity scans already | 06:01 | |
06:02
domidumont joined
|
|||
timotimo | moritz: requesting support for "literal" matches; i can't search for "coverity" in #perl6 | 06:02 | |
moritz: because it finds everything that has "cover" in it, apparently | |||
MasterDuke: github.com/MoarVM/MoarVM/commit/688eecdd22 - example | 06:03 | ||
06:06
domidumont left
06:07
domidumont joined
06:08
firstdayonthejob left
06:15
mempko left
|
|||
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
|
|||
timotimo | MasterDuke: scan.coverity.com/projects/paultcochrane-moarvm | 06:20 | |
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:21 | ||
06:24
CIAvash joined
06:28
wamba joined
06:33
rindolf joined
06:37
benjikins joined
06:40
krunen is now known as krunen_
06:44
nadim joined
|
|||
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 :) | ||
ufobat | and what did it mean? :) | 06:53 | |
benjikins | How do I check if a string contains any element in an array | ||
in the shortest possible way | |||
timotimo | it meant nothing | ||
ufobat | yay :D | ||
timotimo | benjikins: you can try $mystring.contains(any(@foobar)) | ||
benjikins | I didn't realize I could use any that way | ||
thank you | |||
timotimo | m: my @pieces = <hello world how are you>; say "oh well this is weird".contains(any(@pieces)) | ||
camelia | rakudo-moar 6a8278: OUTPUT«any(False, False, False, False, False)» | ||
timotimo | m: my @pieces = <hello world how are you>; say so "oh well this is weird".contains(any(@pieces)) | ||
camelia | rakudo-moar 6a8278: OUTPUT«False» | ||
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» | ||
timotimo | m: my @pieces = <hello world how are you>; say "oh well this is world".contains(any(@pieces)) | ||
camelia | rakudo-moar 6a8278: OUTPUT«any(False, True, False, False, False)» | ||
timotimo | junctions are cool that way. | ||
06:58
aindilis joined
06:59
labster left
07:07
leont joined
07:10
[particle]1 joined
07:11
sQuEE joined,
aindilis` joined,
peteretep_ joined
07:12
Ulti_ joined
07:13
Jonis_ joined
07:14
nemo_ joined,
ranguard_ joined,
rudi_s_ joined,
bonsaikitten joined,
zoosha_ joined,
mr-fooba_ joined,
luis` joined,
El_Che_ joined,
erdic_ joined
07:15
ribasushi_ joined
07:16
xiaomiao left,
mr-foobar left,
nemo left,
ranguard left,
Ulti left,
faubi left,
aindilis left,
cgfbee left,
erdic left,
raydiak left,
bitmap_ joined,
erdic_ is now known as erdic
07:17
bitmap_ is now known as bitmap,
bhm left,
konobi left,
shadowpaste joined
07:18
raydiak joined,
peteretep_ is now known as peteretep,
bhm joined,
konobi joined
07:19
konobi is now known as Guest6604,
markk joined,
faubi joined,
cgfbee joined
07:21
sergot joined
07:22
Ben_Goldberg left,
RabidGravy joined
07:24
krunen joined
07:25
canopus left,
smls joined
|
|||
smls | m: say "aaa {("bbb" for ^3)} ccc" | 07:26 | |
yoleaux | 26 Aug 2016 21:58Z <tbrowder> smls: thanks! the "+$0" did the trick | ||
camelia | rakudo-moar 6a8278: OUTPUT«aaa bbb bbb bbb ccc» | ||
smls | m: say "aaa {"bbb" for ^3} ccc" | ||
camelia | rakudo-moar 6a8278: OUTPUT«Use of Nil in string context in block <unit> at <tmp> line 1aaa ccc» | ||
smls | ^^ Why does the for loop not return a value without parens there? | ||
07:27
ufobat left
|
|||
smls | m: say "aaa {"bbb" if 1} ccc" | 07:27 | |
camelia | rakudo-moar 6a8278: OUTPUT«aaa bbb ccc» | ||
smls | ^^ works for `if` but not `for` | ||
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? | ||
smls | TimToady: Ah, so {} in strings is statement-list context like a sub | 07:31 | |
TimToady | m: say "aaa {do "bbb" for ^3} ccc" | ||
camelia | rakudo-moar 6a8278: OUTPUT«aaa bbb bbb bbb ccc» | ||
07:31
canopus joined
|
|||
TimToady | do also works | 07:32 | |
smls | oh, didn't know one could `do` a statement modifier | ||
TimToady | it's just a block, so there's a sequence of statements expected | ||
do is a statement prefix | |||
and modifier is part of a statement | |||
it actually parses do ("bbb" for ^3) | 07:33 | ||
07:39
leont left
|
|||
smls | TimToady: In the case of {} in strings, it wouldn't make the loop lazy though | 07:46 | |
07:47
labster joined
|
|||
smls | as it is immediately stringified | 07:47 | |
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:48 | ||
07:55
edehont joined
07:58
benjikins left
07:59
gfldex joined
08:00
espadrine joined
08:03
xtt joined
08:04
nadim left
08:05
vendethiel left
08:07
leont joined
08:08
xtt left
|
|||
moritz | \o | 08:09 | |
timotimo | o/ moritz | ||
i highlighted you instead of .tell; is that okay? | |||
moritz | timotimo: it's OK; an issue on 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 | ||
smls | Does anyone know a "try Perl 6 online" thing that runs Perl 6.c? | ||
ideone.com runs ancient parrot-based rakudo | 08:12 | ||
timotimo | did you see the pull request MasterDuke made to your ilbot repo? | ||
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 | ||
smls | dev.perltuts.com/try runs 2015.11 | ||
timotimo | there's the thing that perl6.party uses, but i forgot its name | ||
moritz | timotimo: I'd have to maintain a second search index | ||
timotimo: yes, github.com/moritz/ilbot/issues/47 has the discussion | 08:13 | ||
timotimo | i didn't see it | 08:14 | |
MasterDuke: seems like a simple fix ought to be possible to make that pull request mergable | |||
smls: glot.io/ - that one supports perl6 and has a new-ish version available | 08:15 | ||
smls | thanks | ||
timotimo | a 2016.04 moar rakudo | ||
08:20
edehont left
08:38
RabidGravy left
|
|||
Woodi | open source vs lawyers approach in Linux from yesterday: lists.linuxfoundation.org/pipermai...03580.html | 08:42 | |
08:42
mvorg joined
|
|||
Woodi | looks open source is a not bit like traditional academia :) | 08:43 | |
08:48
domidumont left
|
|||
Woodi | btw. SSE4.2 have "Four string/text processing instructions providin | 08:49 | |
...g a rich set of primitives" | |||
...for eg. XML parsing in few CPU instructions ? :) | 08:50 | ||
08:52
leont left
09:03
ufobat joined
09:11
ufobat left
09:25
kjs_ joined
09:30
dataangel left
09:32
pecastro joined
09:58
telex left
10:00
telex joined,
Ven joined
10:02
TEttinger left
10:29
rindolf left
10:33
pierre_ joined,
rindolf joined
10:34
labster left
10:41
mcmillhj joined
10:46
pierre_ left,
mcmillhj left
10:47
pierre_ joined
11:10
dalek left
11:11
dalek joined,
ChanServ sets mode: +v dalek
|
|||
timotimo | MasterDuke: the coverity scans are only up to date because i just submitted a new scan :) | 11:13 | |
MasterDuke | oh, ha | 11:14 | |
nice it was that easy | 11:15 | ||
timotimo | well, yeah. just had to ping [ptc] so he could add me to the project | 11:17 | |
11:18
kjs_ left
|
|||
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:18 | |
11:20
espadrine left,
ufobat joined
|
|||
timotimo | [ptc]: did you realize that "ptc" could also be short for "pretty cool"? | 11:21 | |
[ptc] | timotimo: hehe :-) | 11:22 | |
yoleaux | 06:17Z <timotimo> [ptc]: were you the one who got coverity for moarvm? | ||
timotimo | %) | 11:23 | |
11:23
mcmillhj joined
11:24
iH2O joined
|
|||
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:28
mcmillhj left
11:30
Ven left
11:40
nemo_ is now known as nemo
11:41
iH2O left
|
|||
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 | |
oh, and greetings from the train from Budapest to Vienna | |||
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 | |
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
|
|||
gfldex | domm: see gist.github.com/gfldex/7d716436aa8...abd7106c3d | 11:48 | |
11:48
aries_liuxueyang left
|
|||
gfldex | mst: right answer ^^^ :) | 11:48 | |
mst | \o/ | 11:49 | |
11:49
antipsychiatry left,
kurahaupo joined,
mcmillhj joined
|
|||
gfldex | domm: please note that '/dev/tty' may prove difficult on windows | 11:49 | |
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 | |
but the ENTER and LEAVE is nice, too | |||
domm | thx | ||
mst | wow but Term::termios has a bizarre calling convention | ||
domm | it's a private tool I use, so /dev/tty is no problem | ||
gfldex | mst: it surely does | 11:51 | |
it's a fairly thin layer on the c-stuff that shows its age | |||
mst | the C calling convention for getattr() and setattr() is not bizarre, just old-school C | 11:52 | |
I'm perfectly familiar with this | |||
timotimo | time to build Term::termios:api<2> :) | ||
mst | it's the way it's been translated that's making my eyes cross ;) | ||
gfldex | CLI::Promt::Password may actually what most ppl look for | 11:53 | |
11:54
mcmillhj left
11:55
smls left
|
|||
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:55 | |
11:57
kaare_ left
|
|||
mst | I'm guessing by the way gfldex said that that there is one somewhere? | 11:57 | |
gfldex | there is github.com/titsuki/p6-Terminal-Readsecret what comes with a dep. to readsecret. No idea if that is portable. | 11:59 | |
mst | ah, ok | 12:01 | |
domm | good enough for me for now | ||
12:03
Ven joined
|
|||
domm | another question: how can I convert a Buf (as returned by Digest::MD5.md5_buf) into an Int? | 12:05 | |
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
|
|||
domm | mst: I tried, but was offline and did not get any results | 12:07 | |
But not sure if i tried .Hex.Int | |||
mst | I may bbe imagining it | 12:08 | |
domm | Method 'Hex' not found for invocant of class 'Buf' | ||
mst | but it seems like you're trying to go buf -> hex -> int | ||
MasterDuke | the docs suggest 'use experimental :pack;' and then the unpack method | 12:09 | |
domm | .Int returns the number of bytes in the buffer | ||
MasterDuke: ok, thanks, I'll try that | |||
(as I said I was offline and could only grep the source/docs for stuff, and google > grep) | |||
nice, this works | 12:12 | ||
and it seems that my offline docs are rather old.. | |||
MasterDuke | the docs have seen a lot of action the last couple months: github.com/perl6/doc/graphs/commit-activity | 12:19 | |
12:26
jameslenz left,
ufobat left
12:28
jameslenz joined
|
|||
domm | use experimental :pack; use Digest::MD5; my $d = Digest::MD5.new; $d.md5_buf(<"The","European","Perl","Conference">).unpack("CCCCCC").reduce: * ~ * | 12:33 | |
not exactly what I'm doing, but it works - thanks! | 12:34 | ||
ah, and one last questions: how can do the folling Perl 5 code in 6 | 12:35 | ||
sub foo { say "foo" }; my $name = 'foo'; $foo->(); &$foo; | |||
ah, soory | 12:36 | ||
sub foo { say "foo" }; my $name = 'foo'; $name->(); &$name; | |||
12:37
mcmillhj joined
|
|||
domm | perl -E 'sub foo { say shift }; my $name = "foo"; $name->("A"); &$name("B")' | 12:37 | |
dalek | href="https://modules.perl6.org:">modules.perl6.org: 1d2db63 | (Tom Browder)++ | templates/root/index.html.ep: correct grammar |
12:40 | |
12:42
rudi_s_ is now known as rudi_s,
mcmillhj left
|
|||
dalek | rl6-most-wanted: 8501b88 | (Tom Browder)++ | most-wanted/modules.md: add new module WIP |
12:48 | |
rl6-most-wanted: 559712a | (Tom Browder)++ | most-wanted/modules.md: fix typo |
12:50 | ||
12:52
mra90 joined
12:53
mra90 left
|
|||
MasterDuke | m: class A { method foo { say "foo" } }; my $name = "foo"; A."$name"() | 12:57 | |
camelia | rakudo-moar 6a8278: OUTPUT«foo» | ||
MasterDuke | domm: ^^^ for methods at least | ||
13:01
wamba left
|
|||
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:02 | |
gfldex | m: sub foo(){ 'oi!' }; my $foo = '&foo'; say ::($foo).(); | 13:04 | |
camelia | rakudo-moar 6a8278: OUTPUT«oi!» | ||
gfldex | domm: ^^^ | ||
m: sub foo(){ 'oi!' }; my $foo = '&foo'; say ::($foo)(); | |||
camelia | rakudo-moar 6a8278: OUTPUT«oi!» | ||
MasterDuke | m: sub foo(){ 'oi!' }; my $foo = 'foo'; say ::("&$foo")(); | 13:06 | |
camelia | rakudo-moar 6a8278: OUTPUT«oi!» | ||
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:12 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124294 | ||
Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127210 | |||
Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127144 | |||
masak | hi, #perl6 | 13:13 | |
domm | gfldex: thanks, again | 13:22 | |
pierre_ | m: say "Bonjour!" | 13:30 | |
camelia | rakudo-moar 6a8278: OUTPUT«Bonjour!» | ||
pierre_ | i have a small misunderstanding with defined | 13:31 | |
and Nil, or any | |||
m: say Nil.defined | |||
camelia | rakudo-moar 6a8278: OUTPUT«False» | ||
pierre_ | Nil is not defined, which is expected | ||
however, if i use Nil as a key in a hash, and then | |||
let me show | |||
13:31
MilkmanDan left
13:32
MilkmanDan joined,
Ven left
|
|||
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«NilTrue» | ||
pierre_ | is that normal ? | ||
gfldex | pierre_: Nil is not _the_ undefined value. Using Nil by hand will almost always result in bugs. | ||
see: docs.perl6.org/type/Nil and docs.perl6.org/language/typesystem...efinedness | 13:33 | ||
pierre_ | yes,, i do not plan to use Nil | ||
it's for a test case | |||
13:33
wphtech joined
|
|||
jnthn | I think the confusion here though is that some-identifier => blah will auto-quote the left hand side as a string | 13:33 | |
m: say (Nil => 'what').perl | |||
camelia | rakudo-moar 6a8278: OUTPUT«:Nil("what")» | ||
pierre_ | i have a function, that i want to test against several values | ||
gfldex | my %h = Nil => 'should not be defined'; dd %h; | 13:34 | |
jnthn | m: say (Nil => 'what').key.WHAT | ||
camelia | rakudo-moar 6a8278: OUTPUT«(Str)» | ||
gfldex | m: my %h = Nil => 'should not be defined'; dd %h; | ||
camelia | rakudo-moar 6a8278: OUTPUT«Hash %h = {:Nil("should not be defined")}» | ||
pierre_ | oh, :) | ||
make sense | |||
gfldex | m: my %h{Any} = Nil => 'should not be defined'; dd %h; | ||
camelia | rakudo-moar 6a8278: OUTPUT«Hash[Any,Any] %h = (my Any %{Any} = :Nil("should not be defined"))» | ||
pierre_ | so if i want to store | ||
13:34
wphtech left
|
|||
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")» | ||
gfldex | m: my %h{Any}; %h{Nil}= 'should not be defined'; %h.keys.say | ||
camelia | rakudo-moar 6a8278: OUTPUT«(Nil)» | ||
gfldex | m: my %h{Any}; %h{Nil}= 'should not be defined'; %h.keys.put | ||
camelia | rakudo-moar 6a8278: OUTPUT«Use of Nil in string context in block <unit> at <tmp> line 1» | ||
pierre_ | right | ||
pair is auto quoting | |||
just for the context, here is what i wanted to do | 13:36 | ||
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 | ( no output ) | ||
pierre_ | and use %h to run my tests, by adding entries there | 13:39 | |
13:41
TheGrimFandango joined
|
|||
TheGrimFandango | hi | 13:41 | |
pierre_ | i will then use an array and take element 2 by 2 | ||
m: my @a = Nil, 'should be undef'; for @a -> $k, $v { say $k.defined } | 13:42 | ||
camelia | rakudo-moar 6a8278: OUTPUT«False» | ||
pierre_ | Hi | ||
gfldex | if you want to hand Nil around like that you will have to use binding | ||
pierre_ | really, it's just in one test case | 13:43 | |
ok, i think the correct solution | |||
i'll wirte a separate test for Nil :) | |||
gfldex | m: my Int $i is default(1); say $i; $i = Nil; say $i.defined; | ||
camelia | rakudo-moar 6a8278: OUTPUT«1True» | ||
pierre_ | and not use a hash | ||
actually, in my test, i'm using Any, not Nil | 13:44 | ||
but should be the same, no? | |||
gfldex | not at all | ||
pierre_ | just to check defineness | ||
not to use it | |||
gfldex | you can use Mu if you need to differentiate between Any and "some undefined value" | 13:45 | |
13:45
bonsaikitten is now known as DrEeevil
|
|||
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 1True» | ||
MasterDuke | timotimo: btw, wasn't there some functionality missing in parse_coverage_report.p6 that i said i'd add? | 13:46 | |
13:52
araujo_ joined
13:55
araujo left
|
|||
tbrowder | .tell MasterDuke thanks! | 13:55 | |
yoleaux | tbrowder: I'll pass your message to MasterDuke. | ||
14:03
araujo__ joined
14:05
buggable joined
14:06
araujo_ left
14:07
skink joined
14:10
skids joined
|
|||
tbrowder | jnthn: any plans to work on uint64 issues in near future? | 14:12 | |
m: my $undef; say $undef.defined | 14:24 | ||
camelia | rakudo-moar 6a8278: OUTPUT«False» | ||
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» | ||
tbrowder | m: my $u = 1; say $u; $u = Nil; say $u | 14:26 | |
camelia | rakudo-moar 6a8278: OUTPUT«1(Any)» | ||
tbrowder | m: my $u = 1; $u = Mu; say $u | 14:28 | |
camelia | rakudo-moar 6a8278: OUTPUT«(Mu)» | ||
tbrowder | m: my $u = Mu; say $u.defined | 14:29 | |
camelia | rakudo-moar 6a8278: OUTPUT«False» | ||
tbrowder | m: my $u = Any; say $u.defined | 14:30 | |
camelia | rakudo-moar 6a8278: OUTPUT«False» | ||
mr-fooba_ | is there any guide to get started with perl6 on js ? | ||
14:32
RabidGravy joined
|
|||
tbrowder | m: my $u = Nil; say $u.defined | 14:33 | |
camelia | rakudo-moar 6a8278: OUTPUT«False» | ||
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 | |
14:34
espadrine joined
|
|||
moritz | not really | 14:35 | |
m: my Int $x = 42; $x = Any | |||
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» | ||
moritz | m: my Int $x = 42; $x = Nil; say $x.perl | ||
camelia | rakudo-moar 6a8278: OUTPUT«Int» | ||
tbrowder | m: my $u = 1; $u = Nil | 14:37 | |
camelia | ( no output ) | ||
ugexe | ... | ||
m: say Nil ~~ Any | 14:38 | ||
camelia | rakudo-moar 6a8278: OUTPUT«True» | ||
tbrowder | m: my $u = 6; say $u.defined; $u = Nil; say $u.defined | ||
camelia | rakudo-moar 6a8278: OUTPUT«TrueFalse» | ||
tbrowder | it looks like, if one doesn't explicitly type a defined var, then assigning Nil to it undefines it | 14:39 | |
ugexe | or stores the value which may or may not be undefined | 14:40 | |
tbrowder | ?? | 14:41 | |
geekosaur | I think they dropped a word. Nil stores the default value | ||
m: my Int $v is default(6); $v = 10; say $v; $v = Nil; $v.say | 14:42 | ||
camelia | rakudo-moar 6a8278: OUTPUT«106» | ||
tbrowder | i'm just interested in ensuring a previously defined var can be forced to become undefined | ||
is there a best-practice way to do that? | 14:43 | ||
geekosaur | m: my Int $v is default(6); $v = 10; say $v; $v = Int; say $v.defined | 14:44 | |
camelia | rakudo-moar 6a8278: OUTPUT«10False» | ||
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 blockat <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» | ||
ugexe | my $x is default(1); say $x; $x = Nil:U; say $x.defined; say $x.WHAT | ||
m: my $x is default(1); say $x; $x = Nil:U; say $x.defined; say $x.WHAT | |||
camelia | rakudo-moar 6a8278: OUTPUT«1FalseNil» | ||
ugexe | gets around Nil setting default value of 1 which would be defined | 14:47 | |
14:48
mcmillhj joined
|
|||
tbrowder | i don't see a practical difference for my typical use case | 14:49 | |
let me try the last case again co | |||
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 | ||
camelia | rakudo-moar 6a8278: OUTPUT«ttrue» | ||
tbrowder | okay, thanks, i guess i just don't understand meta programming!! | 14:52 | |
geekosaur | um | ||
are you confusing/conflating defined with existence? | |||
(because I see no metaprogramming here) | 14:53 | ||
tbrowder | too deep for my simple needs | ||
14:53
mcmillhj left
14:56
pecastro left
15:07
mcmillhj joined,
pecastro joined
|
|||
pierre_ | m: Blob.new( 65535.base(16).comb(2).map( {:16($_)} ) ).say | 15:10 | |
camelia | rakudo-moar 6a8278: OUTPUT«Blob:0x<ff ff>» | ||
pierre_ | any shortcut to go from 65535 to Blob 0x<ff ff> | ||
my solution looks a bit too much :) | 15:11 | ||
15:12
mcmillhj left
15:15
khw joined
15:16
zacts joined
15:17
mcmillhj joined
|
|||
pierre_ | Blob.new( 65535 ) | 15:25 | |
m: Blob.new( 65535 ) | |||
camelia | ( no output ) | ||
pierre_ | m: Blob.new( 65535 ).say | ||
camelia | rakudo-moar 6a8278: OUTPUT«Blob:0x<ff>» | ||
ugexe | m: say Blob.new(65535 xx 2) | 15:30 | |
camelia | rakudo-moar 6a8278: OUTPUT«Blob:0x<ff ff>» | ||
pierre_ | and my solution is broken on top of that | ||
m: 65539.base(16).comb(2) | |||
camelia | ( no output ) | ||
pierre_ | m: 65539.base(16).comb(2).say | ||
camelia | rakudo-moar 6a8278: OUTPUT«(10 00 3)» | ||
pierre_ | hum, interesting, with xx | ||
geekosaur | that doesn't actually work | 15:31 | |
it's truncating the top byte of 65535 to get 255 and putting that in the Buf | |||
pierre_ | oh right :) | ||
it's doing Blob.new( 65535, 65535) | 15:32 | ||
15:32
rudolfochrist joined
15:34
mcmillhj left
15:35
cyphase left
15:39
cyphase joined
|
|||
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
|
|||
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 rowat <tmp>:1------> 3'use experimental :pack; pack('7⏏5n', 65535).say expecting any of: infix infix stopper statement end statement m…» | ||
pierre_ | m: use experimental :pack; pack( 'n', 65535 ).say | 15:44 | |
camelia | rakudo-moar 6a8278: OUTPUT«Buf:0x<ff ff>» | ||
pierre_ | experimental, but that would work | ||
15:45
wamba joined
15:46
pecastro left
15:47
mcmillhj left,
ufobat joined
|
|||
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. | ||
zacts: hi | |||
15:54
zacts left
15:55
zacts joined
|
|||
AlexDaniel | grondilu: perhaps you can help? :) | 15:57 | |
trying to find previous discussions on this topic. Here is the pull request that made it experimental: github.com/rakudo/rakudo/pull/649 | 15:58 | ||
grondilu | well, as written: "There is currently no language specification for pack and unpack." | 16:00 | |
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:01 | ||
AlexDaniel | github.com/lizmat/PackUnpack | 16:02 | |
16:03
domidumont joined
16:06
rudolfochrist left
16:14
pecastro joined
16:15
mcmillhj joined
16:20
domidumont left,
mcmillhj left
16:21
domidumont joined
16:26
iH2O joined
|
|||
moritz | grondilu: the real problem is that with Perl 6, you typically want to deal not just with primitives, but with ojbects | 16:26 | |
16:26
mcmillhj joined
|
|||
moritz | grondilu: so a pack or unpack that doesn't work with user-defined classes is very short-sighed | 16:26 | |
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
mcmillhj left,
cdg joined
16:33
domidumont left
16:36
TheGrimFandango left
16:37
kaare_ joined
16:39
iH2O left
16:43
mohae joined
|
|||
grondilu | (though encoding and packing are arguably the same thing, IDK) | 16:43 | |
16:44
mcmillhj joined
16:46
mohae_ left,
pierre_ left,
Ven joined
16:49
mcmillhj left
|
|||
dalek | c: fdb41ec | titsuki++ | doc/Type/Pair.pod6: Fix Pair examples |
16:55 | |
c: 4357ca3 | titsuki++ | doc/Type/Pair.pod6: Merge pull request #865 from titsuki/fix-pair Fix Pair examples |
|||
16:57
zacts left
17:01
mcmillhj joined
17:07
Ben_Goldberg joined
17:11
zacts joined
17:12
gfldex left
17:16
mohae_ joined
17:19
mohae left
17:20
pecastro left
17:22
pecastro joined,
cdg_ joined
17:25
cdg left
17:29
cdg_ left
17:30
cdg joined
17:37
mvorg left
17:41
pecastro left
17:46
gfldex joined
|
|||
tbrowder | is there any difference between a hash and a map? | 18:00 | |
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
18:03
cdg left
|
|||
tbrowder | also, the bits on hash don't consistently use the % sigil which is very confusing the way it's written | 18:03 | |
18:05
ufobat left
|
|||
gfldex | tbrowder: the sigils table in /language/variables should link to Hash (and the other types) but table rendering isn't there yet | 18:07 | |
18:07
mayuresh left
18:13
cdg joined,
cdg left
18:15
pecastro joined
18:21
eythian joined,
zacts_pi joined
18:24
zacts left
|
|||
eythian | is there an equivalent of Proc::Daemon for p6, or a nice way to have a program daemonise itself? | 18:26 | |
18:29
pecastro left
18:39
zacts_pi left
|
|||
El_Che_ | run it with & and use one of the concurrency constructs? | 18:45 | |
18:45
El_Che_ is now known as El_Che
18:47
pierre_ joined
|
|||
timotimo | El_Che: running with & is very much not daemonizing | 18:48 | |
18:51
pierre_ left
|
|||
eythian | yeah, the thing I'm writing I'd like to be a real daemon. | 18:51 | |
timotimo | use systemd :) | 18:53 | |
or any of those tools that do that stuff for you, really | |||
mst | eythian: Daemon::Control | ||
eythian: is a perl5 module that will happily daemonize a perl6 program | 18:54 | ||
or you could use runit or s6 or similar | |||
eythian | thanks | ||
mst | what are you trying to daemonize *for* is the question | ||
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 ... :) | ||
Proc::Daemon is shit and broken anyway | |||
so you don't want to port that part | |||
timotimo | there's at least a hundred tools that will daemonize your stuff, just like systemd would | ||
18:55
darutoko left
|
|||
mst | systemd doesn't actually daemonize things at all | 18:55 | |
timotimo | well, systemd will control & own your tty instead of throwing it out | ||
mst | it runs services without daemonization | ||
timotimo | but at that point ... what's the difference? | ||
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. | ||
mst | eythian: ok, so I would just run that under runit or s6 | 18:56 | |
(which are newer daemontoolsish things) | |||
whereas systemd is that, plus a broken dependency resolution system, plus a broken logging system, plus hentacles :D | |||
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 | ||
mst | timotimo: if you believe that, you don't know how to write a unix service. | ||
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 :) | ||
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 | ||
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? | ||
wow, that seems clever | |||
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 | ||
timotimo: it's just infrastructure | |||
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 | ||
if you want stdout/stderr | |||
timotimo | to me, that's far enough from "regular stdout/stderr" to not count :) | ||
mst | timotimo: er. but systemd does exactly the same thing. | 18:59 | |
it's just it re-opens them for you | |||
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" | ||
mst | ... | ||
timotimo | "yeah, you get stdout and stderr. you just have to manually open them to some specific path or pipe!" | ||
mst | yeah, and systemd opens them to some specific binary thing | 19:00 | |
that has a habit of losing messages during early boot | |||
good luck if you have a kernel problem | |||
I can make systemd do what I need it to | |||
timotimo | i thought journald was made specifically so you get all the early boot messages, too? instead of losing them? | ||
mst | no. journald specifically loses them. | ||
timotimo | haha, that's not good :) | ||
mst | because it doesn't always manage to come up in time, so then it has a fixed size buffer | 19:01 | |
and if you exceed that, sucks to be you | |||
timotimo | i never knew of those flaws | ||
mst | it's amateur hour all the way down | ||
they also added a default setting where if you ssh into your postgres user, on logout it kills the database | |||
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 github.com/moritz/json under any kind of license? | ||
timotimo | yeah, i'm not a fan of that default. luckily distros will gladly kill that default with fire | ||
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) | ||
timotimo | i haven't heard about that brute force cleanup stuff, though | ||
mst | the brute force cleanup *is* what kills postgres | 19:03 | |
also, there are shipped versions of ubuntu that don't override it | 19:04 | ||
and of course ssh is the standard way to ship WAL files for master/slave | |||
so you try and replicate your database for reliability and it kills your database | |||
because of a bug in gnome | |||
*slowclap* | |||
timotimo | i have to get going :( | ||
this discussion is pretty enlightening, though | |||
mst | from my POV, systemd is an excellent desktop init system | 19:05 | |
since it optimises for speed of boot over reliability | |||
which is totally correct for that | |||
but really hateful when you have a real server that takes a couple minutes to memcheck etc. before booting | 19:06 | ||
19:06
ejf joined
|
|||
tbrowder | gfldex: thanks | 19:06 | |
mst | eythian: btw, I prefer running perl5 stuff under s6 and etc. too | ||
eythian: I only use Daemon::COntrol when I need an /etc/init.d script | 19:07 | ||
eythian | OK. I'll take that under advisement :) | 19:08 | |
19:09
ejf_ left
|
|||
mst | Proc::Daemon has the POSIX::Close bug that's common in daemonizers | 19:09 | |
where it force closes fds at the C level | 19:10 | ||
this can seriously confuse perl | |||
(like, "your app ends up logging into its pid file" confuse) | |||
timotimo | pff, just write your daemon as "crash-only software" | ||
perl gets confused? crash the process and have it re-started! | |||
eythian | is it the case that you can 'use Foo::Bar' with most perl5 modules and they just work? | ||
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* | ||
so you'd tell it to run 'myperl6script' | |||
timotimo BBL | |||
but yeah, perl5 modules usually Just Work in perl6 when using :from<Perl5> | |||
eythian | cool, ta | 19:12 | |
mst | eythian: generally I'm using perl6 for clever things | 19:13 | |
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 | rl6-most-wanted: 149a0f2 | (Tom Browder)++ | most-wanted/modules.md: change module name for clarity of purpose |
||
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 :) | ||
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 | rl6-most-wanted: ebdddb7 | (Tom Browder)++ | most-wanted/modules.md: get the spelling correct! |
||
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 | ||
mst | masak: it's derived from the rakudo code isn't it? so surely it can be presumed to be under the rakudo license | ||
masak | mst: no, I think the flow was the other way around | ||
mst | I mean, there should still be a LICENSE file or whatever | ||
ah | |||
but, submitting it to rakudo required saying "at least this version is under the rakufdo license" | 19:18 | ||
masak | troo | ||
mst | so you're possibly technically infringing on his copyright for the commits that haven't been pushed to rakudo yet | ||
19:26
canopus left
19:32
domidumont joined,
canopus joined
19:35
pecastro joined,
harmil joined
19:44
domidumont left
19:47
TEttinger joined
|
|||
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 | ||
El_Che | well, at least we'll got rid of d'icaza additions (cough*registry*cough). Combat evil by greater evil! | 19:50 | |
19:51
Ven left
19:54
Ven joined
|
|||
mst | hm? | 20:02 | |
20:09
zacts joined,
Rawriful joined
20:10
zacts left,
zacts joined
|
|||
El_Che | mst: I meant gconf, but it was probably not d'icaza but Havoc Pennington | 20:11 | |
"if you want to change an interesting setting, you need to edit a registry key" sigh | 20:12 | ||
20:12
smls joined
|
|||
mst | I don't run gnome | 20:12 | |
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 :) | ||
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 postfixat <tmp>:1------> 3say 6.02214157⏏5⏨23; # What's this, Perl 6 doesn't supp expecting any of: infix infix stopper postfix statement en…» | ||
arnsholt | timotimo: Or "mountains and mountains of envvars, which may or may not be set (to the right thing!) when you need them to" | ||
mst | timotimo: how do you get auto-watching for gconf in a gnome app then? | 20:16 | |
mst would suspect that it's a libsomething | 20:17 | ||
in which case surely you could have a libsomething that provides the watching+parsing | |||
timotimo | arnsholt: you definitely can't change an env var while a program is running :D | 20:19 | |
mst: i thought that's just built into the thing? | |||
20:20
aindilis` left
|
|||
mst | timotimo: what 'the thing' are you referring to? | 20:20 | |
timotimo | i might be imagining things again | ||
the gconf thing | |||
mst | harghj | ||
let me rephrase | 20:21 | ||
what 'the gconf thing' | |||
gfldex | m: sub infix:<⏨>($n,$e){10 ** $e * $n}; say 6.0221415⏨23; | ||
camelia | rakudo-moar 6a8278: OUTPUT«602214150000000000000000» | ||
gfldex | smls: there ^^^ you go | ||
mst | how does gconf avoid reimplementing things on a per-application basis? | ||
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 | |
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 | |||
timotimo | i'll be pretty much computer-less for the rest of the night | 20:24 | |
see ya! | |||
eythian | how do I tell if something is a Bool or a Str? | 20:26 | |
oh, using ~~ | 20:27 | ||
20:28
kaare_ left
|
|||
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:28 | |
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:33 | ||
20:34
Ven left
|
|||
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:34 | |
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:35 | |
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 | |
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 | |||
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 | ||
harmil | Finally adding Math::Sequences to ecosystem. Still very few of the core OEIS sequences defined, but all stubbed and tests in place. | ||
geekosaur | so you're teaching your editor file locking? | ||
mst | and for configuration text files should be *an* option | ||
... no I'm not | 20:38 | ||
I might lose an update occasionally | |||
that happens if I update something another way while I've got a file open | |||
I already had that problem | |||
geekosaur | I *really* dislike data loss situations | ||
20:39
Ven joined
|
|||
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 | ... | ||
you're arguing against something I never said | |||
geekosaur | or, you want gtext files because text files | ||
mst | I don't know where this even came from | ||
also | |||
if I have stuff in git | |||
geekosaur | in which case I'm not arguing, Im just leaving you to yourself | ||
mst | I don't generally lose data | ||
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 | ||
there are combinations of ways for that to play out that lose an update | |||
but trying to avoid all possible lost update situations doesn't scale | |||
so shrug | |||
20:40
mcmillhj left
|
|||
dalek | osystem: 6b3a84a | (Aaron Sherman)++ | META.list: Add Math::Sequences to ecosystem See github.com/ajs/perl6-Math-Sequences |
20:41 | |
osystem: 9dcd3e3 | Altai-man++ | META.list: Merge pull request #244 from ajs/master Add Math::Sequences to ecosystem |
|||
harmil | woo! | ||
20:41
mcmillhj joined
|
|||
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:43 | |
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:45 | ||
20:45
zacts left
20:46
mcmillhj left
20:49
wamba left,
Ven left
20:50
Ven joined,
CIAvash left,
zacts joined
20:55
mvorg joined
20:56
mcmillhj joined
20:58
leont joined
|
|||
tbrowder | ref sprintf doc: please review PR "github.com/perl6/doc/pull/866" | 20:59 | |
21:01
mcmillhj left
21:09
nadim joined,
smls left,
mcmillhj joined
21:11
uDMCIOLLth left
21:14
mcmillhj left
21:19
nadim left
21:36
TEttinger left
|
|||
tbrowder | going once... | 21:37 | |
21:37
eliasr joined
21:38
Ven left
21:40
TEttinger joined
21:50
vendethiel joined
|
|||
masak | hurrying up a channel for feedback is seldom all that effective | 22:00 | |
22:00
mcmillhj joined
|
|||
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:05
mcmillhj left,
Rawriful left
|
|||
harmil | ugexe: done. thanks | 22:06 | |
22:08
ejf left
22:11
zacts left
|
|||
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:11 | |
22:12
TEttinger left
|
|||
ugexe | its like making everyone who installs your module test it against perl critic and test::pod or whatever from perl | 22:13 | |
22:14
TEttinger joined
|
|||
masak | 'night, #perl6 | 22:14 | |
22:14
firstdayonthejob left
22:17
leont left
|
|||
harmil | ugexe: it does seem dubious... | 22:17 | |
I'm off, all. Have a great night | 22:18 | ||
22:33
mcmillhj joined
22:38
mcmillhj left
22:40
bjz joined
|
|||
dalek | c: e7c91f5 | (Tom Browder)++ | doc/Type/Str.pod6: add note about current state of the implementation |
22:47 | |
c: 5e16303 | Altai-man++ | doc/Type/Str.pod6: Merge pull request #866 from tbrowder/sprintf-note add note about current state of the implementation |
|||
22:48
pierre_ joined
22:49
matiaslina joined
|
|||
dalek | c: 2fcd105 | Altai-man++ | doc/Type/Str.pod6: Fix typo |
22:49 | |
22:52
labster joined,
pierre_ left
22:56
mvorg left
22:58
rindolf left
22:59
Ulti_ is now known as Ulti
|
|||
ugexe | we need an author-depends type field | 23:01 | |
23:03
Ven joined,
bioduds left,
kurahaupo left
23:04
bjz left
23:13
jameslen_ joined
23:14
jameslenz left
23:25
RabidGravy left
23:26
mcmillhj joined
23:28
girafe joined
23:31
mcmillhj left
23:41
mcmillhj joined
23:44
espadrine left
23:47
_slade_ joined
23:50
mcmillhj left
23:54
obfusk_ left,
obfusk joined
|