Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-06-13

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 rocket_guatemala joined #perl6
00:00 TimToady since it should just return a list object of some sort that .say can handle
00:00 japhb That bug is getting in the way of a perfectly insane JAPH, so it needs to be fixed IMMEDIATELY.  ;-)
00:01 * japhb looks pointedly at a currently on vacation bug fixer.
00:01 TimToady look at it this way, if you go in and fix the code, you'll be even more insane, which makes the JAPH more insane too
00:01 japhb heh
00:01 * japhb tries to weasel out ...  <meekly> $day_job </meekly>
00:02 TimToady it's after work hours
00:02 japhb Of course, that didn't stop me from working on the JAPH in the first place.  :-)
00:03 japhb dangit, I want comb in P5.
00:03 rocket_guatemala hey, perl -n -e '...' should wrap the code with: while (=<>) { ... }    right?
00:03 japhb rocket_guatemala: fishop is no longer.
00:04 japhb for $*IN.lines { ... } is preferred.
00:04 rocket_guatemala japhb: ¿fishop?
00:05 japhb (and yes, in Perl 6 it is lazy, unlike in Perl 5, where you would fill all of RAM if you sucked in a big file)
00:05 japhb =<>
00:05 japhb (looks like a fish)
00:05 japhb s/it is lazy/that for loop is lazy/
00:06 rocket_guatemala ahh, ok, thanks, ill update the spec test POD acordingly
00:07 rocket_guatemala ohh, one more question, shouldn't the for use $*ARGFILES instead of $*IN?
00:07 rocket_guatemala like this for $*ARGFILES.lines { ... }
00:07 rocket_guatemala ?
00:08 japhb Probably.  I haven't followed the latest changes to the special vars, but that sounds right.
00:08 rocket_guatemala thanks, ill use $*ARGFILES instead in the POD
00:08 TimToady for lines() {...} is supposed to do that
00:09 japhb TimToady: ah, thanks, I'd forgotten about that magic
00:09 TimToady or for (lines) {...}
00:09 TimToady unfortunately you can't say for lines {...}
00:10 TimToady std: for lines {...}
00:10 p6eval std 27073:  ( no output )
00:10 TimToady std: for lines {...}; 42
00:10 p6eval std 27073: OUTPUT«##### PARSE FAILED #####␤Function 'lines' needs parens to avoid gobbling block at /tmp/a4yCbffTle line 1:␤------> [32mfor lines[31m {...}; 42[0m␤Missing block (apparently gobbled by 'lines') at /tmp/a4yCbffTle line 1:␤------> [32mfor lines {...}[31m; 42[0m␤    expecting any
00:10 p6eval ..o…
00:10 rocket_guatemala so, lines without arguments uses the files from the command line, or the stdin, right?
00:11 TimToady supposed to, so if you know @ARGS is empty, then you can use lines() instead of $*IN.lines
00:11 Sunbeam[Pinged] joined #Perl6
00:18 pugs_svn r27074 | rocket++ | Moved test to the corresponding spec folder and added smartlinks.
00:18 revdiablo joined #perl6
00:22 revdiablo joined #perl6
00:43 rocket_guatemala left #perl6
01:12 pmichaud I'm guessing that rakudo doesn't know how to parallel-dispatch >>.()
01:13 pmichaud rakudo:  my @code = { say 'Hello' }, { say 'Goodbye' }; @code>>.();
01:13 p6eval rakudo de1e9f:  ( no output )
01:21 StephenPollei rakudo: my $cod = { say 'coi lo mi pendo'} ; $cod.();
01:21 p6eval rakudo de1e9f: OUTPUT«coi lo mi pendo␤»
02:30 cognominal joined #perl6
02:35 justatheory joined #perl6
03:20 donaldh joined #perl6
03:40 dalek rakudo: 4d21e2a | pmichaud++ | build/PARROT_REVISION:
03:40 dalek rakudo: Bump PARROT_REVISION.
03:40 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4d21e2a707c3f1854ee500edcc93121dc66ba225
03:53 meppuru joined #perl6
03:58 bejuryu joined #perl6
04:10 buubot joined #perl6
04:12 kate21de joined #perl6
04:23 eternaleye joined #perl6
04:39 justatheory joined #perl6
04:43 ihrd joined #perl6
04:43 eternaleye joined #perl6
04:45 ihrd left #perl6
04:54 eternaleye joined #perl6
05:01 unitxt joined #perl6
05:04 ejs joined #perl6
05:09 amoc joined #perl6
05:10 justatheory joined #perl6
05:16 amoc__ joined #perl6
05:40 pugs_svn r27075 | lwall++ | [STD etc.] various buglets
05:50 eternaleye joined #perl6
05:53 eternaleye joined #perl6
06:23 molaf joined #perl6
06:48 viklund joined #perl6
07:00 moritz_ rakudo: say 1.Str ~~ Str
07:00 p6eval rakudo 4d21e2: OUTPUT«1␤»
07:00 moritz_ rakudo: say 1.Str ~~ Int
07:00 p6eval rakudo 4d21e2: OUTPUT«0␤»
07:01 moritz_ so how should I write a test for RT #66366?
07:15 viklund hmm
07:15 viklund rakudo: 1.Str.say
07:15 p6eval rakudo 4d21e2: OUTPUT«Int()<0xb6860de8>␤»
07:15 viklund rakudo: 1.Str.WHAT
07:15 p6eval rakudo 4d21e2:  ( no output )
07:15 viklund rakudo: say 1.Str.WHAT
07:15 p6eval rakudo 4d21e2: OUTPUT«Str()␤»
07:15 viklund rakudo: my $s=1.Str; say $s
07:15 p6eval rakudo 4d21e2: OUTPUT«Int()<0xb6858cf8>␤»
07:16 viklund rakudo: my $s=1.Str; say $s ~~ 1
07:16 p6eval rakudo 4d21e2: OUTPUT«0␤»
07:16 moritz_ rakudo: say 1.Str.PARROT
07:16 p6eval rakudo 4d21e2: OUTPUT«String␤»
07:16 moritz_ rakudo: say "1".PARROT
07:16 p6eval rakudo 4d21e2: OUTPUT«Str␤»
07:16 viklund aha!
07:16 viklund anyway, the problem is that it is Objects str method that is called
07:17 viklund rakudo: my $s=1.Str; say $s ~~ 'Int'
07:17 p6eval rakudo 4d21e2: OUTPUT«0␤»
07:17 viklund rakudo: my $s=1.Str; say $s ~~/Int/
07:17 p6eval rakudo 4d21e2: OUTPUT«Int␤»
07:17 viklund rakudo: my $s=1.Str; say $s ~~ /Int/
07:17 p6eval rakudo 4d21e2: OUTPUT«Int␤»
07:17 moritz_ rakudo: my $s=1.Str; say ?($s ~~/Int/)
07:17 p6eval rakudo 4d21e2: OUTPUT«1␤»
07:18 moritz_ that might be a possible test
07:18 viklund yes
07:18 moritz_ viklund++
07:18 viklund moritz_++ # For actually writing the tests
07:20 donaldh joined #perl6
07:21 viklund rakudo: 3.2.say
07:21 p6eval rakudo 4d21e2: OUTPUT«3.2␤»
07:21 viklund rakudo: 3.2.Str.say
07:21 p6eval rakudo 4d21e2: OUTPUT«Num()<0xb6816b30>␤»
07:22 viklund pfft
07:22 viklund rakudo: "string".Str.say
07:22 p6eval rakudo 4d21e2: OUTPUT«Str()<0xb6862f20>␤»
07:22 viklund wacka, wacka, wacka
07:22 viklund moritz_: while your at it add those as well
07:22 viklund rakudo: my $s=1.Str; say ?($s ~~/^1$/)
07:23 p6eval rakudo 4d21e2: OUTPUT«0␤»
07:23 viklund a positive test on what it should be must be better, right?
07:48 LCamel joined #perl6
07:51 moritz_ viklund: right
07:53 Elder_Hax joined #Perl6
07:56 Tene moritz_: I might have a new feature for you to test soon.
07:57 Tene I have an implementation of async {}, but it crashes because of a Parrot bug.
08:04 kate21de1 joined #perl6
08:06 moritz_ Tene: nice
08:06 mberends Tene: async would be terrific. Will it share variables between threads or keep separate copies?
08:07 moritz_ Tene: there are basic tests in t/spec/S17-async/async.t, I just haven't check them for up-to-dateness yet
08:17 Guest75822 joined #perl6
08:17 mj41 joined #perl6
08:20 moritz_ rakudo: 1.Str ~~ / ^ 1 $ /
08:20 p6eval rakudo 4d21e2:  ( no output )
08:21 moritz_ rakudo: say 1.Str ~~ / ^ 1 $ /
08:21 p6eval rakudo 4d21e2: OUTPUT«␤»
08:21 mberends ok, S17 says variables are shared (back to perlothrtut and 5.005) and that ithreads were a "historical diversion".
08:23 sri_kraih joined #perl6
08:24 rfordinal joined #perl6
08:26 barney joined #perl6
09:01 pugs_svn r27076 | moritz++ | [t/spec] RT #66366 - 1.Str is not a good Str
09:02 amoc joined #perl6
09:04 agentzh joined #perl6
09:06 moritz_ rakudo: Perl::Grammar.parse('say(2)') && print $/.perl
09:06 p6eval rakudo 4d21e2: OUTPUT«Null PMC access in invoke()␤in Main (/tmp/2B5JWpQwxO:2)␤»
09:13 M_o_C joined #perl6
09:14 mberends rakudo: Perl6::Grammar.parse('say(2)') && print $/
09:14 p6eval rakudo 4d21e2: OUTPUT«say(2)»
09:14 mberends rakudo: Perl6::Grammar.parse('say(2)') && print $/.perl
09:14 p6eval rakudo 4d21e2: OUTPUT«Method 'perl' not found for invocant of class 'Perl6;Grammar'␤»
09:16 moritz_ rakudo: say "hello".flip.PARROT
09:16 p6eval rakudo 4d21e2: OUTPUT«String␤»
09:16 moritz_ rakudo: say "hello".flip.lc.PARROT
09:16 p6eval rakudo 4d21e2: OUTPUT«String␤»
09:16 moritz_ rakudo: say "hello".flip.lc.trans('a' => 'A')
09:16 p6eval rakudo 4d21e2: OUTPUT«too few arguments passed (2) - 3 params expected␤in Main (/tmp/b3XlcLxWwG:2)␤»
09:16 moritz_ rakudo: say "hello".lc.trans('a' => 'A')
09:16 p6eval rakudo 4d21e2: OUTPUT«too few arguments passed (2) - 3 params expected␤in Main (/tmp/uOrBtqi790:2)␤»
09:17 moritz_ rakudo: say "hello".lc.flip
09:17 p6eval rakudo 4d21e2: OUTPUT«olleh␤»
09:19 pugs_svn r27077 | moritz++ | [t/spec] RT #66366, .flip.trans barfs
10:04 agentzh left #perl6
10:04 mib_gb4d0q joined #perl6
10:12 viklund how do i produce the unicode eqv of >> and <<?
10:12 viklund I know there's a keycombination somewhere...
10:13 mberends AltGr-Z and AltGr-X in Gnome
10:14 viklund mberends: ok...
10:15 mberends that really needs to be documented for different GUIs
10:17 viklund I need to rebind my xmonad char...
10:31 DanielC joined #perl6
10:48 mberends DanielC++ # hi, nice Josephus blog
10:48 DanielC o/
10:48 DanielC thanks :-)
10:49 DanielC It sparked some discussion that ended up in a new Perl 6 feature :-)
10:49 DanielC .rotate
10:50 mberends indeed. that is probably unique to P6: evolving to adapt to the needs of programmers
10:50 moritz_ it's not unique - only its speed is unique
10:50 DanielC yeah
10:50 moritz_ (I mean the speed of adaption, not the execution speed ;-)
10:51 DanielC All languages evolve. Ruby learned a lot from Smalltalk and Perl 5 and made improvements. Perl 6 learned a lot from Ruby and Haskell and made improvements.
10:51 DanielC Perl 6 really seems to be going in a good direction.
10:52 DanielC But yes, right now Perl 6 is evolving fastest.
10:52 mberends moritz_, DanielC : that's more like wot i meant ;)
10:53 mberends and it feels like a privilege to be a member of that process
10:53 DanielC yeah
10:53 DanielC It really does.
10:54 moritz_ a privilege that you "paid" for by contributing ;-)
10:54 DanielC It's well worth it. :-)
10:54 Khisanth an established language changing rapidly would be very annoying ...
10:55 mberends the threshold for contributing is fortunately so low, beginning with trying to use it for something new, asking for help...
10:55 moritz_ Khisanth: right. But many languages are first designed, then released to the public... which means it's more work to change anything later on
10:56 Khisanth hmm whether this is good or bad remains to be seen :)
10:59 mberends Khisanth: the growing corpus of applications that people do not want to be broken by change will add inertia, as is the case with Perl 5.
10:59 pugs_svn r27078 | moritz++ | [t/spec] a few unfudges for Rakudo
11:05 dalek rakudo: e167c92 | moritz++ | t/spectest.data:
11:05 dalek rakudo: 3 more files for spectest.t
11:05 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e167c92456b31d6f6c81f6d31d1c4fe5bcfebce2
11:08 DanielC mberends: Have you updated parrot-module-lib ?
11:09 DanielC mberends: I've added some interesting stuff for the metadata file.
11:18 * mberends git pulls...
11:19 DanielC back in 3min
11:20 donaldh joined #perl6
11:23 DanielC back
11:24 mberends DanielC: what was the rationale behind the yaml -> S-expressions switch?
11:25 DanielC Easier to parse.
11:25 DanielC I already added a grammar.
11:26 DanielC It is also easy to extract an s-expression from inside a larger s-expression.
11:27 DanielC Just read one character at a time and read brackets. An open bracket is +1, a close bracket is -1. When the counter hits 0 you are done reading.
11:27 DanielC Then you can pass whatever string you have to the s-expression parser.
11:29 DanielC And besides, with proper indentation, the s-expression is no more difficult to read for the human. I showed the YAML and the s-expression to my fiancee. She is not familiar with either format, and she found the s-expression easier to read, thanks to the more liberal use of indentation.
11:30 mberends ok, so if you start in the middle and come to a line with ))))))), you don't try to match all the parens, just count down to 0 nesting.
11:31 DanielC Yeah, like if you want to read all the files about a module, if you can start with "(module" it is easy to make a dumb function that reads all the information for that module as a string so you can give it to the parser.
11:32 mberends yes, that's the most frequent search by far
11:32 DanielC You said earlier that the index file would work by storing a byte offset in the metadata file.
11:33 DanielC In that case, reading the proper subset of the metadata is as easy as counting brackets.
11:38 DanielC I'm upgrading Ubuntu. I'll have to reboot soon.
11:39 mberends ok, gotta do some more removals work too.
11:49 synth joined #perl6
11:49 Whiteknight joined #perl6
11:51 DanielC joined #perl6
11:52 DanielC Upgrade successful!
11:52 mberends :)
11:52 DanielC Ubuntu++
11:52 DanielC Anyways, how do you feel about s-expressions?
11:53 amoc joined #perl6
11:57 mberends initially surprised, but that's ok. the nearest practical experience was assisting someone with AutoCad scripting many years ago. It may be easier or harder, but as we're working in a modular fashion, there's no problem replacing that part if necessary. the balancing delimiters give it some of the characteristics of xml, which has resulted in some inefficient implementations, but we're in charge of what goes into the data files, so our parser can be
11:57 mberends lean and mean.
11:58 DanielC Earlier this week I realized that even a very limited subset of YAML would be hard to parse, so I began exploring alternatives.
11:59 mberends good, these are the pragmatic choices that keep delivering progress
11:59 DanielC I considered XML, SOX, JSON and there was always something I didn't like about it. Eventually I arrived at S-expressions.
12:00 mberends but if, say, another contributor does propose another format with advantages, that will be fine too.
12:01 DanielC We can consider other formats of course.
12:02 DanielC What led me to S-expressions was pragmatic considerations. It is the easiest thing to parse that I could find.
12:02 mberends it's probably time to move the subroutine source code into either src/ or lib/
12:02 DanielC yeah
12:02 DanielC Either src/ or lib/ is fine with me.
12:02 mberends or have both, src/ for .pir and .pg, and lib/ for .pbc
12:03 DanielC ok
12:03 DanielC sounds goo
12:03 DanielC *good
12:03 molaf joined #perl6
12:04 DanielC Did you run "make grammar"? Did that work for you?
12:05 mberends yes, that worked. nearly every project uses the name grammar.pg, so a rename to something meaningful for the content would be nice.
12:06 DanielC module-metadata.pg ?
12:06 mberends yes, quite appropriate.
12:08 mberends btw, which tool do you use to write the html docs?
12:08 DanielC a text editor.
12:08 DanielC You mean the .html fie in the git repository?
12:08 mberends ok, just thought some of the css might have been autogenerated
12:09 DanielC nope
12:09 DanielC Is it that bad? :-)
12:09 mberends certainly not! more tool dependencies becomes more maintenance overhead
12:10 DanielC :-)
12:10 DanielC I have never seen a .html editor I like.
12:10 DanielC They always make crappy html
12:10 mberends ditto
12:10 viklund joined #perl6
12:11 moritz_ same here - which is why I wrote my own offline CMS
12:12 DanielC mberends: I have moved the .pg and .pir files. I don't know how to fix the Makefile.
12:12 DanielC I know that the right solution is to have a Makefile in src/ and have he other Makefile call it, but I don't know how to do that.
12:13 mberends DanielC: it's ok to leave the Makefile in the project base dir
12:13 iblechbot joined #perl6
12:13 mberends multiple Makefiles would not help us much
12:14 DanielC ok
12:14 DanielC You are the expert.
12:15 mberends oh noes, just hoping to keep it simple :)
12:15 DanielC grammar: src/moule-metadata.pg   <-- what's wrong with this line?  (Makefile)
12:16 DanielC oh!
12:16 DanielC I'm an idiot.
12:16 DanielC I can't spell module.
12:16 amoc__ joined #perl6
12:17 DanielC Ok, makefile fixed.
12:18 mberends sorry, work afk &
12:25 viklund DanielC: you do know that there's a json parser in the parrot tree, right?
12:26 DanielC viklund: Nope, actually I didn't.
12:26 viklund it's in compilers/json/
12:26 viklund also check out t/compilers/json/ for tests
12:26 DanielC Oh well, S-expressions look better :-)
12:27 * viklund mutters
12:27 DanielC But if S-expressions don't work, I'll grab json.
12:27 DanielC For the things we want, either format would be fine.
12:27 DanielC It's just some basic metadata.
12:27 viklund yes, I just thought I'd tell you...
12:27 DanielC Yeah, thanks.
12:28 viklund I wonder what happens if I use that parser in  rakudo...
12:28 * DanielC looks at the json tests
12:28 viklund I've already fixed moritz_ JSON::Tiny
12:28 DanielC Oh! Right. So Rakudo should be able to read Json.
12:28 viklund yes
12:29 DanielC Awsum
12:29 viklund we have a pure-perl6 module and there is that parrot thing which might also be usable
12:30 DanielC In Json tests, what is the difference between from_parrot.t and to_parrot.t?
12:30 viklund I have no idea, I haven't used it
12:30 DanielC They both say "JSON->Parrot conversion"
12:30 viklund just seen that it's there
12:30 DanielC I was hoping that there would be a two-way conversion.
12:31 DanielC I think the description might be wrong in from_parrot.t
12:31 viklund DanielC: I do too
12:31 viklund anyway
12:31 viklund lunch &
12:31 DanielC From the file name, that looks like converting parrot to json, not json to parrot.
12:56 skids_ joined #perl6
13:00 ruoso joined #perl6
13:09 lichtkind joined #perl6
13:15 payload joined #perl6
13:16 lichtkind any  elf people here?
13:23 viklund joined #perl6
13:23 DanielC viklund!
13:23 DanielC viklund: I think we can make the json idea work.
13:28 viklund DanielC: ok
13:28 viklund nice
13:29 DanielC viklund: JSON shares the property of s-expressions that you can extract a subset by counting brackets, and the subset will still be valid json.
13:29 viklund I'll make sure that we can both produce and consume JSON in rakudo
13:29 viklund that's a nice property
13:29 DanielC Very important for what we are doing.
13:30 viklund isn't that true for YAML as well, but it's on indentation level instead of parens?
13:30 DanielC We can extract a subset of the metadata with a fairly simple function.
13:31 viklund if we for the moment disregard that YAML is a little bit harder to parse
13:31 DanielC The same would not be true for a generic YAML document. Think about how you would implement the concept of "indentation" if you are reading the document one byte at a time.
13:31 DanielC It can be done, but it is much less straight forward.
13:31 DanielC It's not a simple counter.
13:32 viklund it isn't?
13:32 DanielC Open bracket is +1, close bracket is -1, when the counter hits 0 you are finished.
13:32 viklund yes, you need two counters
13:32 viklund one for indentation level and one for, ehm, the bracket equivalent
13:33 viklund anyway, I'm not trying to convince you to use YAML
13:33 DanielC How do you compute the indentation level? Think about that.
13:33 DanielC Look for a new line character, count spaces, and figure out how many spaces make up one indentation level.
13:34 DanielC Compare that with just checking if the current character is '(' or ')'
13:34 viklund count spaces after nl... (ok, three counters, one for the number of spaces since last nl, one for the number of spaces on then last line and one for the bracket eqiv)
13:35 viklund yes, but it still has the property that sub-YAML is YAML
13:35 viklund which was my point
13:35 DanielC And figure out that "\n\s\s-\sfoo" and "\n\s\s\s\sbar" have the same indentation level.
13:35 viklund yeah, yeah, your talking about details in parsing, I wasn't saying we should do it
13:36 viklund I'll see if we can use that Parrot json in rakudo ;)
13:36 DanielC Well, yes, I'm talking about the details of actually getting the thing to work :-)
13:36 viklund pfft
13:37 mizioumt joined #perl6
13:37 DanielC The reason I started looking for alternatives is that I realized that even a very simplified subset of YAML would still be hard to parse.
13:37 DanielC Remember, we have an assembly-type language here.
13:37 viklund yes, that's what masak said too ;)
13:37 DanielC Yeah.
13:38 DanielC That's when I set out to find something that is easier to parse with the tools we have.
13:40 DanielC Easy to parse++
13:40 DanielC :-)
13:40 DanielC Laziness++
13:47 viklund splice is incredibly slow in rakudo atm
13:47 DanielC :-(
13:48 viklund @s.shift for ^10 is a lot faster than @s.splice(0,10)
13:48 lambdabot Unknown command, try @list
13:49 viklund it differs around a factor of 4 in speed with 10 elems
14:05 DanielC viklund: Btw, we were right, from_parrot.t actually shows how to convert Parrot to JSON.
14:05 DanielC So Parrot offers a two-way conversion to Json.
14:05 DanielC Very nice.
14:12 payload joined #perl6
14:13 viklund yes, it is
14:14 DanielC Currently I think Json looks like the most promising option.
14:15 DanielC (1) We can extract a subset by counting brackets and (2) we get a two-way conversion for free.
14:17 viklund (3) There's a half Perl6 module for it
14:17 DanielC mberends wants to do everything in PIR.
14:18 viklund yes, but having the ability to do stuff from p6 can't hurt ;)
14:18 DanielC sure
14:20 meppl joined #perl6
14:29 payload1 joined #perl6
14:31 bejuryu joined #perl6
15:01 FurnaceBoy joined #perl6
15:02 FurnaceBoy joined #perl6
15:13 amoc joined #perl6
15:18 justatheory joined #perl6
15:19 lichtkind ruoso: PING
15:20 donaldh joined #perl6
15:22 simcop2387 joined #perl6
15:24 jferrero joined #perl6
15:28 viklund compiling...
15:29 DanielC joined #perl6
16:02 elmex joined #perl6
16:21 payload joined #perl6
16:29 Psyche^ joined #perl6
16:29 Sexygirl joined #perl6
16:31 amoc__ joined #perl6
16:40 Sexygirl joined #perl6
16:42 icwiener joined #perl6
16:54 lollan joined #perl6
17:07 DanielC joined #perl6
17:22 perl7 joined #perl6
17:23 nihiliad joined #perl6
17:23 DanielC I need help with git. How do you undo a commit?
17:24 viklund_ DanielC: check out the previous one
17:24 DanielC how?
17:24 viklund_ I think you can do it with 'git co ^HEAD'
17:25 DanielC Git is an idiot. It doesn't give me the option to cancel a commit before it's done.
17:25 viklund_ huh?
17:25 viklund_ you can reset the index
17:25 DanielC I actually haven't committed yet, but git sent me straight to the editor so all I can do is type in a comment.
17:25 DanielC How?
17:26 viklund_ if you quit without saving, I think it doesn't commit
17:26 DanielC I want to undo/erase the last commit.
17:26 viklund_ have you commited or not?
17:26 DanielC yeah, I have
17:26 viklund_ ok
17:26 viklund_ git co ^HEAD
17:26 viklund_ checkout
17:26 viklund_ sry, git checkout ^HEAD
17:27 viklund_ I think
17:27 DanielC git checkout ^HEAD  => error: pathspec 't/^HEAD' did not match any file(s)
17:27 viklund_ ahh
17:27 viklund_ git-reset seems to be what you want
17:27 viklund_ git reset --hard HEAD^
17:28 DanielC command not found: git-reset
17:28 viklund_ http://www.kernel.org/pub/software/scm/git/docs/git-reset.html
17:28 viklund_ what?
17:28 nihiliad left #perl6
17:28 DanielC Ok, it seems to have done something.
17:28 viklund_ not found?
17:28 DanielC The -
17:28 DanielC git-reset vs git reset
17:28 viklund_ both should work
17:29 DanielC git-reset does not.
17:29 nihiliad joined #perl6
17:29 viklund_ oh, well, they do here, your distributor must repackage git and remove them
17:29 viklund_ somehow
17:29 DanielC wait... FUCK
17:30 DanielC git actually reverted my changes.
17:30 DanielC I just lost my work.
17:30 DanielC I wanted to undo the commit, but that doesn't mean "delete my work".
17:30 * DanielC re-types his work
17:30 * DanielC grumbles
17:30 viklund_ sry
17:30 * viklund_ ducks
17:31 viklund_ it was --soft you needed
17:31 viklund_ viklund_--
17:31 DanielC thanks, I know now for next time.
17:31 viklund_ I should have asked what you wanted more specifically before answering with --hard...
17:31 DanielC No worries.
17:32 DanielC There wasn't that much in the patch anyways.
17:32 DanielC I got lucky.
17:32 * viklund_ exhales
17:32 DanielC :-)
17:33 viklund_ anyway, my JSON-generator is comming along nicely
17:33 DanielC Json for rakudo?
17:33 viklund_ yep
17:33 viklund_ parsing works I hope, now it's only generation left
17:33 DanielC Good stuff. Make it into a module so people can download it.
17:34 viklund_ oh, its in moritz_++ github repo
17:35 viklund_ it's very un-pp right now though
17:35 DanielC un-pp ?
17:35 viklund_ un-pretty-printed
17:35 DanielC ok
17:46 nihiliad left #perl6
17:46 synth joined #perl6
17:53 synth joined #perl6
17:57 unitxt left #perl6
17:58 nihiliad joined #perl6
18:00 SteppenwolfII joined #perl6
18:06 hcchien joined #perl6
18:06 pugs_svn joined #perl6
18:06 AzureStone joined #perl6
18:06 japhb joined #perl6
18:06 cls_bsd joined #perl6
18:06 jdv79 joined #perl6
18:06 PacoLinux joined #perl6
18:06 Khisanth joined #perl6
18:06 Lorn joined #perl6
18:06 gabiruh joined #perl6
18:06 cxreg joined #perl6
18:10 viklund_ Ha
18:10 viklund_ rakudo: say False ~~ False
18:10 p6eval rakudo e167c9: OUTPUT«0␤»
18:10 viklund_ rakudo: say True ~~ True
18:10 p6eval rakudo e167c9: OUTPUT«1␤»
18:11 viklund_ I buy that, but how do I test that I really get a False?
18:11 viklund_ rakudos Test.pm:is_deeply needs updating
18:13 TimToady rakudo: say False.WHAT.Str
18:13 p6eval rakudo e167c9: OUTPUT«Bool()<0x85b36d0>␤»
18:13 TimToady say False.int
18:13 viklund_ last_ditch_stringify...
18:13 TimToady rakudo say False.int
18:13 TimToady rakudo: say False.int
18:13 TimToady geh
18:13 p6eval rakudo e167c9: OUTPUT«0␤»
18:13 TimToady rakudo: say False.int ~~ 0
18:13 p6eval rakudo e167c9: OUTPUT«1␤»
18:14 viklund_ that's a way
18:14 viklund_ thx TimToady++
18:14 TimToady rakudo: say False.Str
18:14 p6eval rakudo e167c9: OUTPUT«Bool()<0xb67d0b48>␤»
18:14 TimToady that's wrong
18:14 viklund_ is_deeply doesn't look at Bools at all
18:14 TimToady rakudo say ~False
18:14 TimToady rakudo: say ~False
18:14 p6eval rakudo e167c9: OUTPUT«0␤»
18:15 TimToady that's better, but they ought to be the same
18:15 TimToady rakudo: say False.name
18:15 p6eval rakudo e167c9: OUTPUT«Method 'name' not found for invocant of class ''␤»
18:15 TimToady unimpl, i guess
18:16 viklund_ yes, and it's been like that since, uhm, at least Tuesday
18:17 viklund_ rakudo: say ~False ~~ ~False
18:17 p6eval rakudo e167c9: OUTPUT«1␤»
18:17 viklund_ rakudo: say ~True ~~ ~True
18:17 p6eval rakudo e167c9: OUTPUT«1␤»
18:17 viklund_ rakudo: say ~True ~~ ~False
18:18 p6eval rakudo e167c9: OUTPUT«0␤»
18:18 viklund_ rakudo: say ~False ~~ ~True
18:18 viklund_ for completeness
18:18 p6eval rakudo e167c9: OUTPUT«0␤»
18:18 pochi joined #perl6
18:18 TimToady viklund++
18:19 TimToady biab &
18:20 Khisanth joined #perl6
18:23 StephenPollei hmm S02 mention Bit but not Bool as far as I sw, maybe I was blind, I'm trying to get list of types to test for there existence for http://svn.pugscode.org/pugs/t/spec/S02-builtin_data_types/declare.t
18:24 TimToady S02 mentions Bool
18:25 TimToady well, see src/perl6/CORE.pmc for the names that STD knows
18:25 StephenPollei I most of have been blind, I'll double double check check, because obviously I missed at least one thing
18:25 StephenPollei ok thanks
18:25 TimToady line 977
18:28 viklund_ is {} a hash or a block?
18:28 viklund_ rakudo: {}.WHAT.say
18:28 p6eval rakudo e167c9: OUTPUT«Hash()␤»
18:28 viklund_ hmm
18:28 viklund_ rakudo: {;}.WHAT.say
18:28 p6eval rakudo e167c9: OUTPUT«Block()␤»
18:29 viklund_ good
18:29 viklund_ rakudo: { }.WHAT.say
18:29 p6eval rakudo e167c9: OUTPUT«Hash()␤»
18:36 breinbaas hello. Anyone know whe
18:37 breinbaas sorry, wrong channel
18:37 StephenPollei hmm I must really be blind `find . -name CORE.pmc -print` didn't find anything either, you are talking about git://github.com/rakudo/rakudo.git
18:38 viklund_ it's in pugs svn I think
18:38 vreg joined #perl6
18:39 StephenPollei pugs/src/perl6/CORE.pad found but not CORE.pm
18:40 StephenPollei it has list of types as well though, perhaps CORE.pm is generated file and I've only built rakido not pugs
18:50 viklund_ is this correct behaviour:
18:50 pochi joined #perl6
18:50 viklund_ rakudo: my $s; $s.map(**2)
18:50 p6eval rakudo e167c9: OUTPUT«Use of uninitialized value␤»
18:50 viklund_ rakudo: my $s; $s.grep({$^s}).map(**2)
18:50 p6eval rakudo e167c9:  ( no output )
18:51 viklund_ it probably is
18:52 icwiener_ joined #perl6
18:55 TimToady sorry, CORE.pad
18:55 pmurias joined #perl6
18:56 pmurias DanielC: how do you think perl6 borrowed from ruby?
18:57 TimToady rakudo: say **.WHAT
18:57 p6eval rakudo e167c9: OUTPUT«!whatever_closure␤»
18:57 StephenPollei not a problem TimToady,  also CORE.pad only has 374 lines, I apologize if I ask dumb questions though trying to get up to speed
18:58 TimToady it's not (yet) generated, though presumably reflects (part of) what a compiler would spit out
18:58 TimToady I don't think rakudo knows about the ** term yet
18:59 viklund_ rakudo: my $s=2; $s.grep({$^s}).map(**2)
18:59 p6eval rakudo e167c9:  ( no output )
18:59 TimToady rakudo: say WHAT(**)
18:59 p6eval rakudo e167c9: OUTPUT«Statement not terminated properly at line 2, near "*)"␤in Main (src/gen_setting.pm:0)␤»
18:59 viklund_ rakudo: my $s=2; say $s.grep({$^s}).map(**2)
18:59 TimToady no, it doesn't
18:59 p6eval rakudo e167c9: OUTPUT«4␤»
18:59 viklund_ that works ;)
18:59 TimToady std: **2
18:59 p6eval std 27078: OUTPUT«##### PARSE FAILED #####␤Syntax error (two terms in a row?) at /tmp/cLbQQ4jh1z line 1:␤------> [32m**[31m2[0m␤    expecting any of:␤      POST␤   infix or meta-infix␤        infix stopper␤    postfix␤        postfix_prefix_meta_operator␤       standard stopper␤ statement
18:59 p6eval ..modifier loop␤  terminator␤     whitespace…
18:59 TimToady it shouldn't
18:59 DanielC pmurias: Everything is an object.
18:59 TimToady well, ruby's not the only language where that's true
19:00 TimToady but perhaps ruby put on a bit more pressure than the other languages
19:00 DanielC TimToady: afaik Ruby took that idea form Smaltalk, didn't it?
19:00 TimToady yes
19:01 DanielC So you can say that Perl 6 borrows from either Smalltalk or Ruby (pick one :)
19:01 TimToady why only one? :)
19:01 DanielC :)
19:01 TimToady can you think of anything else?
19:02 DanielC Not right now.
19:02 TimToady twigils, kinda
19:02 TimToady ruby uses sigils for what p6 uses twigils for
19:02 DanielC I didn't realize Ruby had twigils :-)
19:02 DanielC ah, yes.
19:02 TimToady to indicate weird scoping
19:03 DanielC Yeah, like @ means "object attribute"
19:03 TimToady but the problem with using sigils for that is you quickly run out of keys on the keyboard
19:03 TimToady and @@
19:03 pmurias unless you are crazy enough to use alphanumerics :)
19:04 TimToady another one, the *idea* of marking mutators, but not the specific syntax
19:04 DanielC pmurias: Any variable with the letter "e" is global :-)
19:05 pmurias :)
19:05 TimToady and if it starts with i,j,k,l...
19:08 FurnaceBoy :)
19:10 TimToady I remember being astounded the first time I looked at a Fortran program, and saw:
19:10 TimToady i=x
19:10 TimToady x=i
19:10 DanielC ???  That doesn't swap x and i does it?
19:11 TimToady nope
19:11 DanielC phew
19:11 StephenPollei a through j were intergers the rest reals or something... I think it rounds it
19:11 DanielC So "i" is always an integer?
19:12 StephenPollei hence the joke God is real unless declared integer
19:12 TimToady yes, unless you changed your IMPLICIT declaration  :/
19:12 StephenPollei I think unless declared otherwise it's always int
19:13 DanielC That is so weird.
19:13 DanielC I can't imagine why anyone would design a language like that.
19:13 StephenPollei terseness and they needed some variable of each type
19:14 TimToady think of what fortran means
19:14 TimToady Formula Translator
19:14 TimToady mathematicians know that i is an integer :)
19:14 viklund_ DanielC: Now we have JSON::Tiny for rakudo: http://github.com/moritz/json
19:14 DanielC *click*
19:15 viklund_ the only thing missing is pod :(
19:15 DanielC Good work.
19:16 DanielC Why is it "Tiny" ?
19:16 viklund_ ::Grammar and ::Actions were more or less done by moritz_, I only fixed a few bugs
19:16 viklund_ ask moritz_
19:16 viklund_ it doesn't have all the features of the p5 JSON::PP?
19:17 viklund_ afk supper
19:20 donaldh joined #perl6
19:20 ejs joined #perl6
19:58 justatheory joined #perl6
20:21 Limbic_Region joined #perl6
20:25 Chillance joined #perl6
20:35 payload joined #perl6
20:38 jlaire joined #perl6
20:46 moritz_ "tiny" because it tries to do as little as possible
20:46 moritz_ ie not constructing user defined objects or so
20:49 StephenPollei laziness is a virtue
21:11 justatheory joined #perl6
21:19 lichtkind still no elf people here?
21:20 pmurias lichtkind: mncharity is rarely here nowdays
21:21 lichtkind pmurias: does that mean he isnt active?
21:21 pmurias not anymore
21:24 lichtkind hm
21:25 pmurias lichtkind: that did you want to ask about elf?
21:25 lichtkind pmurias: some general questions for the perl 6 interpreter page on november
21:27 lichtkind pmurias: do you have some insights?
22:09 payload joined #perl6
22:11 ponyup joined #perl6
22:29 buubot joined #perl6
22:31 ponyup left #perl6
22:31 pmichaud Good afternoon, #perl6
22:49 molaf_x joined #perl6
22:52 StephenPollei rakudo: my True $foo; $foo.isa(True).say
22:52 p6eval rakudo e167c9: OUTPUT«1␤»
22:52 StephenPollei pugs: my True $foo; $foo.isa(True).say
22:52 p6eval pugs: OUTPUT«␤»
22:53 StephenPollei hmm didn't expect True and False to be types is that correct?
22:53 dalek rakudo: 77f9d70 | pmichaud++ | docs/ (2 files):
22:53 dalek rakudo: Some more updates in preparation for Thursday's release.
22:53 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/77f9d7094ae9fef8664cdb154fb8510617a4bd13
22:54 sri_kraih joined #perl6
22:54 pmichaud right now Rakudo doesn't really handle True/False correctly.
22:54 pmichaud we've been waiting to get a bit more of an official determination as to what they are exactly, and how they relate to .Bool, .true, etc.
22:55 pmichaud at one point Bool was an enum (maybe it still is?), and so the True/False values were part of the enumeration (and thus acted like types)
22:56 StephenPollei ok just going through this right now to see what are types http://svn.pugscode.org/pugs/src/perl6/CORE.pad
22:56 StephenPollei some of it is stuff not in the synopsis as far as I saw so far
22:57 pmichaud that's almost certainly true.
22:58 StephenPollei so I also don't know if my tests would be good tests
23:00 TimToady lichtkind: mncharity is one of my "hares"; blaze of speed for several days, then a several week snooze till the next sprint.
23:00 sjohnson as opposed to a toady!
23:01 sjohnson well, turtle
23:01 TimToady that woudl be a torty
23:01 TimToady *would
23:01 sjohnson heheh
23:01 sjohnson TimTorty
23:02 sjohnson TimToady: OT question.. but do you know any sleight of hand with playing cards?
23:02 sjohnson you seem to also like my other hobbies
23:02 sjohnson maybe there's a chance you're good at this too
23:02 StephenPollei pugs: my Proxy $foo; $foo.isa(Proxy).say
23:02 p6eval pugs: OUTPUT«1␤»
23:02 StephenPollei like that .. is it pugs specific or does it have a generic purpose?
23:03 StephenPollei rakudo: my Proxy $foo; $foo.isa(Proxy).say
23:03 p6eval rakudo e167c9: OUTPUT«Malformed declaration at line 2, near "Proxy $foo"␤in Main (src/gen_setting.pm:0)␤»
23:03 lichtkind TimToady: thanks
23:03 TimToady sjohnson: not really, wasn't raised playing cards much
23:04 sjohnson TimToady: i recorded this last night at 4am with birds chirping.. can you see the secret?  http://www.youtube.com/watch?v=R3Yke-hWABU
23:05 TimToady there's a single mention of Proxy in S06
23:05 TimToady don't have flash
23:06 StephenPollei OH ok then it's just I don't know the synopsys stuff well enough
23:06 TimToady that's what grep is for :)
23:07 TimToady or ack
23:07 TimToady buubot: spack Proxy
23:07 buubot Couldn't match input.
23:07 StephenPollei ack? did you mean ask?
23:07 TimToady er, wrong bot
23:07 TimToady phenny: spack Proxy
23:07 StephenPollei oh ok I don't know the bots here well
23:08 TimToady oh, I killed it
23:08 sjohnson TimToady: maybe another time then
23:08 TimToady ack is a recursive grep
23:08 StephenPollei I forget where the the synopsis stuff is stored as files I just use http://perlcabal.org/syn/ .. will search
23:09 TimToady if you have a pubs repo, it's just in docs/Perl6/Spec
23:10 TimToady I just leave a window parked there, so I don't have to remember
23:11 pmichaud I usually do   http://svn.pugscode.org/pugs/docs/Perl6/Spec
23:11 pmichaud (keep it bookmarked in the browser)
23:12 ruoso joined #perl6
23:13 TimToady doesn't help with the grep though...
23:20 M_o_C joined #perl6
23:21 donaldh joined #perl6
23:21 lichtkind good night
23:22 sjohnson TimToady: do you drink? ie, a beer at a Perl conference from time to time?
23:24 StephenPollei ok yes I found it
23:35 DanielC @seen mberends
23:35 lambdabot mberends is in #perl6. I last heard mberends speak 11h 17m 8s ago.
23:35 DanielC :(
23:36 DanielC @seen masak
23:36 lambdabot I saw masak leaving #perl6 1d 3h 44m 35s ago, and .
23:39 TimToady sjohnson: mostly I try to have a glass of wine every day because my family history of heart disease
23:39 TimToady also have to be careful with beer, since some of it is wheat based, and I'm allergic to wheat
23:40 sjohnson maybe someday i will get to buy you a non-wheat based beer
23:40 TimToady (nice thing about German beer is that it must be labelled as wheat beer if it is.)
23:41 TimToady but around here you have to be careful
23:41 DanielC I have never enjoyed beer. Everybody seems to like it, and it appears to be the standard drink of hackers, but I don't like it at all. I'm weird.
23:41 DanielC I enjoy various wines and cocktail drinks.
23:46 StephenPollei rakudo: my Matcher $foo; $foo.isa(Matcher).say
23:46 p6eval rakudo 77f9d7: OUTPUT«Method 'isa' not found for invocant of class ''␤»
23:46 sjohnson DanielC: how many beers have you had in your life? it took me around 20 or so before i really enjoyed it
23:46 StephenPollei rakudo: my Role $foo; $foo.isa(Role).say
23:46 p6eval rakudo 77f9d7: OUTPUT«Method 'isa' not found for invocant of class ''␤»
23:46 sjohnson so there was a transition phase
23:47 DanielC sjohnson: I have had a lot less than 20. My attitude is, if I don't like the first one, why should I drink another 19 to make myself like it? Liking beer is not a goal in my life.
23:47 synth joined #perl6
23:48 DanielC sjohnson: I have probably had around 4-5 beers in my life.
23:48 sjohnson a cold beer feels very nice on a hot summer day
23:48 sjohnson if someone offers you one cause that's all they have, then the acquiring of the taste is worth it
23:48 TimToady I've had enough of them to know that there's a difference between a good amount of hops and too many :)
23:49 sjohnson ie, too spicy?
23:49 DanielC One when I was younger, one in university, one on a trip to Poland, and one at my fiancee's home because her dad brought me a beer and I didn't want to say "no".
23:49 TimToady no, too bitter
23:49 TimToady I like the bitter to balance with the rest of the flavor, not dominate it
23:49 * araujo wonders if TimToady writes specs and drinks at the same time
23:49 StephenPollei OT best beer I've ever had was when I went to Belgium
23:49 DanielC A cold lemonade probably feels nicer on a hot day.
23:50 TimToady araujo: if I do, I review the next morning before sending it off :)
23:50 sjohnson StephenPollei: i've heard that too
23:51 araujo TimToady, hahaha
23:51 DanielC sjohnson: Most of the time, people have clean running water at home. I like water. If the only artificial drink someone has is beer, I will be happy with water.
23:53 TimToady there are parts of the world where you'd better expect to get acquainted with the local microfauna before you can appreciate the local water... :)
23:53 sjohnson mexico is a good example
23:53 sjohnson well, bottled water will do
23:53 sjohnson in mexico, it's almost impossible to get drunk
23:53 sjohnson it's so hot out i wonder if the alcohol is sweating out of my pores
23:54 DanielC TimToady: I know. I am originally Venezuelan. You don't drink tap water there, but most middle class people have a filter or something.
23:55 DanielC TimToady: The bigger problem is that some Venezuelans might be offended if you ask for water. Because water is so cheap, they feel like you asked for nothing.
23:55 sjohnson all this beer talk is making me thirsty
23:55 DanielC Which is stupid IMHO. I honestly like water.
23:56 sjohnson yeah i like water too
23:56 TimToady people don't value cheap software much either :)
23:56 DanielC :-)
23:56 sjohnson well i paid for my copy of perl
23:57 DanielC sjohnson: did you really?
23:58 sjohnson nah just kidding around
23:58 sjohnson although, if it was bundled with the camel book 5th edition for 19.99, i would have paid for it
23:58 sjohnson in book form though
23:58 sjohnson i got my boss to pay for it at work, but it was quite expensive unfortunately
23:59 sjohnson but the value gained from me actually knowing how to program in it, it was worth it
23:59 DanielC The book?
23:59 sjohnson yeah
23:59 * DanielC checks in amazon
23:59 sjohnson amazon has it nicely priced
23:59 sjohnson yeah, if he bought it from amazon

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo