»ö« 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. |
|||
brokenchicken | 4 + log($n)/log(10) < 1 + log($n)/log(16) | 00:00 | |
timotimo | but we will. make. it. work. | ||
brokenchicken | 3 < log($n)/log(16) - log($n)/log(10) | ||
log(16)*log(10)*3 < log(10)*log($n) - log(16)*log($n) | |||
log(16)*log(10)*3 < log($n**log(10)) - log($n**log(16)) | |||
log(16)*log(10)*3 < log($n**log(10) / $n**log(16)) | |||
log(16)*log(10)*3 < log(log(10) / log(16)) | |||
m: say so log(16)*log(10)*3 < log(log(10) / log(16)) | |||
camelia | rakudo-moar 703799: OUTPUT«False» | ||
brokenchicken | Therefore, there are no numbers that are 3 chars shorter in base 16 than in base 10 | ||
samcv | ok it's 600K | 00:01 | |
so i'm guessing it must be packing them | |||
as strings it's 2.9M, in this it is only 601K | 00:03 | ||
:) | |||
timotimo | that's fantastic news! | 00:04 | |
samcv | err wait nvm. hold on. i was looking at the wrong binary | ||
i know it's smaller. need to find the super long string binary | |||
ok it's from 1.8M to 600K | |||
:) | 00:05 | ||
timotimo | that's still pretty darn good | ||
samcv | ye | ||
timotimo | a third, as you predicted | ||
samcv | well i predicted it would be 1/3 LESS not 1/3 the size :P | ||
but then again we don't have to store pointers | |||
timotimo | oh! | 00:06 | |
00:13
mr-foobar left,
raschipi joined
00:14
mr-foobar joined
00:19
Ben_Goldberg joined,
BenGoldberg left,
Ben_Goldberg is now known as BenGoldberg
00:23
Ven left
00:24
cale2 left
00:25
Ven joined
00:34
wamba left
00:37
llfourn joined
00:38
Ven left
00:40
raschipi left,
Ven joined
00:41
llfourn left
00:42
shayan__ joined
|
|||
brokenchicken | hm, my math is wrong above | 00:42 | |
TEttinger | what's this compression thing? is it compressing the standard lib, or am I on the wrong track entirely? | 00:43 | |
that's pretty impressive in general | 00:44 | ||
00:44
shayan_ left,
shayan__ is now known as shayan_
|
|||
samcv | me? | 00:45 | |
uh it just compresses the text using base 40 | |||
so basically we have 40 "characters" A-Z + '-' + ' ' plus two left over | |||
TEttinger | so like base64, but case-insensitive? | 00:46 | |
samcv | so we can encode 3 characters into 1 16bit int | ||
well atm it's case-insensitive. but if we need other case we can add it | |||
because we have 2 left over characters, we can use those as 'shift' values. to shift to get more symbols | |||
so we get another 39 more | |||
TEttinger | ah, clever | ||
well | |||
samcv | so it stores text in 1/3 the size, and we seem to get another 1/3 less size savings because not having to store all these char * pointers | 00:47 | |
to all the unicode strings | |||
s/less/more | |||
TEttinger | hm | 00:48 | |
samcv | we can't access each name without going through the table, but we go through all the names anyway whenever we need to get a unicode name => cp | ||
like with "\c[ ]" | |||
and make a hash for future use | |||
00:48
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
samcv | but 1.8M to 600K is a huge improvement | 00:49 | |
well the savings may be more, these tests did not include any NULL pointers. which currently are in some of the unicode name tables. and instead of storing a 8bit null pointer we can store a 16bit "0" there instead | |||
so all the names end up an array of type unsigned short uninames[30000] = { 2, 31041, 5000...} | 00:50 | ||
2, 31041, 5000 encodes 'SPACE' if you were wondering | |||
TEttinger | neat | 00:51 | |
have you seen lz-string? | |||
samcv | we can store the 2 (number of base 40 numbers after it), in 1/2 the width of a null byte that would be at the end of a string | ||
TEttinger | not sure if it's relevant here | ||
samcv | plus we get the savings from storing 6 characters in 2 16bit ints | ||
does it work for compressing small strings? | |||
timotimo | there's still a lot of win to be had from compiling a list of common prefixes, i'd assume | 00:52 | |
samcv | true | ||
TEttinger | main site seems down, but the repo is up github.com/pieroxy/lz-string | ||
samcv | compressing with lz4, i get 25% of the size | ||
00:53
jonadab is now known as jonadab_
|
|||
timotimo | like, we already have that shift mechanism | 00:53 | |
TEttinger | lz-string has some interesting options for encoding as either 16-it unsigned ints or valid UTF-16 | ||
00:53
jonadab_ is now known as tsadok
|
|||
samcv | but we already get 1/3 the size as before. | 00:53 | |
TEttinger | or base64 chars | ||
samcv | and compressing with lz4 we get 25% the size, so | ||
TEttinger | wooo | ||
may not stack | |||
samcv | may as well do it this way? idk | ||
which TEttinger ? | 00:54 | ||
lz4 compressed? | |||
TEttinger | encoding as 16-bit and then lz4 may not give 1/4 of 1/3 | ||
samcv | yeah no it will not at all | ||
but 1/3 and 1/4 are pretty close | |||
TEttinger | :) | ||
samcv | and it's easy to have the strings be separated as units | 00:55 | |
timotimo | make one ANATOLIAN HIEROGLYPH, one APL FUNCTIONAL SYMBOL, one ARABIC, ARABIC LETTER or maybe just LETTER to go after ARABIC, ARABIC LIGATURE (or maybe just LIGATURE), BALINESE LETTER, BAMUM LETTER PHASE-, BOX DRAWINGS, BRAILLE PATTERN DOTS-, CANADIAN SYLLABICS, CIRCLED | ||
samcv | though i guess we could just parse it and have some item between each name, but. still doesn't seem to be that much of an improvement. plus we'd have to implement some decoding | ||
i would assume lz4 compression would do something similar? | 00:56 | ||
TEttinger | not sure what lz4 does differently from lzw | ||
samcv | xz compresses into 89K compared to 601K | ||
TEttinger | or lz-string, which is different again | ||
wow | |||
timotimo | COMBINING, CUNEIFORM (SIGN and NUMERIC SIGN), EGYPTIAN HIEROGLYPH, ETHIOPIC SYLLABLE, ... | 00:57 | |
probably want to build a dictionary of common substrings manually | |||
er | |||
automatically, *not* manually | 00:58 | ||
samcv | i mean we could even do that with base 40 | ||
timotimo | VAI SYLLABLE, YI SYLLABLE | ||
samcv | we have 2 left over things, so we can have one be shift, and then have 40 prefixes that are most common | ||
timotimo | yeah, that's what i was thinking | ||
BenGoldberg | .u 🏳 | ||
yoleaux | No characters found | ||
samcv | so could store a prefx in only two 16bit ints | ||
yeah that would be cool | 00:59 | ||
timotimo | would still be massive savings | ||
samcv | yeah | ||
probably get it down to how lz4 compressed it | |||
BenGoldberg | unicodable6, '🏳' | ||
unicodable6 | BenGoldberg, U+1F3F3 WAVING WHITE FLAG [So] (🏳) | ||
BenGoldberg, U+0027 APOSTROPHE [Po] (') | |||
samcv | should i try a different compression other than lz4? | ||
lz4 is just known to be faster and require less of a lookup table i *think* but i could be confusing it with something else | |||
yeah lz4 is what i meant | 01:00 | ||
timotimo | we have the benefit of not having to do any streaming encoding/decoding | 01:02 | |
and also we decompress a million times more often than we compress, so our compression is allowed to be slow as molasses | |||
samcv | yeah | ||
01:03
bwisti left
|
|||
samcv | i need to look into the naming of the CJK ideographs. | 01:06 | |
they are derived from their properties | |||
timotimo | if we decide that the majority of codepoint names start with a prefix that's in our table, we can assume the first entry in the list is always shifted and just make up a "forget it" value for shifted, so you can skip it in case we don't have a common prefix after all. that's a valid trade-off, too. | ||
do they have names officially? | |||
samcv | yes | 01:07 | |
well. they're not in Unidata.txt | |||
they have names though | |||
timotimo | oof | 01:08 | |
so right after we shrink our database a whole lot, it's gonna grow again | |||
anyway, i'll head to bed | |||
good luck with our compression scheme! :) | |||
we're definitely smart enough to build our own compression and decompression! | |||
samcv | err maybe it's not CJK | ||
BenGoldberg | If you're searching for common substrings, does that mean that some strings will start as ropes? | ||
samcv | maybe i'm thinking hangul. idk one of them is derived | ||
yeah it's Hangul | 01:09 | ||
timotimo | btw, how do we reach exactly 40? that doesn't seem like a power-of-two number to me | ||
01:09
BenGoldberg left
|
|||
samcv | it isn't | 01:09 | |
TEttinger | 40 * 40 * 40 fits in 2^16 | 01:10 | |
samcv | but base 40 numbers fit into 16bits | ||
that's the reason | |||
TEttinger | 64000 vs. 65536 | ||
41^3 is too big | |||
samcv | ^ | ||
TEttinger | I've done this math too, for hilbert curves | ||
timotimo | ah, of course | ||
thank you | |||
that's enough dumb from my end for tonight :) | |||
samcv | here's my perl 6 code to generate the base40 github.com/samcv/UCD/blob/master/l...Base40.pm6 | ||
01:10
BenGoldberg joined
|
|||
samcv | here is some sample code to do the decoding github.com/samcv/UCD/blob/master/base40decode.c | 01:11 | |
TEttinger | I made a 5x5x5 space-filling curve that can be used to construct a 40x40x40 hilbert curve that's s optimal as a cube gets in 3D | ||
somewhat interestingly, I did it visually, dl.dropboxusercontent.com/u/119146..._Curve.png | 01:12 | ||
timotimo | pretty output | 01:13 | |
samcv | base 40 is sorta simple, mostly you just have to remember it packs character triplets into base40, and the first character is the most significant place in the base 40 | ||
TEttinger | heh, that was... the input | 01:14 | |
timotimo | what did you export that as? did it land in blender? | ||
waitwhat :) | |||
01:14
Ben_Goldberg joined,
BenGoldberg left,
Ben_Goldberg is now known as BenGoldberg
|
|||
timotimo | hm, if i had to output something very pretty from a script, i'd probably write a povray script | 01:14 | |
(or what those are called) | |||
TEttinger | I made it in the 3d editor (magicavoxel) so I could tell what was going to work, then went through once i had a working 5x5x5 cube and plugged it through by hand to arrays of vertices | ||
timotimo | when i was little i had a lot of fun with Moray | 01:15 | |
ah, i see | |||
TEttinger | there are many, many possible 5x5x5 layouts, only some are "good" | ||
timotimo | i won't let this distract me from going to bed, though | ||
TEttinger | heh ok | ||
timotimo | seeya! | ||
TEttinger | (this one is bad because of a 4length straight line, dl.dropboxusercontent.com/u/119146...ve_old.png ) | ||
timotimo | maybe tomorrow i'll have to generate a povray scene or two from perl6 | 01:16 | |
TEttinger | cool | ||
01:16
bwisti joined
|
|||
timotimo | i haven't written povray script by hand ever | 01:16 | |
no promises at all. | |||
lucs | Why is the code shown in the Advent calendar only _twice_ as small as the surrounding text? | 01:23 | |
01:23
tardisx left
01:24
tardisx joined,
skids joined
|
|||
lucs | Why not smaller. How much smaller can it be. Really. | 01:24 | |
lucs eyes aren't getting better as he ages. | 01:25 | ||
01:27
skids left,
kaare_ left,
shmibs left,
drrho left,
alimon left,
mulk[m] left,
dp[m] left,
wictory[m] left,
telex left,
xfix left,
xinming left,
Ben_Goldberg joined,
BenGoldberg left,
Ben_Goldberg is now known as BenGoldberg
01:29
skids joined,
kaare_ joined,
shmibs joined,
drrho joined,
alimon joined,
mulk[m] joined,
dp[m] joined,
wictory[m] joined,
telex joined,
xfix joined,
xinming joined
01:34
espadrine_ left
01:36
cibs left,
geraud left,
dataf3l joined
01:38
llfourn joined
01:40
dataf3l left
01:41
dataf3l joined
01:43
llfourn left,
dataf3l left,
cog_ left
|
|||
brokenchicken | My grant proposal to TPF is now online for community feedback: news.perlfoundation.org/2017/01/gra...ation.html | 01:45 | |
brokenchicken drops to bed. | |||
01:48
cdg left,
labster left
01:50
tardisx left
|
|||
samcv | nice brokenchicken what time did you email it? i emailed mine this weekend, haven't gotten an email back yet. hope it was received | 01:50 | |
01:50
tardisx joined
|
|||
samcv | who did you email? | 01:50 | |
01:50
tardisx left
01:51
tardisx joined,
tardisx left
01:52
tardisx joined
|
|||
brokenchicken | samcv: O | 01:53 | |
samcv: I've used the online form: www.perlfoundation.org/how_to_write_a_proposal | |||
samcv: and it says you get reply within 24 hours, which I did | 01:54 | ||
samcv | hmm | ||
brokenchicken | samcv: you can email Makoto and ask tpf-grants-secretary@perl-foundation.org | 01:55 | |
samcv | it has a dash in the name? | ||
brokenchicken | yup | ||
That's where the confirmation email came from at least and the name is Makoto | 01:56 | ||
And that's the address listed on www.perlfoundation.org/contact_us | 01:57 | ||
01:57
tardisx left
|
|||
samcv | perl-foundation.org? tho the site says it's perlfoundation.org | 01:57 | |
01:57
tardisx joined
|
|||
samcv | ah i see | 01:58 | |
01:58
cog_ joined
|
|||
brokenchicken | samcv: I sent my on the 12th around 5pm EST | 01:59 | |
samcv | ok i sent it to that | ||
well I sent him a message | |||
hopefully it can still be posted this month, sometime | 02:02 | ||
i think my mail client is screwing up. argh | 02:07 | ||
don't even know if it sent anything. i have nothing in my sent folder | |||
mostly sure. it's in the sent folder at least | 02:08 | ||
ok got an email back. they will get back to me in a few days. yay | 02:17 | ||
02:21
kalkin- joined
02:22
labster joined
02:24
user_ left
02:25
buggable left
02:27
cibs joined
02:28
geraud joined
02:34
llfourn joined,
cale2 joined
|
|||
cale2 | Hey quick question | 02:34 | |
Does the compiler do any optimizations yet? | |||
02:36
tsadok left
|
|||
cale2 | For example, would it make the code faster to write in types or to write a proto method for your multis? | 02:37 | |
MasterDuke | cale2: frequently using native types is faster (e.g., int vs Int, str vs Str) | 02:43 | |
samcv | timotimo, in the first 10,000 unicode codepoints, there are 3990 occurrences of the word letter | 02:44 | |
so we should be able to compress pretty well. going to generate a report for all the unicode names and see what the 40 most common are | 02:45 | ||
so we'll have A..Z, '-', ' ', \shift | |||
and there could be one more, or we could leave 0 as null, which is convenient in generating the strings but not really required | |||
02:46
ilbot3 left
02:48
ilbot3 joined
|
|||
cale2 | Does anyone else find emoji to be a pretty absurd concept? When they introduced the skin tones, I think that's when they jumped the shark for me | 02:49 | |
02:53
aborazmeh left
|
|||
ttt | they made sense to introduce to support the encodings that already had them | 02:53 | |
samcv | so i think we may be able to save 204kb if these calculations are correct. well we can save more since i'm not weighting words for length | 02:54 | |
cale2, idk it evolved out of a need for standardization of text | 02:55 | ||
which is what Unicode does. but. it is a bit interesting | |||
ttt | yeah that's a good way to put it, heh. | ||
samcv | adding egyptian is just as absurd tbh | ||
but in a diff way | |||
but unicode does say that the eventual goal should be able to embed actual pictures or svg | 02:56 | ||
instead | |||
not gonna happen anytime soon. but even if i don't use emoji very much, some people do, which i think is good to take into account. just how unicode supports all these languages and odd scripts | |||
but the main reason they entered unicode was the japanese phone companies started having their own separate encodings for these emojis, and so unicode adopted them as standardized codepoints, and then it just took off from there | 02:57 | ||
i think codifying them in Unicode standard is what caused emoji to be adopted by the world outside of japan | |||
and one of unicode's big goals is to try and be able to take other encodings or take manuscripts possibly quite old, and be able to correctly transcribe them. which is why we have a slashed 0 character | 02:58 | ||
that is a different codepoint than '0' | |||
02:59
dalek left
|
|||
ttt | it *is* kindof nice to have interoperability with various chat systems, instead of them each having their own implementation | 02:59 | |
02:59
dalek joined,
ChanServ sets mode: +v dalek
|
|||
ttt | when people text me emojis and I receive it in google hangouts or on android or on ios, they just show up regardless | 02:59 | |
samcv | yeah. though i also think using actual pictures defeats the purpose of plain text | ||
characters have a semantic meaning, which emoji qualify for | 03:00 | ||
also like the country flags, are also kind of cool even though they are shitty to implement. | |||
if you see 3 regional characters, that's one flag. if you see 2, that's one flag. if you see three + two, then you have 2 flags | |||
next to each other | |||
ttt | I've been seeing people attempt to use the country flags | 03:01 | |
aren't the explicitly legacy/deprecated at the time they were introduced? | |||
samcv | i first thought that it was insane not to use a ZWJ between the regional indicators | ||
but i forget the reason, eventually figured out that would actually make things worse. forget the specifics | |||
Unicode is pretty damn purposeful with anything they do | |||
no ttt | |||
m: "\c[United States]".say | 03:02 | ||
camelia | rakudo-moar 703799: OUTPUT«🇺🇸» | ||
samcv | idk if you saw, but i added support for unicode sequences, to MoarVM | ||
so that ^ just got added like a few days ago | |||
m: "\c[United States]".uninames.perl.say | |||
camelia | rakudo-moar 703799: OUTPUT«("REGIONAL INDICATOR SYMBOL LETTER U", "REGIONAL INDICATOR SYMBOL LETTER S").Seq» | ||
cale2 | I just remember reading an article after the skin tones and the poop were released. The author's native language had yet to be implemented by unicode. He had some brilliant quote | 03:04 | |
samcv | heh | ||
what script did they use?/ language | |||
cale2 | "I can't write my own name, but I can let you know that I was specifically thinking about race when I sent you that smiley" | 03:05 | |
samcv | some languages have multiple scripts so there is a distincion | ||
XD | |||
emoji are a lot easier to add than full scripts though | |||
cale2 | i'd have to look back to find it | ||
samcv | requires so much more planning and thought regarding properties and such | ||
cale2 | Have you guys been reading these comments? www.reddit.com/r/programming/comme...?limit=500 | 03:06 | |
good reading material | |||
samcv | nope | 03:08 | |
03:18
bpmedley joined
03:21
llfourn left
03:26
cibs left
03:30
cibs joined
03:31
sortiz left
03:33
aindilis joined,
aindilis left
|
|||
samcv | ok yeah so we can save at least 212.108 KB if we have 29 words be values in our "shift" for the base 40 encoding | 03:33 | |
03:34
aindilis joined
03:35
cale2 left
|
|||
samcv | need to tweak the weighting a little more, and maybe we could have double shift, and so that would still only take up two bytes, instead of about 2/3 * 2 bytes | 03:36 | |
ttt | samcv: I didn't say so earlier, but \c[United States] is pretty cool. | 03:38 | |
samcv | :) | ||
yeah all the emoji sequences and emoji zwj work. and soonish will also do all the non-emoji unicode sequences. but before I do that i need to make it case insensitive and some other things | 03:39 | ||
also all 400+ Name Alias's have been added as well. as of this commit github.com/MoarVM/MoarVM/commit/81...49264335bf | 03:40 | ||
list of aliases is here ftp://ftp.unicode.org/Public/UCD/latest/ucd/NameAliases.txt | |||
the alias names also include corrections, since unicode names never change | |||
u: U+FE18 | |||
unicodable6 | samcv, U+FE18 PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRAKCET [Pe] (︘) | ||
samcv | see how this one is misspelled :P | ||
u: 0x2B7A | |||
unicodable6 | samcv, U+2B7A LEFTWARDS TRIANGLE-HEADED ARROW WITH DOUBLE HORIZONTAL STROKE [So] (⭺) | ||
ttt | I think a few have changed. That rule was introduced in some version after 1.0 iirc. | ||
samcv | wow that's uh | 03:41 | |
that's a bad error | |||
ttt | It's been a while since I last dove deep into Unicode though. | ||
samcv | the correction name for 2B7A: LEFTWARDS TRIANGLE-HEADED ARROW WITH DOUBLE VERTICAL STROKE | ||
ttt | it's a fun source of rabbit holes when you're wanting to find one to fall down. | ||
samcv | so the canonical name says horizontal, but the correction is that it's actually vertical | ||
wow | |||
sucks when you are the person who misspelled bracket. wonder if that person got fired ;) | 03:42 | ||
ttt | I haven't successfully used Perl6 for much real/productive work yet, but I suspect I'm going to get a lot of mileage out of it on some various Unicode-centric/Unicode-heavy tools I have been meaning to make. | 03:43 | |
samcv | nice | ||
ttt | It's very nice, in that context, how quickly it integrates new Unicode versions. | 03:44 | |
so congrats all on that, I guess :) | |||
samcv | :) | ||
i have submitted a grant proposal to continue working on the Unicode, so i hope that gets accepted after they publish it. | |||
will be able to make all the big changes i've been toying around with | |||
03:44
llfourn joined
|
|||
samcv | 1.8MB => 600K and may be able to save another 250K off that. so should reduce the size of the library a lot | 03:46 | |
03:47
xtreak joined
03:52
aindilis left
03:54
noganex joined
|
|||
ttt | samcv: do you have a blog or any articles about your Perl6 work? | 03:56 | |
samcv | i have a blog. cry.nu is the site. i need to get it syndicated on pl6net.org tho | ||
and really need to do one about all the Unicode work i've done thus far | 03:57 | ||
03:57
noganex_ left
|
|||
ttt | I look forward to it :) | 03:57 | |
04:02
faraco joined
|
|||
diakopter | samcv: you should compare to the on-disk and in-memory size of libicu too :p | 04:13 | |
04:15
Vijay_ joined
04:16
ggj_ left
|
|||
Vijay_ | JOIN | 04:16 | |
samcv | it's 26MB diakopter | ||
on disk | |||
libicudata.so.58.2 | |||
04:17
Vijay_ left
|
|||
diakopter | samcv: well, presumably it has tons of stuff precomputed, right? | 04:18 | |
samcv | probably | ||
idk | |||
i think they do localization stuff too maybe? | 04:19 | ||
no clue | |||
i think they may tho | |||
diakopter | .u :laughing: | ||
yoleaux | U+003A COLON [Po] (:) | ||
U+0061 LATIN SMALL LETTER A [Ll] (a) | |||
U+0067 LATIN SMALL LETTER G [Ll] (g) | |||
diakopter | *headdesk* | ||
what document defines those emoji :ascii: | |||
samcv | none | 04:20 | |
diakopter | surely they are somewhat standardized | ||
samcv | i don't think they're the full names | ||
well. i only know abuot the official unicode ones :\ | |||
diakopter, i'm sure some of them are just the names of those characters | 04:21 | ||
diakopter | I see those shortcut ones lots of places | ||
yes, it's mostly "replace spaces with underscores, and sometimes drop some redundant suffixes" | 04:23 | ||
such as "last quarter moon symbol" becomes :last_quarter_moon: | 04:24 | ||
well, there's plenty of much shorter abbreviations too. | 04:26 | ||
samcv: yeesh, there's an emoji 5.0 beta | 04:27 | ||
04:29
faraco left
04:39
Ven left
04:40
Ven joined
04:41
cpage left
|
|||
samcv | yeah | 04:43 | |
04:45
cpage joined
|
|||
Geth | cosystem: b5cf76b2a8 | faraco++ | META.list removed WebService::Gitter |
05:00 | |
05:04
faraco joined
05:08
Ven left
|
|||
Geth | cosystem: 5770aba212 | MasterDuke17++ | META.list Removing List::Combinations The built-in functions are now fast enough that this module is no longer needed and it has been marked as deprecated for the past four months. |
05:09 | |
05:10
Ven joined
05:15
CIAvash joined
05:36
Cabanossi left
05:37
Cabanossi joined
05:39
bwisti left
05:47
Actualeyes left
05:55
khw left
|
|||
samcv | I think I almost have the hang of setting up a shift level which contains strings. at least from the perl 6 side | 05:56 | |
for now only splitting words based on spaces, i will have to compare the two and see what yields the best compression. though technically could be the biggest compression if we compare substrings too, that makes it somewhat complicated | 05:59 | ||
06:00
eythian left
|
|||
samcv | the top 40 words award goes to "SYLLABLE","HIEROGLYPH","MATHEMATICAL","COMPATIBILITY","CAPITAL","CUNEIFORM","SMALL","SIGN","EGYPTIAN","WITH","SIGNWRITING","ARABIC","LATIN","SYLLABICS","SYMBOL","CANADIAN","ANATOLIAN","TANGUT","LIGATURE","COMBINING","SANS-SERIF","ETHIOPIC","CYRILLIC","MUSICAL","DIGIT","HANGUL","LINEAR","VOWEL","TIMES","BAMUM","RADICAL","FORM","CIRCLED","ARROW","CJK","VARIATION","ITALIC","GREEK","BYZANTINE","NUMBER" | 06:00 | |
ttt | is that in order | 06:03 | |
geekosaur | looks not unlikely | 06:04 | |
ttt | how come "LETTER" isn't in there? | 06:05 | |
I guess my impressions are skewed because the parts of unicode I use and refer to a lot are really a small subset of the total. | |||
06:05
thayne joined
|
|||
BenGoldberg | .u Z | 06:07 | |
yoleaux | U+005A LATIN CAPITAL LETTER Z [Lu] (Z) | ||
06:08
rindolf joined
06:10
BenGoldberg left
|
|||
ttt | hrm... anyone else having problems accessing doc.perl6.org ? | 06:12 | |
er, docs.perl6.org | |||
06:13
eythian joined
|
|||
ttt | looks like it needs a poke. | 06:13 | |
06:15
RabidGravy joined
|
|||
samcv | ttt, that is in order | 06:18 | |
06:18
sftp left
06:19
sftp joined
|
|||
samcv | so it goes from 2.2MB to 2.6MB in source (source also has comments of the names in text next to the data structure) | 06:20 | |
compiled it goes from 601K to 470K | 06:21 | ||
so i guess it saved half the amount it estimated it would. need to tweak that estimation function. but manually decoding it seems to indicate it's working properly | 06:27 | ||
need to add a p6 decode function so i can write some tests for it | 06:28 | ||
hmm may save more space if like it uses "SYLLABLE " instead of "SYLLABLE" as the word. still not sure the best way to have it compute it for all possible combinations | 06:29 | ||
and 'LETTER' is in all but 2 cases only found with spaces on either side. so could save space there | 06:30 | ||
i think the spaces case may be most likely and probably the easiest to program and check. compare estimates of byte saved with spaces before/after/both/neither | 06:31 | ||
but then what if you get like CAPITAL LETTER, then if LETTER encodes on both sides then can't do "CAPITAL ", ahh | 06:32 | ||
06:32
bjz joined
06:33
skids left
|
|||
samcv | oh wait ttt that's not actually the most seen list | 06:33 | |
that's in order of bytes saved if we encode the whole word as 4/3 a byte | |||
06:33
thayne left
|
|||
samcv | i think the estimation method i'm using is flawed. because i do .chars - 2/3 * 2. but we're now saving it compared to encoding as a string, we should compare to as encoded in base 40. let me see if the order/words change if i do that | 06:36 | |
should be (.chars * 2/3) - 2/3 * 2 | |||
06:36
ChoHag left
|
|||
geekosaur | do you get anything by pulling the top 160 words and encoding those as bytes in 0..31 + 128..255? | 06:39 | |
06:40
llfourn left
|
|||
samcv | hmm I don't understand what you mean | 06:42 | |
new 40 is: "SYLLABLE","HIEROGLYPH","MATHEMATICAL","COMPATIBILITY","CAPITAL","CUNEIFORM","SMALL","EGYPTIAN","SIGN","SIGNWRITING","WITH","ARABIC","SYLLABICS","SYMBOL","LATIN","CANADIAN","ANATOLIAN","LIGATURE","COMBINING","SANS-SERIF","TANGUT","ETHIOPIC","CYRILLIC","MUSICAL","DIGIT","HANGUL","LINEAR","VOWEL","TIMES","BAMUM","RADICAL","CIRCLED","VARIATION","BYZANTINE","ARROW","ITALIC","NUMBER","FORM","GREEK","PARENTHESIZED" | 06:44 | ||
geekosaur | find the top 160 words across all descriptions, map each to a single byte with a value in the two non-graphic ranges. so \x00 might map to LETTER, \x01 to SYLLABLE, etc. --- this assumes that descriptions only use bytes in the range 0x20 .. 0x7f (which is likely a little too large but you gain from needing fewer tests for in-range) | 06:45 | |
samcv | so it's a little altered, it saved 8 bytes in the final compiled file | ||
well i will have a 2nd level shift as well. so that's the top 80 words + compressing all the rest of the text into 2/3 the size | 06:46 | ||
geekosaur | if it's guaranteed to not use anything in 0x60 .. 0x7e (0x7f is DEL so not used) then you get another 32 codes to replace words; that range is ` a-z { | } ~ | ||
samcv | idk if that would store better. but it's maybe possible | 06:47 | |
i get what you mean though | |||
i guess I could compute that. so should assume that 160 number values we will have? | |||
to encode the words that is | 06:48 | ||
geekosaur | well, I did say top 160. I suspect you won't even reach that though as it may not be worth applying to words of length < 4 (I mean, they'd still compress but the gain might not be worth it unless they're *really* common) | 06:49 | |
06:49
bjz left
|
|||
timotimo | samcv: i recommend not storing an actual null byte since we're already storing the amount of base-40-pieces at the beginning | 06:50 | |
samcv | well we store the number of null bytes, not the number of characters it encodes | ||
timotimo | how many occurences of the 41th most common string are there? | ||
samcv | well timotimo we only encode a null byte for the base level, that encodes characters | 06:51 | |
the shift level has no null byte | |||
since it's assumed after a shift character there will always be something after | |||
timotimo | right, but you only ever have a null byte at the end of a string and we already exactly know where that is, so ...? | ||
samcv | and not just have a shift hanging off the end | ||
but we can encode a space and a word into 2 bytes | |||
but i guess we could do the same with the proposed method. give me a sec to compile some numbers | 06:52 | ||
timotimo | i don't understand what you mean by "a space and a word"? | ||
samcv | well timotimo, if we have 2 base 40 numbers, it could encode 6 chareacters or 5 | ||
shift + word + space fits into one base 40 number | |||
which is 2 bytes | 06:53 | ||
timotimo | oh | ||
i'd still say we should keep a space at the end of our short-cutted words (and not at the beginning) | |||
samcv | but we could check the range | ||
timotimo | the range? | 06:54 | |
samcv | the highest place of the base 40 number | ||
which encodes the 3rd character | |||
well we could encode a null at the end of the numbers in case there's not already a null there implicitly due to that place being 0 | |||
timotimo | by character do you mean shift, word, space? | ||
samcv | that could save bytes | ||
character as in uhm. one thing | 06:55 | ||
1 charecter, or 1 shift + thingy(which would become a word) | |||
timotimo | we could call one third-twobyte a codeme | ||
samcv | well i mean two characters would be one word | ||
codeme? k | 06:56 | ||
timotimo | i don't understand how encoding a 0 would be able to save storage space | ||
samcv | well a 0 is implicit if the length of the codeme's is not divisible by 3 | ||
so you have XXX|XXX|XX | 06:57 | ||
there's an implicit 0 at the end | |||
timotimo | ah, right | ||
so basically what base64 has == for | |||
samcv | so we could save room by explicitly adding a 0 | ||
which would result in the same thing for codeme divisible by 3 | |||
err. wait. it would not be the same thing | |||
but it would be the same for if they were like 9 + 1, or 9+ 2 | 06:58 | ||
so assuming random distribution of number of codeme's that would save us about 2/3 of 2 bytes for each unicode name | |||
on average | 06:59 | ||
timotimo | i'm still confused, i think | 07:00 | |
samcv | just think of it as each base 40 number encodes 3 characters max | ||
timotimo | you mean each two-byte sequence, right? | 07:01 | |
samcv | yeah they're two bytes. but yeach base 40 number is two bytes | ||
07:01
faraco left
|
|||
timotimo | ok, number rather than digit | 07:01 | |
samcv | the base 40 number has 3 significant digits. the most significant one encodes the 1st character, middle one encodes third | ||
and least significant encodes the 3rd character | 07:02 | ||
07:02
bjz joined
|
|||
timotimo | that was at least one source of confusion | 07:02 | |
samcv | yeah. it was confusing for me for a while | ||
07:02
domidumont joined
|
|||
samcv | no worries :P | 07:02 | |
07:03
holli_ left
|
|||
timotimo | i still don't know how we save space by encoding an explicit 0 that's not already enforced to be encoding some sort of padding anyway | 07:03 | |
btw, all unicode names are less than 40 characters long, aren't they? | |||
m: say (^10000).map(&uniname).map(*.chars).minmax | 07:04 | ||
camelia | rakudo-moar 703799: OUTPUT«3..75» | ||
timotimo | oh, are not ... by far! | ||
m: say (^10000).map(&uniname).map(* => *.chars).minmax(:by(*.value)) | |||
camelia | rakudo-moar 703799: OUTPUT«"<control-0000>" => 14.."ZERO WIDTH NON-JOINER" => 17» | ||
timotimo | wat :) | ||
samcv | hah | 07:05 | |
timotimo | oooh | 07:06 | |
of course, the whatever code takes two arguments | |||
at first i thought "yeah, i want two arguments!" | |||
nope, i really, really don't | |||
samcv | we save space because we don't have to encode a number of following base 40 numbers | ||
so now we have like: 2,4999,39999 | |||
timotimo | ARABIC LETTER BEH WITH THREE DOTS POINTING UPWARDS BELOW AND TWO DOTS ABOVE => 75 | ||
samcv | would encode one unicode name | ||
sorry typo, | 07:07 | ||
so now we have like: 2,4999,3999 | |||
and if that actually is made up of 5 or 4 codeme's, then we can remove the leading 2 | |||
07:07
domidumont left
|
|||
samcv | since those empty significant base 40 digits 0 | 07:08 | |
timotimo | but how do we know that the first one was elided? | ||
samcv | and for the ones where it is multiples of 3 codeme's, we just add another to the end that is a 0 | ||
hmm? | |||
07:08
domidumont joined
|
|||
timotimo | well, if we remove a leading 2, how do we know to put it back when decoding? | 07:09 | |
samcv | the leading 2 only encodes the number of numbers coming after it which are part of one unicode name | ||
it doesn't hold any other data, except the number of integers following it | |||
timotimo | ah, now i get it! | ||
samcv | ok! | ||
:) | |||
timotimo | it's because we'll never have a unicode name that's like a few hundred characters long | 07:10 | |
samcv | if we wanted to go hard mode i guess we could even have them cross 16bit integer bounderies | ||
07:10
Tonik joined
|
|||
samcv | so X0X may be stored in one integer but the unicode names start and begin in the same integer. but that sounds a pair | 07:10 | |
timotimo, not really. it would work fine if it were really long | |||
timotimo | we might then need to encode indices into that table as bigger numbers | 07:11 | |
samcv | but that may be faster for processing though | ||
if we had really long strings | |||
Geth | cosystem: 02aa8bdda4 | (Stefan Seifert)++ | META.list Inline::Python now uses META6.json instead of META.info |
||
timotimo | like, our indices will now have to be divided by 3 to get the right 2-byte-offset | 07:12 | |
samcv | if we had bigger numbers? | ||
timotimo | well, i mean, if we want to have names overlap at beginning and end | 07:13 | |
geekosaur just histogrammed uniname... bah, that's not as amenable to word compression as I hoped | 07:14 | ||
07:15
Tonik left
07:21
beatdown joined
07:27
Actualeyes joined
07:28
darutoko joined
07:36
wamba joined
|
|||
geekosaur | tot 120240 cpr 70027 sing 9571 chr 4133 | 07:36 | |
taking the corpus as .uniname over ^0x10fff + the second column in NameAliases.txt, there are 9571 singletons, 4133 single-character "words" (all letters A-Z), 120240 words overall of which 70027 are compressed to a single byte with the 160 top words encoding (ignoring aforementioned letters as not worth wasting a slot) | 07:38 | ||
07:38
kyan left
|
|||
samcv | yeah that's what I expected :\ | 07:40 | |
the most common 40 names have most of the values, but after that it kind of drops off | |||
timotimo | oh, is 40 the sweet spot? | 07:41 | |
geekosaur | but actually I confirmed I can steal another 32, so :) | ||
samcv | hah | ||
geekosaur | which raises it to 72165 compressible, haven't computed space savings. note though that this encoding means many spaces go away too | 07:42 | |
samcv | spaces? | ||
oh | |||
geekosaur | because I'm not bothering with prefix/suffix (too much complexity for too little gain) | ||
samcv | wait you're not doing by word? can i see a gist? | 07:43 | |
geekosaur | that is, I suspect I gain far more by being able to elide spaces around/between encoded words than I would by supporting prefixes or suffixes | ||
? | |||
samcv | can I see how you're generating the top 130 or however many substrings? | ||
timotimo | hm .. we could totally encode only the words themselves and then have a little bit of tracking (like an actual bit) to control whether we have to emit a space or not | 07:44 | |
especially for cases where one compressed word follows another compressed word | |||
samcv | about 60 may be the sweet spot | ||
moritz | are you two inventing a custom compression algorithm? | ||
samcv | but i found that, for the second shift level | ||
gains were less than 10% of the first shift level | 07:45 | ||
timotimo | moritz: yes! :D | ||
moritz | couldn't you use zlib or lzma or something, build a dictionary from the complete corpus of Unicode names, and then compress each name individually? | ||
timotimo | 020733 timotimo │ we're definitely smart enough to build our own compression and decompression! | ||
oh no, not another 3rd party dependency! ;) | |||
samcv | heh | ||
moritz | oh, I'm not doubting your smarts | ||
just that using a well-tested, externally developed library might be much more maintainable | 07:46 | ||
timotimo | i'm not sure how easy it is to share one dictionary across multiple compression runs | ||
moritz | me neither, but I think that's what HTTP/2 does for its header compression | 07:47 | |
timotimo | right, but that's also a custom solution :) | ||
moritz | so you're not the only ones having that particular problem | ||
samcv | Can save: 142.424667 KB with first shift level | ||
Can save: 24.078 KB with the second shift level | |||
timotimo | like, they have their own pre-defined dictionary that's shared between all HTTP/2 implementations | ||
moritz | and there are many HTTP/2 implementations, so there should be some libraries that support that | 07:48 | |
samcv | i'm going to generate it all with explicit encoding of null at the end. and see. that should probably save quite a bit of space… | 07:50 | |
2 bytes * 2/3 * number of unicode names | |||
geekosaur | gist.github.com/geekosaur/1c44e854...1bfdf31575 | ||
moritz | blog.cloudflare.com/improving-comp...ictionary/ "The utility to make a dictionary for deflate can be found at github.com/vkrasnov/dictator. | 07:51 | |
The optimized version of zlib used by CloudFlare can be found at github.com/cloudflare/zlib" | |||
timotimo | "dictator" <3 | ||
samcv: i just thought about something else | |||
moritz | sorry, I shouldn't be ruining your fun engineering project :-) | ||
timotimo | samcv: the size of a unicode name is implicitly stored in the table that gives us codepoint-to-name offsets | ||
because offset[cp + 1] - offset[cp] equals the length | 07:52 | ||
samcv | which table are we talking about | ||
timotimo | that could save us 16 bit per name | ||
(how much is that?) | |||
moritz has a very old blog post on how to create huffman trees with Perl 6 | |||
ttt | question: is this largely an exercise undertaken because it's fun and you can, or are there strong reasons to want this data to be as small as possible on-disk and/or in-mem ? | 07:55 | |
geekosaur suspects he's not using the full corpus since 27M was tossed around earlier and this is nowhere near that | 07:56 | ||
timotimo | isn't 27M libicu? | 07:57 | |
which has a lot more stuff in it | |||
geekosaur | ah | ||
samcv | ok so i have it down to 430K | 07:58 | |
from 470K after explicitly adding a null | |||
and removing the leading numbers that denote how long each unicode name is | 07:59 | ||
timotimo | neat. | ||
ttt | and I wasn't trying to snark or anything, just legitimately curious about the motivations. | 08:00 | |
timotimo | ttt: well, libmoar.so is about 5.8 megabytes big (after stripping debug info out), and we're saving on the order of three quarters of a megabyte all in all | ||
samcv: is 3/4 megabyte saving about right? | |||
samcv | uhm. it is 1.7MB now | ||
just the names | |||
08:00
shayan_ left
|
|||
samcv | nothing else, like indexes or any code. but just an array of all the names which is what we do now, that comes in at 1.7MB | 08:01 | |
so i have that down to 430K | |||
timotimo | oooh, so 1 1/3rd megabyte | ||
samcv | also that is not including any null pointers or characters with no values to make comparison easier | ||
yea | |||
m: say 1.7 - .430 | |||
camelia | rakudo-moar 703799: OUTPUT«1.27» | ||
timotimo scrolls through a hexdump of libmoar.so | 08:03 | ||
ttt | ok, so significant savings for sure. what makes the size of libmoar.so matter, though? is it that people will criticise it as bloated? or could it instead be statically linked at some point in the future when there's a p6-to-exe? or are you thinking of support for embedded/SoC platforms? | ||
timotimo | so many zero bytes | ||
ttt | again just curious, might sound snarky but it's not. | ||
08:03
domidumont left
|
|||
timotimo | rakudo's memory footprint is ... pretty hefty at the moment | 08:03 | |
08:03
domidumont joined,
xinming left
|
|||
ttt | ah ok, so looking for ways to trim that by whatever means, and this is low-hanging fruit? | 08:04 | |
timotimo | well, samcv is working on our unicode stuff in general | ||
samcv | ^ | ||
timotimo | and as a mostly volunteer-driven project, perl6 depends on people doing things that'll keep them happy. -Ofun and all that | ||
08:05
avuserow left
|
|||
samcv | right now unicode.o is uhm | 08:05 | |
08:05
bpmedley left
|
|||
samcv | 4.1MB | 08:05 | |
08:05
ChoHag joined
|
|||
jast | -Ofun is not a valid option for perl6 nor moar :( | 08:05 | |
samcv | it should be :D | 08:06 | |
Grouped options '-Ofun' contain 'O', which is not a valid option | |||
timotimo | 001e8b90: 488b 45d0 488b 4008 4889 45e8 488b 45d0 H.E.H.@.H.E.H.E. | ||
^- libmoar seems fun | |||
samcv | HEHEHE | ||
08:06
avuserow joined
|
|||
timotimo | seriously, check out that general area in the binary, it's full of H.E.H.E. and such | 08:06 | |
also some P and some M, and also U | |||
but so much HEHEHE in there | 08:07 | ||
jast | the linker has an odd sense of humour | ||
actually I guess linking isn't the right word for this | |||
timotimo | *shrug* | 08:08 | |
have we actually checked out if our compilers put the unicode database into the shared memory segment? | |||
08:09
Ven left,
bpmedley joined
|
|||
samcv | no | 08:10 | |
how do i inspect that timotimo | |||
timotimo | well, there's that blog post from yesterday where there was a tool | ||
randomascii.wordpress.com/2017/01/...nst-there/ | 08:11 | ||
seems windows only? | |||
samcv | yeah i saw that | ||
08:12
Ven joined
|
|||
abraxxa | how can I debug when no panda command does anything and simply hangs? | 08:12 | |
samcv | did you install any modules? | 08:13 | |
or has it always been like this | |||
ttt | let me take this moment to ask a FAQ: should I use panda or zef? | 08:14 | |
samcv | i use zef. because it allows updating of modules | ||
zef upgrade | |||
which is nice | |||
timotimo | zef is cool | 08:15 | |
08:17
xinming joined
08:20
nowan left
|
|||
andrzeju_ | :) | 08:22 | |
hello perl6 | |||
samcv | wow there really are a ton of null in libmoar.so | ||
timotimo | columns of zeroes | 08:23 | |
samcv | ^ | ||
timotimo | i'm not entirely sure how to figure out what some random address in a .so file corresponds to | ||
sammers | hello | 08:24 | |
08:24
xtreak left,
nowan joined
|
|||
samcv | hello! | 08:26 | |
08:26
xtreak joined
08:29
nowan left
08:31
nowan joined
|
|||
samcv | u: movement-floorplane | 08:33 | |
unicodable6 | samcv, U+1D929 SIGNWRITING MOVEMENT-FLOORPLANE FINGER CONTACT [So] (𝤩) | ||
samcv, U+1D965 SIGNWRITING MOVEMENT-FLOORPLANE SINGLE STRAIGHT SMALL [So] (𝥥) | |||
samcv, gist.github.com/4f0750381ab74f53e7...0fb9981260 | |||
samcv | timotimo, i guess there's not an unsmall number of them | 08:34 | |
for how long they are | |||
timotimo | interesting. those could grow SIGNWRITING at the start, too, apparently | ||
for even more savings | |||
it's like black friday! | |||
samcv wonders if splitting on '-' in addition to ' ' would improve compression. but it is really easy for me to check | |||
timotimo, signwriting is one of the 1st level shifts fyi | |||
timotimo | ah | ||
we could go through all words in the dictionary and see what percentage every other word has for coming before or after it | 08:35 | ||
and if we find something with ~75% we can put the combinaiton in, too | |||
(and the not-combined part would get demoted a little bit) | |||
samcv | if you want to see all of them gist.github.com/samcv/5ff9fe04cbea...2de8202290 | ||
timotimo | i was about to ask :) | 08:36 | |
samcv | the lower numbers indicate more savings | ||
timotimo | could you sort those by value? :) | ||
samcv | heh | ||
k | |||
i just .perl'd them i think | |||
timotimo | right, it sorts by key by default | ||
how come smaller numbers are better? i could imagine "number of bytes saved" as a metric, but that'd go the other way | 08:37 | ||
samcv | well. if you want to see the bytes saved table i will dump that out too | 08:38 | |
08:38
FROGGS joined
|
|||
timotimo | oh! those are actually the value that you put into the table! | 08:38 | |
that makes sense now | |||
i didn't realize it was actually a numbering, rather than a scoring | 08:39 | ||
u: triangle-headed | |||
unicodable6 | timotimo, U+279D TRIANGLE-HEADED RIGHTWARDS ARROW [So] (➝) | ||
timotimo, U+279E HEAVY TRIANGLE-HEADED RIGHTWARDS ARROW [So] (➞) | |||
timotimo, gist.github.com/5396500e5f66a1210e...5a974e250f | |||
timotimo | oh wow, those are a lot actually | ||
08:39
Ven left
|
|||
timotimo | it's interesting that horizontal and vertical get put in so far apart | 08:40 | |
i suppose there's a bunch of codepoints where the "normal" version is horizontal, and there's an extra version that's vertical ... or something | |||
samcv | well it's scoring and numbering | ||
the lower numbers were scored higher | 08:41 | ||
timotimo | right | ||
samcv | sometimes timotimo but often not | ||
timotimo | what i mean is that vertical gets 13th place in second shift, but horizontal gets 30th place | ||
in second shift, that is. | |||
08:42
Ven joined
|
|||
samcv | ah | 08:42 | |
timotimo, i'm going to set the cutoff at 10 bytes savings | 08:45 | ||
this is cumulative savings over all of the unicode names btw | |||
generating that list now | |||
08:45
g4 joined,
g4 left,
g4 joined
|
|||
samcv | tried dumping it all and it spit out loads of ones that save like half a byte :P or ones that lose us bytes | 08:46 | |
timotimo | hah, right | ||
hey you could encode an A as 16 bits! | 08:47 | ||
samcv | gist.github.com/e28ad27879439a5e06...ecc23f3e04 | ||
if it was second shift level it'd be 16bits yeah | |||
timotimo | i find this fascinating in general | 08:48 | |
even 10 bytes saved is a pretty low cut-off | |||
samcv | true | ||
timotimo | how do you feel about adding a shift three? ;) | 08:49 | |
samcv | that's fine. do you want me to only print out the ones it CHOOSES for shift one or shift two? | ||
that would prolly be more useful. since there is overlap in this | |||
timotimo | oh! there is? | ||
samcv | yeah. | ||
if you scroll down to shift two section | |||
it's the exact same things | |||
but the calculation is if the letter was shift two | 08:50 | ||
timotimo | then i'll just have to look at the first 40 of shift one, and the second 40 of shift two, right? | ||
hm, not necessarily | |||
samcv | ^ | ||
let me generate again | 08:51 | ||
timotimo | remember the HEHEHEHEHE? that's the .text section | ||
aha, here's the unicode names now | 08:52 | ||
inside the .rodata section, which is where we want them | |||
i found the place where we store all our money, it's right next to the place we store all our food! | |||
i.imgur.com/qqBEsN0.png | 08:53 | ||
abraxxa | samcv: I installed 2016.12 + panda using rakudobrew yesterday and wanted to install DBIish now | ||
timotimo | aha, here's armor, ammunition, and also gemstones, too. and a whole storage full of doors! | ||
wait ... what the frickin hell is this place | 08:54 | ||
geekosaur | if I parse it as dcss, there's a small army of panlords guarding the food and money :p | ||
timotimo | i.imgur.com/IN6hYzp.png - www.youtube.com/watch?v=ue3yvxckQbA | ||
abraxxa | after ages it printed out some lines: paste.scsys.co.uk/540751 | ||
timotimo | the bunch of eights goes on for multiple screenpages | 08:55 | |
geekosaur | lot ogf d838 with the occasional d738 | ||
timotimo | yes | ||
pages upon pages upon pages of that over and over | |||
samcv | so many 8's | 08:56 | |
so so many 8's! | |||
timotimo | eight. eight. eight. eight. | ||
samcv | ah | ||
08:56
zakharyas joined
|
|||
geekosaur | pity you can't really store object files compressed on disk because you'd lose all the advantages of being able to demand page directly from shared objects | 08:57 | |
timotimo | see how it even has a fullstop after each eight. | ||
geekosaur | statue maze :p | ||
samcv | here you go timotimo gist.github.com/samcv/1d391efb2707...5fe0d35140 | ||
geekosaur | looks like the lair hell ending writ huge | ||
timotimo | is anybody actually watching that youtube video i shared %) | 08:58 | |
it's highly relevant | |||
the actual libmoar.so also has TANGUT COMPONENT-\d\d\d\d | 08:59 | ||
" | |||
samcv | timotimo, i'm sure we could easily add like unlimited shift levels | ||
heh | |||
timotimo | i imagine since it has a - there, it won't get into your script at all | ||
because, after all, those are all different words! | |||
samcv | yeah | ||
let me split on space and - | |||
timotimo | and the CJK COMPATIBILITY IDEOGRAPH-\x\x\x\x\x are also in there | 09:00 | |
i imagine they are not much more than the offset from some position in hexadecimal? | |||
and all 255 variation selector-\d\d | |||
samcv | ok splitting at the - now | 09:01 | |
will let you know when it's complete | |||
abraxxa | zef update hangs as well, what connection does it use? | ||
timotimo | we could put in the split and non-split variants both and maybe one of the two wins :) | ||
samcv | well we will have losses depending on the thing | ||
some will have gains some losses | 09:02 | ||
idk maybe there's a clever way, because sometimes there's some this-that, and also exists this that | |||
09:02
dakkar joined
|
|||
samcv | ok we save 174KB on both levels now versus 166.502667 KB | 09:02 | |
09:02
ihab left
|
|||
timotimo | have a special character in the middle and a "variation selector" that tells it whether it should put in a space or a dash | 09:03 | |
samcv | what | ||
timotimo | hey! i found all the hexadecimal numbers! | ||
samcv | lolll | ||
timotimo, here's the updated list gist.github.com/samcv/11a9c817512a...fe08524885 | 09:04 | ||
timotimo | well, we store THIS%THAT and we either put shift-2 99 0 or shift-2 99 1 | ||
shift-2 99 0 will give THIS THAT, shift-2 99 1 gives THIS-THAT | |||
samcv | well shift two takes up 4/3 of a byte | 09:05 | |
er. | |||
no | |||
2/3 | |||
so we're down to 422KB compiled size | |||
timotimo | we might want to give alias names the same treatment | ||
samcv | there aren't that many alias names | ||
like 150 | |||
timotimo | like, "skin tone" alone could save a kilobyte or two | 09:06 | |
samcv | XD | ||
you mean the sequence names? | |||
timotimo | oh, yeah | ||
maybe i'm being fooled by how narrow the column is in xxd | |||
samcv adds in shift three | |||
timotimo | 4cae70 004d6f7a 616d6269 71756500 4d72732e .Mozambique.Mrs. | ||
4cae80 20436c61 75733a20 6461726b 20736b69 Claus: dark ski | |||
4cae90 6e20746f 6e65004d 72732e20 436c6175 n tone.Mrs. Clau | 09:07 | ||
samcv | lets have unlimited shifts! | ||
timotimo | 4d42a0 6469756d 2d6c6967 68742073 6b696e20 dium-light skin | ||
samcv | as long as it saves bytes :P | ||
timotimo | 4d42b0 746f6e65 00c3856c 616e6420 49736c61 tone...land Isla | ||
4d42c0 6e647300 00000000 02000000 e6f10100 nds............. | |||
samcv | i wonder how many shifts we'd have | ||
timotimo | m: say 0x4d42c0 - 0x4cae7 | ||
camelia | rakudo-moar 703799: OUTPUT«4749273» | ||
samcv | since we'd get diminishing returns | ||
timotimo | m: say (0x4d42c0 - 0x4cae7) / 1024 | ||
camelia | rakudo-moar 703799: OUTPUT«4637.961914» | ||
timotimo | wait, if that's kilobytes ... we have 4 megs of sequence names? | ||
i must have made a big mistake | |||
oh yeah | 09:08 | ||
m: say (0x4d42c0 - 0x4cae70) / 1024 | |||
camelia | rakudo-moar 703799: OUTPUT«37.078125» | ||
timotimo | should have copy-pasted instead of typing it in | ||
samcv | yeah that's not possible :P | 09:09 | |
timotimo | "and the remaining 2400% are in this section over here" | 09:10 | |
09:11
jonas1 joined
|
|||
timotimo | we're not measuring how much space it'll take to actually store the dictionary, but it ought to be less than a kilobyte or two | 09:11 | |
samcv | yeah | 09:12 | |
true | |||
haha | |||
this is assuming you're saving more than like the number of bytes in the string | |||
maybe should factor that in | |||
ok i can get 185.505333 KB of saving with three shifts | 09:13 | ||
saves 11KB with the 3rd level | |||
timotimo | u: times | ||
unicodable6 | timotimo, U+2062 INVISIBLE TIMES [Cf] () | ||
timotimo, U+2297 CIRCLED TIMES [Sm] (⊗) | |||
timotimo, gist.github.com/91b8e85a1df515ae60...8168b9c7a9 | |||
timotimo | aha, cuneiform again | ||
samcv | gist.github.com/samcv/a5a8bc715d39...8e8483597c here's the 3 levels | 09:14 | |
timotimo | okay, returns start diminishing pretty strongly here | ||
samcv | idk we could even be fancier and have one of the characters on the first shift level be a different shift | ||
timotimo | we could, yeah | ||
samcv | but the third level only saves 11KB | 09:15 | |
timotimo | yup, might not be worth it at all | ||
samcv | oh forgot to factor in | ||
timotimo | oh wow | 09:16 | |
samcv | the second level can't have a 40th thing if we use two shifts | ||
timotimo | www.p6c.org seems ... kind of dead | ||
100% of time spent in "wait" state | |||
timotimo power cycles the vm | 09:17 | ||
moritz | timotimo++ | ||
timotimo | we should set up alerts in our monitoring | ||
moritz would like to withdraw a bit more from sysadminning those systems | 09:18 | ||
timotimo | bombch.us/CX23 | ||
samcv | timotimo, that's projected earnings right? | 09:19 | |
timotimo | totally | ||
samcv | i would buy stock in that | ||
timotimo | yep | ||
it's a company that deals in cat pictures | |||
we have determined there's a niche in that area | 09:20 | ||
there's literally not nearly enough cat pictures to satisfy demand | |||
samcv | i wonder if making 4 shift levels would be worth it | ||
moritz | wow. I *hope* that load is because perl6.org is on the hn or reddit frontpage or something :-) | ||
timotimo | if we dedicate two codemes to shifting, we can have four levels with two levels costing one codeme extra and the other 2 costing 2 | 09:21 | |
samcv | yeah that's what i thought | ||
wait what | |||
timotimo | moritz: no, it looks like the virtual disk hung | ||
samcv | but what letter would we use | ||
moritz | timotimo: that's much less fun of an explanation :( | ||
timotimo | i thought we have two left over? | ||
when i logged into the terminal it had the same output that we usually get on hack when that happens | |||
"task apache hung for more than 120 seconds" etc | |||
samcv | uh we have null and we have shift + A..Z, '-', ' ' | ||
oh and all the numbers | 09:22 | ||
timotimo | ah! that was before we decided to encode null | ||
samcv | i mean i guess we could put the numbers on a different level. but that would be weird | ||
no we always encoded null | |||
there has to be some way to end the string | |||
timotimo | right, right | ||
samcv | but it'd be weird to have strings AND letters on an upper level | ||
idk i guess we could do it fine | 09:23 | ||
09:23
Actualeyes left
|
|||
samcv | idk maybe encode LETTER on the 1st level? | 09:24 | |
or have two shift levels on the base level and like Z on the second level | |||
timotimo | oh, have you already measured what letter is there most often? | 09:25 | |
samcv | m: my $i = 0; for 0..0x1FFFF { $i++ if .uniname.contains('LETTER')}; say $i | ||
camelia | rakudo-moar fd8df7: OUTPUT«9222» | ||
samcv | oh not for letters | ||
i mean the literal word letter | |||
timotimo | i know | ||
samcv | we save like 4x more for that one | ||
timotimo | but you wanted to put Z on the second level | ||
samcv | yeah no clue but it could be. maybe X | ||
timotimo | say [(+)] do for 0..0x1FFFF { .uniname.comb )}; | 09:26 | |
m: say [(+)] do for 0..0x1FFFF { .uniname.comb )}; | |||
camelia | rakudo-moar fd8df7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Missing blockat <tmp>:1------> 3[(+)] do for 0..0x1FFFF { .uniname.comb 7⏏5)}; expecting any of: statement end statement modifier statement modifier loop» | ||
timotimo | m: say [(+)] do for 0..0x1FFFF { .uniname.comb }; | ||
samcv | so we'd save 1/3 bytes * 9222 if we put LETTER on the 1st level | ||
camelia | rakudo-moar fd8df7: OUTPUT«Too many arguments in flattening array. in block <unit> at <tmp> line 1» | ||
timotimo | oops | ||
samcv | m: say 9222 * 1/3 | ||
camelia | rakudo-moar fd8df7: OUTPUT«3074» | ||
samcv | 3KB is still not that much :\ | ||
timotimo | m: my @names = do for 0..0x1FFFF { .uniname.comb }; @names.join("").Bag.say | ||
camelia | rakudo-moar fd8df7: OUTPUT«bag(< c o n t r o l - 0 0 0 0 >< c o n t r o l - 0 0 0 1 >< c o n t r o l - 0 0 0 2 >< c o n t r o l - 0 0 0 3 >< c o n t r o l - 0 0 0 4 >< c o n t r o l - 0 0 0 5 >< c o n t r o l - 0 0 0 6 >< c o n t r o l - 0 0 0 7 >< c o n t r o l - 0 0 0 8 >< c o n t…» | ||
timotimo | oops | ||
m: my @names = do for 0..0x1FFFF { .uniname.comb }; @names.join("").comb.Bag.say | |||
samcv | yeah make sure you leave out any names with '<' in them | 09:27 | |
timotimo | this is just a very rough estimate | ||
camelia | rakudo-moar fd8df7: OUTPUT«(timeout)» | ||
samcv | it will be incorrect becuase there's so many CJK ideographs | ||
timotimo | oh, ok | ||
samcv | will really skew it | ||
also i'm thinking. maybe we should make words cross bounderies | 09:28 | ||
of each 16bit int i mean | |||
then we don't have to keep an index | |||
we could skip over 3 codepoints using 1 16-bit int | |||
could be useful | |||
only save an offset for some ranges like CJK ideographs and resereved and such | |||
timotimo | wait what? | 09:29 | |
samcv | 3 codeme's are per 16-bit int. so every time we see \0 we skip to the next CP | ||
and so we can store three \0 in one 16-bit int | |||
so that would save us from having to make an index | |||
timotimo | but we need random access | 09:30 | |
here's my results (when skipping anything containing < or CJK) | |||
gist.github.com/timo/f5f2f9cb7c456...6387a4444d | |||
9 is most rare out of all | |||
Q is most rare out of letters | |||
09:31
bjz_ joined
|
|||
timotimo | Z would have been a good choice, too, though | 09:31 | |
samcv | i don't see how that causes any more problems than what we have now. i mean we load a hash to go from codepoint names to codepoints | ||
ttt has sudden flashbacks to memorizing Q-no-U words for Scrabble | |||
samcv | so can we not just do the same for getting codepoint's names? | ||
09:31
bjz left
|
|||
timotimo | you're proposing to build a hash from number to index rather than an array? | 09:31 | |
samcv | well we don't have an array now | ||
well i mean in my proof of concept | 09:32 | ||
timotimo | huh? how does uniname(0x100) work then? | ||
samcv | the more common case is going from codepoint names to codepoints not the other way around | ||
it loads the hash the same way as it does for \c[ ] | |||
09:33
FROGGS left
|
|||
samcv | though i mean i guess we could store the codeme length for each codepoint's name | 09:33 | |
and store that in some array | |||
not sure what the longest name is | |||
but then we'd still have to scan and start from 0 to find where the cp is hm. idk | 09:34 | ||
saving a huge number of indexs is pretty wasteful | |||
i mean i guess we could store pointers to each one, but that would make it 1/3 bigger | 09:36 | ||
on 64-bit | |||
timotimo | was afk for a bit | 09:38 | |
i would accept a table that gives you offsets to every 16th or 32th codepoint's name and then we can linearly scan for the exact one we need from there | |||
that'd be fine | |||
samcv | ah. yeah that could work | 09:39 | |
timotimo | reduction to a 32th or 16th of the total size ought to be good enough, eh? | ||
samcv | you mean a table of 32 indexs? | 09:40 | |
timotimo | no | 09:41 | |
a table of indices for every 32nd codepoint | |||
so if you want number 68, you'll skip directly to 64 and look for a sting-terminating 0 four times | 09:42 | ||
er, three times | |||
gist.github.com/timo/f5f2f9cb7c456.../revisions - this is what happens to letter distribution when i throw out LETTER, SYLLABLE, and HIEROGLYPH | 09:43 | ||
samcv | ah kk | 09:45 | |
timotimo | i should probably feed it the whole first shift | ||
samcv | yeah | 09:46 | |
09:46
kaare__ joined,
thayne joined,
kaare_ left,
thayne left
09:48
cdc joined
|
|||
cdc | Hello, modules.perl6.org/ -> "Service Unavailable" :-( | 09:49 | |
samcv | yeah 9 is the least common one | ||
timotimo | cdc: oh crap! | ||
samcv | we could replace that with a second shift | ||
09:50
kaare__ left
|
|||
timotimo | cdc: having a look now | 09:50 | |
cdc | timotimo: I still hit the same error. | ||
09:50
kaare__ joined
|
|||
cdc | (from 2 different networks) | 09:51 | |
samcv | try 10! | ||
panic! run in circles! shout loudly! | |||
timotimo | yeah, the server process didn't start | 09:53 | |
moritz still hopes that one day brokenchicken writes a proper systemd service file for that | |||
timotimo | moritz: we're using journal for this stuff, right? but the journal travels to another server or something? | 09:54 | |
because with journalctl i get absolutely nothing at all | |||
moritz | timotimo: that's because it's not a proper systemd service | ||
timotimo | no, i mean, journalctl gives me nothing for the whole system | ||
moritz | timotimo: iirc it's a cron job that both updates the data and (re)starts the server otherwise | ||
timotimo: uhm. | |||
timotimo | hack also doesn't seem to have any journal | 09:55 | |
moritz | that... shouldn't be like that | ||
timotimo | thought so | ||
systemd-journald.service loaded active running | |||
moritz | bartolin: do you happen to know anything about that? | 09:56 | |
timotimo | agh | 09:57 | |
i'm a dummy | |||
i didn't run it as a privileged user | |||
Jan 18 09:17:38 www modules.perl6.org-init.d[486]: Can't load application from file "/etc/init.d/modules.perl6.org-init.d": Can't locate Toadfarm.pm in @INC (you may need to install the Toadfarm module) (@INC contains: /etc/perl /usr/loca | 09:58 | ||
jast | journalctl isn't very helpful when it's a permissions issue | ||
timotimo | /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl /usr/local/lib/x86_64-linux-gnu/perl/5/usr/local/share/perl/5.20.1 . ) | 09:59 | |
jast: i didn't even think of that because on my desktop my regular user has permissions and it's always been that way | |||
jast | yeah, it's happened to me before, though | ||
timotimo | so where did Toadfarm use to be installed, and why is it gone now? | 10:00 | |
/home/modules.perl6.org/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/Toadfarm.pm | |||
moritz | timotimo: it's probably in a perlbrew env that the init script fails to activate | ||
timotimo | this exists | ||
so wrong perl version | |||
10:01
wamba left
|
|||
timotimo | it could be that the eval in the init script doesn't run, it's supposed to exec into the correct perl5 if it's accidentally running in a shell or something | 10:02 | |
it's definitely running the 5.22 perl, but why is it trying to use the folders for 5.20?! | 10:06 | ||
samcv | how do i add items to a BagHash | 10:07 | |
timotimo | use hash assignment | ||
alternatively put it in with (+) | |||
(but that's not mutation, that's clone-and-mutate) | |||
samcv | yeah | 10:08 | |
timotimo | i have no idea about perl5, i haven't a clue how to make modules.perl6.org start up correctly | ||
except just copy-paste the module over ... | |||
samcv | timotimo, there's no easier way? | 10:10 | |
10:10
holyghost left
|
|||
samcv | there should be a .add or something idk | 10:10 | |
timotimo | hash assignment is like .add | ||
well, you really want += rather than just = | 10:11 | ||
samcv | yeah | ||
timotimo | so do that? | ||
samcv | it seemed weird to not have it. would be cool if we could add that. $b.add(3, 4) etc | ||
so you can easily add an array or something to it | |||
any list like thing | |||
timotimo | you already can | ||
samcv | can you show me ? | 10:12 | |
timotimo | $my_bag{@the_array}>>++ | ||
samcv | kk thanks | ||
timotimo | (yes, it's that magical) | ||
even Z+= should work | 10:13 | ||
er, X+= really | |||
samcv | i still it would be a nice thing to have, since we have .grab | ||
it seems odd not to have the other direction | |||
timotimo | grab is really inconvenient to do otherwise | ||
10:14
kaare__ left
10:15
kaare__ joined
10:19
CIAvash left,
astj left,
astj joined
10:21
astj left,
astj joined
10:38
labster left
10:41
kaare__ is now known as kaare_
10:42
xtreak left
10:44
xtreak joined
10:55
Ven left,
xtreak left
10:57
Ven joined,
xtreak joined
10:58
user9 left
11:01
wamba joined
11:07
exp-innit joined
|
|||
exp-innit | any recommendations on SSH modules? there's nothing on modules.perl6 but there is one on github marked as WIP | 11:07 | |
brokenchicken | find something on metacpan.org and use it via Inline::Perl5 | 11:09 | |
exp-innit | that works i guess, but isn't very exciting :) | ||
brokenchicken | Write one and release it to ecosystem? Help out that WIP? | 11:11 | |
moritz | build one yourself. From scratch! | ||
DrForr | Well, it'll get you to your goal faster than waiting for someone to write one :) | ||
11:16
user9 joined
|
|||
exp-innit | :) | 11:16 | |
just wondered if anyone had tried using the one on github despite its warnings | |||
i'll haev a play | |||
11:19
araraloren joined
11:23
azawawi joined
|
|||
azawawi | hi | 11:23 | |
moritz: ping | |||
moritz: Can you update github.com/moritz/perl6-all-modules? I want to check github.com/bbkr/jsonrpc/issues/27 | 11:24 | ||
11:29
raschipi joined
|
|||
moritz | azawawi: I'm afraid I can't until github.com/ingydotnet/git-subrepo/issues/225 is fixed | 11:30 | |
azawawi | moritz: not a big deal. thx. i am working on updating json::rpc | ||
github.com/azawawi/jsonrpc | 11:31 | ||
since im using it in my Odoo::Client (github.com/azawawi/perl6-odoo-client) :) | |||
brokenchicken | .tell samcv RE .add on Setties and Baggies; there's a ticket for it: rt.perl.org/Ticket/Display.html?id...et-history | 11:36 | |
yoleaux | brokenchicken: I'll pass your message to samcv. | ||
samcv | oh nice thanks brokenchicken | ||
yoleaux | 11:36Z <brokenchicken> samcv: RE .add on Setties and Baggies; there's a ticket for it: rt.perl.org/Ticket/Display.html?id...et-history | ||
11:41
telex left
11:42
xtreak left,
telex joined
|
|||
azawawi | Quick question, the new standard for naming base exceptions/errors is lib/MyModule/X.pm6 or lib/MyModule/X/SomeBase.pm6? | 11:42 | |
which is better? | |||
brokenchicken haven't heard of any standards, new or otherwise. | 11:43 | ||
X::MyModule::Blah reads better tho | |||
azawawi | scrap standard to convention and naming safety | 11:44 | |
brokenchicken | If I were writing a custom exception, I'd definitely follow the X::* naming convention we have in core | 11:46 | |
azawawi | so X::MyModule::XYZ | ||
brokenchicken | Yeah | 11:47 | |
I don't know why brrk says "best practice" is Module::X::Something | |||
You can barelly see the | |||
You can barelly see the ::X:: in that proposed name | |||
azawawi | X marks the spot :) | 11:48 | |
brokenchicken | m: class X::AdHoc is Exception {method message {'meows'}}; try {die "x"; CATCH {when X::AdHoc { say "hi"}} | 11:49 | |
camelia | rakudo-moar 82a614: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Missing blockat <tmp>:1------> 3e "x"; CATCH {when X::AdHoc { say "hi"}}7⏏5<EOL>» | ||
brokenchicken | m: class X::AdHoc is Exception {method message {'meows'}}; try {die "x"; CATCH {when X::AdHoc { say "hi"}}} | ||
camelia | rakudo-moar 82a614: OUTPUT«x in block <unit> at <tmp> line 1» | ||
brokenchicken | m: class X::AdHoc is Exception {method message {'meows'}}; try {die "x"; CATCH {when CORE::X::AdHoc { say "hi"}}} | 11:50 | |
camelia | rakudo-moar 82a614: OUTPUT«x in block <unit> at <tmp> line 1» | ||
azawawi takes a look at X:: in doc.perl6.org | |||
brokenchicken | it ain't got a full list | 11:51 | |
this is a full-ish list: github.com/perl6/doc/issues/517#is...-226804067 | |||
IIRC we figured documenting all the exceptions was a waste of time. | 11:52 | ||
or rather... adds a lot of noise for little gain | |||
azawawi | a quick ack on perl6-all-modules shows only one hit "App::Kains::X" | 11:53 | |
11:53
wamba left
|
|||
brokenchicken | Well, I can see the point that Module::X won't ever clash with core exceptions.... but for the same reason it doesn't look like any of the typical exceptions a user would be used to. | 11:54 | |
11:54
Ven left
|
|||
brokenchicken | m: class X::AdHoc is Exception {method message {'meows'}}; try {die "x"; CATCH {when ::CORE::('X::AdHoc') { say "hi"}}} | 11:55 | |
camelia | rakudo-moar 82a614: OUTPUT«x in block <unit> at <tmp> line 1» | ||
11:55
TEttinger left
|
|||
brokenchicken | .oO( X'Module::Blah ) |
11:56 | |
^_^ | |||
azawawi | brokenchicken: updated github.com/bbkr/jsonrpc/issues/27. Thanks for your feedback. | 11:57 | |
11:57
Ven joined
|
|||
brokenchicken | m: class X'AdHoc is Exception {method message {'meows'}}; try {die "x"; CATCH {when X::AdHoc { say "hi"}}} | 11:58 | |
camelia | rakudo-moar 82a614: OUTPUT«hi» | ||
brokenchicken | m: class X'AdHoc is Exception {method message {'meows'}}; try {die X'AdHoc; CATCH {when X::AdHoc { say "hi"}; when X'AdHoc { say "meows"}}} | ||
camelia | rakudo-moar 82a614: OUTPUT«hi» | ||
brokenchicken | wat | ||
m: class X'AdHoc is Exception {method message {'meows'}}; try { X'AdHoc.new.throw; CATCH {when X::AdHoc { say "hi"}; when X'AdHoc { say "meows"}}} | |||
camelia | rakudo-moar 82a614: OUTPUT«meows» | ||
brokenchicken | ehehe | ||
12:01
gregf_ left,
araraloren left
|
|||
brokenchicken | hmmm | 12:06 | |
u: FULL-WIDTH LETTER X | |||
unicodable6 | brokenchicken, Found nothing! | ||
brokenchicken | stupid robot | ||
m: class X::AdHoc is Exception {method message {'meows'}}; try { X::AdHoc.new.throw; CATCH {when X::AdHoc { say "hi"}; when X::AdHoc { say "meows"}}} | 12:07 | ||
camelia | rakudo-moar 82a614: OUTPUT«meows» | ||
brokenchicken | m: class X::AdHoc is Exception {method message {'meows'}}; try { die "meows"; CATCH {when X::AdHoc { say "hi"}; when X::AdHoc { say "meows"}}} | ||
camelia | rakudo-moar 82a614: OUTPUT«hi» | ||
brokenchicken | Now THAT'S a good standard :P | ||
timotimo | X_X | 12:09 | |
12:10
Ven left
12:11
bjz joined
12:12
Ven joined
12:13
bjz_ left
12:22
dmaestro left
12:26
Ven left
12:27
Ven joined
|
|||
DrForr | .seen moritz | 12:34 | |
yoleaux | I saw moritz 11:30Z in #perl6: <moritz> azawawi: I'm afraid I can't until github.com/ingydotnet/git-subrepo/issues/225 is fixed | ||
timotimo | he's here | ||
(gasp) | |||
DrForr | *boggle* | ||
*scrabble* | |||
... *bananagram* | 12:35 | ||
sjn hands DrForr a banana | 12:36 | ||
🍌 | 12:37 | ||
DrForr | Crap, gotta update my terminal font. | ||
sjn | yay! banana motivation ftw | 12:38 | |
timotimo | i should probably go from using terminal to using glowing-bear for irc | ||
lizmat | timotimo: 👍 :-) | 12:39 | |
sjn | .u 🍌 | ||
yoleaux | U+1F34C BANANA [So] (🍌) | ||
lizmat | 🙀 | 12:40 | |
.u 🙀 | |||
yoleaux | U+1F640 WEARY CAT FACE [So] (🙀) | ||
sjn | hehehe | ||
weary of bananas, eh? :) | |||
lizmat | the joys of a touchbar full of emojis :-) | ||
sjn | fancy apples | 12:41 | |
lizmat | .u 👩🏽🚀 | ||
yoleaux | U+200D ZERO WIDTH JOINER [Cf] (<control>) | ||
U+1F469 WOMAN [So] (👩) | |||
U+1F680 ROCKET [So] (🚀) | |||
lizmat | hmmm... it didn't do the skintone | ||
m: say "👩🏽🚀".chars | 12:42 | ||
camelia | rakudo-moar 82a614: OUTPUT«2» | ||
lizmat | 2? | ||
hmmm... | |||
moritz | DrForr: I'm around, fwiw | ||
sjn | zero-width = 0? | ||
lizmat | m: "👩🏽🚀".chars | 12:43 | |
camelia | ( no output ) | ||
lizmat | m: "👩🏽🚀".chars.say | ||
camelia | rakudo-moar 82a614: OUTPUT«2» | ||
samcv | yeah i think that one is one of the nonworking ones? | ||
lizmat | could be a copy-pasto | ||
samcv | that too | ||
idk check the emoji test file lizmat | |||
and see if that one passes | |||
lizmat | where does that live ? | ||
samcv | in roast | 12:44 | |
timotimo | samcv: how long are you going to stay on line and how can i see what you're up to with the unicode database compression stuff? | ||
samcv | uhm | ||
my repo | |||
lizmat | samcv: ack | ||
samcv | i won't be online in the next hour, and may be gone for the next like 12+ hours | ||
timotimo | the UCD repo, yeah? | 12:45 | |
samcv | maybe 24 so if you have anything to ask, ask it soon | ||
yeah github.com/samcv/UCD | |||
DrForr | moritz: Howdy. I was just thinking that it might be nice to see the number of unique nicks on-channel over time, and wondered if that would be straightforward to extract. | ||
moritz | DrForr: it isn't | ||
DrForr: the information isn't present in the logs | |||
timotimo | right, only joins and parts | 12:46 | |
so you can only get differential information | |||
and when ilbot goes offline you're in trouble | |||
moritz | mostly because in IRC, a /quit isn't accompanied by the information which channels the user was in | ||
timotimo | ooooh, statefulness! | ||
moritz | so you'd need to keep state to know which channels the users left | ||
which ilbot doesn't do | |||
timotimo | samcv: nah, nothing to ask, just curious | 12:47 | |
moritz | what you could extract pretty easily is the list of active nicks during a day | ||
samcv | ah ok | ||
timotimo | the stuff we've been doing today hasn't landed in the repo at all yet? | ||
or just not pushed from local to github? | |||
samcv | it ha- | ||
has | |||
let me do one push | |||
jast | you can actually get the current user count fairly easily, using /list #perl6 | ||
timotimo | jast: OK, how do you execute that command for every day in the past year? :) | 12:48 | |
jast | well, you can *start* tracking it | ||
it's not quite the same as #unique users, of course | |||
DrForr | Oh. I'd be happy with just the number unique nicks speaking per day. Just interested to see if the number of new users is growing, remaining flat or just changing over time. | 12:49 | |
*number of | |||
samcv | timotimo, but if you run ./UCD-gen.p6 --names-only it will generate the name table | ||
and you can run "make names" | |||
and it will compile it | |||
will push as soon as i double check i haven't messed anything up since last commit | |||
timotimo | ok, cool :) | ||
i'll have a look later. for now i'll be AFK | 12:50 | ||
moritz | DrForr: when you send an Accept: application/json header to the regular IRC log URLs, you'll get a json response | ||
ilmari | samcv: are these constant arrays you're generating directly usable, or do they have to be converted at runtime? | ||
12:50
wamba joined
|
|||
samcv | uhm and if you want to get a printout of all the number of bytes saved potentially, use --debug | 12:50 | |
they are ilmari | |||
generate once | |||
moritz | DrForr: so you could write a small program that simply iterates over the days for #perl6 and do some stats | ||
ilmari | samcv: ah good. you might be interested in what karl williamson is doing for unicode property inversion lists in perl5 | ||
12:50
araraloren joined
|
|||
samcv | ok pushing now. i gotta go for a sec. may be back in an hour for like an hour. maybe | 12:51 | |
ah? i would be very | |||
very very much | |||
timotimo | the amount of data transferred for this task could be drastically cut down if the logs program can just aggregate what nicks have been active (speaking, not joins/parts) in each day | ||
ilmari | similarly moving them all to be constant data that's demand paged | ||
12:52
kalkin- left
|
|||
DrForr | moritz: Okay, I'll check that out tonight. I'm just curious. | 12:52 | |
ilmari | samcv: perl5.git.perl.org/perl.git/blob/H...nvlists.pl is the code that generates them | 12:53 | |
samcv | timotimo, atm the c code doesn't print out names properly anymore since we changed things tho | 12:54 | |
to not having a leading number and also to have a shift level. but it does generate the tables | |||
timotimo | neato | 12:55 | |
samcv | uhm and the code is in snippets | ||
timotimo | maybe i'll find the motivation to implement that while you're away, would you be interested in that at all? | ||
samcv | yeah :) | ||
timotimo | cool | ||
time for that AFK i mentioned | |||
samcv | if you want to disable shift 1 (only one implemented atm) set-shift-levels(%shift-one); | ||
comment out the set-shift-levels part. and it'll only do base level | 12:56 | ||
timotimo | i'm interested in shift, though :) | ||
samcv | BBL? or maybe not for 24 hours. you will know in an hour tho | ||
heh | |||
well for testing. | |||
timotimo | that's fair | ||
does it spit out the compression table for C yet? | |||
samcv | yes | ||
that is all done | |||
timotimo | good good | ||
samcv | it was fully working before i removed the leading numbers | 12:57 | |
so if you added those back in, the code would compile and when ran print out every unicode name | |||
timotimo | is the shift table in 8bit per character or is it also base40? | ||
samcv | 8bit per char | ||
timotimo | that's probably fine | ||
samcv | well it's just strings | ||
you can change it if you want | |||
timotimo | i see no need actually | ||
samcv | but possibly be back later | 12:58 | |
o/ | |||
timotimo | o/ | ||
12:58
rurban joined,
rurban left
13:00
holli_ joined
|
|||
azawawi | how can one solve the long Travis CI tests ? Anyone working on having a ready perl6 distro for travis ci? Most of the test time is wasted on building/testing rakudo | 13:02 | |
13:04
lukaramu joined
13:05
bjz left
|
|||
brokenchicken | wasted? Seems a good arrangement :) Free rakudo tests! | 13:07 | |
Just sudo apt-get install rakudo or whatever instead of building from sauce? | |||
azawawi | brokenchicken: any repo for 2016.12? | 13:08 | |
brokenchicken | huggable: deb | ||
huggable | brokenchicken, CentOS and Debian Rakudo packages: github.com/nxadm/rakudo-pkg/releases | ||
brokenchicken | close nuf | ||
azawawi | brokenchicken++ # thanks | ||
13:11
buggable joined,
ChanServ sets mode: +v buggable
13:14
sufrostico joined
|
|||
azawawi | brokenchicken: github.com/nxadm/rakudo-pkg/issues/7 # done :) | 13:14 | |
brokenchicken | it should really be automated | 13:15 | |
azawawi productive day... updated some of my Swift and Perl 6 projects :) | |||
brokenchicken: yup | |||
brokenchicken | considering 2017.01 compiler release is days away... 2016.12 is stale :P | 13:17 | |
azawawi | well it is the stable release :) | 13:19 | |
i test on stable and latest. Also on Linux, macOS (travis ci) and windows (appveyor ci) | 13:20 | ||
raschipi likes stale software better. | |||
azawawi | stale is more tested :) | ||
brokenchicken | What makes it stable? :) | 13:21 | |
13:21
wamba left
|
|||
brokenchicken | Considering it's missing lexical loading branch, I'd say it's outdated./ | 13:21 | |
raschipi | brokenchicken: It's older. | ||
brokenchicken | By that logic 2016.07 release is even more stable, yet it's broken. | 13:22 | |
azawawi | brokenchicken: it is tagged and has been actually tested | ||
13:22
geekosaur left
|
|||
sammers | hi #perl6 | 13:22 | |
13:22
sufrostico left
|
|||
azawawi | sammers: hey | 13:22 | |
raschipi | When I read this: "it's missing lexical loading branch", I understand this: "I can postpone rewriting my scripts a little more". | 13:23 | |
brokenchicken | And I read it as "your scripts are broken" | 13:24 | |
raschipi | Works for me. | ||
sammers | I am messing around with typed hash, something like this: | ||
13:24
sufrostico joined
|
|||
sammers | m: my Int %h = a => 1, b => 2; say %h; | 13:25 | |
camelia | rakudo-moar 4a78be: OUTPUT«{a => 1, b => 2}» | ||
13:25
geekosaur joined
|
|||
raschipi | sufrostico is now an object hash. | 13:25 | |
timotimo | raschipi: you're confusing it with my %h{Int}, i believe | ||
raschipi | I am? | ||
sammers | I have no immediate need for this, but I was wondering if it is possible to explicitly use multiple types on a hash? | ||
moritz | sammers: what do you mean by "multiple types"? | 13:26 | |
sammers | like this, Int, Str %h = a => 1, b => "this is a string"; | ||
moritz | sammers: you can use a common parent type, like Cool | ||
brokenchicken | m: my IntStr %h = a => 1, b => "this is a string"; say %h; | ||
camelia | rakudo-moar 4a78be: OUTPUT«Type check failed in assignment to %h; expected IntStr but got Int (1) in block <unit> at <tmp> line 1» | ||
azawawi | brokenchicken: so where is the proof that rakudo "latest" works for most of the modules in the Perl 6 ecosystem (vs 2016.12 for example)? | ||
brokenchicken | right | ||
raschipi | Cool %h accapts both numbers and strings | ||
moritz | sammers: or you can create your own type, like subset IntOrStr of Any where Int|Str; | ||
azawawi | brokenchicken: what's the point of testing against latest if latest is changing? | ||
sammers | ok, but what if I want to be strict about what each pair can contain? | 13:27 | |
moritz | sammers: and then use that as a type constriant | ||
sammers | ah | ||
ok, gotcha | |||
brokenchicken | m: subtest ZIntStr where Int|Str; my ZIntStr %h = a => 1, b => "this is a string"; say %h; | ||
camelia | rakudo-moar 4a78be: OUTPUT«5===SORRY!5===Type 'ZIntStr' is not declared. Did you mean 'IntStr'?at <tmp>:1------> 3ubtest ZIntStr where Int|Str; my ZIntStr7⏏5 %h = a => 1, b => "this is a string"; sMalformed myat <tmp>:1------> 3subtest ZIntStr where Int|…» | ||
brokenchicken | m: subset ZIntStr where Int|Str; my ZIntStr %h = a => 1, b => "this is a string"; say %h; | ||
camelia | rakudo-moar 4a78be: OUTPUT«{a => 1, b => this is a string}» | ||
moritz | m: subset ZIntStr where Int|Str; my ZIntStr %h = a => 1.0 | ||
camelia | rakudo-moar 4a78be: OUTPUT«Type check failed in assignment to %h; expected ZIntStr but got Rat (1.0) in block <unit> at <tmp> line 1» | ||
brokenchicken | azawawi: where's the proof that rakudo 2016.12 works with most of the modules in the Perl 6 ecosystem? | 13:28 | |
sammers | moritz, thanks | ||
moritz | sammers: you're welcome | 13:29 | |
azawawi | brokenchicken: Travis CI logs for 2016.12? | ||
raschipi | brokenchicken: older bugs are better than younger ones. | ||
Sorry, Camelia. | 13:30 | ||
brokenchicken | azawawi: which are available for how many modules? | ||
azawawi checks | |||
brokenchicken | azawawi: travis doesn't automagically retest all the ecosystem modules when a new release happens. | ||
azawawi: and 2016.12 *is* latest. I don't know why you chose to arbitrarily assign "stable" label to it. | 13:31 | ||
raschipi | brokenchicken: because it's older. | ||
brokenchicken | There isn't even a Rakudo Star release for it. So few users actually have used it. | ||
raschipi: older than what? | |||
raschipi | Older than HEAD. | 13:32 | |
brokenchicken | heh | ||
sammers | moritz, is there a way to make sure that a is always Int and b is always Str? | ||
azawawi | brokenchicken: so 2016.12 is not stable? what's stable now? | ||
moritz | sammers: no. If you want that, use a class | 13:33 | |
sammers | ok | ||
brokenchicken | azawawi: oh, we're still playing the random label game? Fine, Rakudo Star 2016.11. That's the only deliverable produced by Perl 6 team that's meant for regular users. | 13:34 | |
That's the only thing that's currently tested against a subset of ecosytem modules as part of its release cycle | 13:35 | ||
And "because it's 30 days older than a random commit in github repo" is an inane argument for stability. | |||
azawawi | brokenchicken: you're right in that regard. I just checked perl6-all-modules (which is stale since Sept 2016). The latest label is 2016.08 | 13:36 | |
mst | brokenchicken: please stop sniping | ||
azawawi | brokenchicken: but it feels more stable lol | ||
brokenchicken | mst: OK | ||
mst: "sniping"? | |||
mst | azawawi: what, actually, is your point here? | ||
[Coke] | we don't have a stable tag, is the short answer. | ||
azawawi | cool | 13:37 | |
mst | brokenchicken: at the point at which you're saying 'random label game' and 'inane argument' we're at the point where you're too cranky to actually get anywhere useful. *I* can, sometimes, manage to be that cranky and still constructive at the same time, but (a) I'm special (b) I should still usually shut up and let somebody less cranky take over even so :P | ||
brokenchicken | mst: OK | 13:38 | |
azawawi | mst: well it began here... irclog.perlgeek.de/perl6/2017-01-18#i_13942805 :) | 13:39 | |
brokenchicken | mst++ # telling me to stfu | ||
mst salutes the people who've done it to me over the years (rather more often than it needs saying to you, at that ;) | 13:40 | ||
hrm | 13:41 | ||
azawawi: can't you basically do a rakudo build, shove it ... somewhere on the web ... and wget+tar xzf it during travis startup? | |||
I mean, it'd be a colossal hack | |||
but if it works well enough to make your CI more useful, who cares | |||
raschipi | m: my Class H {has Int $.a is rw;has Str $.b is rw}; my $h = H.new; $h.a=6; $h.b="P6"; #sammers | 13:42 | |
camelia | rakudo-moar 6ad9e0: OUTPUT«5===SORRY!5===Type 'Class' is not declaredat <tmp>:1------> 3my Class7⏏5 H {has Int $.a is rw;has Str $.b is rw}Malformed myat <tmp>:1------> 3my7⏏5 Class H {has Int $.a is rw;has Str $.b » | ||
mst | the stable/stale thing seems to me to basically be a black hole from which neither clue nor sense was escaping ;) | ||
raschipi | m: my class H {has Int $.a is rw;has Str $.b is rw}; my $h = H.new; $h.a=6; $h.b="P6"; #sammers | ||
camelia | ( no output ) | ||
azawawi | I just wanted my CI tests to be faster. That's it :) | ||
mst | yes. so I've just suggested something you could try yourself | ||
if it works, then come and make a fuss in here and we can see if we can do a less-unofficial version of the same approach | 13:43 | ||
but somebody's going to have to TIAS and you apparently already care so :D | |||
sammers | raschipi, I was just messing with hash to see if this was possible. | ||
raschipi | sammers: It's not, by design. | ||
sammers | and knowing is half the battle | 13:44 | |
azawawi | mst: :) | ||
raschipi | sammers: Have you read these two: docs.perl6.org/type/Signature docs.perl6.org/type/Capture ? It's required reading. | 13:48 | |
sammers | yes | ||
unless they were updated in the last couple of months | 13:49 | ||
azawawi | brokenchicken: My bad regarding 2016.12. I missed that the latest rakudo star announcement is 2016.11. :) | 13:50 | |
raschipi | You could match a hash against a signature to know if it complies with some expectations. | 13:51 | |
Do I have to say "smartmatch" or can it be just "match"? Do we have a non-smart way to match? | 13:52 | ||
13:54
Ven left
13:57
Ven joined
|
|||
raschipi | m: my $s = :(Int :$a, Str :$b); say %(a => 1, b => "s") ~~ $s; say %(a => "a", b => "s") ~~ $s | 13:58 | |
camelia | rakudo-moar 6ad9e0: OUTPUT«TrueFalse» | ||
sammers | hmm, ok, that is intersting | ||
I was looking for somewhere in the docs that says something like "if you assign as type to a hash then all values in the hash require the same type, otherwise each value can be of different types" | 14:01 | ||
something like that | |||
but wasn't able to find it | |||
raschipi | docs.perl6.org/type/Hash#Object_ha...onstraints -> "If you would like to accept any object whatsoever in your hash, you can use Any!" | 14:02 | |
sammers | yeah, close enough I guess | 14:03 | |
moritz | sammers: note that even if you supply a type constraint, the values can still be of different types | 14:08 | |
as long as they are all subtypes of the type constraint you specified | |||
14:09
azawawi left
|
|||
sammers | ok | 14:10 | |
brokenchicken | though you can make a subset that restricts that too | 14:11 | |
sammers | is the where clause on subset the same as where that is used in sub guard clause? do they support the same functionality? | ||
14:11
nightfrog left
|
|||
moritz | subset ReallyInt of Int where { .WHAT === Int } | 14:11 | |
sammers: yes | |||
14:12
nightfrog joined
|
|||
brokenchicken | m: my Int %h; %h<foo> = <42> | 14:12 | |
camelia | ( no output ) | ||
brokenchicken | m: subset IntOnly of Int where .WHAT =:= Int; my IntOnly %h; %h<foo> = <42> | ||
camelia | rakudo-moar 4ae08e: OUTPUT«Type check failed in assignment to %h; expected IntOnly but got IntStr (IntStr.new(42, "42")) in block <unit> at <tmp> line 1» | ||
raschipi | sammers: 'where' does matching. | 14:13 | |
sammers | ok, so in the case of hash subset and its where clause are applied to a single pair value. | 14:14 | |
and in the case of a sub signature, the where clause has access to all of the params in the signature. | |||
moritz | only to those declared before, I think | 14:15 | |
brokenchicken | "all the params"... I think onlky the one before it | ||
sammers | ok | ||
brokenchicken | *ones | ||
14:15
azawawi joined
14:16
wamba joined
14:17
pmurias joined
14:18
DarthGandalf left
14:19
DarthGandalf joined
14:23
cdg joined
14:24
azawawi left
14:36
Vasyl joined
14:45
cibs left
14:48
cibs joined
|
|||
sammers | ok, so pairs. How do we specify a type on a pair? | 14:50 | |
m: my Int $p1 = :age<90>; | |||
camelia | rakudo-moar 4ae08e: OUTPUT«Type check failed in assignment to $p1; expected Int but got Pair (:age(IntStr.new(90, "...) in block <unit> at <tmp> line 1» | ||
sammers | m: my Pair $p1 = :age<90>; | ||
camelia | ( no output ) | ||
sammers | m: my Pair $p1 = :age<90>; say $p1.age.WHAT; | 14:51 | |
camelia | rakudo-moar dca05c: OUTPUT«No such method 'age' for invocant of type 'Pair' in block <unit> at <tmp> line 1» | ||
sammers | m: my Pair $p1 = :age<90>; say $p1<age>.WHAT; | 14:52 | |
camelia | rakudo-moar dca05c: OUTPUT«(IntStr)» | ||
sammers | m: my IntStr $p1 = :age<90>; say $p1<age>.WHAT; | ||
camelia | rakudo-moar dca05c: OUTPUT«Type check failed in assignment to $p1; expected IntStr but got Pair (:age(IntStr.new(90, "...) in block <unit> at <tmp> line 1» | ||
sammers | m: my Int %h = :age<90>; say %h<age>.WHAT; | 14:53 | |
camelia | rakudo-moar dca05c: OUTPUT«(IntStr)» | ||
raschipi | You need the interface only an assossiative variable (%sigil) has. | 14:54 | |
sammers | ok, that makes sense now | ||
brokenchicken | m: my (Num :age($p)) := \(:age<90>); dd $p | 14:55 | |
camelia | rakudo-moar dca05c: OUTPUT«Type check failed in binding to $p; expected Num but got IntStr (IntStr.new(90, "90")) in block <unit> at <tmp> line 1» | ||
brokenchicken | m: my (Int :age($p)) := \(:age<90>); dd $p | ||
camelia | rakudo-moar dca05c: OUTPUT«IntStr $p = IntStr.new(90, "90")» | ||
brokenchicken | Oh :( | ||
m: my Pair $p where .value ~~ Int = :age<90> | 14:56 | ||
camelia | ( no output ) | ||
14:56
AlexDaniel joined
|
|||
brokenchicken | m: my Pair $p where .value ~~ Num = :age<90> | 14:56 | |
camelia | rakudo-moar dca05c: OUTPUT«Type check failed in assignment to $p; expected <anon> but got Pair (:age(IntStr.new(90, "...) in block <unit> at <tmp> line 1» | ||
brokenchicken | there prolly a shorter way to write that | ||
sammers | m: my Pair $p where Int = :age<90>; | 14:57 | |
camelia | rakudo-moar dca05c: OUTPUT«Type check failed in assignment to $p; expected <anon> but got Pair (:age(IntStr.new(90, "...) in block <unit> at <tmp> line 1» | ||
14:59
hchienjo joined
|
|||
hchienjo | Hello everyone. | 15:00 | |
raschipi | oi | ||
brokenchicken | \o | ||
bstamour` | hi :-) | ||
hchienjo | Has anyone experienced Function 'BEFORE' needs parens to avoid gobbling block when using zef? | 15:01 | |
brokenchicken | not me | ||
buggable: eco zef | |||
buggable | brokenchicken, zef 'It's like [cpanm] wearing high heels with a tracksuit': github.com/ugexe/zef | ||
AlexDaniel | .u 👩🏽🚀 | ||
yoleaux | U+200D ZERO WIDTH JOINER [Cf] (<control>) | ||
U+1F469 WOMAN [So] (👩) | |||
U+1F680 ROCKET [So] (🚀) | |||
AlexDaniel | u: 👩🏽🚀 | ||
unicodable6 | AlexDaniel, U+1F469 WOMAN [So] (👩) | ||
AlexDaniel, U+1F3FD EMOJI MODIFIER FITZPATRICK TYPE-4 [Sk] (🏽) | |||
AlexDaniel, gist.github.com/ca8f990bee2631a1c9...e08166aa68 | |||
timotimo | hchienjo: your version of rakudo could be too old. what does perl6 --version give you? | ||
AlexDaniel | yoleaux: 🖕 | 15:02 | |
hchienjo | timotimo: This is Rakudo version 2016.12-375-gdca05c2 built on MoarVM version 2016.12-113-gd1da1ba | ||
implementing Perl 6.c | |||
brokenchicken | :o | ||
timotimo | that's recent enougn, i'd say | ||
AlexDaniel | hchienjo: yes | ||
hchienjo: you have to update zef I think | 15:03 | ||
brokenchicken | Also, how do so many people end up using bleed dev versions of Rakudo :/ | ||
timotimo | ... it's the best version ... | ||
melezhik | HI! | ||
sammers | m: subset PairInt where .value ~~ Int; my PairInt $p = :age<90>; say $p<age>.WHAT; | ||
camelia | rakudo-moar dca05c: OUTPUT«(IntStr)» | ||
hchienjo | AlexDaniel: Let me try. | ||
AlexDaniel | hchienjo: github.com/ugexe/zef/commit/1d8079...2506ae941d | ||
raschipi | o/ | 15:04 | |
brokenchicken | m: enum PHASE is export <BEFORE START LIVE STOP AFTER>; when BEFORE { say "===> meow" } | ||
camelia | ( no output ) | ||
brokenchicken | Ah | ||
melezhik | say I bumped a version at my module meta file and made commit, how can I see that this version is accessible at modules.perl6.org ? | 15:05 | |
raschipi | Gosh, there's a book about Perl6 that recommends Atom as a text editor. | ||
brokenchicken | melezhik: the site doesn't really use any versions. | ||
melezhik: and module installers don't use same file for versions | |||
huggable: eco | |||
huggable | brokenchicken, nothing found | ||
melezhik | ok, let me reshape my question | 15:06 | |
AlexDaniel | raschipi: it's not that unreasonable. I think its highlighting is mostly right nowadays | ||
brokenchicken | melezhik: you can look in this file. This is what panda uses when `panda update` is run: ecosystem-api.p6c.org/projects.json | ||
raschipi | It has Chrome embedded. | ||
melezhik | I bumped my version at meta file for my module, when user will be able to get new version of my module? | ||
brokenchicken | Atom rocks | ||
AlexDaniel | raschipi: what else? There's emacs and perl6-mode, it's not bad too | ||
and that's about it | 15:07 | ||
melezhik | brokenchicken: thanks | ||
brokenchicken | melezhik: depends on the package manager the use and whether they run `update` | ||
melezhik: note that both panda and zef support `install .` run in a cloned repo | |||
melezhik | brokenchicken: you answered my question | ||
sammers | night #perl6, thanks for you input | 15:08 | |
brokenchicken | I guess "within a couple of hours" is a reasonable expectation; providing the user runs the update command | ||
melezhik | I don't care about `install .` , only about install/update <module-name> | ||
yeah, I just needed a way to estimate this ... | |||
that's ok | |||
brokenchicken: so, ecosystem-api.p6c.org/projects.json is a source to watch at ? | 15:09 | ||
brokenchicken | melezhik: yeah. There's also an acompanying ecosystem-api.p6c.org/errors.json | ||
melezhik | brokenchicken: good, thank you | 15:10 | |
btw, no alerts to modules maintainers get sent in case of errors ? :) | |||
I mean errors here - ecosystem-api.p6c.org/errors.json | 15:11 | ||
it would be handy ... | |||
hchienjo | AlexDaniel: Welp! I get this when trying to install zef from source zef:ver<*>:auth<github:ugexe>:api<> already installed -->followed by a long stracktrace here | 15:12 | |
AlexDaniel | hchienjo: I don't know what it means | 15:13 | |
hchienjo: all I know is that “Function 'BEFORE' needs parens” problem will go away if you manage to update zef :) | |||
gfldex | melezhik: you could write your own meta package and asked travis to build it once a week. If there are problems for zef to fetch and build your modules, travis sends you a mail. | 15:14 | |
15:15
john51 left
|
|||
Geth | cosystem: 2883f05c81 | (Zoffix Znet)++ | META.list s/META.info/META6.json/ |
15:15 | |
15:15
john51 joined
15:17
kaare_ left,
dalek left
|
|||
hchienjo | Well, weird thing is, panda uninstall zef throws an exception of its own Type check failed in binding to $repo-id; expected Str but got Nil (Nil) | 15:17 | |
AlexDaniel: I highly suspect these problems are the price for living on the bleeding edge :( | |||
15:17
d4l3k_ joined,
nicq20 joined
|
|||
AlexDaniel | hchienjo: I use rakudobrew for that, usually it works fine | 15:17 | |
15:18
d4l3k_ left
|
|||
AlexDaniel | if it doesn't, I throw it all out and start from scratch :) | 15:18 | |
15:18
cibs_ joined,
sjn__ joined,
pochi joined,
profan_ joined,
hoelzro_ joined,
sunnavy_ joined,
cxreg2 joined,
obra left,
sunnavy left,
pochi_ left,
hoelzro left,
profan left,
Juerd_ joined,
integral_ joined,
integral_ left,
integral_ joined,
n0xff__ joined,
freeze_ joined,
obra_ joined,
cxreg left,
freeze left,
azertus left,
sjn left,
avarab joined,
avarab left,
avarab joined,
hwu_ joined,
japhb_ joined,
atta_ joined,
azertus_ joined,
dalek joined,
ChanServ sets mode: +v dalek,
krakan_ joined
|
|||
brokenchicken | hchienjo: zef --force install zef | 15:18 | |
melezhik: that's a bit out of scope of the current ecosystem. Considering the majority of errors are due to GitHub connectivity and are temporary. | |||
hmmm | |||
Wonder what happened with geth not announcing ecosystem commit :/ | |||
Ah "Lag: 271" I see :( | |||
hchienjo | AlexDaniel: That's what I use too. Let me give it a try. | ||
15:18
huf_ joined,
kaare__ joined,
cibs left,
n0xff_ left,
japhb left,
ilbelkyr left,
MilkmanDan left,
Juerd_ is now known as Juerd,
ilbelkyr_ joined
15:19
araraloren left,
user9 left,
bpmedley left,
bisectable6 left,
Guest44896 left,
eyck left,
evalable6 left,
statisfiable6 left,
benchable6 left,
xui_nya[m] left,
flexibeast left,
committable6 left,
unicodable6 left,
jsimonet left,
Sgeo left,
isacloud left,
kipd left,
plicease left,
huf left,
UgJkA left,
integral left,
notbenh_ left,
atta left,
awwaiid left,
eater left,
rodarmor left,
SmokeMachine left
|
|||
brokenchicken | weeeeeeeeeeeeeeeee | 15:19 | |
15:19
araraloren joined,
rodarmor joined,
timotimo joined,
ugexe joined,
eater joined
|
|||
hchienjo | brokenchicken: The installed zef can't even run, it croaks with this error. Function 'BEFORE' needs parens to avoid gobbling block | 15:19 | |
brokenchicken | hchienjo: oh, right | 15:20 | |
timotimo | what was my last message before i dropped out? | ||
oh i can just irclog | |||
brokenchicken | timotimo: "timotimo │ ... it's the best version ..." | ||
15:20
ggherdov left
|
|||
hchienjo | timotimo: 'It's the best version' | 15:21 | |
timotimo | 161745 timotimo │ wait a minute ... panda has an uninstall command?! | ||
161755 timotimo │ AlexDaniel: i believe rakudobrew has a "nuke" command | |||
15:22
MilkmanDan joined
|
|||
timotimo | 161222 timotimo │ yeah you just need to put --force after zef | 15:22 | |
15:22
ugjka joined
|
|||
timotimo | that seems to somehow have dropped too | 15:22 | |
15:22
tomaw is now known as 02HAAAAAN,
user9 joined,
awwaiid joined,
eyck joined,
bisectable6 joined,
evalable6 joined,
statisfiable6 joined,
benchable6 joined,
xui_nya[m] joined,
flexibeast joined,
unicodable6 joined,
committable6 joined,
moon.freenode.net sets mode: +vvvv bisectable6 benchable6 unicodable6 committable6,
jsimonet joined,
isacloud joined,
plicease joined,
domm1 joined,
silug_ joined,
ttkp6 joined,
yoleaux joined,
moon.freenode.net sets mode: +v yoleaux
|
|||
brokenchicken | hchienjo: cd $(mktemp -d); git clone github.com/ugexe/zef.git .; perl6 -Ilib bin/zef install . | 15:22 | |
unless you already nuked something :) | 15:23 | ||
timotimo | yo uprobably also need --force | ||
brokenchicken | A yeah, and --force | ||
ugexe | `rakudobrew self-upgrade && rakudobrew build zef` should also work (it will use --force now) | ||
15:23
Sgeo joined
|
|||
brokenchicken | hchienjo: cd $(mktemp -d); git clone github.com/ugexe/zef.git .; perl6 -Ilib bin/zef --force install . | 15:23 | |
15:23
giraffe joined
|
|||
ugexe | see: github.com/tadzik/rakudobrew/commi...f2c1b1c602 | 15:23 | |
15:23
giraffe is now known as Guest98986
|
|||
hchienjo | ugexe: Thanks. Let me take a look. | 15:24 | |
timotimo: I'll give it a shot. | |||
timotimo | good luck! | ||
15:24
wtw joined
|
|||
hchienjo | brokenchicken: Hovering over the .rakudobrew folder... | 15:25 | |
brokenchicken | hchienjo: people who use packages meant for users and not core hackers (rakudo.org/downloads/star/) usually don't have these problems ;) | 15:26 | |
15:27
g4 left,
kipd joined,
user9 left
|
|||
ugexe | hchienjo: and I suspect most core hackers that use it also don't upgrade existing rakudo installations but merely add new ones (or nuke whatever they want to replace/update and then re-add it fresh) | 15:28 | |
15:28
ggherdov joined,
imnotarobot joined
|
|||
[Coke] | That's how I use rakudobrew; just create a new moar and reinstall all the modules I need. | 15:29 | |
brokenchicken has update-perl6 is aliased to `rm -fr ~/.zef; rm -fr ~/.perl6; rm -fr ~/.rakudobrew/; git clone github.com/tadzik/rakudobrew ~/.rakudobrew; rakudobrew build moar; rakudobrew build zef; \ | |||
[Coke] | s/moar/rakudo-moar/ | ||
brokenchicken | zef --/test install Inline::Perl5 DBIish Test::When Test::Notice Test::META Pretty::Topic File::Find IO::Socket::SSL HTTP::UserAgent URI::Escape HTTP::Tinyish \ | ||
Grammar::Tracer Config::From HTML::Entity Lingua::Conjunction Data::Dump IRC::TextColor JSON::Tiny HTTP::Server::Tiny URI::Encode' | |||
oops | |||
damn, and I accidentally ran it just long enough right now that it nuked .zef and prolly parts of .rakudobrew :( | 15:30 | ||
15:30
user9 joined
|
|||
brokenchicken cries and adds a timer... | 15:30 | ||
15:30
ggherdov left
15:31
FROGGS joined,
imnotarobot left,
ggherdov joined
15:33
SmokeMachine joined
15:37
shayan_ joined,
notbenh_ joined
|
|||
jdv79 | nine: gist.github.com/anonymous/3a766c44...df73a2b9f5 | 15:38 | |
I'm gonna guess its something about 5.24.1 | |||
15:40
AlexDaniel left
|
|||
nine | jdv79: did you re-install Inline::Perl5 after upgrading perl? | 15:40 | |
jdv79 | i was in the process | 15:41 | |
thats what broke | |||
15:42
sammers left
|
|||
jdv79 | building a 5.24.0 now to test | 15:42 | |
brokenchicken | I got 5.24.0 on my server and Inline::Perl5 installed fine | ||
(like 3 minutes ago; on HEAD rakudo) | 15:43 | ||
nine | I'd bet it tries to load the wrong libperl | ||
jdv79 | i had 5.24.0 and it was working but all of the sudden i got the error about -Dusemultiplicity | ||
so i uninstalled 5.24.0 and installed 5.14.1 as such | |||
*24 | |||
hmm | |||
brokenchicken | I perlbrewed mine with -Duseshrplib and -Dusemultiplicity | 15:44 | |
15:51
hartenfels joined
15:53
sammers joined
|
|||
jdv79 | i'm gonna guess running time was never a consideration in the p5 test suite;) | 15:54 | |
brokenchicken | :) | ||
15:55
khw joined
|
|||
nine | jdv79: perlbrew install has a --notest switch :) | 15:56 | |
15:58
cale2 joined
15:59
skids joined
|
|||
jdv79 | i guess its a habbit to let testsuites run in perl land | 16:00 | |
finally finished | |||
ilmari | jdv79: my 5yo workstation runs all the perl5 tests in 4min | ||
jdv79 | my 4yo laptop does not | 16:03 | |
16:03
jonas1 left
|
|||
ilmari | my new laptop does the whole build/test/install in about 5min | 16:03 | |
jdv79 | ok, i'm at about 15m | ||
abraxxa | sorry I have been in meetings, did someone fix a backend services required by panda and zef because boths' update command works now | ||
16:04
melezhik left
|
|||
moritz | at least for panda, yes | 16:04 | |
16:04
nicq20 left
16:05
erdic left
|
|||
jdv79 | aw c'mon. same error. | 16:06 | |
16:07
erdic joined,
user9 left
|
|||
abraxxa | timotimo: thanks for fixing modules.perl6.org (read the backlog) | 16:10 | |
brokenchicken | What was wrong with it BTW? | ||
16:11
araraloren left,
user9 joined
|
|||
jdv79 | nine: installed fine manually but failed unde zef | 16:12 | |
weird ^H | |||
16:12
gregf_ joined
16:14
acrussell joined
16:15
sjn__ is now known as sjn
16:17
freeze_ is now known as freeze
|
|||
holli_ | sometimes i put a slice of cheese on my head and pretend i am a sandwich | 16:21 | |
hchienjo | ugexe: I manually ran [Coke]'s bash alias and things are working fine now. Thanks everyone who has helped. Really appreciated. | ||
holli_ | oops. wrong channel | 16:22 | |
brokenchicken | holli_: you still do that? I'd figured you'd get bored of doing that by now. | 16:23 | |
Try a slice of ham instead. Mix it up a bit. | |||
16:24
hchienjo left
|
|||
pmurias | brokenchicken: rakudo.org/downloads tells users that the simples way of building rakudo from source is to use rakudobrew | 16:25 | |
[Coke] | I had a bash alias? | ||
:) | |||
holli_ | i tried mixing. turns out it's super hard to get peanut butter out of rasta curls | 16:26 | |
brokenchicken | pmurias: yup. And we have a ticket for it: rt.perl.org/Ticket/Display.html?id...et-history | 16:27 | |
holli_: hah :D | |||
16:36
atta_ left,
atta joined
16:37
kaare__ left,
kaare__ joined
16:50
acrussell left
16:51
acrussell joined
16:56
domidumont left
16:57
Ven left
16:58
freeze left
16:59
Ven joined
17:03
freeze joined
|
|||
raschipi | Did you guys see the new Mozilla brand? | 17:08 | |
Almost as good as Perl6, I think. | |||
pmurias | camelia seems vastly superior to the ugly Mozilla pinkness | 17:10 | |
17:10
wamba left,
freeze left,
freeze joined
17:11
Ven left,
freeze left,
freeze joined
|
|||
holli_ | no brand (in a tech context) can possibly be worse than this childish overly colorful butterfly | 17:12 | |
brokenchicken | holli_: what about Go's gopher? | ||
holli_ googles | 17:13 | ||
17:13
Ven joined
|
|||
holli_ | i stand corrected | 17:13 | |
brokenchicken | raschipi: so what is it? | ||
holli_: :) | |||
raschipi | blog.mozilla.org/opendesign/arrival/ | 17:14 | |
holli_: What about a Camel and an Onion? | |||
brokenchicken cringes at that type clash >_< | 17:15 | ||
17:16
kyan joined
|
|||
brokenchicken | raschipi: I'd say it's worse than Perl 6. While we fail with colour, the logo itself isn't bad. | 17:16 | |
While mozilla's one is the result of an hour long marketing meeting and someone going "hey, you know how fedex logo got an arrow in it! Let's do something like that.. wait! the "ill" could be like ://" | 17:18 | ||
raschipi | We should ask the folks at opensourcedesign.net/ if they would give us some help. | ||
brokenchicken | And then someone's kid typed it up in Photoshop and changed the :// part to Italics :) | ||
s/changed.+// | |||
heh | |||
raschipi: do we need help? | 17:19 | ||
raschipi | Withg the colors. | ||
gfldex | Many years ago TimToady asked to be stopped … err … asked for help with the Perl 6 mascot. None of you raised any hands. Now stop whining. | ||
brokenchicken | I thought we embraced the logo as a cultural hack | ||
raschipi | s/Withg/With/ | ||
I do, I like the logo and I like the colors. | |||
You're the one that said we fail in the colors. | |||
17:20
Gasher joined
|
|||
raschipi | I quite like what Mozilla came up with too. | 17:20 | |
17:20
cdc left
|
|||
brokenchicken | raschipi: yeah we do. That's why so many people say it sucks. But I didn't say we should change it. | 17:20 | |
raschipi | I see. Embracing the ugly hacks, I see. | 17:21 | |
ugexe | we need a perl6 logo roast that counts anything passing as a valid perl6 logo implementation | ||
brokenchicken | haha | ||
IIRC the logo on perl6.org links to an archived email that actually does qualify as that | 17:22 | ||
The main criterion is the new logo needs to make TimToady just as happy :P | |||
dylanwh | there are already three bugs filed to register moz:// as a protocol hanlder | 17:23 | |
and people asking if we submitted a proposal to IANA. | |||
brokenchicken | heh | 17:24 | |
17:25
domidumont joined
|
|||
cale2 | Anyone here tried Exercism.io ? | 17:25 | |
There's some perl6 challenges there, but I can't figure out how to solve them. | |||
raschipi | brokenchicken: I'm aware of the discussion you're referencing, but it isn't in the linked text in perl6.org. | ||
cale2 | It just gives you a challenge.t file | ||
17:26
cibs_ left
|
|||
brokenchicken | raschipi: I've no idea of that discussion... I see the linked text states the requirementys in in "Highlights of the discussion": raw.githubusercontent.com/perl6/mu...amelia.txt | 17:26 | |
17:26
shayan_ left
|
|||
brokenchicken | cale2: that's the extension of test files; I'd guess the challenge is to make it pass all tests | 17:27 | |
17:28
cibs joined
|
|||
brokenchicken | "There is a test script included with the exercise; a file with the extension .t. Run the test script for the exercise by running perl6 with the test file as an argument. e.g. perl6 example.t." | 17:28 | |
cale2 | brokenchicken: where do you put your code to solve the challenge then? Inside the .t file? | ||
Or you make a new file and somehow include it in the .t file? | |||
raschipi | The test file expects your code to be in a file with a specifi name in the same directory. Look at the test file to see what that name is. | 17:29 | |
brokenchicken | cale2: which one are you doing? | 17:30 | |
cale2 | the first one. bob | ||
where does it specify what the name of the file should be? | 17:31 | ||
brokenchicken | It says "exercism fetch perl6 bob" what's that do? Does it fetdch all the fiels for you? | ||
cale2 | yes. it gets the .t file and the readme | ||
brokenchicken | It specifies my $module = %*ENV<EXERCISM> ?? 'Example' !! 'Bob'; | ||
use-ok $module; | |||
require ::($module) <Bob>; | |||
cale2 | the .t file has two lines | ||
brokenchicken | So unless you got EXERCISM set, use Bob.pm6 | ||
cale2 | my $module = %*ENV<EXERCISM> ?? 'Example' !! 'Bob'; | 17:32 | |
what does that do | |||
brokenchicken | cale2: if EXERCISM env var is set to a truthy value, it uses "Example" as module name and if it ain't, uses "Bob" as module name | 17:33 | |
And I see it's use lib expects the test file to be in a dir below the module | |||
cale2: use Bob.pm6 create class Bob {} in it; and if the test file is in the same directory, you can run it with perl6 -I. test.t | |||
or.... prove -e 'perl6 -I.' -vlr test.t | 17:34 | ||
it's purtier | |||
cale2 | lordy lordy.... | 17:35 | |
brokenchicken | heh | ||
Submit a patch :) | |||
17:36
domidumont left
|
|||
brokenchicken | cale2: well, Option B: remove lines 7, 8, and 9 in the test file and instead stick class Bob {} there :) | 17:36 | |
And just use one file | |||
perl6 test.t (or prove -e 'perl6' -vlr test.t for purty colours) | |||
cale2 | brokenchicken: The annoying thing is that in order to do any of the challenges, you have to learn a bunch of finicky tricks like you just said. Not very beginner friendly | 17:38 | |
ttt | is that the challenge? | ||
there doesn't seem to be much /more/ to it than that | 17:39 | ||
17:39
hchienjo joined
|
|||
cale2 | For example, I need to read about the difference between .pl6 and .pm6 files. Then I need to do a full tutorial in how .t files work | 17:39 | |
.t files are a world apart from common testing systems like you see with ruby/python/node | |||
yoleaux | cale2: Sorry, I don't know what timezone that is. If in doubt, see en.wikipedia.org/wiki/List_of_tz_d...time_zones for a list of options. | ||
17:41
Ven left,
rurban joined,
hchienjo left,
bwisti joined
|
|||
raschipi | "common testing systems" What? They all copied Perl's testing system. | 17:41 | |
17:41
dakkar left
|
|||
ttt | Is there a certain person or couple of people who do the bulk of perl6 infrastructure sysadmin work? | 17:42 | |
cale2 | raschipi: I've never seen a test file like that before. | ||
17:42
ttt is now known as teatime
17:43
Ven joined
|
|||
brokenchicken | cale2: well, what would be the alternative? | 17:43 | |
cale2: other than the fact that it doesn't tell you what file to write the code in, the instructions are pretty basic. | |||
Put code in file. Run perl6 test.t | |||
Yes, I told you a bunch of tricks to make stuff easier/prettier, but they're not a necessity | 17:44 | ||
teatime: like what | |||
teatime | like maintaining whatever is hosting perl6.org, for example | ||
and I think you guys have at least one CI system setup, etc. | 17:45 | ||
cale2 | brokenchicken: Other languages fetch 3 files for you. The test file, the readme, and the actual module that the test file is linked to. The module has the basics sketched out for you. | 17:46 | |
brokenchicken | "When you're logged in, you can say exercism fetch perl6 to get the next available exercise on the track." <-- I'd assume that actually fetches the proper files for you, so you don't even need to figure out stuff | ||
cale2: what does perl6 version fetch? | |||
cale2 | test file and readme | ||
brokenchicken | :( | ||
that's certainly LTA | |||
cale2 | So for a beginner, it's like, how do I go about even making the module | ||
brokenchicken | right | ||
cale2 | brokenchicken: the added bonus of including the module is that you can teach beginners some best practices about organization | 17:47 | |
brokenchicken | cale2: make a file called Bob.pm6 in it write class Bob { } inside and then start adding methods to it | ||
Maybe try to find whoever made those lessons and ask them to add more user-friendly files | 17:48 | ||
cale2 | exercism.io/languages/perl6/contribute | ||
Ok, I'll look into that. | |||
brokenchicken | teatime: I got access to those systems. What did you need? | ||
cale2: github.com/exercism/xperl6/issues/75 | 17:51 | ||
cale2 | I just made an issue as well :D | 17:54 | |
brokenchicken | heh | ||
17:56
Ven left
|
|||
cale2 | didn't mean to double up on the issue. just both had the same idea | 17:57 | |
17:59
Ven joined
18:06
gregf_ left
18:08
haxmeister joined
|
|||
haxmeister | just perused the perl6 docs again .. I must say in the last couple years the docs have improved extensively and the language looks beautiful. Hats off to a job well done, I think I'll start learning it now.. it seems very ready | 18:09 | |
18:09
andrzejku joined
|
|||
gfldex | tyvm | 18:09 | |
cale2 | haxmeister: I'm waiting for some books to come out, which should be soon. There is a print one, but no ebooks yet | 18:11 | |
[Coke] | haxmeister: thank you for the kind feedback. If you do find any issues, please feel free to let us know. | ||
18:13
nightfrog is now known as culb
|
|||
gfldex | haxmeister: please asked if you believe there is a hole in the docs. Most of the holes I plugged started as questions in this channel. | 18:13 | |
18:14
zakharyas left
|
|||
haxmeister | and wow.. what nice responses.. the beautifully friendly perl community is definitely back strong.. I'll go through some tuts probably this weekend, just went through some lisp books and am surprised at how much perl6 takes from lisp.. all the best stuff! | 18:15 | |
18:16
domidumont joined
|
|||
raschipi | I like the FAQ answer about Perl6 being Lisp in disguise: (not (not Nil)) | 18:19 | |
18:24
Ven left,
Ven_ joined
|
|||
brokenchicken | \o/ | 18:27 | |
18:29
wamba joined
|
|||
brokenchicken | Hard to imagine them raising $2,500,000/year considering a giant like Wikipedia pulls $75m | 18:37 | |
Called it! www.generosity.com/community-fundr...-s-encrypt | |||
51% of goal reached | |||
I mean irclog.perlgeek.de/perl6/2016-11-01#i_13498808 called it :) | 18:38 | ||
mst | $100k is still a decent chunk of change towards making LE awesome | ||
brokenchicken | Yeah :) And on reddit they said this wasn't their primary funding source anyway | 18:39 | |
raschipi | They have strong backing from the other CAs. The industry doesn't want to do the small stuff that's barely lucrative, but they need to make TLS pervasive to force the big clients to make use of it. LE is part of a plan to mark everything that doesn't use TLS as 'insecure', so that everything will need it. Big cash for the CAs, selling certs to everyone that can't for some reason use LE. | 18:42 | |
brokenchicken | heh | 18:44 | |
18:44
noganex left
|
|||
brokenchicken | But they do do small stuff. We paid like $100/year for a cert | 18:44 | |
No point now, of course. | |||
raschipi | They do, but there's not much money on it. | 18:45 | |
mspo | anvaka.github.io/common-words/#?lang=pl | ||
raschipi | When browsers change the padlock symbol to a broken red padlock on every connection that doesn't use TLS, then they'll be rolling in the dough. Backing LE was a requirement from browser vendors to do it. | 18:47 | |
mspo | is ___ a perl5 thing? | 18:49 | |
hartenfels | mspo: A triple underscore has no special meaning in Perl 5. | 18:50 | |
mspo | weird | ||
brokenchicken | mspo: where do you see the ___ tho? I only see the _ in the list | ||
heh nice list for ruby: anvaka.github.io/common-words/#?lang=rb | 18:51 | ||
18:51
shayan_ joined
|
|||
brokenchicken | oh, if you click on it, it shows code | 18:53 | |
Looks like someone likes to use ___ as a heredoc marker | |||
mspo | brokenchicken: scroll down a bit | ||
18:53
xzhao joined
|
|||
mspo | oh that would actually look pretty nice | 18:53 | |
18:55
domidumont left
|
|||
perlpilot was mildly hoping that zooming in would reveal more of a fractal nature | 18:57 | ||
brokenchicken | m: say q:to/📝/Yey, Unicode!📝 | ||
camelia | rakudo-moar 35a3c0: OUTPUT«Yey, Unicode!» | ||
brokenchicken | No _that's_ a nice heredoc marker :* | ||
*Now | 18:59 | ||
m: say q:to/🙆♀️/awesome🙆♀️ | 19:00 | ||
camelia | rakudo-moar 35a3c0: OUTPUT«awesome» | ||
raschipi | The most common thing after 'import' in python is 're'. | 19:01 | |
brokenchicken | m: say q:to"\c[woman gesturing OK]"awesome🙆♀️ | 19:02 | |
camelia | rakudo-moar 35a3c0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Ending delimiter \c[woman gesturing OK] not foundat <tmp>:3------> 3🙆♀️7⏏5<EOL> expecting any of: whitespace» | ||
DrForr | Grumble. I spent 3 hours fixing the here-doc test case in Perl6::Parser on Sunday, still have to get it to handle multiple heredocs per line. | ||
19:02
acrussell is now known as st_elmo
|
|||
brokenchicken | heh... multiple heredocs per line.. | 19:02 | |
.oO( multiple heredocs per line... interpolating multiple here docs per line! ) |
19:03 | ||
DrForr | say q:to[END],q:to[END]; # ... | ||
brokenchicken | Yeah, I know them; I'm still amused we support them :)= | 19:04 | |
omg... | 19:05 | ||
what I said actually works... | |||
19:08
labster joined
|
|||
brokenchicken | m: gist.github.com/zoffixznet/0c3c79b...b98e75b12b | 19:08 | |
camelia | rakudo-moar 35a3c0: OUTPUT«Hey, dawg I heard you liked heredocs so here's a heredoc in a heredoc » | ||
brokenchicken | hahaha. This is the most obscene thing I ever coded. | 19:09 | |
DrForr | Mind if I use that as a test case? :) | ||
brokenchicken | Go for it :) | 19:10 | |
DrForr | Dank u wel. | ||
brokenchicken | I'm not following why there are two spaces between "Hey," and "dawg" | ||
m: gist.github.com/zoffixznet/f0eb8ee...b6904fe28b | |||
camelia | rakudo-moar 35a3c0: OUTPUT«("Hey,", " dawg I heard you", "liked heredocs so here's", "a heredoc in a", "heredoc", "", "", "").Seq» | ||
brokenchicken | hm, a trimming bug? | ||
19:11
darutoko left
|
|||
brokenchicken | .tell samcv I found an atom highlighter bug, the qq:// doesn't get highlighted right :P gist.github.com/zoffixznet/f0eb8ee...b6904fe28b | 19:11 | |
yoleaux | brokenchicken: I'll pass your message to samcv. | ||
DrForr | Thanks. I'll use it later after I've buttoned down the rest of the stuff. | 19:12 | |
19:13
labster left
|
|||
brokenchicken | Ah. No bugs. I'm giving it a 2-item list by accident | 19:14 | |
raschipi | It's a bug in the programmer. | 19:17 | |
19:19
shayan_ left
|
|||
perlpilot | Most bugs are in programmers | 19:21 | |
brokenchicken | OMG! You can use them all on the same indent if you use different deliomiter haha | 19:25 | |
m: gist.github.com/zoffixznet/4793f10...1cecf1c6aa | 19:26 | ||
camelia | rakudo-moar 35a3c0: OUTPUT«Hey, dawg! I heard you liked heredocs so here's a couple of heredocs interpolated in a couple of heredocs» | ||
perlpilot | Why would your choice of delimiter preclude using them on the same indent? | 19:27 | |
brokenchicken | oh | 19:29 | |
I guess it doesn't | |||
But for a second I thought I could have them out of order.... | |||
raschipi | u: 📝 | ||
unicodable6 | raschipi, U+1F4DD MEMO [So] (📝) | ||
brokenchicken | m: gist.github.com/zoffixznet/ef31bd7...bb64e222dd | 19:31 | |
camelia | rakudo-moar 35a3c0: OUTPUT«5===SORRY!5===Ending delimiter ♥ not foundat <tmp>:10------> 3<BOL>7⏏5<EOL> expecting any of: whitespaceOther potential difficulties: Asked to remove 8 spaces, but the shortest indent is 0 spaces at <tmp>…» | ||
brokenchicken | Like this would've printed "this is heredoc sort" | ||
I guess I can't have it all.. | |||
.oO( but one day... maybe in Perl 7... ) |
|||
19:32
labster joined
19:37
shayan_ joined
|
|||
perlpilot | brokenchicken: I think you'd need a new bit of syntax, but you could probably do it in Perl 6. something like: put .words given multi-here-doc(<😂 🙆♀️ ♥ 📝>); ... | 19:39 | |
19:40
ShoaibJahejo left
|
|||
raschipi | perlpilot, brokenchicken: Macros can't get here soon enough, then. Can't be without this. | 19:41 | |
cale2 | Interesting to see the most starred perl6 github repos | 19:43 | |
19:43
ShoaibJahejo joined
|
|||
raschipi | link? | 19:43 | |
cale2 | github.com/search?l=&o=desc&am...=%E2%9C%93 | ||
perlpilot | yeah, macros are the only "big piece" of Perl 6 still missing from Rakudo. But there's quite a bit you can do without them even still. | ||
cale2 | Plack was re-written in prl6? | ||
perlpilot | Besides ... there's always EVAL ;-) | ||
brokenchicken | m: say "\c[woman health worker: dark skin tone]\c[woman factory worker: medium-dark skin tone]\c[man technologist: medium-light skin tone]" | 19:44 | |
camelia | rakudo-moar 35a3c0: OUTPUT«👩🏿⚕️👩🏾🏭👨🏼💻» | ||
brokenchicken is impressed | |||
m: say "\c[family: man, man, boy, boy]" | 19:45 | ||
camelia | rakudo-moar 35a3c0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unrecognized character name family: manat <tmp>:1------> 3say "\c[family: man7⏏5, man, boy, boy]"» | ||
brokenchicken | hmmm | ||
19:45
cdg left
|
|||
brokenchicken | m: say "\c[couple with heart]" | 19:45 | |
camelia | rakudo-moar 35a3c0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unrecognized character name couple with heartat <tmp>:1------> 3say "\c[couple with heart7⏏5]"» | ||
brokenchicken | guess those ain't part of it yet | ||
19:47
noganex joined
|
|||
raschipi | cale2: It's just the specs repo that is marked Perl6. It contains mostly pod. | 19:47 | |
19:48
cale2 left
19:52
shayan_ left
|
|||
brokenchicken | m: NFC.new("\c[man walking]".NFC).say | 20:01 | |
camelia | rakudo-moar 35a3c0: OUTPUT«Cannot create an NFD directly in block <unit> at <tmp> line 1» | ||
brokenchicken | .oO( NFD? ) |
||
How can I modify individual .NFC items and then put it back as a Str? | |||
m: "\c[man walking]".NFC[0] = 42 | |||
camelia | rakudo-moar 35a3c0: OUTPUT«Cannot modify an immutable Int in block <unit> at <tmp> line 1» | ||
brokenchicken | like something like that | ||
m: Uni.new("\c[man walking]".NFC).say | |||
camelia | rakudo-moar 35a3c0: OUTPUT«This representation (VMArray) cannot unbox to a native int (for type NFC) in block <unit> at <tmp> line 1» | ||
brokenchicken | m: Uni.new(|"\c[man walking]".NFC).Str.say | 20:02 | |
camelia | rakudo-moar 35a3c0: OUTPUT«🚶♂️» | ||
brokenchicken | Ah, k | ||
20:02
shayan_ joined
20:04
effbiai left
20:07
st_elmo left
20:08
raschipi left,
bjz joined
20:09
acrussell joined
20:10
cale2 joined
|
|||
brokenchicken | m: Uni.new("\c[man walking]".NFC.Array.&{.[2]:=.[2]-2;$_}).Str.say | 20:12 | |
camelia | rakudo-moar ae050f: OUTPUT«🚶♀️» | ||
brokenchicken | neat | ||
20:13
iH2O joined
20:16
FROGGS left
|
|||
brokenchicken | m: say EVAL '\c[' ~ 'man bouncing ball' ~ ']': | 20:17 | |
camelia | rakudo-moar ae050f: OUTPUT«5===SORRY!5=== Error while compiling /home/camelia/EVAL_0Undeclared routines: ball used at line 1. Did you mean 'all'? bouncing used at line 1 c used at line 1 man used at line 1. Did you mean 'max', 'tan', 'min', 'map'?» | ||
20:17
espadrine_ joined
|
|||
brokenchicken | routine ball? what'sittalking aboot? | 20:17 | |
m: say EVAL ('\c[' ~ 'man bouncing ball' ~ ']'): | 20:18 | ||
camelia | rakudo-moar ae050f: OUTPUT«5===SORRY!5=== Error while compiling /home/camelia/EVAL_0Undeclared routines: ball used at line 1. Did you mean 'all'? bouncing used at line 1 c used at line 1 man used at line 1. Did you mean 'max', 'tan', 'min', 'map'?» | ||
hartenfels | You don't have quotes around your \c[...]. | ||
brokenchicken | weird | ||
Ah. Thanks. | |||
20:19
hartenfels left
20:20
02HAAAAAN is now known as tomaw
20:21
yqt joined
20:25
iH2O left
|
|||
SmokeMachine | u: 😀 | 20:29 | |
unicodable6 | SmokeMachine, U+1F600 GRINNING FACE [So] (😀) | ||
SmokeMachine | u: 😊 | 20:30 | |
unicodable6 | SmokeMachine, U+1F60A SMILING FACE WITH SMILING EYES [So] (😊) | ||
SmokeMachine | u: 🙂 | 20:31 | |
unicodable6 | SmokeMachine, U+1F642 SLIGHTLY SMILING FACE [So] (🙂) | ||
timotimo | nobody told cale2 that github tends to think perl code is perl6 even when it's perl5? | 20:34 | |
20:35
girafe joined
|
|||
cale2 | timotimo: I figured github went off of the file endings rather than trying to parse syntax | 20:38 | |
timotimo | oh, you returned, good | ||
the key to the mystery is called "linguist" | |||
i think it lives under github.com/github/linguist | |||
brokenchicken | cale2: it can't really do that. Perl 6 and Perl 5 and something else all use .t files | 20:43 | |
20:55
perlpilot left
20:57
cdg joined
|
|||
awwaiid | cale2: maybe you already know, but there is some discussion at github.com/perl6/doc/issues/167 | 20:58 | |
21:02
Gasher left
21:05
bjz left
21:09
xzhao left
21:10
mr_ron joined
|
|||
mr_ron | docs: In Perl 6 regexes, | does LTM, which decides which alternation wins an ambiguous match based off of a set of rules, rather than about which was written first. docs.perl6.org/language/5to6-nutsh...lternation | 21:12 | |
"set of rules"? is it just longest alternative match, Am I missing something or does rewriting belong as part of issue 1141 github.com/perl6/doc/issues/1141 ? | 21:14 | ||
awwaiid | cale2: also, github.com/github/linguist/blob/ma...cs.rb#L328 | ||
21:14
Gasher joined
|
|||
SmokeMachine | u: ⋃ | 21:15 | |
unicodable6 | SmokeMachine, U+0020 SPACE [Zs] ( ) | ||
SmokeMachine, U+22C3 N-ARY UNION [Sm] (⋃) | |||
RabidGravy | I dunno, gh thinks that Term::ReadKey is C++ | 21:16 | |
awwaiid | mr_ron: yes, afaict you are correct and it can be simplified | ||
SmokeMachine | c: ∪ | ||
u: ∪ | |||
unicodable6 | SmokeMachine, U+222A UNION [Sm] (∪) | ||
mr_ron | awwaiid: thanks will add to issue soon ... | 21:17 | |
21:20
perlpilot joined
21:29
andrzejku left
21:39
bjz joined
21:44
agentzh joined
21:45
rindolf left
|
|||
agentzh | p6: my $a = [1, 2]; my Array of Int $r = $a; | 21:45 | |
camelia | rakudo-moar 93b0ff: OUTPUT«Type check failed in assignment to $r; expected Array[Int] but got Array ($[1, 2]) in block <unit> at <tmp> line 1» | ||
agentzh | could anyone help me with this "Array of Int" type constraint? | ||
sorry if it's a FAQ. | 21:46 | ||
21:47
dha joined
|
|||
timotimo | you have to assign into that array in order for it to work | 21:48 | |
m: my $a = [1, 2]; my Array of Int $r .= new(); @$r = $a; say $r | |||
camelia | rakudo-moar 93b0ff: OUTPUT«Type check failed in assignment to ; expected Int but got Array ($[1, 2]) in block <unit> at <tmp> line 1» | ||
timotimo | oh, there's a bug | ||
(just the name being wrong) | |||
m: my $a = [1, 2]; my Array of Int $r .= new(); @$r = @$a; say $r | |||
camelia | rakudo-moar 93b0ff: OUTPUT«[1 2]» | ||
timotimo | there we go, agentzh | ||
agentzh | timotimo: ah, thanks | 21:49 | |
timotimo: because i'm using it in a class attribute, really, can i avoid initializing an empty array to it? | 21:50 | ||
21:50
rindolf joined
|
|||
timotimo | no, but you can just have "has Array of Int $.foo = Array[Int].new()" | 21:51 | |
and it'll initialize it for you | |||
(but only if you don't have a custom BUILD submethod) | |||
(but you can just use TWEAK in that case) | 21:52 | ||
agentzh | timotimo: i see. thanks! | ||
timotimo | the reason why you have to "@$r =" in the code above is because when there's a listy thing on the LHS of the =, it'll do list assignment, and otherwise it'll do item assignment | 21:53 | |
so if you just $r = something, it'll replace whatever was in $r before | |||
21:53
Gasher left
|
|||
timotimo | but if you @$r = something, it'll put stuff into the array that's in $r | 21:53 | |
21:53
bjz left
|
|||
timotimo | and the reason why you have to have "@$a" on the RHS is that otherwise you'll be trying to put a single item into the array of ints that's an array itself | 21:54 | |
so it'll complain that it wanted an Int, but it got Array instead | |||
and the reason why you can assign an Array into an Array of Int variable is because assigning an array into an array will iterate over the RHS array and put individual items into the array on the LHS | |||
21:54
cdg left
|
|||
timotimo | at that point the types will match up (wants Int, gets Int) | 21:55 | |
21:55
cdg joined
|
|||
agentzh | timotimo: i hoped that it would work with Array references as well so that i can avoid array copying when constructing the object. | 21:58 | |
timotimo: i'm coming from the Moose/Type::Tiny world, so i've already got used to Array[...] type constraints on array refs ;) | 21:59 | ||
timotimo | you can't put an Array into a variable that's typed Array[Int] | 22:00 | |
agentzh | can i have something like an ArrayRef[Int] here? *grin* | ||
this limitation looks a little bit strange to me :) | 22:01 | ||
22:01
skids left
|
|||
agentzh | timotimo: anyway, thanks for your help. i'll live with has Array[MyStmt] @.stmts; for now. | 22:02 | |
timotimo | you can just assign the array if you type it correctly | ||
m: my Array of Int $foo; my Array of Int $bar = Array[Int].new(1, 2, 3, 4); $foo = $bar; dd $foo; $bar[2] = 99; dd $foo | 22:03 | ||
camelia | rakudo-moar 76f14a: OUTPUT«Array[Int] $foo = Array[Int].new(1, 2, 3, 4)Array[Int] $foo = Array[Int].new(1, 2, 99, 4)» | ||
timotimo | see? | ||
but if you don't create an Array[Int], it won't let you assign to a variable or attribute that you've typed Array[Int] | |||
ugexe | gfldex: the problem your facing is essentially "why does `perl6 -I../my-dep/lib -e 'shell q|perl6 -Mmy-dep -e0|'` not find my-dep?" | 22:04 | |
the dependency is fulfilled by -I../some/path | 22:05 | ||
timotimo | so use PERL6LIB instead of -I | ||
ugexe | if someone is inclined to sure, but thats not the correct action for zef to take | ||
timotimo | oh | 22:06 | |
22:07
RabidGravy left
|
|||
timotimo | agentzh: ack? | 22:08 | |
agentzh | timotimo: i see. thanks! | 22:09 | |
ugexe | the problem is in a Build.pm he is doing `run $has-dependency-from-meta6`. zef has supplied the dependencies to Build.pm (via -I) but the run statement needs to handle getting those into its new process itself (setting -I or PERL6LIB itself from my @include = $*REPO.repo-chain.map(*.path-spec)) | ||
timotimo | btw, you don't have to spell out Array[Int].new if you just use a @-sigiled variable | 22:10 | |
gfldex | ugexe: I use `'-I' «~« @include` instead of a map. Somehow more pleasing to the eyes. | 22:20 | |
There must be quite a few trivial .map that could be replaced by a «~« | |||
22:23
cale2 left,
wamba left
22:24
AlexDaniel joined
|
|||
agentzh | m: my Array[Int] @a; push @a, 32; | 22:26 | |
camelia | rakudo-moar 99b186: OUTPUT«Type check failed in assignment to @a; expected Array[Int] but got Int (32) in block <unit> at <tmp> line 1» | ||
agentzh | timotimo: any ideas on this? ;) | 22:27 | |
22:27
kalkin- joined,
acrussell left
|
|||
agentzh | m: my Array[Int] @a; push @a, Int.new(32); | 22:27 | |
camelia | rakudo-moar 99b186: OUTPUT«Type check failed in assignment to @a; expected Array[Int] but got Int (32) in block <unit> at <tmp> line 1» | ||
timotimo | m: my Array[Int] @a; @a.push(32) | ||
camelia | rakudo-moar 99b186: OUTPUT«Type check failed in assignment to @a; expected Array[Int] but got Int (32) in block <unit> at <tmp> line 1» | ||
timotimo | oh, of course | ||
m: my Array[Int] @a .= new(); @a.push(32) | |||
camelia | rakudo-moar 99b186: OUTPUT«Type check failed in assignment to @a; expected Array[Int] but got Int (32) in block <unit> at <tmp> line 1» | ||
timotimo | um ... | 22:28 | |
22:28
acrussell joined
|
|||
timotimo | oh | 22:28 | |
sorry, i'm distracted by videos | |||
"my Array[Int] @a" defines you want an array of arrays of int | |||
then you give it an int instead of an array of ints | |||
and so it complains | |||
22:28
acrussell is now known as st_elmo,
hartenfels joined
|
|||
timotimo | m: my Int @a .= new(); @a.push(32) | 22:28 | |
camelia | ( no output ) | ||
timotimo | there you go | ||
22:28
st_elmo left
22:29
st_elmo joined
|
|||
moritz | haxmeister: you said earlier there is no ebook about Perl 6 yet. Let me plug leanpub.com/perl6 where you can buy an ebook right now. It's work in progress, but you get updates for free once you purchased it | 22:30 | |
</plug> | |||
22:31
st_elmo left
|
|||
kalkin- | hi #perl6 | 22:31 | |
hartenfels | Good * kalkin. | 22:32 | |
kalkin- | I'm looking at IO::Socket::INET code right now and trying to figure out where the DNS stuff is happening | ||
background: I'm need to resolve a specific SRV and I wanted to find out how Rakudo/MoarVM knows which local DNS server to use | 22:33 | ||
s/I'm/I/g | 22:34 | ||
timotimo | it just uses libuv's resolver i believe | ||
agentzh | timotimo: awesome! appreciate it! | 22:35 | |
kalkin- | timotimo: moarvm? (I don't see any code for it in rakudo) | ||
timotimo | yep, moarvm | ||
kalkin- | timotimo: thanks | 22:36 | |
agentzh | timotimo: my code finally works. thanks! | 22:37 | |
timotimo: i was about to abandon type constraints ;) | |||
timotimo: you saved my day. | |||
22:37
lukaramu left
|
|||
agentzh | does anyone know if Perl 6 grammar parser supports automatic error reporting on parse failures? | 22:39 | |
like an error message saying "expecting token blah, but found xxxx"? | 22:40 | ||
timotimo | it does not | ||
rakudo built that itself | |||
agentzh | timotimo: yeah, i noted that in the rakudo parser. | ||
timotimo | it's unfortunately not re-usable, i don't think | ||
agentzh | timotimo: does perl 6 grammar support line number and column number calculations out of the box? | ||
or do i have to compute that info myself in perl 6? | |||
timotimo | it does not | ||
however, you may be able to reuse the mechanism in HLL::Compiler | 22:41 | ||
too distracted with stuff to write up something | |||
but it's not so terribly hard to do, though. split on \n, calculate prefix sum, and presto | |||
well, binary search through that prefix sum list | |||
agentzh | timotimo: is HLL::Compiler supposed to be used by perl 6 users? | 22:42 | |
timotimo | hmm | ||
perhaps not | |||
agentzh | timotimo: yeah, just wondering if perl 6 already provides such bells and whistles :) | 22:43 | |
hartenfels | I had a similar problem recently, and got at the correct line number via $/.orig and $/.from. | ||
agentzh | they are common features in parsing frameworks like Parse::RecDescent and Pegex. | ||
AlexDaniel | yea, it's not too hard to do it yourself | ||
hartenfels | Where the former is the parsed text and the latter is the position it bailed out at. | ||
agentzh | hartenfels: aye, that's what i'll have to do. | ||
timotimo | sounds like there ought to be something in the ecosystem | ||
agentzh | *nod* | 22:44 | |
not hard, just tedious and not very beautiful. | |||
hartenfels | This being the code for it, and for putting a ⏏ between before() and after() github.com/hartenfels/LambdaDL/blo...m6#L13-L15 | 22:45 | |
agentzh | hartenfels: great! thanks! | ||
agentzh looks at LambdaDL. | 22:46 | ||
hartenfels | I don't think it's anything interesting to look at, at least not in the larval stage it is in right now. | 22:48 | |
kalkin- | doesn't windows have an equivalent of resolv.conf? I thought at some point they had some file with this name in different folder | ||
kalkin- is thinking about just parsing resolv.conf to cheat around getting DNS server | |||
hartenfels | kalkin-: the HOSTS file? | ||
kalkin- | hartenfels: does HOSTS file do on windows the same as resolv.conf? Not the same what linux hosts does? | 22:49 | |
timotimo | it's just called hosts | 22:50 | |
it lives in a folder called "etc" | |||
(no-one knows why!" | |||
kalkin- | so there is an actual C://etc/hosts path on Windows? o_O | ||
hartenfels | kalkin-: that might be true, somehow that just came to mind as the place to mess up people's resolution. | ||
timotimo | not directly under C | 22:51 | |
it's buried rather deep under Windows | |||
brokenchicken | kalkin-: c:\windows\system32\drivers\etc\hosts | ||
kalkin- | brokenchicken: thanks! | ||
timotimo | "deep" | 22:52 | |
22:52
Actualeyes joined
|
|||
kalkin- is guessing windows specifics over irc | 22:52 | ||
or I will just let people who use windows make a PR if the want to use such a weird system :) | 22:53 | ||
22:53
haxmeister left
|
|||
brokenchicken | kalkin-: or rather in %systemroot%\system32\drivers\etc\hosts | 22:53 | |
kalkin- | or I could hardcode 8.8.8.8 for windows | 22:54 | |
brokenchicken | heh | ||
I recall MS provided a free dev version of windows; run it in a VM and do it right. | 22:56 | ||
kalkin- | brokenchicken: right good idea, thanks! | 22:57 | |
btw i figured on linux/unix i can just use NativeCall with resolv.h | |||
23:00
girafe left
23:01
MasterDuke left
23:04
xyz_ joined
|
|||
timotimo | a google image search suggests that "footgun" is a move for inline skating | 23:05 | |
23:05
MasterDuke joined
|
|||
brokenchicken | lulz | 23:05 | |
xyz_ | In Perl 6, do the keys of Hash or Map must be of Str type? If so is there an associative container which allows me to specify both the key type and the value type? | 23:06 | |
brokenchicken | m: my %h{Any} = 42 => 72; %h.keys[0].^name.say | ||
camelia | rakudo-moar a5cac9: OUTPUT«Int» | ||
brokenchicken | You can use whatever you want instead of Any | ||
23:07
cdg_ joined
|
|||
hartenfels | xyz_: docs about that are here I think docs.perl6.org/type/Hash#Object_ha...onstraints | 23:07 | |
brokenchicken | m: my Int %h{Int} = 42 => 72; dd %h | ||
camelia | rakudo-moar a5cac9: OUTPUT«Hash[Int,Int] %h = (my Int %{Int} = 42 => 72)» | ||
gfldex | m: my %h{*}; say %h.of | ||
camelia | rakudo-moar a5cac9: OUTPUT«(Any)» | ||
brokenchicken | m: my Int %h{Int} = 42e0 => 72e-; dd %h | ||
camelia | rakudo-moar a5cac9: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Confusedat <tmp>:1------> 3my Int %h{Int} = 42e0 => 727⏏5e-; dd %h» | ||
brokenchicken | m: my Int %h{Int} = 42e0 => 72e0; dd %h | ||
camelia | rakudo-moar a5cac9: OUTPUT«Type check failed in binding to key; expected Int but got Num (42e0) in block <unit> at <tmp> line 1» | ||
brokenchicken | xyz_: ^ and this way you can specify types of both keys and values | ||
23:07
cdg_ left
23:10
TEttinger joined,
cdg left
|
|||
xyz_ | It looks like without reading the documentation, just by looking at the class definition of Hash I wouldn't know I could sepcify two type parameters. | 23:10 | |
23:11
sammers left
|
|||
brokenchicken | That's why we have documentation ;) | 23:11 | |
23:11
sammers joined
|
|||
brokenchicken | m: my $h = Hash[Int,Num].new; $h{42e0} = 42 | 23:13 | |
camelia | ( no output ) | ||
brokenchicken | m: my $h = Hash[Int,Num].new; $h{42} = 42 | ||
camelia | rakudo-moar a5cac9: OUTPUT«Type check failed in binding to key; expected Num but got Int (42) in block <unit> at <tmp> line 1» | ||
xyz_ | brokenchicken: I get that...is there a way to programatically extract the type parameter information of a class? For example how many type parameters you can speciy? | 23:14 | |
gfldex | m: my Int %h{*}; say %h.keyof | 23:15 | |
camelia | rakudo-moar a5cac9: OUTPUT«(Whatever)» | ||
brokenchicken | m: my Int %h{*}; say %h.of | ||
camelia | rakudo-moar a5cac9: OUTPUT«(Int)» | ||
brokenchicken | so yeah | ||
xyz_: I dont think you can do this thing on just any class. IIRC this stuff is provided to Hash by roles... like Associative for .of | 23:16 | ||
23:17
labster left
|
|||
xyz_ | brokenchicken: Looking at Associative.pm, the role has only one type parameter, which I guess is the value type. Where does Hash get its key type parameter? | 23:19 | |
gfldex | the role is TypedHash | ||
github.com/rakudo/rakudo/blob/nom/...sh.pm#L454 | |||
brokenchicken | Thanks | 23:21 | |
xyz_ | gfldex: That's highly magical, but thanks! :-) | ||
gfldex | xyz_: it's not. Look for method ^parameterize. It's just a mixin. | 23:22 | |
23:23
skids joined,
agentzh left
23:24
cibs left,
obra_ left,
profan_ left,
shmibs left,
drrho left,
alimon left,
mulk[m] left,
dp[m] left,
wictory[m] left,
xfix left,
cibs joined,
obra_ joined,
profan_ joined,
shmibs joined,
drrho joined,
alimon joined,
mulk[m] joined,
dp[m] joined,
wictory[m] joined,
xfix joined
23:28
cdg joined,
kalkin- left
23:31
dha left
23:32
cdg left
|
|||
xyz_ | gfldex: I feel like ^parameterize is where the magic is... | 23:37 | |
23:43
cdg joined
23:45
rurban left
23:47
espadrine_ left,
rindolf left
23:50
cpage_ left
23:52
cpage_ joined
23:53
neewbie joined
23:55
pmurias left
|