»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
timotimo ohai jmaslak 00:04
ryn1x jmaslak: That worked! It was so easy... all I did was wrap the whole section of function in .cpp and .h with: extern "C" { } 00:09
nm now shows the name are not mangled too: 0000000000002d10 T TinyTIFFReader_open 00:10
and the perl6 test passes with the unmangled symbol =)
jmaslak Awesome, glad to help! 00:17
ryn1x hmm... not working for overloaded functions though... might just need to rename those 00:25
jmaslak Yes, overloads will be one of the limitations - you might make an extern C version of those that calls the overloaded ones. That should work. 00:26
timotimo overloads are at least one part of the reason that name mangling exists; that's how i think of it anyway 00:32
kktt Is there any IDE could be use on linux 01:23
JackFly26 hi 01:24
kktt hi
JackFly26 im trying to make a language parser with grammars
not working out 01:25
kktt oh , i couldn't help u. i am a newbie. I am finding a IDE here. 01:26
lookatme_q kktt, maybe try ATOM/VSCODE 01:27
JackFly26 oh
i use vs code
lookatme_q or Emacs/Vim
kktt linux?
JackFly26 i apologize in advance
kktt ok. i will try vim.
JackFly26 my cat is near my pc
lookatme_q It's all have plugin for Perl 6 01:27
:) 01:28
kktt ok. thank u .dear lookatme_q
lookatme_q welcome
JackFly26 how would i share code
kktt do you use vim?
JackFly26
^W 01:29
oops
kktt you cat... 01:30
JackFly26 no that was me 01:31
round with unicode
JackFly26 how should i send code on this 01:34
kktt on irc? 01:35
JackFly26 yes 01:39
kktt I think you could use the <pastebin.com/>
JackFly26 ok
ryn1x What do I do for a c signature like this: (TinyTIFFFile* tiff, double* data) Is it: ( Pointer, num64 is rw ) ? 01:51
ryn1x or maybe (Pointer, CArray[num64) is rw) 02:01
timotimo just num64 is rw 02:02
ryn1x And I would be able to pass it some type of array of doubles for the image data? 02:04
timotimo oh
in that case it'd have to be CArray[num64] or Pointer[num64] or num64 @foo
or Buf[num64] $data
ryn1x ok 02:05
jackfly26 i think the official thing says CArray
timotimo i think all of them are compatible with what you want 02:07
ryn1x thanks 02:08
timotimo "num64 is rw" will only give you a single spot of data for nums
hm
actually, if you want the function to be able to change your array, maybe it has to actually be a CArray 02:09
not sure about that
jackfly26 hi 02:11
timotimo greetings jackfly26 02:11
jackfly26 i was saying hi to alexdani but ok 02:12
timotimo oh, sorry 02:18
my irc client hides joins and parts until the user in question says something so that my screen isn't filled with 50% status messages
so i didn't notice
timotimo jackfly26: you still looking for help with the grammar parsing thing? 02:19
timotimo if you want something to share code with that also runs the code for you, try tio.run/ 02:20
buggable: browser
huggable: browser
huggable timotimo, Run Perl 6 in your browser: tio.run/nexus/perl6 or glot.io
jackfly26 yes i am 02:21
timotimo ah, yes, glot.io is the other one
jackfly26 but i gotta do homework
be right back
timotimo OK
i need a late night snack or my tummy growling will wake all the neighbors
jackfly26 its at glot.io/snippets/f7ntga1650 02:26
i modified it to work with stdin 02:27
no-n what's a synonym for @a.push: $_ for @b? 02:38
jackfly26 maybe use map? 02:39
timotimo @a.append(@b)
no-n ty
timotimo glot.io/snippets/f7ntga1650 02:42
does that give you my modifications?
oh 02:43
that's just your snippet again 02:44
hold on
glot.io/snippets/f7ntxvmzx2
there try that
this will give you a trace of the grammar 02:45
timotimo oh, hehe 02:47
timotimo jackfly26: replacing "{" with '{' makes it get a bit further already 02:47
jackfly26 i used the tracer 02:48
why does that do anything
timotimo because a { inside "" will start an interpolation :) 02:48
m: say "hello { 1 + 2 } is good"
camelia hello 3 is good
timotimo m: say "hello {"foo bar"} is good"
camelia hello foo bar is good
jackfly26 oh' 02:49
timotimo m: say "{"foo bar"}"
camelia foo bar
AlexDaniel jackfly26: hi :)
timotimo i think your token statement wants to be different, what you got there isn't a character class 02:49
jackfly26 it isnt
timotimo m: say "hello world" ~~ / <-[\s(){}\[\]]>+ /
camelia 「hello」
jackfly26 how would i do that then
timotimo like that 02:50
jackfly26 ok
the minus means not i assume
timotimo that's right
it's for "arithmetic" on stuff
so you can also do something like
m: say "foo!! bar! baz?" ~~ m:g/ <[a..z]-[aeiou]>+ /
camelia (「f」 「b」 「r」 「b」 「z」)
timotimo <-[bar]> is just that without the first class 02:51
jackfly26 alright thats as far as i expected it
thanks
im gonna go do math now
timotimo good luck!
jackfly26 im probably gonna come back when I do the actions class 02:52
thats gonna be fun
timotimo i'll probably be asleep by then
jackfly26 i mean not today
timotimo ah, OK
action classes can be tricky to figure out at first, but then they are somewhat simple
jackfly26 ok 02:55
thanks for all your help
timotimo whenever any of your tokens/rules/whatever gets parsed successfully, it'll try to call a method of the same name on your action class (or instance if you used .new or something) and it will pass the match object as the first parameter
you're welcome :)
ryn1x So my module using nativecall was along smoothly, but I am stuck on probably the most important function! Any ideas for this one: int TinyTIFFReader_getSampleData(TinyTIFFReaderFile* tiff, void* buffer, uint16_t sample); 03:55
I dont know what to put as a parameter for "void* buffer" so that I can access the image data.
jmaslak Declare it similar to: 04:10
ub inet_ntop(int32, Pointer, Blob, int32 --> Str) is native {*}
sub inet_ntop(int32, Pointer, Blob, int32 --> Str) is native {*}
jmaslak (The blob paramter is a char*, but close enough here - use Blob) 04:10
jmaslak Then you can use buf8.allocate($length) to create a buf, and you just pass it as that parameter (in the Blob spot) 04:11
ryn1x hmm... I keep getting 04:16
Non-zero wait status: 11
Parse errors: Bad plan.
my sub is: 04:17
sub TinyTIFFReader_getSampleData( TinyTIFFReaderFile is rw, Blob is rw, uint16 )
returns int32 is native('tinytiff') is export { * }
and the test is: 04:19
sub TinyTIFFReader_getSampleData( TinyTIFFReaderFile is rw, Blob is rw, uint16 )
returns int32 is native('tinytiff') is export { * }
oops
my $sample-data = buf8.allocate(191*159);
lives-ok { TinyTIFFReader_getSampleData($tiff, $sample-data, 0) };
ryn1x hmm... I wonder it is my CStructs... something that this function is using that the others so far have not... 04:25
loops ryn1x: if my google-fu is okay, that error means your code is generating a SEGV fault from a bad memory access. 04:38
ryn1x Is this correct for a struct ? C++: uint32_t* stripoffsets; Perl6: has CArray[uint32] $.stripoffsets;
ryn1x loops: thanks... i think it is probably my struct then... 04:39
ryn1x I put the commented out c++ structs next to my perl6 CStructs if someone can have a peek and see if there is anything obviously wrong? github.com/ryn1x/Graphics-TinyTIFF...m6#L6:L103 05:13
loops ryn1x: I didn't look at your code sorry.. but I was playing around with Nativecall a bit here pastebin.com/vP2gXcE1 05:17
ryn1x: If you omit the BUILD method of the struct, you get a SEGV.. 05:18
ryn1x: (really don't know if it's related to what you're seeing tho.. just a stab in the dark)
ryn1x loops: Cool thanks! It looks like I'm not doing `method BUILD() { $!val := CArray[uint8].new }` ... is that required? 05:20
loops ryn1x: you do need to initialize that field with an actual CArray it seems, declaring the type is not enough.. 05:21
loops ryn1x: i'm just casting about in the dark here.. i am learning too. 05:22
ryn1x: if you look at docs.perl6.org/language/nativecall...management it shows that you can initialize those fields in C rather than the way I did it. 05:23
But one way or the another they need to be created at runtime
ryn1x Hmm... I see here that they are doing somthing similar in TWEAK too... docs.perl6.org/language/nativecall#Structs 05:25
not sure if that is similar... I dont know what TWEAK is yet
loops ryn1x: I think that when you declare that struct field as a CArray you're essentially declaring a pointer 05:26
ryn1x: so it makes sense that at runtime you have to arrange for it to point at some memory.. either in C or inside a BUILD method 05:27
ryn1x loops: that does make sense if you think of it that way 05:27
loops that's what that $!val := CArray[uint8].new is doing... and notice it is binding with := not assigning with = 05:28
`presiden so, I'm reading design.perl6.org/S01.html 05:33
> Larry's First Law of Language Redesign: Everyone wants the colon. 05:34
question: what's the colon?
loops presiden: It literally means the colon... he's saying that everyone wants the short easy syntax to signify their favorite language feature 05:35
so you have to be really careful when deciding how to use the most desirable characters etc. 05:36
`presiden ah, the literal : character >_<
ryn1x loops: I am still getting the wait status 11 thing... I'm not good ar reading c, but it looks like you created a CArray[uint8] and passed it to the c func... and then the c func printed the value at index 0? 05:39
loops ryn1x: yes 05:42
ryn1x loop: I need to go the other way... pass a CArray pointer to the c function for it to populate 05:43
loops*
loops ryn1x: does the c function malloc the memory for you, or are you expected to pass in enough memory? 05:44
lol.. i just search for Tiny Tiff to take a look... and ended up in a porn site named Tiny Tiff heh 05:46
ryn1x I'm trying to read through the source. Here is a link right to the function that is giving me trouble: github.com/ryn1x/TinyTIFF/blob/88e...r.cpp#L590 05:47
Tiny Tiff 😂 05:48
loops I just cloned github.com/jkriege2/TinyTIFF hope it's the same cuz i have it built here 05:49
Oh, I see it's the same as the one you're using 05:50
ryn1x No its not... I had to midify some stuff like extern "C" to get it to work...
loops ah K.. i'll grab yours
ryn1x cool. thanks a lot for looking. 05:51
The Perl6 code/tests I have written so far are here too github.com/ryn1x/Graphics-TinyTIFF
loops ryn1x: okay, if you look in the README example, the _caller_ is expected to pass in enough memory for the function to fill with the image data 05:56
ryn1x: that means that likely the CArray.new is likley the way to go. Although not the only option 05:57
ryn1x loops: let me try that real quick... I was doing CArray[uintxx].new not just CArray.new ... 05:59
ryn1x and then in my test file I pass it a: my $sample-data = buf8.allocate(191*159); 05:59
nope... same error... I guess it could be something else causing the null pointer... 06:01
loops ryn1x: use $sample-data := 06:02
not =
ryn1x oh shoot... good catch...
loops and if you're doing it that way, I don't think you need the BUILD stuff.
ryn1x ok.. took away the build stuff and changed to := but same issue 06:04
the other thing I am not super sure about it `HANDLE hFile;` and `HANDLE hFile;` in the TIFFReaderFile struct 06:05
I just used has Pointer $.xxxx for both of those...
buggable New CPAN upload: Pod-Load-0.2.0.tar.gz by JMERELO modules.perl6.org/dist/Pod::Load:cpan:JMERELO 06:14
masak I know I promised to have an excellent use for adverbs in the advent post, but I didn't end up using that 06:24
partly because I didn't find a way to do what I wanted in Rakudo
loops ryn1x: okay, I think i have it working here in a fashion 06:25
but my first try i get the error "only planar TIFF files are supported by this library
ryn1x: I need a test tiff to try it out 06:26
ryn1x loops: oooh
masak m: sub infix:<≅>($l, $r, :$mod) { "$l ≅ $r (mod $mod)" }; say 3 ≅ 13 :mod(10)
camelia 5===SORRY!5=== Error while compiling <tmp>
You can't adverb &infix:<≅>
at <tmp>:1
------> 3 ≅ $r (mod $mod)" }; say 3 ≅ 13 :mod(10)7⏏5<EOL>
loops ryn1x: I don't know what a planar tiff is heh
masak ...this seems to hit operators that were already defined in CORE. 06:27
ryn1x loops: I dont know that either... there are some tiffs in here: github.com/ryn1x/TinyTIFF/tree/mas...eader_test
masak I don't know why I shouldn't be allowed to override an operator in a local scope and put an adverb on it
m: sub infix:<floomp>($l, $r, :$mod) { "$l ≅ $r (mod $mod)" }; say 3 floomp 13 :mod(10) 06:28
camelia 3 ≅ 13 (mod 10)
masak m: sub infix:<≅≅>($l, $r, :$mod) { "$l ≅ $r (mod $mod)" }; say 3 ≅≅ 13 :mod(10) 06:29
camelia 3 ≅ 13 (mod 10)
loops ryn1x: okay test16m_imagej.tif worked... and your library works with just a small change
ryn1x loops: cool! 06:30
loops ryn1x: actually i cheated.. but i'll show you how i did it, and you can go from there..
ryn1x ok
loops What's a good pastebin for P6? 06:32
ryn1x I usually use gist.github.com 06:33
loops ryn1x: okay : is.gd/nBfTK9 06:34
ryn1x: So I cheated by importing NativeCall and doing my own thing.. but hopefully that is easy to incoporate in your module 06:35
ryn1x: (actually, i just realized that's not exactly the struct issue you were working on, I just got excited that I read the .tif heh) 06:37
you may have already gotten that far before. 06:38
ryn1x loops: if you got getSampleData working that is exactly my problem... trying to modify my code to be like yours now... not quite there yet ... 06:44
loops ryn1x: yeah, it is working okay. Although all the tiff's i had locally weren't planar for some reason. but it printed out a nice error message saying so at least. 06:45
jmerelo masak++ 06:48
ryn1x loops: So I ran you script and it worked perfectly! I still get the same error in my .t file though. maybe somethig with lives-ok.. 06:57
loops: thanks for all your help!
loops ryn1x: no worries, good luck with it 06:58
ToddAndMargo Is there sometig wrong with the perl6 mailing list? [Status: Error, Address: [email@hidden.address] ResponseCode 421, Host not reachable.] 07:05
ryn1x loops: wow.... found the seg fault. it is with the getImageDescription sub. weird cause it only crashed when getImageData is called after it.... use Test made me think it was the last test causing the error. 07:07
loops ryn1x: oh yeah, I should have mentioned that.. I saw that and ignored it. 07:08
ryn1x loops: it works with Buf now too... that way I don't need to hardcode the bit-depth in the library =) 07:10
man... use Test really sent me in the wrong direction on that one... 07:11
jmerelo Has everyone checked today's 07:33
AC?
perl6advent.wordpress.com/2018/12/...happiness/ 07:34
by masak
moritz masak++ # very nice advent post 08:23
masak: it seems the "S E N D" line is mis-aligned with the other lines by one space. Intentional? 08:25
masak moritz: no, not intentional. I noticed it too. will try to fix. 08:48
I like how the post turned out, but I'd like to make it a *lot* less vaporware-y
maybe that's a good topic of discussion for here on #perl6, though 08:49
I deeply believe this is the part we should steal from Lisp and Smalltalk: the notion that the language/grammar is not only not fixed, but subject to re-interpretation and mutation
and that "raising up the language" to meet the problem often is a sensible thing to do
mis-alignment fixed now. moritz++ 08:53
finanalyst p6: class A {has @!xx; method v{ @!xx=Nil; say @!xx}};my A $q.=new; $q.v 08:58
camelia [(Any)]
finanalyst Is setting @!variable = Nil expected to generate [(Nil)] ? That means @!variable.elems = 1 09:00
p6: class A {has @.xx; method v{ @xx=Nil; say @!xx}};my A $q.=new; $q.v; say $q.xx.elems 09:01
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '@xx' is not declared. Did you mean '@!xx'?
at <tmp>:1
------> 3class A {has @.xx; method v{ 7⏏5@xx=Nil; say @!xx}};my A $q.=new; $q.v;
finanalyst p6: class A {has @.xx; method v{ @.xx=Nil; say @!xx}};my A $q.=new; $q.v; say $q.xx.elems
camelia [(Any)]
1
SyrupThinker finanalyst: docs.perl6.org/type/Nil#index-entr...assignment 09:03
finanalyst p6: class A {has @.xx default (); method v{ @.xx=Nil; say @!xx}};my A $q.=new; $q.v; say $q.xx.elems 09:04
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3class A {has @.xx7⏏5 default (); method v{ @.xx=Nil; say @!x
expecting any of:
infix
infix stopper
statement end
finanalyst p6: class A {has @.xx is default (); method v{ @.xx=Nil; say @!xx}};my A $q.=new; $q.v; say $q.xx.elems 09:05
camelia 5===SORRY!5=== Error while compiling <tmp>
Signatures as constraints on variables not yet implemented. Sorry.
at <tmp>:1
------> 3class A {has @.xx is default ()7⏏5; method v{ @.xx=Nil; say @!xx}};my A $q
finanalyst SyrupThinker: Thanks. 09:06
no-n is it ok to export variables? (I read it is bad for perl 5) 09:19
masak anyone interested in talking about "slang compilation"? we could also take the discussion on #perl6-macros 09:55
jnthn masak: hmm, maybe :)
masak no-n: I'd say it's OK to export variables. not sure about the risk in Perl 5.
jnthn: did you read my advent post? :) perl6advent.wordpress.com/2018/12/...happiness/ 09:56
masak is shameless in his self-promotion
jnthn No :)
masak tl;dr: even a puzzle problem like "SEND + MORE = MONEY" boils down to a compilation task 09:58
Perl 6 will shine and be fully realized to the extent we can do what I do in that post but *inside the compiler pipeline*
this requires slangs, and the ability to write rules that translate and modify Qtrees 09:59
jnthn Nice post :) 10:00
masak \o/
masak maybe I should be consistent and refer to those as "langs", not "slangs": github.com/masak/007/issues/378 10:01
masak I guess my question is: what can we do (aside from landing macros from 007) to make this a reality in Perl 6? 10:03
jnthn Well, it's the QTrees part of 007 that's key here, I think? 10:04
Question is to what degree QTrees are a good compilation target... 10:05
masak aye, and I guess that'd be the biggest "adoption pain point" for the Rakudo stack, too
it's pretty targeted towards nqp's ASTs right now 10:06
hm, maybe something could be done there, though: some kind of spike or exploration wherein we try to "slide Qtrees in" in a layer between
maybe not even with the express goal of building the Final Thing, just harvesting feedback and seeing it work in *some* way 10:07
jnthn QAST is quite language agnostic, and that's its strength and its weakness. Qtrees are quite tied to Perl 6, which I guess will also turn out to be their strength and weakness :) 10:08
masak the provided-from-the-start Qtrees are quite tied to 007^WPerl 6 10:09
but the hierarchy is built to be extensible, and an open set
I wish I had more hard data there :) haven't actually extended it so much yet 10:10
jnthn But what would an extension look like in terms of compilation? 10:12
Would one just need to desugar into other existing Qtrees?
masak aye 10:13
I still don't have all the answers, but it seems that there are different types of desugaring
there's "I fully expect to be replaced by my desugar", as in macro expansion -- the original only sticks around when tooling wants it
there's also "I want to present as first-class, but here's my implementation desugar" -- like when you create a repeat-while loop but it's implemented in terms of a while loop 10:14
in the latter case, tooling that traverses the program structure is likely to see the unexpanded form, whereas tooling that wants to reason about data flow is likely to see the expanded form 10:15
in a sense, the staged compilation that the blog post is talking about looks a lot like a slang-centered orchestrated macro expansion 10:16
jnthn Where the expanded form is effectively a subset of the Qtree language that is a closed set? 10:19
masak aye
it must bottom out in something that the compiler can attach to runtime semantics 10:20
jnthn Right
masak (in 007, I'm currently toying around with "subatomic" semantics for this; in that case even built-in `if` and `while` can be described in terms of these. but same end result.)
jnthn I guess there's the declaration side of it too (the actions/world split)
masak I confess to still not understanding world so well :/ 10:21
it's where declarations go, that much I know
can it be summarized as a "static description" of program declarations?
amusingly, *declarations* have come into focus in 007 in the past few months as something that the compiler needs to treat as first-class 10:22
for two reasons: the new hygiene/lexical model hinges on them, and operator prec/assoc information hangs on that peg 10:23
timotimo masak: "represents a digits"? :) 10:24
masak aie. 10:25
fixing.
masak made a typos
fix'd 10:26
timotimo++
jnthn masak: Well, static description in what sense? 10:27
masak my understanding of World is that when you write `my` in your program, the parser finds that and something is added to World 10:28
but I'm not at all sure my understanding is correct :)
jnthn Yes, that's about right
It's the declarations
masak and it makes a lot of sense to have that "on its own level" 10:29
I distinctly remember the pain of *not* having that on its own level
jnthn Me too :)
masak furthermore, I think Perl 6 is relatively unique in even having a level for that
(but I might be wrong)
I'm also proud of having named World :> 10:30
but if I were to do it again, I would've gone with the German Veldt :P
masak Second Naming Syndrome
masak .oO( ^^ ) 10:31
buggable New CPAN upload: Math-FFT-Libfftw3-0.1.3.tar.gz by FRITH modules.perl6.org/dist/Math::FFT::L...cpan:FRITH 11:24
tbrowder jmerelo: just checked my advent post more closely and see another chunk wp ate! hope i can fix it, but not holding my breath... 11:54
lichtkind is there a reason why rakudo .11 is not mentioned on this rakudo.org 12:21
lucasb the links show here: rakudo.org/files/rakudo 12:24
the rakudo and nqp 2018.11 tarball releases 12:25
lichtkind yes but not there rakudo.org/files 12:27
lucasb maybe because it only shows rakudo star releases, and there wasn't a Star release for the 2018.11 monthly 12:28
lucasb Why rakudo.org is kept around? I agree it's very pretty and nicely designed. :) But IMO, I think I would prefer its content merged into perl6.org and rakudo.org become just a redirect to perl6.org. 12:34
tyil I wouldn't remove the rakudo site tbh 13:31
it's a very slick design, and is the site to get R* releases
moritz lucasb: we still hope that, one day, there will be more than one major implementation of Perl 6 13:41
tyil afaiui, Perl 6 is "just" a spec, with rakudo being an implementation of it 13:42
lucasb agreed, that's the way the story is being told for years :) 13:43
an alternative way of telling the story is saying that rakudo is *not* just one of the implementations, but rather, is the *reference implementation*, and for now, the only implementation avaiable 13:44
moritz but that we don't want to do, because it discourages other implementations
tyil that doesn't strike me as a good reason to undo all the work people have put into the rakudo.org site
jnthn lucasb: It's an alternative, but it's the story we're telling. 13:45
opos
it's *not* the story we're telling
We should keep the door open to alternative implementations. 13:46
That's served us very well in the past.
lucasb I don't see how "reference implementation" is associated with discouraging/shutting the door for other implementations 13:48
the name says "implementation", it's just one, for it's the "reference" one :)
*but it's the...
moritz it gives one implementation a special place that a newcomer cannot claim
jnthn Reference implementation suggests that Rakudo is what another implementation has to match up with to call itself a Perl 6 compiler, while in reality we want that to be the spectest suite. 13:49
For example, there's no reason for another implementation to provide any of the nqp::ops 13:50
masak I'm reminded of something pmichaud said 13:52
the answer to "what's the [official]...?" is "no"
:) 13:53
lucasb seems the word "reference" or "official" is the problem :)
masak it seems to rub Perl people the wrong way a little 13:54
well, I guess Perl 5 has an official implementation :)
jnthn Well, I think we'd tend to agree the test suite is official, but not much else :)
lucasb if I start refering to Rakudo as the *de facto* or *most well-established* implementation, would you agree?
masak it'd take blindness to reality not to agree with those two labels ;) 13:58
but I'd be wary of throwing around even "de facto", since the way we use words tends to affect reality
lucasb yeah, subtleties in synonyms :) 13:59
Geth doc: f0d6bb84d5 | (Elizabeth Mattijsen)++ | doc/Type/Buf.pod6
Document buf8.write-int/uint/num methods
14:55
synopsebot Link: doc.perl6.org/type/Buf
Geth doc: 3660283c66 | (Elizabeth Mattijsen)++ | doc/Type/Blob.pod6
Some types in signature refinements
14:59
synopsebot Link: doc.perl6.org/type/Blob
lucasb "In my view we have only one Perl community and it can’t be divisible." <-- I liked this response in the awards post :) 15:21
lizmat hopes her opinion on this subject is clear and will therefore refrain from commenting publicly as not to draw fire 15:24
lucasb I wouldn't mind leaving the Perl 5 folks alone and the P6 community start their own Camelia awards
lucasb in fact, I think I even prefer a separate event :) 15:25
El_Che lizmat: write a blog post :P
lizmat: in the open letter format :)
lizmat ferry vunny 15:25
El_Che I am hilarious! 15:26
lizmat El_Che: are you allowed to play with matches? :-) 15:28
lucasb but maybe P6 community is too small to keep awarding 3 folks yearly
Geth doc: 7ffe0d1f3c | Coke++ | doc/Type/Blob.pod6
whitespace
doc: 622183d6ab | Coke++ | doc/Type/Buf.pod6
fix typo in sig
synopsebot Link: doc.perl6.org/type/Blob
Link: doc.perl6.org/type/Buf
El_Che lucasb: "and the yearly Liz White Camelia goes this year to lizmat!" 15:29
lizmat [Coke]++ # well caught!
El_Che yeah, bdoy's response was weird coming from a Perl 6 book author 15:30
lizmat El_Che: one is enough :)
El_Che lizmat: it's not a "Liz White Camelia", though 15:31
lizmat: your award is outdated :)
[Coke] lizmat: I just run the tests. :) 15:32
lizmat also for whitespace ??
[Coke] yes. 15:33
that was the "we prefer spaces after our commas" test.
the method sig was the compile test. 15:34
lizmat wow
lucasb is there a "after periods, prefer a single space instead of two" test?
(or the other way around)
[Coke] I have a utility script that updates the git repo, then runs the extended tests only on those files so i can get things good locally and then just test the small things that have changed since (util/update-and-test) 15:35
lucasb: no, but it would be fairly easy to add if someone was excited about it.
lucasb hehe, I'm not. :) 15:36
[Coke] would start with github.com/perl6/doc/blob/master/x...er-comma.t
lucasb I prefer if authors would avoid gratuitous "paragraph reflows" commits 15:38
uzl Hello everyone! So I'm trying to convert this .pod6 to .html and getting the following message: ===DEBUG: final cell layout for table 0. === cell contents are enclosed in single quotes ... 16:12
yoleaux 12 Dec 2018 16:48Z <jmerelo> uzl: thanks!
Altreus m: 'asdfdf <#506956345119866881> dasd as <#506956332247678986>' ~~ m:g/ '<#' (\d+) '>' /; say $/.list 16:12
camelia (「<#506956345119866881>」
0 => 「506956345119866881」 「<#506956332247678986>」
0 => 「506956332247678986」)
Altreus help
I thought I would only get the numbers when I did this
uzl Pod: snippi.com/raw/gvaart3 . I'm using the perl6 command with RAKUDO_POD_TABLE_DEBUG
Altreus what have I not understood? 16:13
uzl No problem, jmerelo! 16:13
Altreus the regex docs implies I'll get just the numbers but as usual matching 'abc' against /(a) b (c)/ doesn't explain very much :P
jnthn Maybe you want <( \d+ )> instead 16:15
uzl could you probably access each Match object's first element? 16:16
m: 'asdfdf <#506956345119866881> dasd as <#506956332247678986>' ~~ m:g/ '<#' (\d+) '>' /; say $/.list[0][0] 16:17
camelia 「506956345119866881」
Altreus I understand
kind of
m: 'abc' ~~ /(a) b (c)/; say $/.list 16:18
camelia (「a」 「c」)
Altreus hmm
but those are at the ends
I think I get it
jnthn m:g does multiple matches, and <( )> set the limits of the matching 16:21
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/O2Rtjzi3To
Two ter…
jnthn, Full output: gist.github.com/eea772e80efd46824c...cf7403a759
jnthn Oh, be quiet, evalable6
smallick m: say 'Hello!'; 16:31
camelia Hello!
jmerelo .seen tobs
yoleaux I saw tobs 16 Dec 2018 19:01Z in #perl6: <tobs> heh, I expect great things from the next three years
tobs jmerelo: o/
jmerelo tobs: Ready for your Advent Calendar article?
hi :-) 16:32
smallick m: (2..999).grep({ $_ %% 3 || $_ %% 5 }).reduce({ $^a + $^b }) 16:33
camelia ( no output )
tobs no, and in fact I might have to shuffle to the 20th because the final part of my code is not ready. I have today and tomorrow almost exclusively for the article though and could also lower my bar to meet the 19th. 16:34
sorry to say :/ 16:35
jmerelo tobs: I can ask scimon if he could move it up. I've seen it's already up there... No problem, I just wanted to check.
uzl Anybody has any idea if Pod formatting code(B<>, etc.) are rendered inside tables? 16:36
tobs The last week before Christmas always feels like a marathon
jmerelo uzl: it's not
tobs: let me check with scimon 16:37
tobs jmerelo: thanks 16:38
and good job keeping an eye on everyone
uzl jmerelo: Any way around it? In code blocks they're not by default but can be rendered if :allow is used.
jmerelo tobs: no problem :-)
uzl: I'm afraid not. I think it happens at the parsing level, so no way to get it back when rendering it to something else. 16:39
uzl jmerelo: oh, OK. Thanks!
'til later! 16:40
jmerelo see you! 16:41
jmerelo .seen SmokeMachine 16:45
yoleaux I saw SmokeMachine 16 Dec 2018 00:31Z in #perl6: <SmokeMachine> like -MO=Deparser?! would be great!
SmokeMachine jmerelo: hi!
lizmat and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2018/12/17/...-designed/ 16:46
jmerelo SmokeMachine: hi!
jmerelo SmokeMachine: this is just a maybe, and a big one. Your article has been ready for a long time, up there in the site. I don't preview anything going amiss in the next few days, but if it happens, might I use it? 16:47
SmokeMachine Sure! 16:49
Geth advent: 458275ce3a | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | perl6advent-2018/schedule
Changing schedule

Changing @taboege and @Scimon
16:50
SmokeMachine I’ve been doing some small changes on the post as I’m writing new stuff on Red... but it’s read every time I save :)
Ready 16:51
jmerelo SmokeMachine: thanks! I don't think it's going to be needed after the last reshuffle, but just in case :-) 17:01
canr I have code using native call that work fine on unix, but on windows it cannot find the ".dll". I have the directory with the dll in PATH and also LD_LIBRARY_PATH. Does anyone have experience with this? 18:04
Elronnd is there any type corresponding to an 80-bit float, lond double in c? 18:16
timotimo we don't have that natively yet
Elronnd ok 18:18
buggable New CPAN upload: Tomtit-0.0.5.tar.gz by MELEZHIK modules.perl6.org/dist/Tomtit:cpan:MELEZHIK 18:34
leont long double's semantics aren't well standardized, that doesn't help 18:34
lizmat at least we can read / write 128bit ints now :-) 18:35
canr Also with like DBIish, sqlite3.dll cannot be found even though it is my windows path variable... on unix it works just fine... I don't know what I am doing wrong in windows... 18:37
lizmat canr: if nobody answers you here, maybe asking on StackOverflow might help 18:37
stackoverflow.com/questions/tagged/perl6 18:38
timotimo are dlls actually looked up in path? huh. 18:41
i haven't windowsed in so long, i've forgotten almost everything :o 18:44
loops Is there a way to mark a bunch of functions as "is export" as a group rather than adding that to each one? 18:53
timotimo yeah, you can directly call trait_mod:<is>($the-routine, :export) on the objects, and you can find the function objects in MY::, so you can loop over them :D 18:55
timotimo though you'll find everything else in MY:: as well 18:55
loops timotimo: ah okay, it's just as easy to manually edit them then.. was hoping to just say "export everything in this scope" 18:57
timotimo dunno, i'd call using a little for loop easier 18:58
oh, should be at BEGIN time, though
loops timotimo: the other one that is a bit wordy, is having to say "is native('./mylib.so') { * };" for a big bunch of funcs too 18:59
timotimo m: sub foo { }; sub bar { }; sub quux { }; BEGIN for MY::.grep(*.name.startswith('&')).map({ trait_mod:<is>($_, :export) })
camelia 5===SORRY!5===
Expression needs parens to avoid gobbling block
at <tmp>:1
------> 3&')).map({ trait_mod:<is>($_, :export) }7⏏5)
Missing block (apparently claimed by expression)
at <tmp>:1
------> 3')).map({ trait_mod:<is>($_, :e…
Geth doc: MorayJ++ created pull request #2512:
Fix typo in example
timotimo m: sub foo { }; sub bar { }; sub quux { }; BEGIN do for MY::.grep(*.name.startswith('&')).map({ trait_mod:<is>($_, :export) })
camelia 5===SORRY!5===
Expression needs parens to avoid gobbling block
at <tmp>:1
------> 3&')).map({ trait_mod:<is>($_, :export) }7⏏5)
Missing block (apparently claimed by expression)
at <tmp>:1
------> 3')).map({ trait_mod:<is>($_, :e…
timotimo whoops
loops timotimo: yeah, i suppose i could do that, but it means a runtime task then, and can't be pre-compiled into the module.
timotimo m: sub foo { }; sub bar { }; sub quux { }; BEGIN MY::.grep(*.name.startswith('&')).map({ trait_mod:<is>($_, :export) }) 19:00
camelia ( no output )
timotimo no it totally gets pre-compiled
canr timotimo: The Docs say "...will be searched for in the paths in the LD_LIBRARY_PATH (PATH on Windows)" docs.perl6.org/language/nativecall..._and_names
loops timotimo: really? that is surprising
timotimo everything done and made in BEGIN will be precomped, for better or for worse
canr i assumed that implied windows looked up dlls in path, but i don't know windows...
timotimo e: my $foo = BEGIN open("/tmp/test.txt"); say $foo 19:01
evalable6 Cannot test e96b7ffed44d13e25cce942b233c61fb1975d760 (Commit exists, but a perl6 executable could not be built for it)
timotimo e: 2018.10 my $foo = BEGIN open("/tmp/test.txt"); say $foo
evalable6 Cannot test e96b7ffed44d13e25cce942b233c61fb1975d760 (Commit exists, but a perl6 executable could not be built for it)
timotimo er
e: 2018.09 my $foo = BEGIN open("/tmp/test.txt"); say $foo
evalable6 Cannot test e96b7ffed44d13e25cce942b233c61fb1975d760 (Commit exists, but a perl6 executable could not be built for it)
timotimo AlexDaniel: are the whateverables sick?
AlexDaniel o_o 19:02
ah no
timeless: c: not e:
oops
timotimo: ↑
timeless looks up
timotimo oh
AlexDaniel timeless: sorry wrong nickname! :)
timotimo c: 2018.10 my $foo = BEGIN open("/tmp/test.txt"); say $foo
committable6 timotimo, ¦2018.10: «===SORRY!===␤Failed to open file /tmp/test.txt: No such file or directory␤ «exit code = 1»»
timotimo c: 2018.10 my $foo = BEGIN open("/tmp/test.txt", :w); say $foo
committable6 timotimo, ¦2018.10: «IO::Handle<"/tmp/test.txt".IO>(opened)␤»
timotimo oh, handles survive that now?
timeless no worries
timotimo but probably not for full module precome 19:03
gotta go AFK now, though!
loops: you can do "is native" the same way as "is export", you'll give the export named parameter the string value, then
like trait_mod:<is>($theroutine, native => './mylib.so') 19:04
loops timotimo: you're right, that is pretty handy, esp since its included in the precompile 19:06
Xliff (π/180).sin.cos 19:09
m: (π/180).sin.cos
camelia ( no output )
Xliff m: (π/180).sin.cos.say
camelia 0.9998477106202734
Xliff m: π/180.sin.cos.say 19:10
camelia WARNINGS for <tmp>:
0.6958793964545379
Useless use of "/" in expression "π/180.sin.cos.say" in sink context (line 1)
Xliff m: π * 180.sin.cos.say 19:11
camelia WARNINGS for <tmp>:
0.6958793964545379
Useless use of "*" in expression "π * 180.sin.cos.say" in sink context (line 1)
Xliff m: (π * 180.sin.cos).say
camelia 2.1861695996860755
Geth doc: 1be949fcf5 | MorayJ++ | doc/Type/Signature.pod6
Fix typo in example
19:13
doc: 60048bcbb0 | Altai-man++ (committed using GitHub Web editor) | doc/Type/Signature.pod6
Merge pull request #2512 from MorayJ/fix-type

Fix typo in example
synopsebot Link: doc.perl6.org/type/Signature
canr So if windows has no standard lib dir, and .lib's are not auto found in path, do you need to check %*ENV for some predefined location when writing for windows? 19:20
timotimo m: say Π 19:27
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
Π used at line 1
timotimo m: π/180 andthen .sin.cos.say 19:28
camelia 0.9998477106202734
timotimo ^- fun way to drop precedence if you know the value isn't falsey
Geth ecosystem: 155afa22b0 | thundergnat++ (committed using GitHub Web editor) | META.list
Add X11-Xdo to the ecosystem

Add bindings to libxdo X11 automation library. See github.com/thundergnat/X11-Xdo
22:26