»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:00
mcmillhj joined
|
|||
timotimo | haha | 00:00 | |
do it like me; stay around when smarter people talk and grab all the smarts for yourself using osmosis | |||
that's the only way i got any smart at all :) | |||
lambd0x | timotimo: it's sure a good tip ;) | 00:02 | |
Later guys o/ | |||
timotimo | there's already a much simpler way to write all this | ||
00:03
lambd0x left
|
|||
timotimo | m: $*IN.words.Bag.list.sort(-*.value).say | 00:03 | |
camelia | rakudo-moar 0de139: OUTPUT«(mo => 9 a => 8 le => 5 is => 5 ag => 4 an => 4 Ghaoth => 4 gan => 3 na => 3 ghlas’ => 3 slán => 3 Dhún => 3 i => 3 Dobhair. => 3 go => 3 gach => 3 do => 2 dom => 2 bhí => 2 ina => 2 nGall => 2 nár => 2 mé => 2 gleanntáin => 2 ar => 2 beag => 2 fá…» | ||
sena_kun | timotimo, I did it since my childhood, to be honest, so jk. That's why I learned haskell, for example, and did other strange things in my life. And you know, it's not always a best way to spend a night(putting haskell aside, it was great). | 00:04 | |
00:04
mcmillhj left
|
|||
AlexDaniel | m: ‘🚱’.uniname.say | 00:04 | |
camelia | rakudo-moar 0de139: OUTPUT«NON-POTABLE WATER SYMBOL» | ||
timotimo | non-portable? | 00:05 | |
AlexDaniel | that's what I read the first time too | 00:06 | |
gfldex | timotimo: www.qsafesps.com.au/images/P/P205.jpg | ||
timotimo | ah | 00:07 | |
AlexDaniel | .oO( non-portable program. Do not drink ) |
00:08 | |
timotimo | %) | ||
also, i believe the .list in my m: was superfluous | |||
as .sort will already call .list for you | |||
sena_kun | Ah, I've understand the '-' sign meaning. Seems like a golf. Thanks for a trick, timotimo. | ||
timotimo | gfldex already showed it a bit earlier | 00:09 | |
00:10
kaare_ joined
|
|||
sena_kun | timotimo, he did, but I catched it up a bit later. (: | 00:10 | |
timotimo | OK :) | ||
AlexDaniel | 👶🚽 – looks great here | ||
00:10
mcmillhj joined
|
|||
AlexDaniel | but incorrect semantically | 00:11 | |
00:15
mcmillhj left
00:17
spider-mario left
00:20
cyphase left
|
|||
timotimo | hm? | 00:20 | |
00:21
cog_ left
|
|||
AlexDaniel | timotimo: well, here is the screenshot: files.progarm.org/2016-08-07-03233..._scrot.png | 00:24 | |
timotimo | oh, i didn't see the icons at all | 00:25 | |
00:25
kalkin-_ left
|
|||
timotimo | i thought it was spaces :) | 00:25 | |
AlexDaniel | it's a followup to “Do not drink” thingy :) | ||
timotimo | ah, i missed that connection | 00:26 | |
good one :) | |||
00:26
sno joined
|
|||
gfldex | AlexDaniel: using fonts for picrograms is a bad idea: imgur.com/a/Yk1Jg | 00:28 | |
AlexDaniel | gfldex: yes | ||
timotimo | baby on the back of a toilet | ||
00:29
golee left,
cyphase joined
00:31
kurahaupo left,
kurahaupo joined
00:38
mavorg left
00:42
kurahaupo left
00:57
lambd0x joined
|
|||
lambd0x | timotimo: I think I finally got what you meant earlier, my code: bpaste.net/show/0e9df598ffed | 00:59 | |
00:59
pierre_ joined
|
|||
timotimo | do you know yo udon't have to pull the value out, change it, then put it back in? :) | 01:00 | |
lambd0x | timotimo: actually I didn't... | 01:01 | |
timotimo: hahah, how? | 01:02 | ||
01:02
mcmillhj joined
|
|||
timotimo | just %myhash{$thekey}++ | 01:03 | |
i still have no idea why you were using :kv :) | |||
lambd0x | timotimo: whahhhh... | ||
timotimo: you know what...neither do I | 01:04 | ||
hahah | |||
timotimo | and "my $tmp++" is the same as "my $tmp = 1", and i see no reason why you have $tmp at all | ||
lambd0x | timotimo: ah, that was just because I initially was unsure about how to insert in a hash variable, afterward I did forget about it there... | 01:06 | |
thanks for tips :) | |||
01:06
mcmillhj left
|
|||
timotimo | ah | 01:06 | |
lambd0x | timotimo: wow the code got a lot shorter now | 01:07 | |
timotimo: about the %myhash{$thekey}++, does it work with arrays too? | 01:08 | ||
m: | |||
m: my @array <1>; @array[0]++; | 01:09 | ||
camelia | rakudo-moar 77724b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Missing required term after infixat <tmp>:1------> 3my @array <1>7⏏5; @array[0]++; expecting any of: prefix term» | ||
lambd0x | m: my @array = <1>; @array[0]++; | ||
camelia | ( no output ) | ||
lambd0x | m: my @array = <1>; say @array[0]++; | 01:10 | |
camelia | rakudo-moar 77724b: OUTPUT«1» | ||
timotimo | don't forget it's returning the value that it was before incrementing | 01:11 | |
that's why it's 1 and not 2 | |||
01:12
aries_liuxueyang left
01:15
aries_liuxueyang joined
01:17
mcmillhj joined
|
|||
lambd0x | timotimo: yes :) | 01:17 | |
01:19
kid51 left,
kid51 joined
|
|||
lambd0x | timotimo: is this kinda of variable that is subjected to collision? | 01:20 | |
01:22
mcmillhj left
|
|||
b2gills | lambd0x: You can remove all of the conditional logic from your code. ( hint %h{'a'}++ will leave %h{'a'} == 1 the first time that 'a' is seen ) | 01:30 | |
timotimo | collision? | ||
b2g is correct | 01:31 | ||
the magic behind that is quite impressive, though :) | |||
auto-vivification is black voodoo | |||
01:35
mcmillhj joined
|
|||
lambd0x | b2gills: :) | 01:36 | |
timotimo: yes collision of values in the same key.. a large set of values for the same key that gets much bigger than the actual number of keys in the hash function. | 01:39 | ||
01:40
mcmillhj left
|
|||
b2gills | lambd0x: If there is a collision the runtime hides it for you | 01:42 | |
lambd0x | b2gills: even if the input is huge? | 01:43 | |
01:44
Ben_Goldberg joined
|
|||
b2gills | It can store more than one key-value in the same bucket. There have been CVEs against Perl5 because it didn't split the buckets up in a few cases | 01:45 | |
lambd0x | b2gills: That's so nice \o/ | ||
01:46
ilbot3 left,
sena_kun left
01:47
ilbot3 joined
|
|||
lambd0x | b2gills: how that for a code? bpaste.net/show/006f17d9c1aa | 01:47 | |
b2gills | In fact I would expect that if you have more than ten or twenty key-values in a hash that it will almost always have some of them sharing buckets | ||
lambd0x | b2gills: true. | 01:48 | |
b2gills | lambd0x: the unless could have 「%hash{$word}++」 in it and it would still work. | 01:49 | |
AlexDaniel | lambd0x: by the way, can you paste your snippets without “$ cat cal_001.pl6” thingy? | 01:50 | |
so that we can ask one of the bots to eval it | |||
lambd0x | yes I can :P | 01:51 | |
01:51
mcmillhj joined
|
|||
lambd0x | here: pastebin.com/qXvcT9VP | 01:53 | |
Thanks everyone :) | 01:54 | ||
AlexDaniel | committable: HEAD pastebin.com/raw/qXvcT9VP | ||
committable | AlexDaniel: Successfully fetched the code from the provided URL. | ||
AlexDaniel: gist.github.com/d89e8d6b6cf0a4d367...fe8422f13d | |||
01:56
lambd0x left,
mcmillhj left
02:00
zacts left
|
|||
b2gills | .tell lambd0x I was trying to get you to realize it could be written as 「my %h; for $*IN.words -> $word { %h{$word}++ }」 then I was going to tell you about 「my %h := $*IN.words.BagHash」 irclog.perlgeek.de/perl6/2016-08-06#i_12978231 | 02:04 | |
yoleaux | b2gills: I'll pass your message to lambd0x. | ||
02:05
mcmillhj joined
|
|||
AlexDaniel | b2gills++ # 「」 | 02:05 | |
timotimo | i'd advise for Bag instead of BagHash, as you probably don't have to modify it afterwards | 02:09 | |
02:10
mcmillhj left
|
|||
b2gills | That would have been immediately after BagHash | 02:11 | |
02:25
mcmillhj joined
02:27
noganex_ joined
02:30
noganex left,
mcmillhj left
02:40
bjz left
|
|||
timotimo | fair enough | 02:41 | |
awwaiid uses tau constant with joy | 02:43 | ||
timotimo | someone found out on stackoverflow, that the "sum" method ought to be marked "is nodal" | 02:44 | |
not sure if it's been reported to RT, though. | |||
02:46
killbill joined
|
|||
killbill | expression s/(<:No+:Nd+:Nl>)$0$0/{($0+1) x 3}/ works with 666 but don't work with ⁶ ⁶ ⁶ ( Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏⁶) | 02:52 | |
yoleaux | 11 Jul 2016 06:31Z <TimToady> killbill: It's <:super>, not <:superscript>. | ||
AlexDaniel | m: 'my $x = ‘❸❸❸’; $x ~~ s/(<:No+:Nd+:Nl>)$0$0/{($0.Str.unival+1) x 3}/; say $x | 03:00 | |
camelia | rakudo-moar 77724b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unable to parse expression in single quotes; couldn't find final "'" at <tmp>:1------> 3l>)$0$0/{($0.Str.unival+1) x 3}/; say $x7⏏5<EOL> expecting any of: single quotes …» | ||
AlexDaniel | m: my $x = ‘❸❸❸’; $x ~~ s/(<:No+:Nd+:Nl>)$0$0/{($0.Str.unival+1) x 3}/; say $x | ||
camelia | rakudo-moar 77724b: OUTPUT«444» | ||
AlexDaniel | by the way why not **3 ? | 03:03 | |
ah, I see now | 03:04 | ||
killbill | AlexDaniel: it was just synthetic test | 03:08 | |
b2gills | m: my $x = ‘❸❸❸’; $x ~~ s/(<:N>)$0$0/{($0.Str.unival+1) x 3}/; say $x | ||
camelia | rakudo-moar 77724b: OUTPUT«444» | ||
03:09
bjz joined
|
|||
timotimo | aye, we allow you to get "exotic" numbers as numbers in perl6 source code, but not in Intifying strings with a + or .Numeric or anything like that | 03:09 | |
03:21
bjz left
|
|||
Ben_Goldberg | m: <❸❸❸>.perl.say | 03:32 | |
camelia | rakudo-moar 77724b: OUTPUT«"❸❸❸"» | ||
Ben_Goldberg | m: < ❸❸❸ >.perl.say | ||
camelia | rakudo-moar 77724b: OUTPUT«"❸❸❸"» | ||
Ben_Goldberg | m: ❸❸❸.perl.say | ||
camelia | rakudo-moar 77724b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Bogus postfixat <tmp>:1------> 3❸7⏏5❸❸.perl.say expecting any of: infix infix stopper statement end statement modifier statement modi…» | ||
Ben_Goldberg | m: (❸❸❸ + 1).perl.say | ||
camelia | rakudo-moar 77724b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Bogus postfixat <tmp>:1------> 3(❸7⏏5❸❸ + 1).perl.say expecting any of: infix infix stopper statement end statement modifier statemen…» | ||
03:33
zacts joined
|
|||
TimToady | you can't use non-digits as if they were digits | 03:34 | |
03:41
zacts left
|
|||
AlexDaniel | it's kinda funny | 03:43 | |
m: ‘❸’.uniname.say | |||
camelia | rakudo-moar 77724b: OUTPUT«DINGBAT NEGATIVE CIRCLED DIGIT THREE» | ||
AlexDaniel | … calls it a digit! | ||
m: ‘❸’.uniprop.say | |||
camelia | rakudo-moar 77724b: OUTPUT«No» | ||
AlexDaniel | m: ‘⓭’.uniname.say | 03:44 | |
camelia | rakudo-moar 77724b: OUTPUT«NEGATIVE CIRCLED NUMBER THIRTEEN» | ||
Ben_Goldberg | m: 'a'.uniprop.say; | ||
camelia | rakudo-moar 77724b: OUTPUT«Ll» | ||
03:44
khw left
|
|||
Ben_Goldberg | m: '42'.uniprop.say; | 03:44 | |
camelia | rakudo-moar 77724b: OUTPUT«Nd» | ||
AlexDaniel | by the way | 03:45 | |
m: ‘4a’.uniprop.say | |||
camelia | rakudo-moar 77724b: OUTPUT«Nd» | ||
AlexDaniel | ↑ shouldn't this warn or something? | ||
TimToady | it's a feature, if ord is a feature | 03:46 | |
AlexDaniel | m: ‘a4’.uniname.say | ||
camelia | rakudo-moar 77724b: OUTPUT«LATIN SMALL LETTER A» | ||
AlexDaniel | OK then | 03:47 | |
Ben_Goldberg | m: .chr.say for first { *.chr.uniprop eq 'No' }, ^Inf; | ||
camelia | rakudo-moar 77724b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Malformed double closure; WhateverCode is already a closure without curlies, so either remove the curlies or use valid parameter syntax instead of *at <tmp>:1------> 3.say for first { *.chr.uniprop eq…» | ||
TimToady | m: ‘a4’.uninames.say | ||
camelia | rakudo-moar 77724b: OUTPUT«(LATIN SMALL LETTER A DIGIT FOUR)» | ||
Ben_Goldberg | m: .chr.say for first { $_.chr.uniprop eq 'No' }, ^Inf; | ||
camelia | rakudo-moar 77724b: OUTPUT«²» | ||
Ben_Goldberg | m: .chr.print for grep { $_.chr.uniprop eq 'No' }, ^Inf; | 03:48 | |
AlexDaniel | and we still have no uniprops | ||
camelia | rakudo-moar 77724b: OUTPUT«(timeout)²³¹¼½¾৴৵৶৷৸৹୲୳୴୵୶୷௰௱௲౸౹౺౻౼౽౾൰൱൲൳൴൵༪༫༬༭༮༯༰༱༲༳፩፪፫፬፭፮፯፰፱፲፳፴፵፶፷፸፹፺፻፼៰៱៲៳៴៵៶៷៸៹᧚⁰⁴⁵⁶⁷⁸⁹₀₁…» | ||
Ben_Goldberg | No means "number, other" | ||
AlexDaniel | haha | ||
Ben_Goldberg | m: '৴'.uniname.say; | 03:49 | |
camelia | rakudo-moar 77724b: OUTPUT«BENGALI CURRENCY NUMERATOR ONE» | ||
Ben_Goldberg | m: '᧚'.uniname.say; | ||
camelia | rakudo-moar 77724b: OUTPUT«NEW TAI LUE THAM DIGIT ONE» | ||
03:49
webstrand left
03:54
kid51 left
|
|||
Ben_Goldberg | m: .chr.print for grep { $_.chr.uniname ~~ /TURNED/ }, gather { take $++ while time < ((INIT time) + 1) }; | 03:55 | |
camelia | rakudo-moar 77724b: OUTPUT«ƍƜǝɅɐɒɥɯɰɹɺɻʇʌʍʎʞʮʯʴʵxCAxBBxCCx92xE0xA3xA3xE1x83xB9ᴂᴈᴉᴔᴚᴟᵄᵆᵌᵎᵚᵷᶛᶣᶭᶺ℩Ⅎ⅁⅂⅄⅋ⅎ↊↋⌙⛉⛊❛❝⦢⯂ⱯⱰⱹⱻ⸲⸵⸸ꝾꝿꞀꞁꞍꞰꞱꟺ꧍ꭁꭂꭃꭄꭑ» | ||
Ben_Goldberg | m: .chr.print for grep { $_.chr.uniname ~~ m/FRAKTUR/ }, gather { my $c = 100000; take $c++ while time < (INIT {2 + time}) }; | 04:08 | |
camelia | rakudo-moar 77724b: OUTPUT«𝔄𝔅𝔇𝔈𝔉𝔊𝔍𝔎𝔏𝔐𝔑𝔒𝔓𝔔𝔖𝔗𝔘𝔙𝔚𝔛𝔜𝔞𝔟𝔠𝔡𝔢𝔣𝔤𝔥𝔦𝔧𝔨𝔩𝔪𝔫𝔬𝔭𝔮𝔯𝔰𝔱𝔲𝔳𝔴𝔵𝔶𝔷𝕬𝕭𝕮𝕯𝕰𝕱𝕲𝕳𝕴𝕵𝕶𝕷𝕸𝕹𝕺𝕻𝕼…» | ||
04:10
pierre_ left
04:29
labster left
04:31
Cabanossi left
04:35
Cabanossi joined
04:46
bjz joined
05:05
killbill left
05:09
bjz left
05:18
kurahaupo joined
|
|||
AlexDaniel | “Goo” is actually not a bad name for a programming language ( github.com/golang/go/issues/9 ) | 05:19 | |
ah, already taken? Just use “Gooo” then… | 05:20 | ||
05:23
bjz joined
05:25
wamba joined
05:35
pierre_ joined,
kurahaupo left
05:38
labster joined
05:51
zacts joined
06:06
Celelibi left
06:08
felher left
|
|||
doublec | AlexDaniel: goo was a lisp/dylan hybrid | 06:08 | |
06:09
andrzejku joined
|
|||
andrzejku | hello | 06:09 | |
06:13
smls joined
06:16
zacts left,
Celelibi joined
06:38
CIAvash joined
06:50
wamba left
06:58
skids left
|
|||
andrzejku | hi | 07:11 | |
07:17
Ben_Goldberg left
07:24
andrzejku left
07:32
setty1 joined
07:38
firstdayonthejob joined
07:40
brrt joined,
flaviusb joined
07:45
andrzejku joined,
andrzejku left
|
|||
smls | Hi | 07:48 | |
dalek | osystem: 7d2ff14 | (Shoichi Kaji)++ | META.list: Add MetaCPAN::Favorite to ecosystem See github.com/skaji/perl6-MetaCPAN-Favorite |
07:49 | |
07:56
RabidGravy joined
07:59
Tonik joined
08:19
rindolf joined
08:23
darutoko joined
08:37
zacts joined
|
|||
RabidGravy | boom | 08:46 | |
08:50
spider-mario joined
09:14
andrzejku joined
09:23
AlexDaniel left
09:29
rindolf left
|
|||
skaji | hi | 09:44 | |
m: my $*D; my $i = Supply.interval(1); $i.tap: { say $*D }; $i.wait; | |||
camelia | rakudo-moar 77724b: OUTPUT«Unhandled exception in code scheduled on thread 4Dynamic variable $*D not found in block at <tmp> line 1» | ||
skaji | is this expected? | 09:45 | |
09:50
wamba joined
09:53
pierre_ left
09:58
vimal2012 joined
10:01
brrt left
10:05
pierre_ joined
|
|||
vimal2012 | Is there a function to convert first letter of every word of a string to upper case? For example my $string="The quick brown fox" should be converted to "The Quick Brown Fox" | 10:09 | |
10:12
andrzejku left
|
|||
llfourn | m: vimal2012 try .wordcase | 10:12 | |
camelia | rakudo-moar 77724b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Undeclared routine: vimal2012 used at line 1» | ||
llfourn | m: "the quick brown fox".wordcase.say | ||
camelia | rakudo-moar 77724b: OUTPUT«The Quick Brown Fox» | ||
llfourn | vimal2012: ^ | ||
10:16
labster left
10:20
canopus left
10:25
sena_kun joined
|
|||
sena_kun | . | 10:25 | |
10:25
canopus joined
10:29
vimal2012 left
|
|||
llfourn | skaji: That's a bug. see RT #127033. | 10:33 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127033 | ||
10:34
sno left
|
|||
skaji | llfourn: thanks! | 10:35 | |
llfourn | you're welcome :) | 10:36 | |
10:36
pmurias joined
10:37
sno joined
10:46
TEttinger left
11:01
brrt joined
11:05
pierre_ left
11:10
KotH joined
11:13
felher_ joined,
pierre_ joined
11:27
cyphase left
11:28
cyphase joined
11:29
pierre_ left
11:32
edehont joined
11:34
rindolf joined
|
|||
timotimo | .seen skarsnik | 12:09 | |
yoleaux | I saw Skarsnik 6 Jul 2016 13:58Z in #perl6: <Skarsnik> RabidGravy, do you have an example of using it async? I'd like to have a Discord module that use the websocket api x) | ||
timotimo | :( | ||
RabidGravy | boom | 12:10 | |
masak | how do I mark an exception as handled in a CATCH? | 12:17 | |
timotimo | you successfully smartmatch against it, for example | ||
masak | what's the idiomatic way to say "if we get to this point, mark it as handled" | 12:19 | |
? | |||
12:19
pierre_ joined
|
|||
timotimo | hm, i don't know of an idiomatic way yet | 12:20 | |
masak | m: class X::Custom is Exception { method message { "OH NOES" } }; { die X::Custom.new; CATCH { say "in catch" } } | ||
camelia | rakudo-moar 77724b: OUTPUT«in catchOH NOES in block <unit> at <tmp> line 1» | ||
masak | m: class X::Custom is Exception { method message { "OH NOES" } }; { die X::Custom.new; CATCH { say "in catch"; $_ ~~ Any } } | ||
camelia | rakudo-moar 77724b: OUTPUT«in catchOH NOES in block <unit> at <tmp> line 1» | ||
masak | "successfully smartmatch" doesn't seem to be enough | ||
timotimo | hm. how does default { ... } do it, then? | ||
masak | m: class X::Custom is Exception { method message { "OH NOES" } }; { die X::Custom.new; CATCH { say "in catch"; default {} } } | ||
camelia | rakudo-moar 77724b: OUTPUT«in catch» | ||
masak | gonna go with `default {}` for now | ||
timotimo | oh | 12:22 | |
m: class X::Custom is Exception { method message { "OH NOES" } }; { die X::Custom.new; CATCH { say "in catch"; succeed } } | |||
camelia | rakudo-moar 77724b: OUTPUT«in catchsucceed without when clause in block at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
timotimo | m: class X::Custom is Exception { method message { "OH NOES" } }; { die X::Custom.new; CATCH { say "in catch"; proceed } } | ||
camelia | rakudo-moar 77724b: OUTPUT«in catchproceed without when clause in block at <tmp> line 1 in block <unit> at <tmp> line 1» | 12:23 | |
timotimo | hmm. | ||
masak | yeah; those only make sense inside a `when` clause, I guess | ||
timotimo | the default { } does a succeed at the end, i expect that just skips over the rethrow we code-gen for the CATCH block | ||
masak | aye | 12:24 | |
12:24
kid51 joined
12:34
skaji_ joined
12:35
kerframil left
12:43
pmurias left
12:45
lichtkind_ joined
|
|||
timotimo | neat, pypy got a flag for giving you a traceback for when the GC closes a file for you | 12:46 | |
so you can properly put "with" statements or close method calls where they need to go | |||
i think we could easily build something similar | |||
12:48
lichtkind left
12:51
araujo__ left
12:57
brrt left
13:01
araujo__ joined,
andrzejku joined
13:04
ovibos left
13:06
ovibos joined
13:13
andrzejku left
13:27
andrzejku joined
13:29
andrzejku left
13:36
andrzejku joined
13:40
harmil_wk left
|
|||
dalek | ateverable: 10eee4e | (Daniel Green)++ | / (2 files): Perl 6 rewrite of benchable |
13:40 | |
13:43
brrt joined
13:46
freezerburnv_ joined
13:50
zakharyas joined
|
|||
brrt | hmmm, how? do you want to record the code locations at every file open? | 13:50 | |
13:51
holyghost joined
13:53
andrzejku left
|
|||
dalek | c/revert-814-signature-test-option: 753a50d | Altai-man++ | / (18 files): Revert "New pod config option: 'signature'" |
13:59 | |
14:12
pierre_ left
14:19
travis-ci joined
|
|||
travis-ci | Doc build passed. Altai-man 'Revert "New pod config option: 'signature'"' | 14:19 | |
travis-ci.org/perl6/doc/builds/150421053 github.com/perl6/doc/commit/753a50d41da0 | |||
14:19
travis-ci left
|
|||
dalek | c: 753a50d | Altai-man++ | / (18 files): Revert "New pod config option: 'signature'" |
14:21 | |
c: 69198a3 | Altai-man++ | / (18 files): Merge pull request #815 from perl6/revert-814-signature-test-option Revert "New pod config option: 'signature'" |
|||
14:21
araujo__ left
14:22
araujo__ joined
14:24
brrt left
|
|||
dalek | c: ce5b9d9 | Altai-man++ | util/extract-examples.p6: The examples extractor was updated to complete signatures without config option |
14:27 | |
14:27
edehont left
14:29
kurahaupo joined,
zacts left
14:35
andrzejku joined
|
|||
dalek | c: 55b76fc | Altai-man++ | doc/Type/ (16 files): We don't need `{}` after signature to make it correct anymore |
14:36 | |
14:37
skids joined
14:43
telex left
14:44
telex joined
14:45
travis-ci joined
|
|||
travis-ci | Doc build failed. Altai-man 'We don't need `{}` after signature to make it correct anymore' | 14:45 | |
travis-ci.org/perl6/doc/builds/150425166 github.com/perl6/doc/compare/ce5b9...b76fc76cff | |||
14:45
travis-ci left
14:46
zacts joined
14:48
edehont joined
15:06
khw joined
15:08
itaipu joined
15:11
andrzejku left
15:12
xinming_ left
15:13
xinming joined,
andrzejku joined
|
|||
sena_kun | m: floor(1.1) := 42; CATCH { default { put .^name, ': ', .Str } }; | 15:26 | |
camelia | rakudo-moar 77724b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Cannot use bind operator with this left-hand sideat <tmp>:1------> 3floor(1.1) := 427⏏5; CATCH { default { put .^name, ': ', .S» | ||
15:36
zakharyas left
15:38
zakharyas joined,
zacts left
15:39
edehont left
15:41
freezerburnv_ left
15:45
andrzejku left
15:48
zakharyas left,
ribasushi left
15:49
nicq20 joined
15:51
ribasushi joined
|
|||
dalek | c: 653b91c | Altai-man++ | doc/Language/functions.pod6: Index "is assoc", closes github.com/perl6/doc/issues/817 |
15:54 | |
15:56
andrzejku joined
|
|||
dalek | c: 62e617f | Altai-man++ | doc/Type/ (9 files): Now Backtrace, Bag, BagHash, Baggy, Blob, Block, Bind and two exceptions are compilable |
15:58 | |
16:00
itaipu left
16:01
bob777 left
16:02
bob777 joined,
kid51 left,
Khisanth left
16:16
nicq20 left,
kid51 joined,
travis-ci joined
|
|||
travis-ci | Doc build passed. Altai-man 'Index "is assoc", closes github.com/perl6/doc/issues/817' | 16:16 | |
travis-ci.org/perl6/doc/builds/150435939 github.com/perl6/doc/compare/55b76...3b91ce3611 | |||
16:16
travis-ci left
16:19
travis-ci joined
|
|||
travis-ci | Doc build passed. Altai-man 'Now Backtrace, Bag, BagHash, Baggy, Blob, Block, Bind and two exceptions are compilable' | 16:19 | |
travis-ci.org/perl6/doc/builds/150436431 github.com/perl6/doc/compare/653b9...e617f4c2d7 | |||
16:19
travis-ci left
16:22
captain-adequate joined
16:24
kid51 left
16:32
rindolf left,
itaipu joined,
pierre_ joined
16:35
araujo_ joined
16:36
andrzejku left
16:37
araujo_ left,
Khisanth joined,
araujo_ joined
16:38
kid51 joined,
araujo__ left
16:41
andrzejku joined
16:43
kid51 left
16:50
kid51 joined
17:13
pierre_ left
17:29
rindolf joined
|
|||
dalek | c: 56acfc8 | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6: close C<> |
17:36 | |
c: 2cc567c | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6: doc role arguments |
|||
c: 612cdb5 | (Wenzel P. P. Peppmeyer)++ | doc/ (2 files): index type capture |
|||
17:37
smls left
17:40
itaipu left
|
|||
dalek | ateverable: 3c2feb5 | (Daniel Green)++ | Benchable.p6: Fixed a typo and such |
17:47 | |
17:52
cognominal joined
|
|||
grondilu | was thinking of a way to test if an integer is a power of an other. Turns out log($a) %% log($b) works. Nice. | 18:01 | |
m: say log(9) %% log(3) | |||
camelia | rakudo-moar 77724b: OUTPUT«True» | ||
grondilu | m: say log(9) %% log(2) | ||
camelia | rakudo-moar 77724b: OUTPUT«False» | ||
dalek | c: 52cb8a5 | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6: close C<> |
18:10 | |
c: 804011a | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6: remove left behind heading |
|||
c: 3e40128 | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6: add missing heading |
|||
c: 3624102 | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6: fix example |
|||
18:10
ribasushi left
18:16
ribasushi joined
18:23
pmurias joined
18:42
andrzejku left
18:44
labster joined
18:48
zakharyas joined
19:00
andrzejku joined
|
|||
andrzejku | Perl is friend, Perl is love | 19:05 | |
x) | |||
19:06
Tonik left
19:14
labster left
19:20
edehont joined
19:24
itaipu joined
19:28
edehont left
19:29
darutoko left
19:34
ovibos left
19:37
ovibos joined,
andrzejku left,
AlexDaniel joined
19:38
labster joined
19:40
rpburkholder joined
19:49
LLamaRider joined,
LLamaRider left,
kaare_ left
|
|||
labster | m: say "\x[0e53]".succ eq "\x[0e53]" | 19:50 | |
camelia | rakudo-moar 77724b: OUTPUT«True» | ||
labster | m: say "\x[0e53] ", uniname("\x[0e53]"); | 19:51 | |
camelia | rakudo-moar 77724b: OUTPUT«๓ THAI DIGIT THREE» | ||
masak | labster: ...so three follows on three? | 19:52 | |
labster | m: say "\x[0e54] ", uniname("\x[0e54]"); # Usually four follows three | 19:53 | |
camelia | rakudo-moar 77724b: OUTPUT«๔ THAI DIGIT FOUR» | ||
labster | Also hi masak! | 19:54 | |
masak | ahoj | 19:55 | |
moritz | aloha! | 19:59 | |
labster | Is moritz coming or going? | 20:01 | |
moritz | or is he here to stay? who knows? | ||
timotimo | gekommen um zu bleiben. | 20:02 | |
20:02
bartolin joined
|
|||
moritz | three weeks of vacation ahead \o/ | 20:05 | |
including some travel to Denmark | |||
20:07
itaipu left
|
|||
labster | sounds great | 20:07 | |
awwaiid | niec! | ||
er, nice! | |||
labster | Nice isn't in Denmark, though. | 20:09 | |
awwaiid | give or take | ||
DrForr | But Billund is :) | ||
labster files thai digits rakudobug | 20:10 | ||
moritz | DrForr: indeed, we'll visit there as well | 20:14 | |
20:15
itaipu joined
|
|||
DrForr | moritz: I don't know if they're still available, but you might want to follow the sculpture path into town; the first restaurant you find sells (or at least did sell) a LEGO rarity - The model of the LEGO museum is only available in Billund. | 20:17 | |
pmurias | DrForr: is the model of the LEGO museum made of LEGOs? | 20:18 | |
DrForr | Of course. I have 3 :) | 20:19 | |
grondilu was writing |@somearray and was wandering if we could create a sigil for "flat" arrays. | |||
grondilu also wondered if it is possible to create sigils at runtime. | 20:20 | ||
s/create/define/ | |||
timotimo | with slangs, everything is possible | ||
moritz | though not at runtime | ||
syntactic features can only be added at compile time | |||
timotimo | one man's run time is another's compile time | 20:21 | |
grondilu | ok runtime was not the correct expression. How would you call a modification that is made by the program and not by the core? | ||
"user code" or something? | 20:22 | ||
sena_kun | grondilu, you mean reflection? | ||
moritz | use-space code, yes | ||
*user | |||
grondilu | "user space" indeed | 20:23 | |
20:24
killbill joined,
BenGoldberg joined
20:26
brrt joined
|
|||
brrt | i've been thinking of macros for a bit again | 20:28 | |
guess that means i should try out 007 | |||
timotimo | probably :) | 20:29 | |
20:29
zakharyas left
|
|||
killbill | what I should change in the regex in /𝐀𝐁𝐂/ === /ABC/ to get True? ( former is Mathematical Alphanumeric Symbols block, latter is Latin one) | 20:30 | |
pmurias | brrt: re finding unclosed filehandles, wouldn't recording the locations where they are opened be a resonable implementation? | 20:36 | |
brrt | pmurias: reasonable, yes | 20:37 | |
timotiom's suggestion was that pypy gave full tracebacks | |||
which means you have to maintain and keep alive full stack traces every time you open a file | |||
just for debugging | |||
seems... expensive | 20:38 | ||
timotimo | yeah, for pypy the flag is optional | ||
we can have this as a module that wraps the constructor of IO::File :P | 20:39 | ||
we don't need support in the core or backend or anything | |||
user code can do that | |||
brrt | hmm | 20:40 | |
that | |||
makes sense | |||
actually, do we have destructors? | |||
timotimo | yes, we do have submethod DESTROY | ||
brrt | aha | ||
timotimo | we have that in Failure already to warn when Failure objects get destroyed before they get handled | ||
which usually means a .sink is missing or something | 20:41 | ||
brrt | but i suppose IO::File already has a DESTROY? can we augment that and still call the original implementation? | ||
i recall not having destructors some eons ago | 20:42 | ||
timotimo | we can probably wrap it | ||
yeah, we used to not have them | |||
and now they're sot guaranteed to run, even | |||
20:45
Sgeo__ left,
Sgeo joined
|
|||
moritz | ok, weird idea | 20:46 | |
have a separate memory pool for objects of classes with DESTROY methods | |||
then, before interpreter exit, iterate over them all, and call of their DESTROY methods (without doing a full GC run) | |||
20:48
yqt joined
|
|||
brrt | hmmm | 20:49 | |
don't we already have a full-clean exit? | 20:50 | ||
mode | |||
also, why a separate pool? that means you have to know at memory allocation time | |||
meaning you have a problem if a DESTROY role is ever mixed in | 20:51 | ||
i'm not 100% sure that is true, though | |||
gfldex | m: class B {...}; class A { trusts B; has $!foo }; class B { submethod BUILD { my $an_A = A.new(); $an_A!A::foo = 42 } }; dd B.new; | 20:52 | |
camelia | rakudo-moar 77724b: OUTPUT«No such private method '!foo' for invocant of type 'A' in submethod BUILD at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
20:53
TEttinger joined
|
|||
timotimo | i don't think trusts allows you to get at private attributes, only methods? | 20:56 | |
gfldex | running S12-attributes/trusts.t fails, so that may NYI | 20:57 | |
timotimo | mhh | ||
gfldex | m: class B {...}; class A { trusts B; has $!foo = 42; method !foo { return-rw $!foo }; method perl { "A.new(foo => $!foo)" } }; class B { has A $!a .= new; method change { dd $!a; my $an_A = $!a; $an_A!A::foo } }; dd B.new.change; | 20:59 | |
camelia | rakudo-moar 77724b: OUTPUT«A $!a = A.new(foo => 42)42» | ||
timotimo | try method !foo is rw { $!foo } instead | 21:00 | |
i think return-rw without "is rw" is trouble | |||
(and we should probably do something about that) | |||
El_Che | I am looking into porting a perl5 module I use often (5 minutes here, 5 minutes there), and all the perl6 enhancements make it impossible toeven try a 1:1 port | 21:02 | |
that bad and great at the same time :) | |||
timotimo | aaw | ||
21:03
lichtkind__ joined
|
|||
DrForr | What module? | 21:03 | |
El_Che | perl-ldap if you keep it quiet. I have new method and some attributes :) | 21:04 | |
DrForr | Oh, right, should've guessed. | ||
El_Che | eg., one of the modules accepts potitional parameters for new, but that pretty non-perl6 style | 21:05 | |
21:05
lichtkind_ left
|
|||
El_Che | DrForr: yeah, I wrote the program I needed using the perl5 modules :) | 21:05 | |
timotimo | i don't have a problem with positional arguments to .new | ||
i've biult a few things with that kind of interface (optionally, usually) | |||
DrForr | Incidentally Perl6::Tidy roundtrips all basic operators and declarations (epsilon whitespace) | 21:06 | |
El_Che | timotimo: I am very fond of the 'has' way of doing thing of Moose and p6 | ||
dalek | c: f96ce35 | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6: doc trusts |
||
timotimo | fair enough | 21:07 | |
El_Che | an other example, there is a method that accepts one parameter as the subject (dn) and the second as a values (str) or values (arrayref). Could be done with a multimethod, but varargs seems also a good alternative | 21:09 | |
DrForr | You can override creation with a custom new() method if you need to, but ... Is the first 'values' a string with a comma or otherwise delimited list, vs. an aray of single items? | 21:13 | |
21:14
killbill left
21:18
trnh joined
|
|||
El_Che | the first is "$entry->add ( 'sn' => 'Barr' )", the second " $entry->add ( 'street' => [ '1 some road','nowhere' ] );" | 21:18 | |
the fat comma is justa comma ofcourse, so I was thinking of "method add (Str $attribute, *@values) {...}" | |||
21:18
rindolf left
|
|||
DrForr | Oh, I wouldn't separate them in that case. | 21:19 | |
El_Che | indeed | ||
21:20
grondilu left,
MorayJ joined
21:22
grondilu joined
21:23
CIAvash left
|
|||
dalek | c: 8e4234a | (Wenzel P. P. Peppmeyer)++ | util/extract-examples.p6: shield better against redeclarations |
21:30 | |
c: 8cac1b2 | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6: make examples compile |
|||
timotimo | $entry{'street'} = [ '1 some road', 'nowhere' ]; # how about this? :) | 21:31 | |
El_Che | timotimo: that's why I had at first. I am looking how it's used in the rest of the codebase | 21:33 | |
21:37
wamba left
21:45
pmurias left
|
|||
El_Che | I am correcting this (docs.perl6.org/language/5to6-nutsh...-constant) to align it with this (docs.perl6.org/language/terms#inde...Terms%29). I am removing the sigil of the perl6 constant in the perl5to6 doc. Question: The perl5to6 doc uses all capitals like in perl5 while the Term doc capitalizes only the first letter. What's common practive for | 21:47 | |
21:47
DarthGandalf left
|
|||
El_Che | constants in perl6. I'll like the doc to be consistent | 21:47 | |
21:48
DarthGandalf joined
21:49
brrt left
21:50
BenGoldberg left
|
|||
dalek | c: a79f40d | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6: remove TODO |
21:50 | |
lizmat | El_Che: not sure: internally both ALLCAPS as well as CamelCase is used (e.g. IterationEnd vs REQUIRE_DYNAMIC) | 21:51 | |
dalek | c: 3c165ca | (Claudio Ramirez)++ | doc/Language/5to6-nutshell.pod6: Remove sigil from perl6 constant in accordance with the Term doc |
||
c: 8ed43c4 | nxadm++ | doc/Language/5to6-nutshell.pod6: Merge pull request #820 from nxadm/master Remove sigil from perl6 constant in accordance with the Term doc |
|||
El_Che | lizmat: I'll replace the example of docs.perl6.org/language/terms#Constants as it a confusing one. It defines a Pi constant while there is one in core | 21:55 | |
lizmat | El_Che++ | ||
21:56
BenGoldberg joined
|
|||
gfldex | sena_kun: counting the examples that still fail: time find examples/ -type f -exec nohup perl6 '{}' '2>/dev/null 1>/dev/null' ';' -or -print 2>/dev/null | wc -l | 22:02 | |
dalek | c: 0397c1f | (Claudio Ramirez)++ | doc/Language/terms.pod6: Choose beter constant examples (pi is alreay a builtin term) |
||
c: 2e26deb | nxadm++ | doc/Language/terms.pod6: Merge pull request #821 from nxadm/master Choose beter constant examples (pi is alreay a builtin term) |
|||
BenGoldberg | m: (1+sqrt 5)/2.say | 22:06 | |
camelia | rakudo-moar 77724b: OUTPUT«WARNINGS for <tmp>:Useless use of "/" in expression "(1+sqrt 5)/2.say" in sink context (line 1)2» | ||
BenGoldberg | m: ((1+sqrt 5)/2).say | ||
camelia | rakudo-moar 77724b: OUTPUT«1.61803398874989» | ||
22:07
itaipu left
|
|||
BenGoldberg | m: ((1+sqrt 5)/2).Rat.say | 22:07 | |
camelia | rakudo-moar 77724b: OUTPUT«1.618034» | ||
BenGoldberg | m: ((1+sqrt 5)/2).Rat.perl.say | ||
camelia | rakudo-moar 77724b: OUTPUT«<1597/987>» | ||
22:07
trnh left
|
|||
BenGoldberg | m: my $phi = ((1+sqrt 5)/2); ($phi - $phi.Rat).say | 22:07 | |
camelia | rakudo-moar 77724b: OUTPUT«-4.59071787028975e-07» | ||
BenGoldberg | m: my $phi = ((1+sqrt 5)/2); ($phi - 8944394323791464/5527939700884757).say | 22:11 | |
camelia | rakudo-moar c8c27e: OUTPUT«0» | ||
BenGoldberg wonders how we presently convert Num to Rat. | 22:12 | ||
Surely it can't be that hard, to make .Rat.Num round trip precisely. | 22:16 | ||
22:17
firstdayonthejob left
|
|||
lizmat | BenGoldberg: feels to me that would require mixing in the original Rat into the Num | 22:20 | |
sena_kun | gfldex, I'm fixing it in an alphabet fashion, but thanks. Much of them were fixed by signature detection, by the way. | ||
22:22
canopus left
22:27
canopus joined
|
|||
BenGoldberg | m: sub ratify(Num $n is copy) { my $s = sign($n) or return 0.Rat; $n .= abs; my $denom = 2**(53-log( $n, 2 ).Int); $s * ($n*$denom).Int / $denom }; say ratify(pi) - pi; | 22:30 | |
camelia | rakudo-moar c8c27e: OUTPUT«0» | ||
BenGoldberg | m: sub ratify(Num $n is copy) { my $s = sign($n) or return 0.Rat; $n .= abs; my $denom = 2**(53-log( $n, 2 ).Int); $s * ($n*$denom).Int / $denom }; say ratify(pi).perl; | ||
camelia | rakudo-moar c8c27e: OUTPUT«3.141592653589793115997963468544185161590576171875» | ||
BenGoldberg | m: sub ratify(Num $n is copy) { my $s = sign($n) or return 0.Rat; $n .= abs; my $denom = 2**(53-log( $n, 2 ).Int); $s * ($n*$denom).Int / $denom }; say ratify(pi).nude; | ||
camelia | rakudo-moar c8c27e: OUTPUT«(884279719003555 281474976710656)» | ||
dalek | c: fca225c | (Wenzel P. P. Peppmeyer)++ | doc/Language/containers.pod6: make examples compile |
22:35 | |
BenGoldberg | m: sub ratify(Num $n is copy) { my $s = sign($n) or return 0.Rat; $n .= abs; my $denom = 2**(53-log( $n, 2 ).Int); $s * ($n*$denom).Int / $denom }; say ratify(pi) - pi.Rat;; | 22:36 | |
camelia | rakudo-moar c8c27e: OUTPUT«-0.000000266764189185» | ||
BenGoldberg | m: pi.perl.say; | 22:37 | |
camelia | rakudo-moar c8c27e: OUTPUT«3.14159265358979e0» | ||
22:40
rpburkholder left
22:44
setty1 left
22:47
bjz left
|
|||
dalek | c: c4e3f84 | (Wenzel P. P. Peppmeyer)++ | doc/Language/contributors.pod6: make examples compile |
22:48 | |
22:48
kurahaupo left
22:51
itaipu joined
|
|||
skids | What do we use to pass a NULL to a nativecall "int32 $foo is rw"? "int32" does not work. | 23:00 | |
"Native call expected argument that references a native integer, but got P6int" | 23:01 | ||
geekosaur | Pointer[int32]? | 23:05 | |
sena_kun | skids, I haven't used nativecall for a while, but maybe "Pointer[Int32]"? Since NULL is just a pointer. It works in my code, at least. See github.com/Altai-man/perl6-Compres...Raw.pm6#L7 | ||
timotimo | can't have Int32, just int32 | 23:06 | |
sena_kun | timotimo, ah, yes, it's a typo. | ||
skids | I did already try Pointer[int32] but that gives same error message, just s/P6int/CPointer/ | 23:07 | |
sena_kun | And "uint32" to be precise. | ||
23:08
RabidGravy left
|
|||
sena_kun | skids, do you use it as a constant or what? Can you give a piece of the actual code, please? | 23:08 | |
skids tries to find a C stdlib with an int * | |||
timotimo | it's no longer CPointer | 23:09 | |
i think instead of Pointer.new(0) you should just pass the type object | |||
skids | right I use "Pointer[int32]", rakudo error message is "but got CPointer" | ||
sena_kun | skids, perl6 -v? | 23:10 | |
skids | This is Rakudo version 2016.07.1-74-g4be4609 built on MoarVM version 2016.07-6-gfd7fe64 | ||
timotimo | what's the "wanted" part before "but got CPointer"? | 23:11 | |
skids | "Native call expected argument that references a native integer, but got CPointer' | ||
timotimo | oh | ||
in that case it may be enough to use "int32 $foo is rw" in your method declaration | |||
sena_kun | skids, ah, okay. You can try to do what timotimo said then. He was too quick for me. (: | 23:12 | |
timotimo | and when you have that, you just pass a "my int $foo" directly | 23:13 | |
i'm going to bed, i'm really tired | |||
have a good one! | |||
skids | that's what I have: | ||
sub xcb_connect (str $display, int32 $screen is rw --> xcb_connection_t) | |||
sena_kun | timotimo, good night! | ||
skids, in a repl it seems good. Without return type. Something like `sub xcb_connect(Str $dpn, int32 $screen is rw) is native("xcb", v1) { * };`. Was your problem solved? | 23:19 | ||
skids | no, the problem happens durin the call. | 23:21 | |
sena_kun | Ah, it was expected. | 23:22 | |
Can you provide a minimal example gist to reproduce? | |||
skids | m: sub xcb_connect(Str $dpn, int32 $screen is rw) is native("xcb", v1) { * }; xcb_connect(Str, Pointer[int32); | 23:23 | |
camelia | rakudo-moar c8c27e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Can't use unknown trait 'is native' in a sub declaration.at <tmp>:1 expecting any of: rw raw hidden-from-backtrace hidden-from-USAGE pure default DEPRECATED inlinable nodal …» | ||
skids | m: use NativeCall; sub xcb_connect(Str $dpn, int32 $screen is rw) is native("xcb", v1) { * }; xcb_connect(Str, Pointer[int32); | 23:24 | |
camelia | rakudo-moar c8c27e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unable to parse expression in type parameter; couldn't find final ']' at <tmp>:1------> 031) { * }; xcb_connect(Str, Pointer[int327⏏5);» | ||
skids | m: use NativeCall; sub xcb_connect(Str $dpn, int32 $screen is rw) is native("xcb", v1) { * }; xcb_connect(Str, Pointer[int32]); | ||
camelia | rakudo-moar c8c27e: OUTPUT«Native call expected argument that references a native integer, but got CPointer in method CALL-ME at /home/camelia/rakudo-m-inst-1/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 328 in block <unit> at <tmp> line 1…» | ||
skids | there we go | ||
skids builds fresh rakodu JIC. | |||
sena_kun | m: use NativeCall; sub xcb_connect(Str $dpn, int32 $screen is rw) is native("xcb", v1) { * }; my int32 $n = 0; xcb_connect("name", $n); | 23:27 | |
camelia | ( no output ) | ||
sena_kun | m: use NativeCall; sub xcb_connect(Str $dpn, int32 $screen is rw) is native("xcb", v1) { * }; my int32 $n = 0; say xcb_connect("name", $n); | 23:28 | |
camelia | rakudo-moar c8c27e: OUTPUT«(Mu)» | ||
skids | star: use NativeCall; sub xcb_connect(Str $dpn, int32 $screen is rw --> Pointer) is native("xcb") { * }; xcb_connect("0:0",uint32); | ||
camelia | star-m 2016.04: OUTPUT«Native call expected argument that references a native integer, but got P6int in method CALL-ME at sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 301 in block <unit> at <tmp> line 1» | ||
skids | star: use NativeCall; sub xcb_connect(Str $dpn, int32 $screen is rw --> Pointer) is native("xcb") { * }; xcb_connect("0:0",Pointer[int32]); | ||
camelia | star-m 2016.04: OUTPUT«Native call expected argument that references a native integer, but got CPointer in method CALL-ME at sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 301 in block <unit> at <tmp> line 1» | ||
sena_kun | In the examples here - xcb.freedesktop.org/tutorial/ they used null in both arguments, but C rules of types are loose. | ||
geekosaur | I think this si a known shortcoming of NativeCall | 23:29 | |
skids | is it RTd? | ||
sena_kun | Am I the only one who didn't get it? You can't pass a type instead of a value, can you? Or I misunderstood something. | 23:31 | |
skids | Passing the type is how you get a C NULL. | ||
sena_kun | skids, ah. | 23:32 | |
geekosaur | I don't see it in RT. I'm sure I've seen this discussed before | ||
sena_kun | It seems I need to refresh my own knowledge of how current nativecall works before helping someone. (: | ||
23:34
MorayJ left
23:36
spider-mario left
23:38
TEttinger left
|
|||
TimToady | .tell killbill Try something like this: say '𝐀𝐁𝐂'.NFKD.Str === 'ABC' | 23:39 | |
yoleaux | TimToady: I'll pass your message to killbill. | ||
23:42
TEttinger joined
23:43
Actualeyes joined
23:44
johnchalekson joined
23:57
_28_ria joined
|