»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
Thrush | Thanks for all your help, you guys. I'm signing off. | 00:00 | |
00:02
ryn1x left
00:04
nadim_ joined
00:07
epony left
00:20
cdg joined
00:24
cdg left
00:25
eroux left
00:28
darkmorph left
00:31
Zoffix joined
00:33
bloatable6 joined,
ChanServ sets mode: +v bloatable6
|
|||
Zoffix | ⚠️⚠️⚠️⚠️⚠️⚠️⚠️ ❗❗❗❗ ❕❕❕❕ | 00:36 | |
NOTICE: Main Development Branch Renamed from “nom” to “master”: rakudo.org/2017/10/27/main-developm...to-master/ | |||
⚠️⚠️⚠️⚠️⚠️⚠️⚠️ ❗❗❗❗ ❕❕❕❕ | |||
geekosaur | weee | ||
geekosaur preps to nuke rakudobrew and start over again... | 00:38 | ||
AlexDaniel | weeeeelll for that you'd need rakudobrew to adapt | ||
geekosaur | hm, actually I suppose that won;;t work until rakudobrew itself is updated; it knows about nom | ||
Zoffix | rakudobrew build moar master | ||
AlexDaniel | github.com/tadzik/rakudobrew/pull/127 | ||
.tell tadzik plz github.com/tadzik/rakudobrew/pull/127 | 00:39 | ||
yoleaux | AlexDaniel: I'll pass your message to tadzik. | ||
00:43
Cabanossi left,
troys is now known as troys_,
Aceeri left,
Cabanossi joined
00:44
epony joined
|
|||
timotimo | how hard can it be to write a blog engine … | 00:51 | |
Zoffix wrote the one that drives rakudo.party in an afternoon :P | 00:52 | ||
timotimo | heh. | 00:53 | |
what kind of features does it have? i take it it's a static site generator? | |||
Zoffix | No, dynamic. With a command to pull from repo and repo got markdown files: github.com/zoffixznet/perl6.party/...aster/post | 00:54 | |
errr. wait don't look there! | |||
timotimo | er, oops? | ||
Zoffix hides all the unfinished drafts :) | |||
bitrauser | spoilers D: | ||
timotimo | but how does your command differentiate between draft and release? a field in the markdown perhaps? | 00:55 | |
Zoffix | And this is basically all the code for it github.com/zoffixznet/perl6.party/...y/Posts.pm and github.com/zoffixznet/perl6.party/...ter/app.pl | ||
timotimo: the posts have metadata at the top (the `%%` things): raw.githubusercontent.com/zoffixzn...-Update.md | |||
drafts have `%% draft: true` in the metadata | 00:56 | ||
timotimo | neat | ||
Zoffix | On top of markdown, the features is just some shortcuts for IRC quotes, links to routine/class docs and and markdown massager to make posts suitable for copy-pasting to blogs.perl.org :) | ||
timotimo | it also has the glot.io snippet support right? | 00:57 | |
Zoffix | Oh right yeah, that too | ||
This: github.com/zoffixznet/perl6.party/...js#L14-L74 | |||
timotimo | this test.p6 seems extremely useful | ||
thanks for sharing that | |||
Zoffix | + code mirror for highlights; + this for backend to access glot.io API github.com/zoffixznet/perl6.party/...pl#L49-L67 | 00:58 | |
:) | |||
timotimo | i should go to bed | ||
have a good one! :) | |||
Zoffix | You too \o | ||
Zoffix de-computers too | |||
00:58
Zoffix left
|
|||
timotimo | hope your recovery goes faster than mine | 00:58 | |
AlexDaniel runs also. Hope you folks have fun renaming “nom” to “master”! :) | 00:59 | ||
01:10
troys_ is now known as troys,
cpage_ left
01:12
Cabanossi left
01:13
Cabanossi joined
01:18
bitrauser_ joined
01:21
bitrauser left
|
|||
Geth | doc: ed2009e9e1 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Programs/01-debugging.pod6 grammar fix |
01:24 | |
01:27
wander left
01:29
ryn1x joined
01:30
HoboWithAShotgun joined
|
|||
HoboWithAShotgun | hello friendly friends. | 01:32 | |
can i have a subset that defines an array of 8 integers? | |||
tbrowder | hi, HWAS | ||
01:33
greppable6 joined
|
|||
Herby_ | o/ HoboWithAShotgun | 01:33 | |
01:33
ryn1x left
01:34
Herby_ left,
nadim_ left
|
|||
tbrowder | ref: rename nom to master, i just asked for advice on #perl6-dev per the note on the rakudo site. | 01:35 | |
01:41
travis-ci joined
|
|||
travis-ci | Doc build errored. Tom Browder 'grammar fix' | 01:41 | |
travis-ci.org/perl6/doc/builds/293450741 github.com/perl6/doc/compare/db2e0...2009e9e1a0 | |||
01:41
travis-ci left
|
|||
buggable | [travis build above] ✓ All failures are due to: timeout (1 failure). | 01:41 | |
01:45
ilbot3 left
01:57
ilbot3 joined,
ChanServ sets mode: +v ilbot3,
Cabanossi left
01:58
Cabanossi joined
|
|||
Xliff | Is there a P6 module for creating/manipulating Google Sheet docs? | 02:02 | |
02:05
wamba joined
02:12
ufobat_ joined
02:14
Zoffix joined
|
|||
jdv79 | what would be a good way to get a string down to x chars long where a char is a byte? | 02:14 | |
well, at most x chars | 02:15 | ||
02:15
ufobat left
|
|||
Zoffix | HoboWithAShotgun: yeah, subset Meow of Array where {.elems == 8 and .elems.all ~~ Int }; | 02:16 | |
HoboWithAShotgun: but we have typed, shaped arrays: my Int @a[8]; | |||
Xliff | OK, GoogleSheets API is RESTful, which I am not surprised about, AT ALL. | 02:17 | |
I may take a stab at this in the near future. | 02:18 | ||
Zoffix | m: Buf.new('foobar♥meows'.encode.head: 8).decode('latin1').say | ||
camelia | foobarâ | ||
Zoffix | jdv79: dunno, something like that? ^ | ||
02:18
noganex joined
|
|||
Zoffix | chars as bytes.. I'm not sure what you mean. | 02:18 | |
jdv79 | i have a byte size limit but utf8 makes substringing less obvious | 02:19 | |
02:19
eliasr left
|
|||
Xliff | jdv79: So, force single character strings? | 02:19 | |
jdv79 | no. just get the biggest substring i can fit | ||
Xliff | Er... Single BYTE encoded stringss | ||
So single OR multi-byte characters that fit into a buffer of a specified size? | 02:20 | ||
jdv79 | yes | ||
02:21
noganex_ left
|
|||
jdv79 | i just brute forced it by chopping in a loop until the byte size fites | 02:22 | |
but that's lame | 02:23 | ||
Zoffix | m: sub trim-to ($str, $bytes) { $str.comb.map: { state $b = buf8.new; my $d = .encode; return $b.decode if $b + $d > $bytes; $b.append: $d } }; 'foobar♥meows'.&trim-to(8).say | ||
camelia | Attempt to return outside of any Routine in block <unit> at <tmp> line 1 |
||
Zoffix | bug? | ||
m: sub trim-to ($str, $bytes) { my $b = buf8.new; for $str.comb { my $d = .encode; return $b.decode if $b + $d > $bytes; $b.append: $d } }; 'foobar♥meows'.&trim-to(8).say | 02:24 | ||
camelia | foobar | ||
Zoffix | m: sub trim-to ($str, $bytes) { my $b = buf8.new; for $str.comb { my $d = .encode; return $b.decode if $b + $d > $bytes; $b.append: $d } }; 'foobar♥meows'.&trim-to(9).say | ||
camelia | foobar♥ | ||
Zoffix | m: sub trim-to ($str, $bytes) { my $b = buf8.new; for $str.comb { my $d = .encode; return $b.decode if $b + $d > $bytes; $b.append: $d } }; 'foobar♥meows'.&trim-to(7).say | ||
camelia | foobar | ||
Zoffix | jdv79: something like that? vOv | ||
Zoffix goes to bed | |||
jdv79 | i think so - thanks | ||
02:24
Zoffix left
|
|||
jdv79 | nite | 02:24 | |
02:29
bitrauser_ left
02:31
COMBORICO left
02:34
ryn1x joined
02:45
troys is now known as troys_
02:50
thowe joined
|
|||
HoboWithAShotgun has begun hacking on Unit::SI | 03:00 | ||
i can already write: say 12V / 0.5A; # prints 24Ω | 03:01 | ||
03:04
wamba left
|
|||
Juerd | HoboWithAShotgun: Does V*A give you W or VA? | 03:04 | |
geekosaur | heh | ||
03:07
ryn1x left
03:12
Cabanossi left
03:13
ryn1x joined
03:14
Cabanossi joined
|
|||
HoboWithAShotgun | it says watts | 03:17 | |
03:18
ryn1x left
|
|||
HoboWithAShotgun | this is the first iteration: hastebin.com/qomaqodiyo.rb incomplete of course | 03:19 | |
i will now engage in righteous slumber | 03:21 | ||
03:32
Actualeyes left
03:40
Cabanossi left
03:41
wamba joined
03:42
Cabanossi joined
03:43
cpage_ joined
03:46
ryn1x joined
03:55
khw left
03:58
Kyo91_ joined
04:10
BenGoldberg left
04:17
thowe left
04:19
ryn1x left,
mson left
04:35
cdg joined
04:40
cdg left,
ryn1x joined
04:41
Cabanossi left
04:43
Cabanossi joined
04:44
ryn1x left
04:45
Kyo91_ left,
ryn1x joined
|
|||
Xliff | HoboWithAShotgun: Yow! I was doing something similar, trying to port the P5 version to P6. | 04:46 | |
github.com/Xliff/p6-math-units | 04:47 | ||
.tell HoboWithAShotgun Yow! I was doing something similar, trying to port the P5 version to P6. github.com/Xliff/p6-math-units | |||
yoleaux | Xliff: I'll pass your message to HoboWithAShotgun. | ||
04:50
ryn1x left
04:56
napo1eon joined
05:04
rjbs joined
05:07
simcop2387 joined
05:14
geekosaur joined
05:20
cosimo joined
05:21
Actualeyes joined
05:22
ryn1x joined,
troys_ is now known as troys
05:23
perigrin joined
05:24
wamba left
05:34
Piotr_ joined
05:40
Cabanossi left
05:42
Cabanossi joined
05:53
bitrauser_ joined
05:56
ryn1x left
06:00
wamba joined
06:06
wamba left
06:09
wamba joined
06:12
lowbro joined
06:13
wamba left
06:20
domidumont joined
06:24
troys left
06:26
domidumont left
06:27
domidumont joined,
wamba joined
06:32
abraxxa joined
06:38
sena_kun joined
06:42
ryn1x joined
06:46
ryn1x left
06:55
Cabanossi left
06:56
domidumont left
06:57
Cabanossi joined
06:59
pmurias joined
07:00
nadim_ joined
07:09
domidumont joined
07:13
lizmat joined
07:19
patrickz joined
07:22
ryn1x joined
07:34
aborazmeh joined,
aborazmeh left,
aborazmeh joined
07:38
darutoko joined
07:54
parv joined,
sproctor joined
07:56
ryn1x left
08:10
zakharyas joined
08:14
zakharyas left
08:15
zakharyas joined
08:18
zakharyas left
08:21
HoboWithAShotgun left,
zakharyas joined
08:22
Actualeyes left
08:23
ryn1x joined
08:27
ryn1x left
08:31
zakharyas left
08:32
rindolf joined,
zakharyas joined
08:35
Ven joined
08:36
Ven is now known as Guest275
08:41
Cabanossi left
08:42
Guest275 is now known as Ven``,
lowin joined,
Cabanossi joined
08:51
cdg joined
08:55
cdg left,
ryn1x joined
08:56
Ven`` left
09:03
parv left
|
|||
pmurias | :( when searching for prefix ^ the doc page makes me go to 'docs.perl6.org/routine/?$CIRCUMFLEX_ACCENT' | 09:03 | |
09:13
Ven joined
09:14
Ven is now known as Guest35603
09:23
nadim_ left
09:24
nadim_ joined
09:26
zakharyas left,
zakharyas joined
09:28
ryn1x left
09:40
Guest35603 left
09:46
Ven_ joined
|
|||
sena_kun | should `perl6 -Isome_path -Ianother_path some.pl6` work? | 09:56 | |
or, rather, it doesn't fail for sure, but does it load modules as I think it should? | 09:57 | ||
...it is not. | 10:00 | ||
10:04
araujo joined
10:08
Ven_ left,
ryn1x joined
|
|||
ufobat_ | thats what i do, and it worked for me | 10:09 | |
10:09
Ven joined,
Ven is now known as Guest10069
10:12
HoboWithAShotgun joined,
ryn1x left
|
|||
Piotr_ | pmurias: are You looking for 'docs.perl6.org/language/operators#prefix_^' ? | 10:13 | |
pmurias | Piotr_: mostly reporting that searching for that on docs.perl6.org is broken | 10:17 | |
HoboWithAShotgun | Xliff: of course you do. it's not as if there were a list. | 10:20 | |
yoleaux | 04:47Z <Xliff> HoboWithAShotgun: Yow! I was doing something similar, trying to port the P5 version to P6. github.com/Xliff/p6-math-units | ||
10:26
Guest10069 left
|
|||
Geth | doc: 6ee01ac517 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Programs/01-debugging.pod6 xref to env vars |
10:29 | |
10:37
Ven_ joined
10:45
ryn1x joined
10:48
margeas joined
10:56
Cabanossi left
10:58
Cabanossi joined,
aborazmeh left
11:00
travis-ci joined
|
|||
travis-ci | Doc build passed. Tom Browder 'xref to env vars' | 11:00 | |
travis-ci.org/perl6/doc/builds/293606710 github.com/perl6/doc/compare/ed200...e01ac517ba | |||
11:00
travis-ci left
|
|||
Geth | doc: 752bafa604 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Programs/00-running.pod6 add info on new env var |
11:01 | |
11:19
ryn1x left
11:27
astj left
11:30
zakharyas left
11:35
abraxxa left
11:41
Ven_ left
11:55
Cabanossi left
11:58
Cabanossi joined,
wamba left
12:00
ryn1x joined
12:04
ryn1x left
12:10
wamba joined
12:14
itaipu joined
|
|||
Geth | doc: c17d628b1f | (Aleks-Daniel Jakimenko-Aleksejev)++ | 8 files “nom” → “master” |
12:15 | |
12:20
wamba left
12:28
astj joined
12:31
setty1 joined
12:37
ryn1x joined
12:43
bdmatatu joined
12:50
zakharyas joined
|
|||
patrickz | Hey! Is there any documentation how to create modules that contain C code and thus need a compiler during install? | 12:51 | |
DrForr | Not sure how much documentation there is, but I'd definitely check out Inline::Perl5, plus if you're distributing the library separately you can always use NativeCall for an interface. | 12:54 | |
12:55
synopsebot joined,
ChanServ sets mode: +v synopsebot
|
|||
patrickz | I already looked at Inline::Perl5, but that module looks a bit overkill using a Configure.pl and Makefile.in. | 12:55 | |
12:56
synopsebot left
|
|||
patrickz | The library is just a tiny little bit of supporting C code that is more easily done in C than perl6. | 12:57 | |
12:57
piojo left,
synopsebot joined,
ChanServ sets mode: +v synopsebot
12:58
synopsebot left
13:05
cdg joined
|
|||
jnthn | patrickz: I think Digest::SHA1::Native does something like that | 13:07 | |
13:07
ryn1x left,
sproctor left
|
|||
patrickz | jnthn: Will have a look. | 13:08 | |
13:18
synopsebot joined,
ChanServ sets mode: +v synopsebot
13:26
sproctor joined
13:29
mson joined
13:33
piojo_ joined
13:35
darkmorph joined
13:37
Piotr_ left
13:40
zakharyas left
13:41
zakharyas joined
13:42
ryn1x joined
13:44
COMBORICO joined
13:45
zakharyas left
13:46
ryn1x left
13:51
zakharyas joined
13:53
pmurias left
13:58
mempko joined
14:02
itaipu left
14:06
ryn1x joined
14:09
HoboWithAShotgun left
14:11
ryn1x left,
khw joined
14:12
ryn1x joined
14:16
ryn1x left
14:28
lowbro left
|
|||
piojo_ | .tell tyil You might be interested to know that I fixed the BSON::Document date encoding/decoding to agree with the format mongodb uses | 14:31 | |
yoleaux | piojo_: I'll pass your message to tyil. | ||
tyil | piojo_: awesome! | ||
yoleaux | 14:31Z <piojo_> tyil: You might be interested to know that I fixed the BSON::Document date encoding/decoding to agree with the format mongodb uses | ||
tyil | thanks | ||
14:31
setty1 left
14:32
setty1 joined
|
|||
piojo_ | :) | 14:36 | |
Does anyone know if DBIish is thread safe (in practice)? | |||
moritz | back when I wrote some code in it: no | 14:37 | |
most of the underlying DB libraries assume that you use the DB handle on the same thread where you opened it | |||
piojo_ | moritz: I'm doing that, but something's going wrong anyway | 14:38 | |
14:39
Coleoid joined
|
|||
piojo_ | I posted about it on stackoverflow, because I can't exactly post a good test case here. (But maybe I should post somewhere else, because it's not syntax highlighted on SO.) stackoverflow.com/questions/tagged/perl6 | 14:41 | |
DrForr | Good, we need traffic on SO. Even though I don't (yet, sigh...) participate... | 14:46 | |
14:47
Piotr_ joined
|
|||
AlexDaniel | do I get it right that “latest” on travis is HEAD? | 14:50 | |
piojo_ | Yeah, recently there's been one guy posting almost every day. It's cool. Fun to see questions waiting. :) | ||
AlexDaniel | or is it the latest release? | ||
piojo_ | Haha, did everybody just go to stackoverflow and upvote the recent questions and answers? | 14:53 | |
14:53
ivans left
|
|||
DrForr | Not I, I hardly use my account. THough again that should change. | 14:55 | |
moritz | piojo_: I found a bug in your example code while skimming your question | 14:59 | |
see the answer on SO | |||
I didn't have the time to actually try it with the bug fixed | 15:00 | ||
15:00
ivans joined
15:02
wamba joined
|
|||
piojo_ | moritz: Thanks a lot! I'll test it, though if I might have to wait until Monday if I can't reproduce on my home computer | 15:03 | |
I'll let you know if that was it | |||
but that really looks like the problem! I forgot %h«» interpolates but %h<> doesn't | 15:04 | ||
moritz | but don't use %h«...» there | 15:05 | |
piojo_ | I need to break the habit of using %h<> so often | ||
moritz | it splits the key on whitespace | ||
piojo_ | Oh yeah, I know it woud be wrong | ||
but it would also work. | |||
(in this case) | |||
moritz | no | ||
because it interpolates $*THREAD but not .id | |||
piojo_ | oh, indeed. haha. Then it would have to be $*THREAD.id() | 15:06 | |
but like I said, I really need to break that habit. | |||
moritz | right | ||
AlexDaniel | answering my own question: “latest” = HEAD on the default branch | 15:11 | |
15:14
eliasr joined
15:16
knight__ joined
15:17
Actualeyes joined
15:18
ggoebel joined
15:20
setty1 left
|
|||
ugexe | github.com/CurtTilmes/perl6-dbi-async - this uses DBIish and uses threads to do connection pooling | 15:25 | |
15:26
lostinfog joined
|
|||
ugexe | and keying on $*THREAD.id doesn't mean you are keying on an id that will always point at the same thread | 15:27 | |
key on just $*THREAD I believe | |||
jdv79 | is it true that a "non-capturing group" aka [] can be made capturing by naming it? | 15:28 | |
moritz | jdv79: you can do something like $<foo>=[...] | ||
jdv79 | seems to work but the docs seem conflicted about that | ||
moritz | m: 'abc' ~~ /$<newname>=[.]/ | 15:29 | |
camelia | ( no output ) | ||
moritz | m: say 'abc' ~~ /$<newname>=[.]/ | ||
camelia | 「a」 newname => 「a」 |
||
moritz | m: say 'abc' ~~ /$<newname>=./ | ||
camelia | 「a」 newname => 「a」 |
||
jdv79 | yeah, weird. the docs call [] non-capturing:) | ||
moritz | well | ||
it doesn't capture, it groups | |||
it's just that $<...>= captures the next atom | |||
jdv79 | its a named capture, isn't it? | ||
moritz | whatever it is | ||
jdv79 | haha | ||
15:30
HoboWithAShotgun joined
|
|||
jdv79 | that's gonna confuse people but ok | 15:30 | |
15:30
wamba left
|
|||
moritz | so here, with [] you just define what's part of an atom | 15:30 | |
nobody said regexes were easy... | |||
jdv79 | i guess its just the docs for me. creating a named capture using non-capturing grouping | 15:31 | |
15:31
ryn1x joined
|
|||
jdv79 | not sure how to reword that correctly though. i'll bug it i guess. | 15:31 | |
15:33
perlpilot joined
15:35
ryn1x left
|
|||
Geth | ecosystem: cc9b1a1600 | (Nick Logan)++ (committed using GitHub Web editor) | META.list Remove some dead links |
15:37 | |
moritz | jdv79: IMHO it's better to think of [] as just a "group" | 15:38 | |
and () as a "capturing group" | |||
and $<...>=... is a modifier that makes anything after it capture | |||
15:38
kyan joined
|
|||
jdv79 | hmm, how come i can't do $0.?Str | 15:48 | |
in other words is there a way to tersely convert a match to a string if it matched and Bool false if it didn't | 15:49 | ||
moritz | $0 && $0.Str | ||
jdv79 | kinda like my $var = $<var>.?Str // $default-var if it worked | 15:50 | |
i thought maybe there was something shorter | |||
piojo_ | Oh, I'm interested in that, too | ||
jdv79 | its good. tanks. | ||
15:51
wamba joined
|
|||
piojo_ | I found myself setting: my %data = from-json (%data<field> // "{}"); | 15:51 | |
and that just seemed really ugly | |||
not everything can be beautiful, I guess | 15:52 | ||
15:52
mempko left
|
|||
piojo_ | Err, didn't mean to use the same variable twice. Should be my %result = from-json (%data<field> // "{}"); | 15:53 | |
perlpilot | what was ugly about it? | ||
moritz | needs to be '{}' | ||
jdv79 | yeah, i think {} interplates away | ||
15:54
rindolf left
|
|||
moritz | %result = $_ ?? from-json $_ !! {} given %data<field>; | 15:54 | |
perlpilot | I'd call that one more ugly | ||
piojo_ | it makes more sense, though. | 15:55 | |
ugexe | it would break on invalid json such as bare 0, no? | 15:56 | |
15:56
Cabanossi left
|
|||
piojo_ | ugexe: in my case it's coming from a database (a JSONB field), so it must be a string | 15:56 | |
but yeah, if needed we could change it to $_.defined | 15:57 | ||
15:57
Cabanossi joined
|
|||
piojo_ | moritz: thanks, I should learn to use trailing "given" | 15:58 | |
stmuk | pl6anet.org/drop/rakudo-star-2017.10-RC0.tar.gz | ||
16:00
Morfent joined
|
|||
AlexDaniel | :O | 16:00 | |
piojo_ | stmuk: Thanks! I'll install that on windows/work | ||
16:00
rindolf joined
|
|||
AlexDaniel | stmuk++ | 16:01 | |
stmuk | I haven't tried it on Windows yet TBH. That might be "interesting" :) | ||
piojo_ | oh, haha | ||
I was wondering why it was .tar.gz | |||
and I forgot star was for linux, too | 16:02 | ||
because it doesn't work on archlinux, I started thinking it was just a windows thing. | |||
I mean, I mean there's no package for archlinux | |||
stmuk | its a source tarball | ||
piojo_ | I'm sure the download works fine. | ||
yeah, we package our source installs | |||
but that's not working for rakudo star. | |||
ugexe | m: my %result; %result<foo> = Any; my $x = %result<foo>.?Str // 42; # an annoying problem with `.?Str // ...` | 16:03 | |
camelia | Use of uninitialized value %result of type Any in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. in block <unit> at <tmp> line 1 |
||
piojo_ | It's one of the snobbish distros that has complex wrapper scripts for most source builds | ||
AlexDaniel | star: say 42 | ||
camelia | 42 | ||
AlexDaniel | what should be done to update this ↑ ? | ||
moritz | currently, I still do that manually | 16:04 | |
piojo_ | moritz: you definitely solved the DBIish issue. Thanks! I'll add a note to the relevant code so no other noob can read over it and accidentally think the technique is correct. | ||
moritz | if somebody wants to automate it, even better | ||
16:05
HoboWithAShotgun left
|
|||
perlpilot | m: my %result; %result<foo> = Any; my $x = (%result<foo> // 42).?Str; # ugexe :) | 16:06 | |
camelia | ( no output ) | ||
16:06
sproctor left
16:09
ryn1x joined
|
|||
piojo_ | I just realized perl6 is hard in exactly the same way c++ is hard | 16:12 | |
It gives you enough rope to shoot yourself in the foot. | 16:13 | ||
AlexDaniel | /:-o | ||
16:17
wander joined
16:21
darkmorph left
|
|||
El_Che | piojo_: I was under the impressions that arch linux had rakudo packages | 16:22 | |
piojo_: if not, it can be added to github.com/nxadm/rakudo-pkg | 16:23 | ||
16:23
cdg left,
cdg joined
|
|||
El_Che | piojo_: until now, no one has asked for arch support | 16:24 | |
jdv79 | m: "ab" ~~ /(.)*/; my %h = :k($0>>.Str); %h<k>[0] = "c" | ||
camelia | Cannot modify an immutable Str (a) in block <unit> at <tmp> line 1 |
||
piojo_ | El_Che: that's interesting. There's a forum thread about it, but I don't know whether they've asked for help | ||
jdv79 | why is that immmutable? didn't >>.Str just create an array of mutable strings? | ||
ugexe | m: say ((^5)>>.Str).WHAT | 16:26 | |
camelia | (List) | ||
piojo_ | I'll try installing it again (via the source-based package manager) | ||
ugexe | m: "ab" ~~ /(.)*/; my %h = :k(@ = $0>>.Str); %h<k>[0] = "c" | 16:27 | |
camelia | ( no output ) | ||
16:27
zakharyas left
|
|||
jdv79 | i forgot about the @= part | 16:28 | |
thanks ugexe. I knew Array.new worked but seemed verbose. | |||
16:28
scovit joined
|
|||
jdv79 | i don't see taht in the docs | 16:31 | |
16:34
Kyo91_ joined
|
|||
ugexe | its probably mentioned somewhere for examples like -> $foo, $, $, @ { } | 16:34 | |
docs.perl6.org/type/Signature#inde...gnature%29 its vaguely mentioned here | 16:36 | ||
16:37
darkmorph joined
|
|||
jdv79 | i looked on the Lists lang page | 16:37 | |
16:37
greppable6 left
|
|||
jdv79 | docs.perl6.org/language/list | 16:37 | |
16:37
greppable6 joined
16:38
AlexDaniel joined
|
|||
jdv79 | i'll but it | 16:39 | |
*bug | |||
ugexe | well not sure why it would be | ||
16:39
domidumont left
|
|||
jdv79 | that's where GLR type issues are laid out no? | 16:40 | |
ugexe | m: say my @ = 1,2,3; say my $ = 1; # its more generic than that | ||
camelia | [1 2 3] 1 |
||
jdv79 | that's where i went first to look | ||
ugexe | oh i thought it was type/List | ||
not language/List | 16:41 | ||
jdv79 | ah | ||
16:41
troys joined,
darkmorph left
16:43
HoboWithAShotgun joined,
ryn1x left
16:45
napo1eon left
16:52
raiph joined
|
|||
jdv79 | the closer i look its not as simple as i thought. my example is an array in both cases. the slots are just containers or not | 16:52 | |
seems weirder now | |||
16:53
itaipu joined
|
|||
jdv79 | m: "ab" ~~ /(.)*/; my %h = :k($0>>.Str); say %h<k>.WHAT, %h<k>[0].VAR.WHAT; %h<k>[0] = "" | 16:56 | |
camelia | (Array)(Str) Cannot modify an immutable Str (a) in block <unit> at <tmp> line 1 |
||
jdv79 | m: "ab" ~~ /(.)*/; my %h = :k(@=$0>>.Str); say %h<k>.WHAT, %h<k>[0].VAR.WHAT; %h<k>[0] = "" | ||
camelia | (Array)(Scalar) | ||
jdv79 | why did an array get created without containers in the first example thhere? | ||
and/or why did it in the second snippet? | 16:57 | ||
17:00
itaipu left
17:04
Kyo91_ left
17:06
ryn1x joined
|
|||
AlexDaniel | hm, so Hacktoberfest still counts repos you have commit bit for | 17:07 | |
weird | |||
17:07
mempko joined
|
|||
AlexDaniel | just registered for fun and it shows 14/4 contributions | 17:08 | |
so you can claim the t-shirt if you have 4 pull requests anywhere | |||
17:11
ryn1x left
17:13
Piotr__ joined
|
|||
AlexDaniel | squashable6: next | 17:13 | |
squashable6 | AlexDaniel, ⚠🍕 Next SQUASHathon in 6 days and ≈16 hours (2017-11-04 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
AlexDaniel | woo-hoo, 6 days! | ||
alright, let's decide on the topic for this month | 17:14 | ||
buggable: testneeded | |||
buggable: tag testneeded | |||
buggable | AlexDaniel, There are 38 tickets tagged with TESTNEEDED; See fail.rakudo.party/t/TESTNEEDED for details | ||
17:16
Piotr_ left
17:19
domidumont joined
17:23
HoboWithAShotgun left,
ryn1x joined
17:25
Kyo91_ joined
17:26
Cabanossi left,
mempko left
17:27
Cabanossi joined
17:28
number8 joined
|
|||
number8 | hello, everyone! i'm trying to store all regex captures in a single line doing something like $string ~~ m:g/ (pattern)? / ... but how can i store all captures in an array? | 17:30 | |
timotimo | you can use comb instead, if you pass :match inside it'll give you the match objects corresponding to every match rather than just the matched string | 17:32 | |
17:32
scovit left
|
|||
timotimo | m: my @results = "hello how are you today?".comb(/ \w(\w+)\w /, :match); .[0].say for @results | 17:33 | |
camelia | 「ell」 「o」 「r」 「o」 「oda」 |
||
17:35
mempko joined
|
|||
number8 | timotimo: awesome, thank you. i have to read the comb documentation because i thought it only returned a list of the individual elements of a sequence... | 17:35 | |
17:36
epony left
|
|||
timotimo | you can also use $string.match(/ (pattern)? /, :g) for the same purpose | 17:36 | |
and i think if you my @results = $strign ~~ m:g/ (pattern)? / it'll also give you what you want | 17:37 | ||
[Coke] | AlexDaniel: "nom regression" indicates that it regressed when we cut over to nom from the previous master. so yes, don't rename those. | 17:39 | |
number8 | i tried that last one but it stored the 「capture」 in that format, whereas i'm only interested in the capture as a string | ||
AlexDaniel | [Coke]: oh! | 17:40 | |
[Coke] | (they're *old*. :) | ||
17:40
Coleoid left
|
|||
[Coke] | most of them at this point probably need a larry review and a "that's just the way it is now" | 17:40 | |
@larry, not larry specifically | |||
17:41
epony joined
17:43
wamba left
17:46
mempko left
17:52
kyan left
17:56
Cabanossi left
17:58
Cabanossi joined,
epony left
|
|||
AlexDaniel | bisectable6: uptime | 18:05 | |
bisectable6 | AlexDaniel, 5 days, 15 hours, 18 minutes, and 28 seconds, 433.74KB maxrss. This is Rakudo version 2017.09-479-g7cf5ce7ef built on MoarVM version 2017.09.1-609-g1a9be0ad4 implementing Perl 6.c. | ||
18:05
piojo_ left
|
|||
timotimo | number8: aha! then i expect comb without :match will give you exactly what you want | 18:05 | |
18:13
epony joined
18:18
bisectable6 joined,
ChanServ sets mode: +v bisectable6,
benchable6 joined,
committable6 joined,
squashable6 joined,
unicodable6 joined
18:22
lostinfog left
18:36
Kyo91_ left
18:41
HoboWithAShotgun joined,
horrad joined
18:44
horrad left
18:45
domidumont left,
horrad joined
18:46
horrad left
18:48
horrad joined
|
|||
number8 | timotimo: it did! thanks for your help :) | 18:49 | |
18:53
horrad left
|
|||
timotimo | cool | 18:54 | |
knight__ | When I have hash, and hash has some key and value is array and array contains a hash. If I do %hash<key> that returns array of hashes not one hash | 18:58 | |
for example | |||
ideone.com/SyVg7z | 18:59 | ||
Why it does not return a whole hash in array? | |||
I do not understand it. | |||
moritz | m: my %hash := {1=>[{a=>3, b=>4}]}; dd %hash | 19:01 | |
camelia | Hash % = {"1" => $[:a(3), :b(4)]} | ||
moritz | the hash is flattened out | ||
m: my %hash := {1=>[{a=>3, b=>4},]}; dd %hash | |||
camelia | Hash % = {"1" => $[{:a(3), :b(4)},]} | ||
lizmat | one argument rule | 19:02 | |
moritz | m: my %hash := {1=>[{a=>3, b=>4},]}; dd %hash<1>[0] | ||
camelia | Hash <element> = ${:a(3), :b(4)} | ||
HoboWithAShotgun | good evening sunshines | ||
m: role R {}; multi sub infix:<*>(R $a, R $b) { $a * $b; }; my $a = 2 does R; my $b = 3 does R; say $a * $b | 19:03 | ||
camelia | Ambiguous call to 'infix:<*>'; these signatures all match: :(Int:D \a, Int:D \b --> Int:D) :(R $a, R $b) in block <unit> at <tmp> line 1 |
||
HoboWithAShotgun | can i make this unambiguous? | ||
ugexe | m: my %hash := {1=>({a=>3, b=>4})}; say %hash<1>[0] | 19:05 | |
camelia | {a => 3, b => 4} | ||
19:05
darutoko left
|
|||
knight__ | ugexe: interesting | 19:06 | |
I am parsing it from JSON, is there any option? | 19:07 | ||
19:08
Coleoid joined
|
|||
El_Che | I created a Ubuntu 14.04 pkg for using it with travis on my own projects. The rakudobrew community version is too slow for long jobs. Does it make sense to provide an alternative language support based on packages? Now I just install the deb from the repo (travis-ci.org/nxadm/rakudo-pkg#L515), but releases could be uploaded to e.g. to bintray to provide more versions | 19:08 | |
HoboWithAShotgun | m: my %hash := {1=>[{a=>3, b=>4}]}; say %(%hash<1>); | 19:11 | |
camelia | {a => 3, b => 4} | ||
19:11
raschipi joined
|
|||
HoboWithAShotgun | that's really a trap imho, your code knight, should be correct | 19:11 | |
ugexe | m: my %hash := {1=>[{a=>3, b=>4}, {c=>3}]}; say %(%hash<1>); | 19:12 | |
camelia | {a 3 b 4 => {c => 3}} |
||
AlexDaniel | m: role R {}; multi sub infix:<*>(R $a, R $b) is default { $a * $b; }; my $a = 2 does R; my $b = 3 does R; say $a * $b | ||
camelia | MoarVM panic: Memory allocation failed; could not allocate 131072 bytes | ||
AlexDaniel | m: role R {}; multi sub infix:<*>(R $a, R $b) is default { nextwith $a, $b }; my $a = 2 does R; my $b = 3 does R; say $a * $b | 19:13 | |
camelia | 6 | ||
AlexDaniel | HoboWithAShotgun: what about this? ↑ | ||
HoboWithAShotgun | i think it's because a hash is just a list of pairs so {a=>3, b=>4} is actually [:a(3), :b(4)] and that [[:a(3), :b(4)]] gets then flattened somehow? | 19:14 | |
19:14
knight__ left
|
|||
ugexe | one argument rule | 19:14 | |
19:15
knight__ joined
|
|||
knight__ | sorry, my inet connection... | 19:15 | |
Somebody wrote something? | |||
Is it "bug"? | |||
AlexDaniel | knight__: irclog.perlgeek.de/perl6/today | 19:16 | |
knight__ | Thx | ||
19:24
robertle joined
|
|||
number8 | does anyone know why $0 is Nil in a line like this: for $current_line.comb(/ (this matches and i want it captured) /) { ... | 19:28 | |
19:29
cdg left,
cdg joined
|
|||
ugexe | m: say (1..9).comb(/(1|2|3) {say $0}/) | 19:30 | |
camelia | 「1」 「2」 「3」 (1 2 3) |
||
19:31
Mrofnet joined
|
|||
AlexDaniel | number8: do you want to capture just one thing or multiple things? | 19:31 | |
moritz | number8: .comb just returns a list of strings | ||
if you want matches, use .match | |||
HoboWithAShotgun | ugexe: one argument rule? | ||
AlexDaniel | m: for ‘abb add’.comb(/ a <( .. /) { say $_ } | ||
camelia | bb dd |
||
number8 | AlexDaniel: just the pattern inside parens | ||
AlexDaniel | m: for ‘abbz addz’.comb(/ a <( .. )> z /) { say $_ } | 19:32 | |
camelia | bb dd |
||
19:32
poohman joined
|
|||
AlexDaniel | number8: I don't know what you're doing exactly, but maybe this ↑ will help | 19:32 | |
poohman | hello | ||
AlexDaniel | o/ | ||
HoboWithAShotgun | m: my @a = [[1]]; say @a.perl; @a = [[1], [2]]; say @a.perl | 19:33 | |
camelia | [1] [[1], [2]] |
||
number8 | moritz: i know, and that's partially what i want, but i also want a substring (the capture) within the string that comb returns | ||
HoboWithAShotgun | what the fuck, seriously? | ||
AlexDaniel | .hug HoboWithAShotgun | ||
huggable hugs HoboWithAShotgun | |||
moritz | number8: example? | ||
ugexe | docs.perl6.org/language/functions#...onventions | 19:34 | |
19:34
Morfent left
|
|||
AlexDaniel | HoboWithAShotgun: yeah, it has to be [[1],] | 19:34 | |
number8 | AlexDaniel: i'm using comb to catch multiple instances of the same pattern in one line of text | ||
poohman | m: say "Test hello" | ||
camelia | Test hello | ||
19:34
cdg left
19:35
ryn1x left
|
|||
HoboWithAShotgun | i don't care about the rationale, that's wrong. | 19:35 | |
ugexe | what if the solution was wrong somewhere else? | 19:36 | |
raschipi | The one argument rule is by definition correct | ||
19:36
troys is now known as troys_
|
|||
number8 | moritz: for example, i want to read a file line by line: for $filename.IO.lines -> $current_line { ... | 19:36 | |
moritz | number8: we could help you much better if you provided an actual, concrete example | ||
AlexDaniel | no he is actually right, it's really weird | ||
for example | |||
m: say ((50)) | |||
camelia | 50 | ||
AlexDaniel | m: say [[50]] | ||
camelia | [50] | ||
moritz | it is weird, yes | ||
but we haven't found a better solution | |||
HoboWithAShotgun | it makes every notation of a datastructure erratic | 19:37 | |
lizmat | HoboWithAShotgun: no, the rule is consistent | ||
ugexe | thats a bold claim | ||
lizmat | anything iterable used as a single value / parameter, will be iterated over / flattened | ||
HoboWithAShotgun | sure you can have an array of arrays, but all arrays must have at least two elements... | ||
raschipi | m: my @a := [[1]]; say @a.perl; | ||
camelia | [1] | ||
moritz | HoboWithAShotgun: or you just use a trailing comma | 19:38 | |
AlexDaniel | HoboWithAShotgun: oh, you're misunderstanding it! [42,] is not two elements | ||
number8 | then for each line i want to find ALL instances of / .* (THIS) .*/ | ||
moritz | m: say [[1,],].perl | ||
camelia | [[1],] | ||
AlexDaniel | number8: / .* <( THIS )> .* / | ||
raschipi | m: my \a := [[1]]; say a.perl; | ||
camelia | [1] | ||
moritz | number8: just leave out the .* on both ends | ||
AlexDaniel | or that ↑ | ||
ugexe | .lines.map: { if $_ ~~ / ... / { say $0 } }) | 19:39 | |
AlexDaniel | depending on what your actual example is | ||
19:39
ryn1x joined
|
|||
moritz | that's why I'm asking for an *actual* example | 19:39 | |
HoboWithAShotgun | m: my @a = [[1,]]; say @a.perl; | 19:40 | |
camelia | [1] | ||
moritz | ugexe: or .lines.grep(/.../) | ||
HoboWithAShotgun | m: my @a = [[1,],]; say @a.perl; | ||
camelia | [[1],] | ||
19:40
Merfont joined
|
|||
ugexe | moritz: but if he wants the value its easier to grep at the end for .defined than to do another map to get the actual value | 19:40 | |
HoboWithAShotgun | m: my @a = [[1,],]; say @a.elements; | ||
camelia | No such method 'elements' for invocant of type 'Array' in block <unit> at <tmp> line 1 |
||
AlexDaniel | .elems | ||
HoboWithAShotgun | m: my @a = [[1,],]; say @a.elems; | ||
camelia | 1 | ||
HoboWithAShotgun | ok, fine. it's still weird | 19:41 | |
19:41
Morfent joined
|
|||
lizmat | HoboWithAShotgun: that is what the GLR was all about | 19:41 | |
and this was discussed at length, for months, if not years | 19:42 | ||
raschipi | It was weirder before, right? | ||
lizmat | to figure out something that is consistent | ||
HoboWithAShotgun | hey, i am totally new to this | ||
19:42
Cabanossi left
|
|||
lizmat | it was *not* consistent | 19:42 | |
before the GLR | |||
there's even a signature for it | |||
19:43
Cabanossi joined,
number8 left,
Mrofnet left
|
|||
HoboWithAShotgun chuckles ( The Year of The Great List Refactor ) | 19:43 | ||
lizmat | m: sub a(+@a) { @a }; dd a( (1,2,3) ); dd a( (1,2,3),(4,5,6) ) | ||
camelia | [1, 2, 3] [(1, 2, 3), (4, 5, 6)] |
||
AlexDaniel | HoboWithAShotgun: that's alright, but there's no reason to shout bad words :) To be fair I did that too yesterday, but that was because for a second I thought that I released 2017.10 with something really bad… | ||
19:44
ryn1x left
|
|||
AlexDaniel | HoboWithAShotgun: false alarm though :) | 19:44 | |
HoboWithAShotgun | sounds like the opening credits of Babylon5 | ||
lizmat | m: sub a(+@a) { @a }; dd a( (1,2,3) ); # note the (1,2,3) gets flattened, because it's the only parameter and Iterable | ||
camelia | [1, 2, 3] | ||
jast | I didn't know Babylon 5 focused so much on refactoring | ||
19:44
Merfont left
|
|||
lizmat | m: sub a(+@a) { @a }; dd a( (1,2,3),(4,5,6) ) # note that (1,2,3) and (4,5,6) do *not* get flattened, because there's now 2 Iterables given | 19:45 | |
camelia | [(1, 2, 3), (4, 5, 6)] | ||
lizmat | HoboWithAShotgun: ^^ hope that makes sense? | ||
El_Che | 2017.10 was already released? | ||
AlexDaniel | HoboWithAShotgun: FWIW there's at least one case where one argument rule leads to completely different behavior depending on the input… but I can't find a ticket for that | ||
lizmat | El_Che: yes, yesterday | ||
El_Che | ah crap, I missed that | 19:46 | |
AlexDaniel | in fact there's 2017.10 star already, if I'm not mistaken | ||
El_Che | I saw a RC, so I thought it was a pre release | ||
AlexDaniel | ah, it may be | ||
El_Che: by the way, I pinged you right after the release :) irclog.perlgeek.de/perl6/2017-10-26#i_15359701 | 19:47 | ||
El_Che | my bad | ||
lets roll some new packages :) | |||
AlexDaniel | \o/ | ||
El_Che | (I spent the time in between refactoring stuff, let's see if something broke :) ) | 19:48 | |
19:49
Coleoid left
|
|||
El_Che | funnu enough partly was converting smalls script from perl 5 to perl 6, and from bash to perl 5 :) | 19:49 | |
AlexDaniel | El_Che: by the way, you can subscribe to perl6-compiler mailing list here: perl6.org/community/ | ||
19:50
Kyo91_ joined
|
|||
El_Che | I'll do that | 19:50 | |
AlexDaniel | El_Che: (to receive release announcements) | ||
El_Che | I got some help for creating a JS page on github pages so I can always link to the latest stable build | 19:53 | |
that's handy | |||
19:58
ryn1x joined,
raschipi left
19:59
mson left
20:02
raiph left
20:06
knight__ left
20:10
Mrofnet joined
20:11
raiph joined,
poohman left
20:13
Morfent left,
Piotr_ joined
|
|||
HoboWithAShotgun | ah, guys, my cake turned out superduper. soft and moist and oozing chocolate | 20:16 | |
have some? | |||
20:17
ryn1x left
|
|||
lizmat starts saliving :-) | 20:17 | ||
20:17
Piotr__ left
|
|||
lizmat loves verbing | 20:17 | ||
HoboWithAShotgun likes the term "slashdotting" | 20:18 | ||
:= solving a task/problem - by letting others do the work / - by blindly copying other peoples worjk | 20:19 | ||
AlexDaniel | .oO( also known as “open-source” ) |
20:20 | |
HoboWithAShotgun | actually i think i mixed that up with cargo-culting, what did slashdotting then mean again | 20:22 | |
timotimo | getting featured on slashdot and your web server going down under the enormous traffic, that's slashdotting to me | 20:23 | |
20:30
as_ joined
|
|||
geekosaur | your web site/blog/whatever went viral and everyone's trying to load it at once | 20:31 | |
also I have decided I don't like the way programmers sneer about 'cargi culting' | 20:32 | ||
like it or not, that's how the human brain works | |||
mspo | IT is heavily fashion driven | 20:33 | |
that is reality | |||
marketing of technologies is weird but can pay off big time if you manage to start a trend | 20:34 | ||
HoboWithAShotgun | oh, i'm all for copying the closest existing piece of code and massage it into your needs, saves a lot of time sometimes | ||
but: you must understand it. | 20:35 | ||
geekosaur | that's not the problem. the problem is the attitude we bring to it | ||
mspo | oh I was thinking of something else :) | 20:36 | |
20:37
bdmatatu left
|
|||
perlpilot | geekosaur: you think cargo culting is a pragmatic solution that we shouldn't look down upon? | 20:37 | |
geekosaur | sigh | ||
what did I just say | |||
perlpilot | I dunno, that's why I'm asking for clarification. | 20:38 | |
geekosaur | you may well be part of the problem then. | ||
'cargo culting' is our natural way of understanding the world around us. | |||
guiding people to actually understand things is good, | |||
Being snotty about it is NOT. | 20:39 | ||
perlpilot | gotcha. | ||
geekosaur | and even the label is a severe put-down | ||
lowin | How do I read environment variables? | ||
as_ | %*ENV? | ||
geekosaur | m: say %*ENV<HOME> | ||
camelia | /home/camelia | ||
perlpilot | lowin: they're in %*ENV | ||
lowin | perlpilot, I tried %*env<REMOTE_ADDR> | 20:40 | |
throws an error | |||
as_ | lowercased | ||
perlpilot | lowin: "ENV" and "env" are not the same thing | ||
lowin | oh my bad | ||
as_ | hi, i have something about the new atomic operations | ||
why we neeed the utf character at all? | |||
timotimo | you don't need the character | 20:41 | |
20:41
Cabanossi left
|
|||
as_ | if the variable has to be declared as 'atomicint' anyway | 20:41 | |
timotimo: what do you mean? ascii versions? | |||
perlpilot | as_: call it another hint. | ||
as_ | but it is hard to type | ||
geekosaur | as_, because you can operate on it normally as well if you don;t need the atomicity | ||
but to be atonic it *needs* to be stored a particular way | 20:42 | ||
*atomic | |||
as_ | i think if i need an atomic variable i would want perl to think about it, not me | ||
geekosaur | as well as the atomic op itself being special | ||
as_ | like "atomicint" forces all operations to be atomic | ||
perlpilot | as_: in this case *you* do need to think about it :) | ||
20:42
Cabanossi joined
|
|||
as_ | that can be an acceptable tradeoff | 20:42 | |
geekosaur | as_, but that is impossible | ||
most things perl 6 does cannot be atomic | |||
as_ | no. if i say "atomic" - what things cannot be atomic? | 20:43 | |
geekosaur | they can be done under an atomic lock but they cannot themselves *be* atomic | ||
jnthn | as_: The ops are exposing low-level, hardware-provided, atomic operations. | 20:44 | |
as_ | my atomicint $a; $a<ATOM>++ vs. my $i; $i++ | ||
timotimo | you can't atomically divide, for example | ||
geekosaur | the only things that can be atomic are specific CPU operations with their specific restrictions | ||
perl 6 can expose this to some extent, but because it;s the hardware/CPU that controls it it will always be limited in any higher level language | |||
as_ | thread support is now very simple | 20:45 | |
jnthn | lol | ||
perlpilot | as_: along one axis maybe | ||
as_ | but atomic operations are a bit more difficult syntactically | ||
geekosaur | so you think that can automatically be done for anything else? | ||
jnthn | Anyone who puts "thread" and "simple" in the same sentences hasn't done enough with threads ;-) | ||
20:46
ifim joined
|
|||
as_ | jnth: for the user, not for you :) | 20:46 | |
geekosaur | as_, perl 6 cannot rewire your CPU. | ||
*the CPU controls this*. | |||
jnthn | as_: There are function version if you don't want to type the atom :) | ||
*versions | |||
geekosaur | languages do not. Operating systems do not.Programmers do not. | ||
lowin | Another stupid question. How can I get the size of an string in bytes? | ||
perlpilot | lowin: bytes or chars? | ||
lowin | bytes | ||
as_ | jnthn: i mean i don't want to type <ATOM> or its ASCII replacement as soon as i claimed the variable is an atomicint | 20:47 | |
perlpilot | lowin: then you don't want a string | ||
lowin | What do I want then | ||
geekosaur | buf8 | ||
El_Che | perl5 autodie is a new requirement of moar I see | ||
[Coke] | lizmat: I should go see Thor next week, yes? | 20:48 | |
jnthn | lowin: A string can be represented in many different ways, (latin-1, utf8, utf16, etc.) and the number of bytes will differ. | ||
20:48
bdmatatu joined
|
|||
lizmat | [Coke]: yeah, it's fun (mostly) | 20:48 | |
jnthn | lowin: So you'd want to do $str.encode('utf-8').bytes for example | ||
lowin | jnthn, appreciate it. thanks | ||
geekosaur | lowin, despite what other languages may have mistaught you, a string is not a string. A string has a specific encoding and a specific representation (in perl 6, graphemes). it could also be Unicode codepoints, ISO8859 characters, etc. | 20:49 | |
lizmat | [Coke]: definitely a more Guardians of the Galaxy feel than the previous Thor movies | ||
jnthn | as_: We can't do that, because native types don't actually knwo what kind of thing they are | ||
[Coke] | lizmat: cool. I've been super jazzed for it since the first trailer. :) | ||
lizmat | (and that includes using the Immigrant Song prominently in the movie) | ||
as_ | jnthn: ah - that explains (a bit) | ||
jnthn | as_: So we can't multi-dispatch on int vs atomicint for example | ||
But also, from a language design perspective, we give different semantics different operators. | 20:50 | ||
as_ | jnthn: does it mean i can use simple 'int' and use atomic operations with it? | ||
jnthn | Thus + for numeric addition and ~ for string concat | ||
[Coke] gives up on $dayjob and goes on strike for 2 days! | |||
geekosaur | I am somewhat tempted to argue that atomicint should be a internal thing not part of perl 6 as such. | ||
lizmat | [Coke]: www.youtube.com/watch?v=8QxtIQ1F1ig # but you've probably already seen that | ||
jnthn | as_: You can...sort of. But atomic operations are restricted to the sizes the CPU can do them on | ||
geekosaur | [perl 6 might make visible synchronization/locking stuff at a higher level, whose implementation uses atomicint under the hood | 20:51 | |
jnthn | as_: atomicint is simply an alias to whichever size is doing to work | ||
uh, is *going* to work | |||
lowin | geekosaur, I come with C background. If you have asked me last week, I'd tell you "there is no such thing as a 'string', just an array of bytes packed together" | ||
as_ | cheers:) | ||
jnthn | So you can write portable code | ||
geekosaur | but you will get stuff like this where as_ thinks atomicint is a high level operation that can be treated in high level ways, when fandamrnally a raw CPU operation and you MUST do exactly and only what the CPU will permit | ||
perlpilot | Even with all the new Perl 6 books, it seems we need a few more | ||
geekosaur | *fundamentally it is a | 20:52 | |
20:52
cdg joined
|
|||
[Coke] | lizmat: heh. Nice, I hadn't seen that cut with just the song. | 20:52 | |
jnthn | geekosaur: Well, it's a "make the hard things possible" kidna thing. I'd like it to be possible to implement lock-free data structures in Perl 6. | 20:53 | |
20:53
darkmorph joined
|
|||
geekosaur | yes. but that should be implementation layer not public layer | 20:53 | |
because you cant make atomicint a proper Perl 6 type without breaking the CPU invariants | 20:54 | ||
jnthn | At the end of the day, though, we'd want to provide some standard way to access this functionality (that folks can use it their modules), and that'd mean it gets documented, and I'm not sure that sticking "this is implementation layer" and "this is public layer" in the docs will make a great deal of difference. | 20:56 | |
[Coke] ghosts | |||
20:56
cdg left
|
|||
jnthn | *so that | 20:56 | |
20:57
epony left,
wamba joined
|
|||
lizmat | El_Che: autodie needed for Moar ??? | 20:58 | |
jnthn | ah, gotta go away for a bit...bbl | ||
timotimo | lizmat: Configure.pl, if anything | ||
or the exprjit compiler | |||
El_Che | lizmat: buildtime | ||
20:58
cdg joined
|
|||
El_Che | it's new, I add to add it to the docker container | 20:58 | |
lizmat | why would one need that as a prereq? feels like unnecessary laziness to me | ||
(from the person doing work on Configure.pl) | 20:59 | ||
El_Che | other distros had it already in the installed perl pkgs, centos splitted that | ||
so it needed to be added | |||
lizmat | ah, so it's not a recent change in Configure.pl causing this ? | ||
El_Che | it is | ||
between 2017.09 en 10 | |||
lizmat: travis-ci.org/nxadm/rakudo-pkg/job...46517#L869 | 21:00 | ||
(ignore the exit 0 result, and explicit exit 1 was missing on that build)à | |||
lizmat | if I look at Configure.pl, I don't see a mention of autodie in there? | 21:01 | |
timotimo | probably under lib/ | 21:02 | |
21:02
troys_ is now known as troys
|
|||
El_Che | The same succesful build is here, for reference: travis-ci.org/nxadm/rakudo-pkg/jobs/293870092 | 21:02 | |
lizmat | tools/expr-template-compiler.pl | ||
tools/jit-dump.pl | |||
but those aren't needed for building ?? | |||
timotimo | i think the template compiler only has to run for developers? | 21:03 | |
or do we not have the results from that ni our source tarballs? | |||
El_Che | I don't do any magic in the build | ||
21:03
darkmorph left
|
|||
El_Che | and autodie was not used in 2017.09 | 21:03 | |
"cd /MoarVM*; perl Configure.pl --prefix=$PREFIX" | 21:04 | ||
that's it | |||
timotimo | we don't check it into git i don't think | ||
i *think* we could, but brrt will know for sue | 21:05 | ||
sure* | |||
lizmat | the only two occurrences of autodie in the MoarVM tree are in those two files | ||
El_Che | These are the config parameters of that build: travis-ci.org/nxadm/rakudo-pkg/job...46517#L670 | ||
lizmat | changed in 2017-05-15 and 2017-07-18 | ||
ah, but they got merged between 2017.09 and 2017.10 perhaps ? | 21:06 | ||
I would be in favour of removing the autodie dependency | 21:07 | ||
21:09
mson joined,
bdmatatu left
|
|||
El_Che | lizmat: did you say "remove the perl 5 dependency"? :P | 21:09 | |
lizmat | no, autodie | ||
El_Che | kidding :) | ||
lizmat | perl 5 dependency removal is longer term | ||
first we need nqp to be distributed everywhere :-) | |||
El_Che | world domination part | 21:10 | |
21:11
epony joined
21:12
mempko joined
21:13
setty1 joined
|
|||
El_Che | i wonder if someone uses my 386 packages. Is there a usecase for a slow rakudo? | 21:15 | |
if you need a tiny machine, there are faster solutions, I guess | 21:16 | ||
lizmat had her first 386 machine 29 years ago | |||
El_Che | All my target OS'es pass: travis-ci.org/nxadm/rakudo-pkg <--pkgs should be up shortly | 21:17 | |
21:17
ryn1x joined
|
|||
geekosaur | I can't even remember when. I do remember what, it was an Intel Inboard/386 card stuffed into an ITT XTRA | 21:17 | |
21:18
sena_kun left
|
|||
El_Che | mine was 23j ago | 21:18 | |
wow | |||
the faster consumer pc on the market for about 3 months | |||
lizmat | it was one the first on the NL | ||
El_Che | :) | ||
lizmat | market | ||
Olivetti, with 4MB RAM :-) | 21:19 | ||
El_Che | lizmat: an on other 1st in NL story? Wasn't that also the case with a mac? | ||
lizmat | and special floating point bug of the early 386 batches | ||
I think so yes :-) | |||
I was also one of the first people in NL having functional email and IRC in 1977 | 21:20 | ||
El_Che | I am feeling leet today, I have 3 open laptops at the moment :) | ||
21:20
stmuk_ joined
|
|||
El_Che | lizmat: now you're showing off | 21:20 | |
:) | |||
lizmat | although they were called "personal notes" and "TERM-talk" at the time | ||
perlpilot | I don't think you had IRC in 1977 | 21:21 | |
El_Che | I was one of the first people I know around here, and that was 1994 :) | ||
21:21
as_ left
|
|||
lizmat | en.wikipedia.org/wiki/PLATO_(computer_system) | 21:21 | |
geekosaur | bitnet relay chat? :p | ||
El_Che | here = "physical surroundings" | ||
lizmat | specifically: en.wikipedia.org/wiki/PLATO_(compu..._community | 21:22 | |
geekosaur | PLATO. now that's an old memory... | ||
lizmat | my distance record in chatting was from Amsterdam to Hawaii :-) | 21:24 | |
21:24
miki76 joined
|
|||
geekosaur | (I didn't get to use it, in the 70s I was too busy trying to make sense of my broken internal communications to worry about someone else's >.> ) | 21:25 | |
HoboWithAShotgun | that's probably the nicest description for drug abuse i ever heard ^^ | 21:26 | |
geekosaur | noit drugs, sadly | ||
unless you want to count neurotransmitters without any outside interference | |||
21:27
Piotr__ joined
21:28
perlpilot left
|
|||
lizmat | geekosaur: glad you made it to #perl6 here and now nonetheless! | 21:28 | |
HoboWithAShotgun | being able to willingly alter your brain chemistry, that'd be a huge advantage | ||
geekosaur | like anyone knww how to back then | 21:29 | |
*knew | |||
21:31
Piotr_ left
|
|||
HoboWithAShotgun | like anyone does know today | 21:32 | |
i don't mean by taking pills or so. i mean by willing it. | 21:33 | ||
21:38
cdg left,
hoelzro joined
|
|||
HoboWithAShotgun | m: use Test; throws-like { fail "something happened" }, Exception, message => /something \s happened/; | 21:51 | |
camelia | 1..3 ok 1 - code dies ok 2 - right exception type (Exception) ok 3 - .message matches /something \s happened/ ok 1 - did we throws-like Exception? |
||
HoboWithAShotgun | m: use Test; throws-like { fail "something happened" }, Exception, message => m:s/something happened/; | ||
camelia | Use of uninitialized value of type Any in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. in block <unit> at <tmp> line 1 1..3 ok 1 - code dies ok 2 - right exception t… |
||
HoboWithAShotgun | m: use Test; throws-like { fail "something happened" }, Exception, message => :s/something happened/; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Missing required term after infix at <tmp>:1 ------> 3ption, message => :s/something happened/7⏏5; expecting any of: prefix term |
||
HoboWithAShotgun | m: use Test; throws-like { fail "something happened" }, Exception, message => /something happened/:s; | 21:52 | |
camelia | 5===SORRY!5=== You can't adverb at <tmp>:1 ------> 3ption, message => /something happened/:s7⏏5; expecting any of: pair value Other potential difficulties: Space is not significant here; please use quotes or :s… |
||
HoboWithAShotgun | arrrgh | ||
HoboWithAShotgun resorts to the docs | |||
21:53
Zoffix joined
|
|||
Zoffix | HoboWithAShotgun: use rx instead of ? | 21:53 | |
*m | |||
'm' matches immediatelly against $_ | 21:54 | ||
geekosaur | ^ | ||
Zoffix | alternatively, put :s inside regex | ||
geekosaur | also the :s goes inside | ||
with that form | |||
HoboWithAShotgun | m: use Test; throws-like { fail "something happened" }, Exception, message => m:s/something happened/; | ||
camelia | Use of uninitialized value of type Any in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. in block <unit> at <tmp> line 1 1..3 ok 1 - code dies ok 2 - right exception t… |
||
geekosaur | (with rx it goes on the 'rx') | ||
HoboWithAShotgun | m: use Test; throws-like { fail "something happened" }, Exception, message => rx:s/something happened/; | ||
camelia | 1..3 ok 1 - code dies ok 2 - right exception type (Exception) ok 3 - .message matches rx:s/something happened/ ok 1 - did we throws-like Exception? |
||
HoboWithAShotgun | m: say "x y" ~~ m:s/x y/ | 21:55 | |
camelia | 「x y」 | ||
HoboWithAShotgun | i'm missing something | ||
m: use Test; throws-like { fail "something happened" }, Exception, message => rx/:ssomething happened/; | 21:56 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unrecognized regex modifier :ssomething at <tmp>:1 ------> 3 happened" }, Exception, message => rx/:7⏏5ssomething happened/; |
||
HoboWithAShotgun | inside? | ||
geekosaur | ~~ is a special form, not a normal operator. so m// or // works there only because of that special form | ||
Zoffix | ~~ thunks; in that form it doesn't gey run until $_ is already aliased | ||
geekosaur | /:s x y/ | ||
HoboWithAShotgun | m: use Test; throws-like { fail "something happened" }, Exception, message => /:s something happened/; | ||
camelia | 1..3 ok 1 - code dies ok 2 - right exception type (Exception) ok 3 - .message matches /:s something happened/ ok 1 - did we throws-like Exception? |
||
Zoffix | HoboWithAShotgun: yes inside, but separate it from stutf | 21:57 | |
HoboWithAShotgun | ahh | ||
tyvm | |||
21:57
ryn1x left
21:58
raiph left,
Zoffix left
21:59
ryn1x joined
22:01
ifim` joined,
nadim_ left
22:02
ifim left
22:06
Kyo91_ left
22:10
Piotr__ left
22:11
mempko left
22:13
margeas left
22:15
coda joined
|
|||
HoboWithAShotgun | m: my @a = 1,4,3; my @b = 3,4,1; say (@a <<~~>> @b).grep({$_}).elems; | 22:18 | |
camelia | 1 | ||
22:18
margeas joined
|
|||
HoboWithAShotgun | m: my @a = 1,4,3; my @b = 3,4,1; say (@a <<~~>> @b).grep(*).elems; | 22:18 | |
camelia | 3 | ||
HoboWithAShotgun | m: my @a = 1,4,3; my @b = 3,4,1; say (@a <<~~>> @b).grep(* ~~ True).elems; | 22:19 | |
camelia | Potential difficulties: Smartmatch against True always matches; if you mean to test the topic for truthiness, use :so or *.so or ?* instead at <tmp>:1 ------> 3b = 3,4,1; say (@a <<~~>> @b).grep(* ~~ 7⏏5True).elems; 3 |
||
HoboWithAShotgun | m: my @a = 1,4,3; my @b = 3,4,1; say (@a <<~~>> @b).grep(*.so).elems; | ||
camelia | 1 | ||
HoboWithAShotgun | helpful error messages++ | 22:20 | |
HoboWithAShotgun facepalms and replaces ( @$.si-signature Z @$signature ).grep({ $_[0] != $_[1] }).elems == 0; by | 22:22 | ||
@$.si-signature ~~ @$signature | |||
this was 3 at night code to my defense :) | 22:23 | ||
22:23
ivans left
22:25
niceperl joined
|
|||
El_Che | I must say, build time of rakudo seems to be a lot faster nowadays. Did they get faster cpus, or did you guys/gals did a great job? :) | 22:36 | |
creating a docker image of the latest ubuntu + compilation + packaging of rakudo 2017.10= 7 min 25sec | 22:37 | ||
github.com/nxadm/rakudo-pkg/releas...g/v2017.10 | 22:38 | ||
22:39
niceperl left
22:41
Cabanossi left
22:42
Cabanossi joined
22:44
troys is now known as troys_
22:46
setty1 left
22:50
wamba left,
cpage_ left
|
|||
tbrowder | still looking for an emacs replacement: has anyone used ultraedit? looks like a good unicode editor, and customizable for p6. | 22:52 | |
not free, but powerful per their site docs | 22:53 | ||
El_Che | tbrowder: my windows colleagues seemed to liked it 5j ago | ||
although pretty basic | |||
tbrowder | their latest release was august. | 22:54 | |
El_Che | ah, I didn't know they had mac and linux versions | ||
tbrowder | 30-day free trial, paid license alloes use on 3 machines, works on win, linux, and mac | 22:55 | |
El_Che | what os do you run? | 22:56 | |
tbrowder | linux mostly (debian 8) on laptops and remote server, windows for wife and rest of family | 22:57 | |
El_Che | and you code on all those machines or just the linux ones? == do you need a OS independent editor | 22:58 | |
tbrowder | er, i admit i use win for some things, but i don’t code on it. | 22:59 | |
22:59
troys_ is now known as troys
|
|||
El_Che | :) | 23:00 | |
23:01
margeas left,
patrickz left
23:02
margeas joined
23:05
callyalater joined
|
|||
callyalater | m: sub a(Regex $r1) { return rx/ <$r1> a / }; my regex letter_b { b }; my $new = a(&letter_b); say $new; "ba" ~~ $new; "ca" ~~ $new; say so "ba" ~~ $new; say so "ca" ~~ $new; | 23:06 | |
camelia | rx/ <$r1> a / True False |
||
callyalater | m: sub a(Regex $r1) { return rx/ <$r1> a / }; my regex letter_b { b }; my $new = a(&letter_b); say $new; say "ba" ~~ $new; say "ca" ~~ $new; say so "ba" ~~ $new; say so "ca" ~~ $new; | 23:07 | |
camelia | rx/ <$r1> a / 「ba」 Nil True False |
||
callyalater | m: say ""; sub postfix:<!> (Int $n) { [*] 2..$n; }; say "{6!}"; | 23:10 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Negation metaoperator not followed by valid infix at <tmp>:1 ------> 3ix:<!> (Int $n) { [*] 2..$n; }; say "{6!7⏏5}"; expecting any of: infix infix stopper |
||
callyalater | m: sub postfix:<!> (Int $n) { [*] 2..$n; }; say ""; say "{6!}"; | ||
camelia | 720 |
||
23:14
callyalater left
23:15
cpage_ joined,
ryn1x left
23:16
margeas left
23:17
margeas joined
|
|||
Geth | doc: dfca757ae8 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Programs/01-debugging.pod6 fix broken link |
23:23 | |
23:23
ryn1x joined
23:34
coda left
23:35
ryn1x left
23:36
ifim` left
23:41
ryn1x joined
|
|||
HoboWithAShotgun | i am missing something trying to implement == for my role. I have this infix: hastebin.com/cetumowoda.pl | 23:48 | |
my testcase is simple: ok !(12V == 12A) | 23:49 | ||
but that prints "== 12A, 12A" twice | 23:50 | ||
so the sub gets called twice, always both operands being identical | |||
that's not what i expected | |||
23:51
Zoffix joined
|
|||
Zoffix | HoboWithAShotgun: what was the expected behaviour? | 23:51 | |
HoboWithAShotgun | I would expect seing "== 12V, 12A", once | 23:52 | |
Zoffix | HoboWithAShotgun: which candidate does callwith() call? | 23:53 | |
HoboWithAShotgun | i *thought* callwidth calls the == of Int | 23:54 | |
because $a and $b are Ints Doing Unit::SI | 23:55 | ||
23:55
Cabanossi left
|
|||
Zoffix | What does nextcallee.file say? | 23:56 | |
HoboWithAShotgun | but even if that is wrong, it doesnt explain why i see the same value for $a and $b | ||
let me quickly put that on github | 23:57 | ||
23:57
Cabanossi joined
|
|||
Zoffix | nqp: class Foo { has %!quote_lang_cache; method x() { %!quote_lang_cache{'x'} := 42; say(nqp::existskey(%!quote_lang_cache, 'x')) } }; Foo.new.x() | 23:58 | |
camelia | 1 | ||
Zoffix | nm, brainfart | ||
Oh wait no. How come nqp code is doing `my %quote_lang_cache := nqp::hash();` ? Why assign nqp::hash? | 23:59 | ||
23:59
mson left
|