Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-01-09

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 sena_kun How can I dereference Pointer using NativeCall(for tests)?
00:01 gfldex m: my $s = '42'; put Q:s:b{\$s}
00:01 camelia rakudo-moar d7f3f0: OUTPUT«\42␤»
00:01 gfldex shouldn't the \ vanish?
00:01 skids joined #perl6
00:02 regreg joined #perl6
00:02 hankache joined #perl6
00:03 gfldex and stop $s from being interpolated on top of that
00:03 RabidGravy profan, I think, without looking at the code, that it always follows redirects, but yeah it probably needs some "redirect-ok" callback.  I have a plan for adding some phase callbacks to influence the way the requests and responses are handled
00:05 profan RabidGravy: sounds good :), i'll let you know if anything else comes up or things go out of wack
00:07 RabidGravy If you really, really don't want redirects then you can just set max-redirects to 0, of course it will crap out but the exception will have the response in it ;-)
00:09 sortiz Hi, While setting PERL6LIB=/some/path works, if I use the switch "-I /some/path" rakudo ignores me, someone has an idea why?
00:12 wamba joined #perl6
00:12 gfldex m: my $s = '42'; put Q:q:s{\$s}
00:12 camelia rakudo-moar d7f3f0: OUTPUT«\$s␤»
00:13 timotimo hmm. i'd always write it -I/some/path, but that may not be a/the reason
00:13 flussence -I doesn't get passed to subprocesses... and doesn't precomp use those?
00:13 Skarsnik sena_kun, depend, etheir nativecast of you type your pointer and use .deref on it, if you just want the address, I think .Int or .gist show you
00:13 Skarsnik -I path work
00:16 sortiz timotimo: Thanks but with or without space I see the same results: "Could not find Foo" at Module use time :(
00:16 sena_kun Skarsnik, I have a pointer to integer with errcode(from C library) and want to compare it with zero(for example). I'll try .deref then.
00:17 BenGoldberg joined #perl6
00:18 bpmedley joined #perl6
00:20 AlexDaniel what about “Perl 6 takes off, Perl 5 has enough developers to improve and maintain it for the next 10 years” scenario? Why isn't it an option?
00:20 AlexDaniel (http://www.dagolden.com/index.php/2589/perl-5-and-perl-6-are-mortal-enemies/)
00:20 gfldex m: my $s = '42'; put Q:qq{\$s$s {$s}}, ' ', Q:s:a:h:f:c:b{\s$s {$s}}
00:20 camelia rakudo-moar d7f3f0: OUTPUT«$s42 {42} \s42 {42}␤»
00:21 stmuk__ I can't see any probs with the RC0 R*
00:21 Skarsnik Good night #perl6
00:21 AlexDaniel it would be weird to assume that perl 5 developers would just abandon the ship immediately. Sure they may have less interest, but as far as I can see Perl 5 is still going strong and it does not look like it will change any time soon
00:24 stmuk__ I don't think anyone can guess how computer langs get adopted or abandoned (if they are ever abandoned which I doubt)
00:24 gfldex .u $
00:24 yoleaux U+0024 DOLLAR SIGN [Sc] ($)
00:26 gfldex m: my $s = '42'; put Q:s:b{\c[DOLLAR SIGN]s$s$s}
00:26 camelia rakudo-moar d7f3f0: OUTPUT«$s4242␤»
00:26 RabidGravy is there any way that one can gain control of the way that multi candidates are selected programmatically, (without rewriting the language)?
00:26 AlexDaniel stmuk__: let's use it as a secure random number generator!
00:27 leont joined #perl6
00:27 timotimo sortiz: did you try that environment variable that turns on module loading debugging?
00:27 timotimo sortiz: or try printing the repo chain?
00:27 stmuk__ people still use LISP and Fortran afterall (I've even seen the latter in jobs and, horror of all horrors csh)
00:28 hankache we still have COBOL people at work
00:29 hankache and AS400 machines
00:30 profan * "Run To The Hills" starts playing in the background *
00:31 RabidGravy as/400 is a rather nice platform
00:31 timotimo excuse my ignorance, but what do i turn "int" from a C header into with NativeCall?
00:31 stmuk__ I bet people use VMS still even
00:32 RabidGravy timotimo, probably int32
00:32 hankache timotimo int32 ?
00:32 sena_kun timotimo, int32.
00:32 timotimo oh? well, all right
00:33 flussence you wouldn't think it on x64, but apparently that's it in all cases...
00:34 sena_kun I have a native function that returns void. Obviously, I don't return anything in perl code also. But I've got "Native call expected return type with CPointer representation, but got a VMArray" message. From where should I start?
00:34 profan flussence: only long does the switcheroo there
00:34 RabidGravy if you're unsure it's just compile a little C program that prints sizeof(foo)
00:36 RabidGravy sena_kun, is that "void" or "void *" if the former just omit any retuns thing
00:37 * timotimo fixes up SDL2::Raw as well as Cairo
00:37 RabidGravy timotimo++
00:38 sena_kun RabidGravy, it's plain "void". Signature in perl6 code doesn't have any "returns". Should I made a pastebin page with code to show example?
00:38 RabidGravy yeah I think so, that seems odd
00:38 timotimo i'm not sure what exact version i should supply ...
00:39 sena_kun RabidGravy, just a second...
00:39 timotimo tell me, what did .first-index turn into again?
00:39 flussence .first(:k)
00:39 flussence iirc
00:39 timotimo thx
00:39 flussence m: say 'foo'.first('o', :k)
00:39 camelia rakudo-moar d7f3f0: OUTPUT«Nil␤»
00:39 flussence m: say 'foo'.first('o', :v)
00:39 camelia rakudo-moar d7f3f0: OUTPUT«Nil␤»
00:39 flussence m: say 'foo'.first('o')
00:39 camelia rakudo-moar d7f3f0: OUTPUT«Nil␤»
00:40 sortiz Where in $*REPO.repo-chain list can I look for the -I switch effects ?
00:40 flussence m: say 'foo'.comb.first('o', :k) # I'm dumb...
00:40 camelia rakudo-moar d7f3f0: OUTPUT«1␤»
00:40 RabidGravy timotimo, most linux make links for 1, 1.0, 1.0.4, 1.0.4.uncletomcobbleyandall
00:41 joydo joined #perl6
00:41 timotimo hm
00:41 flussence .oO( wonder if it'd be worthwhile to detect list methods called on scalar literals and emit a warning... )
00:41 timotimo there's libSDL2-2.0.so.0.2.1 here
00:41 timotimo how the ...
00:41 timotimo is that considered normal?
00:42 flussence libSDL has a ... fun numbering scheme
00:42 timotimo how does that map to what i supply to nativecall's "native" thread?
00:42 stmuk__ graphics and video libraries are always a total PITA
00:42 sena_kun RabidGravy, http://pastebin.com/47tDwiwc - here is the link.
00:43 flussence ‘SDL2-2.0’ is the name and everything after ‘.so.’ is the version
00:43 flussence fwiw I have a libSDL-1.2.so.0.11.4 here too...
00:43 timotimo well, that's libSDL1
00:43 timotimo i'm building a libSDL2 binding here
00:43 flussence same crazy libname scheme though :)
00:44 sortiz With PERL6LIB set, a 'file#/some/path' appears in repo-chain head, but with -I/some/path, nothing changes.
00:45 stmuk__ that's probably SDL 1.2.11 (?)
00:45 flussence stmuk__: mine is, yeah
00:46 RabidGravy sena_kun, I'd say the Pointer[void] there wants to be a CArray instance with as many elements as the len argument
00:46 flussence sortiz: you might get something useful out of RAKUDO_MODULE_DEBUG=1
00:46 stmuk__ I had to build 1.2.15 from source recently and it doesn't even compile without a patch from a mailing list
00:46 RabidGravy so CArray rather than Pointer[void]
00:47 sena_kun RabidGravy, and I should remove last int then?
00:47 flussence oh hang on, distro says this is 1.2.15-r9
00:47 RabidGravy no, you need the last int, but CArrays don't know their own own length
00:49 RabidGravy so "my $a = CArray[uint8].new; $a[$len] = 0;" for example
00:49 stmuk__ distro libraries are often early versions with patches backported from later versions
00:49 sena_kun RabidGravy, I'll try it now, thanks.
00:52 timotimo okay, the two modules are up to date. except i decided against putting a version into the libsdl2 thingie
00:52 timotimo so that i don't go insane
00:56 profan hows the state of the JVM backend by the way?
00:57 profan if anyone knows anything that is :)
00:58 TimToady it was back-burnered a couple of months while we got 6.c out the door, but I expect various champions will step up to bring it up to snuff over the next few months
00:58 profan ah, i figured it hasn't been a focus lately :) appreciate the info TimToady++
00:58 RabidGravy TimToady++ expressed it better, I was going to say it needed some love
00:59 sena_kun RabidGravy, it fails anyway. I think I should make a short example of my code for someone free to try it. I'm trying to write a bzip2 bindings btw.
00:59 zwu Hi, I didn't find the doc about the type modifier especially for the class method, such as class A { method foo(::A:D:) {}; }
01:00 RabidGravy sena_kun, it's a bit late here now but if you stick it on github or something I'll take a look tomorrow or so
01:01 sortiz Folks: "perl6 -I /some/path -e '...'" works, but not in REPL mode!
01:02 zwu how can we put the type modifier to the Role method too?
01:03 sena_kun RabidGravy, it's already 3 a.m. here, so I'm done with hacking too. Okay, I'll make a quick reproducible gist and paste link to you.
01:04 RabidGravy sure
01:04 RabidGravy just .tell yoleaux and it will remind me :)
01:04 RabidGravy toodles folks
01:13 jack_rabbit_ joined #perl6
01:33 mike1 joined #perl6
01:36 mike1 left #perl6
01:42 xpen joined #perl6
01:49 zwu question on module and import. I created a module file under directory p/m/testm.pm6, in which module A { sub foo() { say "hello"}, class MyClass {...} },
01:49 zwu in the test code, I can load through need p::m::testm; and import A;
01:50 zwu I can use the class through A::MyClass, and use function foo defined in A, but not A::foo;
01:51 zwu the sub foo is exported through the trait is export for foo
01:51 skids Maybe try "our sub foo()" ?
01:52 zwu but I didn't export MyClass in module A,
01:52 skids classes may have different default behavior?
01:52 zwu ah, is that our, my ... for the scope related issue?
01:53 skids Yes "our" is a scoping thing like "my"
01:55 zwu yes, using our scope for the sub, I can use A::foo even it is not exported.
01:56 skids Yay! I approximately knew what I was talking about :-)
01:57 zwu so what I understand is that the import actually put the symbols into current lexical scope without the prefixes of the package scopes.
01:57 skids Yes import is for moving symbols from one Stash to the current Stash.
02:00 zwu another question, since class is default in our scope, that means when a module is loaded, all classed defined in that module file are actually accessible through full package name?
02:01 zwu that makes the export for class almost useless,
02:01 zwu and hard to protect the usage for the non exported classes?
02:02 protium joined #perl6
02:03 molaf_ joined #perl6
02:04 zwu and the difference for export sub routing is because the subs are defined in defined my scope instead of our scope, so the is export trait helps to export the symbol, but when you import them, only the symbol name is imported into current lexical scope,
02:05 zwu if there are multiple module export the same names, there are more chances of collisions than just use our scope for the subs.
02:08 glucosade joined #perl6
02:15 dalek doc: 9da18b2 | skids++ | doc/Type/Stash.pod:
02:15 dalek doc: Verbiage tweaks
02:15 dalek doc: review: https://github.com/perl6/doc/commit/9da18b2183
02:15 kid51_ joined #perl6
02:16 skids zwu: you can "my" a class
02:16 cognominal joined #perl6
02:19 kid51 joined #perl6
02:22 sortiz ls
02:28 Guest19685 joined #perl6
02:28 Guest19685 Yesss there's a perl6 channel
02:29 linuxuser9000 What's up perly-perlers
02:29 TimToady not most of the Eurofolk :)
02:29 skids o/
02:34 linuxuser9000 I'm so sick of people dissing perl. So I decided to go where other perl lovers are
02:34 linuxuser9000 Have you guys seen the reverse polish example on the perl6 website? I think it's amazing: http://examples.perl6.org/categories/interpreters/RPN.html
02:34 sortiz linuxuser9000: You are welcome!
02:35 linuxuser9000 Also, the quicksort implementation on wikipedia is so nice looking: https://en.wikipedia.org/wiki/Perl_6#Quicksort
02:37 zwu I remembered someone has said that use module is not any more just as the combine of need and import;  is the use the same thing as the need just for loading?
02:37 linuxuser9000 joined #perl6
02:38 linuxuser9000 Ugh, accidentally disconnected myself -_-
02:39 linuxuser9000 I have a question. I used the socket.io library for node.js, but the library is really two parts, front end and back. Is there a module for perl that gives the features of socket.io? (socket.io lets you recieve and emit events; the events have a string key, and you can send anything with the event: json, functions, whatever. it's sockets)
02:41 zwu How to make the dynamic module loading by require to load the module specified by a file path, i.e, do not need to search the lib path
02:43 linuxuser9000 This example for sockets looks cool: http://poe.perl.org/?POE_Cookbook/Chat_Server
02:50 timotimo http://doc.perl6.org/type/IO::Socket::Async - check this for some asynchronous chat server/client stuff
02:50 timotimo extremely basic, but a good start point, IMO
02:51 timotimo making a socket.io compatible module would be implementing whatever protocol they've created and speaking that via TCP or whatever it is that they use
02:57 skids zwu: Loading is still a bit unpolished.  For now you are better off using PERL6LIB= than trying to get absolute-path loading to work right.
02:58 skids (Or "use lib '/path/to'; use Mymod")
03:00 zwu I'm designing a build system for dependency management on C++,  trying to using perl 6, I need to load a configuration or even just the perl script it self for each projects.
03:01 zwu Dynamic load a script will make it convenient, instead of having to load it as string and then import? by the way how can we load to a string and then import it?
03:02 jdrab_ joined #perl6
03:04 ugexe zwu: assuming you have a interfaced defined so you know what they will provide you can do something like this https://github.com/ugexe/zef/blob/master/lib/Zef/Fetch.pm6#L20-L26
03:04 ugexe that loads plugin modules and passes them options from a config file
03:05 zwu ugexe: thanks a lot!
03:05 bakedb_ joined #perl6
03:07 livyathan joined #perl6
03:10 mr-foobar joined #perl6
03:14 keix joined #perl6
03:20 zwu I saw the doc S11.pdf that it said Alternately, a filename may be mentioned directly, as require "/home/non/Sense.pm" <common @horse>;.
03:20 zwu that's great, it already support the dynamic import on any file path without searching.
03:22 jervo joined #perl6
03:22 Khisanth joined #perl6
03:22 apejens joined #perl6
03:22 jojotus joined #perl6
03:22 Util joined #perl6
03:22 cbk__ joined #perl6
03:22 musca joined #perl6
03:22 jast joined #perl6
03:22 pjcj joined #perl6
03:22 mspo joined #perl6
03:22 larion_ joined #perl6
03:22 dj_goku joined #perl6
03:22 ranguard joined #perl6
03:22 literal joined #perl6
03:22 krakan joined #perl6
03:22 samb1 joined #perl6
03:22 jantore_ joined #perl6
03:22 skaji joined #perl6
03:22 d^_^b joined #perl6
03:22 garu joined #perl6
03:22 cfloare joined #perl6
03:22 bowtie joined #perl6
03:22 avar joined #perl6
03:22 troydm joined #perl6
03:25 wtw joined #perl6
03:25 crux joined #perl6
03:25 ugexe true. it will load slower though as it wont be precompiled which may or may not matter to you
03:26 zemmihates joined #perl6
03:26 corbyhaas joined #perl6
03:27 deepika joined #perl6
03:30 noganex joined #perl6
03:31 zwu oh, seems the require does not work, i changed "need some_module;" to require 'full_path file.pm6' or require some_module:('full_path.pm6').
03:32 zwu it is best that require can also use a precompiled file like the import in python for the performance issue, also it is good if it support data files too, such as json, image etc resource files.
03:34 ugexe using a path works
03:35 zwu I may have to explicit import the symbols, looks like the error is the compiling;
03:35 ugexe and require will use a precompiled module but if you give it a .pm6 file instead of a name it will use the .pm6 code
03:36 zwu can I just use the fullpath except the extension?
03:37 ugexe no
03:38 ugexe if your plugins follow normal perl naming convention you can determine the file path from the name, and pass the beginning part of it via -I or PERL6LIB or use lib
03:39 ugexe so My::Plugin in /home/projectX/Plugins/lib/My/Plugin.pm6; -> -I/home/projectX/Plugins/lib -e 'require My::Plugin;'
03:39 ugexe then it will precompile the code and use that the next time
03:40 sortiz Btw, earlier I found that -I don't seems to work in rakudo REPL.
03:40 ugexe nope
03:40 sortiz Why?
03:41 ugexe in REPL do `use lib 'xxx'`
03:41 ugexe id guess it happens too late
03:41 ugexe i dont think its on purpose, just a known bug
03:41 sortiz Yes, that and PERL6LIB works, but take me hours!
03:43 zwu it think your plugin is still using the searching path, since I know already the location, it is better to load without searching in case name collisions.
03:44 ugexe but searching can find the precompiled code. and it doesnt really do much searching... it just breaks the name into path parts
03:44 timotimo don't forget that importation (that is, making symbols available to the lexical environment) can only work if you're running the importation at compile time, as lexical symbols are fixed after compile time.
03:44 zwu I changed from the need to require the file, the output is "Could not find symbol", while using need is fine.
03:45 timotimo yeah, need is compile-time, require is run-time
03:45 timotimo but you can pass a list of symbols you expect to get from the module after the require
03:45 timotimo require Foo::Bar, <&a-sub $some-var>
03:47 zwu I tried to use: require 'full_path.pm6' < module_name::Class_name>, or just: require 'full_path.pm6' <Class_name>,
03:47 timotimo i don't have much experience with the whole importation business, sadly
03:49 ugexe you can also do my `require whatever; my $class = ::("Class_name").new; $class.some-method`
03:49 ugexe s/my//
03:49 linuxuser9000 I'm reading the documentation for https://metacpan.org/pod/DBIx::Class, and it seems neat. I've never used a database abstraction layer; I always use wrappers that let me just send SQL queries to mySQL. I feel like I shouldn't use my time to learn a wrapper, but I have to ask, what are your guys' opinions on DB wrappers like DBIx::Class?
03:50 timotimo SQLAlchemy from python is really awesome
03:50 ugexe ORMs are something you love or hate
03:51 zwu in a module file: module A { sub foo is default { say "foo" }}; in a script, I use 'require 'file_path.pm6' <&foo>"; foo; " the output is "trying to import symbols &foo from ..., but it doesn't export anything in block <unit> ...
03:51 timotimo you mean "is export", right?
03:52 timotimo anyway, i've got to go to sleep
03:52 zwu yes, "is export"
03:52 timotimo good night everyone!
03:52 timotimo maybe try "our sub foo is export"?
03:52 timotimo o/
03:52 zwu it is actually our sub foo in my test code.
03:52 zwu same error.
03:53 sortiz Good night timotimo.
03:53 zwu Good night timotimo
03:56 linuxuser9000 @ugexe: So it isn't "bad practice" if I prefer to stick to modules/packages that simply let me send queries and read results?
03:56 linuxuser9000 I ask because I'm an amateur. I only have 2 years of experience as a programmer
03:57 awwaiid linuxuser9000: the path to ORM usually starts when you are dynamically generating the queries, in my experience
03:58 awwaiid linuxuser9000: then you might find yourself concatenating strings, and then building tools to do that, and then encapsalating the results into domain objects, and then adding more dynamic to infer relationships, and then you built an ORM
03:58 ugexe im a barely functioning sql person myself. but the series people either like ORMs or they like stored procedures
03:58 awwaiid linuxuser9000: er, concatenating strings containing SQL queries, that is
03:59 noganex_ joined #perl6
04:08 sortiz zmu: Found that in rakudo much of import is NYI, see: https://github.com/perl6/roast/blob/master/S11-modules/require.t#L22-L34
04:09 Herby_ joined #perl6
04:09 Herby_ Evening, everyone!
04:15 zwu Thanks. What is NYI?
04:17 geekosaur "not yet impleented"
04:17 geekosaur *implemented
04:17 zwu ah, thanks!
04:18 zwu have these assigned? i'd like to contribute but  I just started to explore perl 6.
04:29 zwu good night!
04:35 Juerd Weird bug: "Cannot find method 'map': no method cache and no .^find_method"
04:36 Juerd m: my $year = 2016; .say for (Date.new("$year-01-01") .. Date.new("$year-12-31")).grep(*.day-of-week == 5) . classify(*.month).map(*.value.tail).sort;
04:36 camelia rakudo-moar d7f3f0: OUTPUT«Cannot find method 'map': no method cache and no .^find_method␤  in block <unit> at /tmp/CHFa2xkFdL line 1␤␤»
04:36 Juerd Without sort it works:
04:36 Juerd m: my $year = 2016; .say for (Date.new("$year-01-01") .. Date.new("$year-12-31")).grep(*.day-of-week == 5) . classify(*.month).map(*.value.tail);
04:36 camelia rakudo-moar d7f3f0: OUTPUT«(2016-05-27)␤(2016-12-30)␤(2016-09-30)␤(2016-07-29)␤(2016-11-25)␤(2016-08-26)␤(2016-04-29)␤(2016-03-25)␤(2016-06-24)␤(2016-01-29)␤(2016-10-28)␤(2016-02-26)␤»
04:36 Juerd Am I doing something weird or is this a bug?
04:44 dalek doc: f86c26d | skids++ | doc/Language/list.pod:
04:44 dalek doc: Second pass at list-centric page
04:44 dalek doc: review: https://github.com/perl6/doc/commit/f86c26da41
04:46 Herby_ wish I could help you Juerd but I don't have a strong grasp on the language yet
04:48 Juerd I'm off to bed. Maybe when I wake up someone knows the answer :)
04:49 Juerd Good night!
04:51 Herby_ night!
04:53 Herby_ m: $a = "hello"; my @count = $a ~~ / <[aeiou]> :g/; say @count.elems
04:53 camelia rakudo-moar d7f3f0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ZzNEiz1nb_␤Variable '$a' is not declared␤at /tmp/ZzNEiz1nb_:1␤------> 3<BOL>7⏏5$a = "hello"; my @count = $a ~~ / <[aeio␤»
04:53 Herby_ m: $a = "hello"; my @count = $a ~~ / <[aeiou]>/:g ; say @count.elems
04:53 camelia rakudo-moar d7f3f0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BRyPke4QEa␤Variable '$a' is not declared␤at /tmp/BRyPke4QEa:1␤------> 3<BOL>7⏏5$a = "hello"; my @count = $a ~~ / <[aeio␤»
04:53 Herby_ how would I go about counting the number of vowels in a string?
04:53 Herby_ m: my $a = "hello"; my @count = $a ~~ / <[aeiou]>/:g ; say @count.elems
04:53 camelia rakudo-moar d7f3f0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oScpY8_t5N␤You can't adverb ␤at /tmp/oScpY8_t5N:1␤------> 3hello"; my @count = $a ~~ / <[aeiou]>/:g7⏏5 ; say @count.elems␤    expecting any of:␤        pair value␤»
04:55 skids m: my $a = "hello"; my @count = $a ~~ m:g/ <[aeiou]>/ ; say @count.elems
04:55 camelia rakudo-moar d7f3f0: OUTPUT«2␤»
04:55 Herby_ m: my $a = "hello"; my @count = $a ~~ m:g / <[aeiou]> / ; say @count.elems
04:55 camelia rakudo-moar d7f3f0: OUTPUT«2␤»
04:55 ugexe also $string.comb(/a|e|i|o|u/).elems
04:56 Herby_ m: my $string = "hello world"; $string.comb(/a|e|i|o|u/).elems.say;
04:56 camelia rakudo-moar d7f3f0: OUTPUT«3␤»
04:56 Herby_ sweet, thanks
04:57 Herby_ m: my $a = "hello 123"; my @count = $a ~~ m:g / <[aeiou]> <[1..4]> / ; say @count.elems
04:57 camelia rakudo-moar d7f3f0: OUTPUT«0␤»
04:57 Herby_ m: my $a = "hello 123"; my @count = $a ~~ m:g / <[aeiou]> | <[1..4]> / ; say @count.elems
04:57 camelia rakudo-moar d7f3f0: OUTPUT«5␤»
04:58 Juerd Hey, "E" and "é" are vowels too!
04:58 Herby_ :)
04:59 Herby_ m: my $a = "HELLO"; my @count = $a ~~ m:g / <[aeiou]> | <[1..4]> / ; say @count.elems
04:59 camelia rakudo-moar d7f3f0: OUTPUT«0␤»
04:59 Herby_ m: my $a = "HELLO"; my @count = $a ~~ m:g:i / <[aeiou]> | <[1..4]> / ; say @count.elems
04:59 camelia rakudo-moar d7f3f0: OUTPUT«2␤»
04:59 bpmedley joined #perl6
05:00 ugexe m: my $string = "hEllo"; say $string.comb(/[:i a|e|i|o|u]/).elems
05:00 camelia rakudo-moar d7f3f0: OUTPUT«2␤»
05:01 Herby_ m: my $string = "count words in string"; $string.comb(/ ' ' /).elems.say;
05:01 camelia rakudo-moar d7f3f0: OUTPUT«3␤»
05:01 bpmedley joined #perl6
05:01 ugexe m: my $string = "one two three"; say $string.words.elems
05:01 camelia rakudo-moar d7f3f0: OUTPUT«3␤»
05:02 Juerd m: "hElló".comb(/:i :m [a|e|i|o|u]/).elems.say
05:02 camelia rakudo-moar d7f3f0: OUTPUT«2␤»
05:02 Juerd m: "hElló".comb(/:i :m <[aeiou]>/).elems.say  # bug
05:02 camelia rakudo-moar d7f3f0: OUTPUT«===SORRY!===␤chr codepoint cannot be negative␤»
05:02 Juerd (rakudobugged)
05:03 Herby_ ugexe, that is pretty slick
05:03 Juerd Okay, going to sleep for real now :)
05:03 Herby_ night!
05:04 pjscott joined #perl6
05:04 Herby_ m: "here is another string \n test".words.elems.say
05:04 camelia rakudo-moar d7f3f0: OUTPUT«5␤»
05:05 ugexe m: "here is another string \n test".lines.elems.say
05:05 camelia rakudo-moar d7f3f0: OUTPUT«2␤»
05:06 Herby_ m: "here is a test \n".lines.elems.say
05:06 camelia rakudo-moar d7f3f0: OUTPUT«1␤»
05:13 joydo joined #perl6
05:16 pjscott joined #perl6
05:19 pierrot joined #perl6
05:30 aindilis joined #perl6
05:33 pjscott joined #perl6
05:37 Cabanossi joined #perl6
05:43 agentzh joined #perl6
05:43 agentzh joined #perl6
05:44 agentzh joined #perl6
05:44 agentzh joined #perl6
05:44 bjz joined #perl6
05:45 awwaiid Now I have this working: use Inline::Ruby::Sweet; use csv:from<Ruby>; say ~CSV.parse("demo.csv")[1][1] #=> Andy
05:45 agentzh joined #perl6
05:45 agentzh joined #perl6
05:46 agentzh joined #perl6
05:46 agentzh joined #perl6
05:49 skids awwaiid++
05:49 yurivish joined #perl6
05:50 awwaiid it looks a bit funny though if you get a ruby-JSON object and then do like $data[0]["children"][1]["depth"] :)
05:51 awwaiid [] gets passed into ruby as method invocation, so that is like $data.send("[]", 0).send("[]","children")...
05:57 awwaiid I wish I could specify the branch in ecosystem -- I want to make the "develop" branch the default on my libraries, and "master" to be what is released. But I think panda pulls from the default branch
05:58 ugexe panda pulls from whatever source-url links to
05:58 awwaiid I tried embedding a branch in there a while back and it didn't work. Yeah... I should try again
05:59 awwaiid or maybe I should just leave master default and give instructions to would-be contributors to PR against something else. hmmm.
05:59 awwaiid so many choices!
05:59 awwaiid time for bed :)
06:16 jameslen_ joined #perl6
06:20 adhoc joined #perl6
06:35 Zoffix joined #perl6
06:35 pjscott joined #perl6
06:40 CIAvash joined #perl6
06:52 skids m: my int $x; $x = Nil;
06:52 camelia rakudo-moar d7f3f0: OUTPUT«Cannot unbox a type object␤  in block <unit> at /tmp/kuKiLJejXe line 1␤␤»
06:53 * skids wonders why it was decided that Nil does not assign the default value of the native type.
07:02 DrForr .tell jnthn Inconistency that probably is out of scope for Grammar::{Debugger,Tracer} - once the TOP rule has matched, if there is more text to be matched by the parse('foo') method it's not reported, so Grammar::Tracer could conceivably report a MATCH when the parse() still fails.
07:02 yoleaux DrForr: I'll pass your message to jnthn.
07:10 Tonik joined #perl6
07:18 abraxxa joined #perl6
07:19 Quom__ skids: I doubt decided — native types are known to be troublesome… :9
07:27 uruwi joined #perl6
07:36 abraxxa joined #perl6
07:41 jeek joined #perl6
07:51 schnuppi joined #perl6
07:53 leat joined #perl6
07:55 daotoad joined #perl6
07:57 daotoad Anyone have any thoughts on free and/or cheap Perl6 web app hosting?
07:58 daotoad I looked at heroku, but the buildpack is horribly out of date.https://github.com/pnu/heroku-buildpack-rakudo
07:58 DrForr Linode or AWS and roll your own?
07:58 DrForr There's a Docker buid.
07:58 DrForr *build
08:01 kaare_ joined #perl6
08:15 daotoad joined #perl6
08:15 bpetering joined #perl6
08:17 bpetering .tell Juerd I'm going through /^F/, skip to /^G/ please :)
08:17 yoleaux bpetering: I'll pass your message to Juerd.
08:17 wamba joined #perl6
08:19 rindolf joined #perl6
08:23 darutoko joined #perl6
08:25 CIAvash joined #perl6
08:47 spider-mario joined #perl6
08:50 obra left #perl6
08:50 dalek doc: 2b3c920 | skids++ | doc/Type/Nil.pod:
08:50 dalek doc: Bring page on Nil into sync with post-GLR reality.
08:50 dalek doc: review: https://github.com/perl6/doc/commit/2b3c920ae9
08:54 DrForr Is it just me, or is s/// not documented in the regex page? Or anywhere really, for that matter?
08:55 DrForr (ignoring the synopses/apocalypses, because someone coming in from outside won't know about those...)
08:56 skids Well, it is in 5to6 pages.  But... well vounteered! :-)
08:57 * skids goes to sleep off his cold.
09:09 citizenX joined #perl6
09:10 llfourn joined #perl6
09:12 lnrdo joined #perl6
09:13 hankache joined #perl6
09:17 hankache good morning everyone
09:20 sno joined #perl6
09:30 Ch0c0late joined #perl6
09:30 masak good antenoon, #perl6
09:33 hankache hi masak
09:34 vendethiel joined #perl6
09:35 DrForr m: my $x="foo\nbar"; $x~~s:g/\n/\c[2424]/; say $x
09:35 camelia rakudo-moar d7f3f0: OUTPUT«fooॸbar␤»
09:36 DrForr Oh, wait, what's 2424 in hex...
09:37 DrForr Ah, that's it.
09:43 virtualsue joined #perl6
09:43 DrForr Well, feel free to mock #127220 roundly as you see fit in that case. RT doesn't allow me to see the ticket so I can't comment on it.
09:47 pnu daotoad: you can "echo 2015.12.152.gd.7.f.3.f.0.b >.rakudo-version" (and commit that to git) to get the latest version. I have daily automated builds but the "latest" version is updated only when spectests pass.. so latest "latest" is 2015.11.100.g.1.ae.6805 at the moment.
09:48 [Tux] csv-ip5xs        50000    18.278    18.166
09:48 [Tux] test             50000    24.503    24.390
09:48 [Tux] test-t           50000    12.645    12.533
09:48 [Tux] csv-parser       50000    50.714    50.602
09:49 _nadim joined #perl6
09:51 pnu daotoad: However, I'm updating and integrating the perl6 support to my heroku-buildpack-perl. Just having some trouble with relocatable bins, to get it cleanly done. After that is done, a separate rakudo buidpack is not needed.
09:54 keix joined #perl6
09:54 hankache how can i make tests stop if one of them fail ?
09:54 hankache i have 3 tests and if number 2 fails, i do not want to run number 3
09:55 pnu daotoad: err.. "latest" is updated when spectest *and* task::star installation pass (https://github.com/pnu/heroku-buildpack-rakudo/blob/master/support/rakudo-build.sh#L77)
09:55 nine .tell awwaiid nice blog post! Actually...I do recommend to people to use Perl 5's Inline::Python even for critical production code. I can recommend this in good concience because that's what we do.
09:55 yoleaux nine: I'll pass your message to awwaiid.
09:57 daotoad joined #perl6
09:58 keix joined #perl6
10:05 vendethiel joined #perl6
10:08 RabidGravy joined #perl6
10:09 abcxyz joined #perl6
10:11 RabidGravy morning
10:11 yoleaux 01:13Z <sena_kun> RabidGravy: https://gist.github.com/Altai-man/d2fb78521fe2eb62ae73 from sena_kun.
10:14 FROGGS_ joined #perl6
10:17 daotoad joined #perl6
10:18 leat joined #perl6
10:31 fdsfdsfds joined #perl6
10:32 fdsfdsfds hi, how can I log  in Perl6? By log I mean writing stuff to a file for debugging
10:32 fdsfdsfds not authenticating
10:32 fdsfdsfds I haven't found any module
10:33 Quom__ http://modules.perl6.org/#q=log
10:34 Quom__ Though I haven't used any of these myself
10:34 * masak .oO( lmmpotfy )
10:36 fdsfdsfds thanks
10:37 Quom__ np :)
10:37 hankache how can i stop testing when one of the tests fail?
10:43 fdsfdsfds joined #perl6
10:43 fdsfdsfds could you tell me where I can find an instruction of how to submit my own perl 6 module to http://modules.perl6.org/ ?
10:44 RabidGravy hankache, there's a die-on-fail in Test but it doesn't seem to be exporter
10:45 DrForr fdsfdsfds: There's a link on the front page, see 'this guide'.
10:45 RabidGravy fdsfdsfds, see http://doc.perl6.org/language/modules
10:45 fdsfdsfds tnx
10:47 RabidGravy .tell sena_kun I added a working example to your gist, it doesn't fail but I don't have the bzip2 dev packages to check it is doing the right thing
10:47 yoleaux RabidGravy: I'll pass your message to sena_kun.
10:49 dalek doc: a17ff0d | (Siavash Askari Nasr)++ | doc/Language/unicode_entry.pod:
10:49 dalek doc: Mention TeX input method for entering unicode characters in Emacs
10:49 dalek doc: review: https://github.com/perl6/doc/commit/a17ff0d66d
10:49 dalek doc: 176bf8a | (Siavash Askari Nasr)++ | doc/Language/unicode_entry.pod:
10:49 dalek doc: Merge pull request #333 from CIAvash/unicode_entry_emacs_tex_input_method
10:49 dalek doc:
10:49 dalek doc: Mention TeX input method for entering unicode characters in Emacs
10:49 dalek doc: review: https://github.com/perl6/doc/commit/176bf8a6fa
10:55 citizenX joined #perl6
10:56 spider-mario joined #perl6
11:01 domidumont joined #perl6
11:01 dalek roast: c435912 | lizmat++ | S02-types/int-uint.t:
11:01 dalek roast: Fix test, fix indenting, Juerd++
11:01 dalek roast: review: https://github.com/perl6/roast/commit/c435912c84
11:03 ely-se joined #perl6
11:04 sena_kun joined #perl6
11:06 domidumont joined #perl6
11:07 bartolin_ hi, #perl6 -- and belated congrats for the 6.c release!
11:07 * bartolin_ was away for a while
11:08 nine Hi bartolin_!
11:08 moritz welcome back bartolin_
11:09 bartolin_ \o/
11:09 RabidGravy rarr!
11:10 bartolin_ it looks like the recent nqp bump broke the build for nqp-j: https://gist.github.com/usev6/057d64b0fc9b3c830c2f
11:10 bartolin_ the culprint seems to be nqp commit 4b1236e535
11:13 lizmat that's probably because JVM doesn't have readlinechompfh  yet ?
11:14 funrep just read perl6intro, is there any tutorial that follows you how to build a program of sort?
11:14 ely-se is the GLR still ongoing?
11:15 frankjh joined #perl6
11:16 RabidGravy ely-se, I don't think so
11:16 nine ely-se: the GLR has been pretty much done since September
11:16 ely-se nice :)
11:16 ely-se is there a change list of it some where?
11:22 llfourn ely-se: check out https://perl6advent.wordpress.com/2015/12/14/day-15-2015-the-year-of-the-great-list-refactor/
11:22 ely-se thanks!
11:26 DrForr funrep: There's a 'perl 6 in X days' guide out there, I don't remember the exact URL.
11:27 funrep DrForr: thanks! i found this slide: http://jnthn.net/papers/2015-spw-perl6-course.pdf seems pretty good i gonna go through it
11:32 funrep p6: say 2;
11:32 camelia rakudo-moar d7f3f0: OUTPUT«2␤»
11:36 AlexDaniel joined #perl6
11:38 nine panda now actually checks a dist's Perl 6 version requirement and errors out if it cannot be met. This should make it much easier to diagnore installation issues caused by the user having a too old Rakudo.
11:39 bartolin_ lizmat: there is a readlinechompfh for JVM. jnthn++ introduced it with 05d7b20f, but the commit message states that it's "cheating". maybe it gets caught now :-/
11:39 lizmat bartolin_: that may be the case  :-(
11:40 nine bartolin_: maybe it isn't readlinechompfh but stat_time and lstat_time?
11:40 nine The patch did not change any JVM related files
11:41 bartolin_ nine: I was able to build rakudo-j with 4b1236e535 reverted (actually I added an '#?if jvm' case)
11:41 bartolin_ but that doesn't look like a nice solution ...
11:41 nine Ah, ok
11:44 CIAvash Is there a reason '≠', '≤' and '≥' are not used for '!=', '<=' and '>='?
11:44 funrep what is an IntStr?
11:45 lizmat CIAvash: you would have to ask TimToady that
11:46 nine A data type that can act like an Int and a Str. It's purpose is for example for command line arguments "foo.pl 3" will pass a "3".IntStr to the MAIN function which can then decide if the argument should be an Int or a Str
11:46 lizmat personally, I would be in favour of adding them, simply because things like × and / also got added
11:46 funrep okey make sense
11:47 funrep another question, i assume arrays are heterogeneous, is that correct?
11:47 nine yes
11:47 lizmat native arrays aren't ?
11:47 funrep alright
11:47 nine untyped arrays anyway
11:47 RabidGravy m: my $a = IntStr.new(10, "ten");  say +$a;  say ~$a;
11:47 camelia rakudo-moar d7f3f0: OUTPUT«10␤ten␤»
11:47 funrep so i can optionally make them homogenous?
11:48 funrep same for lists or are lists same as arrays? maybe i should read more before asking qusetions :P
11:48 lizmat funrep: sorry, misundersttood earlier
11:48 lizmat technically, all arrays are homogenous
11:48 lizmat and by default Any
11:48 funrep aah
11:48 funrep okey
11:49 lizmat since Any accepts just about anything, it looks like they're heterogenous
11:49 nine Like Object[] in Java
11:49 funrep (i noticed perl added (any) objects to my list when i added something out of range)
11:49 lizmat but e.g., they will not accept Mu or Junctions, as they don't inherit from Any
11:49 hankache can we catch the result of a test without printing it to the terminal ?
11:49 funrep array*
11:50 lizmat hankache: you can change $*OUT/$*ERR before the test ?
11:50 funrep okey, thanks for the replies!
11:50 CIAvash lizmat: ok. Whenever I ask TimToady something, he disappears :) maybe I should .tell him.
11:51 lizmat CIAvash: that might help
11:51 hankache lizmat can you give me an example?
11:51 hankache i want to print to text file
11:51 lizmat in any case, I don't think we'll be changing much before the next release
11:52 AlexDaniel CIAvash: haha! Ten minutes ago I was thinking about asking the same question
11:52 RabidGravy hankache,  there are "our" scoped subs to control the output:  Test::output(), Test::failure_output() etc, you can redirect the output, and all the test functions return a boolean to indicate whther they passed or not
11:52 AlexDaniel CIAvash: but hey, I've mentioned tha a couple of times already
11:53 AlexDaniel CIAvash: so generally the question is “how much unicode stuff do we really want in Perl 6?”
11:53 AlexDaniel CIAvash: for example, you can use ∞ instead of Inf now, but it was added just a month ago or so
11:54 RabidGravy as long is there an alternative I'm cool with it, some of these characters are hard to type
11:54 AlexDaniel CIAvash: and × ÷ operators are rather new
11:54 pjscott joined #perl6
11:55 CIAvash AlexDaniel: oh! :) So I shouldn't ask him again?
11:56 AlexDaniel CIAvash: why not?
11:56 dalek doc: 244bd51 | lizmat++ | doc/Language/unicode_texas.pod:
11:56 dalek doc: Document − and … and texas - and ...
11:56 dalek doc: review: https://github.com/perl6/doc/commit/244bd51f1e
11:56 dalek doc: 2ab3ad6 | lizmat++ | doc/Language/unicode_texas.pod:
11:56 dalek doc: Add ÷ , AlexDaniel++ for making me remember
11:56 dalek doc: review: https://github.com/perl6/doc/commit/2ab3ad6940
11:57 timotimo Juerd: i think the exception you got when you put .sort in your code comes from inside the sort code, which uses a map call to turn the list of indices it sorted back into elements from the original list; perhaps somehow the sort sub returned NQPMu instead of throwing an error in some way or other
11:57 Skarsnik joined #perl6
11:57 CIAvash AlexDaniel: If it was already disccused
11:57 Skarsnik hi
11:57 AlexDaniel CIAvash: ah, also a fairly new addition is stuff like ½ and superscripts
11:58 AlexDaniel CIAvash: there was no final decision whether we should add ≤ ≥ ≠ or not
11:58 RabidGravy It surprises me how many of these things are available via "Compose Key"
11:59 AlexDaniel .u /
11:59 yoleaux U+002F SOLIDUS [Po] (/)
11:59 AlexDaniel .u /
11:59 yoleaux U+002F SOLIDUS [Po] (/)
12:00 CIAvash AlexDaniel: Yeah, I know about the characters you mentioned. That's why I thought why aren't these characters available.
12:00 DrForr There are Unicode lookalikes up above 0x7f :)
12:02 AlexDaniel .u //
12:02 yoleaux U+002F SOLIDUS [Po] (/)
12:02 AlexDaniel lizmat: any idea why / is listed?
12:02 CIAvash .tell TimToady Is there a reason '≠', '≤' and '≥' are not used for '!=', '<=' and
12:02 yoleaux CIAvash: I'll pass your message to TimToady.
12:02 CIAvash '>='?
12:03 lizmat AlexDaniel: no idea
12:03 AlexDaniel lizmat: perhaps somebody was going to add ÷ but wrote a regular slash instead
12:04 CIAvash I was surprised to see / too.
12:06 AlexDaniel CIAvash: there are also things like ≔ ⩵ ⩶
12:07 AlexDaniel CIAvash: though if the first two are more or less OK, the third one is just nonsense when you think about monospace fonts
12:09 AlexDaniel CIAvash: also, if we add these ops then there is a high chance that some people (like me) will start using those extensively. Imagine people on the internet complaining that the code is not just “write-only”, but now you can't even type it.
12:10 AlexDaniel Like, I have no problems entering common unicode chars, why would I want to use <= >= != then?
12:12 RabidGravy well, for most people it would be more key strokes
12:12 kid51 joined #perl6
12:12 RabidGravy ≤ is one more stroke than <= for me
12:13 AlexDaniel sure, but for me it would be less keystrokes than ascii equivalents…
12:13 CIAvash AlexDaniel: Yeah, I think someone mentioned that before.
12:13 RabidGravy and that's if I can remember how to type it
12:13 huf some people were burned by mojibake and broken encoding in their youth so much that they'll never accept non-ascii operators :)
12:13 CIAvash Well, it depends. You can define your own keys too, I think
12:16 AlexDaniel CIAvash: one other thing to note is that « » … and maybe even 「」 already exist on many keyboard layouts
12:17 AlexDaniel (I'm not sure about 「」 though, it seems like these are not the ones that are used in Japan)
12:17 RabidGravy but yeah, the point about it becoming thought of as an un-typable langiage is something to bear in mind
12:17 hankache we need a Perl 6 keyboard
12:17 RabidGravy but it comes down to self control
12:18 AlexDaniel CIAvash: superscripts are also typable most of the time
12:18 * DrForr votes for foot pedals.
12:18 RabidGravy hankache, look how well that went with APL
12:18 AlexDaniel hankache: keyboard layout you mean?
12:18 AlexDaniel DrForr: any cheap one that you could recommend?
12:18 hankache yup
12:18 huf always have ascii pairs of unicode things and ship a tool that converts source files?
12:18 huf and then nobody has to ever care.
12:19 AlexDaniel huf: hm, I've heard that idea a couple of times
12:19 DrForr Just adopt trigraphs and be done with it :)
12:19 timotimo uargh
12:19 huf DrForr: at this point, ascii has become "trigraphs"
12:19 huf the poor dear
12:20 DrForr I was thinking of the equivalents for {} and [] :)
12:20 AlexDaniel CIAvash: ah also, while you are at it, perhaps you can find some good symbol for whatever star
12:21 dalek doc: 3f2cbc0 | lizmat++ | doc/Language/unicode_texas.pod:
12:21 dalek doc: Rework it a bit
12:21 dalek doc: review: https://github.com/perl6/doc/commit/3f2cbc0966
12:21 AlexDaniel CIAvash: ⍰ is very close, but I'm sure that there are better symbols
12:21 funrep what capitalization convention is most common in perl6 code?
12:22 timotimo usually, we have ClassName, method-name, sub-name, CONSTANT_NAME, INTERNAL-NAME, right?
12:22 _nadim joined #perl6
12:22 huf _texas_?
12:22 timotimo yeah
12:22 timotimo everything's bigger in texas
12:22 timotimo » is >>, for example
12:23 huf oh god... :D
12:23 AlexDaniel though not always: × and *
12:23 timotimo m: say "×".encode.perl
12:23 camelia rakudo-moar d7f3f0: OUTPUT«utf8.new(195, 151)␤»
12:23 timotimo m: say "*".encode.perl
12:23 camelia rakudo-moar d7f3f0: OUTPUT«utf8.new(42)␤»
12:23 AlexDaniel oh, in that sense…
12:23 timotimo i disagree :P
12:23 AlexDaniel good point
12:23 AlexDaniel indeed, everything is bigger…
12:24 timotimo i don't think that's not meant to mean that, though
12:24 AlexDaniel funrep: one interesting difference between perl6 and other languages is that we have kebab-case
12:24 leont joined #perl6
12:25 AlexDaniel m: say 5
12:25 camelia rakudo-moar d7f3f0: OUTPUT«5␤»
12:25 AlexDaniel oh wow, did not expect that to work
12:26 AlexDaniel lizmat: consider mentioning non-break space and perhaps other whitespace characters?
12:26 lizmat AlexDaniel: I'll take PR's  :-)
12:26 AlexDaniel lizmat: well, in that case I can just commit it myself :D
12:27 lizmat please do!  :-)
12:27 nine panda will now fall back to curl and then to wget if downloading meta data failed. This should fix the proxy issues.
12:28 nine .tell [Coke] panda will now fall back to curl and then to wget if downloading meta data failed. This should fix the proxy issues.
12:28 yoleaux nine: I'll pass your message to [Coke].
12:28 dalek doc: 0b3deca | lizmat++ | doc/Language/glossary.pod:
12:28 dalek doc: Add some more lemma's
12:28 dalek doc: review: https://github.com/perl6/doc/commit/0b3deca123
12:28 timotimo nice
12:29 sena_san joined #perl6
12:29 lizmat timotimo: wouldn't mind seeing someone give a better description of QAST  :-)
12:29 nine .tell todd_ panda will now fall back to curl and then to wget if downloading meta data failed. This should fix the proxy issues.
12:29 yoleaux nine: I'll pass your message to todd_.
12:29 timotimo oh
12:30 * lizmat bootstraps panda
12:30 timotimo =head1 QAST
12:30 timotimo Successor to L<#QAST>.
12:30 timotimo we're stuck in an infinite vortex of improvement
12:31 lizmat oops
12:31 lizmat timotimo: perhaps you can improve ?
12:31 timotimo it'll be hard to find just the right amount of text to put there
12:31 timotimo it shouldn't be much
12:31 Skarsnik m: module A { our $var := "hello"; }; use A;
12:31 camelia rakudo-moar d7f3f0: OUTPUT«===SORRY!===␤Could not find A in:␤    /home/camelia/rakudo-m-inst-1/share/perl6/site␤    /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-1/share/perl6␤    CompUnit::Repository::AbsolutePath<140519385066968>␤    …»
12:31 _nadim joined #perl6
12:32 lizmat m: module A { our $var := "hello"; }; need A;
12:32 camelia rakudo-moar d7f3f0: OUTPUT«===SORRY!===␤Could not find A in:␤    /home/camelia/rakudo-m-inst-1/share/perl6/site␤    /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-1/share/perl6␤    CompUnit::Repository::AbsolutePath<140014219795600>␤    …»
12:32 Skarsnik m: module A { our $var := "hello"; }; import A;
12:32 camelia rakudo-moar d7f3f0: ( no output )
12:32 CIAvash lizmat: So it's ok to push directly instead of submitting pull requests?
12:32 lizmat Skarsnik++
12:32 RabidGravy frankly I'm waiting for someone to do "package EXPORTHOW { package DECLARE { our constant कामधेनु = Metamodel::ClassHOW }};" ... "कामधेनु Foo { }; say Foo.new" ;-)
12:32 lizmat CIAvash: if you have a commit bit, yes
12:32 Skarsnik m: module A { our $var is export := "hello"; }; import A;
12:32 camelia rakudo-moar d7f3f0: ( no output )
12:32 Skarsnik ho it work now?
12:32 Skarsnik to export binded var
12:33 lizmat m: module A { our $var is export := "hello"; say $var }; import A; say $var   # looks like a bug
12:33 camelia rakudo-moar d7f3f0: OUTPUT«hello␤(Any)␤»
12:34 lizmat the export succeeded, cause it has $var in the outer scope now
12:34 lizmat m: module A { our $var is export = "hello"; say $var }; import A; say $var   # seems binding it creates the problem
12:34 camelia rakudo-moar d7f3f0: OUTPUT«hello␤hello␤»
12:34 AlexDaniel .u say 5
12:34 yoleaux U+0035 DIGIT FIVE [Nd] (5)
12:34 yoleaux U+0061 LATIN SMALL LETTER A [Ll] (a)
12:34 yoleaux U+0073 LATIN SMALL LETTER S [Ll] (s)
12:34 AlexDaniel m: say 5
12:34 camelia rakudo-moar d7f3f0: OUTPUT«5␤»
12:37 espadrine joined #perl6
12:37 AlexDaniel m: print ‘say’; print join ‘’, (0..0x1FFFF ==> grep { .uniprop ~~ m/‘Zs’/ })».chr; say 42
12:38 camelia rakudo-moar d7f3f0: OUTPUT«say                 42␤»
12:38 AlexDaniel m: say                 42
12:38 camelia rakudo-moar d7f3f0: OUTPUT«42␤»
12:41 dalek doc: 378c3e9 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/unicode_texas.pod:
12:41 dalek doc: Mention other whitespace characters (Zs property)
12:41 dalek doc: review: https://github.com/perl6/doc/commit/378c3e9d53
12:42 AlexDaniel I'm not sure if there are any other things besides Zs though
12:43 lizmat AlexDaniel++
12:43 kid51 joined #perl6
12:44 AlexDaniel oh
12:44 AlexDaniel m: print ‘say’; print join ‘’, (0..0x1FFFF ==> grep { .uniprop ~~ m/‘Zl’/ })».chr; say 42
12:44 AlexDaniel m: print ‘say’; print join ‘’, (0..0x1FFFF ==> grep { .uniprop ~~ m/‘Zp’/ })».chr; say 42
12:44 camelia rakudo-moar d7f3f0: OUTPUT«say
42␤»
12:44 camelia rakudo-moar d7f3f0: OUTPUT«say
42␤»
12:46 pjscott joined #perl6
12:47 brrt joined #perl6
12:48 AlexDaniel m: say
5
12:48 camelia rakudo-moar d7f3f0: OUTPUT«5␤»
12:48 AlexDaniel ha
12:49 AlexDaniel m: say
5
12:49 camelia rakudo-moar d7f3f0: OUTPUT«5␤»
12:49 AlexDaniel ok, I'm wrong
12:50 dalek doc: 49a5110 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/unicode_texas.pod:
12:50 dalek doc: Zl and Zp are also valid whitespace characters
12:50 dalek doc: review: https://github.com/perl6/doc/commit/49a511048f
12:50 dalek rakudo/nom: c0bb692 | lizmat++ | src/core/io_operators.pm:
12:50 dalek rakudo/nom: Remove non-functioning, untested pipe(), cygx++
12:50 dalek rakudo/nom:
12:50 dalek rakudo/nom: Part of PR #646, the other part I'm not happy merging at this point
12:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c0bb69261d
12:57 Skarsnik m: my %h; %h<b><id> = 2; %h<a><id> = 1; say %h.values.sort(*<id>);
12:57 camelia rakudo-moar d7f3f0: OUTPUT«(id => 1 id => 2)␤»
12:57 Skarsnik m: my %h; %h<b><id> = '_2'; %h<a><id> = '_1'; say %h.values.sort(*<id>);
12:57 camelia rakudo-moar d7f3f0: OUTPUT«(id => _1 id => _2)␤»
12:58 Skarsnik hm that does not work for me. is that because it can't sort directly _xx ?
13:06 dalek rakudo/nom: 7253482 | lizmat++ | src/core/IO.pm:
13:06 dalek rakudo/nom: Remove some superfluous returns
13:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7253482de0
13:06 shadowpaste joined #perl6
13:07 lizmat Skarsnik: not sure what you're getting at
13:09 Skarsnik I want to sort on the value of the id, but I get it work with {$^a<id> > $^b<id>} x)
13:12 lizmat and it doesn't with *<id> ?
13:13 lizmat or { $_<id> } ?
13:13 lizmat or { $^a<id> } ?
13:13 lizmat I guess the former can't work because it doesn't indicate the signature
13:14 lizmat if the signature's arity is 1 (which just using $^a will do), then sort should do TRT
13:14 AlexDaniel TRT?
13:15 lizmat The Right Thing
13:15 nine lizmat: have you given further thought to the language_versions branch?
13:15 lizmat nine: I have, and I think it's a bad idea
13:16 nine :(
13:16 lizmat I don't think we can make it acceptable to module developers or users to tell them that if a feature isn't tested in roast
13:16 nine So we need another idea or some really good arguments.
13:16 lizmat it doesn't exist
13:16 nine But...we wouldn't have to?
13:16 lizmat if it works, it works
13:17 lizmat yes, we would, e.g. in the case of Date.new taking 3 positionals
13:17 lizmat it wasn't tested in 3.c
13:17 lizmat it was added during development of 2016.01
13:17 lizmat use v6.c will *not* tell you whether it will work
13:17 nine I'd say exactly the opposite: we leave the existing code alone as much as possible (except for real bug fixes or performance improvements) by moving new additions to src/core.d/
13:19 nine Developers who want to use the additions of core.d before it's released will have to use v6.d.PREVIEW with the same caveats as pre 6.c nom: you may use this, but it may go away before the release.
13:19 Skarsnik curse you union. you make my life a nightmare!
13:19 lizmat nine: and what is the position of nom in this ?
13:21 nine Same as it has always been. We do development on it. It's just that changes to the API go into a different directory and have to be written using augment and supersede and friends.
13:21 nine Changes that don't touch semantics, like plain performance improvements or fixes to bugs go to core code same as ever (except if they break the 6.c tests in roast)
13:22 Skarsnik you realise you will need version on the doc too :(
13:22 Skarsnik when 6.c is not even fully documented x)
13:23 lizmat nine: I like the idea, but practically, it's going to be a nightmare
13:23 virtualsue joined #perl6
13:23 nine Skarsnik: yes, of course. But the only alternative is to freeze all APIs and not have any future language versions at all :)
13:23 lizmat my idea would be:
13:23 nine lizmat: backwards compatibility always is. The question is: how can we make the nightmare most bearable.
13:23 lizmat 6.c / 2015.12 is frozen in a branch
13:24 lizmat any work done post-2015.12 (in nom) is part of 6.d.PREVIEW
13:24 lizmat any bugfixes / speed improvements are cherry picked in the 6.c branch
13:25 lizmat doc is frozen in 6.c / 2015.12 branch
13:25 pjscott joined #perl6
13:25 Skarsnik I don't want to sound annoying, but for me: Something not documented is not in 6.c :)
13:25 lizmat any additions / changes are for 6.d.PREVIEW
13:25 AlexDaniel Skarsnik: not tested you mean?
13:25 Skarsnik No, documented
13:25 lizmat Skarsnik: but there's the source
13:26 AlexDaniel documented as in docs.perl6.org?
13:26 lizmat people *will* use it, especially if it's so P5 centric that nobody thought it worthwhile to document for P6
13:28 lizmat but since our spectesting is still only covering a relatively small percentage of the code base
13:29 nine lizmat: if we're using git branches for 6.c/6.d distinction, wouldn't that mean that I'd have to install different rakudo versions if some of my programs are written in 6.c and some are in 6.d?
13:29 lizmat I think we're doing users / module developers a disservice by saying that 2016.01 is 6.c, like 2015.12 is 6.c
13:30 nine lizmat: ^^^ that's the reason why I won't add any API method to a rakudo that claims to implement 6.c. Because people will use them regardless of what roast says. And other people will run the code on older versions and it will not work.
13:30 lizmat well, generally, I would think that a feature to be removed in 6.d, should be DEPRECATED at least one language level bump
13:31 nine lizmat: deprecation is certainly ok. It can throw a deprecation warning in 6.d and vanish in 6.e. The language_version architecture makes this quite easy to do.
13:31 lizmat well, then I guess most of the commits since 2015.12 need to be moved somewhere else then
13:31 nine Yes, that's why I'd really like to see a solution soon. Because the work will become more and more :)
13:32 nine But actually I think most of the commits are fine. All the performance improvements and commits like removing a &pipe that didn't work anyway.
13:33 lizmat well, a large part of the Date/DateTime changes would need to be looked at, as a lot of them depend on the new positional candidates
13:33 pjscott joined #perl6
13:34 Skarsnik is there lot of tests that fail in roast with the current nom?
13:35 lizmat we should only have some flappers
13:35 Skarsnik Because I am pretty sure 2015.12 is not that used because of all the panda/precomp issue
13:35 nine lizmat: I think for DateTime, we could move the positional constructor to a private method and use that everywhere and add the positional constructor which forwards to the private method in 6.d
13:35 sftf joined #perl6
13:36 lizmat nine: true, but that would basically make any maintanence on Date/DateTime work in two branches
13:36 lizmat and we're going to have more and more of these cases
13:37 nine not in two branches but in two files. On the other hand it will be very, very obvious which language version changed what.
13:37 lizmat and we're going to start mistakes with them
13:37 lizmat *having
13:39 nine Yes, we will make mistakes. Just as with every kind of developing. I don't see a solution that completely avoids that :/
13:39 orbus not to toss a bomb and then leave (because I have to take off) but it seems like there's some disagreement over whether the language version covers only syntax, or also covers the API for some core set of classes
13:39 yoleaux 6 Jan 2016 09:10Z <nine> orbus: The NativeCall test failures are because of issues with passing int8 and uint8 to C and back and because of nativesizeof(SomeStructOrClass) doesn't seem to work correctly. Neither have a high probability of affecting Inline::Perl5, but there may be other issues.
13:39 yoleaux 6 Jan 2016 09:28Z <FROGGS> orbus: can I get detailed output of the failing tests? like if you'd run perl6 t/04-nativecall/02-simple-args.t etc
13:39 lizmat orbus: no, there's no disagreement there
13:40 nine It's always language syntax + core classes, isn't it? :)
13:40 lizmat yep
13:40 pjscott joined #perl6
13:40 orbus okay
13:40 lizmat It's more about what 6.c means, and how we can make sure that users / module developers can be sure that "use v6.c" is a *FIXED* set of capabilities
13:41 lizmat rather than a slightly dynamic one depending on which compiler release you're using
13:41 orbus I see
13:41 orbus I guess I'm primarily looking at java as a model
13:41 lizmat without having to resort to saying "well, it wasn't tested, so booboo for using it anyway"
13:42 orbus java has a similar situation where there are multiple implementations and distinct language versions
13:43 orbus they seem to pretty much freeze the apis for a given version - if they want to add more parameters or more methods or whatever, it waits for a new version
13:43 orbus of course, I have no clue how the code base is managed :p
13:44 Skarsnik hm, nativesizeof on a struct work correctly
13:45 orbus .tell FROGGS I'll work on getting you test output when I have some free time - hopefully later today
13:45 yoleaux orbus: I'll pass your message to FROGGS.
13:47 orbus I will say, I know I personally would rather rely on what's documented than just some method I found in the source
13:48 orbus lots of software products have undocumented apis
13:48 orbus doesn't mean they are safe to use
13:49 lizmat orbus: sure, but we want to prevent situations like with Coro in Perl 5
13:50 lizmat whenever we get a successful module relying on some internal API, you basically cannot break it anyway
13:50 nine lizmat: ensuring that 6.c is a fixed set of capabilities should be a strong point of the language_versions architecture. In reviews we just have to make sure that changes to src/core/ leave semantics alone. Sounds much easier than reviewing code riddled with if $*PERL.version branching (though we will never be able to avoid those completely)
13:54 orbus maybe anything undocumented for a given version should be somehow flagged as such?
13:54 orbus like throw warnings?
13:54 nine git branches won't let you support different language versions with the same binary. Let alone mixing different language versions in the same program.
13:55 orbus nine: agree
13:56 orbus probably if your aim is to support v6.c, v6.d, etc. in the same binary you're going to have to go back and test later versions of the runtime against each of the old spec tests
13:57 orbus make sure v6.c passes, then v6.d, then v6.e
13:57 orbus etc
13:58 [Tux] if I get a Supply, can I ask it its Supplier?
13:59 orbus just looking at the docs - I don't think so
14:00 lnrdo joined #perl6
14:01 funrep so i just learned that you can have code inside strings, this begs the question, doesnt this makes it easy to exploit perl6 programs?
14:01 Skarsnik probably
14:01 * orbus has to afk for a bit
14:01 funrep or well, probably there are several types of strings
14:01 llfourn funrep: no not at all
14:01 llfourn funrep: can you suggest an attack vector?
14:02 Skarsnik my $foo = '{say hello}'; "$foo";
14:02 Skarsnik m: my $foo = '{say hello}'; "$foo";
14:02 camelia rakudo-moar 725348: ( no output )
14:02 jshy joined #perl6
14:02 zwu joined #perl6
14:02 llfourn m: my $foo = '{say hello}'; say "$foo";
14:02 camelia rakudo-moar 725348: OUTPUT«{say hello}␤»
14:03 llfourn that aint gonna work :P
14:03 funrep input in a website, you write "{ rm_rf("../" }" or something
14:03 llfourn funrep: you would need still need to EVAL It
14:03 funrep i started learning this thing yesterday so probably just premature assumption that's not real problems :P
14:04 funrep llfourn: isnt application strict though? so if you put that string as an argument it will be evaluated before the function call?
14:05 Skarsnik can we have an operator for defined in 6.d? x)
14:05 funrep well, gotta run!
14:05 llfourn funrep: I'm not sure what you mean. "{ }" is just syntactic sugar at runtime it's the same as concatination
14:05 Skarsnik I am bored of writting if stuff.defined and stuff < 2;
14:08 Zoffix Skarsnik, where's stuff coming from? You may benefit from the :D smiley
14:08 lizmat funrep: only if you use EVAL, which you probably shouldn't
14:08 Zoffix (stuff//0) < 2
14:08 lizmat funrep: as interpolation works at compile time
14:09 Skarsnik Zoffix, I have a ton of code like that, where stuff is various stuff, like if @sorted[$i + 1].defined and @sorted[$i + 1]<obj> ~~ CUnion
14:09 lizmat cycling&
14:10 Skarsnik I would like a stuff ? cmpoperator value
14:10 Zoffix +1
14:11 llfourn Skarsnik: do you use 'with'?
14:11 llfourn with checks for definedness
14:12 llfourn with @sorted[$u + 1] { say "win" when CUnion }
14:12 Skarsnik that aweful
14:12 llfourn I like it :)
14:13 Zoffix left #perl6
14:14 llfourn with @sorted[$i + 1] { say "win" when .<obj> ~~ CUnion } #or rahter
14:14 Zoffix joined #perl6
14:15 Zoffix Seems huggable is leaking. Dies after ~1-2 days. And this time I got a notification from linode about excess disc activity, which I'm guessing is swap
14:16 Zoffix :(
14:16 Skarsnik NC lead to leak I think
14:16 huggable joined #perl6
14:16 Zoffix Aw :( I'm using it (indirectly, via DBIish) https://github.com/zoffixznet/perl6-IRC-Client-Plugin-Factoid/blob/master/lib/IRC/Client/Plugin/Factoid.pm6
14:17 wamba joined #perl6
14:17 Skarsnik In dbiish tests we have a weird issue where regular Str receive the explicitlymanaged role of NC and they don't get GC
14:18 Zoffix OTOH, the leak is probably somewhere in the Grammar/Actions https://github.com/zoffixznet/perl6-IRC-Client/blob/master/lib/IRC/Parser.pm6
14:18 Zoffix Because I don't see the bot used much. It's really it just parsing traffic on #perl6
14:19 Zoffix Gonna disable the debugger plugin (that uses Data::Dump) to eliminate one variable
14:19 Skarsnik Yes, but if every regular Str get not GC because of a NC call, you are in trouble x)
14:19 huggable joined #perl6
14:19 Skarsnik Display the ^name of your variable
14:20 Zoffix Skarsnik, there shouldn't be an NC call without DB look up
14:20 Zoffix I meant the metaphorical variable not literal :)
14:20 Zoffix huggable, IO::Handle
14:20 huggable Zoffix, class IO::Handle [Opened file or stream]: http://doc.perl6.org/type/IO::Handle
14:20 Zoffix k, will see if it's still alive come Monday
14:26 hankache joined #perl6
14:30 DukeOfPerl joined #perl6
14:30 DukeOfPerl Can Perl6 source code be in plain codee, or must it be Unicode?
14:31 Skarsnik plan codee?
14:31 Skarsnik *plain
14:31 DukeOfPerl Ordinary ASCII text as plain code, not Unicode.
14:31 DrForr What's the difference? ASCII is the first 0x7f codepoints of UTF-8.
14:31 DukeOfPerl But in Unicode one may express logical operators, not usually necessary.
14:32 Zoffix DukeOfPerl, yes, there are Texas Variants of all Unicode operators
14:32 [Tux] Any other (useful) in or out I could implement for «Text::CSV.csv (in => $in, out => $out)» ? https://github.com/Tux/CSV/blob/master/lib/Text/CSV.pod#in
14:32 DrForr You can express logical operators in ASCII too.
14:32 Zoffix DukeOfPerl, http://doc.perl6.org/language/unicode_texas
14:32 DukeOfPerl And is Perl6 only available for Apple macintosh now in January 2016?
14:33 DrForr No, it works fine on Windows and Linux as well. Where did you find this information?
14:33 DukeOfPerl When will Perl5 be available for MSOFT Windows or for Linux?
14:33 Zoffix DukeOfPerl, Perl 5?
14:33 * hankache lurkes
14:34 DrForr I think you mean Perl 6, and it's already been available for quite a while.
14:34 Zoffix DukeOfPerl, it already is available. For Perl 6, you can use the method described here: http://perl6.org/downloads/ or you can wait a few weeks and get the Rakudo Star distribution
14:34 DukeOfPerl https://en.wikibooks.org/wiki/Category:Perl_6_Programming has pretty good info, but old.
14:35 DrForr perl6.org has the most recent info.
14:35 DukeOfPerl And at Perl6.org they speak of Rakudo, which means -- what? Japanese?
14:35 Zoffix DukeOfPerl, I can imagine. There've been many recent changes, prior to the first stable release. Check out http://perl6intro.com/ and http://doc.perl6.org/
14:36 Zoffix DukeOfPerl, Rakudo is the compiler of the Perl 6 language. It's Japaneese for The Way of The Camel or something It's in the Wikipedia
14:36 virtualsue joined #perl6
14:36 DukeOfPerl Has anybuddy yet offered, or pointed to, a Perl6 "killer app"?
14:37 DrForr It's only been released for a few weeks. Give it at least a month for someone to write its killer app.
14:37 llfourn DukeOfPerl: there are many killer Perl6 feautures but no one has built anything in Perl 6 that is a "killer app"....yet :0
14:37 _nadim joined #perl6
14:37 DukeOfPerl Why does Larry Wall propject that Perl6 will replace Perl5 after FORTY years?
14:37 Zoffix DukeOfPerl, if "killer apps" were something that easy to come up with... :)
14:37 Zoffix DukeOfPerl, because Perl 6 is written for the next 100 years... Perl 5 isn't
14:38 DrForr Ask Larry, he'll be around in a little while.
14:38 DukeOfPerl Anybody contemplating a Perl6 "killer app"? [I am]
14:38 Zoffix DukeOfPerl, sweet. Start coding.
14:38 DukeOfPerl Wait a miunute-- Larry Wall often comes hither???
14:38 Zoffix DukeOfPerl, I suspect the Perl 6 Killer App will be an AI :)
14:38 Zoffix DukeOfPerl, yeah, TimToady is Larry Wall.
14:39 DrForr Thought is cheap, bytes are worthwhile.
14:39 Zoffix (as in, he's here now under that nick :))
14:39 DukeOfPerl http://ai.neocities.org/AiSteps.html is my Perl5 AI app. (So who am I really? -)
14:40 llfourn DukeOfPerl: interesting
14:40 Zoffix Yeah, that page lost me at "PERL"
14:40 DukeOfPerl An did Larry Wall reall attend Seattle Pacific College (now U) in Seattle?
14:41 DrForr *plonk*
14:41 DukeOfPerl Pardon me for aggrandizing "Duke of Perl" (in envy of Duke of URL on another site.
14:41 Ch0c0late joined #perl6
14:42 * Zoffix shakes head and resumes hacking
14:42 DukeOfPerl Are you "friendly" people "plonkinh" me? How rood.
14:42 DukeOfPerl OK I gotta go, amy I yet lurk a while? Toady, are you really Dr. Wall?
14:44 ChoHag joined #perl6
14:47 Zoffix huggable, texas :is: All of Perl 6's fancy Unicode operators have traditional ASCII symbol alternatives (aka Texas Variants): See http://doc.perl6.org/language/unicode_texas
14:47 huggable Zoffix, Added texas as All of Perl 6's fancy Unicode operators have traditional ASCII symbol alternatives (aka Texas Variants): See http://doc.perl6.org/language/unicode_texas
14:48 Skarsnik Am I the only one messing enum syntax everytime? I always write enum Foo = ()
14:49 * colomon doesn’t remember p6 enum syntax at all...
14:49 Zoffix left #perl6
14:50 Skarsnik it's enum Foo ();
14:51 llfourn enum Foo = () # woudn't this mean you want to set a symbol of type enum to an empty list?
14:52 xpen joined #perl6
14:52 llfourn though I suppose constant works the same way as you expect so I can see why
14:52 lucasb joined #perl6
14:57 DukeOfPerl If someone "plonks" me, am I then disconnected. I hope not.
14:57 DrForr Nope.
14:57 lucasb about enum syntax, I wonder why enum E 'a','b','c' doesn't work the same as enum E <a b c>
14:57 DukeOfPerl In comp.lang.perl.misc, people were rude to me talking about AI.
14:58 DukeOfPerl If the Usenet Perl people continue to be rude about Perl AI, I will post in other groups.
14:59 DrForr Sorry to hear it.
14:59 DukeOfPerl All right, before I vape (go), I have one big major Perl6 question...
15:00 DukeOfPerl In Perl5 for Windows, I am unable to deal directly with each keyboard stroke. CanPerl6???
15:00 rindolf joined #perl6
15:00 llfourn DukeOfPerl: I doubt p6 is any better in terms of hardware interactions than p5
15:00 DrForr What does that mean?
15:01 DukeOfPerl I code AI in Forth (English; German) and JavaScript (English; Russian)...
15:01 DukeOfPerl In Forth and in JavaScript, the AI Mind processes each character AS IT COMEs In. Perl6?
15:02 DrForr Sure, just use the appropriate ReadKey library - modules.perl.org
15:03 DukeOfPerl Thankew, Dr Forr :-)
15:03 Skarsnik hm, xml does not allow <mytag/> ?
15:04 lucasb the xml specification? yes, I think it allows it
15:05 hankache DukeOfPerl an AI using Perl 6 would be a hit. If you have some spare time to work on it or blog about it, that would be great.
15:05 DukeOfPerl Right now I have 24/7 spare time for AI in Perl, Forth and JavaScript.
15:06 DukeOfPerl I wish I had a 64-bit Linux machine running Perl6 for AI, but I am technologically primitive.
15:06 DrForr Cool, go for it!
15:06 DukeOfPerl Which Linux distribution is best for 64-bit Perl6?
15:07 hankache DukeOfPerl all of them work.
15:07 DukeOfPerl Also which 64-bit CPU should be on the Perl6 Linux machine?
15:07 DrForr They should all work, 'best' is your personal preference.
15:07 lichtkind joined #perl6
15:08 DrForr As is CPU. It's running on a VM, so it really doesn't matter.
15:08 DukeOfPerl Right now for Perl5 (Windows) all I have is an Acer Aspire One netbook (this machine).
15:08 DukeOfPerl VM (virtual machin e) is the Rakudo thingie, right?
15:09 DrForr Should work fine. I'm running rakudobrew on an Ubuntu VM inside a Windows machine.
15:09 firstdayonthejob joined #perl6
15:09 virtualsue joined #perl6
15:09 DukeOfPerl What sort of In ternet connection is needed? Ordinary Wi-Fi okay?
15:10 DukeOfPerl If I shop around here in Seattle WA USA, maybe I can buy an used Linux 64-bit machine.
15:10 hankache DukeOfPerl ordinary wi-fi is ok
15:11 DukeOfPerl hankache, thankew I am sure. But Wi-Fi has never let me do "telnet".
15:11 DrForr If you can download from github, your connection is good enough.
15:11 DrForr Wifi has nothing to do with that, telnet's just a protocol.
15:11 DukeOfPerl Unfortunately, my Radio Shack Acer netbook from 2009 can not get into GitHub :-(
15:12 llfourn can you install git?
15:13 DukeOfPerl http://friedo.com/blog/2016/01/exploring-perl-6-up-and-running has helped me a lot.
15:14 DukeOfPerl Ilfourn: I dunno if I can install git. I code AI, but I am only a Latin-and-Greek major :-(
15:14 llfourn DukeOfPerl: well I'd say that installing git might be necessary right now to get perl 6 up and running
15:15 lucs Can I get more elegantly from 「for %h.keys.sort -> $k { my $elem = %h.{$k} ⋯」 to 「for ⋯ -> $elem { ⋯」?
15:15 DukeOfPerl Thanks, Ilfoourn, I will look into what "installing git" entails and requires.
15:15 llfourn I think a windows installer thing is in the works but I don't think it's been released for v6.0c
15:15 iH2O joined #perl6
15:16 DukeOfPerl When I shop for the 64-bit Linux machine, I will try to accommodate GitHub necessities.
15:16 llfourn DukeOfPerl: there are no github necessities. It's a website.
15:16 DukeOfPerl And another thing. Will CPAN be accepting new modules expressly for Perl6?
15:17 llfourn no. http://modules.perl6.org/ is our CPAN for now
15:17 lucs (That is, without requiring the otherwise unused $k variable.)
15:17 DukeOfPerl Ilforun, cool!
15:17 Zoffix joined #perl6
15:18 Zoffix nemo, lol, your instructions completely disabled my XCompose now :) even stuff that did work no longer does
15:18 iH2O left #perl6
15:18 Zoffix It looks like it's doing something (sequence characters aren't typed), but end result is no char
15:18 lucs Zoffix: Oh, what are you doing with XCompose? (I've been tweaking mine a lot lately)
15:19 Zoffix lucs, I wanted to get a wider range of sequences: http://doc.perl6.org/language/unicode_entry#XCompose
15:19 lucasb lucs: maybe use: for %h.sort.values -> $v { ... }
15:20 pjscott joined #perl6
15:20 lucs lucasb: Oh, hmm... Trying.
15:21 st_iron joined #perl6
15:21 st_iron good afternoon
15:22 Zoffix \o
15:22 llfourn gday, st_iron
15:22 st_iron o/
15:22 lucs lucasb: Appears not to work.
15:22 lucasb idk, then :(
15:23 llfourn m: {three => "four",one => "two", a => "z"}.sort.values.note
15:23 camelia rakudo-moar 725348: OUTPUT«(a => z one => two three => four)␤»
15:23 lucs lucasb: Um, I may have done something wrong though...
15:23 llfourn lucs: which bit doesn't work?
15:23 lucs Right :)
15:24 llfourn ah you want just the .value?
15:24 lucs Yes.
15:24 llfourn m: {three => "four",one => "two", a => "z"}.sort.map(*.value) #maybe
15:24 camelia rakudo-moar 725348: ( no output )
15:24 lucasb ahh, sorry, my mistake. %h.sort returns a list of pairs, I think
15:24 llfourn m: {three => "four",one => "two", a => "z"}.sort.map(*.value).note #maybe
15:24 camelia rakudo-moar 725348: OUTPUT«(z two four)␤»
15:25 lucs Yeah, good ol' map.
15:25 CIAvash joined #perl6
15:26 lucs lucasb, llfourn: Thanks
15:26 llfourn nps :)
15:27 lucs Zoffix: So, what's your XCompose problem?
15:27 Zoffix lucs, <Zoffix> It looks like it's doing something (sequence characters aren't typed), but end result is no char
15:27 lucs Zoffix: Let me rephrase: What did you do, what did you expect, bla bla bla :)
15:28 Zoffix lucs, http://irclog.perlgeek.de/perl6/2016-01-08#i_11854039
15:29 Skarsnik hm I want that A is the same type that B I need to write constant A := B?
15:29 Skarsnik I want the same thing that typedef in C
15:31 lucasb if you don't mind that A.new.WHAT is (B)...
15:32 Skarsnik hm
15:32 Peter_R joined #perl6
15:33 Juerd Skarsnik: subset A of B;
15:33 yoleaux 08:17Z <bpetering> Juerd: I'm going through /^F/, skip to /^G/ please :)
15:33 khw joined #perl6
15:33 Juerd bpmedley: That's great! I got stuck in /^C/ after [^30]
15:33 Juerd bpmedley: Tab completian fail, never mind that
15:34 Skarsnik Juerd, not sure if subset will work well with nc type
15:35 Juerd What is nc type?
15:35 Skarsnik NativeCall
15:35 Skarsnik *types
15:35 Juerd Ah
15:35 Skarsnik I litteraly want to transform a 'typedef struct A B' to the perl6 eqv
15:36 telex joined #perl6
15:39 Zoffix m: class C { method gist {rand}}; say C.new;
15:39 camelia rakudo-moar 725348: OUTPUT«This type cannot unbox to a native string␤  in block <unit> at /tmp/r1Zmdma0Mx line 1␤␤»
15:39 Zoffix Huh? I thought say() called .gist
15:43 Zoffix m: class C { method gist {"42"}}; say C.new
15:43 camelia rakudo-moar 725348: OUTPUT«42␤»
15:43 lucasb m: class C { method gist { Inf } }; say C
15:43 camelia rakudo-moar 725348: OUTPUT«This type cannot unbox to a native string␤  in block <unit> at /tmp/rO5YHBBgHs line 1␤␤»
15:44 Skarsnik Not bad: to rewrite my gumbo binding : echo "unit module Gumbo::Binding; " > Binding.pm6 && perl6  -I lib bin/gptrixie --all /usr/local/include/gumbo.h | grep -v GUMBO_TAG >> Binding.pm6
15:46 geekosaur m: class C { method gist {~rand}}; say C.new;
15:46 camelia rakudo-moar 725348: OUTPUT«0.913867389771498␤»
15:47 lucasb hm, right, .perl, .Str, and .gist should always return strings
15:47 lucasb but what if the user made a mistake, can't the compiler give a hand there? :)
15:48 lucasb ...and stringify what was supposed to be a string
15:48 Zoffix That's why my thought would be
15:48 Zoffix I don't see why I have to manually cast to .Str all the time
15:49 Zoffix m: class C { method Str {"42"}}; my @what = C.new, C.new, C.new; @what ».= gist; say @what
15:49 camelia rakudo-moar 725348: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RBulbfJlyc␤Missing « or »␤at /tmp/RBulbfJlyc:1␤------> 3y @what = C.new, C.new, C.new; @what ».=7⏏5 gist; say @what␤    expecting any of:␤        infix␤        infix stopper␤»
15:49 Skarsnik m: class C { method gist returns Str { rand } }; say C
15:49 camelia rakudo-moar 725348: OUTPUT«Type check failed for return value; expected Str but got Num␤  in method gist at /tmp/IRZ0gs7ykI line 1␤  in block <unit> at /tmp/IRZ0gs7ykI line 1␤␤»
15:49 Skarsnik lol really
15:50 havenwood left #perl6
15:52 * DukeOfPerl Says good-bye to go work on the AI Mind Perl6 "Killer App".
15:53 Zoffix Bastard stole my idea! :D
15:53 arnsholt Skarsnik: A typedef doesn't need much translation when you're wrapping a library, IMO. Just pick one of the names for your class and use that
15:54 DrForr The joke will be on us when it achieves Singularity and takes over the world.
15:55 Zoffix :)
15:55 hankache ;)
15:55 llfourn he was a perl 5 AI right? That's what I thought he said.
15:55 Skarsnik lol
15:57 virtualsue joined #perl6
15:58 Zoffix m: say $PROCESS::OUT.Str
15:58 camelia rakudo-moar 725348: OUTPUT«IO::Special.new(what => "<STDOUT>")␤»
15:59 uruwi joined #perl6
15:59 Zoffix (not on docs: /types)
15:59 autarch is there an IMPORT or import sub called when a module is 'use'd?
16:00 Zoffix autarch, http://doc.perl6.org/language/modules#Exporting_and_Selective_Importing
16:00 Zoffix http://doc.perl6.org/language/modules#EXPORT on that page in particular
16:01 autarch hmm, but there's no sub that's designed for _accepting_ options and not exporting stuff
16:01 llfourn autarch: yes EXPORT
16:01 autarch I'm trying to figure out how to do things we do in Perl 5 by writing an import() that accepts arbitrary parameters and does stuff
16:01 llfourn autarch: yeah just do stuff and return an empty {}
16:02 Zoffix autarch, sub EXPORT (*@args, *%args) { return {}; }
16:02 autarch well, what if I want to export stuff too?
16:02 autarch can I "callsame" to get the defaults to happen?
16:02 llfourn autarch: just return stuff in the { }, or do you mean you want is export to work
16:02 autarch yes, I want it to work
16:03 llfourn yeah you will have to make is export(:MANDATORY) or make your users use MyModule 'some-arg', :DEFAULT;
16:03 autarch sure, that's fine, but how do I invoke the built-in exporter?
16:04 llfourn autarch: you don't need to
16:04 llfourn it's always invoked
16:04 llfourn &EXPORT doesn't override anything
16:04 autarch ah, cool
16:04 llfourn the default exporter is called EXPORTALL or something I think but I've never dealt with it
16:06 llfourn autarch: out of interest what mischief are you planning on getting up to in sub EXPORT {}
16:07 autarch llfourn: I'm working on Test::Stream and I'm building a module that acts like Test.pm6 - by default, I want it to emit certain required test events (Suite::Start & Suite::End) - however, you may want to use these subs in another module that manages suite start & end, so I need a way to disable that
16:08 autarch and since this is not an object, there's really no other API to use
16:08 autarch actually, hmm, I take that back, I suppose I could just have a sub you could call to disable those events
16:08 autarch ... which I now realize is probably a better way to do this for now
16:10 llfourn sounds reasonable to me
16:11 mst autarch: please look at the split front-end/back-end architecture of Test2
16:11 RabidGravy joined #perl6
16:11 mst autarch: we put quite a bit of time into figuring that out, and it'd be sad for you to remake the same mistakes in p6 land we just spent time unamking in p5 :)
16:11 autarch mst: what specifically? I think what I have so far is pretty similar to Test2
16:12 mst autarch: ok, but remember that 'the thing that acts like Test.pm6' should then be independet, in a separate namespace, and merely a client of the streaming code
16:12 autarch yes, that's exactly how it's designed
16:12 autarch it's only named Test::Stream::Subs for now because it's in the same git repo
16:12 mst that wasn't clear, especially given you're still using Test::Stream as a name, which also got discarded during this process
16:12 autarch it would be very easy to move it to its own distro and make it require the Test::Stream core
16:13 autarch well, there's no reason to call this stuff Test2 for perl 6
16:13 timotimo T3st, please
16:13 mst ok, so, most of the hassle we've had comes from "it's only named X for now" followed by "wait now people are relying on part of the interface that makes no sense"
16:14 mst could you not give its its own name within your own lib/ tree? otherwise I worry about this going hilariously wrong by accident
16:14 funrep llfourn: aah it's syntax, now i get it thanks!
16:15 autarch what should it be called then? I don't particularly care about the name
16:15 llfourn funrep: no probs!
16:15 Skarsnik I like T3est
16:15 mst autarch: how about a working name of 'Test::Predicates' with an assumption somebody will find you a better one?
16:15 autarch sure, that works
16:16 mst also note we now have a #perl6-toolchain channel which I'm trying to use to co-ord CompUnitRepo and stuff above and belove it
16:16 autarch I'll join that
16:16 mst that's not a "we should relocate this conversation" statement, just a "you're one of the people I'd like to know the channel exists"
16:22 autarch what's the operator to iterate over >1 list at a time?
16:23 hoelzro autarch: Z?
16:23 hoelzro for @first Z @second -> $first-element, $second-element { ... }
16:23 autarch yes, that's what I wanted
16:24 krunen [Coke]: (re moving Rakudo release tags) I thought I only said it was talked about at some point, but confused discussion happened. Sorry.
16:26 RabidGravy Ok darlings, is it actually possible to create a useable role on the fly?
16:26 RabidGravy I thought something like
16:26 RabidGravy m: my $a = Metamodel::ParametricRoleHOW.new_type(name => "Bnana"); $a.^compose; my $b = 1; $b does $a
16:26 camelia rakudo-moar 725348: OUTPUT«Could not instantiate role 'Bnana':␤Cannot invoke this object␤  in any  at gen/moar/m-Metamodel.nqp line 2423␤  in any specialize at gen/moar/m-Metamodel.nqp line 2410␤  in any compose at gen/moar/m-Metamodel.nqp line 2979␤  in any generate_mixin…»
16:27 RabidGravy but clearly it doesn't work how I anticipated
16:28 moritz RabidGravy: first of all you should bind to $a, not assign to it; otherwise you might end up composing Scalar
16:28 moritz RabidGravy: the MOP is fiddly in this way
16:29 RabidGravy actually I think I knew that bit but forgot
16:29 Zoffix :o my 50-line Perl 6 code worked correctly the first time I ran it.
16:29 Zoffix I guess this is a point where I can start calling myself a Perl 6 programmer ^_^
16:31 RabidGravy Zoffix, it's a false dawn ;-)
16:31 virtualsue joined #perl6
16:31 * Zoffix looks at https://en.wikipedia.org/wiki/False_dawn and doesn't get the reference
16:34 MadcapJake anyone know if I could (when installing rakudo) specify the eventual path of the files but install all files to a temporary location and move them manually?  Right now I'm trying `--sysroot=/usr --prefix=<temp-dir>`, would that work?
16:34 hoelzro MadcapJake: I think DESTDIR for make install works
16:34 Zoffix ^ this is the second time someone asks that in 2 days :) We should have a solution
16:34 hoelzro yes, it does
16:34 Zoffix hoelzro, but does that satisfy the "move them manually" portion?
16:35 MadcapJake really, so I can specify a DESTDIR on the make install?
16:35 MadcapJake and it won't affect how the paths are written to the scripts?
16:35 hoelzro --prefix tells Perl 6 where it will live someday
16:35 nine MadcapJake: the openSUSE packages are built just like that
16:35 MadcapJake nine, thanks, that'll be really helpful
16:35 hoelzro DESTDIR tells make install where to move the files
16:35 hoelzro we have arch PKGBUILDS in perl6/os-build that should be pretty easy to fllow
16:36 nine MadcapJake: https://build.opensuse.org/package/view_file/home:niner9:branches:devel:languages:parrot/rakudo/rakudo.spec?expand=1
16:36 MadcapJake hoelzro, those don't seem to do this though, i've been looking at the arch packages for a few days now
16:36 zwu joined #perl6
16:36 MadcapJake nine, thanks!
16:37 hoelzro MadcapJake: do what, --prefix?
16:37 nine MadcapJake: and yes the rm -rf commands are really a good idea. The precomp files generated during make install are useless and contain the build directory.
16:37 hoelzro you should probably trust nine's answer more; my arch pkgbuilds are probably rather outdated
16:37 MadcapJake hoelzro, oh i see that arch uses destdir actually, gah! I'm just not very knowledgeable with make/make install
16:38 MadcapJake hoelzro, nine: it looks like both of your packages separate moar and nqp out into separate packages, is that a good idea?
16:39 hoelzro MadcapJake: for arch, it's necessary
16:39 hoelzro although...you *could* probably get away without it
16:39 hoelzro it would just be hacky
16:40 MadcapJake yeah that's the predicament i'm in.  I've been trying really hard to just generate it all in one package, but i think it will be cleaner to separate them
16:40 hoelzro I recommend giving in and just doing separate packages
16:40 MadcapJake but if i can use destdir, i might be able to get away with it B)
16:40 hoelzro but that's from my experience
16:41 pjscott joined #perl6
16:41 hoelzro MadcapJake: the problem is if you install Moar or NQP to DESTDIR, and you try to invoke them to build Rakudo, they'll be looking in PREFIX for their runtime files
16:41 hoelzro I think Moar can handle it
16:41 hoelzro I don't think NQP can
16:41 hoelzro but I may be wrong
16:41 MadcapJake hoelzro, that's exactly the problem i've been having actually!
16:41 MadcapJake nqp fails to find moar
16:41 hoelzro I just tried once, it didn't work, and moved on =)
16:42 MadcapJake ok so it's settled, just make it three packages and be done with it! thanks so much hoelzro & nine!
16:43 nine MadcapJake: thanks for packaging rakudo :)
16:43 hoelzro indeed!
16:43 hoelzro MadcapJake++
16:45 MadcapJake no prob! this OS is really neat and need my perl 6 if I'm gonna stick with it :P
16:46 Skarsnik what system?
16:47 MadcapJake https://solus-project.com it's a really nice custom gnome-shell and a custom-built OS underneath
16:48 MadcapJake I'm not particular knowledgeable of build systems but I think theirs is pretty innovative (along the lines of Nix package manager, I believe) https://wiki.solus-project.com/EvoBuild
16:49 RabidGravy but linux of some sort under the hood
16:49 MadcapJake yep
16:50 RabidGravy I was getting excited, I guess at some point somebody will get it to work on something really exotic
16:50 MadcapJake yeah custom-built everything beyond linux kernel :P
16:52 Zoffix I see I'm not the only one posting P6 results on this :) https://twitter.com/OvidPerl/status/685770487989932032
16:52 Zoffix <3 Perl 6
16:53 Skarsnik m: say "Story" ~~ /^(.+?)"+"?/
16:53 camelia rakudo-moar 725348: OUTPUT«「S」␤ 0 => 「S」␤»
16:54 Zoffix m: say "Story" ~~ /^(.+?)"+"? $/
16:54 camelia rakudo-moar 725348: OUTPUT«「Story」␤ 0 => 「Story」␤»
16:54 psy_ joined #perl6
16:54 Skarsnik m: say "Story+{Role}" ~~ /^(.+?)"+"?/
16:54 camelia rakudo-moar 725348: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QsOUQdhBfw␤Undeclared name:␤    Role used at line 1␤␤»
16:54 Skarsnik m: say 'Story+{Role}' ~~ /^(.+?)"+"?/
16:54 camelia rakudo-moar 725348: OUTPUT«「S」␤ 0 => 「S」␤»
16:54 skids joined #perl6
16:55 Zoffix m: say 'Story+{Role}' ~~ /^(<-[+]>+)"+"?/
16:55 camelia rakudo-moar 725348: OUTPUT«「Story+」␤ 0 => 「Story」␤»
16:55 Zoffix m: say 'Story+{Role}' ~~ /^(<-[+]>+?)"+"?/
16:55 camelia rakudo-moar 725348: OUTPUT«「S」␤ 0 => 「S」␤»
16:55 Zoffix :(
16:55 Zoffix Whatcha tryina match?
16:56 autarch ok, so Z is not what I wanted - how can I do something like this "for @a, @b -> $a, $b { ... }" where $a & $b get one element at a time from their respective lists?
16:56 Skarsnik Story
16:56 Zoffix Why is that not Z?
16:56 Skarsnik Well I want to capture Story
16:56 autarch Z produces a set of 2 element lists
16:56 hoelzro ah, my bad
16:56 Zoffix m: say 'Story+{Role}' ~~ /^(\w+)/
16:56 camelia rakudo-moar 725348: OUTPUT«「Story」␤ 0 => 「Story」␤»
16:56 hoelzro for @first Z @second -> ($first-element, $second-element) { ... }
16:56 autarch oh, I just need to destructure
16:56 hoelzro autarch: ↑
16:57 Skarsnik \w will probably fail with what perl6 accept as class name
16:57 hoelzro I always forget what needs destructuring and what doesn't
16:57 hoelzro Z does, .kv doesn't
16:57 Skarsnik m: class My_class-a {};
16:57 camelia rakudo-moar 725348: ( no output )
16:57 Zoffix Skarsnik, that's why I asked what you're trying to match :)
16:58 Zoffix m: say "Story+{Role}" ~~ /^(.+) '+'?  '{'/
16:58 camelia rakudo-moar 725348: OUTPUT«5===SORRY!5=== Error while compiling /tmp/a7hz3Om0Yw␤Undeclared name:␤    Role used at line 1␤␤»
16:58 Zoffix m: say 'Story+{Role}' ~~ /^(.+) '+'?  '{'/
16:58 camelia rakudo-moar 725348: OUTPUT«「Story+{」␤ 0 => 「Story+」␤»
16:58 moritz autarch: for @a Z @b -> ($a, $b) { ... } works fine and is idiomatic
16:58 * Zoffix use Acme::GiveUp;
16:58 autarch moritz: yep, already figured that out - I got hung up on the destructuring at first
16:59 moritz autarch: the alternative is to use explicit flattening: for flat @a Z @b -> $a, $b { ... }
16:59 autarch ah
16:59 hoelzro ahhh
17:00 lucasb or more uglier: @a Z[&slip] @b
17:00 RabidGravy boom
17:00 Skarsnik m: say 'Story+{Role}' ~~ /^[!"+"]+/
17:00 camelia rakudo-moar 725348: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter ! (must be quoted to match literally)␤at /tmp/__ofolUpaN:1␤------> 3say 'Story+{Role}' ~~ /^[7⏏5!"+"]+/␤Unrecognized regex metacharacter " (must be quoted to match literally)␤at /tmp/__ofo…»
17:00 Skarsnik m: say 'Story+{Role}' ~~ /^<!"+">+/
17:00 camelia rakudo-moar 725348: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at /tmp/yhfZ85WfeE:1␤------> 3say 'Story+{Role}' ~~ /^<!7⏏5"+">+/␤Unable to parse regex; couldn't find final '/'␤at /tmp/yhfZ85WfeE:1␤------> 3say …»
17:00 timotimo m: my Int @a[5] = 0, 1, 2, 3, 4; @a >>does>> <Hello How Are You>; .say for @a; say @a.gist; say @a.perl;
17:00 camelia rakudo-moar 725348: OUTPUT«Cannot mix in non-composable type Str into object of type Int␤  in block <unit> at /tmp/sSonG0rdkh line 1␤␤»
17:00 timotimo aaw
17:01 Skarsnik I think grouping is weird x)
17:01 Skarsnik m: say 'Story+{Role}' ~~ /^<!+>+/
17:01 camelia rakudo-moar 725348: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at /tmp/pu3uvlatMb:1␤------> 3say 'Story+{Role}' ~~ /^<!+7⏏5>+/␤Unable to parse regex; couldn't find final '/'␤at /tmp/pu3uvlatMb:1␤------> 3say 'S…»
17:01 RabidGravy okay, so I still couldn't work out any incantation to completely make a role from scratch, but this seems to be enough
17:01 RabidGravy m: my $a = role {}; $a.^set_name("nana"); $a.^add_method("foo", method {"rarr"}); my $b = 1; $b does $a; say $b.WHAT; say $a.foo
17:01 camelia rakudo-moar 725348: OUTPUT«(Int+{nana})␤rarr␤»
17:02 Skarsnik m: say 'Story+{Role}' ~~ /^<[-+]>+/
17:02 camelia rakudo-moar 725348: OUTPUT«Nil␤»
17:02 Skarsnik m: say 'Story+{Role}' ~~ /^(<[-+]>+)/
17:02 camelia rakudo-moar 725348: OUTPUT«Nil␤»
17:04 Skarsnik m: say 'Story+{Role}' ~~ /^<-[+]>+/
17:04 camelia rakudo-moar 725348: OUTPUT«「Story」␤»
17:05 hoelzro there's no way (currently) to get EVAL to behave as if --doc were set, right? like a EVAL $code, :doc ?
17:05 autarch m: say False ~~ False
17:05 camelia rakudo-moar 725348: OUTPUT«False␤»
17:05 autarch is that really intentional?
17:05 Skarsnik lol what
17:05 Skarsnik m: Bool::False ~~ Bool::False;
17:05 camelia rakudo-moar 725348: ( no output )
17:05 Skarsnik m: say Bool::False ~~ Bool::False;
17:05 camelia rakudo-moar 725348: OUTPUT«False␤»
17:06 autarch that just seems really really wrong
17:06 leont Yeah, Bools smartmatch that way
17:06 leont It surprised me too
17:07 Skarsnik m: my Bool $bool1; my $a = False; if ($a ~~ $bool1) {say 'hello'};
17:07 camelia rakudo-moar 725348: OUTPUT«hello␤»
17:07 autarch that's also confusing
17:08 Skarsnik m: my Bool $bool1 = False; my $a = False; if ($a ~~ $bool1) {say 'hello'};
17:08 camelia rakudo-moar 725348: ( no output )
17:08 nine Why? False is a Bool so it smartmatches
17:08 Skarsnik look like that could lead to weird bug
17:09 leont The default value for a Bool isn't false, it's a Bool type-object
17:09 nine While nothing smartmatches False and everything smartmatches True. It's...something to get used to but also the only way we could have defaults.
17:09 moritz Skarsnik: the alternative is also prone to errors
17:09 autarch right, I don't see why a Bool type object matches False
17:09 leont It's the other way around
17:09 leont False matches a Bool type object
17:09 autarch leont: oh, that does make sense
17:09 moritz Skarsnik: having ~~ False always be False and ~~ True always be True enables us to write stuff like ~~ *.defined
17:09 autarch so if I'm _expecting_ False how do I check that I got False?
17:10 leont === False
17:10 leont I also have had to use that
17:10 moritz autarch: !$thing or === False or eqv False
17:10 Juerd Why is it important to you that it's False instead of some other false value?
17:11 leont I needed it when dealing with an Enum that could be false, that I needed to handle differently
17:13 autarch Juerd: because I'm comparing object attributes that I expect to get, and the object contains a Bool-typed attribute
17:14 Juerd autarch: If you know it's going to be a Bool, why not just use !$foo ?
17:14 Skarsnik It's annoying to remember that Array attribute are Positionnal and not Array :(
17:14 autarch Juerd: I have a hash of key/value pairs where keys are attributes to check and values are ... anything
17:15 autarch and I'd rather not special case lots of different types - using === seems to work well
17:15 Juerd Well, === is all about special casing.
17:15 mst === will test reference eqaulity and eqv contents?
17:15 moritz mst: yes
17:16 mst egads, a use for my time in clisp land
17:16 Juerd What do you mean by "reference equality"? =:= tests identity equality.
17:16 Skarsnik m: my Str @a; say @a.^type.of; say @a.^type.of.defined;
17:16 camelia rakudo-moar 725348: OUTPUT«Method 'type' not found for invocant of class 'Perl6::Metamodel::ClassHOW+{<anon>}+{<anon>}'␤  in block <unit> at /tmp/ZEkkvEl8tm line 1␤␤»
17:16 moritz Juerd: =:= tests container equality
17:16 Juerd moritz: Is this a container versus value thing?
17:16 moritz m: my ($a, $b); say $a =:= $b; say $a =:= $a;
17:16 camelia rakudo-moar 725348: OUTPUT«False␤True␤»
17:17 moritz m: my ($a, $b); say $a =:= $b; say $a =:= $a; say $a === $b;
17:17 camelia rakudo-moar 725348: OUTPUT«False␤True␤True␤»
17:17 moritz Juerd: yes
17:17 Juerd Thanks. TIL :)
17:17 Skarsnik m: my Str @a; say @a.WHAT.of; say @a.WHAT.of.defined;
17:17 camelia rakudo-moar 725348: OUTPUT«(Str)␤False␤»
17:17 Skarsnik damn how I know the Array is 'typed' ?
17:17 Juerd Any array is typed. The default type is Any.
17:18 moritz m: @a; say @a.of.perl
17:18 camelia rakudo-moar 725348: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jIAPcwgECS␤Variable '@a' is not declared␤at /tmp/jIAPcwgECS:1␤------> 3<BOL>7⏏5@a; say @a.of.perl␤»
17:18 moritz m: my @a; say @a.of.perl
17:18 camelia rakudo-moar 725348: OUTPUT«Mu␤»
17:18 moritz Juerd: Mu, not Any
17:18 Juerd To know that the array is typed to something other than Any, @a.WHAT.of !=== Any, I'd guess.
17:18 Juerd Huh?
17:18 Skarsnik m: my Str @a; say @a.WHAT.of; say @a.WHAT.of !=== Any;
17:18 camelia rakudo-moar 725348: OUTPUT«(Str)␤True␤»
17:18 Juerd Why's the default type for array values Mu, but the default type for scalar values Any/
17:18 mst but given there's always a type of some sort, one would imagine that testing it that way is odd anyway
17:18 moritz Juerd: otherwise you couldn't store a junction in an array
17:18 Juerd m: my $a; say $a.WHAT
17:18 camelia rakudo-moar 725348: OUTPUT«(Any)␤»
17:19 Skarsnik m: my Str @a; say @a.WHAT.of; say @a.WHAT.of !=== Mu;
17:19 camelia rakudo-moar 725348: OUTPUT«(Str)␤Cannot call infix:<===>(Str, Mu); none of these signatures match:␤    ($?)␤    ($a, $b)␤    (Int:D \a, Int:D \b)␤    (int $a, int $b)␤    (Num:D \a, Num:D \b)␤    (Num $ where { ... }, Num $ where { ... })␤    (num $a, num $b --> Bool…»
17:19 Juerd m: my @a; say $a.of.WHAT
17:19 camelia rakudo-moar 725348: OUTPUT«5===SORRY!5=== Error while compiling /tmp/w6lqe7SMhz␤Variable '$a' is not declared. Did you mean '@a'?␤at /tmp/w6lqe7SMhz:1␤------> 3my @a; say 7⏏5$a.of.WHAT␤»
17:19 Juerd er :)
17:19 Juerd m: my @a; say $a.WHAT.of
17:19 camelia rakudo-moar 725348: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Mnq9CwfEOq␤Variable '$a' is not declared. Did you mean '@a'?␤at /tmp/Mnq9CwfEOq:1␤------> 3my @a; say 7⏏5$a.WHAT.of␤»
17:19 Juerd I see what I did wrong but I won't spam the channel more than this :)
17:19 Skarsnik m: my @a; say @a.WHAT.of; say @a.WHAT.of !=== Mu;
17:19 camelia rakudo-moar 725348: OUTPUT«Cannot look up attributes in a type object␤  in block <unit> at /tmp/ZUPn_Z5qjB line 1␤␤»
17:19 Skarsnik $a = @a
17:19 Skarsnik m: my @a; say @a.WHAT.of; say @a.WHAT.of;
17:19 camelia rakudo-moar 725348: OUTPUT«Cannot look up attributes in a type object␤  in block <unit> at /tmp/GeqUJxKqJQ line 1␤␤»
17:20 Skarsnik that...
17:20 timotimo why would you inspect the .of of the WHAT?
17:20 timotimo m: my @a; say @a.of.perl
17:20 camelia rakudo-moar 725348: OUTPUT«Mu␤»
17:20 Skarsnik I want to know the type of an Array
17:20 timotimo don't forget the .WHAT gives you the type object
17:20 Skarsnik well the of
17:20 dalek ecosystem: 04668e6 | hoelzro++ | META.list:
17:20 dalek ecosystem: Add POD::EOD to ecosystem
17:20 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/04668e673e
17:21 Skarsnik m: my Str @b; my @a; say @a.WHAT.can('of'),  @b.WHAT.can('of');
17:21 camelia rakudo-moar 725348: OUTPUT«(of of)(of of of)␤»
17:21 Skarsnik m: my Str @b; my @a; say @a.WHAT.^can('of'),  @b.WHAT.^can('of');
17:21 camelia rakudo-moar 725348: OUTPUT«(of of)(of of of)␤»
17:21 Skarsnik gah
17:21 moritz Skarsnik: not that you can use @a.of directly; no need to go through @a.WHAT.of
17:21 moritz Skarsnik: s/not/note/
17:22 timotimo going through .WHAT.of is wrong, too.
17:22 timotimo not just unnecessary
17:22 Skarsnik why it's wrong?
17:22 moritz timotimo: I don't think so
17:22 Juerd m: my $a; say $a.WHAT; $a = 1|2; say $a.WHAT;
17:22 camelia rakudo-moar 725348: OUTPUT«(Any)␤(Junction)␤»
17:22 moritz m: my Str @a; say @a.^name
17:22 camelia rakudo-moar 725348: OUTPUT«Array[Str]␤»
17:22 timotimo oh, the .of is a property of the type, not the instance?
17:22 Juerd moritz: Why can this Any hold a junction?
17:22 hoelzro DOC INIT { use Pod::EOD; } # if I'm not using --doc, should a file with this in it fail to compile if Pod::EOD is not installed? that seems LTA
17:22 Skarsnik Yes, of in on the type
17:22 moritz Juerd: $a is typed Mu but defaults to Any
17:22 hoelzro m: DOC INIT { use Pod::EOD }
17:22 camelia rakudo-moar 725348: OUTPUT«===SORRY!===␤Could not find Pod::EOD in:␤    /home/camelia/rakudo-m-inst-1/share/perl6/site␤    /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-1/share/perl6␤    CompUnit::Repository::AbsolutePath<140234873832976>…»
17:22 timotimo m: my $a; say $a.VAR.of
17:22 camelia rakudo-moar 725348: OUTPUT«(Mu)␤»
17:23 Juerd I see
17:23 Juerd Thanks
17:23 moritz just like 'my @a' defaults to Array and is typed Positional
17:23 Juerd What's the benefit of defaulting to Any instead of Mu?
17:23 Skarsnik why array attribute are Positional?
17:24 moritz Juerd: Any is the default constraint type for parameters, so you'd get dispatch failures for uninitialized variables
17:24 skids @ sigil's constraint is it must contain a Positional.
17:24 Skarsnik It really weird when doing stuff with A.^attributes
17:24 moritz Juerd: like  my $x; $x++; # would fail if $x defaulted to Mu
17:24 moritz orelse $++ on a junction of variables wouldn't work
17:24 Juerd moritz: Ah. Thanks.
17:25 moritz it tooks us some iterations to find that out the hard way :-)
17:26 Skarsnik How I know a class is not a Core class?
17:26 Skarsnik Yes I have weird need x)
17:26 timotimo you can go through CORE::.keys (except be careful of StopIteration being in there)
17:26 moritz m: say CORE::<Int>.exists
17:26 camelia rakudo-moar 725348: OUTPUT«Method 'exists' not found for invocant of class 'Int'␤  in block <unit> at /tmp/w_irkTOQ0G line 1␤␤»
17:26 timotimo oh. or that
17:26 moritz m: say CORE::<Int>:exists
17:26 camelia rakudo-moar 725348: OUTPUT«True␤»
17:26 llfourn m: class Foo {}; CORE::<Foo>:exists.say
17:26 camelia rakudo-moar 725348: OUTPUT«False␤»
17:27 moritz it's a hash; you don't have to iterate it to check of existence :-)
17:27 timotimo well .....
17:27 timotimo m: constant Foo = Int; say CORE::{Foo}:exists
17:27 camelia rakudo-moar 725348: OUTPUT«Use of uninitialized value of type Int in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/fGzaxdFDgl line 1␤False␤»
17:27 timotimo m: constant Foo = Int; say CORE::{Foo.name}:exists
17:27 camelia rakudo-moar 725348: OUTPUT«Method 'name' not found for invocant of class 'Int'␤  in block <unit> at /tmp/20QrUEWwqW line 1␤␤»
17:27 timotimo m: constant Foo = Int; say CORE::{Foo.^name}:exists
17:27 camelia rakudo-moar 725348: OUTPUT«True␤»
17:27 moritz could still be redeclared in an inner scope
17:27 timotimo ah
17:27 moritz m: { my class Date { }; say CORE::{ Date.^name}:exists }
17:27 camelia rakudo-moar 725348: OUTPUT«True␤»
17:28 timotimo right, that's more problematic. so you'll need to check identity, too
17:28 moritz m: { my class Date { }; say CORE::{ Date.^name}:exists && CORE::{ Date.^name } =:= Date }
17:28 camelia rakudo-moar 725348: OUTPUT«False␤»
17:28 timotimo good
17:28 moritz m: {  say CORE::{ Date.^name}:exists && CORE::{ Date.^name } =:= Date }
17:28 camelia rakudo-moar 725348: OUTPUT«True␤»
17:28 moritz and yes, that's actually abusing =:=
17:28 llfourn moritz: shouldn't you check ===
17:28 Zoffix m: my \x = 2; say x x x x x # :D
17:28 camelia rakudo-moar 725348: OUTPUT«2222␤»
17:29 moritz but if you know you have no containers, =:= works, and doesn't require extra care with Mu
17:29 llfourn moritz: ah yeh that makes sense
17:29 moritz (which is why the setting code uses =:= to test for StopIteration)
17:29 hoelzro I suppose DOC INIT doesn't defer use statements in its block?
17:29 llfourn what if you do have containers and have Mu?
17:29 hoelzro I can get around it with DOC INIT { require Pod::EOD }, but I'm wondering if use in DOC blocks should be skipped unless %?DOC
17:29 hoelzro er, $?DOC
17:30 moritz llfourn: I don't know; which is why I'd prefer it if === didn't autothread, but I was overruled in that decision
17:30 TimToady I see why the warning for ~~ True and ~~ False went away; testing a patch
17:30 yoleaux 12:02Z <CIAvash> TimToady: Is there a reason '≠', '≤' and '≥' are not used for '!=', '<=' and
17:31 llfourn moritz: ah. I sorta ran into that problem the other day... I think I worked around it somehow
17:31 dustinm` joined #perl6
17:31 Zoffix +1 for '≠', '≤' and '≥'
17:32 Zoffix I'd use them way more often than ÷ ^_^
17:32 mst I'm going to end up writing an asciimogrifier for code where people do that
17:32 Zoffix mst, why?
17:32 Zoffix mst, get on with the times, old man :P
17:32 mst i.e. something that pops them out into the ascii form for me to edit, and then back into whatever they were so the patch is clean
17:33 mst lets me continue to be a grumpy minimalist in the corner without stopping other people :P
17:33 TimToady well, depends on what you're minimalizing there
17:33 Zoffix Sounds like an easy thing to do with perl -pi -e''.
17:33 moritz mst++
17:33 Zoffix Surely ⊈ is much clearer than !(<=)
17:34 moritz Zoffix: such things are always easy, until you hit the corner cases
17:34 moritz like, not wanting to do that inside literals
17:34 mst TimToady: Bill Joy's visual interface for ex is not what you'd call designed for unicode
17:34 mst and I'm running a private fork of the real thing ;)
17:34 TimToady either you have to track where the non-ascii was, or you have to translate everything back to non-ascii even if it wasn't before
17:34 citizenX joined #perl6
17:35 mst well, if somebody's code isn't consistently one or the other I can send them two patches to pick between first
17:35 Zoffix I guess this is the sort of thing good for the /bikeshed repo? I want '≠', '≤' and '≥' and some sort of star char for the [Hyper]Whatever star
17:35 virtualsue joined #perl6
17:35 TimToady well, a real unicode-aware editor has got to do better on proportional spacing
17:35 Skarsnik if you are curious I am doing that https://gist.github.com/Skarsnik/ea16c3d9b305bed0f536 with these weird MOP stuff x)
17:36 TimToady merely having single and double-wide characters is not sufficient
17:36 Zoffix Skarsnik, an ORM?
17:36 uruwi joined #perl6
17:36 * mst still remembers the days when I could say "I haven't fallen into every classsic trap, I've written a web framework and a templating system but not an ORM yet"
17:37 Zoffix We do need an ORM in P6 tho :P
17:37 Skarsnik yes, but I did not find something that did not ask me specify lot of stuff. It's to cover small case where Class = Table in DB
17:37 TimToady m: say m: say ????
17:37 camelia rakudo-moar 725348: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LyXmcb8Mgp␤Colons may not be used to delimit quoting constructs␤at /tmp/LyXmcb8Mgp:1␤------> 3say m:7⏏5 say ????␤    expecting any of:␤        colon pair (restricted)␤»
17:37 Zoffix I'm only 1 out of three for those :)
17:37 TimToady m: say ????
17:37 camelia rakudo-moar 725348: OUTPUT«9␤»
17:38 Zoffix Skarsnik++
17:38 Zoffix .u ????
17:38 yoleaux U+1242B CUNEIFORM NUMERIC SIGN NINE SHAR2 [Nl] (????)
17:38 Skarsnik and I use WHY for fun ^^
17:39 Skarsnik I could even say 'id' that look like a good primary key candidate xD
17:39 ghost_ joined #perl6
17:40 Zoffix And I also want subtest 'test description', { code-of-the-subtest };
17:41 sena_kun joined #perl6
17:41 * Zoffix starts github.com/perl6/zoffixs-wishes-and-demands
17:41 Skarsnik Oh yeah
17:41 DrForr While you're at it I'd like to add $num-tests-to-run to that list.
17:41 TimToady maybe the killer app of P6 is to ignore the browsing guts of a browser and use the rendering engine to write a proportional terminal emulator
17:41 Zoffix I can't believe I'm in the minority on the subtest() stuff :/
17:41 Skarsnik I don't use subtests since you can't name it :)
17:41 DrForr Or at least nested 'plan $x' inside subtests, which might FAIK work, haven't tried it.
17:42 DrForr subtest sub { }, 'name goes here';
17:43 Zoffix DrForr, yeah, plan inside does work
17:43 lucasb anyone knows if that 'my Int $x = CORE' bug is rakudobugged? I tried searching zefram's bugs, but didn't found it
17:43 Zoffix But that's not really now it looks like... It's subtest { TOOONS OF CODE HERE }, 'name goes here'; and it's pretty easy to add a multi for subtest 'name goes here', { TOOONS OF CODE HERE };
17:43 mst which, frankly, is the only place a plan is a good idea
17:44 mst top level plans are just merge error generators
17:44 Zoffix s/now/how/;
17:44 llfourn m: .say for '????'..'????';
17:44 camelia rakudo-moar 725348: ( no output )
17:44 llfourn :(
17:44 mst Zoffix: of course, you start discussing this just after leont quits
17:44 Zoffix m: .say for ????..????;
17:44 camelia rakudo-moar 725348: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤»
17:44 Zoffix mst, well, I brought it up ages ago, but no one shared my opinion :)
17:45 llfourn Zoffix: you can't print the chars through :(
17:45 Zoffix Ah
17:45 mst I have to say 'subtest $name, $code;' seems far far nicer
17:45 mst and I'm not sure why it's t'other way round
17:45 Zoffix mst, for consistency with all the other &test, $expected, $optional-description
17:46 DrForr Because the name is the last argument in the other tests, I'd guess.
17:46 mst right, but a subtest isn't the same thing
17:46 sena_kun Another question about NativeCall is here... Is there any way I can print CArray insides? I loss data in between of two loc and don't know how to debug where exactly.
17:46 yoleaux 10:47Z <RabidGravy> sena_kun: I added a working example to your gist, it doesn't fail but I don't have the bzip2 dev packages to check it is doing the right thing
17:46 * mst grumbles
17:46 * Zoffix nods
17:46 DrForr And I'd agree, it should be at the front for readability's sake.
17:46 mst a foolish consistency is the hobgoblin of little minds
17:46 mst (for once, the -real- quote applies, not the bastardised version ;)
17:47 Zoffix :)
17:47 DrForr Egads, the perl6 tutorial is 1st thing in the morning, 1st day of OSCON.
17:47 RabidGravy mst, it could even be a multi so both the "description first" and "description last " be happy
17:47 Zoffix Is that bad?
17:47 mst RabidGravy: which is -probably- the right thing to do, yeah
17:47 DrForr I am *so* not a morning person.
17:48 lucasb TimToady: do you think enum E 'a','b','c' should work? or is the parentheses there really required?
17:49 RabidGravy hey I've giveen some great talks with the worst hangovers ;-)
17:50 DrForr This will be 9 hours of jet lag *plus* hangover.
17:50 * Zoffix just found 3 Unicode ops without a valid Texas variant :)
17:51 RabidGravy more booze to balance it out and it will be great
17:51 mst RabidGravy: yeah, and IIRC you also dragged me out of LPW to the pub at lunch for a couple pints because I needed that to de-hangover enough to give mine ;)
17:51 Skarsnik sena_kun, I had issue with acceding data with a Carray that was pointing to data on a Str I give the the lib, and I had to explictly manage the Str for no reason
17:51 Zoffix m: say 5**+; say 5**-; say 5**⁻
17:51 camelia rakudo-moar 725348: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vBOSRI6q5R␤Prefix + requires an argument, but no valid term found␤at /tmp/vBOSRI6q5R:1␤------> 3say 5**+7⏏5; say 5**-; say 5**⁻␤    expecting any of:␤        prefix␤»
17:51 RabidGravy ;-)
17:51 Zoffix They're listed in http://doc.perl6.org/language/unicode_texas tho
17:51 mst DrForr: drink breakfast. you'll be fine.
17:52 zakharyas joined #perl6
17:52 DrForr Well, there'll be a bottle of Chartreuse Noix in my bag on the way over, that'll handle the rest :)
17:52 CIAvash joined #perl6
17:53 RabidGravy you can't have chartreuse unless BooK is involved ;-)
17:53 dalek doc: 7920764 | (Zoffix Znet)++ | doc/Language/unicode_texas.pod:
17:53 dalek doc: Remove Texas superscript +/- as those do not work
17:53 dalek doc:
17:53 dalek doc: And they don"t really need to
17:53 dalek doc: review: https://github.com/perl6/doc/commit/7920764f9f
17:54 dalek rakudo/nom: 4f2bfcf | TimToady++ | src/Perl6/Actions.nqp:
17:54 dalek rakudo/nom: re-enable warning on ~~ True and ~~ False
17:54 dalek rakudo/nom:
17:54 dalek rakudo/nom: The warning was accidentally bypassed by code that makes it possible
17:54 dalek rakudo/nom: to chain ~~ on rhs literals.
17:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4f2bfcf1f5
17:55 CIAvash m: say 2 ** -3
17:55 camelia rakudo-moar 725348: OUTPUT«0.125␤»
17:55 CIAvash m: say 2⁻³
17:55 camelia rakudo-moar 725348: OUTPUT«0.125␤»
17:55 TimToady I assume the doc problem was the Texas part, not the superscript part
17:56 sena_kun Skarsnik, let it be explicit, but how can I do that? I need to convert carray which I passed into function to blob, but blob is empty after "my $blob = Blob.new($buff);". I wonder is it I write something wrong with initialization or it's some type problem.
17:56 sena_kun s/write/wrote/
17:57 Skarsnik $buff is a Buf?
17:57 TimToady lucasb: it's possible we could relax on the parens at some point, but I'm in no mood to redesign the language just yet :)
17:57 timotimo sena_kun: the reason is $buff.elems
17:57 timotimo there's not yet a super clever way to get the first N elements of a CArray into a blob or buf ...
17:57 RabidGravy sena_kun, check out my NativeHelpers::Array, it has most of those things
17:57 moritz I kinda like the requirements for parens (or a quoting construct), as to limit the impact of two terms in a row
17:58 timotimo oh, neat
17:58 sena_kun timotimo, I'll try now, okay.
17:58 lucasb TimToady: ok, thanks
17:58 sena_kun RabidGravy, thanks for reference. I'll look at it.
17:59 Zoffix TimToady, yeah, 5⁻ was listed equivalent of 5**-, and 5**- doesn't actually work (and don't need to)
17:59 RabidGravy most are so simple you can just copy them
17:59 TimToady as for ≠ and friends, sure, we could add them specifically, but I'm more interested in fixing the bug that prevents them from being user-defined correctly as chaining operators
17:59 sena_kun Skarsnik, $buff is a CArray, actually(name is strongly temportary).
18:01 gist_nb joined #perl6
18:02 vendethiel joined #perl6
18:05 RabidGravy sena_kun, the only way of dealing with CArray is to copy the elements one by one, they don't know how long they are just the same as actual C arrays
18:06 RabidGravy so a C function that populates an array must always tell you how big
18:06 RabidGravy or more typically you give an array and say how big
18:07 mst my $buff is Strong;
18:11 lucasb ah, I found the ticket I was looking: https://rt.perl.org/Public/Bug/Display.html?id=126891
18:11 lucasb I was going to add more snippets there, but I think there's no need. the ticket already cover all cases
18:11 Zoffix What's the way to check the message from `fail` in the test?
18:11 Zoffix m: sub foo { fail "error"; }; use Test; throws-like { foo }, X::AdHoc.new: :payload<error>
18:11 camelia rakudo-moar 4f2bfc: OUTPUT«    1..2␤    ok 1 - code dies␤    not ok 2 - right exception type (X::AdHoc)␤    ␤# Failed test 'right exception type (X::AdHoc)'␤# at /home/camelia/rakudo-m-inst-2/share/perl6/site/precomp/EFD1604865713AD5BB2DC596308FC4E2FDE573CD.1452363029.0371…»
18:11 lucasb m: my Int $x; $x = module {}; $x = package {}; $x = role {}; say 'ok'  # this snippet
18:11 camelia rakudo-moar 4f2bfc: OUTPUT«ok␤»
18:13 Skarsnik it ignore the type?!
18:14 lucasb maybe because a Failure is not an Exception?
18:15 Zoffix The expected/got match in the full output: https://gist.github.com/zoffixznet/313f5520cdd6440a68bf
18:16 Zoffix It works if I just use `X::AdHoc`, but I need to test the actual message is correct
18:17 moritz m:  m: sub foo { fail "error"; }; use Test; throws-like { foo }, Exception, message => /error/;
18:17 camelia rakudo-moar 4f2bfc: OUTPUT«    1..3␤    ok 1 - code dies␤    ok 2 - right exception type (Exception)␤    ok 3 - .message matches /error/␤ok 1 - did we throws-like Exception?␤»
18:18 Zoffix Thanks
18:18 moritz Zoffix: throws-like uses try, which fatalizes fail()s, so you get an exception back, not a Failure
18:18 moritz and the exception has .message, not .payload
18:18 TimToady .tell gfldex could you please file a bug for Q:s:b{\$x}?
18:18 yoleaux TimToady: I'll pass your message to gfldex.
18:19 lucasb timotimo: btw, I was reading the backlog, just want to note that when iterating CORE::.keys, there's no need to worry about IterationEnd, because the hash keys are strings, not the actual objects
18:20 lucasb you actually wrote StopIteration... I was going to make a joke about this is not Python, but nevermind :)
18:20 gfldex TimToady: i shall file as you wish
18:20 yoleaux 18:18Z <TimToady> gfldex: could you please file a bug for Q:s:b{\$x}?
18:21 _nadim joined #perl6
18:21 timotimo lucasb: oh, durr :)
18:22 dalek doc: ad791da | (Zoffix Znet)++ | doc/Language/testing.pod:
18:22 dalek doc: Add example of testing a fail()
18:22 dalek doc: review: https://github.com/perl6/doc/commit/ad791dab7e
18:22 dalek doc: 542ca73 | (Zoffix Znet)++ | doc/Language/testing.pod:
18:22 dalek doc: Strip trailing whitespace
18:22 dalek doc: review: https://github.com/perl6/doc/commit/542ca7395e
18:25 gfldex TimToady: filed as wished under #127226
18:31 lucasb what should that Q:s:b{\$x} return? "42" or "$x" ?
18:31 gfldex 42
18:32 gfldex it's The Answer after all
18:32 lucasb but "\$x" returns '$x'
18:32 gfldex sorry, i'm confused
18:32 lucasb what you get evaluated first, the scalar interpolation or the backslash escaping the dollar sign
18:32 lucasb ?
18:33 lucasb m: my $x = 42; say "\$x"
18:33 camelia rakudo-moar 4f2bfc: OUTPUT«$x␤»
18:33 lucasb *what will get eval first
18:33 gfldex \$ should ignore the $ and remove the \
18:33 TimToady I think :s should turn on backslashing for $
18:34 * gfldex return ENOSLEEP
18:35 TimToady and for \
18:35 TimToady much like q turns on backslashing for \ and the delimiter
18:36 lucasb ok, makes sense. so Q:s/\$x/ should return '$x' ?
18:36 TimToady nod
18:39 lucasb and Q:b/\$x/ currently returns '\$x', but I think it should return only '$x'. iow, consume that backslash
18:40 lucasb m: say Q:b/\z/
18:40 camelia rakudo-moar 4f2bfc: OUTPUT«\z␤»
18:40 lucasb perl -wE 'say "\z"'  #=> returns 'z' and warning: Unrecognized escape \z passed through
18:43 TimToady that's because it's in double quotes
18:45 TimToady perl -wE "say '\z'"  # returns '\z'
18:45 TimToady I'd argue this is more like '' than ""
18:47 TimToady but only weakly, since I can see an argument for the other side as well
18:49 TimToady one could argue that :b is the most important component of :qq
18:49 TimToady and that, even though we're building stuff up from Q, :b is what trips it over into :qq semantics
18:51 TimToady unfortunately, that would really be a breaking change for 6.c, so we'd have to think about it
18:51 Floyd-ATC Trying to IO::Socket::INET.write() a HTTP response header, I use .encode('ascii') on the Str to make it a Blob. According to tcpdump it looks right but for some reason both curl and Firefox ignores the \r\n\r\n and treats the content as part of the header. I'm so confused...
18:53 TimToady arguably, the number of programs depending on that "feature" is pretty close to 0 currently, and I doubt roast tests for it
18:53 TimToady so it's likely fair game to be classified as a bug
18:54 Zoffix Floyd-ATC, what about \n\n?
18:54 CIAvash TimToady: can you please take a look at this question I asked a few weeks ago? http://irclog.perlgeek.de/perl6/2015-12-23#i_11762824
18:56 Floyd-ATC Zoffix: Same result, the header and content doesn't get separated. I'm fairly sure I'm messing up the type/encoding in some way but I just can't see it
18:56 Zoffix no idea
18:57 nzkindest joined #perl6
18:57 Skarsnik Floyd-ATC, what is your full output? and did you try using the http::message/http::response class in h:u:a?
19:00 patrickz joined #perl6
19:01 Floyd-ATC I don't want to dump several lines here but the headers themselves are perfectly valid - I'm basically just trying to mimic a response to wrap my head around p6's types
19:01 Floyd-ATC tried encoding as 'ISO-8859-1' now, same result
19:01 Floyd-ATC looks perfect in tcpdump but it just doesn't work
19:02 pnu "home" repo got missing from the default $*REPO.repo-chain in recent rakudos.. I wonder if I got the fix right?  https://github.com/rakudo/rakudo/pull/678
19:05 lizmat Zoffix: re 7920764 , strangely enough, I lifted the superscript +- from the code, so if they don't work, it's a bug :-)
19:06 Zoffix lizmat, they do work, but not their texas variants
19:06 lizmat aaahhhhh... ok
19:07 Floyd-ATC I've been programming in various languages since the early 90s but this... this is so difficult to work with I really can't see myself writing anything in it that's meant for production :-(
19:07 Zoffix Floyd-ATC, do you have a code example to look at?
19:07 Floyd-ATC Hang on
19:08 Zoffix If it looks perfect in tcpdump, I can't imagine why the browsers would be ignoring it :P
19:08 lnrdo joined #perl6
19:10 Floyd-ATC http://pastebin.com/hsGecyGK
19:10 Floyd-ATC There HAS to be a difference there somewhere, I just can't see it
19:12 Zoffix Floyd-ATC, HTTP1/1 is wrong
19:12 Zoffix Funny, Palemoon captures it as "HTTP/0.9 200 OK"
19:13 Zoffix Yup, changing lines 38 and 39 to HTTP/1.1 showed something in the browser
19:14 Skarsnik And I don't know what is confusing, Str are unicode, if you want unencoded stuff you need Buf x)
19:14 glucosade joined #perl6
19:14 Floyd-ATC OK, I'm off to hang myself in the basement now :-)
19:14 Skarsnik or Blobl
19:14 Zoffix :D
19:15 _Vi joined #perl6
19:16 TimToady CIAvash: I don't see anything wrong with your code, offhand, so please file a bug report if it leaks memory
19:17 Floyd-ATC Well, it starts being confusing when you're only 90% sure what you're doing and it doesn't work. And Perl is traditionally very good at DWIM
19:17 Zoffix Yeah :)
19:17 TimToady m: say False ~~ False
19:17 camelia rakudo-moar 4f2bfc: OUTPUT«Potential difficulties:␤    Smartmatch against False always fails; if you mean to test the topic for truthiness, use :!so or *.not or !* instead␤    at /tmp/u2LwNJJQ1M:1␤    ------> 3say False ~~ 7⏏5False␤False␤»
19:18 TimToady that one works again :)
19:18 Zoffix m: say True ~~ True
19:18 camelia rakudo-moar 4f2bfc: OUTPUT«Potential difficulties:␤    Smartmatch against True always matches; if you mean to test the topic for truthiness, use :so or *.so or ?* instead␤    at /tmp/xvj3rNd1FI:1␤    ------> 3say True ~~ 7⏏5True␤True␤»
19:18 Floyd-ATC Zoffix: Thanks for lending a fresh pair of eyes though, this was driving me crazy
19:18 Zoffix neat
19:18 Zoffix Floyd-ATC, no problem :)
19:18 Floyd-ATC stupid typo
19:19 CIAvash TimToady: ok, thanks
19:20 lucasb the warning suggests ":so". any example where this adverb can be used?
19:20 TimToady m: say True ~~ :so
19:20 camelia rakudo-moar 4f2bfc: OUTPUT«True␤»
19:20 lucasb ah, like that
19:20 TimToady m: say "anything" ~~ :so
19:20 camelia rakudo-moar 4f2bfc: OUTPUT«True␤»
19:20 lucasb TimToady: thanks!
19:21 TimToady m: say Cool ~~ :!so
19:21 camelia rakudo-moar 4f2bfc: OUTPUT«True␤»
19:21 Juerd not so Cool after all?
19:21 Juerd m: say not so Cool
19:21 camelia rakudo-moar 4f2bfc: OUTPUT«True␤»
19:21 TimToady it's not so true, anyway
19:22 Zoffix m: say Perl or not Cool
19:22 camelia rakudo-moar 4f2bfc: OUTPUT«(Perl)␤»
19:23 lucasb wrong precedence :P
19:23 Juerd Perl is a type?
19:23 Juerd What does it do?
19:23 Zoffix huggable, Perl
19:23 huggable Zoffix, nothing found
19:24 * Zoffix shrugs
19:24 awwaiid huggable?
19:24 yoleaux 09:55Z <nine> awwaiid: nice blog post! Actually...I do recommend to people to use Perl 5's Inline::Python even for critical production code. I can recommend this in good concience because that's what we do.
19:25 Zoffix huggable, help
19:25 huggable Zoffix, I'm a factoid bot. See me my source at https://github.com/zoffixznet/perl6-IRC-Client-Plugin-Factoid
19:25 dalek rakudo/nom: a540b79 | (Panu Ervamaa)++ | src/core/CompUnit/RepositoryRegistry.pm:
19:25 dalek rakudo/nom: Use p6box_s for version when setting home repo
19:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a540b7951c
19:25 dalek rakudo/nom: 20d5f0e | lizmat++ | src/core/CompUnit/RepositoryRegistry.pm:
19:25 dalek rakudo/nom: Merge pull request #678 from pnu/nom
19:25 dalek rakudo/nom:
19:25 dalek rakudo/nom: Use p6box_s for version when setting home repo
19:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/20d5f0ed33
19:29 awwaiid Zoffix: fancy!
19:29 Ch0c0late joined #perl6
19:30 lucasb m: 'oh hai' ~~ :say  # now I understood the adverb with ~~ . It's just method invocation
19:30 camelia rakudo-moar 4f2bfc: OUTPUT«oh hai␤»
19:31 lucasb the warning for False suggest ':!so', but it could suggest ':not'
19:31 awwaiid lucasb: that's interesting. So you're saying that is equivalent to 'oh hai'.say ?
19:32 TimToady it could, but there's something to be said for teaching the :!foo form too
19:32 lucasb awwaiid: iiuc, yes, that's equivalent
19:33 kjk joined #perl6
19:33 awwaiid m: say ('oh hai' ~~ :perl) ; say 'oh hai'.perl
19:33 camelia rakudo-moar 20d5f0: OUTPUT«True␤"oh hai"␤»
19:33 lucasb TimToady: hm, ok. point taken :)
19:33 Skarsnik hm I can't use a Type as a key in a hash?
19:34 awwaiid m: say (5 ~~ :is-prime)
19:34 camelia rakudo-moar 20d5f0: OUTPUT«True␤»
19:34 sena_kun joined #perl6
19:34 dalek rakudo/nom: 8c97759 | lizmat++ | src/core/ (3 files):
19:34 dalek rakudo/nom: Remove the Date/DateTime.new positional candidates
19:34 dalek rakudo/nom:
19:34 dalek rakudo/nom: To make it more like 6.c , even though there were no tests in roast
19:34 dalek rakudo/nom: to test the positional interface, it was felt it would be better to
19:34 dalek rakudo/nom: make sure the interface does not change at all.
19:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8c97759fbc
19:34 lnrdo joined #perl6
19:34 awwaiid lucasb: I think it calls the method AND forces .Bool?
19:35 Zoffix m: my %foo = Int => 42; say %foo<Int>
19:35 camelia rakudo-moar 20d5f0: OUTPUT«42␤»
19:35 Zoffix Skarsnik, you can if you make it a string first :P
19:35 awwaiid still -- that's pretty powerful and convenient
19:36 * lizmat marks 8c97759 as a commit to be reverted for 6.d
19:36 Skarsnik make me think, is there a way to get the basename of a class?
19:36 TimToady m: my %foo := :{ (Int) => 42 }; say %foo{Int}
19:36 camelia rakudo-moar 20d5f0: OUTPUT«42␤»
19:36 Zoffix :o
19:36 Skarsnik like without the namespace or its roles
19:38 TimToady m: my %foo{Any}; %foo{Int} = 42; say %foo{Int}
19:38 camelia rakudo-moar 20d5f0: OUTPUT«42␤»
19:38 awwaiid Skarsnik: what's an example of the input and output you desire?
19:38 Skarsnik m: class A {}; sub foo($a) {my %h{$a} = "foo"}; foo(A);
19:38 camelia rakudo-moar 20d5f0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VdVYllw4Gp␤Invalid hash shape; type expected␤at /tmp/VdVYllw4Gp:1␤------> 3class A {}; sub foo($a) {my %h{$a}7⏏5 = "foo"}; foo(A);␤    expecting any of:␤        constraint␤»
19:38 Skarsnik m: class A {}; sub foo($a) {my %h; %h{$a} = "foo"}; foo(A);
19:39 camelia rakudo-moar 20d5f0: OUTPUT«Use of uninitialized value $a of type A in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in sub foo at /tmp/i0H9g1FAGD line 1␤»
19:39 TimToady use %h{Any} if you want an object key
19:39 awwaiid m: class A {}; sub foo($a) {my %h<Any>; %h{$a} = "foo"}; foo(A);
19:39 TimToady as I already demoed above
19:39 camelia rakudo-moar 20d5f0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Tu_RUrYeye␤Shaped variable declarations not yet implemented. Sorry. ␤at /tmp/Tu_RUrYeye:1␤------> 3class A {}; sub foo($a) {my %h<Any>7⏏5; %h{$a} = "foo"}; foo(A);␤»
19:40 Skarsnik m: class A {}; sub foo($a) {my %h{Any}; %h{$a} = "foo"}; foo(A);
19:40 camelia rakudo-moar 20d5f0: ( no output )
19:40 awwaiid m: class A {}; sub foo($a) {my %h{Any}; %h{$a} = "foo"}; foo(A);
19:40 camelia rakudo-moar 20d5f0: ( no output )
19:40 awwaiid oops
19:40 Zoffix lizmat, what should be done with https://rt.perl.org/Ticket/Display.html?id=127186 ?
19:40 Zoffix It's about positionals and Date[Time]
19:42 Skarsnik Zoffix, is that valid sqlite: author_id Int REFERENCES Author(id) or I need the foreign key keyword?
19:42 lizmat Zoffix: did'n't moritz fix that already in c19142cf26eaeff ?
19:42 kjk hello~ how do you refer to a method of an object without calling it?   "asdf".say
19:43 Zoffix lizmat, right, but it's marked as "tests needed". Are they still needed if the positionals are not longer an option?
19:43 Zoffix kjk, what do you mean "refer to"?
19:43 lizmat not for 6.c, so let's wait until we have 6.d testing set up
19:43 Zoffix k
19:44 kjk Zoffix: I want to hold on to it, with the object bound to it, and call it later
19:44 Zoffix kjk, .^can I believe
19:44 Zoffix m: class Foo { method bar { say "barrrs!" }; }; my $sub = Foo.new.^can: 'bar'; $sub()
19:44 camelia rakudo-moar 20d5f0: OUTPUT«Invocant requires a type object of type List, but an object instance was passed.  Did you forget a 'multi'?␤  in block <unit> at /tmp/xo6duPpKX2 line 1␤␤»
19:44 Zoffix wat
19:45 CIAvash For those interested, I blogged about entering unicode characters in Emacs(the rfc1345 part can be used for Vim too) http://blog.ciavash.name/2016/01/09/entering-perl6-unicode-characters-in-emacs.html
19:45 Skarsnik m: class Foo { method bar { say "barrrs!" }; }; my $sub = Foo.new.^can('bar'); $sub()
19:45 camelia rakudo-moar 20d5f0: OUTPUT«Invocant requires a type object of type List, but an object instance was passed.  Did you forget a 'multi'?␤  in block <unit> at /tmp/yV4xhRSsmr line 1␤␤»
19:46 Skarsnik and can call it I think
19:46 lucasb you have to ^can('method')[0], because it's a list
19:46 Zoffix m: class Foo { method bar { say "barrrs!" }; }; my $sub = Foo.new.can('bar'); $sub.perl.say
19:46 camelia rakudo-moar 20d5f0: OUTPUT«$(method bar (Foo $: *%_) { #`(Method|79663304) ... },)␤»
19:46 Zoffix Ah
19:46 Zoffix m: class Foo { method bar { say "barrrs!" }; }; my $sub = Foo.new.can('bar'); $sub[0]()
19:46 camelia rakudo-moar 20d5f0: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in method bar at /tmp/RwVlfT7MBN line 1␤  in block <unit> at /tmp/RwVlfT7MBN line 1␤␤»
19:46 Zoffix m: class Foo { method bar { say "barrrs!" }; }; my $sub = Foo.new.^can('bar'); $sub[0]()
19:46 camelia rakudo-moar 20d5f0: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in method bar at /tmp/Z_bFYjzdg2 line 1␤  in block <unit> at /tmp/Z_bFYjzdg2 line 1␤␤»
19:46 Juerd CIAvash: When typing the unicode character is more work than typing the texas variant, I'm not inclined to use the unicode variant :)
19:47 Zoffix kjk, well you get the idea ^_^
19:47 TimToady Juerd: well, do you care about the readers of your code?
19:47 Juerd s/more/much more/
19:47 TimToady most code is read many more times than it is written
19:47 Juerd TimToady: That's another thing, I'm afraid that other people will have worse unicode/utf8 setups than I do :)
19:48 kjk i see.., though it's not bound to the object it seems. but i can work with that.., thanks all!
19:48 TimToady by that argument no progress will ever be made
19:48 lucasb My terminal is not even configure for unicode! :) That's why at least errors/warnings could avoid unicode chars
19:48 Juerd TimToady: This is one of those changes where I'm not convinced that it actually is progress, but I am happy that Perl 6 supports this so that people who care can at least try :)
19:49 Zoffix lucasb, heh, what's next? Avoid images on the docs site, because you're using a 56K modem? :P
19:49 TimToady 56K? wow, that's fast!
19:49 Juerd I might use → though if it were supported. Because it's so pretty compared to -> ;)
19:49 lucasb well, I'm browsing with lynx, so I don't see images :)
19:49 Zoffix :o
19:49 Juerd lucasb: For real?
19:49 lucasb just kidding :)
19:50 Juerd I was hoping that :)
19:50 sena_kun I'm annoynig today, probably, but what can be wrong here - http://pastebin.com/braJQ3M9 ? It's already three hours I'm trying to find out why value just vanishes.
19:50 Zoffix Juerd, the other day there was a person in here who uses w3m for everything
19:51 Juerd I've used w3m a lot and I still use it from time to time, but I mostly ditched it as sites began to become unusable without things such as Javascript.
19:51 llfourn joined #perl6
19:53 Juerd sena_kun: Where's the rest of the code? Like copy-carray-to-buf... And what's the issue?
19:55 TimToady sena_kun: in the absence of any information about what you're calling, I'd guess it's pre-GLR or pre-Christmas code
19:56 RabidGravy sena_kun, I'm surprised this doesnt segfault, you use "my $temp = CArray[uint32].new; my $len = BZ2_bzRead($bzerror, $bz_read, $temp, $size);"  without extending the $temp to the required length
19:56 dalek ecosystem: 9ae6497 | (Zoffix Znet)++ | META.list:
19:56 dalek ecosystem: Add IO::MiddleMan to the Ecosystem
19:56 dalek ecosystem:
19:56 dalek ecosystem: IO::MiddleMan - hijack, capture, or mute writes to an IO::Handle - https://github.com/zoffixznet/perl6-IO-MiddleMan
19:56 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/9ae6497811
19:57 RabidGravy $temp[$len] = 0; should do the trick
19:57 TimToady sena_kun: and if there's additional info in the backlog, I haven't got to it yet
19:57 sena_kun Juerd, copy-carray-to-buf is a part of NativeHelpers::Array module. Issue is: I'm trying to write bindings to bzip2. I can write things, but reading don't work as it should. C function push result of reading to CArray(with correct values in length) and... And result is zeroed.
19:57 lizmat hmmm... apparently Date.new *did* have a positional candidate, DateTime.new didn't
19:57 TimToady so obviously other people are tracking this better than me, so I'll shut up now :)
19:58 lizmat star-m: say DateTime.new(1999,12,12,0,0,0)
19:58 camelia star-m 2015.09: OUTPUT«Default constructor for 'DateTime' only takes named arguments␤  in block <unit> at /tmp/rAVgnOdcUR:1␤␤»
19:58 lizmat star-m: say Date.new(1999,12,12)
19:58 camelia star-m 2015.09: OUTPUT«1999-12-12␤»
19:58 * lizmat continues fixing
19:59 CurtisOvidPoe p6: say DateTime.now.perl
19:59 camelia rakudo-moar 8c9775: OUTPUT«DateTime.new(:year(2016),:month(1),:day(9),:hour(20),:minute(59),:second(28.8908677101135e0),:timezone(3600))␤»
19:59 CurtisOvidPoe Hmm, on my box that’s this: DateTime.new(2016,1,9,20,59,6.68587803840637,3600)
19:59 patrickz joined #perl6
20:00 Zoffix CurtisOvidPoe, lizmat just pushed a commit that changed that
20:00 Zoffix s/just/25m ago/;
20:00 CurtisOvidPoe Zoffix: thanks! Missed that bit. It was part of why I changed my slides in my FOSDEM talk, so I was curious to see it coming up here.
20:00 lizmat CurtisOvidPoe: to preserve 6.c.ness
20:00 CurtisOvidPoe I’m too 6.c for my code …
20:01 Juerd CurtisOvidPoe: Upcoming fosdem talk? Looking forward to it!
20:01 CurtisOvidPoe Jeurd: it’s a major rewrite of last year’s FOSDEM talk, aimed at those who’ve never heard of Perl before. Works much better.
20:02 CurtisOvidPoe “Juerd”, even. (Who’s Jeurd?)
20:02 Juerd I don't know who Jeurd is :)
20:03 CurtisOvidPoe I hear he’s a jerk.
20:04 Juerd How come you talk with proper quotes on IRC?
20:05 Juerd And an actual …, even.
20:05 TimToady why not?
20:05 Juerd I'm not complaining :)
20:06 TimToady ASCII is so 1970s
20:06 Juerd I'd like to know why, or actually, what's making it so.
20:06 TimToady a number of folks here are using clients that tend toward smartquotes
20:07 TimToady that's why Perl 6 handles them now
20:07 Juerd Let's see if irssi can do this
20:07 Zoffix P6's module production grew by 300% on http://www.modulecounts.com/ :)
20:07 Zoffix What's curious is P5's doubled too.
20:07 sena_kun joined #perl6
20:07 arnsholt (If it's irssi, it's mostly a question of your terminal emulator, font and screen setup [if any])
20:08 Zoffix (as compared to, like, last couple weeks of last year)
20:08 CurtisOvidPoe I’m using Colloquy on a Mac and I’ve tried to disable smart quotes, but no love. On the plus side, I can type code directly into my Perl 6 PowerPoint presentations without toggling smart quotes all the time :)
20:08 Juerd Apparently irssi doesn't have this feature...
20:10 Skarsnik Zoffix, where do you see the grow? x)
20:10 stmuk__ I hadn't noticed https://fosdem.org/2016/schedule/track/perl/ is up
20:10 dalek rakudo/nom: dde4cef | lizmat++ | src/core/Date (2 files):
20:10 dalek rakudo/nom: Turns out Date.new *did* have positionals in 6.c
20:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/dde4cefb56
20:11 El_Che stmuk__: the last speaker confirmed today
20:11 El_Che so the list is definitive
20:11 Zoffix Skarsnik, http://www.modulecounts.com/ The last few weeks of 2016, the 'Avg Growth' for P6 was 1/day, dropping to 0/day sometimes, and for P5 it as 4/day. Now it's 3/day for P6 and 8/day for P5
20:15 hankache joined #perl6
20:16 lnrdo joined #perl6
20:16 hankache good evening #perl6
20:16 patrickz joined #perl6
20:17 Zoffix \o
20:18 marmay joined #perl6
20:27 vendethiel joined #perl6
20:28 _nadim joined #perl6
20:32 lizmat TimToady: any thoughts an allowing ≤ and friends ?
20:32 lizmat (in 6.d. obviously :-)
20:34 TimToady https://irclog.perlgeek.de/perl6/2016-01-09#i_11859391
20:35 lizmat TimToady++
20:37 frankjh joined #perl6
20:41 RUR joined #perl6
20:42 RUR hi
20:43 RUR i am trying to call some native library function which takes pointer to filehandler
20:44 RUR i am getting
20:44 RUR Native call expected return type with CPointer representation, but got a P6opaque
20:44 sena_kun RUR, did you meant "FILE*" pointer?
20:44 RUR yes
20:45 autarch RUR: a gist would probably help
20:45 sena_kun Paste somewhere C function signature and your perl6 function signature. Probably you want just "Pointer".
20:46 arnsholt Sounds like you're trying to pass a Perl 6 file handle
20:46 arnsholt That's not gonna work
20:47 arnsholt We don't have a good story for passing Perl 6 file handles off to native functions
20:47 sena_kun arnsholt, we always can bind "fopen" and "close" from default C library at the place and use it.
20:48 RUR https://gist.github.com/anonymous/9a1e1917c7eb737c0310
20:48 arnsholt Sure, but then you have to do ALL of your IO with libc functions
20:48 arnsholt Which is probably going to suck
20:48 RUR yes i am passing perl filehandle
20:48 arnsholt Yeah, that's not supported
20:49 arnsholt You'll have to wrap fopen as well
20:49 RUR hmm yes i was already thinking about opening it C library, but i though there can be easier way
20:49 arnsholt 'Fraid not
20:49 sena_kun RUR, and it seems you're writing a bz2 library bindings, aren't you?
20:49 RUR just trying
20:49 RUR :)
20:49 arnsholt In your gist, you can't pass $error there either
20:50 RabidGravy or use native-descriptor on the perl filhandle, and use fdopen with result
20:50 sena_kun RUR, it's fun, because I'm just trying too currently.
20:50 arnsholt RabidGravy: Someone implemented that? Cool!
20:50 arnsholt RUR: Apparently I'm way out of date!
20:50 arnsholt Try what RabidGravy said
20:50 Skarsnik it's like 2 weeks old?
20:50 RabidGravy yeah, I put a ticket jnthn fixed it :)
20:52 RabidGravy yeah RUR, apparently you are doing the same as sena_kun have a chat so we don't have to explain the same stuff again ;-)
20:52 llfourn joined #perl6
20:52 RUR yup :), ok thanks for help
20:53 sena_kun RUR, just write to me directly then(through I'm not confident too) if any.
20:53 Skarsnik and is the great and powerful trixie!
20:53 Skarsnik *use
20:53 RabidGravy arnsholt, you can even do ioctl, syswrite and everything with it :)
20:54 arnsholt Oh, wait. It returns the int fd, or a FILE*?
20:54 RabidGravy fd
20:54 pi4 joined #perl6
20:54 RabidGravy more useful for most things
20:55 RabidGravy and if you must you can bind fdopen to get a FIL*
20:55 arnsholt Then it won't work directly for RUR. But there's fdopen that converts an fd to a FILE*
20:55 RabidGravy yeah
20:55 arnsholt Yup! =)
20:57 lizmat not to mean to rain on the parade, but I think we cannot allow the native descriptor in 6.c
20:58 RabidGravy why?
20:58 lizmat because the library that is now is being developed, would *NOT* work on all compiler releases of 6.c
20:58 RabidGravy it was on the xmas rt list and got implemented before xmas
20:58 lizmat did it ?
20:58 RabidGravy yes
20:59 lizmat ok, then I will most gladly shut up  :-)
20:59 nine lizmat: since jnthn went on holiday right at release time, we can be quite sure that everything he implemented is in 6.c :)
20:59 RabidGravy like 15th dec or something
21:00 masak lizmat++ # staying vigilant
21:01 RabidGravy yeah, I wrote code that used it on 16th december
21:01 RabidGravy so definitely before then :)
21:01 lizmat 344113cecbf5ffafe84da to be precise
21:02 lizmat Implment fileno_fh op.
21:02 lizmat
21:02 lizmat Provides access to the native descriptor/handle underlying some OS
21:02 lizmat handle. Platform specific.
21:02 TEttinger joined #perl6
21:02 lizmat *phew*
21:02 RabidGravy groovy
21:04 nine Oh wow, while I've been lazily watching Raiders of the Lost Ark, lizmat++ has already prepared DateTime for 6.d :)
21:05 nine lizmat: I guess with that the 6.c spec tests for DateTime pass again?
21:05 lizmat yeah, working on IO::ArgFiles c.s
21:05 lizmat no, because the *test* was faulty
21:05 lizmat and I didn't undo the fix
21:07 dalek rakudo/nom: a28270f | lizmat++ | / (8 files):
21:07 dalek rakudo/nom: Restore old IO::ArgFiles behaviour
21:07 dalek rakudo/nom:
21:07 dalek rakudo/nom: This removes IO::CatPath and IO::CatHandle from the core.  Hope to see
21:07 dalek rakudo/nom: it back some time in 6.d.
21:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a28270f009
21:08 nine lizmat: as soon as you say yes to language_versions, I'll start bringing all the goodness back in 6.d :) Or as soon as we agree on another solution.
21:08 TimToady this seems the best way for now
21:09 * TimToady would really like to get jnthn++ back online before commiting to anything more solid
21:09 lizmat well, an additional fear I have, is that we will have a 6.c that is being optimized, and a 6.d. that will not get optimized until somebody trues to merge changes from the nom branch
21:09 lizmat and then will see massive merge issues
21:10 TimToady Fear is the mind-killer, I fear... :)
21:11 autarch I hope that whatever branch plans you have include regular (daily, ideally) merges
21:11 autarch anything else is asking for trouble
21:11 RabidGravy indeed
21:12 RabidGravy also it makes cherry picking less onerous
21:12 nine lizmat: with jnthn's plan, most of 6.c's code will still be used in 6.d. In fact almost all, so why would we miss those optimizations?
21:12 nine And why are we talking about branches?
21:12 autarch because if 6.d is going to contain breaking changes then you need a branch for it
21:13 nine autarch: no we won't. That's the whole point of jnthn's suggestion. Please have a look at docs/language_versions.md
21:13 dalek roast: ece2218 | lizmat++ | S02-types/WHICH.t:
21:13 dalek roast: Bring test back into 6.c. state
21:13 dalek roast: review: https://github.com/perl6/roast/commit/ece2218545
21:13 masak if the plan means we can avoid having branches, then I like the plan :)
21:14 TimToady well, if the blan to avoid branches makes merging/cherrypicking harder, then I'm not so sure
21:14 TimToady *plan
21:14 nine https://github.com/rakudo/rakudo/blob/nom/docs/language_versions.md
21:14 nine Why would it?
21:14 lizmat nine: how can we "augment" additional files in moar_core_sources ?
21:14 masak why would it make merging/cherry picking harder?
21:14 nine It's completely ortogonal to git and branches
21:14 lizmat without a branch ?
21:15 masak the idea is to have a single code base, which is beneficial in various ways. merging/cherry picking is not affected, except perhaps for the better.
21:15 RabidGravy I'm just confused, ignore anything I might say on the matter
21:16 nine "Additions to the setting will be made in a "nested" setting. That is, a "use v6.d" will load CORE.d.setting or so. It can use augment and supercede in order to effect changes."
21:16 lizmat well, I'm not seeing it either, RabidGravy
21:16 lizmat nine: how can we "augment" new files like IO::CatHandle in moar_core_sources ?
21:16 Skarsnik I though supercede was not implemented?
21:16 autarch nine: a master & nom branch are branches
21:17 nine lizmat: IO::CatHandle will always be contained in the build in the 6.d setting that will only be loaded by source files containing a use v6.d; or use v6.d.PREVIEW;
21:17 lizmat nine: there's a file called moar_core_sources that contains a list of files to *build* the setting
21:18 lizmat if we don't have branches, there's only 1 file of it
21:18 nine We have one perl6 binary containing code for all Perl6 versions. The setting that's built from the src/core/ directory contains everything that is 6.c. There are additional settings in directories src/core.d/ src/core.e/ and so on that contain (much smaller) nested settings that get loaded on demand.
21:18 lizmat how can that be shared between 6.c and 6.d ?
21:18 lizmat ok, so we just add files
21:18 lizmat fine by me
21:18 nine yes
21:19 TimToady as near as I can tell, jnthn's proposal is only that the *tests* go off in their own directory, and everything else stays branches
21:19 lizmat so every compiler will contain all code of all language versions ?
21:19 nine I've started doing that in the language_versions branch. I can do more changes (like bringing back IO::CatFiles) if if helps demonstrating how this is supposed to work
21:19 nine lizmat: yes, yes, yes :)
21:20 * lizmat tries to let that sink in
21:20 TimToady we would like to be able to emulate older versions
21:20 RabidGravy I would hope only current and future versions, otherwise it will be immense in 10 years time :)
21:20 nine Ok, I'll just do further work in the language_versions branch tomorrow. I think it will be quite clear then :)
21:21 lizmat so if I understand the language_versions branch: it is a prototype of the future nom?
21:21 nine yes
21:21 TimToady and nom is currently the "maint" branch of 6.c?
21:21 lizmat still not seeing the "change setting" happening
21:22 lizmat I mean, how can you now change to the RESTRICTED setting when already running, without shelling out ?
21:22 nine lizmat: https://github.com/rakudo/rakudo/blob/language_versions/src/Perl6/Grammar.nqp#L1514
21:23 mohij joined #perl6
21:23 * lizmat tries to wrap her mind around that
21:23 nine That loads the CORE.d.setting.moarvm which is compiled against the CORE.setting. Those are just nested lexical scopes, so we have { CORE.setting { CORE.d setting { user code } }
21:23 nine That's why all 6.c code is still there and still in use except for the parts that are "overwritten" by the 6.d setting
21:24 * RabidGravy falls back in his confidence that everyome is  clever enough to make it work out
21:24 * TimToady had a lot of trouble trying to get -n and -p to be implemented with nested settings, hope you have better luck :)
21:24 virtualsue joined #perl6
21:25 lizmat well, I guess I'm with RabidGravy
21:26 RabidGravy :)
21:26 TimToady well, our standard here is only "different mistakes" :)
21:27 Juerd m: use ????-SEE-NO-EVAL;
21:27 camelia rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/OIWJhJTI33␤Bogus term␤at /tmp/OIWJhJTI33:1␤------> 3use7⏏5 ????-SEE-NO-EVAL;␤    expecting any of:␤        argument list␤        infix␤        infix stopper␤        postfix␤        prefi…»
21:27 Juerd Aww :)
21:27 lizmat .u ????
21:27 yoleaux U+1F435 MONKEY FACE [So] (????)
21:27 RabidGravy I'm with Juerd :)
21:27 TimToady .u ????
21:27 yoleaux U+1F648 SEE-NO-EVIL MONKEY [So] (????)
21:28 TimToady they misspelled it
21:28 lizmat fwiw, I hope that MONKEY-SEE-NO-EVAL will not become one of the category "you think that's cute now"
21:28 lizmat like "tuits", I think it's going to be very hard to explain to non-native english speakers  :-(
21:29 Juerd rotflol, there actually is a SEE-NO-EVIL emoji.
21:29 Juerd Wow.
21:30 TimToady if it becomes horribly un-cute later, it will only add to the stigma of using EVAL
21:31 lizmat m: "say 42".EVAL
21:31 camelia rakudo-moar a28270: OUTPUT«42␤»
21:31 lizmat m: EVAL "say 42"
21:31 camelia rakudo-moar a28270: OUTPUT«42␤»
21:31 TimToady no problem till you interpolate
21:32 lizmat m: my $a = 42; "say $a".EVAL
21:32 camelia rakudo-moar a28270: OUTPUT«42␤»
21:32 lizmat is that a bug ?
21:32 TimToady hmm
21:32 TimToady I'd say so
21:32 * lizmat looks at fixing
21:33 llfourn joined #perl6
21:33 TimToady m: say $a = 42; EVAL "say $a"
21:33 camelia rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xg4_abXWRL␤Variable '$a' is not declared␤at /tmp/xg4_abXWRL:1␤------> 3say 7⏏5$a = 42; EVAL "say $a"␤»
21:33 TimToady m: my $a = 42; EVAL "say $a"
21:33 camelia rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bjADu7u0QY␤EVAL is a very dangerous function!!! (use MONKEY-SEE-NO-EVAL to override,␤but only if you're VERY sure your data contains no injection attacks)␤at /tmp/bjADu7u0QY:1␤------> 3my $a = 42; EVAL…»
21:33 TimToady m: use MONKEY; my $a = 42; EVAL "say $a"
21:33 camelia rakudo-moar a28270: OUTPUT«42␤»
21:34 wamba joined #perl6
21:35 dalee so if i have a CPAN module that is already on github, and i want to publish a perl 6 port, anyone have any idea on what an appropriate naming scheme should be?
21:35 dalee My-Module-Perl6?
21:35 dalee My-Module-6?
21:36 vendethiel joined #perl6
21:36 CurtisOvidPoe Anyone know why when I run “panda install Linenoise” on with the latest (several) builds I get “Could not find Shell::Command in …:”?
21:36 TimToady maybe we just need some regular naming convention such that it can be removed if the 6-ish modules is dropped into an implicitly p6 namespace
21:37 Skarsnik I use perl6-stuff
21:38 Skarsnik for the github name
21:38 RabidGravy dalee, I have just named the *module* exactly the same, the github repo prexixed with p6-
21:38 RabidGravy prefixed
21:38 TimToady hmm, when I trying install Linenoise, I get: Could not find Native::Resources::Build
21:39 dalee CurtisOvidPoe Linenoise seems to install fine via panda for me
21:39 TimToady *try to
21:39 Skarsnik Native::Ressouces?
21:39 moritz somthing funny in the META.info maybe?
21:39 CurtisOvidPoe This is happening on two of my OS X boxes, only one of which is El Capitan. I can’t install any modules :(
21:39 Skarsnik Shell::Command is a panda issue
21:39 CurtisOvidPoe This happened in the past, but seemed to have been resolved.
21:40 CurtisOvidPoe Now it’s back.
21:40 Skarsnik What did you use to install perl6/panda?
21:40 CurtisOvidPoe Srarksnik: rakudobrew build moar && rakudobrew build panda
21:40 RabidGravy goats blood and black candles
21:41 lizmat $ ls -ls lib/.precomp | wc -l
21:41 lizmat 323
21:41 Skarsnik I prefer dark purple candles
21:41 lizmat looks like we need some cleaning logic as well soonish
21:41 RabidGravy hipster ;-p
21:41 TimToady wow, after a bootstrap.pl, I get: resolve stage failed for Linenoise: Dependency Native::Resources is not present in the module ecosystem
21:41 RabidGravy eugh
21:42 Skarsnik CurtisOvidPoe, did you rakudebrew nuke before updating?
21:42 TimToady he dropped off
21:42 CurtisOvidPoe joined #perl6
21:42 Skarsnik CurtisOvidPoe, did you rakudebrew nuke before updating?
21:42 TimToady this is running panda without rakudobrew, btw, just in my git dir
21:43 CurtisOvidPoe Skarsnik: how do I do that? “rakudobrew nuke” doesn’t appear to be a command.
21:44 lizmat good night, #perl6!
21:44 Skarsnik Good night lizmat
21:45 RabidGravy ah, the Native::Resources in the Linenoise meta
21:45 RabidGravy maybe a "panda update" may help here
21:46 TimToady panda update does nothing
21:48 RabidGravy Hmm Native::Resources is definitely there in the ecosystem, maybe its meta is broken
21:48 RabidGravy no looks fine
21:49 * TimToady afks for a bit *
21:50 RabidGravy is the thing that builds the modules.perl.org idfferent to the thing that generates the project.json
21:54 Zoffix RabidGravy, yes
21:54 Zoffix Shell::Command should be installed when panda's installed
21:55 RabidGravy okay, well the Native::Resources is in the projects.json so i dunno
21:55 Zoffix I get '==> Successfully installed Linenoise' with my This is Rakudo version 2015.12-23-ga7ea8e6 built on MoarVM version 2015.12
21:56 Zoffix dalee, I use perl6-Module-Name
21:57 RabidGravy yeah I think it's a case of "unlucky"
21:58 dalee yeah, i'm going with perl6-XXX
21:59 * Zoffix tries a fresh brew of perl6
21:59 dalek rakudo-star-daily: 4989e4c | coke++ | log/ (5 files):
21:59 dalek rakudo-star-daily: today (automated commit)
21:59 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/4989e4c799
21:59 RabidGravy but in the end of the day it's just to disambiguate for github's thing so it's just please yourself
22:02 dalee is there a perl6 sort of equivalent to rt.cpan.org, or would i perhaps be better off just using the github issue tracker?
22:03 Zoffix dalee, github for now.
22:04 Zoffix Well, actually I don't know how rt.cpan.org learns about the module queries. That thing kinda always happened by magic to me.
22:04 RabidGravy I've been trying to push people over to github for the P5 modules too tbh
22:05 Juerd As a CPAN author, I wish I could disable the magic RT thing.
22:05 RabidGravy Juerd, yeah
22:05 Juerd I always forget to look there.
22:05 Juerd Sometimes people will email me and yell at me for not fixing a bug for over a year, or longer.
22:05 BenGoldberg joined #perl6
22:05 Zoffix Ditto
22:05 Juerd And then it's the first time I learn about the report.
22:06 RabidGravy oh I've got ten year old rt tickets
22:07 Juerd You win :)
22:08 RabidGravy there's one about Term::ReadKey and SIGWINCH and sig_action that I just hope if I ignore it long enpugh it will go away ;-)
22:08 Zoffix CurtisOvidPoe, does your 'rakudobrew build panda' output contain "Successfully installed Shell::Command"? It's getting installed before `panda` itself.
22:08 Skarsnik I discover a ticket from 2003. I would prefer getting a mail lol
22:09 Zoffix rakudobrew build moar && rakudobrew build panda; panda install Linenoise; successfully completes for me on a new Debian Wheezy user
22:09 CurtisOvidPoe Zoffix: “rakudobrew build panda” prints “rebootstrap is obsolete. You can upgrade your rakudo while keeping all installed distributions including panda.”
22:10 CurtisOvidPoe A couple of lines later it reads “Done, built panda for moar-nom"
22:10 RabidGravy rakudobrew self-upgrade
22:10 Zoffix CurtisOvidPoe, sounds like you could benefit from rm -fr ~/.rakudobrew; rm -fr ~/.perl6; and then rakudobrew build moar && rakudobrew build panda; panda install Linenoise;
22:10 CurtisOvidPoe Zoffix: trying now.
22:12 Zoffix With the git clone https://github.com/tadzik/rakudobrew ~/.rakudobrew; step after the rm -fr, of course :P
22:12 CurtisOvidPoe Yeah, got that bit :)
22:17 stmuk__ w00t! more 6guts
22:19 RabidGravy mmmm guts
22:19 dalek ecosystem: 00db9ed | (Dale Evans)++ | META.list:
22:19 dalek ecosystem: add Text::Spintax to ecosystem, see https://github.com/daleevans/perl6-Text-Spintax
22:19 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/00db9ed834
22:19 dalek ecosystem: 5315bb5 | moritz++ | META.list:
22:19 dalek ecosystem: Merge pull request #117 from daleevans/patch-1
22:19 dalek ecosystem:
22:19 dalek ecosystem: add Text::Spintax to ecosystem, see https://github.com/daleevans/perl
22:19 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/5315bb5c60
22:21 Zoffix \o/ moar modules \o/
22:21 RabidGravy Rarr!
22:22 RabidGravy CurtisOvidPoe, when are we going to move Corinna to Perl 6?
22:22 RabidGravy I abandoned the moosifaction as I got busy
22:22 CurtisOvidPoe RabidGravy: when I don’t have one company and trying to start a second? :)
22:23 Zoffix I see a whole ton of people use "author" : "Foo Bar", instead of "authors": ["Foo Bar"].
22:23 dalee is it supposed to be authors instead of author?
22:23 Zoffix dalee, as per the spec, yeah
22:23 dalee if so, Module::Minter should be updated
22:23 ely-se joined #perl6
22:24 dalee i will go make a pull request for that
22:24 RabidGravy CurtisOvidPoe, slacker ;-)  I'll start next week
22:24 Zoffix But I'd argue we should allow a single "author" with a string to mean "authors": ["blah"}
22:24 Zoffix dalee++
22:24 pjscott joined #perl6
22:24 RabidGravy dalee, tell them to put a Test::META test in, that actually fails for author only now
22:24 Zoffix dalee, "perl" key is also mandatory; so, "perl": "6.c"
22:25 nine TimToady: what exactly does "panda update does nothing" mean? It does not generate any output if everything works. Have you tried installing Linenoise again after the panda update?
22:25 RabidGravy which is mandatory per the spec
22:25 CurtisOvidPoe With “rakudobrew build panda”, it still fails with “perl 6 needed, this is perl 5…” if $PERL5LIB env var is set.
22:25 dalee what does 6.c mean?
22:25 RabidGravy but nothing but Test::META cares about
22:26 Zoffix dalee, minimum Perl 6 version your module works with
22:26 RabidGravy CurtisOvidPoe, yeah
22:26 dalee so 6.0 at this point, or does 6.c have some meaning?
22:26 CurtisOvidPoe Zoffix: thank you. It looks like Panda works fine now.
22:26 Zoffix m: say so v6.0 before v6.c
22:26 camelia rakudo-moar a28270: OUTPUT«False␤»
22:26 nine CurtisOvidPoe: can you please create a github issue for the PERL5LIB thing?
22:27 RabidGravy it's the current version of the spec
22:27 Zoffix dalee, 6.c is the current version of the spec. There's no 6.0
22:27 CurtisOvidPoe nine: creating it now.
22:27 Zoffix dalee, and 6.0 also is a larger version number
22:27 nine CurtisOvidPoe++
22:28 * Zoffix grumbles about versions and goes back to watching TV
22:28 nine It's "versions" not "version numbers" ;)
22:29 dalee so actually the key should be "perl6": "v6.c" if i understand https://design.perl6.org/S22.html correctly
22:29 RabidGravy yeah, number is confusing
22:29 RabidGravy dalee, no "v"
22:30 orbus anybody know if cas actually works?
22:30 RabidGravy the spec is ambiguous
22:30 orbus in the sense of, is it really atomic?
22:30 orbus because it seems like it's not, or I'm doing something wrong
22:30 orbus m: my $x=0; await start { for ^1000 {cas($x,{$x+1} ) } } xx 8; put $x
22:30 camelia rakudo-moar a28270: OUTPUT«3525␤»
22:30 dalee well, that doc says Mandatory. The minimal perl version for which this distribution can be installed. Specified as a version string. So:
22:30 dalee "perl" : "v6.0.1"
22:31 RabidGravy but it's a string that represents a version, so the v is redundant at best
22:31 CurtisOvidPoe nine: https://github.com/tadzik/rakudobrew/issues/79
22:31 RabidGravy m: say Version.new("v6.c").Str
22:31 camelia rakudo-moar a28270: OUTPUT«v.6.c␤»
22:31 RabidGravy m: say Version.new("v6.c")
22:31 camelia rakudo-moar a28270: OUTPUT«vv.6.c␤»
22:32 RabidGravy the v becomes part of the version which is not what is meant
22:32 setty1 joined #perl6
22:33 ugexe that s22 link is not up to date
22:33 ugexe theres plenty of stuff in there that doesnt even exist anymore
22:36 orbus m: my $x=0; my $l=Lock.new; await start { for ^1000 { $l.protect({$x++}); } } xx 8; put $x
22:36 camelia rakudo-moar a28270: OUTPUT«8000␤»
22:36 orbus locks work at least
22:36 RabidGravy ugexe, yeah
22:37 nine Current panda will warn if the "perl" version has a leading "v" and will strip it.
22:37 RabidGravy orbus, if locks didn't work we'd be in deep do do
22:37 nine Otherwise too many modules would be uninstallable I guess since panda now checks the Perl version
22:37 orbus lol
22:38 RabidGravy nine, yeah META6 warns and strips, if the meta6 version > 0 then it's fatal
22:38 orbus but seems like cas is not working right, or I've misunderstood how to use it
22:38 orbus hmm
22:39 orbus sub cas (\val,&code) { val = code(val) } # naive implementation of cas
22:39 orbus oh
22:39 orbus yeah
22:39 orbus that doesn't look super atomic
22:39 ugexe its not implemented
22:39 orbus guess it's a placeholder
22:39 orbus so I see :)
22:40 ugexe at least not when i asked a few months ago
22:40 orbus well, that's what's in src/core/asyncops.pm
22:40 orbus so I think you're right
22:40 orbus stub implementation
22:41 Quom__ sub cas (\val,&code) { die "Uh, oops." } # naive implementation of cas
22:41 orbus heh
22:42 RabidGravy I thought I so it implemented, or do I need to lay off the crack?
22:43 nzkindest joined #perl6
22:43 orbus well, unless someone implemented it post 2015.12, that straight assignment is what I found in the source
22:44 orbus which would be equivalent as long as you don't actually try to do anything multithreaded
22:45 RabidGravy but isn't it that with a $lock.protect round it? or am I misunderstanding the purpose?
22:45 orbus well, it doesn't have a lock.protect around it
22:46 pjscott joined #perl6
22:46 orbus and I think the idea was to implement without locks
22:46 orbus but sure
22:46 orbus that'd probably be a closer implementation
22:46 orbus The Atomic Compare and Swap (CAS) primitive is directly supported by most modern hardware. It has been shown that it can be used to build a whole range of concurrency control mechanisms (such as mutexes and semaphores). It can also be used to implement lock-free data structures.
22:47 orbus that's what the synopsis says
22:47 orbus since it's talking about lock-free data structures, I'm assuming the backend implementation shouldn't use locks either
22:47 orbus but I am not a concurrency wizard
22:47 RabidGravy yeah, so it would have to be right in the VM
22:47 orbus probably
22:48 orbus guess it's not yet
22:48 orbus in the meantime, an implementation with locks might get closer to expected behavior though
22:49 orbus I think you'd have to maintain a global "cas lock" just for that function though?
22:49 marmay joined #perl6
22:49 orbus hmm
22:49 ugexe the older implementation was just sub cas (\val,&code) { code(val) }
22:50 orbus I don't think that would do what the synopsis says it should
22:50 orbus i.e., swap val to point to the result of code
22:51 RabidGravy { my Slock = Lock.new;  sub cas(*@args) { Slock.protect({ ..... })}}
22:51 RabidGravy but yeah, in the VM
22:52 orbus right - I just mean there'd have to be a lock defined in core for cas's exclusive use
22:52 cdg joined #perl6
22:52 ugexe a proper compare and swap compares if the value is different, and changes it only if so
22:52 ugexe hence the compare
22:52 orbus well
22:53 orbus the synopsis actually talks about two forms
22:53 orbus sub cas($ref is rw, $expected, $new)
22:53 orbus and the form with val and block
22:53 orbus but only the second one seems to be implemented at all
22:54 orbus o support this, there is another &cas candidate that takes a scalar and a block. It calls the block with the seen initial value. The block returns the new, updated value. If nothing else updated the value in the meantime, the reference will be updated. If the CAS fails because another update got in first, the block will be run again, passing in the latest value.
22:55 orbus I'm actually not sure how that's going to work from an implementation perspective
22:55 orbus it seems like you have to store the value of val, run the block, then compare val to "old val"
22:55 RabidGravy yeah, the intel cmpxchg op might be a bit difficult to implement for perl types
22:56 orbus the first form seems more like what I think of as "compare and swap"
22:57 orbus anyway, I have a number of questions about what operations are atomic in perl6 anyway
22:57 orbus and not much of that is documented
22:57 orbus $x++ pretty clearly isn't
22:58 orbus add, then assign I guess
22:59 ely-se I want to implement Inline::COBOL.
22:59 RabidGravy do it
22:59 orbus COBOL programmers will thank you
22:59 orbus all seven of them
22:59 orbus m: my $x=0; await start { for ^1000 { $x++ } } xx 8; put $x
22:59 camelia rakudo-moar a28270: OUTPUT«7271␤»
22:59 RabidGravy I learned cobol
23:00 orbus I have a friend who learned it in college
23:00 orbus and he's not that old
23:00 * geekosaur started out doing cobol
23:00 RabidGravy like 34 years ago but I learnt it
23:00 geekosaur it's still used in business programming contexts
23:00 orbus I know - and from what I understand qualified programmers are in fairly short supply
23:01 orbus if you can do it, pays well
23:01 orbus at least that's what I hear
23:01 Juerd http://rosettacode.org/wiki/Command-line_arguments#Perl_6 could be improved with nicer examples. Anyone interested in writing something up?
23:04 RabidGravy I think the last cobol I wrote around 1997, I needed to alter the general ledger interface to housing system I was working with (which was in informix 4gl)
23:05 geekosaur (sadly my cobol experience is not that useful in the current business world, nobody uses RM/COBOL any more and it had significant differences from more standard versions)
23:05 patrickz joined #perl6
23:05 RabidGravy yeah this was all ICL mainframe stuff
23:06 geekosaur (it doesn;t even exist any more, Micro Focus bought Ryan MacFarlane and killed it)
23:06 Skarsnik Write a cobol interpreter with nqp?
23:07 ely-se no just call gnucobol and link to the resulting shared object
23:08 Juerd And rosettacode is offline *again*
23:08 Juerd I wonder how they manage to be down so much
23:09 ely-se they recently destroyed the perfectly good web design
23:09 CurtisOvidPoe ely-se: there’s an interesting business model with Inline::COBOL if it’s done right :)
23:09 ely-se now it hurts my eyes
23:09 Juerd ely-se: That's just the CSS being broken
23:09 ely-se mediawiki default theme is great
23:09 CurtisOvidPoe Though a grammar and macros would be better.
23:10 ely-se CurtisOvidPoe: more so if implemented in Perl 5
23:10 CurtisOvidPoe Actually, there’s a much better one for Perl 6, but I don’t want to spam the channel with it right now :)
23:11 mohij joined #perl6
23:11 CurtisOvidPoe In particular, COBOL’s native decimal types map well to Perl 6 rationals and would be crucial to making it work for large scale accounting systems whcih want to gradually migrate away.
23:13 ely-se COBOL picture clauses don't map well to Perl 6 rationals however
23:13 orbus m: sub casx(\val,&code){state $l=Lock.new; $l.protect({val=code(val)})}; my $x=0; await start {for ^1000 {casx($x,{$_+1})}} xx 8; put $x;
23:13 camelia rakudo-moar a28270: OUTPUT«8000␤»
23:13 orbus that seems to do it
23:13 orbus although I'm a little unsure about using state there
23:14 orbus not sure about the concurrency implications
23:14 orbus but the problem with that implementation is the lock is held for the duration of block
23:15 orbus really just the compare and swap at the end should be locked, in the absence of a system level implementation
23:15 orbus given the description in the synopsis
23:15 orbus hmmm
23:16 CurtisOvidPoe ely-se: COBOL’s packed decimals seem great for Rats. So long as the data returrned maps cleany to COBOL memory, things should be good (with the caveat that the devil is in the details).
23:16 patrickz joined #perl6
23:16 CurtisOvidPoe I was working on a new business idea around that, but with one business running and another one in the works, I don’t have much free time :)
23:17 RabidGravy I was actually thinking about making a thing whereby you could define the attributes of a class with cobol PIC traits so you could read write strait from a cobol made storage
23:17 RabidGravy straight
23:17 geekosaur need more than PIC there
23:18 ely-se I yet have to find a use-case for COBOL.
23:18 geekosaur USAGE {DISPLAY,COMPUTATIONAL,COMPUTATIONAL-3, probably others in various implementations}
23:18 geekosaur (storage format for those is ASCII, binary, packed decimal respectively)
23:18 CurtisOvidPoe RabidGravy: I suspect you can’t write directly to storage because we’re talking about multiple OSs, versions of those OSs, versions of COBOL, different machine instruction sets, and so on.
23:18 geekosaur well, EBCDIC
23:19 geekosaur depending on platform
23:19 CurtisOvidPoe In fact, some companies have built in-house COBOL compilers with custom extensions due to the fear of COBOL providers going bankrupt.
23:19 RabidGravy I made some stuff in Perl a long time ago to pick the bits out of cobol storage to migrate an ancient planning system
23:19 geekosaur not to mention that some constraints are not defined at the level of COBOL when the implementation is from an OS that uses a record management abstraction (AS/400, VMS, etc.)
23:21 RabidGravy yeah, I haven't really worked in those kinds of enterprises for 15 years
23:21 vendethiel joined #perl6
23:21 RabidGravy AS/400 you can just do an sql query on *any* file
23:22 RabidGravy ok plain test may only have one column but hey
23:22 geekosaur yep. tjey don;t have a filesystem. they have a global database.
23:25 RabidGravy all good
23:29 RabidGravy and don't get me started on idms
23:30 mohij joined #perl6
23:30 RabidGravy I guess that went away with icl maiframes
23:31 RabidGravy and cafs
23:31 Juerd Going through these rosettacode things is really annoying if it's down more than it's up... :)
23:31 RabidGravy actually I've used cafs on unix with informix
23:33 orbus .seen FROGGS
23:33 yoleaux I saw FROGGS 8 Jan 2016 16:37Z in #perl6: <FROGGS> nine: maybe we can remove it later on...
23:33 orbus .tell FROGGS failing tests on arm you asked about http://paste.scsys.co.uk/504181
23:33 yoleaux orbus: I'll pass your message to FROGGS.
23:34 RabidGravy orbus, I RT'd that
23:35 masak 'night, #perl6
23:35 Juerd @rosettacode.grep(/^C/) checked.
23:35 Juerd 9 items with a C in http://rosettacode.org/wiki/Category:Perl_6_examples_needing_attention
23:36 nzkindest joined #perl6
23:36 pjscott joined #perl6
23:36 RabidGravy orbus, I took a look at the code and I think it's mostly due to getting the alignment wrong on arm
23:39 RabidGravy unfortuntely the build slowness on the RPi militated against me investigating further
23:43 pjscott joined #perl6
23:44 pjscott joined #perl6
23:47 yqt joined #perl6
23:50 vendethiel joined #perl6
23:50 wollmers joined #perl6
23:50 wollmers hi rakudistas
23:51 wollmers p6: my uint64 $z = +^0;say sprintf("%064b",$z);
23:51 camelia rakudo-moar a28270: OUTPUT«00000000000000000000000000000000000000000000000000000000000000-1␤»
23:51 dalek tablets: 75874f6 | (Herbert Breunung)++ | docs/appendix- (2 files):
23:51 dalek tablets: added numeric type
23:51 dalek tablets: review: https://github.com/perl6/tablets/commit/75874f6efa
23:52 wollmers p6: my uint32 $z = +^0;say sprintf("%032b",$z);
23:52 camelia rakudo-moar a28270: OUTPUT«11111111111111111111111111111111␤»
23:52 wollmers p6: my uint64 $z = +^0;say sprintf("%064b",$z-1);
23:52 camelia rakudo-moar a28270: OUTPUT«0000000000000000000000000000000000000000000000000000000000000-10␤»
23:53 wollmers p6: my uint64 $z = 1 +<63;say sprintf("%064b",$z);
23:53 camelia rakudo-moar a28270: OUTPUT«-1000000000000000000000000000000000000000000000000000000000000000␤»
23:53 RabidGravy the unsigned part in the perl world is only a decoration right now
23:54 wollmers What's the current policy regarding changes of the spec-tests?
23:54 RabidGravy it may have meaning when passed into the native world
23:55 wollmers The unsigned seem to work so far. The spec-tests for sprintf() are wrong.
23:59 wollmers @RabidGravy As far as I tested them, uint64 work with bitops.

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

Perl 6 | Reference Documentation | Rakudo