»ö« 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. |
|||
timotimo | well, you can ask for .keys, sort them, put the resulting list into %foo{@keys} and presto | 00:01 | |
seatek | yeah i'd have to put it in as an option to the thing generating the strings to do sorting first when generating the strings. | 00:02 | |
or i could just let my unit tests fail if the key sorting stuff used internally in perl6 ever changes... ;) | 00:03 | ||
i'm more inlined to do that | |||
because... well, apple pie ;) | 00:04 | ||
00:04
pierre_ joined
|
|||
seatek | i could just regex my tests i suppose :) who cares about performance there | 00:05 | |
GRAMMAR my tests! | |||
i need a kitty to stroke | 00:06 | ||
00:07
pyrimidine left
00:09
skids joined
|
|||
seatek | so $!attrib variables are lexically scoped to the file, not to class inheritance, yes? | 00:11 | |
or is everything beginning to blur together? | 00:12 | ||
00:14
pmurias left
00:16
kyclark_ joined
00:17
Vynce joined
00:19
Tonik left
|
|||
timotimo | twitter.com/loltimo - seatek i posted a few cat pictures on the internets today | 00:22 | |
seatek | timotimo: hehe. perfect :) | 00:24 | |
Xliff | Hiyo. | ||
How can I get warn to return only the string parameter without the extra backtrace? | |||
Or better yet, output directly to STDERR | 00:25 | ||
timotimo | use "note" | ||
Xliff | Thankee! | ||
seatek | ok so it's not that $!attr are lexically scoped to files -- they're scoped to the class they are defined in, and they do not get inherited. so you have to use accessors for those, yeah? | ||
cuz their accessors seem to get inherited | 00:26 | ||
timotimo | yup | 00:28 | |
timotimo decommutes | 00:29 | ||
00:30
pyrimidine joined
00:36
labster joined
00:37
pyrimidine left
00:45
kyclark_ left
00:46
pierre_ left,
mls joined
00:52
pyrimidine joined
00:56
pyrimidine left
00:59
telex left,
rindolf left
01:00
telex joined
01:02
felher joined
01:06
Vynce left
01:08
aborazmeh joined,
aborazmeh left,
aborazmeh joined
01:10
wamba left
01:11
pyrimidine joined
01:15
ifim joined
|
|||
ifim | o/ | 01:15 | |
01:16
pyrimidine left
|
|||
ifim | Hey guys, what's Perl 6 equivalent of __DATA__ blocks? | 01:17 | |
01:21
pyrimidine joined
|
|||
MasterDuke | ifim: good question, i'm not exactly sure | 01:22 | |
geekosaur | design.perl6.org/S26.html#Data_blocks | 01:23 | |
(note, the official docs point here for POD) | |||
01:25
nowan left
01:26
pyrimidine left,
matt_ left
01:27
nowan joined,
Guest86755 joined
01:31
pyrimidine joined
01:32
AlexDaniel left
01:35
pyrimidine left
01:39
pyrimidine joined
01:44
pyrimidine left
01:45
ifim left
01:46
pierre_ joined
01:48
pyrimidine joined
01:51
pierre_ left
01:55
pyrimidine left
01:57
canopus left
02:10
pyrimidine joined
02:15
pyrimidine left
02:20
pyrimidine joined
02:25
pyrimidine left
02:27
kyclark_ joined,
Rawriful left
02:28
pyrimidine joined
|
|||
raiph | ifim: stackoverflow.com/questions/4269140...d-sections | 02:30 | |
02:31
vendethiel joined
02:34
pyrimidine left
02:37
kurahaupo left
02:39
kyclark_ left
02:40
vendethiel left
02:42
canopus joined
02:46
leego left,
ilbot3 left
02:47
pyrimidine joined,
ilbot3 joined
02:51
leego joined
02:54
pyrimidine left
02:59
pyrimidine joined
03:00
amalia_ left,
pierre_ joined
03:02
amalia_ joined
03:04
pyrimidine left
03:09
pyrimidine joined
03:14
pyrimidine left
03:19
pyrimidine joined,
kyclark_ joined
03:27
kyclark_ left,
labster left
03:40
pierre_ left
03:44
noganex_ joined
03:47
noganex left
03:52
ugexe left
04:00
labster joined
04:25
wisti joined
04:28
bjz left,
bjz joined
05:05
aborazmeh left
05:23
Cabanossi left
05:27
Cabanossi joined
|
|||
Xliff | raiph: Nice job, but you forgot to illustrate how to retrieve the =qux block. | 05:34 | |
Since you pointed it out, it might be nice to illustrate it. | 05:35 | ||
Although I have to admit, that access method is rather clumsy. I thought there was a better method. | 05:37 | ||
05:39
xinming left
05:42
cibs left
05:43
cibs joined
05:54
cooper joined,
cooper left,
cooper joined
06:00
rurban joined,
rurban left
06:33
jnthn left
06:34
jnthn joined
06:36
pyrimidine left,
pyrimidi_ joined
06:37
cognominal joined
|
|||
seatek | Honestly, I don't need to be told this all the time. I know! "Use of Nil in string context" I just don't want to have to check every object for defined-ness before coercing it into a string. | 06:44 | |
geekosaur | $foo // '' | 06:45 | |
seatek | can that work in the middle of hash assignments? | ||
Xliff | "In the middle of" ?? | 06:50 | |
seatek | like { subject => $thing // '', text => $another // '' } | 06:51 | |
it doesn't error but it keeps it at Nil | |||
like { subject => $thing.Str // '', text => $another.Str // '' } | 06:52 | ||
that' sactually what it is | |||
and $thing and $another are objects | 06:53 | ||
so i'm sure it's the coersion that' scomplaining | |||
well, guessing sure ;) | |||
geekosaur | at a guess, you need parens | 06:55 | |
m: dd Nil.Str | |||
camelia | rakudo-moar fc6d4f: OUTPUT«Use of Nil in string context in block <unit> at <tmp> line 1""» | ||
geekosaur | so it's the .Str doing it | ||
seatek | yeah | 06:56 | |
geekosaur | ($thing // '').Str but yuck | ||
seatek | interesting | ||
oh that works perfectly - thanks geekosaur++ ! yeah pretty yuck but less yuk that incessant obvious complaining! | 06:59 | ||
pretty soon this is going to be down from 200 transactions/sec to 10 | |||
07:00
CIAvash joined
07:02
skids left
07:05
hchienjo joined
07:06
hchienjo left
07:21
darutoko joined
07:24
lizmat left
07:25
rurban joined
07:30
xinming joined
07:34
wisti left
08:06
toolforger joined
08:17
Alikzus left
08:18
Alikzus joined
|
|||
Xliff | <geekosaur> ($thing // '').Str but yuck | 08:21 | |
Yeees. I've been forced to adopt this idiom, myself. | |||
Match objects are particularly.... interesting. | |||
So... $/[0] must become ($/[0] // '').Str | 08:22 | ||
seatek | it's like a disgusting fly that lands in the middle of a beautiful, delicious cheesecake | 08:27 | |
08:36
canopus left
|
|||
TimToady | m: dd Empty.Str | 08:39 | |
camelia | rakudo-moar fc6d4f: OUTPUT«""» | ||
TimToady | possibly we could return Empty instead of Nil, but we'd have to think about it | 08:40 | |
08:40
RabidGravy joined
|
|||
TimToady | or we could give Match a .Str that doesn't complain, but we'd have to think about that too | 08:40 | |
or we could have some universal postfix operator that means // '' | |||
seatek | i'd be happy either way :) not that i'm miserable now. entierely | ||
i can't remember any more of those | 08:41 | ||
TimToady | well, // has always been at an uncomfortable precedence level, either too tight or too loose | ||
08:41
espadrine joined
|
|||
seatek | but a cheatsheet is always nice | 08:41 | |
ah ok | |||
TimToady | I suppose any other language would just .default('') or some such, but that's too long :) | 08:42 | |
another option, give regex an option to set an "is default" on match objects | 08:43 | ||
08:43
canopus joined
|
|||
TimToady | there are usually lots of ways to solve anything, and the first one you think of isn't necessarily the best one | 08:44 | |
seatek | And there will never be a way to solve all the problems.. like wanting an Int... which can't be Nil... and 0 is different too | 08:45 | |
That's why I'm thinking turning off the warnings might be good... I'm not sure what good they do anyway in this case. | 08:46 | ||
TimToady | the problem with returning Empty is that nqp doesn't know about it, and regex is actually implemented at a very low level | ||
m: dd Empty.Int | |||
camelia | rakudo-moar fc6d4f: OUTPUT«0» | ||
seatek | Oh weird | ||
ok | |||
That's a real can of worms... I've been trying to get into habits of dealing with the empties and 0's and Nils for Ints | 08:47 | ||
TimToady | yeah, we don't want to let people get too sloppy there, or the opposite problem starts to crop up, where people get '' or 0 and think it's valid data | 08:48 | |
it's all tradeoffs... | |||
but I've not been entirely happy with // for years now | 08:49 | ||
seatek | yeah. my last one was in a grammar... where an int wasn't always going to be there... but the make action which coerced it into Int insisted on having something... so i'm making it a string until it comes out of the grammar | ||
it is handy!! | |||
TimToady | m: sub _ ($x) { $x // Empty }; say +_ Nil; say ~_ Nil | 08:52 | |
camelia | rakudo-moar fc6d4f: OUTPUT«0» | ||
seatek | yeah i dont' want the 0 lie if there was just nothing there ;) | 08:54 | |
i'm kinda finding that i'm having less trouble not defining types at all until i need to use them for something | 08:55 | ||
TimToady | so that makes the Empty approach not so good, if you want to differentiate | ||
seatek | yes, all the variations of nothing confuse me | 08:56 | |
08:56
Tonik joined
|
|||
seatek | but if i keep the int a string, it's happy being empty | 08:56 | |
and then i know it's not a 0 ;) | 08:57 | ||
but it makes me feel a little... shady | |||
so Ints can be Nil.... | 08:59 | ||
TimToady | no, but Int is undefined | 09:00 | |
seatek | m: my Int $i = Nil; | ||
camelia | ( no output ) | ||
TimToady | Nil is treated specially there | 09:01 | |
seatek | I like it :) | ||
TimToady | that just says "set $i to default" | ||
09:01
girafe joined
|
|||
seatek | ah | 09:01 | |
TimToady | but $i doesn't actually ever contain Nil | ||
m: my Int $i is default(42) = Nil; say $i | 09:02 | ||
camelia | rakudo-moar fc6d4f: OUTPUT«42» | ||
TimToady | m: my Int $i is default(42); $i = Nil; say $i | ||
camelia | rakudo-moar fc6d4f: OUTPUT«42» | ||
TimToady | m: my Int $i is default(42); $i = 41; $i = Nil; say $i | ||
camelia | rakudo-moar fc6d4f: OUTPUT«42» | ||
seatek | m: my Int $x = Nil ; my $y = Nil; my $x = $y ; say $x; | ||
camelia | rakudo-moar fc6d4f: OUTPUT«Potential difficulties: Redeclaration of symbol '$x' at <tmp>:1 ------> 3my Int $x = Nil ; my $y = Nil; my $x7⏏5 = $y ; say $x;(Any)» | ||
09:02
firstdayonthejob joined
|
|||
seatek | m: my Int $x = Nil ; my $y = Nil; $x = $y ; say $x; | 09:03 | |
camelia | rakudo-moar fc6d4f: OUTPUT«Type check failed in assignment to $x; expected Int but got Any (Any) in block <unit> at <tmp> line 1» | ||
TimToady | = Nil on the declaration is really a no-op | ||
seatek | gotcha | ||
TimToady | m: my Int $x; my $y; $x = $y ; say $x; | 09:04 | |
camelia | rakudo-moar fc6d4f: OUTPUT«Type check failed in assignment to $x; expected Int but got Any (Any) in block <unit> at <tmp> line 1» | ||
09:05
FROGGS joined
|
|||
TimToady is required to go sightseeing | 09:06 | ||
literally, in this case, since I'm the only driver on the rental car :) | 09:07 | ||
seatek | you you must be very elsewhere! | ||
TimToady | we're very .pt at the moment | ||
seatek | well, i'll just go back to struggling with my nothings some more | 09:08 | |
TimToady | Lisbon, in fact, but we're heading to Sintra and such | ||
09:08
ocbtec joined
09:09
pierre_ joined,
pierre_ left,
pierre_ joined
|
|||
seatek | What would be nice is if someone could make it so that Ints on the left would remain happily empty of value if what's on the right is also empty of value | 09:09 | |
TimToady | we don't often end up with this problem in real life because we do alternations with protos, which means each alternative gets its own action method that triggers only when that rule matches | 09:10 | |
seatek | actually that's what i was thinking about doing but it's more work that one big hash! | ||
TimToady | afk really & | 09:12 | |
seatek | hehe :) have fun! :) | ||
09:17
labster left
|
|||
toolforger | Anybody got an idea why NQP is being built the way it is? | 09:17 | |
I was surprised that NQP is being used to build the next NQP generation | 09:18 | ||
it's a cute trick but can cause various issues | |||
09:26
cibs left
09:28
CIAvash left,
cibs joined
|
|||
psch | toolforger: afaik we mostly do that because we need Perl 6 to be bootstrapped as well | 09:34 | |
toolforger | Issue is that you cannot be sure what exactly is in the code: Parts of the semantics might be implicit in whatever NQP does | ||
psch | ...is this about trusting trust | 09:35 | |
toolforger | Ken Thompson, exactly | ||
seatek | dont' look at me.. i'm still confused about the variations of nothing | ||
toolforger | "Reflections on Trusting Trust" | 09:36 | |
psch | right, i think there was a discussion on github about that recently | ||
either the rakudo or the nqp repo | |||
toolforger | In the days of secret services trying to subvert encryption standards, that's pretty scary | ||
09:37
girafe left
|
|||
toolforger | Somebody would have to hand-translate everything and see whether it matches what NQP does | 09:37 | |
psch | github.com/perl6/doc/issues/599 is the discussion i was thinking of | 09:38 | |
toolforger | i.e. whether it matches the output of compiling NQP with NQP | ||
psch | and no, you don't have to manually compile everything, you just have to write a second compiler according to David Wheeler in that discussion | 09:39 | |
or david-a-wheeler, as per the actual nick | |||
FSDO "just" :) | |||
toolforger | I see it | 09:40 | |
and yes he's right | |||
However, if you have a second compiler that does not use the existing NQP blob, you can use that second compiler and do not need that self-compiling NQP anymore | |||
psch | until that second compiler gets subverted | 09:41 | |
toolforger | he mentions that | ||
Personally, I think that can be worked around by making that second compiler so simple that an undergraduate can check it | |||
psch | he mentions that it's unlike to be subverted *in the same way* | ||
toolforger | it need not be fast, just have the same semantics as the official one | ||
psch | but nqp needs to be fast, so we do need the bootstrapping compiler | 09:42 | |
toolforger | Unfortunately, Patrick's idea that NQP qualifies as a second compiler is not useful as an independent check because it is self-compiling | ||
psch | that is not what pmichaud said | ||
toolforger | I see | 09:43 | |
psch | i mean, don't get me wrong, not being able to trust trust is a valid concern | ||
toolforger | NP, see your point that Patrick wasn't actually advertising NQP as a trustful agent | 09:44 | |
psch | and having someone pour time into writing a minimal NQP compiler that can be easily verified and have its results compared to what nqp-{m,j,js} do is a great idea | ||
toolforger | though he is a bit unclear about what exactly NQP does for the situation | ||
09:44
kurahaupo__ joined
|
|||
psch | but if anything you can only compare semantics, or you're white-room reversing each of nqp-{m,j,js} | 09:45 | |
because you cannot compare binaries without compiling to the same vm, which means you need to support that same vm | |||
09:46
setty1 left
|
|||
toolforger | You can compiler compiler outputs | 09:46 | |
let each compiler compile a compiler, then see whether the resulting compilers produce identical results | |||
psch | what are those results that you're comparing? | ||
toolforger | "you can compiler" -> "you can compare" | ||
E.g. let Rakudo compile NQP, see whether the resulting compiler produces bit-identical outputs to what original NQP produces | 09:47 | ||
Of course one can still subvert the compilers, but now the agency needs to subvert two of them, and they need to keep that up as the compilers evolve to avoid getting caught | 09:48 | ||
09:48
lizmat joined
|
|||
toolforger | And the more compilers, the merrier | 09:49 | |
psch | rakudo cannot compile nqp | ||
nqp compiles rakudo | |||
and "bit-identical output" means you're reimplementing MoarVM *and* the JVM | |||
because you cannot trust either of those either | |||
toolforger | No, just compare the binaries that the compilers produce, not the runtimes | ||
psch | the compilers produce bytecode specific to a given VM | 09:50 | |
toolforger | and every new platform involved is one platform that needs to be subverted, i.e. more teams to be influenced | ||
psch | which means you need to write a backend for that VM | ||
toolforger | there's only so much an attacker can do | ||
psch | which means you need to reimplement the VM to trust it | ||
toolforger | Use a Chinese, a Russian, and a US JVM :-D | ||
But... still, NQP compiling itself makes several of this kind of tests easier to subvert | 09:51 | ||
psch | i'm not disputing that, i'm just trying to tell you what needs to be done to fix it :) | 09:52 | |
or rather, verify it despite that shortcoming | |||
toolforger | David Wheeler's idea isn't really to reimplement everything from scratch, it is about producing independent implementations and observe them for differences | 09:53 | |
psch | yes, i understand that | ||
stmuk_ | I think it might be possible to reproduce the binary blobs with libfaketime and using the same path structure and OS | ||
or the windows version of libfaketime | 09:54 | ||
toolforger | Yeah, you'd need a fully deterministic compiler | ||
stmuk_ | both debian and FreeBSD have done work on reproducable builds | 09:55 | |
toolforger | I'd actually recommend not putting in date/time or path info into the compiler; this kind of stuff can go into an accompagnying text file, with a hash code to make its contents verifiable against the compiler that it is supposed to go with | 09:56 | |
erm | |||
not "into the compiler" but "into the compilation results", sorry | |||
09:57
pyrimidi_ left
09:59
setty1 joined
10:00
maybekoo2 joined
|
|||
stmuk_ | increased use of relative paths seems to help but its a hard problem I think | 10:03 | |
reproducible-builds.org/ | |||
"A typical example is creating an archive from the content of a directory. Most filesystems do not guarantee that listing files in a directory will always result in the same order. | 10:09 | ||
toolforger | Sort files then | 10:15 | |
I.e. not really hard, but you need to spot differences, find their causes, and do something to eliminate the difference from the input | 10:16 | ||
essentially just debugging | |||
we know how to do that :-) | |||
stmuk_ | its a huge amount of work | ||
toolforger | It's easier for compilers than for interactive software | ||
None of the bullet points seem really hard or a huge amount of work to me | 10:18 | ||
The hardest part seems to be the ability to control the C compiler | |||
10:19
wamba joined
|
|||
toolforger | new compiler version -> different optimizations -> different output | 10:19 | |
DrForr | Then dig in and get 'em out of the way so we don't have to worry about it :) | ||
stmuk_ | well I look foward to trying to reproduce your reproducable build! | ||
toolforger | Heh. That's a good one. | ||
Cannot do that, too little, too many things to do | 10:20 | ||
*too little time | 10:21 | ||
How much C is in a Perl compiler, anyway? | |||
psch | i think Perl 5 is completely in C, and in Perl 6 i think it's only the backends | 10:22 | |
toolforger | so we have a bytecode that isn't necessarily optimized - that's a good representation for estabilishing reproducibility | 10:23 | |
we cannot do reproducibility all the way down anyway, that stops at the CPU level | |||
and you can have malware in the CPU - most modern CPUs can have their microcode upgraded | 10:24 | ||
stmuk_ | and even have a secret JVM inside | ||
toolforger | I do not think that microcode can to a JVM, or that it would be useful to an attacker | 10:25 | |
*can do | |||
stmuk_ | ? | 10:26 | |
toolforger | But you can do stuff like "see bit pattern 0xdeadbeefdeadbeefdeadbeefdeadbeef on the data bus -> change a CPU instruction to not do some of the usual protected-mode tests" | ||
(I do not think that microcode can do a JVM) | |||
psch | what does "do a JVM" mean? | ||
timotimo | it's like "do the mario" | 10:27 | |
"swing your arms from side to side, come on it's time to go! do the mario!" | |||
stmuk_ | there is a processor inside the usual processor - the Intel ME - that has the JVM | 10:32 | |
toolforger | it cannot *implement* a JVM | ||
oh right, I forgot about SME | |||
or SMM or whatever the abbreviation of the day is | |||
That's not microcode though | |||
stmuk_ | noone said it did | ||
toolforger | microcode is more like "if you see THIS bitpattern in the instruction stream, activate THESE processing units and THOSE connections between them" | ||
timotimo | nqp is small enough that you can go through the moarvm bytecode it's written in and verify it's okay | ||
if you're really worried about this, go ahead | |||
you can probably write a good tool that makes moarvm bytecode files less noisy when it comes to changes, so you can better diff stage0 updates | |||
really, moarvm bytecode is so sufficiently high level that it's much easier to spot malicious patterns than it would be in x86 assembly for example | |||
stmuk_ | diffoscope looked interesting | 10:33 | |
toolforger | Anything should be easier than x86 assembly :-) | 10:34 | |
still, it's quite a lot of bytecode | 10:35 | ||
442.5k serialized form in nqp.jar | |||
10:35
pyrimidine joined
|
|||
timotimo | well, that's jvm bytecode | 10:36 | |
toolforger | no, the nqp.serialized resource | ||
not the .class inside the jar | |||
timotimo | well, the serialized blob isn't as interesting as the bytecode itself | ||
toolforger | Isn't the serialized blob the bytecode? | 10:37 | |
timotimo | no | ||
toolforger | What is it, then? | ||
timotimo | objects | ||
we don't yet have a tool to conveniently dump it. i've written something cute in the past, but it's extremely limited | |||
but since you can't jump to an unconstrained point in bytecode from mvm, you can't do something nasty like ROP with existing code | 10:38 | ||
psch | oh that reminds me | ||
toolforger | well ok - nqp.class is 984 k, that's a whole mouthful even if it is a multiple of the original bytecodes | ||
timotimo | you can only jump into the beginning of a frame and it'll pretty much always do argument verification such that you can't call every target from every call | ||
psch | .tell pmurias "nqp bytecode" meant JAST here irclog.perlgeek.de/perl6/2016-10-25#i_13463907 which was just a case of me not picking the right words, as an AST clearly isn't bytecode... | 10:40 | |
yoleaux | psch: I'll pass your message to pmurias. | ||
timotimo | toolforger: hae you tried moar --dump nqp.moarvm > hugefile? | ||
10:40
pyrimidine left
|
|||
timotimo | it's got only 103k lines on my end | 10:40 | |
... *cough* | |||
toolforger | @timotimo The attack vector is not that somebody does remote code execution, it is that one of the Perl developers is secretly paid by the NSA and commits a stage0 blob that contains malicious or merely dubious (and later-found-to-be-exploitable) implementation | ||
stmuk_ | yes we know | 10:41 | |
timotimo | of course | ||
i'm just saying the analysis needs to be a lot less wary of nasty tricks | |||
toolforger | then why think about ROP techniques? That's not what happens in this scenario | ||
I'm pretty sure people will think of other nasty tricks | 10:42 | ||
timotimo | ROP would be a way to make malicious code much harder to find | ||
10:42
pyrimidine joined
|
|||
toolforger | not necessary | 10:42 | |
One of the OpenSSL compromises was "just sloppy code" | 10:43 | ||
timotimo | it could make malicious code easier to find, i guess? | ||
10:43
lizmat left
|
|||
toolforger | we don't even know if it was paid sloppiness or just what happens if you do not pay attention to every single detail | 10:43 | |
timotimo | OK | ||
so how about going through history and using the latest version of nqp at that time to try to re-build the stage0 files and seeing what the differences are? | 10:44 | ||
toolforger | that didn't help OpenSSL... and that particular sloppiness I read about was there for years | ||
timotimo | that was more about an earlier thing you wrote | ||
but anyway | |||
yeah, you may not want to trust any compiled language, or any program written by anybody else | 10:45 | ||
stmuk_ | js doesn't have a stage0 .. how does it bootstrap? | ||
timotimo | probably from nqp-moar | ||
10:46
obfusk_ left,
obfusk joined,
firstdayonthejob left
|
|||
timotimo | what are we going for with this discussion anyway? i missed the beginning | 10:48 | |
toolforger | I was a bit concerned about NQP reproducing its stage0 directory from stage0 | 10:49 | |
stmuk_ | HLL::Backend::JavaScriptAndMoar | ||
timotimo | well, nqp reproduces its stage0 through stage2 | ||
toolforger | which in turn depends on stage0 | ||
timotimo | right | 10:50 | |
toolforger | such dependency cycles make it impossible to "just read the source to infer the semantics" | ||
timotimo | right. hence, i was telling you about the bytecode stuff | ||
toolforger | is there a way to dump the bytecode to human-readable form? | 10:51 | |
timotimo | yes, i told you :) | ||
moar --dump. you'll need to pipe it to a file because it doesn't bother making stdout blocking before writing | |||
so if you don't output directly to a file, you'll lose everything after the first mouthful | 10:52 | ||
toolforger | no problem with that | ||
stmuk_ | reproducing stage0 needs paths like c:\consulting\ :) | ||
toolforger | lol | ||
runs counter to /usr/bin/independent/verification though | |||
10:52
kurahaupo__ left
|
|||
toolforger | or at least makes it harder, and less likely to actually happen | 10:53 | |
anyway, I'm not so much after fixing the situation, more after understanding it | |||
Is there a complete description & semantics of the AST somewhere? that would be helpful, too | 10:55 | ||
10:56
lizmat joined
|
|||
toolforger | oh. high-priority RL interrupt. Will be back in a few hours. | 10:56 | |
timotimo | check nqp/docs/ | 10:57 | |
10:59
rindolf joined
11:06
bjz left
11:13
BenGoldberg joined
11:14
pierre_ left
11:15
kurahaupo__ joined
|
|||
seatek | wow I went away to do some yoga and everyone goes all X-files here! | 11:32 | |
timotimo | a friend points out that in order to counter the problem of untrusted stage0 we'd have to have a different nqp compiler that can create the stage0 blob from the original nqp code | 11:33 | |
seatek | or we could just figure out who the government mole is here | 11:35 | |
11:36
rurban left
|
|||
psch | i'm fairly sure it's not me, fwiw | 11:36 | |
timotimo | i'd love to be funded by NSA money. i'm so barely productive as it is, and nothing gets past jnthn and jimmyz | ||
seatek | i bet it's viki | ||
timotimo | i'd basically suck the NSA dry with no benefit to them, no danger to any users | ||
psch | i'd need to see metrics to support that | 11:37 | |
like, commit frequency or something | |||
seatek | who's this toolfoger? i bet it's him. he'll show up with some binary to "help" in the next few days | 11:38 | |
RabidGravy | I have to say my Perl 6 productivity has hit the skids since I got a "proper job" | ||
timotimo | :) | ||
poor skids | |||
11:38
pmurias joined
|
|||
psch | hah, yeah, the "proper job" | 11:39 | |
i got one too | |||
it's horrible | |||
stmuk_ | www.staustellbrewery.co.uk/proper-job | 11:40 | |
timotimo | so god went ahead and tested Proper Job ... | ||
pmurias | being a NSA mole seems like a "proper job" | ||
yoleaux | 10:40Z <psch> pmurias: "nqp bytecode" meant JAST here irclog.perlgeek.de/perl6/2016-10-25#i_13463907 which was just a case of me not picking the right words, as an AST clearly isn't bytecode... | ||
seatek | mmm | ||
psch | i mean, seriously | 11:42 | |
i do know it's kind of industry standard, but disregarding your trained professionals advice to adopt a given process because you don't understand it is just weird | |||
because testing and specifications are clearly time sinks without any RoI vOv | 11:43 | ||
but yeah, that's apparently normal :l | 11:44 | ||
seatek | it's probably a trust thing | 11:46 | |
timotimo | testing and specifications are just stuff from the ivory tower | ||
seatek | i've found that if you lead people who don't understand something, in a very simple way, to why they maybe should consider things this way, it often works | 11:48 | |
but that's not always easy to do | |||
they can just turn off if you spew too much at once, or get frustrated with them for being so dim | 11:49 | ||
i think that have trust in, if you can explain it simply, then maybe you know something about it | 11:50 | ||
and then you seduce them further, and lock them into contracts! and everyone's happy :) | 11:51 | ||
i know very little about the Windows world though. they seem to only trust things where you spend the most money | 11:52 | ||
11:52
ggoebel left
|
|||
seatek | it's weird | 11:52 | |
11:59
bjz joined
12:04
pierre_ joined
12:06
dogbert17 joined
|
|||
psch | seatek: well, it's the companys owner that would have to be convinced | 12:06 | |
seatek: and literally every employed developer already tried at least once | |||
12:06
pierre_ left
|
|||
dogbert17 | o/ | 12:07 | |
timotimo | :o | ||
dogbert17 | hi timotimo | ||
.seen moritz | |||
yoleaux | I saw moritz 11 Nov 2016 16:07Z in #perl6: <moritz> Cole_ns: wow, that's a nice short one! | ||
masak | \o | ||
timotimo | o/ | ||
dogbert17 | star: say 'o/' | 12:08 | |
camelia | star-m 2016.04: OUTPUT«o/» | ||
dogbert17 | shouldn't we upgrade this | ||
seatek | psch: sounds like you may have a fool on your hands there. either that or a very insightful one who's willing to stand against the tide | ||
psch: some kind of extreme at least :) | 12:09 | ||
psch | seatek: to me it seems mostly like the normal amount of change resistance | ||
seatek: the business is some 10+ years old and back then they didn't write tests either and everything was fine | |||
12:10
pierre_ joined
|
|||
seatek | psch: ah, flying by the seat of the pants. i like that myself. but tests... i've begrudgingly come to really appreciate them. i can practically build a whole system all in just tests. it has too many benefits. surely he'll see that | 12:11 | |
psch | seatek: i trust the other employees when they say they tried a lot but gave up and don't think i have better chances, honestly. i'll just run with it until something better comes along i think | 12:12 | |
masak | seatek, psch: I find a lot of resistance to tests out there. I suspect it's because tests and TDD are difficult to knowledge-transfer. | 12:14 | |
why that is, I don't know | |||
maybe it's the "eating your vegetables" effect | |||
seatek | yeah i used to look at it like that | 12:15 | |
why bother when you can get some real work done! | |||
kinda surprised me when i found i was getting even more work done by writing tests. and being much more compartmentalized in my coding too | 12:16 | ||
that's s weird hump for people to get over | 12:17 | ||
i guess | |||
masak | yes, good point | ||
it's a "local maximum" vs "global maximum" thing | |||
or at least local vs better local :) | |||
seatek | :) yeah. i gives me so much more confidence to make changes too, that i don't know what the side-effects might be | 12:18 | |
i can't imagine not doing them any more | |||
but i used to hate hate hate the thought of them | |||
psch | i do think that's the two big things, yeah | 12:19 | |
i mean, the "eating your vegetables" effect and "i could do real work instead" | |||
seatek | gawd i even like broccoli now | 12:20 | |
12:20
CIAvash joined
|
|||
seatek | what's happened to me? | 12:20 | |
masak | the testing mentality makes you like broccoli | ||
seatek | and spinach! | ||
12:22
aindilis left
|
|||
stmuk_ | worked for popeye | 12:28 | |
masak | as a post-testing person, I find it challenging to describe the post-testing world to pre-testing people | 12:29 | |
I'm guessing the Curse of Knowledge ends up interfering too | |||
seatek | i think i sometimes write too many tests. i get obsessed with fringe cases. | 12:31 | |
i suppose that's the danger | |||
masak | I don't see it that way, to be honest | ||
pmurias | masak: isn't liking broccoli a genetic thing? | ||
masak | that's the "drive" part of TDD | ||
you write tests if and when you want to get somewhere | |||
pmurias | masak: as broccoli used to be really harmfull and some people evolved a distaste for it | 12:32 | |
seatek | yeah | ||
masak | but I guess the other half of that is, um, "model satisfaction" or whatever | ||
seatek | harmful? lies of the broccoli haters! | ||
masak | I don't stop until I feel I've grokked what I'm implementing | 12:33 | |
timotimo | i really like eating broccoli | ||
seatek | i dont' stop either. but sometimes i get mad when i have to refactor some code and then go redo tests. anger! | ||
that was a lot of today for me actually | 12:34 | ||
i'm cranky now | |||
stupid tests | |||
now i have broccoli on the brain too | |||
timotimo | you have "broccoli of the brain"? :) | 12:35 | |
seatek | it's calling to me | ||
masak | seatek: "I have to re-do my tests when I refactor my code" is seriously a whole chapter in a book I should probably write | ||
seatek | cauliflour | ||
masak | seatek: at least that's a legit concern. but there are also ways to mitigate that, and make tests more future-resilient | 12:36 | |
seatek | masak: please include stress-relieving practices in that chapter | ||
i'm relying on perl forever keeping the way it returns .keys the same as it is now in my tests. | 12:37 | ||
because i was too lazy to fully implement a foolproof testing way just yet | |||
hahahaha! it will cause me pain one day soon! ahahahahaha! | 12:38 | ||
i look forward it! | |||
but today i am free! | |||
masak | oh, with .keys it's pretty simple | ||
most of the time you want to sort the keys and assert on the result | |||
but as for the future-resilience, probably the most important factor is to get away from asserting on getters and start thinking in terms of asserting on events/consequences | 12:39 | ||
seatek | i'm not completely dim... but it's generating strings.... from those keys... output of strings. i could sort, but there's never a need to in the code | ||
yeah... i've been doing that more with database stuff | 12:40 | ||
i was thinking about using grammars to test these strings | 12:41 | ||
that are made from keys | |||
but it feels excessive in tests :) | |||
masak | interestingly enough, writing tests in this way forces one to care a lot about what the API surface should be | ||
which is a good thing | |||
when the tests start to come out well-written, that's usually a good sign for the API as well :) | 12:42 | ||
seatek | yeah i'm trying to trick myself i think. but i'll never say for sure | ||
that's what i'm loving about grammars actually | |||
it's turning out to be a really good way for me to clearly document | 12:43 | ||
I just hate Integers in grammars though | |||
they seem more friendly to strings | |||
I wish Integers could be empty | 12:44 | ||
or if they are on the left, empty, something on the right that's empty would mean that it just stays empty | 12:45 | ||
it would save so much seemingly pointless checking | |||
jnthn | seatek: Got an example of what you mean? | ||
jnthn isn't sure what "integers in grammars" mean | 12:46 | ||
seatek | like when you're matching... and you go to an action | 12:47 | |
subject-id => $<data>.made[0].Int | |||
if made[0] is empty... EVERYTHING DIES | |||
psch | m: my @a; say @a[0].?Int | ||
camelia | rakudo-moar dd7b05: OUTPUT«Nil» | ||
psch | warning, that's actually misleading cause it's not about empty or not but about "can you Int" and it could potentially can Int and still die :P | 12:48 | |
m: my @a = "foo"; say @a[0].?Int | |||
camelia | rakudo-moar dd7b05: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5foo' (indicated by ⏏) in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
psch | m: my @a = "foo"; say $_ with @a[0].Int # probably more sensible there | ||
camelia | ( no output ) | ||
psch | m: my @a = "10"; say $_ with @a[0].Int # probably more sensible there | ||
camelia | rakudo-moar dd7b05: OUTPUT«10» | ||
seatek | The best I can do is get it to give me a 0 if nothing was there -- but nothing doesn't mean 0 | 12:57 | |
i need to test for emptiness first before assigning the key, or else just use a string, and worry about it being an Int later. ;) | 12:58 | ||
that's the course i took | |||
m: my $a; $a{'b'} = ''; say $a{'b'}.Int | 12:59 | ||
camelia | rakudo-moar dd7b05: OUTPUT«0» | ||
seatek | m: my $a; $a{'b'} = Empty; say $a{'b'}.Int | ||
camelia | rakudo-moar dd7b05: OUTPUT«0» | ||
seatek | m: my $a; $a{'b'} = Nil; say $a{'b'}.Int | 13:00 | |
camelia | rakudo-moar dd7b05: OUTPUT«No such method 'Int' for invocant of type 'Any' in block <unit> at <tmp> line 1» | ||
timotimo | assigning Nil reverts a container to its default value | 13:01 | |
seatek | m: Int $i = Nil | ||
camelia | rakudo-moar dd7b05: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Two terms in a rowat <tmp>:1------> 3Int7⏏5 $i = Nil expecting any of: infix infix stopper statement end statement modifier statement modif…» | ||
seatek | m: my Int $i = Nil | ||
camelia | ( no output ) | ||
seatek | yeah | ||
timotimo | i wonder what performance characteristics a halite.io bot written in perl6 would have | 13:03 | |
seatek | I mean, is "Empty" 0? Is '' 0 ? I mean really, in reality? ;) | ||
psch | m: grammar G { token TOP { $<a>=\d? { make (my Int $x = +$<a>) } } }; G.parse("").ast.say | ||
camelia | rakudo-moar dd7b05: OUTPUT«0» | ||
timotimo | i.e. what kinds of stuff you'd be able to do in the one second you're allowed to spend per turn | ||
Empty is an empty list. when you .Int a list, you get the number of its elements | |||
psch | "in reality" is kinda weird there tbh | ||
reality doesn't really have types | |||
seatek | ah! how about an empty string? | 13:04 | |
timotimo | m: say +"" | ||
camelia | rakudo-moar dd7b05: OUTPUT«0» | ||
seatek | reality has so many types! | ||
timotimo BBL | |||
seatek | now, if Empty means list, does '' mean... 0? No strings? Aren't no strings also Empty? | 13:05 | |
And how can a string be 0 then? | |||
psch | and empty Str isn't Empty | ||
s/and/an/ | |||
seatek | hehe ;) | ||
13:07
pyrimidine left
|
|||
seatek | m: say so Empty ~~ 0 ; say so 0 ~~ Empty | 13:07 | |
camelia | rakudo-moar dd7b05: OUTPUT«TrueFalse» | ||
seatek | i'm going to cry | ||
psch | ehh, that comparision is kinda flawed | ||
'cause the RHS decides how to treat the LHS | 13:08 | ||
13:08
rurban joined,
ggoebel joined
|
|||
psch | m: say so Empty ~~ { +$_ eqv 0 }; say so Empty ~~ { ~$_ eqv 0 } | 13:08 | |
camelia | rakudo-moar dd7b05: OUTPUT«TrueFalse» | ||
13:10
pyrimidine joined
|
|||
seatek | I contend then, that since the right is so smart, Int should be smart enough not to set itself to 0 on '' | 13:10 | |
it's like Int can never be anything but an Int... unless you've not touched it yet | 13:11 | ||
13:11
BenGoldberg left
|
|||
seatek | it's happily an Int when you define the attribute.... | 13:11 | |
happily empty | |||
but the minute you touch it or look at it, you can never get it back to that happy, empty state | |||
oh my gosh i'm so tired i dont' even know if what i'm saying makes any sense.... :) | 13:12 | ||
i love ints | 13:13 | ||
i'm going to fall asleeping counting ints | |||
psch | m: say +Int | ||
camelia | rakudo-moar dd7b05: OUTPUT«Use of uninitialized value of type Int in numeric context in block <unit> at <tmp> line 10» | ||
seatek | or rats maybe | ||
psch | already 0 | ||
just warns | |||
seatek | yeah string does the same warnings when it's not defined and you try to coerce it | 13:14 | |
13:15
pyrimidine left
|
|||
seatek | i have test for defined ness like this: | 13:15 | |
subject => ($<subject><sym> // '').Str | |||
hideous | |||
but it works! | |||
i need to just separate out those actions to each element individually instead of trying to assign them all at once into a hash | 13:16 | ||
i mean those don't kill the script, you just get hundreds of warnings flyuing by | 13:17 | ||
psch | m: no warnings; say ~Str | ||
camelia | rakudo-moar dd7b05: OUTPUT«===SORRY!===Don't know how to 'no warnings' just yet» | ||
seatek | like, yes, sweety, i know it's undefined... | ||
psch | ah hm | ||
seatek | yeah :) | 13:18 | |
i like a helpful program... but it's downright naggy with this one | |||
13:18
pierre_ left
|
|||
seatek | oh my gosh.. night night. sorry if i'm crazy just now... zzzzzZzzz :) | 13:19 | |
13:19
seatek left
13:25
pmurias_ joined
13:31
pyrimidine joined,
aborazmeh joined,
aborazmeh left,
aborazmeh joined
13:32
dogbert17 left
13:33
pyrimidine left
13:39
pyrimidine joined
13:40
dogbert17 joined
13:44
pyrimidine left
13:49
pyrimidine joined
13:53
pyrimidine left
13:58
pyrimidine joined,
AlexDaniel joined
14:03
pyrimidine left,
pecastro joined
14:04
Guest86755 is now known as matt_
14:06
pyrimidine joined
|
|||
moritz | \o | 14:09 | |
[ptc] | o/ | 14:10 | |
14:12
pyrimidine left
14:14
aborazmeh left
14:21
kyclark_ joined
14:22
cdg joined,
Rawriful joined
14:26
CIAvash left
14:30
kurahaupo__ is now known as kurahaupo
|
|||
dogbert17 | moritz, are you there? | 14:31 | |
moritz | dogbert17: which "there" are you talking about? :-) | 14:41 | |
dogbert17 | in Germany :-) | 14:42 | |
14:42
japhb left
|
|||
dogbert17 | moritz: was just gonna ask if you know who might be able to update Star, it's getting a bit old I think | 14:43 | |
raiph | .tell Xliff Aiui the only thing that makes a data block in P6 a data block is that it's a pod block called 'data'. So the 'foo' and 'qux' blocks don't count. I'll tighten the SO lang to try make that clearer. | 14:44 | |
yoleaux | raiph: I'll pass your message to Xliff. | ||
14:45
kyclark_ left
14:49
vendethiel joined
14:50
sufrostico left
|
|||
moritz | dogbert17: wasn't there a 2016.10 star release already? | 14:51 | |
dogbert17 | moritz: yes, I mean the evalbot | 14:52 | |
star: say 'hello' | 14:53 | ||
camelia | star-m 2016.04: OUTPUT«hello» | ||
moritz | dogbert17: oh. | 14:55 | |
AlexDaniel | dogbert17: sometimes committable works too | 14:59 | |
(but it does not have all the modules installed) | |||
commit: 2016.10 say ‘hello’ | |||
committable6 | AlexDaniel, ¦«2016.10»: hello | ||
AlexDaniel | committable6: stdin reset | 15:00 | |
committable6 | AlexDaniel, STDIN is reset to the default value | ||
dogbert17 | AlexDaniel: good to know, there are so many cool bots hanging around nowadays :) | ||
AlexDaniel | github.com/perl6/doc/issues/711#is...-235414744 for the list :) | 15:02 | |
dogbert17 | AlexDaniel: thx for the link | 15:05 | |
moritz | star: say 42 | 15:06 | |
camelia | star-m : OUTPUT«42» | ||
15:07
pyrimidine joined
|
|||
moritz | star: say 42 | 15:07 | |
camelia | star-m : OUTPUT«42» | ||
dogbert17 | moritz: oh, is this the latest and greatest? | 15:08 | |
moritz | dogbert17: yes, it just doesn't know it yet | ||
dogbert17 | :-) | ||
moritz++ | |||
moritz | star: say 6 * 8 | 15:09 | |
camelia | star-m 2016.10: OUTPUT«48» | ||
15:10
rjbs left,
rjbs joined
15:11
pyrimidine left
15:16
pyrimidine joined
15:18
vendethiel left
15:21
pyrimidine left
15:23
rurban left
15:25
sufrostico joined
15:26
pyrimidine joined
15:31
pyrimidine left
15:36
pyrimidine joined
15:37
bjz left
15:42
BenGoldberg joined
15:43
pyrimidine left
15:44
cdg left
15:52
maybekoo2 left
15:53
pyrimidine joined
16:00
pyrimidine left
16:06
pyrimidine joined
|
|||
dogbert17 | doc question: type-graph.txt contains both 'class X::Augment::NoSuchType does X::Comp' and 'class X::Augment::NoSuchType does X::Syntax'. Shouldn't the second one be removed? See github.com/rakudo/rakudo/blob/nom/...n.pm#L1738 | 16:09 | |
psch | m: say X::Augment::NoSuchType.^roles | 16:10 | |
camelia | rakudo-moar aa86b9: OUTPUT«((Comp))» | ||
psch | m: say X::Comp.^roles | ||
camelia | rakudo-moar aa86b9: OUTPUT«()» | ||
16:10
ocbtec left
|
|||
psch | Augment::NoSuchType doesn't really seem syntax-y to me either, fwiw | 16:10 | |
16:10
pyrimidine left
|
|||
psch | just from a "do the names make sense there" perspective, y'know :) | 16:10 | |
dogbert17 | psch++, I will remove it :) | 16:11 | |
MasterDuke | my class X::Augment::NoSuchType does X::Comp { | ||
in src/core/Exception.pm | |||
so yeah, the second one seems wrong | |||
dogbert17 | and away it will go :-) | 16:12 | |
dalek | c: f0ab29c | (Jan-Olof Hendig)++ | type-graph.txt: class X::Augment::NoSuchType does not do X::Syntax. psch++, MasterDuke++ |
16:15 | |
c: a0de2a5 | (Jan-Olof Hendig)++ | type-graph.txt: enum Order is Int was listed twice |
16:17 | ||
dogbert17 | the second commit should hopefully solve github.com/perl6/doc/issues/984 | 16:18 | |
16:33
lizmat left
16:36
cdg joined,
cdg_ joined
|
|||
AlexDaniel | awww, it is no longer visible how the graph looked in the past! | 16:40 | |
anyway, dogbert17++ | |||
timotimo | why didn't anybody tell seatek about "quietly"? | ||
16:40
cdg left
|
|||
psch | timotimo: i keep forgetting we have that | 16:41 | |
i tried 'no warnings' though..? :P | |||
geekosaur | I think quietly didn't quiet that last time I tried. things continue to evolve... | 16:42 | |
AlexDaniel | timotimo: I have not seen the question. Does it sound like a good excuse? :) | ||
psch | m: say quietly +Int | 16:43 | |
camelia | rakudo-moar aa86b9: OUTPUT«0» | ||
psch | m: say quietly ~Int | ||
camelia | rakudo-moar aa86b9: OUTPUT«» | ||
timotimo | sounds good to me | ||
16:44
firstdayonthejob joined
16:45
troys joined,
pyrimidine joined
16:50
pyrimidine left
|
|||
dalek | c: 213b76c | (Jan-Olof Hendig)++ | type-graph.txt: Fixed typo |
16:52 | |
16:55
Actualeyes joined
|
|||
pmurias_ | toolforger: re reproducibility if we verified that all the blobs in the repo where in fact built with nqp versions from the repo wouldn't we be protected against new blob backdoors | 17:01 | |
17:01
pmurias_ left
17:04
cyphase left
17:08
cyphase joined
|
|||
toolforger | yes, that's why I have such a dislike against those blobs. | 17:10 | |
They don't have source code | 17:11 | ||
no comments that explain what they are, which objects are in and why | 17:12 | ||
Maybe these compile-from-yourself problems are really just a special case of uninspectable-binary-blob problems | |||
17:33
rurban joined
17:34
b2gills left
|
|||
RabidGravy | as a complete change of subject has anyone got any better solutions for multiple version implementations of, say, a protocol in the same module than having multiple roles named for the versions? | 17:34 | |
17:35
b2gills joined,
b2gills left,
b2gills joined
|
|||
RabidGravy | I'm almost wanting something like "module Protocol { class Foo:ver<0.1> { }; class Foo:ver<0.2> { } }" to work | 17:35 | |
psch | you could make Protocol::Foo a factory i guess | 17:36 | |
not sure we have anything better there | |||
but that kinda syntax might work out with a bit of MOP tweakery for a factory | |||
like, it generates a Protocol::Foo.new(:$ver) and DTRT | 17:37 | ||
RabidGravy | yeah which goes back to the versioned named roles or similar | ||
psch | yeah, it does, just a bit fancy looking with some more startup overhead in the grammar | ||
or well, precomp overhead i suppose | |||
RabidGravy | or something like long names in the provides section of the META | 17:38 | |
psch | or do it php-ish, and have Protocol::Foo.do_thing_via_ver1 :P | ||
17:41
troys is now known as troys_
|
|||
pmurias | toolforger: re uninspectable, even if we had a disassembler nobody would read throught all the generated code | 17:45 | |
toolforger | that's exactly my point | ||
timotimo | we do have a disassembler, though | ||
toolforger | I am wondering though - how were these blobs generated initially? | ||
timotimo | oh, wait | ||
you mean reconstructing the original code | |||
gotcha | |||
toolforger: the very first version of nqp was written in PIR | 17:46 | ||
toolforger | oh | ||
timotimo | once we had an nqp, we added more features in nqp, then re-built the PIR from the nqp source code | ||
more and more code got turned into nqp code and more and more PIR got phased out | |||
eventually we got extra backends | |||
we then used a cross-compilation setup to build stage0 for new backends | |||
i.e. nqp-parrot ran, compiled itself, but spat out jvm or moarvm bytecode | 17:47 | ||
toolforger | wow | ||
that's really far from any source code that ever existed | |||
timotimo BBL | 17:49 | ||
pmurias | I guess we could reconstruct something with the readability of the orginal PIR code base from the moarvm bytecode | ||
17:50
sufrostico left
|
|||
toolforger | which wouldn't be much of readability, right? | 17:50 | |
timotimo | it'd be a noticable bit better | ||
have you already tried moar --dump? | |||
toolforger | no | 17:51 | |
I think I'll have to revisit that doc directory first | |||
timotimo | well, it'll be helpful for this topic if you knew the readability-related properties of moar bytecode | ||
toolforger | true | ||
timotimo | nqp's doc folder, yes? | ||
toolforger | yep | ||
timotimo | ops.markdown is particularly helpful for reading moar bytecode | ||
timotimo BBL for real | |||
toolforger | I think I read that, but could not make much from it | 17:52 | |
maybe it's going to be better on the second time, with more background info | |||
AlexDaniel | Some positive trend here github.com/perl6/doc/issues/561 | 17:57 | |
dogbert17: perhaps see this ↑ | |||
who knows, maybe you'll find something fixable | 17:59 | ||
[ptc] just typed `aptitude install perl6` for the first time. It felt soooo good :-) | 18:00 | ||
18:00
Sgeo_ left
|
|||
AlexDaniel | [ptc]: and what version did it install? :) | 18:00 | |
… also, don't forget to remind us when 「aptitude install zef」 starts working… | 18:01 | ||
[ptc] | AlexDaniel: 2016.10 :-) | ||
geekosaur | if they're on testing then it's fairly recent | ||
[ptc] | the Debian Perl team has been doing a sterling job with keeping the packages up to date | 18:02 | |
AlexDaniel | for about a year now, yes | ||
18:02
espadrine left
18:03
pyrimidine joined
18:08
rurban left
18:10
pyrimidine left
18:13
sufrostico joined
|
|||
dogbert17 | AlexDaniel: will take a look | 18:18 | |
18:24
ggoebel left
|
|||
TimToady | geekosaur: you probably noticed 'quietly' not working on compilation warnings...which it doesn't... | 18:25 | |
geekosaur | no, it spawned a discussion about what things should be suppressable and what shouldn't | 18:26 | |
18:26
raiph left
|
|||
geekosaur | although now that I think back, it may have been about the perl 5-ism warnings, which weren't suppressible at the time | 18:27 | |
TimToady | those are compiler warnings, not run-time, generally | ||
geekosaur | mm, right, so that wouldn't have been it. | ||
TimToady | quietly is dynamically scoped to run time | ||
geekosaur | ...and would not have been this because I am specifically recalling it being about Nil warnings | ||
which would be runtime | |||
so I don't recall why they weren't being suppressed :/ | 18:28 | ||
TimToady | well, if they were constant folded, they could happen at compile time | 18:32 | |
but match objects shouldn't be doing that | 18:33 | ||
18:38
Sgeo_ joined
|
|||
dalek | c: 67e6927 | (Jan-Olof Hendig)++ | doc/Type/ (3 files): Fixed a few broken links |
18:38 | |
18:38
pyrimidine joined
18:39
autark joined
18:48
cyphase left
18:49
cdg_ left,
Actualeyes left
18:50
pyrimidine left
|
|||
AlexDaniel | dogbert17++ | 18:50 | |
18:53
cyphase joined
19:03
pyrimidine joined
19:07
troys_ is now known as troys
19:08
pyrimidine left,
zakharyas joined
19:15
Vynce joined
19:16
darutoko left
19:17
vendethiel joined
|
|||
timotimo | i'm back, was i missed? :3 | 19:19 | |
19:20
Vynce left
|
|||
moritz | yes! | 19:21 | |
moritz hugs timotimo | |||
dalek | c: cbbc38a | (Jan-Olof Hendig)++ | doc/Language/classtut.pod6: Fixed another broken link |
19:28 | |
synopsebot6 | Link: doc.perl6.org/language/classtut | ||
timotimo | yay | 19:29 | |
19:30
stmuk joined
19:32
stmuk_ left
|
|||
cognominal | hi, what is the way you have run a non existing command foo with &run, short of testing 'foo'.r && 'foo'.x to avoid to run it in the first place ? | 19:38 | |
.exitcode does not cut it because the command is not even run. | 19:39 | ||
ho, there is a Proc.pid that is Any | 19:40 | ||
nope, apparently it is not set or it is reset after the command is run | 19:41 | ||
thought one can stack test for IO. | 19:43 | ||
geekosaur | this is a POSIX screw case. the usual convention is that exec failure sets the wait status to signal 0, exit -1/255 | ||
cognominal | '/'.IO.d.r does not cut it | 19:44 | |
timotimo | right, what you get from .d or something is just a Bool | ||
geekosaur | '/'.IO ~~ :d && :r # or something like that | ||
cognominal | ho, I forgot about that one | 19:45 | |
timotimo | not quite | ||
cognominal | m: ?'/'.IO | ||
camelia | rakudo-moar aa86b9: OUTPUT«WARNINGS for <tmp>:Useless use of "?" in expression "?'/'.IO" in sink context (line 1)» | ||
cognominal | m: say ?'/'.IO | ||
camelia | rakudo-moar aa86b9: OUTPUT«True» | ||
geekosaur | no, I figured that wasn't quite right but I'm not recalling the specific syntax. (my memory wants to use a junction, but I am dubious) | 19:48 | |
that is, & instead of && | |||
huh, memory was right | 19:49 | ||
m: say '/'.IO ~~ :d & :r | |||
camelia | rakudo-moar aa86b9: OUTPUT«True» | ||
geekosaur | m: say '/'.IO ~~ :d & :w | ||
camelia | rakudo-moar aa86b9: OUTPUT«False» | ||
19:49
pyrimidine joined
|
|||
cognominal | I liked the '/'.IO.d.r # too bad. | 19:50 | |
geekosaur | not going to get chaining like that without Icon-style failure instead of p6-style, I think | ||
cognominal | geekosaur, can you elaborate ? | 19:51 | |
geekosaur | (in Icon, there is no False, it fails instead. if it succeeds, the other one is taken. and fail does not throw an exception, it boolifies to False) | ||
cognominal | ho, I get it | 19:52 | |
geekosaur | (sort of. since there's no False, you test success/fail not true/false) | ||
the main reason not to do things this way is that you end up with an evaluation style that backtracks, which confuses people | |||
19:54
pyrimidine left
|
|||
cognominal | the problem with '/'.IO.d.r is that .r would be called even if .d returns a false IO | 19:56 | |
geekosaur | in Icon that's not a problem because almost anything that gets &fail immediately produces &fail without doing anything else | 19:58 | |
20:00
kyclark_ joined
20:04
kyclark_ left
20:05
ggoebel joined
20:07
labster joined
20:08
ggoebel left
20:10
kyclark_ joined
|
|||
dalek | c: b33f95e | (Jan-Olof Hendig)++ | / (2 files): Added docs for X::Proc::Unsuccessful |
20:11 | |
20:11
pyrimidine joined
20:16
pyrimidine left,
kyclark_ left
|
|||
moritz | m: say ':'.uniname | 20:16 | |
camelia | rakudo-moar aa86b9: OUTPUT«COLON» | ||
moritz | m: say 42.uninmae | 20:18 | |
camelia | rakudo-moar aa86b9: OUTPUT«No such method 'uninmae' for invocant of type 'Int' in block <unit> at <tmp> line 1» | ||
moritz | m: say 42.uniname | ||
camelia | rakudo-moar aa86b9: OUTPUT«ASTERISK» | ||
moritz | .oO( I expected OBELISK ) |
||
20:19
seatek joined
20:20
djbkd joined
20:21
pyrimidine joined
|
|||
BenGoldberg | m: say 42.chr | 20:22 | |
camelia | rakudo-moar aa86b9: OUTPUT«*» | ||
BenGoldberg | m: say $_.chr for first *.uniname ~~ /OBELISK/, ^0x10ffff; | 20:23 | |
camelia | rakudo-moar aa86b9: OUTPUT«WhateverCode object coerced to string (please use .gist or .perl to do that) in block <unit> at <tmp> line 1Use of Nil in numeric context in block at <tmp> line 1␀» | ||
BenGoldberg | m: say *.uniname ~~ /OBELISK/ for 42; | 20:24 | |
camelia | rakudo-moar aa86b9: OUTPUT«WhateverCode object coerced to string (please use .gist or .perl to do that) in block at <tmp> line 1Nil» | ||
BenGoldberg | m: say { .uniname ~~ /OBELISK/ } for 42; | ||
camelia | rakudo-moar aa86b9: OUTPUT«-> ;; $_? is raw { #`(Block|69980304) ... }» | ||
BenGoldberg | m: say do { .uniname ~~ /OBELISK/ } for 42; | ||
camelia | rakudo-moar aa86b9: OUTPUT«Nil» | ||
BenGoldberg | m: say do { .uniname ~~ /K/ } for 42; | ||
camelia | rakudo-moar aa86b9: OUTPUT«「K」» | ||
BenGoldberg | m: say first { .uniname ~~ /K/ }, ^256; | 20:25 | |
camelia | rakudo-moar aa86b9: OUTPUT«6» | ||
BenGoldberg | m: say uniname first { .uniname ~~ /K/ }, ^256; | ||
camelia | rakudo-moar aa86b9: OUTPUT«ACKNOWLEDGE» | ||
BenGoldberg | m: say uniname first { .uniname ~~ /OBE/ }, ^256; | ||
camelia | rakudo-moar aa86b9: OUTPUT«Cannot resolve caller uniname(Nil); none of these signatures match: (Str:D $str) (Int:D $code) in block <unit> at <tmp> line 1» | ||
20:26
pyrimidine left
|
|||
BenGoldberg | m: say uniname first { .uniname ~~ /OBE/ }, ^0x110000; | 20:26 | |
camelia | rakudo-moar aa86b9: OUTPUT«SYRIAC HARKLEAN OBELUS» | ||
TEttinger | BenGoldberg: are you looking for a menhir or standing stone? | 20:27 | |
BenGoldberg | Whichever one I can put my feet on? | ||
TEttinger | 🚀 | 20:29 | |
BenGoldberg wonders why first, when it fails, returns Nil, instead of, say Mu, or an empty Slip. | |||
m: '🚀'.uniname.say; | |||
camelia | rakudo-moar aa86b9: OUTPUT«ROCKET» | ||
TEttinger | IIRC an obelisk is an upright pillar-like stone often carved with historically-significant things | 20:30 | |
toolforger | IIRC an obelus was a coin | ||
TEttinger | menhirs are uh... not as significant, the "men" is exactly what it suggests and what the shapes of the stones are meant to suggest | ||
20:31
pyrimidine joined
|
|||
AlexDaniel | m: say “$_ → {.uniname}” for (0..0x1FFFF).grep({.uniname ~~ /OBE/})».chr | 20:31 | |
camelia | rakudo-moar aa86b9: OUTPUT«܋ → SYRIAC HARKLEAN OBELUS܌ → SYRIAC HARKLEAN METOBELUS⸓ → DOTTED OBELOS㋉ → IDEOGRAPHIC TELEGRAPH SYMBOL FOR OCTOBER🌍 → EARTH GLOBE EUROPE-AFRICA🌎 → EARTH GLOBE AMERICAS🌏 → EARTH GLOBE ASIA-AUSTRALIA🌐 …» | ||
[ptc] has an Asterix flashback | |||
AlexDaniel | bench: HEAD say “$_ → {.uniname}” for (0..0x1FFFF).grep({.uniname ~~ /OBE/})».chr | 20:32 | |
benchable6 | AlexDaniel, starting to benchmark the 1 given commit | ||
AlexDaniel, ¦«HEAD»:0.9683 | |||
AlexDaniel | bench: 2015.12 say “$_ → {.uniname}” for (0..0x1FFFF).grep({.uniname ~~ /OBE/})».chr | ||
benchable6 | AlexDaniel, starting to benchmark the 1 given commit | ||
AlexDaniel, ¦«2015.12»:1.1704 | 20:33 | ||
AlexDaniel | hm, does not look like that much of a difference | ||
20:37
kyclark_ joined,
Ben_Goldberg joined,
BenGoldberg left,
Ben_Goldberg is now known as BenGoldberg,
pyrimidine left
20:38
jeek left,
kyclark_ left
20:39
jeek joined
20:40
Tonik left,
canopus left
20:41
pyrimidine joined
20:43
lizmat joined
20:46
pyrimidine left,
canopus joined
20:51
pyrimidine joined
20:52
troys is now known as troys_
20:55
pyrimidine left
20:57
pyrimidine joined
21:05
pyrimidine left
21:11
pyrimidine joined
|
|||
Louis_ | As far as I know, the "men" in "menhir" means "stone," and the "hir" means "long." See | 21:11 | |
www.thefreedictionary.com/menhir | |||
toolforger | Question is: in what language? That of the original builders, that of the various tribes that lived there? | 21:12 | |
stmuk | French via Middle Breton | 21:15 | |
TEttinger | the purpose is still a washington monument-esque phallic symbol | ||
21:15
pyrimidine left
|
|||
TEttinger | they weren't watch towers and served no practical purpose | 21:16 | |
21:20
leego left,
leego joined,
pyrimidine joined
21:25
pyrimidine left
21:28
leego left,
leego joined
21:30
pyrimidine joined
21:32
setty1 left
21:35
pyrimidine left
21:41
pyrimidine joined
|
|||
toolforger | The Bretons didn't build them, so... | 21:44 | |
21:46
bjz joined
21:48
cdg joined
21:50
pyrimidine left,
pyrimidine joined
21:52
letni_deszczyk joined
21:56
leego left,
leego_ joined,
cdg left
21:59
toolforger left
|
|||
TimToady | my youngest granson is named Asterix, actually... | 22:04 | |
*grand | |||
22:05
kurahaupo left
22:09
RabidGravy left,
pyrimidine left
22:10
pyrimidine joined
22:11
leego_ left,
leego joined
22:13
zakharyas left
22:19
leego left
22:20
leego joined
22:21
atweiden-air joined
|
|||
atweiden-air | i've come up with a syntax for literate programming | 22:23 | |
gist.github.com/anonymous/adb4f36e...f22bb9d8f5 | |||
it's based on markdown, but i want to see a pod6 version of it | |||
i'm not too familiar with pod, anyone willing to take a crack at it? | |||
22:23
pyrimidine left
|
|||
atweiden-air | (based on github.com/zyedidia/Literate) | 22:24 | |
22:26
letni_deszczyk left
|
|||
AlexDaniel | atweiden-air: well, perhaps you can take a look at some pod6 file and try it yourself | 22:31 | |
atweiden-air: for example: github.com/perl6/doc/blob/master/d...mmars.pod6 | |||
22:32
aindilis joined
22:36
pyrimidine joined,
Rawriful left
22:42
rindolf left
|
|||
atweiden-air | hmmm | 22:44 | |
gist.github.com/anonymous/29a7efa5...d32b93cc0d | |||
22:46
pyrimidine left
22:47
pyrimidine joined
|
|||
atweiden-air | is this viable in pod parsers C<=begin code :spurt('hangman.pl6')> | 22:47 | |
22:47
girafe joined
22:48
djbkd left
|
|||
MasterDuke | regex/grammar question. is there a way to match the negation of a capture? | 22:56 | |
m: if "a12a3a" ~~ /(<[ab]>) (<-[$0]>+) $0/ { say $/ } | |||
camelia | rakudo-moar aa86b9: OUTPUT«「a12a3a」 0 => 「a」 1 => 「12a3」» | ||
MasterDuke | where i want $1 to be 「12」 | ||
AlexDaniel | m: if "a12a3a" ~~ /(<[ab]>) (.*) <?{ so $0 ne $1.comb.any }> $0/ { say $/ } | 23:00 | |
camelia | rakudo-moar aa86b9: OUTPUT«「a12a」 0 => 「a」 1 => 「12」» | ||
AlexDaniel | MasterDuke: that's not it, but still… | ||
I mean, that's probably going to work, but it is very inefficient | 23:01 | ||
grondilu | the default indenting function in Vim does not work very well for Perl 6 IMHO. What do you guys use? | 23:02 | |
seatek | I use emacs and a perl6-mode and it works pretty great. except for sometimes... ;) | 23:03 | |
MasterDuke | AlexDaniel: nice. that'll probably be too inefficient for what i'm doing, but i hadn't even thought of that | ||
AlexDaniel | yea, that's what I've been doing for a long time too | ||
and you know, if you like vim style of editing you can try evil or spacemacs or whatever… | 23:04 | ||
seatek | my favorite command is :q! | 23:05 | |
or ZZ | 23:06 | ||
the rest is very stresful | |||
AlexDaniel | hm, the only feature I miss is probably V | ||
haven't found any good alternative to that *yet* | |||
seatek | i'm googling | 23:07 | |
V doesnt exist | 23:08 | ||
it's a weird fantasy | 23:09 | ||
oh! visual mode line-wise | |||
hmm | 23:10 | ||
AlexDaniel | yeah, I know several ways to do that but no easy one | ||
El_Che | grondilu: I wrote a post my perl6 vim config: nxadm.wordpress.com/2016/08/21/vim...-6-editor/ | 23:20 | |
23:21
kyclark_ joined
|
|||
seatek | i use it sometimes on machines where i don't want to leave "~" strewn about. But I don't know it well enough. It always makes me feel like I'm using a Turing machine. | 23:21 | |
I need to spend some time getting comfortable with it. | 23:22 | ||
But i've been saying that for... oh my gosh... my memory is failing | |||
23:23
girafe left,
pyrimidine left,
pyrimidine joined,
atweiden-air left
|
|||
geekosaur | bring back tv.exe :p | 23:24 | |
(tops-20) | |||
23:25
pyrimidine left,
kyclark_ left
23:26
ugexe joined
23:29
bjz left
23:32
bjz joined
23:33
pmurias left
23:46
garu joined
|
|||
garu | hello! quick question: 'class C { method x (*%args) {} }; my $c = C.new; $c.x(foo => 42, bar => 21);' works as expected, but if I quote the keys, I get "Too many positionals passed; expected 1 argument but got 3" | 23:49 | |
i.e. 'class C { method x (*%args) {} }; my $c = C.new; $c.x("foo" => 42, "bar" => 21);' | 23:50 | ||
timotimo | aye, pairs with quoted keys will not become named arguments | 23:51 | |
because quotes allow interpolation. for dynamic names of keyword arguments/named arguments, you'll have to use a hash and flattening to use that | |||
garu | timotimo: is this by design? is it documented somewhere? I must be looking at the wrong place, sorry | 23:54 | |
timotimo | by design. let me see if i find docs that tell about it | ||
docs.perl6.org/language/functions#Arguments | 23:55 | ||
there's a "not a named argument" example there |