»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by masak on 12 May 2015. |
|||
00:05
znpy joined
|
|||
dalek | href="https://modules.perl6.org/new-db-builder:">modules.perl6.org/new-db-builder: 603b213 | (Zoffix Znet)++ | / (8 files): Ditch `logo` from the Dists model We can now auto-generate logosprites from dist names and checking the logotype dir for the actual file, so we don"t need to store that piece of data in DB |
00:06 | |
00:10
psch left
00:15
cdg left
|
|||
ab5tract | m: say +"@a = []".comb < +"@a.clear" | 00:22 | |
camelia | rakudo-moar : OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '7⏏5\@a.clear' (indicated by 7⏏) in block <unit> at /tmp/uDz2KAbbcX:1Actually thrown at: in block <unit> at /tmp/uDz2KAbbcX:1» | ||
ab5tract | m: say +"@a = []".comb < +"@a.clear".comb | ||
camelia | rakudo-moar : OUTPUT«True» | ||
dalek | href="https://modules.perl6.org/new-db-builder:">modules.perl6.org/new-db-builder: 76486e8 | (Zoffix Znet)++ | lib/ (4 files): Toss dists no longer in ecosystem from db on build complete |
00:35 | |
00:38
secwang left
00:42
secwang joined
|
|||
dalek | href="https://modules.perl6.org/new-db-builder:">modules.perl6.org/new-db-builder: 727a71e | (Zoffix Znet)++ | lib/ (2 files): Refactor: get deleted dists num prior to dumping them instead of fetching all rows twice in db builder |
00:44 | |
00:50
BenGoldberg joined
|
|||
dalek | href="https://modules.perl6.org/new-db-builder:">modules.perl6.org/new-db-builder: 5f9443f | (Zoffix Znet)++ | / (13 files): Move DbBuilder classes inside the ModulesPerl6:: namespace |
00:53 | |
href="https://modules.perl6.org/new-db-builder:">modules.perl6.org/new-db-builder: b617f22 | (Zoffix Znet)++ | t/01-models/02-dists.t: Fix tests: ::Dists model ->remove_old now returns num of dists dumped instead of invocant |
00:55 | ||
rl6-most-wanted: cee0cf6 | (David Warring)++ | most-wanted/modules.md: Update modules.md Mention PDF::Grammar,PDF-Tools and Crypt::RC4 |
|||
01:05
yeahnoob joined
01:06
adhoc_ joined,
adhoc_ is now known as adhoc
01:12
znpy left,
vendethiel left
|
|||
dalek | href="https://modules.perl6.org/new-db-builder:">modules.perl6.org/new-db-builder: e58d9ca | (Zoffix Znet)++ | lib/ModulesPerl6/DbBuilder/Dist (3 files): Add PostProcessor plugin pipeline |
01:15 | |
perlawhirl | hellow all... is there a way i can do a 'getch()' type function ( without importing the NCurses module ) | 01:20 | |
ie... i want to read one string without waiting for a newline | |||
i mean... one char | |||
gfldex | perlawhirl: see github.com/rakudo/rakudo/blob/bceb...le.pm#L171 | 01:26 | |
uruwi | Hold on perlawhirl | 01:27 | |
github.com/bluebear94/messing-arou...er/kbd.pl6 | 01:28 | ||
You might want to look at this | |||
It requires a Unix-like environment, though | |||
gfldex, I tried using it and it _does_ wait for a newline; one can solve this by using `stty raw noecho` | 01:30 | ||
01:32
leont left
|
|||
uruwi | Okay, does anyone know of a portable solution... | 01:33 | |
gfldex | please note that with stty raw you may have to handle ^C by hand | 01:34 | |
uruwi | ^ | 01:35 | |
though in my example I bind it to `q` :P | |||
01:36
yeahnoob left
|
|||
uruwi | But stty raw is useful if you don't want users (in)advertently exiting the program. | 01:37 | |
konobi | tput? | 01:39 | |
geekosaur | ? tput is still unix specific... | 01:40 | |
perlawhirl | i am on linux so can call stty... will have a go at that... eventually someone will write a Term::ReadKey module :D | 01:41 | |
geekosaur | also: I wouldn't use stty raw unless you really need to block terminal signals as well. stty -icanon min 1 time 1 | ||
konobi | geekosaur: not really... the same mechanism works on win32, you just need a win32 termcap thing | ||
geekosaur | and tput is output, doesn't help with input | 01:43 | |
zengargoyle | input and output are the same-ish talking to a tty. | ||
geekosaur | tput does not call the terminfo ioctls | ||
er, termios | |||
zengargoyle | holdover from the days when display and keyboard were connected to computer over serial. | ||
uruwi | * `stty raw -echo time 1` | ||
geekosaur | tput is terminfo database lookups | 01:44 | |
konobi | geekosaur: the node.js "blessed" library seems to cope pretty well with tty's without needing to link to any libraries | ||
zengargoyle | all communication between the two is escape codes on that 2-way pipe. | ||
konobi | steal stuffz! | ||
geekosaur | zengargoyle, changing to character oriented input is not an escape sequence | ||
whatever, this looks like everyone reverted to 4.2BSD when I wasn't looking | 01:45 | ||
zengargoyle | i think it's just moves to the pseudo tty layer. | ||
geekosaur | what does that have to do with | ||
never mind | |||
konobi | geekosaur: github.com/chjj/blessed | ||
geekosaur | konobi, you are remarkably good at missing the point | 01:46 | |
when did I say anything abotu libraries | |||
but I think I'm just going to back out because there's so much incorrect and circa-1982 info here that it's not worth it | |||
konobi | geekosaur: tput is termcap and terminfo... so you get input and output | 01:47 | |
geekosaur | konobi, tput is a program, not a library | ||
it queries the terminfo database | |||
it does not do input | |||
konobi | mmm... might be the terminology on the package... but i swear it does input and output | ||
geekosaur | in particular it does not make stty calls for you | ||
man 1 tput | 01:48 | ||
konobi | well, termcap does the stty stuff, iirc | ||
geekosaur | what I suspect is meant there is that it uses the tput program to do output escape sequences and possibly to look up function key definitions | ||
konobi | anyways... it's all in plain JS there... so no C library linking needed | 01:50 | |
uruwi | It uses the node standard library. | ||
The Perl 6 base libraries might not have the same capabilities. | |||
konobi | a small amount | ||
01:51
adhoc left
|
|||
uruwi | Which brings me to wondering why the Perl6 NCurses bindings won't work on Cygwin | 01:52 | |
01:52
adhoc joined
01:53
xpen joined,
z8 joined
|
|||
konobi | uruwi: actually... it only uses fs/path stuff from node core... the rest is all natural | 01:55 | |
01:55
kid51 left
|
|||
uruwi | Seems to use event emitters, too | 01:56 | |
I don't know if Perl6 has an equivalent... | |||
konobi | when it all comes down to it... it's all just escape sequences on a tty anyway | ||
uruwi | I know. | 01:57 | |
The question is how to disable line buffering. | |||
konobi | lemme see | 01:58 | |
geekosaur | that is not done with an escape sequence | ||
it is done with an ioctl to the tty driver | |||
there *are* escape sequences output afterward, usually, because old terminals used to require stupid stuff, and usually one switches to/from the alternate screen, but outputting those escapes does not switch you out of line mode | 02:01 | ||
02:01
Some-body_ joined
02:02
DarthGandalf left,
Some-body_ is now known as DarthGandalf
|
|||
konobi | geekosaur: ugh... i'd have to delve back into bootloader code to work it out again | 02:03 | |
geekosaur | it's using stty, not tput | 02:04 | |
stty doesn't output escape sequences, it uses driver ioctls | |||
zengargoyle | www.linusakesson.net/programming/tty/ - may be an interesting read | 02:06 | |
02:09
Actualeyes joined
02:10
Ben_Goldberg joined
02:11
Ben_Goldberg left,
Ben_Goldberg joined,
Ben_Goldberg left
02:12
Ben_Goldberg joined
|
|||
geekosaur was the author of the tty section of the first edition of _Unix Power Tools_, fwiw. it's not in later editions because POSIX took over and you no longer needed to know whether you had to use stty(), ioctl(TIOCSTTY), or ioctl(TCSETA)... | 02:12 | ||
02:12
BenGoldberg left
|
|||
geekosaur | (had to know that even if using the stty command because the different systems had different stty options) | 02:14 | |
02:14
adhoc left,
dayangkun joined
|
|||
konobi | yeah... solaris tty stuff was a huge PITA initially | 02:14 | |
02:23
diakopter___ left
|
|||
zengargoyle | ah, SunOS. accidentally have caps-lock set on your termnal and it thinks you just don't do case at all... W\E\L\C\O\M\E \T\O S\U\U\NOS | 02:28 | |
02:29
secwang left
|
|||
geekosaur | STTY -OLCUC -IUCLC | 02:30 | |
zengargoyle | more like \E\X\I\T (unset caps-lock) login again... ;) | 02:31 | |
geekosaur | not with the backslashes... | ||
02:33
z8 left
02:35
BenGoldberg_ joined
|
|||
zengargoyle | i don't remember it being that easy. but it was a *long* time ago. | 02:36 | |
geekosaur | iirc the gotcha there was it also turned off icrnl so you had to use EXIT<control-J> | 02:37 | |
or something silly like that | |||
02:37
kaare_ joined
02:38
BenGoldberg_ left,
Ben_Goldberg left,
BenGoldberg_ joined
02:39
adhoc joined,
molaf_ joined
|
|||
geekosaur | but it treated uppercase as lowercase and used backslash to indicate uppercase | 02:40 | |
konobi | bah... i'll have to follow up. | ||
02:43
molaf left
02:45
adhoc left
02:46
Ben_Goldberg joined
02:47
zengargoyle left,
adhoc joined
02:49
BenGoldberg_ left,
zengargoyle joined
02:53
Mhoram joined,
abaugher left
02:54
BenGoldberg joined
02:56
Ben_Goldberg left,
BenGoldberg left,
BenGoldberg joined
03:01
telex left
03:02
telex joined
|
|||
perlawhirl | uruwi: That kbd script... is that yours? | 03:03 | |
03:09
vendethiel joined
03:18
noganex_ joined,
yqt left
03:20
noganex left
|
|||
skids | perlawhirl: gist.github.com/skids/0b1cfabedddd95a824c8 is from some unpublished code I've started to pay with. It is not portable off UNIX but is does handle the cases like cat foo | perl6 interactive-script.pm where stdin != tty. Right now the IO system is still too abstract to make this easy. | 03:23 | |
*play | |||
03:29
kaare_ left
03:32
yeahnoob joined,
vendethiel left,
AlexDaniel left
|
|||
perlawhirl | thanks skids will check it out | 03:34 | |
03:37
yeahnoob left
03:38
cdg joined
03:48
hankache joined,
hankache left
03:49
hankache joined,
jevin joined
03:50
jevin_ left
03:54
yeahnoob joined
04:10
zengargoyle left
04:13
zengargoyle joined
04:34
kmel joined
04:38
hankache left,
hobbs left
04:40
hobbs joined
04:45
cdg left
04:54
kmel left
05:03
geraud left,
skids left
05:04
geraud joined
05:29
molaf_ left
|
|||
JimmyZ | m: use Test; use Test; | 05:33 | |
camelia | ( no output ) | ||
05:40
perlawhirl left
05:54
khw left
06:03
zengargoyle left
06:30
BenGoldberg left
06:38
dalek left,
dalek joined,
ChanServ sets mode: +v dalek
06:40
TEttinger joined
06:51
geraud left
06:56
domidumont joined
07:01
domidumont left,
domidumont joined
07:11
doublec_ joined
07:12
doublec left
07:13
CIAvash joined
07:19
[Sno] left
07:21
edehont joined
07:24
doublec_ is now known as doublec
07:38
cbk_ left
07:40
_28_ria left
|
|||
[Tux] | again up, two days in a row: | 07:44 | |
test 50000 23.517 23.403 | |||
test-t 50000 21.276 21.162 | |||
csv-parser 50000 29.581 29.468 | |||
07:45
cdg joined
07:46
_28_ria joined
07:48
[Sno] joined
07:50
cdg left
07:53
RabidGravy joined
|
|||
dalek | kudo/nom: 8ef5a59 | TimToady++ | src/Perl6/ (2 files): allow unival terms, because why not? |
08:05 | |
ast: 373ecf3 | TimToady++ | S15-literals/numbers.t: test for unival literals |
|||
08:06
rurban joined
08:12
FROGGS joined
|
|||
TimToady | m: say ⅐ | 08:15 | |
camelia | rakudo-moar : OUTPUT«0.142857» | ||
TimToady | m: say ⅐.perl | ||
camelia | rakudo-moar : OUTPUT«<1/7>» | ||
08:15
darutoko joined
|
|||
TimToady | of course this can be used for obfuscation... | 08:22 | |
m: say ⅰi | |||
camelia | rakudo-moar : OUTPUT«0+1i» | ||
FROGGS | uniWAT FTW | ||
TimToady | but I think it fits in well with our story of being completely Unicode friendly | 08:23 | |
and it's a trivial patch | 08:24 | ||
cuneiform has some great numbers | 08:26 | ||
m: say 𒐳 | |||
camelia | rakudo-moar : OUTPUT«432000» | ||
TEttinger | "but can language X do this?" | ||
if the question is anything unicode related, for perl it's yes, for many others, no | 08:27 | ||
well, perl6 | |||
TimToady | m: say Ⅹ | ||
camelia | rakudo-moar : OUTPUT«10» | ||
08:31
krakan joined
|
|||
grondilu | lol, is that roman? | 08:31 | |
m: say IX | |||
camelia | rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/rUsVVzjyaoUndeclared name: IX used at line 1» | ||
TimToady | m: say Ⅸ | ||
camelia | rakudo-moar : OUTPUT«9» | ||
grondilu | oh ok | ||
uruwi | m: say 1 | 08:34 | |
camelia | rakudo-moar : OUTPUT«1» | ||
TimToady | m: say ^Ⅹ Xx Ⅹ | ||
camelia | rakudo-moar : OUTPUT«(0000000000 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 7777777777 8888888888 9999999999)» | ||
uruwi | m: say 二 | ||
camelia | rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/q3bf0T8gDrUndeclared routine: 二 used at line 1» | ||
TimToady | m: say ㆓ | ||
camelia | rakudo-moar : OUTPUT«2» | ||
TimToady | m: say ㈡ | 08:35 | |
camelia | rakudo-moar : OUTPUT«2» | ||
uruwi | What was the difference? | ||
m: say ⑨ | |||
camelia | rakudo-moar : OUTPUT«9» | ||
TimToady | m: say '二'.uniprop | ||
camelia | rakudo-moar : OUTPUT«Lo» | ||
TimToady | m: say '二'.unival | ||
camelia | rakudo-moar : OUTPUT«2» | ||
TimToady | it's a letter, so parses as identifier | ||
uruwi | say "二".char | 08:36 | |
m: say "二".char #gdi | |||
camelia | rakudo-moar : OUTPUT«Method 'char' not found for invocant of class 'Str' in block <unit> at /tmp/SiwxA6vgAQ:1» | ||
08:36
g4 left
|
|||
uruwi | m: say char("二") | 08:36 | |
camelia | rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/x3QfxRmVUsUndeclared routine: char used at line 1. Did you mean 'chars', 'chr'?» | ||
uruwi | m: say chr("二") | ||
camelia | rakudo-moar : OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '7⏏5二' (indicated by 7⏏) in block <unit> at /tmp/LLLqxHiKVU:1Actually thrown at: in block <unit> at /tmp/LLLqxHiKVU:1» | ||
uruwi | Oh screw it | 08:37 | |
08:37
g4 joined
08:38
Ven joined
|
|||
masak | morning, #perl6 | 08:38 | |
uruwi | It's 3:38 AM where I am | ||
mrf | o/ masak | ||
uruwi | Going to bed | 08:39 | |
08:39
uruwi is now known as uruwi[A]
|
|||
TimToady | only 12:39 here, but oughta go to bed... | 08:39 | |
masak | m: say ord("二") - ord("亊") | 08:40 | |
camelia | rakudo-moar : OUTPUT«2» | ||
masak grins | |||
grondilu | m: say 三 | 08:43 | |
camelia | rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/6rvzLDfUz8Undeclared routine: 三 used at line 1» | ||
grondilu | m: say uniname "三" | 08:44 | |
camelia | rakudo-moar : OUTPUT«<CJK Ideograph>» | ||
grondilu | m: say uniname "㆓" | 08:45 | |
camelia | rakudo-moar : OUTPUT«IDEOGRAPHIC ANNOTATION TWO MARK» | ||
08:46
zakharyas joined
08:50
mr-fooba_ left
08:52
bjz joined
08:53
edehont left
08:55
azawawi joined
|
|||
azawawi | hi | 08:56 | |
and good morning #perl6 | 08:57 | ||
masak | m: say ord("三") - ord("亊") | 09:00 | |
camelia | rakudo-moar : OUTPUT«-129» | ||
masak | heh. | ||
09:04
cognominal joined
09:05
jonas2 joined
|
|||
dalek | kudo/nom: 2e38ba6 | lizmat++ | src/core/ (6 files): Introduce Any.gistseen This method allows a developer to easily create a .gist method that is aware of self-referential structures (such can occur with arrays, lists, hashes and pairs). This replaces the ad-hoc code found so far. |
09:05 | |
09:08
kjs_ joined
|
|||
lizmat | hmmm.... looks like TimToady's unival commit broke the JVM build, because nqp::unipropcode doesn't exist on JVM yet | 09:21 | |
gen/jvm/Perl6-Actions.nqp | |||
Error while compiling op unipropcode (source text: "nqp::unipropcode(\"NumericValueNumerator\")"), no registered operation handler | |||
09:21
dakkar joined
|
|||
lizmat | m: use nqp; say nqp::unipropcode("NumericValueNumerator") | 09:22 | |
camelia | rakudo-moar : OUTPUT«10» | ||
lizmat | j: use nqp; say nqp::unipropcode("NumericValueNumerator") | ||
camelia | rakudo-jvm 4d8a90: OUTPUT«===SORRY!===Error while compiling op unipropcode (source text: "nqp::unipropcode(\"NumericValueNumerator\")"), no registered operation handler» | ||
lizmat | fudging is not that easy, atm, as I don't think Actions/Grammar.nqp *are* currently fudged :-( | 09:23 | |
JimmyZ | or by nqp::config() or something? | 09:28 | |
09:29
ely-se joined
09:33
llfourn joined
09:38
espadrine joined
09:40
Actualeyes left
|
|||
El_Che | a silly question: Can I embed a perl6 compiled regex (rx) within a regex match with the :Perl5 modifier? | 09:48 | |
09:49
TEttinger left
09:50
azawawi left
09:51
rurban left,
pochi_ joined,
pochi left
|
|||
El_Che | tests from the replace sounds like it does | 09:52 | |
09:54
RabidGravy left,
lucs left,
RabidGravy joined
09:55
eliasr joined,
lucs joined
|
|||
lizmat | afk until late& | 09:57 | |
09:58
Begi joined
|
|||
grondilu | m: my $rx = /foo/; say "foo" ~~ m:p5/$rx/ | 09:58 | |
camelia | rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/kshctkdqAbAdverb p5 not allowed on mat /tmp/kshctkdqAb:1------> 3my $rx = /foo/; say "foo" ~~ m:p5/$rx/7⏏5<EOL>» | ||
grondilu | m: my $rx = /foo/; say "foo" ~~ m:P5/$rx/ | 09:59 | |
camelia | rakudo-moar : OUTPUT«「foo」» | ||
10:00
Actualeyes joined
|
|||
El_Che | m: my $rx = rx:i/<[a..z]>||<[1..9]>/; '.' ~~ m:Perl5/$rx/ ; '.a' ~~ m:Perl5/\.$rx*/ | 10:00 | |
camelia | ( no output ) | ||
El_Che | m: my $rx = rx:i/<[a..z]>||<[1..9]>/; '.' ~~ m:Perl5/$rx/ | ||
camelia | ( no output ) | ||
El_Che | it does on my repl :) | ||
m: my $rx = rx:i/<[a..z]>||<[1..9]>/; '.a' ~~ m:Perl5/\.$rx/ | |||
camelia | ( no output ) | ||
grondilu | you need to say something you know | 10:01 | |
10:02
raiph left,
yeahnoob left
|
|||
El_Che | grondilu: actually I am trying to find the combination \G + the /c modifier in the perl6 adverbs | 10:04 | |
:c is clear. Not so clear about \G | |||
El_Che keeps reading | |||
10:05
rindolf joined
|
|||
dalek | star: 2a70ed7 | (Jens Rehsack)++ | / (3 files): | 10:08 | |
star: introduce support for sdkroot and sysroot to support cross-builds | |||
star: | |||
star: To allow building for another location rather the final install prefix, | |||
star: regardless whether chroot based builds, cross-compile or canadian cross sdk | |||
10:08
dalek left
10:09
brrt joined,
dalek joined,
ChanServ sets mode: +v dalek
|
|||
FROGGS | is a canadian cross sdk something like a cansas city shuffle? | 10:11 | |
FROGGS .oO( There was a time. ) | |||
arnsholt | FROGGS: I'm increasingly thinking that CArrays really shouldn't do the auto-resize thing, and be restricted to a single size. Thoughts on that? | 10:12 | |
jnthn | morning, #perl6 | 10:13 | |
arnsholt | o/ jnthn | ||
jnthn: Did my Gist hang on your machine as well, BTW? (If you've had time to try it) | 10:14 | ||
jnthn | arnsholt: Didn't have time yet, sorry | ||
arnsholt | No problem | ||
El_Che | if I rephrase my regex question, is there an equivalent in Perl6 for the perl5 \G anchor | 10:15 | |
arnsholt | I know you've got a massive pile of stuff on your plate | ||
jnthn | Yeah...cleaning up the supplies API at the moment... | ||
FROGGS | arnsholt: hmmm | ||
10:16
Actualeyes left
|
|||
FROGGS | arnsholt: what if you want to read a blob of mem until you find something null? | 10:16 | |
arnsholt | FROGGS: Then it'll be length * | ||
But that's generally for arrays coming from C, which aren't resized anyways | |||
FROGGS | still the CArrays grows over the not-owned memory | 10:17 | |
arnsholt | El_Che: doc.perl6.org/language/regexes#Continue | ||
10:17
Actualeyes joined,
Begi2 joined
|
|||
FROGGS | arnsholt: but yeah, when the user creates an array (s)he should perhaps make it a fixed sized array instead | 10:18 | |
arnsholt: to avoid realloc hell | |||
RabidGravy | I love the way that actually using a library in real code changes the way you think about its interface | ||
FROGGS | RabidGravy: in what way? | 10:19 | |
10:19
Begi left
|
|||
RabidGravy | in that a nice concise simple interface can often be a pain in the arse when faced with real world problems ;-) | 10:20 | |
anyway off to hand over all my worldly goods to the car repairers ;-) | 10:21 | ||
arnsholt | FROGGS: Yeah, I would like it to be so that you always have to declare the size of a CArray when creating one on the Perl 6 side. For arrays coming from C we'll have to allow undefined size, of course | ||
RabidGravy | have fun | ||
FROGGS | RabidGravy: :o) | ||
arnsholt: can we declare fixed sized CArrays already? | 10:22 | ||
arnsholt | Nope | 10:23 | |
El_Che | arnsholt: Thx. That corresponds with perl5's /c. I am looking at the perl-ldap code and I see they use a /\G(?: ... )/gcx syntax | ||
10:24
pmurias joined
|
|||
El_Che | maybe it is declaring twice the same thing | 10:24 | |
pmurias | how should unipropcode be implemented on the JVM, by porting over ucd2c into ucd2java? | 10:25 | |
10:25
RabidGravy left
|
|||
FROGGS | arnsholt: then let's play with that thought when it is implemented :o) | 10:25 | |
10:26
brrt left
10:28
RabidGravy joined
|
|||
arnsholt | FROGGS: Sounds like a plan. I don't think it should be too hard to implement either | 10:30 | |
FROGGS | arnsholt: would be nice to steal that task from jnthn++ | 10:32 | |
jnthn | Task-stealing from jnthn encouraged. :) | 10:49 | |
10:52
ely-se left
10:53
Ven left
|
|||
RabidGravy | :) | 10:53 | |
okay the car menders didn't want to take my money | |||
jnthn isn't sure whether that's good news or bad... :) | 10:54 | ||
arnsholt | I'm not sure shaped CArrays were ever jnthn's job, TBH =) | ||
10:59
n0xff joined
|
|||
jnthn | Cute | 11:01 | |
method flat(Supply:D:) { | |||
supply { | |||
whenever self -> \inner { | |||
whenever inner -> \value { | |||
emit value; | |||
} | |||
} | |||
} | |||
} | |||
:) | |||
moritz | nice | ||
11:01
brrt joined
|
|||
moritz | that only flattens one level, though | 11:01 | |
is that desired? | |||
jnthn | I think so...we don't really have an item/list distinction with supplies | 11:02 | |
So you'd not really have a way to stop it | 11:03 | ||
RabidGravy | is "supply" the new "react" or does it do something else I can't work out from the above? | 11:05 | |
jnthn | supply = returns a supply that, when tapped, runs the block | 11:06 | |
react = runs the block immediately and waits until all of the whenevers in it have run their course. | |||
react is more for the "top level" | |||
RabidGravy | gotcha | ||
arnsholt | jnthn: I think you said something about the "of" syntax for typing aggregate things recently. Is that implemented, or still TODO? | 11:10 | |
jnthn | arnsholt: I refactored handling of "of" recently, and implemented "is" too | ||
m: my @arr of int; say @arr.WHAT # now works | |||
camelia | rakudo-moar : OUTPUT«(array[int])» | ||
jnthn | m: my @buf is buf8; say @buf.WHAT | 11:11 | |
camelia | rakudo-moar : OUTPUT«(Buf[uint8])» | ||
jnthn | That also :) | ||
m: use NativeCall; my @carr is CArray of int8; say @carr.WHAT # maybe this | |||
camelia | rakudo-moar : OUTPUT«(IntTypedCArray[int8])» | ||
jnthn | :) | ||
arnsholt | Oh, neat! | 11:12 | |
JimmyZ | m: my @buf is uint8; say @buf.WHAT | ||
camelia | rakudo-moar : OUTPUT«===SORRY!===Method 'BUILDALLPLAN' not found for invocant of class 'Perl6::Metamodel::NativeHOW'» | ||
jnthn | uint8 isn't a container type :) | ||
JimmyZ | m: my uint8 @buf; say @buf.WHAT | ||
camelia | rakudo-moar : OUTPUT«(array[uint8])» | ||
jnthn | m: use NativeCall; my int8 @carr is CArray; say @carr.WHAT # cuter way, maybe | ||
camelia | rakudo-moar : OUTPUT«(IntTypedCArray[int8])» | ||
JimmyZ | anyway, LTA :) | ||
jnthn | Yeah, not sure what to do about that | 11:13 | |
Not sure I feel like demanding everyone "does Container" or some similar role on everything they wish to use as a container type | |||
11:14
khisanth_ joined
|
|||
jnthn | Though it'd be the Java way out of the problem. :) | 11:14 | |
El_Che | m: my regex foo { . } | 11:15 | |
camelia | ( no output ) | ||
El_Che | m: my regex Foo :i { . } | ||
camelia | rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/LzwzlOpqVyMalformed regexat /tmp/LzwzlOpqVy:1------> 3my regex Foo 7⏏5:i { . }» | ||
El_Che | adverbs not implemented for regexes? | ||
arnsholt | m: my Regex Foo { :i . } # <-- | ||
camelia | rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/2JMFdOlPvuMalformed myat /tmp/2JMFdOlPvu:1------> 3my Regex7⏏5 Foo { :i . } # <--» | ||
arnsholt | Well, if you spell it right, anyways >.< | 11:16 | |
11:16
Khisanth left
|
|||
El_Che | arnsholt: thx. I got it from here: en.wikipedia.org/wiki/Perl_6_rules: regex addition :ratchet :sigspace { <term> \+ <expr> } | 11:17 | |
jnthn | Then it's wrong, they go inside the curlies | 11:18 | |
El_Che | jnthn: I'll change it there | 11:19 | |
jnthn | regex + ratchet + sigspace = rule, also ;) | ||
El_Che++ | |||
El_Che | what better way to learn perl6 regex than trying to rewrite a perl5 regex mastodont from Net::LDAP :) | 11:20 | |
11:21
RabidGravy left,
Begi2 left
11:38
rurban joined
11:39
Ven joined
11:58
dayangkun left
|
|||
arnsholt | El_Che: A propos regexes, you can scope adverbs inside groups too: m/foo [:i bar]/ | 12:01 | |
12:09
Skarsnik joined
12:14
zengargoyle joined
12:19
znpy joined
12:20
ely-se joined
12:26
BenGoldberg joined
12:30
perlawhirl joined
12:31
CIAvash left
|
|||
El_Che | arnsholt: interesting | 12:32 | |
12:36
xpen left
|
|||
perlawhirl | hello everyone | 12:36 | |
need a lil help | |||
DrForr | Mornin'. | ||
12:36
kjs_ left
|
|||
perlawhirl | in perl5 you could put a map in a hash to generate some KV pairs... i'm trying to do the same with perl 6 and failing ==> pastebin.com/QxtwuK79 | 12:37 | |
jnthn | Try |( map { $_ => $_ } 1 .. 9 ) | ||
Or my %h = flat ... | 12:38 | ||
perlawhirl | thanks jnthn... you're a star | ||
was watching your talk on objects ∩ concurrency today... very enjoyable and informative | 12:39 | ||
jnthn | :) | 12:40 | |
12:40
rurban left,
jojotus left,
rurban joined,
rurban left
12:42
jojotus joined
12:43
BenGoldberg left
|
|||
stmuk | what's the JVM status? does it sort of work yet? or not so much.. :) | 12:44 | |
moritz | it works on and off | 12:45 | |
zengargoyle | my %h = |map { $_ => $_ }, 1..9; say %h; | 12:50 | |
m: my %h = |map { $_ => $_ }, 1..9; say %h; | 12:51 | ||
camelia | rakudo-moar : OUTPUT«1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9» | ||
zengargoyle | did TimToady go back on loosening precedence of | ? | ||
m: |1..10 | |||
camelia | rakudo-moar : OUTPUT«WARNINGS:Useless use of ".." in expression "|1..10" in sink context (line 1)» | ||
zengargoyle | m: say |1..10 | 12:52 | |
camelia | rakudo-moar : OUTPUT«1..10» | ||
zengargoyle | m: say |(1..10) | ||
camelia | rakudo-moar : OUTPUT«12345678910» | ||
zengargoyle hopes so, likes tight | | |||
12:52
pmurias left
|
|||
dalek | p: 6d3179e | (Stefan Seifert)++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java: Fix error messages referring to the wrong op. Thanks to ilmari++ for catching my copy&pasto! |
12:54 | |
ilmari | nine++ # quick fix | 12:55 | |
13:03
z8 joined
13:07
brrt left
13:12
z8 left
|
|||
jnthn | m: undef | 13:14 | |
camelia | rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/LjGkdyylqaUnsupported use of undef as a value; in Perl 6 please use something more specific: an undefined type object such as Any or Int, :!defined as a matcher, Any:U as a type constraint, Nil as the …» | ||
13:14
pmurias joined
13:19
johan joined
13:22
kjs_ joined
13:26
xenu is now known as pepe,
pepe is now known as xenu
|
|||
dalek | kudo/resupply: 461ceab | jnthn++ | / (5 files): Start cleaning up Supply design/implementation. This commit substantially refactors how supplies work on the inside, along with a couple of API changes to deal with design issues. cf00a6d | jnthn++ | src/core/Supply.pm: Refactor batch to use whenever. |
13:34 | |
13:34
dalek left
|
|||
jnthn wrote a long commit message instead of a blog post :P | 13:34 | ||
github.com/rakudo/rakudo/commit/46...d9d06c83d0 for anyone wanting to read it | 13:35 | ||
13:35
dalek joined,
ChanServ sets mode: +v dalek
13:40
cdg joined
|
|||
jdv79 | that was unusually long | 13:42 | |
13:43
AlexDaniel joined
|
|||
jdv79 | i think i followed about half of it | 13:43 | |
13:43
rindolf left
|
|||
timotimo | hm, so Publisher is a bit like Vow? | 13:44 | |
AlexDaniel | m: say ⅐ + 5 | ||
camelia | rakudo-moar : OUTPUT«5.142857» | ||
AlexDaniel | finally! | ||
13:44
raiph joined
|
|||
AlexDaniel | m: ∞.say | 13:45 | |
camelia | rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/Qi7jV5dQMMBogus statementat /tmp/Qi7jV5dQMM:1------> 3<BOL>7⏏5∞.say expecting any of: prefix term» | ||
jnthn | timotimo: Kinda, sorta :) | ||
timotimo | the last two lines look like something unfortunate has happened there | ||
jnthn | It's providing the same kind of "security" | 13:46 | |
timotimo | mhm | ||
jnthn | last two lines? | ||
timotimo | of the commit message | ||
jnthn | oops | ||
timotimo | if the publisher doesn't know anything about the tappers, it won't know when all tappers have been closed? | ||
jnthn | :) | ||
A publisher *does* have a list of tappers | 13:47 | ||
timotimo | perhaps i ought to re-read? | ||
oh. publisher does, supply doesn't? | |||
jnthn | Right | ||
jdv79 | as always i look forward to the excellent docs that will just appear someday so i can fully grasp the power:) | ||
13:48
RabidGravy joined
|
|||
moritz | jdv79: learn the virtue of impatience, learn it by trying (and reading the source and design docs), and write the excellent docs yourself! | 13:48 | |
AlexDaniel | .u 𒐳 | ||
yoleaux | U+12433 CUNEIFORM NUMERIC SIGN SHAR2 TIMES GAL PLUS MIN [Nl] (𒐳) | ||
AlexDaniel | .u 1 | 13:49 | |
yoleaux | U+FF11 FULLWIDTH DIGIT ONE [Nd] (1) | ||
AlexDaniel | m: say 11 | ||
camelia | rakudo-moar : OUTPUT«11» | ||
AlexDaniel | m: say 11Ⅸ𒐳 | 13:50 | |
camelia | rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/OnFft4FMRmBogus postfixat /tmp/OnFft4FMRm:1------> 3say 117⏏5Ⅸ𒐳 expecting any of: infix infix stopper postfix statement end statement mo…» | ||
AlexDaniel | m: say 11 * Ⅸ𒐳 | ||
camelia | rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/wZv5QSC5E7Bogus postfixat /tmp/wZv5QSC5E7:1------> 3say 11 * Ⅸ7⏏5𒐳 expecting any of: infix infix stopper postfix statement end statement…» | ||
AlexDaniel | m: say 11 * Ⅸ +𒐳 | ||
camelia | rakudo-moar : OUTPUT«432099» | ||
13:50
bjz left
|
|||
13:57
bjz joined
|
|||
cognominal | why in the REPL, the default is not MONKEY-TYPING and augment ? I fear that the anwer is, go support a ~/.perl6-repl and do it. Not quite there yet. :( | 14:09 | |
14:10
Ven left
14:14
kaare_ joined
14:16
raiph left
|
|||
jnthn | The last case I remember of making -e/scripts/REPL work differently caused sufficient confusion we ended up undoing it. | 14:18 | |
moritz | because the REPL is supposed to behave as similar as possible to the standard behavior | ||
arnsholt | Definitely | 14:19 | |
moritz | jnthn: yes, "no strict" as default caused confusion, iirc | ||
jnthn | moritz: Yes, that's the one I was thinking of | ||
arnsholt | But supporting a ~/.rakudorepl.rc should be pretty simple though | ||
dalek | kudo/resupply: fa096b0 | jnthn++ | src/core/Supply.pm: Refactor a bunch more methods to use whenever. |
||
arnsholt | Just inject eval "~/.rakudorepl.rc".IO.slurp into the code before we start reading code from stdin | 14:20 | |
jnthn | Not a lot less lines of code with supply/whenever, but certainly feels clearer to me :) | ||
moritz | arnsholt: that might not do what people expect wrt scoping | 14:21 | |
14:22
zengargoylew joined
|
|||
arnsholt | Oh, right. It'd have to inject the contents of the file in Perl6::Compiler.interactive | 14:23 | |
That'd be the same as if the code were typed at the REPL | |||
ely-se | concatenate the file and stdin | 14:25 | |
arnsholt | cognominal: It should be a pretty straightforward feature to implement. In src/Perl6/Compiler.nqp.interactive (lines 122 to 174 in HEAD), you'd have to read in the contents of the RC file, and run it with self.eval($contents) before the call to the superclass at the end of the method | 14:26 | |
cognominal | Anssering to the similarity requirement. On the other hand, one use of the REPL is incremantal/interactive writing of a class. That was my initial motivation. | ||
arnsholt | It's a bit more work than just "$file".IO.slurp, since it's NQP code not Perl 6 code, but not tremendously so | ||
moritz | arnsholt: probably nqp::open, nqp::readall | 14:27 | |
arnsholt | Yeah, that's the order of magnitude I assumed it'd be | 14:28 | |
cognominal | If I follow my I idea, the prompt would indicate the current entity. | ||
timotimo | there's a new bug report on the RT basically about regex literals looking into the lexical environment for a class named "Regex" and when you're inside the class body of Regex and use a regex literal it goes boom | ||
cognominal | > class A { | ||
A> method foo {} | |||
A> } | |||
> | |||
timotimo | that's not about MONKEY-TYPING or augmenting, though | ||
arnsholt | That's harder | ||
cognominal | in that sense, no augment here | ||
timotimo | that's just our inability to understand end-of-line inside things that aren't finished | 14:29 | |
14:29
Ven joined
|
|||
arnsholt | Yeah, which is a shame, but significantly harder to implement | 14:30 | |
cognominal | I have not yet grasped all of CPS, but what I want mean some ongoing context | ||
timotimo | you want to turn our parser into CPS? | 14:31 | |
cognominal | on the other hand, I want to use the class as well. So my example is only part of the spec. | ||
timotimo, thinkout out loud, not sure it makes sense | 14:32 | ||
14:32
skids joined
|
|||
timotimo | hmm | 14:32 | |
arnsholt | Hang on, let's backtrack a bit. Which feature are you wanting here: working multi-line input on the REPL, or "augment class ..." to work at the REPL from the start? | ||
zengargoylew | i'd sorta be happy if you could just multi-line a block: {code...code...code..} | ||
timotimo | m: my @foo := gather { "hello hello hello" ~~ / [<ident> { take $/.Str; say "taken" }] / }; say @foo[0]; | 14:33 | |
camelia | rakudo-moar : OUTPUT«Type check failed in binding; expected Positional but got Seq in block <unit> at /tmp/AJ0uG7g2Xv:1» | ||
timotimo | m: my $foo = gather { "hello hello hello" ~~ / [<ident> { take $/.Str; say "taken" }] / }; say $foo[0]; | ||
camelia | rakudo-moar : OUTPUT«hello» | ||
arnsholt | zengargoylew: Everyone would love that, I think. Unfortunately it's actually a decidedly non-trivial feature | ||
cognominal | yea, there is what I want and how to to it. Mixing the two :( | ||
timotimo | m: my $foo = gather { "hello hello hello" ~~ / [<ident> { take $/.Str; say "taken" }] / }; say $foo[1]; | ||
camelia | rakudo-moar : OUTPUT«takenNil» | ||
timotimo | m: my $foo = gather { "hello hello hello" ~~ / [<ident> { take $/.Str; say "taken" }] / }; say $foo[2]; | 14:34 | |
camelia | rakudo-moar : OUTPUT«takenNil» | ||
timotimo | m: my $foo = gather { "hello hello hello" ~~ / [<ident> { take $/.Str; say "taken" }]+ % \s+ / }; say $foo[2]; | ||
camelia | rakudo-moar : OUTPUT«takentakenhello hello hello» | ||
timotimo | m: my $foo = gather { "hello hello hello" ~~ / [<ident> { take $/.Str; say "taken" }]+ % \s+ / }; say $foo[1]; | ||
camelia | rakudo-moar : OUTPUT«takenhello hello» | ||
zengargoylew | played with rlwrap a bit. it's nice to use $EDITOR once in a while. sorta painful when it takes it line by line. :) | ||
timotimo | m: my @foo = gather { "hello hello hello" ~~ / [<ident> { take $/.Str; say "taken" }]+ % \s+ / }; say @foo[1]; | ||
camelia | rakudo-moar : OUTPUT«takentakentakenhello hello» | ||
zengargoylew | hacked up a filter to remove /^> / | ||
14:35
lucasb joined
|
|||
cognominal | ho, I did not noticed the multiline REPL has been removed | 14:35 | |
Skarsnik | Hello, does someone already tried to compile the clang branch of smokegen? It seem unrelated but it's the tool used for Qt/Kde bindings | ||
timotimo | how do i do this stuff again :P | ||
zengargoylew | and add custom colored prompt... sorta *looks* a bit better anyways. | ||
timotimo | m: my $foo = gather { "hello hello hello hello" ~~ / [<ident> { take $/.Str; say "taken" }]+ % \s+ / }; say $foo.list[1]; | 14:36 | |
camelia | rakudo-moar : OUTPUT«takenhello hello» | ||
timotimo | ah, of course | ||
$/.Str matches from the start %) | |||
so yeah, grammar parsing can work with gather/take already, but the really difficult part is that we'd have to switch the string being matched against from underneath the parser | |||
14:37
jonas2 left
|
|||
timotimo | otherwise we don't have a benefit to the "CPS transform" | 14:37 | |
(in quotes because we're not actually transforming the code. not on moar anyway) | |||
cognominal | About this incremental compilation, probably what I ask for is lazy string :) | ||
timotimo | yeah, that's a way to do it. | 14:38 | |
but that's post-6.c | |||
cognominal | I know :) | ||
zengargoylew | what's CPS? | ||
timotimo | contiunation-passing-style | ||
we had the beginning of a "moreinput" thing that'd let the grammar request extra text | 14:39 | ||
cognominal | from what I understand (very little), this is passing the general context to any routine | ||
s/this is/CPS is/ | 14:40 | ||
timotimo | "continuation passing style" happens when you treat instruction pointers + stack as a first-class entity | ||
cognominal | I told the what, timotimo spells the how :) | 14:41 | |
timotimo | call/cc is a tool to invoke a function and also pass in a "continuation" that, when called, will teleport your instruction pointer back to where the call/cc was in the code | ||
cognominal | It means one can snaphote the state of the interpreter and go back to it. | 14:42 | |
That makes all sort of backtracking thing for *free*, well at the cost of support CPS | |||
14:43
cbk joined
|
|||
cognominal | I have seen mention of CPS in moarvm | 14:43 | |
*snapshot | |||
timotimo | moar has single-shot continuations | ||
cognominal | what means thing shot? | ||
timotimo | after a continuation has been invoked, it can't be invoked again | 14:44 | |
cognominal | ok | ||
timotimo | there's a fun language called "oort" that has first-class labels (as in goto) | ||
ely-se | terrible idea with incredibly complexity and no benefits at all | 14:47 | |
timotimo | oh hey ely-se | ||
dalek | kudo/resupply: bae2138 | jnthn++ | src/core/Supply.pm: Most of the rest of the on -> whenever switch. |
||
timotimo | i'm conflicted with regards to my multidim spec tests. they throw an exception currently, so in order to get through them i'd either have to test with lives-ok or fudge with "skip" rather than "todo" :( | 14:48 | |
cognominal | /msg ely-se a | 14:49 | |
I am not sure the allusion to Chopin or the Cure is transparent. | 14:50 | ||
timotimo | ? | 14:51 | |
14:51
rurban joined
|
|||
cognominal | I sent a "letter to ely-se" fr.wikipedia.org/wiki/La_Lettre_%C...%C3%89lise www.youtube.com/watch?v=-AUCSkHCrwY | 14:53 | |
Some playword need explanation. Like : Ga | 14:54 | ||
G-grand a-petit for J'ai grand appétit :) | |||
Ven | uhm. | 14:55 | |
14:56
Hotkeys left,
Hotkeys joined
|
|||
cognominal | Ven, valerie.ufoot.org/citations/jeuxdem...us?lang=fr | 14:57 | |
14:57
eliasr left
|
|||
Woodi | hallo #perl6 :) | 14:58 | |
do REPL have ability to save 'session' to file ? would be nice way to start implementation of new thing :) | 14:59 | ||
or save session to temp file, use EDITOR on it and restart REPL with edited file... | 15:01 | ||
Ven | it doesn't yet, at least | ||
15:02
telex left
|
|||
masak | maybe serialization could be nmade to do that, I dunno | 15:02 | |
it sounds hard/risky to add after the fact | |||
and you get all kinds of fun serialization format versioning difficulties that we already have with precompiled modules | 15:03 | ||
15:04
telex joined
|
|||
timotimo | masak: i think he really means just a dump of the lines you wrote | 15:04 | |
zengargoylew | RLWRAP_EDITOR=vim exec rlwrap -m -M .pl6 -r -R perl6 # gets close... saves history, allows editing. ... | ||
can do a bit of multi-line stuff, but it's quirky | 15:05 | ||
TAB completes on seen things | 15:06 | ||
15:07
AlexDaniel left
|
|||
zengargoylew | i think you have to remove Linenoise.pm or they conflict a bit. | 15:08 | |
lucasb | can't I use S/// with the binding operator '~~' ? | 15:10 | |
masak | timotimo: that would likely be enough in some cases, but any non-deterministic instruction would not restore the state well. | 15:11 | |
timotimo | that's true | ||
pmurias | we could serialize the lexical scope | 15:12 | |
dalek | c: 788b09c | (Zoffix Znet)++ | doc/Language/grammars.pod: Fix code example to not emit warnings when run |
15:13 | |
timotimo | i think we should concentrate on making the ipython/jupyter integration good because things like the notebook will give us exactly what we need in that case | ||
pmurias | but it doesn't seem that usefull and they will bitrot on updates | ||
timotimo | because it keeps output around and stuff like that | ||
pmurias | ipython integration seem more more usefull than trying to reimplement smalltalk images | ||
timotimo | and lets you re-run individual parts on demand | ||
verily. | 15:14 | ||
15:16
xpen joined
|
|||
lucasb | m: my $s = 'abc'; say $s ~~ S/a/x/ | 15:17 | |
camelia | rakudo-moar : OUTPUT«Potential difficulties: Smartmatch with S/// can never succeed because the subsequent string match will fail at /tmp/umnqxfm5LR:1 ------> 3my $s = 'abc'; say $s ~~ S/a/x/7⏏5<EOL>False» | ||
masak | ipython integration sounds good. | ||
dalek | c: e3655a5 | (Zoffix Znet)++ | doc/Language/grammars.pod: Remove ~, since it is not needed in the example and is distracting from the subject matter, if the reader is not aware of it |
15:20 | |
ely-se | c: | 15:21 | |
Woodi | timotimo: yes, I mean just lines typed into REPL | 15:24 | |
what are that ipert/ipython thingies ? | |||
*iperl there | |||
15:25
muraiki joined
|
|||
JimmyZ | jnthn++ # the resupply code is much clear . | 15:25 | |
moritz | Woodi: ipython is a generic REPL/notebook implmementation | ||
15:25
AlexDaniel joined
|
|||
Woodi | ok, googled it. thanx | 15:26 | |
timotimo | i should stop calling it "ipython" and using their new name "jupyter" instead, eh? | 15:27 | |
15:27
rurban left
|
|||
Woodi | looks like pyWolfram in a tab :) | 15:28 | |
15:28
hankache joined
15:29
ZoffixW joined
|
|||
muraiki | jupyter integration would be awesome | 15:29 | |
ZoffixW | Is token ws { ... } magical? I'm looking at the second example at docs.perl6.org/language/grammars#Action_Objects and I don't see it used anywhere other than being declared, but if I comment it out, the code fails | 15:30 | |
pmurias | ZoffixW: yes | ||
ZoffixW | Also, I don't get why rule pair { <key=.identifier> '=' <value=.identifier> } works at all. I thought rules has :sigspace turned on, so how come it's matching even though there's space between the '=' and tokens, but in the stuff it's parsing there isn't any space | 15:31 | |
pmurias, what does it do? | |||
pmurias | ZoffixW: search S09 for :sigspace | 15:33 | |
ZoffixW | Thanks | ||
pmurias | ZoffixW: :sigspace inserts <.ws> | 15:35 | |
moritz | ... wherever there's a space in the regex | ||
pmurias | ZoffixW: ws is declared as \h* - so zero space matches that too | ||
ZoffixW | Ah | ||
zengargoylew | thought <ws> was a bit more than just \h* depending on the characters around it. | 15:37 | |
ZoffixW | Kinda weird that if I comment out token ws, rule pair { <key=.identifier>'='<value=.identifier>} still works but rule pair { <key=.identifier>'='<value=.identifier> } does not (not the space before the closing brace | 15:39 | |
Even though third example here works regardless of the extra space before closing brace in the `rule`: docs.perl6.org/language/grammars#Named_Regexes | |||
pmurias | zengargoylew: it's declared as \h* in the example | 15:40 | |
zengargoylew | ah, gotcha | 15:41 | |
but if you comment out the ws in the example doesn't it then fallback to the predefined ws? | 15:42 | ||
ZoffixW | Ah, I see now. The predefined ws takes that \n+ in token TOP. Thanks, zengargoylew++ | 15:43 | |
15:44
ab6tract joined
|
|||
ab6tract | o/ #perl6 | 15:44 | |
regarding object hashes again... | |||
ZoffixW | \o | ||
ab6tract | m: my $now = DateTime.now; my %h; say %h{$now} if $now === %h.keys[0]; | 15:45 | |
camelia | ( no output ) | ||
ab6tract | so it's not actually storing the object in the key after all | ||
or is that because it is now in a new container? | |||
moritz | ab6tract: it only autovivifies on write operations | 15:46 | |
ab6tract | arg, that test case is borked | ||
m: my $now = DateTime.now; my %h; %h{$now} = "now is now!"; say %h{$now} if $now === %h.keys[0]; | |||
camelia | ( no output ) | ||
ab6tract | m: my $now = DateTime.now; my %h; %h{$now} = "now is now!"; say %h{$now} if $now === %h.keys[0]; %h.keys[0].WHAT.say | 15:47 | |
camelia | rakudo-moar : OUTPUT«(Str)» | ||
15:47
CIAvash joined
|
|||
ab6tract | so it looks like this is still doing the old $obj.WHICH .. | 15:47 | |
moritz: am i still holding it wrong? :( | 15:48 | ||
JimmyZ | It still doesn't Objectk key, iirc | ||
*doesn't support | |||
ab6tract | JimmyZ: ah.. TimToady did write the "object hash" a while ago. i asked after the semantics last night, because they are not documented afaict | 15:50 | |
m: say "green" === my $green = "green" | |||
camelia | rakudo-moar : OUTPUT«True» | ||
moritz | ab6tract: you should declare 'my %h{Any}' I believe | ||
ab6tract | i also thought this was a bit weird... bare string is not the same as containerized string, no? | 15:51 | |
moritz | m: my $now = DateTime.now; my %h{Any}; %h{$now} = "now is now!"; say %h{$now} if $now === %h.keys[0]; %h.keys[0].WHAT.say | ||
camelia | rakudo-moar : OUTPUT«now is now!(DateTime)» | ||
dalek | c: 9e9b82a | (Zoffix Znet)++ | doc/Language/grammars.pod: Explain why token ws {} is in the example |
||
ab6tract | moritz: Ah! thank you | 15:52 | |
TimToady | m: my %h := :{now => "NOW!"}; say %h.perl | ||
camelia | rakudo-moar : OUTPUT«:{:now("NOW!")}» | ||
TimToady | m: my %h := :{(now) => "NOW!"}; say %h.perl | 15:53 | |
camelia | rakudo-moar : OUTPUT«:{Instant.new(<425849244517/294>) => "NOW!"}» | ||
moritz | ab6tract: doc patches are also very welcome :-) | ||
TimToady | m: my %h := :{42.000 => "NOW!"}; say %h.perl | 15:54 | |
camelia | rakudo-moar : OUTPUT«:{42.0 => "NOW!"}» | ||
ab6tract | moritz: that's my end game :) | ||
15:54
loren joined
|
|||
TimToady | there's your literal form | 15:54 | |
ab6tract | TimToady: does it require a bind? | ||
loren | evening, perl6 | ||
TimToady | yes, in that case | ||
loren | m: say "".elems; | ||
camelia | rakudo-moar : OUTPUT«1» | ||
loren | Why a empty Str's elems is '1' | 15:55 | |
15:55
hankache left
|
|||
ab6tract | m: "".comb.elems.say | 15:55 | |
camelia | rakudo-moar : OUTPUT«0» | ||
15:55
khw joined
|
|||
ab6tract | loren: because that is the equivalent of calling elems on a list of one item | 15:55 | |
if we looked into the source, we would probably find elems defined on Any such that it calls .List.elems | 15:56 | ||
loren | .., i think it's a little strange | 15:57 | |
masak | Perl 6 deliberately confuses a 1-element list and a single item. | ||
it's... unusual, yes. | |||
ab6tract | (or .list.elems ... still not 100% on the functional differences between the two | ||
15:57
hankache joined
|
|||
masak | but Perl 5 basically does the same, except with less type system. | 15:57 | |
ab6tract | loren: it's only strange if you are expecting .elems on a string to refer to characters, at which point you would probably also expect to be able to index into the string | ||
loren | I haven't noticed that | ||
ab6tract | neither of which perl has ever cottoned to, afaik | 15:58 | |
loren | ..Ok, get it . | 15:59 | |
m: say "xxxx".elems; #This will print also '1', aha? | 16:00 | ||
camelia | rakudo-moar : OUTPUT«1» | ||
loren | ..-_- | ||
ab6tract | m: say | 16:01 | |
camelia | rakudo-moar : OUTPUT«5===SORRY!5===Argument to "say" seems to be malformedat /tmp/BLsu1h0rut:1------> 3say7⏏5<EOL>Other potential difficulties: Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argume…» | ||
ab6tract | m: say "xxxx".comb | ||
camelia | rakudo-moar : OUTPUT«(x x x x)» | ||
TimToady | languages that confuse strings with arrays can't really do NFG properly, I suspect | ||
jnthn | TimToady: I've been having a bit of a cleanup of Supply, to resolve a number of issues and untangle things. | ||
ab6tract | yeah, some languages like to treat strings as lists of characters | ||
loren | Yeah, i come from c++, so .. | 16:02 | |
zengargoylew | m: put | ||
camelia | rakudo-moar : OUTPUT«» | ||
TimToady | jnthn: so I gather | ||
jnthn | No, gather is for lists :P | ||
ab6tract | TimToady: so what's your take? | ||
zengargoylew wonders if say error should mention put also. | |||
jnthn | TimToady: Very little of it affects existing code, BUT the place it will is a big one :( | ||
TimToady | I take it I should read your very long commit message | 16:03 | |
jnthn | Yes, please :) | ||
TimToady | should get to it pretty soon in the backlog, if y'all don't keep saying interesting things :) | ||
jnthn | Ignore the last line of the message; I did a mis-edit. | ||
arnsholt | jnthn: Is there a synonym of the shape syntax that lets me use a $ sigil instead of the @? | ||
jnthn | arnsholt: No, you'd need to pass :shape to the consturctor | 16:04 | |
arnsholt | Right. Thanks! | ||
timotimo | m: class Foo { has @.test[10] } | ||
camelia | ( no output ) | ||
timotimo | ^- we can support that in NativeCall now! ohmygosh! | ||
hankache | evening | 16:05 | |
:) | |||
Skarsnik | timotimo, maybe add a test in NC for it? (whatever it is!) xD | 16:08 | |
16:10
xpen left,
perlawhirl left
|
|||
hankache | how's everyone doing? | 16:10 | |
moritz can't speak for everyone | 16:11 | ||
16:11
zakharyas left
|
|||
CIAvash didn't know there was a `put` routine! | 16:12 | ||
arnsholt | jnthn: Oh, right. 'Cause the shape isn't part of the type, is it? Only the type parameter is | ||
jnthn | arnsholt: It is under the hood; we hide it somewhat | 16:13 | |
arnsholt: To be clear: the number of dimensions are part of the type | |||
The sizes of them aren't | 16:14 | ||
TimToady | so we can have dynamically sized dimensions eventually | ||
arnsholt | Right, right. That meshes with what I've seen in Array.pm, come to think of it. So then something like "my CArray[int] $foo" would be unspecified as regards to number of dimensions, right? | 16:15 | |
jnthn | m: my ($a, $b) = 3, 4; my @x[$a;$b]; say @x.shape; # Like this, TimToady? :) | ||
camelia | rakudo-moar : OUTPUT«(3 4)» | ||
TimToady | oh, jnthn distributes the future! | 16:16 | |
loren | good night, everyone | ||
TimToady | *ooh | ||
dalek | c: 910fa06 | (Zoffix Znet)++ | doc/Language/exceptions.pod: Fix grammar |
||
rl6-roast-data: 45a472a | coke++ | / (9 files): today (automated commit) |
|||
16:17
loren left
16:18
ZoffixW left
|
|||
TimToady | .tell zengargoyle yes, I decided to keep | where it was, and if we want a slipper at so/not precedence, call it something else, like "sl" or some such, but then its not really saving keystrokes over |(1..10) | 16:18 | |
yoleaux | TimToady: I'll pass your message to zengargoyle. | ||
jnthn | There's already slip at listop precedence :) | 16:19 | |
TimToady | yes, but that doesn't help inside the comma | ||
jnthn | true :) | ||
16:20
dwarring left
|
|||
TimToady | it's a little late to claim "slip" for that, and make "slip-all-the-things" for the listop... | 16:20 | |
so we'll probably leave things a the |(1..10) status quo | 16:21 | ||
16:21
ely-se left
|
|||
TimToady | *at | 16:21 | |
**unless you're French | |||
dalek | c: 9bb938f | (Zoffix Znet)++ | doc/Language/exceptions.pod: Grammar / clarification |
16:22 | |
16:24
g4 left
|
|||
arnsholt | jnthn: For a declaration like "my @foo[2; 3] is Foo of Bar" the Foo.new constructor gets called twice, first without and then with the shape parameter. Whence the first one? | 16:29 | |
16:29
domidumont left
|
|||
jnthn | Um... :) | 16:30 | |
timotimo | jnthn: hum. so we can't actually do CArray with @.test[10]? | ||
jnthn | arnsholt: I'm not actually sure. | ||
arnsholt | timotimo: Not *yet* =) | 16:31 | |
timotimo | well, if the size of the dimensions isn't part of the type ... then what? | ||
16:33
Ven left
|
|||
arnsholt | jnthn: Hmm, nm. On closer inspection looks like I'm wrong =) | 16:34 | |
I think | |||
TimToady | jnthn: supply vs publish is a bit of a mixed metaphor; did you consider "Supplier"? | 16:37 | |
16:37
dwarring joined
|
|||
[Coke] | is '⅓'.unival.WHAT.gist, '(Rat)', "'⅓' is a Rat"; --- that shouldn't need a gist to check if it's a Rat | 16:37 | |
TimToady | probably predates 'is' handling type objects | 16:39 | |
16:40
FROGGS left
|
|||
lucasb | m: my @a[-1] | 16:40 | |
camelia | rakudo-moar : OUTPUT«Memory allocation failed; could not allocate 18446744073709551608 bytes» | ||
TimToady | m: use Test; is ⅓.WHAT, Rat, "I smell a rat!" | ||
camelia | rakudo-moar : OUTPUT«ok 1 - I smell a rat!» | ||
arnsholt | jnthn: Actually, I was wrong about being wrong. There are two calls: | ||
m: class Foo does Positional { method new(:$shape) { say "shaped {?$shape}/{$shape.^name}"; nqp::create(self) }; }; my @foo[2;3] is Foo | 16:41 | ||
camelia | rakudo-moar : OUTPUT«shaped False/Anyshaped True/List» | ||
arnsholt | So if I make the shape required it fails: | ||
m: class Foo does Positional { method new(:shape($)!) { say "shaped"; nqp::create(self) }; }; my @foo[2;3] is Foo | |||
camelia | rakudo-moar : OUTPUT«===SORRY!===Required named parameter 'shape' not passed» | ||
jnthn | TimToady: I pondered Supplier, and worried if it'd be a tad close to Supply | 16:43 | |
timotimo | "SupplySource" | ||
jnthn | I wanted one word. :) | ||
TimToady: It does fit nicely though. | 16:44 | ||
TimToady | how often will the "Publisher" name occur in normal code? | ||
jnthn | I'm not entirely sure (more) | ||
mst | Quartermaster | ||
timotimo | Sourcepply | 16:45 | |
jnthn | If code that's doing async I/O, time-based stuff, and working with existing supplies, nearly never | ||
*In | |||
In code that's exposing live supplies (like, a UI framework that wants to provide a supply of UI events), maybe it'd show up somewhat. Depends how you factor it. | |||
In the "I want to expose a supply people can tap for status updates", it'd be common | |||
timotimo | .o( we can encode the size of an inlined array in CArray as the number of dimensions ) | 16:46 | |
jnthn | I went with publisher largely because in the case you use it, you actually are wanting to do a kind of publish/subscribe model. | ||
TimToady | we could put them on the Dole :) | ||
jnthn | The other thing on this | ||
16:47
raiph joined
|
|||
zengargoylew | Producer | 16:47 | |
jnthn | We'd like a method where you can take one supply (an on-demand one typically, but either way one where you're doing some processing) and be able to share its results out (as a live supply). | ||
And publish is a nice name for such a method. | 16:48 | ||
TimToady | "share" is shorter, and you just used that word :) | 16:49 | |
jnthn | Very true. :) | ||
I could happily call it share. But I don't want to call the noun a SharingPlatter :) | |||
Sharer feels really odd :) | 16:50 | ||
I'd rather go with Supplier than either of those :) | |||
mst | I liked Quartermaster :( | 16:51 | |
"the thing you get your supplies from" | |||
jnthn | Dealer | ||
timotimo | Treasurer | ||
16:51
domidumont joined
|
|||
mst | (I am not seriously proposing it because it's probably non-obvious to many people but ...) | 16:51 | |
arnsholt | timotimo: Not if we want to support multi-dimensional C arrays (which are a thing too =) | 16:53 | |
TimToady | I suspect people could easily learn to distinguish Supply from Supplier, and the relationship would, I suspect, be more obvious | 16:54 | |
jnthn | arnsholt: The memory layout of MultiDimArray matches how C lays things out, I believe | ||
timotimo | arnsholt: damn it. | ||
jnthn | (I actually looked that up when working on the REPR) | ||
timotimo | jnthn: yeah, we just can't easily encode multi-dimensional array sizes in the number of dimensions | ||
so that CStruct can work with inlined arrays | 16:55 | ||
TimToady | though to be sure, "share" doesn't imply doling things out in a sane fashion, like an allowance | ||
ab6tract | mst: Quartermaster reminds me of a Jamie Oliver recipe where he offhandedly suggests that you ask your fishmonger to debeard your mussels | 16:56 | |
TimToady | maybe there's a better verb for how suppliers feed a supply chain | ||
16:56
domidumont left
|
|||
TimToady | unfortunately, "supply" is taken... | 16:56 | |
jnthn | TimToady: Maybe so. I think we can go with Supplier as the name, anyway. | ||
geekosaur | provision? | ||
jnthn | (For what I called Publisher) | ||
distribute maybe works... | 16:57 | ||
lucs | dispenser? | ||
16:57
domidumont joined
|
|||
arnsholt | jnthn: Looks like the first, shape-less invocation of the constructor comes from Perl6::World; install_lexical_container calling build_container. Ring any bells? | 16:57 | |
TimToady | distribute isn't too bad | ||
16:57
domidumont left
16:58
domidumont joined
|
|||
jnthn | arnsholt: Hmmm | 16:58 | |
Yeah, I know what bit of code that is :) | |||
TimToady | though in the commercial metaphor, distributor is downstream rather than upstream like your suppliers, but maybe that's just fine here, since a supplier's downstream entities are distributors to them | 16:59 | |
automakers are distributors of batterys :) | 17:00 | ||
17:01
lucasb left
|
|||
arnsholt | jnthn: Since it's being constructed by ::World, there's a good reason for it I can't avoid? =) | 17:02 | |
jnthn | arnsholt: There may not be a good reason | 17:03 | |
arnsholt: Could you try this patch: gist.github.com/jnthn/34266189529166caa286 | 17:05 | ||
(Bit busy on something else at the moment... :)) | |||
arnsholt | Yeah, I'm semi-busy right now too, but I'll try it later tonight and get back to you. Cheers! | 17:06 | |
jnthn | ok, cool :) | 17:08 | |
17:12
FROGGS joined
17:13
vytas left,
vytas joined
17:14
vytas left
17:16
ZoffixW joined
|
|||
ZoffixW | Should unit class IRC::Client::Plugin::HNY:ver<1.001001> does IRC::Client::Plugin; be sufficient or do I actually have to `use IRC::Client::Plugin;` first? | 17:17 | |
I'm getting "Invalid typename 'IRC::Client::Plugin'" | |||
jnthn | Need a use first. | ||
ZoffixW | aw :( | ||
TimToady | we could make 'unit' special that way, I suppose...but then people might think it's 'class' that is doing the magic | 17:19 | |
ZoffixW | I'd kinda expected `does` to do the magic | 17:20 | |
TimToady | hard to know where the balance point is on that, since you could pull in the wrong thing by accident with a typo | ||
though usually a typo won't exist | 17:21 | ||
jnthn | It'd be a bit surprising to have a unit => curlies refactor break the code. | ||
17:22
donaldh joined
|
|||
jnthn | ZoffixW: In Perl 6, class/role <=> compilation unit are fairly decoupled. | 17:22 | |
donaldh | pwd | ||
jnthn | /home/donaldh/illegal_things | ||
ZoffixW | :) | ||
donaldh ahem | 17:23 | ||
jnthn | .oO( So that's where he keeps his secret Perl 7 plans... ) |
||
donaldh | Does perl6 have a way of augmenting USAGE with POD? | ||
TimToady | autouse would also encourage people to spread dependency info all over the program, which could be construed as an antipattern, unless it's a keep-things-nearby pattern :) | ||
ZoffixW | Is there something wrong with this? I'm getting "/home/zoffix/devbox/tmp/perl6-IRC-Client/lib/IRC/Client.pm6" and looks like it on the code inside the tap. I thought it'd close over or something | 17:24 | |
m: class Foo { multi method timer () { 1 }; multi method timer(Str) {say "42"} }; my @plugins = Foo.new; Supply.interval( .timer ).tap({ .timer("43") }) for @plugins.grep(*.^can('timer')); | |||
camelia | ( no output ) | ||
jnthn | I think if you put declarator docs on the MAIN subs, they go into usage. | ||
ZoffixW | And I can't repro in camelia :/ | ||
timotimo | ZoffixW: .timer is $_.timer, so maybe you want something else there? | 17:25 | |
17:25
ab6tract left
|
|||
timotimo | i mean in the Supply.interval( ... ) thing | 17:25 | |
m: say .timer | |||
camelia | rakudo-moar : OUTPUT«Method 'timer' not found for invocant of class 'Any' in block <unit> at /tmp/I3IpnmpcYz:1» | ||
ZoffixW | timotimo, hehe... well, inside the .tap({}) I do want the $_.timer, but where $_ is an item from @plugins | ||
17:26
z8 joined
|
|||
timotimo | ooh! | 17:26 | |
yeah, now i see the postfix for :) | |||
i hallucinated a ; there | |||
17:28
hankache left,
z8 left
|
|||
ZoffixW | This works: fpaste.scsys.co.uk/501918 | 17:29 | |
I guess there's no way to do a postfix for() AND have something to close over. | |||
timotimo | please be more specific? | ||
oh! | |||
well, duh, { $_.foo } will always give you a closure that takes a single argument and puts it into $_ | 17:30 | ||
try OUTER::$_ ? | |||
m: $_ = "hi"; do { say OUTER::$_ } | |||
camelia | rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/JpJ_Ji_R7CMalformed lookup of ::$_; please use ::('$_'), ::{'$_'}, or ::<$_>at /tmp/JpJ_Ji_R7C:1------> 3$_ = "hi"; do { say OUTER7⏏5::$_ }» | ||
timotimo | m: $_ = "hi"; do { say $OUTER::_ } | ||
camelia | rakudo-moar : OUTPUT«hi» | ||
timotimo | m: $_ = "hi"; say $OUTER::_ for <1 2 3> | ||
camelia | rakudo-moar : OUTPUT«hihihi» | ||
timotimo | m: $_ = "hi"; say $_ for <1 2 3> | ||
camelia | rakudo-moar : OUTPUT«123» | ||
timotimo | does that help? | ||
mst | ZoffixW: timer seems a really weird name for a method providing an interval? | 17:31 | |
also now there's no way for a plugin to decide maybe it doesn't want to have one | |||
ZoffixW | Yeah, $OUTER::_ works :) Thanks, timotimo++ (Perl 6)++ | ||
timotimo | mst: it's even stranger to me to have a candidate that takes a string and returns a constant string :D | ||
mst | timotimo: hm? | ||
timotimo | not important | ||
mst | ZoffixW: seems like you'd be better allow the interval value to return 0 and then providing a default implementation that does that in the plugin role | 17:32 | |
timotimo | should there be a way for things to declare they "don't want to have one"? why should a child be allowed to specify it doesn't want to have broccoli? | ||
sometimes you really do know better! | |||
timotimo AFK for a bit | |||
mst | timotimo: uhhh, he's testing can() | ||
timotimo | oh! | ||
mst | so he's already decided it's optional | ||
ZoffixW | Yeah, it is optional. | ||
mst | I'm just proposing a nicer way to make it optional | ||
timotimo | well, shows how much of the code example i read! | ||
mst | lol | ||
ZoffixW | And yeah, currently I have an issue that I want my role to have something like: multi method interval() { ... } and then have ... stuff | 17:33 | |
k, I'll do the return 0 stuff | |||
and call it interval mst++ | |||
TimToady | on the subject of Unicode-isms, I think I'm also in favor of building in the simple literal powers with superscripts as postfixes, for similar reasons: 1) It's trivial to implement, 2) it's a well-known notation, 3) the tight binding of postfixes actually works out more intuitively than **, 4) most powers in real code are literal (indeed, most powers are ² or ³ :), and 5) mathies will love it to pieces. | ||
ZoffixW | But.. but... Math::Operators::Superscripts ... | 17:34 | |
17:34
raiph left
|
|||
ZoffixW | modules.perl6.org/repo/Math::Operat...perscripts | 17:34 | |
:D | |||
TimToady | well, it's a nice prototype :) | 17:35 | |
ZoffixW | TimToady, but I agree. Since there's the fractions stuff it'd kinda expected powers would work too. | ||
TimToady | but one of our big principles is, "Math just is." | ||
the question to me is actually whether we draw the line at making 1½ work :) | 17:36 | ||
ZoffixW | lol | ||
Hotkeys | lol | ||
TimToady | and I'm of two minds about that... | 17:37 | |
17:37
pmurias left
|
|||
Hotkeys | I can't be bothered to figure out how to easily type superscripts so I'll stick to the x ** y notation :p | 17:37 | |
17:37
pmurias joined,
dakkar left
|
|||
TimToady | someone will eventually write a "pretty this to Unicode" program | 17:38 | |
ZoffixW | .tell hahainternet I recall you really wanted those superscript powers: irclog.perlgeek.de/perl6/2015-11-25#i_11598216 | ||
yoleaux | ZoffixW: I'll pass your message to hahainternet. | ||
ZoffixW | Hotkeys, sure, but if you type them all the time and you're typing them off from some paper that uses proper powers and your program will be looked at by something who's not "really" a programmer... :) | 17:39 | |
TimToady | for sure we can't make ⅔r³ work without introducing a bad prefix vs term ambiguity, but 1½ has no such difficulty | 17:40 | |
ZoffixW | Oh, it's Operators::Math::Superscripts | ||
Hotkeys | ZoffixW: fair enough | ||
ZoffixW | m: multi postfix:<½> ($n) { $n - .5 }; say 1½ | 17:42 | |
camelia | rakudo-moar : OUTPUT«0.5» | ||
ZoffixW | ehehe. Perl 6++ :) | ||
minus the math error :P | 17:43 | ||
Hotkeys | isn't 1½ 1.5? | ||
ZoffixW | yeah | ||
Should be + instead of - :) | |||
Hotkeys | just checking for my sanity's sake | ||
:p | |||
gtodd | after christmas I can't wait for perl6 (and 5) start saving the planet ... the way it saved Human Genome Project :-) | ||
worrydream.com/ClimateChange/ | |||
ZoffixW | \o/ | 17:44 | |
Hotkeys | perl 6 saved the human genome project? | ||
ZoffixW | Wait, perl saved the genome... that | ||
gtodd | perl5 :-D | ||
ZoffixW | I guess this is based on a true story: xkcd.com/208/ | ||
:) | |||
Hotkeys | I didn't click the link but I knew exactly what it was | 17:45 | |
also this comic describes me when I learned regex | 17:46 | ||
ZoffixW | :P | ||
Skarsnik | 250Mb? now we need a big data DB to handle this at least! | ||
ZoffixW | m: multi prefix:<⅔> ($n) { $n * 2/3 }; multi postfix:<⅔>($n) { $n + 2/3 }; multi postfix:<³>($n){ $n**3 }; my \r = 2; say [1⅔, ⅔r³ ] | 17:47 | |
camelia | rakudo-moar : OUTPUT«[1.666667 5.333333]» | ||
ZoffixW | This is magical :P | ||
Hotkeys | now make it work for any power/fraction :p | 17:48 | |
gtodd | hehe ... in the section on model-driven [reading/authoring/debate] on worrydream.com/ClimateChange/ Mr. Victor asks "What if there were an npm for scientific models?" ... but but why can't CPAN be the gold standard?! | ||
17:48
pmurias left
|
|||
Hotkeys | m: ⅔.uninames | 17:49 | |
camelia | rakudo-moar : OUTPUT«Cannot call uninames(Rat); none of these signatures match: (Str:D $str) in block <unit> at /tmp/ed9LMIRzMf:1» | ||
Hotkeys | huh | ||
ZoffixW | m: ⅔.Str.uninames | ||
camelia | ( no output ) | ||
ZoffixW | m: say ⅔.Str.uninames | ||
camelia | rakudo-moar : OUTPUT«(DIGIT ZERO FULL STOP DIGIT SIX DIGIT SIX DIGIT SIX DIGIT SIX DIGIT SIX DIGIT SEVEN)» | ||
Hotkeys | m: ⅔.nude | ||
camelia | ( no output ) | ||
Hotkeys | er | ||
ZoffixW | heh | 17:50 | |
Hotkeys | m: say ⅔.nude | ||
camelia | rakudo-moar : OUTPUT«(2 3)» | ||
Hotkeys | fancy | ||
I didn't realize these already worked as rats | |||
ZoffixW | m: "⅔".uninames | ||
camelia | ( no output ) | ||
ZoffixW | curses | ||
m: say "⅔".uninames | |||
camelia | rakudo-moar : OUTPUT«(VULGAR FRACTION TWO THIRDS)» | ||
ZoffixW | Oh, I didn't realize I was being vulgar... | ||
Hotkeys | lol | ||
jnthn | TWO &*%!ING THIRDS | 17:51 | |
Hotkeys | m: say "³".uninames | ||
camelia | rakudo-moar : OUTPUT«(SUPERSCRIPT THREE)» | ||
jnthn | Time for dinner; bbl | 17:52 | |
gtodd | m: my %thing.push: <q w e r t y> ; say "there" if "q" ~~ %thing ; say "there" if %thing.values ~~ /w/ ; | ||
Hotkeys | m: say 3³ | ||
camelia | rakudo-moar : OUTPUT«therethere» | ||
rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/jvNkWWErA1Bogus postfixat /tmp/jvNkWWErA1:1------> 3say 37⏏5³ expecting any of: infix infix stopper postfix statement end statement modifier …» | |||
Hotkeys | I like the use of bogus | 17:53 | |
gtodd | why doesn't: say "there" if "w" ~~ %thing.values work? | ||
or why do I feel like it should work :-\ | 17:54 | ||
Hotkeys | m: my %thing.push: <q w e r t y>; say %thing | ||
camelia | rakudo-moar : OUTPUT«e => r, q => w, t => y» | ||
ZoffixW | m: my @a = 1, 2, 0, False, 42, True; @a.grep(*).say | 17:55 | |
camelia | rakudo-moar : OUTPUT«(1 2 0 False 42 True)» | ||
ZoffixW | ENOTMAGICALENOUGH | ||
m: my @a = 1, 2, 0, False, 42, True; @a.grep(so *).say | |||
camelia | rakudo-moar : OUTPUT«(1 2 42 True)» | ||
ZoffixW | cool | 17:56 | |
Hotkeys | so? | ||
ZoffixW | m: say 'foo' ~~ /foo/; say so 'foo' ~~ /foo/; | ||
camelia | rakudo-moar : OUTPUT«「foo」True» | ||
ZoffixW | Converts to boolean | ||
Hotkeys | I didn't know this existed | ||
I was looking for something like this a couple weeks ago | 17:57 | ||
ZoffixW | :) | ||
17:57
molaf joined
17:58
vendethiel joined,
donaldh left,
raiph joined,
rurban joined
17:59
lucasb joined
|
|||
ZoffixW | Hm. I wonder how that new CompUnit stuff will work with circular references. I've got IRC::Client that `use`s IRC::Client::Plugin just for the sake of saying has IRC::Client::Plugin @.plugins; and in IRC::Client::Plugin I have `use IRC::Client` for the sake of having a method interval (IRC::Client) { ... } :/ | 18:02 | |
Maybe I should avoid using those as types. | |||
ilmari | can't you forward-declare the class? | 18:03 | |
ZoffixW | Not sure what that is... is it class IRC::Client { ... } | ||
literally | |||
nine | yes | ||
ZoffixW | Thanks. I'll try | ||
Hotkeys | I've been doing irc plugin stuff too what a coincidence | 18:04 | |
and by doing | |||
I mean not doing | |||
18:04
raiph left
|
|||
Hotkeys | but intend to do at a future time | 18:04 | |
because I was trying to figure out the best way to load and unload plugins and then just kind of stopped working on my irc thing | 18:05 | ||
ZoffixW | I'm making a Perl 6 version of my New Years bot (metacpan.org/pod/App::IRCBot::NewYears) and showcase Perl 6 at Freenode's New Years party. People constantly notice the bot and ask what lang it's written in. Would be nice to broadcast Perl 6's existence :P | ||
Hotkeys | I'm just making (and by making I mean the same as I did with doing above) a general IRC bot for shenanigans etc. | 18:06 | |
ZoffixW | Cool :) | 18:07 | |
18:07
raiph joined
|
|||
Hotkeys | Do you know a simple way to load and unload plugins? | 18:08 | |
specifically the unloading part | |||
ZoffixW | Seems like I *can't* forward-declare the class: "The following packages were stubbed but not defined: IRC::Client::IRC::Client::Plugin" | ||
Hotkeys, what do you mean by unloading? | |||
Just have an $!is-active attribute and set/unset it | |||
Hotkeys | I guess that would be the smart thing to do | 18:09 | |
Skarsnik | unloading the code :) | ||
Hotkeys | what about like | 18:10 | |
hot reloading plugins | |||
is that an unadvisable thing | |||
18:11
rindolf joined,
raiph left
|
|||
ZoffixW | Probably :) | 18:11 | |
No idea how to do that in P6 | |||
Hotkeys | Me either | ||
Skarsnik | The issue is decision like purging the symbole table for the module or not | ||
18:11
psch joined
|
|||
Skarsnik | require reload the file | 18:11 | |
like in p5 | |||
pink_mist | I think hot reloading plugins is an inadvisable thing in every language I've heard of :P if it wasn't in P6, I'd be (even more) amazed (than I already am) | 18:12 | |
Skarsnik | in perl5 to do that it was something like that : delete the module entry in @INC, requiere on it | ||
pink_mist | Skarsnik: that wouldn't be clean ... you really ought to do more than that | 18:13 | |
Hotkeys | I know someone who did it with a python bot | ||
not sure if it was advisable | |||
but | |||
he did :p | |||
Skarsnik | but it work :) | ||
ab5tract | pink_mist: is there an actually "clean" way to do it in P5? | ||
as i understand it, is a long open and unsolved problem | 18:14 | ||
*it is | |||
unless you had the forethought to never import a sub and always use it fully namespaced | |||
Skarsnik | and it really make sens for a IRC BOT | ||
gtodd | m: my %thing.push: <q w e r t y> ; say "there" if "q" ~~ %thing ; say "there" if "w" ~~ any(%thing.values) ; | ||
camelia | rakudo-moar : OUTPUT«therethere» | ||
nine | That ClimateChange site is somewhat depressing | ||
gtodd | why is the "any" needed for %thing.values ( alist?) but not for %thing ? is there a "default" for "~~" against arrays ? | 18:15 | |
ZoffixW | Oh wow. Two modules using each other actually freezes perl6 | 18:16 | |
nine | ZoffixW: yes, we did have protection against that, but it's broken. It's on my TODO list for curli | ||
ZoffixW | k :) | ||
gtodd | nine: ... we are going to have fight on the same team to survive :-| | ||
ZoffixW | nine++ # fixing things | ||
gtodd | nine: should become obvious at some point ... but possibly a bit too late | 18:17 | |
18:18
domidumont left
|
|||
nine | gtodd: it's the interactive "world carbon emissions (in GtCO2/yr) and carbon budget" diagram that makes it seem almost hopeless | 18:18 | |
ZoffixW plans to just hitch a ride with Elon Musk to Mars | 18:19 | ||
gtodd | :-D you said "almost" =-D | ||
Hotkeys | gfodd what's wrong with "thing" ~~ any @foo | ||
18:19
spider-mario joined
|
|||
TimToady | too much carbon on Mars as well, relative to oxygen :) | 18:20 | |
Hotkeys | smart match "thing" with any of @foo | ||
ZoffixW | :) | ||
nine | TimToady: well you can hardly make it worse there ;) | ||
Hotkeys | we just need to put more oxygen there TimToady no problem | ||
TimToady | well, really you mostly need more hydrogen | ||
ZoffixW | TimToady, not true actually! There're two oxygens for every carbon! :P | 18:21 | |
Hotkeys | lol | ||
TimToady | and install a magnetic field, while you're at it | ||
DrForr | So it's already got a head start on carbon sinks. | ||
Hotkeys | we just need to reactivate mars geologically | ||
no problem | |||
get that core all hot and bothered | |||
TimToady | that would take...some patience | ||
DrForr | Bruce Willis will save us! | 18:22 | |
ZoffixW | Meh, dig a hole. Underground city. Problem solved :P | ||
Hotkeys | I prefer dome cities | ||
TimToady | till the next fire drill | ||
Hotkeys | much more futuristic | ||
gtodd | Hotkeys: nothing wrong with it ... just wonder why the junctions aren't automagical ... I thought they were at one point | 18:23 | |
ZoffixW | And there's likely more of that briny water they recently discovered. Split that up with electrolysis. Boom: you got oxygen to breath and hydrogen to make fuel (CH4) and moar oxygen | ||
gtodd | m: (1,2,3,4,5) ~~ (*,2,3,*) | ||
camelia | ( no output ) | ||
DrForr | That *does* increase the risk that Arnold Schwarzenegger will have to save you, not worth the risk IMO. | ||
ZoffixW | :) | ||
gtodd | m: say "magic" if (1,2,3,4,5) ~~ (*,2,3,*) | ||
camelia | ( no output ) | ||
ZoffixW | m: say (1,2,3,4,5) ~~ (*,2,3,*) | ||
camelia | rakudo-moar : OUTPUT«False» | ||
TimToady | m: say (1,2,3,4,5) ~~ (**,2,3,**) | 18:24 | |
camelia | rakudo-moar : OUTPUT«True» | ||
ZoffixW | 0.o whoa! | ||
TimToady | * now is just a single smartmatch | ||
gtodd | oh right | ||
forgot about that change | |||
TimToady | m: say (1,2,3,4,5) ~~ (**,2,*,4,**) | ||
camelia | rakudo-moar : OUTPUT«True» | ||
18:24
cdg left
|
|||
TimToady | m: say (1,2,3,4,5) ~~ (**,Int,*,Int,**) | 18:25 | |
camelia | rakudo-moar : OUTPUT«True» | ||
TimToady | because we made that work | ||
ZoffixW | 0.o | ||
psch | ZoffixW: your forward declaration for IRC::Client::Plugin didn't work because it was inside IRC::Client, btw | ||
18:25
cdg joined
|
|||
ZoffixW | I thought I tried the other way too | 18:25 | |
ZoffixW tries again | |||
gtodd | and "**" is read as "any number of smartmatches" ? | 18:26 | |
psch | the other way should work, although i don't know how that interacts with the statement level package declarator | ||
TimToady | kinda ties in with the multi-dimensional notion | ||
ZoffixW | psch, "Too late for unit-scoped class definition; Please use the block form." **uses block form** "The following packages were stubbed but not defined: IRC::Client::Plugin" | ||
psch | ZoffixW: huh. is that gisted or so somewhere? | 18:27 | |
ZoffixW | psch, here: github.com/zoffixznet/perl6-IRC-Client | 18:28 | |
psch, you can run examples/bot.pl6 to see the error | |||
arnsholt | jnthn: Patch removes the shape-less constructor. Running spectest now | ||
ZoffixW | psch, and here I'm doing the forward declaration and I only really need it for line 13: github.com/zoffixznet/perl6-IRC-Cl...ent.pm6#L2 | 18:29 | |
Hotkeys | pff what kind of nick limit is 9 chars | ||
psch | ZoffixW: i'll look closer in a moment | 18:30 | |
ZoffixW | Hotkeys, RFC1459? :) | ||
Hotkeys | pff | ||
18:31
Hotkeys is now known as Ihavemorethan9ch
|
|||
Ihavemorethan9ch | close enough | 18:31 | |
nine | Seems like build on JVM is broken again: Error while compiling op unipropcode (source text: "nqp::unipropcode(\"NumericValueNumerator\")"), no registered operation handler | ||
FROGGS | nine: I'd continue with writing tests, or is there anything else I should look into? | ||
18:31
Ihavemorethan9ch is now known as Hotkeys
|
|||
gtodd | smartmatch against a hash seems to match "any (%hash.keys)" automagically as in my %hash = <A B C D> ; "A" ~~ %hash ; | 18:31 | |
ZoffixW | m: say "Ihavemorethan9ch".chars | ||
nine | FROGGS: tests sound good :) I have cleaned a couple of spec tests yesterday in the roast/curli branch | ||
camelia | rakudo-moar : OUTPUT«16» | ||
psch | nine: i'm working around that right now | 18:32 | |
FROGGS | nine: my plan was to write tests for creating CURI's and installing into them | ||
psch | with dummy getuniprop_str and unipropcode (and only matching unum when when we're on moar) | ||
FROGGS | nine: dunno what tests in that area exist already | ||
nine | FROGGS: other missing pieces are $?REPO and detecting loops when loading modules. The latter involves communicating a list of loading modules to the precomp process | 18:33 | |
gtodd | but then for the values you need to explicitly say "B" ~~ any (%hash.values) ; ... gaak I don't need to worry if it once upon a time used to not be like that :-) | ||
FROGGS | nine: okay, I stick with tests :o) | ||
Hotkeys | interesting, rfc 2813 also has " | ||
Each user is distinguished from other users by a unique nickname having a maximum length of nine (9) characters. " | |||
nine | FROGGS: acking for CompUnit in roast is enlightening :) | ||
Hotkeys | oops newline | ||
FROGGS | nine: oh, good idea | 18:34 | |
dalek | kudo/curli: 9345857 | jnthn++ | src/core/ThreadPoolScheduler.pm: Fix thinko in scheduler that swallowed exceptions. Deals with a bunch of silent failures that made debugging harder. |
||
18:34
dalek left
|
|||
ZoffixW | heh | 18:34 | |
18:35
dalek joined,
ChanServ sets mode: +v dalek
|
|||
FROGGS | nine: cool, there are no install tests yet | 18:35 | |
nine | FROGGS: the tests that are still failing may also give some inspiration | 18:36 | |
FROGGS | true | ||
18:38
kjs_ left,
rigsby joined
18:39
vike left,
kjs_ joined
|
|||
psch | oh ffs | 18:40 | |
r: say nqp::getcomp('perl6') | |||
pink_mist | <ab5tract> pink_mist: is there an actually "clean" way to do it in P5? <-- sorry, was off ... there's modules that can remove things from a namespace, but I don't know if they're 100% at what they do | ||
camelia | rakudo-jvm 4d8a90: OUTPUT«===SORRY!===java.lang.NullPointerException» | ||
..rakudo-moar: OUTPUT«Method 'gist' not found for invocant of class 'Perl6::Compiler' in block <unit> at /tmp/tmpfile:1» | |||
psch | no .gist i'm ok with | ||
grmbl | |||
zengargoylew | somebody once pointed out that the thing to do was load the module in a Safe and then dispose of the Safe when done with the module... | 18:42 | |
18:42
kjs_ left
|
|||
Hotkeys | a Safe? (not in docs.perl6.org) | 18:43 | |
ZoffixW | It's in a safe place... | 18:44 | |
badum tsss | |||
Hotkeys | oh you | ||
zengargoylew | nah, in P5 | ||
Hotkeys | oh | ||
whoops | |||
is there anything similar in the six? | 18:45 | ||
hahainte1net | oh thanks ZoffixW | 18:47 | |
zengargoylew | i sorta expect/expected p6 to be all restricted scopelike that a use/require of something is only visible to the block that does it (and inner things). | ||
18:47
hahainte1net is now known as hahainternet
|
|||
hahainternet | and thanks TimToady for unicode superscripts, but you should not leave out $x₁ and $x₂ being legit variable names :) | 18:48 | |
yoleaux | 17:38Z <ZoffixW> hahainternet: I recall you really wanted those superscript powers: irclog.perlgeek.de/perl6/2015-11-25#i_11598216 | ||
18:48
Sqirrel joined
|
|||
zengargoylew | sorta like: blah; ...; { use Foo; blah; ...; } # Foo is totally not a thing out of the block. | 18:48 | |
TimToady | hahainternet: I'm kinda dubious of that one, in particular due to 1-based vs 0-based assumptions | 18:49 | |
Hotkeys | just let $x_0 also exist :p | ||
hahainternet | TimToady: alphabetic subscripts are also permitted | ||
so $x_a and $x_b for example | |||
i just think these characters should be permitted in variable names | 18:50 | ||
TimToady | Hotkeys: $x_0 already exists :P | ||
hahainternet | rather than any special handling | ||
Hotkeys | I meant with subscript :p | ||
I just cba to figure out how to type subscripts in the windows | |||
without too much effort | 18:51 | ||
hahainternet | depends on how your compose key works, i'm not sure how to do subscript as on Debian | ||
Hotkeys | I don't think I have a compose key | ||
hahainternet | but regardless, doing y_a and y_b for your different variable names are common | ||
Hotkeys | is that like the any key? | ||
uruwi[A] | x₀ | ||
18:51
uruwi[A] is now known as uruwi
|
|||
hahainternet | Hotkeys: it's shift + altgr for me | 18:51 | |
zengargoylew | compose + _ + 1 | ||
uruwi has WinCompose | |||
18:52
vike joined
|
|||
gtodd | m: say "Ƹ̵̡xD3x9CxCCxB5xCCx84xCCxA8xC6xB7" ; | 18:52 | |
camelia | rakudo-moar : OUTPUT«Ƹ̵̡Ӝ̵̨̄Ʒ» | ||
zengargoylew wanted to update the How to input Unicode part of the docs, but decided it was too hard. :P | 18:53 | ||
ZoffixW | Hotkeys, not knowing how to type it and cba to learn how to type it are poor arguments for letting $x₀ be a thing :P | ||
FROGGS | looks a bit ill in my client | ||
Hotkeys | did you mean not letting | 18:54 | |
and if you did I am not at all against them | |||
zengargoylew | plus, Debian and probably others using iBus has sorta broken XCompose functionality anyways. | ||
hahainternet | FROGGS: the subscript and superscript fonts are mostly ignored | ||
and i typed those on debian so | |||
ZoffixW | Hotkeys, no I meant "for letting" :) If you have trouble typing them, that means you'll likely won't use them :P | 18:55 | |
hahainternet | the only way these will get any attention is when something properly supports their use | ||
and i see no difference between $y1, $y2 and $y₁ and $y₂ | |||
Hotkeys | They should still be allowed though | ||
ZoffixW | m: multi term:<x₀> { 42 }; say x₀ | ||
camelia | rakudo-moar : OUTPUT«42» | ||
zengargoylew | hahainternet: what do you mean fonts are ignored? i'm on debian and see sub/super scripts just fine. | 18:56 | |
ZoffixW | hahainternet, the latter is much harder to type :P | ||
hahainternet | zengargoylew: certain alphabetic subscripts don't exist in unicode at all, and many are not included in your 'regular' fonts | ||
Hotkeys | if we can't get subscripts on scalars can we use them for arrays ;p | ||
hahainternet | so they look weird as they're brought in from other fonts | ||
ZoffixW | Even if you set them as compose sequences, it's more time | 18:57 | |
hahainternet | ZoffixW: so? | ||
it also takes longer to use uppercase letters | |||
Hotkeys | eg @x₁ | ||
hahainternet | should they be restricted in variables? | ||
Hotkeys | :D | ||
ZoffixW | lol fair enough :P | ||
hahainternet | i mean, it really doesn't take long to do shift + altgr + _ + 0 | ||
zengargoylew | ah, codepoint vs formatting. | ||
Hotkeys | that combo uses my whole hand :P | 18:58 | |
gtodd | .u U+1F98B | ||
yoleaux | No characters found | ||
hahainternet | for ² and ³ on debian you can cheat and just hold altgr + press 2,3 | ||
18:58
uruwi left
|
|||
hahainternet | but they are 'third level keys' and are documented so incredibly poorly you'd be lucky to find a list anywhere | 18:58 | |
18:58
uruwi joined,
hankache joined
|
|||
uruwi wonders why there is still no superscript -1 | 18:58 | ||
hahainternet | $x¯¹ | 18:59 | |
it's two characters | |||
ZoffixW | I don't have those | ||
The "hold altgr + press 2,3" I mean | |||
hahainternet | ZoffixW: what are you on? | ||
ZoffixW | LSB Version:core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch | ||
Distributor ID:Ubuntu | |||
Description:Ubuntu 12.04 LTS | |||
Release:12.04 | |||
Codename:precise | |||
uruwi | Actually, I'd prefer an option that's one character wide. | 19:00 | |
ZoffixW | Oopps Sorry. I thought that would be one line | ||
hahainternet | ah i don't know anything about ubuntu i'm afraid | ||
Hotkeys | who is it that mentioned wincompose | ||
just got it and this is wonderful | |||
uruwi | I mentioned it | ||
hahainternet | uruwi: then you should go talk to the unicode standard types, because i want $x_c too :) | ||
ZoffixW | hahainternet, it's a fork of debian, so I'd imagine stuff would be similar | ||
hahainternet | ZoffixW: it was a fork of debian a long time ago | ||
19:00
uruwi is now known as uruwi[A]
|
|||
hahainternet | now it's a testing platform for mark shuttleworth's broken ideas ;) | 19:00 | |
ZoffixW | hehe :P | ||
hahainternet | anyway yeah, holding altgr is the 'third level' selection, so your distro may configure it differently | 19:01 | |
FROGGS | m: use Test; is ::('Foo'), Failure, '...' # :/ | ||
camelia | rakudo-moar : OUTPUT«not ok 1 - ...# Failed test '...'# at /tmp/FWeST2YcbN line 1# expected: (Failure)# got: (Failure)» | ||
hahainternet | for compose sequences for superscripts it's hold shift + altgr, ^ then the number | ||
ZoffixW | hahainternet, oh, I was just trying my Compose key | ||
hahainternet | ¹³³⁷ | ||
zengargoylew | depends on tweaks, my compose is rightwindowskey on one machine and capslock on another. | 19:02 | |
hahainternet | anyhow TimToady my feeling is, if it's in unicode and it has unambiguous use in maths or computing, there's no reason we shouldn't support it, but i know it's easy to say that without me doing the implementation | ||
timotimo | :þ | ||
ZoffixW | dammit... Worked once with Compose+shift+6, but now it doesn't :S something's borked | ||
hahainternet | so i will try and put some more time into learning nqp | ||
Hotkeys | uruwi[A]: subscripts won't work for me :( | ||
hahainternet | ZoffixW: shift + altgr first, in that order | ||
ZoffixW | timotimo, was the Weekly published for this week? | ||
hahainternet | it's a bit wacky | ||
ZoffixW | hahainternet, same difference | 19:03 | |
hahainternet | ZoffixW: weird, wish i could help i'm afraid | ||
gtodd | U+1F98B (butterfly) is recommended for Unicode 9 | ||
ZoffixW | ᦋ | ||
hahainternet | i assume … is ... in p6 too | ||
ZoffixW | That looks like a ballsack on my screen | ||
hahainternet | i don't have that font char :( | 19:04 | |
ZoffixW | hahainternet, irclog.perlgeek.de/perl6/2015-11-25#i_11598956 | ||
hahainternet | wait, i'm confused | ||
what's with the link? | |||
El_Che | had a great few hours at work transposing perl5 regex into the perl6 dialect | 19:05 | |
nice | |||
ZoffixW | hahainternet, oh. Usually when I can't see chars on IRC, they show up fine in the browser. | ||
Hotkeys | m: say (1…3).perl | ||
camelia | rakudo-moar : OUTPUT«(1, 2, 3).Seq» | ||
Hotkeys | ayy | ||
hahainternet | ZoffixW: oh really? that shouldn't be the case! | ||
the same font selection should be carried out | |||
bloody ubuntu :p | |||
ZoffixW | hahainternet, not if you use different fonts for IRC/Browser :P | 19:06 | |
I don't want fixed-width fonts in the browser :P | |||
hahainternet | ZoffixW: it doesn't actually use a single font you know | 19:07 | |
when a font doesn't have a particular glyph | |||
it pulls said glyphs from other fonts | |||
ZoffixW | I highly doubt that | ||
Hotkeys | wincompose isn't doing anything that requires shift key for me | ||
:( | |||
ZoffixW | hahainternet, anyway. here's that char: i.imgur.com/JSvLkVp.png | ||
geekosaur | depends on the client | ||
hahainternet | ZoffixW: en.wikipedia.org/wiki/Fallback_font | ||
wiki.archlinux.org/index.php/Fonts...r_with_X11 | 19:08 | ||
it's a real thing, believe me or not ;) | |||
geekosaur | I note that hexchat on most Debian-derivatives does not handle codepoints > U+FFFF | ||
19:10
cdg left,
cdg joined
|
|||
psch | welp, there goes my workaround for <unum> on jvm | 19:10 | |
Hotkeys | oh | ||
psch | we don't have the compiler object yet during Grammar or Actions compilation, which i probably should've been aware of... :) | ||
Hotkeys | I figured it out | ||
ZoffixW | hahainternet, ah OK. You meant a fallback font. I thought you meant it goes over a bunch of my installed fonts, trying to find some chars. | ||
Hotkeys | you dont have to hold the compose key | 19:11 | |
I'm a goof | |||
ZoffixW | You don't? | ||
Whoa! | |||
Hotkeys | for wincompose | ||
ZoffixW | Hotkeys++ | ||
Hotkeys | idk about linoox | ||
hahainternet | ZoffixW: that is ultimately how it works, see the second link | ||
Hotkeys | but if it works | ||
then np | |||
:p | |||
hahainternet | you can control the order in which it searches :) | ||
ZoffixW | Damn. And now the superscript stuff works ⁶¹² | ||
hahainternet | and yeah sorry was i not clear about compose, it's shift+hold, press altgr and release both on Debian | 19:12 | |
swank :D | |||
Hotkeys | $x₃ | ||
hahainternet | it's a unicode party! | ||
19:12
cdg left
|
|||
Hotkeys | ¹²³⁴⁵ | 19:12 | |
this is so useful | |||
psch | i suppose the alternative is throwing NYI when we get dummy values back from unipropcode and getuniprop_str... | ||
Hotkeys | Imean not incredibly but | ||
yknow | |||
ZoffixW | hahainternet, I've been holding compose while typing "—" for a good 5-6 years :P | ||
Hotkeys | haha | ||
hahainternet | ZoffixW: D: i'm so sorry | ||
psch | 'cause i'm not implementing those on r-j right now vOv | 19:13 | |
hahainternet | psch: i don't know if i mentioned i saw what you did, and i thank you greatly for it | ||
psch | hahainternet: uh, what? :) | ||
hahainternet | psch: your module the other day | 19:14 | |
when we were discussing unicode super/subscripts etc | |||
psch | hahainternet: oh, the superscript slang? that was just poking around towards making it work - it doesn't (or didn't for me) work | ||
hahainternet | still deserves a thanks | ||
Hotkeys | thanks uruwi[A] now I am a unicode god | ||
ok brb going to lecture | |||
psch | hahainternet: FROGGS++ can probably give you pointers towards actually making it work, fwiw | ||
FROGGS | umm, what? | 19:18 | |
ahh, slangs :o) | 19:19 | ||
psch | gist.github.com/peschwa/7202b9f622de517cd881 this one | ||
psch afk for a bit | |||
flussence | I don't see it mentioned above so: all the compose keycombos are in /usr/share/X11/locale/en_US.UTF-8/Compose (seems to be the case here even though that's not my system locale) | 19:20 | |
19:21
espadrine left
|
|||
zengargoylew | time to pack up from work and start the awesome 4½ day weekend | 19:21 | |
TimToady | it is quite certain that, if keyboard manufacturers added an explicit Compose key, they'd put it in the wrong place | ||
ZoffixW | flussence++ sweet | 19:22 | |
arnsholt | jnthn: There's a spectest break with your patch. t/spec/S02-types/is-type.t bails with the error "Cannot modify an immutable BagHash" after test number 8 (t/spec/S02-types/is-type.rakudo.moar:39) | ||
19:22
MadcapJake joined
|
|||
hankache | zengargoylew 4 and a half!! I am jealous | 19:22 | |
zengargoylew | maybe that will be enough free time to figure out adding =data to POD! :) | 19:23 | |
ZoffixW | Doesn't seem to be accurate tho. I see "<Multi_key> <backslash> <o> <slash> : "🙌"", but pressing that sequence does nothing | ||
Hotkeys | TimToady: even if they just renamed the right alt button that'd be okay | ||
I never use right alt anyway | |||
ZoffixW uses right Windows key for Compose | |||
nine | Note to self: if you set ENV vars _after_ running the sub process, no debugging in the world will make it see the variable... | 19:24 | |
retupmoca | zengargoylew: have you seen Data::Section::Simple ? | ||
Hotkeys has no right windows key | |||
flussence | 🙌 wfm | ||
Hotkeys | only left | ||
retupmoca has no idea if it actually works, fwiw | |||
Hotkeys | and I use left windows key to open things | ||
19:24
cdg joined
|
|||
Hotkeys | hit left windows key, type part of name, hit enter | 19:24 | |
zengargoylew | just remap it to whatever you want. caps-lock seems to suit me best. | ||
Hotkeys | hope windows got what I wanted to open right | ||
MadcapJake | What am I doing wrong in this: gist.github.com/MadcapJake/0089315a03c13e30c514 | ||
19:25
leont joined
|
|||
Hotkeys | that seems reasonable zengargoylew, the only real use for capslock is yelling | 19:25 | |
ZoffixW | MadcapJake, age is private? | ||
Hotkeys | even then I often hold shift | ||
ZoffixW | MadcapJake, oh, I'm blind never mind | ||
19:26
cdg left
|
|||
MadcapJake | ZoffixW: Just trying to play with declaring custom accessors | 19:26 | |
zengargoylew | sadly you can't really mix XCompose and iBus | ||
retupmoca | MadcapJake: $!age is private - you either need to make it public '$.age' or write a custom submethod BUILD | ||
MadcapJake | oh you can't do it with `new`? | ||
retupmoca | self.bless(...) will only initialize public attributes by default | 19:27 | |
zengargoylew | iBus 'borrows' some of the standard XCompose mappings but not all, and doesn't read ~/.XCompose | ||
ZoffixW | How about that. I was right :P | ||
MadcapJake | ohh, what exactly is the difference between `new` and `BUILD`? | ||
arnsholt | new has to actually construct the object; for example using low-level primitives like nqp::create | 19:28 | |
BUILD only has to initialize an already constructed object | |||
ZoffixW | MadcapJake, this might be helpful: docs.perl6.org/language/objects#Submethods | ||
19:29
yqt joined,
Sqirrel left
|
|||
zengargoylew | retupmoca: i'm not sure Data::Section::Simple is actually supposed to be possible. still need to ask TimToady about that. | 19:30 | |
arnsholt | docs.perl6.org/language/objects#Obj...nstruction (linked to from the submethod section) is more relevant | ||
zengargoylew | the =finish section it's using is *supposed* to be POD according to the S26 | 19:31 | |
retupmoca | zengargoylew: Ah, ok. I don't actually know anything about it, other than "it exists" | ||
19:32
kjs_ joined
|
|||
zengargoylew | i'm not sure if current handling of =finish is an accident in implementation or a change in spec.... | 19:32 | |
MadcapJake | so it goes `new` -> `bless` -> `BUILDALL` -> { `Mu.BUILD`, `Any.BUILD`, ... , `self.BUILD` } | 19:35 | |
19:35
CIAvash left
19:36
kjs_ left
|
|||
zengargoylew commute & | 19:36 | ||
19:36
zengargoylew left
|
|||
MadcapJake | so when would you ever want to override `new`? | 19:37 | |
19:37
ZoffixW left
|
|||
jnthn | arnsholt: Hm, are those tests about "is Foo" on state vars? | 19:39 | |
19:39
cdg joined
|
|||
jnthn | arnsholt: If so, one was passing bogusly and one was failing and todo'd already, so I'd be fine with skipping them both | 19:39 | |
TimToady | MadcapJake: if you wanted a positional interface, for one thing | ||
hankache | MadcapJake i do it to pass positional arguments instead of named | 19:40 | |
MadcapJake | ok cool! I get it, which route would you take for doing a "named constructor" paradigm, perhaps turn `new` into a multi method? | 19:42 | |
19:47
xfix joined
|
|||
retupmoca | I usually do 'multi method new', but I've also done 'method otherName { self.bless(...) }' as well | 19:48 | |
dalek | ast/curli: a138e08 | FROGGS++ | S11-repository/curli-install.t: add tests for installing into a CURI |
19:49 | |
FROGGS | nine: ^^ | ||
not much, but it is a start | 19:50 | ||
dalek | kudo/curli: 7155a27 | FROGGS++ | t/spectest.data: run test file S11-repository/curli-install.t |
||
nine | FROGGS: a good start :) | 19:51 | |
19:53
ZoffixW joined
|
|||
ZoffixW | Is the colon instead of () for method calls only for builtins? | 19:54 | |
arnsholt | jnthn: Yeah, it's the state %h is BagHash one | ||
ZoffixW | $.ssay: $msg; # $.ssay:⏏ $msg; expecting any of: colon pair | ||
Kinda weird we have both "Classes and Objects" and "Object Orientation" in the docs | 19:57 | ||
19:57
darutoko left,
eliasr joined
|
|||
psch | m: class A { method ssay($a) { say $a }; method foo { self.ssay: "foo" } }; A.new.foo | 19:58 | |
camelia | rakudo-moar : OUTPUT«foo» | ||
psch | ZoffixW: $. in a class doesn't exactly mean self, only somewhat | ||
(i'm not sure on the exact difference...) | |||
ZoffixW | psch++, ok, thanks | ||
20:02
zacts joined
|
|||
flussence just replaced some ridiculous «$sock.print:("rn" RX~ @lines).join» hack in an old one-off script with a way more readable lexical «use newline :crlf» :D | 20:02 | ||
mst | RX~ ? | 20:03 | |
flussence | R[X[&infix:<~>]] | 20:04 | |
arnsholt | mst: R reverses the argument order of an infix | ||
leont | That is rather awful… | ||
yoleaux | 22 Nov 2015 09:01Z <FROGGS> leont: I try to golf it down to a testcase | ||
flussence | looks cute but takes 15 minutes to figure out wtf it does first time... | ||
arnsholt | Yeah. Why not "@lines X~ "\r\n"" though? | ||
TimToady | why no tjust RX~ ? | 20:05 | |
oh, that's what you have | |||
flussence | arnsholt: @lines was a bunch of quoted strings in the actual code, it *was* slightly easier to follow by putting the line ending up front instead of having it dangling | ||
TimToady | sure, end-weight is important sometimes, and the usual reason for using R | 20:06 | |
arnsholt | Ah, right. That makes sense, yeah | ||
ZoffixW | Someone said P6's S/// is the same as P5's s///r, but I don't see S/// in the docs nor specs and I can't figure out how to actually use it. | ||
m: say 'foo' ~~ S/foo/foos/; | |||
camelia | rakudo-moar : OUTPUT«Potential difficulties: Smartmatch with S/// can never succeed because the subsequent string match will fail at /tmp/J7GZIfOmVj:1 ------> 3say 'foo' ~~ S/foo/foos/7⏏5;False» | ||
TimToady | R/ often has a big hairy thing to be divided by something simple | ||
ZoffixW | s///r is "return the result instead of trying to assign it" | 20:07 | |
TimToady | ~~ is not "the binding operator" in P6 | ||
it's the smartmatch operator | |||
it happens to topicalize as well | |||
flussence | that error message could probably use a "Did you mean '='?" then | 20:08 | |
wait, that's wrong | |||
dalek | ast: b287fb8 | arnsholt++ | S02-types/is-type.t: Skip bogus is Foo on state variables. |
||
TimToady | but you can't use it *only* for topicalization unless your RHS returns something that is a known success/failure value | ||
ZoffixW | Then what's the right way to use S///? | ||
TimToady | m: say S/foo/foos/ with 'foo'; | 20:09 | |
camelia | rakudo-moar : OUTPUT«foos» | ||
ZoffixW | Oh | ||
ZoffixW never heard of with | |||
TimToady | m: say S/foo/foos/ given 'foo'; | ||
camelia | rakudo-moar : OUTPUT«foos» | ||
flussence | S/// works on $_, for everything else you'd need .subst | ||
ZoffixW | m: say S/foo/foos/ for 'foo' | ||
camelia | rakudo-moar : OUTPUT«foos» | ||
ZoffixW | cool | ||
TimToady | m: say ("foo" andthen S/foo/foos/) | 20:10 | |
camelia | rakudo-moar : OUTPUT«foos» | ||
flussence | m: given 'foobar' { my $baz = S[(.)$0] = 'xx'; dd $_, $baz } | ||
camelia | rakudo-moar : OUTPUT«Str $var = "foobar"Str $var = "fxxbar"» | ||
colomon | /me did not realize S/// was a thing. s///, sure. But S? | ||
TimToady | m: "foo" ~~ say S/foo/foos/) | 20:11 | |
camelia | rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/TjHOET_HLwUnexpected closing bracketat /tmp/TjHOET_HLw:1------> 3"foo" ~~ say S/foo/foos/7⏏5)» | ||
TimToady | m: "foo" ~~ say S/foo/foos/ | ||
camelia | rakudo-moar : OUTPUT«foos» | ||
TimToady | so there's lots of ways to do it, just not the one you want | 20:12 | |
but I figgered it would be better to fail in that case than to try to dwim | |||
ZoffixW | I went with: $!debug and say ".privmsg({$msg.subst("\n", "", :g)})"; | ||
dalek | kudo/nom: 6313051 | arnsholt++ | src/Perl6/World.nqp: Be more specific about when to create container types. jnthn++ for the patch. |
20:13 | |
Skarsnik | .subst is easier to use x) | ||
ZoffixW | It reminds me of JavaScript... and I'm not a huge fan of JavaScript :) | ||
flussence | m: use newline "".pred; say 'hi!'; | 20:14 | |
camelia | rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/m9RZGS6Hi3Error while importing from 'newline':no EXPORT sub, but you provided positional argument in the 'use' statementat /tmp/m9RZGS6Hi3:2------> 3".pred7⏏5; say 'hi!';» | ||
flussence | m: OUR::<$?NL> := "".pred; say 'hi!'; | 20:15 | |
camelia | rakudo-moar : OUTPUT«hi!» | ||
timotimo | ZoffixW: it wasn't publihed for this week yet :( | ||
flussence | m: BEGIN OUR::<$?NL> := "".pred; say 'hi!'; | ||
camelia | rakudo-moar : OUTPUT«hi!» | ||
ZoffixW | timotimo, ok :) | ||
flussence | m: BEGIN OUR::<$?NL> := "".pred; say $?NL.perl; | 20:16 | |
camelia | rakudo-moar : OUTPUT«"\n"» | ||
ZoffixW | timotimo, wait until next week and do a double-feature :) | ||
flussence | m: BEGIN OUR::<$?NL> := "\x[2423]"; say $?NL.perl; | ||
camelia | rakudo-moar : OUTPUT«"\n"» | ||
20:16
rurban left
|
|||
dalek | kudo/curli: 5344dfd | (Stefan Seifert)++ | src/core/CompUnit (3 files): Fix circular module loading detection and error messaging |
20:17 | |
nine | ZoffixW: ^^^ | 20:18 | |
ZoffixW | weee | ||
nine++ | |||
nine, but does that mean it's impossible to have two modules `use` each other? | |||
nine | ZoffixW: yes and that's a good thing ;) | ||
ZoffixW: the solution to your problem really is predeclaring the class. | 20:19 | ||
ZoffixW | Hm. But that means I have a real usecase for which P6—with all its might—doesn't exist. | ||
nine, but I've tried that and I'm getting errors | |||
s/doesn't exist/can't solve/; | |||
nine, irclog.perlgeek.de/perl6/2015-11-25#i_11598614 | 20:20 | ||
timotimo | ZoffixW: i'm afraid i'll end up doing it double-feature style next week, yeah :| | ||
dalek | kudo/nom: 6ca14ad | peschwa++ | src/Perl6/ (2 files): Restrict <unum> matching to moar. NQP-J doesn't have (proper) getuniprop_str or unipropcode yet, so we work around that. |
20:22 | |
psch | uhm | 20:23 | |
no one build HEAD on jvm right now... :P | |||
20:23
MadcapJake left
20:24
lichtkind joined
|
|||
dalek | p: efd48d6 | peschwa++ | src/vm/jvm/ (2 files): Implement stubs for getuniprop_str and unicodeprop. |
20:25 | |
kudo/nom: d4b93ab | peschwa++ | tools/build/NQP_REVISION: Bump NQP_REVISION for nqp::unipropcode and nqp::getuniprop_str stubs. |
|||
psch | there, all better \o/ | 20:26 | |
20:27
TEttinger joined
20:28
FROGGS left
|
|||
nine | ZoffixW: your issue must be solvable. I'm sure of that. I'm also too tired right now to find the solution :/ | 20:29 | |
ZoffixW | Alright. I'll mention it again some time in the future :) | ||
jnthn | arnsholt: Feel free to fudge those and push the patch. :) | ||
psch | ZoffixW: the obvious fix would moving Plugin.pm inline into Client | 20:30 | |
ZoffixW: that's a bit eh, though, for obvious reasons | |||
arnsholt | jnthn: Already done! =D | ||
ZoffixW | right | ||
psch | ZoffixW: but stubbing the *role* IRC::Client::Plugin outside of IRC::Client works as expected :P | 20:31 | |
jnthn | arnsholt: Indeed, now I caught up with the backlog :) | 20:32 | |
ZoffixW: If two things are so tightly coupled that they want a typed circular dependency, they probably deserve to be in the same compilation unit (e.g. module) | |||
20:33
kid51 joined
|
|||
psch | ZoffixW: as in s/class/role/ in lib/IRC/Client.pm6:2 | 20:33 | |
ZoffixW | psch, oohhh.. Damnit. right :D | ||
jnthn | Oh, or was pre-decl just being done wrong and they were in the same... :) | 20:34 | |
ZoffixW | jnthn, nah, all I needed is a way to say has My::Role $bar; in one of my classes and it can be done by stubbing. The reason I was getting errors is because I was stubbing it with class My::Role { ... } instead of role My::Role { ... } | ||
psch++ | |||
jnthn | Aye, I thought you were trying to have them over two files :) | ||
ZoffixW | jnthn, yeah, they *are* in two different files :) | 20:35 | |
20:35
geraud joined
|
|||
ZoffixW | And stubbing lets you avoid `use`ing the other file | 20:35 | |
Or at least it works right now :P (it gets `use`d by other stuff). | 20:36 | ||
Skarsnik | do you have a gist of how your irc client work? I nearly want to rewrite one for me x) | 20:38 | |
ZoffixW | Skarsnik, examples/bot.pl6 in this repo: github.com/zoffixznet/perl6-IRC-Client/ | 20:42 | |
Skarsnik, for some values of "work" though. I merely managed to get it join a channel and spam with an Interval every 5 seconds :) | 20:43 | ||
Skarsnik | "Nicks can only be 9-chars long max." that untrue for most irc server x) | 20:44 | |
ZoffixW | Skarsnik, yeah, I'll remove that restriction soon. | ||
hahainternet | if you're writing an irc client | ||
do not hardcode line length | |||
while most ircds are limited to 512 or whatever | |||
it's now common to change that | |||
bloody irssi | 20:45 | ||
ZoffixW | noted ;) | ||
pink_mist | hahainternet: is there any way the server can communicate line length to you upon connection though? | ||
hahainternet | pink_mist: it does so as part of its capabilities doesn't it? | ||
lucasb | m: say Mu === Mu | 20:46 | |
camelia | rakudo-moar : OUTPUT«Cannot call infix:<===>(Mu, Mu); none of these signatures match: ($?) ($a, $b) (Int:D \a, Int:D \b) (int $a, int $b) (Num:D \a, Num:D \b) (Num $ where { ... }, Num $ where { ... }) (num $a, num $b --> Bool) (Str:D …» | ||
pink_mist | I've never seen that bit in the caps | ||
lucasb | should '===' be defined to work with Mu too? | ||
ZoffixW | pink_mist, Freenode sends NICKLEN=16 | ||
pink_mist | ZoffixW: no, line length, not nick lenght | ||
ZoffixW | err | ||
pink_mist | *length | ||
jnthn | lucasb: Generally operators are not. | ||
lucasb: If they were, junction auto-threading wouldn't work. | 20:47 | ||
geekosaur | don't see a line length in freenode's stuff, but freenode uses the rfc default | ||
hahainternet | pink_mist: just hopping on perl irc, no line length there i can see | ||
lucasb | jnthn: ok, thanks | ||
pink_mist | hahainternet: yeah, I've never heard of any ircd that didn't have 512 as limit | ||
ZoffixW | pink_mist, don't see anything: fpaste.scsys.co.uk/501930 | 20:48 | |
lucasb | the proto is: proto sub infix:<===>(Mu, Mu) | ||
hahainternet | pink_mist: there are many, i've had people whining at me to modify so they can do improved ascii spam for example | ||
lucasb | but the actual multi doesn't use Mu, so I think it defaults to Any | ||
hahainternet | so, worth making it configurable | ||
20:48
zacts left
|
|||
ZoffixW | Hm. There's "CHANNELLEN=50 NICKLEN=9 TOPICLEN=490 AWAYLEN=127 KICKLEN=400" I'm sure there's a *LEN for line lengths | 20:48 | |
pink_mist | hahainternet: well without knowing what the capability is called, it's hard to know how to configure it :P | 20:49 | |
hahainternet | pink_mist: consider sending test lines | ||
that's probably the best way to tell | |||
pink_mist | that's ... not something I'd want a client doing every time it connects | ||
hahainternet | why not? that's a standard part of any connection | 20:50 | |
negotiating capabilities | |||
it's literally part of IP | |||
ZoffixW | I get ERROR :Request too long | ||
pink_mist | of IP, sure, but not IRC ... the server may not even allow you enough of a buffer to do it | ||
hahainternet | if the server doesn't give you enough of a buffer to send a 1k long line | 20:51 | |
then that ircd is broken | |||
i think 512 is a good default | |||
but all i'm saying is, don't make it hardcoded | |||
as i've had to deal with the result of that and it's bloody annoying :D | |||
ZoffixW | Don't see anything: www.irc.org/tech_docs/005.html | 20:53 | |
And there's like a million *LEN | |||
Including the maximum *targets* of a PRVMSG -_- | |||
CRAP! | 20:54 | ||
Missed my bus -_ | |||
Lol. Now I'm gonna have to sit here for another 15 minutes :) | |||
20:56
Ribbit joined
|
|||
masak | ZoffixW: time enought to write at least one Perl 6 script ;) | 20:57 | |
enough* | |||
ZoffixW | :P | ||
20:58
raiph joined
|
|||
dalek | kudo/resupply: d781934 | jnthn++ | src/core/Supply.pm: Tap.close should be something True. |
21:01 | |
kudo/resupply: fd732ce | jnthn++ | src/core/Supply.pm: Rename Publisher to Supplier. |
|||
Skarsnik | ZoffixW, how I will write a irc bot stuff gist.github.com/Skarsnik/734f88458584af90ba54 if you want some idea xD | 21:02 | |
ZoffixW | Skarsnik, how un-Perl-6-ish to use on_disabled instead of on-disabled :P | 21:03 | |
OMG XML! | 21:04 | ||
Skarsnik, I'd definitely choose JSON :P | |||
Skarsnik | I don't know xml/yml syntax | ||
xml is dumb to write x) | |||
*Json | 21:05 | ||
ZoffixW | What? | ||
What does "*Json" mean? You don't know JSON syntax? JSON is dumb to write? | |||
Skarsnik | let's do it again. I am not familiar with JSON syntax | ||
and XML is dumb/easy to write | 21:06 | ||
ZoffixW | Skarsnik, I'll teach you: [ "a", "list", "of", "things" ], { key: "value", "or anther key": "value", "even": { "nested": ["stuff", "is", "fine"] } } | 21:07 | |
Skarsnik, end of lesson :) | |||
hahainternet | not quite, json has some slight weirdnesses | ||
ZoffixW | Skarsnik, and you have to learn it anyway. P6 distros META files are in JSON :) | ||
Skarsnik | I copy paste everytime! | ||
21:07
skids left
21:08
kjs_ joined
|
|||
ZoffixW | Skarsnik, JSON also has true/false/null that are written literally, without quotes | 21:08 | |
hahainternet | also has no date format | ||
also has no way to order hash keys | |||
ZoffixW leaves to catch the bus this time | |||
hahainternet | also has a licensing restriction that you must do nothing 'bad' or 'evil' | ||
can't remember which | |||
Skarsnik | I have nothing against json lol, it was just easier to write xml quicly here xD | ||
21:08
ZoffixW left
|
|||
hahainternet | i still use json regardless as it's the best of a bad bunch imho | 21:08 | |
yaml is probably better structured | |||
but json is missing a bunch of things that should have been better thought out | 21:09 | ||
but javascript lol | |||
timotimo | our json parser is already slow, better not make the format more complicated :( | ||
Skarsnik | I had a weird perl5 IRC 'sdk' it's like 50 lines, all it does is connecting to irc, load/unload pm file, you can write the whole thing without stopping your bot once x) | 21:11 | |
related: I should port my Acme::IRC::Art on perl6 | 21:12 | ||
21:12
[Sno] left
|
|||
Skarsnik | but irc color is a nightmare to debug with all irc client not acting the same | 21:13 | |
21:14
diakopter___ joined
21:21
_28_ria left
21:24
_28_ria joined
21:33
hankache left
|
|||
dalek | kudo/resupply: 0a8ab76 | jnthn++ | src/core/Supply.pm: API cleanup; avoid some is-* and other not. |
21:33 | |
kudo/resupply: 0c4e50f | jnthn++ | src/core/ (5 files): Update code to use new Supplier model. |
|||
gfldex | S32 says about .getc "Returns a Str type object if no more lines to be read." | 21:35 | |
rakudo does: nqp::chars($c) ?? $c !! Nil | |||
who is right? | |||
Juerd | jnthn: Is there a chance that the new Supply stuff makes my mqtt module less slow? | ||
jnthn | Juerd: Maybe, depends where the bottleneck is. | 21:36 | |
timotimo | the bottleneck is somewhere different | 21:37 | |
psch | gfldex: getc return value on EOF isn't tested in roast, from what i can see | ||
timotimo | the mqtt thing only uses 5% cpu | ||
somewhere it's sleeping | |||
Juerd | jnthn: I wish I knew what its bottleneck was. Given a burst of TCP packets, they trickle slowly in the supply... :| | ||
jnthn | Ah, then likely not | 21:38 | |
But supply throughput has got better, so far as I can tell | |||
Something that ran for nearly 7s before now runs in 0.7s now. | |||
timotimo | whoa! | ||
how the hell?! | |||
jnthn | Design. :P | ||
Juerd | (For perspective: the packets are tiny, and it's only a few dozen in a second) | ||
21:39
rindolf left
|
|||
Juerd | jnthn: Impressive! What causes this speedup? | 21:39 | |
timotimo | design! | ||
say it with me, y'all! | |||
21:39
bjz left
|
|||
jnthn | Juerd: Probably avoiding a load of locking | 21:40 | |
By adopting a partially-lock-free thing on the common path | 21:41 | ||
Juerd | That'll be great for almost everything. Great job :) | ||
jnthn | Throughput of supply pipelines in general should get a bunch better when you start chaining operations on. | 21:42 | |
(Compared to how it was before) | |||
Juerd | I notice in the mqtt thing that sometimes, but only sometimes, it'll output 10 to 20 lines at once, whereas normally it does about two per second. | ||
So it can be done :) | 21:43 | ||
Is there a way to see what it's blocking on, in all the threads? | |||
jnthn | Not easily; our debugging tooling for threaded stuff is nearly non-existent so far. :( | 21:44 | |
timotimo | jnthn: where do i look to figure out how to make my Int @foo[2;2] = (1, 2; 3, 4); work? | ||
jnthn | Array.pm | ||
timotimo | just looked through Rakudo::Internals | ||
jnthn | It'll likely be a fail in there somewhere | ||
I can't quite guess what. | 21:45 | ||
Juerd | jnthn: That's okay, I'll just try this project again in a year or so :) | ||
Built what I needed in Perl 5. It's good to have that as a fallback :D | |||
timotimo | 'k | ||
jnthn | Damn, I'm a factor of two off being able to say that if you turn off the safety valve you can shove a million messages per second through a supply. | 21:46 | |
TimToady | get a faster computer | ||
or better yet, just do some more design! | 21:47 | ||
jnthn | :) | ||
Juerd | jnthn: use less <safety>? :) | 21:48 | |
use more <design>; | |||
timotimo | jnthn: it hits the STORE(Array:D: Iterable:D \iterable) candidate in Array rather than the STORE(::?CLASS:D: Iterable:D \in) candidate in ShapedArray | ||
Juerd | Together, it'll beat quantum computers. | ||
jnthn | If we really want to nail supply performance somebody should perhaps design us a trace JIT... | ||
timotimo: oops. :) | |||
timotimo | this couldn't possibly have something to do with what someone else found today about the constructor being called twice with different things? | 21:49 | |
jnthn | timotimo: That's the problem then. Can you stick a proto in to "force" it to disregard the other one? | ||
No | |||
timotimo | the proto is right in front of that candidate :) | ||
jnthn | ohhh | ||
Does the method new inside of TypedArray have a clue about shapes? | 21:50 | ||
If not, then I suspect *that* is the fail | |||
timotimo | let's see. possibly not :) | ||
yeah, doesn't accept a shape parameter | |||
i'll cargocult from Array.new, probably | |||
21:50
kaare_ left
|
|||
jnthn | yeah | 21:51 | |
21:51
muraiki left
|
|||
timotimo | should i also port the "\values or **@values via new-internal" thing from Array to TypedArray as well? | 21:52 | |
jnthn | timotimo: Yeah, sounds reasonable | 21:54 | |
21:55
xfix left
|
|||
dalek | ast/resupply: 46231a7 | jnthn++ | / (22 files): First round of updates for supply changes. |
21:55 | |
jnthn | 10 tests still need attention, but I think the number of root causes is smaller | ||
21:56
bjz joined
|
|||
dalek | kudo/resupply: 8f9a7a9 | jnthn++ | src/core/Supply.pm: Supplies treat values through them as items. So use .push, not .append. |
21:56 | |
21:56
Zoffix joined
21:57
pdcawley left,
_28_ria left
|
|||
leont | Does that mean Supply gets split in an emitting and a receiving end? | 22:04 | |
timotimo | a little bit, yeah | ||
jnthn | leont: Somewhat, yes. Supply.new now becomes Supplier.new, and the object you get back has a .Supply method. You emit/done/quit on the Supplier, and (as before) tap the Supply. | 22:05 | |
leont | I think I could like that, yes | 22:06 | |
jnthn | leont: This will only make a notable difference to code that used supplies in this way. Supply.interval, Supply.from-list, etc. are all just the same. | ||
As is working with async sockets, processes, etc. | |||
leont | C++ has a similar split on its promise implementation (emitting end being called promise, receiving is future) | 22:07 | |
jnthn | There's also stronger enforcement of the supply protocol (emit* [done|quit]) | ||
timotimo | uh-oh ... bad news | ||
Stage optimize : Cannot call ACCEPTS; no signatures match / at gen/moar/m-BOOTSTRAP.nqp:2353 (blib/Perl6/BOOTSTRAP.moarvm::741) / from gen/moar/m-CORE.setting:883 (<ephemeral file>:ACCEPTS:36) / ... / from gen/moar/m-BOOTSTRAP.nqp:472 (blib/Perl6/BOOTSTRAP.moarvm:bind_one_param:811) | 22:08 | ||
ever seen something like this? | |||
jnthn | o.O | ||
No | |||
timotimo | inside INITIALIZE_DYNAMIC, oddly | 22:09 | |
diakopter___ | timotimo: maybe you're still using my moar patch ;) | ||
timotimo | hah, i don't think so | ||
ah, this is all under "blib/Perl6/Optimizer.moarvm:report_inevitable_dispatch_failure:161" | |||
22:09
spider-mario left
|
|||
timotimo | oh my | 22:10 | |
seems like that's what you get when you have two multi methods with the exact same signature | |||
inside a role inside a class | |||
OSLT | |||
jnthn yawns and figures it's time to rest | 22:11 | ||
Juerd | Good night! | ||
timotimo | good night jnthn! | ||
d^_^b | Zoffix: I saw a MR on learnxinyminutes. You know if anyone is planning to add concurrency examples to the markdown? | ||
jnthn | See y'all tomorrow | 22:12 | |
o/ | |||
timotimo | timo@schmetterling ~/p/rakudo (nom)> perl6 -e 'my Int @foo[2;2] = (1, 2; 3, 4); say @foo' | ||
[[1 2] [3 4]] | |||
Zoffix | d^_^b, none that I know of. Ven++ was planning to do some work on my PR, but I doubt they'd mind if you contribute :P | ||
d^_^b | Zoffix: ok, there are a few bits I don't get how to use/or what they are for. | 22:13 | |
Zoffix: this one? github.com/adambard/learnxinyminut...ssues/1390 or 1434 | |||
22:14
bjz left
|
|||
Zoffix | The open one, 1390 | 22:14 | |
d^_^b | ok cool | ||
Zoffix | timotimo, neat | 22:15 | |
timotimo | running spec tests on the change now | ||
hopefully it doesn't break anything else | |||
22:16
lucasb left
|
|||
psch | ...i'd really like camelia to build a new r-j :/ | 22:17 | |
as in, nom/HEAD definitely compiles atm | |||
timotimo | ooooh | 22:20 | |
t/spec/S02-types/array-shapes.rakudo.moar - TODO passed: 15 | 22:22 | ||
Zoffix | \o/ | ||
timotimo | um | 22:24 | |
but the test code then tries to pop from and push to a shaped array | |||
it's just a one-dimensional array, but shaped arrays immediately die when you try to pop or push | |||
so maybe my patch is wrong? | |||
psch | m: my @a[2]; @a.push: 0; | 22:25 | |
camelia | rakudo-moar : OUTPUT«Cannot push a fixed-dimension array in block <unit> at /tmp/gNKfLdNtf6:1» | ||
timotimo | maybe after popping from a shaped array it's supposed to be possible to push again? | 22:29 | |
the code so far has the pop TODO'd (it's supposed to throw an exception, but used to not do that), then the pop after it used to work | |||
but that's only because typed arrays with shapes didn't actually get the shape set on them at all | |||
22:35
sno joined
22:36
vendethiel left
22:38
|Tux| left
22:40
diakopter___ left
|
|||
ab5tract | timotimo: that seems like a reasonable point, but at the same time the properties of arrays in perl 5 that allowed the queue/stack semantics | 22:41 | |
was the variable length | |||
(plural / singular mismatch.. variable (dynamic! egads!) length of arrays was the property that enabled push/pop) | 22:42 | ||
22:42
bbkr left
22:43
bbkr joined
22:48
bbkr_ joined
|
|||
timotimo | mhm | 22:48 | |
so ... what are you saying? %) | |||
22:49
pdcawley joined
|
|||
Hotkeys | apparently vulgar fractions are called that because it's the old use of vulgar meaning common | 22:51 | |
it's just fractions that aren't bigger on the top than the bottom | |||
22:52
bbkr left
22:58
FROGGS joined
|
|||
Mouq doesn't think it really makes sense to push/pop from a shaped array… | 23:03 | ||
TimToady | Mouq! Happy T-weekend! :) | 23:05 | |
ab5tract | timotimo: I haven't read enough of the backlog to know about your commit | 23:07 | |
Mouq | Hey! And to you as well ^^ | 23:08 | |
ab5tract | but it almost sounds to me like the test is wrong | ||
23:08
FROGGS left
|
|||
timotimo | the commit isn't up yet | 23:09 | |
ab5tract | locally push/pop are not enabled for shaped arrays | 23:10 | |
Mouq | I'm on break right now… I'm interested in looking at what I can do to speed up the peg engine, but the code is, heh, a little dense | ||
ab5tract | is your commit about adding it? | ||
i mean, i am totally down with variable length shaped arrays :D | 23:11 | ||
we can make a trait for when you want to keep them 100% static length | |||
23:12
FROGGS joined
|
|||
timotimo | no, my commit is about adding shapes to non-natively typed arrays | 23:13 | |
ab5tract | ahh. cool :) | 23:14 | |
timotimo | m: my Int @foo[2;2] = (1, 2; 3, 4); # this doesn't work because nothing actually sets the shape on that | 23:18 | |
camelia | rakudo-moar : OUTPUT«Type check failed in assignment to ; expected Int but got List in block <unit> at /tmp/SMwkbEYSfI:1» | ||
timotimo | m: my Int @foo[2;2]; say @foo.shape | ||
camelia | rakudo-moar : OUTPUT«(*)» | ||
timotimo | m: my int @foo[2;2]; say @foo.shape | ||
camelia | rakudo-moar : OUTPUT«(2 2)» | ||
timotimo | m: my @foo[2;2]; say @foo.shape | ||
camelia | rakudo-moar : OUTPUT«(2 2)» | ||
Mouq | m: my int @foo[2;2] = (1, 2; 3, 4); | 23:19 | |
camelia | ( no output ) | ||
psch | ...what's a T-weekend? | 23:21 | |
23:21
FROGGS left
|
|||
TimToady | the weekend that starts with T-day | 23:22 | |
psch | ohh | ||
RabidGravy | they all go out and do vast amounts of crystal meth? | ||
23:25
kjs_ left
|
|||
dalek | kudo/nom: 2e8830b | TimToady++ | src/ (3 files): implement postfix:<ⁿ> Works for both positive and negative integer powers. |
23:26 | |
TimToady | but only for literals, no variables, despite the name :) | 23:27 | |
uruwi[A] | What the hell? | ||
So, for example, 3² = 9? | |||
TimToady | yeah | ||
uruwi[A] | > no variables: I wish | ||
23:28
uruwi[A] is now known as uruwi
|
|||
TimToady | any variable would have to be named i or n, unless we cheated somehow | 23:28 | |
uruwi | m: my int @foo[2;2] = (1, 2; 3, 4); say @foo.shape; | ||
camelia | rakudo-moar : OUTPUT«(2 2)» | ||
uruwi | Modifier characters, or are they counted as part of the grapheme before? | ||
m: my int @foo[2;3;4]; say @foo.shape; | 23:29 | ||
camelia | rakudo-moar : OUTPUT«(2 3 4)» | ||
uruwi | m: my int @foo[2;3;4]; say @foo; | ||
camelia | rakudo-moar : OUTPUT«[[[0 0 0 0] [0 0 0 0] [0 0 0 0]] [[0 0 0 0] [0 0 0 0] [0 0 0 0]]]» | ||
uruwi | What's the difference between int and Int? | 23:30 | |
TimToady | native int vs bigint | ||
m: say 2³ | 23:31 | ||
camelia | rakudo-moar : OUTPUT«8» | ||
TimToady | m: say 2³² | ||
camelia | rakudo-moar : OUTPUT«4294967296» | ||
TimToady | m: say 2¯¹ | ||
camelia | rakudo-moar : OUTPUT«0.5» | ||
TimToady | this one shouldn't break JVM | 23:32 | |
23:32
FROGGS joined
23:35
Oatmeal left
|
|||
AlexDaniel | TimToady: wow! Another awesome thing today! | 23:36 | |
m: my $var = 5; say $var²; # just checking the error message… | 23:37 | ||
camelia | rakudo-moar : OUTPUT«25» | ||
TimToady | m: my $baʳ = 42; say $baʳ | ||
camelia | rakudo-moar : OUTPUT«42» | ||
AlexDaniel | ah | 23:38 | |
TimToady | uruwi: yes, that's the problem with the modifier letters | ||
but I figure ** is good enough for when there are variables | |||
so we'll restrict this to convenient literals | |||
uruwi | Do you see anyone using this? | 23:39 | |
AlexDaniel | I think that what we have now already satisfies most of the use cases | ||
TimToady | sure, I'll probably use it :) | ||
or are you asking about variables? | |||
uruwi | No | 23:40 | |
Not about variables | |||
TimToady | m: say [+] (3 1 4 1 5 9 7)»² | ||
camelia | rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/NJmjErxwp9Two terms in a rowat /tmp/NJmjErxwp9:1------> 3say [+] (37⏏5 1 4 1 5 9 7)»² expecting any of: infix infix stopper statement end statement modif…» | ||
TimToady | oops | 23:41 | |
m: say [+] <3 1 4 1 5 9 7>»² | |||
camelia | rakudo-moar : OUTPUT«182» | ||
TimToady | sum of squares | ||
23:43
rigsby left,
FROGGS left
|
|||
uruwi | I would personally write it as [+] ((3, 1, 4, 1, 5, 9, 7) »**» 2), but hey, TMTOWTDI | 23:44 | |
,: [+] ((3, 1, 4, 1, 5, 9, 7) »**» 2) | |||
m: [+] ((3, 1, 4, 1, 5, 9, 7) »**» 2) | |||
camelia | ( no output ) | ||
uruwi | m: say [+] ((3, 1, 4, 1, 5, 9, 7) »**» 2) | ||
camelia | rakudo-moar : OUTPUT«182» | ||
TimToady | outer parens not necessary, btw | ||
AlexDaniel | m: say ½ # :) | ||
camelia | rakudo-moar : OUTPUT«0.5» | ||
TimToady | now if we only had vulgar superscript fractions :) | 23:45 | |
23:45
rigsby joined
|
|||
AlexDaniel | m: say ½² | 23:45 | |
camelia | rakudo-moar : OUTPUT«0.25» | ||
uruwi | m: say ⅑*⅛*⅐*⅙*⅕*¼*⅓*½ | ||
camelia | rakudo-moar : OUTPUT«0.0000028» | ||
AlexDaniel | I love it | 23:46 | |
TimToady | m: say (⅑*⅛*⅐*⅙*⅕*¼*⅓*½).perl | ||
camelia | rakudo-moar : OUTPUT«<1/362880>» | ||
23:46
Skarsnik left,
skids joined
|
|||
TimToady | now we just need to teach .perl to use vulgar fractions where appropriate ;) | 23:47 | |
uruwi | Not all terminals might display them well | ||
TimToady | hence the winky | 23:48 | |
uruwi | For instance, if they display them only as wide as Latin letters, they could be harder to read | ||
23:48
Oatmeal joined
|
|||
TimToady needs a nap; anyone should feel free to write tests for the superscript exponents | 23:49 | ||
zzz & | |||
uruwi | Happy napping | ||
TimToady | or rather, 💤 | 23:50 | |
AlexDaniel | uruwi: well, indeed: files.progarm.org/2015-11-26-01502..._scrot.png | ||
Hotkeys | I wonder if Task::Star plays well with windows | 23:54 | |
before Ifinished typing it got angry | |||
RabidGravy | if I can't work out how to type it with a maximum of three key strokes it's unlikely I'll remember the codepoint as a number | 23:55 | |
uruwi | compose, numerator, denominator | 23:56 | |
Hotkeys | it only works for a limited number of fractions I think | 23:57 | |
like all of the irreducable fractions up to 7/8 | |||
uruwi | 6/7 doesn't have its own | ||
RabidGravy | oh yes, xchat just being shit | ||
uruwi | Only ⅐ for a denominator of 7 | 23:58 | |
Hotkeys | do any /7 | ||
I can't even see that on hexchat | |||
hexchat is terrible at unicode for me on windows | |||
uruwi | Time to get another client. | ||
AlexDaniel | ⅞ ⅒ | 23:59 | |
Hotkeys | might be the font | ||
what's a good unicode-happy mono font | |||
uruwi | VL Gothic | ||
AlexDaniel | m: say ↉ | ||
camelia | rakudo-moar : OUTPUT«0» | ||
uruwi | shows up for me fine | ||
AlexDaniel | wow |