»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
sena_kun | How can I dereference Pointer using NativeCall(for tests)? | 00:00 | |
gfldex | m: my $s = '42'; put Q:s:b{\$s} | 00:01 | |
camelia | rakudo-moar d7f3f0: OUTPUT«\42» | ||
gfldex | shouldn't the \ vanish? | ||
00:01
skids joined
00:02
bpmedley left,
regreg joined,
hankache joined
|
|||
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 | ||
profan | RabidGravy: sounds good :), i'll let you know if anything else comes up or things go out of wack | 00:05 | |
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:07 | |
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:09 | |
00:12
wamba joined
|
|||
gfldex | m: my $s = '42'; put Q:q:s{\$s} | 00:12 | |
camelia | rakudo-moar d7f3f0: OUTPUT«\$s» | ||
00:13
AndyDee left
|
|||
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? | ||
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 | ||
-I path work | |||
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
00:18
lostinfog left,
bpmedley joined
|
|||
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 | |
(www.dagolden.com/index.php/2589/per...-enemies/) | |||
gfldex | m: my $s = '42'; put Q:qq{\$s$s {$s}}, ' ', Q:s:a:h:f:c:b{\s$s {$s}} | ||
camelia | rakudo-moar d7f3f0: OUTPUT«$s42 {42} \s42 {42}» | ||
stmuk__ | I can't see any probs with the RC0 R* | 00:21 | |
Skarsnik | Good night #perl6 | ||
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:21
Skarsnik left
|
|||
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 $ | ||
yoleaux | U+0024 DOLLAR SIGN [Sc] ($) | ||
gfldex | m: my $s = '42'; put Q:s:b{\c[DOLLAR SIGN]s$s$s} | 00:26 | |
camelia | rakudo-moar d7f3f0: OUTPUT«$s4242» | ||
RabidGravy | is there any way that one can gain control of the way that multi candidates are selected programmatically, (without rewriting the language)? | ||
AlexDaniel | stmuk__: let's use it as a secure random number generator! | ||
00:27
leont joined
|
|||
timotimo | sortiz: did you try that environment variable that turns on module loading debugging? | 00:27 | |
sortiz: or try printing the repo chain? | |||
00:27
yurivish left
|
|||
stmuk__ | people still use LISP and Fortran afterall (I've even seen the latter in jobs and, horror of all horrors csh) | 00:27 | |
hankache | we still have COBOL people at work | 00:28 | |
and AS400 machines | 00:29 | ||
profan | * "Run To The Hills" starts playing in the background * | 00:30 | |
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? | ||
stmuk__ | I bet people use VMS still even | ||
RabidGravy | timotimo, probably int32 | 00:32 | |
hankache | timotimo int32 ? | ||
sena_kun | timotimo, int32. | ||
timotimo | oh? well, all right | ||
flussence | you wouldn't think it on x64, but apparently that's it in all cases... | 00:33 | |
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 | ||
RabidGravy | if you're unsure it's just compile a little C program that prints sizeof(foo) | ||
sena_kun, is that "void" or "void *" if the former just omit any retuns thing | 00:36 | ||
timotimo fixes up SDL2::Raw as well as Cairo | 00:37 | ||
RabidGravy | timotimo++ | ||
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 | ||
timotimo | i'm not sure what exact version i should supply ... | ||
sena_kun | RabidGravy, just a second... | 00:39 | |
timotimo | tell me, what did .first-index turn into again? | ||
flussence | .first(:k) | ||
iirc | |||
timotimo | thx | ||
flussence | m: say 'foo'.first('o', :k) | ||
camelia | rakudo-moar d7f3f0: OUTPUT«Nil» | ||
flussence | m: say 'foo'.first('o', :v) | ||
camelia | rakudo-moar d7f3f0: OUTPUT«Nil» | ||
flussence | m: say 'foo'.first('o') | ||
camelia | rakudo-moar d7f3f0: OUTPUT«Nil» | ||
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... | ||
camelia | rakudo-moar d7f3f0: OUTPUT«1» | ||
00:40
hankache left
|
|||
RabidGravy | timotimo, most linux make links for 1, 1.0, 1.0.4, 1.0.4.uncletomcobbleyandall | 00:40 | |
00:41
virtualsue left,
joydo joined
|
|||
timotimo | hm | 00:41 | |
flussence | .oO( wonder if it'd be worthwhile to detect list methods called on scalar literals and emit a warning... ) |
||
timotimo | there's libSDL2-2.0.so.0.2.1 here | ||
how the ... | |||
is that considered normal? | |||
flussence | libSDL has a ... fun numbering scheme | 00:42 | |
timotimo | how does that map to what i supply to nativecall's "native" thread? | ||
stmuk__ | graphics and video libraries are always a total PITA | ||
sena_kun | RabidGravy, pastebin.com/47tDwiwc - here is the link. | ||
00:42
alpha123 left
|
|||
flussence | ‘SDL2-2.0’ is the name and everything after ‘.so.’ is the version | 00:43 | |
fwiw I have a libSDL-1.2.so.0.11.4 here too... | |||
timotimo | well, that's libSDL1 | ||
i'm building a libSDL2 binding here | |||
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. | ||
stmuk__ | that's probably SDL 1.2.11 (?) | 00:45 | |
flussence | stmuk__: mine is, yeah | ||
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 | ||
stmuk__ | I had to build 1.2.15 from source recently and it doesn't even compile without a patch from a mailing list | ||
RabidGravy | so CArray rather than Pointer[void] | ||
00:47
joydon left
|
|||
sena_kun | RabidGravy, and I should remove last int then? | 00:47 | |
flussence | oh hang on, distro says this is 1.2.15-r9 | ||
RabidGravy | no, you need the last int, but CArrays don't know their own own length | 00:48 | |
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 | ||
sena_kun | RabidGravy, I'll try it now, thanks. | ||
timotimo | okay, the two modules are up to date. except i decided against putting a version into the libsdl2 thingie | 00:52 | |
so that i don't go insane | |||
profan | hows the state of the JVM backend by the way? | 00:56 | |
if anyone knows anything that is :) | 00:57 | ||
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++ | ||
RabidGravy | TimToady++ expressed it better, I was going to say it needed some love | ||
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:) {}; } | ||
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:00 | |
sortiz | Folks: "perl6 -I /some/path -e '...'" works, but not in REPL mode! | 01:01 | |
zwu | how can we put the type modifier to the Role method too? | 01:02 | |
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:03 | |
RabidGravy | sure | 01:04 | |
just .tell yoleaux and it will remind me :) | |||
toodles folks | |||
01:09
RabidGravy left
01:13
jack_rabbit_ joined
01:14
sena_kun left
01:18
cognominal left
01:29
leont left
01:33
mike1 joined
01:36
mike1 left
01:42
xpen joined
01:46
xpen left
|
|||
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 | |
in the test code, I can load through need p::m::testm; and import A; | |||
I can use the class through A::MyClass, and use function foo defined in A, but not A::foo; | 01:50 | ||
the sub foo is exported through the trait is export for foo | 01:51 | ||
skids | Maybe try "our sub foo()" ? | ||
zwu | but I didn't export MyClass in module A, | 01:52 | |
skids | classes may have different default behavior? | ||
zwu | ah, is that our, my ... for the scope related issue? | ||
01:52
wamba left
|
|||
skids | Yes "our" is a scoping thing like "my" | 01:53 | |
zwu | yes, using our scope for the sub, I can use A::foo even it is not exported. | 01:55 | |
skids | Yay! I approximately knew what I was talking about :-) | 01:56 | |
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. | ||
01:59
lichtkind left
|
|||
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:00 | |
that makes the export for class almost useless, | 02:01 | ||
and hard to protect the usage for the non exported classes? | |||
02:02
protium joined
02:03
molaf_ joined
|
|||
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:04 | |
if there are multiple module export the same names, there are more chances of collisions than just use our scope for the subs. | 02:05 | ||
02:07
molaf left
02:08
glucosade joined
02:09
nzkindest left
02:10
AlexDaniel left
|
|||
dalek | c: 9da18b2 | skids++ | doc/Type/Stash.pod: Verbiage tweaks |
02:15 | |
02:15
kid51_ joined
|
|||
skids | zwu: you can "my" a class | 02:16 | |
02:16
cognominal joined
02:18
kid51 left
02:19
kid51 joined
02:22
kid51_ left
|
|||
sortiz | ls | 02:22 | |
02:24
Ch0c0late left
02:28
Guest19685 joined
|
|||
Guest19685 | Yesss there's a perl6 channel | 02:28 | |
02:29
Guest19685 is now known as linuxuser9000
|
|||
linuxuser9000 | What's up perly-perlers | 02:29 | |
TimToady | not most of the Eurofolk :) | ||
skids | o/ | ||
linuxuser9000 | I'm so sick of people dissing perl. So I decided to go where other perl lovers are | 02:34 | |
Have you guys seen the reverse polish example on the perl6 website? I think it's amazing: examples.perl6.org/categories/inter...s/RPN.html | |||
sortiz | linuxuser9000: You are welcome! | ||
linuxuser9000 | Also, the quicksort implementation on wikipedia is so nice looking: en.wikipedia.org/wiki/Perl_6#Quicksort | 02:35 | |
02:36
linuxuser9000 left
|
|||
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 | |
02:37
linuxuser9000 joined
|
|||
linuxuser9000 | Ugh, accidentally disconnected myself -_- | 02:38 | |
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:39 | ||
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:41 | |
02:42
setty1 left
|
|||
linuxuser9000 | This example for sockets looks cool: poe.perl.org/?POE_Cookbook/Chat_Server | 02:43 | |
02:47
keix left
|
|||
timotimo | doc.perl6.org/type/IO::Socket::Async - check this for some asynchronous chat server/client stuff | 02:50 | |
extremely basic, but a good start point, IMO | |||
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:51 | ||
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:57 | |
(Or "use lib '/path/to'; use Mymod") | 02:58 | ||
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:00 | |
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:01 | ||
03:02
jdrab_ joined
|
|||
ugexe | zwu: assuming you have a interfaced defined so you know what they will provide you can do something like this github.com/ugexe/zef/blob/master/l...m6#L20-L26 | 03:04 | |
03:04
vendethiel left
|
|||
ugexe | that loads plugin modules and passes them options from a config file | 03:04 | |
zwu | ugexe: thanks a lot! | 03:05 | |
03:05
bakedb_ joined
03:07
livyathan joined
03:10
mr-foobar joined
03:11
geraud left,
pierrot left,
jdrab left,
noganex_ left,
Khisanth left,
crux left,
troydm left,
jojotus left,
Util left,
cbk__ left,
jervo left,
wtw left,
bakedb left,
mspo left,
larion_ left,
dj_goku left,
musca left,
pjcj left,
ranguard left,
jast left,
bowtie left,
apejens left,
avar left
03:14
keix joined
|
|||
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 | |
that's great, it already support the dynamic import on any file path without searching. | |||
03:21
yqt left
03:22
jervo joined,
Khisanth joined,
apejens joined,
jojotus joined,
Util joined,
cbk__ joined,
musca joined,
jast joined,
pjcj joined,
mspo joined,
larion_ joined,
dj_goku joined,
ranguard joined,
literal joined,
krakan joined,
samb1 joined,
jantore_ joined,
skaji joined,
d^_^b joined,
garu joined,
cfloare joined,
bowtie joined,
avar joined,
troydm joined
03:24
corbyhaas left
03:25
wtw joined,
crux joined,
zemmihates left
|
|||
ugexe | true. it will load slower though as it wont be precompiled which may or may not matter to you | 03:25 | |
03:26
zemmihates joined,
corbyhaas joined
03:27
deepika joined
03:30
noganex joined
|
|||
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:31 | |
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:32 | ||
ugexe | using a path works | 03:34 | |
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 | ||
zwu | can I just use the fullpath except the extension? | 03:36 | |
ugexe | no | 03:37 | |
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:38 | ||
so My::Plugin in /home/projectX/Plugins/lib/My/Plugin.pm6; -> -I/home/projectX/Plugins/lib -e 'require My::Plugin;' | 03:39 | ||
then it will precompile the code and use that the next time | |||
sortiz | Btw, earlier I found that -I don't seems to work in rakudo REPL. | 03:40 | |
ugexe | nope | ||
sortiz | Why? | ||
ugexe | in REPL do `use lib 'xxx'` | 03:41 | |
id guess it happens too late | |||
i dont think its on purpose, just a known bug | |||
sortiz | Yes, that and PERL6LIB works, but take me hours! | ||
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:43 | |
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. | ||
zwu | I changed from the need to require the file, the output is "Could not find symbol", while using need is fine. | ||
timotimo | yeah, need is compile-time, require is run-time | 03:45 | |
but you can pass a list of symbols you expect to get from the module after the require | |||
require Foo::Bar, <&a-sub $some-var> | |||
zwu | I tried to use: require 'full_path.pm6' < module_name::Class_name>, or just: require 'full_path.pm6' <Class_name>, | 03:47 | |
03:47
bpmedley left
|
|||
timotimo | i don't have much experience with the whole importation business, sadly | 03:47 | |
ugexe | you can also do my `require whatever; my $class = ::("Class_name").new; $class.some-method` | 03:49 | |
s/my// | |||
linuxuser9000 | I'm reading the documentation for 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? | ||
timotimo | SQLAlchemy from python is really awesome | 03:50 | |
ugexe | ORMs are something you love or hate | ||
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? | ||
anyway, i've got to go to sleep | 03:52 | ||
zwu | yes, "is export" | ||
timotimo | good night everyone! | ||
maybe try "our sub foo is export"? | |||
o/ | |||
zwu | it is actually our sub foo in my test code. | ||
same error. | |||
sortiz | Good night timotimo. | 03:53 | |
03:53
regreg left
|
|||
zwu | Good night timotimo | 03:53 | |
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 | |
I ask because I'm an amateur. I only have 2 years of experience as a programmer | |||
awwaiid | linuxuser9000: the path to ORM usually starts when you are dynamically generating the queries, in my experience | 03:57 | |
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 | ||
awwaiid | linuxuser9000: er, concatenating strings containing SQL queries, that is | ||
03:59
noganex_ joined
04:00
joydo left
04:02
noganex left
04:03
kid51 left
04:04
deepika left
|
|||
sortiz | zmu: Found that in rakudo much of import is NYI, see: github.com/perl6/roast/blob/master....t#L22-L34 | 04:08 | |
04:09
Herby_ joined
|
|||
Herby_ | Evening, everyone! | 04:09 | |
04:15
sortiz left
|
|||
zwu | Thanks. What is NYI? | 04:15 | |
geekosaur | "not yet impleented" | 04:17 | |
*implemented | |||
zwu | ah, thanks! | ||
have these assigned? i'd like to contribute but I just started to explore perl 6. | 04:18 | ||
good night! | 04:29 | ||
04:29
zwu left
04:30
BenGoldberg left
|
|||
Juerd | Weird bug: "Cannot find method 'map': no method cache and no .^find_method" | 04:35 | |
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» | ||
Juerd | Without sort it works: | ||
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); | |||
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)» | ||
Juerd | Am I doing something weird or is this a bug? | ||
dalek | c: f86c26d | skids++ | doc/Language/list.pod: Second pass at list-centric page |
04:44 | |
Herby_ | wish I could help you Juerd but I don't have a strong grasp on the language yet | 04:46 | |
Juerd | I'm off to bed. Maybe when I wake up someone knows the answer :) | 04:48 | |
Good night! | 04:49 | ||
Herby_ | night! | 04:51 | |
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 declaredat /tmp/ZzNEiz1nb_:1------> 3<BOL>7⏏5$a = "hello"; my @count = $a ~~ / <[aeio» | ||
Herby_ | m: $a = "hello"; my @count = $a ~~ / <[aeiou]>/:g ; say @count.elems | ||
camelia | rakudo-moar d7f3f0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BRyPke4QEaVariable '$a' is not declaredat /tmp/BRyPke4QEa:1------> 3<BOL>7⏏5$a = "hello"; my @count = $a ~~ / <[aeio» | ||
Herby_ | how would I go about counting the number of vowels in a string? | ||
m: my $a = "hello"; my @count = $a ~~ / <[aeiou]>/:g ; say @count.elems | |||
camelia | rakudo-moar d7f3f0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oScpY8_t5NYou can't adverb at /tmp/oScpY8_t5N:1------> 3hello"; my @count = $a ~~ / <[aeiou]>/:g7⏏5 ; say @count.elems expecting any of: pair value» | ||
skids | m: my $a = "hello"; my @count = $a ~~ m:g/ <[aeiou]>/ ; say @count.elems | 04:55 | |
camelia | rakudo-moar d7f3f0: OUTPUT«2» | ||
Herby_ | m: my $a = "hello"; my @count = $a ~~ m:g / <[aeiou]> / ; say @count.elems | ||
camelia | rakudo-moar d7f3f0: OUTPUT«2» | ||
ugexe | also $string.comb(/a|e|i|o|u/).elems | ||
Herby_ | m: my $string = "hello world"; $string.comb(/a|e|i|o|u/).elems.say; | 04:56 | |
camelia | rakudo-moar d7f3f0: OUTPUT«3» | ||
Herby_ | sweet, thanks | ||
m: my $a = "hello 123"; my @count = $a ~~ m:g / <[aeiou]> <[1..4]> / ; say @count.elems | 04:57 | ||
camelia | rakudo-moar d7f3f0: OUTPUT«0» | ||
Herby_ | m: my $a = "hello 123"; my @count = $a ~~ m:g / <[aeiou]> | <[1..4]> / ; say @count.elems | ||
camelia | rakudo-moar d7f3f0: OUTPUT«5» | ||
Juerd | Hey, "E" and "é" are vowels too! | 04:58 | |
04:58
zemmihates left
|
|||
Herby_ | :) | 04:58 | |
m: my $a = "HELLO"; my @count = $a ~~ m:g / <[aeiou]> | <[1..4]> / ; say @count.elems | 04:59 | ||
camelia | rakudo-moar d7f3f0: OUTPUT«0» | ||
Herby_ | m: my $a = "HELLO"; my @count = $a ~~ m:g:i / <[aeiou]> | <[1..4]> / ; say @count.elems | ||
camelia | rakudo-moar d7f3f0: OUTPUT«2» | ||
04:59
bpmedley joined
|
|||
ugexe | m: my $string = "hEllo"; say $string.comb(/[:i a|e|i|o|u]/).elems | 05:00 | |
camelia | rakudo-moar d7f3f0: OUTPUT«2» | ||
05:00
bpmedley left
|
|||
Herby_ | m: my $string = "count words in string"; $string.comb(/ ' ' /).elems.say; | 05:01 | |
camelia | rakudo-moar d7f3f0: OUTPUT«3» | ||
05:01
bpmedley joined
|
|||
ugexe | m: my $string = "one two three"; say $string.words.elems | 05:01 | |
camelia | rakudo-moar d7f3f0: OUTPUT«3» | ||
Juerd | m: "hElló".comb(/:i :m [a|e|i|o|u]/).elems.say | 05:02 | |
camelia | rakudo-moar d7f3f0: OUTPUT«2» | ||
Juerd | m: "hElló".comb(/:i :m <[aeiou]>/).elems.say # bug | ||
camelia | rakudo-moar d7f3f0: OUTPUT«===SORRY!===chr codepoint cannot be negative» | ||
Juerd | (rakudobugged) | ||
Herby_ | ugexe, that is pretty slick | 05:03 | |
Juerd | Okay, going to sleep for real now :) | ||
Herby_ | night! | ||
05:04
pjscott joined
|
|||
Herby_ | m: "here is another string \n test".words.elems.say | 05:04 | |
camelia | rakudo-moar d7f3f0: OUTPUT«5» | ||
ugexe | m: "here is another string \n test".lines.elems.say | 05:05 | |
camelia | rakudo-moar d7f3f0: OUTPUT«2» | ||
Herby_ | m: "here is a test \n".lines.elems.say | 05:06 | |
camelia | rakudo-moar d7f3f0: OUTPUT«1» | ||
05:09
pjscott left
05:13
joydo joined,
yurivish_ left
05:16
pjscott joined
05:19
pierrot joined
05:24
jack_rabbit_ is now known as jack_rabbit
05:26
khw left
05:27
pjscott left
05:28
shadowpaste left
05:30
aindilis left,
aindilis joined
05:33
pjscott joined
05:34
Cabanossi left
05:35
Herby_ left
05:37
Cabanossi joined
05:40
pjscott left
05:43
agentzh joined,
agentzh left,
agentzh joined
05:44
agentzh left,
agentzh joined,
agentzh left,
agentzh joined,
bjz joined
|
|||
awwaiid | Now I have this working: use Inline::Ruby::Sweet; use csv:from<Ruby>; say ~CSV.parse("demo.csv")[1][1] #=> Andy | 05:45 | |
05:45
bjz left,
agentzh left,
agentzh joined,
agentzh left,
agentzh joined,
agentzh left
05:46
agentzh joined,
agentzh left,
agentzh joined
|
|||
skids | awwaiid++ | 05:49 | |
05:49
psy_ left,
yurivish joined
|
|||
awwaiid | it looks a bit funny though if you get a ruby-JSON object and then do like $data[0]["children"][1]["depth"] :) | 05:50 | |
[] gets passed into ruby as method invocation, so that is like $data.send("[]", 0).send("[]","children")... | 05:51 | ||
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:57 | ||
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 | ||
or maybe I should just leave master default and give instructions to would-be contributors to PR against something else. hmmm. | 05:59 | ||
so many choices! | |||
time for bed :) | |||
06:16
jameslen_ joined
06:18
adhoc left
06:20
adhoc joined
06:35
Zoffix joined,
pjscott joined
06:40
CIAvash joined
|
|||
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» | ||
skids wonders why it was decided that Nil does not assign the default value of the native type. | 06:53 | ||
06:56
pjscott left
07:00
keix left
|
|||
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
07:14
zengargoyle left
07:18
abraxxa joined
|
|||
Quom__ | skids: I doubt decided — native types are known to be troublesome… :9 | 07:19 | |
07:19
ChoHag left
07:22
abraxxa left
07:26
uruwi left
07:27
uruwi joined
07:35
jeek left
07:36
abraxxa joined
07:41
jeek joined
07:47
joydo left
07:50
leat left
07:51
schnuppi joined
07:53
leat joined
07:55
daotoad joined
|
|||
daotoad | Anyone have any thoughts on free and/or cheap Perl6 web app hosting? | 07:57 | |
I looked at heroku, but the buildpack is horribly out of date.github.com/pnu/heroku-buildpack-rakudo | 07:58 | ||
DrForr | Linode or AWS and roll your own? | ||
There's a Docker buid. | |||
*build | |||
08:01
kaare_ joined
08:04
abraxxa left
08:15
daotoad left,
daotoad joined,
bpetering joined
|
|||
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
08:20
rindolf joined
08:23
darutoko joined
08:24
CIAvash left
08:25
CIAvash joined
08:42
bpetering left
08:47
spider-mario joined
08:50
obra left
|
|||
dalek | c: 2b3c920 | skids++ | doc/Type/Nil.pod: Bring page on Nil into sync with post-GLR reality. |
08:50 | |
DrForr | Is it just me, or is s/// not documented in the regex page? Or anywhere really, for that matter? | 08:54 | |
(ignoring the synopses/apocalypses, because someone coming in from outside won't know about those...) | 08:55 | ||
skids | Well, it is in 5to6 pages. But... well vounteered! :-) | 08:56 | |
skids goes to sleep off his cold. | 08:57 | ||
08:57
skids left
09:09
citizenX joined
09:10
llfourn joined
09:12
lnrdo joined
09:13
hankache joined
|
|||
hankache | good morning everyone | 09:17 | |
09:19
sno left
09:20
sno joined
09:25
firstdayonthejob left
09:30
Ch0c0late joined
|
|||
masak | good antenoon, #perl6 | 09:30 | |
hankache | hi masak | 09:33 | |
09:34
vendethiel joined
|
|||
DrForr | m: my $x="foo\nbar"; $x~~s:g/\n/\c[2424]/; say $x | 09:35 | |
camelia | rakudo-moar d7f3f0: OUTPUT«fooॸbar» | ||
DrForr | Oh, wait, what's 2424 in hex... | 09:36 | |
Ah, that's it. | 09:37 | ||
09:42
daotoad left
09:43
virtualsue joined
|
|||
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:43 | |
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:47 | |
[Tux] | csv-ip5xs 50000 18.278 18.166 | 09:48 | |
test 50000 24.503 24.390 | |||
test-t 50000 12.645 12.533 | |||
csv-parser 50000 50.714 50.602 | |||
09:48
_nadim left
09:49
_nadim joined
|
|||
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:51 | |
09:54
keix joined
|
|||
hankache | how can i make tests stop if one of them fail ? | 09:54 | |
i have 3 tests and if number 2 fails, i do not want to run number 3 | |||
09:55
keix left
|
|||
pnu | daotoad: err.. "latest" is updated when spectest *and* task::star installation pass (github.com/pnu/heroku-buildpack-ra...ld.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. | ||
yoleaux | nine: I'll pass your message to awwaiid. | ||
09:56
wamba left
09:57
daotoad joined,
vendethiel left
09:58
keix joined
10:03
TEttinger left
10:04
spider-mario left
10:05
vendethiel joined
10:06
linuxuser9000 left
10:08
RabidGravy joined
10:09
abcxyz joined
|
|||
RabidGravy | morning | 10:11 | |
yoleaux | 01:13Z <sena_kun> RabidGravy: gist.github.com/Altai-man/d2fb78521fe2eb62ae73 from sena_kun. | ||
10:13
abcxyz left
10:14
daotoad left,
FROGGS_ joined
10:17
daotoad joined
10:18
leat left,
citizenX left,
FROGGS left,
leat joined
10:31
fdsfdsfds joined
|
|||
fdsfdsfds | hi, how can I log in Perl6? By log I mean writing stuff to a file for debugging | 10:32 | |
not authenticating | |||
I haven't found any module | |||
Quom__ | … modules.perl6.org/#q=log | 10:33 | |
Though I haven't used any of these myself | 10:34 | ||
masak .oO( lmmpotfy ) | |||
fdsfdsfds | thanks | 10:36 | |
10:36
daotoad left
|
|||
Quom__ | np :) | 10:37 | |
10:37
fdsfdsfds left
|
|||
hankache | how can i stop testing when one of the tests fail? | 10:37 | |
10:43
fdsfdsfds joined
|
|||
fdsfdsfds | could you tell me where I can find an instruction of how to submit my own perl 6 module to modules.perl6.org/ ? | 10:43 | |
RabidGravy | hankache, there's a die-on-fail in Test but it doesn't seem to be exporter | 10:44 | |
DrForr | fdsfdsfds: There's a link on the front page, see 'this guide'. | 10:45 | |
RabidGravy | fdsfdsfds, see doc.perl6.org/language/modules | ||
fdsfdsfds | tnx | ||
10:45
fdsfdsfds left
|
|||
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. | ||
dalek | c: a17ff0d | (Siavash Askari Nasr)++ | doc/Language/unicode_entry.pod: Mention TeX input method for entering unicode characters in Emacs |
10:49 | |
c: 176bf8a | (Siavash Askari Nasr)++ | doc/Language/unicode_entry.pod: Merge pull request #333 from CIAvash/unicode_entry_emacs_tex_input_method Mention TeX input method for entering unicode characters in Emacs |
|||
10:55
citizenX joined
10:56
glucosade left,
spider-mario joined
11:00
citizenX left
11:01
domidumont joined
|
|||
dalek | ast: c435912 | lizmat++ | S02-types/int-uint.t: Fix test, fix indenting, Juerd++ |
11:01 | |
11:03
ely-se joined
11:04
sena_kun joined
11:06
domidumont left,
domidumont joined
|
|||
bartolin_ | hi, #perl6 -- and belated congrats for the 6.c release! | 11:07 | |
bartolin_ was away for a while | |||
nine | Hi bartolin_! | 11:08 | |
moritz | welcome back bartolin_ | ||
bartolin_ | \o/ | 11:09 | |
RabidGravy | rarr! | ||
bartolin_ | it looks like the recent nqp bump broke the build for nqp-j: gist.github.com/usev6/057d64b0fc9b3c830c2f | 11:10 | |
the culprint seems to be nqp commit 4b1236e535 | |||
lizmat | that's probably because JVM doesn't have readlinechompfh yet ? | 11:13 | |
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
|
|||
RabidGravy | ely-se, I don't think so | 11:16 | |
nine | ely-se: the GLR has been pretty much done since September | ||
ely-se | nice :) | ||
is there a change list of it some where? | |||
llfourn | ely-se: check out perl6advent.wordpress.com/2015/12/...-refactor/ | 11:22 | |
ely-se | thanks! | ||
DrForr | funrep: There's a 'perl 6 in X days' guide out there, I don't remember the exact URL. | 11:26 | |
funrep | DrForr: thanks! i found this slide: jnthn.net/papers/2015-spw-perl6-course.pdf seems pretty good i gonna go through it | 11:27 | |
p6: say 2; | 11:32 | ||
camelia | rakudo-moar d7f3f0: OUTPUT«2» | ||
11:36
AlexDaniel joined
|
|||
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:38 | |
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:39
ely-se left
|
|||
nine | bartolin_: maybe it isn't readlinechompfh but stat_time and lstat_time? | 11:40 | |
The patch did not change any JVM related files | |||
bartolin_ | nine: I was able to build rakudo-j with 4b1236e535 reverted (actually I added an '#?if jvm' case) | 11:41 | |
but that doesn't look like a nice solution ... | |||
nine | Ah, ok | ||
11:41
mr-foobar left
|
|||
CIAvash | Is there a reason '≠', '≤' and '≥' are not used for '!=', '<=' and '>='? | 11:44 | |
funrep | what is an IntStr? | ||
lizmat | CIAvash: you would have to ask TimToady that | 11:45 | |
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 | ||
funrep | okey make sense | ||
another question, i assume arrays are heterogeneous, is that correct? | 11:47 | ||
nine | yes | ||
lizmat | native arrays aren't ? | ||
funrep | alright | ||
nine | untyped arrays anyway | ||
RabidGravy | m: my $a = IntStr.new(10, "ten"); say +$a; say ~$a; | ||
camelia | rakudo-moar d7f3f0: OUTPUT«10ten» | ||
funrep | so i can optionally make them homogenous? | ||
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 | ||
technically, all arrays are homogenous | |||
and by default Any | |||
funrep | aah | ||
okey | |||
lizmat | since Any accepts just about anything, it looks like they're heterogenous | 11:49 | |
nine | Like Object[] in Java | ||
funrep | (i noticed perl added (any) objects to my list when i added something out of range) | ||
lizmat | but e.g., they will not accept Mu or Junctions, as they don't inherit from Any | ||
hankache | can we catch the result of a test without printing it to the terminal ? | ||
funrep | array* | ||
lizmat | hankache: you can change $*OUT/$*ERR before the test ? | 11:50 | |
funrep | okey, thanks for the replies! | ||
CIAvash | lizmat: ok. Whenever I ask TimToady something, he disappears :) maybe I should .tell him. | ||
lizmat | CIAvash: that might help | 11:51 | |
hankache | lizmat can you give me an example? | ||
i want to print to text file | |||
lizmat | in any case, I don't think we'll be changing much before the next release | ||
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 | ||
AlexDaniel | CIAvash: but hey, I've mentioned tha a couple of times already | ||
CIAvash: so generally the question is “how much unicode stuff do we really want in Perl 6?” | 11:53 | ||
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 | ||
AlexDaniel | CIAvash: and × ÷ operators are rather new | ||
11:54
pjscott joined
|
|||
CIAvash | AlexDaniel: oh! :) So I shouldn't ask him again? | 11:55 | |
AlexDaniel | CIAvash: why not? | 11:56 | |
dalek | c: 244bd51 | lizmat++ | doc/Language/unicode_texas.pod: Document − and … and texas - and ... |
||
c: 2ab3ad6 | lizmat++ | doc/Language/unicode_texas.pod: Add ÷ , AlexDaniel++ for making me remember |
|||
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 | |
11:57
Skarsnik joined
|
|||
CIAvash | AlexDaniel: If it was already disccused | 11:57 | |
Skarsnik | hi | ||
AlexDaniel | CIAvash: ah, also a fairly new addition is stuff like ½ and superscripts | ||
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" | ||
AlexDaniel | .u / | 11:59 | |
yoleaux | U+002F SOLIDUS [Po] (/) | ||
AlexDaniel | .u / | ||
yoleaux | U+002F SOLIDUS [Po] (/) | ||
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 :) | ||
AlexDaniel | .u // | 12:02 | |
yoleaux | U+002F SOLIDUS [Po] (/) | ||
AlexDaniel | lizmat: any idea why / is listed? | ||
CIAvash | .tell TimToady Is there a reason '≠', '≤' and '≥' are not used for '!=', '<=' and | ||
yoleaux | CIAvash: I'll pass your message to TimToady. | ||
CIAvash | '>='? | ||
lizmat | AlexDaniel: no idea | 12:03 | |
AlexDaniel | lizmat: perhaps somebody was going to add ÷ but wrote a regular slash instead | ||
CIAvash | I was surprised to see / too. | 12:04 | |
12:04
Ch0c0late left
|
|||
AlexDaniel | CIAvash: there are also things like ≔ ⩵ ⩶ | 12:06 | |
CIAvash: though if the first two are more or less OK, the third one is just nonsense when you think about monospace fonts | 12:07 | ||
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:09 | ||
Like, I have no problems entering common unicode chars, why would I want to use <= >= != then? | 12:10 | ||
RabidGravy | well, for most people it would be more key strokes | 12:12 | |
12:12
kid51 joined
|
|||
RabidGravy | ≤ is one more stroke than <= for me | 12:12 | |
AlexDaniel | sure, but for me it would be less keystrokes than ascii equivalents… | 12:13 | |
CIAvash | AlexDaniel: Yeah, I think someone mentioned that before. | ||
RabidGravy | and that's if I can remember how to type it | ||
huf | some people were burned by mojibake and broken encoding in their youth so much that they'll never accept non-ascii operators :) | ||
CIAvash | Well, it depends. You can define your own keys too, I think | 12:14 | |
AlexDaniel | CIAvash: one other thing to note is that « » … and maybe even 「」 already exist on many keyboard layouts | 12:16 | |
(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 | ||
hankache | we need a Perl 6 keyboard | ||
RabidGravy | but it comes down to self control | ||
AlexDaniel | CIAvash: superscripts are also typable most of the time | 12:18 | |
12:18
_nadim left
|
|||
DrForr votes for foot pedals. | 12:18 | ||
RabidGravy | hankache, look how well that went with APL | ||
AlexDaniel | hankache: keyboard layout you mean? | ||
DrForr: any cheap one that you could recommend? | |||
hankache | yup | ||
huf | always have ascii pairs of unicode things and ship a tool that converts source files? | ||
and then nobody has to ever care. | 12:19 | ||
AlexDaniel | huf: hm, I've heard that idea a couple of times | ||
DrForr | Just adopt trigraphs and be done with it :) | ||
timotimo | uargh | ||
huf | DrForr: at this point, ascii has become "trigraphs" | ||
the poor dear | |||
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 | ||
dalek | c: 3f2cbc0 | lizmat++ | doc/Language/unicode_texas.pod: Rework it a bit |
12:21 | |
AlexDaniel | CIAvash: ⍰ is very close, but I'm sure that there are better symbols | ||
funrep | what capitalization convention is most common in perl6 code? | ||
timotimo | usually, we have ClassName, method-name, sub-name, CONSTANT_NAME, INTERNAL-NAME, right? | 12:22 | |
12:22
_nadim joined
|
|||
huf | _texas_? | 12:22 | |
timotimo | yeah | ||
everything's bigger in texas | |||
» is >>, for example | |||
huf | oh god... :D | 12:23 | |
AlexDaniel | though not always: × and * | ||
timotimo | m: say "×".encode.perl | ||
camelia | rakudo-moar d7f3f0: OUTPUT«utf8.new(195, 151)» | ||
timotimo | m: say "*".encode.perl | ||
camelia | rakudo-moar d7f3f0: OUTPUT«utf8.new(42)» | ||
AlexDaniel | oh, in that sense… | ||
timotimo | i disagree :P | ||
AlexDaniel | good point | ||
indeed, everything is bigger… | 12:24 | ||
timotimo | i don't think that's not meant to mean that, though | ||
AlexDaniel | funrep: one interesting difference between perl6 and other languages is that we have kebab-case | ||
12:24
leont joined
|
|||
AlexDaniel | m: say 5 | 12:25 | |
camelia | rakudo-moar d7f3f0: OUTPUT«5» | ||
AlexDaniel | oh wow, did not expect that to work | ||
lizmat: consider mentioning non-break space and perhaps other whitespace characters? | 12:26 | ||
lizmat | AlexDaniel: I'll take PR's :-) | ||
AlexDaniel | lizmat: well, in that case I can just commit it myself :D | ||
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. | ||
.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]. | ||
dalek | c: 0b3deca | lizmat++ | doc/Language/glossary.pod: Add some more lemma's |
||
timotimo | nice | ||
12:29
sena_san joined,
sena_san left
|
|||
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. | ||
yoleaux | nine: I'll pass your message to todd_. | ||
timotimo | oh | ||
lizmat bootstraps panda | 12:30 | ||
timotimo | =head1 QAST | ||
Successor to L<#QAST>. | |||
we're stuck in an infinite vortex of improvement | |||
lizmat | oops | 12:31 | |
timotimo: perhaps you can improve ? | |||
12:31
sena_kun left
|
|||
timotimo | it'll be hard to find just the right amount of text to put there | 12:31 | |
12:31
_nadim left
|
|||
timotimo | it shouldn't be much | 12:31 | |
Skarsnik | m: module A { our $var := "hello"; }; use A; | ||
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
|
|||
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> …» | ||
Skarsnik | m: module A { our $var := "hello"; }; import A; | ||
camelia | ( no output ) | ||
CIAvash | lizmat: So it's ok to push directly instead of submitting pull requests? | ||
lizmat | Skarsnik++ | ||
RabidGravy | frankly I'm waiting for someone to do "package EXPORTHOW { package DECLARE { our constant कामधेनु = Metamodel::ClassHOW }};" ... "कामधेनु Foo { }; say Foo.new" ;-) | ||
lizmat | CIAvash: if you have a commit bit, yes | ||
Skarsnik | m: module A { our $var is export := "hello"; }; import A; | ||
camelia | ( no output ) | ||
Skarsnik | ho it work now? | ||
to export binded var | |||
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)» | ||
lizmat | the export succeeded, cause it has $var in the outer scope now | 12:34 | |
m: module A { our $var is export = "hello"; say $var }; import A; say $var # seems binding it creates the problem | |||
camelia | rakudo-moar d7f3f0: OUTPUT«hellohello» | ||
AlexDaniel | .u say 5 | ||
yoleaux | U+0035 DIGIT FIVE [Nd] (5) | ||
U+0061 LATIN SMALL LETTER A [Ll] (a) | |||
U+0073 LATIN SMALL LETTER S [Ll] (s) | |||
AlexDaniel | m: say 5 | ||
camelia | rakudo-moar d7f3f0: OUTPUT«5» | ||
12:37
espadrine joined
|
|||
AlexDaniel | m: print ‘say’; print join ‘’, (0..0x1FFFF ==> grep { .uniprop ~~ m/‘Zs’/ })».chr; say 42 | 12:37 | |
camelia | rakudo-moar d7f3f0: OUTPUT«say 42» | 12:38 | |
AlexDaniel | m: say 42 | ||
camelia | rakudo-moar d7f3f0: OUTPUT«42» | ||
dalek | c: 378c3e9 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/unicode_texas.pod: Mention other whitespace characters (Zs property) |
12:41 | |
12:42
kid51 left
|
|||
AlexDaniel | I'm not sure if there are any other things besides Zs though | 12:42 | |
lizmat | AlexDaniel++ | 12:43 | |
12:43
kid51 joined
|
|||
AlexDaniel | oh | 12:44 | |
m: print ‘say’; print join ‘’, (0..0x1FFFF ==> grep { .uniprop ~~ m/‘Zl’/ })».chr; say 42 | |||
m: print ‘say’; print join ‘’, (0..0x1FFFF ==> grep { .uniprop ~~ m/‘Zp’/ })».chr; say 42 | |||
camelia | rakudo-moar d7f3f0: OUTPUT«say 42» | ||
rakudo-moar d7f3f0: OUTPUT«say 42» | |||
12:45
pjscott left
12:46
pjscott joined
12:47
brrt joined
|
|||
AlexDaniel | m: say 5 | 12:48 | |
camelia | rakudo-moar d7f3f0: OUTPUT«5» | ||
AlexDaniel | ha | ||
m: say 5 | 12:49 | ||
camelia | rakudo-moar d7f3f0: OUTPUT«5» | ||
AlexDaniel | ok, I'm wrong | ||
dalek | c: 49a5110 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/unicode_texas.pod: Zl and Zp are also valid whitespace characters |
12:50 | |
kudo/nom: c0bb692 | lizmat++ | src/core/io_operators.pm: Remove non-functioning, untested pipe(), cygx++ Part of PR #646, the other part I'm not happy merging at this point |
|||
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)» | ||
Skarsnik | m: my %h; %h<b><id> = '_2'; %h<a><id> = '_1'; say %h.values.sort(*<id>); | ||
camelia | rakudo-moar d7f3f0: OUTPUT«(id => _1 id => _2)» | ||
Skarsnik | hm that does not work for me. is that because it can't sort directly _xx ? | 12:58 | |
dalek | kudo/nom: 7253482 | lizmat++ | src/core/IO.pm: Remove some superfluous returns |
13:06 | |
13:06
shadowpaste joined
|
|||
lizmat | Skarsnik: not sure what you're getting at | 13:07 | |
Skarsnik | I want to sort on the value of the id, but I get it work with {$^a<id> > $^b<id>} x) | 13:09 | |
lizmat | and it doesn't with *<id> ? | 13:13 | |
13:13
lnrdo left
|
|||
lizmat | or { $_<id> } ? | 13:13 | |
or { $^a<id> } ? | |||
I guess the former can't work because it doesn't indicate the signature | |||
if the signature's arity is 1 (which just using $^a will do), then sort should do TRT | 13:14 | ||
AlexDaniel | TRT? | ||
lizmat | The Right Thing | 13:15 | |
nine | lizmat: have you given further thought to the language_versions branch? | ||
lizmat | nine: I have, and I think it's a bad idea | ||
13:15
hankache left
|
|||
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 | ||
nine | So we need another idea or some really good arguments. | ||
lizmat | it doesn't exist | ||
if it works, it works | |||
nine | But...we wouldn't have to? | ||
lizmat | yes, we would, e.g. in the case of Date.new taking 3 positionals | 13:17 | |
it wasn't tested in 3.c | |||
it was added during development of 2016.01 | |||
use v6.c will *not* tell you whether it will work | |||
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/ | ||
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! | ||
lizmat | nine: and what is the position of nom in this ? | ||
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 | |
13:21
virtualsue left
|
|||
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:21 | |
13:22
pjscott left
|
|||
Skarsnik | you realise you will need version on the doc too :( | 13:22 | |
when 6.c is not even fully documented x) | |||
lizmat | nine: I like the idea, but practically, it's going to be a nightmare | 13:23 | |
13:23
virtualsue joined
|
|||
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: | ||
nine | lizmat: backwards compatibility always is. The question is: how can we make the nightmare most bearable. | ||
lizmat | 6.c / 2015.12 is frozen in a branch | ||
any work done post-2015.12 (in nom) is part of 6.d.PREVIEW | 13:24 | ||
any bugfixes / speed improvements are cherry picked in the 6.c branch | |||
doc is frozen in 6.c / 2015.12 branch | 13:25 | ||
13:25
pjscott joined
|
|||
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 | ||
AlexDaniel | Skarsnik: not tested you mean? | ||
Skarsnik | No, documented | ||
lizmat | Skarsnik: but there's the source | ||
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
brrt left
|
|||
lizmat | but since our spectesting is still only covering a relatively small percentage of the code base | 13:28 | |
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 | ||
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:30
CIAvash left
|
|||
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 | ||
nine | Yes, that's why I'd really like to see a solution soon. Because the work will become more and more :) | ||
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:32 | ||
13:33
pjscott left
|
|||
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 | |
13:33
pjscott joined
|
|||
Skarsnik | is there lot of tests that fail in roast with the current nom? | 13:34 | |
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 | ||
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
|
|||
lizmat | nine: true, but that would basically make any maintanence on Date/DateTime work in two branches | 13:36 | |
and we're going to have more and more of these cases | |||
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 | ||
*having | |||
13:37
pjscott left
|
|||
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 | ||
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. | ||
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 | |||
lizmat | orbus: no, there's no disagreement there | ||
nine | It's always language syntax + core classes, isn't it? :) | 13:40 | |
lizmat | yep | ||
13:40
pjscott joined
|
|||
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 | ||
rather than a slightly dynamic one depending on which compiler release you're using | 13:41 | ||
orbus | I see | ||
I guess I'm primarily looking at java as a model | |||
lizmat | without having to resort to saying "well, it wasn't tested, so booboo for using it anyway" | ||
orbus | java has a similar situation where there are multiple implementations and distinct language versions | 13:42 | |
13:43
pjscott left
|
|||
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 | |
of course, I have no clue how the code base is managed :p | |||
Skarsnik | hm, nativesizeof on a struct work correctly | 13:44 | |
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. | ||
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:47 | |
lots of software products have undocumented apis | 13:48 | ||
doesn't mean they are safe to use | |||
13:48
AlexDaniel left
|
|||
lizmat | orbus: sure, but we want to prevent situations like with Coro in Perl 5 | 13:49 | |
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:51 | |
orbus | maybe anything undocumented for a given version should be somehow flagged as such? | 13:54 | |
like throw warnings? | |||
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. | ||
orbus | nine: agree | 13:55 | |
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:56 | ||
make sure v6.c passes, then v6.d, then v6.e | 13:57 | ||
etc | |||
[Tux] | if I get a Supply, can I ask it its Supplier? | 13:58 | |
orbus | just looking at the docs - I don't think so | 13:59 | |
14:00
lnrdo joined
|
|||
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 | ||
orbus has to afk for a bit | |||
funrep | or well, probably there are several types of strings | ||
llfourn | funrep: no not at all | ||
funrep: can you suggest an attack vector? | 14:02 | ||
Skarsnik | my $foo = '{say hello}'; "$foo"; | ||
m: my $foo = '{say hello}'; "$foo"; | |||
camelia | ( no output ) | ||
14:02
jshy joined,
zwu joined
|
|||
llfourn | m: my $foo = '{say hello}'; say "$foo"; | 14:02 | |
camelia | rakudo-moar 725348: OUTPUT«{say hello}» | ||
llfourn | that aint gonna work :P | 14:03 | |
funrep | input in a website, you write "{ rm_rf("../" }" or something | ||
14:03
pmqs_ is now known as pmqs
|
|||
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 | ||
llfourn: isnt application strict though? so if you put that string as an argument it will be evaluated before the function call? | 14:04 | ||
Skarsnik | can we have an operator for defined in 6.d? x) | 14:05 | |
funrep | well, gotta run! | ||
llfourn | funrep: I'm not sure what you mean. "{ }" is just syntactic sugar at runtime it's the same as concatination | ||
Skarsnik | I am bored of writting if stuff.defined and stuff < 2; | ||
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 | ||
Zoffix | (stuff//0) < 2 | ||
lizmat | funrep: as interpolation works at compile time | ||
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
RabidGravy left
|
|||
Skarsnik | I would like a stuff ? cmpoperator value | 14:10 | |
Zoffix | +1 | ||
llfourn | Skarsnik: do you use 'with'? | 14:11 | |
with checks for definedness | |||
with @sorted[$u + 1] { say "win" when CUnion } | 14:12 | ||
Skarsnik | that aweful | ||
llfourn | I like it :) | ||
14:13
Zoffix left
|
|||
llfourn | with @sorted[$i + 1] { say "win" when .<obj> ~~ CUnion } #or rahter | 14:14 | |
14:14
Zoffix joined
|
|||
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:15 | |
:( | 14:16 | ||
Skarsnik | NC lead to leak I think | ||
14:16
huggable joined
|
|||
Zoffix | Aw :( I'm using it (indirectly, via DBIish) github.com/zoffixznet/perl6-IRC-Cl...actoid.pm6 | 14:17 | |
14:17
wamba joined
|
|||
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:17 | |
Zoffix | OTOH, the leak is probably somewhere in the Grammar/Actions github.com/zoffixznet/perl6-IRC-Cl...Parser.pm6 | 14:18 | |
Because I don't see the bot used much. It's really it just parsing traffic on #perl6 | |||
14:18
huggable left
|
|||
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
|
|||
Skarsnik | Display the ^name of your variable | 14:19 | |
Zoffix | Skarsnik, there shouldn't be an NC call without DB look up | 14:20 | |
I meant the metaphorical variable not literal :) | |||
huggable, IO::Handle | |||
huggable | Zoffix, class IO::Handle [Opened file or stream]: doc.perl6.org/type/IO::Handle | ||
Zoffix | k, will see if it's still alive come Monday | ||
14:26
hankache joined
14:29
virtualsue left
14:30
DukeOfPerl joined
|
|||
DukeOfPerl | Can Perl6 source code be in plain codee, or must it be Unicode? | 14:30 | |
Skarsnik | plan codee? | 14:31 | |
*plain | |||
DukeOfPerl | Ordinary ASCII text as plain code, not Unicode. | ||
DrForr | What's the difference? ASCII is the first 0x7f codepoints of UTF-8. | ||
DukeOfPerl | But in Unicode one may express logical operators, not usually necessary. | 14:32 | |
14:32
_nadim left
|
|||
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)» ? github.com/Tux/CSV/blob/master/lib...CSV.pod#in | ||
DrForr | You can express logical operators in ASCII too. | ||
Zoffix | DukeOfPerl, doc.perl6.org/language/unicode_texas | ||
DukeOfPerl | And is Perl6 only available for Apple macintosh now in January 2016? | ||
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? | ||
Zoffix | DukeOfPerl, Perl 5? | ||
hankache lurkes | |||
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: perl6.org/downloads/ or you can wait a few weeks and get the Rakudo Star distribution | ||
DukeOfPerl | en.wikibooks.org/wiki/Category:Per...rogramming has pretty good info, but old. | ||
DrForr | perl6.org has the most recent info. | 14:35 | |
14:35
gregf left
|
|||
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 perl6intro.com/ and doc.perl6.org/ | ||
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 | ||
14:36
virtualsue joined
|
|||
DukeOfPerl | Has anybuddy yet offered, or pointed to, a Perl6 "killer app"? | 14:36 | |
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
|
|||
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... :) | ||
DukeOfPerl, because Perl 6 is written for the next 100 years... Perl 5 isn't | |||
DrForr | Ask Larry, he'll be around in a little while. | 14:38 | |
DukeOfPerl | Anybody contemplating a Perl6 "killer app"? [I am] | ||
Zoffix | DukeOfPerl, sweet. Start coding. | ||
DukeOfPerl | Wait a miunute-- Larry Wall often comes hither??? | ||
Zoffix | DukeOfPerl, I suspect the Perl 6 Killer App will be an AI :) | ||
DukeOfPerl, yeah, TimToady is Larry Wall. | |||
DrForr | Thought is cheap, bytes are worthwhile. | 14:39 | |
Zoffix | (as in, he's here now under that nick :)) | ||
DukeOfPerl | ai.neocities.org/AiSteps.html is my Perl5 AI app. (So who am I really? -) | ||
14:39
FROGGS_ left
|
|||
llfourn | DukeOfPerl: interesting | 14:40 | |
Zoffix | Yeah, that page lost me at "PERL" | ||
DukeOfPerl | An did Larry Wall reall attend Seattle Pacific College (now U) in Seattle? | ||
DrForr | *plonk* | 14:41 | |
DukeOfPerl | Pardon me for aggrandizing "Duke of Perl" (in envy of Duke of URL on another site. | ||
14:42
Ch0c0late joined
|
|||
Zoffix shakes head and resumes hacking | 14:42 | ||
DukeOfPerl | Are you "friendly" people "plonkinh" me? How rood. | ||
OK I gotta go, amy I yet lurk a while? Toady, are you really Dr. Wall? | |||
14:44
ChoHag joined
14:45
uruwi left
|
|||
Zoffix | huggable, texas :is: All of Perl 6's fancy Unicode operators have traditional ASCII symbol alternatives (aka Texas Variants): See 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 doc.perl6.org/language/unicode_texas | ||
Skarsnik | Am I the only one messing enum syntax everytime? I always write enum Foo = () | 14:48 | |
colomon doesn’t remember p6 enum syntax at all... | 14:49 | ||
14:49
Zoffix left
|
|||
Skarsnik | it's enum Foo (); | 14:50 | |
llfourn | enum Foo = () # woudn't this mean you want to set a symbol of type enum to an empty list? | 14:51 | |
14:52
xpen joined
|
|||
llfourn | though I suppose constant works the same way as you expect so I can see why | 14:52 | |
14:52
lucasb joined
|
|||
DukeOfPerl | If someone "plonks" me, am I then disconnected. I hope not. | 14:57 | |
DrForr | Nope. | ||
lucasb | about enum syntax, I wonder why enum E 'a','b','c' doesn't work the same as enum E <a b c> | ||
DukeOfPerl | In comp.lang.perl.misc, people were rude to me talking about AI. | 14:58 | |
If the Usenet Perl people continue to be rude about Perl AI, I will post in other groups. | |||
DrForr | Sorry to hear it. | 14:59 | |
DukeOfPerl | All right, before I vape (go), I have one big major Perl6 question... | ||
14:59
rindolf left
|
|||
DukeOfPerl | In Perl5 for Windows, I am unable to deal directly with each keyboard stroke. CanPerl6??? | 15:00 | |
15:00
rindolf joined
|
|||
llfourn | DukeOfPerl: I doubt p6 is any better in terms of hardware interactions than p5 | 15:00 | |
DrForr | What does that mean? | ||
DukeOfPerl | I code AI in Forth (English; German) and JavaScript (English; Russian)... | 15:01 | |
In Forth and in JavaScript, the AI Mind processes each character AS IT COMEs In. Perl6? | |||
DrForr | Sure, just use the appropriate ReadKey library - modules.perl.org | 15:02 | |
DukeOfPerl | Thankew, Dr Forr :-) | 15:03 | |
Skarsnik | hm, xml does not allow <mytag/> ? | ||
lucasb | the xml specification? yes, I think it allows it | 15:04 | |
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 | |
15:06
virtualsue left
|
|||
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! | ||
DukeOfPerl | Which Linux distribution is best for 64-bit Perl6? | ||
hankache | DukeOfPerl all of them work. | 15:07 | |
DukeOfPerl | Also which 64-bit CPU should be on the Perl6 Linux machine? | ||
DrForr | They should all work, 'best' is your personal preference. | ||
15:08
lichtkind joined
|
|||
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). | ||
VM (virtual machin e) is the Rakudo thingie, right? | |||
DrForr | Should work fine. I'm running rakudobrew on an Ubuntu VM inside a Windows machine. | 15:09 | |
15:09
firstdayonthejob joined,
virtualsue joined
|
|||
DukeOfPerl | What sort of In ternet connection is needed? Ordinary Wi-Fi okay? | 15:09 | |
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 | ||
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. | ||
Wifi has nothing to do with that, telnet's just a protocol. | |||
DukeOfPerl | Unfortunately, my Radio Shack Acer netbook from 2009 can not get into GitHub :-( | ||
llfourn | can you install git? | 15:12 | |
DukeOfPerl | friedo.com/blog/2016/01/exploring-p...nd-running has helped me a lot. | 15:13 | |
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 | ||
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. | ||
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
|
|||
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. | ||
DukeOfPerl | And another thing. Will CPAN be accepting new modules expressly for Perl6? | ||
15:17
xpen left
|
|||
llfourn | no. modules.perl6.org/ is our CPAN for now | 15:17 | |
lucs | (That is, without requiring the otherwise unused $k variable.) | ||
DukeOfPerl | Ilforun, cool! | ||
15:17
Zoffix joined
|
|||
Zoffix | nemo, lol, your instructions completely disabled my XCompose now :) even stuff that did work no longer does | 15:18 | |
15:18
iH2O left
|
|||
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) | ||
Zoffix | lucs, I wanted to get a wider range of sequences: doc.perl6.org/language/unicode_entry#XCompose | 15:19 | |
lucasb | lucs: maybe use: for %h.sort.values -> $v { ... } | ||
15:20
pjscott joined
|
|||
lucs | lucasb: Oh, hmm... Trying. | 15:20 | |
15:21
st_iron joined
|
|||
st_iron | good afternoon | 15:21 | |
Zoffix | \o | 15:22 | |
llfourn | gday, st_iron | ||
st_iron | o/ | ||
lucs | lucasb: Appears not to work. | ||
lucasb | idk, then :( | ||
llfourn | m: {three => "four",one => "two", a => "z"}.sort.values.note | 15:23 | |
camelia | rakudo-moar 725348: OUTPUT«(a => z one => two three => four)» | ||
lucs | lucasb: Um, I may have done something wrong though... | ||
llfourn | lucs: which bit doesn't work? | ||
lucs | Right :) | ||
llfourn | ah you want just the .value? | 15:24 | |
lucs | Yes. | ||
llfourn | m: {three => "four",one => "two", a => "z"}.sort.map(*.value) #maybe | ||
camelia | ( no output ) | ||
lucasb | ahh, sorry, my mistake. %h.sort returns a list of pairs, I think | ||
llfourn | m: {three => "four",one => "two", a => "z"}.sort.map(*.value).note #maybe | ||
camelia | rakudo-moar 725348: OUTPUT«(z two four)» | ||
lucs | Yeah, good ol' map. | 15:25 | |
15:25
CIAvash joined
|
|||
lucs | lucasb, llfourn: Thanks | 15:26 | |
llfourn | nps :) | ||
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 | ||
lucs | Zoffix: Let me rephrase: What did you do, what did you expect, bla bla bla :) | ||
15:28
pjscott left
|
|||
Zoffix | lucs, irclog.perlgeek.de/perl6/2016-01-08#i_11854039 | 15:28 | |
Skarsnik | hm I want that A is the same type that B I need to write constant A := B? | 15:29 | |
I want the same thing that typedef in C | |||
lucasb | if you don't mind that A.new.WHAT is (B)... | 15:31 | |
Skarsnik | hm | 15:32 | |
15:32
Peter_R joined
|
|||
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
|
|||
Juerd | bpmedley: That's great! I got stuck in /^C/ after [^30] | 15:33 | |
bpmedley: Tab completian fail, never mind that | 15:34 | ||
15:34
telex left
|
|||
Skarsnik | Juerd, not sure if subset will work well with nc type | 15:34 | |
Juerd | What is nc type? | 15:35 | |
Skarsnik | NativeCall | ||
*types | |||
Juerd | Ah | ||
Skarsnik | I litteraly want to transform a 'typedef struct A B' to the perl6 eqv | ||
15:36
telex joined
|
|||
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» | ||
Zoffix | Huh? I thought say() called .gist | ||
15:39
st_iron left
|
|||
Zoffix | m: class C { method gist {"42"}}; say C.new | 15:43 | |
camelia | rakudo-moar 725348: OUTPUT«42» | ||
lucasb | m: class C { method gist { Inf } }; say C | ||
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:45
zmyrgel left
|
|||
geekosaur | m: class C { method gist {~rand}}; say C.new; | 15:46 | |
camelia | rakudo-moar 725348: OUTPUT«0.913867389771498» | ||
lucasb | hm, right, .perl, .Str, and .gist should always return strings | 15:47 | |
but what if the user made a mistake, can't the compiler give a hand there? :) | |||
...and stringify what was supposed to be a string | 15:48 | ||
Zoffix | That's why my thought would be | ||
I don't see why I have to manually cast to .Str all the time | |||
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/RBulbfJlycMissing « 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» | ||
Skarsnik | m: class C { method gist returns Str { rand } }; say C | ||
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» | ||
Skarsnik | lol really | ||
15:50
havenwood left
15:51
virtualsue left
|
|||
DukeOfPerl Says good-bye to go work on the AI Mind Perl6 "Killer App". | 15:52 | ||
15:52
DukeOfPerl left
|
|||
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 | ||
DrForr | The joke will be on us when it achieves Singularity and takes over the world. | 15:54 | |
Zoffix | :) | 15:55 | |
hankache | ;) | ||
llfourn | he was a perl 5 AI right? That's what I thought he said. | ||
Skarsnik | lol | ||
15:57
virtualsue joined
|
|||
Zoffix | m: say $PROCESS::OUT.Str | 15:58 | |
camelia | rakudo-moar 725348: OUTPUT«IO::Special.new(what => "<STDOUT>")» | 15:59 | |
15:59
uruwi joined
|
|||
Zoffix | (not on docs: /types) | 15:59 | |
autarch | is there an IMPORT or import sub called when a module is 'use'd? | ||
Zoffix | autarch, doc.perl6.org/language/modules#Expo..._Importing | 16:00 | |
doc.perl6.org/language/modules#EXPORT on that page in particular | |||
autarch | hmm, but there's no sub that's designed for _accepting_ options and not exporting stuff | 16:01 | |
llfourn | autarch: yes EXPORT | ||
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 | ||
llfourn | autarch: yeah just do stuff and return an empty {} | ||
Zoffix | autarch, sub EXPORT (*@args, *%args) { return {}; } | 16:02 | |
autarch | well, what if I want to export stuff too? | ||
can I "callsame" to get the defaults to happen? | |||
llfourn | autarch: just return stuff in the { }, or do you mean you want is export to work | ||
autarch | yes, I want it to work | ||
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? | ||
llfourn | autarch: you don't need to | 16:04 | |
it's always invoked | |||
&EXPORT doesn't override anything | |||
autarch | ah, cool | ||
llfourn | the default exporter is called EXPORTALL or something I think but I've never dealt with it | ||
16:05
_nadim left
|
|||
llfourn | autarch: out of interest what mischief are you planning on getting up to in sub EXPORT {} | 16:06 | |
16:07
hankache left
|
|||
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:07 | |
and since this is not an object, there's really no other API to use | 16:08 | ||
actually, hmm, I take that back, I suppose I could just have a sub you could call to disable those events | |||
... which I now realize is probably a better way to do this for now | |||
llfourn | sounds reasonable to me | 16:10 | |
mst | autarch: please look at the split front-end/back-end architecture of Test2 | 16:11 | |
16:11
RabidGravy joined
|
|||
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 | ||
autarch | yes, that's exactly how it's designed | ||
it's only named Test::Stream::Subs for now because it's in the same git repo | |||
mst | that wasn't clear, especially given you're still using Test::Stream as a name, which also got discarded during this process | ||
autarch | it would be very easy to move it to its own distro and make it require the Test::Stream core | ||
well, there's no reason to call this stuff Test2 for perl 6 | 16:13 | ||
timotimo | T3st, please | ||
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" | ||
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! | ||
autarch | what should it be called then? I don't particularly care about the name | 16:15 | |
llfourn | funrep: no probs! | ||
Skarsnik | I like T3est | ||
mst | autarch: how about a working name of 'Test::Predicates' with an assumption somebody will find you a better one? | ||
autarch | sure, that works | ||
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 | ||
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:21
zwu left
|
|||
autarch | what's the operator to iterate over >1 list at a time? | 16:22 | |
hoelzro | autarch: Z? | 16:23 | |
for @first Z @second -> $first-element, $second-element { ... } | |||
autarch | yes, that's what I wanted | ||
16:24
pochi_ is now known as pochi
|
|||
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:24 | |
RabidGravy | Ok darlings, is it actually possible to create a useable role on the fly? | 16:26 | |
I thought something like | |||
m: my $a = Metamodel::ParametricRoleHOW.new_type(name => "Bnana"); $a.^compose; my $b = 1; $b does $a | |||
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…» | ||
RabidGravy | but clearly it doesn't work how I anticipated | 16:27 | |
16:27
virtualsue left
|
|||
moritz | RabidGravy: first of all you should bind to $a, not assign to it; otherwise you might end up composing Scalar | 16:28 | |
RabidGravy: the MOP is fiddly in this way | |||
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. | ||
I guess this is a point where I can start calling myself a Perl 6 programmer ^_^ | |||
RabidGravy | Zoffix, it's a false dawn ;-) | 16:31 | |
16:31
virtualsue joined
|
|||
Zoffix looks at en.wikipedia.org/wiki/False_dawn and doesn't get the reference | 16:31 | ||
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 | ||
Zoffix | ^ this is the second time someone asks that in 2 days :) We should have a solution | ||
hoelzro | yes, it does | ||
Zoffix | hoelzro, but does that satisfy the "move them manually" portion? | ||
MadcapJake | really, so I can specify a DESTDIR on the make install? | 16:35 | |
and it won't affect how the paths are written to the scripts? | |||
hoelzro | --prefix tells Perl 6 where it will live someday | ||
nine | MadcapJake: the openSUSE packages are built just like that | ||
MadcapJake | nine, thanks, that'll be really helpful | ||
hoelzro | DESTDIR tells make install where to move the files | ||
we have arch PKGBUILDS in perl6/os-build that should be pretty easy to fllow | |||
nine | MadcapJake: build.opensuse.org/package/view_fi...c?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
|
|||
MadcapJake | nine, thanks! | 16:36 | |
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. | ||
hoelzro | you should probably trust nine's answer more; my arch pkgbuilds are probably rather outdated | ||
MadcapJake | hoelzro, oh i see that arch uses destdir actually, gah! I'm just not very knowledgeable with make/make install | ||
16:38
salv0 left
|
|||
MadcapJake | hoelzro, nine: it looks like both of your packages separate moar and nqp out into separate packages, is that a good idea? | 16:38 | |
hoelzro | MadcapJake: for arch, it's necessary | 16:39 | |
although...you *could* probably get away without it | |||
it would just be hacky | |||
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 | ||
MadcapJake | but if i can use destdir, i might be able to get away with it B) | ||
hoelzro | but that's from my experience | ||
16:41
pjscott joined
|
|||
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 | |
I think Moar can handle it | |||
I don't think NQP can | |||
but I may be wrong | |||
MadcapJake | hoelzro, that's exactly the problem i've been having actually! | ||
nqp fails to find moar | |||
hoelzro | I just tried once, it didn't work, and moved on =) | ||
MadcapJake | ok so it's settled, just make it three packages and be done with it! thanks so much hoelzro & nine! | 16:42 | |
nine | MadcapJake: thanks for packaging rakudo :) | 16:43 | |
hoelzro | indeed! | ||
MadcapJake++ | |||
16:44
Ch0c0late left
|
|||
MadcapJake | no prob! this OS is really neat and need my perl 6 if I'm gonna stick with it :P | 16:45 | |
Skarsnik | what system? | 16:46 | |
MadcapJake | solus-project.com it's a really nice custom gnome-shell and a custom-built OS underneath | 16:47 | |
I'm not particular knowledgeable of build systems but I think theirs is pretty innovative (along the lines of Nix package manager, I believe) wiki.solus-project.com/EvoBuild | 16:48 | ||
RabidGravy | but linux of some sort under the hood | 16:49 | |
MadcapJake | yep | ||
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 | ||
Zoffix | I see I'm not the only one posting P6 results on this :) twitter.com/OvidPerl/status/685770487989932032 | 16:52 | |
<3 Perl 6 | |||
Skarsnik | m: say "Story" ~~ /^(.+?)"+"?/ | 16:53 | |
camelia | rakudo-moar 725348: OUTPUT«「S」 0 => 「S」» | ||
Zoffix | m: say "Story" ~~ /^(.+?)"+"? $/ | 16:54 | |
camelia | rakudo-moar 725348: OUTPUT«「Story」 0 => 「Story」» | ||
16:54
psy_ joined
|
|||
Skarsnik | m: say "Story+{Role}" ~~ /^(.+?)"+"?/ | 16:54 | |
camelia | rakudo-moar 725348: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QsOUQdhBfwUndeclared name: Role used at line 1» | ||
Skarsnik | m: say 'Story+{Role}' ~~ /^(.+?)"+"?/ | ||
camelia | rakudo-moar 725348: OUTPUT«「S」 0 => 「S」» | ||
16:54
skids joined
|
|||
Zoffix | m: say 'Story+{Role}' ~~ /^(<-[+]>+)"+"?/ | 16:55 | |
camelia | rakudo-moar 725348: OUTPUT«「Story+」 0 => 「Story」» | ||
Zoffix | m: say 'Story+{Role}' ~~ /^(<-[+]>+?)"+"?/ | ||
camelia | rakudo-moar 725348: OUTPUT«「S」 0 => 「S」» | ||
Zoffix | :( | ||
Whatcha tryina match? | |||
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 | ||
Zoffix | Why is that not Z? | ||
Skarsnik | Well I want to capture Story | ||
autarch | Z produces a set of 2 element lists | ||
hoelzro | ah, my bad | ||
Zoffix | m: say 'Story+{Role}' ~~ /^(\w+)/ | ||
camelia | rakudo-moar 725348: OUTPUT«「Story」 0 => 「Story」» | ||
hoelzro | for @first Z @second -> ($first-element, $second-element) { ... } | ||
autarch | oh, I just need to destructure | ||
hoelzro | autarch: ↑ | ||
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 | ||
Z does, .kv doesn't | |||
Skarsnik | m: class My_class-a {}; | ||
camelia | ( no output ) | ||
Zoffix | Skarsnik, that's why I asked what you're trying to match :) | ||
m: say "Story+{Role}" ~~ /^(.+) '+'? '{'/ | 16:58 | ||
camelia | rakudo-moar 725348: OUTPUT«5===SORRY!5=== Error while compiling /tmp/a7hz3Om0YwUndeclared name: Role used at line 1» | ||
Zoffix | m: say 'Story+{Role}' ~~ /^(.+) '+'? '{'/ | ||
camelia | rakudo-moar 725348: OUTPUT«「Story+{」 0 => 「Story+」» | ||
moritz | autarch: for @a Z @b -> ($a, $b) { ... } works fine and is idiomatic | ||
Zoffix use Acme::GiveUp; | |||
autarch | moritz: yep, already figured that out - I got hung up on the destructuring at first | ||
moritz | autarch: the alternative is to use explicit flattening: for flat @a Z @b -> $a, $b { ... } | 16:59 | |
autarch | ah | ||
hoelzro | ahhh | ||
lucasb | or more uglier: @a Z[&slip] @b | 17:00 | |
RabidGravy | boom | ||
Skarsnik | m: say 'Story+{Role}' ~~ /^[!"+"]+/ | ||
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…» | ||
Skarsnik | m: say 'Story+{Role}' ~~ /^<!"+">+/ | ||
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 …» | ||
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; | ||
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» | ||
timotimo | aaw | ||
Skarsnik | I think grouping is weird x) | 17:01 | |
m: say 'Story+{Role}' ~~ /^<!+>+/ | |||
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…» | ||
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
zwu left
|
|||
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» | ||
Skarsnik | m: say 'Story+{Role}' ~~ /^<[-+]>+/ | 17:02 | |
camelia | rakudo-moar 725348: OUTPUT«Nil» | ||
Skarsnik | m: say 'Story+{Role}' ~~ /^(<[-+]>+)/ | ||
camelia | rakudo-moar 725348: OUTPUT«Nil» | ||
Skarsnik | m: say 'Story+{Role}' ~~ /^<-[+]>+/ | 17:04 | |
camelia | rakudo-moar 725348: OUTPUT«「Story」» | ||
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 | ||
camelia | rakudo-moar 725348: OUTPUT«False» | ||
autarch | is that really intentional? | ||
Skarsnik | lol what | ||
m: Bool::False ~~ Bool::False; | |||
camelia | ( no output ) | ||
Skarsnik | m: say Bool::False ~~ Bool::False; | ||
camelia | rakudo-moar 725348: OUTPUT«False» | ||
autarch | that just seems really really wrong | 17:06 | |
leont | Yeah, Bools smartmatch that way | ||
It surprised me too | |||
Skarsnik | m: my Bool $bool1; my $a = False; if ($a ~~ $bool1) {say 'hello'}; | 17:07 | |
camelia | rakudo-moar 725348: OUTPUT«hello» | ||
autarch | that's also confusing | ||
Skarsnik | m: my Bool $bool1 = False; my $a = False; if ($a ~~ $bool1) {say 'hello'}; | 17:08 | |
camelia | ( no output ) | ||
nine | Why? False is a Bool so it smartmatches | ||
Skarsnik | look like that could lead to weird bug | ||
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. | ||
moritz | Skarsnik: the alternative is also prone to errors | ||
autarch | right, I don't see why a Bool type object matches False | ||
leont | It's the other way around | ||
False matches a Bool type object | |||
autarch | leont: oh, that does make sense | ||
moritz | Skarsnik: having ~~ False always be False and ~~ True always be True enables us to write stuff like ~~ *.defined | ||
autarch | so if I'm _expecting_ False how do I check that I got False? | ||
leont | === False | 17:10 | |
I also have had to use that | |||
moritz | autarch: !$thing or === False or eqv False | ||
Juerd | Why is it important to you that it's False instead of some other false value? | ||
leont | I needed it when dealing with an Enum that could be false, that I needed to handle differently | 17:11 | |
autarch | Juerd: because I'm comparing object attributes that I expect to get, and the object contains a Bool-typed attribute | 17:13 | |
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 :( | ||
autarch | Juerd: I have a hash of key/value pairs where keys are attributes to check and values are ... anything | ||
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. | ||
mst | === will test reference eqaulity and eqv contents? | ||
moritz | mst: yes | ||
17:15
leont left
|
|||
mst | egads, a use for my time in clisp land | 17:16 | |
Juerd | What do you mean by "reference equality"? =:= tests identity equality. | ||
Skarsnik | m: my Str @a; say @a.^type.of; say @a.^type.of.defined; | ||
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» | ||
moritz | Juerd: =:= tests container equality | ||
Juerd | moritz: Is this a container versus value thing? | ||
moritz | m: my ($a, $b); say $a =:= $b; say $a =:= $a; | ||
camelia | rakudo-moar 725348: OUTPUT«FalseTrue» | ||
moritz | m: my ($a, $b); say $a =:= $b; say $a =:= $a; say $a === $b; | 17:17 | |
camelia | rakudo-moar 725348: OUTPUT«FalseTrueTrue» | ||
moritz | Juerd: yes | ||
Juerd | Thanks. TIL :) | ||
Skarsnik | m: my Str @a; say @a.WHAT.of; say @a.WHAT.of.defined; | ||
camelia | rakudo-moar 725348: OUTPUT«(Str)False» | ||
Skarsnik | damn how I know the Array is 'typed' ? | ||
Juerd | Any array is typed. The default type is Any. | ||
17:18
pjscott left
|
|||
moritz | m: @a; say @a.of.perl | 17:18 | |
camelia | rakudo-moar 725348: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jIAPcwgECSVariable '@a' is not declaredat /tmp/jIAPcwgECS:1------> 3<BOL>7⏏5@a; say @a.of.perl» | ||
moritz | m: my @a; say @a.of.perl | ||
camelia | rakudo-moar 725348: OUTPUT«Mu» | ||
moritz | Juerd: Mu, not Any | ||
Juerd | To know that the array is typed to something other than Any, @a.WHAT.of !=== Any, I'd guess. | ||
Huh? | |||
Skarsnik | m: my Str @a; say @a.WHAT.of; say @a.WHAT.of !=== Any; | ||
camelia | rakudo-moar 725348: OUTPUT«(Str)True» | ||
Juerd | Why's the default type for array values Mu, but the default type for scalar values Any/ | ||
mst | but given there's always a type of some sort, one would imagine that testing it that way is odd anyway | ||
moritz | Juerd: otherwise you couldn't store a junction in an array | ||
Juerd | m: my $a; say $a.WHAT | ||
camelia | rakudo-moar 725348: OUTPUT«(Any)» | ||
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…» | ||
Juerd | m: my @a; say $a.of.WHAT | ||
camelia | rakudo-moar 725348: OUTPUT«5===SORRY!5=== Error while compiling /tmp/w6lqe7SMhzVariable '$a' is not declared. Did you mean '@a'?at /tmp/w6lqe7SMhz:1------> 3my @a; say 7⏏5$a.of.WHAT» | ||
Juerd | er :) | ||
m: my @a; say $a.WHAT.of | |||
camelia | rakudo-moar 725348: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Mnq9CwfEOqVariable '$a' is not declared. Did you mean '@a'?at /tmp/Mnq9CwfEOq:1------> 3my @a; say 7⏏5$a.WHAT.of» | ||
Juerd | I see what I did wrong but I won't spam the channel more than this :) | ||
Skarsnik | m: my @a; say @a.WHAT.of; say @a.WHAT.of !=== Mu; | ||
camelia | rakudo-moar 725348: OUTPUT«Cannot look up attributes in a type object in block <unit> at /tmp/ZUPn_Z5qjB line 1» | ||
Skarsnik | $a = @a | ||
m: my @a; say @a.WHAT.of; say @a.WHAT.of; | |||
camelia | rakudo-moar 725348: OUTPUT«Cannot look up attributes in a type object in block <unit> at /tmp/GeqUJxKqJQ line 1» | ||
Skarsnik | that... | 17:20 | |
timotimo | why would you inspect the .of of the WHAT? | ||
m: my @a; say @a.of.perl | |||
camelia | rakudo-moar 725348: OUTPUT«Mu» | ||
Skarsnik | I want to know the type of an Array | ||
timotimo | don't forget the .WHAT gives you the type object | ||
Skarsnik | well the of | ||
dalek | osystem: 04668e6 | hoelzro++ | META.list: Add POD::EOD to ecosystem |
||
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)» | ||
Skarsnik | m: my Str @b; my @a; say @a.WHAT.^can('of'), @b.WHAT.^can('of'); | ||
camelia | rakudo-moar 725348: OUTPUT«(of of)(of of of)» | ||
Skarsnik | gah | ||
moritz | Skarsnik: not that you can use @a.of directly; no need to go through @a.WHAT.of | ||
Skarsnik: s/not/note/ | |||
timotimo | going through .WHAT.of is wrong, too. | 17:22 | |
not just unnecessary | |||
Skarsnik | why it's wrong? | ||
moritz | timotimo: I don't think so | ||
Juerd | m: my $a; say $a.WHAT; $a = 1|2; say $a.WHAT; | ||
camelia | rakudo-moar 725348: OUTPUT«(Any)(Junction)» | ||
moritz | m: my Str @a; say @a.^name | ||
camelia | rakudo-moar 725348: OUTPUT«Array[Str]» | ||
timotimo | oh, the .of is a property of the type, not the instance? | ||
Juerd | moritz: Why can this Any hold a junction? | ||
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 | ||
Skarsnik | Yes, of in on the type | ||
moritz | Juerd: $a is typed Mu but defaults to Any | ||
hoelzro | m: DOC INIT { use Pod::EOD } | ||
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>…» | ||
timotimo | m: my $a; say $a.VAR.of | ||
camelia | rakudo-moar 725348: OUTPUT«(Mu)» | ||
Juerd | I see | 17:23 | |
Thanks | |||
17:23
dustinm`_ left
|
|||
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? | ||
Skarsnik | why array attribute are Positional? | ||
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. | ||
Skarsnik | It really weird when doing stuff with A.^attributes | ||
moritz | Juerd: like my $x; $x++; # would fail if $x defaulted to Mu | ||
orelse $++ on a junction of variables wouldn't work | |||
Juerd | moritz: Ah. Thanks. | ||
moritz | it tooks us some iterations to find that out the hard way :-) | 17:25 | |
Skarsnik | How I know a class is not a Core class? | 17:26 | |
Yes I have weird need x) | |||
timotimo | you can go through CORE::.keys (except be careful of StopIteration being in there) | ||
moritz | m: say CORE::<Int>.exists | ||
camelia | rakudo-moar 725348: OUTPUT«Method 'exists' not found for invocant of class 'Int' in block <unit> at /tmp/w_irkTOQ0G line 1» | ||
timotimo | oh. or that | ||
moritz | m: say CORE::<Int>:exists | ||
camelia | rakudo-moar 725348: OUTPUT«True» | ||
llfourn | m: class Foo {}; CORE::<Foo>:exists.say | ||
camelia | rakudo-moar 725348: OUTPUT«False» | ||
moritz | it's a hash; you don't have to iterate it to check of existence :-) | 17:27 | |
timotimo | well ..... | ||
m: constant Foo = Int; say CORE::{Foo}:exists | |||
camelia | rakudo-moar 725348: OUTPUT«Use of uninitialized value of type Int in string contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/fGzaxdFDgl line 1False» | ||
timotimo | m: constant Foo = Int; say CORE::{Foo.name}:exists | ||
camelia | rakudo-moar 725348: OUTPUT«Method 'name' not found for invocant of class 'Int' in block <unit> at /tmp/20QrUEWwqW line 1» | ||
timotimo | m: constant Foo = Int; say CORE::{Foo.^name}:exists | ||
camelia | rakudo-moar 725348: OUTPUT«True» | ||
moritz | could still be redeclared in an inner scope | ||
timotimo | ah | ||
moritz | m: { my class Date { }; say CORE::{ Date.^name}:exists } | ||
camelia | rakudo-moar 725348: OUTPUT«True» | ||
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 } | ||
camelia | rakudo-moar 725348: OUTPUT«False» | ||
17:28
virtualsue left
|
|||
timotimo | good | 17:28 | |
moritz | m: { say CORE::{ Date.^name}:exists && CORE::{ Date.^name } =:= Date } | ||
camelia | rakudo-moar 725348: OUTPUT«True» | ||
moritz | and yes, that's actually abusing =:= | ||
llfourn | moritz: shouldn't you check === | ||
Zoffix | m: my \x = 2; say x x x x x # :D | ||
camelia | rakudo-moar 725348: OUTPUT«2222» | ||
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 | ||
moritz | (which is why the setting code uses =:= to test for StopIteration) | ||
hoelzro | I suppose DOC INIT doesn't defer use statements in its block? | ||
llfourn | what if you do have containers and have Mu? | ||
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 | ||
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 | ||
TimToady | I see why the warning for ~~ True and ~~ False went away; testing a patch | ||
yoleaux | 12:02Z <CIAvash> TimToady: Is there a reason '≠', '≤' and '≥' are not used for '!=', '<=' and | ||
llfourn | moritz: ah. I sorta ran into that problem the other day... I think I worked around it somehow | 17:31 | |
17:31
dustinm` joined,
skids left
|
|||
Zoffix | +1 for '≠', '≤' and '≥' | 17:31 | |
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 | ||
Zoffix | mst, why? | ||
mst, get on with the times, old man :P | |||
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 | ||
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 | ||
Zoffix | Sounds like an easy thing to do with perl -pi -e''. | ||
moritz | mst++ | ||
Zoffix | Surely ⊈ is much clearer than !(<=) | ||
moritz | Zoffix: such things are always easy, until you hit the corner cases | 17:34 | |
like, not wanting to do that inside literals | |||
mst | TimToady: Bill Joy's visual interface for ex is not what you'd call designed for unicode | ||
and I'm running a private fork of the real thing ;) | |||
17:34
uruwi left
|
|||
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 | |
17:34
citizenX joined
|
|||
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
|
|||
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 gist.github.com/Skarsnik/ea16c3d9b305bed0f536 with these weird MOP stuff x) | ||
17:36
citizenX left
|
|||
TimToady | merely having single and double-wide characters is not sufficient | 17:36 | |
Zoffix | Skarsnik, an ORM? | ||
17:36
uruwi joined
|
|||
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:36 | ||
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 | ||
TimToady | m: say m: say 𒐫 | ||
camelia | rakudo-moar 725348: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LyXmcb8MgpColons may not be used to delimit quoting constructsat /tmp/LyXmcb8Mgp:1------> 3say m:7⏏5 say 𒐫 expecting any of: colon pair (restricted)» | ||
Zoffix | I'm only 1 out of three for those :) | ||
TimToady | m: say 𒐫 | ||
camelia | rakudo-moar 725348: OUTPUT«9» | ||
Zoffix | Skarsnik++ | 17:38 | |
.u 𒐫 | |||
yoleaux | U+1242B CUNEIFORM NUMERIC SIGN NINE SHAR2 [Nl] (𒐫) | ||
Skarsnik | and I use WHY for fun ^^ | ||
I could even say 'id' that look like a good primary key candidate xD | 17:39 | ||
17:39
ghost_ joined
|
|||
Zoffix | And I also want subtest 'test description', { code-of-the-subtest }; | 17:40 | |
17:41
sena_kun joined
|
|||
Zoffix starts github.com/perl6/zoffixs-wishes-and-demands | 17:41 | ||
Skarsnik | Oh yeah | ||
DrForr | While you're at it I'd like to add $num-tests-to-run to that list. | ||
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 | ||
Zoffix | I can't believe I'm in the minority on the subtest() stuff :/ | ||
Skarsnik | I don't use subtests since you can't name it :) | ||
DrForr | Or at least nested 'plan $x' inside subtests, which might FAIK work, haven't tried it. | ||
subtest sub { }, 'name goes here'; | 17:42 | ||
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 | ||
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 }; | ||
mst | which, frankly, is the only place a plan is a good idea | ||
top level plans are just merge error generators | 17:44 | ||
Zoffix | s/now/how/; | ||
llfourn | m: .say for '𒐬'..'𒐫'; | ||
camelia | ( no output ) | ||
llfourn | :( | ||
mst | Zoffix: of course, you start discussing this just after leont quits | ||
17:44
vendethiel left
|
|||
Zoffix | m: .say for 𒐬..𒐫; | 17:44 | |
camelia | rakudo-moar 725348: OUTPUT«123456789» | ||
Zoffix | mst, well, I brought it up ages ago, but no one shared my opinion :) | ||
llfourn | Zoffix: you can't print the chars through :( | 17:45 | |
Zoffix | Ah | ||
mst | I have to say 'subtest $name, $code;' seems far far nicer | ||
and I'm not sure why it's t'other way round | |||
Zoffix | mst, for consistency with all the other &test, $expected, $optional-description | ||
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 | ||
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. | ||
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 | ||
mst grumbles | |||
Zoffix nods | |||
DrForr | And I'd agree, it should be at the front for readability's sake. | ||
mst | a foolish consistency is the hobgoblin of little minds | ||
(for once, the -real- quote applies, not the bastardised version ;) | |||
Zoffix | :) | 17:47 | |
DrForr | Egads, the perl6 tutorial is 1st thing in the morning, 1st day of OSCON. | ||
RabidGravy | mst, it could even be a multi so both the "description first" and "description last " be happy | ||
Zoffix | Is that bad? | ||
mst | RabidGravy: which is -probably- the right thing to do, yeah | ||
DrForr | I am *so* not a morning person. | ||
lucasb | TimToady: do you think enum E 'a','b','c' should work? or is the parentheses there really required? | 17:48 | |
RabidGravy | hey I've giveen some great talks with the worst hangovers ;-) | 17:49 | |
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
CIAvash left
|
|||
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 ;) | ||
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 | ||
Zoffix | m: say 5**+; say 5**-; say 5**⁻ | ||
camelia | rakudo-moar 725348: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vBOSRI6q5RPrefix + requires an argument, but no valid term foundat /tmp/vBOSRI6q5R:1------> 3say 5**+7⏏5; say 5**-; say 5**⁻ expecting any of: prefix» | ||
RabidGravy | ;-) | ||
Zoffix | They're listed in doc.perl6.org/language/unicode_texas tho | ||
mst | DrForr: drink breakfast. you'll be fine. | ||
17:52
zakharyas joined
|
|||
DrForr | Well, there'll be a bottle of Chartreuse Noix in my bag on the way over, that'll handle the rest :) | 17:52 | |
17:52
CIAvash joined
|
|||
RabidGravy | you can't have chartreuse unless BooK is involved ;-) | 17:53 | |
dalek | c: 7920764 | (Zoffix Znet)++ | doc/Language/unicode_texas.pod: Remove Texas superscript +/- as those do not work And they don"t really need to |
||
kudo/nom: 4f2bfcf | TimToady++ | src/Perl6/Actions.nqp: re-enable warning on ~~ True and ~~ False The warning was accidentally bypassed by code that makes it possible to chain ~~ on rhs literals. |
17:54 | ||
CIAvash | m: say 2 ** -3 | 17:55 | |
camelia | rakudo-moar 725348: OUTPUT«0.125» | ||
CIAvash | m: say 2⁻³ | ||
camelia | rakudo-moar 725348: OUTPUT«0.125» | ||
TimToady | I assume the doc problem was the Texas part, not the superscript part | ||
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 | |
s/write/wrote/ | |||
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 :) | ||
timotimo | sena_kun: the reason is $buff.elems | ||
there's not yet a super clever way to get the first N elements of a CArray into a blob or buf ... | |||
RabidGravy | sena_kun, check out my NativeHelpers::Array, it has most of those things | ||
moritz | I kinda like the requirements for parens (or a quoting construct), as to limit the impact of two terms in a row | ||
timotimo | oh, neat | 17:58 | |
sena_kun | timotimo, I'll try now, okay. | ||
lucasb | TimToady: ok, thanks | ||
sena_kun | RabidGravy, thanks for reference. I'll look at it. | ||
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 | ||
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 | ||
sena_kun | Skarsnik, $buff is a CArray, actually(name is strongly temportary). | ||
18:01
gist_nb joined
18:02
vendethiel joined
|
|||
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:05 | |
so a C function that populates an array must always tell you how big | 18:06 | ||
or more typically you give an array and say how big | |||
mst | my $buff is Strong; | 18:07 | |
18:11
sftf left
|
|||
lucasb | ah, I found the ticket I was looking: rt.perl.org/Public/Bug/Display.html?id=126891 | 18:11 | |
I was going to add more snippets there, but I think there's no need. the ticket already cover all cases | |||
Zoffix | What's the way to check the message from `fail` in the test? | ||
m: sub foo { fail "error"; }; use Test; throws-like { foo }, X::AdHoc.new: :payload<error> | |||
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…» | ||
lucasb | m: my Int $x; $x = module {}; $x = package {}; $x = role {}; say 'ok' # this snippet | ||
camelia | rakudo-moar 4f2bfc: OUTPUT«ok» | ||
Skarsnik | it ignore the type?! | 18:13 | |
lucasb | maybe because a Failure is not an Exception? | 18:14 | |
Zoffix | The expected/got match in the full output: gist.github.com/zoffixznet/313f5520cdd6440a68bf | 18:15 | |
It works if I just use `X::AdHoc`, but I need to test the actual message is correct | 18:16 | ||
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:17
zakharyas left
|
|||
Zoffix | Thanks | 18:18 | |
moritz | Zoffix: throws-like uses try, which fatalizes fail()s, so you get an exception back, not a Failure | ||
and the exception has .message, not .payload | |||
TimToady | .tell gfldex could you please file a bug for Q:s:b{\$x}? | ||
yoleaux | TimToady: I'll pass your message to gfldex. | ||
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:19 | |
18:20
frankjh left
|
|||
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 | ||
yoleaux | 18:18Z <TimToady> gfldex: could you please file a bug for Q:s:b{\$x}? | ||
18:21
_nadim joined
|
|||
timotimo | lucasb: oh, durr :) | 18:21 | |
18:21
gist_nb left
|
|||
dalek | c: ad791da | (Zoffix Znet)++ | doc/Language/testing.pod: Add example of testing a fail() |
18:22 | |
c: 542ca73 | (Zoffix Znet)++ | doc/Language/testing.pod: Strip trailing whitespace |
|||
gfldex | TimToady: filed as wished under #127226 | 18:25 | |
18:27
pi4 left
|
|||
lucasb | what should that Q:s:b{\$x} return? "42" or "$x" ? | 18:31 | |
gfldex | 42 | ||
it's The Answer after all | 18:32 | ||
lucasb | but "\$x" returns '$x' | ||
gfldex | sorry, i'm confused | ||
lucasb | what you get evaluated first, the scalar interpolation or the backslash escaping the dollar sign | ||
? | |||
m: my $x = 42; say "\$x" | 18:33 | ||
camelia | rakudo-moar 4f2bfc: OUTPUT«$x» | ||
lucasb | *what will get eval first | ||
gfldex | \$ should ignore the $ and remove the \ | ||
18:33
sena_kun left
|
|||
TimToady | I think :s should turn on backslashing for $ | 18:33 | |
gfldex return ENOSLEEP | 18:34 | ||
TimToady | and for \ | 18:35 | |
much like q turns on backslashing for \ and the delimiter | |||
lucasb | ok, makes sense. so Q:s/\$x/ should return '$x' ? | 18:36 | |
TimToady | nod | ||
lucasb | and Q:b/\$x/ currently returns '\$x', but I think it should return only '$x'. iow, consume that backslash | 18:39 | |
18:39
_nadim left
|
|||
lucasb | m: say Q:b/\z/ | 18:40 | |
camelia | rakudo-moar 4f2bfc: OUTPUT«\z» | ||
lucasb | perl -wE 'say "\z"' #=> returns 'z' and warning: Unrecognized escape \z passed through | ||
TimToady | that's because it's in double quotes | 18:44 | |
perl -wE "say '\z'" # returns '\z' | 18:45 | ||
I'd argue this is more like '' than "" | |||
but only weakly, since I can see an argument for the other side as well | 18:47 | ||
one could argue that :b is the most important component of :qq | 18:49 | ||
and that, even though we're building stuff up from Q, :b is what trips it over into :qq semantics | |||
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... | ||
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 | |
so it's likely fair game to be classified as a bug | |||
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? irclog.perlgeek.de/perl6/2015-12-23#i_11762824 | ||
18:55
llfourn left
|
|||
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
|
|||
Skarsnik | Floyd-ATC, what is your full output? and did you try using the http::message/http::response class in h:u:a? | 18:57 | |
19:00
lnrdo left,
patrickz joined
|
|||
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 | |
tried encoding as 'ISO-8859-1' now, same result | |||
looks perfect in tcpdump but it just doesn't work | |||
pnu | "home" repo got missing from the default $*REPO.repo-chain in recent rakudos.. I wonder if I got the fix right? github.com/rakudo/rakudo/pull/678 | 19:02 | |
lizmat | Zoffix: re 7920764 , strangely enough, I lifted the superscript +- from the code, so if they don't work, it's a bug :-) | 19:05 | |
Zoffix | lizmat, they do work, but not their texas variants | 19:06 | |
lizmat | aaahhhhh... ok | ||
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 | |
19:07
vendethiel left
|
|||
Zoffix | Floyd-ATC, do you have a code example to look at? | 19:07 | |
Floyd-ATC | Hang on | ||
Zoffix | If it looks perfect in tcpdump, I can't imagine why the browsers would be ignoring it :P | 19:08 | |
19:08
lnrdo joined
|
|||
Floyd-ATC | pastebin.com/hsGecyGK | 19:10 | |
There HAS to be a difference there somewhere, I just can't see it | |||
Zoffix | Floyd-ATC, HTTP1/1 is wrong | 19:12 | |
Funny, Palemoon captures it as "HTTP/0.9 200 OK" | |||
Yup, changing lines 38 and 39 to HTTP/1.1 showed something in the browser | 19:13 | ||
Skarsnik | And I don't know what is confusing, Str are unicode, if you want unencoded stuff you need Buf x) | 19:14 | |
19:14
glucosade joined
|
|||
Floyd-ATC | OK, I'm off to hang myself in the basement now :-) | 19:14 | |
Skarsnik | or Blobl | ||
Zoffix | :D | ||
19:15
nzkindest left,
_Vi joined
|
|||
TimToady | CIAvash: I don't see anything wrong with your code, offhand, so please file a bug report if it leaks memory | 19:16 | |
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 :) | ||
TimToady | m: say False ~~ False | ||
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⏏5FalseFalse» | ||
TimToady | that one works again :) | 19:18 | |
Zoffix | m: say True ~~ True | ||
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⏏5TrueTrue» | ||
Floyd-ATC | Zoffix: Thanks for lending a fresh pair of eyes though, this was driving me crazy | ||
Zoffix | neat | ||
Floyd-ATC, no problem :) | |||
Floyd-ATC | stupid typo | ||
CIAvash | TimToady: ok, thanks | 19:19 | |
lucasb | the warning suggests ":so". any example where this adverb can be used? | 19:20 | |
TimToady | m: say True ~~ :so | ||
camelia | rakudo-moar 4f2bfc: OUTPUT«True» | ||
lucasb | ah, like that | ||
TimToady | m: say "anything" ~~ :so | ||
camelia | rakudo-moar 4f2bfc: OUTPUT«True» | ||
lucasb | TimToady: thanks! | ||
TimToady | m: say Cool ~~ :!so | 19:21 | |
camelia | rakudo-moar 4f2bfc: OUTPUT«True» | ||
Juerd | not so Cool after all? | ||
m: say not so Cool | |||
camelia | rakudo-moar 4f2bfc: OUTPUT«True» | ||
TimToady | it's not so true, anyway | ||
Zoffix | m: say Perl or not Cool | 19:22 | |
camelia | rakudo-moar 4f2bfc: OUTPUT«(Perl)» | ||
lucasb | wrong precedence :P | 19:23 | |
Juerd | Perl is a type? | ||
What does it do? | |||
Zoffix | huggable, Perl | ||
huggable | Zoffix, nothing found | ||
Zoffix shrugs | 19:24 | ||
awwaiid | huggable? | ||
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. | ||
Zoffix | huggable, help | 19:25 | |
huggable | Zoffix, I'm a factoid bot. See me my source at github.com/zoffixznet/perl6-IRC-Cl...in-Factoid | ||
dalek | kudo/nom: a540b79 | (Panu Ervamaa)++ | src/core/CompUnit/RepositoryRegistry.pm: Use p6box_s for version when setting home repo |
||
kudo/nom: 20d5f0e | lizmat++ | src/core/CompUnit/RepositoryRegistry.pm: Merge pull request #678 from pnu/nom Use p6box_s for version when setting home repo |
|||
awwaiid | Zoffix: fancy! | 19:29 | |
19:29
Ch0c0late joined
19:30
cooper_ is now known as cooper
|
|||
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» | ||
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 ? | ||
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:32
lnrdo left
19:33
kjk joined
|
|||
awwaiid | m: say ('oh hai' ~~ :perl) ; say 'oh hai'.perl | 19:33 | |
camelia | rakudo-moar 20d5f0: OUTPUT«True"oh hai"» | ||
lucasb | TimToady: hm, ok. point taken :) | ||
Skarsnik | hm I can't use a Type as a key in a hash? | ||
awwaiid | m: say (5 ~~ :is-prime) | 19:34 | |
camelia | rakudo-moar 20d5f0: OUTPUT«True» | ||
19:34
sena_kun joined
|
|||
dalek | kudo/nom: 8c97759 | lizmat++ | src/core/ (3 files): Remove the Date/DateTime.new positional candidates To make it more like 6.c , even though there were no tests in roast to test the positional interface, it was felt it would be better to make sure the interface does not change at all. |
19:34 | |
19:34
lnrdo joined
|
|||
awwaiid | lucasb: I think it calls the method AND forces .Bool? | 19:34 | |
Zoffix | m: my %foo = Int => 42; say %foo<Int> | 19:35 | |
camelia | rakudo-moar 20d5f0: OUTPUT«42» | ||
Zoffix | Skarsnik, you can if you make it a string first :P | ||
awwaiid | still -- that's pretty powerful and convenient | ||
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? | ||
TimToady | m: my %foo := :{ (Int) => 42 }; say %foo{Int} | ||
camelia | rakudo-moar 20d5f0: OUTPUT«42» | ||
Zoffix | :o | ||
Skarsnik | like without the namespace or its roles | ||
TimToady | m: my %foo{Any}; %foo{Int} = 42; say %foo{Int} | 19:38 | |
camelia | rakudo-moar 20d5f0: OUTPUT«42» | ||
awwaiid | Skarsnik: what's an example of the input and output you desire? | ||
Skarsnik | m: class A {}; sub foo($a) {my %h{$a} = "foo"}; foo(A); | ||
camelia | rakudo-moar 20d5f0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VdVYllw4GpInvalid hash shape; type expectedat /tmp/VdVYllw4Gp:1------> 3class A {}; sub foo($a) {my %h{$a}7⏏5 = "foo"}; foo(A); expecting any of: constraint» | ||
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 contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in sub foo at /tmp/i0H9g1FAGD line 1» | ||
TimToady | use %h{Any} if you want an object key | ||
awwaiid | m: class A {}; sub foo($a) {my %h<Any>; %h{$a} = "foo"}; foo(A); | ||
TimToady | as I already demoed above | ||
camelia | rakudo-moar 20d5f0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Tu_RUrYeyeShaped 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);» | ||
Skarsnik | m: class A {}; sub foo($a) {my %h{Any}; %h{$a} = "foo"}; foo(A); | 19:40 | |
camelia | ( no output ) | ||
awwaiid | m: class A {}; sub foo($a) {my %h{Any}; %h{$a} = "foo"}; foo(A); | ||
camelia | ( no output ) | ||
awwaiid | oops | ||
Zoffix | lizmat, what should be done with rt.perl.org/Ticket/Display.html?id=127186 ? | ||
It's about positionals and Date[Time] | |||
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 ? | ||
kjk | hello~ how do you refer to a method of an object without calling it? "asdf".say | ||
Zoffix | lizmat, right, but it's marked as "tests needed". Are they still needed if the positionals are not longer an option? | 19:43 | |
lizmat | not for 6.c, so let's wait until we have 6.d testing set up | ||
Zoffix | kjk, what do you mean "refer to"? | ||
k | |||
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 | ||
m: class Foo { method bar { say "barrrs!" }; }; my $sub = Foo.new.^can: 'bar'; $sub() | |||
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» | ||
Zoffix | wat | ||
CIAvash | For those interested, I blogged about entering unicode characters in Emacs(the rfc1345 part can be used for Vim too) blog.ciavash.name/2016/01/09/enteri...emacs.html | 19:45 | |
Skarsnik | m: class Foo { method bar { say "barrrs!" }; }; my $sub = Foo.new.^can('bar'); $sub() | ||
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» | ||
Skarsnik | and can call it I think | 19:46 | |
lucasb | you have to ^can('method')[0], because it's a list | ||
Zoffix | m: class Foo { method bar { say "barrrs!" }; }; my $sub = Foo.new.can('bar'); $sub.perl.say | ||
camelia | rakudo-moar 20d5f0: OUTPUT«$(method bar (Foo $: *%_) { #`(Method|79663304) ... },)» | ||
Zoffix | Ah | ||
m: class Foo { method bar { say "barrrs!" }; }; my $sub = Foo.new.can('bar'); $sub[0]() | |||
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» | ||
Zoffix | m: class Foo { method bar { say "barrrs!" }; }; my $sub = Foo.new.^can('bar'); $sub[0]() | ||
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» | ||
Juerd | CIAvash: When typing the unicode character is more work than typing the texas variant, I'm not inclined to use the unicode variant :) | ||
Zoffix | kjk, well you get the idea ^_^ | 19:47 | |
TimToady | Juerd: well, do you care about the readers of your code? | ||
Juerd | s/more/much more/ | ||
TimToady | most code is read many more times than it is written | ||
Juerd | TimToady: That's another thing, I'm afraid that other people will have worse unicode/utf8 setups than I do :) | ||
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 | ||
lucasb | My terminal is not even configure for unicode! :) That's why at least errors/warnings could avoid unicode chars | ||
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 :) | ||
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! | ||
Juerd | I might use → though if it were supported. Because it's so pretty compared to -> ;) | ||
lucasb | well, I'm browsing with lynx, so I don't see images :) | ||
Zoffix | :o | ||
Juerd | lucasb: For real? | ||
lucasb | just kidding :) | ||
Juerd | I was hoping that :) | 19:50 | |
sena_kun | I'm annoynig today, probably, but what can be wrong here - pastebin.com/braJQ3M9 ? It's already three hours I'm trying to find out why value just vanishes. | ||
Zoffix | Juerd, the other day there was a person in here who uses w3m for everything | ||
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 | |
19:51
llfourn joined
|
|||
Juerd | sena_kun: Where's the rest of the code? Like copy-carray-to-buf... And what's the issue? | 19:53 | |
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:55 | |
19:56
llfourn left
|
|||
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 | osystem: 9ae6497 | (Zoffix Znet)++ | META.list: Add IO::MiddleMan to the Ecosystem IO::MiddleMan - hijack, capture, or mute writes to an IO::Handle - github.com/zoffixznet/perl6-IO-MiddleMan |
||
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 | ||
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. | ||
lizmat | hmmm... apparently Date.new *did* have a positional candidate, DateTime.new didn't | ||
TimToady | so obviously other people are tracking this better than me, so I'll shut up now :) | ||
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
jshy left
|
|||
lizmat | star-m: say Date.new(1999,12,12) | 19:58 | |
camelia | star-m 2015.09: OUTPUT«1999-12-12» | ||
lizmat continues fixing | |||
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
patrickz left
|
|||
CurtisOvidPoe | Hmm, on my box that’s this: DateTime.new(2016,1,9,20,59,6.68587803840637,3600) | 19:59 | |
19:59
patrickz joined
|
|||
Zoffix | CurtisOvidPoe, lizmat just pushed a commit that changed that | 20:00 | |
s/just/25m ago/; | |||
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. | ||
lizmat | CurtisOvidPoe: to preserve 6.c.ness | ||
CurtisOvidPoe | I’m too 6.c for my code … | ||
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. | ||
“Juerd”, even. (Who’s Jeurd?) | 20:02 | ||
Juerd | I don't know who Jeurd is :) | ||
CurtisOvidPoe | I hear he’s a jerk. | 20:03 | |
20:04
sena_kun left
|
|||
Juerd | How come you talk with proper quotes on IRC? | 20:04 | |
And an actual …, even. | 20:05 | ||
TimToady | why not? | ||
Juerd | I'm not complaining :) | ||
TimToady | ASCII is so 1970s | 20:06 | |
Juerd | I'd like to know why, or actually, what's making it so. | ||
TimToady | a number of folks here are using clients that tend toward smartquotes | ||
that's why Perl 6 handles them now | 20:07 | ||
Juerd | Let's see if irssi can do this | ||
Zoffix | P6's module production grew by 300% on www.modulecounts.com/ :) | ||
What's curious is P5's doubled too. | |||
20:07
sena_kun joined
|
|||
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) | ||
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 :) | ||
Juerd | Apparently irssi doesn't have this feature... | ||
20:09
lnrdo left
|
|||
Skarsnik | Zoffix, where do you see the grow? x) | 20:10 | |
stmuk__ | I hadn't noticed fosdem.org/2016/schedule/track/perl/ is up | ||
dalek | kudo/nom: dde4cef | lizmat++ | src/core/Date (2 files): Turns out Date.new *did* have positionals in 6.c |
||
El_Che | stmuk__: the last speaker confirmed today | 20:11 | |
so the list is definitive | |||
Zoffix | Skarsnik, 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
patrickz left,
hankache joined
20:16
lnrdo joined
|
|||
hankache | good evening #perl6 | 20:16 | |
20:16
patrickz joined
|
|||
Zoffix | \o | 20:17 | |
20:18
marmay joined
20:26
virtualsue left
20:27
vendethiel joined,
darutoko left
20:28
_nadim joined
20:31
domidumont left
|
|||
lizmat | TimToady: any thoughts an allowing ≤ and friends ? | 20:32 | |
(in 6.d. obviously :-) | |||
TimToady | irclog.perlgeek.de/perl6/2016-01-09#i_11859391 | 20:34 | |
20:35
_nadim left
|
|||
lizmat | TimToady++ | 20:35 | |
20:37
frankjh joined
20:41
RUR joined
|
|||
RUR | hi | 20:42 | |
i am trying to call some native library function which takes pointer to filehandler | 20:43 | ||
i am getting | 20:44 | ||
Native call expected return type with CPointer representation, but got a P6opaque | |||
sena_kun | RUR, did you meant "FILE*" pointer? | ||
RUR | yes | ||
20:45
CIAvash left
|
|||
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". | ||
arnsholt | Sounds like you're trying to pass a Perl 6 file handle | 20:46 | |
That's not gonna work | |||
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. | ||
RUR | gist.github.com/anonymous/9a1e1917c7eb737c0310 | 20:48 | |
arnsholt | Sure, but then you have to do ALL of your IO with libc functions | ||
Which is probably going to suck | |||
20:48
vendethiel left
|
|||
RUR | yes i am passing perl filehandle | 20:48 | |
arnsholt | Yeah, that's not supported | ||
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 | ||
arnsholt | 'Fraid not | ||
sena_kun | RUR, and it seems you're writing a bz2 library bindings, aren't you? | ||
RUR | just trying | ||
:) | |||
arnsholt | In your gist, you can't pass $error there either | ||
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. | ||
arnsholt | RabidGravy: Someone implemented that? Cool! | ||
RUR: Apparently I'm way out of date! | |||
Try what RabidGravy said | |||
Skarsnik | it's like 2 weeks old? | ||
RabidGravy | yeah, I put a ticket jnthn fixed it :) | ||
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 | ||
20:52
llfourn joined
|
|||
RUR | yup :), ok thanks for help | 20:52 | |
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! | ||
*use | |||
RabidGravy | arnsholt, you can even do ioctl, syswrite and everything with it :) | ||
arnsholt | Oh, wait. It returns the int fd, or a FILE*? | 20:54 | |
RabidGravy | fd | ||
20:54
pi4 joined
|
|||
RabidGravy | more useful for most things | 20:54 | |
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* | ||
RabidGravy | yeah | ||
arnsholt | Yup! =) | ||
20:57
llfourn left
|
|||
lizmat | not to mean to rain on the parade, but I think we cannot allow the native descriptor in 6.c | 20:57 | |
RabidGravy | why? | 20:58 | |
lizmat | because the library that is now is being developed, would *NOT* work on all compiler releases of 6.c | ||
RabidGravy | it was on the xmas rt list and got implemented before xmas | ||
lizmat | did it ? | ||
RabidGravy | yes | ||
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 :) | ||
RabidGravy | like 15th dec or something | ||
masak | lizmat++ # staying vigilant | 21:00 | |
21:00
frankjh left
|
|||
RabidGravy | yeah, I wrote code that used it on 16th december | 21:01 | |
so definitely before then :) | |||
lizmat | 344113cecbf5ffafe84da to be precise | ||
Implment fileno_fh op. | 21:02 | ||
Provides access to the native descriptor/handle underlying some OS | |||
handle. Platform specific. | |||
21:02
TEttinger joined
|
|||
lizmat | *phew* | 21:02 | |
RabidGravy | groovy | ||
nine | Oh wow, while I've been lazily watching Raiders of the Lost Ark, lizmat++ has already prepared DateTime for 6.d :) | 21:04 | |
lizmat: I guess with that the 6.c spec tests for DateTime pass again? | 21:05 | ||
lizmat | yeah, working on IO::ArgFiles c.s | ||
no, because the *test* was faulty | |||
and I didn't undo the fix | |||
dalek | kudo/nom: a28270f | lizmat++ | / (8 files): Restore old IO::ArgFiles behaviour This removes IO::CatPath and IO::CatHandle from the core. Hope to see it back some time in 6.d. |
21:07 | |
21:07
wamba left
|
|||
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 | ||
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 | ||
and then will see massive merge issues | |||
TimToady | Fear is the mind-killer, I fear... :) | 21:10 | |
autarch | I hope that whatever branch plans you have include regular (daily, ideally) merges | 21:11 | |
anything else is asking for trouble | |||
RabidGravy | indeed | ||
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? | ||
And why are we talking about branches? | |||
autarch | because if 6.d is going to contain breaking changes then you need a branch for it | ||
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 | ast: ece2218 | lizmat++ | S02-types/WHICH.t: Bring test back into 6.c. state |
||
masak | if the plan means we can avoid having branches, then I like the plan :) | ||
TimToady | well, if the blan to avoid branches makes merging/cherrypicking harder, then I'm not so sure | 21:14 | |
*plan | |||
nine | github.com/rakudo/rakudo/blob/nom/...ersions.md | ||
Why would it? | |||
lizmat | nine: how can we "augment" additional files in moar_core_sources ? | ||
masak | why would it make merging/cherry picking harder? | ||
nine | It's completely ortogonal to git and branches | ||
lizmat | without a branch ? | ||
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 | ||
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 | ||
nine: how can we "augment" new files like IO::CatHandle in moar_core_sources ? | |||
Skarsnik | I though supercede was not implemented? | ||
autarch | nine: a master & nom branch are branches | ||
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 | ||
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. | ||
lizmat | how can that be shared between 6.c and 6.d ? | ||
ok, so we just add files | |||
fine by me | |||
nine | yes | ||
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 ? | ||
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 | ||
lizmat: yes, yes, yes :) | |||
lizmat tries to let that sink in | 21:20 | ||
TimToady | we would like to be able to emulate older versions | ||
RabidGravy | I would hope only current and future versions, otherwise it will be immense in 10 years time :) | ||
nine | Ok, I'll just do further work in the language_versions branch tomorrow. I think it will be quite clear then :) | ||
lizmat | so if I understand the language_versions branch: it is a prototype of the future nom? | 21:21 | |
nine | yes | ||
TimToady | and nom is currently the "maint" branch of 6.c? | ||
lizmat | still not seeing the "change setting" happening | ||
21:22
hankache left
|
|||
lizmat | I mean, how can you now change to the RESTRICTED setting when already running, without shelling out ? | 21:22 | |
nine | lizmat: github.com/rakudo/rakudo/blob/lang....nqp#L1514 | ||
21:23
mohij joined
|
|||
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 } } | ||
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:23
patrickz left
|
|||
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:25
virtualsue joined
|
|||
lizmat | well, I guess I'm with RabidGravy | 21:25 | |
RabidGravy | :) | 21:26 | |
TimToady | well, our standard here is only "different mistakes" :) | ||
Juerd | m: use 🐵-SEE-NO-EVAL; | 21:27 | |
camelia | rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/OIWJhJTI33Bogus termat /tmp/OIWJhJTI33:1------> 3use7⏏5 🐵-SEE-NO-EVAL; expecting any of: argument list infix infix stopper postfix prefi…» | ||
Juerd | Aww :) | ||
lizmat | .u 🐵 | ||
yoleaux | U+1F435 MONKEY FACE [So] (🐵) | ||
RabidGravy | I'm with Juerd :) | ||
TimToady | .u 🙈 | ||
yoleaux | U+1F648 SEE-NO-EVIL MONKEY [So] (🙈) | ||
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" | ||
like "tuits", I think it's going to be very hard to explain to non-native english speakers :-( | |||
Juerd | rotflol, there actually is a SEE-NO-EVIL emoji. | 21:29 | |
Wow. | |||
TimToady | if it becomes horribly un-cute later, it will only add to the stigma of using EVAL | 21:30 | |
lizmat | m: "say 42".EVAL | 21:31 | |
camelia | rakudo-moar a28270: OUTPUT«42» | ||
lizmat | m: EVAL "say 42" | ||
camelia | rakudo-moar a28270: OUTPUT«42» | ||
TimToady | no problem till you interpolate | ||
lizmat | m: my $a = 42; "say $a".EVAL | 21:32 | |
camelia | rakudo-moar a28270: OUTPUT«42» | ||
lizmat | is that a bug ? | ||
TimToady | hmm | ||
I'd say so | |||
lizmat looks at fixing | |||
21:33
llfourn joined
|
|||
TimToady | m: say $a = 42; EVAL "say $a" | 21:33 | |
camelia | rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xg4_abXWRLVariable '$a' is not declaredat /tmp/xg4_abXWRL:1------> 3say 7⏏5$a = 42; EVAL "say $a"» | ||
TimToady | m: my $a = 42; EVAL "say $a" | ||
camelia | rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bjADu7u0QYEVAL 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…» | ||
TimToady | m: use MONKEY; my $a = 42; EVAL "say $a" | ||
camelia | rakudo-moar a28270: OUTPUT«42» | ||
21:34
wamba joined,
glucosade left
|
|||
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 | |
My-Module-Perl6? | |||
My-Module-6? | |||
21:36
vendethiel joined
|
|||
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 | ||
Skarsnik | I use perl6-stuff | 21:37 | |
for the github name | 21:38 | ||
RabidGravy | dalee, I have just named the *module* exactly the same, the github repo prexixed with p6- | ||
prefixed | |||
TimToady | hmm, when I trying install Linenoise, I get: Could not find Native::Resources::Build | ||
dalee | CurtisOvidPoe Linenoise seems to install fine via panda for me | 21:39 | |
TimToady | *try to | ||
Skarsnik | Native::Ressouces? | ||
moritz | somthing funny in the META.info maybe? | ||
CurtisOvidPoe | This is happening on two of my OS X boxes, only one of which is El Capitan. I can’t install any modules :( | ||
Skarsnik | Shell::Command is a panda issue | ||
CurtisOvidPoe | This happened in the past, but seemed to have been resolved. | ||
Now it’s back. | 21:40 | ||
Skarsnik | What did you use to install perl6/panda? | ||
CurtisOvidPoe | Srarksnik: rakudobrew build moar && rakudobrew build panda | ||
RabidGravy | goats blood and black candles | ||
lizmat | $ ls -ls lib/.precomp | wc -l | 21:41 | |
323 | |||
Skarsnik | I prefer dark purple candles | ||
lizmat | looks like we need some cleaning logic as well soonish | ||
RabidGravy | hipster ;-p | ||
TimToady | wow, after a bootstrap.pl, I get: resolve stage failed for Linenoise: Dependency Native::Resources is not present in the module ecosystem | ||
RabidGravy | eugh | ||
21:41
CurtisOvidPoe left
|
|||
Skarsnik | CurtisOvidPoe, did you rakudebrew nuke before updating? | 21:42 | |
TimToady | he dropped off | ||
21:42
CurtisOvidPoe joined
|
|||
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
virtualsue left
|
|||
CurtisOvidPoe | Skarsnik: how do I do that? “rakudobrew nuke” doesn’t appear to be a command. | 21:43 | |
21:44
schnuppi left
|
|||
lizmat | good night, #perl6! | 21:44 | |
Skarsnik | Good night lizmat | ||
RabidGravy | ah, the Native::Resources in the Linenoise meta | 21:45 | |
maybe a "panda update" may help here | |||
TimToady | panda update does nothing | 21:46 | |
RabidGravy | Hmm Native::Resources is definitely there in the ecosystem, maybe its meta is broken | 21:48 | |
no looks fine | |||
TimToady afks for a bit * | 21:49 | ||
RabidGravy | is the thing that builds the modules.perl.org idfferent to the thing that generates the project.json | 21:50 | |
21:53
sena_kun left
|
|||
Zoffix | RabidGravy, yes | 21:54 | |
Shell::Command should be installed when panda's installed | |||
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 | ||
dalee, I use perl6-Module-Name | 21:56 | ||
RabidGravy | yeah I think it's a case of "unlucky" | 21:57 | |
dalee | yeah, i'm going with perl6-XXX | 21:58 | |
21:58
vendethiel left
|
|||
Zoffix tries a fresh brew of perl6 | 21:59 | ||
dalek | kudo-star-daily: 4989e4c | coke++ | log/ (5 files): today (automated commit) |
||
RabidGravy | but in the end of the day it's just to disambiguate for github's thing so it's just please yourself | ||
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:02 | |
Zoffix | dalee, github for now. | 22:03 | |
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 | ||
Juerd | As a CPAN author, I wish I could disable the magic RT thing. | 22:05 | |
RabidGravy | Juerd, yeah | ||
Juerd | I always forget to look there. | ||
Sometimes people will email me and yell at me for not fixing a bug for over a year, or longer. | |||
22:05
BenGoldberg joined
|
|||
Zoffix | Ditto | 22:05 | |
Juerd | And then it's the first time I learn about the report. | ||
RabidGravy | oh I've got ten year old rt tickets | 22:06 | |
Juerd | You win :) | 22:07 | |
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. | ||
Skarsnik | I discover a ticket from 2003. I would prefer getting a mail lol | ||
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:09
kaare_ left
|
|||
CurtisOvidPoe | A couple of lines later it reads “Done, built panda for moar-nom" | 22:10 | |
RabidGravy | rakudobrew self-upgrade | ||
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; | ||
CurtisOvidPoe | Zoffix: trying now. | ||
Zoffix | With the git clone github.com/tadzik/rakudobrew ~/.rakudobrew; step after the rm -fr, of course :P | 22:12 | |
CurtisOvidPoe | Yeah, got that bit :) | ||
stmuk__ | w00t! more 6guts | 22:17 | |
RabidGravy | mmmm guts | 22:19 | |
dalek | osystem: 00db9ed | (Dale Evans)++ | META.list: add Text::Spintax to ecosystem, see github.com/daleevans/perl6-Text-Spintax |
||
osystem: 5315bb5 | moritz++ | META.list: Merge pull request #117 from daleevans/patch-1 add Text::Spintax to ecosystem, see github.com/daleevans/perl… |
|||
Zoffix | \o/ moar modules \o/ | 22:21 | |
RabidGravy | Rarr! | ||
CurtisOvidPoe, when are we going to move Corinna to Perl 6? | 22:22 | ||
I abandoned the moosifaction as I got busy | |||
CurtisOvidPoe | RabidGravy: when I don’t have one company and trying to start a second? :) | ||
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? | ||
Zoffix | dalee, as per the spec, yeah | ||
dalee | if so, Module::Minter should be updated | ||
22:23
ely-se joined
|
|||
dalee | i will go make a pull request for that | 22:24 | |
RabidGravy | CurtisOvidPoe, slacker ;-) I'll start next week | ||
Zoffix | But I'd argue we should allow a single "author" with a string to mean "authors": ["blah"} | ||
dalee++ | |||
22:24
pjscott joined
|
|||
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" | ||
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 | |
22:25
pjscott left
|
|||
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. | ||
dalee | what does 6.c mean? | ||
RabidGravy | but nothing but Test::META cares about | ||
Zoffix | dalee, minimum Perl 6 version your module works with | 22:26 | |
RabidGravy | CurtisOvidPoe, yeah | ||
dalee | so 6.0 at this point, or does 6.c have some meaning? | ||
CurtisOvidPoe | Zoffix: thank you. It looks like Panda works fine now. | ||
Zoffix | m: say so v6.0 before v6.c | ||
camelia | rakudo-moar a28270: OUTPUT«False» | ||
nine | CurtisOvidPoe: can you please create a github issue for the PERL5LIB thing? | ||
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 | ||
CurtisOvidPoe | nine: creating it now. | ||
Zoffix | dalee, and 6.0 also is a larger version number | ||
nine | CurtisOvidPoe++ | ||
Zoffix grumbles about versions and goes back to watching TV | 22:28 | ||
nine | It's "versions" not "version numbers" ;) | ||
dalee | so actually the key should be "perl6": "v6.c" if i understand design.perl6.org/S22.html correctly | 22:29 | |
RabidGravy | yeah, number is confusing | ||
dalee, no "v" | |||
orbus | anybody know if cas actually works? | 22:30 | |
RabidGravy | the spec is ambiguous | ||
orbus | in the sense of, is it really atomic? | ||
because it seems like it's not, or I'm doing something wrong | |||
m: my $x=0; await start { for ^1000 {cas($x,{$x+1} ) } } xx 8; put $x | |||
camelia | rakudo-moar a28270: OUTPUT«3525» | ||
dalee | well, that doc says Mandatory. The minimal perl version for which this distribution can be installed. Specified as a version string. So: | ||
"perl" : "v6.0.1" | |||
RabidGravy | but it's a string that represents a version, so the v is redundant at best | 22:31 | |
CurtisOvidPoe | nine: github.com/tadzik/rakudobrew/issues/79 | ||
RabidGravy | m: say Version.new("v6.c").Str | ||
camelia | rakudo-moar a28270: OUTPUT«v.6.c» | ||
RabidGravy | m: say Version.new("v6.c") | ||
camelia | rakudo-moar a28270: OUTPUT«vv.6.c» | ||
RabidGravy | the v becomes part of the version which is not what is meant | 22:32 | |
22:32
setty1 joined
|
|||
ugexe | that s22 link is not up to date | 22:33 | |
theres plenty of stuff in there that doesnt even exist anymore | |||
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» | ||
orbus | locks work at least | ||
RabidGravy | ugexe, yeah | ||
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 | ||
nine | Otherwise too many modules would be uninstallable I guess since panda now checks the Perl version | ||
orbus | lol | ||
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 | ||
hmm | |||
sub cas (\val,&code) { val = code(val) } # naive implementation of cas | 22:39 | ||
oh | |||
yeah | |||
that doesn't look super atomic | |||
ugexe | its not implemented | ||
orbus | guess it's a placeholder | ||
so I see :) | |||
ugexe | at least not when i asked a few months ago | 22:40 | |
orbus | well, that's what's in src/core/asyncops.pm | ||
so I think you're right | |||
stub implementation | |||
Quom__ | sub cas (\val,&code) { die "Uh, oops." } # naive implementation of cas | 22:41 | |
orbus | heh | ||
22:42
marmay left
|
|||
RabidGravy | I thought I so it implemented, or do I need to lay off the crack? | 22:42 | |
22:43
nzkindest joined
|
|||
orbus | well, unless someone implemented it post 2015.12, that straight assignment is what I found in the source | 22:43 | |
which would be equivalent as long as you don't actually try to do anything multithreaded | 22:44 | ||
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
|
|||
orbus | and I think the idea was to implement without locks | 22:46 | |
but sure | |||
that'd probably be a closer implementation | |||
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. | |||
that's what the synopsis says | 22:47 | ||
since it's talking about lock-free data structures, I'm assuming the backend implementation shouldn't use locks either | |||
but I am not a concurrency wizard | |||
RabidGravy | yeah, so it would have to be right in the VM | ||
orbus | probably | ||
guess it's not yet | 22:48 | ||
in the meantime, an implementation with locks might get closer to expected behavior though | |||
I think you'd have to maintain a global "cas lock" just for that function though? | 22:49 | ||
22:49
marmay joined
|
|||
orbus | hmm | 22:49 | |
ugexe | the older implementation was just sub cas (\val,&code) { code(val) } | ||
orbus | I don't think that would do what the synopsis says it should | 22:50 | |
i.e., swap val to point to the result of code | |||
RabidGravy | { my Slock = Lock.new; sub cas(*@args) { Slock.protect({ ..... })}} | 22:51 | |
22:51
RUR left
|
|||
RabidGravy | but yeah, in the VM | 22:51 | |
orbus | right - I just mean there'd have to be a lock defined in core for cas's exclusive use | 22:52 | |
22:52
cdg joined
|
|||
ugexe | a proper compare and swap compares if the value is different, and changes it only if so | 22:52 | |
hence the compare | |||
orbus | well | ||
the synopsis actually talks about two forms | 22:53 | ||
sub cas($ref is rw, $expected, $new) | |||
and the form with val and block | |||
but only the second one seems to be implemented at all | |||
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:54 | ||
I'm actually not sure how that's going to work from an implementation perspective | 22:55 | ||
it seems like you have to store the value of val, run the block, then compare val to "old val" | |||
RabidGravy | yeah, the intel cmpxchg op might be a bit difficult to implement for perl types | ||
orbus | the first form seems more like what I think of as "compare and swap" | 22:56 | |
anyway, I have a number of questions about what operations are atomic in perl6 anyway | 22:57 | ||
and not much of that is documented | |||
$x++ pretty clearly isn't | |||
add, then assign I guess | 22:58 | ||
22:58
marmay left
|
|||
ely-se | I want to implement Inline::COBOL. | 22:59 | |
RabidGravy | do it | ||
orbus | COBOL programmers will thank you | ||
all seven of them | |||
m: my $x=0; await start { for ^1000 { $x++ } } xx 8; put $x | |||
camelia | rakudo-moar a28270: OUTPUT«7271» | ||
RabidGravy | I learned cobol | ||
orbus | I have a friend who learned it in college | 23:00 | |
and he's not that old | |||
geekosaur started out doing cobol | |||
RabidGravy | like 34 years ago but I learnt it | ||
geekosaur | it's still used in business programming contexts | ||
orbus | I know - and from what I understand qualified programmers are in fairly short supply | ||
if you can do it, pays well | 23:01 | ||
23:01
mohij left
|
|||
orbus | at least that's what I hear | 23:01 | |
Juerd | rosettacode.org/wiki/Command-line_a...nts#Perl_6 could be improved with nicer examples. Anyone interested in writing something up? | ||
23:02
rindolf left
|
|||
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:04 | |
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 | |
23:05
patrickz joined
|
|||
RabidGravy | yeah this was all ICL mainframe stuff | 23:05 | |
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? | ||
ely-se | no just call gnucobol and link to the resulting shared object | 23:07 | |
Juerd | And rosettacode is offline *again* | 23:08 | |
I wonder how they manage to be down so much | |||
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 :) | ||
ely-se | now it hurts my eyes | ||
Juerd | ely-se: That's just the CSS being broken | ||
ely-se | mediawiki default theme is great | ||
CurtisOvidPoe | Though a grammar and macros would be better. | ||
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,
pjscott left
|
|||
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:11 | |
23:12
patrickz left
|
|||
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; | ||
camelia | rakudo-moar a28270: OUTPUT«8000» | ||
orbus | that seems to do it | ||
although I'm a little unsure about using state there | |||
not sure about the concurrency implications | 23:14 | ||
but the problem with that implementation is the lock is held for the duration of block | |||
really just the compare and swap at the end should be locked, in the absence of a system level implementation | 23:15 | ||
given the description in the synopsis | |||
hmmm | |||
23:15
Tonik left
|
|||
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 | |
23:16
nzkindest left,
patrickz joined
|
|||
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:16 | |
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 | |
straight | |||
geekosaur | need more than PIC there | 23:18 | |
23:18
mohij left
|
|||
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} | ||
(storage format for those is ASCII, binary, packed decimal respectively) | |||
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. | ||
geekosaur | well, EBCDIC | ||
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. | ||
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 | ||
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.) | ||
RabidGravy | yeah, I haven't really worked in those kinds of enterprises for 15 years | 23:21 | |
23:21
vendethiel joined
|
|||
RabidGravy | AS/400 you can just do an sql query on *any* file | 23:21 | |
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:22
Zoffix left
|
|||
RabidGravy | all good | 23:25 | |
and don't get me started on idms | 23:29 | ||
23:30
mohij joined
|
|||
RabidGravy | I guess that went away with icl maiframes | 23:30 | |
and cafs | 23:31 | ||
Juerd | Going through these rosettacode things is really annoying if it's down more than it's up... :) | ||
23:31
mohij left
|
|||
RabidGravy | actually I've used cafs on unix with informix | 23:31 | |
23:31
TEttinger left,
patrickz left
|
|||
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... | ||
orbus | .tell FROGGS failing tests on arm you asked about paste.scsys.co.uk/504181 | ||
yoleaux | orbus: I'll pass your message to FROGGS. | ||
RabidGravy | orbus, I RT'd that | 23:34 | |
masak | 'night, #perl6 | 23:35 | |
Juerd | @rosettacode.grep(/^C/) checked. | ||
9 items with a C in rosettacode.org/wiki/Category:Perl_..._attention | |||
23:36
nzkindest joined,
pjscott joined
|
|||
RabidGravy | orbus, I took a look at the code and I think it's mostly due to getting the alignment wrong on arm | 23:36 | |
unfortuntely the build slowness on the RPi militated against me investigating further | 23:39 | ||
23:42
vendethiel left,
pjscott left
23:43
pjscott joined,
pjscott left
23:44
pjscott joined
23:47
yqt joined
23:50
vendethiel joined,
wollmers joined
|
|||
wollmers | hi rakudistas | 23:50 | |
p6: my uint64 $z = +^0;say sprintf("%064b",$z); | 23:51 | ||
camelia | rakudo-moar a28270: OUTPUT«00000000000000000000000000000000000000000000000000000000000000-1» | ||
dalek | blets: 75874f6 | (Herbert Breunung)++ | docs/appendix- (2 files): added numeric type |
||
wollmers | p6: my uint32 $z = +^0;say sprintf("%032b",$z); | 23:52 | |
camelia | rakudo-moar a28270: OUTPUT«11111111111111111111111111111111» | ||
23:52
wamba left
|
|||
wollmers | p6: my uint64 $z = +^0;say sprintf("%064b",$z-1); | 23:52 | |
camelia | rakudo-moar a28270: OUTPUT«0000000000000000000000000000000000000000000000000000000000000-10» | ||
wollmers | p6: my uint64 $z = 1 +<63;say sprintf("%064b",$z); | 23:53 | |
camelia | rakudo-moar a28270: OUTPUT«-1000000000000000000000000000000000000000000000000000000000000000» | ||
RabidGravy | the unsigned part in the perl world is only a decoration right now | ||
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 | ||
wollmers | The unsigned seem to work so far. The spec-tests for sprintf() are wrong. | 23:55 | |
23:56
pjscott left
23:58
cdg left
|
|||
wollmers | @RabidGravy As far as I tested them, uint64 work with bitops. | 23:59 |