Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-03-13

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:06 RabidGravy toodles!
00:10 Mouq joined #perl6
00:17 arcetera i still don't get this
00:17 arcetera why are variables declared with 'sub'
00:17 arcetera wait
00:17 arcetera why are variables declared with 'my'
00:18 arcetera why are they 'lists' instead of 'arrays'
00:18 arcetera why 'subroutines' rather than 'functions'
00:18 arcetera i don't understand this
00:20 ilmari Array is a subclass of List
00:20 ilmari 'sub' and 'my' come from perl5
00:25 jnthn `my` indicates belonging to the current scope, and is short - as something so common should be. Subroutine vs function - different languages have picked differnet names, but not all subroutines fit the math definition of function, so subroutine is perhaps less confusing.
00:26 jnthn (function is fair game in functional languages, of course)
00:26 jnthn And yeah, lists and arrays ain't the same, then there's also sequences.
00:29 jnthn Sleep time here...'night, #perl6
00:29 geekosaur and you forgot procedure (surviving as "proc" in some modern languages)
00:29 geekosaur :)
00:34 ilmari the perl6 docs use "routine" for subs and operators
00:34 ilmari and methods
00:35 ilmari e.g. http://doc.perl6.org/routine.html
00:39 BenGoldberg joined #perl6
00:40 perturbation joined #perl6
00:43 BenGoldberg joined #perl6
00:56 kalkin- if i have a token name { alex | david } and a token word { \w+ } how can i express, that a the token animal is any word which does not match token name
01:05 z8 joined #perl6
01:06 z8_ joined #perl6
01:14 Juerd kalkin-: token animal { <word> { $<word> !~~ /^<name>/ } }
01:15 Juerd kalkin-: The spec defines an in-regex operator !~~ for it, like "token animal { <word> !~~ [^ <name> $] }", but that is not yet implemented.
01:15 Juerd Oh, I forgot the $ anchor after <name> in the working example
01:16 kalkin- Juerd: why can i do <word> { ... } there?
01:16 Juerd Also, it needs to be <?{ ... }>. I'm sleepy.
01:16 Juerd Tested working line: token animal { <word> <?{ $<word> !~~ /^<name>$/ }> }
01:17 kalkin- thank you
01:19 Hotkeys m: my regex name { alex | david }; my regex word { \w+ }; my regex animal {<!name> <word>}; say "alex dog cat truck david canada" ~~ m:g/[<name>||<animal>||<word>]/
01:19 camelia rakudo-moar 735869: OUTPUT«(「alex」␤ name => 「alex」 「dog」␤ animal => 「dog」␤  word => 「dog」 「cat」␤ animal => 「cat」␤  word => 「cat」 「truck」␤ animal => 「truck」␤  word => 「truck」 「david」␤ name => 「david」 「canada」␤ …»
01:19 Juerd If there's something that delimits the token, you can do simply: token animal { <!before <name>> <word> }
01:20 Hotkeys you can just <!name>
01:20 Hotkeys it's equivalent
01:20 Juerd Equivalent to what? <!before <name>>?
01:20 Hotkeys yes
01:20 Juerd That's nice.
01:20 Hotkeys yap
01:21 Juerd I wish 'fail' in /{ ... }/ did what I expected: make the regex not match. Instead, it makes the entire regex return failure.
01:21 Juerd <?{ ... }> is ugly; I find { fail if ... } easier to read.
01:22 Hotkeys I'm alright with <?{ ... }>
01:22 Juerd I think it's a bug, because the spec says that <?{ $0 < 256 }> is similar to { $0 < 256 or fail }
01:23 Hotkeys I was going to mention the inline !~~ because I saw in in spec
01:23 Hotkeys but then i tried it and it isn't there yet
01:23 Juerd You still mentioned it :)
01:23 Juerd As did I
01:23 Hotkeys shh
01:25 Actualeyes joined #perl6
01:44 labster joined #perl6
01:47 kalkin- This looks beautiful: my regex animal {<!name> <word>};
01:51 kalkin- m: my regex name { alex | david }; my regex word { \w+ }; my regex animal {<-name> <word>}; say "alex dog cat truck david canada" ~~ m:g/[<name>||<animal>||<word>]/
01:51 camelia rakudo-moar 735869: OUTPUT«Method 'name' not found for invocant of class 'Cursor'␤  in regex animal at /tmp/na7AM0QuZW line 1␤  in block <unit> at /tmp/na7AM0QuZW line 1␤␤»
02:17 arcetera how exactly are you supposed to do an infinite loop in perl6
02:17 Ben_Goldberg joined #perl6
02:17 ilmari loop { ... }
02:19 ilmari arcetera: http://doc.perl6.org/syntax/loop
02:19 arcetera ah
02:19 arcetera was tryna do 'loop True {'
02:20 TimToady that'd be a 'while'
02:20 Ben_Goldberg joined #perl6
02:23 arcetera the stupidest program i've ever written http://sprunge.us/JhJY
02:26 ilmari instead of " ~ $item ~ "id you can do {$item}id
02:26 BenGoldberg joined #perl6
02:27 ilmari { } interpolates arbitrary expressions in double-quoted strings
02:36 cdg joined #perl6
02:38 BenGoldberg joined #perl6
02:50 molaf_ joined #perl6
02:57 AlexDaniel joined #perl6
02:58 AlexDaniel m: my $item = ‘squ’; say ‘You're a ’, $item, ‘id now!’;
02:58 camelia rakudo-moar 735869: OUTPUT«You're a squid now!␤»
03:00 sortiz m: role Inter { COMPOSE { say "composing" } }; class Foo does Inter { }; Foo.new; # phaser COMPOSE seems NYI.
03:00 camelia rakudo-moar 735869: ( no output )
03:03 AlexDaniel “perl6 is sufficiently different from perl5 that not knowing perl5 should not matter” – except that everything is screaming “that's how you did that in Perl 5, and that's how you do it in Perl 6”. Sometimes even without any other explanation.
03:04 AlexDaniel saying that not knowing perl 5 does not matter is a bit unfair
03:10 sortiz Indeed, to be accustomed to Perl5's eclecticism helps.
03:13 vendethiel joined #perl6
03:26 Mouq joined #perl6
03:32 Hotkeys I never used perl 5
03:40 noganex joined #perl6
03:51 [particle] joined #perl6
03:54 skids joined #perl6
04:12 wamba joined #perl6
04:29 kaare_ joined #perl6
04:40 woodruffw joined #perl6
04:41 arcetera how do i get command line args with perl6?
04:42 skids m: @*ARGS.say
04:42 camelia rakudo-moar 735869: OUTPUT«[]␤»
04:45 skids (or use the sub MAIN sugar)
04:45 arcetera apparently
04:45 arcetera given @*ARGS { works
04:46 arcetera is that how to properly(tm) do it?
04:46 arcetera i'm entirely new to perl langs as a whole
04:47 skids depends on your use case.  sub MAIN works for most stuff but has limitations, using @*ARGS is perfectly fine.
04:47 arcetera i mean
04:47 arcetera what's sub MAIN
04:47 arcetera hooooo boy
04:48 arcetera equivalent to int main() { in c?
04:48 skids Like that, but with some added ability to map the signature to commandline args.
04:48 arcetera oh
04:49 arcetera so like
04:49 arcetera sub MAIN($opt) {
04:49 arcetera would result in "opt" being the arguments
04:49 skids http://design.perl6.org/S06.html#Declaring_a_MAIN_subroutine
04:49 arcetera thanks
04:50 woodruffw joined #perl6
04:57 arcetera how do i read an environment variable
04:57 skids m: %*ENV.keys.say
04:57 camelia rakudo-moar 735869: OUTPUT«(RAKUDO_NO_DEPRECATIONS PERLBREW_VERSION PERLBREW_PERL LANG LC_CTYPE SHELL PERL5LIB SHLVL PERLBREW_PATH PWD PERLBREW_HOME HOME ME MANPATH USER PERLBREW_ROOT PERLBREW_BASHRC_VERSION _ PERLBREW_MANPATH PATH LOGNAME)␤»
04:58 arcetera as in the value of one
04:59 llfourn m: say %*ENV<SHELL>
04:59 camelia rakudo-moar 735869: OUTPUT«/bin/bash␤»
04:59 arcetera ah
05:48 jack_rabbit joined #perl6
05:52 Cabanossi joined #perl6
06:10 dalek doc: 0a5e098 | okaoka++ | doc/Type/Hash.pod:
06:10 dalek doc: Add a missing semicolon
06:10 dalek doc: review: https://github.com/perl6/doc/commit/0a5e098b9c
06:10 dalek doc: dcd7218 | azawawi++ | doc/Type/Hash.pod:
06:10 dalek doc: Merge pull request #420 from okaoka/add-semicolon
06:10 dalek doc:
06:10 dalek doc: Add a missing semicolon
06:10 dalek doc: review: https://github.com/perl6/doc/commit/dcd72181f2
06:24 CIAvash joined #perl6
06:46 Mouq joined #perl6
07:17 Mouq joined #perl6
07:39 adu joined #perl6
07:45 darutoko joined #perl6
08:03 ajb2000 joined #perl6
08:04 ajb2000 p6: say 3;
08:04 camelia rakudo-moar 735869: OUTPUT«3␤»
08:15 sjoshi joined #perl6
08:29 sjoshi joined #perl6
08:36 darutoko- joined #perl6
08:36 dj_goku_ joined #perl6
08:36 vendethiel joined #perl6
08:38 musca` joined #perl6
08:39 integral joined #perl6
08:39 integral joined #perl6
08:39 erdic joined #perl6
08:41 maybekoo2 joined #perl6
08:45 azawawi joined #perl6
08:45 azawawi hi
08:45 yoleaux 12 Mar 2016 20:28Z <arnsholt> azawawi: Is there some code I could look at for your NativeCall type mismatch? I didn't manage to reproduce it initially, so I suspect it interacts with something a bit deeper
08:46 azawawi .tell arnsholt the problem is here https://github.com/azawawi/perl6-libzip/blob/master/lib/LibZip.pm6#L12
08:46 yoleaux azawawi: I'll pass your message to arnsholt.
08:47 azawawi What's the optimal way to convert from a Blob to a CArray?
08:48 azawawi CArray[int8] to be exact
08:49 azawawi .tell arnsholt Pointer works, Pointer[zip] fails
08:49 yoleaux azawawi: I'll pass your message to arnsholt.
08:49 sortiz azawawi, See https://github.com/salortiz/NativeHelpers-Blob ;-)
08:49 azawawi sortiz: hey :)
08:50 azawawi sortiz: perfecto
08:50 * azawawi starts testing it
08:52 azawawi sortiz: https://gist.github.com/azawawi/7ab6eabf988884ef2a2a  # install failure :(
08:52 azawawi sortiz: Method 'allocate' not found for invocant of class 'Buf'
08:52 sortiz I suspect that your rakudo is old.
08:53 azawawi 2016.02
08:53 azawawi ?
08:54 firstdayonthejob joined #perl6
08:54 * azawawi runs 'rakudobrew build moar' to check
08:55 sortiz Buf.allocate is newer... Do you need support older ones? I have a fix at hand.
08:55 azawawi ofcourse :)
08:56 azawawi not all people will be running 'latest'
08:56 azawawi my policy now is to test on 'latest' and the latest stable
08:57 azawawi i also test on mac os x, windows and linux
08:58 sortiz Ok, give a minute...
09:00 azawawi sortiz: np, take your time :)
09:02 azawawi sortiz: confirmed works on latest
09:15 sortiz Testing the commit...
09:17 tmch joined #perl6
09:18 azawawi same here... im depending on NativeHelpers::Blob now :)
09:18 azawawi for $zip-archive.add-blob method
09:19 azawawi https://github.com/azawawi/perl6-libzip/blob/master/examples/02-create-zip-archive.pl6#L29
09:24 sortiz azawawi, Reading your code, if zip is a CStruct I don't know why you pass Pointer[zip] to your calls, 'zip' itself, when used as an argument in a NC is passed  by reference, ie. as a Pointer.
09:24 nowan joined #perl6
09:28 [particle]1 joined #perl6
09:28 azawawi sortiz: https://github.com/azawawi/perl6-libzip/blob/master/lib/LibZip/NativeCall.pm6#L406
09:28 azawawi struct zip *
09:28 azawawi it is generated code from App::GPTrixie btw
09:29 sortiz That can be "sub zip_open(Str, int32, int32 is rw --> zip) is native(LIB) is export { * }"
09:30 azawawi not familiar with that syntax
09:31 azawawi is that new?
09:31 [particle] joined #perl6
09:31 sortiz Nop, the '--> zip' part is equivalent to 'returns zip'.
09:32 sortiz The code generated by GPTrixie is sub-optimal :-)
09:34 sortiz NC explicitly states that when any CStruct or CPointer
09:36 sortiz is used as an argument, the call receives a pointer, not the inline struct. So Pointer[Foo] is only needed when the C API require **foo.
09:40 sortiz And, in particular, when the C struct are opaque, you can use a CPointer.
09:42 sortiz In you case, only zip_stat is really an struct (has members), the other don't need to be.
09:42 sortiz s/you/your/
09:47 azawawi i knew using gptrixie would fail in the end lol
09:47 sortiz And if 'zip' is a class, all functions that require a 'zip' as its first argument, can be (native) methods of the zip class!!
09:48 RabidGravy joined #perl6
09:48 sortiz Take a look at https://github.com/perl6/DBIish/blob/master/lib/DBDish/Pg/Native.pm6 for an example of "modern" NC usage.
09:48 RabidGravy marning
09:48 sortiz \o RabidGravy
09:52 azawawi but returns  is cool though... it makes more sense :)
09:56 sortiz I prefer the --> syntax 'cus that way all the signature is maintained inside the (  )
09:58 wamba joined #perl6
10:07 arnsholt azawawi: Cheers! But yeah, sounds like the code generated by gptrixie is wrong and you don't need the additional level of Pointer indirection
10:07 yoleaux 08:46Z <azawawi> arnsholt: the problem is here https://github.com/azawawi/perl6-libzip/blob/master/lib/LibZip.pm6#L12
10:07 yoleaux 08:49Z <azawawi> arnsholt: Pointer works, Pointer[zip] fails
10:14 RabidGravy It is fairly tricky to guess the code to be generated for something like "typedef struct Foo;"    where the Foo is only every used as Foo *
10:15 RabidGravy my brain tells me that this is better being   a  class Foo is repr('CPointer') { ... }  but sofrware would have to work quite hard to figure that yout
10:16 sortiz Indeed, that can't be automated.
10:19 sortiz A simple 'int *' can be an array already allocated or to be allocated, a pointer to a single int, etc.
10:22 abaugher joined #perl6
10:22 sjoshi joined #perl6
10:23 azawawi oh well :)
10:23 azawawi you cant automate everything yet
10:23 azawawi arnsholt: but still the bug is still there
10:24 azawawi arnsholt: Pointer[something] != Pointer[something].new(123)
10:24 arnsholt Yeah, I'm going to see if I can't squash it
10:24 arnsholt But it works fine in the cases I tried last night
10:25 sortiz Well Pointer[Foo] is a Type, not an instance!
10:25 arnsholt m: use  NativeCall; my Pointer[int32] $x = Pointer[int32].new;
10:25 camelia rakudo-moar 735869: ( no output )
10:25 azawawi arnsholt: thanks
10:25 RabidGravy It's in type constraints that it works in an inscrutable way
10:26 arnsholt So it interacts with some other stuff (module loading, possibly)
10:26 azawawi inside a class that is
10:26 arnsholt And it's easier to fix with a test case =)
10:26 RabidGravy i.e. it works for variable type constraints but not in a signature
10:27 arnsholt Ah, that might be it, yeah!
10:27 sortiz m: my Pointer[int32] $x .= new; dd $x
10:27 camelia rakudo-moar 735869: OUTPUT«5===SORRY!5===␤Type 'Pointer' is not declared␤at /tmp/5AoTVnzlb8:1␤------> 3my Pointer7⏏5[int32] $x .= new; dd $x␤Malformed my␤at /tmp/5AoTVnzlb8:1␤------> 3my7⏏5 Pointer[int32] $x .= new; dd $x␤␤»
10:27 sortiz m: use NativeCall; my Pointer[int32] $x .= new; dd $x
10:27 camelia rakudo-moar 735869: OUTPUT«NativeCall::Types::Pointer[int32] $x = NativeCall::Types::Pointer[int32].new(0)␤»
10:28 azawawi sortiz: Thanks. NativeHelpers::Blob is now installing correctly under moar-2016.02
10:28 azawawi sortiz++
10:29 * azawawi goes back to lame android development :)
10:30 azawawi http://doc.perl6.org/language/nativecall#Buffers_and_Blobs   # needs some documentation... TBD
10:30 RabidGravy ah yes, specifically it doesn't work at all well on "return constraints" which is most of the places I changed it
10:31 RabidGravy this https://github.com/jonathanstowe/Audio-Encode-LameMP3/commit/44f0c4c911845938d49bd13b7812e6a8d928d034 indicates the places where it did work once and stopped working
10:31 RabidGravy there are probably more
10:32 RabidGravy obviously the Audio stuff is rife with numeric CArrays being shovelled around
10:33 vendethiel joined #perl6
10:33 azawawi sortiz: i cant find any of the documentation on --> that you told me about in http://doc.perl6.org/language/nativecall
10:33 RabidGravy it's not nativecall specific
10:34 RabidGravy it's just a way of indicating the return type in a signatire
10:34 azawawi so where is that documentation? :)
10:34 azawawi re "NC explicitly states that when any CStruct or CPointer...", sortiz
10:35 sortiz ".. is used as an argument, the call receives a pointer, not the inline struct".
10:36 sortiz azawawi, http://doc.perl6.org/type/Signature#Constraining_Return_Types
10:37 azawawi cool
10:38 azawawi i liked "returns Something" though :)
10:38 RabidGravy on a somewhat related note, to facilitate "live" audio generation the CArray constructor would need to be an order of magnitude faster
10:40 sortiz RabidGravy, Buf can be faster, you really need CArray?
10:42 RabidGravy well I doubt it would be in practice
10:43 RabidGravy I'm not thinking converting some num32s into a Buf is going to be particularly rapid
10:46 sortiz m: my $b = Buf[num32].allocate(100);
10:46 camelia rakudo-moar 735869: ( no output )
10:46 sortiz m: my $b = Buf[num32].allocate(100000);
10:46 camelia rakudo-moar 735869: ( no output )
10:48 sortiz Why "convert"? You can have a Buf of num32s
10:53 sortiz RabidGravy, The support is incomplete and I don't know what you need, but for moving data can work.
10:54 jack_rabbit joined #perl6
10:54 spebern joined #perl6
10:58 nine Wow...I've just slept for almost 12 hours. Seems like I was really tired after GPW
11:00 sortiz RabidGravy, And exists the native numarray, same REPRs, Positional, Iterable, and mutable, fully supported.
11:00 woodruffw joined #perl6
11:09 xinming joined #perl6
11:12 pyrimidine joined #perl6
11:16 spider-mario joined #perl6
11:17 rindolf joined #perl6
11:19 [Tux] test            22.023
11:19 [Tux] test-t          13.943
11:19 [Tux] csv-parser      49.583
11:22 * nine notices - wearing his manager's hat - that the graph goes up and to the right, so everything must be fine!
11:23 sortiz :-P
11:23 brrt joined #perl6
11:24 RabidGravy sortiz, I'm a bit confused, are you saying I can use a Buf[num32] in place of a CArray[num32] for a native sub parameter?
11:26 [TuxCM] joined #perl6
11:27 RabidGravy it appears to fail at the first hurdle for me
11:27 RabidGravy m: my $f = Buf[num32].new; $f[0] = Num(pi)
11:27 camelia rakudo-moar 735869: OUTPUT«This type cannot unbox to a native integer␤  in block <unit> at /tmp/E7SU9msvwM line 1␤␤»
11:27 sortiz RabidGravy, In general, to *send* data, you can use a Buf[foo] in place of a CArray[foo].
11:28 RabidGravy well it looks all kind of broken to me
11:28 RabidGravy m: my $f = Buf[num32].new; $f[0] = 0
11:28 camelia rakudo-moar 735869: OUTPUT«MVMArray: bindpos expected num register␤  in block <unit> at /tmp/fBeE8rRkD6 line 1␤␤»
11:28 SHODAN joined #perl6
11:28 RabidGravy m: my $f = Buf[num32].new; $f[0] = Num(0)
11:28 camelia rakudo-moar 735869: OUTPUT«This type cannot unbox to a native integer␤  in block <unit> at /tmp/ugm8MZ284L line 1␤␤»
11:29 RabidGravy m: my $f = Buf[num32].new; $f[0] = num32(0)
11:29 camelia rakudo-moar 735869: OUTPUT«Cannot invoke this object␤  in block <unit> at /tmp/tw6645o_jC line 1␤␤»
11:29 sortiz If you need to manipulate the data, a numarray is supported.
11:29 RabidGravy a "numarray"?
11:29 sortiz m: m
11:29 camelia rakudo-moar 735869: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7qBcB2F0_P␤Undeclared routine:␤    m used at line 1␤␤»
11:30 sortiz m: my $a = array[num32].new; dd $a;
11:30 camelia rakudo-moar 735869: OUTPUT«array[num32] $a = array[num32].new()␤»
11:30 sortiz m: my $a = array[num64].new; dd $a;
11:30 camelia rakudo-moar 735869: OUTPUT«array[num64] $a = array[num64].new()␤»
11:31 Begi joined #perl6
11:31 RabidGravy I'm so glad all this stuff is well documented ;-p
11:33 sortiz Indeed, the main problem I see in the p6 land is the lack of documentation. :-(
11:34 RabidGravy so is "native array" able to be used in place of a CArray?
11:36 sortiz I suppose yes. Is the same REPR than Blob.
11:39 sortiz Receive VMArrays are a little trickier, 'cus you need to pre-allocate it, so need to known the size in advance.
11:40 RabidGravy er quite
11:40 RabidGravy I may be mis-representing the CArray constructor somewhat:
11:40 RabidGravy m: use NativeCall;  my @f = 0e0 xx 512; my $b = now; my $a = CArray[num32].new(@f); say now - $b; say 256/44100
11:40 camelia rakudo-moar 735869: OUTPUT«0.00222512␤0.005805␤»
11:41 RabidGravy *that* should be quick enough
11:41 sortiz I add the
11:41 sortiz @arr signature to CArrays a few days ago :-)
11:42 RabidGravy yeah, it's handy sortiz++
11:43 sortiz RabidGravy, I can not know everything, so I'm dedicating to NC ;-)
11:44 RabidGravy I was wondering however if it could be made even quicker by not being *nice* in the constructor and going straight in with the bindpos rather than invoking the whole AT-POS mechanism and the attendant dispatch, object creation and proxy dispatch
11:45 Begi Is there a way to check if a file exist, no matter the extension ?
11:45 RabidGravy "somefile".IO.e
11:46 Begi For example, "file".IO.e will detect "file", but note "file.txt"
11:47 RabidGravy er
11:47 RabidGravy well they are different files
11:48 muethos joined #perl6
11:48 RabidGravy ".".IO.dir(test => /file/)
11:49 RabidGravy or something more complicated with grep
11:49 * Woodi notices Lease pattern and MS Dispose thingies are not the same. it was just impression from skimming very tragically translated document...
11:49 muethos left #perl6
11:50 Woodi so what is state of gptrixie ? usually works ?
11:51 RabidGravy it works yes
11:51 sortiz RabidGravy, A NumTypedCArray don't use proxy dispatch, and can be pre-extended touching the "last" index.
11:51 RabidGravy it's very useful for generating the stubs for a large API, of course any expectation that it will generate a sensible Perl6 API would be a mistake
11:52 Woodi RabidGravy: thanx, need to try it
11:53 muethos joined #perl6
11:53 RabidGravy sortiz, ah I was looking at the general case not the NumTyped
11:54 sortiz RabidGravy, The general case use a slow path, yes.
11:55 muethos joined #perl6
11:56 RabidGravy but yes I do know about the "pre-extension" thing having used it in a bunch of bindings for Audio:: things in the past year
11:57 muethos joined #perl6
11:57 muethos joined #perl6
11:58 RabidGravy right now I'm just concerned with performance because I'm looking at PortAudio and have found that it is really difficult to keep the write buffer filled
12:01 RabidGravy so reading CArrays with Sndfile and sending them to a Portaudio stream is fine, however doing almost anything in straight perl in the "hot loop" results in buffer under runs
12:01 RabidGravy so e.g https://github.com/jonathanstowe/Audio-PortAudio/blob/master/examples/play-wav#L56 works fine
12:02 RabidGravy whereas at: https://github.com/jonathanstowe/Audio-PortAudio/blob/master/examples/play-wav#L56
12:03 RabidGravy I had to completely calculate sufficient buffer loads of data to feed the stream as doing even a CArray.new in the loop wasn't working
12:05 sortiz The optimization work in Rakudo is going well.
12:06 sortiz need to go  o/
12:07 muethos joined #perl6
12:08 muethos joined #perl6
12:08 muethos left #perl6
12:16 CIAvash joined #perl6
12:20 [Tux] joined #perl6
12:21 pRiVi joined #perl6
12:26 kid51 joined #perl6
12:30 jnthn .tell RabidGravy if you have chance to turn the thing that's too slow for you into a small benchmark, and even better add it to perl6-bench, that'd be useful
12:30 yoleaux jnthn: I'll pass your message to RabidGravy.
12:30 RabidGravy joined #perl6
12:32 RabidGravy how odd, the display manager completely locked up
12:32 yoleaux 12:30Z <jnthn> RabidGravy: if you have chance to turn the thing that's too slow for you into a small benchmark, and even better add it to perl6-bench, that'd be useful
12:36 RabidGravy jnthn, it's tricky as it seems to be some combination of  method dispatch and the CArray constructor eats up the cycles I have available to fill the buffer
12:37 Skarsnik joined #perl6
12:38 RabidGravy i.e.  it needs to do everything in around 5 milliseconds
12:38 [ptc] nine: good answer to the panda --offline discussion!  I started implementing what I thought was wanted and then it just got too ugly (even for me!), hence why I asked for clarification of the ticket's requirements
12:42 mr-foobar joined #perl6
12:47 Begi joined #perl6
12:48 Actualeyes joined #perl6
12:52 spebern joined #perl6
12:52 vendethiel joined #perl6
12:55 rindolf joined #perl6
12:56 Woodi RabidGravy: such problems are real Perl6 progress measurements :)  here: things shifted from "NYI or bugged" into "inter language successful cooperation" and even into very small, sub-second (10^-3 s!) interactions  ;)
12:59 maybekoo2 joined #perl6
13:02 RabidGravy jnthn, a contrived example of the entire thing
13:02 RabidGravy m: https://gist.github.com/jonathanstowe/5e430da80882c2166a52
13:02 camelia rakudo-moar 735869: OUTPUT«0.0273767␤0.01639564␤0.0153173␤0.0227954␤0.0147356␤»
13:02 Woodi do /somewhere/share/perl6/site/sources/<sources> need to be SHA1 hashes instead of human friendly (hierarchy of) file names ?
13:03 RabidGravy those numbers need to be an order of magnitude smaller for that to work as I'd like ;-)
13:03 aborazmeh joined #perl6
13:03 aborazmeh joined #perl6
13:03 Woodi gather/take is fast now ?
13:04 RabidGravy depends what you mean by "fast", that code isn't "fast enough"
13:05 nine Woodi: http://niner.name/talks/A%20look%20behind%20the%20curtains%20-%20module%20loading%20in%20Perl%206/Module%20loading%20in%20Perl%206.pdf starting at page 20
13:05 RabidGravy and I'm not sure if it is the gather, the rotor or the the CArray constructor
13:07 RabidGravy I actually don't care much about unqualified "fast" stuff just has to be quick enough to do what you need with it
13:07 Woodi nine: but I talk just about sources...
13:07 nine Woodi: that exact question _is_ answered in the talk
13:08 AlexDaniel joined #perl6
13:11 Woodi nine: half of long names content can be replaced by using subdirectories (version, autors, api) and Unicode problems can be resolved via utf8 encoding in filenames
13:12 nine Woodi: feel free to propose an implementation
13:12 Woodi nine: I would be happy with proposing one :)
13:13 nine Keep in mind that not all file systems are happy with UTF-8 encoded file names
13:14 Woodi I thinked just Unicode names in fs are problematic...
13:16 nine Whenever you store Unicode strings, you do so using some encoding. Same as you don't store the abstract idea of the picture of a ping elephant on your disk, but some .jpg or .png or .gif encoded data.
13:16 nine s/ping/pink/
13:18 arnsholt Well, it's not only Unicode. It's also managing several different modules with the same name (but different versions and/or authors) as well
13:18 arnsholt That said, I think mst++ has some ideas to make it more introspectable, but I'm not sure how far along those ideas are
13:18 Woodi arnsholt: versions and autors are not a problem, just use separate subdirectories
13:19 nine arnsholt: as Woodi correctly noted, the version/auth issue can be solved by using sub directories. However even auths can and will contain Unicode characters
13:19 arnsholt That's true. But then similarly Unicode can be handled by something like URL encoding =)
13:20 nine arnsholt: https://github.com/rakudo/rakudo/commit/37440f09e146c45d78e52809aac418a920730d01
13:20 nine Woodi: ^^^
13:20 Woodi I think windows is ok, apple is ok (I think) and with *nixes ppls you deal by note in README: pleas use modern fs :)
13:21 nine Woodi: it's not only file systems. On Linux, the expected encoding of file names is per-user (!!) and configured by the LANG environment variable
13:21 arnsholt Yup. Unix file names are blobs of bytes, sadly
13:23 Woodi nine: I think thats is: we carry too much... systems are run by admins, admins install things, admins share things for users, if users want thing from system they must accept local rules. works even if admin == user
13:25 nine Sounds like exactly what I need: more users being pissed because we cannot even find the installed modules...
13:27 Woodi nine: sources in visible for is a must, IMO
13:28 nine Woodi: so what's wrong with the commit I pointed out?
13:29 nine Do we really need more? I'm honestly interested.
13:31 Woodi nine: so now you saying this is already done ? :)
13:33 nine I had hoped that the commit message is clear on what it does
13:36 RabidGravy Woodi, my understanding is that you can make your own Compunit::Repository that does whatever you like, you could even make your own FUSE filesystem to store an unambigious representation
13:38 nine Woodi: if the commit message is unclear, please just say so. It's just that I really try hard to write good, understandable commit messages and I would like to know if it works
13:38 RabidGravy so all of this is only a problem if
13:39 RabidGravy one doesn't want to pitch and make things that suit one's own requirements
13:39 kalkin- why does perl6 -Ilib does not work with the repl? Is this really a bug or do I do something wrong?
13:40 nine kalkin-: could be a bug
13:41 RabidGravy I think it's been like that for ever, "use lib 'lib'" in there works
13:41 kalkin- RabidGravy: thanks
13:42 nine I sometimes wonder why the REPL is implemented in NQP instead of Perl6
13:44 ufobat joined #perl6
13:45 RabidGravy I think because it works as a repl for nqp as well :)
13:45 FROGGS joined #perl6
13:46 arnsholt The REPL functionality is in HLL::Compiler, which is part of the compiler construction infrastructure provided by NQP
13:46 arnsholt So more or less what RabidGravy said, yeah
13:46 RabidGravy but I actually find the whole repl thing more of a pain than a convenience, I'd rather type code in a file or in the shell
13:48 nine I haven't used the REPL myself really. Although it would get rid of the quoting issues when trying things in the shell
13:50 mr-foobar joined #perl6
13:50 ufobat is this the ideomatic way for incrementing values in a array slice or is there something better?  -> $_++ for @a[$x..$y]
13:52 vendethiel joined #perl6
13:57 FROGGS is that arrow part of the code?
13:57 FROGGS I'd probably do: @a[$x..$y]».++
14:02 cbk1090 joined #perl6
14:03 RabidGravy ooh, I just segfaulted
14:03 ufobat the arrow isnt part of it.
14:04 MrHouser joined #perl6
14:04 RabidGravy it took quite a while, let's see if I can get that in gdb
14:06 FROGGS hmm, I thought hyper postfix ops would work this way...
14:06 FROGGS m: my @a = 1 xx 20; my ($x, $y) = 2..13; @a[$x..$y]».++; say @a
14:06 camelia rakudo-moar 735869: OUTPUT«[1 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]␤»
14:07 FROGGS ohh wait, it does something
14:07 FROGGS ahh, dang
14:07 ufobat your example worked for me, though I dont know what this ».++ part is already doing, where can i read about it?
14:08 FROGGS dunno, hyper ops?
14:08 ufobat ahh actually not already
14:08 FROGGS m: my @a = 1 xx 20; my ($x, $y) = 2, 13; @a[$x..$y]».++; say @a
14:08 camelia rakudo-moar 735869: OUTPUT«[1 1 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1]␤»
14:08 FROGGS there was my typo
14:08 ufobat hyper operators, thanks :)
14:09 Begi joined #perl6
14:09 kalkin- what does the prefix @* mean? Like @*FOO? Why whout i use something like this in a Grammar instead of just @foo?
14:09 musiKk_ joined #perl6
14:10 FROGGS kalkin-: it is a dynamix variable with the * twigil
14:10 FROGGS so it is visible along the call chain
14:10 kalkin- s/whout/would/
14:11 FROGGS so basically it is a better way of doing global variables
14:11 RabidGravy also referring to an otherwise undefined $*FOO results in a Failure which can be checked rather than a compile time exception
14:11 FROGGS m: sub bar { say $*baz }; sub foo { my $*baz = 42; bar() }
14:11 camelia rakudo-moar 735869: ( no output )
14:11 FROGGS m: sub bar { say $*baz }; sub foo { my $*baz = 42; bar() }; foo()
14:11 camelia rakudo-moar 735869: OUTPUT«42␤»
14:11 FROGGS kalkin-: see?
14:11 kalkin- I think I understand.
14:12 FROGGS m: sub bar { say $*baz }; sub foo { my $*baz = 42; bar() }; foo(); bar();
14:12 camelia rakudo-moar 735869: OUTPUT«42␤Dynamic variable $*baz not found␤  in sub bar at /tmp/j54EIAWNzr line 1␤  in block <unit> at /tmp/j54EIAWNzr line 1␤␤Actually thrown at:␤  in sub bar at /tmp/j54EIAWNzr line 1␤  in block <unit> at /tmp/j54EIAWNzr line 1␤␤»
14:13 patrickz joined #perl6
14:13 RabidGravy I was just about to say that running this code in gdb wasn't resulting in a segfault and then it did, just took longer
14:15 RabidGravy Hmm "0x00007ffff7aeb4ef in MVM_args_slurpy_named ()"
14:16 vendethiel joined #perl6
14:19 RabidGravy right, let's RT that
14:20 dalek rakudo-star-daily: 9422227 | coke++ | log/ (9 files):
14:20 dalek rakudo-star-daily: today (automated commit)
14:20 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/94222277d7
14:20 cbk1090 joined #perl6
14:22 FROGGS RabidGravy: do you record the entire bt?
14:22 RabidGravy well I have a bt full from the offending thread
14:24 FROGGS please attach that
14:24 FROGGS a single line from gdb isnt that helpful
14:34 cbk1090 So I have a Grammar, however I seam to only find the first match in any line, while a second or third gets ignored. can a Perl6 Grammar do this this or do I need to use something like .grep ?
14:35 FROGGS if you do it right you can parse a bunch of lines, yes
14:35 maybekoo2 joined #perl6
14:36 moritz cbk1090: a grammar is usually meant to parse a whole string (or at least on the start of a string), but you can use subparse for example to find other matches
14:39 RabidGravy joined #perl6
14:41 RabidGravy nope still cracking along
14:43 vendethiel joined #perl6
14:51 cdg joined #perl6
14:52 cbk1090_ joined #perl6
14:52 cbk1090_ moritz, so something like my $match = Search::myGrammar.subparse($text) would find multiple occurrences of the grammar match in any given line?
14:55 lizmat joined #perl6
14:55 RabidGravy it just doesn't have to match the whole string
14:56 cbk1090_ RabidGravy, Oh ok.
14:56 RabidGravy so if you have some matching rules within the string you will get some matches
14:56 arnsholt subparse finds the first match, anywhere in the string. But the returned match object contains the start and end positions
14:56 TimToady subparse doesn't scan
14:56 arnsholt You can then find further matches by searching again, starting at the position after the end position
14:57 cbk1090_ So maybe for what I want I should use .grep
14:57 cbk1090_ arnsholt, sorry, but  how do I do that?
14:57 TimToady you still have to write your pattern to skip
14:57 TimToady if you want multiple entries per string
14:57 TimToady or use m:g
14:58 TimToady grammars never scan, you have to do something like .*? somewhere
14:58 RabidGravy ah, so I can make it segv at the next level of simplification up
14:58 TimToady well, if you use :c it might scan
14:58 cbk1090_ TimToady,  Ok think I got it. will try it out when I get home. (At work now)
14:59 cbk1090_ Thanks guys
14:59 TimToady off to go play drums at church :)  &
15:01 RabidGravy TimToady++ # drums
15:02 cbk1090_ TimToday++ # Church
15:02 RabidGravy I can lend you a drum machine, so much less effort
15:03 awwaiid harder to get a feel for the rythm though
15:05 RabidGravy Oh I dunno, I've got two devices with sequencers designed by Roger Linn, sometimes feel more human than some real drummers I've played with :)
15:07 vendethiel joined #perl6
15:15 CIAvash joined #perl6
15:18 jellyfish joined #perl6
15:20 placeboPenguin joined #perl6
15:21 RabidGravy so removing the gather it doesn't segfault either
15:21 arcetera sigh
15:21 placeboPenguin `rakudobrew build jvm` => `Makefile:376: recipe for target 'blib/Perl6/World.jar` failed and `Missing or wrong version of dependency 'gen/jvm/stage2/QRegex.nqp'` ?
15:21 arcetera i learned perl 6 now i don't have any ideas as to what to do with it
15:22 RabidGravy arcetera, https://github.com/perl6/perl6-most-wanted/blob/master/most-wanted/modules.md pick one, implement, repeat
15:23 placeboPenguin Anyone else experience this, or know how to fix it?
15:28 RabidGravy never even tried to build for jvm I'm afraid
15:29 lizmat http://brrt-to-the-future.blogspot.nl/2016/03/fosdem-and-future.html   # brrt++
15:31 SCHAAP137 joined #perl6
15:42 TEttinger joined #perl6
15:46 nowan joined #perl6
15:53 vendethiel joined #perl6
15:55 xinming joined #perl6
15:56 zakharyas joined #perl6
16:04 RabidGravy so anyway it does appear that the https://rt.perl.org/Ticket/Display.html?id=127700 is in some combination of gather/take -> rotor -> Channel.send, can't make it do the segv without all three elements
16:12 khw joined #perl6
16:16 musiKk_ joined #perl6
16:26 lizmat joined #perl6
16:33 vendethiel joined #perl6
16:37 nadim ow do I declare a hash in a hash?  my %h = <a 1 b 2>, sub_hash => < a 1 b 2>;  ?
16:37 dalek doc/pipeline-operators: 775f029 | (Brock Wilcox)++ | doc/Language/operators.pod:
16:37 dalek doc/pipeline-operators: Add documentation for pipeline operators
16:37 dalek doc/pipeline-operators:
16:37 dalek doc/pipeline-operators: I left out ==>> and <<== since they are not implemented in Rakudo.
16:37 dalek doc/pipeline-operators: review: https://github.com/perl6/doc/commit/775f029802
16:38 jnthn nadim: sub_hash => { <a 1 b 2> }
16:39 AlexDaniel nadim: by the way, did you notice my note? http://irclog.perlgeek.de/perl6/2016-03-12#i_12173860
16:39 skids joined #perl6
16:40 nadim jnthn: meh!, I said .Block, I did try that first as it comes naturally fromP5,  OK, I try again :)
16:40 nadim AlexDaniel: no, I'll look at it now :)
16:43 jnthn Oh, wait, that one may come out as a block...
16:43 jnthn m: say { <a 1 b 2> }.WHaT
16:43 camelia rakudo-moar 735869: OUTPUT«Method 'WHaT' not found for invocant of class 'Block'␤  in block <unit> at /tmp/zOWyRTdqfo line 1␤␤»
16:43 jnthn m: say { <a 1 b 2> }.WHAT
16:43 camelia rakudo-moar 735869: OUTPUT«(Block)␤»
16:43 jnthn Yeah, it needs to have a pair in there
16:44 jnthn m: say ( hash <a 1 b 2> ).WHAT
16:44 camelia rakudo-moar 735869: OUTPUT«(Hash)␤»
16:44 jnthn There's one way
16:44 jnthn m: say %(<a 1 b 2>).WHAT
16:44 camelia rakudo-moar 735869: OUTPUT«(Hash)␤»
16:44 kaare_ joined #perl6
16:44 jnthn Another :)
16:45 nadim http://imgur.com/ECG2njs, I was getting confused
16:48 nadim jnthn: and even more confusing when I post an image of two dumps one after the other ;)
16:50 jnthn RabidGravy: Thanks, will stick that through the profiler next week and see what I can figure out.
16:52 RabidGravy the segfault was quite unexpected though in my attempt to decouple the generation and consumption with a channel
16:53 nadim m: my %df2 = < a 1 b 2 c 3 d 4>, s => %(< a 1 b 2 c 3 d 4>)  ; %df2.perl.say ;
16:53 camelia rakudo-moar 735869: OUTPUT«{"a 1 b 2 c 3 d 4" => :s({:a(IntStr.new(1, "1")), :b(IntStr.new(2, "2")), :c(IntStr.new(3, "3")), :d(IntStr.new(4, "4"))})}␤»
16:53 nadim jnthn:  stillnot it it seems ^^
16:54 travis-ci joined #perl6
16:54 travis-ci Doc build passed. Brock Wilcox 'Add documentation for pipeline operators
16:54 travis-ci https://travis-ci.org/perl6/doc/builds/115690724 https://github.com/perl6/doc/commit/775f0298021f
16:54 travis-ci left #perl6
16:55 jnthn nadim: You're expecting for flattening than you're gonna get :)
16:55 jnthn m: my %df2 = flat < a 1 b 2 c 3 d 4>, s => %(< a 1 b 2 c 3 d 4>); %df2.perl.say
16:55 camelia rakudo-moar 735869: OUTPUT«Unexpected named parameter 's' passed␤  in block <unit> at /tmp/AQ_ygcswph line 1␤␤»
16:56 jnthn heh
16:56 jnthn m: my %df2 = hash < a 1 b 2 c 3 d 4>, s => %(< a 1 b 2 c 3 d 4>); %df2.perl.say
16:56 camelia rakudo-moar 735869: OUTPUT«{:a(IntStr.new(1, "1")), :b(IntStr.new(2, "2")), :c(IntStr.new(3, "3")), :d(IntStr.new(4, "4")), :s(${:a(IntStr.new(1, "1")), :b(IntStr.new(2, "2")), :c(IntStr.new(3, "3")), :d(IntStr.new(4, "4"))})}␤»
16:56 jnthn There we go
16:56 dalek doc: 775f029 | (Brock Wilcox)++ | doc/Language/operators.pod:
16:56 dalek doc: Add documentation for pipeline operators
16:56 dalek doc:
16:56 dalek doc: I left out ==>> and <<== since they are not implemented in Rakudo.
16:56 dalek doc: review: https://github.com/perl6/doc/commit/775f029802
16:56 dalek doc: 2807db5 | (Brock Wilcox)++ | doc/Language/operators.pod:
16:56 dalek doc: Merge pull request #421 from perl6/pipeline-operators
16:56 dalek doc:
16:56 dalek doc: Add documentation for pipeline operators
16:56 dalek doc: review: https://github.com/perl6/doc/commit/2807db5bea
16:57 nadim AlexDaniel: thanks for the S/// construct. I'll go change my code I prefere this one to substr.
16:58 nadim jnthn: if you don't get it from the first shot ... then I feel less dumb :)
16:59 * jnthn blames the amount of wine in the soup he made for lunch... :)
16:59 RabidGravy perfectly valid excuse
16:59 vendethiel joined #perl6
17:00 * llfourn blames the lack of wine in the soup he had today... not sure what for
17:01 timotimo llfourn: lack of creativity, obviously
17:03 llfourn ah yes that's it!
17:07 nadim I blame timotimo, because I wouldn't be doint any of this if he did not say that he found it nice.
17:08 wamba joined #perl6
17:08 FROGGS *g*
17:08 nadim "Cannot coerce to Hash with named arguments" this is going to be a long evening!
17:09 timotimo wait, i found what nice?
17:10 nadim the output of DDT
17:10 timotimo oh
17:10 timotimo yeah, well, that's because it is nice
17:11 nadim I have implemented a diff, you give it two data structures and it dsplays them side by side, I am testing it right now
17:11 timotimo it looks pleasing and it allows you to grok the basic structure of some data more easily than other methods would
17:11 ugexe what is the reason slurp positional params don't support type constraints?
17:11 timotimo ugexe: because they could be lazy, among other things
17:11 llfourn slurpy positionals can be lazy? is there a gold example of this?
17:12 llfourn golf***
17:12 nadim timotimo: it's when one gets to filtering away stuff that is not needed that it shines. I think I may need to make some blog entry, maybe you cna help timotimo
17:12 ugexe m: sub foo(*@a) { @a.map: {.say} }; foo(1,2,3,4)[0]
17:12 camelia rakudo-moar 735869: OUTPUT«1␤»
17:12 ugexe i think anyway
17:13 ugexe probably the map itself in that example :x
17:13 llfourn m: my @fib = 0,1,*+* ... *; -> *@a { }.(@fib) # will this terminate?
17:13 camelia rakudo-moar 735869: ( no output )
17:13 llfourn hmm
17:13 dalek rakudo/nom: 43e7638 | lizmat++ | src/core/List.pm:
17:13 dalek rakudo/nom: Annotate List!ensure-allocated to return Nil
17:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/43e7638943
17:13 llfourn m: my @fib = 0,1,*+* ... *; -> *@a { say @a[^5] }.(@fib) # will this terminate?
17:13 camelia rakudo-moar 735869: OUTPUT«(0 1 1 2 3)␤»
17:13 llfourn I see.
17:14 llfourn cool feature. rakudo++
17:14 llfourn but I do find myself reaching for a type on slurpies every so often
17:15 RabidGravy yeah, same here
17:16 timotimo nadim: no clue if i could help; i still haven't gotten around to making the QAST output machine-readable, for example
17:16 ugexe it'd be slick if you could somehow have multi dispatch based on the types of the slurpy themselves
17:16 timotimo where on your priority list is making an interactive html front-end for DDT?
17:16 llfourn m: my @fib = 0,1,*+* ... *; -> *@a where { all(@a) ~~ Int } { say @a[^5] }.(@fib) # is this even the right what to do it?
17:16 timotimo for/based on/compatible with/inspired by
17:16 geekosaur joined #perl6
17:16 camelia rakudo-moar 735869: OUTPUT«Memory allocation failed; could not allocate 182096 bytes␤»
17:17 llfourn I guess it was...
17:18 llfourn m: my @fib = 0,1,*+* ... *>20; -> *@a where *.all ~~ Int { say @a[^5] }.(@fib) # apparently there is .all
17:18 camelia rakudo-moar 735869: OUTPUT«Constraint type check failed for parameter '@a'␤  in block <unit> at /tmp/h2_aDHWsjq line 1␤␤»
17:18 llfourn :S
17:19 RabidGravy Anyway I think the problem I am having with reading from a jack source with portaudio is largely down to having to use the same buffer size as the jackd is using and there being no way of getting that information from portaudio :-(
17:20 llfourn m: say (0,1,*+* ... *>20).all ~~ Int # but this works
17:20 camelia rakudo-moar 735869: OUTPUT«True␤»
17:20 nadim timotimo: output it injson, or whatnot that has a parser, and I''l help with the filtering, if any is needed.
17:20 RabidGravy which completely sucks as it makes one of my prime use cases really rather difficult
17:21 ugexe .all acts different from all() ?
17:22 llfourn ugexe: does it?
17:22 llfourn m: say (0,1,*+* ... *>20).all.perl
17:22 camelia rakudo-moar 735869: OUTPUT«all(0, 1, 1, 2, 3, 5, 8, 13, 21)␤»
17:22 ugexe i thought you were pointing that out
17:23 llfourn ugexe: no I thought they were the same but I dunno why *.all ~~ Int doesn't work in the where
17:23 istarosel joined #perl6
17:24 llfourn m: -> *@a where *.all ~~ Int { say @a[^5] }.(0,1,*+* ... *>20)
17:24 camelia rakudo-moar 735869: OUTPUT«Constraint type check failed for parameter '@a'␤  in block <unit> at /tmp/FiSd1hHwo2 line 1␤␤»
17:24 ugexe m: my @fib = 0,1,*+* ... *>20; -> *@a where {.all ~~ Int} { say @a[^5] }.(@fib)
17:24 camelia rakudo-moar 735869: OUTPUT«(0 1 1 2 3)␤»
17:24 llfourn m: -> *@a { say @a.perl }.(0,1,*+* ... *>20)
17:24 camelia rakudo-moar 735869: OUTPUT«[0, 1, 1, 2, 3, 5, 8, 13, 21]␤»
17:24 ugexe using a where block seems to change it
17:25 llfourn yes. I wonder if *.all ~~ Int is innapropriate for some reason
17:25 llfourn m: my &call = *.all ~~ Int; say call([1,2,3]);
17:25 camelia rakudo-moar 735869: OUTPUT«Type check failed in assignment to &call; expected Callable but got Bool (Bool::False)␤  in block <unit> at /tmp/lbDrPWLutw line 1␤␤»
17:26 llfourn o.o
17:26 llfourn I always thought that worked
17:26 llfourn m: my &call = *.all.ACCEPTS(Int); say call([1,2,3]);
17:26 camelia rakudo-moar 735869: OUTPUT«Invocant requires an instance of type Int, but a type object was passed.  Did you forget a .new?␤  in block <unit> at /tmp/pzK2HzCzqL line 1␤␤»
17:27 llfourn eh that's the wrong way arround
17:27 llfourn m: my &call = *.all.&[~~](Int); say call([1,2,3]);
17:27 camelia rakudo-moar 735869: OUTPUT«True␤»
17:27 llfourn I guess that's the way to do it
17:29 ugexe line noise shmine noise
17:30 nadim given two objet reference, they can be the same object, have the same value, not have the same value. same object is with infix<===>, but how do I get if they have the same value?
17:30 moritz nadim: infix:<eqv>
17:31 nadim oki
17:31 nadim moritz: ay "funny sigil for that?
17:33 ugexe the class needs to implement eqv i believe
17:33 llfourn nadim: nope just eqv I think
17:34 dalek roast: 9cf4992 | FROGGS++ | S02-literals/allomorphic.t:
17:34 dalek roast: test the allomorphness of ENV
17:34 dalek roast: review: https://github.com/perl6/roast/commit/9cf4992540
17:36 ugexe m: class A { has $.a; }; say A.new(a => 5) eqv A.new(a => 5); # i'm wrong... the docs say this returns False though
17:36 camelia rakudo-moar 43e763: OUTPUT«True␤»
17:37 nadim ugexe: that sounds plosible.
17:37 nadim llfourn: scandal! ;)
17:39 FROGGS jnthn: if https://rt.perl.org/Ticket/Display.html?id=127671 also a case where utf8-c8 would help?
17:40 FROGGS is*
17:42 jnthn FROGGS: Yes but we already should be using it there...
17:42 FROGGS ohh
17:42 jnthn FROGGS: Maybe I missed a place when switching lots of things over to utf8-c8 though
17:42 FROGGS okay, try to get behind it then...
17:42 sena_kun joined #perl6
17:42 FROGGS k
17:42 FROGGS thanks :o)
17:42 hoelzro nine: regarding the REPL being implementing in NQP rather than Perl 6 - I'm working on a branch to change that
17:42 jnthn FROGGS: I'd just check the code in question for reading directories and see if I just missed changing it over :)
17:43 hoelzro (well, that's a lie - the REPL still is in NQP, but the more advanced logic will live in Perl 6 land instead)
17:44 FROGGS ha! MVM_encoding_type_utf8
17:44 FROGGS jnthn: the directory name is utf8-c8, the listing isnt
17:44 FROGGS three character fix, in case it works :o)
17:45 FROGGS ha, works! \o/
17:46 sena_kun Hi all. Returned to perl6 for a classes task. How can I "lazily" declare class? I have two classes which are depend on one another, so I need to firstly declare about "There are class A declared below", use some class A features(type at least) in class B and then declare class A. What form is the most convinient to do so?
17:47 llfourn class A {...}
17:47 moritz sena_kun: class A { ... }; class B { use A here }; class A { define it here }
17:47 moritz literal ... pre-declares a class
17:47 sena_kun llfourn++
17:47 sena_kun moritz++
17:47 moritz both classes need to be in the same file
17:47 Skarsnik does not work with different file
17:48 sena_kun Back to coding then...
17:48 dalek ecosystem: a044821 | okaoka++ | META.list:
17:48 dalek ecosystem: Add Algorithm::MinMaxHeap to ecosystem
17:48 dalek ecosystem:
17:48 dalek ecosystem: See https://github.com/okaoka/p6-Algorithm-MinMaxHeap
17:48 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/a0448210f4
17:48 dalek ecosystem: f32443a | (Zoffix Znet)++ | META.list:
17:48 dalek ecosystem: Merge pull request #169 from okaoka/add-minmaxheap
17:48 dalek ecosystem:
17:48 dalek ecosystem: Add Algorithm::MinMaxHeap to ecosystem
17:48 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/f32443a463
17:49 llfourn I often wish there *was* a way stub a class and say that some other module I load will implement it
17:49 llfourn though I understand it would be hairy to implement it
17:50 dalek nqp: 95b9baf | FROGGS++ | tools/build/MOAR_REVISION:
17:50 dalek nqp: bump moar for dir() encoding fix
17:50 dalek nqp: review: https://github.com/perl6/nqp/commit/95b9baf182
17:50 FROGGS llfourn: that should work, no?
17:50 llfourn FROGGS: I never tried it but I always assumed it didn't
17:50 FROGGS stub the class, then use the module that finalizes it
17:50 llfourn it would be amazing if it did
17:51 * llfourn goes to try it
17:51 llfourn wait no yes that will work... but what I want it is for them to do it to *eachother*
17:52 arcetera so if I had a line in a text file
17:52 arcetera that had a '+' before it
17:52 arcetera how do I store the content after the + in a variable
17:52 arcetera regexes?
17:52 dalek rakudo/nom: 374fdd5 | FROGGS++ | tools/build/NQP_REVISION:
17:52 dalek rakudo/nom: bump nqp/moar for dir() encoding fix
17:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/374fdd543f
17:52 sena_kun arcetera, just remove first character using slices?
17:52 llfourn mutual-use Foo; # then in foo mutual-use Bar
17:52 llfourn I'm not even sure I understand what I am suggesting
17:53 Hotkeys ayy
17:53 vendethiel joined #perl6
17:53 arcetera but like if I had a text file that contained
17:53 arcetera + foo
17:53 arcetera 1/12
17:53 arcetera bar
17:53 arcetera 3/5
17:53 arcetera and I wanted to get a variable with 'foo'
17:54 Hotkeys Could probably just use a regex for that
17:55 Hotkeys Not sure if you'd even need that
17:55 arcetera idk I'm new to the lang so
17:55 arcetera perl in general
17:55 sena_kun arcetera, ah, like that. Then yes, you need a regex for it. Go over every line with regex and load result in a variable on success.
17:56 arcetera as currently I have
17:56 arcetera hold on
17:56 arcetera https://p.iotek.org/e63
17:57 arcetera just a snipet
17:57 arcetera snippet*
17:57 arcetera "err" is just a subroutine that pretty prints an error
17:57 Hotkeys Why not just use warn
17:57 arcetera pretty printing(tm)
17:59 RabidGravy OoooOOOooh
18:00 skids m: my $lock = Lock.new; $lock.protect: { 42.say; X::AdHoc.new(:payload(43)).throw; 44.say }; CATCH { when X::AdHoc { $_.message.say; $_.resume } } # bug?
18:00 camelia rakudo-moar 43e763: OUTPUT«42␤43␤Trying to unwind over wrong handler␤»
18:01 RabidGravy I've got a "signal(SIGINT).tap({ ... })"   if I hit a really quick loop on a whenever it takes ages to fire the tap
18:01 Sgeo_ joined #perl6
18:02 Begi joined #perl6
18:02 RabidGravy (and yes it has to be done in a separate tap because RT #127428)
18:03 sjoshi joined #perl6
18:03 skids "loop on a whenever"?
18:04 RabidGravy well "react { whenever $channel { .... } }" where the channel is being fed at around the 10 millisec mark
18:05 RabidGravy unless you want to play at home you don't want the whole story
18:08 skids The SIGINT tap would not by chance be closing the channel?
18:09 RabidGravy no, it keeps a promise that stops the both the reader and writer
18:09 domidumont joined #perl6
18:10 skids Oh, was wondering if you were running into RT#123461
18:10 RabidGravy but it doesn't get to the tap at all for some seconds
18:10 domidumont joined #perl6
18:11 RabidGravy on the face of it that would seem un-related
18:14 kalkin-_ joined #perl6
18:15 RabidGravy if I halve the rate at which I'm sending to the channel it works better
18:15 vendethiel joined #perl6
18:15 domidumont joined #perl6
18:15 cognominal joined #perl6
18:15 * skids woders what $*SCHEDULER's queuing algorithm looks like.
18:16 skids Maye I will make that my "light reading" for the night heheh.
18:17 RabidGravy :-O
18:19 ufobat joined #perl6
18:20 ufobat if you have a array like in that example, how to handle it propperly that there are undefined values somewhere across it: my Int @i; @i[10] = 1; say @i.grep({$_==1}, :k)
18:22 skids m: my Int @i; @i[10] = 1; @i.perl.say
18:22 camelia rakudo-moar 374fdd: OUTPUT«Array[Int].new(Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, 1)␤»
18:23 skids Undefined values default to the type's default value.
18:23 skids m: my int @i; @i[10] = 1; @i.perl.say
18:23 camelia rakudo-moar 374fdd: OUTPUT«array[int].new(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)␤»
18:23 ufobat right
18:23 ufobat but the grep throws a warning: Invocant requires an instance of type Int, but a type object was passed.  Did you forget a .new?
18:24 skids Ah.  Because ==.
18:24 skids m: say Int == 1
18:24 camelia rakudo-moar 374fdd: OUTPUT«Invocant requires an instance of type Int, but a type object was passed.  Did you forget a .new?␤  in block <unit> at /tmp/1lOAo4Ross line 1␤␤»
18:24 RabidGravy well then you;d go with something  .grep( { $_.defined && $_ == 1 })
18:25 skids m: say Int eqv 1
18:25 camelia rakudo-moar 374fdd: OUTPUT«False␤»
18:25 RabidGravy or eqv
18:26 ufobat what is the differnece between Int and int then?
18:26 skids int is a native
18:26 ufobat because my int @i seems to result in easy readable code
18:27 bazzaar joined #perl6
18:27 RabidGravy you probably don't want to use "int" unless you properly understand the implications
18:27 timotimo m: my Int @i; @i[10] = 1; @i.grep(1, :k).perl.say
18:27 camelia rakudo-moar 374fdd: OUTPUT«Invocant requires an instance of type Int, but a type object was passed.  Did you forget a .new?␤  in block <unit> at /tmp/xgnoE2wbS5 line 1␤␤»
18:27 bazzaar \o
18:27 RabidGravy or "str", "num" or any of thos
18:27 timotimo i wonder what it's good for to throw the warning even in an ACCEPTS like that
18:30 FROGGS timotimo: that might be something for you :o)  - https://rt.perl.org/Ticket/Display.html?id=127395
18:30 timotimo right
18:31 timotimo we'd have to be a bit careful here, because objects are free to do whatever they want when they are asked for existence of methods or lists of methods
18:31 timotimo if we notice the HOW is just the regular ClassHOW without special changes applied, we could probably probe it for a list of methods, though
18:33 timotimo so, can we get our makefiles up to speed with accidentally supplied -j options?
18:33 timotimo that would have made arcetera's life so much easier
18:34 moritz iirc it's only star that doesn't support -j
18:34 moritz rakudo and nqp should be fine
18:34 timotimo oh
18:34 moritz I use them regularly
18:34 timotimo do we know what exactly in star makes things blow up?
18:34 moritz not exactly
18:35 timotimo i myself have nearly no clue about proper makefil hygiene
18:35 moritz I have a suspicion that module installation doesn't wait for the compiler, or something
18:35 timotimo isn't there some flag to make to output the dependency as a tree that graphviz can render or something?
18:35 timotimo clearly, we're not the first project in the world to have trouble with -j doing naughty things, so there must be some tooling out there?
18:37 bazzaar Hi, I'm seeing a different results between  ......  say "$/[0]--$/[1]" and  ..... say "$0--$1" for the same regex captures, .... wondering if it's a bug
18:38 moritz might be related to the interpolation rules
18:38 moritz which state that if an expression inside a double-qutoed string starts with a sigil and ends with a postcircumfix, it's actually evaluted
18:39 moritz which allows you interpolate things like @array.end() into a string
18:40 timotimo moritz: you mean it would interpret the - as code? i don't think so, though
18:41 timotimo but the -- does confuse the parser, it seems like
18:41 moritz m: '5x3' ~~ /(.)x(.)/ and say "$/[0]--$/[1]"
18:41 camelia rakudo-moar 374fdd: OUTPUT«5x3[0]--3␤»
18:41 timotimo the AST it outputs is just concatenating the value of $/ with "[0]--" and then the value of $/[1]
18:42 moritz yes, that looks like a bug
18:42 timotimo i'd say this is a bug. it should see that the [0] is a successful postcircumfix parse, and ignore the -- after it
18:43 timotimo bazzaar: so, thank you for finding this bug :)
18:43 bazzaar yes that's the kind of result I got, $0--$1 works fine
18:43 timotimo who wants to rakudobug@ it? i'll be AFK for a little bit
18:43 moritz Illdo
18:44 bazzaar moritz++, timotimo++
18:45 moritz m: '5x3' ~~ /(.)x(.)/ and say "$/[0]--"
18:45 camelia rakudo-moar 374fdd: OUTPUT«5x3[0]--␤»
18:45 moritz m: '5x3' ~~ /(.)x(.)/ and say "$/[0]-"
18:45 camelia rakudo-moar 374fdd: OUTPUT«5-␤»
18:47 RabidGravy what larks
18:49 moritz timotimo: it seems that module-install-{m,j} does not declare a dependency on the installed rakudo
18:50 moritz timotimo: testing a partial fix now
18:51 arc__ joined #perl6
18:51 arcetera joined #perl6
18:52 prammer joined #perl6
18:55 moritz I guess it needs to depend on rakudo-install even
18:57 shlomif joined #perl6
18:59 dalek rakudo/nom: b6f3ecd | lizmat++ | src/core/List.pm:
18:59 dalek rakudo/nom: Make List.join about 20% faster
18:59 dalek rakudo/nom:
18:59 dalek rakudo/nom: - presize memory and bind string values rather than pushing
18:59 dalek rakudo/nom: - tighten str copy loop
18:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b6f3ecd6d7
19:05 dbohdan joined #perl6
19:08 themonkeybob11 joined #perl6
19:16 FROGGS huh, t/spec/S10-packages/precompilation.rakudo.moar fails now
19:16 RabidGravy oook, I may *almost* have input from a jack source working properly
19:17 FROGGS RabidGravy: you are talking about line-in?
19:18 RabidGravy no, that worked fine already, I'm talking about (in this case) input from another program that is outputting audio via the "jack audio connection kit"
19:18 lizmat FROGGS: you mean, after my commit ?
19:19 FROGGS ahh, didnt know that such a thing existed
19:19 RabidGravy it could equally be a sound card or something else
19:19 FROGGS lizmat: no, before
19:19 lizmat ah, fwiw, I didn't see any spectest issues before or after
19:19 FROGGS lizmat: I reverted my local changes now... perhaps these are to blame
19:20 bazzaar left #perl6
19:22 FROGGS no, I still get:
19:22 FROGGS Missing serialize REPR function for REPR NativeRef
19:22 FROGGS in block <unit> at t/spec/S10-packages/precompilation.rakudo.moar line 185
19:22 sftp joined #perl6
19:23 RabidGravy FROGGS, what I found was that it was using a version literal in   "class Foo:ver<v0.1> { }" that was causing it
19:27 FROGGS $ perl6 -It/spec/packages -e '$*REPO.need(CompUnit::DependencySpecification.new(:short-name<RT125090>))'
19:27 FROGGS ===SORRY!===
19:27 FROGGS Missing serialize REPR function for REPR NativeRef
19:28 FROGGS and that RT125090.pm only consists of:
19:28 FROGGS use v6;
19:28 FROGGS BEGIN $*KERNEL;
19:28 FROGGS BEGIN $*DISTRO;
19:28 FROGGS and the last line causes it
19:28 lizmat I guess the problem goes away of you don't use the BEGIN right ?
19:28 tmch joined #perl6
19:28 FROGGS lizmat: yes
19:29 RabidGravy ah, the $*DiSTRO versionifies the OS version
19:29 bazzaar joined #perl6
19:29 bazzaar \o
19:30 timotimo i can have a look at the serialization code to see if we have any kind of context we could output along with the error
19:30 lizmat FROGGS: could you try losing the "once" in Version to see if that fixes it ?
19:31 lizmat alternately, making the int -> Int, and str -> Str ?
19:31 lizmat in the Version attributes
19:32 * FROGGS tries
19:32 timotimo oh
19:32 timotimo looks like objects are just pushed onto a "todo" list and when an object that landed in that list is then serialized, the exception flies
19:34 sftp joined #perl6
19:34 FROGGS lizmat: its not the onces
19:35 lizmat could be both
19:35 bazzaar moritz: rakudobug#127701, parsing bug, not limited to '--' after postfix, '++' exhibits same behaviour.
19:35 FROGGS lizmat: yes, I changed the attrs now additionally
19:35 timotimo bazzaar: are you interested in fuzzing what kinds of text cause the problem?
19:35 FROGGS though what I really wanna do is improve that bloody message: Missing serialize REPR function for REPR NativeRef
19:36 timotimo lizmat++ # joining strings made faster
19:36 FROGGS lists*
19:36 Hotkeys m: my &f = { say @_ }; my &g = { say $_ }; say f(zip 0..4, 5..9); say g(zip 0..4, 5..9)
19:36 camelia rakudo-moar b6f3ec: OUTPUT«[0 5 1 6 2 7 3 8 4 9]␤True␤((0 5) (1 6) (2 7) (3 8) (4 9))␤True␤»
19:36 Hotkeys why does this happen?
19:37 FROGGS lizmat: no, it is also not about the attrs
19:37 FROGGS Hotkeys: what do you mean?
19:37 lizmat ok, dann bin ich überfragt
19:37 Hotkeys why does the first one flatten
19:37 Hotkeys I'd think it would be a positional of pairs
19:37 Hotkeys like the second
19:38 Hotkeys do Seqs flatten when put in an array var?
19:38 FROGGS assignment to array does perhaps
19:38 FROGGS m: my $a = zip 0..4, 5..9; say $a
19:38 camelia rakudo-moar b6f3ec: OUTPUT«((0 5) (1 6) (2 7) (3 8) (4 9))␤»
19:38 FROGGS m: my @a = zip 0..4, 5..9; say @a
19:38 camelia rakudo-moar b6f3ec: OUTPUT«[(0 5) (1 6) (2 7) (3 8) (4 9)]␤»
19:38 FROGGS hmmm
19:38 Hotkeys spooky
19:39 FROGGS m: my &f = { say @_ }; my &g = { say $_ }; say &f.signature; say &g.signature
19:39 camelia rakudo-moar b6f3ec: OUTPUT«(*@_)␤(;; $_? is raw)␤»
19:39 FROGGS that's the difference
19:39 Hotkeys m: sub f (@foo) { say @foo }; f(zip 0..4, 5..9)
19:39 camelia rakudo-moar b6f3ec: OUTPUT«((0 5) (1 6) (2 7) (3 8) (4 9))␤»
19:39 bazzaar timotimo: yes, would be happy to help in my limited way
19:39 Hotkeys ah
19:39 Hotkeys strange
19:39 FROGGS yes, but intended
19:39 Hotkeys I didn't realize it would slurpy
19:40 Hotkeys so I should explicitly name the var then
19:40 timotimo bazzaar: like, is it only symbols like + and -, or is it also letters that can cause this? what about other unicode characters?
19:40 FROGGS m: my &f = { say @^a }; say &f.signature
19:40 camelia rakudo-moar b6f3ec: OUTPUT«(@a)␤»
19:41 Hotkeys right
19:41 FROGGS m: my &f = { say @^a }; my &g = { say $_ }; say f(zip 0..4, 5..9); say g(zip 0..4, 5..9)
19:41 camelia rakudo-moar b6f3ec: OUTPUT«((0 5) (1 6) (2 7) (3 8) (4 9))␤True␤((0 5) (1 6) (2 7) (3 8) (4 9))␤True␤»
19:41 FROGGS or use a placeholder...
19:41 FROGGS dunno
19:41 FROGGS maybe a proper signature states better what you are after
19:41 RabidGravy well that was interesting I just had an unexpected coughing fit with a mouthful of blackcurrant juice
19:41 bazzaar timotimo: I already checked '**', '****', '//' ... they all seem ok
19:41 RabidGravy the computer needed a clean anyway
19:43 FROGGS *g*
19:43 bazzaar timotimo: also '-+-' works fine too
19:44 timotimo bazzaar: so maybe it's only valid postfix operators that will cause a misparse?
19:45 RabidGravy right let's take this test to the next level
19:45 timotimo m: say CORE::.keys.grep(*.name ~~ /post/).map(*.name).say
19:45 camelia rakudo-moar b6f3ec: OUTPUT«WhateverCode object coerced to string (please use .gist or .perl to do that)  in block <unit> at /tmp/6PE7tTH1Mi line 1␤()␤True␤»
19:45 timotimo oops
19:45 timotimo m: say CORE::.keys.grep({$_.name ~~ /post/)).map(*.name).say
19:45 camelia rakudo-moar b6f3ec: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oLv5kzqZLO␤Missing block␤at /tmp/oLv5kzqZLO:1␤------> 3say CORE::.keys.grep({$_.name ~~ /post/7⏏5)).map(*.name).say␤    expecting any of:␤        statement end␤        statement modifier␤   …»
19:45 timotimo m: say CORE::.keys.grep({$_.name ~~ /post/}).map(*.name).say
19:45 camelia rakudo-moar b6f3ec: OUTPUT«Method 'name' not found for invocant of class 'Str'␤  in block <unit> at /tmp/SvUqPCrdAQ line 1␤␤»
19:46 timotimo m: say CORE::.keys.grep(/post/)
19:46 camelia rakudo-moar b6f3ec: OUTPUT«(&postcircumfix:<{ }> &postfix:<i> &postcircumfix:<[ ]> &postfix:<--> &postcircumfix:<[; ]> &postfix:<ⁿ> &postcircumfix:<{; }> &postfix:<++>)␤»
19:46 timotimo huh, that's really not a lot
19:46 timotimo how about defining a new postfix operator; does that change the behavior?
19:47 timotimo m: sub postfix:<foo>($a){}; say "$[0]foo$[1]"
19:47 camelia rakudo-moar b6f3ec: OUTPUT«0foo1␤»
19:47 timotimo m: sub postfix:<foo>($a){}; say "$/[0]foo$/[1]"
19:47 camelia rakudo-moar b6f3ec: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/owf8xK7heV line 1␤Use of Nil in string context  in block <unit> at /tmp/owf8xK7heV line 1␤[0]foo␤»
19:47 timotimo m: say "$/[0]foo$/[1]"
19:47 camelia rakudo-moar b6f3ec: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/8EP00ZoVAq line 1␤Use of Nil in string context  in block <unit> at /tmp/8EP00ZoVAq line 1␤foo␤»
19:47 timotimo in one it's [0]foo, in the other it's just foo
19:47 timotimo so the presence of a postfix operator impacts this
19:47 timotimo we probably do not want this
19:48 7YUAAJF1A joined #perl6
19:53 FROGGS aha!
19:53 FROGGS $ perl6 --target=ast --output=/dev/null t/spec/packages/RT125090.pm
19:53 FROGGS ===SORRY!===
19:53 FROGGS cannot stringify this
19:53 yqt joined #perl6
19:54 renormalist joined #perl6
19:54 timotimo uh oh, something improper is landing in the ast?
19:54 FROGGS seems like
19:55 brrt joined #perl6
19:55 FROGGS but I can run it
19:55 FROGGS ahh no
19:56 FROGGS --output makes no sense there and throws that message
19:56 bazzaar timotimo: seems to just be the autoincrement postfix operators '++' and '--' where the problem occurs [I think?]
19:59 bazzaar timotimo: aaah, but I now see you have identified another way of creating the issue ...
20:00 dalek star: 41981e7 | moritz++ | tools/build/Makefile.in:
20:00 dalek star: Attempt to fix Makefile when installed with -j4
20:00 dalek star: review: https://github.com/rakudo/star/commit/41981e7bbb
20:02 timotimo FROGGS: in general, our argument parsing can cause problems. i've gotten a cryptic error from using more than one --optimize flag by accident
20:02 timotimo i *think* it was also a "cannot stringify this"
20:03 timotimo when trying to compare the option set for "optimize" against "off" with eq
20:03 FROGGS because it got an MVMArray probably
20:04 renormalist joined #perl6
20:04 FROGGS I'm bisecting my problem now
20:04 jnthn bazzaar, timotimo: We check "is this an OK postcircumfix to interpolate" by looking if we end the sequence of them with a closing bracket of some kind: https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Grammar.nqp#L3751 is in Rakudo's grammar, but the standard grammar also would seem to come out with the same, see https://github.com/perl6/std/blob/master/STD.pm6#L2107
20:05 timotimo jnthn: thing is, the only place we do backtracking in our grammar is exactly this place
20:05 jnthn timotimo: True, though it's not really connected to that :)
20:05 timotimo oh? dunno
20:06 timotimo i haven't actually looked at the code itself
20:06 * timotimo is currently headachy
20:06 jnthn :)
20:06 jnthn Yeah, just throwing out the appropriate bit in the grammar for if somebody does want to experiment a bit. :)
20:07 jnthn It's porbably something we can improve on, but for now I suggest to work around it with just using curlies around the bit that should be interpolated
20:07 timotimo of course that works
20:08 jnthn Maybe moving the lookbehind inside the quantified thingy would help
20:10 Begi In this page, the link to Module::Skeleton is dead : http://doc.perl6.org/language/modules-extra
20:10 Begi and I haven't found any "Module::Skeleton" module
20:11 timotimo https://github.com/perl6/ecosystem/pull/130
20:11 brrt jnthn: https://gist.github.com/bdw/a2851e0697cd38388478
20:11 brrt is your list :-)
20:12 brrt brane has found no way to 'fix' it yet, beyond the pragmatic approach outlined earlier
20:13 FROGGS timotimo: umm, he has moved his stuff to bitbucket
20:13 timotimo oh, is that what happened!
20:13 FROGGS Begi: so it is here now: https://bitbucket.org/rightfold/module-skeleton
20:13 Begi timotimo : the module doesn't exist anymore
20:13 Begi Ah, thanks !
20:14 jnthn brrt: Hm, thanks :)
20:14 geekosaur rightfold distrusts github, iirc
20:14 brrt well, i don't expect a fix, because it isn't broken per se... it's just suboptimal
20:14 brrt and inelegant and difficult-to-maintain because it subtly depends on ordering
20:14 brrt in implicit ways
20:14 jnthn *nod*
20:15 jnthn Yeah, it's easy in a lego JIT :)
20:16 brrt yeah :-)
20:16 jnthn brrt: How nasty is it to walk the stack to find the pushed stack base pointer on a call? ;)
20:17 brrt not very nasty from the perspective of an assembly programmer
20:17 brrt it's literally the top of the stack on function entry
20:17 brrt but that's not the most common use, though
20:18 jnthn Oh?
20:18 brrt well, in most cases...
20:18 brrt ehm
20:18 brrt letme think about that for a bit
20:18 jnthn I thought in most cases we're in a C function when we need to know what the JIT code's PC is?
20:18 jnthn Well, in all cases
20:18 brrt yep
20:18 abaugher joined #perl6
20:19 dalek ecosystem: 7da2d92 | RabidGravy++ | META.list:
20:19 dalek ecosystem: Let's fix that last entry
20:19 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/7da2d92e7d
20:19 sftp joined #perl6
20:19 brrt but, due to trampolining, in most cases the c function will not be stack-downward from the jit code
20:19 jnthn So if we're currently running that bit of JITted code wehn we call that C function then the JIT code is on the system stack, and if it's not the current one then we will have saved the label so we can re-enter it at the right point?
20:20 brrt yes
20:20 brrt correct
20:20 brrt which is why it is so puzzling why that wasn't enough
20:20 FROGGS lizmat: I bisected it to 02122e5e67d0c9738c81b5986394681b96982b1d
20:20 FROGGS trying to get any clues out of that now
20:20 jnthn brrt: Maybe 'cus today we only do the second part of it?
20:21 brrt hmm
20:21 brrt decent enough point
20:21 cognominal Hi. I am looking at nqp-js and I see a lot of node stuff so the following question. Does nqp-js generated code can run in a browser, that is without node?
20:22 RabidGravy goes to show how many people use my modules
20:22 brrt basically, if we could limit saving the pc to those routines were we needed to, then we could skip the dynamic-comtrol-label insertion
20:22 jnthn iiuc, we end up updating jit_entry_label in a bunch more places than invokish things for the times when it's the currently executing bit of JIT code
20:22 jnthn And we need to know our position accurately
20:22 RabidGravy the META.list entry for Audio::Encode::LameMP3 was broken for two weeks and no-one noticed :-\
20:23 brrt uhuh... one of the difficulties, i think, is adhoc throwing, which may happen anywhere
20:23 lizmat cognominal: I think the answer to your question is: no
20:23 brrt so you need to know your exact position in a lot more cases than you'd expect
20:23 jnthn brrt: Yeah, which is why I was wondering if we can find the pushed stack pointer :)
20:23 bazzaar jnthn: thanks for providing the links to the relevant code lines in the rakudo/std grammars,  ... helpful for a newbie like what I am :)
20:23 jnthn brrt: 'cus part of the C calling conventions involve saving that, iirc?
20:23 brrt yes
20:24 brrt all call conventions do
20:24 jnthn Right, so the address we want *is* available, if only we can find the darn thing :)
20:24 brrt lemmesee if i can hack up an example
20:25 * jnthn wonders if we're scaring the inhabitants of #perl6 with assembly fun on purpose rather than discussing it on #moarvm :P
20:25 RabidGravy doesn't scare me, if you don't mind me rambling on about some audio stuff later ;-)
20:25 dalek doc: 9538b1e | Emeric54++ | doc/Language/modules-extra.pod:
20:25 dalek doc: new link
20:25 dalek doc: review: https://github.com/perl6/doc/commit/9538b1e044
20:25 dalek doc: 4db9cef | FROGGS++ | doc/Language/modules-extra.pod:
20:25 dalek doc: Merge pull request #422 from Emeric54/patch-1
20:25 dalek doc:
20:25 dalek doc: Replace a dead link
20:25 dalek doc: review: https://github.com/perl6/doc/commit/4db9cef78d
20:26 cognominal thx lizmat++. Too bad. Perl 6, even in a restricted form, need to run on a browser to get acceptance.
20:26 jnthn brrt: Going for a short walk; bbi10 :)
20:27 RabidGravy oh, and if anyone is bored I found another case where code members in a CStruct would be used
20:27 brrt ok, i'll have it hacked up then :-)
20:27 lizmat cognominal: but what is the problem of the node.js dependency in the browser then ?
20:28 cognominal nodejs is a server side things
20:28 musiKk_ joined #perl6
20:28 RabidGravy but it uses the same JS engine as e.g. Chrome right?
20:28 timotimo cognominal: nqp-js is supposed to run in a browser, too
20:29 lizmat cognominal: it is ???  it's been a while since I did JS, but I distinctly remember using Node.js in the browser
20:29 timotimo just needs a bit of work before it does
20:29 timotimo lizmat: you can doctor code that's meant for nodejs to run in the browser, but a big amount of stuff is unavailable to you in the browser that node.js code normally relies upon
20:29 cognominal lizmat, good to know. Apparently I have been out of touch
20:30 lizmat need to commute for a bit&
20:31 rindolf joined #perl6
20:31 FROGGS RabidGravy: do tell
20:32 cognominal ok, I thougt node and  node.js were the same thing. So node.js indeed is node on the browser while node is the original thing server side only.
20:32 timotimo uh, wait, what?
20:32 RabidGravy the LADSPA (and indeed LV2) plugin framework hands you a struct with the pointers to the functions in the plugin to start/stop/send data/read data
20:32 timotimo since when ?!?!
20:33 cognominal did I got the things right?
20:33 timotimo where did you find that node.js?
20:33 timotimo because i've never heard of node.js boing something different from node
20:34 RabidGravy there may however be a library to allow the node code to run unaltered on the browser with some shim or polyfill or whatever they call it now
20:35 RabidGravy it would have to fake up some of the IO stuff
20:35 cognominal ok, then. We are back to my original question. if node[.js]? is serverside, how can nqp-js runtime can run in a browser?
20:36 dalek doc/feed-operators: c06a01e | (Brock Wilcox)++ | doc/Language/operators.pod:
20:36 dalek doc/feed-operators: Pipeline is something I hallucinated -- should be feed
20:36 dalek doc/feed-operators: review: https://github.com/perl6/doc/commit/c06a01e5d5
20:36 cognominal RabidGravy, that would be that browserify thing?
20:37 RabidGravy node.js is only a javascript rumtime that replaces the browser specific stuff with some server specific stuff that it can do
20:37 cognominal but browserify seem just a hack for requireing modules
20:37 RabidGravy the language is the same
20:38 RabidGravy yeah a good body of javascript code will run in the browser or in node
20:39 RabidGravy I've got a test harness somewhere here that tests a node server by pretending to be a browser in another node script
20:39 cognominal I guess IO and process relative stuff is the problem because browser is a restricted environment
20:40 RabidGravy all the basic language is identical, just node supplies some additional objects for IO and stuff
20:40 timotimo neatly packed away in modules, usually
20:41 timotimo when and where will yapc::europe 2016 happen?
20:42 RabidGravy in my front room in a couple of days?
20:42 cognominal For exemple, in vm/js/npq-runtime/io.js  I see a lot of stuff I suspect won't run in a brwoser.
20:42 timotimo i've been told where, but i've forgotten
20:42 pmurias joined #perl6
20:42 timotimo and i've also been told where gpw2017 will happen, but i also forgot
20:42 bazzaar joined #perl6
20:42 * pmurias backlogs nqp-js stuff...
20:42 RabidGravy cognominal, yeah you would have to polyfill those in the browser
20:43 RabidGravy but the way that JS works you can just supply another thing for it and as long as it has the right interface it will "work"
20:43 pmurias cognominal: to run code emitted by nqp-js I use webpack, so that require('module') works
20:43 FROGGS YAPC Europe
20:43 FROGGS August 24 - 26, 2016
20:43 FROGGS Cluj-Napoca, Romania
20:44 garu tadzik: whenever you feel like it, could you give me feedback on https://github.com/tadzik/rakudobrew/pull/84 please?
20:44 FROGGS timotimo: ^^
20:44 pmurias cognominal: some stuff will be replaced by browser running versions, other modules (for IO stuff) are replaced by placeholders that fails on use
20:44 timotimo FROGGS: i seem to recall it was supposed to be in switzerland or in austria? or was that next year's yapc::europe?
20:45 cognominal pmurias, that makes sense.
20:45 brrt .tell jnthn: it is no more than this
20:45 yoleaux brrt: What kind of a name is "jnthn:"?!
20:45 cognominal Do you have any documentation about using nqp-js runtime on the browser ?
20:45 brrt .tell jnthn https://github.com/bdw/lab/blob/master/asm/cont.s
20:45 yoleaux brrt: I'll pass your message to jnthn.
20:46 pmurias there is an example in examples/webpacked
20:46 cognominal pmurias++
20:46 FROGGS timotimo: dunno, not heard yet of the yapc 2017, usually it is announced when the current yapc closes
20:46 timotimo ah
20:46 timotimo hm. i wonder what i've mistaken it with/for, then
20:47 FROGGS timotimo: alpine perl workshop 2016?
20:47 FROGGS which is spw + apw
20:47 cognominal example/webpacked is probably answering most of my questions.
20:48 timotimo maybe. when's that?
20:51 lizmat joined #perl6
20:52 cognominal pmurias, indeed I see in webpack.js that many modules are resolved to the empty-module
20:53 jnthn brrt: Hm, and where'd we put that?
20:53 yoleaux 20:45Z <brrt> jnthn: https://github.com/bdw/lab/blob/master/asm/cont.s
20:53 stmuk_ timotimo: I think its early Sept but forget the exact date
20:55 labster joined #perl6
20:55 cognominal boy, that p5.js name. Yet another potential source of confusion for old timers.
20:56 bazzaar timotimo: further update re. parsing bug [#127701], the strings '---', '----', '-----', ...etc, and '+++', '++++', '+++++', ...etc, also highlight the problematic parse code
20:56 timotimo stmuk_: thanks d)
20:56 timotimo :)
20:57 cognominal p5.js  seems a d3 sort of thing.
20:58 cognominal I am ranting about that  https://github.com/perl6/nqp/blob/master/examples/webpacked/index.html#L7  :)
20:58 travis-ci joined #perl6
20:58 travis-ci Doc build passed. Brock Wilcox 'Pipeline is something I hallucinated -- should be feed'
20:58 travis-ci https://travis-ci.org/perl6/doc/builds/115723788 https://github.com/perl6/doc/commit/c06a01e5d5f0
20:58 travis-ci left #perl6
20:58 brrt we could do a pre-call-wrapper
20:59 brrt e.g. pass the function-to-call in a register (what happens currently), call the wrapper, pass the cc as an argument
20:59 brrt but that would require modifying all callee's...
20:59 cognominal probably nqp-js on the browser is more or less like a restricted Perl 6 setting
21:00 vendethiel that makes sense
21:01 lizmat FROGGS: do you have a golf for the problem you found? so I could also look at it?
21:01 * brrt is still dreaming about a module to build arbitrary process pipelines
21:01 vendethiel hah, for a moment, I thought p5js was perl 5 in the browser and felt very confused :P
21:02 cognominal vendethiel, same here
21:05 dalek doc: c06a01e | (Brock Wilcox)++ | doc/Language/operators.pod:
21:05 dalek doc: Pipeline is something I hallucinated -- should be feed
21:05 dalek doc: review: https://github.com/perl6/doc/commit/c06a01e5d5
21:05 dalek doc: 5ac95ba | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/operators.pod:
21:05 dalek doc: Merge pull request #423 from perl6/feed-operators
21:05 dalek doc:
21:05 dalek doc: “Feed” instead of “Pipeline”
21:05 dalek doc: review: https://github.com/perl6/doc/commit/5ac95bafe5
21:11 pmqs joined #perl6
21:11 FROGGS lizmat: perl6 --target=mbc --output=/dev/null t/spec/packages/RT125090.pm
21:12 lizmat FROGGS: thanks
21:13 FROGGS I still dont know what of your patch is to blame
21:13 olpery joined #perl6
21:13 olpery hey ho
21:13 Begi hey
21:13 FROGGS hi olpery
21:13 olpery how come 0.1 + 0.2 = 0.3 in perl6? that's impressive :) does it convert to rationals internally?
21:13 Begi How can I check if my input is Ctrl+D for example ?
21:14 timotimo olpery: yeah, we turn 0.1 and such into Rat objects when parsing
21:14 timotimo m: say 0.1.WHAT
21:14 camelia rakudo-moar b6f3ec: OUTPUT«(Rat)␤»
21:14 FROGGS m: say 0.1.WHAT # olpery
21:14 camelia rakudo-moar b6f3ec: OUTPUT«(Rat)␤»
21:14 timotimo m: say 0.1e0.WHAT
21:14 camelia rakudo-moar b6f3ec: OUTPUT«(Num)␤»
21:14 timotimo m: say 0.1234567890123456789.WHAT
21:14 camelia rakudo-moar b6f3ec: OUTPUT«(Rat)␤»
21:14 timotimo m: say 0.1234567890123456789999999999999999999999.WHAT
21:14 camelia rakudo-moar b6f3ec: OUTPUT«(Rat)␤»
21:14 timotimo m: say 0.1234567890123456789999999999999999999999.perl
21:14 camelia rakudo-moar b6f3ec: OUTPUT«<1234567890123456789999999999999999999999/10000000000000000303786028427003666890752>␤»
21:14 timotimo m: say 0.12345678901234567899999999999999999999999999999999999999999.perl
21:14 camelia rakudo-moar b6f3ec: OUTPUT«<4115226300411522633333333333333333333333333333333333333333/33333333333333332389596016520154733616645442788725719302144>␤»
21:15 olpery clever. i wonder if i can do the same with GMP in my own lame language
21:15 FROGGS m: say 0.1234567890123456789.nude
21:15 camelia rakudo-moar b6f3ec: OUTPUT«(1234567890123456789 10000000000000000000)␤»
21:15 timotimo this is probably already a FatRat?
21:15 timotimo olpery: for our big integers we use libtommath rather than GMP
21:15 timotimo it seemed like GMP was extremely difficult to integrate with what we had, so we went with tommath for that
21:15 olpery i actually use MPIR, but same same :)
21:15 olpery timotimo: i'll take a look
21:16 FROGGS olpery: have a look at src/core/Rat.pm
21:16 olpery thanks
21:16 FROGGS (in the rakudo repo)
21:16 timotimo our Rat objects are 100% implemented in pure perl6
21:17 olpery looking
21:17 Begi How can I check if my input is Ctrl+D for example ?
21:17 timotimo well, in the case of ctrl-d, you'd check if stdin got closed/eof-d
21:17 pmurias cognominal: it's very likely there might be a special browser rakudo-js setting that will warn you that something is unsupported in the browser
21:19 RabidGravy close but no banana with my next step toward world domination
21:19 timotimo no ban!
21:20 olpery so Rat computes fractions using, well, continued fractions?
21:20 RabidGravy not *quite* fast enough to read a portaudio source, encode it to MP3 and then stream to an icecast mount
21:21 olpery i understand Stern-Brocot trees is another way
21:21 olpery not sure what Rat does
21:22 travis-ci joined #perl6
21:22 travis-ci Doc build failed. Aleks-Daniel Jakimenko-Aleksejev 'Merge pull request #423 from perl6/feed-operators
21:22 travis-ci https://travis-ci.org/perl6/doc/builds/115727685 https://github.com/perl6/doc/compare/4db9cef78d15...5ac95bafe537
21:22 travis-ci left #perl6
21:22 timotimo olpery: i think it's simpler than that
21:23 olpery yeah?
21:23 timotimo gimme a sec.
21:23 timotimo i'll find the code that turns parsed numbers into rats
21:23 olpery awesome
21:24 RabidGravy it's in the ball park though
21:24 FROGGS rakudo/src/Perl6/Actions.nqp:7129:        } else { # wants a Rat
21:24 FROGGS timotimo: ^^ ?
21:24 timotimo ah, you were faster than me
21:24 timotimo thanks
21:24 FROGGS so it is token/method dec_number
21:25 cognominal pmurias, thx for your answers
21:26 olpery ok, so it's that magical nqp::fromnum_I
21:26 FROGGS lizmat: method new seems to be at fault
21:26 olpery so i need to figure out what fromnum_I does
21:26 nadim Hi all.  I se a little problem and I though I would ball it a bit to see if other can see the same behavior. I have seen this problem back and forth quite a few times since I started with P6. since it is intermittent I did think that I was sing things. till today.
21:27 lizmat FROGGS: do you know which candidate ?
21:27 FROGGS lizmat: not yet
21:28 dalek nqp: cf7fe9c | timotimo++ | src/vm/moar/profiler/template.html:
21:28 dalek nqp: unbreak names of allocated things in profiler html app
21:28 dalek nqp: review: https://github.com/perl6/nqp/commit/cf7fe9c369
21:29 geraud joined #perl6
21:29 nadim the dumper I have looks at $x.WHERE toknow if the element has beendisplayed before. I am now working on a diff functionality. The diff, after the dump has been made, removes color codes and then displayed. the code that removes the colors is far away from the rendering code.
21:29 jnthn nadim: Use .WHICH, not .WHERE, for that
21:29 jnthn nadim: Objects move during their lifetime, and so .WHERE can change.
21:30 nadim Good to know
21:30 FROGGS lizmat: the third (biggest)... when I replace it with the following line it works: nqp::create(self)!SET-SELF(nqp::list("42"),0,"42")
21:30 timotimo .WHICH will automatically use our "persistent object id" mechanism?
21:31 nadim the surprising thing is this, depending on the diff code, far away, the rendering is different brecause the objects don't get the same address.
21:31 RabidGravy yeah
21:31 jnthn timotimo: yeah
21:31 jnthn nadim: Yeah, they potentially move whenever GC runs
21:31 nadim I'd be OK with that but from the second run of the same code, the address is correct and doesn't change anymore
21:31 jnthn nadim: Which can be at any point in time
21:32 jnthn And easily affected by stuff like whether we already have precompilations cached or not
21:32 jnthn Basically, anything that changes the number of memory allocations can influence it.
21:32 nadim I buy all the address moing, GC, and so on. but why is the first run different from all the other runs?
21:33 jnthn On the first run after you change the module in some way?
21:33 jnthn Probably because the first run has to pre-compile the module, and the second run just uses that.
21:33 FROGGS lizmat: it is the "something sensible given" branch
21:34 lizmat FROGGS: I only just got around to trying your golf, but that doesn't fail for me  :-(
21:34 nadim jnthn: IMHO, it would be good if the code run the first time is the same as the other times.
21:34 FROGGS lizmat: well, it does not fail for you with a clean rakudo anyway, no?
21:34 nadim But I'll use WHICH and see if this happens again.
21:35 lizmat FROGGS: indeed, no failures whatsoever in spectest
21:35 jnthn nadim: Then stick "no precompilation;" in your code and enjoy the slowness and repeatability :P
21:35 nadim Anyway, it's good that my gut feeling was right andthat I wasn't totally paranoid
21:36 nadim jnthn: hell no! but I'd stick to slower precompilation, then the pre-compiled code being the one used at the first run too.
21:36 nadim Thanks for the feedback, I'll do some changes now.
21:37 FROGGS lizmat: well, then you cant hunt that bug :o)
21:37 lizmat FROGGS: 'fraid so  :-(
21:37 jnthn nadim: I rather suspect the logic to do that would also allocate and put us back at square one anyway :)
21:37 olpery joined #perl6
21:40 nadim jnthn: seems that WHICH can't really replace WHERE. Cannot call Numeric(ObjAt: ); none of these signatures match: (Mu:U \v: *%_)
21:40 nadim We don't like"squae one" ;)
21:41 jnthn nadim: Is there any reason you're not doing a my %stuff{Mu}; object hash?
21:41 jnthn And using that for your seen hash?
21:43 espadrine joined #perl6
21:43 wamba joined #perl6
21:46 nadim I am not doing any Mu monkey business, I havetwo references and I call .WHICH on them, the dumper knows nothing about them
21:46 patrickz I'm currently trying to track #123934 down (Regex LTM + backtracking + ratchet failure). From what the debugger tells me it's failing to backtrack into LTM alternations where it should.
21:47 dalek rakudo/nom: 24d42d1 | lizmat++ | src/core/Map.pm:
21:47 dalek rakudo/nom: Streamline Map.STORE: making it 10% faster
21:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/24d42d1146
21:47 patrickz I'm now looking at nqp/src/vm/moar/QAST/QASTRegexCompilerMAST.nqp:300. Is that roughly the right place?
22:04 jnthn This week's report: https://6guts.wordpress.com/2016/03/13/cant-forget-about-memory-issues/
22:04 jnthn patrickz: Well, it's at least a relevant place :)
22:06 patrickz Ok then I'll look deeper in that part of the code. Thx. Is there an NQP debugger that allows debugging these compilation steps?
22:07 patrickz these = NQP parts
22:07 jnthn No
22:07 patrickz printftw!
22:07 jnthn Though you can look at the generated code by compiling to a moarvm file and then moar --dump foo.moarvm
22:07 timotimo jnthn: nice autopun in the title
22:08 jnthn ;)
22:10 olpery_ joined #perl6
22:13 lizmat jnthn: "instropsecting"
22:13 jnthn lol
22:14 jnthn fixed, thanks
22:14 lizmat jnthn: "becuase"
22:14 lizmat jnthn: "unlikely,though"  (space missing)
22:17 dalek rakudo/nom: a3422a0 | lizmat++ | src/ (2 files):
22:17 dalek rakudo/nom: Make "use lib" error more awesome
22:17 dalek rakudo/nom:
22:17 dalek rakudo/nom: $ 6 'use lib'
22:17 dalek rakudo/nom: ===SORRY!=== Error while compiling -e
22:17 dalek rakudo/nom: Must specify at least one repository.  Did you mean 'use lib "lib"' ?
22:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a3422a0368
22:19 lizmat_ joined #perl6
22:19 Sgeo__ joined #perl6
22:19 jnthn lizmat: Those too, thanks :)
22:20 lizmat jnthn: you're welcome  :-)
22:24 nowan joined #perl6
22:25 lizmat good night, #perl6!
22:26 timotimo gnite lizmat
22:26 timotimo good work today :)
22:27 RabidGravy Hmm this is quite odd, recording from a jack source is kinda sorta okay, but adding the encode and stream it goes really quite wonky
22:28 RabidGravy I'm wondering if I need to copy the values in the array
22:29 RabidGravy which is less than ideal
22:29 timotimo you're rpobably not meeting its realtime requirements?
22:30 RabidGravy weeeelll all the parts seem to work with reasonable throughput
22:30 rindolf joined #perl6
22:31 RabidGravy i.e.  PortAudio -> Sndfile to record
22:31 timotimo ok
22:31 RabidGravy and Sndfile -> LameMP3 -> Libshout works fine at a higher rate even
22:32 RabidGravy but PortAudio -> LameMP3 -> Libshout is going weird
22:32 telex joined #perl6
22:33 RabidGravy it's possible that I am violating one or more of those expectations of const-ness
22:37 FROGGS yay, finally got a fix for that t/spec/S10-packages/precompilation.rakudo.moar fail
22:38 RabidGravy FROGGS++
22:38 RabidGravy groovetastic
22:38 FROGGS hehe
22:40 FROGGS will push tomorrow... computer can spectest while I sleep
22:40 FROGGS gnight &
22:41 timotimo gnite FROGGS
22:41 RabidGravy If I copy the elements of CArray to another array of some description they are no longer bound to the original CArray right?
22:41 timotimo CArray cannot hold scalars, so they can't be bound to something else, i don't think.
22:42 RabidGravy so the original source can do what it wants with the CArray afterwards and all will be good
22:44 timotimo you can nativecast the CArray to a Pointer and get its memory address; its .WHICH or .WHERE may also give you that
22:44 RabidGravy or it can get GCd even, which is possible explanation as it seems to go wonky after a biit which seems to be a function of the number of iterations
22:49 RabidGravy actually the more I think about it that is a likely explanation as the liblame must keep at least some of the input around so it can produce a complete frame between an unknown amount of input data and the possible result of compression
22:50 timotimo could be, yeah
22:51 RabidGravy so if the "cached" input starts going away or being replaced under it then it won't be able to produce complete frames
22:52 RabidGravy will try this hypothesis in the morning
22:53 RabidGravy of course it hinges on whether the copy can be done quick enough
22:56 skids Or you could hold onto the CArray until you're sure it is not being accessed anymore.
22:58 arcetera so
22:59 arcetera hmm
22:59 RabidGravy unfortunately I'm not sure you can know that without trying to guess what the mp3 encoder is going to do with the input
23:00 vendethiel joined #perl6
23:00 kid51 joined #perl6
23:00 arcetera anyone here familiar with Net::Curl?
23:00 arcetera if so
23:01 arcetera if I had a curl command that was "curl --silent -F key=shblah -F file=@/tmp/scrot.png -F method="son" http://oops.moe/upload.php"
23:01 arcetera how would I do that with Net::Curl and libcurl? can't find the docs for it
23:01 skids RabdGravy: Well, The API should say who is responsible for alloc/dealloc and if it's the app, offer a way to tell.  If the API says it wil free the buffer, you probably don't want to feed a rakudo-managed CArray in.
23:05 arcetera I mean I can find plenty of docs for libcurl
23:05 arcetera but not for Net::Curl
23:07 RabidGravy well, it does seem to be a bit sparse on documentation
23:08 skids arcetera: Loos like Net::Curl is currently only at the point of supporting the "Easy" libcurl interface.  It's probably a pretty straight mapping to the C API from the look of it.
23:09 RabidGravy azawawi isn't here right now but maybe in the morning (wherever he lives)
23:13 dalek nqp: 43a819e | timotimo++ | src/vm/moar/HLL/Backend.nqp:
23:13 dalek nqp: make profile a tiny bit smaller still
23:13 dalek nqp:
23:13 dalek nqp: by remapping IDs (which are usually 8 digits long) to the
23:13 dalek nqp: value of a counter that starts at 0.
23:13 dalek nqp: review: https://github.com/perl6/nqp/commit/43a819e367
23:15 arcetera how do I use forms with Net::Curl
23:16 MilkmanDan joined #perl6
23:16 jolts joined #perl6
23:18 dalek nqp: 2138e0e | timotimo++ | src/vm/moar/profiler/template.html:
23:18 dalek nqp: set up "type" property unconditionally in profiler's allocs.
23:18 dalek nqp: review: https://github.com/perl6/nqp/commit/2138e0eb10
23:18 skids arcetera: probably through CURLOPT_POSTFIELDS https://curl.haxx.se/libcurl/c/CURLOPT_POSTFIELDS.html
23:19 arcetera so like
23:20 arcetera curl_easy_setopt($curl, CURLOPT_POSTFIELDS, key=shblah);
23:20 arcetera ?
23:20 timotimo that's not valid syntax. it probably wants a string as the third option?
23:20 skids The last parm needs to be a string.
23:20 arcetera so quote "key=shblah"
23:20 arcetera as what I'm tryna do is accomplish
23:21 arcetera curl -F key=shblah -F file=@/tmp/somefile.png -F method="json" http://oops.moe/upload.php
23:21 arcetera where shblah is stored in a variable $oopskey
23:21 arcetera and file is the argument passed to the program
23:22 RabidGravy right,
23:23 arcetera can someone look over my code so far
23:24 arcetera kinda a mess but hey
23:24 arcetera http://sprunge.us/YMaV
23:24 arcetera oopsrc is just a file containing a very long string of text which i can't share
23:25 arcetera the documentation for the site i'm tryna upload to is here http://oops.moe/
23:25 RabidGravy looks plausible
23:26 arcetera but how do i use http://oops.moe/upload.php not http://oops.moe
23:26 arcetera if not changing CURLOPT_URL
23:26 arcetera this is a learning experience wow
23:26 arcetera maybe after this i'll actually understand the lang hehe
23:27 arcetera oh hm
23:27 RabidGravy er, I'm not sure this is a language thing
23:27 arcetera more curl
23:28 RabidGravy I haven't the faintest about curl, libcurl
23:28 arcetera same
23:29 arcetera aight
23:29 arcetera changed the code a bit and here's the problem
23:29 RabidGravy however you appear to want do make an HTTP POST with multipart form data which includes a file
23:29 arcetera http://sprunge.us/YPRF error
23:29 arcetera http://sprunge.us/XRcD half-baked code
23:30 arcetera this happens when i run it with an arg
23:32 RabidGravy right, that's just telling you you haven't got the arguments right, in lieu of documentation I'd look at the code of the module
23:33 RabidGravy or ask the author when he is next around
23:34 skids Yeah I don't know what's hanging up NC MMD here.  using uint16.new(CURLOPT_URL) doesn't work either.  Hmm maybe there's an example in the tests.
23:35 arcetera I like Perl 6 so far as a lang but the lack of documentation bothers me :L
23:35 RabidGravy I think there's a possibility that's afflicted by the "too specific NC type constraint" thing
23:36 RabidGravy arcetera, the language is fairly well documented, modules in the ecosystem vary
23:36 timotimo which reminds me i ought to write a bunch of documentation about/for SDL2::Raw
23:36 notbenh joined #perl6
23:37 RabidGravy I keep meaning to take a look at that
23:38 timotimo it has nice little examples
23:38 timotimo two of those use Cairo in addition
23:38 timotimo (to render sprite sheets on the fly)
23:40 RabidGravy I find in general that it takes me about a day to make the documentation for a reasonable sized module
23:46 tmch joined #perl6
23:47 b777 joined #perl6
23:47 AlexDaniel “the language is fairly well documented” – except for certain things that are completely missing. If you stumble upon those, please submit an issue: https://github.com/perl6/doc/issues/new
23:48 RabidGravy well yes
23:48 tmch joined #perl6
23:49 skids Yeah I think Net::Curl must be bitrotted.  Net::Curl::Easy's download runs into the same error.
23:49 RabidGravy it's catch azawawi in the morning then :)
23:49 RabidGravy anyway off to sleep now, toodles
23:54 rr joined #perl6
23:57 autarch1 joined #perl6

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

Perl 6 | Reference Documentation | Rakudo