»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by moritz on 25 December 2014. |
|||
andreoss | raydiak: reported | 00:04 | |
raydiak | andreoss++ | 00:07 | |
00:08
raiph left
|
|||
timotimo | Cannot find method 'value' | 00:13 | |
at src/Perl6/World.nqp:651 (blib/Perl6/World.moarvm:install_lexical_container:376) | |||
i wonder how i did that | |||
seems like my $_ = ... in a block did that | 00:14 | ||
raydiak | m: for ^3 { my $_ = "foo"; .say } | 00:15 | |
camelia | rakudo-moar 8f447f: OUTPUT«Potential difficulties: Redeclaration of symbol $_ at /tmp/qjZQlordFN:1 ------> for ^3 { my $_ ⏏= "foo"; .say }Cannot assign to an immutable value in block <unit> at /tmp/qjZQlordFN:1» | ||
raydiak | m: do { my $_ = "foo"; .say } | 00:16 | |
camelia | rakudo-moar 8f447f: OUTPUT«===SORRY!===Cannot find method 'value'» | ||
raydiak | m: do { my $_ } | ||
camelia | rakudo-moar 8f447f: OUTPUT«===SORRY!===Cannot find method 'value'» | ||
raydiak | m: { my $_ } | ||
camelia | rakudo-moar 8f447f: OUTPUT«Potential difficulties: Redeclaration of symbol $_ at /tmp/zPA58pBXMj:1 ------> { my $_ ⏏}» | ||
raydiak | m: -> { my $_ } | ||
camelia | rakudo-moar 8f447f: OUTPUT«===SORRY!===Cannot find method 'value'» | 00:17 | |
raydiak | m: { my $_ }, | ||
camelia | rakudo-moar 8f447f: OUTPUT«Potential difficulties: Redeclaration of symbol $_ at /tmp/kAJiU0iva0:1 ------> { my $_ ⏏},» | ||
raydiak | m: -> { my $/ } | ||
camelia | ( no output ) | ||
00:17
kjs_ joined
|
|||
raydiak | m: .say | 00:19 | |
camelia | rakudo-moar 8f447f: OUTPUT«Nil» | ||
00:22
adu left
00:23
broski left
|
|||
psch | m: { temp $_ = "foo" } | 00:25 | |
camelia | ( no output ) | ||
psch | m: { my $_ = "foo" } | 00:26 | |
camelia | rakudo-moar 8f447f: OUTPUT«Potential difficulties: Redeclaration of symbol $_ at /tmp/BFXaizliST:1 ------> { my $_ ⏏= "foo" }» | ||
00:29
leont joined
|
|||
timotimo | Failed to open pipe: 12 | 00:33 | |
in QX | |||
psch | timotimo: i hope you're also golfing and ticketing ;) | ||
timotimo | no energy right now | 00:34 | |
this is from a locally modified spesh_diff.p6 | |||
but the changes shouldn't give me trouble ... | |||
i shall add some debug output | |||
00:43
colomon left
00:44
ssutch left
00:50
virtualsue left
00:51
colomon joined,
Rounin joined
|
|||
timotimo | cannot figure it out | 00:54 | |
geekosaur | ENOMEM... | 00:56 | |
00:57
kjs_ left
|
|||
timotimo | oh? | 00:57 | |
geekosaur | if that's an OS errno | ||
but the only place I can think of that could generate that other than synthetically via malloc() is fork() in which case it means you're out of virtual memory | 00:58 | ||
which seems moderately unlikely since it would be rather obvious from more than just p6 | 00:59 | ||
01:02
andreoss left
01:09
[Sno] left
01:11
cognominal left
01:14
BenGoldberg left
01:23
adu joined,
adu left
01:24
raiph joined
01:28
BenGoldberg joined
01:31
BenGoldberg left
01:32
BenGoldberg joined
01:40
Mso150 left
01:41
Mso150 joined,
adu joined
01:56
adu left
02:20
leont left
02:23
rmgk_ joined,
rmgk left,
rmgk_ is now known as rmgk
02:27
kaare__ joined
02:33
adu joined
|
|||
adu | what's the difference between associative_bind and bindkey? | 02:33 | |
and positional_get and atpos? | 02:36 | ||
02:46
colomon left
|
|||
Timbus | associative_bind and positional_get appear to be NQP ops | 02:48 | |
uh, or more like VM ops | 02:49 | ||
02:52
gfldex left
02:54
colomon joined
|
|||
vendethiel was confused for a moment | 02:58 | ||
colomon is usually confused longer than that | 03:02 | ||
03:08
Mouq joined,
Mso150_i joined
03:09
Mso150 left,
dj_goku_ joined
03:10
dj_goku left
03:18
jakesyl_insomnia left
03:20
jakesyl_insomnia joined
03:30
noganex joined,
amkrankruleuen left
03:31
djruffkutz joined
03:32
djruffkutz left
03:33
noganex_ left
03:39
dj_goku_ left
|
|||
adu | what does SCWB mean? | 03:41 | |
03:43
dj_goku joined,
dj_goku left,
dj_goku joined
04:20
raiph left
04:25
Mso150_i_q joined
04:26
Mso150_i left,
skids left
04:29
ggoebel111111112 left
04:30
ggoebel111111112 joined
04:40
skids joined
04:46
dj_goku left
04:49
dj_goku joined
05:04
vendethiel left
05:10
dj_goku left
05:21
sirdancealot joined
05:23
davido_ left
05:24
dj_goku joined,
dj_goku left,
dj_goku joined,
davido_ joined
05:44
KCL_ joined
05:52
telex left
05:54
Mouq left,
telex joined
05:58
dj_goku_ joined,
dj_goku left
05:59
xinming left
06:00
xinming joined
06:07
IllvilJa left
06:09
BenGoldberg left,
IllvilJa joined,
skids left
06:13
Mso150_i_q left
06:18
skids joined
07:46
xfix joined
07:48
berekuk joined
07:54
skids left
08:01
berekuk left
08:04
berekuk joined,
berekuk left
08:10
darutoko joined
08:13
novice666 joined
|
|||
novice666 | what is the mechanism of incrementing immutable variable $ in oneliner perl6 -ne ' say ++$ ' file.txt ? | 08:18 | |
08:19
mr-foobar left
|
|||
moritz | novice666: it's not immutable, it's just anonymous | 08:25 | |
but, uhm, does that even work? | 08:26 | ||
seems it does | 08:27 | ||
08:27
lumimies left
|
|||
moritz | it's weird, I'd have though you have to declare it first | 08:27 | |
--target=ast says it generates lexical $ANON_VAR__1 | |||
for the $ | |||
novice666: does that answer your question? | 08:28 | ||
08:28
mr-foobar joined
08:30
ugexe left
08:31
ugexe joined
|
|||
JimmyZ | m: $; my $b; | 08:36 | |
camelia | rakudo-moar 8f447f: OUTPUT«===SORRY!===Cannot find method 'orig'» | ||
JimmyZ | m: my $; my $b; | ||
camelia | ( no output ) | ||
08:39
virtualsue joined
|
|||
adu | do you see anything wrong with this? pastie.org/9825136 | 08:49 | |
moritz | adu: that's Perl 6 code (not NQP), right? | 08:51 | |
well, the indentation of the 'make' line is off | |||
JimmyZ | @<pointer>? | ||
you mean @$<pointer>? | 08:52 | ||
moritz | m: 'ab' ~~ /$<a>=(.)+/; .say for @<a> | ||
camelia | rakudo-moar 8f447f: OUTPUT«「a」「b」» | ||
moritz | JimmyZ: @<pointer> is a valid shortcut | 08:53 | |
adu | moritz: yes | ||
JimmyZ | ah, I didn't know it .. | ||
adu | JimmyZ: I don't know if that's what I mean | ||
I've never seen @$ before | |||
JimmyZ | m: my $@a = [ 3, 5]; say %@a; | 08:55 | |
camelia | rakudo-moar 8f447f: OUTPUT«===SORRY!=== Error while compiling /tmp/sQkFxNVcBfCannot declare a variable by indirect name (use a hash instead?)at /tmp/sQkFxNVcBf:1------> my $⏏@a = [ 3, 5]; say %@a;» | ||
JimmyZ | m: my @a = 3, 5; say %@a; | ||
camelia | rakudo-moar 8f447f: OUTPUT«3 => 5» | ||
moritz | adu: ah, one thing that's wrong is that the recursion into $ast doesn't seem to terminate anywhere | 08:56 | |
adu | moritz: so the behaviour I'm seeing is that if I have a pointer ("char * s"), then it runs forever, but if I dont ("char c"), then it parses pretty quick | ||
moritz | adu: but it would be much easier to help if you'd tell us why you suspect something might be wrong | 08:57 | |
yes, the recursion into $ast would explain that | 08:58 | ||
adu | but it's not recursion | ||
it's a completely different ast | |||
moritz | $ast = -> $type, $init { $ast($pointer($type), $init) } | ||
there are two occurences of $ast here. They refer to the same object. | 08:59 | ||
adu | maybe if I do 2 of them $ast2 = -> ... {}; $ast = $ast2? | ||
moritz | Thus, recursion | ||
yes, you need a separate lexical for it to work as a closure | 09:00 | ||
adu | I thought {} did that? | ||
moritz | {} creates a block and thus a scope | ||
but not a new lexical | 09:01 | ||
'my' does that | |||
adu | how do I accomplish this? | 09:02 | |
maybe I could call make instead? | 09:03 | ||
moritz | my $wrapped = $ast; $ast = -> $type, $init { $wrapped($pointer($type), $init) } | 09:05 | |
adu: but are you sure all of those need to be callables? they aren't as nicely debuggable as other data structures | 09:06 | ||
adu | if you can find a better at to pass info from one end of the grammar to the other end, I'm all ears | 09:07 | |
moritz | well, make() already gives you that capability | 09:08 | |
adu | ok, but can I call make multiple times? | ||
moritz | well, the last one will take effect | ||
fwiw I'm not talking just about this one action sub | 09:09 | ||
erm, method | |||
I wonder why you seem to passing callables as code objects everywhere | |||
want multiple values? make() an array | |||
adu | s/at/way/ | ||
ok, but an array of [a, b, c] will still have to be turned into a(b(c(x))) at some point | 09:10 | ||
moritz | why? why must a, b and c be callables? | ||
adu | moritz: the alternative is to find a way to insert the current declaration specifiers in the parameterized types encountered later on | 09:11 | |
moritz | why not simply a class Pointer { has $.pointee } or something like that? | 09:12 | |
adu | because the fact that it's a pointer, and the type of the pointee are in two separate locations of the grammar | ||
moritz | I don't see the problem | 09:13 | |
Pointer.new(pointee => $other.ast) | |||
adu | $.pointee comes from $<declaration-specifiers>, which doesn't know about pointers, and $<pointer> doesn't know about the other | ||
moritz | adu: I think I'd have to see the whole source code to be able to discuss this properly | 09:14 | |
adu | moritz: I would love to do that, but both pieces of information are not available until $<declaration> | ||
github.com/andydude/p6-c-parser/bl...Parser.pm6 | |||
so that's the grammar | |||
09:15
jack_rabbit left
|
|||
adu | I have 2 action classes, CASTActions, and DROXActions, and both action classes have a similar issue, but I kind of gave up on CAST for right now, so I am currently trying out the function/block/lambda idea with DROXActions | 09:16 | |
moritz can't find any DROXActions | 09:19 | ||
adu | github.com/andydude/droxtools/blob...ctions.pm6 | 09:20 | |
it's in a different repo because it has nothing to do with general C parsing | |||
09:22
molaf__ joined
|
|||
adu | moritz: the CAST is very OOP, iirc it does have a Pointer class as you described | 09:22 | |
09:26
molaf_ left
|
|||
adu | but if the function/block/lambda idea works, I'd like to do the same thing with CASTActions | 09:28 | |
09:35
denis_boyun_ joined
|
|||
adu | I was actually discussing this with raydiak a couple days ago | 09:36 | |
I was saying that I wanted 2 ASTs, one that represents syntax, and one that represents symantics | 09:37 | ||
and raydiak said that I should have one AST and do the transformations in the actions | |||
moritz | or simply add another transformation stage for syntax tree -> sematnic tree | 09:39 | |
adu | is that easy? | 09:40 | |
masak | bzzt. guten antenoon, #perl6. | ||
adu | hi masak | ||
masak | what does it mean for an AST to "represent semantics"? | 09:41 | |
moritz | it becomes an Abstract Semantic Tree :-) | 09:42 | |
masak | well, that clears that up... | ||
09:42
mr-foobar left
|
|||
adu | masak: well, the issue is with C declarations. they are generally of the form: <declaration-specifier>+ [[<declarator> ['=' <initializer>]?]* % ','] | 09:43 | |
the declaration-specifiers form a complete type. | 09:44 | ||
but the declarators can be of the form myArray[2][3][4] or myFunc(double, double) or myArrayFunc(double)[3] or myFuncArray[3](double), etc. | 09:45 | ||
masak | with you so far. | ||
sounds like a kind of expression parsing, if you ask me. | 09:46 | ||
adu | the "complete type" for the entire declaration must combine information from the declaration-specifiers with information about whether or not it's an array, function, pointer etc from later in the grammar | ||
moritz | wait | ||
what piece of information exactly comes from later in the grammer? | 09:47 | ||
adu | moritz: -> $type { Pointer.new(pointee => $type) } | ||
the $type comes from the declaration-specifiers | |||
moritz | adu: in terms of syntax, please | 09:48 | |
myArrayFunc(double)[3] | |||
which piece of information about that comes from later in the grammer? | |||
*grammar | |||
adu | moritz: myArrayFunc comes from direct-declarator-first:sym<identifier> | 09:49 | |
moritz: (double) comes from direct-declarator-rest:sym<p-parameter-type-list> | 09:50 | ||
moritz: and [3] comes from direct-declarator-rest:sym<b-assignment-expression> | |||
moritz | adu: but when you are at the point where the whole string 'myArrayFunc(double)[3]' has been parsed, you have all the ASTs for all of those tokens already | ||
adu | moritz: yes, but you don't have the return type of the function! | 09:51 | |
moritz | adu: because the function can be post-declared? | 09:52 | |
adu | my point is that <declarator> has all the information it needs to build any AST, except for what is in <declaration-specifiers> | ||
all of the information should be available to <declaration> | |||
but I don't know how to combine it | |||
moritz | not for a syntax tree | ||
a syntax tree shouldn't encompass information that comes later on | 09:53 | ||
adu | so declarator has (Name, PartialType), and declaration has (Type) | ||
moritz | so you seem to need a separate pass that first builds a symbol table, and then resolves forward-references | ||
adu | and I want the AST to have name and type as fields | ||
moritz | that's not an AST anymore | 09:54 | |
AST = Abstract *Syntax* Tree | |||
adu | so I should have a single AST that represents syntax | ||
not semantics | |||
moritz | now we can start to argue whether type information that's not obviosu from syntax is still syntactic | 09:55 | |
but from a practical POV, you just need another pass | |||
whethere you build a separate tree, or simply add some more information later on is pretty much up to you | 09:56 | ||
adu | so, how do I do that? pass an array of actions to parse() ? | ||
moritz | no. Simply traverse the tree you build | ||
if that tree has a somewhat regular structure, that's trivial | |||
adu | that's a lot of if statements | ||
moritz | do that after you called .parse | 09:57 | |
not necessarily | |||
first of all, mulltis can help a lot | |||
or methods on the varios types that make up your AST | |||
adu | oh, right, I can match on the types | ||
moritz | finally, you should make the AST somewhat uniform | 09:58 | |
your users (including yourself) will thank you for it | |||
09:59
gfldex joined
|
|||
adu | so by uniform, do you mean simple? | 09:59 | |
like QAST has Stmt | 10:00 | ||
but CAST has several classes of statements | |||
moritz | the QAST tree conists only of QAST::Node subtypes (except for leaves) | ||
which makes it very easy to check if something is a branch of a leaf | |||
also there's a uniform API for accessing QAST children | 10:01 | ||
so if you want to do a complete tree traversal, you basically just have to do (paraphrased) multi visit(QAST::Node $n) { vist($_) for $n.list }; multi visit(Any) { # do nothing, leaf node } | 10:02 | ||
adu | wow | ||
moritz | so if our AST is OO-y, it helps to give those classes a common API, via a superclass or role | 10:03 | |
adu | is it ok if I subclass QAST to make CAST? | ||
moritz | don't do that | ||
first, QAST is NQP-defined | |||
which can lead to oddities if you subclass it in Perl 6 | |||
adu | ok | ||
moritz | second, you don't want to support all the operations that QAST::Node does, so there's not much point | 10:04 | |
role CAST { has @.children handles <list> } | |||
not so complicated, really :-) | 10:05 | ||
adu | I've never seen "handles" before | ||
moritz | it's for delegation | ||
it just forwards the method 'list' to attribute @.children | 10:06 | ||
role CAST { has @.children; method list { @.children.list } } # equivalent | |||
adu | ok | 10:07 | |
masak | ab5tract: you didn't offend me. I agree with you that Perl 6 should not be considered immature. | 10:08 | |
adu | can you pass extra parameters to methods in the actions even if the grammar doesn't have those actions? | 10:09 | |
masak | ab5tract: Perl 6 faces a rather high bar of success, because it is a second system, and the first system is widely deployed. | ||
ab5tract: thus, it needs to be not just better, but (a) *significantly* better, and (b) not significantly worse. | |||
as to (a), I feel Perl 6 has some points of pride now. I've felt that since sometime one-two years ago. | 10:10 | ||
as to (b), the keywords are "performance" and "stability". we can still improve there, and we should. | 10:11 | ||
if I sounded offended, it was probably more that I typed while scowling at seeing yet another projection of intricate facts down to a one-dimensional ("mature"/"immature") metric. | |||
moritz | adu: not really. But you can have attributes in action objects that carry additional information | 10:12 | |
adu | oh like $<x> = y | ||
moritz | oh, captures | ||
those come in via $/ | |||
adu | hmm, is that not what you meant? | ||
moritz | no, but maybe it's what you meant :-) | ||
you were asking the question | 10:13 | ||
adu | I was also wondering if I could subclass an action class | ||
moritz | sure | ||
actions are in no way special | 10:14 | ||
adu | how do I call a superclass's method with the same name? | ||
moritz | the typical way is the callwith/callsame/nextwith/nextsame dispatchers | 10:15 | |
or you can explicitly call self.YourSuperClass::methodname(args) | 10:16 | ||
masak | did anyone have any opinion about whether irclog.perlgeek.de/perl6/2015-01-10#i_9914995 exposes a bug about enum values exported from many places? | 10:17 | |
adu | interesting | ||
moritz | masak: exportation is currently scoped to compunits | ||
masak: you can consider that a bug or a feature | 10:18 | ||
masak | moritz: that seems orthogonal to what I was asking. | ||
moritz | masak: no | ||
masak: let me explain :-) | |||
... or maybe not | 10:19 | ||
masak | moritz: my question, more exactly, is this: if two modules export two different enum values B, should that value be considered "poisoned" in the importing scope? | ||
(rather than fail due to a double import, as it does now) | |||
moritz | m: module M1 { enum A is export <B C> }; module M2 { enum X is export <B Z> }; | ||
camelia | rakudo-moar 8f447f: OUTPUT«===SORRY!===A symbol 'B' has already been exported» | ||
moritz | masak: it doesn't fail as a double import | ||
masak | innerestin' | ||
moritz | masak: it fails as a double *export* | ||
masak | then I see what you mean. I think. | 10:20 | |
moritz | masak: and that's because exportation is scoped to the compunit | ||
masak | yeah, that's not the behavior I wanted to evoke. | ||
hold on. | |||
masak splits the stuff into files | |||
10:20
denis_boyun_ left
|
|||
moritz | and we have no posining for exports | 10:20 | |
masak | only enum values, IIUC. | ||
10:21
spider-mario joined,
denis_boyun joined
|
|||
masak | here: gist.github.com/masak/406d687c3e4e0684c013 | 10:23 | |
10:23
denis_boyun___ joined
|
|||
masak | by my reading of S12, this should work, but then you're not allowed to refer to just `B`; you have to say `X::B` or `Y::B`. | 10:23 | |
(and if you also import a `sub B { ... }` from somewhere, it takes precedence and "un-poisons" the slot for itself) | 10:24 | ||
moritz | that takes slot &B | ||
10:25
denis_boyun left
|
|||
masak | no doubt -- but I'm talking about what happens when you write `B` in code after that. | 10:26 | |
if the sub has been imported, that's a call to `B`. | |||
moritz | that should resolve to &B, yes | ||
masak | to `&B`, sorry. | ||
moritz skims S12 | 10:27 | ||
masak | but if it hasn't, then it's still a compile-time error, because it's not clear if you're referring to `X::B` or `Y::B`. | ||
10:29
virtualsue_ joined
|
|||
moritz | Since there is an enum C<OK>, the function C<OK> may only be | 10:29 | |
called using parentheses, never in list operator form. | |||
10:29
virtualsue left,
virtualsue_ is now known as virtualsue
|
|||
moritz | so you'd be able to call B() when the B slot is poisoned, but not just 'B args', iiuc | 10:29 | |
ah yes | 10:30 | ||
timotimo | .tell japhb now the log is filled with lines of Run command exited with exit status 1: install/bin/perl6 --optimize=3 /home/timo/oldhome/timo/perl6/bench/perl6/rc-forest-fire 16 16 inf | ||
yoleaux | timotimo: I'll pass your message to japhb. | ||
moritz | "If there is | ||
a collision on two enum values that cancels them both, the function | |||
still may only be called with parentheses, since the enum key | |||
is "poisoned"." | |||
masak | right. | ||
that's the only reference to the concept of poisoning I've found. | 10:31 | ||
it mentions the effect in passing, but it's pretty clear about it. | |||
masak submits rakudobug | |||
moritz | masak: S12 doesn't talk about in which circumstances poisoning, so I'd assume it happens everywhere | ||
so, also in importation/exportation | |||
masak | moritz: ah, you mean between any two imported symbols? | ||
moritz: that's very possible. | |||
moritz | masak: no | ||
masak | moritz: but enum values are a bit special in that they're essentially short-form aliases for their real unambiguous names. | 10:32 | |
moritz | masak: I mean between two imported enum items vs. two declared-here enum items | ||
masak | moritz: like, `True` is short for `Bool::True`. | ||
moritz | yes | ||
masak | moritz: oh, that's entirely possible, yes. | ||
moritz: though I could equally well argue that the declared-here enum value takes precedence... | |||
moritz | with "everywhere" I meant "at declaration and at {ex,im}portation" | ||
masak | declaring something feels like much more of a "conscious act" than importation. | 10:37 | |
like, you might not know you're importing a `B`, but you definitely know you're declaring one! | |||
10:40
lumimies joined,
IllvilJa left
10:42
IllvilJa joined,
denis_boyun___ left
10:43
denis_boyun_ joined
10:45
denis_boyun_ left
10:46
denis_boyun_ joined
10:47
mvuets joined
10:49
virtualsue left
|
|||
masak finally watches TimToady++'s APW keynote | 10:53 | ||
El_Che | TimToady: The Fosdem Language track schedule is online: fosdem.org/2015/schedule/track/languages/ | 10:59 | |
You'll be closing the track. Sunday 13-13:50 | 11:00 | ||
A good time and position | |||
masak | \o/ | 11:01 | |
El_Che | ah nice, there is an other perl talk just before | ||
masak .oO( Perl 6: a last language ) | |||
El_Che | (which I didn't know noting about) | ||
fosdem.org/2015/schedule/event/des...ry_module/ | |||
so the dev room and larry's talk don't collide | 11:02 | ||
great | |||
11:05
rindolf joined
11:31
adu left
11:33
rurban joined
11:35
mr-foobar joined
12:04
Alina-malina left
12:05
Alina-malina joined
|
|||
lizmat | good *, #perl6 | 12:07 | |
m: $;1 # trying to do a "useless use of variable" warning but not finding the line number | |||
camelia | rakudo-moar 8f447f: OUTPUT«===SORRY!===Cannot find method 'orig'» | ||
lizmat | it would seem that .orig is not being set in the case of an unnamed variable | 12:08 | |
does anybody have any clue where that would need to be set ? | |||
dalek | kudo/nom: 7ad8639 | lizmat++ | src/Perl6/Optimizer.nqp: Improve 'Useless use' warning for unnamed vars |
12:09 | |
lizmat | ^^^ does not fix the problem, will just produce a better warning when the problem is fixed | ||
FROGGS_ | I'd leave the word 'variable' in the warnings | 12:12 | |
masak | lizmat+ # there's another '+' waiting for you ;) | ||
lizmat | :-) | ||
FROGGS_ | *g* | ||
lizmat | m: class A { has $!a; method a { $!a; 42 } } # why no warning here, FROGGS_ masak ? | 12:13 | |
camelia | ( no output ) | 12:14 | |
12:14
konsolebox joined
|
|||
lizmat | I think showing the sigil with the name, implies variable, no? | 12:14 | |
are there contexts where parameters should give that warning? | 12:15 | ||
FROGGS_ | std: sub foo($a) { }; foo(42) | ||
camelia | std f9b7f55: OUTPUT«Potential difficulties: $a is declared but not used at /tmp/pOnBFaMNSA line 1:------> sub foo(⏏$a) { }; foo(42)ok 00:01 139m» | ||
FROGGS_ | sort of | ||
lizmat | std: $;1 | 12:16 | |
camelia | std f9b7f55: OUTPUT«ok 00:00 135m» | ||
lizmat | std: $b;1 | ||
camelia | std f9b7f55: OUTPUT«===SORRY!===Variable $b is not predeclared at /tmp/UOGOkK6nT5 line 1:------> <BOL>⏏$b;1Check failedFAILED 00:00 135m» | ||
lizmat | std: my $b;$b;1 | ||
camelia | std f9b7f55: OUTPUT«ok 00:00 135m» | ||
lizmat | hmm... we seem to be more strict than std :-) | ||
dalek | kudo/nom: 09c5420 | lizmat++ | src/Perl6/Optimizer.nqp: Add variable |
12:17 | |
kudo/newio: 76afb6c | peschwa++ | src/vm/jvm/runtime/org/perl6/rakudo/RakudoJavaInterop.java: Static classes won't have a constructor; honor that. This commit fixes generation of constructor dispatch to not generate any dispatch code if we don't have constructors in the first place. |
12:18 | ||
kudo/newio: 28429ec | peschwa++ | / (2 files): Correct marshalling of listy types to Java. raiph++ for pointing me at this. |
|||
kudo/newio: 8f447f8 | FROGGS++ | / (2 files): Merge pull request #350 from peschwa/jvminterop More JVM-Interop improvements |
|||
kudo/newio: 7ad8639 | lizmat++ | src/Perl6/Optimizer.nqp: Improve 'Useless use' warning for unnamed vars |
|||
kudo/newio: 09c5420 | lizmat++ | src/Perl6/Optimizer.nqp: Add variable |
|||
kudo/newio: 5c5a060 | lizmat++ | / (3 files): Merge branch 'nom' into newio |
|||
ecs/newio: 48af140 | TimToady++ | S02-bits.pod: Mention unspace disallowed in regex (except \#) The current engine disallows unspace in regexex as too ambiguous. This is fine for actual whitespace, but is counterintuitive when people try to backslash the # character. So \# is now specifically allowed to match a literal # character. |
12:19 | ||
ecs/newio: 518438a | (Stéphane Payrard)++ | S99-glossary.pod: laziness and other entries |
|||
ecs/newio: 1eee389 | lizmat++ | S (2 files): Merge branch 'master' into newio |
|||
12:23
rurban left
12:25
ggoebel111111112 left
12:30
leont joined,
kjs_ joined
12:35
Alina-malina left
12:37
ggoebel111111112 joined
|
|||
dalek | kudo/nom: 58ae622 | lizmat++ | / (4 files): Remove unneeded stub |
12:41 | |
FROGGS_ | lizmat: all warnings/exceptions talk about "variable $foo"... and I'd not imply anything, a newby that does not know the idea of sigils well might be more confused than needed | ||
masak | lizmat: re parameters: I used to gnash my teeth at Niecza warning about all kinds of unused paramters. | 12:45 | |
lizmat: it's my perogative as a programmer to name a parameter in my routine, and then not use it. | |||
lizmat: in some way, that's a kind of documentation too (and may happen easily, especially with multis), and it happens *often* as one goes through quick refactor cycles. | 12:46 | ||
it feels silly to warn about it. | |||
FROGGS_ | well, I could imaging to only warn about that in a pedantic mode | ||
masak | IntelliJ IDEA strikes the perfect balance here, if you ask me. | ||
FROGGS_ | because, that's what it is | ||
masak | it colors unused declarations grey. | 12:47 | |
that way, people who don't care just blissfully tune it out, easily. | |||
and people who do care pick up on it, and handle it when they feel like it. | |||
...I don't quite know how to express this yet, but a lot of things that we think crudely of as "warnings" and "errors" right now will distribute themselves over the next 20 years or so into slightly different buckets all having to do with different levels of notifications inside an IDE like IntelliJ. | 12:48 | ||
arnsholt | And sometimes an API requires you to include a parameter you don't actually need | ||
masak | the notion of an "abstract interpreter" constantly checking your code while you write it is just too good not to win. | 12:49 | |
12:49
rurban joined
|
|||
arnsholt | CL lets you say "nevermind that this variable is unused" | 12:49 | |
masak | arnsholt: yes, but that argument is weaker in Perl 6, since you can always make a positional anonymous. | ||
arnsholt | Troo | ||
12:50
vendethiel joined
|
|||
dalek | kudo/nom: 574192c | ab5tract++ | src/core/set_operators.pm: on our way to first class hashes |
12:54 | |
kudo/nom: a5a1832 | ab5tract++ | src/core/set_operators.pm: baggy handling of ops now takes mixes into account |
|||
kudo/nom: 671bbcc | ab5tract++ | src/core/set_operators.pm: the mix/bag ops should convert arguments to Bag in cases where no Mix is present |
|||
kudo/nom: 3f625fb | ab5tract++ | t/spectest.data: Add the mix test to the spectest list |
|||
kudo/nom: f7bf2fb | ab5tract++ | src/core/set_operators.pm: Implement a few performance enhancements as suggested by lizmat |
|||
kudo/nom: bcea51a | ab5tract++ | src/core/set_operators.pm: While in the vein of performance, remove some junctions |
|||
kudo/nom: 13d9afe | lizmat++ | / (2 files): Merge pull request #351 from ab5tract/555/quanthash_ops Get Mixes working properly with the QuantHash ops |
|||
FROGGS_ | masak: would a trait be an option? | 12:58 | |
'is unused' | |||
12:58
Alina-malina joined
|
|||
FROGGS_ | is good for documentation too | 12:58 | |
masak | FROGGS_: my point is, to me it doesn't feel like the user should have to defend her declaration of something unused *at all*. | 12:59 | |
I've never felt helped by such a warning. only annoyed. | |||
more broadly, I am against, and will keep being against, any error or warning that assumes the programmer is a beginner rather than a power user. | 13:03 | ||
that's ultimately why I have a beef with `say;` being erroneous, too. | |||
it would be darn useful for it not to be! | |||
lizmat | .tell ab5tract seems t/spec/S03-operators/mix.t is missing from roast ? | 13:04 | |
yoleaux | lizmat: I'll pass your message to ab5tract. | ||
lizmat | m: say() # 2 extra characters to show that you really mean it | 13:05 | |
camelia | rakudo-moar 8f447f: OUTPUT«» | ||
lizmat | possibly, the error should mention the use of a heredoc | 13:06 | |
.tell ab5tract also, some Set/Bag interaction with (-) seems wrong: say (<a b c>.Set (-) <a b>.Bag).perl -> ("c"=>1).Bag | 13:12 | ||
yoleaux | lizmat: I'll pass your message to ab5tract. | ||
13:15
brrt joined,
sirdancealot left
13:22
sirdancealot joined
13:25
fwilson left
13:26
yeahnoob joined,
yeahnoob left
13:27
yeahnoob joined,
yeahnoob left
13:28
yeahnoob joined,
yeahnoob left,
n0den1te joined
13:29
yeahnoob joined,
yeahnoob left,
yeahnoob joined
13:30
yeahnoob left,
yeahnoob joined,
yeahnoob left
13:31
yeahnoob joined,
yeahnoob left
13:32
yeahnoob joined,
[Sno] joined
|
|||
dalek | kudo/nom: 2aef1f7 | lizmat++ | src/core/set_operators.pm: Make (<+) and (>+) 2x faster in worst case |
13:35 | |
13:39
yeahnoob left
|
|||
FROGGS_ | masak: I agree with you about 'say;' | 13:40 | |
moritz | \o | 13:41 | |
masak | well, the pattern is the same in both cases: the warning or error is "this *could* be wrong, so I won't allow you to do that" | ||
when there are perfectly legitimate cases for an experienced user to do that thing. | |||
FROGGS_ | hi moritz | ||
n0den1te | m: say; 3; | 13:42 | |
camelia | rakudo-moar 13d9af: OUTPUT«===SORRY!=== Error while compiling /tmp/sL_TNzIL0WUnsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argumentat /tmp/sL_TNzIL0W:1------> say⏏; 3; ex…» | ||
FROGGS_ | masak: but '$foo is unused' also makes perfectly sense... imagine you read a foreign code you have to maintain | ||
unused params always raise the question if this was intentional or just forgotten to take into account | 13:43 | ||
13:44
kjs_ left
|
|||
masak | FROGGS_: the compiler shouldn't second-guess the programmer! | 13:44 | |
FROGGS_ | no, but maintainable code is important | 13:45 | |
13:45
denis_boyun_ left
|
|||
masak | FROGGS_: I don't see the structural difference between "this `say;` *might* be you being confused and meaning `.say;`, so I'm not going to allow you to write that" and "this parameter is undeclared and I don't know if you are aware, so I'm going to warn about that by default" | 13:46 | |
n0den1te | masak: nor should the programmer second guess the compiler *shudder* | ||
FROGGS_ | so when you stub a signature, implement the routine partly and accidently pass your tests is bad... hints are nice in that regard | ||
13:46
denis_boyun joined
|
|||
masak | no, they are not nice. | 13:46 | |
FROGGS_ | I do like hints if I can satisfy them in either way... see, that's why I *love* clang | 13:47 | |
masak | if I wanted suggestions for where my code declares unused things which might point to structural deficiencies, I'd use a linter. | ||
13:47
kjs_ joined
|
|||
masak | I don't like warnings that punish me for writing the easiest possible code to accomplish something. | 13:48 | |
if I have to sprinkle the code with "#OK" comments to quiet the compiler, I feel like the compiler's errand-boy. | |||
FROGGS_ | these #OK comments are weird anyway | 13:50 | |
13:51
fwilson joined
|
|||
FROGGS_ | anyway, my motivations for an 'is unused' traits are 1) self documenting code, especially if others read it, 2) tell the compiler what you are up to, which leads to 3) silence that bloody warnings and possible optimizations | 13:53 | |
masak | I feel you are misguided, since those warnings shouldn't happen in the first place. | ||
FROGGS_ | not 'silence optimization' of course :o) | ||
masak: that's your opinion :o) | 13:54 | ||
masak | yes, it is! | ||
masak starts a campaign: "Don't Bother Me While I Program" (DBMWIP) | |||
FROGGS_ | I welcome this warning, since I rarely (never) add params I don't use | ||
masak | if the compiler emits a warning *just because it can*, then the compiler should shut up. | ||
FROGGS_: that's a narrow-minded view of what happens during programming. | |||
when I code, I copy-paste stuff. I change it on the fly. I compiler half-finished things to see if they work. | 13:55 | ||
13:55
yeahnoob joined
|
|||
n0den1te | FROGGS_: what masak is saying is, "Don't baby-glove programmers" | 13:55 | |
FROGGS_ | no, it helps me to do my job | ||
13:55
yeahnoob left
|
|||
masak | in a lot of transition states, there will be unused parameters and variables. | 13:55 | |
13:55
brrt left
|
|||
masak | the compiler flagging them up as something I should care about is a bloody annoyance. | 13:55 | |
13:55
yeahnoob joined
|
|||
FROGGS_ | I welcome every warning that results in a: "right, I still need to do that part" | 13:55 | |
masak | if I wanted that information, I'd ask for it. | 13:56 | |
FROGGS_ | how do you ask for it? | ||
13:56
yeahnoob left
|
|||
n0den1te | turn on warnings? | 13:56 | |
masak | FROGGS_: those are low-level tasks, not something that should show up during every compile. | ||
FROGGS_: that's why it's more like linting. | |||
13:56
denis_boyun___ joined,
yeahnoob joined,
[Sno] left
|
|||
masak | I can have a *valid* program with some unused parameters. | 13:56 | |
13:57
yeahnoob left,
raiph joined
|
|||
masak | I want to know about things that are wrong, not TODO-list things. | 13:57 | |
13:57
yeahnoob joined
|
|||
FROGGS_ | I like todo-list things, because I usually work on several places at once, and that helps me keeping track | 13:57 | |
13:57
yeahnoob left,
denis_boyun left
|
|||
masak | I cannot help that you like this useless warning. there are plenty of other ways for you to remember that you have unused parameters, though. ways that wouldn't bother me while I code. | 13:58 | |
13:58
n0den1te left
|
|||
FROGGS_ | masak: you can have valid programs in many different ways, shall we silence everything that could be caused just because the program is not done yet? | 13:58 | |
masak | FROGGS_: you're twisting my argument. | 13:59 | |
13:59
yeahnoob joined,
yeahnoob left
|
|||
FROGGS_ | no, I am just using your argument for other bits that match it as well :o) | 13:59 | |
14:00
yeahnoob joined
|
|||
masak | just so we don't have to strawman each other, here are some warnings I like: | 14:00 | |
FROGGS_ | so, I don't mind if I get extra warnings while I am about to add things and recompile... the compiler should take the program as if it was done | ||
masak | "redeclaration of variable in scope" -- fine, that was probably a thinko on my part. | ||
vendethiel | FROGGS_: in C/C++, what I see most of the time is `void foo(Type /*paramname*/)` | 14:01 | |
masak | "use of undefined value" -- this (runtime) warning I always pay attention to, immediately. | ||
various deprecation warnings -- nice. and, usually, lizmat++ | 14:03 | ||
FROGGS_: for every time I commit, I might have compiled my program ~100 times. if I get warnings about unused parameters even 10 of those times, that's a whole lot of noise in my compile output for something I don't really care to know. | 14:05 | ||
vendethiel | .oO( let's not follow go there... ) |
||
(go errors for every unused import, and even variables I think) | 14:06 | ||
14:07
jluis joined
|
|||
masak | vendethiel: I think it was Go's "error on unused import" that made me start to think about these things more clearly. | 14:09 | |
more precisely, there are some possible problematic things that can happen in transitions and during refactors, that I *just don't care* to be errored/warned about. | |||
[Tux] | WTF | 14:13 | |
6 my int $i = 0; $i--; | |||
m: my int $i = 0; $i--; | 14:14 | ||
camelia | rakudo-moar 13d9af: OUTPUT«Cannot assign to an immutable value in sub postfix:<--> at src/gen/m-CORE.setting:4980 in block <unit> at /tmp/dmsr5BPDZQ:1» | ||
masak | today's autopun spotting: twitter.com/davidcoverdale/status/...3574686722 | ||
[Tux] | m: my int $i = 0; $i = $i - 1; | 14:16 | |
camelia | ( no output ) | ||
14:16
brrt joined
|
|||
masak | [Tux]: there's wide agreement that that should work, but it's difficult to implement. here's (I think) why: usually the $value gets replaced by $value.pred and then put back into the variable's container. but natives have no containers, only the value itself. | 14:17 | |
[Tux] | I'll go with $i - 1 for now | ||
[Tux] tries to implement all the CSV options, so we at least will be able to SHOW that it works | 14:18 | ||
moritz | smoke.perl6.org/report is now up and running | 14:20 | |
thanks to colomon++ and a wee bit of infrastructure by me | |||
masak | \o/ | 14:21 | |
the only kind of smoke I like! | |||
14:22
brrt left
|
|||
masak | why is the author of 007 listed as "Unknown"? | 14:22 | |
moritz | masak: did you specify it in META.info? | 14:23 | |
14:23
BenGoldberg joined
|
|||
masak | good question. I didn't write the META.info :) | 14:24 | |
seems to be in there, though: github.com/masak/007/blob/master/META.info#L4 | |||
moritz | huh | 14:26 | |
smoke.perl6.org/project/007 reports it | |||
(which takes it from ecosystem-api.p6c.org) | |||
github.com/colomon/SmokeResults/bl...ts.pm#L130 this is where the 'Unknown' comes from | 14:29 | ||
github.com/colomon/SmokeResults/bl...ts.pm#L201 ummm | |||
14:34
ab5tract joined
|
|||
ab5tract | hi lizmat | 14:35 | |
yoleaux | 13:04Z <lizmat> ab5tract: seems t/spec/S03-operators/mix.t is missing from roast ? | ||
13:12Z <lizmat> ab5tract: also, some Set/Bag interaction with (-) seems wrong: say (<a b c>.Set (-) <a b>.Bag).perl -> ("c"=>1).Bag | |||
ab5tract | github.com/perl6/roast/pull/52/files | ||
both addressed in this PR | 14:36 | ||
for the record, i do not see any sane way to allow LoL semantics for (-) if it is expected to return a Set in the case that a Set is provided first | |||
another set related PR (which TimToady has expressed support for) would explicitly make the set semantics to always promote its arguments to the most complex present | 14:41 | ||
lizmat: for reference -- github.com/rakudo/rakudo/pull/335 | 14:50 | ||
14:50
brrt joined
|
|||
ab5tract | masak: glad to hear i didn't offend :) | 14:52 | |
14:55
_4d47 joined
|
|||
ab5tract | moritz: FWIW, it is strongly recommended by the Dancer devs to only use Dancer2 | 14:56 | |
(i noticed that SmokeResults is a Dancer 1 app) | 14:57 | ||
moritz | ab5tract: patches welcome :-) | 14:59 | |
ab5tract | :) | ||
maybe later | |||
moritz | (I didn't develop that app, just patched it a bit here and there) | ||
ab5tract: and ask colomon++ first, he'll be the one accepting or rejecting patches | |||
ab5tract | sounds like a plan | 15:00 | |
moritz: not sure if you want to merge that roast PR or wait for lizmat | |||
15:00
Alina-malina left
|
|||
moritz | ab5tract: I'm not firm at all in the mix/bag department, so I'd like to leave the decisions to those who know it better | 15:01 | |
ab5tract | fair enough :) | 15:02 | |
15:02
berekuk joined
|
|||
ab5tract feels good to have a patch in core :D | 15:03 | ||
El_Che | as long your patch doesn't results in core files :) | ||
15:03
skids joined
15:05
zakharyas joined
15:06
frew left,
sirdancealot left,
sirdancealot joined
|
|||
ab5tract | okay, now onto the airplane back to Amsterdam | 15:07 | |
15:07
sirdancealot left
|
|||
ab5tract | .tell lizmat check out github.com/perl6/roast/pull/52/files for the mix.t .. and checkout out github.com/rakudo/rakudo/pull/335 for what i think about `Set (-) Bag ~~ Set` ;) | 15:08 | |
yoleaux | ab5tract: I'll pass your message to lizmat. | ||
masak | a new blog post about Second Systems: www.anton-pirker.at/the-big-rewrite-war-story/ -- HN discussion: news.ycombinator.com/item?id=8869608 | 15:09 | |
15:10
ab5tract left
15:11
FROGGS__ joined,
FROGGS_ left,
yeahnoob left
15:14
kjs_ left
15:15
sirdancealot joined
|
|||
moritz | github.com/rakudo/rakudo/pull/324 # some more opinions (preferably from rakudo developers) would be very welcome | 15:17 | |
15:17
denis_boyun___ left
15:19
broski joined
|
|||
broski | brah | 15:19 | |
m: "Bruh".say | |||
camelia | rakudo-moar 2aef1f: OUTPUT«Bruh» | ||
psch | moritz: irclog.perlgeek.de/perl6/2014-10-05#i_9458502 # the NULL was originally jnthn++'s idea, but i might still have implemented it less-than-sensible | 15:21 | |
moritz: that's a data point, not really a justification... :) | |||
15:24
KCL_ left
15:25
mvuets left
15:30
Rounin left
|
|||
moritz | m: class broski { method brah { say 'Bruh' } }; broski.brah # could not resist :-) | 15:35 | |
camelia | rakudo-moar 2aef1f: OUTPUT«Bruh» | ||
moritz | psch: if jnthn++ endorses the whole idea (and the implementation), I'd like to see some tests for the command line parser | 15:36 | |
psch: but I won't ask you to write any before we're confident that it'll be merged at all | |||
psch | moritz: S19-command-line-optins has a few tests, but we could probably use more | 15:38 | |
moritz | psch: those are only very basic, and only for rakudo's interpretation of built-in options, not for the general mechanism | ||
psch | 04-negation.t seems rather mechanism-oriented to me | 15:39 | |
although the message for the first one seems to be wrong, it's help and not stagestats | 15:40 | ||
moritz | psch: maybe I should rephrase | ||
psch | moritz: the parser should probably be tested in isolation though, i think that's what you mean | 15:41 | |
moritz | psch: the tests in roast are integration tests. But the command line parser is isolated enough to warrant unit tests, IMHO | ||
yes | |||
psch: one more piece of small-scale feedback: why does the new class inherit from HLL::CommandLine::Parser? what functionality does it reuse? | 15:42 | ||
dalek | ast: 926a7fa | ab5tract++ | S0 (2 files): something like mixes working |
15:43 | |
ast: e9b66c3 | ab5tract++ | S03-operators/mix.t: getting closer: |
|||
ast: 8646069 | ab5tract++ | S03-operators/ (2 files): a bit closer every day |
|||
ast: 1090421 | ab5tract++ | S03-operators/set.t: I do not see a way around returning Bag, nor do I see a reason why the order of the subtraction should determine it's type (really this needs to be consistent, as already discussed in my PR for sane promotion of set types) |
|||
ast: 6df4ae1 | ab5tract++ | S03-operators/mix.t: Mixes now have first class support in the operators |
|||
ast: 50c7fb6 | lizmat++ | S0 (4 files): Merge pull request #52 from ab5tract/555/quanthashy_ops Add a mix.t test |
|||
15:44
virtualsue joined
|
|||
psch | moritz: iirc the inheritance was for polymorphism reason - less reuse of features but fitting into the same spot | 15:44 | |
moritz: i'd have to dig to see if i misthought that though | |||
moritz | psch: since the code that uses the CLI parser doesn't have any type constraints, there's no need for inheritance to achieve polymorphism | 15:45 | |
(and if it were using type constraints, it would be better to constrain to a common interface role) | |||
brrt | spectest has set/bag confusion | 15:48 | |
psch | moritz: true. apparently the inheritance isn't neccessary. it might be an artifact from trying to extend the current mechanism in HLL::CommandLine::Parser to handle delimited options from before i decided to implement it via a grammar | ||
moritz: removing the inheritance fails with missing method 'stop-after-first-arg' | 15:55 | ||
moritz: i think that means the interface role should be implemented... :) | 15:56 | ||
moritz: i'll have a closer look again during next week, don't really have time right now. i'm fairly sure i can clean it up at least a bit | |||
brrt | SO3-operators/set.t | 15:57 | |
16:00
scsix joined
16:05
jluis left,
berekuk left
|
|||
novice666 | m: ++$++ | 16:06 | |
camelia | rakudo-moar 2aef1f: OUTPUT«Cannot assign to an immutable value in sub postfix:<++> at src/gen/m-CORE.setting:4975 in block <unit> at /tmp/AXtqwobfez:1» | ||
dalek | ecs/newio: c1656c4 | lizmat++ | S16-io.pod: Some elaboration about classes |
||
lizmat | brrt: set/bag confusion noted, but I'm not sure what the right answer is there (anymore) | 16:07 | |
yoleaux | 15:08Z <ab5tract> lizmat: check out github.com/perl6/roast/pull/52/files for the mix.t .. and checkout out github.com/rakudo/rakudo/pull/335 for what i think about `Set (-) Bag ~~ Set` ;) | ||
novice666 | moritz: ++$++ OUTPUT«Cannot assign to an immutable value | ||
lizmat | brrt: my feeling is that we should keep as much information as possible | ||
16:09
Sir_Ragnarok left
16:12
berekuk joined
16:18
Sir_Ragnarok joined,
raiph left,
broski left
16:20
denis_boyun_ joined
|
|||
moritz | novice666: $++ returns a value, not a variable | 16:22 | |
novice666: so you can't prefix-++ it anymore | |||
16:23
berekuk left
|
|||
moritz | psch: well, as I said before, wait with cleanup before you've got a general approval; otherwise it's sunk effort | 16:24 | |
psch | moritz: right, i'll do it like that :) | 16:25 | |
dalek | kudo/newio: f3a420f | lizmat++ | src/core/io_operators.pm: dir(...., :absolute) is no more |
16:31 | |
colomon | moritz: just moved SmokeResults to perl6-community-modules | 16:35 | |
moritz | colomon++ | 16:37 | |
colomon: did you see my email about where to sync the results to? | |||
lumimies | moritz: So why does that error mention postfix:<++>? | 16:41 | |
moritz | m: (++$)++ | ||
camelia | rakudo-moar 2aef1f: OUTPUT«Cannot assign to an immutable value in sub postfix:<++> at src/gen/m-CORE.setting:4975 in block <unit> at /tmp/PcNrC5qUma:1» | ||
moritz | m: ++($++) | 16:42 | |
camelia | rakudo-moar 2aef1f: OUTPUT«Cannot assign to an immutable value in sub prefix:<++> at src/gen/m-CORE.setting:4967 in block <unit> at /tmp/epVjkDbOBB:1» | ||
moritz | lumimies: seems neither returns a container | ||
lumimies | moritz: I thought ++$ would | ||
lizmat | $ perl -e '++$a++' # syntax error at -e line 1, near "$a++" in P5, maybe we need that in P6 as well ? | 16:45 | |
moritz | lumimies: I thought so too, but it doesn't | ||
16:45
Alina-malina joined
16:48
berekuk joined
16:51
kaare__ left
16:53
telex left
16:54
telex joined
16:59
mayuresh joined
|
|||
mayuresh | p6: say 3; | 17:00 | |
yoleaux | 6 Dec 2014 18:28Z <psch> mayuresh: github.com/BizarreCake/Arane is the previous project i mentioned. it's written in C++11 though, not C89 | ||
camelia | rakudo-{parrot,moar} 2aef1f: OUTPUT«3» | ||
dalek | kudo/newio: a20bee0 | lizmat++ | src/core/ (9 files): Match end of FILETEST to case of -x file tests To easier allow extension to uppercase -x file tests |
||
mayuresh | cool :) | 17:01 | |
17:01
zakharyas left
|
|||
mayuresh | psch: it's worth it, don't stop, do complete it :) | 17:01 | |
i am going to be working on p6 interpreter because; | 17:02 | ||
1. it's a rite of passage for my cs education | |||
masak | lizmat: the table at the top of S03 has the "Autoincrement" level as being non-associative, which would mean that `++$a++` is indeed a syntax error. | ||
mayuresh | 2. i really admire mr. wall's work | ||
okay, ubuntu just installed updates, needs to restart my computer! | 17:03 | ||
dang, also time for me to hit bed. | 17:04 | ||
masak | mayuresh: if you want inspiration for an interpreter of a language a little bit like Perl 6 -- but much smaller -- do check out masak.github.io/007/ | ||
mayuresh | thanks psch :) | ||
masak: i have been told to write a scheme r4rs interpreter first | 17:05 | ||
then go for any language of my choice | |||
chose perl6. :) | |||
17:05
frew joined
|
|||
psch | mayuresh: that's not my project | 17:05 | |
mayuresh | psch: oh, sorry | ||
you just pointed it out to me! thanks. :) | |||
alrighty, see you all later. | 17:06 | ||
17:06
mayuresh left
|
|||
dalek | kudo/newio: 5cce0e9 | lizmat++ | src/core/IOU.pm: Make error reporting more sturdy, jnthn++ |
17:07 | |
colomon | moritz: saw it but hadn't yet fully grasped that I needed to do something to make it work. moritz++ | 17:09 | |
17:10
slavik1 left,
araujo left
17:11
araujo joined,
molaf__ left
|
|||
dalek | kudo/newio: 94bd202 | lizmat++ | src/core/io_operators.pm: Make single mkdir($path,$mode?) return Bool again |
17:19 | |
lizmat | .tell jnthn looks like nqp::mkdir on moar doesn't fail if the actual mkdir fails, it does on parrot and jvm | 17:25 | |
yoleaux | lizmat: I'll pass your message to jnthn. | ||
17:25
slavik joined
|
|||
b2gills | `int` is defined as being the largest integer that runs at full speed. Which means it can be 64-bit on a 32-bit machine ( the Pentium processor may be an example ) or even 32-bit on a 64-bit machine ( I doubt there were any in general use, if indeed they exist at all ). | 17:34 | |
17:42
denis_boyun_ left
|
|||
lizmat | .tell jnthn or perhaps I'm not understanding fail() correctly :-( | 17:46 | |
yoleaux | lizmat: I'll pass your message to jnthn. | ||
geekosaur | I think there were some transitional 32/64 RISC architectures, all of course pretty much dead | 17:49 | |
colomon is getting completely lost in a maze of p6c.org machines and accounts | 17:59 | ||
moritz++ | |||
18:03
zakharyas joined
18:13
FROGGS_ joined
18:16
Sqirrel left
18:17
FROGGS__ left
|
|||
b2gills | I think there should be a native type that is defined as being the same size as a far pointer. ( most processors now have the same size for far pointers and near pointers ) | 18:18 | |
18:24
mvuets joined,
Ugator joined
|
|||
b2gills | There are near-pointers, far pointers, maximum full speed integers, bus-width, and architecture. There is not necessarily any correlation among them. The Maximum full speed integers is most likely the same as the largest of the rest of the set, but it can also be smaller. ( It is always the same as at least one of the others I think ) | 18:30 | |
18:31
zakharyas left
|
|||
dalek | kudo/nom: 319c9c3 | lizmat++ | src/core/Str.pm: Make Str.Bool between 2.5x and 4x as fast |
18:32 | |
colomon | moritz: I updated the authors file and now it's completely borked. I'm more than a little bit puzzled by this. | 18:37 | |
moritz: I'm trying out running a smoke test on hack.p6c.org at this very moment. | |||
b2gills | x64 processors start out in 16-bit mode which has 16-bit near pointers, and 32-bit far pointers. To get to 32-bit mode you have to do a 32-bit jump ( typically to the next instruction ). At that point both pointer types are 32-bits, but allows 64-bit integer math. I'm not sure how you get to 64-bit mode but I think it's a similar operation. At that point the pointers and max integer math are all 64-bit. ( I may have been confused about somet | 18:39 | |
At any rate 64-bit mode is the only mode in x86 processors where near pointers, far pointers, and the largest full-speed integer size are all the same. | 18:41 | ||
timotimo | cool, lizmat | ||
18:44
brrt left
18:45
scsix left
|
|||
b2gills | ( except for some 32-bit processors which didn't have native 64-bit integers. I think the 80286 was an example ) | 18:45 | |
18:53
dj_goku_ left
|
|||
flussence | .oO( why didn't 64-bit use 32-bit near pointers? We could've avoided that x32 thing entirely... ) |
18:54 | |
19:02
dj_goku joined
19:04
rindolf left
19:14
raiph joined,
Alina-malina left
19:17
xfix left
19:18
berekuk left
19:21
kjs_ joined
|
|||
b2gills | Because 32-bit and 64-bit x86 processors use virtual addressing, all programs have access to what they "think" is all of the memory of the computer ( possibly to even more memory than is actually installed with page swapping ). There is little point to have different near pointers and far pointers when two pages that seem to be far apart, may in fact be right next to each other in RAM. It also probably simplified the logic in the processor f | 19:24 | |
Also since 32-bit had the same size for near and far pointers, it makes little sense for AMD to have added that to 64-bit mode. | 19:26 | ||
19:28
Sqirrel joined
19:30
konsolebox left
19:37
kjs_ left
19:40
jakesyl_insomnia left
19:42
jakesyl_insomnia joined
|
|||
moritz | 19:42 | ||
19:43
[Sno] joined
19:47
sirdancealot left
19:52
kaare__ joined
20:02
FROGGS_ left
|
|||
dalek | ast: c8e2a0c | usev6++ | S12-enums/misc.t: Add test for RT #123114 |
20:02 | |
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123114 | ||
20:02
FROGGS_ joined
20:07
Mouq joined
20:15
darutoko left
|
|||
masak | b2gills: in what situations would it be useful to have a native Perl 6 type the size of a far pointer? | 20:21 | |
20:39
denis_boyun_ joined
20:48
spider-mario left
20:49
raiph left
20:50
spider-mario joined
20:54
kurahaupo1 joined
20:56
brrt joined
|
|||
avuserow_ | Hi all. Is there any way to get logs for a module's test failures on smoke.perl6.org? | 20:58 | |
20:59
mvuets left
|
|||
avuserow_ | I'm trying to get Compress::Snappy to passing, and I'm not able to reproduce the failure locally, so I wonder if its C library isn't installed | 20:59 | |
21:03
kurahaupo1 is now known as kurahaupo,
[Sno] left
|
|||
brrt | lizmat - seems mkdir fails for me (linux) | 21:03 | |
FROGGS_ | avuserow_: you'd have to ask colomon | ||
21:03
[Sno] joined
21:05
virtualsue left
21:06
raiph joined
21:09
kjs_ joined
|
|||
b2gills | Masak: for NativeCall on 32-bit x86 processors where `int` should be a 64-bit type | 21:11 | |
masak | oh, nativecall. | 21:12 | |
that makes sense. | |||
21:13
kjs_ left
|
|||
arnsholt | ATM int is int64_t on all platforms, IIRC | 21:15 | |
21:15
broski joined
|
|||
brrt | b2gills - i'd argue if possible against a lot of effort for 32 bit x86 | 21:18 | |
21:21
kjs_ joined
21:22
raiph left
21:31
raiph joined
21:32
kjs_ left
21:33
raiph left
|
|||
ugexe | is 'or' supposed to be required to be on the same line as a closing bracket? try { say 1 } or die; says undeclared routine 'or' if there is a line break before the 'or' | 21:38 | |
lizmat | ugexe: I guess that's a consequence of the fact that a closing curly brace at the end of the line signifies end of statement | 21:40 | |
vendethiel | no, that's why we have semicolons | ||
mmh | |||
21:40
kurahaupo left
|
|||
FROGGS_ | lizmat is right | 21:41 | |
m: my $h = { a => 42 }say $h | |||
camelia | rakudo-moar 319c9c: OUTPUT«a => 42» | ||
lizmat | m: try { say 1 }; or die # same error | ||
camelia | rakudo-moar 319c9c: OUTPUT«===SORRY!=== Error while compiling /tmp/TAQhWubnjAUndeclared routine: or used at line 1. Did you mean 'on'?» | ||
FROGGS_ | m: try { say 1 }\or die | 21:42 | |
camelia | rakudo-moar 319c9c: OUTPUT«1» | ||
dalek | kudo/nom: 98b23d6 | lizmat++ | src/core/Str.pm: Make smartmatch on Str about 40% faster |
||
FROGGS_ | you can unspace it though if you want | ||
ugexe | aha cool | 21:43 | |
FROGGS_ | m: try { say 1 } \or die # I'd probably put another space there... I do like whitespace :o) | 21:44 | |
camelia | rakudo-moar 319c9c: OUTPUT«1» | ||
b2gills | brrt: You're assuming that's the only architecture that we may want to support where the pointer size is something other than the largest full speed integer (`int`) | ||
broski | i have some questions, may sound total noobe but I'm curious | 21:45 | |
brrt | no, i'm assuming that if we want to get 6.0 out the door, supporting umpteen different architectures while everybody's running x64 may be a distraction :-) | ||
although the fact that we're talking about it is a pretty good sign | 21:46 | ||
b2gills ^ | |||
broski: fire away :-) | |||
broski | :D | ||
timotimo | heyo brrt | ||
brrt | \o timotimo | ||
broski | brrt: wondering, why are there choices for different backends | ||
brrt | you on #moarvm? could you possibly comment on the repr op devirt issues | ||
that's a good question broski :-) | 21:47 | ||
basically we distinguish between perl6-the-language and perl6-the-compiler | |||
FROGGS_ | broski: rakudo started with only one backend (Parrot), but the goal was to support several, like the JVM to get a foot in that market | ||
brrt | and there have been many compilers | 21:48 | |
timotimo | today i've been wondering, idly, about how to build stuff like "first we look for this constant string that we know follows after a known-length regex, and then we skip back a bit and match the other stuff in the regex" | ||
21:48
Alina-malina joined
|
|||
FROGGS_ | broski: and when Parrot still was too slow and now sign of major improvements were seen, MoarVM was started to please rakudo's needs | 21:48 | |
brrt | basically, each backend has a different stability / feature profile | 21:49 | |
broski | i see | ||
Mouq | timotimo: I was also wondering last week if there was an opt we could do, where if we see /…foo$/ we could just skip to the end of the string | ||
FROGGS_ | broski: you could watch this: www.youtube.com/watch?v=XgPh5Li3k4g | 21:50 | |
timotimo | ah, yes indeed | ||
Mouq: if you want, go ahead ;) | |||
FROGGS_ | broski: also, here is a nice collection: www.youtube.com/watch?v=YW75CXY-P3...FwobZHdXdK | 21:51 | |
21:51
donaldh joined
|
|||
Mouq is still trying to figure out QRegex and repr AST :P | 21:52 | ||
timotimo | "repr AST"? | ||
Mouq | s/AST/NFA | ||
timotimo | oh, hehe. | ||
Mouq | Too many acronyms man | ||
timotimo | TMAM | ||
Mouq | :9 | ||
timotimo | well, as long as you don't invent new types or subtypes for regexes, you don't need to do anything with the NFA generator/runner | 21:53 | |
broski | those are great resources, thanks, they are bookmarked | ||
^^ FROGGS_: | |||
FROGGS_ | :o) | ||
donaldh | In NQP, is it possible for a role's method to call the method it replaces on the class the role gets applied to? | 21:54 | |
Mouq | timotimo: I do think it would be much less misleading if we called QRegex::NFA QRegex::NFAGenerator or the like | ||
org.perl6.nqp.qregex.nfa.factory | 21:55 | ||
donaldh | Specifically, QAST::Children.shallow_clone replaces QAST::Node.shallow_clone and I'd like to call the original. | ||
timotimo | that's in nqp? | 21:56 | |
donaldh | yep | 21:57 | |
timotimo | i know in perl6 you can specify precisely by putting the name of the class you want into the method name part | ||
not 100% sure what it looks like, haven't ever used it so far | |||
Mouq | foo.Class::bar, isn't it? | 21:59 | |
donaldh | so maybe self.QAST::Node::shallow_clone() ? | 22:00 | |
timotimo | that's what i thought | ||
22:03
raiph joined
22:04
lue left
22:05
kurahaupo joined
|
|||
dalek | kudo/nom: 04ce883 | lizmat++ | src/core/Str.pm: Make Int ~~ "a" silent and faster |
22:08 | |
22:08
berekuk joined
22:11
jack_rabbit joined
|
|||
dalek | kudo/newio: 574192c | ab5tract++ | src/core/set_operators.pm: on our way to first class hashes |
22:12 | |
rakudo/newio: a5a1832 | ab5tract++ | src/core/set_operators.pm: | |||
rakudo/newio: baggy handling of ops now takes mixes into account | |||
22:12
dalek left
|
|||
lizmat | sorry dalel | 22:13 | |
*dalek | |||
22:13
dalek joined,
ChanServ sets mode: +v dalek
|
|||
dalek | ecs/newio: 0e734c4 | lizmat++ | S32-setting-library/IO.pod: Got as far as mkdir() |
22:14 | |
22:18
lue joined
|
|||
FROGGS_ | donaldh: in nqp you'd do: nqp::findmethod(...)(args) | 22:18 | |
donaldh: grep for that | |||
timotimo | good point | 22:19 | |
FROGGS_ | the foo.class::routine doesn't work in nqp AFAIK | ||
donaldh | no it doesn't :) | 22:20 | |
FROGGS_ | and using findmethod you can provide an object and a type | ||
22:22
virtualsue joined
22:24
kurahaupo left
|
|||
donaldh | Hmm. findmethod only takes an object and a method name | 22:24 | |
timotimo | does findmethod return the invocable object or just the "slot number" or something? | 22:25 | |
22:31
colomon left,
jbotz joined
|
|||
donaldh | I suspect I am discovering why the code is the way it is. | 22:32 | |
jbotz | hello... | ||
newbie here... | |||
masak | welcome. | ||
jbotz | i'm studying, and I'm curious about something... | 22:33 | |
what should be the value of a for statement? | |||
masak | depends a little. | ||
jbotz | i.e. should "say for 1..5" output anything? | ||
masak | that doesn't mean what you think it means | 22:34 | |
jbotz | I don't think anything... | ||
lizmat | good night, #perl6! | ||
jbotz | but I saw this in the perl docs... | ||
timotimo | correct, this is a case of an "after statement" for loop | ||
jbotz | sub divisors (Int $n) { $_ if $n %% $_ for 1..$n } | 22:35 | |
brrt | good night lizmat | ||
timotimo | so it'll just do "say" the 5 times | ||
masak | except it's disallowed :/ | ||
jbotz | oh, got it | ||
timotimo | usually the result of a for loop is the list of what the last statement inside the for loop's block gives you | ||
22:36
kjs_ joined
|
|||
jbotz | ok, but the sub divisors doesn't work in rakudo | 22:36 | |
masak | no, it doesn't | ||
need parens around that statement | |||
used to work | |||
spec changed | |||
timotimo | good to know | ||
jbotz | ok, got it... with parens it works! | 22:37 | |
timotimo | please provide a link to where you found that so we can fix it | ||
raiph | m: for Array.new(1,2), Buf.new(1,2) { say .WHAT } # rakudobug? specbug? | ||
camelia | rakudo-moar 04ce88: OUTPUT«(Int)(Int)(Buf)» | ||
timotimo | m: say Array ~~ Iterable; say Buf ~~ Iterable | ||
camelia | rakudo-moar 04ce88: OUTPUT«TrueFalse» | ||
timotimo | m: say Array ~~ Positional; say Buf ~~ Positional | 22:38 | |
camelia | rakudo-moar 04ce88: OUTPUT«TrueTrue» | ||
raiph | a Buf is a role, whereas an Array is a class | ||
timotimo | so ... ? | ||
masak | raiph: for all I know it's correct | ||
jbotz | timotimo: doc.perl6.org/type/Signature | ||
the part about type constraints | 22:39 | ||
masak | jbotz++ | ||
timotimo | heh. in a totally unrelated chapter of the docs it b0rks :\ | ||
it's hard to keep all the docs up to date to every change :( | 22:40 | ||
anyway, it's bedtime for me now | |||
good night :) | |||
raiph | timotimo: I was asking why Array does Positional as I'd expect but Buf doesn't, even though it `does Blob` which `does Positional` | 22:41 | |
22:41
kjs_ left
22:44
BenGoldberg left
22:54
kurahaupo joined
|
|||
brrt | TimToady's talk has been moved to sunday? | 22:54 | |
22:56
BenGoldberg joined
|
|||
masak | 'night, #perl6 | 22:56 | |
b2gills | jbotz: `.say for 1..5` is another way of writing `for 1..5 { .say }` ( copied from Perl5 ) | 23:00 | |
The `.say` is short for `$_.say` | |||
or `say $_` | 23:01 | ||
23:02
brrt left
|
|||
b2gills | jbotz: That sub could have been written: `sub divisors (Int $n){ (1..$n).grep( {$n %% $_} ) }` | 23:05 | |
broski | just read about junctions | 23:19 | |
m: sqrt(4|9|16).say | 23:20 | ||
camelia | rakudo-moar 04ce88: OUTPUT«any(2, 3, 4)» | ||
broski | nice | ||
23:21
telex left
23:22
telex joined
|
|||
broski | I have a question! | 23:28 | |
23:33
spider-mario left
23:34
broski left
|
|||
FROGGS_ | broski: just ask... someone will reply, even when not immediately | 23:43 | |
23:50
jbotz left
23:53
Ugator left
23:58
denis_boyun_ left
|