Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-03-23

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:07 bph left #perl6
00:09 p6eval left #perl6
00:09 bph joined #perl6
00:09 dalek left #perl6
00:09 sorear left #perl6
00:09 TimToady left #perl6
00:10 TimToady joined #perl6
00:11 dalek joined #perl6
00:11 sorear joined #perl6
00:13 adriano86 joined #perl6
00:13 adriano86 anyone know perl 7?
00:14 p6eval joined #perl6
00:14 bph left #perl6
00:14 plobsing left #perl6
00:15 sbp perl7 is like the speed of light
00:15 adriano86 and your coding in perl6
00:15 adriano86 which makes you retarted by nature
00:15 adriano86 :P
00:16 flussence_ hm, I thought perhaps the incident last night (http://irclog.perlgeek.de/perl6/2011-03-22#i_3413171) was a one-off. Guess not.
00:16 sbp . o O ( someone who formerly lost their tarts in a strange accident? )
00:16 adriano86 no
00:16 adriano86 its not
00:16 adriano86 im back!!
00:16 adriano86 ah umm
00:16 flussence_ sbp: prosthetic tarts?
00:16 adriano86 hold!
00:16 adriano86 left #perl6
00:16 adriano86 joined #perl6
00:17 adriano86 tadaaa!!
00:17 tyatpi_ left #perl6
00:17 adriano86 guess whos back!
00:20 dalek left #perl6
00:20 dalek joined #perl6
00:26 marienz joined #perl6
00:26 RichiH joined #perl6
00:27 RichiH has adriano86 been spamming/trolling in here?
00:28 flussence_ today and yesterday. We have logs if you wanna see: http://irclog.perlgeek.de/perl6/2011-03-22#i_3413171
00:29 RichiH thanks
00:29 adriano86 uh?
00:35 noganex left #perl6
00:44 plobsing joined #perl6
00:46 diakopter adriano86: "i dont need a god damn hug; I got a problem that i need solved" isn't really a welcome attitude around here
00:46 diakopter also, name-calling ("idiots")
00:48 donri adriano86: jävlaranama, är du svennebanan också?
00:50 adriano86 uh?
00:50 donri guess you're using a proxy because you think you're being oh so naughty.
00:50 adriano86 im not following
00:50 adriano86 i just talked to the network ops
00:50 adriano86 and apologized about my behaviour
00:50 woosley joined #perl6
00:51 donri adriano86++
00:51 adriano86 ye?
00:51 donri i was giving you positive karma :)
00:51 adriano86 ah
00:51 adriano86 jävlaranama, är du svennebanan också?
00:51 RichiH basically, the deal is: let's give him another chance, but please poke marienz or me if there are problems
00:51 diakopter I thought there were no karmabots
00:51 adriano86 my answer is no :P
00:52 diakopter RichiH: okay
00:52 noganex joined #perl6
00:52 adriano86 RichiH wheres the good faith? :(
00:52 adriano86 lol
00:52 adriano86 thanks for second chance though
00:52 * adriano86 taps RichiH
00:52 diakopter sigh
00:56 donri Well, we like to hug trolls and give them second chances  -- http://perl6advent.wordpress.com/2010/12/24/day-24-yule-the-ancient-troll-tide-carol/
00:56 adriano86 :D
00:56 adriano86 take care donri ;P
00:56 adriano86 gn
00:56 adriano86 left #perl6
00:56 donri Sleep tight.
01:01 bph joined #perl6
01:08 molecules joined #perl6
01:08 arlinius joined #perl6
01:08 Chillance left #perl6
01:09 stkowski left #perl6
01:22 molecules left #perl6
01:29 bph left #perl6
01:29 bph joined #perl6
01:40 bph left #perl6
01:43 Helios- left #perl6
01:44 arlinius left #perl6
01:48 Helios- joined #perl6
01:49 arlinius joined #perl6
02:02 whiteknight left #perl6
02:06 tyatpi_ joined #perl6
02:15 bph joined #perl6
02:26 bph left #perl6
02:30 dalek roast: b0d6bcf | (Martin Berends)++ | / (2 files):
02:30 dalek roast: remove S16-filehandles/io.t tempfile, and .gitignore *.niecza
02:30 dalek roast: review: https://github.com/perl6/roast/commit/b0d6bcffe3
02:40 icwiener left #perl6
02:40 icwiener_ joined #perl6
02:47 mberends interesting to read the Jikes JVM GSOC 2011 proposals: infrastructure, garbage collection, concurrency, native structs, ... Sound familiar? http://jikesrvm.org/Google+Summer+of+Code+2011
02:47 icwiener_ left #perl6
02:50 agentzh joined #perl6
02:51 tyatpi_ left #perl6
02:51 cls_bsd left #perl6
02:56 alim left #perl6
03:00 orafu left #perl6
03:02 GinoMan2440 left #perl6
03:02 orafu joined #perl6
03:11 tyatpi_ joined #perl6
03:26 sorear mberends: I think we could usefully pool certain efforts on JVM targetting
03:27 mberends oh yay, I am dreading the hugeness of that work :)
03:28 sorear I also need a Java component which can generate JVM code with gotos
03:28 sorear I've historically thought of "I need a JVM port of the CLR bytecode emitter"
03:29 satyavvd joined #perl6
03:29 mberends it would be nice if the goto related part could be handled by some special code, and the rest handled by standard Java compilers, but I'm not sure if that is achievable.
03:30 mberends the two bytecode dialects (JVM and CLR) are probably similar
03:31 sorear does the JVM have a managed class-file writer these days?
03:32 mberends no idea
03:32 sorear niecza relies on System.Reflection.Emit, which is on ~ the same level as ilasm
03:33 GinoMan joined #perl6
03:33 * sorear wonders if a jvm version will necessarily entail 1 class per (un-deleted) Perl 6 sub
03:35 sorear I haven't seriously studied the JVM since 1.1 days
03:41 sorear mberends: should jNQP/jRakudo support gather?
03:42 mberends It Would Be Nice ;)
03:43 mberends this may help: http://asm.ow2.org/ also Jasmin contains a B::JVM::Emit http://cpan.uwinnipeg.ca/htdocs/B-JVM-Jasmin/B/JVM/Emit.html
03:44 donri Jasmin?
03:44 mberends JVM Assembler
03:45 s1n joined #perl6
03:46 sorear mberends: not an option. choose carefully
03:46 sorear the question of whether to use the native vm activation stack has very pervasive consequences
03:46 mberends good. I don't like blind alleys
03:47 mberends yes, I do understand that stack management and concurrency are deeply intertwined.
03:49 mberends if gather *demands* CPS, I would be happy to consign gather to the very long term TODO list.
03:49 satyavvd left #perl6
03:51 mberends life's too short to spend on goals like that, while far simpler problems are still unsolved, such as getting reasonable speed.
03:56 sorear niecza/.net uses CPS, and imho it gets reasonable speed.
03:57 mberends several serious Perl 5 users have told me they would not compile their current perl 5.12.x with threads enabled because of an approximate 15% performance penalty, so speed is a major issue to at least that group.
03:58 mberends yes, I think niecza's speed is very nice, one of its nice attributes :)
04:02 nymacro joined #perl6
04:03 c9s joined #perl6
04:05 sorear Perl 5 relies heavily on global variables
04:05 sorear the "threads penalty" is really a "thread local storage" penalty
04:06 sorear for the same reason -fpic hurts perl5 quite a bit
04:06 * sorear is reading the asm.ow2.org stuff
04:09 mberends I find it surprising that those users prefer a single thread that is 15% faster, to potentially maany more threads that are 15% slower. It shows the preferences and priorities of Perl used in heavy production work (ie most heavy work cannot yet profit from multithreading)
04:10 c9s left #perl6
04:10 sorear mberends: perl 5 threads are shared-nothing
04:10 mberends good!
04:10 sorear mberends: real Perl 5 programmers use UNIX, and on unix fork() is just as fast as pthread_create()
04:11 sorear fork() gives you all of the benefits of Perl 5 threads without the performance penalty, and is heavily used in real-world p5 code
04:12 mberends oh yes, I sneaked a Unix fork into Perl 6 (Rakudo Zavolaj) for fun :)
04:13 mberends it probably scales better today. The Parrot developers (bacek++ I believe) have done great work slimming down the size of the Rakudo perl6 process (now 50-60MB as the spectests are running here, was over 100MB)
04:14 donri Real Scotsmen use coroutines
04:14 mberends :)
04:18 sorear mberends: does core.pir still require 2000MiB to generate?
04:19 sorear I stopped following rakudo when it became effectively unbuildable
04:19 mberends it was about 300MiB recently, I'll watch the next one build and let you know
04:23 coldhead scotsmen?
04:23 mberends http://en.wikipedia.org/wiki/No_true_Scotsman
04:25 coldhead no further questions, your honour!
04:25 starcoder2 left #perl6
04:25 mberends just use coroutines!
04:27 starcoder2 joined #perl6
04:29 flatwhatson left #perl6
04:29 sorear mberends: ASM is exactly what I need. Thank you.
04:29 flatwhatson_ is now known as flatwhatson
04:29 mberends sorear: great!
04:31 * mberends thinks of stealing sorear++'s future niecza/jvm work for 6model/jvm ;)
04:31 sorear mberends: I ask about gather because a common jvm backend for niecza and 6model would benefit from them agreeing on whether to use CPS
04:32 mberends yes of course.
04:32 sorear I'm probably going to use CPS for niecza/jvm, just because I already know how to make a CPS niecza backend for JVM clones work
04:32 mberends I personally remain skeptical about the long term performance competitiveness of CPS versus stack-based.
04:34 sorear "CPS versus stack-based" is the wrong mental model
04:34 mberends it seems to me that in CPS the heap must be used to do much of the stack's job, and the heap is a performance drain. CPS kind of turns your memory into a heap of mini-stacks.
04:35 sorear the question is whether to use the VM's current continuation to model Perl 6's current continuation
04:35 mberends but please correct my mental model.
04:35 sorear or whether a different VM structure needs to be used
04:36 mberends I lack the knowledge to make a meaningful comment
04:36 sorear the JVM current continuation is fast but inflexible; stuff like gather/take and two-phase continuable exceptions are hard
04:37 sorear a continuation is a data structure which holds a return path
04:37 mberends ok
04:37 sorear the JVM implements continuations using opaque stacks; it provides insufficient operations to handle Perl 6
04:38 sorear Perl 6 is designed to be barely runnable using a stack for a language-level continuation, which in practice means that none of the existing implementations are up to the task
04:39 mberends to handle which parts of Perl 6 - gather, junctions I suppose, and what else?
04:39 sorear CATCH
04:39 sorear $*FOO
04:40 mberends you're beginning to answer your own question, I think
04:40 sorear both require scanning up the call stack, which is possible on the CLR but incredibly inefficient (it's basically only designed to be used at breakpoints)
04:41 sorear mberends: the question for you is how important these features are
04:41 mberends I've understood "walking the stack" before, but that was with native code, probably therefore a bit different.
04:42 sorear 6model/.net uses a hybrid model; the continuation is split into the return addresses (which are kept in the CLR stack) and the local variables (which are kept on the CLR heap)
04:42 sorear naively, this is the worst of both worlds, but it could have some benefits if the CLR implementation is doing interprocedural optimizations
04:44 mberends sorear: to me personally, and the Perl 5 users I wrote about, speed is *almost* everything, and niceties like CPS would be welcome only if the perceived overhead is much less than 15%.
04:47 mberends The Parrot docs state that CPS is an all or nothing architectural choice. I have always harbored a silent hope that this assertion is not entirely true, and that a hybrid system of flow control can be designed.
04:49 donri Child Protective Services?
04:49 mberends yes, that too
04:50 sorear CPS is a horrible misnomer but there's nothing better established
04:51 sorear niecza has an interesting optimization that allows most code to run using very few frame allocations
04:57 donri left #perl6
05:00 * diakopter likes it
05:01 sorear "it" ambiguous.
05:02 diakopter hee
05:02 diakopter the framepool
05:05 sorear mberends: do you have any other recommended Java libraries for this?
05:05 mberends sorear: afraid not. also, $work is beginning to beckon :(
05:05 aindilis left #perl6
05:06 aindilis joined #perl6
05:06 sorear once I get more tuits I'll look into alternate VMs some
05:07 sorear I suspect dalvik will run fine on this machine :p
05:12 * diakopter recalls pointing out asm.ow2 to mberends :P
05:13 diakopter I think.
05:13 sorear diakopter: you do java?
05:13 diakopter when asked to by my employers
05:14 diakopter oh btw, did you see? sfly is buying tiny prints
05:15 diakopter $333m
05:17 sorear I don't even know what sfly is.  *fails*
05:17 diakopter oh, my employer's stock symbol
05:17 diakopter short for Shutterfly
05:20 diakopter someone please come work for us. I wrote this job description and posted this position: http://sfbay.craigslist.org/pen/sad/2270751187.html
05:22 mberends diakopter: Am I allowed to choose on which part of the planet I stay? ;)
05:25 diakopter actually, possibly.
05:26 diakopter stay long-term/mostly, anyway
05:27 diakopter email me @gmail for details, anyone.  Sorry for somewhat [OT]
05:27 Lorn left #perl6
05:28 Lorn joined #perl6
05:28 mberends sorear: don't apply! come to (Netherlands|Sweden) instead!
05:28 diakopter sorear's too young to have 5-10 years experience supporting production UNIX environments :P
05:29 sorear I've heard rumours the Swedish immigration process is hell
05:29 mberends sorear must have a time machine that compresses 20 years of experience into 5
05:30 sorear diakopter: around 2007 I was supporting 3 production UNIX environments simultaneously.  Can I count that as 3 years?
05:30 diakopter hm
05:44 ruslan joined #perl6
05:44 ruslan left #perl6
05:45 Tene "depends on negotiation ability" seems pretty unfortunate, but likely true almost anywhere.
05:45 diakopter yes :D
05:45 sftp joined #perl6
05:45 diakopter such a healthy qualifier
05:46 Tene I've got most of what's asked for there.
05:47 nulrsan joined #perl6
05:47 * diakopter suggests taking such a convo to priv
05:48 Tene I'm not comfortable negotiating.  In the past, when speaking with employers about compensation, I've told them that, and so far it's happened to work out well for me.  "i'm not comfortable negotiating, and I'm underinformed and poorly calibrated about my value to the company and the job market in this area.  If I'm going to work for you, I have to trust you anyway, so I trust you to make me a fair offer."
05:48 Tene I guess I'm better-informed and better-calibrated these days, though.
05:48 TiMBuS im a metrologist. i will be the judge of that
05:49 TiMBuS its just rare for people to even say the word 'calibration' outside of my work so i get excited
05:51 Tene It's not very common in my workplace, but trying to have a sense of how well-calibrated I am on various tasks has been an important tool in my life.
05:52 sorear I use calibrated a lot but never with regards to people
05:52 sorear I have a lot of improvised measuring devices in my life
05:53 Tene I somehow have a vague expectation that someday my habit of placing large amounts of trust in people will fail badly, but so far it's always worked out very well for me, so I'm probably going to keep it up at least until it fails.
05:54 TiMBuS can you trust me to hold your gold egg laying goose
05:55 Tene Sure.
05:56 diakopter hee
05:58 TiMBuS aw, you called my bluff. i wouldn't steal it because im too nice. i would just pet it
05:59 sorear Tene: how often do you turn your back on strangers?  go out in public without a shotgun?
06:00 sorear a lot of people are a lot more trusting than they realize.  You are, relatively to the baseline, a lot less trusting than you say
06:00 diakopter I would make the goose eat its own eggs
06:00 mberends Tene: I have negotiated in a similar way to you before, with the added declaration that I am not averse to leaving if it the offer turns out to be unfair to me.
06:00 mberends s/it//
06:04 Tene mberends: It's also relevant that money hasn't ever been the deciding factor in my employment choice.  I've found places that I want to work at with a team that I like, and then the compensation details have been secondary to that.
06:04 Tene I've always meant to try to start caring more about money, but I haven't been able to manage it yet.
06:05 mberends a healthy balance is the key
06:07 sorear Tene: you should think of being in an environment you actually want to work in as part of the benefits package
06:08 Tene sorear: Yes, I should.  Effectively, though, it's been the deciding factor every time so far.
06:08 Tene It would probably be useful to me if I could care about money more.
06:11 mberends we are probably not the kind of people who would have invented money, but since money is so pervasive it helps to manage it so that it doesn't manage us.
06:12 nulrsan left #perl6
06:14 sftp left #perl6
06:16 diakopter real money isn't invented; it comes to be as a measure of the medium of exchange. fiat money is invented.
06:16 diakopter and yes, I used one of the naughty words ('real', 'true', 'correct', 'actual', 'right')
06:16 mkramer1 joined #perl6
06:16 mkramer left #perl6
06:18 alim joined #perl6
06:18 mberends what makes me very sad is that modern financial systems have put many people into various situations of economic slavery, resulting in terrible actions such as even murder and suicide.
06:19 * diakopter tooo
06:19 cosimo left #perl6
06:19 sorear wanted: 1x anarcho-socialist utopia
06:20 * diakopter should note, I wasn't contradicting mberends' comment
06:20 diakopter wanted: 1x anarcho-capitalist utopia
06:21 diakopter "It would probably be useful to me if I could care about money more." ->
06:22 diakopter s/could/needed to/  s/money/where life essentials came from/
06:23 mberends commute & # on-topic for once ;)
06:23 sorear I think that's the definition of "poor"
06:30 mberends left #perl6
06:43 * sorear out
06:47 kaare_ joined #perl6
07:00 woosley1 joined #perl6
07:03 woosley left #perl6
07:09 wtw joined #perl6
07:28 alim left #perl6
07:28 noganex_ joined #perl6
07:31 noganex left #perl6
07:31 Axius joined #perl6
07:38 woosley1 left #perl6
07:38 [particle] left #perl6
07:46 tyatpi_ left #perl6
07:47 f00li5h left #perl6
07:49 Mowah joined #perl6
07:56 ilogger2 left #perl6
07:56 woosley joined #perl6
08:02 Axius hello
08:03 noganex_ is now known as noganex
08:03 ilogger2 joined #perl6
08:14 woosley1 joined #perl6
08:16 dalek book: edeee38 | (Patrick Donelan)++ | src/roles.pod:
08:16 dalek book: s/does affect/does not affect/
08:16 dalek book: review: https://github.com/perl6/book/commit/edeee38386
08:16 woosley left #perl6
08:19 Axius left #perl6
08:19 fhelmberger joined #perl6
08:19 Axius joined #perl6
08:20 dukeleto left #perl6
08:33 quester_ joined #perl6
08:35 alim joined #perl6
08:56 tzhs joined #perl6
09:02 Trashlord joined #perl6
09:06 f00li5h joined #perl6
09:06 Axius left #perl6
09:17 Axius joined #perl6
09:18 woosley1 left #perl6
09:23 quester_ left #perl6
09:50 dual left #perl6
09:51 dakkar joined #perl6
09:54 dalek specs: cf855ee | moritz++ | S32-setting-library/IO.pod:
09:54 dalek specs: [S32::IO] bring INET stuff closer to reality
09:54 dalek specs: review: https://github.com/perl6/specs/commit/cf855ee191
09:58 dual joined #perl6
10:04 tzhs left #perl6
10:19 Axius left #perl6
10:19 moritz_ mberends++ # roast commit b0d6bcf; those temp files were annoying, but somehow I always searched in the wrong places...
10:20 bacek left #perl6
10:25 awoodland joined #perl6
10:27 Helios- left #perl6
10:28 Helios- joined #perl6
10:32 gfldex left #perl6
10:33 gfldex joined #perl6
10:33 bacek joined #perl6
10:38 ascent_ left #perl6
10:38 ascent_ joined #perl6
10:50 Helios- left #perl6
10:50 moritz_ phenny: tell sorear FYI rakudo build mem usage currently peaks at ~600MB on a 64bit platform. ISTR that the GC threshold depends on available mem, so might be different on your machine
10:50 phenny moritz_: I'll pass that on when sorear is around.
10:51 Helios- joined #perl6
11:01 ggoebel left #perl6
11:04 agentzh left #perl6
11:07 ggoebel joined #perl6
11:11 ggoebel left #perl6
11:17 ggoebel joined #perl6
11:21 ggoebel left #perl6
11:23 shi joined #perl6
11:27 ggoebel joined #perl6
11:34 awoodland left #perl6
11:58 plainhao joined #perl6
12:05 ab5tract joined #perl6
12:11 takadonet morning all
12:27 mtk joined #perl6
12:38 moritz_ hi takadonet
12:45 tyatpi_ joined #perl6
12:47 ab5tract left #perl6
12:55 nadim_ joined #perl6
12:56 mtk left #perl6
12:56 nymacro left #perl6
12:58 ascent_ left #perl6
12:58 ascent_ joined #perl6
12:59 tadzik left #perl6
13:00 coldhead left #perl6
13:03 mtk joined #perl6
13:03 Grimnir_ left #perl6
13:06 bluescreen10 joined #perl6
13:07 estrabd left #perl6
13:08 estrabd joined #perl6
13:10 tzhs joined #perl6
13:14 [particle] joined #perl6
13:17 bluescreen10 left #perl6
13:17 plobsing left #perl6
13:17 mce_ro joined #perl6
13:17 bluescreen10 joined #perl6
13:19 MayDaniel joined #perl6
13:24 xhr joined #perl6
13:30 xhr left #perl6
13:33 MayDaniel left #perl6
13:33 kfo_ left #perl6
13:39 nulrsan joined #perl6
13:49 kfo joined #perl6
13:56 tyatpi_ left #perl6
13:57 plobsing joined #perl6
14:11 spq joined #perl6
14:15 spq left #perl6
14:25 sftp joined #perl6
14:25 bluescreen10 left #perl6
14:30 alester joined #perl6
14:32 moritz_ phenny: tell mberends you might consider coming up with a NQP-on-JVM GSOC proposal
14:32 phenny moritz_: I'll pass that on when mberends is around.
14:44 colomon \o
14:45 jnthn o/ colomon
14:45 colomon jnthn!  \o/
14:46 colomon How goes it?
14:46 dalek nqp/ctmo: 81203dc | jonathan++ | src/Regex.pir:
14:46 dalek nqp/ctmo: Fix --target=pa[rse|st] - got broken at some point in this branch.
14:46 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/81203dc952
14:46 jnthn colomon: Nicely :-)
14:46 jnthn colomon: I'm in Taipei :)
14:46 colomon wheee!
14:46 jnthn City of nice noms :)
14:46 moritz_ how is the hacking climate over there?
14:46 alester left #perl6
14:46 jnthn The city is too distracting ;-)
14:46 alester joined #perl6
14:47 * colomon got six inches of snow overnight, and it hasn't stopped yet.  :(
14:47 jnthn I've settled down now to write a very small purely NQP language implementation to use in my talk on Sunday, which is about writing compilers :)
14:48 colomon is NQP the language to be implemented or the language supporting the implementation?  ;)
14:48 jnthn The latter :)
14:48 jnthn The language being implemented is called TinyLang because I had a creativity fail
14:48 PerlJam jnthn: just implement lisp  :)
14:48 moritz_ colomon: wow. It's quite sunny and warm here, it's the first day I didn't wear a coat while visiting lunch nom location (5 minutes walk or so)
14:49 colomon moritz_: we had a week or two of nice weather, but winter suddenly came back yesterday.
14:50 alester left #perl6
14:50 alester joined #perl6
14:54 kaare_ left #perl6
15:00 tadzik joined #perl6
15:04 dukeleto joined #perl6
15:04 tyatpi_ joined #perl6
15:05 nick joined #perl6
15:05 nick whoami
15:06 moritz_ you're nick. Congratulations.
15:06 nick thank you, moritz
15:06 nick this is a quiet room
15:07 PerlJam nick: it's your imagination
15:07 moritz_ not generally, just today
15:09 nick so, what is the major purpose of this room for?
15:09 PerlJam nick: Discussion of all things Perl 6
15:09 moritz_ Perl 6 development, community and fan base :-)
15:09 PerlJam and sometimes things Not Perl 6
15:10 PerlJam But mainly punning
15:10 moritz_ nick: btw that's what the /topic command is for
15:11 nick ok, i am sort of out of fashion using irc
15:12 moritz_ fashion is overrated
15:13 PerlJam nick: that's okay, we follow a very broad interpretation of the Postel principle around here.
15:15 nick maybe it is a stupid question, what is perl6 for? so many new script language, modern, fast, widely used, perfectly designed for internet age, like python, ruby, lua. perl6 even not compatible with it's prior versions.
15:16 pmurias joined #perl6
15:16 Patterner left #perl6
15:16 PerlJam nick: That's actually a very good question IMHO
15:16 mathw It sort of goes right to the heart of why we're here
15:17 PerlJam nick: Perl 5 did a lot of things right.  But in the process it did a lot of things wrong.  Perl 6 is about doing more things right.  :)
15:17 PerlJam nick: that's one slice of the answer
15:18 Psyche^ joined #perl6
15:18 Psyche^ is now known as Patterner
15:18 mathw nick: Python 3 is also not compatible with its prior versions, although the change is less dramatic than with Perl 6 I believe
15:19 PerlJam nick: Perl 5 is widely deployed and used.  Since Perl 6 has been in the works, several features have been ported to work with Perl 5.  So, in that sense, Perl 6 is a testbed for new ideas for Perl 5.
15:20 mathw Perl 6 also is intended to be a better language than Python, Ruby, Lua etc. (for some value of 'better'). Just because they exist is not a reason not to try something better.
15:20 nick yes, that is what i think and expect, but how does it compete with others? can it even take place of perl5? how long will it take to do so?
15:21 PerlJam nick: Why does it need to?
15:21 sbp nick: as probably more an observer than these guys, it might interest you to know that in my mind, perl6 is a hybrid of "cutting edge compsci" with "get-your-hands dirty practicality". so perl6 should allow you to make scripts that are easier to develop and yet more powerful (in certain ways) than with the other languages
15:21 wtw left #perl6
15:21 PerlJam nick: Why were python and ruby and lua invented?  Why didn't they just use an existing language?  (like perl ;-)
15:21 sbp as for the relationship of perl5 to perl6, think of perl6 not as a backwards compatible predecessor, but more as perl5's spunky younger sister
15:22 sbp er, *successor
15:22 mathw If Perl 6 does replace Perl 5, it would take a very long time to do so, just because of the vast amount of Perl 5 code that's out there
15:22 mathw That kind of transition simply isn't feasible, and won't happen.
15:22 moritz_ for me, Perl 6 is the successor of all general scripting languages
15:22 sbp a spunky younger sister doesn't replace her elder sibling
15:22 moritz_ others disagree :-)
15:22 sbp but she might be more cooler and fun to go out with
15:23 mathw What I hope to see is new projects being written in Perl 6.
15:23 nick you know, history is burden, perl5 code is already deployed all over the world.
15:23 mathw yes, so is COBOL code
15:23 sbp perl6 is doing better than python3 at least :-)
15:23 mathw But other languages have come along since, and how much new code is written in COBOL now?
15:24 PerlJam mathw: people still write new COBOL code (mainly to support some old COBOL code in a new world)
15:24 sbp python3 shows nicely the danger of doing a sucessor to a major language in a more incremental way
15:24 mathw PerlJam: that doesn't really count
15:24 sbp (infuriatingly, because python is my work-a-day programming language still)
15:24 mathw PerlJam: they don't start a completely new project in COBOL... well, not many of them
15:25 mathw sbp: From what I've see, Python 3 hasn't done much more than irritate people
15:25 PerlJam sbp: but python3 *will* replace python2 at some point soonish.  (perhaps too soonish :)
15:25 nulrsan left #perl6
15:26 moritz_ where "soonish" is probably "half a decade" or so
15:26 PerlJam right
15:26 PerlJam we're all about the long now here :)
15:26 sbp not for as long as they keep releasing 2.x versions at least :-)
15:27 PerlJam sbp: well, the other option is that the python community forks itself to keep the 2.x series alive.
15:27 sbp wouldn't surprise me at this rate
15:28 moritz_ would be a real pity, considering how small the difference between 2 and 3 is
15:28 sbp and the fact that 3 is actually better
15:29 sbp it's just that the advantage vector is of a smaller magnitude than the backwards compat disadvantage vector
15:29 moritz_ at least in the short term
15:29 hudnix left #perl6
15:29 nick then, who is doing the blueprint work in perl6? larry wall anticipated?
15:29 PerlJam time changes everything :)
15:29 sbp by that time we'll all be using perl6
15:29 PerlJam nick: larry wall is our language designer, yes
15:29 tadzik hello zebras
15:30 moritz_ though others also contributed a lot to the language
15:30 * moritz_ only tiny parts
15:30 hudnix joined #perl6
15:30 moritz_ hello panda herder, tadzik :-)
15:30 PerlJam moritz_: I don't know ... I think all of the discussion on #perl6 has contributed quite a bit the language over the years.
15:30 PerlJam moritz_: so, in a way, we've all had "major influence" on the language
15:32 nick what is the status of perl6? any authorized major release?
15:32 PerlJam nick: The Rakudo compiler releases every month.
15:32 moritz_ and niecza has roughly regular releases too
15:32 moritz_ both are usable for some applications, and pass parts of the official test suite
15:33 * moritz_ -> commute
15:34 nick how about deployment, what is it's mainly used for and what is it designed for?
15:34 sbp https://github.com/rakudo/star/downloads
15:34 PerlJam nick: everything.
15:35 tadzik it's design for getting the work done, in my experience. And it's not widely used in "production", but e.g. masak-san's blog runs on Perl 6
15:35 tadzik strangelyconsistent.org I think
15:35 alim left #perl6
15:35 kaare_ joined #perl6
15:35 sbp a lot of language work depends on people having written billions of modules
15:36 sbp but there's no perl6 cpan equivalent (yet)
15:36 PerlJam sbp: also, a good chunk of Perl 6 obviates the need for certain modules :)
15:36 hudnix left #perl6
15:36 sbp yup. depends what you're doing of course
15:37 sbp say you want to parse a JSON file
15:37 tadzik "There's a module for that!" :)
15:37 hudnix joined #perl6
15:37 sbp of course, you could just write the p6 grammar for JSON... :-)
15:37 donri joined #perl6
15:37 nick sbp, yes, that is my major doubt, perl5 code everywhere, they may be a tough trouble to be overcame by perl6
15:38 sbp no trouble really
15:38 sbp if there's perl5 and you want to use perl5, use perl5
15:38 sbp nobody's going to shout at ya :-)
15:38 sbp certainly people in the perl6 community will try to build better tools
15:39 tadzik Perl 6 is not the next version of Perl. It's a new language, and there's a reason for that
15:40 sbp consider anything with a grammar, say. even my JSON example
15:40 sbp people are going to look at good perl6 JSON code and say, yeah, I trust that more than say python's json module (which I use as an example because I know from experience it has problems!)
15:40 sbp and part of that will be based on the fact that grammars are a key, core feature of perl6
15:41 jnthn It turns out Perl 6 (or a subset of it, even) is quite nice for writing compilers in. :)
15:41 nick ok, understood your guy's opinion, perl6 is not successor of perl5, perl6 is new for modern use, perl6 is designed for no compatible with perl5, right?
15:41 tadzik right
15:41 tadzik well, it is a successor
15:41 sbp it's a successor but it doesn't replace
15:41 sbp the spunky younger sister metaphor is really quite handy
15:42 nick ok, that make sense, i am sort more interested in perl6.
15:43 tadzik cool
15:43 nick any short tutorial for perl6's glory technique spot?
15:43 PerlJam nick: which one?  ;)
15:44 tadzik nick: are you a Perl 5 programmer?
15:44 donri define compatible, you should be able to use Some::Module :from<perl5>;
15:45 nick i don't know, i just wanna have a glance at perl6 and taste it's famous flavor.
15:45 sbp here's a glance:
15:45 sbp sub nonexistent-or-older($target, :than($source)!) {
15:45 sbp return $target.IO !~~ :e
15:45 sbp || $target.IO.changed before $source.IO.changed;
15:45 tadzik check out the Advent Calendar then
15:45 nick mainly, i am php,python programmer
15:45 leprevost joined #perl6
15:45 fhelmberger left #perl6
15:45 tadzik nick: http://perl6advent.wordpress.com/
15:45 sbp }
15:45 tadzik some "Perl 6 at it's awesomest" examples
15:46 PerlJam nick: https://github.com/perl6/book too
15:46 fhelmberger joined #perl6
15:46 TimToady left #perl6
15:46 nick great, thank alot to you guys all.
15:46 TimToady joined #perl6
15:46 donri also https://github.com/perl6/perl6-examples
15:46 PerlJam nick: I've been writing some various "introduction to X" articles for Perl 6 at https://github.com/perlpilot/perl6-docs/tree/master/intro
15:46 donri also http://rosettacode.org/wiki/Category:Perl_6
15:47 PerlJam nick: *definitely* look at the rosettacode
15:47 nick btw i am not nick, it is a mistake, i am laurence.miao
15:47 tadzik no no, no perl6-examples
15:47 tadzik I don't think much of this code even runs
15:48 tadzik x3nU was fixing it some time ago, but I don't think he moved it any forward significantly
15:48 donri shouldn't http://rosettacode.org/wiki/JSON#Perl_6  use a % sigil?
15:48 tadzik rosettacode is nice if you want to see how practical solutions in Perl 6 compare to the others
15:48 PerlJam donri: why?
15:48 PerlJam donri: I mean, it *could*, but why should it? :)
15:49 donri i duno
15:49 nick quite late my local time, have to hit bed
15:49 Rotwang joined #perl6
15:49 nick c u, perl6 guys
15:49 PerlJam donri: scalars are the ultimate polymorphic containers in Perl
15:49 sbp oh, you guys did make a JSON parser already
15:49 sbp moritz_++ tadzik++
15:49 tadzik nick: see you soon :)
15:50 PerlJam sbp: modules.perl6.org is your friend  :)
15:50 donri PerlJam: i thought they behaved differently for e.g. lists
15:50 donri but i suppose you can @($foo)?
15:50 tadzik moritz_++, I didn't do anything about JSON parser :)
15:50 nick left #perl6
15:52 PacoLinux left #perl6
15:52 sbp what is https://github.com/perl6/misc reserved for?
15:52 sbp anything in particular?
15:52 donri why is 'is' used for export, rw, copy...?
15:53 flussence_ 'is' is a generic extendible adverb thing
15:53 donri i thought it was only inheritance
15:53 donri and that 'does' or 'but' would make more sense
15:53 flussence_ 'is native' uses it too
15:53 sbp I'd like to document the things that we just told nick/laurence.miao on Github somewhere
15:53 sbp somewhere in the perl6 organisation namespace sounds like a good idea
15:53 sbp on a wiki
15:54 PerlJam sbp: go for it!
15:54 sbp hence my asking what misc is for: would misc/wiki be a good place for it?
15:54 sbp (using Github's built in wiki functionality)
15:54 PerlJam As good as any.
15:55 sbp okay, making it
15:55 PerlJam sbp: if you have the appropriate commit privs, no one is going to yell at you for using them :)
15:55 PerlJam sbp: and if someone comes up with a better place, we can move it then
15:56 jnthn donri: is actually ends up calling trait_mod:<is>, which is multi-dispatch. That decides what actually happens.
15:59 donri intrusting
16:02 TimToady 'does' and 'but' have strictly circumscribed meanings; 'is' is allowed to do anything to the identity of the declarand
16:02 donri also, is it 'also is Foo;' or just 'is Foo;' inside blocks?
16:02 donri I see both used in examples
16:03 TimToady 'also' is newer, less ambiguous
16:03 shi left #perl6
16:03 TimToady "It's not what you does, but who you is."  :)
16:04 donri :D
16:04 donri and you can use that inside arbitrary blocks?
16:04 TimToady only inside the block of a known declarand
16:05 TimToady which happens to be dynamically scoped in the parser
16:05 TimToady in fact, in STD it's called $*DECLARAND
16:06 GinoMan left #perl6
16:06 TimToady it's convenient that the lexical scopes of your program can be represented by dynamic scopes in a recursive descent parser...
16:07 donri I should quote you on that on Facebook and see what grandma' thinks
16:08 tzhs left #perl6
16:08 ronoreck joined #perl6
16:09 cotto left #perl6
16:10 hercynium joined #perl6
16:17 Alias left #perl6
16:19 sbp .title https://github.com/perl6/misc/wiki/Get-Into-Perl6
16:19 phenny sbp: Get Into Perl6 - GitHub
16:20 tadzik sbp++
16:22 * tadzik adds this and that
16:25 moritz_ somebody please add this to perl6.org somewhere
16:26 tadzik https://github.com/perl6/misc/wiki/_compare/1a3a...17a8 -- my tunes
16:28 dsp_ left #perl6
16:29 ymasory joined #perl6
16:29 dsp_ joined #perl6
16:31 bluescreen10 joined #perl6
16:32 dsp_ left #perl6
16:32 MayDaniel joined #perl6
16:34 dsp_ joined #perl6
16:37 xinming joined #perl6
16:42 ymasory left #perl6
16:45 bluescreen10 left #perl6
16:45 mce_ro left #perl6
16:55 cdarroch joined #perl6
16:55 cdarroch left #perl6
16:55 cdarroch joined #perl6
16:57 donri left #perl6
16:59 donri joined #perl6
17:00 bluescreen10 joined #perl6
17:00 icwiener joined #perl6
17:08 ymasory joined #perl6
17:08 fhelmberger left #perl6
17:22 donri left #perl6
17:24 plobsing left #perl6
17:34 ronoreck left #perl6
17:38 plobsing joined #perl6
17:40 donri joined #perl6
17:40 risou joined #perl6
17:45 ronoreck joined #perl6
17:45 pmurias left #perl6
17:50 snearch joined #perl6
18:05 impious joined #perl6
18:06 stkowski joined #perl6
18:11 [hercynium] joined #perl6
18:12 [hercynium]_ joined #perl6
18:12 [hercynium]_ left #perl6
18:12 [hercynium]_ joined #perl6
18:14 hercynium left #perl6
18:15 [hercynium] left #perl6
18:22 qu1j0t3 joined #perl6
18:27 alim joined #perl6
18:31 alim left #perl6
18:43 MayDaniel left #perl6
18:45 alim joined #perl6
18:49 snearch left #perl6
18:51 dakkar left #perl6
18:51 alim left #perl6
18:55 jql left #perl6
18:56 alim joined #perl6
18:59 alim left #perl6
19:03 Chillance joined #perl6
19:04 saaki left #perl6
19:07 dsp_ left #perl6
19:14 saaki joined #perl6
19:16 dsp_ joined #perl6
19:17 dsp_ left #perl6
19:22 donri How do I do this inline without subset?  my Str where /^H/ $s = 'Hello'
19:26 dsp_ joined #perl6
19:27 impious left #perl6
19:29 mce_ro joined #perl6
19:35 colomon rakudo: my Str where { $_ ~~ /^H/ } $s = 'Hello; say $s
19:35 p6eval rakudo d5ccf9: OUTPUT«===SORRY!===␤In "my" declaration, typename Str must be predeclared (or marked as declarative with :: prefix) at line 22, near " where { $"␤»
19:35 colomon std: my Str where { $_ ~~ /^H/ } $s = 'Hello; say $s
19:35 p6eval std 4608239: OUTPUT«[31m===[0mSORRY![31m===[0m␤Multiple prefix constraints not yet supported at /tmp/wYlWxgatBP line 1:␤------> [32mmy Str [33m⏏[31mwhere { $_ ~~ /^H/ } $s = 'Hello; say $s[0m␤Malformed my at /tmp/wYlWxgatBP line 1:␤------> [32mmy Str [33m⏏[31mwhere { $_ ~~ /^H/ } $s =
19:35 p6eval ..'Hell…
19:37 awoodland joined #perl6
19:44 tadzik ...Hell...
19:46 bluescreen10 left #perl6
19:51 TimToady std: my
19:51 p6eval std 4608239: OUTPUT«[31m===[0mSORRY![31m===[0m␤Malformed my at /tmp/la8cjjmMrv line 1 (EOF):␤------> [32mmy[33m⏏[31m<EOL>[0m␤    expecting scoped declarator␤Parse failed␤FAILED 00:01 118m␤»
19:52 TimToady std: my Str $s where /^H/ = 'Hello'; say $s;
19:52 p6eval std 4608239: OUTPUT«ok 00:01 123m␤»
19:52 TimToady rakudo: my Str $s where /^H/ = 'Hello'; say $s;
19:52 p6eval rakudo d5ccf9: OUTPUT«===SORRY!===␤Confused at line 22, near "my Str $s "␤»
19:52 TimToady rakudo: my Str $s where (/^H/) = 'Hello'; say $s;
19:53 p6eval rakudo d5ccf9: OUTPUT«===SORRY!===␤Confused at line 22, near "my Str $s "␤»
19:53 TimToady rakudo: my (Str $s where /^H/) = 'Hello'; say $s;
19:53 p6eval rakudo d5ccf9: OUTPUT«Hello␤»
19:53 TimToady donri: ^^
19:54 plobsing left #perl6
19:57 colomon std: my (Str $s where /^H/) = 'Hello'; say $s;
19:57 p6eval std 4608239: OUTPUT«ok 00:01 126m␤»
19:57 colomon TimToady++
19:59 PerlJam Though when it takes the language designer 3 tries to get it right, I have to wonder if there's a language misfeature lurking there.
19:59 PerlJam :-)
20:12 PZt left #perl6
20:16 sbp valid in std but not in rakudo means that rakudo is behind, doesn't it?
20:16 sbp nyi?
20:19 tadzik I think it depends
20:19 tadzik can be a bug too
20:32 mce_ro left #perl6
20:33 leprevost left #perl6
20:42 jcowan joined #perl6
20:43 jcowan If you create a class using roles, what is the best way to get the attributes of those roles initialized appropriately?
20:44 dsp_ left #perl6
20:45 tadzik what do you mean: appropriately?
20:46 jcowan Appropriately relative to the class which does those roles.  When I construct an instance, how do I communicate with the roles to tell them how to initialize their attributes?
20:46 jcowan s/the class/a class
20:47 leprevost joined #perl6
20:50 bluescreen10 joined #perl6
20:51 donri Not sure you want roles there, but don't trust me.
20:51 masak joined #perl6
20:51 masak hei hei zebras
20:52 jcowan For example, suppose that there's a role Breakable with methods break and fix and attribute broken.  If Frobnitz (a class for representing various physical components) does Breakable, and I'm constructing a Frobnitz, I want to inform it of the current state of the (physical) frobnitz.
20:53 jcowan This is not the same as calling break if it's broken, since break represents a change of state.  Nor do I want a public method set_broken in Breakable, since that allows you to corrupt the state without doing a proper change of state.
20:53 dsp_ joined #perl6
20:53 jcowan In some way I want to, as it were, pass the brokenness directly to the role.  Any suggestions about that?
20:53 ymasory_ joined #perl6
20:54 jcowan s/break represents/calling break represents
20:54 jcowan donri: can you elucidate?
20:54 bluescreen10 left #perl6
20:54 masak this sounds interesting.
20:54 * masak backlogs
20:56 mj41 joined #perl6
20:56 donri jcowan: can't you just have it be an argument to .new?
20:57 donri I'm probably misunderstanding :)
20:57 jcowan Sure.  But the broken attribute belongs to Breakable, not to Frobnitz.
20:58 donri But if it does Breakable it mixes it in?
20:58 jcowan This, I think, is why classic traits don't allow state: all attributes live in classes only, and the traits just have required accessors and mutators.  But it's much more compact to have the role keep state as Perl does.
20:59 donri Frobnitz.new(:broken)  Frobnitz.new(:!broken)  standard .new should permit this methinks?
21:00 jcowan Hmm.  That may work, although I haven't seen things explained that way.  Of course, you will be hosed if you have a conflict of attributes in different roles.
21:00 plobsing joined #perl6
21:00 colomon hmmm... I think the only time I've done a role with an attribute, I just initialized the role's attribute from the classes that "does" the role.
21:00 colomon in .new, I mean.
21:00 donri But aren't attributes mixed in with the class doing the role?
21:01 colomon right, so you can treat them as if they are attributes of the class.
21:01 jcowan Ah, okay.  In that case, how are conflicts between attribute names in different roles resolved?
21:01 donri And much of the point with roles *is* to get conflicts (as opposed to unpredictable overrides)
21:01 * jcowan nods.
21:02 jcowan So what that means is that the attributes of a role are part of its public API.
21:02 donri Unless it's $!private, I guess
21:02 donri no idea if those behave differently from class-private attributes though
21:03 jcowan So then the question becomes: how do parts of the private state of the role get initialized?
21:03 masak <TimToady> "It's not what you does, but who you is."  :)
21:04 masak TimToady++
21:04 colomon jcowan: this might be closer to what you were looking for:
21:04 colomon role Pet {
21:04 colomon has $.collar = Collar.new(tag => Tag.new);
21:04 donri rakudo: role Breakable { has $!broken }; class Frobnitz does Breakable { }; say Frobnitz.new(:broken).broken
21:04 p6eval rakudo d5ccf9: OUTPUT«Method 'broken' not found for invocant of class 'Frobnitz'␤  in main program body at line 22:/tmp/YzRwBHVmRi␤»
21:04 colomon but I don't know if that's implemented in Rakudo yet.
21:04 donri rakudo: role Breakable { has $!broken }; class Frobnitz does Breakable { }; say Frobnitz.new(:broken)!broken
21:04 p6eval rakudo d5ccf9: OUTPUT«Method '!broken' not found for invocant of class 'Frobnitz'␤  in main program body at line 22:/tmp/zIApJhCfuR␤»
21:05 donri rakudo: role Breakable { has $.broken }; class Frobnitz does Breakable { }; say Frobnitz.new(:broken).broken
21:05 p6eval rakudo d5ccf9: OUTPUT«Bool::True␤»
21:05 masak jcowan: I'm now caught up. the thing about roles is that after class composition, they barely exist.
21:06 masak jcowan: they've left most of "responsibilities" over to the class.
21:06 * jcowan nods.
21:06 masak jcowan: they're mainly used just for method resolution.
21:06 masak IOW, the answer to what you first asked does indeed seem to be "it's already in the class, don't worry"
21:06 jcowan Which means that BadRole can reach in and mess with the state of GoodRole if it can induce you to create a class that does both BadRole and GoodRole.
21:07 masak your second question, about private state, I think is deeper.
21:07 jcowan i.e. roles are not units of encapsulation really.
21:07 masak jcowan: I suppose that's theoretically possible.
21:07 Mowah left #perl6
21:07 masak jcowan: but my guess is that I'd consider something along the way to making that happen bad coding.
21:07 donri jcowan: I think that's by design, mix in one role that depends on one of a set of other roles to be mixed in too?
21:08 leprevost left #perl6
21:08 donri or is that crazy, masak? :)
21:09 masak rakudo: role GoodRole { has $.attr is rw }; role BadRole { method be_bad { $.attr = 42 } }; class C does GoodRole does BadRole {}; given C.new { .be_bad; say .attr }
21:09 p6eval rakudo d5ccf9: OUTPUT«42␤»
21:09 masak jcowan: like that?
21:09 masak donri: things are usually crazy :P
21:10 donri how about role-privates, do they become class-privates in a shared namespace?
21:10 masak donri: I wouldn't have a role depend on another role without explicitly marking it somehow.
21:10 masak donri: yes. again, role composition.
21:10 jcowan I invented roles all by myself^W^W^W independently of the Perl community after reading the Smalltalk trait stuff and mixing it in with  "Modular Reasoning in the Presence of Subtyping".
21:10 donri and how about class-privates and inheritance?
21:10 jcowan masak: Yes
21:11 masak jcowan: well, I'd consider that to be what the programmer asked for. namely trouble. :)
21:11 * jcowan agrees.
21:11 masak donri: child classes can never see private attributes.
21:11 masak donri: unless, I guess, their parents 'trust' them.
21:11 donri masak: and you can have conflicting names, without, uh, conflicts?
21:12 masak aye.
21:12 jcowan I'm considering the merits of roles as a full replacement for inheritance; so far I like them MUCH better.
21:12 donri cool
21:12 qu1j0t3 left #perl6
21:12 donri take that python ("name mangling", hah!)
21:12 jcowan Mangling is an implementation detail.
21:12 donri jcowan: both are probably useful for different uses, and complete each other?
21:13 masak rakudo: class A { has $!f;  method foo { say $!f } }; class B is A { has $!f }; say B.new(A{ :f(5) }, :f(42)).foo
21:13 p6eval rakudo d5ccf9: OUTPUT«flattened parameters must be a hash or array␤  in main program body at line 22:/tmp/P6lqekbOYG␤»
21:13 masak oh my, I've forgotten the syntax. :)
21:13 donri jcowan: name mangling is string programming :P
21:13 masak no, it seems that's right.
21:13 masak alpha: class A { has $!f;  method foo { say $!f } }; class B is A { has $!f }; say B.new(A{ :f(5) }, :f(42)).foo
21:13 p6eval alpha : OUTPUT«42␤1␤»
21:14 masak alpha had a bug there. should say 5.
21:14 masak alpha: class A { has $!f;  method foo { say $!f } }; class B is A { has $!f }; B.new(A{ :f(5) }, :f(42)).foo
21:14 p6eval alpha : OUTPUT«42␤»
21:14 jcowan (Noob question: Why am I seeing subscripted HLs in output?
21:14 jcowan )
21:14 donri it's "NL"
21:14 colomon NL, newline
21:14 masak jcowan: they're NL's. that's the symbol for "newline".
21:14 moritz_ .u ␤
21:14 phenny U+2424 SYMBOL FOR NEWLINE (␤)
21:14 donri rakudo: print 42
21:15 p6eval rakudo d5ccf9: OUTPUT«42»
21:15 moritz_ phenny is our Unicode expert
21:15 jcowan Oh, okay, must be the small font I'm stuck with in this idiot webclient I'm stuck with.
21:15 donri (Same as la_fen doi djan)
21:16 jcowan Yeah, I've been around her a long time.
21:16 donri jcowan: ctrl plus? :)
21:17 jcowan Screws up the carefully arranged XChat-simulation.
21:17 jcowan Hmm, it actually works now!
21:18 jcowan And yes, the ␤ works now.  Must be a new release of the webchat client.
21:18 jcowan "works" in the sense "doesn't look like HL any more"
21:18 donri Oh, you can do 'my $!role-private', cool
21:20 jcowan So back to the semantic issue: if we want "broken" to be really truly private, nobody can corrupt it from outside the role (a) can we do that? (b) if we can, how can we initialize it safely?
21:21 twinshadow left #perl6
21:21 colomon rakudo: role Breakable { my $.broken = Bool::False; }; class Frobnitz does Breakable { }; say Frobnitz.new(:broken).broken
21:22 p6eval rakudo d5ccf9: OUTPUT«Method 'broken' not found for invocant of class 'Frobnitz'␤  in main program body at line 22:/tmp/_uEWHz8lpo␤»
21:22 colomon rakudo: role Breakable { my $!broken = Bool::False; }; class Frobnitz does Breakable { }; say Frobnitz.new(:broken).broken
21:22 p6eval rakudo d5ccf9: OUTPUT«===SORRY!===␤Null PMC access in get_attr_str()␤»
21:22 colomon whee!
21:22 donri rakudo: role Breakable { my $!broken = Bool::False; }; class Frobnitz does Breakable { }; say Frobnitz.new(:broken)!broken
21:22 masak jcowan: you can use a my variable, with or without the twigil.
21:22 donri iswhatyoumeant
21:22 p6eval rakudo d5ccf9: OUTPUT«===SORRY!===␤Null PMC access in get_attr_str()␤»
21:22 masak jcowan: but then it will be per-role, not per-object.
21:23 colomon masak: if you don't use the twigil, is it per role composition or per object?
21:23 colomon rakudo: role Breakable { my $!broken = Bool::False; }; class Frobnitz does Breakable { }; say Frobnitz.new().broken
21:23 p6eval rakudo d5ccf9: OUTPUT«===SORRY!===␤Null PMC access in get_attr_str()␤»
21:23 masak colomon: the 'my' goes on the scope, so it's per role.
21:23 donri my Frobnitz does Breakable[False] = .new;  #? :D
21:24 colomon rakudo: role Breakable { my $!broken = Bool::False; }; class Frobnitz does Breakable { }; say Frobnitz.new()
21:24 p6eval rakudo d5ccf9: OUTPUT«===SORRY!===␤Null PMC access in get_attr_str()␤»
21:24 * masak submits rakudobug
21:24 colomon masak++
21:24 masak rakudo: class Frobnitz {}; say Frobnitz.new().broken
21:24 p6eval rakudo d5ccf9: OUTPUT«Method 'broken' not found for invocant of class 'Frobnitz'␤  in main program body at line 22:/tmp/rC0X6OTubG␤»
21:24 colomon niecza: role Breakable { my $!broken = Bool::False; }; class Frobnitz does Breakable { }; say Frobnitz.new()
21:24 p6eval niecza v3-80-g3cc93a7: OUTPUT«[31m===[0mSORRY![31m===[0m␤␤Twigil ! is only valid on attribute definitions ('has'). at /tmp/VIStGHz9bQ line 1:␤------> [32mrole Breakable { my $!broken [33m⏏[31m= Bool::False; }; class Frobnitz does Br[0m␤␤Action method trait_mod:does not yet implemented at
21:24 p6eval ../tmp/VIStGHz9bQ…
21:25 colomon std: role Breakable { my $!broken = Bool::False; }; class Frobnitz does Breakable { }; say Frobnitz.new()
21:25 p6eval std 4608239: OUTPUT«ok 00:01 122m␤»
21:25 colomon interesting
21:25 masak colomon: was just going to do that :)
21:25 masak sorear: are you aware of the above? my guess is yes.
21:25 colomon the spec definitely has the my $!spleen; example in the section on roles
21:25 donri 'my $!spleen;' is the example in S14
21:25 masak sure.
21:30 donri what again was the syntax for calling a method of a particular parent?
21:30 moritz_ .Class::method
21:31 donri but you can't use that with roles eh?
21:31 donri for attributes or anything
21:31 moritz_ correct; roles flatten out
21:31 donri can you access lexical scope somehow?
21:31 moritz_ by being in it
21:32 donri :D
21:32 jcowan So it looks like roles aren't firewalled from one another when they are done by the same class.  Bummer.
21:32 jcowan (in the sense that the private stuff of a superclass is firewalled from its subclasses)
21:33 donri jcowan: but classes do that
21:34 donri thus "Not sure you want roles there"
21:35 * jcowan nods.
21:35 jcowan It's still better than inheritance, especially multiple inheritance.
21:36 jcowan (Another newb question: when a class does a role, does it get the option of renaming stuff brought in from the role?)
21:37 contempt joined #perl6
21:37 donri so how about parametric roles?
21:37 contempt left #perl6
21:38 donri rakudo: role Breakable[$state] { has $.broken = $state }; class Frobnitz {}; my Frobnitz does Breakable[False] .= new; say $f.broken
21:38 p6eval rakudo d5ccf9: OUTPUT«===SORRY!===␤In "my" declaration, typename Frobnitz must be predeclared (or marked as declarative with :: prefix) at line 22, near " does Brea"␤»
21:38 donri No idea how you do values as parameters though
21:39 donri rakudo: role Breakable[$state] { has $.broken = $state }; class Frobnitz {}; my (Frobnitz does Breakable[False]) .= new; say $f.broken
21:39 PerlJam jcowan: re renaming-- yes
21:39 p6eval rakudo d5ccf9: OUTPUT«===SORRY!===␤Symbol '$f' not predeclared in <anonymous> (/tmp/VfsFlL1HVX:22)␤»
21:41 jcowan Okay, thanks.  I think my questions are answered: roles are much better than superclasses, but they don't subsume them 100%.
21:42 donri rakudo: role Breakable[Bool $state] { has $.broken = $state }; class Frobnitz {}; my (Frobnitz does Breakable[False]) .= new; say $f.broken
21:42 p6eval rakudo d5ccf9: OUTPUT«===SORRY!===␤Symbol '$f' not predeclared in <anonymous> (/tmp/QQjqfLaCec:22)␤»
21:42 donri anyone?
21:42 donri rakudo: role Breakable[Bool $state] { has $.broken = $state }; class Frobnitz {}; my (Frobnitz does Breakable[False]) $f .= new; say $f.broken
21:42 p6eval rakudo d5ccf9: OUTPUT«===SORRY!===␤Confused at line 22, near "my (Frobni"␤»
21:43 donri rakudo: role Breakable[Bool $state] { has $.broken = $state }; class Frobnitz {}; my Frobnitz does Breakable[False] $f .= new; say $f.broken
21:43 p6eval rakudo d5ccf9: OUTPUT«===SORRY!===␤In "my" declaration, typename Frobnitz must be predeclared (or marked as declarative with :: prefix) at line 22, near " does Brea"␤»
21:49 alester left #perl6
21:50 donri rakudo: role Breakable[Bool $state] { has $.broken = $state }; class Frobnitz {}; my Frobnitz $f does Breakable[False] .= new; say $f.broken
21:50 p6eval rakudo d5ccf9: OUTPUT«Method 'broken' not found for invocant of class 'Frobnitz'␤  in main program body at line 22:/tmp/3ybnPpsRN6␤»
21:51 [hercynium]_ is now known as hercynium
21:55 nymacro joined #perl6
22:00 poincare101 joined #perl6
22:00 poincare101 perl6: say3;
22:00 p6eval niecza v3-80-g3cc93a7: OUTPUT«[31m===[0mSORRY![31m===[0m␤␤Undeclared routine:␤      'say3' used at line Any()1␤␤Unhandled exception: Check failed␤␤  at /home/p6eval/niecza/boot/lib/CORE.setting line 387 (CORE die @ 2)␤  at /home/p6eval/niecza/src/STD.pm6 line 1141 (STD P6.comp_unit @ 75)␤  at
22:00 p6eval ../home/p6eval/niecza…
22:00 p6eval ..pugs: OUTPUT«*** No such subroutine: "&say3"␤    at /tmp/PDlFmagzN9 line 1, column 1-5␤»
22:00 p6eval ..rakudo d5ccf9: OUTPUT«Could not find sub &say3␤  in main program body at line 22:/tmp/T_AovOypHL␤»
22:01 poincare101 what the hell is that?
22:01 masak poincare101: it's a missing space between 'say' and '3'.
22:01 poincare101 perl6: say 3;
22:01 p6eval pugs, rakudo d5ccf9, niecza v3-80-g3cc93a7: OUTPUT«3␤»
22:01 poincare101 'perl6: say 3;' or rakudo:, niecza:, std:,
22:01 masak poincare101: digits are valid parts of identifiers, so Perl 6 tried to find the subroutine 'say3'.
22:01 poincare101 masak: I see.
22:03 tyatpi_ left #perl6
22:10 PZt joined #perl6
22:11 poincare101 I wish you guys would be done with Perl 6. I don't like python. everyone's dropping perl in favor of python and php.
22:11 donri :D
22:12 f00li5h left #perl6
22:12 masak poincare101: thanks for the encouragement. we'll try to finish quickly. ;)
22:12 donri ...five years later...
22:12 kaare_ left #perl6
22:13 masak poincare101: (oh, and please consider helping in one way or the other.)
22:13 donri "guys i implemented macros now"
22:14 poincare101 :)
22:14 poincare101 masak: I'll try.
22:14 nerd6478 joined #perl6
22:14 tadzik poincare101: if someone's dropping anything for PHP there is no hope for him anyway
22:15 tadzik poincare101: are you a Perl 5 person?
22:16 nerd6478 left #perl6
22:17 masak tadzik: as much as I dislike PHP, I disagree.
22:18 masak tadzik: PHP is largely a badly written tool with insufficient community practices to prevent badly written code. but that doesn't mean there's not quality PHP code out there.
22:18 masak MediaWiki is one example.
22:19 masak at some point, MediaWiki was a Perl script, but it was rewritten in PHP.
22:19 masak ...they seem to be doing pretty well... :)
22:19 donri Funny how a crappy language became to response to lack of nice web frameworks in existing languages
22:19 masak yeah.
22:19 masak PHP is easy to deploy.
22:20 donri And funny how the response to that was nice web frameworks in non-crappy languages.
22:20 mtk left #perl6
22:20 donri Python is dead-simple to deploy. :P
22:20 donri 'epio upload' done :D
22:20 masak perhaps a nice language with a nice framework, being by definition two steps, will always somehow lose in ease-of-deployment.
22:20 masak until we ship our awesome Rakudo-for-web distribution, that is :)
22:21 tadzik masak: I don't say there is none
22:21 donri Perl 6 needs something like WSGI/PSGI I say
22:21 masak donri: agreed.
22:21 tadzik it has
22:21 masak well, it needs it at a massive scale.
22:21 donri What does it have?
22:21 donri I don't mean what I think Web.pm does
22:22 mj41 left #perl6
22:22 tadzik http://github.com/mberends/http-server-simple/
22:22 tadzik I wrote a few apps for that
22:22 masak tadzik++
22:23 tadzik masak: Web.pm isn't a one, big monolith, but rather a set of tools, correct?
22:24 donri ok https://github.com/mberends/http-server-simple/blob/master/examples/05-psgi-small.pl6
22:24 donri but is that the best way to do it in p6?
22:25 masak tadzik: correct. it's an "incubator" for web-related projects.
22:25 masak donri: no.
22:25 donri i mean how about gather/take for example
22:26 masak what about it? :)
22:26 donri for lazy data without content-length perhaps?
22:26 donri or with content-length, for serving files/streams
22:27 tadzik masak: so it'd be doable to fix those modules, one at a time?
22:27 flussence_ .oO( PHP 5 is a usable language now, it's just a shame it took 7-8 years to get to that point... )
22:28 mtk joined #perl6
22:28 nymacro left #perl6
22:29 donri "or IO::Handle-like object"  ok I guess that works for laziness?
22:31 Hackbinary left #perl6
22:31 masak tadzik: yes. I'm kinda hoping for that. I still believe some of them have merit.
22:32 masak notably, Hitomi and Squerl.
22:34 tadzik no tests for astaire?
22:36 donri no docs for web.pm?
22:36 whiteknight joined #perl6
22:39 * donri found some pdfs
22:40 donri why does astaire use 'get path => block' rather than say, 'get path: block'?
22:40 tadzik how would that parse?
22:41 donri get(path, block)
22:41 donri hm but it'd end up path.get(block) right
22:41 poincare101 tadzik: (sorry, missed what you said) yeah, I'm a perl 5 person. Moved to Python because of crap OO though.
22:42 tadzik poincare101: there's a list of Most Wanted modules we want ported from Perl 5, so you might want to contribute there
22:42 tadzik https://github.com/perl6/misc/wiki/Get-Into-Perl6
22:42 poincare101 masak: I like ruby on rails. Its a very good web framework.
22:44 donri rakudo: sub foo { return 1, 2 }; say foo.WHAT
22:44 p6eval rakudo d5ccf9: OUTPUT«Parcel()␤»
22:44 donri can you return a Parcel for P6SGI?
22:45 donri sub app($env) { 200, {:content-type('text/plain')}, "OHAI" }
22:47 tadzik nope
22:47 donri how boring
22:48 tadzik It's supposed to be compatibile with Perl 5
22:48 donri o_O
22:48 tadzik but but, it'd be nice to return any Positional
22:48 tadzik patches welcome :)
22:48 masak poincare101: Rails has its good points. :)
22:54 Tene jcowan: You may also want to look into 'handles' for attributes.
22:54 tyatpi_ joined #perl6
23:00 silent_h_ joined #perl6
23:08 masak 'night, #perl6.
23:08 masak left #perl6
23:09 jcowan left #perl6
23:10 hercynium left #perl6
23:19 poincare101 left #perl6
23:31 risou left #perl6
23:41 Chillance left #perl6
23:49 ymasory_ left #perl6
23:49 ymasory_ joined #perl6
23:51 ymasory_ left #perl6
23:52 ymasory_ joined #perl6
23:59 awoodland left #perl6

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

Perl 6 | Reference Documentation | Rakudo