»ö« 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.
00:01 sue left
[Coke] ~~ 00:01
00:06 lizmat joined 00:08 Actualeyes joined, Actualeyes left
skink Apparently uint64 cannot unbox to a native integer 00:08
timotimo can you golf that problem?
skink m: my uint64 $len = 8; my $bytes = Buf.new; $bytes[$len - 1] = 0; say $bytes; 00:11
camelia rakudo-moar b8302b: OUTPUT«This type cannot unbox to a native integer␤ in block <unit> at /tmp/Gaq9v_Sxh9 line 1␤␤»
skink m: my $len = 8; my $bytes = Buf.new; $bytes[$len - 1] = 0; say $bytes;
camelia rakudo-moar b8302b: OUTPUT«Buf:0x<00 00 00 00 00 00 00 00>␤»
00:11 lizmat left
skink m: my uint64 $x = 5; say $x - 4 # this works though 00:12
camelia rakudo-moar b8302b: OUTPUT«1␤»
skink m: use NativeCall; my uint64 $len = 8; my $bytes = CArray[uint8].new; $bytes[$len - 1] = 0; say $bytes; 00:19
camelia rakudo-moar b8302b: OUTPUT«NativeCall::Types::CArray[uint8].new␤»
timotimo that's strange indeed; shouldn't it box the int for you for free? 00:30
00:30 telex left 00:31 cpage_ joined 00:32 telex joined 00:33 Khisanth left, khisanth_ joined 00:38 leont left 00:41 cibs joined 00:45 johndau joined 00:57 kurahaupo left 00:59 sufrostico left, kurahaupo joined, infina_ is now known as infina 01:00 aries_liuxueyang left 01:02 colomon joined 01:06 johndau left
[Coke] Did the last star release include a using perl6 book or has that been removed? 01:06
01:06 kurahaupo left, kurahaupo joined 01:07 aries_liuxueyang joined, johndau joined 01:09 mcsnolte joined 01:11 kurahaupo left
ZoffixWin
.oO( we have a perl6 book?? )
01:17
01:17 molaf left
[Coke] not really. 01:19
MadcapJake Xliff: you around? I'm back!
timotimo the book that's referred to is in perl6/book on github and it's fairly bitrotted 01:21
did anybody look at the perl6-examples build? seems like some code changed without having the corresponding tests updated: travis-ci.org/perl6/perl6-examples#L1122 01:22
also, the actual return type for the prime factors has changed from "list of pairs" to "hash" apparently
and the rhebus thing lost a line 01:23
MadcapJake Rabidgravy showed me how to use fdopen but now it hangs in fcntl.c
timotimo and grew a few parens on top of that
Xliff MadcapJake, yup 01:25
MadcapJake any ideas what to do to get around this hang?
Xliff The dependency loop?
MadcapJake no, what I am doing now in complete-raw-transform is moving all native stuff to Raw.pm6 01:26
so that way all other modules will just reference the one central location for nativecall stuff
should remove the dependency loop
Xliff Oh, and what's this about fdopen? I've used it in a test since I needed a file descriptor for a NativeCall routine. It didn't hang then. Maybe I need to pull new rakudo and retest?
OK, so the hang is fdopen related?
Xliff is like 2-3 seconds lagged. Brain tired. 01:27
MadcapJake so what I'm doing is testing all the native stuff (now that the interface will be available separately and I can make sure it all works) and I'm getting stuck at myhtml_tree_print_node_childs
initially my problem was that I wasn't providing a proper file handle, thanks to RabidGravy++ I was able to solve that, only it now hangs indefinitely 01:28
Xliff Let me update rakudo and test my fdopen
Let me retest my fdopen example. 01:29
01:30 molaf joined
Xliff Ohcrap! 01:32
Xliff headdesks.
I wrote the routine, but never finished writing the fdopen related sub.
cbwood@infinity:~/projects/p6-xqilla$ perl6 -Ilib t/01-testXqc.t 01:33
moar: xercesc/util/XMemory.cpp:63: static void* xercesc_3_1::XMemory::operator new(size_t, xercesc_3_1::MemoryManager*): Assertion `manager != 0' failed.
^^ That's why.
timotimo well, that's easy enough to figure out 01:35
MadcapJake how would i go about deciphering a hang? 01:37
skink Xliff, I figured out the Buf vs CArray thing for Crypt::Random on Windows
Xliff skink, Cool! 01:38
skink It wasn't a Buf vs CArray thing at all!
Xliff What was it?
skink It was actually not being able to Buf[uint64] for allocation
timotimo use perl6-gdb-m, ctrl-c when it's hung, "print MVM_dump_backtrace(tc)" to get a perl6-level backtrace
MadcapJake: ^
Xliff timotimo, Ooh!
Thought so.
Xliff tries.
timotimo you may have to "up" until you're in a function that actually has a "tc" in scope
MadcapJake timotimo: the hang is inside C code unfortunately 01:39
timotimo that's not so important
gdb is compatible with C
MadcapJake well when i do `bt` I get «in do_fcntl (arg=<optimized out>, cmd=7, fd=13) at ../sysdeps/unix/sysv/linux/fcntl.c:31» 01:40
Xliff Yeah. I can get a backtrace from libmyhtml.so
timotimo well, the thing is, with using the stdin and friends on moarvm
libuv has already gotten its grubby fingers on the file handle
and by the time your user code gets it, it's already nonblocking and all that 01:41
you'll have to accomodate that
MadcapJake ahh that's probably related because $*OUT.native-descriptor doesn't print 1
timotimo not sure what happens if you "open('/dev/stdin')", though
stdout, i mean
you can figure out more stuff using strace potentially
Xliff Hmmm....
timotimo and by inspecting /proc/*thing*/fdinfo
MadcapJake m: open('/dev/stdout/', :w).write('hello'.encode) 01:42
camelia rakudo-moar c37939: OUTPUT«open is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting line 1␤ in sub open at src/RESTRICTED.setting line 9␤ in block <unit> at /tmp/6aDGgwjzHk line 1␤␤»
MadcapJake well that works on my machine :) 01:43
I should try that instead of fdopen
timotimo that's not portable ;(
MadcapJake what would that be on windows :P
`CON` apparently is equiavalent 01:44
timotimo `CON`?
like, with the backticks?
MadcapJake no, just bare
superuser.com/questions/241272/wind...t-of-dev-s
timotimo how do you open a file that's called CON?
"./CON"?
MadcapJake open('CON', :w) 01:45
anyone got a windows machine :)
timotimo how many programs can you make crash by making it open 'CON' instead of a file called 'CON'
MadcapJake what's that mean? 01:46
geekosaur afaik you can't open that file on Windows
it will always refer to the device
timotimo well, if you have a program that takes a file name from somewhere and neglects to check if it's just "CON"
MadcapJake timotimo: you can't name things CON, it's a reserved name
timotimo what if i create a file on a usb thumbdrive with linux that has a CON file on it? 01:47
ZoffixWin Windows can't open a 'con' file? .... sounds like someone got conned...
skink Boo.
MadcapJake then you're windows machine will shake for a few minutes and then a black hole will form ripping the entire 3 square mile area 01:48
01:48 Actualeyes joined
timotimo gotta get bedded :) 01:48
have a good time
Xliff LOL 01:49
MadcapJake nighty night! don't let the bed bugs bite!
Xliff bedded by whome.
s/e\.$//
geekosaur I recall the linux msdos and ntfs drivers being modified to error if you tried to create those files
Xliff MadcapJake, I am on Windows.
I am skink's WindowsFlunkie.
MadcapJake Xliff: try «open('CON', :w).write('hello'.encode)»
Xliff Humm.... 01:50
skink Xliff, I set up Appveyor to test Windows stuff and dear lord is it slow
ZoffixWin heh, just tried creating 'con' on Windblows: "The specified device name is invalid"
ZoffixWin shudders
skink Takes 30min+ for a build to queue, then 20-30min more to build Rakudo and run tests
geekosaur appveyor probably expects to be able to fork/exec; emulating those is painfully slow on windows
skink Yup
geekosaur better to use the native process calls
Xliff open('CON', :w).write('hello'.encode) 01:51
Oops. 01:52
skink re: the drivers, couldn't you put it on an ext2 volume and install the ext* Windows driver?
Xliff C:\Users\Cliff>perl6 -e "open('CON', :w).write('hello'.encode)"
Failed to open file C:\Users\Cliff\CON: no such file or directory
Man, I hate cmd.exe
skink: I bet. You got benchmarks?
skink Xliff, Crypt::Random on travis takes 7min for Linux, 14min for OS X. Appveyor takes 28min 01:53
Xliff Yikes!
geekosaur also there was a spate of bug reports some years ago where various programs ported to Windows (e.g. Apache) could be tricked into trying to open CON etc. and crashing or hanging forever
Xliff What is the now preferred way to point NativeCall subs at libc? 01:54
sortiz Xliff, Depends on the platform. 01:58
MadcapJake Xliff: I think you just leave the parentheses off of the native trait 02:00
Xliff MadcapJake, Nope. Tried that and got an error. 02:01
Using "is native('c')" I get "Cannot locate native library 'libc.so': /usr/lib/i386-linux-gnu/libc.so: invalid ELF header" 02:02
MadcapJake Xliff: I thought on Windows it looked for libc.dll? 02:03
sortiz for example, in linux the standard library is pre-loaded so a simple 'sub malloc(size_t --> Pointer) is native;' works.
skink You literally just do 'is native'
Unless Windows works differently 02:04
Xliff MadcapJake, I do perl6 dev in a Linux VM
sortiz In windows, for example you need 'sub calloc(size_t, size_t --> Pointer) is native('msvcrt') { * }'
diakopter it depends which toolchain you used on windows 02:05
if you used the strawberry (gcc) toolchain, then it's different
MadcapJake Xliff: then `is native` should definitely work, try «locate libc.so» to see if it's just not in your LD_LIBRARY_PATH
Xliff No. It's finding libc, however it's not liking what it finds. 02:07
Note the invalid ELF header part.
Which makes no since, because if libc didn't work, neither would rakudo.
If I don't specify a lib, I get the following "Cannot locate symbol '' in native library ''" 02:08
So using "is native('c')", and when I do I get that error about bad ELF header.
sortiz Xliff, go to your rakudo bin directory and do 'ldd moar' to see what libraries moar loads. 02:09
Xliff And yes, windows side is Strawberry.
"not a dynamic executable" 02:10
I'm using rakudobrew under the Linux VM 02:12
sortiz Ohh, strange case. Can be then that is not able of dynamic loading. Are you sure you are 'ldd moar' to the real executable and not to some wrapper? 02:13
02:14 geekosaur left
sortiz Xliff, with rakudobrew my moar shows like gist.github.com/salortiz/ee6c1a06d...8daec60fe3 02:16
02:16 geekosaur joined
skink ... 02:16
Oh. My god. 02:17
libargon2's Makefile doesn't support Windows
02:20 colomon left
skink It has _2,000_ lines of XML for Visual Studio 02:21
Xliff Yowch. 02:28
sortiz: It's a wrapper. 02:29
libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xb723f000) 02:30
Video Studio is such a pig. 02:32
It's nice, pretty, and functional... but it's expensive about it.
sortiz So, the libc is pre-loaded and if libdl.so.X is in the list dyncall should work with is '... is native { * }' without parameters.
Xliff OK, so does that error message mean that it can't find fdopen() or something? 02:33
Because it is really confusing --> "Cannot locate symbol '' in native library ''"
02:35 noganex joined
sortiz The only strange thing I see is that 'cmov', dunno what kind of distro are you using. 02:35
Xliff Ubuntu 02:36
OK. I've traced it further back. It might be a function call I make that's cast using nativecast()
casting a pointer to a function that's returned from a C lib. 02:37
02:38 noganex_ left
Xliff Then using nativecast to assign arguments and return values. 02:38
Here is the native cast call
my &func_sig = nativecast(:(XQC_Implementation_s, Pointer, XQC_StaticContext_s, Pointer --> uint32), $!prepare_file);
So it looks like that's why the error isn't helpful. 02:39
Yeeah. 02:42
NativeCall can't use undeclared function pointers from C-libs.
sortiz m: use NativeCall; class FILE is repr('CPointer') { }; sub fdopen(int32,Str -->FILE) is native { * }; say fdopen(1,"r") ~~ FILE; # Xliff fdopen works 02:43
camelia rakudo-moar c37939: OUTPUT«True␤»
Xliff So now I'll need to pre-build the module from the libxqilla's symbol tree.
*sigh*
sortiz: Thanks. However I was asking for MadcapJake, since he is running into a hanging problem with his project. 02:44
God, what a horrible day. I will watch TV, now.
MadcapJake Xliff
I passed through the hanging problems 02:45
now I am running into size_t problems :)
sortiz MadcapJake, As I understand your $*OUT -> FILE problem is now solved, no? 02:46
MadcapJake m: use NativeCall; my CArray[uint] $chs = "hello world".encode.list; $chs.elems.say
camelia rakudo-moar c37939: OUTPUT«Type check failed in assignment to $chs; expected NativeCall::Types::CArray[uint] but got Seq ((104, 101, 108, 108, ...)␤ in block <unit> at /tmp/qveXNU7y0r line 1␤␤»
Xliff MadcapJake, cool! How did you fix it?
MadcapJake, Fixed that.
MadcapJake m: use NativeCall; my CArray[uint] $chs .= new: "hello world".encode.list; $chs.elems.say
camelia rakudo-moar c37939: OUTPUT«11␤»
Xliff m: use NativeCall; my CArray[uint] $chs = "hello world".encode('UTF-8').list; $chs.elems.say 02:47
camelia rakudo-moar c37939: OUTPUT«Type check failed in assignment to $chs; expected NativeCall::Types::CArray[uint] but got Seq ((104, 101, 108, 108, ...)␤ in block <unit> at /tmp/uTTGFdsona line 1␤␤»
Xliff Dammit! Thought I had fixed that.
MadcapJake Xliff: let me push my work, Instead of monkeying with $*OUT.native-descriptor, I just gave fdopen the number 1 and it works :D
Xliff: you need «.= new» to make that work 02:48
02:48 skink left
MadcapJake . o O ( I wonder if I need to do that UTF-8 encoding or if that's the default ) 02:48
sortiz MadcapJake, yep, utf8 is the default. 02:49
Xliff m: use NativeCall; my CArray[uint] $chs = CArray[uint8].new("hello world".encode.list); $chs.elems.say
camelia rakudo-moar c37939: OUTPUT«Type check failed in assignment to $chs; expected NativeCall::Types::CArray[uint] but got NativeCall::Types::CArray[uint8] (NativeCall::Types::CA...)␤ in block <unit> at /tmp/VtQNaGr0bD line 1␤␤»
MadcapJake m: use NativeCall; my CArray[uint] $chs .= new: "hello world".encode.list; $chs.elems.say 02:50
camelia rakudo-moar c37939: OUTPUT«11␤»
MadcapJake apparently CArray cannot handle uintX you have to just give it Perl 6's builtin native uint
it's a known bug
(at least I heard some people talking about it...) 02:51
Xliff: github.com/MadcapJake/p6-MyHTML/bl...m6#L37-L42 02:52
Xliff Yeah. RabidGravy
m: use NativeCall; my CArray[uint] $chs = .new("hello world".encode.list); $chs.elems.say 02:53
camelia rakudo-moar c37939: OUTPUT«Default constructor for 'Any' only takes named arguments␤ in block <unit> at /tmp/H2VfPG3rA6 line 1␤␤»
02:53 johndau left
Xliff m: use NativeCall; my CArray[uint] $chs = .new: "hello world".encode.list; $chs.elems.say 02:54
MadcapJake my problem is that myhtml_parse_fragment takes a size and both $chs.elems and nativesizeof($chs) cut off the text for some reason
camelia rakudo-moar c37939: OUTPUT«Default constructor for 'Any' only takes named arguments␤ in block <unit> at /tmp/6ZlhJsYFZp line 1␤␤»
Herby_ ZoffixWin: With your Twitter module, do you think it would be hard to implement a basic search function?
MadcapJake Xliff: .= new
Xliff m: use NativeCall; my CArray[uint] $chs .= new: "hello world".encode.list; $chs.elems.say
camelia rakudo-moar c37939: OUTPUT«11␤»
Xliff m: use NativeCall; my CArray[uint] $chs .= new: "hello world".encode.list; say $chs;
camelia rakudo-moar c37939: OUTPUT«NativeCall::Types::CArray[uint].new␤»
Xliff MadcapJake, like I said. Horrible day. 02:55
MadcapJake xD no prob! I've had those
up until about 2 hours ago I was battling an awful migraine, so only recently has my day turned around
Xliff Ah! Hope the upward trend continues!
MadcapJake only two hours left, so I gotta cram some awesome in now! ;) 02:56
Xliff LOL! 02:57
Xliff injects AWESOME into MadcapJake.
02:58 gtodd joined 03:00 jack_rabbit joined 03:02 kid51 left
MadcapJake keels over from the awesomeness 03:02
but I can't figure out why the size is off :\ 03:03
nativesizeof and elems both capture 2 chars, if I add like 100, it prints the whole thing 03:04
+ 80 seems to be just right, but why?
10 * 8 maybe? 03:05
boom! $chs.elems * 8 is the magic stuff
BenGoldberg m: use NativeCall; my CArray[uint] $chs .= new: "hello world".encode.list; say |@$chs; 03:06
camelia rakudo-moar c37939: OUTPUT«10410110810811132119111114108100␤»
Xliff Wow
MadcapJake m: use NativeCall; my CArray[uint] $chs .= new: "hello world".encode.list; say @chs[0..2];
camelia rakudo-moar c37939: OUTPUT«5===SORRY!5=== Error while compiling /tmp/u0Jmo9tuqb␤Variable '@chs' is not declared. Did you mean '$chs'?␤at /tmp/u0Jmo9tuqb:1␤------> 3 .= new: "hello world".encode.list; say 7⏏5@chs[0..2];␤»
MadcapJake m: use NativeCall; my CArray[uint] $chs .= new: "hello world".encode.list; say $chs[0..2];
BenGoldberg m: use NativeCall; my CArray[uint] $chs .= new: "hello world".encode.list; say $chs[0..2];
camelia rakudo-moar c37939: OUTPUT«(104 101 108)␤» 03:07
MadcapJake m: use NativeCall; my CArray[uint] $chs .= new: "hello world".encode.list; say $chs[0..2]».ord;
camelia rakudo-moar c37939: OUTPUT«(49 49 49)␤»
BenGoldberg m: use NativeCall; my CArray[uint] $chs .= new: "hello world".encode.list; say @$chs>>.chr;
camelia rakudo-moar c37939: OUTPUT«(h e l l o w o r l d)␤»
MadcapJake m: use NativeCall; my CArray[uint] $chs .= new: "hello world".encode.list; say $chs[0..2]».chr;
camelia rakudo-moar c37939: OUTPUT«(h e l)␤»
MadcapJake hmm still not understanding why `* 8` works though 03:09
BenGoldberg It would be awesome if there were a way to 'cast' from a Buf to a CArray, so they shared the same memory. 03:12
Converting to a list seems kinda silly.
03:17 johndau joined 03:20 mcsnolte left 03:22 Actualeyes left 03:29 vendethiel joined 03:30 BenGoldberg left 03:32 wbill joined 03:34 molaf left
Xliff Hrm. 03:36
m: my $c "$.create_child_context; # F:"; my @m = $c ~~ /\$<[ !\. >](<[ \w\d ]>+) ";" $ F:/ 03:37
camelia rakudo-moar c37939: OUTPUT«5===SORRY!5=== Error while compiling /tmp/T7fe3IetZZ␤Two terms in a row␤at /tmp/T7fe3IetZZ:1␤------> 3my $c7⏏5 "$.create_child_context; # F:"; my @m ␤ expecting any of:␤ infix␤ infix stopper␤ statement end…»
Xliff m: my $c = "$.create_child_context; # F:"; my @m = $c ~~ /\$<[ !\. >](<[ \w\d ]>+) ";" $ F:/
camelia rakudo-moar c37939: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Ohx4sbJc5R␤Variable $.create_child_context used where no 'self' is available␤at /tmp/Ohx4sbJc5R:1␤------> 3my $c = "$.create_child_context7⏏5; # F:"; my @m = $c ~~ /\$<[ !\. >](<[ ␤ expecting …»
Xliff m: my $c = '$.create_child_context; # F:'; my @m = $c ~~ /\$<[ !\. >](<[ \w\d ]>+) ";" $ F:/
camelia rakudo-moar c37939: OUTPUT«5===SORRY!5=== Error while compiling /tmp/puen9JkyPI␤Unable to parse expression in metachar:sym<assert>; couldn't find final '>' ␤at /tmp/puen9JkyPI:1␤------> 3text; # F:'; my @m = $c ~~ /\$<[ !\. >]7⏏5(<[ \w\d ]>+) ";" $ F:/␤ expecti…»
Xliff OK, so how to I specify a ";" in a regexp? 03:38
03:38 vendethiel left
Xliff m: say ';'.ord 03:38
camelia rakudo-moar c37939: OUTPUT«59␤»
Xliff m: my $c = '$.create_child_context; # F:'; my @m = $c ~~ /\$<[ !\. >](<[ \w\d ]>+) ';' $ F:/; 03:39
camelia rakudo-moar c37939: OUTPUT«5===SORRY!5=== Error while compiling /tmp/i8QcpGp8rJ␤Unable to parse expression in metachar:sym<assert>; couldn't find final '>' ␤at /tmp/i8QcpGp8rJ:1␤------> 3text; # F:'; my @m = $c ~~ /\$<[ !\. >]7⏏5(<[ \w\d ]>+) ';' $ F:/;␤ expect…»
TEttinger m: my $c = '$.create_child_context; # F:'; my @m = $c ~~ /\$<[ !\. >](<[ \w\d ]>+) "\C[SEMICOLON]" $ F:/
camelia rakudo-moar c37939: OUTPUT«5===SORRY!5=== Error while compiling /tmp/aW0Os6207p␤Unable to parse expression in metachar:sym<assert>; couldn't find final '>' ␤at /tmp/aW0Os6207p:1␤------> 3text; # F:'; my @m = $c ~~ /\$<[ !\. >]7⏏5(<[ \w\d ]>+) "\C[SEMICOLON]" $ F:/…»
Xliff m: my $c = '$.create_child_context; # F:'; my @m = $c ~~ /\$<[ !\. >](<[ \w\d ]>+) ';' # F:/;
camelia rakudo-moar c37939: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1E7z1PKEH8␤Unable to parse expression in metachar:sym<assert>; couldn't find final '>' ␤at /tmp/1E7z1PKEH8:1␤------> 3text; # F:'; my @m = $c ~~ /\$<[ !\. >]7⏏5(<[ \w\d ]>+) ';' # F:/;␤ expect…» 03:40
Xliff m: my $c = '$.create_child_context; # F:'; my @m = $c ~~ /\$<[ !\. >](<[ \w\d ]>+) "\C[SEMICOLON]" # F:/;
camelia rakudo-moar c37939: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7WbEiYHriM␤Unable to parse expression in metachar:sym<assert>; couldn't find final '>' ␤at /tmp/7WbEiYHriM:1␤------> 3text; # F:'; my @m = $c ~~ /\$<[ !\. >]7⏏5(<[ \w\d ]>+) "\C[SEMICOLON]" # F:/;…»
TEttinger m: my $c = '$.create_child_context; # F:'; my @m = $c ~~ /\$<[ !\. >]>(<[ \w\d ]>+) "\C[SEMICOLON]" $ F:/
camelia rakudo-moar c37939: OUTPUT«5===SORRY!5=== Error while compiling /tmp/znfHfLX4rc␤Unrecognized backslash sequence: '\C'␤at /tmp/znfHfLX4rc:1␤------> 3@m = $c ~~ /\$<[ !\. >]>(<[ \w\d ]>+) "\7⏏5C[SEMICOLON]" $ F:/␤ expecting any of:␤ double quotes␤»
TEttinger m: my $c = '$.create_child_context; # F:'; my @m = $c ~~ /\$<[ !\. >]>(<[ \w\d ]>+) ";" $ F:/
camelia ( no output )
Xliff Ah!
TEttinger m: my $c = '$.create_child_context; # F:'; my @m = $c ~~ /\$<[ !\. >]>(<[ \w\d ]>+) ";" $ F:/ ; say @m
camelia rakudo-moar c37939: OUTPUT«[(Any)]␤»
TEttinger ihavenoideawhatimdoing.jpeg
Xliff m: my $c = '$.create_child_context; # F:'; my @m = $c ~~ /\$<[ !\. >]>(<[ \w\d ]>+) ";" # F:/; say $m.elems 03:41
camelia rakudo-moar c37939: OUTPUT«5===SORRY!5===␤Regex not terminated.␤at /tmp/VBgB29KCZu:1␤------> 3>]>(<[ \w\d ]>+) ";" # F:/; say $m.elems7⏏5<EOL>␤Unable to parse regex; couldn't find final '/'␤at /tmp/VBgB29KCZu:1␤------> 3>]>(<[ \w\d ]>+) ";" # F:/; say $m.elems…»
Xliff m: my $c = '$.create_child_context; # F:'; my @m = $c ~~ /\$<[ !\. >]>(<[ \w\d ]>+) ";" # F:/; say @m.elems
camelia rakudo-moar c37939: OUTPUT«5===SORRY!5===␤Regex not terminated.␤at /tmp/c61T88nUud:1␤------> 3>]>(<[ \w\d ]>+) ";" # F:/; say @m.elems7⏏5<EOL>␤Unable to parse regex; couldn't find final '/'␤at /tmp/c61T88nUud:1␤------> 3>]>(<[ \w\d ]>+) ";" # F:/; say @m.elems…»
Xliff m: my $c = '$.create_child_context; # F:'; my @m = $c ~~ /\$<[ !\. >]>(<[ \w\d ]>+) ";" $ F:/
camelia ( no output )
Xliff m: my $c = '$.create_child_context; # F:'; my @m = $c ~~ /\$<[ !\. >]>(<[ \w\d ]>+) ";" $ F:/; say @m.elems 03:42
camelia rakudo-moar c37939: OUTPUT«1␤»
TEttinger better!
Xliff m: my $c = '$.create_child_context; # F:'; my @m = $c ~~ /\$<[ !\. >]>(<[ \w\d ]>+) ";" $ F:/; say @m.elems
camelia rakudo-moar c37939: OUTPUT«1␤»
Xliff m: my $c = '$.create_child_context; # F:'; my @m = $c ~~ /\$<[ !\. >]>(<[ \w\d ]>+) ";" $ F:/; say @m
camelia rakudo-moar c37939: OUTPUT«[(Any)]␤»
Xliff m: my $c = '$.create_child_context; # F:'; my @m = $c ~~ /\$<[ !\. >]>(<[ \w\d ]>+) ";" $ F:/; say "@m"
camelia rakudo-moar c37939: OUTPUT«@m␤»
Xliff m: my $c = '$.create_child_context; # F:'; my @m = $c ~~ /\$<[ !\. >]>(<[ \w\d ]>+) ";" $ F:/; for @m -> $m { say $m }
camelia rakudo-moar c37939: OUTPUT«(Any)␤»
Xliff *sigh* 03:43
m: my $c = '$.create_child_context; # F:'; my @m = $c ~~ /\$<[ !\. >]>(<[ \w\d ]>+) ";" $ F:/; for @m -> $m { say $m.Str }
camelia rakudo-moar c37939: OUTPUT«Use of uninitialized value $m of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block at /tmp/u88Wl72gbN line 1␤␤»
Xliff m: my $c = '$.create_child_context; # F:'; my @m = $c ~~ /\$<[ !\. >]>(<[ \w\d ]>+) ";" $ F:/; for @m -> $m { say $m.perl }
camelia rakudo-moar c37939: OUTPUT«Any␤»
Xliff m: my $c = '$.create_child_context; # F:'; my @m = $c ~~ /\$<[ !\. >]>(<[ \w\d ]>+) ";" $ F:/; say $<0>; 03:44
camelia rakudo-moar c37939: OUTPUT«Nil␤»
Xliff m: my $c = '$.create_child_context; # F:'; my @m = $c ~~ /\$<[ !\. >]>(<[ \w\d ]>+) ";" $ F:/; say $/1;
camelia rakudo-moar c37939: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jXE1bDxPM6␤Two terms in a row␤at /tmp/jXE1bDxPM6:1␤------> 3[ !\. >]>(<[ \w\d ]>+) ";" $ F:/; say $/7⏏051;␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ …»
TEttinger maybe to the /msg
Xliff Yeah.
m: my $c = '$.create_child_context; # F:'; $c ~~ /\$<[ !\. >]>(<[ \w\d ]>+) "; # F:"/; say $0; 03:47
camelia rakudo-moar c37939: OUTPUT«「create_child_context」␤»
Xliff Something tells me I might have issues with the last quoted portion, there.
04:09 Herby_ left, Cabanossi left 04:12 aries_liuxueyang left 04:13 domm_ joined, aries_liuxueyang joined, khw left 04:14 Cabanossi joined 04:23 tardisx left 04:26 tardisx joined 04:27 cpage_ left 04:28 tardisx left 04:29 tardisx joined 04:36 araujo_ joined 04:39 araujo left 04:42 unbound_delegate joined 04:45 unbound_delegate left 04:49 Actualeyes joined 04:52 johndau left 04:58 cpage_ joined 05:06 skids left 05:08 CIAvash joined 05:12 xiaomiao left 05:15 wamba joined, WAAAZ4G joined 05:16 koma___ joined 05:17 xiaomiao joined
dalek ar: 1e44a2c | (Steve Mynott)++ | tools/star/Makefile:
bump versions to 2016.04
05:20
ar: e66ede1 | (Steve Mynott)++ | modules/ (12 files):
bump git submodules
05:22
05:24 PotatoGim_ joined 05:26 PotatoGim_ left, PotatoGim_ joined 05:27 PotatoGim_ left 05:28 PotatoGim joined 05:29 koma___ left
dalek ar: 7034e73 | (Steve Mynott)++ | docs/announce/2016.0 (2 files):
rename never released star 2016.03.md to be 2016.04.md
05:31
ar: 32e6cd9 | (Steve Mynott)++ | docs/announce/2016.04.md:
bump versions and month in announce
ar: 1210731 | (Steve Mynott)++ | / (2 files):
Bumpy McVersionBump
05:43 johndau joined
dalek Iish: a0c72b2 | (Salvador Ortiz)++ | / (6 files):
A few tweaks for Windows compatibility
05:45
05:52 Xliff left 06:09 Xliff joined 06:10 leont joined 06:21 johndau left 06:32 firstdayonthejob joined
sortiz m: sub I(int \a) { a }; my uint8 $b = 0xff; $b++; say $b,':',I($b); $b = 2; say $b,':',I($b); 06:34
camelia rakudo-moar c37939: OUTPUT«256:0␤258:2␤»
06:35 Ven joined
sortiz m: sub I(int \a) { a }; my uint8 $b = 0xff; $b++,Mu; say $b,':',I($b); $b = 2; say $b,':',I($b); # Avoiding sink, for the record 06:35
camelia rakudo-moar c37939: OUTPUT«0:0␤2:2␤»
ufobat good morning perl6 :D 06:37
sortiz ufobat, o/ 06:38
ufobat does anyone like, dislike or have a certain opinion on gist.github.com/ufobat/72aceef40b6...336d6be3e0 ? It's about Bailador
jdv79 i got a 404 06:39
ufobat jdv79, for my example? 06:40
jdv79 yes
ufobat its work in progress, not yet uploaded.. i was looking for a "ah your OO syntax is not cool because..." or "yeah looks cool" 06:41
moritz ufobat: I don't know if this is a Dancer inheritance, but if you're already writing a class for the application, I would expect to be able to use methods as controllers
ufobat: doing the actual application work in a sub inside a BUILD seems weird 06:42
Xliff m: my %h = a=>1, b => 2; say %h<a>:exists
camelia rakudo-moar c37939: OUTPUT«True␤»
ufobat with controlers you mean the sub behind a get '/foo' => ..., right?
moritz (at least for someone who is familiar with Mojolicious, and a little bit with Catalyst)
ufobat: correct
jdv79 i meant the gist url 404s on me
moritz jdv79: works here 06:43
ufobat yeah i agree with you, that is already on my doto list, but this is just the first step
moritz ufobat: ok
06:43 firstdayonthejob left
ufobat remember our discussion about perl5 curry, that was because your suggestion 06:43
moritz doesn't remember such a discusion 06:44
Xliff irclog.perlgeek.de/perl6/2016-04-08#i_12308176 06:45
nine_ I'd love to see someone try a Catalysty approach in Perl 6. With our subroutine traits Catalyst's way would be quite sweet.
jeek Is it possible to pass an array to 'any'?
ufobat moritz, thats probably because you're getting older :) .oO( or have to much more improtant stuff in your head ) 06:46
Xliff Ouch, ufobat!
ufobat ;)
Xliff <- Unfortunately true for this guy
I forget sleep. 06:47
Which I should be doing now.
moritz ufobat: too much stuff in my head; I doubt much of it is, like, *actually* important :-)
good night Xliff
jdv79 the cat way can get messy though 06:48
Xliff moritz: Stop giving me useful suggestions!
=)
m: my $a = 'a'; my %h = a=>1, b => 2; say %h<$a>:exists
camelia rakudo-moar c37939: OUTPUT«False␤»
Xliff m: my $a = 'a'; my %h = a=>1, b => 2; say %h<"$a">:exists
ufobat :D
camelia rakudo-moar c37939: OUTPUT«False␤»
Xliff m: my $a = 'a'; my %h = a=>1, b => 2; say %h{"$a"}:exists
camelia rakudo-moar c37939: OUTPUT«True␤»
jdv79 maybe a simpler scheme might bw nice. 06:49
ufobat thanks for the feedback guys :-)
06:49 domidumont joined
jdv79 github let me down 06:49
Xliff Why do I get 'Unexpected named parameter 'exists' passed' in my code, then...camelia??? 06:50
ufobat jdv79, still 404 on my url?
MadcapJake I'm getting another segfault Xliff :\
jdv79 yes
idk...
Xliff MadcapJake, Nooooo!
MadcapJake, do you have it all committed on origin/master or do I need to switch to a branch?
ufobat jdv79, nopaste.me/view/fca45b2d
jdv79 maybe im stucked to an dead cluster
at least that works. thanks. 06:51
Xliff MadcapJake, such are the occupational hazards for developers that use NativeCall
sortiz :P 06:52
Xliff sortiz?
sortiz Yep.
Xliff :P ?
MadcapJake it's just one function (myhtml_node_tag_id) that does it
Xliff: it's all still in complete-raw-transform 06:53
Xliff OK.
sortiz My insurance cover a few segfaults a month. ;-)
MadcapJake I wanted to get at least one example completely working before I merge back into master
Xliff sortiz, LOL!
MadcapJake, Ah! Gotcha.
06:53 domidumont left
MadcapJake if you comment out that segfault line there is some printing of html that happens! (but it's still not properly modifying the div via adding an attribute...) 06:54
06:54 domidumont joined
MadcapJake So once I clear up this Raw interface, I'll merge then start working on a 6y interface 06:55
Xliff MadcapJake, Jeez. I'm on that branch and I'm still getting runaway rakudo processes when running eg/attributes-high.pl6 06:56
I let 'em fill up htop screen before I killed it. 06:57
I was told that was precomp going nuts.
06:57 _mg_ joined
MadcapJake maybe try a clean clone? 06:58
ufobat nine_, i am not familiar with catalyst at all, but did i get it right you basically add a trait to a sub, saying this sub is for hanlding $path, $method?
MadcapJake technically the only modules needed are Lib, Status, and Raw, so you could just delete the rest if you like 06:59
dalek ar: 0e36f4e | (Steve Mynott)++ | docs/announce/2016.04.md:
compiler changelog updates
07:00
nine_ ufobat: exactly
ufobat ok
Xliff OK. I must be on a stale clone. I still se NativeCall.pm6
s/se /see /
MadcapJake it's still in there, I'll just delete them and push, one sec
stmuk star module changelog TODO .. tomorrow (PST) 07:01
07:02 devtom30 joined
sortiz MadcapJake, As I see in your code, lots of CArray[uint8] can be replaced by Buf, and you can avoid the copy. 07:02
MadcapJake sortiz: really? How does that work? 07:03
someone in here was telling me to use CArray[uint] instead of Str + explicitly-manage (and edited the docs accordingly) so I just assumed that was the way to go
Xliff MadcapJake, SEGV reason -> # 0xb5a54f70 in myhtml_node_tag_id (node=0x0) at myhtml.c:594 <- node var is NULL. 07:04
nine_ ufobat: like method chain_customer($c, $id) is chained('/') is path-part('customer') is capture-args(1) { $c.stash(customer => $c.model('DB').resultset('Customer').find($id)); }; method edit($c) is chained (chain_customer) { # do something with $c.stash<customer> }; # for /customer/1/edit
MadcapJake node is null? how could that be...
sortiz MadcapJake, A C function with a param 'char*' can be passed a Buf, for example: sub myhtml_encoding_detect_bom(Buf, size_t, int32 is rw) 07:06
MadcapJake sortiz: how do I create one of those from a string? 07:07
ufobat nine_, that looks cool.. 07:08
sortiz m: my $a = "Hola a todos".encode; say $a ~~ Blob; # Str.encode return Blobs that can be passed directly. 07:10
camelia rakudo-moar c37939: OUTPUT«True␤»
Xliff ==2457== Invalid read of size 4 07:11
==2457== at 0xDC60F70: myhtml_node_tag_id (myhtml.c:594)
07:11 rindolf joined
Xliff MadcapJake, ^^ Something is off in the mapping of that routine. 07:11
MadcapJake hmmm 07:12
sortiz: thanks! What would you say is the proper time to use a CArray[uint] vs Buf?
sortiz As you can create Blob/Buf of any native Integer type, I only use CArray for CPointer derived types. 07:14
Xliff 'night everyone. Need sleep. 07:20
sortiz But note that Blob/Buf can't be used for 'returns' or 'out' arguments, 'cus can be 'unmanaged' CArrays but not Blob/Buf.
07:20 Xliff is now known as Xliff_Zzzz, RabidGravy joined
MadcapJake oh so for const char * I should still use CArrays? 07:20
sortiz Nop, for const char *, a Blob works well. 07:21
With the plus that always you can use Blob.bytes for the current size, see an example at: github.com/perl6/DBIish/blob/maste...e.pm6#L161 07:23
Timbus why um. why not use Str is encoded('utf8') ? are you hoping to handle a lot of different blobs
MadcapJake sortiz: ! you've really helped! Blob actually causes the myhtml_parse functions to work properly! haha! 07:24
07:24 shmibs joined
Timbus like are you not wanting perl6 to deal with the strings youre passing around (im assuming this is strings, i saw the word html) 07:24
MadcapJake Timbus: it's for nativecall stuff 07:25
Timbus .. yes
sortiz Timbus, MadcapJake is using all forms of encoding, so he has a Blob already.
MadcapJake so wait, Str is encoded('utf8') would work too?! 07:26
07:26 riatre joined
Timbus .. yes, but it depends on what is fit for purpose here 07:26
MadcapJake but the library can handle all sorts of encodings so I should probably stick with Blob
07:27 leont left 07:28 johndau joined
MadcapJake Xliff_Zzzz: the node was null because the parsing wasn't working properly, now using Blobs, all subsequent calls are functioning as expected! 07:28
sortiz Other use case for Blob/Buf is when the library needs an allocated buffer of a certain size, to be filled, returning, in a 'is rw' argument, the size of the used space.
07:29 zakharyas joined
MadcapJake neat! 07:31
I will need to scrub my files of CArrays :) everything is working now with blobs!
sortiz :-) 07:32
MadcapJake sortiz++ # Hero of the Blobs
MadcapJake is needing some serious sleep now!
g'night Sixians! 07:33
sortiz g'night MadcapJake
Xliff_Zzzz sortiz: WHAT!?
sortiz: How to use blobs for specific size? 07:34
Like "char header[282]" yes?
sortiz m: my $buf = Buf[uint8].allocate(282); say $b. $b.bytes; 07:35
camelia rakudo-moar c37939: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2jnnWLu1SQ␤Variable '$b' is not declared␤at /tmp/2jnnWLu1SQ:1␤------> 3my $buf = Buf[uint8].allocate(282); say 7⏏5$b. $b.bytes;␤»
MadcapJake . o O ( There should be a Blob section in the nativecall pod ) 07:36
sortiz m: my $buf = Buf[uint8].allocate(282); say $buf, $buf.bytes;
camelia rakudo-moar c37939: OUTPUT«Buf[uint8]:0x<00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00…»
Xliff_Zzzz MadcapJake, Segfault still there. $ perl6 -Ilib eg/attributes-high.pl6
Original tree:
Segmentation fault
MadcapJake did you pull latest? I just pushed
Xliff_Zzzz Yes
Just pulled.
Like...2 mins ago.
MadcapJake pull again! :)
Xliff_Zzzz I'm still on branch, though. Do I need to pull origin/master?
sortiz m: my $buf = Buf[uint8].allocate(282); say $buf.bytes, $buf;
camelia rakudo-moar c37939: OUTPUT«282Buf[uint8]:0x<00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00…»
07:37 jack_rabbit left
MadcapJake Xliff_Zzzz: no it's still raw, I'll clean it up and merge tomorrow 07:37
07:37 Sgeo_ joined, CIAvash left
Xliff_Zzzz sortiz: So "HAS Buf $.header" - then "new() { …$!header = Buf[uint8].allocate(282)… }" before passing to any C libs will work? 07:38
MadcapJake, nope. Still getting SEGV here
You're gonna looove this: 07:39
Program received signal SIGSEGV, Segmentation fault.
_IO_new_fdopen (fd=1, mode=0x0) at iofdopen.c:65
07:39 CIAvash joined
MadcapJake whaaa!? 07:39
why would that segfault, fd=1 is STDOUT 07:40
sortiz Xliff_Zzzz, Nop, sorry, Blob/Buf can't work in a CStruct yet. :-(
Xliff_Zzzz mode is NULL?
sortiz, ah. *whew*
However will replace all my CArray[uint8]s.
Nice work.
sortiz++
MadcapJake mode should be "w+" but maybe I need to encode those too! :P
sortiz for fdopen's 'mode' an Str suffice. ;-) 07:41
Xliff_Zzzz Looks like its not getting passed.
MadcapJake Xliff_Zzzz: that's so weird because it works for me (works as a Blob too :P ) 07:42
Xliff_Zzzz Hum. 07:43
I'll rebuild rakudo and try again in the morning.
07:44 domidumont left
MadcapJake You could try File.path('/dev/stdout') too 07:46
s/File/FILE/
MadcapJake is really off to bed now &
07:46 wbill left
sortiz Beware that Blob/Buf encoded strings not necessarily includes a final zero byte!, so for *some* cases a Str is safer. 07:46
07:47 domidumont joined
Xliff_Zzzz goes too. 07:47
07:48 mohae_ joined 07:49 g4 joined, g4 left, g4 joined
sortiz hope the difference between 'you can use a …' and 'you should use …' was clear. 07:50
07:51 mohae left, lizmat joined 07:56 lizmat left 07:59 araujo_ left 08:08 zakharyas left, tardisx left 08:09 araujo joined 08:10 tardisx joined, tardisx left 08:13 araujo left, darutoko joined 08:14 tardisx joined, araujo joined, araujo left, araujo joined 08:17 xinming joined, Ven left 08:20 dakkar joined
masak .u o̊ 08:21
yoleaux U+006F LATIN SMALL LETTER O [Ll] (o)
U+030A COMBINING RING ABOVE [Mn] (◌̊)
sortiz I've collected some dlls needed for DBIish Windows's users. Suggestions about somewhere we can put a zip file with these? 08:22
moritz sortiz: we have a webserver for that somewhere...
sortiz: I'll try to find it :-) 08:23
sortiz moritz, ok, thanks!
moritz gtk-dlls.p6c.org/ 08:24
maybe we can generalize this a bit
08:25 tardisx left, tardisx joined
sortiz Yep, seems a good idea. :-) 08:25
08:32 uruwi_ joined 08:33 uruwi left 08:35 tardisx left 08:36 [particle] joined 08:38 tardisx joined 08:45 brrt joined 08:55 tardisx left 08:57 tardisx joined 08:58 Ven joined
sortiz moritz, meantime the zip files are in ftp://ftp.msg.com.mx/pub/DBIish/ 09:03
09:04 Actualeyes left 09:08 johndau left 09:11 tardisx left 09:13 tardisx joined 09:23 tardisx left 09:24 Ven left 09:26 tardisx joined 09:27 brrt left 09:32 sortiz left
RabidGravy right, it's a pleasant day and high pollen - off to the seaside 09:34
09:35 synopsebot6 left, synopsebot6 joined 09:36 tardisx left 09:37 tardisx joined 09:38 zakharyas joined 09:39 sortiz joined 09:44 cpage_ left, cpage_ joined 09:47 tardisx left, tardisx joined 09:48 ocbtec joined 09:58 tardisx left 10:05 cognominal joined 10:12 kid51 joined 10:13 tardisx joined 10:19 tardisx left 10:21 dalek left, kurahaupo joined 10:22 dalek joined, ChanServ sets mode: +v dalek 10:23 tardisx joined 10:24 Ven joined 10:25 tardisx left 10:26 tardisx joined 10:27 kurahaupo left 10:28 tardisx left 10:29 Ven left 10:30 tardisx joined 10:31 Ven joined 10:32 tardisx left 10:33 tardisx joined 10:34 tardisx left 10:35 tardisx joined 10:37 tardisx left 10:38 tardisx joined 10:39 brrt joined, tardisx left 10:43 tardisx joined 10:44 kaare__ joined 10:45 tardisx left 10:48 tardisx joined 10:50 tardisx left
ZoffixWin .tell Herby_ (re Twitter search). It should be easy. If it's not there in by 5PM EST, remind me :) 10:50
yoleaux ZoffixWin: I'll pass your message to Herby_.
10:50 TEttinger left 10:51 tardisx joined 10:53 Ven left, tardisx left
ZoffixWin suspects tardisx is warping in and out of our time and space.... 10:55
DrForr Can't you hear them? 10:56
10:57 tardisx joined
Xliff_Zzzz Vwoorpp....Vwwoooorp.... Vwoooorp....Vwwwwooorp...... Vvwwwoorp..worp...worp..worp..worp 10:58
10:59 tardisx left 11:00 tardisx joined
Xliff_Zzzz www.youtube.com/watch?v=g99SvIodND...nnel=Chris 11:00
11:01 tardisx left 11:02 xinming_ joined, tardisx joined 11:04 tardisx left, tardisx joined 11:05 Ven joined, skids joined, xinming left 11:06 tardisx left 11:08 tardisx joined 11:10 tardisx left 11:12 kid511 joined, tardisx joined, _mg_ left 11:14 kid51 left, uruwi_ left
cognominal in lizmat's report, I see utf8-c8, what is that ? 11:19
11:20 tardisx left
timotimo it's how we can deal with input that may be invalid when interpreted as utf8 11:20
but we still want it to round-trip, and not explode 11:21
11:21 konobi joined
timotimo m: say Buf[uint8].new(rand xx 80).decode('utf8-c8') 11:21
camelia rakudo-moar c37939: OUTPUT«Type check failed in initializing element #0 to Buf[uint8]; expected uint8 but got Num (0.76465782690449e0)␤ in any at gen/moar/m-Metamodel.nqp line 1727␤ in block <unit> at /tmp/tfTQN5iRZa line 1␤␤Actually thrown at:␤ in any at gen/moar/m-M…»
timotimo whoops 11:22
m: say Buf[uint8].new((^255).roll(80)).decode('utf8-c8')
camelia rakudo-moar c37939: OUTPUT«􏿽x8EN 􏿽xFCǡ􏿽xB8f􏿽x81􏿽xD9)ؠ􏿽xBF􏿽xF7l04F􏿽xEA􏿽xAA􏿽xA7􏿽xD9􏿽xF7􏿽x9E&􏿽xF3􏿽x8D􏿽x89D􏿽x91􏿽xDF?nב􏿽xC3(􏿽x8E􏿽xD5>􏿽x8CјX􏿽xAD􏿽x99␤􏿽xB1􏿽xAAX􏿽x9E􏿽xA98j@[􏿽xF2Rtze^􏿽xD1/…»
11:23 tardisx joined
timotimo when we encounter a byte that's invalid, we plop out a "private use" unicode symbol followed by xHEXDIGIT 11:23
m: say Buf[uint8].new((^255).roll(80)).decode('utf8-c8').encode('utf8-c8').perl
camelia rakudo-moar c37939: OUTPUT«Blob[uint8].new(113,220,249,19,99,67,25,93,21,107,54,78,190,34,122,106,28,142,66,59,31,141,231,97,87,23,23,65,25,147,78,246,189,112,167,189,65,237,189,38,36,170,43,154,80,72,35,8,213,105,170,195,242,149,138,181,240,114,77,217,178,35,241,47,171,197,191,66,9…»
timotimo m: say Buf[uint8].new((^255).roll(20)).decode('utf8-c8').encode('utf8-c8').perl 11:24
camelia rakudo-moar c37939: OUTPUT«Blob[uint8].new(62,101,166,204,38,63,43,43,150,149,82,141,218,1,232,79,5,150,90,60)␤»
timotimo ^- you can see the number of elems remains 20, even though there's potential utf8-b0rkage in there
we need this for env vars and filenames, because at least on linux they're allowed to be any string of bytes that doesn't contain the null byte or a /
but telling our users "filenames are now not Str, but Buf. deal with it. oh and you can't just .decode('utf8') because that'll throw exceptions from time to time. sucks to be you!" 11:25
11:25 tardisx left 11:26 kurahaupo joined 11:32 tardisx joined 11:34 tardisx left 11:36 tardisx joined 11:37 tardisx left 11:39 tardisx joined 11:40 _mg_ joined 11:41 tardisx left 11:43 tardisx joined 11:45 tardisx left 11:47 tardisx joined 11:49 tardisx left 11:52 tardisx joined
sortiz timotimo, btw, there are plans for support 'utf8-c8' on NC's 'is encoded' trait? 11:54
11:54 tardisx left, rubio_terra joined 11:55 kid511 left 11:56 tardisx joined
timotimo it isn't supported? 11:57
11:57 tardisx left 11:59 wamba left
sortiz Nop, the only supported encodings are uft8, utf16 and ascii, see: github.com/rakudo/rakudo/blob/nom/...ll.pm6#L25 11:59
12:01 tardisx joined, uruwi joined 12:03 tardisx left, domidumont left 12:05 tardisx joined 12:06 skids left, tardisx left
timotimo i didn't know we'd have to implement them individually 12:07
12:07 tardisx joined
sortiz Those map to choices in MVM_nativecall_make_str ( github.com/MoarVM/MoarVM/blob/mast...all.c#L112 ) 12:07
12:08 Sqirrel joined
timotimo should i take a look if i can give you a commit bit to MoarVM/MoarVM, or would you prefer to make a pull request and have me review and merge it? :) 12:08
12:09 tardisx left 12:10 tardisx joined 12:11 cognominal left, tardisx left 12:12 cognominal joined
cognominal thx timotimo 12:12
timotimo YW 12:14
12:15 tardisx joined 12:16 domidumont joined, ptolemarch joined
sortiz timotimo, I can try a PR. :-) 12:16
12:17 tardisx left, domidumont left, tardisx joined 12:18 domidumont joined, tardisx left 12:19 tardisx joined 12:23 smls joined 12:25 tardisx left 12:26 tardisx joined 12:28 tardisx left 12:29 tardisx joined, Ven left 12:30 tardisx left 12:34 tardisx joined 12:35 tardisx left 12:36 tardisx joined
[Coke] wonders where the coffee truck is 12:38
12:38 tardisx left
[Coke] . o O (Not an actual truck) 12:38
12:40 cur8or joined, tardisx joined
jnthn Coffee doesn't come on a truck! It comes in a series of tubes! 12:42
12:42 tardisx left 12:43 Ven joined 12:47 Vlavv_ left 12:49 Praise left
[Coke] ... I have spent more time on coffee related work incidents in the past week... 12:50
MadcapJake is there any way to "print" into a Perl 6 variable? I have these print functions in a C library and they print to stdout after all the Perl 6 code has finished. 12:51
[Coke] drinks his coffee and hides so he doesn't have clean up more coffee.
MadcapJake: one sec.
12:51 tardisx joined
[Coke] github.com/perl6/roast/blob/master...list.t#L23 12:52
there's a sneaky way. you could do it more explicitly if you wanted.
12:52 ZoffixW joined
[Coke] needs to work on a project where he's actually writing code IN perl 6. 12:53
12:53 xinming_ left
[Coke] doesn't think he's even hacking ON perl 6 at this point. blah. 12:53
ZoffixW MadcapJake, there's also IO::MiddleMan: github.com/zoffixznet/perl6-IO-MiddleMan
12:53 Praise joined, Praise left, Praise joined, tardisx left 12:54 tardisx joined, wamba joined
timotimo [Coke]: that won't help when you have a C library that printf's to stdout 12:54
but i'm not sure that's what's happening in McJ's code
MadcapJake yeah, I would need like a C function that creates a fake file handle but really returns the written text instead of printing it 12:55
12:56 tardisx left, tardisx joined
MadcapJake wishes IO::Handles would work in nativecall as FILE pointers 12:57
12:58 tardisx left
MadcapJake I could give fdopen the stdin file descriptor and then just listen to stdin inside Perl 6, that could work right? 12:59
timotimo: McJ xD Took me a minute to realize that was me! (it's early...) 13:00
timotimo :)
no, that won't work 13:01
what you need is a pipe
sortiz MadcapJake, how much data you need to write to the Perl6 var?
13:01 brrt left 13:02 tardisx joined 13:03 Vlavv_ joined 13:04 tardisx left
MadcapJake sortiz: Could be a lot, these functions let you print node trees 13:07
13:07 smls left 13:08 molaf joined
MadcapJake timotimo: how could I create a pipe that (a) reads input and (b) I could get a file-descriptor for 13:09
I could write a temp file and just read from that, but that seems a bit silly
timotimo when you create a pipe, you get two file-descriptors 13:11
i forgot what exact function you need; maybe "socketpair"? 13:12
MadcapJake oh sweet!
sortiz For a pipe, to avoid blocking, you needs two threads.
timotimo actually, pipe
MadcapJake `pipe` gives me undeclared routine error 13:13
timotimo well, yeah, it's a C function :) 13:15
MadcapJake oh! didn't realize that
13:16 perlpilot_ joined
MadcapJake what is filedes? reading docs says pipe puts file descriptors in filedes[0] and filedes[1] 13:16
13:17 perlpilot left
timotimo yeah, you need a CArray of ints with space for two fds 13:17
and you pass that CArray
MadcapJake ahh! sweet
13:18 tardisx joined, ZoffixW left
MadcapJake this is gonna need some serious C magic :P 13:19
13:20 tardisx left
timotimo mostly posix magic 13:20
13:20 cur8or left, tardisx joined
MadcapJake are you telling me that none of this will work on Windows :P 13:21
timotimo good question 13:22
MadcapJake actually it's not really a big deal, myhtml currently only supports Linux anyways
sortiz MadcapJake, do you read that you will need two threads/process? 13:24
13:24 uruwi left 13:27 tardisx left 13:28 ZoffixW joined
ZoffixW m: say so 'foo' ∈ ∅ <foo bar ber> 13:33
camelia rakudo-moar 6df7ff: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YnQdz6ImNN␤Missing required term after infix␤at /tmp/YnQdz6ImNN:1␤------> 3say so 'foo' ∈ ∅ <foo bar ber>7⏏5<EOL>␤ expecting any of:␤ prefix␤ term␤»
ZoffixW Bug?
dalek ar: da0d992 | (Steve Mynott)++ | docs/announce/2016.04.md:
doc some module changes in annouce
jnthn .u ∅
yoleaux U+2205 EMPTY SET [Sm] (∅)
ZoffixW Ah, ∅ is an *empty* set. I thought it was equivalent to set( ... ) not just set() 13:34
jnthn m: say ∅
camelia rakudo-moar 6df7ff: OUTPUT«set()␤»
jnthn Yeah :)
So ttiar
ZoffixW What's ttiar? 13:35
jnthn two terms in a row
ZoffixW Ah
13:35 tardisx joined
jnthn (A lot of Perl 6 errors are some analysis on top of that parse fail) 13:35
13:36 uruwi joined
Juerd I love the term/op-thing in the way Perl is parsed :) 13:36
13:37 grondilu left, tardisx left
timotimo aye 13:39
13:39 tardisx joined
timotimo self-clocking or what's its term 13:39
MadcapJake sortiz: what do you mean?
dalek c: cb78678 | (Zoffix Znet)++ | doc/Language/unicode_texas.pod:
Clarify ∅ => set() is empty set
ZoffixW :o 13:41
13:41 tardisx left
sortiz A pipe is an IPC (inter process communication) mechanism, normally you create one and fork, 'cus ss soon as a process attempts to read from an empty pipe, then read(2) will block until data is available. 13:41
13:42 domidumont left
sortiz So you need a writing thread and a reading thread. 13:43
13:43 tardisx joined, _mg_ left 13:45 tardisx left 13:46 skids joined 13:48 gtodd left
sortiz MadcapJake, In Perl6 the support for pipes assume separate process (via run, shell, QX), and I understand that you want to read the data produced in the same process. 13:51
timotimo that's right 13:53
13:53 rubio_terra left
moritz so why not use a Channel? 13:53
timotimo because the C library probably doesn't know about the Channel type :) 13:54
sortiz moritz, some context: irclog.perlgeek.de/perl6/2016-04-20#i_12366223 13:55
13:55 domidumont joined
moritz oh, I missed that 13:55
13:55 Ven left, tardisx joined 13:56 Actualeyes joined 13:57 tardisx left
sortiz moritz, McJ needs something like perl5's IO::Scalar 13:57
13:58 tardisx joined
MadcapJake sortiz: ok so I am doing Thread.start, is that what you mean? 13:58
timotimo why not just a start { ... } block?
MadcapJake I dunno, does that make more sense? :P
timotimo usually
not sure if Thread.start will create a new thread all over, or go into the current scheduler. which start { ... } does 13:59
13:59 rindolf left, Ven joined, tardisx left 14:00 tardisx joined 14:01 tardisx left
timotimo anyway, typically we'll tell you not to use Thread itself. or Lock, or Mutex 14:02
takadonet mornign all
morning*
timotimo heyo taka
14:03 Actualeyes left
MadcapJake timotimo: so what am I to use to create a separate process? I am using a C function. 14:03
14:03 tardisx joined
timotimo a separate process is what you use Proc::Async for, for example 14:03
MadcapJake how would I use that with a C function? 14:04
timotimo you build a program that'd call that function for you. why use a process?
MadcapJake timotimo: because I am trying to capture something printed to a file handle by a C function 14:05
14:05 tardisx left
timotimo right. the pipe approach isn't what you want, then? 14:05
MadcapJake timotimo: huh?
timotimo well, if you can tell the C library what file descriptor to use, you can give it one end of your pipe 14:06
and read from the other end
geekosaur that only works without a thread or process if output is less than PIPE_BUF bytes
MadcapJake right, that's what I am trying right now
geekosaur otherwise the function blocks
timotimo yeah
MadcapJake so I *do* need a thread
timotimo yeah
MadcapJake ok xD
RabidGravy but you can do it in perl 14:07
14:07 khw joined
MadcapJake RabidGravy: what do you mean? Perl 5? 14:07
RabidGravy in Perl 6
MadcapJake how?
timotimo with start { ... }
why does it seem like we're talking past each other %) 14:08
RabidGravy with start
MadcapJake it does :P
ok yeah that's what I am trying lol
RabidGravy can you explain from the beginning what you are trying to do?
MadcapJake haha, sure!
so, I have a few C functions in a library I am wrapping 14:09
that print to a given FILE handle
14:09 tardisx joined
RabidGravy right 14:09
MadcapJake The problem is, they print *after* all the Perl 6 level printing happens
ZoffixW Any idea how to combine these two lines so I don't have to modify %params? %params = %params.kv.map: { uri-escape $_ }; my $body = %params.pairs.sort.map(*.kv.join: '=').join: '&';
MadcapJake so if you try to include some says in there for clarity, it will just print all those, *then* it prints the C level stuff 14:10
it looks like it's printed in reverse order too, strangely
14:10 zakharyas left
timotimo so something about buffering? 14:10
14:10 zakharyas joined
sortiz MadcapJake, i think that the "pipe way" is overkill, a temporal file is much simpler :-) 14:10
ZoffixW It sorts the keys, joins key=value, and then joins them as key=value&key2=value2, but I also need to uri-escape() both keys and values
timotimo ZoffixW: i think you may want to check out how .fmt on a hash works, for one :)
14:10 tardisx left 14:11 cdg joined
ZoffixW Oh, sweet! timotimo++. That'll do it. 14:11
RabidGravy the FILE does buffer on it's own yes
ZoffixW I'm kinda sad we now have decent docs, because I feel like a fool when I don't read any :P
MadcapJake RabidGravy: so what's a Sixian to do? :) 14:12
geekosaur man 3 setvbuf 14:13
14:13 brrt joined
geekosaur and maybe man 3 fflush 14:13
14:13 PhilJ joined, tardisx joined
PhilJ Hi 14:13
ZoffixW \o
Hm, actually, I don't think .fmt will help me out here. I can't tell it to uri-encode inside the format string :/ 14:14
14:14 zakharyas left
PhilJ How can I change STDIN to read charset=binary? 14:14
timotimo you can just use the method that reads bytes instead of strings 14:15
m: $*IN.read(60).perl.say
camelia rakudo-moar 6df7ff: OUTPUT«Buf[uint8].new(67,195,169,97,100,32,115,108,195,161,110,32,97,103,32,115,108,195,169,105,98,104,116,101,32,109,97,111,114,103,97,32,67,104,111,110,116,97,101,32,68,104,195,186,110,32,110,97,32,110,71,97,108,108,10,65,103,117,115,32)␤»
timotimo like that
14:15 tharkun left, tardisx left
RabidGravy ZoffixW, look at the way that URI::Template does it 14:16
PhilJ Is there a way to do it while still using 'for lines() -> $line {' 14:17
style
14:17 tardisx joined
timotimo difficult, as "what constitutes a line ending" depends on the encoding 14:17
14:17 tharkun joined
timotimo but at least with utf8, you'll only ever get an \n byte if it's the actual \n 14:17
geekosaur sadly there are a great many network protocols defined in terms of byte streams with \r\n line delimiters 14:18
timotimo do we have a "split" method defined on Buf properly?
PhilJ ah ok, I have text file thats not UTF8 (get a "Malformed UTF-8" errort). file -bi reports it as charset=binary
14:18 tardisx left
geekosaur that just means it can't figure out the encoding from its limited repertoire (generally it only groks utf8 and iso8859-1 (or -15) 14:19
timotimo github.com/tony-o/perl6-http-serve...nc.pm6#L69 - here's one terrible way to do it
timotimo goes AFK for a bit
MadcapJake there should be a nativecall sub like nativemacro('_IONBF') so that I don't have to hunt down it's integer value
timotimo oh, the code i linked searches for \r\n\r\n, not \r\n
"nativemacro" would require something quite different from what the rest of nativecall does 14:20
MadcapJake bummer :\
timotimo remember, nativecall works with dlopen and such, whereas macros are gone by the time the C compiler starts compiling code
so we'd have to parse header files
14:20 tardisx joined
timotimo *and* make sure we reach the same results the compiler would for your given context 14:21
MadcapJake ah, oh well, just a minor PITA
timotimo and what if you have a dynamic library that was compiled with a different value for some macro, for example if there was a -DFOO=1 in the makefile or in your CFLAGS environment variable?
that's a task fit to make one's head asplode
MadcapJake macros in general make my head asplode :P 14:22
s/macros/C macros/
timotimo they're not terribly bad, because they're so stupid. but if they aren't written or used with care, they can cause a whole lot of mayhem
14:22 tardisx left
ZoffixW RabidGravy, thanks. 14:22
14:22 uruwi left
timotimo o/ 14:22
RabidGravy perl 5's h2xs actually makes a small stub which compiles some function that that returns the value of the #define by name 14:23
MadcapJake timotimo: I just think they are overused. When reading C code, you have to find all these macros and hunt down their definitions (same goes for typedefs, mind you)
14:24 tardisx joined
MadcapJake RabidGravy: neat! MyHTML has a wrapper written in Perl5/xs 14:24
RabidGravy well, you could just rob the constant function from the xs file ;-) 14:25
14:26 tardisx left
MadcapJake well what I'm doing with setvbuf, I don't think theirs does 14:26
14:29 Actualeyes joined, tardisx joined 14:34 pmurias joined
MadcapJake how do I pass NULL to a c function? 14:35
14:37 uruwi joined
MadcapJake nvm, got it 14:37
RabidGravy if you mean via nativecall, by passing the type object of the thing in the signature
14:37 kaare__ left
MadcapJake geekosaur: thanks for the setvbuf tip! that worked! 14:38
RabidGravy: yeah it didn't work for size_t but I ended up just lopping that argument off :)
RabidGravy :)
14:40 ZoffixWin joined, tardisx left 14:42 tardisx joined, [TuxCM] joined 14:43 tardisx left 14:44 tardisx joined 14:46 tardisx left, tardisx joined 14:48 tardisx left 14:50 tardisx joined 14:51 molaf left, tardisx left 14:53 tardisx joined
PhilJ How can I get to a variable inside sub MAIN()? 14:53
14:53 molaf joined
ZoffixW PhilJ, from where? 14:53
PhilJ from the main script after MAIN has exectued 14:54
jnthn The main script body runs before MAIN, I thought?
m: say 42; sub MAIN() { say 'here' }
camelia rakudo-moar 6df7ff: OUTPUT«42␤here␤»
14:55 tardisx left, rindolf joined
MadcapJake m: my $forty-two = 42; sub MAIN() { say $forty-two } 14:55
camelia rakudo-moar 6df7ff: OUTPUT«42␤»
MadcapJake m: sub MAIN() { say $forty-two }; my $forty-two = 42; 14:56
camelia rakudo-moar 6df7ff: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dGjyZpDt7M␤Variable '$forty-two' is not declared␤at /tmp/dGjyZpDt7M:1␤------> 3sub MAIN() { say 7⏏5$forty-two }; my $forty-two = 42;␤»
PhilJ I'm trying to use it to capture command line variables. for instance "sub MAIN($source) " $source is scoped to the sub;
ZoffixW PhilJ, right, so just put all of your code inside sub MAIN
PhilJ Doh! 14:57
MadcapJake PhilJ: also, you could create an undefined variable outside of the sub, and then assign to it inside your MAIN
timotimo if there's just $source, you can also work with $*ARGS if that's easier
PhilJ MadcapJake: No an option, if you put anything before sub MAIN(), sub MAIN() doesn't execute;
14:58 lizmat joined, Ven left
MadcapJake m: my $source; sub MAIN() { $source = 10 }; say $source; 14:58
camelia rakudo-moar 6df7ff: OUTPUT«(Any)␤»
MadcapJake m: my $source; sub MAIN() { $source = 10; say $source; }; 14:59
camelia rakudo-moar 6df7ff: OUTPUT«10␤»
MadcapJake PhilJ: you can have lots of stuff before sub MAIN, perl 6 will search for the sub MAIN in top-level scope
15:00 tardisx joined
PhilJ Ah ok, it was the scoping that was throwing me off; 15:00
15:00 brrt left
lizmat m: my $source; sub MAIN() { $source = 10; say $source }; say $source; 15:00
camelia rakudo-moar 6df7ff: OUTPUT«(Any)␤10␤»
ZoffixW MadcapJake, doesn't the main body runs before sub MAIN(){} regardless of where you define it?
lizmat MadcapJake: the say $source outside of MAIN gets run *before* MAIN gets run
ZoffixW So it's not very useful to declare vars outside of it in hopes of assigning to them 15:01
MadcapJake right, I noticed that :P
PhilJ Ok, I'll stop asking stupid questions for a bit now
MadcapJake ZoffixW: true, unless you had another subroutine outside that is called inside but uses some vars scoped from top-level
ZoffixW PhilJ, there aren't any stupid questions. Keep asking.
15:02 tardisx left
CIAvash ZoffixW: %params.kv.map(&uri-escape).hash.sort.map(*.kv.join: '=').join: '&'; 15:03
mst there are no stupid questions, only stupid people 15:04
... no, wait, that's not right either
15:04 tardisx joined
ZoffixW CIAvash++ thanks 15:05
15:06 tardisx left, Xliff_Zzzz is now known as Xliff
Xliff Aahhhh.... chaining. 15:06
mst colabti.org/irclogger/irclogger_log...04-19#l375 15:07
I continue to be confused by #perl6's tendency to attack anything talking about perl5 for not talking about perl6 as well 15:08
15:08 tardisx joined
mst most of the perl5 community still don't care, and the nasty petty attitude is not going to make them any more likely to 15:08
15:08 zakharyas joined
ZoffixW :D 15:08
CIAvash ZoffixW: I was using the same thing in my code in 2 lines. I made it 1 line after your question! :) 15:09
15:10 g4 left, tardisx left
jnthn mst: While I agree in general, two lines down from what you linked is "they even mention perl 6 in there" - so it apparently *is* talking about Perl 6 as well. 15:11
15:11 tardisx joined
ZoffixW The sad thing is it doesn't fit onto single line of code, so I still ended up with two lines :D At least there's no second variable :) 15:11
15:13 tardisx left
mst jnthn: no it isn't 15:13
jnthn: it has one slide that mentions pugs
jnthn: this is my point - nobody even bothers to look before squealing, apparently including you 15:14
jnthn mst: And where, exactly, did I squeal?
mst jnthn: I'm sorry, only the 'not bothering to look before' part applies to you, you merely disagreed based on not checking 15:15
but still can we please stop being nasty to t'other side of the fance, it's really starting to bore me now 15:16
jnthn mst: Yes, well, I've fixed 4 damn GC bugs this afternoon, I think we can excuse me for not having the time to read slides.
ugexe Ive surprisingly seen a high interest in perl6 from the developer that have been interviewing me. Not enough they were looking to migrate, but at least a positive curiosity
15:16 tardisx joined
[Coke] I am apparently obvlious, because I only hear about this stuff from a grumpy (probably deservedly so) mst. 15:16
ugexe developers^
[Coke] *oblivious ? spelling hard.
ZoffixW obliviviuous 15:17
mst jnthn: you are absolutely excused for not reading them. what annoyed me is you attempting to contradict me over the content of slides I'd read and you hadn't :P
[Coke]: or just happen not to be in here when it's happening 15:18
15:18 tardisx left
jnthn mst: Was just taking "they even mention perl 6 in there" at face value. Apparently I shouldn't have. 15:18
ZoffixW I was here and kinda ignored that convo. To me it looks like word "Perl" means a different thing to different people. So when some use word "Perl" to say something bad about it, some may take it the conversation includes P6, which is probably what triggered hahainternet's rant 15:19
15:19 kaare__ joined
mst jnthn: it's generally safe to assume that once a perl5 person starts being pissy about perl6 people, or when a perl6 person starts being pissy about perl5 people, that they aren't properly paying attention 15:19
15:20 tardisx joined
mst however the people being pissy without having paid attention do then produce *actual* reasons for t'other side to be pissy in the process, and I like to nip it in the bud 15:20
[Coke] I had a nice chat with xdg this weekend about 5, 6, naming of 6, and we all seemed very happy and polite, so it's demonstrably possible. :) 15:21
(protip: blame TimToady and shrug apologetically)
15:21 tardisx left
ZoffixW :} 15:22
15:22 [TuxCM] left, _mg_ joined, geekosaur left
mst at this point it's mostly pretty co-operative, but there's still the odd person who seems to asssume the other side is defecting given even exceedingly weak (or, in this case, outright invented) evidence 15:22
timotimo worrydream.com/LearnableProgramming/ - there's some really nifty animations to see here
mst I'd also note that I originally got this via people going "huh, I thought the perl6 community liked haskell, why are they getting all defensive about it?", who I told was generalising from one example of somebody not getting the point 15:23
15:23 geekosaur joined
mst generally finds himself complaining at everybody about equally ;) 15:23
hahainternet mst: in my defence, the perl5 was bad and that was part of my complaint :) 15:24
15:29 nowan joined
mst hahainternet: based on what? I've seen osfameron's code for various things for years and he's better at perl5 than you are, in my experience 15:29
RabidGravy :-O 15:30
ZoffixW grabs popcorn
mst I mean, if there's a bug in one of the slides, I'd be happy to relay that for you 15:31
RabidGravy I'll second the vouching for osfameron 15:34
timotimo clearly osfameron has fame 15:41
it's even in his name
15:41 _mg_ left
mst timotimo++ 15:44
hahainternet: btw, an "is perl6 an acceptable haskell" post that you mark as 'inspired by' rather than 'rebuttal to' would probably both achieve your goal and be positive (and I'd read it, that sounds interesting :) 15:45
mst vanishes rugbywards 15:46
[Coke] who owns perl6intro.com/ ? 15:48
[Coke] finds it
lizmat NAOUM HANKACHE
timotimo saviour of the universe~ 15:49
stmuk github.com/tadzik/panda/pull/308
*cough* 15:50
lizmat stmuk: merged
stmuk ty 15:51
[Coke] .seen nige1 15:53
yoleaux I saw nige1 13 Apr 2016 19:56Z in #perl6: <nige1> Xliff and perlpilot - have updated SixFix now - I think for the better - thanks for the feedback - the easter egg is now a sidenote
[Coke] .tell nige1 your feedback on the first sixfix includes things that aren't in the code snippet, btw. 15:54
yoleaux [Coke]: I'll pass your message to nige1.
15:55 domidumont left 15:56 zakharyas left
dalek ar: e8770ff | (Steve Mynott)++ | modules/panda:
update panda for Shell::Command fix
15:57
15:58 zakharyas joined 16:00 jameslen_ joined 16:01 jameslenz left 16:02 vendethiel joined 16:05 kaare__ is now known as kaare_
[Coke] seen on FB: The Fibo-Gnocchi sequence. 16:06
16:08 araujo_ joined 16:10 araujo_ left
moritz speaking of sixfix: please retweet twitter.com/nogoodnickleft/status/...7714799616 16:11
16:12 araujo left
Xliff Was there a Sixfix this week? 16:12
dalek Iish: 364b1df | (Salvador Ortiz)++ | lib/DBDish/Oracle/Native.pm6:
Oracle: Add proper DLL name for Windows
16:13
ZoffixW .tell Herby_ All done! there's very basic .search in Twitter and full API .search-tweets in Twitter::API. Let me know if the args/output need to be tweaked, since I don't really know what the best use for these features are, I don't know the best args/output. 16:14
yoleaux ZoffixW: I'll pass your message to Herby_.
sortiz I'm happy to announce that DBIish is now fully tested on Windows x86_64. 16:16
16:17 aindilis left
lizmat sortiz++ 16:17
ZoffixW Brilliant idea: "Each email includes a coding challenge and a question about Perl 6 you must answer to receive your next SixFix."
sortiz++
jnthn sortiz++ 16:18
16:19 awwaiid joined
Xliff Nice job, sortiz++! 16:19
lizmat m: say (^255).grep: { Buf.new($_).decode("utf8-c8").chars == 2 } # jnthn: range of values giving extra null 16:20
camelia rakudo-moar 6df7ff: OUTPUT«(194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244)␤»
Xliff Is there a perl6 routine that's designed to find shared libraries? 16:21
Like findLib(«library name without the 'lib' prefix») --> list of libs with most relevant one first 16:22
NativeCall does it with the "is native" attribute, so I was hoping I wouldn't have to duplicate code. 16:23
ZoffixW Xliff, there's a LibraryCheck module that can tell you if a lib is present, but I don't think it lists what's available 16:24
hoelzro Xliff: nativecall depends on OS-specific naming conventions and whatever dynamic library loader the OS provides to get at those libraries
sortiz On Windows: Files=19, Tests=740, 44 wallclock secs ( 0.08 usr + 0.06 sys = 0.14 CPU) Result: PASS 16:25
On Linux: Files=19, Tests=740, 38 wallclock secs ( 0.11 usr 0.01 sys + 22.46 cusr 1.15 csys = 23.73 CPU) Result: PASS 16:26
16:27 lostinfog joined
stmuk pl6anet.org/drop/rakudo-star-2016.04-RC1.tar.gz 16:27
sortiz stmuk++
Xliff ZoffixW, thanks. Will check it out. 16:28
hoelzro, Yeah. And I'm hoping that work is already done so I don't have to Roll My Own.
16:30 ZoffixW left
sortiz Xliff, See also my WIP: github.com/salortiz/NativeLibs 16:30
16:31 tardisx joined
Xliff sortiz++, thanks. 16:31
MadcapJake I'm about to release v0.1.0 of HTML::MyHTML 16:32
16:33 tardisx left
Xliff sortiz: So "constant LIB = NativeLibs::Searcher.at-runtime('xqilla')" ? 16:34
MadcapJake, nice!
I will check again for SEGV.
Is git repo up to date?
16:35 tardisx joined
Xliff I was thinking it might be due to distribution differences. 16:35
16:36 tardisx left, lizmat left 16:37 tardisx joined
sortiz Xliff, you need to pass also a "Well know symbol", for example the name of a function, to check that the library includes it. 16:37
Xliff sortiz: Hrm. OK. 16:39
16:39 tardisx left
sortiz Xliff, for other example see: github.com/perl6/DBIish/blob/maste...m6#L31-L38 16:39
MadcapJake Xliff: yeah it's in master now 16:40
Xliff: aren't you in an ubuntu VM?
Xliff Yes
16:40 kaare__ joined
MadcapJake so not sure how there could be distro differences :P I'm on ubuntu 16:40
16:40 kaare_ left, tardisx joined
Xliff Well, I didn't know that X-p 16:41
OK. I will pull and check for SEGV
MadcapJake hehe, thanks! I'm really hoping they're gone
MadcapJake crosses fingers and toes
16:42 tardisx left
MadcapJake I wonder if it could have to do with being in a VM 16:42
16:43 zakharyas left
Xliff Maybe?!? 16:43
$ perl6 -Ilib eg/attributes-high.pl6
Original tree:
Segmentation fault
16:43 tardisx joined
Xliff The interesting thing is I see the "Original tree:" emitted, which is new. 16:43
MadcapJake Xliff: what does «perl6 -e "$*OUT.native-descriptor.say"» print? 16:44
16:44 perlpilot_ is now known as perlpilot 16:45 tardisx left 16:46 tardisx joined 16:47 dakkar left 16:48 tardisx left 16:49 tardisx joined
sortiz MadcapJake, for fdopen, please use a simple Str, not a Blob, that functions needs the final zero. 16:49
16:50 tardisx left
MadcapJake sortiz: ok thanks, fixing now 16:51
sortiz: any ideas why Xliff would be getting segfaults in ubuntu (VM) where I am not, also in ubuntu (not VM) 16:53
sortiz MadcapJake, As a general rule, if a function expect a buffer + length, a Blob/Buf is perfect, if expect an ascii zero terminated string use Str. 16:54
MadcapJake ahh, that's good info thanks!
Xliff MadcapJake, fresh clone, still getting errors. 16:55
I will reboot into Ubuntu host and check, later.
16:56 tardisx joined 16:58 tardisx left 16:59 tardisx joined 17:01 tardisx left 17:02 tardisx joined
ugexe why do i get '===SORRY!=== Grammar::Rules is a builtin type. You can use it without loading a module.' when loading a `Grammar::MIME` that uses a `Grammar::Rules::XXX` when I stub `Grammar::Rules { ... }` in `Grammar::MIME`? If I don't stub, it says it cant find `Grammar::Resources` (there is no such module) 17:03
17:04 tardisx left
jnthn m: use Grammar; 17:05
camelia rakudo-moar 6df7ff: OUTPUT«===SORRY!===␤Grammar is a builtin type. You can use it without loading a module.␤»
jnthn m: use Int;
camelia rakudo-moar 6df7ff: OUTPUT«===SORRY!===␤Int is a builtin type. You can use it without loading a module.␤»
jnthn m: use Int::Foo;
camelia rakudo-moar 6df7ff: OUTPUT«===SORRY!===␤Could not find Int::Foo at line 1 in:␤ /home/camelia/.perl6␤ /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::Repo…»
jnthn m: use Grammar::Foo;
camelia rakudo-moar 6df7ff: OUTPUT«===SORRY!===␤Could not find Grammar::Foo at line 1 in:␤ /home/camelia/.perl6␤ /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::…»
jnthn m: use Grammar::Rules;
camelia rakudo-moar 6df7ff: OUTPUT«===SORRY!===␤Could not find Grammar::Rules at line 1 in:␤ /home/camelia/.perl6␤ /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…»
jnthn ugexe: Not sure, sounds like an overzealous check somewhere
17:06 tardisx joined
ugexe to clarify: `grammar Grammar::MIME { also does Grammar::Rule::XXX; };`... i have a hunch of i move ::Rule::XXX under Grammar::MIME it'll work... 17:07
but it seems to happen at module load time so maybe the composition doesnt matter
17:07 tardisx left 17:08 tardisx joined 17:09 Stephen joined 17:10 Stephen is now known as Guest26770, tardisx left
Guest26770 Hey there anybody, I was wondering what the caret did in the following statement: say $x.^name; 17:10
timotimo it goes "up a level" into the metaobject 17:11
vendethiel Guest26770: doc.perl6.org/language/operators#postfix_.%5E
[Coke] I was going to say "docs.perl6.org/routine/.%5E" , but that explodes. :|
17:12 tardisx joined
Guest26770 Huh, interesting. Thanks, @timotimo and @vendethiel! 17:12
17:13 ptolemarch left, tardisx left 17:14 tardisx joined 17:15 ptolemarch joined 17:16 tardisx left 17:17 domidumont joined 17:18 tardisx joined, Guest26770 left 17:20 tardisx left
timotimo sunvox has a shared library + header file that lets you use its stuff from your own code and that's rather cool and is begging for a perl6 binding :) 17:20
17:21 tardisx joined
RabidGravy do it! do it! 17:22
we need some actual instruments
timotimo yo gravy man, how do i learn to tap beats into the drumkit using my keyboard keys?
i can somewhat competently use an e-drumkit, but for some reason that seems to be an entirely different part of my brain
(not only because of the bass drum being at my foot) 17:23
17:23 tardisx left
RabidGravy I use pads on drum machines all the time, I tend to keep the beat with my right foot 17:23
timotimo how do i know which of mine is the right foot? 17:24
and that doesn't necessarily help me :D
oh
i think i miscommunicated 17:25
MadcapJake Make an L shape out of your fingers, if it looks correct, that's the left side! Then the opposite side is your right side ;)
timotimo my problem is not having an idea which keys to press on the beat. i can hold the beat all-right, though
MadcapJake get a little midi pad
timotimo how is it different from pounding on my keyboard? 17:26
MadcapJake can handle pounding and they're bigger so you don't have to be so precise; making a beat is easier when you can move more than just your finger. 17:27
RabidGravy well y'know bass drum, high hat, bass drum and snare, high hat, bass-drum, high hat .... 17:28
17:29 tardisx joined
RabidGravy wonders if Hydrogen reacts to the keys 17:29
timotimo that's pretty much the simplest beat, eh? 17:30
17:32 devtom30 left 17:33 tardisx left 17:34 ZoffixW joined, tardisx joined 17:35 kaare__ is now known as kaare_ 17:36 tardisx left
RabidGravy timotimo yeah 17:37
timotimo one good thing is that the bass drum and hi hat are both on the bottom right and top left of my keyboard
because sunvox has them aliased like that 17:38
RabidGravy it is actually quite difficult playing on the keyboard isn't it
timotimo it's ... different :)
17:39 tardisx joined
timotimo ah! i have the third key on the bottom right as well now 17:39
17:40 tardisx left 17:41 sortiz left, idiosyncrat_ joined 17:43 ZoffixW left, tardisx joined
teatime what does 'moar' mean / where does the name 'moar' come from ? 17:44
ilmari metamodel on a runtime
masak that's a backronym, though
mostly the name was chosen because it sounded cute and lolcat-ish 17:45
idiosyncrat_ Hi. I'm the author of Marpa. The Perl 6 community has been very helpful to us in the past with questions, and there is interest in incorporating Marpa into Perl 6, so you also have an interest in this matter.
masak idiosyncrat_: hi!
17:45 tardisx left
masak idiosyncrat_: nice work on Marpa! 17:45
idiosyncrat_ I've started a Marpa::R3, which if and when you port will be the one you want to start from.
masak: Thanks!
masak idiosyncrat_: I do some stuff with parsers, and I come across your work now and then. 17:46
idiosyncrat_ This is a good time to re-license -- Marpa was LGPL.
masak: yes, Marpa had been one of the Internet's best kept secrets, but word seems to be leaking out. :-)
My question: What should be the new license? 17:47
17:47 tardisx joined
idiosyncrat_ The "Perl 5 license" or Artistic 2.0? (Or something else?) 17:47
awwaiid Though I love LGPL, I'm increasingly a fan of the Artistic License. What are you trying to achieve?
idiosyncrat_ I come here not just for technical advice, but for wisdom, so advice re goals is welcome also. 17:48
awwaiid idiosyncrat_: Rakudo, the main operational implementation of Perl 6, appears to use Artistic 2.0
MadcapJake What's an easy way to capture the output of curl? I can't seem to get it working
idiosyncrat_ FSF recommends the "Perl 5 license" for any Perl module, because of compatibility with the community. 17:49
17:49 tardisx left
timotimo Proc::Async is how you'd usually do it 17:49
MadcapJake timotimo: what about qx or run?
awwaiid For me the goal is often (1) let people use my stuff, (2) let me use the stuff they build from my stuff
idiosyncrat_ So that suggest to me that "Perl 5 license" is the way to go.
timotimo oh, also a possibility indeed
MadcapJake timotimo: how do you use them? I can't get it working :P 17:50
awwaiid idiosyncrat_: Yes -- which is basically "GPL || Artistic 2.0"
which sounds great
idiosyncrat_ awwaiid
MadcapJake m: qx{curl www.google.com}
camelia rakudo-moar 6df7ff: OUTPUT«qx, qqx is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting line 1␤ in sub QX at src/RESTRICTED.setting line 11␤ in block <unit> at /tmp/XzVnzDaVF1 line 1␤␤»
17:50 tardisx joined
idiosyncrat_ awwaiid: No, it GP || Artistic *1.0* 17:50
IIRC
timotimo perl6 -e 'say qx{ curl wakelift.de/ }.lines[0].perl -> "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"" 17:51
idiosyncrat_ s/GP/SPL/
17:51 konobi left
timotimo you may want to pass a flag that disables its loud output on stderr, though 17:51
idiosyncrat_ s/GP/GPL/ !
MadcapJake why would I get this «Unable to read from ' curl www.google.com/ 17:52
17:52 tardisx left
awwaiid idiosyncrat_: ahh.... I see. I thought it had switched but looking at my local install I see that you're right. Interesting. 17:52
17:53 tardisx joined
timotimo MadcapJake: it tries to run a program called that? 17:53
idiosyncrat_ With the LGPL, a problem I had was some serious researchers were unable to read my code ...
timotimo what's your code look like?
awwaiid idiosyncrat_: how so?
MadcapJake for some odd reason www.google.com/ doesn't work but any other site I throw at it works just fine 17:54
idiosyncrat_ because of employer IP restrictions, and on consideration it seems best to help them out.
17:55 tardisx left
idiosyncrat_ awwaiid: LGPL code is what some call "contaminating", meaning that folks exposed to it may have derived ideas from it, and be restricted in how they reuse those ideas. 17:55
ilmari idiosyncrat_: copyright does not cover ideas, only expressions
awwaiid idiosyncrat_: ah. I've always taken the L in LGPL to avoid that.
idiosyncrat_: but back to your question -- I think terms of Perl 5 are a great start
ilmari awwaiid: the L only means that there's an exemption for derived works created by dynamic linking 17:56
17:56 tardisx joined
geekosaur perhaps the biggest problem with (L)GPL is it's not been seriously tested in court --- which means nobody knows how it will *really* be interpreted 17:56
17:56 Relsak joined
idiosyncrat_ awwaiid: Some corporate lawyers are cautious re LGPL and assume the "ideas" taken might be construed to include the "form of expression" 17:56
And the pertinent fact is that these lawyers, right or wrong, dictate what some people can read. 17:57
17:57 tardisx left
idiosyncrat_ With questions like this, I often ask "What would timtoadi do in this situation?" 17:58
17:58 tardisx joined
awwaiid TimToady, I believe, created Artistic 2.0 as his suggested forward looking thing :) 17:58
ilmari geekosaur: the GPL has been enforced in court in Germany at least
idiosyncrat_ And occasionally he's had the time to answer me, so I'm hopeful ow.
s/ow/now/
ilmari www.twobirds.com/en/news/articles/2...ic-license 17:59
18:00 tardisx left 18:01 tardisx joined
idiosyncrat_ awwaiid: my question would be, in the Marpa::R3 situation, would TimToady go with his "forward looking thing", or with compatibility with the vast majority of other Perl 5 code & modules. 18:01
awwaiid For a perl6 Marpa::R3? 18:02
18:02 tardisx left
awwaiid I don't really know anyway :) 18:02
18:03 tardisx joined
idiosyncrat_ masak: I have followed your blog posts over the years -- your comments on Perl 6 has been very informative. 18:04
MadcapJake What's everyone's favorite html parser (in terms of interface)? Looking for some inspiration as I am ready to write the high-level bits of HTML::MyHTML 18:05
[Coke] "interest in incorporating Marpa into Perl 6" by whom?
18:05 tardisx left
idiosyncrat_ [Coke]: github.com/drforr/perl6-Marpa among others 18:06
[Coke] ah. so, providing access via a module. not "incoporate into rakudo"
*incorporate 18:07
18:07 tardisx joined
[Coke] carry on, then. :) 18:07
teatime .tell AlexDaniel ooo! I have new/interesting info re: our convo about unicode character names (e.g., U+2019) … help me remember to tell you. 18:08
yoleaux teatime: I'll pass your message to AlexDaniel.
masak idiosyncrat_: thank you, that's nice to hear. I wish I took the time to blog more.
18:08 tardisx left 18:09 tardisx joined
timotimo aye, your blog posts are always a pleasure to read, masak :) 18:10
MadcapJake ok no opinions on html parsers I guess, I'll try to just sugar up the MyHTML interface
what's everyone's feelings on exporting enums? Should they be long, namespaced keys or maybe just skip the enum and use a hash? 18:11
18:11 tardisx left
idiosyncrat_ MadcapJake: Actually there is a Marpa::R2::HTML, part of Marpa::R2 18:12
MadcapJake idiosyncrat_: neat! not sure what that is, but I'm already knee-deep in writing this module :)
idiosyncrat_ I wrote it, so I'm prejudiced, but people say nice things about it, at least as long as I'm around. :-) 18:13
MadcapJake Marpa seems really similar to what Perl 6 grammars already cover 18:14
18:15 tardisx joined 18:16 Sqirrel left, tardisx left
idiosyncrat_ MadcapJake: jeffreykegler.github.io/Ocean-of-Aw...html#PERL6 18:17
MadcapJake interesting! thanks for the reading material! 18:19
18:19 tardisx joined 18:21 tardisx left 18:24 tardisx joined
teatime can you easily create an operator that duplicates another existing one, w/o duplicating the implementation… something like: sub infix:<∨> = &infix:<?|> ? 18:26
18:26 tardisx left
jnthn m: my &infix:<omg> = &infix:<+>; say 4 omg 2 18:27
camelia rakudo-moar 6df7ff: OUTPUT«6␤»
teatime in a module, such that it could be imported, I mean; not to rakudo itself.
cool, thanks.
jnthn++
18:28 cdg left
masak m: sub infix:<omg> { &infix:<+>($^l, $^r) }; say 40 omg 2 18:28
camelia rakudo-moar 6df7ff: OUTPUT«42␤»
18:29 tardisx joined
MadcapJake m: my &infix:<omg> = &infix:<+>; (5, 4, 2) Zomg (1, 2, 4) 18:30
camelia ( no output )
MadcapJake m: my &infix:<omg> = &infix:<+>; say (5, 4, 2) Zomg (1, 2, 4)
camelia rakudo-moar 6df7ff: OUTPUT«(6 6 6)␤»
timotimo the Zomg operator, yay
MadcapJake lol
18:31 tardisx left
hoelzro hahahha 18:31
18:32 tardisx joined
teatime m: sub infix:<∨> { $^l ?| $^r }; say True ∨ False; &infix:<∧> = &infix:<?&>; say True ∧ False; 18:33
camelia rakudo-moar 6df7ff: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8LrsSK2ujG␤Confused␤at /tmp/8LrsSK2ujG:1␤------> 3lse; &infix:<∧> = &infix:<?&>; say True7⏏5 ∧ False;␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ …»
teatime naturally, that worked in my local repl..
18:34 tardisx left
teatime I only put it here so I could say, "yay, it *is* easy/painless!" :) 18:34
ah, nm; it was just lacking 'my'. I guess it worked here 'cause I'd already defined it in the repl. 18:35
18:37 tardisx joined 18:39 kurahaupo left 18:41 tardisx left
MadcapJake teatime: that is cool, you could create a whole propositional logic module! 18:42
masak m: sub infix:<∨> { $^l ?| $^r }; say True ∨ False; my &infix:<∧> = &infix:<?&>; say True ∧ False 18:43
camelia rakudo-moar 6df7ff: OUTPUT«True␤False␤»
masak teatime: need to use `my` when declaring new variables.
best guess it worked for you is you iterated your way towards a solution, but used `my` the first time 18:44
18:44 tardisx joined
teatime my plan is to create a boat-load of new/additional(sensible/useful) unicode operators, clumped into small, related sets (∧ and ∨ would be together under one tag, e.g), so that people can just `use WhateverMod :logic` to get them 18:44
18:44 nowan left
MadcapJake teatime: that's awesome! 18:45
teatime you'd be able to import individual ones, or groups. and that way, it only affects their own lexical scope. but, perhaps I already exists... I hope I don't forget to check first, lol
s/I already/it already/
RabidGravy finally broke my block and got basic authentication working for Sofa :) 18:46
MadcapJake I wonder how difficult it would be to capture propositional implication
18:46 tardisx left
teatime that reminds me I need to finish a proof, was helping someone in #logic and got mad distracted... as you can see ;) 18:46
MadcapJake teatime: You'll exist whether or not you check ;)
18:47 tardisx joined 18:48 tardisx left 18:49 skids left 18:50 tardisx joined 18:51 idiosyncrat_ left
MadcapJake how do you keep a hex number in hex form? 18:51
18:52 tardisx left
hoelzro MadcapJake: what do you mean? 18:52
[Coke] it's only hex when you show it to someone.
18:52 tardisx joined
[Coke] internally, it's "just" a number. 18:53
MadcapJake so it never actually is a hex?
hoelzro nope
if you want a number to be a number, but always Str to hex, you can mixin a role: 18:54
geekosaur if you want it in "hex" you presumably want it as a Str
hoelzro m: 0x16 but role { method Str { sprintf('0x%x', self) } }
camelia ( no output )
MadcapJake so then I'm assuming that C functions don't care either, right?
hoelzro m: say 0x16 but role { method Str { sprintf('0x%x', self) } }
camelia rakudo-moar 6df7ff: OUTPUT«0x16␤»
hoelzro nope, they probably don't
s/probably //
geekosaur nope, hex is a representation, it's all binary inside
MadcapJake ok then no biggy, thought that my sub was converting them
18:54 tardisx left
geekosaur unless it is documented as taking a string in a particular format 18:54
MadcapJake ok cool! good to know, thanks all! 18:55
18:55 tardisx joined 18:57 tardisx left 18:58 tardisx joined 18:59 CIAvash left 19:00 awwaiid left, tardisx left, aindilis joined 19:02 tardisx joined 19:03 tardisx left 19:05 tardisx joined 19:06 awwaiid joined 19:07 tardisx left, trnh joined 19:08 skids joined 19:10 domidumont left, tardisx joined
MadcapJake are you supposed to put the version adverb on all exported modules? 19:10
19:11 ocbtec left 19:12 tardisx left 19:13 tardisx joined 19:14 kaare__ joined, jjido_ joined 19:15 tardisx left 19:16 kaare_ left 19:17 tardisx joined 19:18 trnh left
dalek osystem: f527310 | (Jake Russo)++ | META.list:
Add HTML::MyHTML

  github.com/MadcapJake/p6-MyHTML
  github.com/lexborisov/myhtml
19:18
19:18 Relsak left 19:19 tardisx left
MadcapJake jnthn: where do you place :ver<0.2.0> ? on all modules in provides? 19:19
19:21 trnh joined 19:22 tardisx joined 19:24 jjido_ left, tardisx left 19:25 brrt joined 19:26 tardisx joined 19:28 tardisx left, tardisx joined 19:34 tardisx left, tardisx joined 19:37 tardisx left 19:38 kaare__ left 19:41 nowan joined 19:43 kaare_ joined, tardisx joined 19:45 tardisx left, nowan left, tardisx joined 19:47 tardisx left, Actualeyes left 19:48 tardisx joined, nowan joined 19:49 jjido joined 19:50 tardisx left 19:52 tardisx joined 19:53 trnh left 19:54 trnh joined, tardisx left 19:55 tardisx joined 19:56 tardisx left 19:57 tardisx joined 19:58 dduncan joined, dduncan left 19:59 tardisx left 20:01 tardisx joined 20:02 tardisx left 20:05 firstdayonthejob joined, tardisx joined 20:07 tardisx left 20:10 tardisx joined 20:11 trnh left 20:12 tardisx left, tardisx joined, ajoe joined 20:13 cdg joined
jnthn MadcapJake: You can just put it in the version field in a META.info, I thought? 20:14
20:15 tardisx left, trnh joined 20:16 tardisx joined
MadcapJake oh ok great! 20:16
jnthn It's what I've done anyway, and nobody fired me yet :) 20:17
MadcapJake hehe! that's good! so the DepSpec is assembled from the meta and there's nothing needed in the actual module files then, eh?
20:18 tardisx left
ugexe ideally you would also be able to declare versions on specific classes/namespaces beyond the version of the distribution as a whole 20:18
20:18 tardisx joined
MadcapJake that'd be useful! also there is the api adverb too, is all of that NYI or just not documented? 20:20
20:20 tardisx left
jnthn is probably the wrong person to ask about module-y things, fwiw :) 20:21
MadcapJake ahh alright :P
ugexe it should all work, but i dont think API does anything different than auth yet
20:21 darutoko left, patrickz joined
jnthn Others who know that stuff better than me are improving it faster than I can keep up with. :-) 20:22
ugexe it just adds it string form to the sha1 digest
zef handles all of it from the distribution side though
MadcapJake where would you place that adverb? on top-level modules/classes? 20:23
20:23 cpage_ left
MadcapJake you'd probably need to add that to provides then too right? 20:24
20:24 cpage_ joined, tardisx joined
ugexe probably, im not sure how provides will work with differing versions/api 20:24
MadcapJake yeah that's what I'm wondering 20:25
still kind of toying with gx-perl6 and I will need solutions for these problems :)
20:25 trnh left
dalek c: 6c928fa | (Jan-Olof Hendig)++ | doc/Type/Int.pod:
Fixed duplicate line and added examples to is-prime, expmod and unival
20:26
20:26 tardisx left
ugexe zef will handle dependencies listed as XXX::FOO:auth<a>:ver<*>:api<*>, but im not sure if writing it all as one string is best 20:26
but both provides and depends need a similar solution
MadcapJake well that's the DepSpec right there
ugexe but it can be written :auth('a'), :auth<a>, etc and its technically the same 20:27
MadcapJake another option would be json objects
20:27 kaare_ left
ugexe yep, but the deeper the meta6.json structure gets the more difficult it gets to write a proper one by hand 20:27
20:27 tardisx joined 20:28 hankache joined
MadcapJake true but maybe depends could accept string literal depspecs *and* object literal depspecs 20:28
ugexe although getting automatically expanded during install / indexing is reasonable
20:29 tardisx left
MadcapJake I don't see adding singleton objects for depended upon modules as going that deep really, it's really barely a step deeper than the provides object 20:29
20:29 kaare_ joined
ugexe that already happens, its handled in a CompUnit::Repository 20:30
hankache good evening #perl6
yoleaux 18 Apr 2016 21:31Z <pmurias> hankache: I'm working on fixing bugs that prevent rakudo-js from compiling the setting
ugexe provides gets expanded
fwiw the Distribution PR i have sitting in limbo would handle what your asking too 20:31
20:31 tardisx joined
ugexe you would provide your own meta parser to go into the installer 20:31
20:31 ufobat joined
MadcapJake cool, just trying to figure out what's codified, I will need to re-implement much of it for GX but it'd be nice if a lot of it was just codified into META6 20:31
ufobat hi :) 20:32
ugexe meta6 is meant to be interpreted into something else
20:33 tardisx left
hankache pmurias++ #rakudo-js 20:33
MadcapJake ugexe: right I just mean that GX has it's own filesystem (IPFS) and I want to avoid duplicating it, so it would be helpful to have those depspec attributes codified into provides/depends so I can avoid needing to parse any other files for that info. 20:34
20:35 tardisx joined
MadcapJake tardisx: it appears you are having some IRC problems, eh? :) 20:35
hankache ufobat++ #bailador
ugexe CURI also uses its own file system essentially. thats why it'll never be everything to everyone and needs to be interpreted 20:36
MadcapJake ugexe: right, I just hope that I don't have to try and delve into Perl 6 sources to find stuff because that will get expensive. Part of the appeal of GX for me is that it's local to each project. 20:38
hankache i read somewhere that we can uninstall modules now (I think R* doc) how can we do that? i don't see any options in panda.
ugexe zef uninstall Module::Name
ufobat hankache: what? :D 20:39
ugexe or `zef nuke site` to delete all installed modules 20:40
hankache oh zef! i should give it a try. can i use both panda and zef or will conflicts arise?
ugexe no problems 20:41
you can use zef without even installing it as well
hankache hein?! how so? 20:42
20:42 tardisx left
ugexe you can install anything else from within its directory: perl6 -Ilib bin/zef -v uninstall Some::Module (or install Some::Module, etc) 20:44
as it does not need to bootstrap itself
hankache nice! 20:47
20:48 tardisx joined
hankache ugexe: btw on the readme you should remove the hyphen from "rakudobrew build-zef" and replace it with a space 20:49
20:50 tardisx left 20:51 kaare_ left 20:52 ptolemarch left 20:54 cpage_ left, tardisx joined 20:55 pmurias_ joined 20:56 tardisx left 20:57 neuron joined
neuron Hi 20:57
where do I find sources of nqp::nativecallglobal?
20:58 hankache left
neuron nativecall seems to be failing on windows for C++ library, I would like to find out more about why 20:58
20:58 tardisx joined, pmurias left 20:59 skids left 21:00 tardisx left, jjido_ joined
ufobat is there a FINALLY for try { CATCH .... }? 21:00
jnthn neuron: Maybe look somewhere around github.com/MoarVM/MoarVM/blob/2117...all.c#L589
timotimo probably LEAVE
jnthn ufobat: LEAVE 21:01
ufobat thanks!
21:01 jjido left
neuron jnthn: thanks, finally I know where moarvm sources are :) 21:01
21:01 tardisx joined
ufobat it is not documented, is it? doc.perl6.org/language/exceptions 21:02
jnthn neuron: If it's a problem with the name mangling though, that's implemented in Perl 6 21:03
21:03 tardisx left
jnthn neuron: For example github.com/rakudo/rakudo/blob/nom/...r/MSVC.pm6 21:03
neuron jnthn: I don't think it's a problem with C++ mangler, the cglobal function is called with the correct mangled form IMO
jnthn Ah, OK 21:04
21:04 tardisx joined
neuron At least it corresponds to what I can see in the dll 21:04
dogbert2 ufobat: doc.perl6.org/language/phasers#LEAVE 21:05
neuron Yet, the cglobal function fails, and I get the error: Don't know how to mangle symbol 'QString::number' for library 'Qt5Core.dll' in sub guess-name-mangler at C:\rakudo\share\perl6\sources\075EFE4B4CDAAF73190 194EA876F81A1F128D1A2 line 206
21:06 tardisx left, wamba left
ufobat dogbert2, ahh cool! :-) i would have never ever found this 21:07
21:09 tardisx joined 21:10 tardisx left 21:11 tardisx joined 21:12 brrt left 21:13 tardisx left 21:14 tardisx joined 21:15 tardisx left 21:19 tardisx joined 21:21 tardisx left 21:22 tardisx joined 21:24 tardisx left, tardisx joined 21:26 tardisx left 21:28 tardisx joined 21:29 tardisx left
ZoffixWin MadcapJake, would be sweet if HTML::MyHTML used camel case :( 21:30
21:31 tardisx joined 21:32 ufobat left
ZoffixWin MadcapJake, err.. kebab-case ~_~ 21:32
21:33 tardisx left
MadcapJake ZoffixWin: in what regard? 21:33
neuron jnthn: Ah, most probably I'm trying to load 32bit lib. Maybe dlerror() could return also textual representation of the problem. 21:34
ZoffixWin For sub names. I mean it seems cannonical Perl 6 casing, but if I use that module, I have to mix kebab-case everywhere with underscore_name functions
MadcapJake ahh that's the native stuff, I just figured I'd leave the native functions alone. A sugary wrapping is on its way! 21:35
neuron But since guess-name-mangler tries all known mangling schema, it's difficult to know which error message is relevant ...
MadcapJake with kebab-case
ZoffixWin Alright then :) 21:36
MadcapJake off to a social event with mere mortals &
ZoffixWin :o
timotimo cya
21:36 TEttinger joined 21:37 jjido_ left, tardisx joined 21:38 tardisx left 21:40 tardisx joined 21:42 tardisx left 21:44 tardisx joined 21:45 cpage_ joined 21:49 autarch joined 21:51 tardisx left, tardisx joined 21:53 tardisx left 21:59 tardisx joined 22:00 ZoffixWin_ joined, ZoffixWin_ left, ZoffixWin_ joined, ZoffixWin left, ZoffixWin_ is now known as ZoffixWin 22:01 tardisx left 22:02 tardisx joined 22:04 tardisx left 22:05 tardisx joined 22:07 tardisx left 22:08 tardisx joined 22:09 tardisx left 22:11 tardisx joined 22:12 RabidGravy left 22:13 trnh joined, tardisx left 22:14 rindolf left 22:15 kid51 joined, tardisx joined, trnh left
timotimo in a pleasing turn of events, afl-fuzz started finding new unique crashes again for the "only --dump a bytecode file" case 22:16
22:16 tardisx left 22:17 tardisx joined 22:19 tardisx left 22:21 tardisx joined
ZoffixWin /mode #perl6 +b tardisx!*@*$##fix_your_connection /msg tardisx Sorry, you seem to be re-connecting often. Just message us and we'll remove the #perl6 ban 22:21
TEttinger a little bit of an interesting way to non-ban 22:22
22:22 tardisx left, skids joined 22:23 trnh joined, trnh left, trnh joined 22:24 tardisx joined, Herby_ joined
Herby_ Evening, everyone! 22:24
yoleaux 10:50Z <ZoffixWin> Herby_: (re Twitter search). It should be easy. If it's not there in by 5PM EST, remind me :)
16:14Z <ZoffixW> Herby_: All done! there's very basic .search in Twitter and full API .search-tweets in Twitter::API. Let me know if the args/output need to be tweaked, since I don't really know what the best use for these features are, I don't know the best args/output.
ZoffixWin \o
Herby_ o/ 22:25
ZoffixWin Herby_, let me know if the search needs to be changed in any way :)
Herby_ Great, I'll test it out tonight and give you some feedback
That was a fast add-on :)
22:26 tardisx left
ZoffixWin :) 22:26
22:27 patrickz left 22:29 tardisx joined
Herby_ looks like it requires a new module 'Subset::Helper'? 22:30
22:31 tardisx left
ZoffixWin Yes. 22:31
Why doesn't this explode when $res is a Failure? github.com/zoffixznet/perl6-NASA/b...er.pm6#L55 22:32
22:32 tardisx joined
ZoffixWin Right now running more code gives me this error "Attempted to ASSIGN-KEY to (HANDLED) ERROR 400: Bad Request": gist.github.com/zoffixznet/c428812...ba9cfc5a0f 22:32
s/more/my/; 22:33
skids It isn't sunk, is why.
m: my $res = Failure.new;
camelia ( no output )
skids m: my $res = Failure.new; $res; 22:34
camelia rakudo-moar 6df7ff: OUTPUT«WARNINGS for /tmp/drz2OlQhTm:␤Useless use of $res in sink context (line 1)␤»
ZoffixWin m: sub foo { fail "bar" }; my $x = foo; my $y = $x<foo><bar>; say $y
camelia rakudo-moar 6df7ff: OUTPUT«bar␤ in sub foo at /tmp/_rWXfXprGn line 1␤ in block <unit> at /tmp/_rWXfXprGn line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/_rWXfXprGn line 1␤␤»
skids erm
m: my $res = Failure.new; $res + 1;
camelia rakudo-moar 6df7ff: OUTPUT«WARNINGS for /tmp/PPawON7I5M:␤Useless use of "+" in expression "$res + 1" in sink context (line 1)␤Failed␤␤Actually thrown at:␤ in block <unit> at /tmp/PPawON7I5M line 1␤␤»
Herby_ ZoffixWin: is there a way to update my local Twitter module, or do I need to do 'panda install Twitter'?
skids m: my $res = Failure.new; my $a = $res + 1;
camelia rakudo-moar 6df7ff: OUTPUT«Failed␤␤Actually thrown at:␤ in block <unit> at /tmp/9rcu2LSpNr line 1␤␤»
22:34 tardisx left
skids finally succeeded at faiing yay 22:34
ZoffixWin Herby_, what do you mean your "local Twitter module"?
skids m: my $res = Failure.new; my $a = $res<foo>; 22:35
camelia ( no output )
Herby_ I think I'm having some user error... I installed the perl 6 Twitter module a few days ago
ZoffixWin skids, I don't see anything being sunk there...
Herby_ if I want to get your updated version
22:35 tardisx joined
ZoffixWin Herby_, um, try panda update; panda install Twitter 22:35
skids In that case it wasn't, it hit some other trigger.
ZoffixWin m: my $res = Failure.new; my $a = $res<foo>; say 'meow' 22:36
camelia rakudo-moar 6df7ff: OUTPUT«meow␤»
Herby_ ZoffixWin: its failing on the "Testing Twitter" stage... "TTwitter:ver<0.002001>:auth<>:api<> already installed"
22:36 khw left
Herby_ and if I try and run your example, it fails and says I need to install the Twitter module 22:36
think I hosed something up
ZoffixWin Herby_, then it should already be installed? 0.002001 is where I added the .search thing
Herby_ sorry, i mean it fails on the "Installing Twitter" stage
22:36 tardisx left 22:37 khw joined
ZoffixWin Try panda --force install Twitter 22:37
skids, is there a simple way to make it explode?
22:37 tardisx joined
Herby_ doh, I'm an idiot. was calling the script as perl 5 22:37
been a long day
ZoffixWin Other than testing for ~~ Failure
rofl
skids ZoffixWin: well, it seems that mst of the ways I used to use now generate "Useless use" warnings. 22:39
22:39 tardisx left 22:40 tardisx joined
skids m: my $res = Failure.new("foo"); $res.yoisthisafailure 22:40
camelia rakudo-moar 6df7ff: OUTPUT«foo␤␤Actually thrown at:␤ in any at gen/moar/m-Metamodel.nqp line 3055␤ in block <unit> at /tmp/mDs3sa4hCN line 1␤␤»
skids probably not the best :-)
ZoffixWin heh\ 22:41
22:41 tardisx left
skids m: my $res = Failure.new("foo"); $res.<f> # that'll work until someone optimizes .<> to just <> 22:42
camelia rakudo-moar 6df7ff: OUTPUT«foo␤␤Actually thrown at:␤ in block <unit> at /tmp/qrcFvJiY8a line 1␤␤»
22:43 tardisx joined
ZoffixWin I cheated by calling .hash, since that's what I expect the result to be :P 22:43
skids That'll probably be futureproof. 22:44
ZoffixWin This LTA, TBH.... If I'm trying to use a Failure as a Hash, I want it to... fail... not cry that I'm doing ASSIGN-KEY or whatever
22:45 tardisx left 22:46 tardisx joined
skids Yeah I would think that should be a trigger. 22:47
ZoffixWin m: sub foo { fail "bar" }; my $x = foo; $x<bar> = 42; say 'meow'
camelia rakudo-moar 6df7ff: OUTPUT«bar␤ in sub foo at /tmp/HpqFdcoVyP line 1␤ in block <unit> at /tmp/HpqFdcoVyP line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/HpqFdcoVyP line 1␤␤»
skids m: my $res = Failure.new("foo"); $res{"f"}.perl.say; # some sort of fluent thing I guess? 22:48
camelia rakudo-moar 6df7ff: OUTPUT«Failure.new(exception => X::AdHoc.new(payload => "foo"), backtrace => Backtrace.new)␤»
22:48 tardisx left
ZoffixWin I can't seem to reproduce my original "ASSIGN-KEY" stuff in a short sample :/ 22:49
too drunk :(
Screw it 22:50
22:52 tardisx joined 22:54 firstdayonthejob left 22:58 tardisx left, tardisx joined 23:00 tardisx left 23:03 tardisx joined 23:04 neuron left 23:05 tardisx left 23:08 tardisx joined 23:09 tardisx left 23:11 wbill joined 23:13 tardisx joined 23:15 tardisx left 23:17 tardisx joined 23:19 tardisx left 23:20 kid511 joined 23:21 ajoe left, kid51 left, tardisx joined 23:23 tardisx left, tardisx joined 23:24 BenGoldberg joined 23:25 tardisx left 23:26 perlawhirl joined 23:27 tardisx joined 23:28 perlawhirl left, tardisx left 23:30 inokenty joined 23:31 tardisx joined 23:33 tardisx left 23:35 tardisx joined 23:38 lostinfog left 23:51 BenGoldberg left 23:52 BenGoldberg joined