»ö« 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. |
|||
TimToady | otoh, saying .comb(10) is really just .comb( / . ** 10 / ) has something to be said, teachingwise | 00:00 | |
or . ** 1..10 | 00:01 | ||
m: say ("x" x 15).comb(10) | |||
camelia | rakudo-moar e5d7a1: OUTPUT«(xxxxxxxxxx xxxxx)» | ||
TimToady | m: say ("x" x 10).comb(10) | 00:02 | |
camelia | rakudo-moar e5d7a1: OUTPUT«(xxxxxxxxxx)» | ||
BenGoldberg | m: while( $*IN.read(16) ) -> $blob { dd $blob } | ||
camelia | rakudo-moar e5d7a1: OUTPUT«5===SORRY!5===Word 'while' interpreted as 'while()' function call; please use whitespace instead of parensat <tmp>:1------> 3while7⏏5( $*IN.read(16) ) -> $blob { dd $blob }Unexpected block in infix position (two terms in a row)at <…» | ||
BenGoldberg | m: while ( $*IN.read(16) ) -> $blob { dd $blob } | ||
camelia | rakudo-moar e5d7a1: OUTPUT«Buf[uint8] $blob = Buf[uint8].new(67,195,169,97,100,32,115,108,195,161,110,32,97,103,32,115)Buf[uint8] $blob = Buf[uint8].new(108,195,169,105,98,104,116,101,32,109,97,111,114,103,97,32)Buf[uint8] $blob = Buf[uint8].new(67,104,111,110,116,97,101,32,68…» | ||
TimToady | well, that's okay if you want to read 16 bytes, but the convo was about "characters", so I assumed they didn't mean bytes :) | 00:04 | |
but reading N characters from a file actually requires reading past the last character to make sure you have all the combiners, so if you're depending on the file pos to be right after the char, it might not be | 00:05 | ||
BenGoldberg | m: say so "" | 00:08 | |
camelia | rakudo-moar e5d7a1: OUTPUT«False» | ||
00:09
canopus left
00:10
zacts left
|
|||
BenGoldberg | m: while ( $*IN.read(16) ) -> $blob { say $blob.decode("utf8") } | 00:10 | |
camelia | rakudo-moar e5d7a1: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGallAgus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin saMalformed termination of…» | ||
BenGoldberg | m: my $all = ""; while ( $*IN.read(16) ) -> $blob { $all ~= $blob.decode("utf8") } | 00:11 | |
camelia | rakudo-moar e5d7a1: OUTPUT«Malformed termination of UTF-8 string in block <unit> at <tmp> line 1» | ||
TimToady | you split a character | 00:12 | |
BenGoldberg | I realize that ;) | ||
I think that .decode should take an optional argument, :trailing-garbage, which causes it to return a two-element list, a Str and a Blob, where the Blob is everything from the first bad byte onwards. | 00:13 | ||
Or something like that. | 00:14 | ||
00:18
labster left,
canopus joined
00:27
tushar joined
00:28
tushar left
00:31
cyphase_eviltwin left,
heatsink left
00:34
benji_ left
00:35
cyphase joined
00:36
osdfuhsui joined
00:46
canopus left
00:47
pierre_ joined
00:52
canopus joined
00:59
lue is now known as ShimmerFairy
01:12
kaare_ joined
|
|||
dalek | osystem: 4671360 | ugexe++ | META.list: Add distribution with same name, different auth For Perl6 tool chain testing purposes |
01:15 | |
01:20
canopus left
01:22
buharin left,
ShimmerFairy left
01:24
ShimmerFairy joined
01:25
Actualeyes joined,
canopus joined
01:27
bjz joined
01:28
pierre_ left
01:31
ShimmerFairy left
01:32
pierre_ joined
01:38
buharin joined
01:44
poohman_ joined
01:45
ilbot3 left
|
|||
osdfuhsui | How would I print numbers like this 00001, 00002, ..., 00125, 00126, etc. | 01:47 | |
01:47
poohman left,
ilbot3 joined
|
|||
osdfuhsui | in a short way | 01:51 | |
01:52
itaipu joined
01:56
djbkd joined
|
|||
osdfuhsui | nevermind I've figured it out | 01:56 | |
by using .fmt | |||
01:57
itaipu left
01:58
itaipu joined
|
|||
BenGoldberg | m: printf '%05d', $_ for 1..5; | 01:58 | |
camelia | rakudo-moar e5d7a1: OUTPUT«0000100002000030000400005» | ||
BenGoldberg | m: printf "%05d\n", $_ for 1..5; | ||
camelia | rakudo-moar e5d7a1: OUTPUT«0000100002000030000400005» | ||
BenGoldberg | osdfuhsui, ^ | ||
02:02
canopus left
|
|||
osdfuhsui | How would I go about reading from a file that isn't utf-8 | 02:04 | |
like a binary file | |||
02:07
canopus joined
|
|||
osdfuhsui | I see you can use :bin | 02:07 | |
I don't understand how though | |||
After I open the binary file with the :bin option, how would I read 16 bytes at a time | 02:10 | ||
02:11
itaipu left
|
|||
MasterDuke | you might be able to use unpack docs.perl6.org/type/Buf#(Blob)_method_unpack | 02:11 | |
or 'my $b = slurp "file", :bin; my @bytes = $b[0..3]' | 02:14 | ||
TimToady | you can read a binary file with .read(16) | ||
it'll return a 16-byte buf | |||
02:16
itaipu joined
|
|||
osdfuhsui | thank both of you | 02:17 | |
How would I see how many bytes there is before doing that masterduke? | 02:18 | ||
02:18
canopus left
|
|||
osdfuhsui | or would I just use .elems | 02:19 | |
okay I've got it, thanks | 02:20 | ||
02:26
canopus joined
02:28
Shantanu01 joined
02:31
Shantanu1 left
02:33
wamba joined,
buharin left,
noganex_ joined
02:35
noganex left
02:40
Shantanu1 joined,
Shantanu01 left
|
|||
AlexDaniel | m: my $foo = ‘hell’; say ‘hello world’ ~~ / {$foo ~ ‘o’} ‘ world’ / | 02:44 | |
camelia | rakudo-moar e5d7a1: OUTPUT«「 world」» | ||
AlexDaniel | m: my $foo = ‘hell’; say ‘hello world’ ~~ /^ {$foo ~ ‘o’} ‘ world’ / | 02:45 | |
camelia | rakudo-moar e5d7a1: OUTPUT«Nil» | ||
AlexDaniel | what was the right way to do it? | ||
TimToady | add <> | ||
AlexDaniel | m: my $foo = ‘hell’; say ‘hello world’ ~~ /^ <{$foo ~ ‘o’}> ‘ world’ / | ||
camelia | rakudo-moar e5d7a1: OUTPUT«「hello world」» | ||
AlexDaniel | right | ||
TimToady: thank you | 02:46 | ||
TimToady | actually watching olympics, but have laptop sitting on the TV tray :) | ||
02:49
buharin joined
02:53
itaipu left
02:54
pierre_ left,
itaipu joined
02:58
bjz left
03:01
pierre_ joined
03:04
pierre_ left,
pierre_ joined
03:07
kshannon left
03:08
kshannon joined
03:16
poohman_ left,
poohman joined
03:17
BenGoldberg left
03:18
zacts joined
03:24
canopus left
|
|||
ugexe | .tell TheLemonMan the issues you've brought up with zef have been addressed | 03:27 | |
yoleaux | ugexe: I'll pass your message to TheLemonMan. | ||
03:28
canopus joined
03:32
_28_ria joined
03:40
pierre_ left
03:42
AlexDaniel left
03:44
pierre_ joined
03:47
vapace joined
|
|||
vapace | p6: say Int.HOW; say Array.HOW; say Hash.HOW; | 03:50 | |
camelia | rakudo-moar e5d7a1: OUTPUT«Perl6::Metamodel::ClassHOW.newMethod 'gist' not found for invocant of class 'Perl6::Metamodel::ClassHOW+{<anon>}' in block <unit> at <tmp> line 1» | ||
04:04
melezhik left
04:08
pierre_ left,
nige1 joined
04:09
melezhik joined,
Cabanossi left
04:12
Cabanossi joined
04:13
TEttinger left,
TEttinger joined
04:14
pierre_ joined
04:16
labster joined
04:17
AndyBotwin left
04:20
wamba left,
wamba joined
04:21
bjz joined
04:35
vapace left
04:36
apostoffice joined
04:40
wamba left
04:52
cpage_ left
04:53
cpage_ joined
04:56
pierre_ left
05:08
apostoffice left
05:10
doublec joined
05:13
bjz left
05:19
buharin left
05:32
Shantanu01 joined
05:33
brrt left,
poohman left
05:34
Shantanu1 left
05:36
buharin joined
05:38
labster left
05:41
Shantanu01 left,
khw left
05:56
osdfuhsui left
06:10
domidumont joined
06:14
domidumont left
06:15
domidumont joined
06:17
pierre_ joined
06:18
nebuchad` is now known as nebuchadnezzar
06:21
TEttinger left,
TEttinger joined
06:22
firstdayonthejob joined
06:25
CIAvash joined
06:28
matt_ left
06:34
jonas1 joined
06:37
TEttinger left
06:42
TEttinger joined
06:46
firstdayonthejob left
06:53
nige1 left
06:54
rindolf joined
07:00
pierre_ left,
labster joined
07:04
pierre_ joined
07:12
TEttinger left
07:17
matt_ joined,
matt_ is now known as Guest98997
07:23
zakharyas joined,
wamba joined
07:31
darutoko joined
07:39
isacloud joined
07:43
leont joined
07:47
dogbert17 left,
g4 joined
07:50
bjz joined
07:52
dakkar joined
07:57
RabidGravy joined,
pierre_ left
08:00
pierre_ joined
|
|||
nine wonders why App::Ack is most wanted when there's already a perfectly useful one written in Perl 5 | 08:17 | ||
DrForr | Because everything's better in perl 6? :) | 08:18 | |
timotimo | well, perl6 regexes would require either Inline::Perl5/6 work for Ack itself, or a re-implementation | 08:19 | |
DrForr | m: "foo" ~~ m:p5{[f]} | 08:20 | |
camelia | rakudo-moar f648d3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Adverb p5 not allowed on mat <tmp>:1------> 3"foo" ~~ m:p5{[f]}7⏏5<EOL>» | ||
DrForr | Thought there was a p5 adverb for that. | 08:21 | |
timotimo | need a capital P | ||
DrForr | m: "foo" ~~ m:P5{[f]} | ||
camelia | ( no output ) | ||
DrForr | Oh, you're talking the other direction. Too much blood in my caffeine supply. | 08:22 | |
timotimo | :) | 08:23 | |
08:24
user9 left
08:27
user9 joined
08:36
wamba left
|
|||
DrForr | O gawd, I'm now thinking about an App::Ack6 that lets you do something like: ack --Perl6 'has <variable> where * > 0'. | 08:36 | |
timotimo | how is that supposed to work :) | 08:38 | |
DrForr | Add an option to load a grammar library for your RE. | 08:39 | |
08:42
leont left
|
|||
timotimo | oh, were you meaning 'has ' and ' where * > 0' to be literals? | 08:43 | |
nine | Reminds me of semantic patching | 08:44 | |
DrForr | Yes, literal terms. Though allowances woudl have to be made for the metachar rule in p6. | 08:45 | |
timotimo | well, regexes are slangable :P | 08:46 | |
DrForr | I know, I know. Too many ideas, so little time. | ||
08:47
pierre_ left
08:48
pierre_ joined
|
|||
DrForr | Might at least make people less frightened of p6 regular expressions :) | 08:49 | |
(not that I've really seen that in talks; I tread on it lightly though.) | |||
08:52
rudolfochrist joined
08:53
wamba joined
|
|||
El_Che | lo | 08:55 | |
regular expressions | |||
DrForr | Afternoon... almost. | 08:56 | |
El_Che | the name is already a lie, so how do you explain it to people in 1 hour? :) | ||
08:56
labster left
|
|||
DrForr | I usually spring that on people halfway in :) | 08:56 | |
El_Che | you close the door and windows before | ||
timotimo | i thought you have to open windows in order to protect the glass during explosions? | 08:57 | |
08:58
labster joined
|
|||
DrForr | timotimo: I just leave the transoms at the top unlocked, that's enough to dissipate the blast. | 08:58 | |
zengargoyle | \quit | 09:00 | |
09:00
zengargoyle left
|
|||
lizmat clickbaits p6weekly.wordpress.com/2016/09/05/...ao-perl-6/ | 09:01 | ||
afk& | |||
09:01
lizmat left
|
|||
timotimo | "transoms", now there's a word i've learned | 09:02 | |
DrForr | The little windows over doors, usually in the bathroom for venting. | ||
timotimo | mhm | 09:03 | |
okay, gotta go afk, else i might end up missing my train | |||
DrForr | Wiping down the glass afterwards is a problem thoguh, I usually tip the maids extra. | ||
09:04
pierre_ left
|
|||
Ulti | m: my $junction = ((set 0,1,2,3) (&) (set 0,1,2)).any; say $junction; say (1 => True) ~~ $junction; say 1 ~~ $junction; | 09:06 | |
camelia | rakudo-moar f648d3: OUTPUT«any(0 => True, 1 => True, 2 => True)TrueMethod '0' not found for invocant of class 'Int' in block <unit> at <tmp> line 1» | ||
Ulti | can anyone help me understand the behaviour of the .any on the Set type | 09:07 | |
is this just a result of Set being bag like? | |||
timotimo | i expect .any to call .list on things | ||
09:07
pierre_ joined
|
|||
Ulti | well that is what .list gives you | 09:07 | |
a list of pairs where the values point to boolean | 09:08 | ||
I find it odd that a set is associative in some deep way in Perl 6 | |||
it doesn't work very naturally | |||
if I have a set of Int I expect to get back a list of the Int I put in not Ints mapping to always True Bools | |||
is there some reason for this I'm missing? | 09:09 | ||
is it specced this way? | |||
I was going to respond to a reddit comment asking about junction intersection and was going to suggest you would use set intersection and then just wrangle to a junction but it turns out thats kind of broken | 09:11 | ||
09:12
woolfy left,
wamba left,
zengargoyle joined,
elohmrow joined
09:17
ChoHag left
09:19
rudolfochrist left
|
|||
[ptc] | DrForr: they're also called "louvres", aren't they? "transoms" is new to me... | 09:19 | |
09:20
zengargoyle left
09:21
user9 left
|
|||
DrForr | Well, I usually think of louvres as kind of round steam vents, with flappy blinds over them. I think a transom is usually a full-length window across the top of a door that you can crack open if the steam buildup is too much. It could very well just be a British thing. | 09:23 | |
(not that I'm British, but I have lived intehir houses :) | 09:25 | ||
[ptc] | could be a British (and derivatives thereof) thing; what you call a transom is definitely what I'd call a louvre :-) | 09:28 | |
09:29
wamba joined
09:31
zengargoyle joined
|
|||
stmuk | I'm British and have never heard of either louvres or transoms | 09:32 | |
DrForr | Too many ye..months living among denizens of the Isle :) | ||
stmuk | some googling suggests there isn't an English word but the closest is fanlight (over a door) | 09:33 | |
a louvre is blind like | 09:34 | ||
09:34
TEttinger joined
|
|||
DrForr | Looks like I was confusing the actual transom with what I've seen above it. Something new every day. | 09:37 | |
[ptc] | stmuk: hrm, maybe it's a Kiwi thing then... | 09:38 | |
stmuk | the German definition at en.wikipedia.org/wiki/Transom_(architectural) is amusing | 09:41 | |
09:43
TEttinger left
09:50
zacts left
|
|||
elohmrow | even though it could get me hurt for saying so, i am originally an american, and i know what a louvre is; we have them - Bob Vila told us about them many times ;) | 09:51 | |
DrForr | o/' Woah-oh let's build a patio / Go call Bob Vila o/' | 09:52 | |
arnsholt | Only louvre I know is in Paris =p | 09:53 | |
And generally capitalized | |||
zengargoyle | american louvre is pronounced louver. (at least where i'm from) | 09:54 | |
while louvre is the Paris thing. | 09:55 | ||
which `dict` informs me is a valid spelling.. | 09:57 | ||
10:05
ShimmerFairy joined
|
|||
elohmrow | I don't know the history, but why is this guy 'resolved': rt.perl.org/Ticket/Display.html?id=127408 please? I guess I can use $myThing.^methods and compare, but it's not a super-helpful error message, and I just got it because of a method signature mismatch on 2016.07.1 | 10:06 | |
I guess rather than 'CALL_ME', i'd like to see the $real_method_name with sig. maybe this is possible another way | |||
nine | elohmrow: what is the $real_method_name in *(42)? | 10:07 | |
elohmrow | nine: point | 10:08 | |
10:11
Zoffix left
|
|||
timotimo | Ulti: if you're trying to use junctions as sets, you're going to have a bad time. don't do that. they aren't meant to be used as sets. | 10:11 | |
elohmrow | nine: i think i didn't say what i meant to: i'd like the error to tell me "you tried to call non-existent method '*' with argument '42'." then i at least know where to look | 10:12 | |
timotimo | damn. i had hoped to mirror the libsdl wiki, but 1) i only got a few pages in every language imaginable, 2) its surge protection triggered and kicked me out | 10:13 | |
zengargoyle wonders if any distros (other than Debian) are planning on patching Perl5 to remove '.' from @INC | 10:14 | ||
nine | elohmrow: *(32) or just foo(32) is no method call but looks more like a function call. Anyway to arrive at your desired error message, rakudo would have to guess what you actually meant which it cannot. Think about e.g. $callable(42); It may well be that you forgot to add the CALL-ME method to the supposedly callable object. | 10:16 | |
elohmrow: and having made exactly that mistake, I'm actually quite glad that rakudo tells me that it exepcted to find a CALL-ME method, so I could just add it. | 10:17 | ||
10:28
user9 joined
|
|||
grondilu | how do I prevent :$var to be interpreted as a named argument? | 10:43 | |
m: my $var = pi; say :$var | |||
camelia | rakudo-moar f648d3: OUTPUT«Unexpected named argument 'var' passed in block <unit> at <tmp> line 1» | ||
ilmari | grondilu: what would you like it to be interpreted as? | ||
jnthn | Put parens around it | ||
grondilu | m: my $var = pi; say (:$var) | ||
camelia | rakudo-moar f648d3: OUTPUT«var => 3.14159265358979» | ||
grondilu | of course | ||
thanks | |||
10:45
aries_liuxueyang left,
aries_liuxueyang joined
10:46
zakharyas1 joined
|
|||
grondilu | I miss P5's dummy + operator, though. | 10:46 | |
m: my $var = pi; say +:$var | |||
camelia | rakudo-moar f648d3: OUTPUT«Cannot resolve caller Numeric(Pair: ); none of these signatures match: (Mu:U \v: *%_) in block <unit> at <tmp> line 1» | ||
stmuk | www.youtube.com/channel/UCLsVz9vpr...6PmcI4tnqA | ||
10:47
labster left
|
|||
grondilu | or bash's -- | 10:50 | |
10:51
TheLemonMan joined
|
|||
grondilu | I have a database made of a bunch of YAML files in a directory tree. The whole tree branch is 769Mo. I'd like to put it all in a big Perl6 hash that I could easily load later. Is it reasonable to parse it all, store it in a single hash variable and create a module file like: 'unit module MyData;\nour %hash = $here-I'd-put-the-output-of-.perl' ? | 10:56 | |
grondilu tries | 10:57 | ||
Xliff | grondilu, I've done something on a way smaller scale with Color::Names; | 11:07 | |
Also did it with an unreleased module for Eve::Online. | 11:08 | ||
With the latter I discovered it was easier to keep that stuff in an sqlite3 database and use that. | |||
stmuk | the youtube autotranslate on liz's P6 module APW talk is amusing | 11:09 | |
grondilu | Xliff: it's for EVE Online too | ||
11:09
zakharyas1 left
|
|||
Xliff | Question for the P6 devs in here: sub EXPORT(+@a) { ... require SomeModule; ... } <- Is that supposed to crash rakaudo at stage parse? | 11:09 | |
grondilu: Ooh! What you writing? | 11:10 | ||
github.com/Xliff/p6-webservice-eveonline | |||
grondilu: ^^ | |||
grondilu | I'd like to write a webgl interface to look at New Eden. | ||
so I'm parsing cdn1.eveonline.com/data/sde/tranqu...UILITY.zip | |||
I'll do something similar to what I did for a dna visualisation here: grondilu.github.io/dna.html | 11:12 | ||
Xliff | grondilu: YOW! | ||
11:12
pierre_ left
|
|||
Xliff | Grondilu: If all you are looking for are the x,y,z tuples for the star systems, you could always load that data into mysql and then extract into something sane. | 11:15 | |
I update local mysql every time Eve patches. | |||
That reminds me. I haven't played in a while. | |||
...Aaand they've updated the launcher. | 11:16 | ||
....aaaand CCP flubbed the launcher update. At least here. | 11:18 | ||
grondilu | I don't like SQL. I was hoping I wouldn't have to use it. | ||
11:19
xinming_ joined
|
|||
grondilu | If the database is too big even after restricting to position values, I'll limit the visualisation for a few regions. | 11:19 | |
Xliff | Yeah. Well, parsing the YAML is a valid strategy then. | 11:20 | |
11:20
zakharyas1 joined
|
|||
Xliff | I did look at Eve's YAML for my project, but couldn't get it to parse using P6 modules as of April. | 11:20 | |
grondilu | I'm currently parsing with YAMLish. Seems to work fine. | 11:21 | |
11:22
xinming left,
aries_liuxueyang left
|
|||
grondilu | here's the code I'm using: paste.debian.net/811318/ | 11:23 | |
Xliff | Cool. I think I tried YAMLish back then, too. | ||
arnsholt | Right. That's the program that generates function defs from header declarations more or less done. Now for the program that extracts stuff from | 11:25 | |
... #define directivess | |||
11:25
aries_liuxueyang joined
|
|||
arnsholt | Not for NativeCall, sadly, but the knowledge should be transferrable \o/ | 11:25 | |
Xliff | Eve Launcher finally patched after 16 attempts. | 11:26 | |
arnsholt, Are you talking about gptrixie? | |||
grondilu | I had to kill the job. It was eating all memory I guess. | ||
so that's definitely not the way to go. I do need a database, I guess. | 11:27 | ||
timotimo | one bottle of beer for whoever builds a slang that gives me a "nsub" keyword that is exactly like "sub" + "is native($lib)" + "{*}" | 11:28 | |
moritz | take it down, pass it around, ... | ||
timotimo | b "is export", please | 11:29 | |
"+", not "b". | |||
Xliff | timotimo: Ooh! I'd use that slang. | 11:30 | |
Of course, the whole Slang mechanism looks overly complex to me. | |||
(not the parsing, but the getting it active) | |||
DrForr | Xliff: It's kind of "there" waiting for macro support. | ||
arnsholt | Xliff: Using pycparser actually, since I need to generate SmallTalk (yes, really!) | ||
timotimo | yes, macros will make that a lot easier | 11:31 | |
dalek | c: 772b297 | (Tom Browder)++ | doc/Type/Signature.pod6: Fix typo |
||
Xliff | arnsholt++ # For writing the Python I may need but would never do myself | ||
grondilu: I could probably churn out a module with that data if you want. | 11:32 | ||
arnsholt | Xliff: If you ever need to do this kind of thing, pycparser is pretty damn good | ||
11:33
aries_liuxueyang left
|
|||
arnsholt | It doesn't support preprocessor stuff at all, so it only parses preprocessed C which is somewhat limiting, but apart from that, it's awesome | 11:33 | |
11:33
aries_liuxueyang joined
|
|||
arnsholt | A bit less than a day of work gave me a program that generates some 350 API entry points from OpenSSL directly from the headers | 11:34 | |
And that's only the libssl ones. There's another 1150 or something like that in libcrypto | |||
Xliff | arnsholt: gptrixie will do that, but there is an inherent limit in the size it will allow. | 11:35 | |
11:35
zakharyas1 left
|
|||
timotimo | don't forget, everyone, we do have gptrixie that automatically creates a nativecall binding from a c header file | 11:35 | |
yeah :) | |||
Xliff | For example, I can get it to work with liboggvorbis. | ||
But I don't think it would survive if I threw libssl at it. | |||
Same with libcryto. | 11:36 | ||
arnsholt | Heh | 11:37 | |
gptrixie parses GCC's XML output or something like that, no? | |||
Xliff | Yeah. | ||
Which, if I remember, has been deprecated for something else. | |||
But that support hasn't come yet. | 11:38 | ||
arnsholt | The neat thing about pycparser is that it's a full C parser library, which is pretty cool | ||
Xliff | Finding gccxml was a bit of a chore. | ||
arnsholt | I'm tempted to look into porting it to Perl 6, TBH | ||
konobi | libressl? | 11:43 | |
moritz | that's a thing, yes | 11:44 | |
konobi | i had heard that it had a much constrained api | ||
Xliff | arnsholt: Ooooo! That would be niiice! | 11:46 | |
If you start that project and want coder flunkies... count me in! | |||
arnsholt | konobi: Yeah, I considered it | 11:47 | |
But since this is for $work, it was a bit too early-adoptery to go for OpenSSL | 11:48 | ||
But we have discussed it as an option, actually | |||
Er, too early adopter to go for *Libre*SSL I mean (obviously) | |||
11:49
nadim joined
11:55
stmuk_ joined
11:57
stmuk left
|
|||
timotimo | we can also use pycparser through Inline::Python ;) | 11:57 | |
arnsholt | For the time being, yeah =) | 12:02 | |
timotimo | oh the joy of scancodes | 12:04 | |
"\" (Located at the lower left of the return key on ISO keyboards and at the right end of the QWERTY row on ANSI keyboards. Produces REVERSE SOLIDUS (backslash) and VERTICAL LINE in a US layout, REVERSE SOLIDUS and VERTICAL LINE in a UK Mac layout, NUMBER SIGN and TILDE in a UK Windows layout, DOLLAR SIGN and POUND SIGN in a Swiss German layout, NUMBER SIGN and APOSTROPHE in a German layout, GRAVE ACCENT and | |||
POUND SIGN in a French Mac layout, and ASTERISK and MICRO SIGN in a French Windows layout.) | |||
"`" (Located in the top left corner (on both ANSI and ISO keyboards). Produces GRAVE ACCENT and TILDE in a US Windows layout and in US and UK Mac layouts on ANSI keyboards, GRAVE ACCENT and NOT SIGN in a UK Windows layout, SECTION SIGN and PLUS-MINUS SIGN in US and UK Mac layouts on ISO keyboards, SECTION SIGN and DEGREE SIGN in a Swiss German layout (Mac: only on ISO keyboards), CIRCUMFLEX ACCENT and DEGREE | |||
SIGN in a German layout (Mac: only on ISO keyboards), SUPERSCRIPT TWO and TILDE in a French Windows layout, COMMERCIAL AT and NUMBER SIGN in a French Mac layout on ISO keyboards, and LESS-THAN SIGN and GREATER-THAN SIGN in a Swiss German, German, or French Mac layout on ANSI keyboards.) | |||
how fun! | |||
arnsholt | When you plug in a new keyboard on OS X, it asks you to press the bottom-leftmost non-modifier key, to autodetect what kind of KB it is | 12:05 | |
hahainternet | the worst are the hybrid layouts | ||
on crap laptops | |||
arnsholt | Le sigh. "Nordic" kb layouts can piss right off | ||
Especially since Danish and Norwegian, which both have æ and ø, have deigned to place them on *different* keys | 12:06 | ||
So you have to keys right next to each other, both of which are labelled æ and ø >_< | |||
12:06
josred joined
|
|||
arnsholt | s/to/two/ | 12:06 | |
moritz | wtf. | ||
timotimo | "" (no name, empty string; This is the additional key that ISO keyboards have over ANSI ones, located between left shift and Y. Produces GRAVE ACCENT and TILDE in a US or UK Mac layout, REVERSE SOLIDUS (backslash) and VERTICAL LINE in a US or UK Windows layout, and LESS-THAN SIGN and GREATER-THAN SIGN in a Swiss German, German, or French layout.) | ||
SDL_SCANCODE_NONUSBACKSLASH | |||
arnsholt | moritz: YA RLY! | ||
12:07
josred left
12:16
ItayAlmog joined
12:18
canopus left,
smls joined
|
|||
smls | m: class A { has A @.children is default(A.new) } | 12:19 | |
camelia | rakudo-moar f648d3: OUTPUT«===SORRY!===Method 'new' not found for invocant of class 'A'» | ||
smls | ^^ Is it possible to somehow delay the evaluation of an `is default` value, so that it can be used in a tree-like class like this? | ||
12:20
rudolfochrist joined
|
|||
jnthn | smls: No | 12:21 | |
smls | ok | ||
jnthn | (And due to the way `is default` works, it's really not easy to make that happen either) | 12:22 | |
12:23
canopus joined
|
|||
timotimo | shouldn't it work with = instead? | 12:28 | |
or is that for "assigning an empty element into the array will give an A.new? | |||
oh, that'll also create an A when A gets created | |||
smls | timotimo: the `is default` is what you get when you index a nonexistent element of the array | 12:30 | |
not what the array itself is initialized with | |||
timotimo | right | ||
12:31
pierre__ joined
|
|||
smls | m: class A {has $.n = 42}; my A:D @a; say @a[1]; say say @a[1].n; | 12:33 | |
camelia | rakudo-moar f648d3: OUTPUT«(A:D)Cannot look up attributes in a type object in block <unit> at <tmp> line 1» | ||
smls | jnthn: Is this also working as expected? ^^ | 12:34 | |
jnthn | That should probably be disallowed | 12:41 | |
timotimo | yeah, that's slightly problematic | ||
12:44
itaipu left
|
|||
[Coke] | .msg | 12:45 | |
yoleaux | [Coke]: Sorry, this command is admin-only. | ||
[Coke] | .seen supernovus | ||
yoleaux | I saw supernovus 22 Apr 2016 23:27Z in #perl6: <supernovus> Well, I'm going to have to run. Have a great day/night everyone. I hope to fix up some of my long neglected libraries at some point when I'm not completely overloaded with work! :-) | ||
12:50
canopus left
12:59
mcmillhj joined
13:02
canopus joined
13:04
ItayAlmog2805 joined
13:08
ItayAlmog left
13:10
wamba left,
ItayAlmog2805 left
13:18
cdg joined,
cdg left,
cdg joined
13:20
Actualeyes left
13:28
Sgeo left
13:32
Khisanth left
|
|||
Ulti | timotimo: the other way around turn a set into a junction in the same way you would do .any on a list | 13:33 | |
13:40
rudolfochrist left
|
|||
pierre__ | HI | 13:46 | |
13:46
Khisanth joined
|
|||
pierre__ | except the conciseness, is there any difference between | 13:47 | |
m: sub closure() { my $i = 0; return -> { ++$i } } ; my $a = closure(); say $a(); say $a(); | |||
camelia | rakudo-moar f648d3: OUTPUT«12» | ||
pierre__ | and | ||
m: sub closure() { my $i = 0; return sub () { return ++$i } } ; my $a = closure(); say $a(); say $a(); | |||
camelia | rakudo-moar f648d3: OUTPUT«12» | ||
pierre__ | i know that with the pointy block notation, i cna't use a return, but as the last element is returned by default, i do not see any difference | 13:48 | |
masak | pierre__: only that with `sub`, you should use `return`, and with blocks, you should use (unimplemented) `leave` (which is also implicit) | ||
pierre__: that is the difference. `return` binds to innermost enclosing *sub*, not block | |||
pierre__ | ok | 13:49 | |
masak | so it mostly comes down to, do you want `return` or not | ||
much of the time with small blocks (sent to `map` etc), you don't | |||
pierre__ | make sense, | ||
so in the case of a closure, the sub construction make more sense i guess | 13:50 | ||
to explicitely return the value | |||
masak | both the block and the sub close over their respective environment | ||
so it's only about whether you need to explicitly return | 13:51 | ||
for example if you need to return early | |||
pierre__ | indeed | ||
masak | with explicit `leave`, even that would be a non-issue | 13:52 | |
but, alas, | |||
m: { leave }; say "OH HAI" | |||
camelia | rakudo-moar f648d3: OUTPUT«leave not yet implemented. Sorry.  in block <unit> at <tmp> line 1» | ||
masak | I don't know if there's an interesting technical blocker to having `leave`... | ||
...or if it just turns out no-one really cared enough. | |||
moritz | I haven't done it, because I'm scared of low-level stuff | 13:54 | |
pierre__ | ok, in the same register, a routine seems to be a block, but the reverse is not true | 13:57 | |
m: my $sub = sub { say &?ROUTINE }; $sub() | 13:58 | ||
camelia | rakudo-moar f648d3: OUTPUT«sub () { #`(Sub|76851984) ... }» | ||
masak | m: say Routine ~~ Block | ||
camelia | rakudo-moar f648d3: OUTPUT«True» | ||
masak | correct. | ||
pierre__ | m: my $sub = sub { say &?BLOCK }; $sub() | ||
camelia | rakudo-moar f648d3: OUTPUT«sub () { #`(Sub|68516576) ... }» | ||
masak | and both are Callable. | ||
pierre__ | m: my $block = { say &?BLOCK }; $block() | ||
camelia | rakudo-moar f648d3: OUTPUT«-> ;; $_? is raw { #`(Block|74998840) ... }» | ||
pierre__ | m: my $block = { say &?ROUTINE }; $block() | ||
camelia | rakudo-moar f648d3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Undeclared name: ?ROUTINE used at line 1. Did you mean 'Routine'?» | ||
pierre__ | make sense | ||
masak | man, block gists are ugly :P | ||
pierre__ | sorry :) | 13:59 | |
masak | not really your fault | ||
14:01
buharin left
|
|||
TheLemonMan | ugexe, zef's working perfectly so far :) | 14:07 | |
yoleaux | 03:27Z <ugexe> TheLemonMan: the issues you've brought up with zef have been addressed | ||
14:14
rindolf left
14:15
ssm left
14:17
rindolf joined
14:18
wamba joined
|
|||
Woodi | Zoffix: about "your lang don't have Junctions" - I think I do that in C when I read about automatic tail calls... | 14:18 | |
14:18
lizmat joined
14:19
buharin joined
14:23
ssm joined
14:24
jonas1 left
14:27
chris2 left
14:30
cyphase left
14:34
chris2 joined,
cyphase joined
14:36
mcmillhj left
14:37
mcmillhj joined
14:38
khw joined
14:46
TheLemonMan left
14:47
wamba left
15:03
mcmillhj left
15:04
cdg left
15:05
domidumont left,
yadongz joined
15:09
perlpilot_ joined
15:10
mtj_ left
15:13
lichtkind__ joined
15:14
mcmillhj joined
15:17
lichtkind_ left
15:18
ptolemarch joined,
robertle joined,
mcmillhj left
|
|||
robertle | hi folks, should using concurrency using start() and IO::Socket::INET work as expected in combination? in the sense that different threads working on different sockets do not block each other? | 15:20 | |
15:20
petercommand left
|
|||
hoelzro | robertle: if you create a socket in thread A, thread A is the only thread that can use it | 15:22 | |
moritz | robertle: they don't block each other, but iirc you can't use an IO::Socket::INET from another thread | ||
jnthn | Indeed. IO::Socket::Async would be a better bet usually | 15:23 | |
Even when the "creating thread only" restriction is lifted, it'll typically still scale better. | |||
15:24
Actualeyes joined
15:25
mcmillhj joined
|
|||
[Coke] boggles that this conversation is getting tractino here but not in perl6-dev. | 15:25 | ||
15:25
pierre__ left,
rindolf left
|
|||
[Coke] | (ok, not exactly the same convo, but definitely related) | 15:26 | |
Ulti | re: padding zeroes sprintf('%08d', $int) does the job | ||
15:26
canopus left
15:30
kurahaupo joined
15:31
rindolf joined
|
|||
ugexe | IO::Socket::Async has no IO::Socket::SSL yet though :( | 15:31 | |
15:32
ilmari[m] left,
M-Illandan left,
Matthew[m] left,
tadzik left
|
|||
ugexe | i wrote a shim to make it work but it was super slow | 15:32 | |
15:33
canopus joined
15:36
literal left,
literal joined
15:37
brrt joined
|
|||
jnthn | ugexe: I've been vaguely working on that but...OpenSSL's API makes it un-fun enough that it's hard to find motivation to do it in free time ;) | 15:37 | |
konobi | nodejs probably has ideas to steal | 15:38 | |
arnsholt | ssl.h is almost mappable to FFI defs programmatically (somewhat less than 200 #defines that need fixups by hand out of almost a thousand) | ||
konobi | iirc it's crypto interface is fairly slim | ||
arnsholt | crypto.h is a lot bigger | ||
jnthn | konobi: I found something to steal from, it's mostly just an annoying task to trudge though :) | 15:39 | |
ugexe | gist.github.com/ugexe/71d82eb4bb5653125bd8 # this was the shim (IO::Socket::Async::SSLow) | ||
konobi | yar | ||
ugexe | jnthn: yeah the openssl api is not interesting or fun in any way :/ | 15:40 | |
[Coke] updates gist.github.com/coke/84389edf917a1...30f1c86848 to highlight his bailador(socket) vs. async issue. | |||
15:42
skids joined
15:43
cyphase left
15:48
cyphase joined
15:49
elohmrow_ joined
|
|||
Woodi | hey, guys, OpenSSL is just under funded! - from 2daysago on HN TLS history link :) | 15:49 | |
15:51
xinming_ left
15:52
AlexDaniel joined,
xinming joined
15:53
mtj_ joined
15:55
canopus left
15:58
domidumont joined,
rindolf left,
rindolf joined
|
|||
AlexDaniel | timotimo: wait, so… you are saying that keyboard layouts are different. Alright, makes sense. So what? Isn't it the point? | 15:59 | |
I'm actually happy that even layouts with the same name are different everywhere | 16:00 | ||
this way people won't assume stupid things | |||
robertle | hoelzro, moritz, jnthn: ok, good to know that it should work. I'll do some more digging, but what I see is that I start n threads and each of them loops x/n times, creating a socket, writing, reading, closing. if n == 1, this takes some amount of time. I would expect that to drop with increasing n (right). what happens is that it increases sharply at n==2, and then stays at that time for n==3, n==4 | 16:01 | |
16:01
imcsk8 left
16:02
imcsk8 joined,
dogbert17 joined
16:04
canopus joined
16:05
mcmillhj left
16:06
cyphase left,
mcmillhj joined
16:07
cdg joined
16:10
cyphase joined
|
|||
ugexe | maybe related to overhead? | 16:11 | |
m: say $*THREAD.id; for 1..4 { start { say $*THREAD.id }; }; | |||
camelia | rakudo-moar f648d3: OUTPUT«13334» | ||
16:12
perlpilot left
16:16
perlpilot_ is now known as perlpilot
|
|||
AlexDaniel | in fact, keyboard layouts are so easily configurable. “`” key can as well produce 🖕, and that should not bother you at all. Sometimes I see stuff like “ok, here is my game, controls are: WASD, you can't change it” and it makes me sad. | 16:16 | |
16:16
mcmillhj left
|
|||
mst | btw | 16:17 | |
16:17
sakuya left
|
|||
mst | docs.perl6.org/language.html | 16:17 | |
so I skimmed to the first 'about perl6' link, which was docs.perl6.org/language/classtut | |||
then it says | 16:18 | ||
> This type object is an "empty instance" of the class. You've already seen these in previous chapters. | |||
is there a list of the 'standard' chapter ordering? | |||
robertle | if each thread just does sleeps, then the runtime behavior is as expected: pastebin.com/YgnnJH3V | 16:20 | |
so *something* in there needs to block the multiple threads. CPU load is low, so that's not it | 16:21 | ||
also note that the runtime goes up by more than a factor of two, rather than stay roughly the same which is what I would expect for some resource starvation | |||
perlpilot | mst: I *think* that bit was copied verbatim from the "Using Perl 6" book. | 16:22 | |
16:23
cyphase left
|
|||
perlpilot | Aye, cloud.github.com/downloads/perl6/b....23.a4.pdf page 54, section 5.1 | 16:23 | |
16:24
petercommand joined
|
|||
AlexDaniel | mst: github.com/perl6/doc/issues/889 | 16:24 | |
16:24
petercommand left,
petercommand joined
|
|||
robertle | and what's the best way to go about understanding this? my next step would have been to remove http::client and doing IO::Socket::INET directly to check whether it's http::client | 16:24 | |
mst | AlexDaniel: ah, so it's a doc bug, rather than me picking the wrong reading order | ||
that's fine | |||
just I've decided to go through the doc.perl6.org pages ignroing the 5to6 stuff and just reading through all of the 'reference to perl6' parts | 16:25 | ||
16:25
wamba joined
|
|||
mst | in order to be able to ask more imaginatively stupid questions in here ;) | 16:25 | |
16:26
brrt left,
pierre_ joined
|
|||
AlexDaniel | mst: I always dislike references that assume you would be reading docs in some particular order. However, the consensus seems to be that it's OK to refer to something above on the same page. In this case, however, it is a bug indeed. | 16:26 | |
ugexe | robertle: see my previous message in this channel; add a debug statement with $*THREAD.id then see what the difference is when you add the sleep. | 16:27 | |
that might give a clue. might not | |||
16:27
cyphase joined
|
|||
AlexDaniel | mst: also, it's such a pity that you are ignoring 5to6 docs. These need more eyes :) | 16:29 | |
mst | I don't want to learn how to write perl5 in perl6 though | ||
also, they almost certainly don't cover the real perl5 anymore | 16:30 | ||
the classes doc talks about perl5 doing DFS for MI | |||
whereas the best practice for ~10 years has been C3 | |||
16:30
ilmari[m] joined
|
|||
mst | (ok, they say 'by default', but ignoring how e.g. DBIx::Class does it makes it seem kinda dated) | 16:31 | |
ugexe | i like writing perl6 in perl5 >:) | ||
always get screwed by lazy map/grep though | |||
16:31
pierre_ left
|
|||
AlexDaniel | mst: great! Right. Indeed. It would be great if you could write your notes here: github.com/perl6/doc/issues/new ;) | 16:31 | |
mst | every time I read perl6 OO code I think "I could write this with Moo and have less boilerplate" | ||
ilmari | mst: neither Moo nor Moose impose C3, though? | 16:32 | |
mst | but I've already grumbled about the specific reasons for that | ||
ilmari: no, but they also basically say "don't use MI" | |||
16:32
mcmillhj joined
|
|||
ilmari | true | 16:32 | |
16:32
iH2O joined
|
|||
robertle | ugexe: fascinating! with one thread, each block of 100 http::client requests/responses takes roughlyu the same time. with more threads, each block seems to take the same amount of time, but one somewhere in the middle just sits there for quite some time... | 16:33 | |
also segfaults every now and then :) | 16:34 | ||
iH2O | how is that :) instead of :( | 16:35 | |
16:35
dante73 joined
|
|||
mst | because eventually, you have to find this stuff funny | 16:35 | |
16:35
kurgan_ joined
|
|||
iH2O | i wont find hillary funny once elected | 16:35 | |
im already practicing :( :( :( | 16:36 | ||
robertle | I do say $i++ ~ ' ' ~ now ~ ': " ' ~ $*THREAD.id; now | ||
mst | iH2O: hey, I'm english | ||
robertle | and I get: | ||
16 Instant:1473179786.850537: " 4 | |||
17 Instant:1473179786.979291: " 4 | |||
18 Instant:1473179791.823523: " 3 | |||
19 Instant:1473179791.946529: " 3 | |||
mst | iH2O: you focus on laughing at our political disasters | ||
iH2O: and in exchange we can laugh at yours :D | |||
robertle | the first 15 lines are also very quick, note the lag from 17 to 18 | 16:37 | |
iH2O | im Canadian, and we'll be both affected (without representation) by hillarys policies | ||
affected a lot | |||
16:37
mcmillhj left
|
|||
robertle | I have no idea how I would go about debugging this... | 16:37 | |
ugexe | robertle: your time isn't going to go down though if you are creating the socket, connecting, reading, writing, etc every time | ||
16:37
Actualeyes1 joined
16:38
Actualeyes left
|
|||
robertle | note that I do x/n cycles in each thread. if the numebr of threads goes up, the loop cycles in each thread go down | 16:38 | |
plus I am of course not saying that this is a good way to do anything, just that the behavior is puzzling | |||
potentially puzzling in interesting ways | |||
16:40
TomLeg joined
16:41
TomLeg left
|
|||
robertle | this time I even got a core dump... | 16:44 | |
16:44
iH2O left
|
|||
robertle | #0 0x00007fca6e3cf844 in bind_key () | 16:44 | |
from //home/rlemmen/perl6env/rakudobrew/moar-nom/install/lib/libmoar.so | |||
(gdb) bt | |||
#0 0x00007fca6e3cf844 in bind_key () | |||
from //home/rlemmen/perl6env/rakudobrew/moar-nom/install/lib/libmoar.so | |||
#1 0x00007fca6e38c78b in MVM_interp_run () | |||
from //home/rlemmen/perl6env/rakudobrew/moar-nom/install/lib/libmoar.so | |||
#2 0x00007fca6e39e5ce in start_thread () | |||
anyway, I need to get some dinner. will try to do more digging... | 16:45 | ||
16:45
robertle left
16:48
araujo_ joined
16:49
dakkar left,
mcmillhj joined
16:50
araujo_ left
16:51
araujo_ joined,
araujo left
16:54
mcmillhj left
16:56
cyphase left
16:59
cdg left,
yadongz left
|
|||
harmil_wk | Just responded to a p6l question with this snippet that I didn't realize would work until I tried it: | 16:59 | |
m: sub dueet(&op, *@list) { op @list }; say dueet &prefix:<[R-]>, 1..100 | |||
camelia | rakudo-moar b3e442: OUTPUT«-4850» | ||
17:01
cyphase joined,
mcmillhj joined
17:02
tadzik joined,
M-Illandan joined,
Matthew[m] joined
17:03
pochi_ joined,
pochi left
17:05
woolfy joined
|
|||
Xliff | <Xliff> Question for the P6 devs in here: sub EXPORT(+@a) { ... require SomeModule; ... } <- Is that supposed to crash rakaudo at stage parse? | 17:05 | |
Or at all, for that matter. | 17:06 | ||
17:06
mcmillhj left
|
|||
harmil_wk | m: sub EXPORT(+@a) { require Test } | 17:06 | |
camelia | ( no output ) | ||
harmil_wk | m: sub EXPORT(+@a) { require Test }; say "looks good"; | 17:07 | |
camelia | rakudo-moar b3e442: OUTPUT«looks good» | ||
harmil_wk | Xliff: what's your perl -v? | ||
*perl6 | 17:08 | ||
17:09
poohman joined,
mcmillhj joined
|
|||
Xliff | m: sub EXPORT(+@A) { require ::('Test') }; say "hey!" | 17:12 | |
camelia | rakudo-moar b3e442: OUTPUT«hey!» | ||
Xliff | This is Rakudo version 2016.08.1-48-gf2df2c5 built on MoarVM version 2016.08 | ||
implementing Perl 6.c. | |||
harmil_wk, this is occuring in a file-based module context. | 17:14 | ||
harmil_wk: When run, I get the following: ===SORRY!=== | 17:15 | ||
Cannot find method 'merge-symbols': no method cache and no .^find_method | |||
17:15
DrForr left,
DrForr joined
|
|||
Xliff | See gist.github.com/Xliff/fceb9354193e...68b991d6ec for context. | 17:16 | |
17:17
cyphase left
17:21
cdg joined,
cyphase joined
17:23
rmmm left
17:28
itaipu joined,
rmmm joined
17:32
cyphase left,
firstdayonthejob joined
17:34
zacts joined
17:35
dalek left
17:36
dalek joined,
ChanServ sets mode: +v dalek,
Praise left,
cyphase joined
17:39
itaipu left
17:41
itaipu joined
17:44
spider-mario joined
17:45
yadongz joined,
zakharyas left,
sunnavy joined
|
|||
[Coke] | I would recommend not having discussions about us politics in here. | 17:47 | |
I am curious as to what policies in particular you think will negatively impact you, though, esp. in comparision with the (to be generous) 3 other options. | 17:49 | ||
17:49
itaipu left
17:50
Actualeyes1 left,
cyphase left
17:55
pierre_ joined
17:56
cyphase joined,
itaipu joined
|
|||
harmil_wk | [Coke]: did you just say that you would recommend against politics and then ask for followup on politics? | 17:57 | |
[Coke] | did I say one thing | 17:58 | |
and then continue the thought? | |||
yes. | |||
18:00
pierre_ left
|
|||
geekosaur | perhaps that was an invitation to continue... elsewhere | 18:01 | |
nine has even missed the first mention of politics that [Coke] responded to ;) | 18:03 | ||
[ptc] nods in agreement, still confused | |||
mst | it was a canadian practising for being upset by the US presidential election outcome | 18:06 | |
at this stage, it's kind of a national sport | |||
18:06
labster joined,
elohmrow_ left,
Unavowed left
18:10
cyphase left
|
|||
harmil_wk | [Coke]: I was just uplifted to hear a voice of reason in suggesting that a language channel wasn't the place to introduce politics and then saddened to see the prod to continue. | 18:10 | |
18:11
nige1 joined
|
|||
timotimo | i also didn't notice anything about politics | 18:11 | |
from robertle's backtrace it looks like they're accessing a hash concurrently | |||
18:13
robertle joined
|
|||
mst | #perl does ok with this, usually - when politics come up they get discussed politely for a bit, followed by us going back to perl | 18:14 | |
anybody who can't manage to be polite wins a free tempban until they cool off | |||
18:15
cyphase joined
|
|||
[Coke] prepends a "However, " to avoid confusion. | 18:17 | ||
mspo | nerd politics? | 18:19 | |
[Coke] | best kind? | 18:21 | |
18:25
labster left
18:27
cyphase left
18:28
labster joined
18:32
cyphase joined
18:33
cdg left
18:36
itaipu left
18:38
zacts left
18:43
nige1 left,
cyphase left,
labster left
18:44
nige1 joined
18:45
firstdayonthejob left
18:47
labster joined,
cyphase joined
18:48
labster left,
sufrostico left
18:54
firstdayonthejob joined
18:58
nige1 left,
itaipu joined,
TheLemonMan joined
18:59
Ven_ joined
19:01
Unavowed joined
|
|||
Woodi | let's assume nerds are like scientists from Half-Life - weird, old gentelmens... so, requested by [Coke] list of facts can barely be what we call "political discusion"... agreeing on facts is almoust not-political discussion becouse politics base a lot on misunderstanding and some hidden gain, IMO | 19:01 | |
Woodi as alway is too late for current topic... :) | 19:02 | ||
19:03
cyphase left
19:07
Ven_ left,
cyphase joined,
darutoko left
|
|||
Woodi | btw. DDD is great debugger :) | 19:07 | |
19:11
matiaslina joined
19:16
cyphase left
|
|||
smls | m: constant %a is default(42); | 19:19 | |
camelia | rakudo-moar bd3d43: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Missing initializer on constant declarationat <tmp>:1------> 3constant %a is default(42)7⏏5;» | ||
smls | ^^ Is the `is default` trait not supposed to work on constants? | ||
moritz | m: constant %a is default(42) = (); | 19:20 | |
camelia | rakudo-moar bd3d43: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Type check failed in constant declaration of %a; expected Associative but got List (List)at <tmp>:1------> 3constant %a is default(42) = ()7⏏5;» | ||
moritz | m: constant %a is default(42) = %(); | ||
camelia | rakudo-moar bd3d43: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Cannot resolve caller trait_mod:<is>(Hash, Str, Int); none of these signatures match: (Mu:U $child, Mu:U $parent) (Mu:U $child, :$DEPRECATED!) (Mu:U $type, :$rw!) (Mu:U $type, :$nativ…» | ||
19:20
cyphase joined,
woolfy left
|
|||
moritz | smls: constant hashes are kinda weird in rakudo, because they don't do proper hash assignmnt | 19:20 | |
smls | ok | 19:21 | |
moritz | m: constant @a is default(42) = 1, 2; say @a[4] | ||
camelia | rakudo-moar bd3d43: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Cannot resolve caller trait_mod:<is>(List, Str, Int); none of these signatures match: (Mu:U $child, Mu:U $parent) (Mu:U $child, :$DEPRECATED!) (Mu:U $type, :$rw!) (Mu:U $type, :$nativ…» | ||
smls | m: BEGIN my %a is default(42) = a => 1; say %a<b>; | 19:23 | |
camelia | rakudo-moar bd3d43: OUTPUT«42» | ||
smls | Is there any downside to using `BEGIN my` instead of `constant`? | ||
It'll still be pre-compiled when in a module, right? | 19:24 | ||
moritz | does it make %a immutable? | ||
m: BEGIN my %a is default(42) = a => 1; %a<b> = 23; say %h | 19:25 | ||
camelia | rakudo-moar bd3d43: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Variable '%h' is not declaredat <tmp>:1------> 3 default(42) = a => 1; %a<b> = 23; say 7⏏5%h» | ||
moritz | m: BEGIN my %a is default(42) = a => 1; %a<b> = 23; say %a | ||
camelia | rakudo-moar bd3d43: OUTPUT«{a => 1, b => 23}» | ||
moritz | seems it doesn't | ||
19:26
rmmm left
|
|||
smls | I can live with that :P | 19:26 | |
19:29
cyphase left
|
|||
smls | m: my %a is Map is default(42); say %a<foo> | 19:29 | |
camelia | rakudo-moar bd3d43: OUTPUT«5===SORRY!5=== Error while compiling <tmp>is default on shaped Map not yet implemented. Sorry. at <tmp>:1------> 3my %a is Map is default(42)7⏏5; say %a<foo> expecting any of: constraint» | ||
smls | heh | ||
19:34
cyphase joined
|
|||
Unavowed | Quick question: In a signature you can do: Associative:D[Bool:D] $hash; If you want the equivalent for the %-sigil, can you do better than Bool:D %hash where .defined ? | 19:35 | |
19:39
harmil_wk left
|
|||
moritz | Unavowed: you mean except patching rakudo to make % implied :D ? :-) | 19:39 | |
Unavowed | moritz: I take that as a no :D | 19:40 | |
(where :D is just a smiley face) | 19:41 | ||
19:43
cyphase left
19:44
rmmm joined
19:46
dante73 left
|
|||
El_Che | hi | 19:46 | |
19:48
cyphase joined
19:50
TEttinger joined
19:55
cdg joined
20:01
mprelude joined,
mprelude left
20:04
nadim left
20:05
poohman left
20:06
cyphase left
20:07
Glitchy joined
20:12
cyphase joined
20:13
itaipu left,
itaipu joined
|
|||
Unavowed | Is it possible to specify a type like Array[Int|Str] meaning an array which can contain ints or strings? | 20:16 | |
nine | Unavowed: only as subset with a "where" | 20:18 | |
vcv | isn't there already an IntStr type? | ||
perlpilot | m: my IntStr $x; | 20:20 | |
camelia | ( no output ) | ||
perlpilot | Looks like there is. | ||
m: my Non-existent-type $x; | |||
camelia | rakudo-moar 72d3be: OUTPUT«5===SORRY!5===Type 'Non-existent-type' is not declaredat <tmp>:1------> 3my Non-existent-type7⏏5 $x;Malformed myat <tmp>:1------> 3my7⏏5 Non-existent-type $x;» | ||
20:21
CIAvash left
20:22
leont joined,
cyphase left
20:25
domidumont left
20:26
robertle left
20:27
cyphase joined
|
|||
Unavowed | nine: thanks | 20:28 | |
Int|Str was just an illustration, the question was really about a general "junction" type in an Array | 20:29 | ||
perlpilot | m: subset Int-or-Str of Any where { $_ ~~ Int|Str }; my Int-or-Str @a = (1,2,3, "foo", "bar"); say @a.perl; @a[2] = 3.14; | 20:31 | |
camelia | rakudo-moar 72d3be: OUTPUT«Array[Int-or-Str].new(1, 2, 3, "foo", "bar")Type check failed in assignment to @a; expected Int-or-Str but got Rat (3.14) in block <unit> at <tmp> line 1» | ||
dalek | c: ba1af07 | (Jan-Olof Hendig)++ | doc/Type/Setty.pod6: Added docs for Setty.default |
||
perlpilot | Unavowed: there's a completish example for you | ||
Unavowed | perlpilot: nice, that's what I was after, thanks | 20:32 | |
masak | perlpilot: IntStr is more like Int&Str than like Int|Str | 20:36 | |
perlpilot | I kinda figured. It felt errno-y | 20:38 | |
20:40
travis-ci joined
|
|||
travis-ci | Doc build failed. Jan-Olof Hendig 'Added docs for Setty.default' | 20:40 | |
travis-ci.org/perl6/doc/builds/157995993 github.com/perl6/doc/compare/772b2...1af07e9294 | |||
20:40
travis-ci left
20:42
cyphase left
|
|||
dogbert17 | hmm, what is 'Type check failed in binding to $id; expected CompUnit::PrecompilationId but got Str ("4CDC84469EF12631D41D...) ..' in the Travis log supposed to mean | 20:44 | |
20:45
buharin left
20:46
cyphase joined
|
|||
geekosaur | ummmm | 20:48 | |
perlpilot | dogbert17: my guess would be someone put "49EF1CDC84462631D41D..." where they should have put CompUnit::PrecompilationId.new("49EF1CDC84462631D41D..."); | ||
dogbert17: or someone forgot a coercion | |||
or stuff :) | |||
geekosaur | didn't nine just change this stuff? | ||
may have a version mismatch now | |||
Glitchy | Hey all, I'm just looking for a little advice on modules. Are there any established unit testing modules, and light web frameworks? | 20:49 | |
dogbert17 | uh oh, my own changes, to the doc, look quite innocent | ||
nine: you around? | 20:50 | ||
nine | dogbert17: for a couple more minutes | 20:52 | |
geekosaur | if I read the commit message right, that string used to *be* the PrecompilationId, but now it is a class | ||
dogbert17 | nine: could you take a look at travis-ci.org/perl6/doc/builds/157995993 | ||
nine | dogbert17: pass CompUnit::PrecompilationId.new($id) instead of just $id | 20:54 | |
20:54
smls left
|
|||
dogbert17 | nine: you mean change the src? | 20:54 | |
nine | dogbert17: CompUnit::PrecompilationId used to be a subset of Str but now is a full class so rakudo doesn't run the "where" whenever we pass an $id around | ||
dogbert17: yes | 20:55 | ||
Using CompUnit::PrecompilationId.new($id) should work on old and new rakudos but I haven't tested that. | |||
dogbert17 | in pod2onepage I guess? | ||
nine | Oh, it doesn't :/ | 20:56 | |
m: Str.new("test") | |||
camelia | rakudo-moar 72d3be: OUTPUT«Default constructor for 'Str' only takes named arguments in block <unit> at <tmp> line 1» | ||
20:56
telex left
|
|||
moritz | m: subset Foo of Str where /x/; say Foo.new('blex') | 20:56 | |
camelia | rakudo-moar 72d3be: OUTPUT«Default constructor for 'Foo' only takes named arguments in block <unit> at <tmp> line 1» | ||
moritz | m: subset Foo of Str where /x/; say Foo('blex') | ||
camelia | rakudo-moar 72d3be: OUTPUT«Cannot invoke this object (REPR: Uninstantiable; Foo) in block <unit> at <tmp> line 1» | ||
geekosaur | sadness | ||
20:56
devmikey joined
20:57
poohman joined
|
|||
nine | If anyone knows a better way to achieve this, I'm all ears... | 20:57 | |
moritz | where does pod2onepage come from? | 20:58 | |
20:58
telex joined
|
|||
dogbert17 | I believe gfldex wrote it som time ago | 20:59 | |
20:59
cyphase left
|
|||
lizmat | nine: add a Str.new($str) candidate ? | 20:59 | |
moritz | is it a from a separate module? or part of Pod::To::HTML? | ||
nine | lizmat: I'd have to do that in older rakudos | 21:00 | |
lizmat | ah, eh oh, eh too bad :-( | ||
dogbert17 | moritz: not sure to tell the truth | 21:01 | |
moritz | ah, found github.com/gfldex/perl6-pod-to-bigpage | ||
21:03
buharin joined
|
|||
moritz | nine: add a multi to precompile that does the coercion to the new type? | 21:03 | |
21:04
cyphase joined
|
|||
moritz | multi method precompile($io, Str $id where ...) { self.precompile($io, CompUnit::PrecompilationId.new($id)) } | 21:04 | |
that way internal code can use the fast path, and old code should continue to work | 21:05 | ||
21:05
poohman left
|
|||
Glitchy | Is there any *Unit style testing suite for p6? | 21:05 | |
perlpilot | Glitchy: if you can't find one on modules.perl6.org, I don't think there is one. | 21:06 | |
Glitchy: I wrote a hacky thing similar to P5's Test::Class, but I don't know that I'd recommend it to anyone without a few caveats. | 21:07 | ||
Glitchy | perlpilot: Will take a look at it | 21:09 | |
Do we still use cpanfile or is there a new way to list project dependencies? | |||
moritz | Glitchy: META6.info or something... | 21:10 | |
Glitchy: docs.perl6.org/language/modules has more infos | |||
Glitchy | moritz: Thanks | ||
Are there any large web projects? Just looking for a 'base structure' (and maybe some help picking modules) | 21:11 | ||
moritz | nine: try gist.github.com/moritz/ab4cf411bd9...8439466e37 | ||
21:11
grondilu left
|
|||
moritz | nine: I'm still recompiling NQP, and need to go to bed very soon :-) | 21:11 | |
21:12
mcmillhj left
|
|||
moritz | if it works, feel free to push | 21:12 | |
nine | moritz: makes sense. But I'm already in bed :) | 21:16 | |
.o(why am I holding my phone instead of my book?) | 21:17 | ||
21:18
itaipu left
21:19
leont_ joined,
leont left
21:24
itaipu joined
21:27
kurgan_ left
21:29
woolfy joined
21:30
wamba left
21:31
cyphase left
21:36
cyphase joined
|
|||
literal | so, what is the idiomatic way of making failures fatal, e.g. for $file.copy() ? | 21:36 | |
jnthn | use fatal; ? | 21:37 | |
literal | oh | ||
21:39
leont_ left
21:48
cyphase left,
itaipu left
|
|||
Unavowed | m: say @(Set.new: 1, 2, 3) | 21:50 | |
camelia | rakudo-moar f55e11: OUTPUT«(3 => True 1 => True 2 => True)» | ||
Unavowed | Wouldn't you expect this to return a list of elements rather than a list of pairs? | ||
21:52
cyphase joined
21:59
rindolf left
|
|||
lizmat | Unavowed: a Set is considered to be a QuantHash of Bool | 22:02 | |
thus when you make it a list, it will show the key / value pairs | |||
22:07
TheLemonMan left
22:08
Sgeo joined,
leont_ joined
22:15
ptolemarch left
22:18
yadongz left
22:20
firstdayonthejob left
22:21
canopus left,
grondilu joined
22:25
RabidGravy left
22:26
canopus joined
22:33
devmikey left
22:37
kurahaupo left,
zacts joined
22:38
cyphase left
22:41
leont_ left
22:43
poohman joined,
nige1 joined
22:44
cyphase joined
22:46
aries_liuxueyang left,
aries_liuxueyang joined
22:49
nige1 left
22:52
cyphase left,
nige1 joined
22:55
spider-mario left
22:57
cyphase joined,
poohman left
22:59
Actualeyes joined
23:00
matiaslina left
23:01
bjz left
23:05
nige1 left
23:13
poohman joined
23:17
sufrostico joined
23:18
yadongz joined
23:21
bjz joined
23:23
yadongz left
23:26
zacts left,
BenGoldberg joined
23:28
Gothmog_ joined
23:29
cyphase left
23:30
girafe2 left
23:32
bjz left
23:33
cyphase joined
23:39
poohman left
23:43
poohman joined
23:44
zacts joined
23:51
zacts left
23:52
yadongz joined
23:56
cyphase left
|