Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-09-15

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:18 yarp joined #perl6
00:19 japhb_ joined #perl6
00:27 Timbus joined #perl6
00:47 MikeFair joined #perl6
01:10 jakzale joined #perl6
01:12 fgomez joined #perl6
01:14 jakzale Hi, has anyone tried building rakudo 2012.08 using --with-parrot and --with-nqp options?
01:15 sorear I think I did
01:15 sorear it didn't work, so I tried again with just --gen-nqp
01:18 jakzale ok, is the configure.pl script supposed to install nqp as well -- do I need to run it with necessary permissions, or can split the process like when using make?
01:20 sorear The compiler dev releases are not entirely intended to be installed system-wide
01:21 TimToady I never install rakudo, except as a subdirectory; I just symlink /usr/local/bin/perl6 to that
01:22 jakzale is it just --prefix=path?
01:23 TimToady the default 'make install' is local
01:23 sorear unlike most configure systems, rakudo does not default to /usr/local
01:23 TimToady local directory
01:23 sorear it defaults to $PWD/install
01:23 TimToady gah, current directory
01:24 TimToady sorear++ for precision :)
01:25 sorear jakzale: you are aware of the difference between the rakudo dev releases and rakudo star?
01:25 jakzale ok, my bad
01:25 jakzale i was talking about rakudo star 2012.08
01:26 sorear aah
01:26 sorear I have never tried to build rakudo star so I can't help as much
01:26 TimToady most of us here don't eat that brand of dogfood...
01:26 TimToady since we're mostly on the bleeding edge
01:28 sorear and there's another compiler which for some reason I'm much more familiar with than rakudo
01:31 jakzale another thing when building rakudo dev, is there any difference between nqp which comes with parrot and the nqp from --gen-nqp?
01:33 japhb The nqp from --gen-nqp is a much newer generation.
01:33 japhb Oh, and ...
01:33 japhb o/
01:35 japhb Spoke with my $day-job's web designer about the perl6.org websites again this afternoon.  This time he seemed to be focused on making connections with different groups of people,
01:35 japhb and helping them get what they are looking for.
01:36 japhb For example, for the landing page of perl6.org, he suggested we needed to recognize different groups that may be curious about Perl 6 and give those people different ways to make their own connection with Perl 6.
01:38 japhb He gave as examples: young kids, old *nix hackers, language design enthusiasts, web developers, data analysts, etc.
01:38 TimToady a web page with TMTOWTDI, who'd'a thunk... :)
01:38 japhb Yeah, strange, right?  :-)
01:38 TimToady I think I like the way your web designer thinks...
01:38 japhb Ditto that.
01:39 TimToady obviously old *nix hackers should be redirected to perl6.museum  :)
01:39 japhb heh
01:40 japhb From another angle, he talked about getting people looking for different kinds of information:  Looking for reference documentation for a particular function, class, etc.; looking for the general flavor of the language; looking for snippets of usable code that they can tinker with, and so on.
01:41 japhb But in particular, allowing people to move between those views:
01:42 japhb Someone comes in trying to get a feel for Perl 6.  He's a data analyst, so he says "How would I go about parsing Apache logs?" for instance.  We have a small grammar that does something like that (parsing line-oriented logs), with some explanatory text.  But importantly, links into the reference documentation where appropriate, so he can learn bit-by-bit how to mold that grammar to do his bidding.
01:43 japhb And in the reference documentation, links back to samples that say "Here's how this particular language feature gets used in larger context."
01:44 japhb To answer the question: Given the technical difference between regex, token, and rule, how do they interact in a real grammar?
01:44 JimmyZ joined #perl6
01:44 japhb We also had a thread of discussion about people who want to know *why* Perl 6 is the way it is.
01:45 japhb As he said: "A language this strongly mutable probably has a deep unifying reason for it.  People coming to perl6.org ought to be able to discover that, and learn more about how the overarching design motif comes out in individual features."
01:46 japhb (Well, not quite a quote, but pretty similar I think.)
01:47 * japhb is trying to remember other parts of the conversation -- it was pretty dense.
01:47 japhb I left with a bit of a swimming head.
01:53 japhb Oh, there was a short discussion about using Camelia in a stronger way in the website design.  Not just like a logo, but embracing it in a deeper way.  He talked about a "garden of ideas", a metaphor for how the ideas embraced by Perl 6 flowered into the features and designs of the language.  Our butterfly serving as a host to an exploration of @Larry's mental model.
01:53 JimmyZ joined #perl6
01:54 FROGGS_ joined #perl6
01:55 japhb When I mentioned that I seemed to recall someone (TimToady?) coming up with a genus/species designation for Camelia, he pounced on it as a fun thing for people to explore.  Turn something that some people view as "kid-friendly but adult-unfriendly" into "kid-friendly and adult-awesome".  Which takes a lot of care, but can be very effective.
01:56 japhb Basically, turn Camelia from a simple thing that is all to easy to ignore to something with a lot of depth that people want to play with.
01:58 sorear http://irclog.perlgeek.de/​perl6/2011-03-24#i_3421422
01:59 flightrecorder joined #perl6
01:59 skids jakzale: I had no problems with --gen-nqp on star 2012-08
01:59 japhb Ah, so PerlJam++ was the one
01:59 * geekosaur just misread Canada for Camelia... oy
02:00 sorear sometimes it's very easy to search the logs
02:00 sorear /lepid
02:00 skids jakzale: my config.status: /usr/bin/perl Configure.pl "--prefix=/usr/local" "--gen-parrot" "--gen-nqp" "--parrot-option=--optimize" $*
02:02 jakzale skids: does configure.pl attempt to build and install nqp and parrot?
02:06 orafu joined #perl6
02:08 cbk joined #perl6
02:21 jaldhar joined #perl6
02:38 the joined #perl6
02:39 skids jakzale: yes.  I assume you were online when you tried?
02:39 jaldhar joined #perl6
02:39 jakzale joined #perl6
02:40 raiph phenny: tell Moritz https://gist.github.com/3662771
02:40 phenny raiph: I'll pass that on when Moritz is around.
02:45 lichtkind joined #perl6
02:46 lichtkind does anybody know which rosetta example larry used in YAPC::EUß
02:50 sorear lichtkind: sorting
02:50 sorear merge sort, I think
02:50 lichtkind http://rosettacode.org/wiki/​Sorting_algorithms/Bead_sort
02:50 sorear I assume you meant his keynote
02:50 lichtkind bead sort
02:50 lichtkind yes
02:50 sorear no, it was not merge sort
02:51 lichtkind i found it through history of user:timtoady
02:51 lichtkind really?
02:51 sorear strand sort.
02:51 sorear it was strand sort.
02:52 sorear http://rosettacode.org/wiki/S​orting_algorithms/Strand_sort
02:52 lichtkind yes user timtoady was on 95h august on that topic
02:52 lichtkind thanks a lot
02:53 lichtkind did you got my last message for you regarding err/orlese ?
02:54 sorear yes
02:54 lichtkind great
02:55 lichtkind good night
03:07 Circlepuller_ joined #perl6
03:26 diakopter seen mberends
03:26 aloha mberends was last seen in #perl6 31 days 2 hours ago joining the channel.
03:26 diakopter seen fglock
03:26 aloha fglock was last seen in #perl6 3 days 9 hours ago joining the channel.
03:26 diakopter seen pmurias
03:26 aloha pmurias was last seen in #perl6 3 days 11 hours ago saying "jnthn: how do I hook it a js backend to nqp?".
03:26 diakopter seen pmichaud
03:26 aloha pmichaud was last seen in #perl6 1 days 13 hours ago joining the channel.
03:27 diakopter seen diakopter
03:27 aloha diakopter was last seen in #perl6 0 seconds ago saying "seen diakopter".
03:27 diakopter seen aloha
03:27 aloha aloha was last seen in #parrot 9 hours 41 mins ago joining the channel.
03:27 diakopter seen #parrot
03:27 aloha #parrot was last seen in  15598 days 3 hours ago .
04:10 xinming joined #perl6
04:14 telex joined #perl6
04:16 ironcamel joined #perl6
04:22 thou joined #perl6
04:25 JimmyZ joined #perl6
04:34 Alpha64 joined #perl6
04:34 Alpha64 hello
04:35 sorear Hello Alpha64 and welcome to #perl6.
04:35 Alpha64 i saw this cool feature of perl6 but it gives "Constant type declarator not yet implemented"
04:35 Alpha64 what does that mean? feature not implemented or what?
04:35 sorear r: constant texas_pi = 3;
04:36 p6eval rakudo d62461:  ( no output )
04:36 sorear yes, it means feature not implemented
04:36 Alpha64 http://ideone.com/NqWd6
04:36 Alpha64 ;_;
04:36 telex joined #perl6
04:36 sorear r: constant @fib = 0
04:36 p6eval rakudo d62461:  ( no output )
04:36 sorear seems to work.
04:36 sorear what's your perl6 -v ?
04:37 Alpha64 no idea, just using ideone
04:37 Alpha64 rakudo-2010.08
04:38 Alpha64 that might be a problem hahaha 2010
04:41 sorear yeaaaaahhhhhh
04:42 Alpha64 i'm staying on the channel since i want to learn this new stuff anyway
04:50 Alpha64 it works on the latest ver of rakudo :D
04:51 JimmyZ :)
05:00 mdupont joined #perl6
05:13 Circlepuller joined #perl6
05:21 benabik joined #perl6
05:26 abercrombie joined #perl6
05:48 kaare__ joined #perl6
06:36 dalek niecza: d67e96f | sorear++ | lib/ (10 files):
06:36 dalek niecza: Move all [CORESaved] statics to instance variables of Compartment
06:36 dalek niecza:
06:36 dalek niecza: More static variable removal.
06:36 dalek niecza: review: https://github.com/sorear/niecza/commit/d67e96f3ef
06:40 FROGGS_ good morning
06:43 sorear o/
06:51 zby_home joined #perl6
06:52 wamba joined #perl6
07:24 dalek niecza: 2ae0f72 | sorear++ | lib/ (4 files):
07:24 dalek niecza: Move most of the [CompartmentGlobal] stuff into the compartment object
07:24 dalek niecza: review: https://github.com/sorear/niecza/commit/2ae0f72a8c
07:26 tadzik joined #perl6
07:39 yarp joined #perl6
07:46 mucker joined #perl6
07:48 yarp_ joined #perl6
07:52 tadzik sorear: re device, I think I'll just ask the Oslo office when I get to work on mon/tue
07:57 sorear o/ tadzik
07:58 tadzik sorear: o/
08:07 dalek niecza: c3c572b | sorear++ | lib/ (4 files):
08:07 dalek niecza: Move remaining [CompartmentGlobal]s into Compartment and retire CompartmentGlobal system
08:07 dalek niecza: review: https://github.com/sorear/niecza/commit/c3c572b1ca
08:13 snearch joined #perl6
08:17 GlitchMr joined #perl6
08:17 FROGGS_ jnthn, arnsholt: what do you think about that? https://github.com/FROGGS/​zavolaj/commit/8d9afca6d0
08:18 FROGGS_ needs a bit improvement though
08:20 Psyche^ joined #perl6
08:26 tadzik joined #perl6
08:35 sqirrel joined #perl6
08:43 GlitchMr Just wondering, when http://perlcabal.org/~/ will be updated to include my public_html
08:43 GlitchMr Is it even updated?
08:44 Timbus To update this listing, run perl gen.pl in pugs/docs/feather/~ and wait for the automatic update.
08:45 GlitchMr (and why I cannot SSH login on perlcabal.org... does anybody use 100% of CPU or something)
08:45 GlitchMr Even HTTP seems slow
08:55 GlitchMr Linux feather 2.6.32-5-amd64 #1 SMP Mon Mar 7 21:35:22 UTC 2011 x86_64
08:55 GlitchMr ok, so I have feeling I managed to login... after 10 minutes
08:55 GlitchMr (now I'm waiting for shell to appear)
08:59 GlitchMr Now I see MOTD
09:00 GlitchMr uhmmm... fun
09:00 GlitchMr Where is my shell?
09:03 moritz GlitchMr: if you find out which process consumes so many resources, let me know and I'll kill it
09:03 phenny moritz: 02:40Z <raiph> tell moritz https://gist.github.com/3662771
09:04 * FROGGS_ .oO( please hold the line, your packets will be transferred to the next free shell )
09:06 tadzik_home joined #perl6
09:06 tadzik_home hello #perl6
09:06 * tadzik_home tries to run htop on feather now
09:06 sorear hello tadzik_home
09:06 sorear who killed feather?
09:06 tadzik_home if it's my weechat again, I'm ditching this crap forever
09:10 leont joined #perl6
09:10 sorear o/ leont
09:11 leont Good * to you too
09:11 GlitchMr I'm at shell
09:11 GlitchMr But it's so slow that I don't see letters
09:11 tadzik_home GlitchMr: please just `killall -9 weechat-curses`
09:12 tadzik_home just in case
09:12 GlitchMr I have typed "top" and enter just in case
09:12 tadzik_home and it should be lightweight enough for feather to handle
09:12 GlitchMr Perhaps I will see results in 10 minutes
09:12 GlitchMr tadzik_home: I use weechat at my PC
09:12 GlitchMr Not on feather
09:13 GlitchMr ok, bash now runs "top"
09:13 GlitchMr (well, at least I see "top" in shell)
09:13 GlitchMr But for it to actually run, I have to wait
09:24 tadzik_home Juerd timeouts. We're doomed :)
09:24 arnsholt o/
09:25 dalek glitchmr.github.com: 147f76c | GlitchMr++ | index.css:
09:25 dalek glitchmr.github.com: Add <h3> and <h4> CSS style
09:25 dalek glitchmr.github.com: review: https://github.com/GlitchMr/glitc​hmr.github.com/commit/147f76c9a2
09:25 GlitchMr I'm still waiting for "top"
09:25 GlitchMr Also, I have feeling I shouldn't add my website to dalek ;-)
09:26 GlitchMr PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
09:26 tadzik_home I don't see a reason for that, frankly :)
09:26 GlitchMr 10858 sergot    20   0 82604 2796  492 D   0,7  0,2   0:08.63 perl6
09:26 GlitchMr huh?
09:27 tadzik_home cronjobs
09:27 tadzik_home probably
09:27 tadzik_home but, wait, 0.7 CPU and 0.2 MEM
09:27 tadzik_home doesn't sound _that_ bad
09:27 GlitchMr https://gist.github.com/3727106
09:27 GlitchMr but... feather runs lots of processes
09:27 GlitchMr What?
09:28 GlitchMr What's going on
09:28 tadzik_home "just" network latency?
09:28 sorear 8067 p6eval    20   0  338m 3092  620 D   0,3  0,3   0:32.02 perl
09:28 GlitchMr That would make sense
09:28 tadzik_home oh, look
09:28 sorear 5433 p6eval    20   0 1969m 856m 1416 D   0,4 72,9   1:06.95 mono
09:28 tadzik_home right
09:28 tadzik_home that's plenty of ram :)
09:28 GlitchMr Huge network latency
09:29 GlitchMr Wait... 1969MB
09:29 GlitchMr what?
09:29 GlitchMr This is probably the reason
09:29 sorear kill it.
09:29 sorear if you can.
09:29 GlitchMr I cannot
09:29 tadzik_home look at load average :D
09:29 GlitchMr It's not my process
09:30 sorear OTOH
09:30 sorear KiB Swap:  2686060 total,  2227680 used,   458380 free,    18512 cached
09:30 tadzik_home evalbot restart
09:30 GlitchMr But perhaps...
09:30 tadzik_home how do I say this
09:30 sorear tadzik_home: don't
09:30 sorear tadzik_home: the evalbot runs on feather3
09:30 tadzik_home ah, ok
09:30 sorear tadzik_home: this could only be the rebuild process
09:30 sorear so clearly it's my fault, I caused the niecza rebuild
09:30 GlitchMr n: say "Are you rebuilt?"
09:30 p6eval niecza v21-5-gd67e96f: OUTPUT«Are you rebuilt?␤»
09:30 moritz well, we should probably ulimit it
09:31 moritz I still don't have a shell to kill that process :(
09:32 GlitchMr moritz: it took me 20 minutes to get shell access
09:32 GlitchMr Because it's so slow
09:32 tadzik_home everybody logout
09:32 tadzik_home maybe them moritz can get access :)
09:32 sorear here's a radical idea
09:33 moritz sorear: are you logged in?
09:33 sorear after the process is killed, let's run swapoff on feather.
09:33 tadzik_home or maybe everybody login, and _someone_ will get the cpu time :P
09:33 sorear moritz: no :(
09:33 GlitchMr tadzik_home: I have shell, but I cannot kill that process
09:33 sorear because with 1.2 GiB feather *does not need swap*
09:33 sorear and all it does is slow stuff down
09:33 sorear well
09:33 tadzik_home agreed
09:33 sorear hmm
09:33 moritz uhm
09:33 tadzik_home OOM is usually better than swapping
09:34 tadzik_home at least the system is usable
09:34 moritz if we can still build rakudo then, +1
09:34 GlitchMr Also, usually feather isn't slow when somebody uses 99% of CPU
09:34 moritz yes, it's only the swapping
09:34 sorear also, let's serialize the rebuilds
09:34 GlitchMr ok, it's now faster
09:35 tadzik_home yes
09:35 GlitchMr Reboot?
09:35 tadzik_home no
09:35 GlitchMr I can see that we lost 70 days of uptime
09:35 Juerd joined #perl6
09:35 tadzik_home Sorry, user tjs is not allowed to execute '/usr/bin/killall mono' as root on feather.
09:35 tadzik_home :(
09:35 sorear sorear@feather:~$ uptime 11:35:44 up 1 min,  6 users,  load average: 4.16, 1.35, 0.47
09:36 tadzik_home oh, there's been reboot alright
09:36 sergot joined #perl6
09:36 Juerd rehi
09:36 Juerd I decided to just reboot when I couldn't even log in on the console anymore :)
09:36 sergot hi o/
09:36 tadzik_home reasonable choice, probably :)
09:36 sorear Juerd: can we do something to make the kernel not give so much priority to swapping processes?
09:36 GlitchMr Juerd: well, I have managed to log in after 20 minutes ;-)
09:36 topo joined #perl6
09:37 tadzik_home how do I set ulimit on myself?
09:37 Juerd sorear: No, but individuals can easily limit the amount of memory they'll use.
09:37 tadzik_home (Justin Case)
09:37 Juerd tadzik_home: man ulimit
09:37 sorear ulimit -v KILOBYTES
09:37 tadzik_home heh, thanks
09:37 GlitchMr tadzik_home: ulimit -something 21849
09:37 sorear help ulimit
09:37 moritz so, why can't I login now?
09:37 sorear not man, it's a shell builtin
09:37 tadzik_home maybe we could add some info to MOTD
09:37 GlitchMr To get -somethings, use ulimit -a
09:37 Juerd moritz: I don't know. I can login. What's the error message?
09:37 moritz Juerd: works now
09:38 moritz a minute ago it hung
09:38 sorear moritz: a minute ago Juerd rebooted feather1
09:38 Juerd no, that was 4 minutes age
09:38 Juerd ago
09:38 Juerd 11:38:17 up 4 min,  8 users,  load average: 0,36, 0,83, 0,40
09:38 Juerd Whaaaat? Commas in my load averages?
09:38 moritz weird locale?
09:38 Juerd It's not weird
09:39 sorear so, what can we set ulimit to that will stop the nieczabuild from eating 1.7 gib but allow rakudo to eat 1.7 gib?
09:39 Juerd I'd expect commas if the rest of the message were in Dutch
09:39 GlitchMr glitchmr@feather ~> uptime
09:39 GlitchMr 11:38:48 up 5 min,  8 users,  load average: 0,20, 0,73, 0,38
09:39 GlitchMr I have commas too (locale in Polish)
09:39 Juerd But English and decimal commas look weird together.
09:39 tadzik joined #perl6
09:39 tadzik it's alive! \o/
09:39 GlitchMr I have feeling it's locale
09:39 sorear I have real dots. :p
09:39 GlitchMr s/in/is/
09:39 moritz sorear: you can set a ulimit in the rebuild-niecza.{sh,pl} script in the evalbot repo
09:40 Juerd Anyhow, please don't kill feather again because the rest of the day I won't be available to reboot it :P
09:40 GlitchMr uptime uses dots or commas depending on locale. This sort of makes sense
09:40 Juerd GlitchMr: It'd make sense if it'd also use a translated line, IMO
09:40 sorear looks like niecza building takes <200MB here
09:40 sorear so something must have glitched on p6eval, as opposed to a memory regression
09:41 Juerd sorear: Don't judge by looking at top. It may have subsecond peaks.
09:41 GlitchMr I would think it's not translated to work well with utilities that parse uptime
09:41 sorear Juerd: I get  151232512  maximum resident set size from /usr/bin/time -l
09:41 GlitchMr Except that doesn't make sense
09:42 GlitchMr glitchmr@feather ~> uptime | awk '{print 0 + $9}'
09:42 GlitchMr 0
09:42 GlitchMr Code like this would work only in locales which use dot instead of comma
09:42 sorear some jerk at $dayjob gave me an 8GB computer and now I have to work to notice memory regressions
09:42 tadzik bah, I now don't remember what channels I was on :)
09:42 moritz sorear: you can always start a VM in there :-)
09:43 dalek evalbot: 86bf720 | moritz++ | build-scripts/rebuild-niecza.sh:
09:43 dalek evalbot: ulimit niecza rebuild
09:43 dalek evalbot: review: https://github.com/perl6/evalbot/commit/86bf72001a
09:43 GlitchMr :-)
09:43 GlitchMr I hope that it won't crash feather1
09:43 moritz sorear: I've run git clean -xdf in p6eval's niecza dir, and rebuilding now
09:45 dalek niecza: a216174 | sorear++ | lib/ (2 files):
09:45 dalek niecza: fix excessive replace, remove dead code
09:45 dalek niecza: review: https://github.com/sorear/niecza/commit/a216174eb3
09:47 spider-mario joined #perl6
09:48 GlitchMr hugme: help
09:48 hugme GlitchMr: (add $who to $project | list projects | show $project | hug $nickname | tweet $twittername $message )
09:48 GlitchMr hugme: list projects
09:48 hugme GlitchMr: I know about Math-Model, Math-RungeKutta, MiniDBI, bench-scripts, book, gge, hugme, ilbot, java2perl6, json, modules.perl6.org, november, nqp-rx, nqpbook, perl6, perl6-examples, perl6-wtop, proto, pugs, rakudo, star, svg-matchdumper, svg-plot, tardis, try.rakudo.org, tufte, ufo, web, yapsi
09:48 GlitchMr Just wondering, is it possible to add my projects to that list?
09:50 GlitchMr add glitchmr to hugme
09:50 GlitchMr hugme: add GlitchMr to hugme
09:50 hugme GlitchMr: You need to register with freenode first
09:50 sorear GlitchMr: hugme has never been updated since the github api v1, and I don't think it currently works at all
09:50 GlitchMr oh, ok
09:50 sorear hugme: hug GlitchMr
09:50 * hugme hugs GlitchMr
09:50 GlitchMr That sort of makes sense
09:50 sorear except that way
09:51 moritz hugme: add glitchmr to perl6
09:51 hugme moritz: You need to register with freenode first
09:51 moritz grml
09:51 GlitchMr Well, I'm registered, but hugme doesn't see that ;-)
09:52 moritz n: say 1
09:52 p6eval niecza v21-7-gc3c572b: OUTPUT«1␤»
09:52 GlitchMr Also, would it be possible to add http://glitchmr.github.com/index.xml to http://planetsix.perl.org/?
09:52 moritz GlitchMr: ping [Coke] about that when he reappears
09:52 GlitchMr ok
09:53 PacoAir joined #perl6
09:54 sorear sleep&
09:54 tadzik good knight sorear
09:58 PacoAir joined #perl6
09:59 MayDaniel joined #perl6
10:00 GlitchMr I can use set(1, 2, 3) as short form of Set.new(1, 2, 3)
10:00 GlitchMr Can I do that with KeySets too?
10:00 moritz can you?
10:00 GlitchMr (I guess not, looking at output of .perl, but I can ask, right?)
10:01 moritz what happens if you try?
10:01 tadzik :>
10:01 GlitchMr Well, I can do KeySet.new(1, 2, 3)
10:01 GlitchMr But there is nothing like keyset(1, 2, 3)
10:01 tadzik r: keyset(1, 2, 3)
10:01 p6eval rakudo d62461: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&keyset' called (line 1)␤»
10:01 tadzik n: keyset(1, 2, 3)
10:01 moritz I guess that answers your question
10:01 p6eval niecza v21-8-ga216174: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤      'keyset' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1435 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37) â�¤  at /ho…
10:01 GlitchMr I guess that if I want mutable set, I have to use .new :-)
10:02 GlitchMr Also, just wondering, but is there anything like .add and .discard from Python for KeySet in Perl 6?
10:03 tadzik I don't know what's .add and .discard
10:03 moritz phenny: tell sorear on feather1 as p6eval, niecza rebuild succeeds, but the 'mono run/Niecza.exe -C Test JSYNC Threads' throws an exception with a backtrace too long for my screen buffer
10:03 phenny moritz: I'll pass that on when sorear is around.
10:03 tadzik use Magic::The::Gathering;
10:03 GlitchMr Like https://gist.github.com/3727197
10:03 tadzik so you can add mana to your mana poll, and discard cards
10:07 GlitchMr perl6: (set(2) xx 4).perl.print
10:07 p6eval niecza v21-8-ga216174: OUTPUT«(set("2"), set("2"), set("2"), set("2")).list»
10:07 p6eval ..rakudo d62461: OUTPUT«("2", "2", "2", "2").list»
10:07 GlitchMr Is it Rakudo bug?
10:08 moritz r: say set(1).list
10:08 p6eval rakudo d62461: OUTPUT«1␤»
10:08 moritz r: say set(1).list.perl
10:08 p6eval rakudo d62461: OUTPUT«("1",).list␤»
10:08 moritz r: say set(1, 2).list.perl
10:08 p6eval rakudo d62461: OUTPUT«("1", "2").list␤»
10:08 moritz n: say set(1, 2).list.perl
10:08 p6eval niecza v21-8-ga216174: OUTPUT«("1", "2").list␤»
10:09 moritz might, or might not be
10:09 GlitchMr What if I want four sets?
10:09 moritz nr: say (set(2).item xx 4).perl
10:09 p6eval rakudo d62461, niecza v21-8-ga216174: OUTPUT«(set("2"), set("2"), set("2"), set("2")).list␤»
10:10 GlitchMr oh, ok
10:11 GlitchMr evalbot: help
10:11 GlitchMr p6eval: help
10:11 p6eval GlitchMr: Usage: <(star|pugs|nqp|b|std|niecza|rakudo|nom|npr|n|r​|perl6|prn|rn|p|rnp|nrp|pnr|rpn|p6|nr)(?^::\s) $perl6_program>
10:11 GlitchMr Why regexp?
10:12 moritz unambiguous
10:15 GlitchMr Anyways, can I append and remove entries form KeySet like I can do in Python: https://gist.github.com/3727197
10:20 dalek rakudo/nom: 286df2a | moritz++ | t/spectest.data:
10:20 dalek rakudo/nom: four more passing test files (is this Christmas? :-)
10:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/286df2a75d
10:25 inokenty left #perl6
10:26 dalek roast: b94fb84 | GlitchMr++ | S29-os/system.t:
10:26 dalek roast: Remove special casing of Microsoft Windows in system test.
10:26 dalek roast:
10:26 dalek roast: When pugs wasn't available on Windows machine, it was failing because
10:26 dalek roast: test through that on Windows the only Perl 6 implementation is pugs.
10:26 dalek roast: review: https://github.com/perl6/roast/commit/b94fb84d27
10:27 timotimo i know Reverse Polish Notation, but what are prn, rnp, nrp and pnr? ;)
10:28 GlitchMr timotimo: it's Rakudo Pugs Niecza
10:28 tadzik :)
10:37 dalek roast: de96bae | GlitchMr++ | S02-types/declare.t:
10:37 dalek roast: Unfudge KeySet test for Rakudo
10:37 dalek roast: review: https://github.com/perl6/roast/commit/de96bae506
10:46 whiteknight joined #perl6
11:05 Su-Shee_ joined #perl6
11:06 pmurias joined #perl6
11:07 pmurias jnthn: http://pastie.org/4724796 throws a strange exception
11:15 JimmyZ joined #perl6
11:19 jnthn pmurias: That looks like a (weird) case of $*W not being initialized
11:20 jnthn pmurias: Which is really odd in that it gets set up in TOP...
11:34 jnthn moritz: system.t fails here, fwiw
11:34 jnthn (will look into it)
11:37 dalek roast: bb17bbe | jnthn++ | rosettacode/ (2 files):
11:37 dalek roast: Slightly inelegant but working fix for rosettacode tests on Windows.
11:37 dalek roast: review: https://github.com/perl6/roast/commit/bb17bbe0d1
11:39 jnthn moritz: The problem seems to be that it throws an exception on the program that doesn't exist
11:41 moritz it does?
11:42 jnthn yeah
11:43 jnthn Well, on Windows it does.
11:43 jnthn It looks like the generic case also looks like it has a code path whereby it may throw an exception too
11:57 moritz that's curious
11:57 moritz I never managed to trigger that
11:58 jnthn It looks like it'd take something odd for it to do so
11:58 jnthn But on Windows it apparently will trigger more easily
11:58 jnthn Well, got some fix here. Spectesting.
12:02 dalek nqp: 1fbc5ed | jnthn++ | src/how/NQPClassHOW.pm:
12:02 dalek nqp: Cannot use say in the meta-objects, as they are compiled without the setting.
12:02 dalek nqp: review: https://github.com/perl6/nqp/commit/1fbc5ed6da
12:07 wamba joined #perl6
12:08 dalek rakudo/nom: 81edc97 | jnthn++ | src/core/control.pm:
12:08 dalek rakudo/nom: The spawnw op can in some cases throw an exception; be sure to handle it. Unbusts system.t on Windows.
12:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/81edc97f81
12:13 mucker joined #perl6
12:28 mdupont joined #perl6
12:29 mdupont joined #perl6
12:33 dalek nqp: ff65502 | jnthn++ | src/6model/reprs/P6opaque.c:
12:33 dalek nqp: Improve wording of an error.
12:33 dalek nqp: review: https://github.com/perl6/nqp/commit/ff6550265e
12:37 the joined #perl6
12:42 pmurias jnthn: NQP::World fails to get created
12:44 pmurias food&
12:52 moritz jnthn: it would be even more awesome if that error included the name of the type
12:52 moritz i mean, the actual type
12:53 jnthn moritz: hm, good point.
12:53 jnthn Should be do-able.
12:56 GlitchMr Just wondering, I have Perl 6 regexp - how can I parse it?
12:58 GlitchMr Something like Regex.parse('abc'), except Regex should be grammar
13:14 dalek std: 27570f6 | GlitchMr++ | STD.pm6:
13:14 dalek std: Propose $[*-1] instead of invalid $-1.
13:14 dalek std: review: https://github.com/perl6/std/commit/27570f6a21
13:20 skids joined #perl6
13:38 yarp joined #perl6
13:42 sergot nom: sub b(*@b) { .say for @b }; sub a(*@a) { b(@a) }; b(1,2,3)
13:42 p6eval rakudo 81edc9: OUTPUT«1␤2␤3␤»
13:42 sergot nom: sub b(*@b) { .say for @b; say @b.perl }; sub a(*@a) { b(@a) }; b(1,2,3)
13:42 p6eval rakudo 81edc9: OUTPUT«1␤2␤3␤Array.new(1, 2, 3)␤»
13:42 sergot nom: sub b(*@b) { .say for @b; say @b.perl }; sub a(*@a) { b(@a); say @a.perl }; b(1,2,3)
13:42 p6eval rakudo 81edc9: OUTPUT«1␤2␤3␤Array.new(1, 2, 3)␤»
13:43 sergot nom: sub b(*@b) { .say for @b; say @b.perl }; sub a(*@a) { b(@a); say @a.perl }; a(1,2,3)
13:43 p6eval rakudo 81edc9: OUTPUT«1␤2␤3␤Array.new(1, 2, 3)␤Array.new(1, 2, 3)␤»
13:44 sergot nom: sub b(*@b) { .say for @b; say @b.perl }; sub a(*@a) { b(@a); say @a.perl }; a((1,2,3))
13:44 p6eval rakudo 81edc9: OUTPUT«1␤2␤3␤Array.new(1, 2, 3)␤Array.new(1, 2, 3)␤»
13:46 dalek nqp: 6046125 | jnthn++ | src/pmc/nqplexpad.pmc:
13:46 dalek nqp: Update NQP lexpad to support natively typed lexicals.
13:46 dalek nqp: review: https://github.com/perl6/nqp/commit/60461257fa
13:46 dalek nqp: 6878bf4 | jnthn++ | src/QAST/Compiler.nqp:
13:46 dalek nqp: Fix/improvement to type and scope handling in QAST::Compiler.
13:46 dalek nqp: review: https://github.com/perl6/nqp/commit/6878bf46ac
13:46 dalek nqp: 0c0bab6 | jnthn++ | src/NQP/Actions.pm:
13:46 dalek nqp: Implement natively typed lexicals.
13:46 dalek nqp: review: https://github.com/perl6/nqp/commit/0c0bab62cd
13:46 dalek nqp: e417703 | jnthn++ | t/nqp/64-native.t:
13:46 dalek nqp: Add initial tests for native ints.
13:46 dalek nqp: review: https://github.com/perl6/nqp/commit/e417703242
13:47 sergot nom: sub b(*@b) { .say for @b; say @b.perl }; sub a(*@a) { b(|@a); say @a.perl }; a((1,2,3))
13:47 p6eval rakudo 81edc9: OUTPUT«1␤2␤3␤Array.new(1, 2, 3)␤Array.new(1, 2, 3)␤»
13:49 skids nom: my @a = (1); (1,@a[],1).say; (1,@a[],1).perl.say; (1,@a[],1).gist.say; # not complaining, just to bake sergot's noodle.
13:49 p6eval rakudo 81edc9: OUTPUT«1 1 1␤(1, Array.new(1), 1)␤1 1 1␤»
13:49 skids oh oops.
13:49 skids nom: my @a = (); (1,@a[],1).say; (1,@a[],1).perl.say; (1,@a[],1).gist.say; # not complaining, just to bake sergot's noodle.
13:49 p6eval rakudo 81edc9: OUTPUT«1  1␤(1, Array.new(), 1)␤1  1␤»
13:50 mucker joined #perl6
13:50 skids nom: my @a = (); (1,@a[],1).say; (1,@a[],1).perl.say; (1,@a[],1).gist.say; (1,@a[],1).join(",").say; #forgot that
13:50 p6eval rakudo 81edc9: OUTPUT«1  1␤(1, Array.new(), 1)␤1  1␤1,1␤»
13:57 pmurias jnthn: what could be causing NQP::World.BUILD to return NQPMu?
13:58 jnthn pmurias: Maybe we're calling NQPMu.new...
13:58 pmurias the BUILD in either NQP::World or HLL::World doesn't get called
13:58 jnthn pmurias: Did you try doing this by doing a "use NQP;" and then using NQP::Compiler directly, rather than doing compreg?
13:59 pmurias I'll try that
13:59 * skids suspects nqp::sha1 doesn't handle 0's in the string correctly.
14:00 pmurias how do I set the path to NQP.pbc?
14:01 jnthn --module-path=...
14:03 skids r: nqp::p6box_s(nqp::sha1("\0\0\0")).say; nqp::p6box_s(nqp::sha1("")).say # hopefully hasn't caused any issues for what it is used for
14:03 p6eval rakudo 81edc9: OUTPUT«DA39A3EE5E6B4B0D3255BFEF95601890AFD807​09␤DA39A3EE5E6B4B0D3255BFEF95601890AFD80709␤»
14:04 pmurias jnthn: there is only nqp.pbc
14:04 jnthn oh...hm
14:04 jnthn Yeah, I guess we put everything in there.
14:05 jnthn So it'd be "use nqp"
14:05 pmurias and I get an error where trying to use that (http://pastie.org/4725436)
14:07 pmurias jnthn: which seems a bit crazy as the attribute is defined in the same file
14:07 jnthn Get it here too. Hm.
14:08 pmurias there is a MAIN in the backtrace
14:08 jnthn I'll twiddle the error to tell us what type of object it's trying to use.
14:08 jnthn uh
14:09 jnthn oh..
14:09 jnthn but that's the MAIN for the current running NQP, not from the module.
14:10 pmurias right
14:11 jnthn I'm wondering if there's some weird globals related thing going on... :/
14:11 jnthn Loading the compiler while running the compiler clearly should work, and must largely work otherwise we'd not be able to use NQP to compile NQP.
14:17 crab2313 joined #perl6
14:23 jnthn pmurias: oooh..hmm.
14:23 jnthn The serialization output stuff contains...things I don't expect.
14:24 GlitchMr Also, http://perlcabal.org/ doesn't work
14:24 jnthn It may or may not be connected.
14:24 GlitchMr HTTP server doesn't seem to be turned on
14:33 wamba joined #perl6
14:48 dalek nqp: 341b6d5 | jnthn++ | src/NQP/Actions.pm:
14:48 dalek nqp: Get natively typed paramters working.
14:48 dalek nqp: review: https://github.com/perl6/nqp/commit/341b6d52ef
14:48 dalek nqp: 25f6e41 | jnthn++ | src/stage0/ (9 files):
14:48 dalek nqp: Update bootstrap so we can start using native types in the compiler.
14:48 dalek nqp: review: https://github.com/perl6/nqp/commit/25f6e413a2
14:48 dalek nqp: 105e817 | jnthn++ | src/QRegex/Cursor.nqp:
14:48 dalek nqp: Scatter some type annotations in Cursor.
14:48 dalek nqp: review: https://github.com/perl6/nqp/commit/105e817a7b
14:50 GlitchMr perl6: my @array = {a => 'b'}, {a => 'c'}; @array»<a>.perl.say
14:50 p6eval rakudo 81edc9: OUTPUT«({"a" => Failure.new(exception => X::AdHoc.new(payload => "postcircumfix:<\{ }> not defined for type Str"))}, {"a" => Failure.new(exception => X::AdHoc.new(payload => "postcircumfix:<\{ }> not defined for type Str"))})␤»
14:50 p6eval ..niecza v21-8-ga216174: OUTPUT«Unhandled exception: Cannot use hash access on an object of type Str␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting line 352 (Any.at_key @ 9) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/JpLH2Hx31y line 0 (ANON @ 1…
14:51 JimmyZ yeah, native type in NQP!
14:52 GlitchMr Why @array»<a> doesn't work?
14:53 GlitchMr Or rather, it works on hash values in array
14:53 GlitchMr Not on hashes in array
14:57 GlitchMr I know that I can use @array.map(*<a>), but why @array»<a> doesn't?
15:01 Celelibi joined #perl6
15:11 marmay joined #perl6
15:18 moritz GlitchMr: hypers recurse into hashes too
15:18 Chillance joined #perl6
15:19 benabik joined #perl6
15:19 GlitchMr moritz: this is feature, I guess?
15:20 moritz GlitchMr: yes
15:20 moritz (I don't like it, but that doesn't stop it from being a feature)
15:23 moritz jnthn++ # native types in nqp
15:25 arnsholt phenny: tell sorear Since you're on CA time (IIRC) and jnthn and I are on EU time, maybe the easiest way to start a discussion on portable NativeCall is something asynchronous, like a gist or just email?
15:25 phenny arnsholt: I'll pass that on when sorear is around.
15:33 dalek nqp: c06c0e8 | jnthn++ | src/HLL/Grammar.pm:
15:33 dalek nqp: Use native types in HLL::Grammar.
15:33 dalek nqp: review: https://github.com/perl6/nqp/commit/c06c0e8eaa
15:33 dalek nqp: b7126b8 | jnthn++ | src/QRegex/NFA.nqp:
15:33 dalek nqp: Use native types in QRegex::NFA.
15:33 dalek nqp: review: https://github.com/perl6/nqp/commit/b7126b8b9e
15:33 GlitchMr std: my $set = set 1, 2, 3;
15:33 p6eval std cfe8d43: OUTPUT«ok 00:00 44m␤»
15:36 jnthn moritz: It saves some boxing/unboxing, at least
15:36 jnthn Another small step in my battle to be able to spectest in under 4 minutes again :)
15:36 jnthn Made harder by us passing an increasing number of tests :P
15:39 dalek rakudo/nom: 5ac5f88 | jnthn++ | tools/build/NQP_REVISION:
15:39 dalek rakudo/nom: NQP version bump for better error message and a slight performance win thanks to NQP having native types.
15:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5ac5f88e74
15:39 GlitchMr my class KitchenSink { }
15:39 GlitchMr Uhmmm... what is KitchenSink?
15:39 moritz nqp: my int $x = 3; $x++; say $x
15:39 p6eval nqp: OUTPUT«Assignment ("=") not supported in NQP, use ":=" instead at line 2, near " 3; $x++; "␤current instr.: 'panic' pc 19998 (src/stage2/gen/NQPHLL.pir:7314) (src/stage2/gen/NQPHLL.pm:325)␤»
15:39 moritz nqp: my int $x := 3; $x++; say $x
15:39 p6eval nqp: OUTPUT«Confused at line 2, near "say $x"␤current instr.: 'panic' pc 19998 (src/stage2/gen/NQPHLL.pir:7314) (src/stage2/gen/NQPHLL.pm:325)␤»
15:39 GlitchMr And why Apache isn't ran on feather1?
15:39 moritz nqp: my int $x := 3; $x++; say($x)
15:39 p6eval nqp: OUTPUT«4␤»
15:41 jnthn Fun fact: NQP re-writes $x++ into (TMP := $x; $x := $x + 1; TMP) at the AST level
15:41 moritz I thought so
15:41 moritz which is why it works in nqp, but not in rakudo
15:42 jnthn Right
15:42 jnthn Rakudo needs the harder problem of "is rw" native parameters solving.
15:42 moritz but does it box for native types?
15:42 jnthn "it"?
15:42 moritz nqp's ++
15:42 jnthn Shoudln't
15:43 moritz oh yes it does
15:43 moritz and it even goes through $N registers
15:44 jnthn hmmm
15:44 jnthn well, the N registers don't surprise me
15:44 jnthn but yeah, the boxing is...
15:44 moritz jnthn: https://gist.github.com/3728515
15:44 jnthn ...hm, wtf
15:44 moritz that's the generated code
15:44 jnthn It boxes the 1??
15:44 jnthn oh no
15:44 moritz no, the $I10I is bound to $x
15:45 jnthn ah
15:45 jnthn right
15:45 jnthn $x := $x + 1; # does not box
15:45 jnthn It's the temporary that forces the boxing.
15:45 moritz thought so
15:46 the joined #perl6
15:46 jnthn That's kinda annoying.
15:46 moritz ++$x doesn't box
15:46 jnthn Yeah
15:46 moritz though still pointlessly goes through $N registers
15:46 jnthn That's actually an improvement on pre-QAST NQP, fwiw.
15:46 moritz (pointlessly because the result goes into an int anyway)
15:47 M_o_C joined #perl6
15:47 jnthn That would box the 1
15:47 jnthn Anyway, spotting we got two ints and turning add_n into add_i is a task for the optimizer.
15:47 moritz do we have one? :-)
15:48 jnthn Not yet... ;-)
15:48 jnthn All being well, NQP will sometime before the end of this month :)
15:48 jnthn It's relatively high on my todo list.
15:49 jnthn (Partly 'cus it's -Ofun to do :))
15:49 moritz probably easier than in rakudo
15:49 jnthn aye
15:49 moritz also my int $x = 3   first sets $x to 0, and then to 3
15:50 moritz (though that's much cheaper than boxing, I assume)
15:50 GlitchMr I've problem with "make all" on STD - https://gist.github.com/3728546
15:50 jnthn Yeah, aware of that.
15:50 GlitchMr Am I doing something incorrectly?
15:51 moritz maybe TimToady++ forgot to add the CORE5.setting file?
15:51 TimToady hmm
15:54 GlitchMr std: say $^N
15:54 p6eval std cfe8d43: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of $^N variable; in Perl 6 please use $-1 at /tmp/AyOySL3Q2J line 1 (EOF):�------> [32msay $^N[33m�[31m<EOL>[0m�Parse failed�FAILED 00:00 42m�»
15:54 GlitchMr $-1 is back (ok, I already have fixed that)
15:54 GlitchMr I guess I have to wait for std to recompile
15:59 mst http://www.cpantesters.org​/distro/R/Rakudo-Star.html
15:59 mst build failures!
15:59 mst (this is exciting, and good :)
16:02 GlitchMr Build failures called "UNKNOWN"
16:02 GlitchMr This sort of makes sense
16:03 moritz jnthn: I tried to declare the temporary variable as  QAST::Var.new( :name($tmp), :scope('local'), :decl('var'), :returns($var.returns) ) but that alone didn't help
16:05 dalek std: aab1162 | larry++ | CORE5.setting:
16:05 dalek std: add CORE5.setting
16:05 dalek std: review: https://github.com/perl6/std/commit/aab1162b4d
16:05 GlitchMr Also
16:05 GlitchMr std: $|++
16:05 p6eval std cfe8d43: OUTPUT«[31m===[0mSORRY![31m===[0m�Bogus statement at /tmp/mJbJER8m_Z line 1:�------> [32m<BOL>[33m�[31m$|++[0m�Parse failed�FAILED 00:00 43m�»
16:05 GlitchMr This should make error similar to that:
16:05 GlitchMr std: $|
16:05 p6eval std cfe8d43: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of $| variable; in Perl 6 please use :autoflush on open at /tmp/mcREnX5who line 1:�------> [32m$|[33m�[31m<EOL>[0m�Parse failed�FAILED 00:00 41m�»
16:05 GlitchMr $|++ will happen, so it should be supported
16:06 GlitchMr Actually, I will make issue, ok?
16:07 geekosaur "supported"?
16:07 GlitchMr Well, should make different error
16:08 geekosaur std: $|++;
16:08 p6eval std cfe8d43: OUTPUT«[31m===[0mSORRY![31m===[0m�Bogus statement at /tmp/C1uCai0AS_ line 1:�------> [32m<BOL>[33m�[31m$|++;[0m�Parse failed�FAILED 00:00 43m�»
16:08 geekosaur hm.  ok, I see your point, that's a failure of std
16:08 GlitchMr https://github.com/perl6/std/issues/3
16:09 GlitchMr Perl 6 should have good error messages
16:12 moritz jnthn: ah, it seems that for a lexical to get installed as a native one, I have to do $block.symbol($varname, :type($type))
16:13 moritz which we might not want for temporary vars
16:13 mst GlitchMr: UNKNOWN means "didn't get far enough to PASS/FAIL"
16:14 moritz hm, can I make it a register instead?
16:15 perlhack joined #perl6
16:16 jnthn QAST::Var.new( :name($tmp), :scope('local'), :decl('var') ),
16:16 jnthn moritz: ^ already is a local
16:16 jnthn Add :returns($var.returns) to that
16:16 moritz jnthn: that's what I tried
16:16 jnthn And then be sure to add it to the lookup also
16:16 jnthn QAST::Var.new( :name($tmp), :scope('local') ),
16:16 jnthn That also wants to get a .returns, I think
16:17 jnthn well, maybe it shouldn't need it...but maybe it does.
16:17 moritz I'll try
16:18 moritz huh, changing src/NQP/Ops.pm doesn't cause 'make' to rebuild :(
16:18 moritz never mind
16:18 moritz typed 'make' in the wrong dir :(
16:18 Bucciarati joined #perl6
16:20 jnthn phew :)
16:21 jnthn time for a break...back later
16:24 GlitchMr std: 1, 2, 3 ==> sort ==> my @numbers
16:24 p6eval std cfe8d43: OUTPUT«[31m===[0mSORRY![31m===[0m�Preceding context expects a term, but found infix ==> instead at /tmp/sKJ4QQAq1t line 1:�------> [32m1, 2, 3 ==> sort [33m�[31m==> my @numbers[0m�Parse failed�FAILED 00:00 43m�»
16:34 raiph joined #perl6
16:34 GlitchMr wow, I ran 'make snaptest' and somehow it found 'roast' on my PC
16:35 raiph hi all
16:35 moritz hi raiph
16:35 GlitchMr cd snap && $(PERL) teststd $(realpath ../roast)
16:36 GlitchMr ok, it was just a coincidence that it has found it :-)
16:36 raiph o/ moritz.
16:36 raiph i've got a dilemma. gonna outline it here on channel. then go out for a few hours. will backlog tonight.
16:37 GlitchMr std: sub foo6 (|capture)  { bar6(|capture) }
16:37 p6eval std cfe8d43: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:� 'bar6' used at line 1�Check failed�FAILED 00:00 44m�»
16:37 raiph i took forever to do the one day summary http://blogs.perl.org/users/perl_6_reports/​2012/09/perl6-summaries-for-2012-09-02.html
16:37 GlitchMr std: sub bar6 {...}; sub foo6 (|capture)  { bar6(|capture) }
16:37 p6eval std cfe8d43: OUTPUT«ok 00:00 45m␤»
16:38 raiph i can repeat that approach more quickly than this first day. but it's still very slow. and i'm getting carpal tunnel from all the repetitive keystrokes.
16:38 moritz well, don't
16:38 raiph and i'm 2 weeks behind.
16:38 moritz rather work on automating it
16:38 moritz I will too, but my hacking time is limited :(
16:39 raiph moritz: right. problem is i'm a very weak and even slower coder.
16:39 raiph i'm guessing it would take me many weeks to create the solution i outlined in my gist.
16:40 raiph (https://gist.github.com/3662771)
16:40 moritz raiph: well, but I guess it only takes a few hours hacking time to get to a point where you can copy&paste the HTML for a piece of sumamrized IRC log
16:41 raiph phase 1 in my gist?
16:41 moritz roughly
16:42 moritz fwiw I haven't done it with a log in
16:42 moritz so anybody can summarize
16:42 moritz I want to experiment with how well this works
16:43 crab2313 joined #perl6
16:43 raiph knowing me it would take me weeks to do what others can do in hours.
16:43 moritz before adding accounts if it doesn't work
16:43 moritz raiph: I'll try to get the initial changes live by tomorrow
16:43 raiph moritiz: yes. my hope was that anyone could and would summarize.
16:44 moritz just hope that $daughter goes to bed soon; that would increase the chances a lot :-)
16:49 crab2313 joined #perl6
16:50 raiph moritz: (I don't mean to offend. I find this hilarious. Hope you do too.) http://en.wikipedia.org/wiki/Go_the_Fuck_to_Sleep
16:52 moritz raiph: I know that book :-)
16:54 raiph I've never had kids, but that book still spoke to me eloquently!
16:55 MikeFair Howdy all!  I'm not comprehending exactly where I'm going wrong here with making my if statement, here's the error:
16:55 MikeFair Error while compiling block : Error while compiling block : Error while compiling op if: invoke() not implemented in class 'NQPMu'
16:56 dalek std: a8f1a47 | larry++ | STD.pm6:
16:56 dalek std: update special variable guards, GlitchMr++
16:56 dalek std:
16:56 dalek std: fixes #3
16:56 dalek std: review: https://github.com/perl6/std/commit/a8f1a473cf
16:56 MikeFair From what I recall, I think it means that I passed a null in for on of the params to my QAST.Op.new call for :op='if'
16:57 MikeFair Which would correspond to the line:
16:57 MikeFair my $qast := QAST::Op.new( $<cond>.ast, $<then>.ast, :op('if'), :node($/) );
17:00 MikeFair Could my problem be that $<then> will contain either a <statement> or a <statement_list> and I somehow have to distinguish them?
17:03 TimToady well, sure, but why would you want to design a language like that? ;)
17:03 moritz MikeFair: a statement_list also parses a statement
17:03 moritz why make that distinction?
17:04 MikeFair moritz: Because in the if statement it can either be a single statement or many statements depending on syntax
17:04 moritz anyway, you need to set $<then>.ast
17:04 MikeFair Maybe like this?
17:04 MikeFair my $then := $<then><statement_list> ?? $<then><statement_list>.ast !! $<then><statement>.ast;
17:04 moritz method then($/) { if $<statement> { make $<statement>.ast } else { make $<staetment_list>.ast } }
17:05 TimToady MikeFair: we get that part; does you statement_list have delimiters like begin/end or {}?
17:05 MikeFair TimToady: No it doesn't
17:05 TimToady what prevents a statement_list from parsing statement as a degenerate case?
17:05 MikeFair if <EXPR> then <statement>
17:06 MikeFair or if <EXPR> then <newline> <statement_list> end if
17:06 TimToady then newline is your delimiter
17:06 * MikeFair nods.
17:06 SHODAN joined #perl6
17:06 MikeFair TimToady: Well the presence or non-presence is
17:10 MikeFair TimToady: I'm happy to take suggestions, but I've been unable to create something that treats the two cases the same way
17:10 moritz MikeFair: I hope you reuse that concept for other constructs, like loops
17:11 MikeFair moritz: Well the repeat statement always has an end repeat
17:11 moritz why?
17:11 moritz that seems inconsistent
17:11 MikeFair moritz: everything else in fact has an "end" as far as I can tell
17:12 moritz well, reusing syntactic ideas for different areas is a good idea
17:12 moritz fewer special cases
17:12 MikeFair moritz: It's the way HyperTalk was built, I plan on making a modified version of it after I get the first version working
17:14 moritz ah well
17:15 MikeFair moritz: I'd like to make something consistent of course
17:15 MikeFair :)
17:15 moritz :-)
17:15 TimToady :--)
17:15 MikeFair Though in its commitment to being english like, there's a few 'exceptions'
17:16 TimToady I'd image there's about 300 exceptions, given how many syntax rules English actually has
17:16 TimToady *imagine
17:16 MikeFair For instance, for single parameter functions you can use "sqrt of 4" as a function call
17:16 MikeFair TimToady: Fortunately it's not trying to be a native language parses
17:16 moritz I can't decide right now if that's cute or scary
17:17 xinming joined #perl6
17:17 Juerd joined #perl6
17:17 MikeFair moritz: I know the feeling! :)
17:18 MikeFair moritz: Though after a while of working with a variant of the language (the family of languages like this are referred to as xTalk) I actually really came to appreciate the native language connection
17:19 * TimToady imagines a language in which you can say 4's sqrt
17:19 MikeFair moritz: I was kind of biggoted at first about its verbosity, it's multiple ways to say the same thing, and it's lack of consistency, but after a while it became clear to me that what they are attempting to do with the language is a laudable goal and worthy of pursuing
17:20 MikeFair TimToady: hehe - I hadn't considered that
17:20 MikeFair TimToady:  ' is the possissive operator ;)
17:20 MikeFair err 's
17:20 moritz but only if the object has just one syllable :-)
17:21 TimToady huh?
17:21 MikeFair moritz: And it's name doens't in s otherwise it's his' sqrt
17:21 * MikeFair wonders if there's something wrong with this keyboard.
17:21 moritz wait, that was the rule for 'more $adj' vs $adj ~ 'er'
17:21 TimToady and it has exceptions in any case
17:22 TimToady you can't even restrict 's to a single word
17:22 MikeFair TimToady: but you can say things like "put 'Mike' before the second word of field txtentry"
17:22 TimToady famous example: the King of England's hat
17:23 moritz jnthn: adding the :returns($var.returns) to both mentions of the temp var didn't help, it still declares it as a .local pmc
17:23 TimToady England's King's hat doesn't quite work out as well somehow
17:24 TimToady moritz: "pretty" -> "prettier"
17:24 MikeFair TimToady: using Parrot my goal actually is to allow the programmer to publish new Grammar rules at least at compile time and possibly even runtime
17:25 MikeFair TimToady: So we could make an attempt at adding the 's operator :)
17:26 MayDaniel joined #perl6
17:27 MikeFair TimToady: But back on my if, what prevents statement_list from catching the 'single <statement>' is that there's no 'end if' clause to stop it from sucking up everything
17:28 jnthn MikeFair: All of the interesting stuff there is in NQP, not really in Parrot :)
17:28 MikeFair jnthn: I think I'm coming to realize that
17:28 jnthn MikeFair: So when NQP runs in other places, you can get those same nice properties on other VMs too :)
17:28 MikeFair jnthn: Though I'm wondering if I'd be more comfortable in Winxed that NQP
17:28 jnthn Then you don't have the nice grammar stuff and are tied to Parrot :)
17:29 GlitchMr https://github.com/organizations/perl6/dashboa​rd/issues/repos?direction=desc&amp;state=open
17:29 jnthn moritz: ohhhh
17:29 MikeFair jnthn: I'm actually considering just doing the whole thing in P6 instead
17:29 jnthn moritz: Because NQP doesn't tag every usage with the type.
17:29 jnthn moritz: It stores it in the block symbol table at declaration.
17:29 MikeFair jnthn: But when Parrot starts using 6model will it really make that much a difference?
17:30 moritz jnthn: in src/NQP/Ops.pm how do I get hold of the block?
17:30 moritz MikeFair: then you still won't have the grammar engine in parrot, but in nqp
17:31 moritz jnthn: or is the right way to tag the usages with the types in the actions?
17:31 MikeFair moritz: Right, but the Grammar engine is always going to be the P6 Grammar rules regardless right?  The main difference is in Actions.pm I thought
17:32 moritz MikeFair: I'm confused by that question
17:32 MikeFair moritz: Well Grammar.pm while always be some form of the P6 grammar rules, regardless of which technology I'm using
17:33 jnthn moritz: See what happens in QAST::Compiler to look it up there, where we compile QAST::Var.
17:33 MikeFair that just seems common to all of them
17:33 jnthn moritz: It looks into $*BLOCK
17:33 jnthn moritz: But you'll end up copying-pasting...so maybe factor it into a method on $*BLOCK.
17:33 jnthn (which is a BlockInfo)
17:33 MikeFair native P6, NQP, or Winxed -- Grammar.pm looks very much the same
17:33 moritz jnthn: erm, factor what into a method?
17:34 moritz you mean something like $*BLOCK.returns($var) ?
17:35 MikeFair moritz: However Actions.pm looks very different between PAST/QAST (and if I did a native P6 version, it likely wouldn't even have an Actions.pm file)
17:35 GlitchMr Just wondering, when https://github.com/perl6/specs/issues/20 will be fixed?
17:35 thou joined #perl6
17:36 moritz MikeFair: if you did a native P6 version, you'd still need rules for how to compile stuff
17:36 MikeFair moritz: Well I could just make a Perl6 interpretter
17:36 moritz GlitchMr: when somebody gets around to it
17:37 moritz MikeFair: yes, but you'd still need some actions
17:37 jnthn moritz: No, the while loop around line 836
17:37 jnthn (In QAST::Compiler)
17:37 jnthn It looks for the type in the symbol table outer chain.
17:37 MikeFair moritz: yes, but the direct connection to an Actions.pm might work some entirely different way
17:38 MikeFair moritz: My comment was really just pointing to that the P6 Grammar described in S05 seems to be the way that the syntax of the langauge will be described almost regardless of what I do
17:39 GlitchMr Also, let's say I totally break Perl 6 grammar in code. .perl doesn't work correctly then. And I guess it's feature
17:40 MikeFair All that aside, jnthn's comment is still accurate, all the magic I'm really looking for is coming from NQP more than Parrot
17:41 MikeFair And there's a lot of semantics in P6 that are identical in xTalk, just the syntax is very different
17:44 MikeFair So I'm thinking that what I'm aiming to ultimately accomplish is extremely doable. (And would likely only take one of the folks with a cleaner grok of the situation a few hours where it'll likely take me months) :)
17:47 jnthn dinner &
17:48 crab2313 joined #perl6
17:55 MikeFair moritz: I think I'm doing something wrong... I added the method then($/) which did the branch and called make on the two nodes
17:55 MikeFair but it doesn't seem to be called
17:56 MikeFair I even tried explicitly 'make $<then>.ast' in my if_expr method and it still isn't being called... I can see that the if_expr itself is being called though
17:57 moritz MikeFair: push your changes (maybe to a branch) so that I can look at them
18:00 MikeFair ok checked in
18:00 MikeFair I just did it straight to master
18:00 moritz did you also push your changes?
18:00 crab2313 joined #perl6
18:01 MikeFair I have now. *grin* ;)
18:03 moritz MikeFair: oh, you don't call a subrule for the 'then' part
18:03 moritz then an action method won't trigger either
18:03 MikeFair right, I'm assigning it, I could make it a subrule though
18:03 sorear good * #perl6
18:03 phenny sorear: 10:03Z <moritz> tell sorear on feather1 as p6eval, niecza rebuild succeeds, but the 'mono run/Niecza.exe -C Test JSYNC Threads' throws an exception with a backtrace too long for my screen buffer
18:03 phenny sorear: 15:25Z <arnsholt> tell sorear Since you're on CA time (IIRC) and jnthn and I are on EU time, maybe the easiest way to start a discussion on portable NativeCall is something asynchronous, like a gist or just email?
18:03 sorear arnsholt: ping
18:04 moritz MikeFair: or use the ternary you suggested earlier
18:04 moritz might be easier in this case
18:05 MikeFair moritz: Well in thinking about the ternary, the problem comes in a multi if with a single else
18:05 MikeFair if 1 then 2; 3; 4; else 5
18:06 MikeFair versus if 1 then 2; 3; 4; else 5; 6; 7; end if
18:06 MikeFair hmm
18:06 * MikeFair checks the BNF he has to see if the end if is required in that first case
18:07 MikeFair nope
18:07 MikeFair <elseBlock> = else {<stmnt> | <return> <stmntList> end if}
18:09 MikeFair moritz: If I explicitly call "make $<then>.ast" in my if_expr action method, wouldn't that do it?
18:09 moritz MikeFair: just check if $<then>.ast is what you think it should be
18:11 MikeFair I was originally playing with this: if ( $<then><statement> ) { make $<then><statment> } else { make $<then><statement_list> } but I wasn't sure if that was doing anything at all
18:12 MikeFair I guess I'm not understanding what I'm checking where, then should contain either a statement or statement_list match
18:13 moritz so, add a  say($<then>.ast)
18:13 MikeFair I thought the method action calls would have been automatically called but I think what I'm getting now is that they need to be explicitly made
18:13 moritz MikeFair: for each subrule call an action method is called if it exists
18:13 moritz MikeFair: but you never call <then>
18:14 moritz so the action method called 'then' won't get called either
18:16 MikeFair THEN: say "hi"
18:16 MikeFair ; THENAST: QAST::Stmts<-824484227>
18:16 MikeFair say("THEN: ", $<then>, "; THENAST: ", $<then>.ast);
18:16 Juerd joined #perl6
18:16 MikeFair That's at the top of my if_expr
18:17 moritz ok, $<then>.ast isn't null
18:17 moritz and it's some other thing that's wrong
18:17 * MikeFair checks <cond>
18:17 moritz what was the error message again?
18:18 arnsholt sorear: Pong
18:19 MikeFair Error while compiling block : Error while compiling block : Error while compiling op if: invoke() not implemented in class 'NQPMu'
18:20 MikeFair So $<cond>.ast and $<then>.ast both have values
18:21 moritz if ($<else>) {
18:21 moritz make $<else>.ast;
18:21 moritz that part is wrong
18:21 moritz it replaces the previous ast with $<else>.ast
18:21 MikeFair oh interesting
18:22 moritz in general you're doing something wrong if you call make() more than once per action method
18:22 MikeFair Ok that makes sense
18:22 MikeFair So I'm going to think of "make" as "create this node"
18:22 moritz make($foo) is roughly the same as $/.ast = $foo;
18:22 MikeFair And everything else before it is "build up the node to add"
18:23 MikeFair ok yeah "assign the AST for this node"
18:23 MikeFair I can get that
18:24 MikeFair moritz: ok I pushed a couple minor updates
18:24 MikeFair If you build the latest and the run ./installable_safire i
18:25 MikeFair you'll see a simple test case, one single if, one multi if, no else claises
18:25 MikeFair err clauses
18:26 moritz $qast.push( $<else>.ast );
18:26 moritz but the rule is called elsePart
18:27 * MikeFair looks
18:28 MikeFair Right ok, and inside elsePart I assign else
18:28 moritz but that would be $<elsePart><else> inside the if_expr action method
18:28 MikeFair So in this case I'm looking for $<elsePart><statement>
18:29 snearch joined #perl6
18:29 MikeFair And I can get rid of the else assignment inside elsePart
18:29 MikeFair I only did that because I was having a hard time comprehending the combinations of <statement> and <statement_list> arrays
18:29 moritz add an method elsePart($/) { make ($<statement> || $<statement_list>).ast }
18:29 imarcusthis joined #perl6
18:30 moritz to actions
18:30 moritz and then use $<elsePart>.ast in if_expr
18:31 moritz Public Service Announcement: I'll shorlty do a schema change in the irclog table, and the IRC logs will be unavailable during that time
18:31 moritz ETA: 30..60min
18:31 GlitchMr I hope that IRC logs will be still logged
18:31 moritz GlitchMr: I hope so too
18:33 moritz update running
18:41 MikeFair moritz: added method elsePart($/) { make ( $<statement> || $<statement_list> ).ast }
18:41 GlitchMr I can access IRC logs, I just don't see changes
18:41 MikeFair moritz: modified if_expr to use $<elsePart> in place of $<else>
18:41 * moritz has no idea how mysql handles schema changes and concurrent writes
18:41 marmay joined #perl6
18:41 moritz not that first time I wish I'd started out with postgres instead
18:41 moritz MikeFair: does the error message change?
18:41 MikeFair nope
18:41 moritz MikeFair: push! push!
18:41 MikeFair well I added code to set the name of the "handler" block so 'slightly'
18:41 arnsholt moritz: At a guess, badly
18:41 arnsholt IIRC mysql has very little safety around schema manipulation
18:42 _ilbot joined #perl6
18:42 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: http://irc.perl6.org/ | UTF-8 is our friend!
18:43 gongyiliao joined #perl6
18:43 MikeFair moritz: What about this.... If the empty newlines are being treated as "statements" and then an AST tries to get made out of them?
18:44 moritz MikeFair: does $<EXPR>.ast work?
18:44 moritz MikeFair: have you tried that?
18:44 MikeFair Yes
18:44 MikeFair COND: 1; CONDAST: QAST::IVal<1225439772>
18:45 moritz || [ <.ws> \v ]+
18:45 MikeFair Does the blank lines in this cause a problem:
18:45 MikeFair THEN: say "hi"
18:45 MikeFair ; THENAST: QAST::Op<1241277467>
18:45 MikeFair (oh they got filtered)
18:45 moritz if that branch of <statement> is taken, $<statement>.ast will be NQPMu
18:46 MikeFair moritz: I think that causes an infinite loop
18:46 moritz IRC logs are back
18:47 moritz Query OK, 6643088 rows affected (8 min 37.26 sec)
18:47 GlitchMr That was fast compared to 30..60min
18:47 moritz well, it took 40min on my laptop
18:47 moritz I didn't know the server was that much faster :-)
18:47 GlitchMr Well, it means that you have good server ;-)
18:48 moritz aye, no complaints there :-)
18:48 MikeFair moritz: ok if I strip that out of statement, which I'm happy to do, then my code breaks on multiple newlines
18:48 GlitchMr http://faui2k3.org/
18:48 jnthn MikeFair: Yes, spicy stuff... :)
18:48 GlitchMr This?
18:49 moritz GlitchMr: yes
18:49 jnthn MikeFair: I'm a bit surprised about the invoke() not implemented, fwiw
18:49 jnthn MikeFair: It feels like the QAST::Compiler should really be able to give you a better explanation of what's going on...
18:49 moritz MikeFair: maybe stmntEnd should parse multiple newlines?
18:50 MikeFair jnthn: That does make me feel better, but I'm suspecting that it's going to turn out that I'm doing something stupid in some respect
18:50 moritz fwiw the IRC logs now have a very basic summary mode
18:50 MikeFair moritz: Yeah I've gotten lots of infinite loops trying to do that...
18:50 MikeFair oh wait, maybe * instead of ?
18:50 jnthn MikeFair: Yes, I suspect there's a bug in what you have, but I like to try and get decent error reporting :)
18:50 jnthn I tended to improve ones I ran into.
18:51 moritz MikeFair: you get infinite loops when you try to quantify a rule that matches the empty string
18:51 MikeFair moritz: like <.ws>
18:52 moritz correct
18:52 moritz there's no reason ever to write <.ws>* or <.ws>+
18:52 lue joined #perl6
18:52 GlitchMr How summary mode works?
18:52 moritz just write your ws rule to match all (insignificant) whitespace in the first place
18:52 MikeFair jnthn: Well you're the second one to think there might be a big here
18:52 lue $ panda
18:52 lue ===SORRY!===
18:52 lue SixModelObject does not implement get_pmc_keyed_int
18:53 lue (just upgraded perl6, but not panda)
18:53 MikeFair moritz: ok well \n is insigificant "sometimes"
18:53 MikeFair gotta go to a soccer game for my daughter
18:53 moritz GlitchMr: there's a link on top of the page that enables it, then you can check a checkbox for each line that you want to belong to the summary
18:53 moritz GlitchMr: and then there's another link for submitting those changes to the server
18:53 MikeFair jnthn: If you'd like to look: https://github.com/MikeFair/Safire
18:53 MikeFair it's not too big
18:53 MikeFair bbl
18:54 GlitchMr Well, technically somebody could choose every line for summary
18:54 moritz yes, but that wouldn't be too useful
18:54 lue Has anyone else experienced this break in panda?
18:55 brrt joined #perl6
18:58 moritz I haven't, but I haven't used panda for a while either
18:58 GlitchMr panda works. Why it would need updates?
18:58 GlitchMr lue: ./rebootstrap.pl
18:59 GlitchMr I meant, perl6 rebootstrap.pl
18:59 jnthn MikeFair: I dunno if it's related, but "make $<statement_control> ?? $<statement_control>.ast !! $<EXPR>.ast;" doesn't handle the third alternation branch.
19:01 lue thanks GlitchMr. I hadn't pulled an update of panda with rebootstrap.pl in existence, so I wouldn't have guessed that :) .
19:03 sorear arnsholt: ping again sorry
19:03 sorear arnsholt: we share several hours, especially on weekends :D
19:04 GlitchMr I should make Panda installation guide
19:08 imarcusthis joined #perl6
19:14 arnsholt sorear: Pong!
19:14 arnsholt (Hopefully not missing you this time)
19:14 arnsholt We do share hours, that's true =)
19:15 sorear not missing me :D
19:15 arnsholt Yay =)
19:17 arnsholt But yeah, I was glad you pinged me about making NativeCall work on more than Rakudo
19:17 arnsholt I've been mulling over the topic a bit, but given my complete lack of knowledge of how Niecza works internally, it's been mostly philosophical =)
19:18 sorear why?  what do you have to do with nativecall?
19:18 moritz arnsholt did most of the recent nativecall work
19:19 arnsholt I've been hacking quite a bit on it
19:19 moritz like, callbacks
19:19 moritz and arrays
19:19 jnthn arnsholt++ has done all the recent improvements :)
19:19 arnsholt At the Oslo hackathon a while back, I wanted to do some stuff (ZMQ, specifically), but that blocked on a pile of Zavolaj stuff, so I ended up spending the weekend learning how Zavolaj works internally
19:21 moritz wow, I remembered my IRC log code as a tightly coupled emss
19:21 moritz *mess
19:21 moritz but the parts I'm touching now are actually quite hackable
19:22 moritz probably because I haven't touched the rewrite rules yet :-)
19:24 arnsholt Irclogging, I realize sorear never actually adressed me
19:24 arnsholt I just assumed he had, since it was NativeCall-related. Oops =)
19:25 jnthn ah, dang
19:25 jnthn NQP still accidentally makes forward references...
19:25 dalek glitchmr.github.com: 110c310 | GlitchMr++ | _posts/2012-09-15-how-i-learned-to-st​op-worrying-and-install-the-panda.md:
19:25 dalek glitchmr.github.com: How I learned to stop worrying and install the panda blog article
19:25 dalek glitchmr.github.com: review: https://github.com/GlitchMr/glitc​hmr.github.com/commit/110c31068c
19:25 arnsholt But anyways, +1 for shareable NativeCalls
19:26 jnthn QAST::Compiler is a HLL::Compiler, but then it mentions HLL::Compiler
19:26 jnthn er
19:26 jnthn QAST::Compiler
19:26 jnthn Which works accidentallyish... :)
19:26 moritz erm, what?
19:26 jnthn Right :)
19:26 moritz HLL::Compiler mentions QAST::Compiler?
19:26 sorear arnsholt: *you* addressed *me*
19:26 sorear arnsholt: so I think you want to talk to me about NativeCall on Niecza
19:26 arnsholt Yes =)
19:27 jnthn moritz: Yes
19:27 arnsholt I got things confused in my head. Terribly sorry about that
19:27 GlitchMr Now I've blog article to direct people to when next day somebody will appear ask will ask why `panda` won't install :-)
19:27 moritz jnthn: you said it the other way 'round :-)
19:27 jnthn method post($source, *%adverbs) {
19:27 jnthn QAST::Compiler.post($source)
19:27 jnthn }
19:27 sorear arnsholt: So?  Do you?
19:27 jnthn well, the other way round is that QAST::Compiler inherits from HLL::Compiler.
19:27 arnsholt Anyways, you said some stuff about sharable NativeCall versions some time back
19:27 jnthn vive le circularity...
19:27 sorear arnsholt: you mean like yesterday?
19:28 arnsholt Yes, right
19:28 moritz jnthn: vive la circulation :-)
19:28 jnthn sorear, arnsholt: fwiw, I suspect it'll be possible to standardize the interface of NativeCall support in Perl 6, but implementations of that interface will always be quite specific to different Perl 6 implementations.
19:28 arnsholt I wouldn't mind helping, is all I'm saying, I guess
19:29 sorear jnthn: that is my expectation as well
19:29 arnsholt Ditto
19:29 sorear arnsholt: ok, so you did not have specific items to discuss _now_?
19:29 arnsholt It adresses a well-known weak spot of Perl 5
19:29 arnsholt Not terribly specific, no
19:29 sorear when I'm ready to start I'll give you a call
19:30 arnsholt Cool
19:30 jnthn If we want to take the current NativeCall API and make it draft-spec then evolve it from there, that works for me.
19:30 sorear or if you get impatient and want to start it without me, give me a call and I'll help however I can
19:30 dalek glitchmr.github.com: 2f4c3c1 | GlitchMr++ | _posts/2012-09-15-how-i-learned-to-st​op-worrying-and-install-the-panda.md:
19:30 dalek glitchmr.github.com: Fix `git clone` command to actually mention `git clone`
19:30 dalek glitchmr.github.com: review: https://github.com/GlitchMr/glitc​hmr.github.com/commit/2f4c3c1917
19:31 arnsholt I just wanted to let you know I'm interested in the project and maybe find out what your thoughts about it were
19:31 arnsholt Cool. I remember the C# FFI stuff looking pretty neat way back when I skimmed some of it
19:31 sorear it does.
19:32 arnsholt Anyways, sorry about the confusion
19:32 arnsholt I do that occasionally
19:32 sorear a couple days ago I looked over the options for dynamic generation, and there's no obstacle on that front
19:33 moritz http://irclog.perlgeek.de/out.pl?cha​nnel=perl6;date=2012-09-15;summary=1
19:33 arnsholt Sounds good
19:34 lue How would supporting other languages' libraries (aside from existing C/C++ support, that is) look in Nativecall? (just curious)
19:35 GlitchMr Isn't like everything written in C or C++?
19:35 GlitchMr Including compilers
19:35 moritz lue: fortran support would look like C support, but also require some name mangling
19:35 moritz (which is compiler-specific)
19:36 GlitchMr But perhaps Java would be nice
19:36 jnthn hmmm, I seem to have an NQP REPL that allows multiple commands :)
19:36 arnsholt I don't expect NativeCall to support much beyond C, and I guess maybe Fortran
19:36 GlitchMr Also, NativeCall supports assembly
19:37 arnsholt C++ is not going to happen I think, due to name mangling being compiler-specific (with good reason) and probably other things as well
19:37 sorear C is the universal common language.
19:38 sorear C++ has extern "C"
19:38 GlitchMr You could try using https://en.wikipedia.org/wiki​/Vala_(programming_language) - apperently it compiles to C, so it could work
19:39 sorear Anyways once we have a basic FFI foundation other people can write interface libraries for their favorite thing
19:39 jnthn pmurias: Got a patch here that fixes the compreg approach
19:39 jnthn pmurias: Need to check I didn't bust Rakudo in any way.
19:39 lue S21 currently only mentions use of Perl 5 and C code, which seems like a decent amount of coverage.
19:39 sorear for core, that's ample
19:40 moritz phenny: tell raiph phase one IRC log summaries are live. Enjoy! (and feedback welcome)
19:40 phenny moritz: I'll pass that on when raiph is around.
19:44 arnsholt moritz: Do you happen to know what level of name-mangling is required for Fortran, BTW?
19:45 moritz arnsholt: mostly it's just adding prefixes and postfixes
19:46 imarcusthis joined #perl6
19:46 arnsholt Right. That sounds doable
19:48 sorear core NativeCall should provide, on a best-effort basis, Cish bindings with a variety of calling conventions
19:48 sorear most compiled languages without large runtimes can be treated as C after name and signature munging
19:49 sorear let's cater for the darkpan.  most people who want to bind to fortran don't need portability; let them do their own name munging
19:49 arnsholt True, true
19:49 sorear if someone else wants to write NativeCall::Fortran, don't stop them, but don't give them a monopoly either
19:49 arnsholt That's an excellent argument
19:51 topo joined #perl6
19:52 pmurias jnthn: re patch great
19:52 Juerd joined #perl6
19:53 jnthn pmurias: Yeah, but not so great is it busted the Rakudo build.
19:53 pmurias jnthn: what was the source of the issue?
19:54 jnthn pmurias: Some mess with global handling.
19:56 jnthn I noticed the error it gave was the one the REPL gives if issuing two commands...
19:58 moritz http://perl6.org/page-stats/ now has visitor stats for the most important perl6.org subdomains
19:59 jnthn whoa... Perl6::Grammar was mentioning the actions classes without doing a "use Perl6::Actions".
19:59 jnthn Separate compilation fail
20:04 moritz I've noticed that modules.perl6.org is still the old page, not the awsome new page
20:04 moritz what's blocking the transition?
20:05 lue .oO(There's an awesome new page‽)
20:06 Alpha64 joined #perl6
20:08 dalek nqp: c2b6104 | jnthn++ | src/HLL/Compiler.pm:
20:08 dalek nqp: Avoid referencing QAST::Compiler before it has been compiled (only worked due to bugs).
20:08 dalek nqp: review: https://github.com/perl6/nqp/commit/c2b610447b
20:08 dalek nqp: 81a27e9 | jnthn++ | src/NQP/ (2 files):
20:08 dalek nqp: Fix separate compilation issues that busted running multiple commands in the REPL and getting at the NQP compiler through compreg from a built NQP.
20:08 dalek nqp: review: https://github.com/perl6/nqp/commit/81a27e909b
20:08 dalek rakudo/nom: 4dd1240 | jnthn++ | / (2 files):
20:08 dalek rakudo/nom: Add a missing use statement/dependency, now that a separate compilation hole is closed in NQP.
20:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4dd1240ec6
20:09 jnthn "jnthn closed the issue in a few seconds"...no, GitHub, it took me just a bit longer than that :P
20:10 moritz :-)
20:10 moritz ("in a few second" means "in the future")
20:15 lue or maybe it means it took you a few seconds to press "close" :)
20:16 pmurias moritz: how does the new modules page look like?
20:16 moritz pmurias: dunno; a test URL is somewhere in the backlog (but not today, it's a bit older)
20:17 swflint joined #perl6
20:18 moritz n: sub term:<foo> { 42 }; say foo
20:18 p6eval niecza v21-8-ga216174: OUTPUT«42␤»
20:19 Juerd joined #perl6
20:20 Juerd Please use ulimit.
20:21 jnthn nqp: class A { }; proto f(*@args) {*}; multi f(A $x) { say('A') }; f('str')
20:21 p6eval nqp: OUTPUT«No applicable candidates found to dispatch to for 'f'. Available candidates are:␤␤current instr.: 'f' pc 136 ((file unknown):74) (/tmp/pR_xWSohKX:1)␤»
20:22 dalek nqp: c0203bb | jnthn++ | / (2 files):
20:22 dalek nqp: Fix parsing of pointy without sig. Closes #52.
20:22 dalek nqp: review: https://github.com/perl6/nqp/commit/c0203bbadf
20:22 masak joined #perl6
20:22 masak o/
20:22 moritz \o masak
20:22 lue o/ masak
20:23 sorear Juerd: moritz ulimited the offending task (niecza rebuild), I think
20:23 sorear o/ masak
20:23 sorear LU!
20:23 moritz sorear: did you see my note about the niecza rebuild being busted?
20:24 dalek doc: 0bfe5ec | moritz++ | lib/terms.pod:
20:24 dalek doc: more about identifier terms
20:24 dalek doc: review: https://github.com/perl6/doc/commit/0bfe5ecd7a
20:25 sorear moritz: I saw your note that a command that previously did nothing is now throwing exceptions.  I did not realize this constituted busting
20:25 moritz sorear: well, it means that the build step returns a non-zero exit status, and thus the rsync step isn't executed
20:26 moritz sorear: so no new version on feather3
20:26 moritz sorear: if the step isn't necessary, you can remove it from the rebuild-niecza.sh script
20:26 sorear ah
20:26 sorear how is rebuilding set up new?
20:26 sorear now
20:27 moritz sorear: see build-scripts/rebuild-niecza.sh in the evalbot repo?
20:27 moritz (which is spawned from build.pl)
20:29 dalek evalbot: c9820f6 | sorear++ | build-scripts/rebuild-niecza.sh:
20:29 dalek evalbot: rebuild of Test,JSYNC,Threads needs --obj-dir to be useful now
20:29 dalek evalbot: review: https://github.com/perl6/evalbot/commit/c9820f6e1c
20:29 sorear now I've pushed to github, now what?
20:29 * sorear tries a git pull in the evalbot directory
20:29 moritz now a git pull in ~p6eval/evalbot/ on feather1
20:29 sorear error: Your local changes to the following files would be overwritten by merge: build-scripts/rebuild-niecza.sh
20:30 sorear Please, commit your changes or stash them before you can merge
20:30 moritz you can discard the changes
20:30 sorear hopefully the changes were'n't needed
20:30 sorear (bumping ulimit from 300m to 512)
20:30 moritz i just tried a higher ulimit
20:30 sorear now pulled
20:31 moritz to see if the exception went away
20:31 moritz the next cron-triggered rebuild should work now
20:31 moritz you can test it by running
20:31 moritz perl build.pl niecza # in the evalbot dir
20:31 moritz and tail -f log/niecza* in another shell
20:36 swflint joined #perl6
20:49 imarcusthis joined #perl6
20:55 imarcusthis joined #perl6
20:59 swflint joined #perl6
21:02 FROGGS_ hi there
21:02 FROGGS_ jnthn/arnsholt: do you had a chance to have a look at my commit?
21:03 FROGGS_ https://github.com/FROGGS/zavo[…]commit/8d9afca6d0
21:03 FROGGS_ meh
21:03 FROGGS_ this: https://github.com/FROGGS/​zavolaj/commit/8d9afca6d0
21:06 jnthn FROGGS_: Having a way to do/call inline C code seems sane, as does using the Zavolaj stuff to achieve it, but I don't think this belongs in Zavolaj itself.
21:06 jnthn Having to do the BEGIN thing is kinda icky, for example.
21:07 MikeFair jnthn / moritz: both of you guys mentioned that my statement action didn't handle the third alternation which would end up null if it matched.   Would this work?
21:08 MikeFair for $<statement> { if ($<statement>) { $qast.push( $_.ast ); } }
21:08 sorear +1 for Inline::C as a separate module
21:09 jnthn yeah
21:09 jnthn Not just from a "keeping modules focused" point of view, but also because we can probably do better in terms of API also.
21:09 jnthn MikeFair: if $_.ast { ... }
21:10 MikeFair actaully, in statement method I used this:
21:10 MikeFair if ($<statement_control>) {
21:10 MikeFair 22        make $<statement_control> ?? $<statement_control>.ast !! $<EXPR>.ast;
21:10 MikeFair 23    }
21:10 jnthn You want to avoid pushing if there's no AST
21:10 masak MikeFair: you have superstitious parens after your 'if's.
21:10 jnthn huh, that won't attach EXPR if there's not a statement_control?
21:11 MikeFair masak: Indeed, I've think I get compilation errors without them sometimes. :)
21:11 MikeFair jnthn: right!
21:12 * MikeFair has clearly been staring at this a bit too long
21:12 masak MikeFair: that might be the case of 'if sub_call { ... }', which needs to be written 'if sub_call() { ... }'
21:13 masak MikeFair: because sub calls are listops if they aren't followed by parentheses.
21:13 MikeFair masak: Interesting -- what's it a list of?
21:13 masak MikeFair: think of 'say', for example.
21:14 masak r: say 1, 2, 3
21:14 p6eval rakudo 81edc9: OUTPUT«123␤»
21:14 masak r: say(1, 2, 3)
21:14 p6eval rakudo 81edc9: OUTPUT«123␤»
21:14 masak these ways of writing it are synonymous.
21:14 MikeFair masak: ok
21:14 FROGGS_ jnthn: I would like to misuse a =pod block or something similar, but since you cant grab the content of a pos block from another file its some kind of hard to implement
21:14 masak so the '{ ... }' risks becoming an argument to 'sub_call'.
21:15 FROGGS_ jnthn: maybe we should talk about the best design for it
21:15 masak std: if lines { say "gobbled!" }; say "oh noes!"
21:15 p6eval std a8f1a47: OUTPUT«[31m===[0mSORRY![31m===[0m�Function 'lines' needs parens to avoid gobbling block at /tmp/lTkuqNWfII line 1:�------> [32mif lines[33m�[31m { say "gobbled!" }; say "oh noes!"[0m�Missing block (apparently gobbled by 'lines') at /tmp/lTkuqNWfII line 1:�------> […
21:18 FROGGS_ jnthn: btw, you have to using BEGIN too if you want to do: is native($var), it is not just an issue for 'is inline'
21:19 jnthn FROGGS_: Right, but for that case it feels kinda OK (it's not the common case, and you could do it with a constant), but for inline it feels kinda odd
21:19 MikeFair masak: I think NQP requires the {}'s
21:19 MikeFair 14     for $<statement> { if ($_.ast) $qast.push( $_.ast );}
21:19 leont joined #perl6
21:19 MikeFair Missing block at line 15, near "$qast.push"
21:19 jnthn MikeFair: You seem to be confusing ()s and {}s :)
21:20 masak MikeFair: I never said the {}s were optional.
21:20 masak they're not optional, and have never been in any(Perl 5, Perl 6, nqp).
21:20 MikeFair oh superstitious "PARENS"
21:20 masak unless you do a statement modifier, which is also not what we were talking about :)
21:20 MikeFair oh yeah - totally
21:21 MikeFair completely a force of habit, few languages I use don't take, makes it clear to me where the expression begins and ends
21:21 masak it's a matter of habit.
21:21 MikeFair the ) { is a clearer marker to me
21:21 MikeFair :)
21:22 MikeFair as is the if (
21:22 MikeFair To me they actually read like one transition word
21:22 masak nowadays I feel the "default" is without the parens, and putting in the parens feels cluttered.
21:22 FROGGS_ jnthn: I would like to have a '=begin inline C', and you have a zavolaj-similar sub 'is inline' that get the $=pod[0], but well, all the inline C is just a workaround for getting an OpaquePointer from an Int
21:22 MikeFair masak: and the {}'s aren't?
21:23 MikeFair ;)
21:23 masak MikeFair: we have plenty of people go "I'm never gonna stop using the parens!", and we go "oh, that's fine", and two weeks later they're backing saying "not using parens is awesome!" :P
21:23 MikeFair hehe
21:23 masak MikeFair: no, the {}s are there to group the statements in the if branch and the else branch ;)
21:24 MikeFair and the () are to group the boolean expression statement (which could be complicated) making the branch determination ;)
21:24 * MikeFair chuckles.
21:24 masak MikeFair: by requiring them there, we're helping (a) you not to make simple coding mistakes when one statement in there turns to many, and (b) the compiler not to make parsing misjudgements related to dangling elses.
21:25 masak note that these two reasons don't apply to the parens.
21:25 jnthn FROGGS_: Yeah, I guess nicest is if the C code we get comes from the sub's body
21:26 FROGGS_ ahh
21:26 FROGGS_ thats better, ya
21:26 jnthn And we can even generate the C signautre automatically from the Perl 6 one.
21:26 MikeFair masak: Sounds like good enough reasoning to me :-)
21:26 jnthn Well, with a little care :)
21:27 MikeFair masak: I actually don't really, I just don't like thinking about it when I busy shifting between various langauges with subtle distinctions :)
21:27 FROGGS_ sub AplusB ( Int $a, Int $b) is native('C') { ... }
21:27 MikeFair err s/really/really care
21:27 FROGGS_ err, inline
21:27 jnthn is inline perhaps...
21:27 sorear any chance of adding an Int to OpaquePointer conversion function, jnthn?
21:27 FROGGS_ right
21:27 jnthn sorear: Yes :)
21:27 MikeFair I don't use them when I write xTalk, but that's because there all symbols look out of place. :)
21:28 FROGGS joined #perl6
21:28 jnthn sorear: But shh...we can get an Inline::C if that ain't fixed too quickly ;-) ;-)
21:28 FROGGS *g*
21:28 FROGGS well, my problem is that I dont know the rakudo/nqp internals to actually do that
21:28 FROGGS but I will try
21:29 jnthn FROGGS: I don't think it'll need much in the way of internals, fwiw.
21:29 jnthn FROGGS: Note that you can programatically apply the is native trait also by calling trait_mod:<is>(...) directly
21:30 [particle] joined #perl6
21:31 jnthn So I'd guess the inline trait can just wrap the sub. On the first call it does callsame, and the sub returns the C code (so it just contains a quote). It goes off and compiles this into some temporary library, then applies the native trait to the sub, which again wraps it with the native calling stuff.
21:31 FROGGS I really like C
21:32 jnthn By this point the original sub probably feels like a matryoshka doll...but I think it'll work out :)
21:34 * masak finds implementing macros makes him feel like the smallest doll in a matryoshka doll :P
21:34 MikeFair ok bbiab
21:35 FROGGS masak: but these "small dolls" have the major impact
21:35 masak don't I know it.
21:35 jnthn Actually, if you drop 'em, I suspect it's the larger ones that are most impacted :P
21:44 masak :)
21:50 masak 'night, #perl6
21:50 FROGGS gnight
21:51 quietfan1tic I wondered why it's called Native Call when it's actually C Call
21:52 quietfanatic or rather, CDECL Call
21:52 pmurias CDECL?
21:52 quietfanatic Calling conventions
21:52 quietfanatic There's also, like, stdcall and fastcall
21:52 quietfanatic cdecl is the one C uses (at least in 32-bit x86)
21:53 quietfanatic anyway, what I mean to say is C != native
21:54 sorear in parrot/rakduo land it is
21:55 sorear but yeah funny
21:55 jnthn Java calls it Java Native Interface. Lua calls them Native Function Calls. etc.
21:55 quietfanatic Parrot and Rakudo assume that the only native functions are C functions
21:55 quietfanatic or those compatible with C functions.
21:55 jnthn Bull.
21:55 jnthn Anything that works through dlsym is fine.
21:56 quietfanatic Anything that works through dlsym and has cdecl calling convention.
21:56 quietfanatic Google's Go compiler, for instance, has a different calling convention, if I recall correctly
21:56 quietfanatic though I don't know if that compiler supports making shared libraries yet.
21:56 jnthn Note that dyncall (which NativeCall is built on) can handle things besides cdecl.
21:57 quietfanatic oh, can it?
21:57 jnthn er, and the NativeCall module also already exposes that :)
21:57 quietfanatic then it is, in fact, true native call, and you can ignore my ranting
21:57 jnthn :)
21:57 * quietfanatic rants about things he doesn't actually know about again
21:57 jnthn ;)
21:58 * jnthn had to go check the code to see if it actually does provide a way to pass an alternative convention to dyncall
21:58 quietfanatic when I was working with Parrot's NCI several years ago, it seems tuned to C functions at the time
21:59 jnthn NativeCall isn't built on Parrot's NCI, fwiw.
21:59 quietfanatic oh?
21:59 jnthn No, it's a clean implementation atop of dyncall, which integrates with the 6model stuff.
22:00 jnthn So C structures can just be normal objects with a different representation.
22:00 sorear parrot's NCI, iirc, expects to have a list of signatures which will be used at compile time
22:00 quietfanatic okay, I clearly am pretty out of the loop
22:00 diakopter welcome back to the loop
22:00 sorear which makes it less than ideal for zavolaj
22:00 jnthn The loop got less loopy while you were gone :)
22:01 quietfanatic heh
22:01 sorear Speak for yourself! :D
22:01 quietfanatic yeah, I stopped using Parrot's NCI because it only supports a finite number of signatures
22:02 quietfanatic (took me a while to figure out what meant by list of signatures at compile time)
22:03 sorear .oO( zavolaj only supports a countable number of signatures )
22:04 quietfanatic :)
22:05 * quietfanatic thinks that using C libraries should be as easy as 'use From::C "GL/gl.h" "libGL.so";'
22:06 * quietfanatic also thinks that C compilers should support dumping out symbols and type information so that Perl 6 doesn't have to parse C code itself to use it.
22:07 jnthn Having it that easy would be pretty nice :)
22:08 jnthn urgh, exhausted already :/
22:08 jnthn 'night o/
22:08 FROGGS gnight
22:11 MikeFair_ joined #perl6
22:13 MikeFair_ Hey guys, I think I've found something that might be indicative
22:13 MikeFair_ moritz / jnthn: If I enter the interactive shell and execute 'if 1 then ; say 1; end if'
22:14 MikeFair_ I've eliminated all spurious newlines and other noise, I output what exactly is in the .asts of both $<cond> and $<then> (which look good) and I get the error
22:15 MikeFair_ same op if: invoke() not implemented
22:15 pmurias quietfanatic: use have to deal with a very Cish interface if you want to have the binding done fully automatically
22:15 pmurias quietfanatic: like getting a char* instead of a string
22:16 MikeFair_ moritz / jnthn: I added ; as part of the <return> match for just such a use case so I can put a "newline" on a single line
22:26 the joined #perl6
22:39 quietfanatic phenny: tell pmurias I'm pretty sure solving type conversions like char* -> Str is an AI-complete problem, or at least domain-specific.
22:39 phenny quietfanatic: I'll pass that on when pmurias is around.
22:42 sorear quietfanatic: that is precisely pmurias' point
22:42 sorear you proposed fully automated binding, pmurias replied that it was AI-complete to properly deal with things like char*
22:43 quietfanatic phenny: tell pmurias So if the programmer wants to use a C library, I'd presume they have that library's documentation around
22:43 phenny quietfanatic: I'll pass that on when pmurias is around.
22:43 quietfanatic sorear: yeah, I'm agree while sounding like I'm disagreeing
22:43 quietfanatic *agreeiung
22:43 quietfanatic *agreeing
22:44 quietfanatic and saying: yes, that's what I want.
22:49 not_gerd joined #perl6
22:50 not_gerd just for the record: parrot supports arbitrary NCI signatures through libffi since 2010
22:54 tadzik joined #perl6
22:55 pmurias joined #perl6
22:58 tadzik hrm, was thee a reboot again?
22:59 benabik joined #perl6
23:03 sorear tadzik: hrm, uptime is 2h46m so I guess
23:04 quietfanatic not_gerd: oh, cool
23:05 tadzik hm, strange
23:05 tadzik oh, no, it sounds okay-ish
23:17 not_gerd quietfanatic: the issue with libffi is that it doesn't work with MSVC out of the box, just MinGW
23:30 not_gerd good night, #perl6
23:30 not_gerd left #perl6
23:35 yarp joined #perl6
23:45 TimToady http://rosettacode.org/wiki​/Total_Circles_Area#Perl_6  <- interesting problem
23:46 rsimoes joined #perl6
23:58 timotimo there's no guarantee that nobody will create a Rect where the points don't have right angles :P
23:58 timotimo well, it won't happen in that code i'm sure, but ...
23:59 timotimo oh, hold on. "rectangle" doesn't even mean that. never mind me, then
23:59 timotimo (the area function isn't 'really' correct in that case, though)

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

Perl 6 | Reference Documentation | Rakudo