Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-10-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:07 tokuhiro_ joined #perl6
00:10 tokuhiro_ joined #perl6
00:19 kurahaupo joined #perl6
00:47 kevouze joined #perl6
00:58 anuby joined #perl6
01:01 dalek niecza: 0d2a99e | (Solomon Foster)++ | lib/ (2 files):
01:01 dalek niecza: First stab at $*CUSTOM-LIB.
01:01 dalek niecza: review: https://github.com/sorear/niecza/commit/0d2a99ed57
01:01 natisfto joined #perl6
01:02 natisfto good night....perl6
01:02 sorear hello natisfto.  welcome?
01:03 natisfto rn: Str.^methods.say
01:03 am0c joined #perl6
01:03 p6eval niecza v22-12-g960f328: OUTPUT«Unhandled exception: Unable to resolve method methods in type ClassHOW␤  at /tmp/SVYf7VL6OE line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4211 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4212 (module-CORE @ 579) ␤  at…
01:03 p6eval ..rakudo 8a07b8: OUTPUT«BUILD Int Num chomp chop substr pred succ match ords lines samecase samespace trim-leading trim-trailing trim words encode capitalize wordcase trans indent codes tclc path WHICH Bool Str ACCEPTS Numeric gist perl comb subst split␤»
01:04 colomon sorear: that was a very rough stab at doing $*CUSTOM-LIB -- I'm not at all convinced that's the right directory to use.
01:06 sorear colomon: do you want me to look at it?  note, I have no clue what $*CUSTOM-LIB is other than apparently involving pandas
01:07 colomon It's moritz's attempt to not make every install of a perl6 compiler use ~/.perl6/lib for libraries.
01:07 natisfto phenny: tell moritz++ I found something like index,rindex not in the Str's method lists .phenny++
01:07 phenny natisfto: I'll pass that on when moritz++ is around.
01:08 colomon the idea being that now the directory for libraries will be $*CUSTOM-LIB/lib
01:09 colomon I didn't add it to the include path (hmmm....) but I did implement $*CUSTOM-LIB using Environment.SpecialFolder.ApplicationData
01:09 fgomez joined #perl6
01:09 colomon It came out to /Users/colomon/.config/niecza on my MacBook Pro, which seems not perfect, but probably workable.
01:11 colomon it seems like a good first step to getting panda working with both compilers.
01:11 colomon I think moritz is trying to make it possible to install rakudo and rakudo star side-by-side.
01:14 doy fixed directory names in the home directory feels like it misses the point somewhat
01:14 hypolin joined #perl6
01:19 sorear colomon: um, how is $*CUSTOM-LIB supposed to be set?
01:19 colomon ..... that's a good question
01:20 thou joined #perl6
01:22 colomon Wait, I'm not sure what you mean by that.  Set initially, or modified later?
01:24 ComWT joined #perl6
01:29 sorear colomon: both
01:30 colomon set initially works -- I just did it more or less the same way you did $*EXECUTABLE_NAME
01:30 colomon and like $*EXECUTABLE_NAME, right now giving it a new value doesn't work.
01:30 colomon (or at least, I can't figure out how to do either)
01:36 pmichaud ~/.perl6/lib needs to die.
01:36 pmichaud at least, it shouldn't be in the path by default.
01:58 kevouze joined #perl6
02:07 armitage81 joined #perl6
02:08 armitage81 hi
02:16 sorear hello and welcome armitage81
02:19 raiph joined #perl6
03:13 xinming joined #perl6
04:00 dayangkun joined #perl6
04:29 kurahaupo joined #perl6
04:33 telex joined #perl6
04:41 wamba joined #perl6
05:01 masak good morning, #perl6
05:02 birdwindupbird joined #perl6
05:03 sivoais joined #perl6
05:05 kevouze joined #perl6
05:06 wamba joined #perl6
05:08 sorear o/
05:18 GlitchMr joined #perl6
05:20 aharoni joined #perl6
05:23 sftp joined #perl6
05:27 moritz \o
05:27 moritz sorear: the idea is simply that $*CUSTOM-LIB is a directory that depends on the compiler version
05:27 moritz and $*CUSTOM-LIB/lib should be in the module search path
05:28 moritz where exactly it is doesn't really matter to me
05:30 moritz r: say Cool.^methods(:local)
05:30 p6eval rakudo 8a07b8: OUTPUT«abs conj sqrt sign rand sin asin cos acos tan atan atan2 sec asec cosec acosec cotan acotan sinh asinh cosh acosh tanh atanh sech asech cosech acosech cotanh acotanh cis log exp roots log10 unpolar round floor ceiling truncate chars codes fmt substr uc lc tclc ucfi…
05:30 moritz r: say Cool.^methods(:local).grep(/index/)
05:30 p6eval rakudo 8a07b8: OUTPUT«index rindex␤»
05:31 moritz phenny: tell natisfto index and rindex are defined in Cool, not Str (at least in Rakudo), and .^methods excludes methods from Cool, Any and Mu by default. Use .^methods(:all) if you gotta catch 'em all :-)
05:31 phenny moritz: I'll pass that on when natisfto is around.
05:36 arnsholt_ joined #perl6
05:40 birdwind1pbird joined #perl6
05:51 kaleem joined #perl6
05:52 hash_table joined #perl6
06:39 replore_ joined #perl6
07:10 brrt joined #perl6
07:13 daxim joined #perl6
07:17 kevouze joined #perl6
07:18 kevouze Hi everyone. I am currently running a survey about Perl community newcomers. Few people from Perl6 took part.
07:18 kevouze Is there anyone here joined Perl within the last 2 years and who would be keen to help out?
07:18 kevouze http://tinyurl.com/perlnewcomersurvey
07:18 brrt kevouze: define 'joined'
07:18 brrt 'learned perl for the first time' or 'started particpating in the perl community'
07:19 brrt i fall in the latter, but not in the former category
07:19 kevouze started contributing to Perl sub-projects (like Perl6, Mojo, Dancer...)
07:20 kevouze sounds like it is your case, right?
07:23 brrt more or less, if parrot counts :-)
07:23 kevouze_ joined #perl6
07:23 Su-Shee what's this survey supposed to accomplish?
07:24 kevouze_ it is studying how the experience of a newcomer has an influence on this person becoming a valued sustainable contributor (from community perspective)
07:25 kevouze_ the dataset will be shared with Perl people, hoping it will be helpful
07:26 araujo joined #perl6
07:26 araujo joined #perl6
07:26 kevouze joined #perl6
07:26 kevouze sorry using http://webchat.freenode.net/ and I keep being disconnected, not sure why.
07:28 birdwindupbird joined #perl6
07:29 Su-Shee well I would personally be very reluctant to be dubbed a "valued substainable contributor".. I'm not a economic open source resource.
07:30 Su-Shee also, helpful for what exactly? :)
07:30 kevouze one of the things it is looking out for example is whether your experience as a newcomer as an influence on you becoming a good 'citizen' for the community
07:31 kevouze so doing all the extra stuff that helps the community
07:31 Su-Shee kevouze: what's a good citizen for the community supposed to be? by whose definition?
07:31 Su-Shee and how do you know upfront what helps the community? also, which one of the two? perl6 or perl5?
07:31 kevouze rather the overall PErl community
07:32 kevouze I have conducted interviews with people from lots of communities asking what makes a person a good community citizen
07:32 flightrecorder joined #perl6
07:33 kevouze I am checking it out now in a survey, I have explained some of my preliminary results about citizenship in my blog kevincarillo.org if you want to have a look (sorry not advertising my blog here...)
07:36 Su-Shee wow, finally we're trying to press even the last hacker into a "mold" of good behavior.. wonderful.
07:38 kevouze joined #perl6
07:40 kevouze the 'good' here is from the community perspective not in the absolute. For a community to function and sustain, shall behaviors shall be encouraged, the same way there are codes of conduct
07:40 kevouze another example is the harm caused by 'toxic' behaviours to communities
07:41 Su-Shee kevouze: yes. horrible. your blog opens my worst nightmare how open source communities should change.. that's everything I pretty much want to keep out of hacking communities.
07:43 Su-Shee also, this is all very us-american flavored.. "codes of conduct" and such.. I have nothing but disdain for those..
07:48 kevouze My personal opinion is that a code of conduct helps for large communities if you do not wants things to go wrong. Like I have said, it is just an opinion.
07:51 Su-Shee but things usally don't go wrong. and comparing "things that go wrong" in numbers with the world outside of open source communities: things going wrong is a pretty rare exception. and what exactly adds a code of conduct to anything which a) isn't legal anyways and b) socially frowned upon and therefore just a question of acting instead of ignoring?
07:51 FROGGS joined #perl6
07:51 Su-Shee all this notion of things going wrong in open source communities.. I don't see it.
07:51 brrt or, we're all just nice to each other
07:52 brrt maybe a bit passionate about software, but that is part of it
07:52 FROGGS morning
07:52 brrt \o FROGGS
07:53 kevouze I think it is not that easy to make sure a community remains healthy.
07:53 Su-Shee kevouze: _your_ very strange notion of "healthy".
07:54 kevouze healthy for instance like new people keeps coming and the community keeps growing, that could be one aspect
07:55 Su-Shee kevouze: which would require that it's actually true that the things you're talking about are the things deciding upon new people coming and communities growing..
07:59 kevouze Su-Shee, sorry I need to go. But I really would like to continue the conversation, I am always happy to hear about the opinion of people with a lot of experience, I still have to learn a lot. Thanks for sharing your insights :)
08:03 fhelmberger joined #perl6
08:05 moritz std: use v5; qw}foo}
08:05 p6eval std 77327a4: OUTPUT«[31m===[0mSORRY![31m===[0m�Use of a closing delimiter for an opener is reserved at /tmp/UdSzfxLuVi line 1:�------> [32muse v5; qw[33m�[31m}foo}[0m�Parse failed�FAILED 00:01 52m�»
08:05 moritz not in Perl 5 :-)
08:33 SamuraiJack joined #perl6
08:33 mathw o/
08:40 dakkar joined #perl6
08:58 birdwindupbird joined #perl6
09:04 sqirrel joined #perl6
09:10 daniel-s joined #perl6
09:11 dalek Perlito: d59adda | (Flavio S. Glock)++ | / (3 files):
09:11 dalek Perlito: Perlito5 - js - p5ArrayOfAlias - fix internal indexes
09:11 dalek Perlito: review: https://github.com/fglock/Perlito/commit/d59adda62d
09:24 Grrrr joined #perl6
09:37 cognominal joined #perl6
09:48 gerhard2 joined #perl6
09:58 brrt /join #django
09:58 brrt dammit
09:58 brrt sorry
09:59 Timbus a traitor!
09:59 brrt haha
09:59 rindolf joined #perl6
09:59 brrt not my choice though
10:05 brrt python is hilarious, though, its like they took perl and chipped away all the 'scary' parts
10:08 Timbus it's got a few nice things i guess
10:09 brrt its mediocre in every respect
10:09 brrt its main virtue is being 'better than php'
10:10 Timbus any turing complete language that is not php, gets that stamp of approval
10:13 Woodi hallo :)
10:14 Woodi I must disagree... PHP was great invention !
10:16 brrt Woodi, flame on
10:16 brrt why was php a great invention
10:16 Woodi becouse ~user can use it without /root for example :)
10:17 brrt which can be done easily in CGI
10:18 brrt without ever looking at php
10:18 Woodi be real, tell me why PHP win WWW ?
10:18 brrt because:
10:18 brrt a): it is really cheap and easy to administer
10:18 brrt b): hivemind of web hosters
10:19 brrt c): it is really cheap to find developers for
10:19 brrt c because of a and b
10:19 brrt economics is why php reigns
10:20 Timbus i got told that php had a 'much easier to understand syntax than perl' and i think i pffbrbbppth'ed so hard i propelled myself into low orbit
10:21 Woodi I think PHP somehow improved WWW crafting and in that time it was important. I would realy like to know what was exact-name for killer feature...
10:21 Timbus embedded templates
10:21 Timbus serverside includes
10:22 tgt joined #perl6
10:22 brrt we had serverside includes before php
10:22 brrt the templates thing, thats pretty important though
10:22 brrt i wouldn't say it actually /helped/ the web development 'craft'
10:22 Timbus yes
10:22 Woodi so PHP was just "easy" in use on few lvls...
10:22 Timbus but boy howdy does it suck now
10:23 Woodi human laziness.... #@^^#@!*&
10:23 brrt neither where the developers / designers of php craftsmen themselves
10:26 brrt i mean, were
10:30 kaleem joined #perl6
10:33 colomon_ joined #perl6
10:55 kresike joined #perl6
10:55 kresike hello all you happy perl6 people
10:57 colomon o/
10:58 masak kresike! \o/
11:00 bbkr hello
11:01 kresike colomon, masak , bbkr o/
11:02 * masak has a Perl 6 day today
11:02 masak expect some activity.
11:03 flussence yay
11:05 Su-Shee_ joined #perl6
11:06 flussence oh btw, I found this while you were away :)
11:06 flussence echo -e 'my \\a = any set <1 2 3>; \n say 1 ~~ a' | perl6
11:07 brrt joined #perl6
11:13 moritz Segmentation fault (core dumped)
11:13 flussence works fine if you omit the \n, though.
11:15 masak has it been RT'd?
11:15 * masak is not up to speed yet
11:16 flussence I've been too busy trying to break rakudo to file bugs :P
11:17 * masak submits rakudobug
11:17 flussence I've got more if you want 'em :)
11:17 masak sure.
11:18 flussence rn: enum First <a>; enum Second <a>; say a.perl
11:18 p6eval rakudo 8a07b8: OUTPUT«Second::a␤»
11:18 p6eval ..niecza v22-13-g0d2a99e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Illegal redeclaration of symbol 'a' (see line 1) at /tmp/Xs7s5vA4EN line 1:â�¤------> [32menum First <a>; enum Second <a>[33mâ��[31m; say a.perl[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.s…
11:18 masak that one is known, methinks.
11:18 masak and RT'd.
11:18 flussence yeah, that one seemed a bit easier to come across...
11:19 masak I know ++moritz would like to fix that one ;)
11:19 flussence anyway, I'm going to try actually writing code this week so I'll probably manage to break something :)
11:19 moritz what should happen?
11:19 moritz redeclaration error, as niecza does?
11:23 flussence S12:1932 says that error is appropriate
11:23 flussence rn: enum First <a>; enum Second <a>; say First::a.perl
11:23 p6eval rakudo 8a07b8: OUTPUT«First::a␤»
11:23 p6eval ..niecza v22-13-g0d2a99e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Illegal redeclaration of symbol 'a' (see line 1) at /tmp/Mtg_0Il2_K line 1:â�¤------> [32menum First <a>; enum Second <a>[33mâ��[31m; say First::a.perl[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib…
11:24 flussence it says that should work, though
11:27 Guest67453 joined #perl6
11:28 moritz but how?
11:28 moritz I mean, enum First <a>; *immediately* creates symbol a
11:29 moritz which influences the parsing of the rest of the scope
11:29 moritz and then, should the  enum Second <a>; delete the existing symbol a?
11:29 moritz that strikes me as quite odd
11:29 moritz if so, what would   enum First <a>; say a; enum Second <a>;   do?
11:29 moritz parse, and then complain at runtime that there is no a?
11:30 moritz or retroactively complain that symbol a was used, and it turned out to be ambiguos?
11:30 moritz that all sounds very surreal
11:32 flussence rn: say a; enum Second <a>;
11:32 p6eval rakudo 8a07b8: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&a' called (line 1)␤»
11:32 p6eval ..niecza v22-13-g0d2a99e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Illegally post-declared type:â�¤   'a' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1437 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37) â�¤  â€¦
11:32 flussence that seems to answer that; it just isn't declared yet
11:32 birdwindupbird joined #perl6
11:33 flussence my first guess is it should change the bare «a» to behave like a "!!!" or similar
11:33 flussence if that's even possible
11:35 wamba joined #perl6
11:38 moritz sounds dubious
11:38 * moritz wrestles with hard SQL problems
11:39 arnsholt SQL query getting to be three pages long? =)
11:40 moritz that's part of the problem
11:40 moritz well, there are two problems, actually
11:40 moritz the first is that we need to store DAGs in a RDBMS
11:41 moritz and the second is that we have several legacy tables, which should get a unified interface as "config items"
11:41 moritz and we need to store relations between the DAG and config items
11:41 moritz so the question is, how to unify several tables to one interface?
11:42 rindolf joined #perl6
11:42 moritz we could make a mapping table per legacy table, but that leads to explosion of tables
11:42 moritz or a common mapping table that stores an ID and table name it references, but that doesn't have any referential integrity
11:43 moritz or we have a mapping table with a column for each legacy table, and have only one of them non-Null, but that's ugly for writing queries
11:43 moritz and so on
11:44 mathw table explosion is usually the only way that maintains referential integrity
11:44 mathw you can moderate its effects on query-writing with judicious application of views
11:44 mathw but the updates will always hurt
11:44 moritz well, views aren't easy either
11:44 mathw so will some of the selects
11:45 moritz because our schema is stored in a custom format
11:45 moritz from which SQL is generated through a mixture of bash, perl, python and black magic
11:45 mathw we've also been wrestling with DAGs in an RDMS and it's not easy at all
11:45 moritz and nobody wants to touch the magic, but right now it doesn't support views. Tough luck.
11:45 mathw you can easily store a directed graph, but we haven't found a way to sanely enforce the acyclic part
11:45 mathw ouch!
11:45 mathw we are at least working in raw SQL
11:46 moritz mathw: which model did you use? adjancence list, plus storing the transitive closure?
11:46 brrt joined #perl6
11:46 moritz or recursive queries for selects?
11:46 mathw we haven't actually finalised what we'r edoing yet
11:47 moritz http://www.codeproject.com/Articles/22824/A-Model-to-Represent-Directed-Acyclic-Graphs-DAG-o that's what we'll probably do
11:47 mathw my colleague's handling most of it, but we're both so unhappy with the options we've come up with so far that we keep deferring the decision on database format (he's working on a lot of client-side stuff which is largely database agnostic)
11:47 moritz and I have a faint hope that most of the magic in there can be hidden behind triggers
11:48 flightrecorder joined #perl6
11:50 FROGGS joined #perl6
11:50 flussence do you at least get to choose a sane database to put it on?
11:50 moritz mysql :(
11:50 am0c_ joined #perl6
11:50 mathw oooh
11:50 mathw ouch
11:50 moritz with innodb storage at least
11:50 mathw that's a start at least
11:51 mathw one of my jobs is SQL Server, and one is MySQL (recently moved to InnoDB)
11:51 mathw guess which one's database i prefer?
11:51 moritz postgres? :-)
11:51 mathw although actually I'd prefer it even if they were both on MySQL because it's designed
11:51 mathw and it does sensible things
11:51 tokuhiro_ joined #perl6
11:52 moritz (I've never used SQL Server, so no idea how good or bad it is)
11:52 mathw and I don't have to share it with someone who doesn't think that referential integrity isn't particularly important
11:52 mathw SQL Server is far from perfect, but it's capable of some extremely impressive stuff and it makes it very easy to make a very tightly-constrained schema
11:53 mathw the only problem we really have with it is that it doesn't support global constraints
11:53 mathw but then we're not aware of anything else which does either
11:54 moritz what do you mean by "global constraints"?
11:54 flightrecorder joined #perl6
11:54 mathw check constraints which aren't attached to a table
11:54 flussence I found out the hard way mysql's fulltext search thing isn't compatible with innodb (and $dayjob needs the former)
11:55 mathw I found that out the other week, fortunately I don't need it
11:56 Woodi moritz: I lastly read a little of "Patterns of Enterprise Application Architecture" by M. Fowler and there is Gateway pattern for separating outside resources. It is used to make "object" to talk to resources which have interface which is used on domain lvl. point is to have simple way to get resources and resolve complicate scenarios on domain lvl. and there are similiar patterns: Facade, Adapter, Mediator, Service Stub... but no idea if ...
11:56 Woodi ... resolving things on "domain lvl" can help...
11:57 mathw moritz: that transitive closure way of representing a DAG doesn't look fun
11:58 wamba joined #perl6
11:59 brrt flussence: what about postgres, no option?
11:59 flussence not on that one project, it has to run on someone else's crappy server :(
12:00 moritz mathw: it doesn't, but it lets you fetch all interesting subgraphs with signle queries, and without recursion
12:00 moritz mathw: in essence, DAGs are never fun in the DB. Afaict the question is if you want the no-fun to occur at reading or at writing
12:01 brrt do you really need /mysql/ fulltextsearch? or can you maybe get away with using some other fulltext engine?
12:01 moritz and I expect to have 0..5 writes a day, and who knows how many reads per minute
12:01 mathw moritz: this is true. You have to accept the limitations of your storage system and then optimise for what you need
12:02 flussence brrt: by "crappy" I really mean it - iirc it's running RHEL5
12:04 brrt moritz: maybe you can get away with the 'smashed tree'
12:04 brrt my name for a structure a colleaugue invented
12:05 brrt in a sense, /all/ relations between an object and the 'parent' objects are stored
12:05 brrt so, if I have object A, which 'lives under' object B, and C lives under A
12:05 brrt then B is connected to A
12:06 brrt C is connected to A
12:06 moritz brrt: you mean there's a row for every path through the graph?
12:06 brrt but B is also connected to C
12:06 brrt yes
12:06 brrt that is exactly what i mean :-)
12:06 moritz brrt: then your colleauge has reivented the transitive closure :-)
12:06 brrt i did not know that term
12:07 brrt my former manager, on the other hand, has forbidden it on the condition of ENOUNDERSTAND
12:07 moritz well, it's a bit of waterbed here
12:08 flussence brrt: I get that excuse a lot :(
12:08 moritz you can make the schema easier, and make it easier to write
12:08 moritz but then selects perform like snails
12:09 mathw ENOUNDERSTAND is a bad reason to forbid something
12:09 Woodi moritz: use LDAP for mainly-read things :)
12:09 mathw although if only one person understands something clever, that is a problem
12:10 brrt well, eventually, i was the only one because the others all left
12:11 mathw ah well you can't always plan for the future :)
12:11 moritz Woodi: good idea, if it weren't for the fact that all the other data is already stored in mysql
12:13 Woodi moritz: looks that architecture need change or something in low-lvl need to be aware of "structure" you use...
12:14 Woodi usually first cure is done by bigger hardware :)
12:14 Woodi SSD or something ?
12:14 * moritz chuckles softly at "architecture need change"
12:15 Woodi so it takes time... or patience :)
12:16 Woodi if things go serious you will probably have new co-worker :)
12:17 moritz my coworkers are fine
12:17 moritz but the code isn't, in parts
12:18 moritz the first commits are from 1997
12:18 moritz and some of that age shows
12:18 GlitchMr joined #perl6
12:18 tokuhiro_ joined #perl6
12:21 Woodi err... I mean: additional :)
12:21 Woodi just trying to think like manager can be trying to resolve things...
12:24 mathw ah old codebases
12:24 mathw we had that at my previous job
12:24 mathw not a great deal of fun working with some of it
12:24 mathw although the overall concept was pretty clever, it hadn't been maintained very cleanly over the years
12:25 masak mathw: enforcing the acyclic part shouldn't be that difficult. just mandate that children be younger than parents.
12:25 masak that's how Git does it.
12:25 mathw masak: what if your data has no concept of 'age'
12:25 masak hm :)
12:25 mathw yes, it would be great if we could do that
12:26 masak actually, Git doesn't need the concept of 'age' here either.
12:26 mathw Git has parent pointers
12:26 masak it just considers objects immutable once created.
12:26 masak so old objects can never be made to refer to newer ones.
12:26 mathw and everything gets created in temporal order
12:26 mathw because git inherently is based around time
12:26 masak eh?
12:26 mathw well, kind of
12:27 mathw more like sequences
12:27 mathw this, then this, then this
12:27 masak actually, with rebasing and stuff, you can get things to come wildly out of (commit) order.
12:27 mathw well, cheating's useful sometimes :)
12:27 masak my point is that I don't really see what you mean.
12:27 mathw that's okay, neither do I
12:28 masak you lost me at "inherently is based around time".
12:28 mathw I may not hve drunk enough tea yet today
12:28 masak up to that I agreed. :)
12:31 fridim_ joined #perl6
12:33 * masak saw http://concatenative.org/wiki/view/Exotic%20Data%20Structures the other day and thought of #perl6
12:36 moritz http://courses.csail.mit.edu/6.851/spring12/lectures/ is currently high on reddit under the headline "Actually Exotic Data Structures"
12:36 brrt grr, zero pointer derefs
12:36 replore joined #perl6
12:41 tadzik hello #perl6
12:41 brrt \o tadzik
12:42 masak looks like a nice course.
12:42 masak tadzik! \o/
12:42 tadzik \o/
12:42 mathw hi tadzik
12:42 tadzik hello hello
12:46 GlitchMr https://github.com/rakudo/rakudo/commit/dfbfbb9828d1ec910574b063360d423df18dbaae
12:46 GlitchMr :-(
12:46 GlitchMr What if somebody doesn't have access to Rakudo install directory?
12:48 GlitchMr What about `~/.perl6/lib/2012.09.1-35-g8a07b84` or something instead?
12:51 GlitchMr Also, http://glitchmr.github.com/
12:51 GlitchMr I know I'm late... very late
12:54 PacoAir joined #perl6
12:56 brrt moritz: that is a nice link
12:56 brrt thanks
12:56 PacoAir joined #perl6
12:59 hash_table joined #perl6
13:00 sirrobert joined #perl6
13:04 Psyche^ joined #perl6
13:06 moritz GlitchMr: I thought about that too, maybe we just need two such locations
13:09 moritz though perl 5 took years to get a decent solution for that
13:09 moritz GlitchMr: it would be ~/.perl6/2012.09.1-35-g8a07b84/lib, because if you have separate lib dirs, you also want separate bin/ and panda/ dirs
13:20 replore__ joined #perl6
13:31 replore joined #perl6
13:34 wamba joined #perl6
13:35 kaare_ joined #perl6
13:38 wamba joined #perl6
13:38 ponbiki joined #perl6
13:39 [Coke] moritz: thanks for applying that patch. had meant to get to it over the weekend, glad to see you took care of it (and also fixing my test.)
13:39 phenny [Coke]: 14 Oct 15:41Z <pmichaud> tell [Coke] RT #68854 closed, thanks!
13:41 wamba joined #perl6
13:52 kaleem_ joined #perl6
13:53 masak rn: say <<<\>'n'>>
13:53 p6eval niecza v22-13-g0d2a99e: OUTPUT«<>'n'␤»
13:53 p6eval ..rakudo 8a07b8: OUTPUT«===SORRY!===␤Missing << or >>␤at /tmp/rgRs_yIuEd:1␤»
13:53 am0c joined #perl6
13:54 masak (this, and following, are from diakopter-in-the-backlog)
13:54 * masak submits rakudobug
13:55 masak motivation: I think Niecza has it right here. thus, Rakudo has it wrong.
13:55 masak rn: say <<<a>>>
13:55 p6eval niecza v22-13-g0d2a99e: OUTPUT«[31m===[0mSORRY![31m===[0m��Bogus term at /tmp/c7dJpiIdzl line 1 (EOF):�------> [32msay <<<a>>>[33m�[31m<EOL>[0m��Parse failed��»
13:55 p6eval ..rakudo 8a07b8: OUTPUT«a␤»
13:58 masak again, I side with Niecza.
13:58 masak rn: say <<'m'<\>'n'>>
13:58 p6eval rakudo 8a07b8: OUTPUT«'m'<\>'n'␤»
13:58 p6eval ..niecza v22-13-g0d2a99e: OUTPUT«'m'<>'n'␤»
13:58 masak rn: say <'m'<\>'n'>
13:58 p6eval niecza v22-13-g0d2a99e: OUTPUT«[31m===[0mSORRY![31m===[0m��Preceding context expects a term, but found infix < instead at /tmp/LNKI9iWAd2 line 1:�------> [32msay [33m�[31m<'m'<\>'n'>[0m��Parse failed��»
13:58 p6eval ..rakudo 8a07b8: OUTPUT«'m'<>'n'␤»
13:59 * masak decides to include these discrepancies, also reported by diakopter++, in the bug report
14:02 masak r: []=5; say "alive"
14:02 p6eval rakudo 8a07b8: OUTPUT«alive␤»
14:02 * masak submits rakudobug
14:02 masak r: [1, 2, 3] = 5; say "alive"
14:02 p6eval rakudo 8a07b8: OUTPUT«alive␤»
14:03 stopbit joined #perl6
14:03 masak r: say ([1, 2, 3] = 5)
14:03 p6eval rakudo 8a07b8: OUTPUT«5␤»
14:03 masak well, that has a certain logic to it :P
14:03 masak still, that assignment shouldn't be legal, methinks.
14:05 masak rn: say(|(|([4])))
14:05 p6eval niecza v22-13-g0d2a99e: OUTPUT«4␤»
14:05 p6eval ..rakudo 8a07b8: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&prefix:<|>' called (line 1)␤»
14:05 flightrecorder joined #perl6
14:05 * masak submits rakudobug
14:08 masak diakopter: I agree that it's frustrating that Rakudo and Niecza are mutually inconsistent wrt 1%0 and 1/0; but I don't know what to submit it as.
14:08 skids joined #perl6
14:09 masak r: class A { ... }; class B is A { has A $.foo }; class A { has B $.bar }; say B.new; say "alive"
14:09 p6eval rakudo 8a07b8: OUTPUT«No such method 'new' for invocant of type 'B'␤  in block  at /tmp/xEQQiNkcSK:1␤␤»
14:09 masak r: class A { ... }; class B is A { has A $.foo }; say B.new; say "alive"
14:09 p6eval rakudo 8a07b8: OUTPUT«===SORRY!===␤The following packages were stubbed but not defined:␤    A␤at /tmp/gyZD_JZwzJ:1␤»
14:10 masak oh, 'course.
14:10 masak r: class A { ... }; class B is A { has A $.foo }; class A {}; say B.new; say "alive"
14:10 p6eval rakudo 8a07b8: OUTPUT«No such method 'new' for invocant of type 'B'␤  in block  at /tmp/h_oHOfXFU4:1␤␤»
14:10 * masak submits rakudobug
14:10 masak r: class A { ... }; class B is A {}; class A {}; say B.new; say "alive"
14:10 p6eval rakudo 8a07b8: OUTPUT«No such method 'new' for invocant of type 'B'␤  in block  at /tmp/Wm423F0foa:1␤␤»
14:12 masak r: class A { ... }; class B is A { has A $.foo }; class A { has B $.bar }; say A.new.bar
14:12 p6eval rakudo 8a07b8: OUTPUT«No such method 'gist' for invocant of type 'B'␤  in sub say at src/gen/CORE.setting:7268␤  in block  at /tmp/mYtOY6NtP7:1␤␤»
14:12 masak r: class A { ... }; class B is A {}; class A { has B $.bar }; say A.new.bar
14:12 p6eval rakudo 8a07b8: OUTPUT«No such method 'gist' for invocant of type 'B'␤  in sub say at src/gen/CORE.setting:7268␤  in block  at /tmp/bmZhXA9bOo:1␤␤»
14:13 masak something tells me that diakopter was on his way to do even *more* depraved things with cyclic object dependencies, but found these bugs on the way. :P
14:13 masak diakopter++
14:13 moritz I don't think you should be able to inherit from a class that's only stubbed
14:13 moritz the proper way is to stub the subclass
14:14 masak I agree that the problem we're seeing here stems from deriving from the stubbed class.
14:14 masak I'm not yet convinced it shouldn't be allowed.
14:16 masak oh, TimToady++ has a fix in the backlog:
14:16 masak r: class A is Any { ... }; class B is A { has A $.foo }; class A { has B $.bar }; say A.new.bar
14:16 p6eval rakudo 8a07b8: OUTPUT«B()␤»
14:16 * masak includes this in the ticket
14:17 masak r: class A is Any { ... }; class B is A { has A $.foo }; class A { has B $.bar }; say (A.new.bar).HOW
14:17 p6eval rakudo 8a07b8: OUTPUT«Null PMC access in get_bool()␤  in attributes at src/stage2/gen/nqp-mo.pm:1151␤  in method perl at src/gen/CORE.setting:804␤  in method gist at src/gen/CORE.setting:798␤  in sub say at src/gen/CORE.setting:7268␤  in block  at /tmp/w0QS7k58Le:1␤␤»
14:17 masak whee
14:17 masak r: class A is Any { ... }; class B is A {}; class A { has B $.bar }; say (A.new.bar).HOW
14:17 p6eval rakudo 8a07b8: OUTPUT«Null PMC access in get_bool()␤  in attributes at src/stage2/gen/nqp-mo.pm:1151␤  in method perl at src/gen/CORE.setting:804␤  in method gist at src/gen/CORE.setting:798␤  in sub say at src/gen/CORE.setting:7268␤  in block  at /tmp/b6ufuYbWMw:1␤␤»
14:18 masak r: class A { ... }; class B is A {}; class A { has B $.bar }; say (A.new.bar).HOW
14:18 p6eval rakudo 8a07b8: OUTPUT«Null PMC access in get_bool()␤  in attributes at src/stage2/gen/nqp-mo.pm:1151␤  in method perl at src/gen/CORE.setting:804␤  in method gist at src/gen/CORE.setting:798␤  in sub say at src/gen/CORE.setting:7268␤  in block  at /tmp/d8WIWX96Cv:1␤␤»
14:18 masak r: class A { ... }; class B is A {}; class A { has $.bar }; say (A.new.bar).HOW
14:18 p6eval rakudo 8a07b8: OUTPUT«Null PMC access in get_bool()␤  in attributes at src/stage2/gen/nqp-mo.pm:1151␤  in method perl at src/gen/CORE.setting:804␤  in method gist at src/gen/CORE.setting:798␤  in sub say at src/gen/CORE.setting:7268␤  in block  at /tmp/8Q2Pr3KjrJ:1␤␤»
14:18 * masak submits rakudobug
14:18 masak r: class A { has $.bar }; say (A.new.bar).HOW
14:18 p6eval rakudo 8a07b8: OUTPUT«Null PMC access in get_bool()␤  in attributes at src/stage2/gen/nqp-mo.pm:1151␤  in method perl at src/gen/CORE.setting:804␤  in method gist at src/gen/CORE.setting:798␤  in sub say at src/gen/CORE.setting:7268␤  in block  at /tmp/t83Bga8Tk2:1␤␤»
14:18 masak o.O
14:19 moritz masak: the subclass is composed at the time we parse its }
14:19 masak r: say (class { has $.bar }).new.bar.HOW
14:19 p6eval rakudo 8a07b8: OUTPUT«Null PMC access in get_bool()␤  in attributes at src/stage2/gen/nqp-mo.pm:1151␤  in method perl at src/gen/CORE.setting:804␤  in method gist at src/gen/CORE.setting:798␤  in sub say at src/gen/CORE.setting:7268␤  in block  at /tmp/YB9mypNBQ7:1␤␤»
14:19 masak r: say (class { has $.x }).new.x.HOW
14:19 p6eval rakudo 8a07b8: OUTPUT«Null PMC access in get_bool()␤  in attributes at src/stage2/gen/nqp-mo.pm:1151␤  in method perl at src/gen/CORE.setting:804␤  in method gist at src/gen/CORE.setting:798␤  in sub say at src/gen/CORE.setting:7268␤  in block  at /tmp/E5UVkLlGyW:1␤␤»
14:19 masak r: say (class { has $.x }).x.HOW
14:19 p6eval rakudo 8a07b8: OUTPUT«Cannot look up attributes in a type object␤  in method x at src/gen/CORE.setting:1606␤  in block  at /tmp/CehyhmdJRy:1␤␤»
14:19 FROGGS joined #perl6
14:20 moritz masak: so if we allow deriving from stubbed classes, the derived classes won't get any of the behavior of the superclass, which kinda defeats the purpose of the exercise
14:20 masak agree so far.
14:21 * masak was going to say "though I'm not the language designer", but he's not so sure that's true in an effort like Perl 6
14:21 masak well, apart from the "the", which is clearly not true :)
14:21 mucker joined #perl6
14:22 sergot hi! o/
14:22 masak sergocie! \o/
14:22 masak r: say Rat.^attrs
14:22 p6eval rakudo 8a07b8: OUTPUT«No such method 'attrs' for invocant of type 'Perl6::Metamodel::ClassHOW'␤  in block  at /tmp/20T492W3EO:1␤␤»
14:22 masak r: say Rat.^attributes
14:22 p6eval rakudo 8a07b8: OUTPUT«$!numerator $!denominator␤»
14:22 sergot masaku \o/ !
14:23 masak r: say (1/2).numerator
14:23 p6eval rakudo 8a07b8: OUTPUT«1␤»
14:23 masak r: say (1/2).numerator.HOW
14:23 p6eval rakudo 8a07b8: OUTPUT«Null PMC access in get_bool()␤  in attributes at src/stage2/gen/nqp-mo.pm:1151␤  in method perl at src/gen/CORE.setting:804␤  in method gist at src/gen/CORE.setting:798␤  in sub say at src/gen/CORE.setting:7268␤  in block  at /tmp/s1DQICF2TV:1␤␤»
14:25 masak r: (;)
14:25 p6eval rakudo 8a07b8: OUTPUT«===SORRY!===␤Method 'returns' not found for invocant of class 'Integer'␤»
14:25 * masak submits rakudobug
14:26 masak r: say (;:[])
14:26 p6eval rakudo 8a07b8: OUTPUT«===SORRY!===␤Error while compiling block : Error while compiling op call: Error while compiling block : Error while compiling op call: Can only use get_how on a SixModelObject␤»
14:26 * masak submits rakudobug
14:27 masak std: say (;:[])
14:27 p6eval std 77327a4: OUTPUT«ok 00:00 44m␤»
14:30 masak <tadzik> ▄█▀ █▬█ █ ▀█▀
14:30 tadzik that was me,aye
14:30 masak tadzik: ...and now all blind people reading tha backlog hate you. :P
14:30 masak the*
14:31 mucker tadzik: how did you type that 0_o ?
14:31 tadzik power of copypasta
14:33 masak <tadzik> wow, blogs.perl.org on a Mojolicious rampage
14:33 masak <__sri> the underlying question is actually quite interesting, too bad it's buried under mojolicious fud
14:33 masak <tadzik> yeah
14:33 tadzik wow, masak on backlog-reading-rampage :)
14:33 masak ...and I missed most of that blog back-and-forth, but I feel that *those three lines* capture all I need to know.
14:34 * masak hugs #perl6
14:35 birdwind1pbird joined #perl6
14:35 PerlJam masak++
14:36 masak moritz: re CUSTOM-LIB -- I'd much rather see it as CUSTOM_LIB. I don't dislike dashes, but I think all-caps names should use them.
14:36 PerlJam (after reading a few lines I was about to remind people that communities need care and feeding too, lest they devolve into chaos)
14:36 masak and not just because the one typing them is already holding down the shift key ;)
14:37 PerlJam guten tag everybody
14:37 masak PerlJam: oh! I read a statement by Assange today that reminded me of the care and feeding of communities. it was about Wikileaks and Anonymous.
14:37 masak but it made me think of the Perl 6 community.
14:38 * masak admires sirrobert who is doing cool stuff with Perl 6 for his $dayjob
14:40 * moritz admires sirrobert too
14:40 sirrobert heh
14:42 masak sirrobert: seems the STORE method at https://github.com/sirrobert/Semantic-Versioning/blob/master/lib/Semantic/Versioning.pm#L22 doesn't clear minor and patch versions if a shorter list was provided. bug?
14:42 sirrobert a shorter list?
14:43 sirrobert as in .version = "1.2" ?
14:43 masak moritz: prior art: $*EXECUTABLE_NAME
14:43 masak sirrobert: yeah.
14:43 moritz masak: *nod*
14:44 masak sirrobert: if it was 1.4.13 before, it will be 1.2.13 after.
14:44 sirrobert masak:  close enough to a bug.  I'd call it a feature request =)
14:44 sirrobert masak:  ohhhh
14:44 masak sirrobert: bug?
14:44 sirrobert masak:  would you want it to go to 1.2.0?
14:44 masak yes!
14:44 moritz masak: I think we need, in total, 4 new paths
14:44 masak sirrobert: or maybe 1.2.<undef>, I dunno.
14:45 masak sirrobert: up to you.
14:45 moritz I'd like to steal perl 5's concept of perl/vendor/site libs, plus one per-user dir (to which the user surely has write permissions)
14:45 masak sirrobert: if it goes to 1.2.0, then prolly minor and patch should be 0 at initialization, too.
14:45 sirrobert masak: yeah... I'll think on that.  I definitely get the value, but it could be a surprise
14:45 hash_table joined #perl6
14:45 moritz so maybe %LIBDIR<perl vendor site user>
14:46 masak sirrobert: in fact, given how FETCH works, you prolly want to set those to 0 initially.
14:46 masak moritz: sounds good to me.
14:46 sirrobert masak:  ok.  How does FETCH work that's relevant?
14:46 aloha joined #perl6
14:46 kresike bye folks
14:47 sirrobert when I do:  panda update
14:47 sirrobert I get this error:  use of uninitialized variable $key of type Any in string context  in method add-project at /home/sirrobert/.perl6/_git/rakudo-star-2012.09/install/lib/parrot/4.6.0/languages/perl6/lib/Panda/Ecosystem.pm:90
14:48 sirrobert I just recompiled rakudo and it did that.
14:48 sirrobert (rakudo-star)
14:49 masak sirrobert: FETCH expects the values in minor and patch to have been set. if they haven't, it will emit undefinedness warnings.
14:49 masak might want to set all three values to 0.
14:49 sirrobert masak: got it
14:49 sirrobert masak:  I thought you meant how FETCH was implemented underneath
14:51 masak ah, no. meant your FETCH.
14:51 sirrobert masak:  fixed.
14:51 cognominal joined #perl6
14:52 masak sirrobert++
14:52 lumi__ p6: class A { method foo { ... }; }; class B is A { has $.foo; }; my A $a = B.new; $a.foo = 3; say $a.foo
14:52 p6eval rakudo 8a07b8: OUTPUT«Cannot assign to a readonly variable or a value␤  in block  at /tmp/F8qK27buwD:1␤␤»
14:52 p6eval ..niecza v22-13-g0d2a99e: OUTPUT«3␤»
14:53 masak ...and I'm caught up on the backlog.
14:53 tokuhiro_ joined #perl6
14:56 moritz r: class A { method foo { !!! } }; class B is A { has $.foo }; my A $a = B.new; $a.foo = 3; say $a.foo
14:56 p6eval rakudo 8a07b8: OUTPUT«Cannot assign to a readonly variable or a value␤  in block  at /tmp/giNH4C2T0h:1␤␤»
14:56 grondilu joined #perl6
14:57 masak is it possible to give something a custom ClassHOW without using modules?
14:57 moritz r: class A { method foo { !!! } }; class B is A { has $.foo }; my A $a = B.new(foo => 5); say $a.foo
14:57 p6eval rakudo 8a07b8: OUTPUT«5␤»
14:58 moritz masak: I'm sure it is, if you know the hooks :-)
14:59 grondilu what exactly does $*CUSTOM-LIB?  I don't see it documented in specs.  Is it the same as PERL6LIB?
14:59 REPLeffect joined #perl6
15:01 lumi__ p6: class A { has $!x; method foo is rw { return-rw $!x; }; }; class B is A { has $.foo; }; my A $a = B.new; $a.foo = 3; say $a.foo
15:01 p6eval rakudo 8a07b8: OUTPUT«Cannot assign to a readonly variable or a value␤  in block  at /tmp/CeRh3HrmyN:1␤␤»
15:01 p6eval ..niecza v22-13-g0d2a99e: OUTPUT«3␤»
15:01 masak moritz: I don't know the hooks :/
15:02 masak lumi__: yeah, but you're *overriding* the .foo method by giving $!foo in B an accessor...
15:02 masak lumi__: I'm with Rakudo, not Niecza, on this one.
15:03 masak n: class A { has $.x }; given A.new { .x = 5; say .x }
15:03 p6eval niecza v22-13-g0d2a99e: OUTPUT«5␤»
15:03 masak Niecza doesn't seem to make attributes readonly at all.
15:03 lumi__ masak: But even predeclaring it as rw doesn't help
15:05 masak show it in code, please?
15:05 sirrobert the ecosystem module right before Semantic::Versioning (SSL, by grondilu) has a source-url of "git@github.com:..." is that legit?
15:05 sirrobert (trying to track down a panda error)
15:06 masak r: class A { has $.x is rw }; given A.new { .x = 5; say .x }
15:06 p6eval rakudo 8a07b8: OUTPUT«5␤»
15:06 masak r: class A { has $.x }; given A.new { .x = 5; say .x }
15:06 p6eval rakudo 8a07b8: OUTPUT«Cannot assign to a readonly variable or a value␤  in block  at /tmp/VJmSwokbYJ:1␤␤»
15:06 masak sirrobert: probably not legit.
15:06 sirrobert the rest of the source-urls in the META.list use "git://github.com..."
15:06 sirrobert is it kosher for me to change that in the META.list file?
15:06 sirrobert don't want to step on toes.
15:06 masak sirrobert: yes.
15:06 sirrobert masak: ok, thanks
15:06 masak go right ahead.
15:07 masak I'll vouch for you, if needed, which it won't :P
15:07 masak won't be*
15:08 dalek ecosystem: cdab4f5 | (Sir Robert Burbridge)++ | META.list:
15:08 dalek ecosystem: removed SSL to try to fix a panda error
15:08 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/cdab4f5e00
15:09 sirrobert thanks.  Removed that line temporarily and will check if that fixes the issue.
15:09 lumi__ masak: Sorry, my mistake, I hadn't realized attributes were readonly
15:10 masak lumi__: that's how it looked from your evals. ;)
15:10 masak sirrobert: or you could make the obvious transformation to the kosher kind of URI...
15:11 lumi__ Although that means that rw-ness isn't kept when overriding, which is surprising
15:11 masak eh?
15:11 masak you're defining a new attribute.
15:12 lumi__ masak: I thought the accessor for the attribute overrides the method?
15:12 masak correct.
15:12 lumi__ So if the method is rw, and the accessor isn't, that's not keeping its contract
15:13 bluescreen10 joined #perl6
15:14 masak I assumed your confusion stemmed from thinking in terms of contracts.
15:14 masak you're right; that's not keeping its contract.
15:14 masak in Perl, keeping contracts is up to you, the programmer.
15:15 masak the compiler won't call you on it if you don't.
15:15 lumi__ So rwness is a run-time thing
15:16 benabik joined #perl6
15:16 masak that's not what I said. but I guess it is, in a way.
15:16 lumi__ So on the flipside, saying "method foo is rw { ... }" is always useless?
15:17 PerlJam joined #perl6
15:17 masak no, I think it's useful.
15:17 masak but I'm not completely up-to-date on that.
15:17 masak maybe only 'return-rw' matters nowadays.
15:17 * masak waves hands a little
15:17 benabik joined #perl6
15:18 lumi__ "Contract" might be a bit strong, but I would think lvalueness would be part of a method's return type
15:19 masak well, Perl doesn't honor any such things across class derivedness relations.
15:19 masak r: class A { method foo { return 42 } }; class B is A { method foo { return "OH HAI" } }; A.new.foo; B.new.foo
15:19 p6eval rakudo 8a07b8:  ( no output )
15:20 masak r: class A { method foo { return 42 } }; class B is A { method foo { return "OH HAI" } }; say A.new.foo.^name; say B.new.foo.^name
15:20 p6eval rakudo 8a07b8: OUTPUT«Int␤Str␤»
15:20 masak between base class and derived class, you can change return type, number of parameters, type of parameters, lvalueness... anything.
15:25 moritz note that type and lvalueness operate on different levels
15:26 lumi__ C++11 just added an 'override' keyword, could we have one?
15:26 lumi__ Possibly in a module
15:26 moritz what would we need that for?
15:27 lumi__ moritz: To check that you're keeping a compatible signature
15:27 moritz but we don't do that anyway
15:27 moritz or do you mean adding 'override' would do that?
15:28 lumi__ moritz: That's what I mean. "method foo is override" to make sure it actually is
15:30 moritz lumi__: you can implement that today if you want
15:30 moritz in user space, for rakudo
15:30 moritz this weekend I implemented method delegation. I first write the trait in user space, and only after testing did I copy it into rakudo's source
15:31 rindolf joined #perl6
15:32 aharoni joined #perl6
15:32 masak nice!
15:33 moritz r: class A { method Num handles <sqrt exp> { 42 } }; say A.sqrt
15:33 p6eval rakudo 8a07b8: OUTPUT«6.48074069840786␤»
15:33 moritz r: class A { method Num handles <sqrt exp> { 42 } }; say A.exp
15:33 p6eval rakudo 8a07b8: OUTPUT«1.7392749415205e+18␤»
15:34 lumi__ Cool!
15:35 moritz and that's just 12 lines of fairly understandable (IMHO) code
15:35 cognominal joined #perl6
15:36 moritz ... in which I've just discvered a minor imperfection :-)
15:36 cognominal http://www.technologyreview.com/news/429544/new-programming-language-makes-social-coding/   réinventing AppleScript. Bad ideas never die.
15:37 thou joined #perl6
15:37 moritz (in user space I used native strings, but in src/core/traits.pm those aren't available yet, so I reverted back to object types. Forgot an unbox along the way)
15:37 moritz erm, forgot to remove an unbox
15:39 gugod joined #perl6
15:39 wtw joined #perl6
15:40 bluescreen10 joined #perl6
15:41 flightrecorder joined #perl6
15:42 sirrobert masak:  Well, the problem is in his repo; I don't have access to it
15:44 masak oh!
15:44 masak then deletion sounds like the right thing to do.
15:44 masak people should only publish shared repositories ;)
15:45 FROGGS joined #perl6
15:47 moritz or maybe just submit a pull request, and ait a bit
15:47 moritz *wait
15:47 moritz or does it completely break panda?
15:47 kurahaupo joined #perl6
15:48 dalek rakudo/nom: 0937c72 | moritz++ | src/core/traits.pm:
15:48 dalek rakudo/nom: remove left-over unbox in method delegation
15:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0937c7295b
15:54 cognominal joined #perl6
15:55 sirrobert moritz:  for whatever reason I can't install Semantic::Versioning via panda =)  but I can install other modules before that one.  Trying to figure out why
15:56 sirrobert err... masak
15:59 dalek ecosystem: 110edde | (Sir Robert Burbridge)++ | META.list:
15:59 dalek ecosystem: added the SSL module back-- didn't fix panda
15:59 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/110eddea02
16:03 kurahaupo joined #perl6
16:08 fgomez joined #perl6
16:21 MayDaniel joined #perl6
16:35 fglock joined #perl6
16:35 spider-mario joined #perl6
16:36 TimToady flussence, moritz: the passages in S12 are trying to indicate that colliding enums poison the short name.  It is not the case that S12:1932 says you can just error out on the second declaration.  It is not an error to import colliding names that you never use.  It's the attempt to use an ambiguous enum 'a' that produces the error, because 'a' was "poisoned".
16:37 sirrobert r: multi sub foo (:$GET)  { say $GET }; multi sub foo (:$POST) { say $POST }; my $foo = 'GET'; foo :($foo);
16:37 TimToady so it is also not sufficient for the second declaration to merely delete 'a'; all that does is privilege the 3rd declaraiton
16:37 p6eval rakudo 0937c7: OUTPUT«Cannot call 'foo'; none of these signatures match:␤:(:GET(:$GET))␤:(:POST(:$POST))␤␤  in block  at /tmp/cua0O84NXt:1␤␤»
16:38 sirrobert how do I pass in a named argument whose name is the content of the var?
16:39 TimToady |($foo => True) or some such
16:39 sirrobert hmmm interesting
16:39 sirrobert flatten a parcel
16:39 kurahaupo joined #perl6
16:39 sirrobert great, thanks
16:39 TimToady prefix:<|> is suppose to interpolate into an argument list as if it were really there
16:40 sirrobert righto
16:40 TimToady though I think there are some bugs lurking in that code
16:40 sirrobert well, my quick & dirty test worked... I'll see if it's good enough for now
16:40 sirrobert thanks =)
16:40 diakopter I need to write a real fuzzer for Perl 6
16:40 diakopter I'm tired of manually permuting
16:42 TimToady but you enjoy it
16:43 sirrobert r: my @opt = 1,2,3,4; for 1..@opt.elems { say @options.rotate($_).[0,1] }
16:43 p6eval rakudo 0937c7: OUTPUT«===SORRY!===␤Variable @options is not declared␤at /tmp/IVWRkMwkDH:1␤»
16:43 sirrobert not that you don't know how, but I found something like that convenient =)
16:43 sirrobert fwiw
16:43 sirrobert r: my @opt = 1,2,3,4; for 1..@opt.elems { say @opt.rotate($_).[0,1] }
16:43 p6eval rakudo 0937c7: OUTPUT«2 3␤3 4␤4 1␤1 2␤»
16:44 diakopter let's see; it needs to be STD-based; it needs to persist progress state across runs
16:44 mtk joined #perl6
16:46 diakopter ideally it has a special interaction with each compiler to avoid startup time
16:48 aindilis joined #perl6
16:50 diakopter TimToady: yes. maybe I'd enjoy it more if I could generate 10x as many. Problems need pointed out. imho, not being aware of problems in a release is worse than being aware, because it multiplies bug-for-bug compatability. At leaset if it's documented as wrong, its behavior doesn't have to be maintained in the future
16:50 diakopter the detriment becomes: maintaining a giant bug queue is very hard
16:51 diakopter e.g. mono
16:51 diakopter or chromium
16:52 diakopter duplicate bugs submitted at an extremely high rate because it's too hard to find them in the database
16:53 diakopter or in mono's case, a mind-boggling number of arguably bug-for-bug compatability bugs since it's a clone of .Net
16:53 diakopter identifying unique bugs from a fuzzer is also very hard, of course
16:53 TimToady this is one reason why it has been so important for us to have multiple implementaitons
16:53 TimToady *tions
16:54 TimToady you need a fuzzer/minimizer :)
16:54 diakopter golfuzzer
16:55 arnsholt Kind of like QuickCheck =)
16:55 diakopter sounds Babylonian
16:56 arnsholt QuickCheck?
16:57 diakopter golfuzzer
16:57 arnsholt Right, that one's more Babylonian
16:57 arnsholt Although Babylonian didn't have a sound f, from memory
16:58 arnsholt (I actually took some classes in Babylonian a few years ago =D)
16:58 diakopter o_O
16:58 arnsholt That was pretty cool. Semitic languages are nifty
17:04 mucker joined #perl6
17:04 arnsholt diakopter: What kind of things were you thinking about regarding fuzzing, BTW?
17:06 sirrobert ok, I think I have a bug here.......
17:07 sirrobert r: multi sub foo (:$A) { say "A" }; multi sub foo (:$B) { say "B" }; my $str = 'B'; foo |($str => True);
17:07 p6eval rakudo 0937c7: OUTPUT«B␤»
17:07 sirrobert r: class M { multi method foo (:$A) { say "A" }; multi method foo (:$B) { say "B" }; } my $str = 'B'; M.new.foo: |($str => True);
17:07 p6eval rakudo 0937c7: OUTPUT«===SORRY!===␤Confused␤at /tmp/yb_XTM6ZBb:1␤»
17:08 sirrobert r: class M { multi method foo (:$A) { say "A" }; multi method foo (:$B) { say "B" }; }; my $str = 'B'; M.new.foo: |($str => True);
17:08 p6eval rakudo 0937c7: OUTPUT«A␤»
17:08 sirrobert that second one should have printed B as the first one did.
17:08 sirrobert it works for multi subs, but not for multi methods
17:12 diakopter arnsholt: good question. just look for parsing errors to start. things that abort parsing abnormally like NPMCA in rakudo or CLR exception in niecza. I still run across those occasionaly
17:13 rindolf joined #perl6
17:14 pmichaud good afternoon, #perl6
17:14 sirrobert hallo
17:15 sirrobert r: my $foo = "bar"; say "$foo:a";
17:15 p6eval rakudo 0937c7: OUTPUT«bar␤»
17:15 sirrobert Why didn't that output "bar:a"
17:15 sirrobert ?
17:15 arnsholt diakopter: Automatically generating programs would be cool indeed
17:16 rindolf pmichaud: hi.
17:16 arnsholt I've thought about it in the past, but not yet come up with a good idea to implement it
17:16 diakopter arnsholt: the fuzzer for that system would just permute the rules; keeping track of which ones it already permuted so it doesn't follow subrules again
17:17 arnsholt Yeah, that might work
17:17 diakopter it wouldn't need to permute things like character classes or unicode properties
17:17 pmichaud r: my $foo = "bar";  say $foo:a
17:17 p6eval rakudo 0937c7: OUTPUT«bar␤»
17:17 pmichaud rn: my $foo = "bar";  say $foo:a
17:18 p6eval niecza v22-13-g0d2a99e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Variable $foo:a is not predeclared at /tmp/qkW5Vs2cnK line 1:â�¤------> [32mmy $foo = "bar";  say [33mâ��[31m$foo:a[0mâ�¤â�¤Potential difficulties:â�¤  $foo is declared but not used at /tmp/qkW5Vs2cnK line 1:â�¤------> [32mmy [33m…
17:18 p6eval ..rakudo 0937c7: OUTPUT«bar␤»
17:18 pmichaud That's just weird.
17:21 diakopter arnsholt: hmm. I guess that would just test each codepath once.
17:22 diakopter rather, some of the parsing errors are due to strange nestings
17:22 pmichaud sirrobert: I'm guessing the :a is being parsed as part of the variable somehow, or it's acting like some form of postcircumfix
17:22 diakopter r: my $foo = "bar";  say $foo:a.WHAT
17:22 p6eval rakudo 0937c7: OUTPUT«Str()␤»
17:24 diakopter r: my $foo = "bar";  say $foo:1.WHAT
17:24 p6eval rakudo 0937c7: OUTPUT«===SORRY!===␤Confused␤at /tmp/jQcRL7W_g9:1␤»
17:25 pmichaud rn: my $foo = "bar";  say ($foo):a
17:25 p6eval rakudo 0937c7: OUTPUT«===SORRY!===␤Confused␤at /tmp/XQKRGozHcC:1␤»
17:25 p6eval ..niecza v22-13-g0d2a99e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤You can't adverb that at /tmp/vV9iuysJ_q line 1 (EOF):â�¤------> [32mmy $foo = "bar";  say ($foo):a[33mâ��[31m<EOL>[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1437 (die @ 5) â�¤ …
17:25 diakopter rn: my $foo = "bar";  say $foo:[].WHAT
17:25 p6eval niecza v22-13-g0d2a99e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Variable $foo:[] is not predeclared at /tmp/iBOuBc3OMv line 1:â�¤------> [32mmy $foo = "bar";  say [33mâ��[31m$foo:[].WHAT[0mâ�¤â�¤Potential difficulties:â�¤  $foo is declared but not used at /tmp/iBOuBc3OMv line 1:â�¤------> [32mm…
17:25 p6eval ..rakudo 0937c7: OUTPUT«===SORRY!===␤Variable $foo:<> is not declared␤at /tmp/YCgRWEqgt9:1␤»
17:25 Chillance joined #perl6
17:26 diakopter eh
17:26 diakopter how are those variable names
17:27 diakopter std: my $foo = "bar";  say $foo:[].WHAT
17:27 p6eval std 77327a4: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Variable $foo:[] is not predeclared at /tmp/Bp76nqCoeo line 1:â�¤------> [32mmy $foo = "bar";  say [33mâ��[31m$foo:[].WHAT[0mâ�¤Check failedâ�¤FAILED 00:00 44mâ�¤Â»
17:29 pmichaud <colonpair> appears to be a valid dottyop
17:30 pmichaud and colonpair is a valid component of <longname>
17:32 diakopter std: my &[];
17:32 p6eval std 77327a4: OUTPUT«ok 00:00 45m␤»
17:34 diakopter <longname> # XXX  line 2461 of STD.pm6  I wonder what the XXX means
17:34 diakopter oh nm
17:51 fgomez joined #perl6
18:10 obtical joined #perl6
18:12 kaleem joined #perl6
18:13 bluescreen10 joined #perl6
18:31 tokuhiro_ joined #perl6
18:32 cognominal joined #perl6
18:36 daxim joined #perl6
18:36 daxim rakudo: say "1  100  200".comb(' ').perl
18:36 p6eval rakudo 0937c7: OUTPUT«Cannot call 'comb'; none of these signatures match:␤:(Str:D : Mu *%_)␤:(Str:D : Regex $pat, $limit = { ... }, :match(:$match), Mu *%_)␤:(Cool : Mu *%_)␤:(Cool : Regex $matcher, $limit = { ... }, Mu *%_)␤␤  in method comb at src/gen/CORE.setting:2101␤  in block  at …
18:37 daxim how do I split that?
18:37 sirrobert r: say "1  100  200".split('  ').perl
18:37 p6eval rakudo 0937c7: OUTPUT«("1", "100", "200").list␤»
18:37 PerlJam with split?
18:38 daxim but irregular whitespace
18:38 daxim rakudo: say "1   100  200".split('  ').perl
18:38 p6eval rakudo 0937c7: OUTPUT«("1", " 100", "200").list␤»
18:38 PerlJam daxim: comb is for describing what you *want*, split is for describing what you want to *throw away*
18:38 sirrobert r: say "1  100     200".split(/\s+/).perl
18:38 p6eval rakudo 0937c7: OUTPUT«("1", "100", "200").list␤»
18:39 PerlJam r: say "1   100  20   49".comb(/\d+/).perl
18:39 p6eval rakudo 0937c7: OUTPUT«("1", "100", "20", "49").list␤»
18:39 daxim then the docs at http://doc.perl6.org/routine/split are confusing: it reads as if comb is like split, but automatically removes empty elements
18:39 masak and, somewhat inconsistently, .split accepts strings or regexes; .comb accepts only regexes.
18:40 sirrobert r: say "1ab34ksd593,dk45".comb: /\d+/
18:40 p6eval rakudo 0937c7: OUTPUT«1 34 593 45␤»
18:40 sirrobert cool
18:40 flussence .comb with a plain string sounds a bit pointless...
18:41 PerlJam flussence: unless you're counting occurences.
18:41 PerlJam but, yes ... I tend to agree  :)
18:41 sirrobert plain string as opposed to ... ?
18:41 flussence yeah, but then you should probably have a separate function that returns the count instead of $input xx $count
18:41 sirrobert non-string or fancy string?
18:41 daxim then the docs at http://doc.perl6.org/routine/split are confusing: it reads as if comb is like split, but automatically removes empty elements
18:41 daxim oops
18:41 flussence sirrobert: instead of regex
18:42 sirrobert flussence:  ohh, comb's argument
18:42 sirrobert =)
18:46 cognominal joined #perl6
18:47 * PerlJam sometimes wishes comb was spelt  "keep" instead.
18:47 daxim r: my %r;  my @val = "1  100     200".split(/\s+/);  %r<@val.shift> = @val; say %r.perl;
18:47 p6eval rakudo 0937c7: OUTPUT«("\@val.shift" => ["1", "100", "200"]).hash␤»
18:47 daxim r: my %r;  my @val = "1  100     200".split(/\s+/);  %r{@val.shift} = @val; say %r.perl;
18:47 p6eval rakudo 0937c7: OUTPUT«("1" => ["100", "200"]).hash␤»
18:48 daxim this does not work in rakudo 2012-07
18:48 daxim need to upgrade
18:50 Gruber joined #perl6
18:56 Grrrr joined #perl6
18:58 masak r: class M { multi method foo(:$a) { say "a" }; multi method foo(:$b) { say "b" } }; my $str = "b"; M.new.foo: |($str => True)
18:58 p6eval rakudo 0937c7: OUTPUT«a␤»
18:58 masak r: class M { multi method foo(:$a!) { say "a" }; multi method foo(:$b!) { say "b" } }; my $str = "b"; M.new.foo: |($str => True)
18:58 p6eval rakudo 0937c7: OUTPUT«b␤»
18:58 masak sirrobert: that's your workaround.
18:59 masak named parameters are optional by default, so both multi methods are matching candidates. so they tie-break by calling the first matching one.
19:00 daxim http://doc.perl6.org/for   # needs docs!
19:00 moritz daxim: patch it :-)
19:02 drbean joined #perl6
19:03 kevouze joined #perl6
19:05 masak phenny: eo en "for"?
19:05 phenny masak: "for" (eo to en, translate.google.com)
19:06 masak (means "away" or "gone") :P
19:06 daxim r: my $foo = [200,300];  my %o; %o{567}{sprintf '%s,%s', $foo} = 1;  say %o.perl
19:06 p6eval rakudo 0937c7: OUTPUT«Null PMC access in get_string()␤  in sub sprintf at src/gen/CORE.setting:2166␤  in block  at /tmp/ucuWaLS6M_:1␤␤»
19:06 geekosaur for-gone conclusion?
19:06 daxim null pmc is a bad low-level crash that should never happen, right?
19:07 PerlJam right
19:07 daxim then walk me through rakudobug
19:09 daxim https://rt.perl.org/rt3/Search/Results.html?Query=Queue%20%3D%20'perl6'   # is that the right queue?
19:09 masak daxim: already submitted.
19:10 daxim bleh
19:10 masak the problem is '%s,%s' and then just one additional argument.
19:10 daxim I want to write perl6 once every month, I expect to uncover more bugs
19:10 masak r: sprintf '%s%s', 2
19:10 p6eval rakudo 0937c7: OUTPUT«Null PMC access in get_string()␤  in sub sprintf at src/gen/CORE.setting:2166␤  in block  at /tmp/yFvfHKyz7Z:1␤␤»
19:10 masak r: sprintf '%s'
19:10 p6eval rakudo 0937c7: OUTPUT«Null PMC access in get_string()␤  in sub sprintf at src/gen/CORE.setting:2166␤  in block  at /tmp/hD6rRQAeqf:1␤␤»
19:10 masak 'night, #perl6
19:11 diakopter o/
19:13 daxim I need to dereference or flatten that arrayref in order to feed the list to sprintf, how do I do that?
19:14 diakopter which arrayref
19:14 diakopter oh, foo
19:14 daxim it comes from a for -> blocky assignment
19:14 daxim pointy
19:14 diakopter r: my $foo = [200,300];  my %o; %o{567}{sprintf '%s,%s', |$foo} = 1;  say %o.perl
19:14 p6eval rakudo 0937c7: OUTPUT«("567" => {"200,300" => 1}).hash␤»
19:15 daxim what's | called?=
19:15 diakopter flattener
19:21 colomon_s joined #perl6
19:22 colomon_s O/
19:23 colomon_s What's the smart way to merge Arrays into a single Array?
19:26 benabik joined #perl6
19:28 sorear o/
19:28 diakopter hi SO
19:28 colomon_s \o
19:30 mst colomon_s: my @both = (@array1,@array2);
19:30 moritz or if you have an AoA, my @flat = @AoA.map: *.list
19:31 colomon_s Thank you!
19:39 birdwindupbird joined #perl6
19:51 cognominal joined #perl6
19:52 colomon joined #perl6
20:02 joelwilsong joined #perl6
20:07 replore_ joined #perl6
20:13 araujo joined #perl6
20:14 jaldhar_ joined #perl6
20:15 fgomez joined #perl6
20:16 nyuszika7h joined #perl6
20:26 sffd joined #perl6
20:27 _edwin joined #perl6
20:28 _edwin std: constant s = 1,2; say s[0];
20:28 p6eval std 77327a4: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Missing assignment operator at /tmp/Oa368ACnyu line 1:â�¤------> [32mconstant s = 1,2; say s[0][33mâ��[31m;[0mâ�¤    expecting any of:â�¤        quantifierâ�¤     sigmaybeâ�¤Parse failedâ�¤FAILED 00:00 44mâ�¤Â»
20:29 diakopter std: constant s = 1,2; say s[0]*]
20:29 p6eval std 77327a4: OUTPUT«ok 00:00 44m␤»
20:29 diakopter haha
20:29 sffd rn: say 1.2.1α1 cmp 1.2.1.gamma
20:29 p6eval rakudo 0937c7: OUTPUT«===SORRY!===␤Confused␤at /tmp/qKBc6Or4S9:1␤»
20:29 p6eval ..niecza v22-13-g0d2a99e: OUTPUT«[31m===[0mSORRY![31m===[0m��Number contains two decimal points (missing 'v' for version number?) at /tmp/NM_ny3rabW line 1:�------> [32msay 1.2[33m�[31m.1α1 cmp 1.2.1.gamma[0m��Whitespace is required between alphanumeric tokens at /tmp/NM_ny3rabW l…
20:30 diakopter TimToady: see above for STD weirdness
20:30 _edwin is this a bug or am I being stupid using "constant s"?
20:30 diakopter well, it's definitely a bug in STD
20:30 diakopter since it accepts say s[0]*]
20:31 colomon n: constant s = 1, 2; say s[0]
20:31 p6eval niecza v22-13-g0d2a99e: OUTPUT«[31m===[0mSORRY![31m===[0m��Missing assignment operator at /tmp/3YGHISuyYb line 1 (EOF):�------> [32mconstant s = 1, 2; say s[0][33m�[31m<EOL>[0m��Parse failed��»
20:31 colomon n: constant @s = 1, 2; say @s[0]
20:31 * [Coke] goes through and plays the URL game (type, in turn, each letter of the alphabet into the browser location bar and write down the URL it autocompletes to. I get one url with "perl6" - for "i")
20:31 p6eval niecza v22-13-g0d2a99e: OUTPUT«1␤»
20:31 diakopter n: constant s = 1, 2; say s[0]*=]
20:31 p6eval niecza v22-13-g0d2a99e: OUTPUT«Unhandled exception: Unable to resolve method subst in type Any␤  at /tmp/arKFEVDZx9 line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4212 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4213 (module-CORE @ 579) ␤  at /home/…
20:31 diakopter <snicker>
20:32 _edwin I expected that "constant s = ..." would lexically change the meaning of "s", but it does not seem to be so
20:32 sffd rn: say version,new(1.2.1α1) cmp version.new(1.2.1.gamma)
20:32 p6eval niecza v22-13-g0d2a99e: OUTPUT«[31m===[0mSORRY![31m===[0m��Number contains two decimal points (missing 'v' for version number?) at /tmp/1u7jyMR865 line 1:�------> [32msay version,new(1.2[33m�[31m.1α1) cmp version.new(1.2.1.gamma)[0m��Whitespace is required between alphanumeric t…
20:32 p6eval ..rakudo 0937c7: OUTPUT«===SORRY!===␤Unable to parse expression in argument list; couldn't find final ')' at line 2, near ".1\u03b11) cmp "␤»
20:33 _edwin guess I should really use some unicode characters
20:35 diakopter _edwin: nice find (the STD bug)
20:35 _edwin is there a bugtracker for STD?
20:36 _edwin .u italic s
20:36 phenny U+2146 DOUBLE-STRUCK ITALIC SMALL D (ⅆ)
20:36 sffd rn: say (Version.new("1.2.1α1") cmp Version.new("1.2.1β1")).perl
20:36 p6eval niecza v22-13-g0d2a99e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared name:â�¤        'Version' used at line 1,1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1437 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37) â�¤  at /h…
20:36 p6eval ..rakudo 0937c7: OUTPUT«Order::Increase␤»
20:36 _edwin .u "italic small s"
20:36 phenny _edwin: Sorry, your input is too long!
20:36 _edwin .u italic small s
20:36 phenny _edwin: Sorry, no results for 'italic small s'.
20:38 _edwin .u 1d460
20:38 phenny _edwin: Sorry, no results for '1d460'.
20:42 kurahaupo joined #perl6
20:48 _edwin is there a nicer way to do the following that I am missing?:
20:48 _edwin nr: sub little-endian($w, $n, *@v) { (@v X+> ($w X* ^$n)) X% (2 ** $w) }; say little-endian(8, 4, 32766, 65535)
20:48 p6eval rakudo 0937c7, niecza v22-13-g0d2a99e: OUTPUT«254 127 0 0 255 255 0 0␤»
20:50 _edwin i.e. transform a sequence of Ints to the sequence of their little-endian reprs. of n w-bit words each
20:51 flightrecorder joined #perl6
20:51 Celelibi_ joined #perl6
21:00 * jnthn is back from NPW and Stockholm $dayjob task :)
21:08 hash_table joined #perl6
21:13 joelwilsong left #perl6
21:22 swarley joined #perl6
21:23 swarley Is there a vim syntax file for NQP?
21:23 PerlJam swarley: Just use the perl 6 vim syntax file.  (NQP is a subset of full Perl 6 syntax)
21:24 swarley Oh, okay. Cool
21:26 cognominal joined #perl6
21:28 swarley oh also, does anyone know if this is still true
21:28 swarley # RT #46213 : Because PGE doesn't yet know how to do longest token matching,
21:28 swarley # order all tokens in reverse alpha order to avoid a parsing bug.
21:29 jnthn nqp: say('abcd' ~~ /abc|\w+/);
21:29 p6eval nqp: OUTPUT«abcd␤»
21:29 jnthn It does LTM proper now :)
21:30 swarley oh, wonderful
21:31 tadzik good evening
21:32 jnthn o/ tadzik
21:38 sorear swarley: PGE has not been used by #perl6 for over two years, so regardless of LTM the comment is wrong :p
21:45 cognominal joined #perl6
21:47 tadzik what's this thing about ssl and panda breakage?
21:47 tadzik sirrobert?
21:50 japhb_ joined #perl6
21:50 japhb_ jnthn, was there video of your NPW talk(s)?
21:50 japhb_ I know you mentioned that one of them was 90% demo ...
21:51 jnthn japhb_: No, there was no videoing at NPW
21:51 japhb_ dang
21:51 jnthn japhb_: However, I submitted the same talk to LPW :)
21:51 jnthn So if it gets accepted there and they video... :)
21:51 japhb_ Heh.  Where is LPW?
21:51 jnthn (No idea how likely that is...)
21:51 jnthn L = London :)
21:52 japhb_ ah, gotcha
21:52 japhb_ .oO( Luxembourg )
21:52 tadzik . o O ( Lublin )
21:53 jnthn .oO( Lolland )
21:53 tadzik LOL! Perl Workshop!
21:53 cognominal .oO(Lyon) # for BooK
21:54 tadzik Lion Perl Workshop
21:54 tadzik neh, too tired to actually draw that
21:55 tadzik Legoland Perl Workshop?
21:55 tadzik . o O ( That escalated quickly )
21:56 japhb_ When did Rakudo (and NQP) start doing --gen-parrot and installing into ./install/... ?
21:57 japhb_ My eldest starts a Lego Mindstorms class at her school this week.  Makes me wonder if the embedded processor is powerful enough to program with a Perl.  ;-)
21:58 jnthn japhb_: I think we've had something along those lines back to the previous generation of Rakudo
21:58 * japhb_ is thinking of doing checkout/build/benchmark all released Rakudo's, and graphing the result.  But I need to know if/when I need to start worrying about a different build/run process.
21:58 japhb_ jnthn, you mean, all of b Rakudo had --gen-parrot and ./install/ as well?
22:00 jnthn japhb_: I'm not sure about "all of b"
22:00 jnthn japhb_: I know --gen-parrot existed well before nom
22:00 japhb_ k
22:00 japhb_ Well, I can just start working my way back from present, and see when the process fails.  :-)
22:02 dalek nqp: ffd25c9 | jnthn++ | src/QAST/Operations.nqp:
22:02 dalek nqp: Don't allocate result reg for void calls.
22:02 dalek nqp: review: https://github.com/perl6/nqp/commit/ffd25c9ac5
22:02 pmichaud iirc, --gen-parrot has existed since the rakudo/parrot repo split
22:02 japhb_ pmichaud, ah, cool, thank you.
22:02 jnthn pmichaud: ooh, that long? :)
22:03 * jnthn can believe it though
22:03 jnthn It'd make sense to have added it then
22:03 pmichaud jnthn: yes, I'm fairly sure that's when it was added.
22:03 pmichaud it's easy enough to find out... :-)
22:03 * pmichaud searches github
22:04 pmichaud https://github.com/rakudo/rakudo/blob/2009-02/Configure.pl
22:04 pmichaud line 12
22:04 jnthn ah, 115282 and 115284 are fixed by the same patch :)
22:05 pmichaud (LEGO Mindstorms)++
22:06 japhb_ Ah, 2009-02 is the earliest date-tagged Rakudo release, too, it looks like
22:06 jnthn r: say ([1, 2, 3] = 5)
22:06 p6eval rakudo 0937c7: OUTPUT«5␤»
22:06 jnthn r: say ([1, 2, 3] = 5).WHAT
22:06 p6eval rakudo 0937c7: OUTPUT«Int()␤»
22:06 pmichaud yes, Feb 2009 was the repo split
22:06 _edwin http://rosettacode.org/wiki/Continued_fraction#Perl_6
22:06 pmichaud prior versions of rakudo were still part of the parrot repo before that.
22:06 jnthn r: say ([1, 2, 3] = 5).VAR.name
22:06 p6eval rakudo 0937c7: OUTPUT«$x␤»
22:06 jnthn hmmmm :)
22:07 japhb_ pmichaud, Yeah, I'm going to see if I can parent volunteer for the classes.  :-)
22:07 pmichaud our Moonbots and FIRST LEGO League teams are hard at work, here.
22:07 jnthn pmichaud: The above issue is down to:
22:07 jnthn sub circumfix:<[ ]>(*@elems) is rw { my $x = @elems.eager }
22:08 jnthn pmichaud: Any suggested replacement? :)
22:08 pmichaud jnthn: checking.
22:09 japhb_ pmichaud, I think our team (4th grade) doesn't start until the spring here.
22:09 pmichaud jnthn: my best suggestion is to change $x to $anon
22:10 jnthn pmichaud: Well, the bug is that the scalar is assignable I think...
22:10 pmichaud I'm not sure that's a bug
22:10 popl joined #perl6
22:11 jnthn r: say ([1, 2, 3] = 5) # this... :)
22:11 p6eval rakudo 0937c7: OUTPUT«5␤»
22:11 jnthn OK
22:11 jnthn RT#115274, fwiw.
22:11 pmichaud yeah, I saw the ticket earlier in email.
22:11 pmichaud I've been trying to decide if it's really a bug or not.
22:11 * jnthn doesn't mind which way we go in it, tbh.
22:12 pmichaud I don't know what happens if we get rid of the 'is rw' there.
22:12 pmichaud then it would at least be readonly
22:12 pmichaud but it's pretty clear that  [...]  create a scalar array, and that one is allowed to assign anything to scalars.
22:12 pmichaud We *could* declare $x to be    my Array $x = @elems.eager
22:13 pmichaud then there would at least be a type mismatch.
22:13 japhb_ pmichaud, What languages are acceptable for Mindstorms programming for team play?
22:13 japhb_ pmichaud, that type mismatch matches my naive expectation, FWIW
22:13 japhb_ my Array $x = @elems.eager, I mean
22:13 benabik joined #perl6
22:13 pmichaud japhb_: depends on the contest.  For FLL, only NXT-G and Labview are accepted, iirc
22:13 japhb_ pmichaud, thank you
22:14 pmichaud limiting the choice of language helps level the playing field a fair bit
22:15 japhb_ pmichaud, Keeping really advanced programmers from doing stuff that isn't sanely doable with NXT-G and/or Labview?
22:15 diakopter there aren't compilers?
22:15 pmichaud oh, NXT-G and Robolab are the languages for FLL
22:15 pmichaud (just re-checked the rules)
22:15 japhb_ diakopter, if Wikipedia is to be believed, there are several compilers for C-like languages among others.
22:15 pmichaud diakopter: sure, there are lots of other languages for the mindstorms (more)
22:16 pmichaud but I think part of the challenge is figuring out how to solve problems within certain constraints
22:16 pmichaud (which is what many engineers actually have to do)
22:16 japhb_ Makes sense.
22:16 diakopter no I meant compilers to the allowed languages
22:17 japhb_ But then there's the Woz method: Separate the true constraints from the assumed constraints, and design to the former.  :-)
22:17 cognominal joined #perl6
22:17 pmichaud diakopter: the allowed languages are compilers... or I'm not understanding your question
22:17 japhb_ Isn't NXT-G a graphical programming environment?
22:18 jnthn pmichaud: I think diakopter means, writing the program in something else that is translated to one of the allowed languages.
22:18 pmichaud jnthn: oh, I suppose one could do that... although translating into a graphical programming language seems tough-ish.
22:18 jnthn pmichaud: Probably not quite in the spirit of things either ;)
22:18 pmichaud yes, NXT-G is graphical programming environment
22:19 pmichaud jnthn: well, my stepson has already used NXT-G to create his own interpreter so that he can write programs text-based instead of graphical.  :)
22:19 pmichaud that's within the rules, afaict
22:19 jnthn ooh :D
22:19 jnthn r: say (1/2).numerator
22:19 p6eval rakudo 0937c7: OUTPUT«1␤»
22:19 jnthn r: say (1/2).numerator.HOW
22:19 p6eval rakudo 0937c7: OUTPUT«Null PMC access in get_bool()␤  in attributes at src/stage2/gen/nqp-mo.pm:1151␤  in method perl at src/gen/CORE.setting:804␤  in method gist at src/gen/CORE.setting:798␤  in sub say at src/gen/CORE.setting:7268␤  in block  at /tmp/dwTPlD76aq:1␤␤»
22:19 jnthn ah...
22:19 pmichaud the only problem with the text-based interpreter approach is whether or not he'll be able to explain it properly to the judges so that they realize it's within the rules :)
22:20 japhb_ pmichaud, impressive!  How old is your stepson?
22:20 pmichaud japhb_: he turns eleven this week.
22:20 * japhb_ is doubly impressed.
22:20 dalek rakudo/nom: 726d2fa | jnthn++ | src/Perl6/Actions.pm:
22:20 dalek rakudo/nom: Fix empty statement in semilist handling.
22:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/726d2fafe5
22:21 japhb_ pmichaud, Oh, and happy birthday to him.  :-)
22:21 pmichaud japhb_: thanks, will let him know that.
22:22 pmichaud he's become quite an amazing programmer over the last year.
22:24 pmichaud He started down the interpreter path a few months ago, and I gave him a hint or two about ways to improve what he was doing, and he responded with "Oh!  That's like what you're doing when creating Perl 6."   o_O
22:24 jnthn :D
22:24 bruges joined #perl6
22:25 pmichaud phenny: tell TimToady   BTW, one of the girls on our LEGO robotics team really likes Camelia as the mascot.  :-)
22:25 phenny pmichaud: I'll pass that on when TimToady is around.
22:25 pmichaud (the Perl 6 mascot, that is)
22:27 * sorear wonders how much perl 6 influence/awareness there is in the lego teams
22:27 jnthn echo -e 'my \\a = any set <1 2 3>; \n say 1 ~~ a' | perl6
22:27 jnthn What does -e mean?
22:27 jnthn Is that \n literal or actually a newline?
22:28 pmichaud on my system, "man echo" says it enables backslash escapes
22:28 japhb_ Same here
22:28 jnthn On mine it actually echos the -e :P
22:28 pmichaud pmichaud@kiwi:~$ echo -e 'my \\a = any set <1 2 3>; \n say 1 ~~ a'
22:28 pmichaud my \a = any set <1 2 3>;  say 1 ~~ a
22:29 pmichaud ...and there's a newline after the semi that irssi chomped when I pasted.
22:29 jnthn pmichaud: Does it segv if you pipe it into Rakudo?
22:29 pmichaud I don't seem to have a built copy of rakudo handy.
22:29 pmichaud oh, wait, yes I do.
22:29 japhb_ jnthn, yes it does
22:30 pmichaud yes, it segfaults with 2012.09 for me.
22:30 japhb_ > my \a = any set <1 2 3>;
22:30 jnthn wat!
22:30 japhb_ any(1, 2, 3)
22:30 japhb_ >  say 1 ~~ a
22:30 japhb_ Segmentation fault
22:30 pmichaud I get what japhb_++ just posted
22:30 japhb_ (That's what I see after doing the pipe)
22:30 jnthn And without the \n it's fine? :S
22:30 japhb_ jnthn, yup, True
22:31 japhb_ (True is the response)
22:31 pmichaud yes, without the \n it's fine... but that's because it goes in as a single line instead of spread out across two input lines
22:31 jnthn oh...it's simulating the REPL...
22:31 pmichaud i.e., it becomes one REPL command instead of two.
22:31 japhb_ indeed
22:31 pmichaud I get the segfault if I enter the commands manually
22:31 jnthn yeah, I was putting it in a file but...seems it needs the REPL to trigger it.
22:32 pmichaud I suspect it has something to do with lexpads.
22:32 pmichaud or the REPL's handling of lexpads
22:32 jnthn yeah
22:32 pmichaud anyway, it's a REPL-related thing, doesn't appear to have anything to do with the pipe
22:32 jnthn That needs diddling at some point soonish anyway...
22:32 skids joined #perl6
22:33 jnthn ...given that once I get nqpattr killed, the thing it currently relies on will be the last thing left in src/cheats in NQP
22:33 jnthn (and thus the last .pir file, excluding src/stage0/
22:33 jnthn )
22:33 japhb_ yay!
22:34 dalek nqp: 5db85ab | jnthn++ | src/how/NQPClassHOW.pm:
22:34 dalek nqp: Add some default values.
22:34 dalek nqp:
22:34 dalek nqp: There's no NQPMu yet in the MOP classes, so we need to be careful about
22:34 dalek nqp: having these.
22:34 dalek nqp: review: https://github.com/perl6/nqp/commit/5db85ab871
22:34 Khisanth joined #perl6
22:35 dalek rakudo/nom: 7ddeceb | jnthn++ | tools/build/NQP_REVISION:
22:35 dalek rakudo/nom: Get NQP MOP .^attributes fix.
22:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7ddecebab0
22:36 * jnthn started sketching out JVM porting bits in recent days :)
22:39 japhb_ jnthn, if you have the mental space for it, a sketch of *abstract* porting requirements would be really valuable.  By which I mean, "things NQP and Rakudo need from an underlying VM of *any* sort".  Which would help a lot if, say, one wanted to write a VM specifically to run the Rakudo stack ....
22:49 jnthn Well, in many senses it's conveniences rather than absolute needs.
22:50 jnthn It's *nice* if you have coroutine support, but it's *possible* to do transformations to do it on a VM that doesn't provide it natively, for example.
22:50 bruges joined #perl6
22:50 japhb_ jnthn, Sure, but there is "convenience" and there's "without it we're falling back to Turing-completeness", and a big gray range between them.  :-)
22:51 jnthn japhb_: Yeah, true.
22:55 am0c joined #perl6
23:07 jnthn 'night o/
23:09 japhb_ o/
23:09 sorear o/
23:12 fridim_ joined #perl6
23:20 arlinius joined #perl6
23:40 supernovus joined #perl6
23:48 supernovus Not very exciting, but may be interesting to anyone planning to use Perl 6 for web applications: https://github.com/supernovus/web-benchmarks
23:51 benabik joined #perl6
23:55 japhb_ supernovus++ # Yay, benchmarks!
23:57 cognominal joined #perl6
23:58 supernovus I am planning to add a whole bunch more, and upping the number of requests per test from 25 to say 100.

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

Perl 6 | Reference Documentation | Rakudo