»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! | tinyurl.com/p6contest
Set by moritz_ on 28 December 2010.
sbp rakudo: Array.^methods 00:00
p6eval rakudo : ( no output )
sbp rakudo: say Array.^methods
p6eval rakudo : OUTPUT«newat_posperlsplicedeletenewCaptureeagerelemsflatiteratorlistmunchBoolNumStrexistsfmtmapperlreverserotatesortpoppushshiftunshiftACCEPTSat_poshashofitemNumericIntNumStrelemsfmtlistNumericRealIntRatNumabsexploglog10sqrtrootsto-radiansfrom-radiansfloorceilingroundtruncatesigncisunpola…
masak rakudo: say ~Array.^methods(:local)
p6eval rakudo : OUTPUT«new at_pos perl splice delete␤»
masonkramer what receives the dispatch? What's the class implementing Array?
*metaclass 00:01
masak right. Array.^methods is really Array.HOW.methods
Array.HOW accesses the metaclass object of Array.
this object knows about how Array is implemented; parents, methods, attributes... 00:02
masonkramer rakudo: say ~Array.HOW
p6eval rakudo : OUTPUT«Method 'Str' not found for invocant of class 'ClassHOW'␤ in main program body at line 7369:CORE.setting␤»
sbp rakudo: say Array.HOW
p6eval rakudo : ( no output )
masak that 'ClassHOW' there is a clue. 00:03
sbp say Array.CLUES
masak Rakudo implements metaclass objects with ClassHOW, written in nqp. 00:04
jnthn++ is working on better, more strangely-loopy implementations with 6model.
00:04 kst joined, Chillance left 00:05 dukeleto left 00:06 dukeleto joined
diakopter rakudo: say (~(Array.^methods(:local))) 00:08
p6eval rakudo : OUTPUT«new at_pos perl splice delete␤»
masak rakudo: say ~Array.^methods: :local 00:09
p6eval rakudo : OUTPUT«new at_pos perl splice delete␤»
diakopter neat
masak I still remember the groans I inadvertently caused during szabgab's Perl 6 Beginners' course at YAPC::EU 2009. 00:10
00:11 patspam joined, patspam left
masak I said something like "that's not an adverb colon, that's an invocant colon". people looked like their mental stacks were blown. 00:11
GinoMan tilts his head, a bell chimes once, then smoke comes out of his ears 00:13
diakopter has to wonder about language implementations (currently mine/perlesque) that have typed closures working before if-statements
masak neat.
no harm in having an unorthodox set of focal points, if you ask me. 00:14
diakopter I'll add it to p6eval soon.. to replace the old perlesque that generated its own grammar/compiler upon every invocation
this one uses an ANTLR-generated lexer/parser
masak you seem to be iterating your way through parsing techniques. 00:15
diakopter true.
sbp you can probably model if-statements in typed closures if you think hard enough
diakopter hee
no, there's no comparisons/bools really at all 00:16
only declarations and assignment and more assignment and invocations
masak but we weren't talking about comparisons/bools -- we were talking about if statements :P
diakopter goes to add comparisons and if
00:17 felliott joined
diakopter yeah but if statements needs bools, which need comparisons (why test boolean of a constant) or variables that change until a termination point 00:18
anyway, these are all quite quick to add
GinoMan why not just borrow perl5's if-statement model 00:19
lue hello fellow citizebras o/ 00:20
masak diakopter: what GinoMan said, kinda. if statements don't need bools, only something that can be construed as false and non-false.
00:21 kst left
masak diakopter: and bools don't need comparisons, as long as there is *some* way to produce bools. 00:21
00:21 kst joined
masak but I'm splitting hairs here. 00:21
diakopter those poor hairs 00:22
00:22 Chillance joined 00:23 silug left
diakopter "... quite quick to add..." (because ANTLR and runsharp (and perlesque's infinitely-flexible compilation/execution model) make it so darn easy) 00:23
I'm going to start thinking of/describing perlesque as a much more powerful/expressive PIR
00:25 cdarroch left
lue masak: I drew those diagrams up without knowing the tuning fork metaphor existed. 00:26
pmurias: I know it only applies if it is invoked as `perl', but 1) the spec doesn't clarify this point 2) How would a program be able to tell what you typed to call it? [ It may be that I simply don't know :) ] 00:28
masak lue: yes, I guessed that. nice to see someone else blog about it. 00:29
00:30 envi joined
masak lue: S01:105: "The perl interpreter will assume that it is being fed Perl 5 code" -- there it is, clarified, right there. 00:30
it's easy to miss, though. the operative words are "the *perl* interpreter" -- i.e. not the perl6 interpreter or the niecza interpreter... 00:31
lue There, I read the word 'perl' as referring the language [e.g. an interpreter of perl], not the program name, although it is all lowercase [e.g. the interpreter invoked with the command `perl'] 00:33
Well, like I said earlier, it's a very interesting history :) 00:36
00:41 cognominal joined
diakopter masak: but that just doesn't sound right 00:44
b/c a perl6 interpreter or the niecza interpreter can also be the "perl interpreter" 00:45
hence my request for clarification
lue I would say that in any case, the spec needs changing to reflect the times.
diakopter yes, it's technically correct
maybe I shouldn't ask for clarification. Perhaps I should ask more for elucidation. 00:46
lue My question is this: would anyone who started a Perl 6 interpreter today want to have their program install as `perl'?
diakopter I agree with lue when he says "pmurias: I know it only applies if it is invoked as `perl', but 1) the spec doesn't clarify this point" except I'd replace "clarify" with "emphasize" 00:48
in other words, it's that phrase "the perl interpreter" that trips us up.
masak agreed. 00:49
less ambiguity in the spec can only be a good thing.
diakopter (b/c it can be installed as both "perl" and "niecza/pugs/rakudo/sprixel/etc")
lue Maybe "if a Perl 6 interpreter is installed as `perl',..." ?
masak and Perl 6 installing as `perl` may or may not be a breach of the Two-Languages-One-Family agreement. 00:50
lue I'm just wondering, is this P5-by-default even an *issue* anymore? 00:52
diakopter masak: that brings up a good question - does that agreement jive with the spec, in all realistic-ness? I mean, can a p6 impl ever hope to truly implement all of (or embed) p5 while also making that p5 able to be updated/used *as p5* ? 00:53
masak lue: not for me ;)
colomon certainly not an issue for now
actually, in retrospect, sort of a bizarre issue to have worried about in the past. 00:54
masak diakopter: I think we should neither blind ourselves with idealism ("Perl 6 will implement Perl 5, too!!!"), nor let ourselves be limited by current tech ("Perl 6 will never implement Perl 5, so there!!!")
00:55 smash left
masak the focus has certainly moved *away* from p5p6-compat in the past few years, yes. 00:55
it used to be a big selling point. 00:56
colomon what strikes me as weird about it is it doesn't seem to sit well with the "perl 5 is defined by an implementation but p6 is defined by a spec" thing.
masak just look at dev.perl.org/perl6/doc/design/exe/E02.html : "In fact, that's only 40 characters (out of 1779) from being pure Perl 5. [...] 98% backwards compatibility even without an automatic p52p6 translator...pretty slick!" with the addendum "[Update: Well, it's not quite that backward compatible anymore.]" 00:57
E02 is from May 2001.
colomon Were people seriously thinking there would be one interpreter, whose behavior on the one hand would be bug-compatiability with p5 and on the other hand spec-compatiability with p6? That seems like a very weird notion. 00:58
masak colomon: last YAPC::EU, I seriously toyed with the idea of resurrecting Ponie in today's Parrot environment. 00:59
colomon: but I think that idea is a year or two too early.
and it'd need serious backing from the Perl 5 world to even have a shot at success.
00:59 QinGW joined
masak looks at what he wrote and decides to write "serious" one more time 01:00
hm. sleep beckons. 01:01
'night, zebras.
lue I personally don't think a P6 interpreter should be forced to interpret P5 at all. It just seems like that says "Perl 6 is going to break compatability with Perl 5, cos that's one of it's design goals for progress! Unless, of course, you don't like change, here, have a nice use v5; block."
gnight o/
01:02 jhuni joined
masak lue: the spec simply permits v5 integration. 01:02
01:02 masak left
lue Yeah, I'm just not so sure of it being a good idea. Of course, I haven't been around long, and I've never used Perl 5, so my views are biased :) 01:05
I don't think it's the time to argue about P5 support, although I do believe the P5-by-default feature should be removed. 01:10
sorear good * #perl6 01:11
colomon \o
lue hello o/ 01:14
colomon rakudo: say 4 ~~ any (1, 3, 4, 5)
p6eval rakudo : OUTPUT«Bool::True␤»
mdxi wonders *which* Perl 5 masak would implement -- there's an irritating amount of distro-based fragmentation going on since 5.10 :-/ 01:16
01:16 masonkramer left, masonkramer joined
mdxi if you're on RHEL it's more like "Three Languages, One Family" with 5.8.8 being the one Old Woman Redhat keeps locked in the upstairs bedroom, that the rest of the family whispers about. 01:18
01:18 redicaps joined 01:22 xinming left 01:24 rhr left 01:30 rhr joined, MayDaniel left 01:33 icwiener left 01:50 x19290 joined
x19290 hello. 01:51
I'm using rakudo-star-2010.11.
I posted following message to perl6-{language,users}@perl.org
----
Hello.
01:51 x19290 left, x19290 joined
x19290 Hello. 01:52
?
colomon hello? 01:53
01:53 x19290_ joined, x19290_ left
sjohnson hi 01:53
pastebin would have saved his connection 01:54
colomon ah
x19290 Hello again. 01:55
01:55 roen joined
x19290 I'm using rakudo-star-2010.11. 01:55
I posted following message to perl6-{language,users}@perl.org
----
Hello.
colomon posting messages here won't work.
x19290 Thanks.
My problem was, 01:56
my $h = open '/dev/urandom', :r
loop (;;) {
$h.getc;
}
colomon oh, that message 01:57
x19290 spits Malformed UTF-8 string error.
Andrew Whitworth
told me to open a ticket at trac.parrot.org.
Moriz told me
it can be fixed by 01:58
my $h = open '/dev/urandom', :bin;
$*OUT.write: $h.read(10)
But Moriz's code spits same UTF-8 error.
So I'm planning to open a ticket at trac.parrot.org but 01:59
01:59 Eth4n joined
x19290 I'm so novice to do this. 01:59
Any idea?
Thanks.
colomon Does it spit out the error if you leave out the $*OUT part -- that is, if you just read the file without writing it out again?
x19290 Without $*OUT part, same error. 02:00
colomon okay 02:01
anyone out there have advice on reporting Parrot bugs? 02:02
(though the most straightforward but least directly helpful suggestion might be to check on #parrot instead.) 02:03
sorear go to trac.parrot.org, follow directions
colomon that's on irc.perl.org, rather than freenode. 02:04
sorear: I don't see any obvious bug reporting directions there.
02:04 noganex_ joined
sorear colomon: it would be spelled "new ticket" 02:04
02:04 rgrau left
sorear pmurias-- # "it doesn't compile". It would help if I knew the error, and a paste that expired in <24h isn't good enough 02:05
colomon sorear: trac.parrot.org/parrot does not contain the phrase "new ticket" when I load it.
02:05 Eth4n left
x19290 PARROT-SRC/parrotbug? 02:06
02:06 Eth4n joined
colomon sorear: it's almost like they don't actually want people reporting bugs... 02:06
sorear colomon: it does for me. did you remember to log in? 02:07
02:07 noganex left
colomon you have to log in to get instructions on reporting bugs?! 02:07
x19290 so how to create my account?
sorear "Register" 02:08
colomon: welcome to the 21st century. spammers love Trac. 02:09
I'm not happy about it either
x19290 I clicke "Register" and 02:10
get trac.parrot.org/parrot/parrot/register Not Found
colomon that's serious suckage compared to "Bugs can be submitted by sending an email to [email@hidden.address]
sorear "... and waiting two weeks for our overworked moderators to catch up with the queue."
x19290 again how about PARROT-SRC/parrotbug? 02:12
flussence oh, the age-old problem of letting people in but keeping spambots out... :(
sorear x19290: I recommend asking #parrot
x19290 ok i will join #parrot 02:13
Thanks.
Bye
02:13 x19290 left 02:28 lidden left 02:30 silug joined 02:37 Alias_ joined 02:48 Eth4n left 02:54 agentzh joined 02:55 zorgnax joined, a2n joined 02:56 a2n left 03:01 shi left 03:04 Eth4n joined
[Coke] email does work. 03:13
You can open a new parrot ticket by emailing tickets at parrot.org 03:15
03:40 lichtkind left 03:44 felliott left 03:51 araujo left 03:57 jimmy1980 joined 03:59 jimmy1980 left 04:04 jimmy1980 joined 04:08 jimmy1980 left 04:09 jimmy1980 joined 04:25 fith joined 04:45 GinoMan left 04:48 orafu left, OuLouFu joined, OuLouFu is now known as orafu 05:03 Tedd1 left 05:13 jimmy1980 left 05:20 _twitch joined 05:23 araujo joined, araujo left, araujo joined 05:26 awwaiid left 05:51 [Coke] left 05:58 kaare joined, kaare is now known as Guest13706 06:03 cjk101010 joined, Guest13706 is now known as kaare_ 06:10 araujo left 06:22 yarrak left 06:24 Gryllida joined, Agu10_ joined
Agu10_ hi 06:24
Gryllida Agu10_: jenk gave wrong advice 06:25
...
06:25 araujo joined, araujo left, araujo joined
Agu10_ oh 06:25
Gryllida, are you sure?
Gryllida, I'll just try
Gryllida yes.
jenk my mistake
Gryllida no.
Agu10_ I'll just try and
we'll se
Gryllida no...
It's a Perl language channel.
Agu10_ uh? who should I trust?
sorear Who is jenk?
Gryllida the /topic
sorear What is happening?
Gryllida sorear: jenk told Agu10_ it's #flood-like channel 06:26
sorear jenk isn't in the /topic
Gryllida Agu10_: when in doubt, just stay within the /topic
Agu10_ Gryllida, it does not say wht I can or cannot do
Gryllida Agu10_: flooding at #flood is ok, obviously :)
Agu10_ ok
Gryllida, thanks, I'll do that
Gryllida Alright. 06:27
Agu10_ and where to troll?
06:27 Agu10_ left 06:28 Gryllida left 06:59 gimix joined 07:04 meteorjay joined 07:17 Tedd1 joined 07:21 tobar joined
sorear TimToady: ping (following comments) 07:22
while trying to convert niecza to store only one copy of the symbol table, I ran into an inconsistancy with STD and the specs
consider 'module Foo; sub bar is export {}'
STD currently creates UNIT::EXPORT::DEFAULT::bar, which is not accessible from GLOBAL
S11:89 says that Foo::EXPORT::DEFAULT::bar should be created 07:23
dalek ecza: 00b8bdc | sorear++ | src/ (2 files):
Derive STD syml from Niecza tables instead of saving both
07:37
07:38 fhelmberger joined 07:39 fhelmberger_ joined, fhelmberger left
sorear TimToady: What is the semantic difference between STD.is_known and STD.is_name ? 07:43
07:52 LeifD joined 08:07 bacek left 08:09 Chillance left 08:14 justatheory left 08:21 snearch joined 08:23 soroush_ joined 08:24 soroush left
moritz_ good morning 08:31
sorear hello moritz_ 08:33
VXZ g'mornin
08:35 noganex_ is now known as noganex
tadzik o/ 08:36
08:44 Alias__ joined, tobar left 08:45 kst` joined 08:47 __rnddim__ joined, LeifD left, Alias_ left, dukeleto left 08:48 bartolin joined 08:50 kst left, lue left 08:56 ponbiki joined 08:59 elb0w joined, dukeleto joined 09:00 LeifD joined 09:11 jhuni left 09:20 am0c joined 09:22 roen left 09:40 xinming joined 09:41 am0c^ joined 09:43 redicaps left, am0c left 09:46 am0c^ left 09:47 glow joined
dalek ecza: 7ab22da | sorear++ | src/ (3 files):
Reload module info from nam files. Remove storable dep.
09:49
diakopter sorear: does niecza do labels/gotos 09:51
sorear only at the codegen level 09:52
&goto isn't available, but regex code desugars to use goto/labels
diakopter i'd test it with p6eval, but that seems broken at the moment
dalek rixel: e0ff4d4 | diakopter++ | / (9 files):
if/unless/elsif/else lexical blocks working. no return values for those blocks, though, 'cuz I'm a hater. now for labels/gotos.
09:53
09:58 dukeleto left 09:59 dukeleto joined
dalek ecza: 7c0434c | sorear++ | src/CompilerDriver.pm:
Do not load dependant modules more than once
10:03
sorear out
diakopter cya 10:04
10:06 QinGW left
dalek rixel: c2eb6f7 | diakopter++ | / (6 files):
labels/gotos working :)
10:09
diakopter but no, one cannot goto from an eval EXPR to an outer label ;). cuz that would just be wrong. 10:23
10:32 bacek joined 10:34 am0c^ joined
TiMBuS is time not a sub 10:38
rakudo: say time
p6eval rakudo : OUTPUT«1293619113␤»
TiMBuS rakudo: say time()
p6eval rakudo : OUTPUT«Could not find sub &time␤ in main program body at line 22:/tmp/3o9S_u7lUE␤»
TiMBuS i uh
what is this wizardry
diakopter rakudo: say time 10:49
p6eval rakudo : OUTPUT«1293619765␤»
diakopter rakudo: say time.WHAT
p6eval rakudo : OUTPUT«Int()␤»
diakopter rakudo: say &time.WHAT
p6eval rakudo : OUTPUT«Could not find sub &time␤ in main program body at line 22:/tmp/HvI4mKeKGK␤»
dalek rixel: 67fc74f | diakopter++ | / (6 files):
implicitly typed lexical declaration/initialization (not actually type inference, it's really just magic).
10:53
10:55 Patterner left 10:56 Psyche^ joined, Psyche^ is now known as Patterner
dalek rixel: 89046db | diakopter++ | sprixel/Program.cs:
fix file invocation option
10:59
11:05 snearch left 11:07 Patterner left 11:22 rgrau joined 11:25 Demonen joined
Demonen Hi all. 11:26
I'm having truble finding precombiled rakudo binaries for Ubuntu 9.10. Is there such a thing? 11:27
11:29 ShaneC joined
diakopter seems unlikely 11:34
11:37 gimix left, ShaneC left
dalek rixel: f3bd3d0 | diakopter++ | sprixel/sprixel.csproj:
cut .dll references; more prep for p6eval. will need to upgrade mono on p6eval server to 2.8+
11:37
11:37 LeifD left
TiMBuS the only place i could think of finding one would be on launchpad 11:38
and a quick search there only finds a very old rakudo someone uploaded last year
11:39 bluescreen joined, bluescreen is now known as Guest72634 11:43 LeifD joined
TiMBuS rakudo: multi foo($a where {say 'hmm..'}){}; foo(1); 11:49
p6eval rakudo : OUTPUT«hmm..␤hmm..␤»
TiMBuS called twice? 11:50
11:54 wamba joined
colomon Don't put side effects in your where clauses. 11:59
I'm pretty sure there's no guarantee how often they will be called. 12:00
12:01 ShaneC joined 12:03 ShaneC left
colomon rakudo: multi foo($a where {say 'hmm..'}){}; multi foo($a where {say 'Boo!'; 0; }) {}; say "go"; foo(1) 12:10
p6eval rakudo : OUTPUT«go␤hmm..␤Boo!␤hmm..␤»
TiMBuS i dont even know how i got to this, i was just trying to figure out why a where cause would never fail when i smartmatched a param against an empty hash.. 12:15
colomon rakudo: my %h; say "ten" ~~ %h 12:16
p6eval rakudo : OUTPUT«Bool::False␤»
colomon rakudo: my %h; say Any ~~ %h
p6eval rakudo : OUTPUT«Bool::False␤»
TiMBuS yeah thats what im not understanding 12:17
colomon yeah, getting Bool::True there would seem very odd indeed.
12:18 coldhead left
TiMBuS multi method joined ( $ev where {$ev.who<nick> ~~ %messages} ) { 12:19
say $ev.who<nick>; #prints 'Clunky'
say %messages.perl; #prints '{}'
eeegh i think ill figure it out tomorrow. 12:20
12:20 noganex left 12:22 noganex joined 12:26 masak joined
masak greetings, zebras. 12:27
what in the name of Zarquon happened tonight to bring in so many newbies at once? 12:29
masak places his bets on Advent Calendar + vacation 12:31
there is also more activity on p6u.
12:32 nadim left 12:33 Psyche^ joined, Psyche^ is now known as Patterner 12:34 envi left 12:38 Patterner left 12:39 Psyche^ joined, Psyche^ is now known as Patterner 12:40 mtk joined 12:47 Patterner left 12:48 Psyche^ joined, Psyche^ is now known as Patterner 12:51 pmurias joined 12:53 nadim joined 12:58 [Coke] joined, am0c^ left 13:12 Patterner left
shortcircuit p6u? 13:12
13:14 daxim joined
shortcircuit masak: As a way to get a feel for developer perspectives, I mentioned the Perl 6 planet in a high-profile comment on the recent Slashdot article about Tim's advent post. 13:14
(For whatever definitions of 'high profile' remain in Slashcode, anyway)
masak shortcircuit: URL? 13:15
13:15 Psyche^ joined, Psyche^ is now known as Patterner
shortcircuit sec 13:15
masak Slashdot is an exercise in skewed perspectives, but any outlinks from it are a net win, if you ask me.
shortcircuit developers.slashdot.org/story/10/12...-With-Perl
shortcircuit nods 13:16
masak thanks.
13:16 masonkramer left
shortcircuit RC more or less debuted with a Slashdot post. I was on a 'shared hosting' account at the time. That was a pretty mess. 13:16
masak oh, that comment. yeah, I saw it. that might have contributed, true. 13:17
I would have made the connection if you hadn't referred to TimToady as "Tim" :P
shortcircuit Heh
frettled nice one :D
masak indeed. shortcircuit++
frettled "Which Tim, Berners-Lee or Toady?" 13:18
shortcircuit avoids pinging people, by default
masak why?
shortcircuit For whatever reason, most people I've encountered on IRC don't like to be pinged unless they need to respond. 13:19
shortcircuit shrugs 13:20
Anyway, it looks like the comment in which I linked to the planet isn't as highly-modded as I thought.
Er, yes it is, but I forgot to linkify the reference. -.- 13:21
I did specifically mention the IRC channel in another comment, though.
13:24 Alias__ left 13:25 dma joined, dma is now known as Guest11053, takadonet joined
takadonet hey 13:25
13:26 Patterner left
shortcircuit o/ 13:26
13:26 Guest11053 left
takadonet www.reddit.com/r/programming/commen...6_in_2010/ 13:27
our lovely troll HIBOU is back 13:28
masak I replied to him. 13:29
takadonet he replied to your reply...
masak I'm currently replying to Mr. "great way to make code unreadable" imperi 13:30
takadonet you have to work faster masak :) 13:31
masak :) 13:32
huf the language isnt readable without learning the language! what're we going to dooooooo?! 13:33
takadonet wow! lots of comments for only 4 up votes 13:38
masak www.reddit.com/r/programming/commen...10/c1apbzt 13:39
13:41 felliott joined, Psyche^ joined, Psyche^ is now known as Patterner
pmurias masak: why do you insist on replying to stupid people? 13:47
masak pmurias: because impressionable people are reading what they write. 13:48
what seems stupid to you may seem "hm, maybe he's right" to J. Random Redditer. 13:49
pmurias do we care about J. Random Redditer? ;) 13:50
masak as a potential lurker and reformed contributor on #perl6, sure.
13:50 Patterner left
masak responding to stupid criticisms might be the best chance at PR we get, besides the Advent Calendar and release announcements of different kinds. 13:52
diakopter agrees with masak 13:58
(at least until momentum gets huge)
pmurias any one knows a sensible FRP (decently documented) library in *any* language?
masak the *discussions* are often quite meaningless. but stepping up and defending Perl 6, the devs, or the community often isn't.
pmurias s/sensible//
masak Fibre-reinforced plastic? 13:59
Flint River Presbytery? 14:00
Federal Republic of the Philippines?
14:03 Psyche^ joined, Psyche^ is now known as Patterner
flussence I was thinking the best thing to do with all these people who criticise p6 without using it, is tricking them into using it 14:04
give them a libp6cre and show them how easy it is to do stuff
takadonet flussence: libp6cre? 14:05
flussence obviously it doesn't exist yet...
14:05 mtk left 14:06 mtk joined
flussence just a basic library that can do grammars and actions, not necessarily perl 6 itself 14:06
like libxslt I guess
but easy enough for normal humans to understand :) 14:07
14:07 Patterner left
masak has been thinking of writing a libp6cre 14:09
flussence: I'm not a master at retorts, but something tells me it's counterproductive to insult people on a personal level on reddit: www.reddit.com/r/programming/commen...10/c1ape78 14:10
s/at/of/
flussence yes :(
flussence downvotes self and deletes
masak somehow chromatic++ always succeds in replying on a factual level to things. even when he's being attacked. 14:11
moritz_ submitted to HN too: news.ycombinator.com/item?id=2048703
masak moritz_++
HN, a chance to be insulted by Lisp weenies rather than Python/Ruby weenies! :P
flussence I shouldn't post things on reddit when I'm half-awake... I seem to do better when I'm half-asleep 14:12
14:12 icwiener joined 14:13 cjk101010 left
VXZ Why is p6 so poorly recieved by so many? I don't hardly ever hear anyone talking about how exciting it is, or how cool it's going to be when it's production-ready. Wtf? 14:19
masak I'm hearing people saying they're excited by it. but the proportion is about 1 to 9 to all the cargo-culted bullying.
incidentally, that's about the proportion of people who have a relatively open mind and go find things out by themselves... :) 14:20
sjn VXZ: Start doing it yourself, then maybe some of your friends might too ;-)
pmurias masak: functional reactive programming 14:21
VXZ sjn: Unfortunately, I know no other programmers.
masak pmurias: I've heard liqui talk about that on Twitter. maybe ask him.
sjn VXZ: doesn't matter. if they hear "Wow this Perl 6 thing is cool", they might take the buzz to their friends that _are_ programmers :) 14:22
VXZ Maybe it just needs to be packaged differently or something...p6 needs a marketing & pr department or something?
sjn "Hey, I'm not a programmer, but I heard Perl 6 seems to be a cool thing, what do you think?"
marketing and pr dept's are for businesses. 14:23
if we're not willing to talk about what we think is cool, then there's something wrong with _us_ 14:24
having a marketing dept fix that is hardly the right approach
masak "We suck at marketing... but we think Perl 6 is pretty cool." :) 14:25
14:26 LeifD left
VXZ *shrug* It's just a concept. I don't think it has to only apply to businesses. But if it makes you feel any better, I do make a point of talking about how cool I think p6 is when I sense a person might know what I'm talking about. 14:26
14:26 xinming left 14:27 xinming joined
sjn VXZ: what do you usually say then? 14:27
i.e. what features do you chose to talk about?
pmurias convincing people that a non-production ready language is cool is hard 14:28
VXZ Metaops, hyperops, nicer regexes, ...
sigil invariance, too, if I'm talking to a non-perl programmer 14:30
masak best way I've seen so far is jnthn++'s "Solved in Perl 6" talks: jnthn.net/papers/2009-bpw-solved.pdf
sjn pmurias: rubbish. things can be cool even if they're not written in stone ;)
takadonet I'm lucky that I can use any programming language at work as long as i can justified why it's the best tool for the job. Currently that only means small scripts. Speed is the only thing stopping me from using it in large projects.
14:31 timbunce joined
masak takadonet: you should toy around a bit with niecza, then. 14:31
takadonet masak: already have :) 14:32
masak takadonet: fewer features than rakudo, but the runtime speed is significantly higher.
14:38 MayDaniel joined
takadonet cya everyone later 14:38
os re-install time
14:38 takadonet left
tadzik Demonen: there are 14:41
huf www.reddit.com/r/programming/commen...10/c1aph1c HUH? 14:43
tadzik Demonen: but seems as it's Rakudo only, not Star: launchpad.net/~dexter/+archive/rakudo-pkg 14:45
masak huf: it may be a contrary opinion, but at least it's coherent and not filled with bile. 14:49
huf true, but it's the dumbest non-troll thing i've read all week
masak really? I'm currently trying to reason out why I don't agree with it. 14:50
huf where do these people live when they're not on the net spouting insanities? (the people that expect to know a language without learning it)
you cant even say what's a nuance and what's not without first learning it properly... 14:51
14:52 Psyche^ joined, Psyche^ is now known as Patterner
masak huf: I replied: www.reddit.com/r/programming/commen...10/c1api52 14:52
huf masak: still, i feel the main point lots of them bring up is "hurr durr i cant read this just now, it must be gibberish" 14:53
i feel something has to be done on that point 14:54
masak there will always be people reasoning that way.
in related news, why does Lisp have so many parentheses? :) 14:55
they must really like parentheses or something.
huf because back then they didnt have perl6 to do it right? :)
VXZ If these "readability" people had their way, we'd be using loops and single-character comparisons instead of regular expressions. 14:57
huf no, i suspect in most cases we'd be using regexes in python 14:58
14:58 Patterner left
huf because through some very very strange coincidence, the language they already grok is easily readable 14:58
odd, that
colomon I've got to say, IMO it's hard to imagine a more readable version of the Fib sequence than 14:59
1, 1, 2, 3, 5, 8, *+* ... *
I suspect anyone who was familiar with the idea of the sequence and didn't have any preconceptions about programming could understand what that code does. 15:00
(without understanding the details at all, perhaps.) 15:01
huf i think they could guess at best 15:02
the *+* is odd if you dont know what it is
15:02 soroush_ left
huf not that you need to actually *do* much to understand it 15:02
15:03 agentzh left
huf i can grasp most of the example p6 code i see easily, and i've done almost nothing in the language 15:03
colomon but that's looking at it like a programmer. If you like at it like a mathematician, you know the sequence is defined by addition, and hey, there's a + sign there -- that must be what does the addition!
15:03 soroush joined
huf :) 15:03
Juerd I think it's a bit easier to read as * + * 15:04
huf i'll ask my dad if he can guess it
(he's more of a mathematician than a programmer)
Juerd *+* looks like an operator with metaoperators
15:05 puge joined
szabgab don't forget that operators are much harder to read tahn words if you are not familiar with them 15:05
VXZ This is a good point about readability. It assumes a lot to say one thing is 'more readable' than another in some supposed universally-true kind of sense. I might even go so far as to say that kind of statement can be indicitive of short-sightedness, ignorance, or self-centeredness. 15:06
szabgab so he fact that perl is so much operator driven indeed makes it easier to write for an expert and harder to read for a beginner
masak szabgab: that's very true.
huf hm, really? operators are that hard? 15:07
szabgab the words you usually already know from other languages 15:08
the operators are a lot more different among languages
and thay are definietly not used in English
Juerd szabgab: hsao ntheurd anothpc asnoth
szabgab or is that jus me who does not use punctuation ?
Juerd szabgab: In other words: that's not true, at all.
pmurias made up words such as car and cdr are equally unreadable as operators
huf hm, but knowing english doesnt really help with the wordy things either
Juerd Words are equally impossible to read if you don't know them. 15:09
huf but what's not a made-up-word in programming?
colomon It seems to me that operators are definitely harder to just understand than words are, but I don't think it's a beginner / expert thing at all.
szabgab Juerd: that's true
huf everything has its own special meaning in the context of a proglang
colomon You could teach all the basic operators you're likely to run into in p6 in an hour, I'd say.
szabgab but @qqrq.length is easier to read than $@qqrq
mdxi in any notation system, symbolic concision is *always* a power/readability tradeoff.
szabgab $#qqrq
huf szabgab: but why? 15:10
i'm not convinced at all
colomon and once you have the operators, well-written code using them is usually quite an improvement in clarity.
huf also $#array isnt the same as @array.length (i hope)
szabgab it is easier for someone who knows english and maybe another programming language
Juerd szabgab: Well, I associate "length" with lines, and # with numbers. 15:11
szabgab: So for the *number* of elements, $#foo does make more sense to me.
huf it probably wouldnt help anyone coming from c
so yeah, "remaining similar to similar languages will help people coming from those languages" 15:12
not sure that's a worthy goal
15:12 lidden joined
szabgab huf: what I say is that I understand they have difficulty 15:12
Juerd The word "length" only began to make sense to me, for arrays, when I already knew some programming
szabgab coming from other languages
huf szabgab: oh sure, i get that part. what i dont understand is where the arrogance comes from to say "i cant read it just now, so must be their fault" 15:13
szabgab huf: I think it is a general human trait :)
pmurias huf: how would you like it if ! was the addition operator?
huf the reaction i'd expect in such cases is to quickly google for some tutorial, or at the least stfu ;)
pmurias: it'd take some getting used to, but i hope i'd try to look up the rationale before spouting bile 15:14
see, i wasnt entirely happy with the ??!! thing, but then i read why it had to be done, and i'm willing to accept it
szabgab huf: I think it is very human to "I don't understand, this must be crap"
not clever, but human
huf eh ;) 15:15
i dont like us.
szabgab :)
btw can you google for *+* ?
ok, rephrashe: do you get any good results ?
Juerd szabgab: But should you design a language around Google's capabilities? 15:16
SEO for your programming language?
15:16 am0c joined
huf maybe duckduckgo could solve this for perl5 and 6 15:16
szabgab Juerd: sure not but that is just anothr step we need in the education 15:17
flussence huf: maybe they could forward /!perl6 (.*)/ to tryrakudo :)
szabgab where to go to *easily* look up code snippets
huf google's codesearch deals with punctuation better, but the results are... well 15:18
a bit without context
Juerd szabgab: A Perl documentation website should just have its own specific searchengine that, when you type *+*, says it's composed of * and +, mention their respective contexts and provide links to the more specific documentation 15:19
pmurias there was a project trying to achive that
szabgab Juerd: and any reasonable Perl IDE should have that capability :) 15:21
15:23 soroush_ joined, soroush left
Juerd szabgab: I don't use IDEs myself so I don't think in that direction at all. 15:25
15:36 hercynium joined 15:41 Psyche^ joined, Psyche^ is now known as Patterner 15:42 roen joined
colomon just paused the blog post he was writing, so he can add a new function to List::Utils for use in the post. :) 15:46
15:47 MayDaniel left
masak colomon++ 15:49
I'm curious which function... but I'm prepared to wait for the post :) 15:50
colomon I'm calling it sorted-merge 15:52
masak I get it. 15:53
good name.
colomon it's lazy. :)
and it's pushed. 15:54
I don't think it's a particularly elegant implementation (heavily drugged once again today) but it seems to work.
masak MJD would be proud :)
colomon If only I could aspire to that level. :) 15:55
masak Perl 6 certainly makes it easier :) 15:56
15:56 Patterner left
colomon sure enough. 15:58
whoops!
and the logic is actually reversed from what I need for my blog post.
hmmm....
15:58 Psyche^ joined, Psyche^ is now known as Patterner
masak this is why dogfooding is a good thing. 15:59
colomon indeed! 16:01
guess I just need to make sorted-merge smarter.
masak please make it as dunb as you can get away with. your users will thank you :)
colomon when I say "smarter", I mean, add another (optional) parameter for comparison function 16:03
masak I suspected that.
just make sure the extra customizability doesn't get in the way of the most common uses. 16:04
that's obvious, but I'm pointing it out anyway.
colomon not, "I will use weak AI to try to guess how the lists in question are sorted"
:)
masak no please no :) 16:05
colomon see, you use the logic from the sequence operator... ;)
flussence rakudo: say (1,2 XZXZXZ+ 3,4) ~ ' ' ~ (1,2 X+ 3,4) # what happens to the first one here?
p6eval rakudo : OUTPUT«4 5 5 6 4 5 5 6␤»
masak flussence: sir, you just blew my mental stack. 16:06
colomon same here
masak flussence: is the question serious?
flussence I was just poking around, and wondering wtf happened myself
masak flussence: when you find out, please let us know :P
masak likes p6u today 16:07
16:09 Patterner left 16:10 Psyche^ joined, Psyche^ is now known as Patterner
colomon admits that *.abs R<=> *.abs is probably not completely obvious to someone who doesn't know p6 operators and whatever. 16:14
flussence apart from the R, a lot of that makes sense in p5 terms... 16:15
masak if the R metaop is in a &sort block, it can usually be replaced by a .reverse after the .sort
colomon masak: but that definitely will not work for a sorted merge of two infinite lists. 16:16
masak true. 16:17
which... in some semi-twisted sense... is an argument for the R metaop. :)
colomon it's definitely shorter (and once you understand it, probably clearer) than -> $a, $b { $b.abs <=> $a.abs } 16:18
I dunno, I can see reasons to favor both.
either.
masak niecza: grammar G { token TOP { <para> ** [\n\n] }; token para { [ . <!before \n\n> ]+ } }; say ?G.parse("foo\nbar\n\nbaz")
p6eval niecza 406e042: OUTPUT«Can't locate JSON.pm in @INC (@INC contains: /home/p6eval/niecza/src /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /home/p6eval/niecza/src/NAMBackend.pm
..line 1…
masak locally, "Bool::False".
tell me, am I overlooking something here?
or should that one match? 16:19
flussence looks right from where I'm standing. 16:20
masak submits nieczabug
flussence does it work for parsing a single <para>? 16:23
masak it does.
flussence hm 16:24
masak it also works when I replace the [ . <!before \n\n> ]+ with \w+ (and remove the in-para \n)
[particle] does it work in rakudo?
flussence yes.
16:24 flatwhatson joined
masak rakudo: grammar G { token TOP { <para> ** [\n\n] }; token para { [ . <!before \n\n> ]+ } }; say ?G.parse("foo\nbar\nbaz") 16:24
p6eval rakudo : OUTPUT«Bool::True␤»
[particle] it's nice to have a reference implementation.
masak s/a reference implementation/two implementations/ 16:25
:)
flussence s/.*/competition of some sort/
16:25 WonTu joined
[particle] another implementation to reference. :P 16:25
16:25 WonTu left
flussence silly thought, but have you tried <para> ** "\n\n" instead of []s? 16:26
masak yes.
er, wait. no.
that shouldn't matter at all. 16:27
but it does! o.O
flussence++
flussence stranger things have happened :) 16:28
masak niecza: grammar G { token TOP { <para> ** "\n\n" }; token para { [ . <!before \n\n> ]+ } }; say ?G.parse("foo\nbar\nbaz")
p6eval niecza 406e042: OUTPUT«Can't locate JSON.pm in @INC (@INC contains: /home/p6eval/niecza/src /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /home/p6eval/niecza/src/NAMBackend.pm
..line 1…
masak locally, "Bool::True".
flussence I got my xmms code to work just by replacing "-->"s with "returns"
16:29 mtk left
flussence it shouldn't matter, but we're not at that point yet :) 16:29
masak true enough.
also, I don't know enough about the parser in niecza to say whether it should matter or not.
flussence I saw it as one of 3 things being wrong: ** not working, [] confusing **, or strings longer than 1 char confusing **. I guessed right that time :) 16:31
VXZ So, 'say (1,2 XZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZ+ 3,4)' has been running for about 20 minutes, now...my laptop's fan sounds like a jet engine at this point... 16:33
[Coke] catches up, and imagines instead of a PAST outputting PIR, have it output highlighted HTML.
flussence VXZ: I've no idea what it does, but the end result is always the same as $first-letter + $operator 16:35
16:36 awwaiid joined
masak flussence: you would have a great career in bug hunting. join me in my quest against bugs! :) 16:37
VXZ flussence: Yeah, I thought that might be the case. I did it to see if it was actually doing something with all the rest, which, apparently, it is. Now I'm just kinda exercising my appreciation of absurdity. :)
What is it *supposed* to do? I know what X and Z do, didn't know you could put them together like that. 16:40
flussence now that I think about it... nothing
X takes a single pair, feeds it to another Z or X (no-op), then adds them 16:41
rakudo: say ( [[1, 2], [3, 4]] XZXZXZ=> [[5, 6], [7, 8]] ).perl 16:44
p6eval rakudo : OUTPUT«((((((1 => 5)))), ((((2 => 6))))), (((((1 => 7)))), ((((2 => 8))))), (((((3 => 5)))), ((((4 => 6))))), (((((3 => 7)))), ((((4 => 8))))))␤»
masak o.O
allbery_b your pairs, they are nesting. watch out for babies 16:45
flussence that one's a bit easier to read if I take out the absurdity:
rakudo: say ( [[1, 2], [3, 4]] XZ=> [[5, 6], [7, 8]] ).perl 16:46
p6eval rakudo : OUTPUT«((1 => 5, 2 => 6), (1 => 7, 2 => 8), (3 => 5, 4 => 6), (3 => 7, 4 => 8))␤»
16:46 Patterner left, mtk joined 16:47 Psyche^ joined, Psyche^ is now known as Patterner
VXZ hm 16:48
huf well, apparently {{{ 1, 1, 2, *+* ... * }}} is unreadable at first glance to a couple of rather experienced c/python coders i know (one of which also knows lisp/haskell); my dad (whose last serious programming experience was in some kind of asm) got it at once ;) 16:55
colomon huf: just as I was (sort of) predicting.
and \o/, my code approximates pi a lot better if you subtract the atan(1/239) term rather than adding it. 16:56
huf colomon: hmm? 16:57
colomon just before drifting off for a vicodin-fueled mini-nap, my code was insisting 3.17506526160639 was a very good approximation for pi 16:58
16:58 pmichaud joined
allbery_b mmm, drug-mediated coding 16:58
pmurias sorear: ping 16:59
colomon that's because I was using PI/4 = atan(1) = 4 * atan(1/5) + atan(1/239) instead of the correct PI/4 = atan(1) = 4 * atan(1/5) - atan(1/239)
pmichaud good morning, #perl6
colomon pmichaud: \o/
rakudo: say atan(1/239)
p6eval rakudo : OUTPUT«0.00418407600207472␤»
masak pmichaud! \o/
colomon rakudo: say pi + 2*atan(1/239)
masak pmichaud: when you're gone, we miss you.
p6eval rakudo : OUTPUT«3.14996080559394␤»
TimToady * *, *
pmichaud masak: sorry to have not been around much lately 17:00
colomon TimToady: two terms in a row?
TimToady I was speaking in English
colomon rakudo: say pi + 8*atan(1/239)
p6eval rakudo : OUTPUT«3.17506526160639␤»
flussence the middle * represents XZXZXZXZXZ
masak pmichaud: it's OK. will there be a Star release tomorrow?
pmichaud today or tomororw, yes. 17:01
colomon huf: it will all make sense when I get this blog post finished; and the blog post will be easier to finish now that I don't have to justify pi being 3.17506526160639
pmichaud then one in jan, then we'll move to a 3-mo cycle
masak VXZ: a Perl 5 user who likes Perl 6: twitter.com/blackfog/status/20159288743829504 17:02
17:03 Trashlord left, Trashlord joined
pmurias masak: i'm adding $a -> {...} to niecza 17:05
masak nice. 17:06
I missed it for if statements, at the point where ~~ on a regex didn't set $/
that was... days ago. :)
17:07 Trashlord left 17:08 Trashlord joined
pmichaud have to leave (wife needs computer) -- bbl 17:09
masak nom & 17:10
17:10 masak left 17:12 Guest72634 left, hercynium left, Patterner left, Psyche^ joined, Psyche^ is now known as Patterner
pmurias sorear: Can't use an undefined value as an ARRAY reference at /home/pawel/niecza/src/NAMBackend.pm line 96. 17:17
17:18 roen left
moritz_ niecza: say 1 17:18
p6eval niecza 406e042: OUTPUT«===SORRY!===␤Unable to load setting SAFE. at /tmp/Xj2loUEggX line 1:␤------> <BOL>⏏say 1␤Undeclared routine:␤ 'say' used at line 1␤Check failed␤»
moritz_ recompiles it 17:19
17:19 molaf joined
moritz_ lib/CLRBackend.cs(421,38): error CS0411: The type arguments for method `Niecza.CLRBackend.JScalar.A<T>(int, object, System.Func<object,T>)' cannot be inferred from the usage. Try specifying the type arguments explicitly 17:20
colomon loliblogged: justrakudoit.wordpress.com/2010/12/...sequences/
17:21 hercynium joined
moritz_ colomon++ 17:22
17:23 cdarroch joined, cdarroch left, cdarroch joined, roen joined
[Coke] ooh, blogspam on blogs.perl.org. whee. 17:25
17:26 MayDaniel joined
[Coke] colomon++ - that was an interesting read, and not just for perl6. danke. 17:27
TimToady ooh, it's snowing 17:28
'course, I am in Seattle now... 17:29
17:29 takadonet joined 17:30 Patterner left, Psyche^ joined, Psyche^ is now known as Patterner
dalek rixel: 3abb581 | diakopter++ | / (8 files):
return statement, default return values from subs

hacked-in logical operators (need to be made short-circuiting and to use temp locals instead of this thrown-together way. about 20 min work, sometime.
17:31
takadonet yo
17:32 takadonet left, takadonet joined
TimToady oy 17:32
[particle] it's not snowing in this part of seattle :(
diakopter it's not snowing in this part of sfbay 17:34
17:34 takadonet left 17:35 takadonet joined, takadonet left, takadonet joined 17:37 roen left 17:43 colomon joined 17:44 Patterner left 17:45 Psyche^ joined, Psyche^ is now known as Patterner 17:47 Eth4n left 17:58 Patterner left, Psyche^ joined 18:00 Psyche^ is now known as Patterner 18:03 Eth4n joined, Eth4n left, Eth4n joined 18:06 Patterner left 18:08 shi joined 18:09 fhelmberger_ left 18:12 robinsmidsrod joined 18:14 Psyche^ joined, Psyche^ is now known as Patterner
sorear pmurias: hi 18:16
18:18 Patterner left 18:19 icwiener left
sorear pmurias: I heard you had a compile problem yesterday, but you set the paste to expire before I woke up. Very cruel. 18:22
good * #perl6
18:22 dukeleto left 18:23 dukeleto joined
takadonet sorear: yo 18:23
18:23 stkowski joined 18:24 MayDaniel left, GinoMan_ joined 18:26 GinoMan_ left 18:27 GinoMan_ joined, GinoMan_ left 18:29 robinsmidsrod left 18:30 GinoMan joined 18:31 robinsmidsrod joined
takadonet wow lots of comments on that reddit post 18:33
colomon takadonet: link, pretty please?
takadonet colomon: www.reddit.com/r/programming/commen...6_in_2010/
colomon takadonet++ 18:34
pmurias sorear: i use App::Nopaste 18:35
sorear: hi
sorear: i solved the compile problem by upgrading to the newest mono 18:36
takadonet never had soo many comments on a reddit post with less then 10 upvotes 18:37
18:39 rgrau left 18:40 LeifD joined
[Coke] reddit question - they allow duplicate postings? 18:40
colomon huh. Is it just me, or is masak's p3 radically easier than p1, p2, or p5? (Haven't actually looked at p4 yet.)
takadonet if they are on different sub reddit yes 18:41
pmurias sorear: the new one is Can't use an undefined value as an ARRAY reference at /home/pawel/niecza/src/NAMBackend.pm line 96.
takadonet ic someone else posted a hour ago 18:42
[Coke] e.g. www.reddit.com/search?q=perl+6&...=relevance - first 2 links are to the same URL. 18:43
pmurias sorear: rm -fr obj;xbuild solves that too
takadonet [Coke]: one is posted in r/programming and other is in r/perl
[Coke] takadonet: ok. that raises other questions, but thank you. 18:44
colomon I don't have a reddit id, but it might be worth pointing out that all the Haskell examples for fib are for the simpler case of an infinite Fib sequence, while the perl 6 version is explicitly terminating the sequence. The perl 6 version without termination is simpler, naturally.
sorear rakudo: grammar G { token TOP { <para> ** "\n\n" }; token para { [ . <!before \n\n> ]+ } }; say ?G.parse("foo\nbar\n\nbaz") 18:47
p6eval rakudo : OUTPUT«Bool::True␤»
sorear rakudo: grammar G { token TOP { <para> ** "\n\n" }; token para { [ . <!before \n\n> ]+ } }; say ~G.parse("foo\nbar\n\nbaz")
p6eval rakudo : OUTPUT«foo␤ba␤»
flussence rakudo: grammar G { token TOP { <para> ** "\n\n" }; token para { [ <!before \n\n> . ]+ } }; say ~G.parse("foo\nbar\n\nbaz") 18:49
p6eval rakudo : OUTPUT«foo␤bar␤␤baz␤»
pmurias sorear: what does setting the ->type for a block do?
sorear enables odd special-case behavior 18:50
like 'init' blocks are automatically added to the phaser queue 18:51
"voidbare" and "mainline" blocks are subject to having their lexicals transformed into globals 18:52
there used to be a lot more uses of block type, but most of them seem to have died in the niecza/mm branch 18:53
pmurias the ->type thing seems a bit crude 18:54
sorear I agree
it's a hack that outlived its design life
pmurias i'll finish if ... -> $a {...} and see what i can do about that 18:56
sorear: would having a niecza backend to any member of the lisp family be helpfull?
sorear it looks like there are only four used values of type
pmurias has to write a project in lisp for a course
TimToady just convince them that Perl 6 is a dialect of Lisp 18:57
sorear regex (Metamodel.pm 979), init/end (Metamodel.pm 964), voidbare (Metamodel.pm 1179)
after git grep -e '->type'
pmurias TimToady: can i quote you? 18:58
18:58 jay_ joined, shi left
pmurias ;) 18:58
TimToady in general, I can't stop people from quoting me...
pmurias hm, i could use liskell... 18:59
TimToady perlisp 19:00
sorear pmurias: the second backend would probably be important no matter what it targets
colomon TimToady: sitting here pondering if p6 should have car and cdr methods... (head and tail?)
TimToady iirc, elf had a clisp backend that you might learn something from
allbery_b push/pop?
TimToady .key and .value 19:01
moritz_ .[0] and .[1..*]
pmurias TimToady: kp6 had a clisp backend
TimToady what do you thing 1 => 2 => 3 => 4 is?
19:01 [Coke] left
colomon moritz_: yes, I know how to do it now. 19:01
moritz_ TimToady: a bad idea?
TimToady :)
sorear 1 => 2 => 3 => 4 => EMPTY
tadzik rakudo: (1 => 2 => 3 => 4).perl.say 19:02
p6eval rakudo : OUTPUT«1 => 2 => 3 => 4␤»
tadzik <lookofdisapproval>
TimToady rakudo: (1 => 2 => 3 => 4).value.perl.say
p6eval rakudo : OUTPUT«2 => 3 => 4␤»
TimToady there's your cdr
pmurias :) 19:03
sorear rakudo: sub foo { gather { take 1; return } }; my @x := foo; say "Hi"; say @x.perl
p6eval rakudo : OUTPUT«Hi␤(Nil())␤»
TimToady if you want it, after moritz_++'s mean remark :)
colomon TimToady: I was rather hoping it would work on Lists, Arrays, etc.
sorear rakudo: sub foo { gather { take 1; die "pie" } }; my @x := foo; say "Hi"; say @x.perl
p6eval rakudo : OUTPUT«Hi␤pie␤ in <anon> at line 22:/tmp/cNFVK1mzJR␤ in 'Any::join' at line 1␤ in 'List::perl' at line 2772:CORE.setting␤ in main program body at line 22:/tmp/cNFVK1mzJR␤»
TimToady obviously, you should put a coercion from those types into Any that turns it into a pair list 19:04
colomon I admit, part of wanting it at the moment is just that .[1..*] doesn't actually work in Rakudo (so far as I know)
moritz_ colomon: then use 1..*-1
colomon moritz_: doesn't work on an infinite list.
sorear TimToady: currently in niecza a nonlocal exit from a gather block is an untrappable fatal error. How should it work?
TimToady rakudo: say Inf - 1
p6eval rakudo : OUTPUT«Inf␤»
19:04 Chillance joined
TimToady why not? 19:04
:) 19:05
colomon :p
19:05 jay_ left
LeifD rakudo: 1/0 19:05
p6eval rakudo : ( no output )
TimToady sorear: it should work better :P
LeifD I get Inf. Should it not be NaN or something? 19:06
moritz_ rakudo: say 1/0
p6eval rakudo : OUTPUT«Inf␤»
TimToady a gather that cannot be reentered should be GC'd eventually
pmurias sorear: documenting the nam opcodes seems to be something that would help with adding a backend considerably
moritz_ LeifD: probably, yes 19:07
TimToady rakudo: say -1/0
pmurias sorear: what does Op::LetVar do?
p6eval rakudo : OUTPUT«-Inf␤»
TimToady rakudo: say -1/-0
p6eval rakudo : OUTPUT«-Inf␤»
19:08 _twitch left
TimToady I guess rakudo assumes that large values of 0 are positive :) 19:08
LeifD -0 = -1 * 0, so It should not be -Inf 19:09
colomon What got me thinking about it was www.reddit.com/r/programming/commen...10/c1apj5e
fib = 0 : 1 : zipWith (+) fib (tail fib)
my @fib := 0, 1, (@fib Z+ @fib[1..*]); # psuedo-p6 version
sorear TimToady: the caller() of a gather block will in general have already returned by the time gather code is run 19:10
TimToady: so the gather has no place to return to
TimToady yes, it's a bug that self-referential lists tend to crash in rakudo 19:11
sorear TimToady: no, I'm asking about what gather { return } should do in niecza
TimToady I was speaking to colomon 19:12
sorear oh
moritz_ when I fix the blizkost build problems related to newest parrot changes, it complains:
colomon TimToady: would you expect that to work in ideal p6?
moritz_ src/pmc/bkmarshal.c:310: error: ‘my_perl’ undeclared (first use in this function)
19:13 justatheory joined
moritz_ and indeed, that var is not declared, and I wonder how it has ever worked 19:13
any ideas?
pmurias sorear: gather {return} is invalid perl6 code
without an enclosing sub
sorear moritz_: your Perl was built without -DMULTIPLICITY
TimToady sorear: perhaps gather could just trap any return like a sub def
moritz_ sorear: so my_perl is a global variable if -DMULTIPLICITY is set? 19:14
sorear moritz_: no, it's an argument that is declared by the pTHX_ macro
moritz_ ah
TimToady or we could just say you can't use return in a gather
sorear TimToady: what about exceptions?
TimToady colomon: I've already expected it to work :)
sorear TimToady: if a gather block dies, where can it be caught?
TimToady in whatever triggered the lazy list in the first place 19:15
this is yet another reason why we are trying to de-emphasize exceptions in p6
it is not clear whether there should be a way for a fail() to be propagated through a lazy list 19:16
19:16 envi joined
TimToady though it's be speculated more than once 19:17
returning some sort of "caltrop" value that will pop your tires if you drive over it :) 19:18
Tene TimToady: S02 implies that augment is a lexically-scoped modification:
Instead of defining macros directly you may also mix in one or more grammar rules by lexically scoped declaration of a new sublanguage: 19:19
augment slang Regex { # derive from $~Regex and then modify $~Regex
TimToady colomon: for example, if you look at rosettacode.org/wiki/Counting_in_factors#Perl_6 you'll see a lazy list that uses repeat/until with self-reference to @primes 19:21
it works with the repeat, but it doesn't with the obvious ... implementation 19:22
colomon I think I see another List::Util function coming on... ;) 19:24
diakopter can't even parse the last hour of irclog
19:24 snearch joined
colomon gist.github.com/758929 19:25
any ideas?
TimToady another example of lazy list self-reference that doesn't work is wall.org/~larry/hamming 19:26
it seems that iterators cannot deal with an array that gets extended while iterating 19:27
pmurias sorear: and what does Op::ImmedForLoop do, as the name is a bit cryptic? 19:29
sorear pmurias: a for-loop that needs to be executed immediately 19:30
at statement lefel
19:32 Vlavv_ joined
Tene TimToady: Can you confirm that that implication is inaccurate, and should be fixed? 19:33
19:33 shi joined
TimToady what do you mean by "fixed"? 19:33
all langage changes are lexically scoped
language changes too
Tene TimToady: Wait, so how does augment slang work as lexically-scoped, but augment class is a global modification? 19:34
sorear pmurias: I started on some nam documentation earlier; I'll prioritize getting that up to date
TimToady Tene: augment is just a declarator; it's up to the thing it's declaring to decide what it means, and slangs are always lexical 19:35
Tene :/ okay.
TimToady was just re-using the word to avoid inventing two more declarators
how could a language redefinition work any other way than lexically?
at best you can export to an outer lexical scope that is being compiled currently, but that is also lexical 19:36
macros are essentially the same thing 19:40
takadonet www.reddit.com/r/programming/commen..._counting/ 19:43
TimToady Tene: the other way to look at it is that augment does exactly what you expect, but slangs are dynamically scoped variables in the compiler, which comes out to lexically scoped in your program 19:48
Tene TimToady: Hmm, okay, I guess that's reasonable. Just seems awkward to have a single declarator have wildly different scoping rules, but perhaps I'm biased by being grumpy about the lack of lexically-scoped class modification. 19:51
TimToady it's a good thing that you cannot change someone else's language out from under them without their cooperation
as I said in that discussion, what's really lexically scope there is a different dispatcher
*scoped 19:52
Tene Sure.
sorear TimToady: irclog.perlgeek.de/perl6/2010-12-29#i_3128582 ? 19:58
TimToady still backlogging 20:00
colomon wait (and maybe this was touched on back there in stuff I didn't realize I should be looking at) -- is gather supposed to return right where it is if used in a "lazy" context?
TimToady there is no implicit return to gather 20:01
it's often used as the last statement though
if that's what you're asking
sorear currently niecza treats gather { ... } as gather { ...; take EMPTY } and panics if the block ever returns 20:02
colomon no. 20:03
I was looking at my @fib := 1, 1, (@fib Z+ @fib[1..*]); again.
It seems to me that only works if you start assigning to @fib (if that's the right way of saying it) before you get to the Z+ operator. 20:04
I mean, it's my @fib := 1, 1, zipwith(&[+], @fib,@fib[1..*]));
If you try to evaluate the zipwith before doing :=, the whole thing falls apart. 20:05
TimToady yes, the := has to happen first somehow
haskell does this by requiring strict laziness, iiuc 20:06
colomon the reason I asked about gather is that zipwith uses it internally:
gather while ?$lhs-list && ?$rhs-list 20:07
TimToady sure, but the problem is more likely at binding time
my hamming example seems to indicate that
there's no gather there at all, just recursion
it seems to bind to a copy of the array, not the array itself, or to an iterator that commits too soon to the length of the array 20:08
20:10 timbunce left
dalek ecza: 8ac15dc | sorear++ | src/ (2 files):
Add a couple comments for pmurias++
20:11
TimToady sorear: I believe pmichaud's immutable iterator model discards the notion of an EMPTY sentinal
pmurias sorear: you can merge in the if commit 20:12
colomon maybe I'm missing something (had a lot of vicodin today), but it looks to me like the problem could also be the same thing I'm thinking of with the Fib. example -- Rakudo actually tries to evaluate the right-hand side before binding it.
it's not strictly lazy, as you say.
TimToady we need some way of dialing in the correct amount of laziness, I think
sorear TimToady: yes. EMPTY is now used in niecza only for marking the end of gathers 20:13
my coroutines don't return; they can only yield values
TimToady sorear: well, that seems like a fossil
sorear Rakudo coroutines can return
s/Rakudo/Parrot/
TimToady called to nom & 20:14
colomon lolibloggedagain: justrakudoit.wordpress.com/2010/12/...s-haskell/ 20:15
20:16 timbunce joined
jasonmay colomon: haha, I dig the subtitle for the blog 20:16
20:16 mtk left
sorear colomon: "I'm not sure why he thought I was the expert on this" 20:17
colomon: 2 words
colomon: Numerics grant
colomon jasonmay: I believe TimToady coined that.
takadonet www.reddit.com/r/programming/commen...s_haskell/ 20:18
colomon sorear: yes, but that was basic math stuff, not obscure uses of the sequence operator.
Admittedly, I did a bunch of the sequence operator implementation as well. :)
takadonet: did you at least read it first? remember, I'm juiced up on vicodin atm, I may be completely incoherent. 20:19
;)
takadonet takadonet: i did :)
colomon oh, good.
sjohnson colomon: hi
20:19 y3llow_ joined
colomon sjohnson: o/ 20:19
takadonet colomon: your post is just a very long reddit reply :)
20:19 pothos_ joined
colomon takadonet: indeed it is. 20:19
takadonet and you don't even have a reddit account :P 20:20
20:20 daxim left, mtk joined 20:21 y3llow left, y3llow_ is now known as y3llow, yarrak joined 20:22 pothos left, pothos_ is now known as pothos 20:23 Psyche^ joined 20:25 Vlavv_ left
colomon takadonet++ 20:25
20:26 MayDaniel joined
takadonet karma takadonet 20:27
aloha takadonet has karma of 24.
20:27 Psyche^ left
colomon takadonet++ 20:27
# just because it was too low before 20:28
20:28 Vlavv_ joined
takadonet hehe 20:28
colomon moritz_: you'd better watch it, I've got three of masak's problems working now. :) 20:29
p5 looks really hard. 20:30
20:31 __rnddim__ is now known as lue
lue ohai o/ 20:31
colomon \o 20:32
20:33 mtk left 20:34 mtk joined
moritz_ colomon: I've got 4 submitted, and p4 good enough to pass base-test 20:34
colomon p4 is the last one you haven't submitted? 20:35
moritz_ correct
p5 is a solved problem, there are good algorithms for it
colomon but not simple algorithms.
20:37 Psyche^ joined, Psyche^ is now known as Patterner 20:42 Patterner left 20:43 [Coke] joined 20:46 mtk left
pmurias sorear: is it possible to see the NAM in a pretty printed for or would i have to add that myself? 20:49
20:51 mtk joined 20:55 jaldhar joined 21:01 LeifD left 21:02 ggoebel joined, snearch left 21:05 coldhead joined 21:08 Psyche^ joined, Psyche^ is now known as Patterner
tadzik hello girrafes 21:08
21:08 dukeleto left 21:09 dukeleto joined
lue hello, fellow giraffe o/ 21:12
21:12 mtk left 21:14 dju_ joined, dju_ left, dju_ joined, mtk joined, dju_ left 21:17 spq1 joined
colomon [||] sliding-window-wrapped(@.stones, 2).flat.map(* && *); 21:20
tadzik "oh wow, this Perl thing is so unreadable!" :) 21:21
colomon yeah, that may be a little excessive. but it's too tasty to resist. 21:23
Tene colomon: [||]? why not &any?
colomon Tene: because I'm junctophobic?
moritz_ rakudo: *.&say.(5) 21:24
p6eval rakudo : OUTPUT«Whatever()<0x6e8de28>␤invoke() not implemented in class 'Boolean'␤ in main program body at line 22:/tmp/kxTX52BKEo␤»
moritz_ rakudo: *.say.(5) 21:25
p6eval rakudo : OUTPUT«5␤»
21:25 Patterner left
moritz_ submits rakudobug 21:25
21:26 MayDaniel left
moritz_ rakudo: (*.&say).(5) 21:29
p6eval rakudo : OUTPUT«Whatever()<0x6d86818>␤invoke() not implemented in class 'Boolean'␤ in main program body at line 22:/tmp/LtzDgrVirW␤»
21:32 Psyche^ joined, Psyche^ is now known as Patterner
pmurias sorear: i'm writing a pretty printer for nam 21:44
21:45 mtk left 21:46 mtk joined 21:48 mtk left 21:49 yarrak left 21:53 Patterner left, GinoMan left
pmurias sorear: shouldn't ann have the file position instead of the line number? 21:58
ah there is #XXX marker for that 21:59
tadzik www.reddit.com/r/programming/commen...ll/c1ardzu 22:08
*SCNR*
flussence heh :)
22:16 masak joined
lue hai masak o/ 22:17
masak tadzik: we hug trolls on #perl6 -- please do not attempt to cleave them in twain with dripping sarcasm elsewhere: www.reddit.com/r/programming/commen...ll/c1arfbk :)
there will always be noise on reddit. let's not contribute to it unnecessarily. 22:18
lue (I personally hesitate referring to Perl 6 as Perl, but that's just me.)
I would think looking the same before & after encryption would be quite an acheivment. I read that as a compliment :) 22:19
masak lue: I usually refer to Perl 6 as a Perl, but I no longer think of Perl as just a single language. it's more... fork-shaped.
colomon masak: let me encourage you to respond to this one: www.reddit.com/r/programming/commen...ll/c1arc7u 22:21
masak looks
colomon is still not registers on reddit
lue Agreed. I just say "Perl 6" to avoid ambiguity/hatemail/etc. :)
colomon masak: I think he means *+* instead of +
so it's a fine question to explain how simple ideas make powerful combinations in Perl 6 22:22
masak *+* was problematic on HN too. I had to write it out as "star-plus-star"
but since reddit uses Markdown, writing `*+*` should help. 22:23
Markdown++
masak writes a reply 22:25
colomon masak++
lue rakudo: my $begin = DateTime.new("1963-11-23T17:15:00Z"); my $fiftyyears = DateTime.new("2013-11-23T17:15:00Z"); say $fiftyyears - $begin 22:27
p6eval rakudo : OUTPUT«Can't take numeric value for object of type DateTime␤ in 'Any::Numeric' at line 1420:CORE.setting␤ in 'infix:<->' at line 7369:CORE.setting␤ in main program body at line 22:/tmp/cP0YBqpiFG␤»
lue methinks that's a bug.
22:27 wamba left
masak www.reddit.com/r/programming/commen...ll/c1arivp 22:29
lue: I don't see anything about DateTime arithmetics in S32. 22:31
lue: something in me agrees that that should work, though.
lue I can see why $fiftyyears - 34 shouldn't work (34 what?), but two DateTime objects should. 22:34
masak *nod* 22:35
that's my take on it as well right now.
at least two DateTime objects with proper time zones.
22:36 Psyche^ joined, Psyche^ is now known as Patterner
pmurias masak: i wander what happened to the velociraptor/accelraptor perls proposal? 22:37
masak pmurias: you should ask mst, its main champion.
pmurias was it public or did i spill the secret? ;) 22:38
lue I'm also curious on situations where you want to get the time 1 hour from now, maybe something like + hours(1) ? Anyway, shall I type up arithmetic for DateTime? Subtraction for sure, at least for now.
masak lue: I don't know what a DateTime Duration analogoue would be called, but... constructing such a beast with some nice constructor syntax (Dur.new(:hours(1))) and then adding it, would be one way to do it. 22:40
lue: also, I'm not sure that necessarily belongs in core.
certainly anyone who specs it would have to provide a working implementation, too. :) 22:41
moritz_ especially for the interesting case of Duration.new(:month(1.5)) 22:42
lue yeah :) well, first things first, I think I should spec (and then implement in Rakudo) subtraction arithmetic for two DateTime objects.
moritz_ -> sleep
lue night moritz_ o/
masak colomon: I think this is for you to answer: www.reddit.com/r/programming/commen...ll/c1arjk1 22:43
moritz_: that's why it needs to be a DateTimeDuration and not a Duration. basically a lot of obvious laws of addition and subtraction would be broken. 22:44
22:45 Trashlord left
lue [and all I wanted to do was to take two DateTime objects and subtract them to see how slow my Pod parser currently is :)] 22:46
masak I've done timings like that.
22:46 Trashlord joined
masak I think I used &now, though. 22:46
rakudo: my $t1 = now; sleep 3; my $t2 = now; say $t2 - $t1
p6eval rakudo : OUTPUT«3.20383275261324␤»
masak wow, that's pretty inaccurate. 22:47
flussence that's not pi at all!
masak :)
22:47 Patterner left
lue I happened to take two times from &time and put them in DateTime objects to get a duration faster. 22:48
22:48 Psyche^ joined, Psyche^ is now known as Patterner
sorear good * #perl6 22:48
masak lue: Duration is atomic time, so by that reasoning you should have used &now. 22:49
sorear! \o/
sorear pmurias: I support this
lue (7m53s for a 22 line document O.o)
hello sorear o/
an ill-formated document, but still (e.g. used =end when I should've typed =end head1) 22:50
masak lue: if you're using 'regex' rather than 'token' or 'rule', your grammar may waste a lot of time doing useless backtracking. 22:51
lue ah. Now that I fixed my test file, it parsed in an instant, but didn't parse the whole thing :) 22:52
flussence the bit on the right of a ... is tested using ~~, right?
wait, that sounds wrong. 22:53
boolean?
flussence confuses self
masak flussence: ~~
flussence ok
masak flussence: it wasn't always that way -- before, there was an exception which allowed you to write "100" rather than "* >= 100". 22:54
22:54 Patterner left
lue So I'll just s:g/regex/token/. When it breaks, I'll undo that until it stops breaking :P 22:55
22:55 Psyche^ joined, estrabd left
masak lue: well, I'd recommend a bit more comprehension than that... :) 22:56
...but just mechanically substituting might be a good first thing to try.
diakopter phenny: ask sorear (and moritz_) would you mind if I upgraded mono on host04 to 2.8 (for latest perlesque/sprixel)? alternatively, I could build/install one just for perlesque/sprixel. 22:57
phenny diakopter: I'll pass that on when sorear is around.
diakopter hey reddit, I'm a doofus
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....tor_tablet 22:58
ecza: a702187 | sorear++ | lib/ (2 files):
Allow exceptions to pass to coroutine dynamic callers (#17)
pmurias diakopter: niecza works on 2.8.1
masak I'm not sure we've ever been as present in social media as we have been today. Reddit, HN, Twitter... 22:59
sorear I seem to have accidentally depended on some aspect of gmcs 2.8+'s generic type inference
phenny sorear: 22:57Z <diakopter> ask sorear (and moritz_) would you mind if I upgraded mono on host04 to 2.8 (for latest perlesque/sprixel)? alternatively, I could build/install one just for perlesque/sprixel.
23:00 Psyche^ left, tty234 joined
diakopter pmurias: okay... but what's installed on host04 is 2.6.something 23:00
pmurias: so my question to sorear/moritz was "can I upgrade mono on my own server?" :P 23:01
fsdo server
to be precise, fsuo (for some *use* of) "server" 23:02
I mean, maybe there's a mono 2.8 installed someplace I don't know about 23:03
sorear pmurias: you don't seem to have actually committed anything for if $expr -> $true { }
diakopter but the system one is 2.6
flussence attempts to answer that last reddit comment
pmurias sorear: i noticed that right now, pushed 23:04
23:05 araujo left 23:06 araujo joined 23:07 jferrero joined 23:08 glow left
flussence masak: what did you just tell me and tadzik? :) 23:08
masak man, that was quick. 23:09
to be fair, he deserves it. :/
(we're discussing this: www.reddit.com/r/programming/commen...ll/c1armxe )
flussence I know :)
masak note, though, that I'm not attacking *him*.
kinda. 23:10
lue masak: It's only because I haven't bothered to go "does this need backtracking?" for every regex in my grammar yet :) .
masak lue: the general rule of thumb is that backtracking should be off by default and only switched on when you've determined you need it.
lue: in that sense, 'token' is a nice declarator to start with. 23:11
23:12 patrickas joined
patrickas phenny? 23:12
phenny patrickas: 03 Dec 14:23Z <smash> tell patrickas yes sir, running the scripts right now
patrickas Thanks honey! 23:13
AHOI!
masak hi patrickas! \o
patrickas masak \o/ 23:14
masak patrickas: it's that time of month again... :)
lue Is there a way of creating a 'fallback' prototoken, similar to default in given/when statements? I have the feeling I may end up using it for ambient material...
masak patrickas: and I keep thinking of the FUTURE...
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....dex_tablet 23:15
patrickas hehehe the PAST shall be left behind!
23:16 rindolf joined
rindolf Hi all. 23:16
sorear pmurias: 'if (@{$true_block->body->signature->params}) {' doesn't do what you think
rindolf Happy new year.
23:16 lichtkind joined
sorear Hello rindolf 23:16
rindolf Will there be a Rakudo Star release this month?
sorear pmurias: bare blocks have an implicit $_ parameter (possibly a STD buglet)
masak rakudo: { say $_ }(42) 23:17
p6eval rakudo : OUTPUT«42␤»
lichtkind rakudo: say 'a' x 3
p6eval rakudo : OUTPUT«aaa␤»
masak sorear: bare blocks *do* have an implicit $_? parameter.
patrickas Btw after commenting on reddit more than ever, I kind of think it is a shame that moritz++'s example that included the sequence oprator using the up to but excluding variant with Code as terminating condition ended up being the first encounter of many perople with the sequence op and perl 6, ETOOMANYNEWFEATURES 23:18
masak indeed.
sorear say 2 + 2; # *good* first example of Perl 6.
masak I almost tweeted today: "Things I learned in 2010: if you want people to have an allergic reaction to Perl 6, show them the sequence operator." 23:19
lichtkind sorear: thats how i started the ops section of my perl 6 tut :)
pmurias masak: it does but if notices that the parameter is implicit 23:20
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....dex_tablet
masak pmurias: oh, true. 23:21
rindolf: happy new year. yes, there will be a Rakudo Star release this month.
pmichaud said so.
slavik1 ooh, that's a good one :D 23:22
pmurias should i remove useless uses of eval from the spec tests?
masak that's a question for moritz_++ to answer. 23:23
slavik1 is that a good resource to use? the perlfoundation link about? it is awesome!
patrickas masak: Mabye introducing the sequence op where it is the only new concept can be much more digestable like: 0,1, sub ($a,$b) {$a+$b} ... Inf then moving onto more complex cases
masak pmurias: I'd lean towards "yes", though.
pmurias ask we have fudging now
patrickas sorear: OK, point well taken :-) 23:24
masak patrickas: even `1, 2, 4 ... Inf` is quite a bit nicer.
rindolf masak: OK, thanks.
patrickas masak: oh sure ... I meant the fibonacci example specifically
masak oh, right.
colomon I'd argue that talking about ... Inf is a mistake. 23:25
masak well, empirical evidence suggests that the fibonacci example works on mathematicians, but not on Python, C++, and Ruby people.
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....tor_tablet 23:26
colomon It made sense when the sequence operator took a Numeric value and did an implicit less than with it.
arnsholt I'd argue for using '... *' instead of '... Inf'
pmurias sorear: would optional arguments be hard?
arnsholt But of course that'd require introducing * first =)
colomon but by the current sequence def, ... Inf is in prinicple no different than saying ... "blue"
masak colomon: oh, is that your argument? then I don't buy it. 23:27
colomon (assuming your sequence is of numbers, anyway.)
masak colomon: 'Inf' is a perfect piece of documentation for any human reading that line of code.
colomon: "blue" isn't.
23:27 kaare_ left
patrickas colomon: I get why ...Inf is not as good as ... Closure but why is it inferior to ... * ? the latter is not generating a closire ? so it is not helping in your case! 23:27
23:28 timbunce left
colomon Yes, but Inf implies it has some meaning to the sequence operator, and it doesn't. It's just something that will never match. (Unless it does, of course.) 23:28
diakopter sorear: mono 2.8?
colomon rakudo: say 1, 2, Inf, 3, 4 ... Inf 23:29
p6eval rakudo : OUTPUT«12Inf␤»
colomon rakudo: say 1, 2, Inf, 3, 4 ... *
p6eval rakudo : OUTPUT«12Inf34»
colomon rakudo: say 1, 2, *, 3, 4 ... *
patrickas colomon: same with ...*
p6eval rakudo : OUTPUT«12Whatever()<0x5a78d88>34»
23:29 mdxi joined, c1sung joined, charsbr_ joined, eternaleye joined, sjohnson joined
colomon no, ... * explicitly means "there is no terminal condition" 23:30
23:30 Psyche^ joined, Psyche^ is now known as Patterner
masak colomon: I don't program to please the sequence operator. I program to make my code readable. `1, 2, 4 ... Inf` is readable. 23:30
colomon: and don't come telling me it *doesn't* stop at infinity. :P 23:31
23:31 IRSeekBot joined
sorear pmurias: optional arguments are already available? 23:32
patrickas colomon: I just think the "less guessing required with ... Inf" for people reading their first perl6 code ever is a win even if they happen to be accidentally parse it correctly for the wrong reasons. 23:33
masak colomon: I'm not catering to the newcomer in writing "Inf". I'm using a value which I think represents the endpoint of my sequence more accurately than "*". your objection stems from being too intimate with the actual implementation of the sequence operator. 23:35
patrickas not that I am advicating it is better used in actual code, just as a first contact in tutorials with the ... op
23:35 timbunce joined
colomon masak: I'm telling you that 1, 2, 4 ... Inf looks great, and is probably slightly more comprehensible to someone who knows nothing about Perl 6 -- but it gives a false impression of why it works, and that's apt to cause trouble further down the line. 23:35
masak I agree with what you say up until the double dashes.
pmurias sorear: nice 23:36
masak as long as the meaning is received rightly, I don't care what impressions it gives as to the inner workings of infix:<...>. it's up to each and every programmer to educate themselves in how their language works.
arnsholt The educator also has a certain degree of responsibility to make sure the student understands as much as possible 23:37
masak put differently, I'm not willing to dumb my code down just because it might help other people learn Perl 6 better. I want to explore using Perl 6 as an unhampered tool for expressing algorithms nicely. 23:38
23:39 timbunce left
dalek ecza: 346f7a3 | pmurias++ | docs/nam.pod:
[nam] document ann
23:40
ecza: 2b5ec16 | pmurias++ | / (2 files):
Missing part of d9e873f971397e132986c4cde663de461fde5dad
ecza: 3ded8fd | sorear++ | / (7 files):
Merge remote branch 'pmurias/master'
ecza: 229e491 | sorear++ | / (2 files):
Fix whitespace
pmurias masak: if something is meant as an evangelizing blog post using every little Perl 6 trick might not the best thing
23:41 silug left
masak pmurias: of course not. 23:41
but we're talking about `1, 2, 4, ... Inf` here, and the fact that `Inf` *really* means "a value that won't ever match" seems less important to me than the fact that it conveys "and it goes arbitrarily high" to the unacquainted user. 23:42
sorear yes, much more readable than 1, 2, 4, ..., -1/12 23:43
masak and even slightly more readable than `1, 2, 4 ... *`, in my opinion.
patrickas or 1,2,4 ... 9 for that matter :-)
masak because the star there is a Perl 6 idiom.
Tene rakudo: say (1,2,4 ... 9)[1..10] 23:44
p6eval rakudo : OUTPUT«2481632641282565121024␤»
Tene rakudo: say (1,2,4 ... -42)[1..10]
p6eval rakudo : OUTPUT«2481632641282565121024␤»
masak the point that "blue", or "-1/12", or "9" all would work similarly well, is well taken.
I still prefer "Inf" in this case.
YMMV.
Tene rakudo: say Inf > 10
p6eval rakudo : OUTPUT«Bool::True␤»
Tene rakudo: say -Inf > 10
p6eval rakudo : OUTPUT«Bool::False␤»
patrickas I suppose if the user is already familiar with "Whatever" colomon's point has more weight, I am just getting the feeling it is a shame that people are meeting it for the first time around the sequence operator. 23:45
23:45 timbunce joined
patrickas masak: I mention 9 because I am still of two minds about it 23:45
masak Tene: having "Inf" and "-Inf" in the language as numeric values is a real asset, too. some algorithms expressed in language that don't have those contain lines of contortions to compensate for that lack. 23:46
in Perl 6, those algorithms sometimes get embarassingly simple.
ooh, I can definitely see a use for KeyHash[Num, Inf] now. 23:47
lue if it were a long time ago, I'd point out that * is two less characters to type, and saves space. :)
colomon o?
masak so maybe it is a good idea to keep the $default parameter there.
23:48 plobsing left, silug joined
masak but I still think it should default to ::T.^default 23:48
colomon: there are some graph algorithms where hashes essentially start with all values at Inf...
lue nom time, bye! o/
23:49 plobsing joined
colomon masak: ooo, cool. 23:49
colomon is trying to figure out how to elegantly work with rings of stones.
23:50 timbunce left
patrickas Anyways, good night, belated merry xmas and early happy new year to all ! :-) 23:50
colomon merry new year!
masak heh. it seems that p4 will be the big test for people. :) 23:51
colomon really? I think p5 is worse.
Tene masak: To me, it feels like a language wart that unterminated sequences don't use that parameter.
23:51 patrickas left
masak colomon: I'm not ready to say too much before the contest ends, but I essentially screwed up and made p3 easier than I had planned. 23:51
colomon p3 did seem very easy. 23:52
Tene If you're not expecting it to terminate, then it shouldn't be checking against anything at all, not just "something that I as the programmer know will never match"
masak Tene: I know what you mean.
Tene: with Inf, it should be easy enough to put in an optimization...
Tene masak: Intuitively, I'd suspect something like "In the case that the compiler can determine that it will never match, an implementation is allowed to generate items without checking for termination conditions" or something... 23:53
masak something like that.
Tene Feels kind of like it's not factored out quite right, though, but that may just be a consequence of fitting such a variety of behaviour in ...
23:53 GinoMan_ joined
colomon but note that it can't do that in the general case, because Inf is a value that might actually be reached. 23:53
masak nod. 23:54
Tene What operations generate Inf instead of NaN?
colomon rakudo: say 1/0
p6eval rakudo : OUTPUT«Inf␤»
23:54 Patterner left
Tene I thought that was supposed to generate NaN? 23:54
pmurias what is else -> $c {...} supposed to do?
Tene Perhaps I misremembered.
pmurias: context?
23:55 Psyche^ joined, Psyche^ is now known as Patterner
dalek ast: 4ad13e0 | pmurias++ | S04-statements/if.t:
remove test case duplicated in S04-statement-modifiers/if.t
23:55
ast: f256af3 | pmurias++ | S04-statements/if.t:
add fudge markers for niecza
pmurias if 1 {} else -> $c { what is $c supposed to contain }?
masak Tene: my maths sense also tells me that should give NaN. but IEEE-something disagrees, IIRC. 23:56
colomon and remember the sequence operator is general -- it can be a sequence of anything, generated by any arbitrary function.
Tene pmurias: If anything, I'd expect it to contain the value of the last condition to not match.
pmurias it does that 23:57
sorear: what's a bit funny is that the test for notbinding $_ didn't notice the bug
23:58 GinoMan_ left 23:59 timbunce joined