Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2018-01-12

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:17 dct joined #perl6
00:30 Herby_ joined #perl6
00:30 Herby_ o/
00:33 Herby_ \o
00:35 timotimo heyo
00:35 Herby_ timotimo: how goes it?
00:36 timotimo bearable, and you?
00:36 Herby_ I have the next few days off, so I can't complain too much
00:47 Herby_ can I call python modules in Perl 6, on windows 10?
01:02 aborazmeh joined #perl6
01:02 aborazmeh joined #perl6
01:15 TeamBlast joined #perl6
01:16 nativecallable6 joined #perl6
01:17 unicodable6 joined #perl6
01:17 quotable6 joined #perl6
01:21 [Coke] it got up to 10ºC today here, was soooo warm compared to last few weeks.
01:23 sivoais joined #perl6
01:23 timotimo .tell herby_ sorry i disappeared for RSI break and didn't come back for a whole while
01:23 yoleaux timotimo: I'll pass your message to herby_.
01:35 cdg_ joined #perl6
01:57 awwaiid joined #perl6
02:20 aindilis joined #perl6
03:00 ilbot3 joined #perl6
03:00 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
03:11 epony joined #perl6
03:13 epony joined #perl6
03:24 llfourn joined #perl6
03:32 epony joined #perl6
03:40 cdg joined #perl6
03:57 bloatable6 joined #perl6
04:21 GregDonald_ joined #perl6
04:25 dj_goku joined #perl6
04:35 a3r0 joined #perl6
04:43 Cabanossi joined #perl6
05:09 dudebbn joined #perl6
06:03 moritz o/
06:09 astj_ joined #perl6
06:17 epony joined #perl6
06:19 epony joined #perl6
06:26 AlexDaniel` joined #perl6
06:27 ilmari[m] joined #perl6
06:27 Matthew[m] joined #perl6
06:53 darutoko joined #perl6
07:12 Geth ¦ doc/master: 4 commits pushed by (Luca Ferrari)++
07:12 Geth ¦ doc/master: cc90b47ddd | Add link to Nil type.
07:12 Geth ¦ doc/master: 1a7edf71e5 | Place a colon between two statements.
07:12 Geth ¦ doc/master: 4feb5c175f | Show that 'is default' can be used also with arrays and hashes.
07:12 Geth ¦ doc/master: 37ec7f2ca8 | Merge branch 'master' of github.com:perl6/doc
07:12 Geth ¦ doc/master: review: https://github.com/perl6/doc/compare/9f0b1bb793...37ec7f2ca8
07:41 abraxxa joined #perl6
07:41 lowbro joined #perl6
07:41 lowbro joined #perl6
07:46 wictory[m] Hi! How often does people here run "zef nuke"?
07:47 domidumont joined #perl6
07:52 moritz like, twice a year?
07:52 domidumont joined #perl6
07:54 Wanderer68 joined #perl6
08:00 cdg joined #perl6
08:05 rindolf joined #perl6
08:09 ckraniak joined #perl6
08:09 domidumont joined #perl6
08:16 wictory[m] I get sometimes that "zef install --force-install ." does not have an effect. The annoying thing is that it sometimes takes some to figure that out. I often figure it out by putting a "foobar".say; statement somewhere in a library and expect an output from somewhere, if theres no output I probably need to nuke everything.
08:16 wictory[m] Is this the experience of other too? :)
08:16 wictory[m] *others
08:41 lowbro joined #perl6
08:41 lowbro joined #perl6
08:49 rindolf joined #perl6
08:51 ckraniak joined #perl6
08:57 rindolf joined #perl6
09:05 domidumont joined #perl6
09:06 zakharyas joined #perl6
09:07 dakkar joined #perl6
09:10 cdg joined #perl6
09:11 cdg_ joined #perl6
09:18 Geth ¦ doc/master: 4 commits pushed by (Luca Ferrari)++
09:18 Geth ¦ doc/master: 2b7d49748d | Explain that Pair with Scalar values holds the container.
09:18 Geth ¦ doc/master: bb5256c52f | Provide insight about the method Pair.freeze when dealing with Scalar.
09:18 Geth ¦ doc/master: 22da69d258 | Explain that the Pair holds a Scalar always.
09:18 Geth ¦ doc/master: 23a255d75a | Rephrase the Pair.freeze introduction.
09:18 Geth ¦ doc/master: review: https://github.com/perl6/doc/compare/37ec7f2ca8...23a255d75a
09:23 stmuk joined #perl6
09:31 Geth ¦ doc: a236911ff5 | (Luca Ferrari)++ | doc/Language/traps.pod6
09:31 Geth ¦ doc: Add Pair/Scalar trap and link to the Pair documentation.
09:31 Geth ¦ doc:
09:31 Geth ¦ doc: As per discussion on issue #1728, after the commits about Pair.freeze
09:31 Geth ¦ doc: it should be better to have this behavior listed also as 'trap'.
09:31 Geth ¦ doc:
09:31 Geth ¦ doc: Close #1728
09:31 synopsebot Link: https://doc.perl6.org/language/traps
09:31 Geth ¦ doc: review: https://github.com/perl6/doc/commit/a236911ff5
09:33 domidumont joined #perl6
10:31 astj joined #perl6
10:35 a3r0 joined #perl6
10:43 wamba joined #perl6
10:44 astj joined #perl6
10:44 llfourn joined #perl6
11:08 jkramer m: class Foo { has Str @.bar where *.elems == 3 }; Foo.new(bar => <one two three>).note
11:08 camelia rakudo-moar 992b80557: OUTPUT: «Type check failed in assignment to @!bar; expected <anon> but got Str ("one")␤  in submethod BUILDALL at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
11:08 jkramer Why does this not work?
11:08 jkramer The where thingy seems to add another typecheck that for some reason fails
11:11 masak m: class Foo { has @.bar where *.elems == 3 }; say Foo.new(bar => <one two three>)
11:11 camelia rakudo-moar 992b80557: OUTPUT: «Type check failed in assignment to @!bar; expected <anon> but got Str ("one")␤  in submethod BUILDALL at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
11:11 masak m: class Foo { has @.bar where *.chars == 3 }; say Foo.new(bar => <one two three>)
11:11 camelia rakudo-moar 992b80557: OUTPUT: «Type check failed in assignment to @!bar; expected <anon> but got Str ("three")␤  in submethod BUILDALL at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
11:12 masak m: class Foo { has @.bar where *.chars == 3 }; say Foo.new(bar => <one two blb>)
11:12 camelia rakudo-moar 992b80557: OUTPUT: «Foo.new(bar => Array[<anon>].new("one", "two", "blb"))␤»
11:12 masak seems the `where` is typechecking each element of the array
11:12 jkramer Ooooh
11:12 masak which I'm pretty sure is not the way it's s'posed to work
11:12 jkramer Hmm, that doesn't seem right
11:12 masak at least it feels surprising to me
11:12 jkramer Yup
11:12 masak feel free to submit a rakudobug
11:15 jkramer I will, thanks
11:46 committable6 joined #perl6
11:48 buggable New CPAN upload: Sub-Util-0.0.1.tar.gz by ELIZABETH https://cpan.metacpan.org/authors/id/E/EL/ELIZABETH/Perl6/Sub-Util-0.0.1.tar.gz
11:55 raschipi joined #perl6
12:18 Geth ¦ doc: 873dc76745 | (Luca Ferrari)++ | doc/Language/terms.pod6
12:18 Geth ¦ doc: Improve constant lexical example.
12:18 Geth ¦ doc:
12:18 Geth ¦ doc: Provide an example of how a 'my constant' is visible only within
12:18 Geth ¦ doc: a block and can therefore override the 'our' scoped constant.
12:18 synopsebot Link: https://doc.perl6.org/language/terms
12:18 Geth ¦ doc:
12:18 Geth ¦ doc: Add also an insight about the compilation error when referencing an
12:18 Geth ¦ doc: out of scope 'my constant'.
12:18 Geth ¦ doc: review: https://github.com/perl6/doc/commit/873dc76745
12:26 Kaiepi joined #perl6
12:50 Geth ¦ doc: c0184ade3c | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/pod.pod6
12:50 Geth ¦ doc: add note about bigint capability
12:50 Geth ¦ doc: review: https://github.com/perl6/doc/commit/c0184ade3c
12:50 synopsebot Link: https://doc.perl6.org/language/pod
12:51 jkramer Is there a shortcut for creating a copy of an object with only one/some values changed, instead of copying all unchanged values manually? I.e. Foo.new(:a(self.a), :b(self.b), ... :changed-attribute(123))
12:51 jkramer I guess I can somehow turn the object into a hash and use that as argument?
12:52 raschipi You need to implement a copy constructor manually
12:55 jkramer Found it
12:56 jkramer Mu has .clone which allows to override public attributes
12:56 jkramer So self.clone(:changed-attr(123)) works
12:56 raschipi Just remember that is a very shallow copy.
12:56 jkramer Yup, but that's ok for my purposes right now
13:00 alexk6 joined #perl6
13:02 alexk6 m: subset Int8 of Int   where -0x80 <= * <= 0x7F; my $t = (Int8); given $t { when (Int8) { say "ok" }};
13:02 camelia rakudo-moar 992b80557: OUTPUT: «ok␤»
13:02 alexk6 subset Int8 of Int   where -0x80 <= * <= 0x7F; my $t = (Int); given $t { when (Int8) { say "ok" }};
13:02 alexk6 m: subset Int8 of Int   where -0x80 <= * <= 0x7F; my $t = (Int); given $t { when (Int8) { say "ok" }};
13:02 camelia rakudo-moar 992b80557: OUTPUT: «Invocant of method 'Bridge' must be an object instance of type 'Int', not a type object of type 'Int'.  Did you forget a '.new'?␤  in block <unit> at <tmp> line 1␤␤»
13:03 domidumont joined #perl6
13:06 domidumont joined #perl6
13:07 alexk6 does anyone know why this gives me an error?
13:10 alexk6 m: subset Int8 of Int where -0x80 <= * <= 0x7F; my $t = (Int); if $t eqv (Int8) { say "ok" }; # this works
13:10 camelia rakudo-moar 992b80557: ( no output )
13:10 iviv joined #perl6
13:11 raschipi The message is less than awesome but Int doesn't fit the Int8 pidgeonhole.
13:11 raschipi Like it says on the tin, it's a subset
13:12 Spot__ joined #perl6
13:13 raschipi Or you just wanted it to fail quietly like the other case?
13:16 alexk6 raschipi: yes, i just wanted to do something depending on the type
13:16 raschipi m: subset Int8 of Int   where -0x80 <= * <= 0x7F; my $t = Int.new; given $t { when (Int8) { say "ok" }};
13:16 camelia rakudo-moar 992b80557: OUTPUT: «ok␤»
13:16 timotimo checking eqv doesn't check things like constraints at all
13:17 timotimo that's why it doesn't explode to try the Int against that
13:18 alexk6 but why does it work then with Int8?
13:18 alexk6 m: subset Int8 of Int   where -0x80 <= * <= 0x7F; my $t = (Int8); given $t { when (Int8) { say "ok" }};
13:18 camelia rakudo-moar 992b80557: OUTPUT: «ok␤»
13:19 timotimo now you're checking type inheritance
13:20 timotimo and Int8 trivially derives from Int8
13:27 domidumont1 joined #perl6
13:28 zakharyas joined #perl6
13:29 raschipi timotimo: where would be the best place to catch that exception?
13:33 timotimo m: subset Int8 of Int   where try -0x80 <= * <= 0x7F; my $t = (Int); given $t { when (Int8) { say "ok" }};
13:33 camelia rakudo-moar 992b80557: OUTPUT: «Invocant of method 'Bridge' must be an object instance of type 'Int', not a type object of type 'Int'.  Did you forget a '.new'?␤  in block <unit> at <tmp> line 1␤␤»
13:33 timotimo m: subset Int8 of Int   where { try -0x80 <= $_ <= 0x7F }; my $t = (Int); given $t { when (Int8) { say "ok" }};
13:33 camelia rakudo-moar 992b80557: ( no output )
13:33 timotimo i'd do it like that ^
13:33 timotimo alternatively
13:33 timotimo m: subset Int8 of Int:D   where -0x80 <= * <= 0x7F; my $t = (Int); given $t { when (Int8) { say "ok" }};
13:33 camelia rakudo-moar 992b80557: ( no output )
13:34 raschipi nice
13:43 alexk6 timotimo++
13:45 wamba joined #perl6
14:01 GregDonald joined #perl6
14:02 cdg joined #perl6
14:07 cdg joined #perl6
14:10 zakharyas joined #perl6
14:22 domidumont joined #perl6
14:26 zakharyas joined #perl6
14:44 zakharyas1 joined #perl6
14:46 zakharyas joined #perl6
14:47 squashable6 joined #perl6
14:51 zakharyas joined #perl6
14:51 astj joined #perl6
15:15 zakharyas joined #perl6
15:15 troys joined #perl6
15:20 jkramer Is there some neat hyper-operator syntax sugar for doing simple math operations? I'd like to do something like @numbers>>.-(33)
15:21 masak m: my @numbers = 100, 200, 300; say @numbers >>->> 33
15:21 camelia rakudo-moar d7b160c72: OUTPUT: «[67 167 267]␤»
15:21 masak m: my @numbers = 100, 200, 300; say @numbers »-» 33
15:21 camelia rakudo-moar d7b160c72: OUTPUT: «[67 167 267]␤»
15:22 jkramer Sweet, thanks!
15:22 timotimo m: my @numbers = 100, 200, 300; say -<<@numbers
15:22 camelia rakudo-moar d7b160c72: OUTPUT: «[-100 -200 -300]␤»
15:36 comborico1611 joined #perl6
16:03 zakharyas joined #perl6
16:04 markong joined #perl6
16:05 stmuk_ joined #perl6
16:06 natrys joined #perl6
16:14 Zoffix joined #perl6
16:19 Zoffix m: subset Int8 of Int where { try -0x80 <= $_ <= 0x7F }; for ^50_000 { Int ~~ Int8; 42 ~~ Int8 }; say now - INIT now
16:19 camelia rakudo-moar 5dd9ed100: OUTPUT: «1.713140481␤»
16:19 leont joined #perl6
16:19 Zoffix m: subset Int8 of Int where !.DEFINITE || -0x80 <= $_ <= 0x7F; for ^50_000 { Int ~~ Int8; 42 ~~ Int8 }; say now - INIT now
16:19 camelia rakudo-moar 5dd9ed100: OUTPUT: «0.37768372␤»
16:20 Zoffix m: subset Int8 of Int where .WHAT =:= Int || -0x80 <= $_ <= 0x7F; for ^50_000 { Int ~~ Int8; 42 ~~ Int8 }; say now - INIT now
16:20 camelia rakudo-moar 5dd9ed100: OUTPUT: «0.3785938␤»
16:22 leont What is the install logic around bin/? In particular can I put .pod's in there or not?
16:24 Zoffix m: use nqp; subset Int8 of Int where nqp::isconcrete($_) && nqp::isfalse(nqp::isbig_I(nqp::decont($_))) && nqp::isge_i(-0x80, $_) && nqp::isge_i($_, 0x7F); for ^50_000 { Int ~~ Int8; 42 ~~ Int8 }; say now - INIT now
16:24 camelia rakudo-moar 5dd9ed100: OUTPUT: «0.5124472␤»
16:24 Zoffix Kinda surprised $_ is conted there :\
16:26 raschipi leont: /bin is just for what a user will call in the command line as a command.
16:27 raschipi But you'd use /usr/bin unless it's a very basic system command.
16:27 ilmari raschipi: I presume leont meant bin/ inside a perl6 distribution repo/tarball, not /bin on the filesystem
16:27 raschipi Ops
16:28 * raschipi goes get more coffee.
16:28 Zoffix leont: not aware of any official docs on the topic, but looks like zef does install everything it finds: https://github.com/ugexe/zef/blob/master/lib/Zef/Distribution/Local.pm6#L73-L90
16:29 leont Ah, good to know
16:29 * leont received a PR that adds a bin/README.pod, and I was wondering if that would blow up
16:29 hythm joined #perl6
16:36 Zoffix left #perl6
16:37 SHODAN joined #perl6
16:38 roguelazer joined #perl6
16:38 R0b0t1 joined #perl6
16:38 notbenh_ joined #perl6
16:38 eater joined #perl6
16:39 bloatable6 joined #perl6
16:39 nativecallable6 joined #perl6
16:39 unicodable6 joined #perl6
16:39 greppable6 joined #perl6
16:39 squashable6 joined #perl6
16:53 khw joined #perl6
17:01 raschipi joined #perl6
17:07 astj joined #perl6
17:11 stmuk joined #perl6
17:23 coverable6 joined #perl6
17:23 benchable6 joined #perl6
17:39 bisectable6 joined #perl6
17:46 eliasr joined #perl6
18:03 titsuki m: use Perl:ver<6.*>;
18:03 camelia rakudo-moar 5dd9ed100: OUTPUT: «===SORRY!===␤Perl is a builtin type, not an external module␤»
18:03 titsuki is this a bug?
18:03 [Coke] no, Perl is a builtin type.
18:03 [Coke] if you want to specify a version, that's not the syntax, I don't think.
18:04 [Coke] m: say $*PERL.^name;
18:04 camelia rakudo-moar 5dd9ed100: OUTPUT: «Perl␤»
18:04 titsuki This test says the above one works: https://github.com/perl6/roast/blob/master/S11-modules/use-perl-6.t
18:04 [Coke] that test isn't run.
18:05 [Coke] https://github.com/rakudo/rakudo/blob/master/t/spectest.data
18:05 [Coke] it's from 2009 and probably speculative and can probably be removed.
18:05 Ven`` joined #perl6
18:06 titsuki Coke: I see. thanks!
18:06 [Coke] m: use 5;
18:06 camelia rakudo-moar 5dd9ed100: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    use used at line 1␤␤»
18:06 [Coke] m: use v5;
18:06 camelia rakudo-moar 5dd9ed100: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤No compiler available for Perl v5␤at <tmp>:1␤------> 3use v57⏏5;␤»
18:07 [Coke] m: use v6;
18:07 camelia rakudo-moar 5dd9ed100: ( no output )
18:23 Kaiepi joined #perl6
18:30 setty1 joined #perl6
18:34 mst joined #perl6
18:35 Cabanossi joined #perl6
18:37 yoleaux joined #perl6
18:37 coverable6 joined #perl6
18:38 quotable6 joined #perl6
18:39 protium joined #perl6
18:40 releasable6 joined #perl6
18:40 greppable6 joined #perl6
18:40 reportable6 joined #perl6
18:41 statisfiable6 joined #perl6
18:41 nativecallable6 joined #perl6
18:42 Geth ¦ marketing: 9f4c3dab32 | (Zoffix Znet)++ | 2 files
18:42 Geth ¦ marketing: Apply changes from Mark Keating
18:42 Geth ¦ marketing:
18:42 Geth ¦ marketing: - For FOSDEM 2018 prints
18:42 Geth ¦ marketing: - Bleed fixes and print marks; no content changes
18:42 Geth ¦ marketing: review: https://github.com/perl6/marketing/commit/9f4c3dab32
18:49 solarbunny joined #perl6
18:50 comborico1611 joined #perl6
19:38 cdg joined #perl6
19:41 Herby_ joined #perl6
19:41 Herby_ o/
19:41 yoleaux 01:23Z <timotimo> Herby_: sorry i disappeared for RSI break and didn't come back for a whole while
19:43 Voldenet m: my uint8 $x = 2; my uint8 $y = 4; $y = $y xor $x; say $y
19:43 camelia rakudo-moar 5dd9ed100: OUTPUT: «4␤»
19:44 Voldenet am I doing something wrong, or is 2 xor 4 really 4?
19:45 AlexDaniel Voldenet: it's logical xor
19:45 AlexDaniel although… wait what…
19:45 Voldenet m: my uint8 $x = 2; my uint8 $y = 4; $y = $y +^ $x; say $y
19:45 camelia rakudo-moar 5dd9ed100: OUTPUT: «6␤»
19:45 Voldenet Ah
19:45 Voldenet magic operators
19:45 AlexDaniel yeah that's what you were looking for, but what's 4?
19:46 Voldenet 4 is a num... wait
19:46 AlexDaniel aaaaaaaaaaaah
19:46 Voldenet >Returns the operand that evaluates to True in boolean context
19:46 AlexDaniel m: my uint8 $x = 4; my uint8 $y = 2; $y = $y xor $x; say $y
19:46 camelia rakudo-moar 5dd9ed100: OUTPUT: «2␤»
19:46 AlexDaniel yeah
19:46 AlexDaniel m: my uint8 $x = 4; my uint8 $y = 2; $y = ($y xor $x); say $y
19:46 camelia rakudo-moar 5dd9ed100: OUTPUT: «Cannot unbox a type object (Nil) to an unsigned int.␤  in block <unit> at <tmp> line 1␤␤»
19:47 xi- joined #perl6
19:48 Zoffix joined #perl6
19:48 Zoffix ZOFFLOP: hung stresstest (looks like hung on t/spec/S17-promise/nonblocking-await.t)
19:48 AlexDaniel Voldenet: R#1389
19:48 synopsebot R#1389 [open]: https://github.com/rakudo/rakudo/issues/1389 [LTA] No “Useless use” warning for xor
19:49 Voldenet Oh, thanks.
20:01 Zoffix oops, wc
20:02 El_Che releasable6: status
20:02 releasable6 El_Che, Next release in 7 days and ≈22 hours. No blockers. Unknown changelog format
20:11 Zoffix left #perl6
20:23 pilne joined #perl6
20:34 xi- joined #perl6
20:42 breinbaas joined #perl6
20:50 AlexDaniel m: my uint8 $x = 2; my uint8 $y = 4; $y = $y xor $x; say $y
20:50 camelia rakudo-moar 65d4876d8: OUTPUT: «4␤»
20:50 AlexDaniel e: my uint8 $x = 2; my uint8 $y = 4; $y = $y xor $x; say $y
20:50 |oLa| joined #perl6
20:50 evalable6 joined #perl6
20:50 AlexDaniel e: my uint8 $x = 2; my uint8 $y = 4; $y = $y xor $x; say $y
20:50 evalable6 AlexDaniel, rakudo-moar 79600d697: OUTPUT: «WARNINGS for /tmp/9jgKModjC_:␤4␤Useless use of $x in sink context (line 1)␤»
20:51 AlexDaniel Voldenet: ↑ there (same snippet)
20:51 AlexDaniel Zoffix++
21:01 moritz m: say 2 xor 4
21:01 camelia rakudo-moar 79600d697: OUTPUT: «WARNINGS for <tmp>:␤2␤Useless use of constant integer 4 in sink context (line 1)␤»
21:01 TEttinger ?
21:01 moritz is it because it can constant-fold the arguments, and know that the second operand won't be used?
21:01 moritz m: say 0 xor 4
21:01 camelia rakudo-moar 79600d697: OUTPUT: «WARNINGS for <tmp>:␤0␤Useless use of constant integer 4 in sink context (line 1)␤»
21:02 moritz m: say 4 xor 0
21:02 camelia rakudo-moar 79600d697: OUTPUT: «WARNINGS for <tmp>:␤4␤Useless use of constant integer 0 in sink context (line 1)␤»
21:02 TEttinger isn't 2 xor 4 6?
21:02 jnthn moritz: Precedence, I think
21:02 AlexDaniel TEttinger: it's logical xor, you're talking about +^
21:02 jnthn It compiles as (say 4) xor 0
21:02 lizmat also, xor is logical
21:02 moritz m: say (2 xor 4)
21:02 camelia rakudo-moar 79600d697: OUTPUT: «Nil␤»
21:02 moritz m: say (0 xor 4)
21:02 camelia rakudo-moar 79600d697: OUTPUT: «4␤»
21:03 moritz jnthn: right
21:03 TEttinger of course it's +^, that totally makes sense... uh...
21:04 TEttinger is bitwise xor the same as addition in galois field 2?
21:04 TEttinger or carryless addition?
21:05 comborico joined #perl6
21:05 AlexDaniel sometimes someone just says something… and I realize that I'm so stupid :D
21:06 moritz TEttinger: carryless addition, yes
21:06 TEttinger gotcha
21:06 moritz AlexDaniel: nah, it's just jargon
21:06 TEttinger I was wondering why I see circled plus as the sign for it
21:06 TEttinger AlexDaniel: I don't understand galois field stuff either, I'm going to need to at some point
21:07 moritz that's just with modulus, right?
21:07 TEttinger I think so, per bit maybe?
21:07 AlexDaniel what's with circled plus? Wasn't it just a circled disjunction, where a circle stands for… whatever it does
21:08 AlexDaniel I mean, there's ⊻ also, I never thought there's any logic behind the symbols :)
21:08 TEttinger like in C, operations on uint8_t will operate in GF(256)
21:08 TEttinger I think
21:08 TEttinger but that's also called "do stuff mod 256"
21:08 TEttinger so I'm not sure where mr./ms./dr. galois comes in
21:09 cdg joined #perl6
21:09 geekosaur worked out how to describe such subsets mathematically, probably
21:10 TEttinger AlexDaniel: there's confusingly different usage of various terms for bitwise XOR in mathy CS papers
21:13 AlexDaniel OK the original question isn't too bad. Wikipedia++
21:14 TEttinger I saw a circled plus and circled x used here http://www.pcg-random.org/pdf/hmc-cs-2014-0905.pdf
21:14 TEttinger page 30 or 32
21:21 AlexDaniel TEttinger: as for +^ making sense, it's a regular c-style ^ with + in front of it to indicate that's it's a numeric thingie. ^ itself is used for Junctions, with a similar logic
21:21 AlexDaniel TEttinger: same goes for all other ops
21:22 AlexDaniel like +| and +&
21:22 AlexDaniel maybe this should be explained in more detail in our docs?
21:23 AlexDaniel i.e. the difference between `^`, `+^`, `xor`
21:23 AndChat|688961 joined #perl6
21:25 * masak .oO( "strangely consistent" operators )
21:26 TEttinger it makes more sense than JS needing ~~ before using any bitwise ops on numbers
21:27 TEttinger I've also seen ^^^ and ||| used to refer to the bitwise versions in other langs
21:29 comborico joined #perl6
21:34 dylanwh obviouls you should need one symbol per byte. ^^^^ for 32bit integers and ^^^^^^^^ for 64bit.
21:36 Voldenet That's pretty cool, actually, but what if I needed a xor for nibbles?
21:36 geekosaur `
21:36 geekosaur :p
21:37 Voldenet ah, ´ and `
21:37 Voldenet perfectly sound
21:40 dylanwh and 16 <'s for a 64bit bit-shift
21:41 * dylanwh might actually make this as an esolang. XD
21:43 geekosaur language designed for an ancient bit-slice cpu?
21:46 dylanwh yes
21:58 rindolf joined #perl6
22:06 Knot0nline joined #perl6
22:12 mempko joined #perl6
22:22 TreyHarris joined #perl6
22:39 Manifest0 joined #perl6
22:40 cdg joined #perl6
23:03 tbrowder anyone have any ideas to help track down a malformed utf8 char in an otherwise ASCII file?
23:04 cdg joined #perl6
23:06 jnthn m: Buf.new(ord('a'), ord('a'), 0xc3, 0x28, ord('a')).decode('utf-8')
23:06 camelia rakudo-moar 421504bd4: OUTPUT: «Malformed UTF-8 at line 1 col 3␤  in block <unit> at <tmp> line 1␤␤»
23:06 jnthn So, slurp($file, :bin).decode('utf-8')
23:07 Knot0nline joined #perl6
23:17 comborico1611 joined #perl6
23:20 tbrowder jnthn: thanks!
23:23 cdg joined #perl6
23:28 kerframil joined #perl6
23:32 cdg joined #perl6
23:33 cdg joined #perl6
23:46 dct joined #perl6
23:47 tusooa AlexDaniel: I think it is because xor is looser than function call, just like and/or?
23:47 AlexDaniel yeah
23:50 espadrine_ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo