»ö« 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 Zoffix on 25 May 2018.
00:03 markoong left
benjikun2 I see 00:04
is there a correct way to exit a promise early 00:05
timotimo no, you need an extra promise for cancellation and use Promise.anyof to react to that
there's a module in the ecosystem for cancellable timers 00:06
Geth doc: 5cb3a4d688 | (Timo Paulssen)++ | doc/Type/Promise.pod6
fix await claiming it returns a list of promises
00:16
synopsebot Link: doc.perl6.org/type/Promise
timotimo seeya o/
benjikun2 cya 00:30
Is there no way to exit a block early
00:34 fake_space_whale joined
benjikun2 nevermind, dumb question 00:36
01:03 jameslenz joined 01:06 hami joined, Zoffix joined
Zoffix benjikun2: why dumb? IIRC there's no "nice" way 01:06
m: { when * {succeed}; say 42 }
camelia ( no output )
Zoffix That
That's the only thing I can think of
01:07 jameslenz left
benjikun2 hmm 01:13
01:13 benjikun2 is now known as benjikun
benjikun Does anyone know if DOM::Tiny is threadsafe? 01:13
Zoffix don't look like it 01:16
Depends what you mean by it really.
Like what? calling methods on the same object from multiple threads?
benjikun Zoffix: different objects from different threads lol
I wouldn't suspect it would break, but it does
Zoffix Breaks how? 01:17
What's the code?
01:21 Kaypie joined, Kaiepi left 01:23 subroot joined
benjikun Zoffix: my.mixtape.moe/trvcuy.png 01:23
probably isn't much help without the code, can I invite you to a private repo?
Zoffix I guess 01:24
benjikun bear with me, it's probably pretty messy 01:25
buggable New CPAN upload: Readline-0.1.3.tar.gz by JGOFF modules.perl6.org/dist/Readline:cpan:JGOFF
Zoffix Are there any docs on macros? 01:26
m: use experimental :macros; macro bloret { 'when * { proceed }' }; { bloret; say 42 }; say 'meows'
camelia ===SORRY!===
Too few positionals passed; expected 3 arguments but got 2
benjikun Zoffix: github.com/OhadRau/Kesef/invitations
Zoffix benjikun: how do I run it? 01:28
like what to put for company 01:29
benjikun Zoffix: a stock ticker; just put `amd` or whatnot
Zoffix k
benjikun sorry for my commit messages lol
Zoffix you clearly haven't seen the code in my github.com/zoffixznet/c-practice repo :P 01:31
benjikun lmao 01:32
xxxxxxxxxx
Zoffix (I'm just golfing the code right now) 01:40
benjikun Mkay 01:42
DrForr o/ 01:47
Zoffix Well, seems I got rid of the crash, but can't repro it with small code 01:48
benjikun strange
can you push it? 01:49
Zoffix It's in DOM::Tiny
benjikun Yeah, I thought so
but it only has that when I do concurrency stuff
01:49 subroot left
Zoffix benjikun: I think maybe PRE phaser is not thread safe. If I change this line: github.com/zostay/p6-DOM-Tiny/blob...SS.pm6#L10 to `@combine.elems !%% 2 or die;` (without the phaser), then I get no crashes 01:50
benjikun I think there may be some weird global variable in DOM::Tiny
Zoffix m: class Foo { submethod BUILD (:@stuff) { PRE { @stuff.elems %% 2 } } }; ^100000 .race.map: { Foo.new: :stuff(^100) }
camelia ( no output )
Zoffix But here it doesn't crash
benjikun weird :\
I wish some of the old perl6 modules that were abandoned by the owner would get transferred to the perl6community org 01:51
DrForr Huh. I'm just now noticing that modules.perl6.org returns multiple versions of the same module.
benjikun DrForr: yeah, I've noticed that with a couple of them 01:52
Zoffix DrForr: github.com/perl6/modules.perl6.org/issues/106
DrForr Readline and XML::XPath at least.
Zoffix DrForr: though one of the duplications for Readline is 'cause it's listed in p6c ecosystem as well (currently the site uses ecosystem as one of the differentiators; it probably should use "auth" or something) 01:53
benjikun: is it fine to publish one of the fetched HTML pages with a rakudo bug report? 01:54
benjikun Zoffix: mhm
Thanks for the help
did you change anything in app.p6?
DrForr Yeah, I was thinking that was the actual cause, though it picks up at least 2 versions from GitHub.
Zoffix benjikun: well, I just golfed it down to this: gist.github.com/zoffixznet/a38be8a...80a10cb5d3 and still get the crash when DOM::Tiny got that PRE phaser and no crash when the phaser is removed 01:55
DrForr Also, I see LibraryCheck out there on m.p6.org - Is there a LibraryLoad, or should I hack it from LibraryCheck? 01:56
benjikun I wonder if zostay will respond to the issue quickly 01:57
DrForr Hrr, LibraryCheck doesn't do at all what I thought it would. 02:01
(well, it does what it says on the tin, but not how I'd have hoped. Time to write...) 02:05
Zoffix benjikun: Filed R#2053 and github.com/zostay/p6-DOM-Tiny/issues/10 02:06
synopsebot R#2053 [open]: github.com/rakudo/rakudo/issues/2053 [ASYNC] PRE phaser potentially not thread-safe
benjikun I saw, ty 02:08
we'll use a forked fix for now
Zoffix: my.mixtape.moe/kczahe.png 02:12
feelsbadman
Zoffix heh 02:13
benjikun I see no reason why it did that :/
Zoffix Well, is libcurl thread safe? 02:14
Try Cro::HTTP::Client
eco: Cro::HTTP
buggable Zoffix, Cro::HTTP 'Asynchronous HTTP, both client and server side. Includes HTTP/2.0 support.': github.com/croservices/cro-http.git 2 other matching results: modules.perl6.org/s/Cro%3A%3AHTTP
Zoffix Docs are at cro.services/docs/intro/http-client
benjikun I thought libcurl would be safe, it's just bindings to libcurl 02:15
which should be fine to call as many as you want
Zoffix *shrug*
02:22 Zoffix left 02:28 BenGoldberg joined 02:35 kent\n joined 02:36 hami left 02:37 ufobat_ joined
zostay *shrug* I can make that change. Just a sec. 02:38
02:40 ufobat___ left 02:42 salasrod left, lizmat left
zostay the fix is on github, waiting for travis to pass before CPAN release, it will be v0.4.1 02:48
hmmm... looks like i have a bunch of travis failures in my p6 stuff :( 02:51
02:56 Zoffix joined
benjikun welcome back Zoffix 02:56
zostay got on and replaced the bit :) 02:57
Zoffix zostay: is it using a release to run the tests though or a HEAD commit?
zostay: I see at least one of your modules listed as a release-blocking regression for our latest rescallar merge: R#2047
synopsebot R#2047 [open]: github.com/rakudo/rakudo/issues/2047 [⚠ blocker ⚠] [WIP] Rescalar merge & other toaster-related stuff
zostay nah, i have weekly jobs that pull in rakudobrew so i can see if my modules are going to break before an upcoming release... i don't usually bother with trying to fix anything until they've failed tests 2 or 3 times in a row 02:58
i have that mod fixed in github, i just need to release
SmokeMachine m: class A { has UInt $.a; method a(|c) { self.^attributes.head.set_value: self, 13 }; method b() {$!a = 42}}; my $a = A.new; $a.a; $a.b # does `set_value` make the value immutable? how can I do it mutable? 03:03
camelia Cannot assign to an immutable value
in method b at <tmp> line 1
in block <unit> at <tmp> line 1
03:03 jameslenz joined 03:05 BenGoldberg left
SmokeMachine m: class A { has UInt $.a; method a(|c) { self.^attributes.head.set_value: self, 13 }; method b() {$!a = 42}}; my $a = A.new; $a.b 03:06
camelia ( no output )
SmokeMachine m: class A { has UInt $.a; method a(|c) { self.^attributes.head.set_value: self, 13 }; method b() {$!a = 42}}; my $a = A.new; $a.a
camelia ( no output )
SmokeMachine m: class A { has UInt $.a; method a(|c) { self.^attributes.head.set_value: self, 13 }; method b() {$!a = 42}}; my $a = A.new; $a.a; $a.b
camelia Cannot assign to an immutable value
in method b at <tmp> line 1
in block <unit> at <tmp> line 1
03:07 BenGoldberg joined, jameslenz left
zostay AWS-Session and DOM-Tiny releases should be noted by buggable (or whichever bot does that) shortly 03:08
Zoffix sweet
SmokeMachine any idea?
zostay I'll take a look at ArrayHash more carefully when I get a chance... randomizing the tests does not have to be a blocker for a bugfix there. 03:09
SmokeMachine is there any way to make it mutable? 03:13
buggable New CPAN upload: DOM-Tiny-0.4.1.tar.gz by HANENKAMP modules.perl6.org/dist/DOM::Tiny:cpan:HANENKAMP 03:15
New CPAN upload: AWS-Session-0.4.tar.gz by HANENKAMP modules.perl6.org/dist/AWS::Session...:HANENKAMP
SmokeMachine just a container... 03:19
m: class A { has UInt $.a; method a(|c) { self.^attributes.head.set_value: self, $ = 13 }; method b() {$!a = 42}}; my $a = A.new; $a.a; $a.b
camelia ( no output )
AlexDaniel u: ✗☒
unicodable6 AlexDaniel, U+2717 BALLOT X [So] (✗)
AlexDaniel, U+2612 BALLOT BOX WITH X [So] (☒)
AlexDaniel propdump: ✗☒
unicodable6 AlexDaniel, gist.github.com/4509827126554d5a07...1ead30ecfb 03:20
benjikun Zoffix: do you have discord lol
I am having issues helping someone with perl6
zostay SmokeMachine: you need to put the value into a Scalar first 03:21
m: class A { has UInt $.a; method a(|c) { self.^attributes.head.set_value: self, $ = 13 }; method b() {$!a = 42}}; my $a = A.new; $a.a; $a.b
camelia ( no output )
zostay otherwise, you're basically binding to the constant
s/basically// 03:22
SmokeMachine zostay: thanks 03:23
AlexDaniel samcv: so I can type ✗ directly because it's on my keyboard layout, but if I do that in Firefox it changes it to ☒
samcv: any thoughts on why this would happen?
samcv: it /feels/ like normalization, but it's not 03:24
zostay: thanks! ♥
zostay no, thank you! :)
Zoffix benjikun: no, I don't use discord 03:35
benjikun Zoffix: How would I make a grammar for parsing something like `q2'94` 03:36
where it means quarter 2 of year 94
or `q2'2004` even
where the number after the `q` is a digit 1-4 03:37
Zoffix why does it need to be a grammar?
benjikun so I can parse input given
Zoffix m: say "quarter {.head} of year {.tail}" with "q2'2004".comb: /\d+/
camelia The iterator of this Seq is already in use/consumed by another Seq
(you might solve this by adding .cache on usages of the Seq, or
by assigning the Seq into an array)
in block at <tmp> line 1
in block <unit> at <tmp> line 1
Zoffix m: say "quarter {.head} of year {.tail}" with "q2'2004".comb(/\d+/).List
camelia quarter 2 of year 2004
Zoffix m: say grammar { token TOP { <quarter> \' <year> }; token quarter { 'q' <( \d+ }; token year { \d**2..4 } }.parse: "q2'2004" 03:39
camelia 「q2'2004」
quarter => 「2」
year => 「2004」
Zoffix `<(` is the match marker, it doesn't stick the stuff before it into the match (there's also `)>` to do the same for the other side)
m: say "quarter {.[0]} of year {.[1]}" with "q2'2004".comb: /\d+/ # AT-POS caches, actually, so this is shorter :) 03:40
camelia quarter 2 of year 2004
benjikun hm
Zoffix m: say "quarter {.substr: 1, 1} of year {.substr: 3}" with "q2'2004" 03:41
camelia quarter 2 of year 2004
Zoffix ¯\_(ツ)_/¯
benjikun I mean, I also want to check if it is structured correctly
Zoffix that grammar version above should work for that 03:42
m: say "quarter $<quarter> of year $<year>" with "q2'2004" ~~ /^ q $<quarter>=[1..4] \' $<year>=\d**2.4 $/ 03:43
camelia ( no output )
Zoffix m: say "quarter $<quarter> of year $<year>" with "q2'2004" ~~ /^ q $<quarter>=[1..4] \' $<year>=\d**2..4 $/
camelia ( no output )
Zoffix m: say "quarter $<quarter> of year $<year>" with "q2'2004" ~~ /^ q $<quarter>=<[1..4]> \' $<year>=\d**2..4 $/
camelia quarter 2 of year 2004
Zoffix m: say "quarter $<quarter> of year $<year>" with "q2'2004" ~~ /^ q $<quarter>=<[1..4]> \' $<year>=[\d**2 [\d**2]?] $/ 03:44
camelia quarter 2 of year 2004
Zoffix & 03:45
03:45 Zoffix left
benjikun oof 03:45
thank you zoffix, even if you aren't here :(
04:04 fake_space_whale left 04:21 Ven` joined 04:25 raynold joined 04:26 Ven` left 04:44 eliasr left, xtreak joined 04:50 curan joined 04:54 benjikun2 joined, benjikun left 05:03 jameslenz joined 05:08 jameslenz left 05:11 Sgeo joined 05:13 wamba joined 05:18 benjikun2 left 05:20 sauvin joined 05:24 ufobat_ left 05:45 xtreak left
masak re-reads some backlog from 2010 about how we un-spec'd quarters in Temporal 05:48
05:49 robertle left
masak I had forgotten the details, but my stance was that (a) it was weird to un-spec it just because someone felt it was a fuzzy notion and without discussion, (b) it's not a fuzzy notion since there are three months to a quarter, (c) I didn't care to die on a hill of quarters, and it's easy to re-implement if you really need it 05:51
here's how easy it is to re-implement:
m: say "It is currently Q{$_}" given floor((Date.today.month - 1) / 3 + 1)
camelia It is currently Q3
05:53 xtreak joined 05:54 salasrod joined
masak or, separating the implementation and the use a bit: 05:59
m: my &quarter = my method (Dateish:) { floor((self.month - 1) /3 + 1) }; say "It is currently Q{Date.today.&quarter}" 06:00
06:00 salasrod left
camelia It is currently Q3 06:00
06:10 aborazmeh joined, aborazmeh left, aborazmeh joined 06:12 kerframil left 06:18 BenGoldberg left 06:30 troys left 06:35 xtreak left 06:38 konsolebox left 06:41 konsolebox joined 06:43 psychoslave joined 06:52 Ven` joined 07:03 jameslenz joined 07:08 jameslenz left 07:10 zakharyas joined 07:21 aborazmeh left 07:25 xtreak joined 07:38 domidumont joined 07:41 rindolf joined 07:43 domidumont left 07:45 domidumont joined, labster left 07:46 wamba left
samcv AlexDaniel: not sure. ✗ doesn't change in FF if i paste it at least 07:57
AlexDaniel samcv: yeah, only when I type it directly… 07:58
El_Che AlexDaniel: what os?
AlexDaniel linux, debian 07:59
but I'm pretty confident it's a thing in firefox
07:59 dakkar joined
El_Che how do you type ✗ ? 07:59
(so I can try)
(running Ubuntu, should be similar)
AlexDaniel preparing something for you 08:00
08:02 rindolf left 08:04 robertle joined
AlexDaniel El_Che: can you try this? gist.github.com/AlexDaniel/3b59e10...d553b32ad3 08:05
El_Che: then press “7” key on your keyboard 08:06
08:07 dakkar left
AlexDaniel El_Che: and Shift+7 to reproduce the issue 08:07
hm, actually… now that I look at it 08:08
it's called “ballotcross”??
so maybe firefox is right??
u: ✗☒
unicodable6 AlexDaniel, U+2717 BALLOT X [So] (✗)
AlexDaniel, U+2612 BALLOT BOX WITH X [So] (☒)
AlexDaniel yes!! 08:09
I just changed “ballotcross” to U2717 and it produces ✗ everywhere
how in the world different software disagrees on what “ballotcross” is… 08:10
08:11 rindolf joined 08:17 lizmat joined 08:19 dakkar joined 08:30 xtreak left 08:34 scimon joined 08:39 spycrab0 joined 08:40 HaraldJoerg joined
Geth doc: ed4f52019f | (Luca Ferrari)++ | doc/Type/Signature.pod6
Fix Positional vs Named Arguments title.

Add arguments to be coherent with the search keys (X<>). Also change the word 'parameter' to 'argument' in the paragraph accordingly.
08:48
synopsebot Link: doc.perl6.org/type/Signature
doc: 6064ab68aa | (Luca Ferrari)++ | doc/Type/Signature.pod6
Promote argument aliases as a separate heading.

Close #2168
08:57 xtreak joined 08:58 wamba joined 09:04 jameslenz joined 09:05 aborazmeh joined, aborazmeh left, aborazmeh joined
El_Che AlexDaniel: good catch 09:06
AlexDaniel: sound like a typical utf8 implementation trouble to me 09:07
AlexDaniel El_Che: why?
both are non-ascii
it's just that different software seems to interpret “ballotcross” differently
but I thought that it's the job of xkb, no?
09:08 jameslenz left
El_Che AlexDaniel: I mean that slight differences are common 09:10
09:16 pmurias joined 09:27 zakharyas left
Ven` m: sub mod { $OUTER::a = 1; }; my $a; {$a = 5; say($a, mod, $a); } 09:28
camelia 111
Ven` is that correct? I can't remember how side-effects inside arglists are supposed to work
09:31 kerframil joined
jnthn Yes. You're passing a Scalar container holding a value when you pass $a 09:37
And it's decontainerized callee side. That's how `is rw` works at the same time as late-bound calls.
Life would be much easier if things *didn't* work that way when it comes to natives, but... :) 09:38
09:39 ChoHag_ left
Ven` jnthn: ah, alright. I was trying to test your `du-chains-and-opts` commits to see if the optimization would be unable to see into the sub modifying the variable, but it seems like it's not an issue at all :). 09:41
jnthn Or at least, *my life* would :P
09:41 domidumont left
Ven`
.oO( Torture the implementors for the sake of the IRC crowd )
09:41
09:43 aborazmeh left 09:44 ExtraCrispy joined
masak .oO( call-by-scalar-container ) 09:46
09:47 aborazmeh joined, aborazmeh left, aborazmeh joined
pmurias Ven`: people are streaming development of game nowadays, so maybe entertaining the IRC crowd/(twich crowd) is the way to go ;) 09:48
Ven` pmurias: the twitch chat protocol is still close enough to IRC :P.
it's buffers all the way down 09:49
masak sounds like Emacs
Geth doc: 72ca9d3144 | 陈梓立++ | 7 files
whitespace, also rename .pm to .pm6
09:56
10:06 psychoslave left
tyil[m] pmurias: I've considered to do live coding on Twitch in Perl 6 10:11
but idk how to entertain a crowd :(
Ulti tyil[m]: I'd watch it 10:13
tyil[m] that's what you say now ;)
Ulti someone on #bioinformatics occasionally does some protein structure work I tune into its kind of fun since he can ask a question to the air and get an answer from the audience 10:14
the audience is usually just me
but still
the general idea I think is cool
and lots of people might want to see the day in a life of a programmer
Ven` tyil[m]: I got some 20 viewers last time I streamed some Perl 6 on twitch
admittedly that was my highest :P
tyil[m] which channel? 10:15
or id
or whatever they call it on twitch
Ven` as vendethiel
Ulti you should work on something together and give us both perspectives side by side >;3
tyil[m] joined #vendethiel
also, I wouldn't mind trying something out like that sometime 10:16
Ulti Im expecting Hackers level entertainment here
tyil[m] would have to plan it in advance, though
I haven't seen Hackers
Ulti I have a playlist that can help open.spotify.com/user/ultimatt/pla...s5KPVd3tSw
tyil[m] I also don't consider myself that great a programmer
Ulti tyil[m] !!
tyil[m] compared to most Perl devs, especially 10:17
Ulti Hackers only gets better with time and the further removed you are from 90s culture
tyil[m] Ven`: you'll have a permanent "viewer" in your chat now :>
Ulti tyil[m]: I think that would be a better stream though 10:18
Ven` hahahaha
Geth doc: 0c954590af | (JJ Merelo)++ | 2 files
Clarifies why you can't know the type of a native.

Closes #1568
Also some reflow
Ven` I rarely stream to be honest, unless a friend asks me to do some livecoding
Ulti if you were moving insanely fast in vim barely looking at the text and just knew all the methods off the top of your head people wouldn't be able to keep up or learn much
tyil[m] I use CommaIDE currently 10:19
but I get your point
AlexDaniel .tell jmerelo colabti.org/irclogger/irclogger_log...07-12#l324
yoleaux AlexDaniel: I'll pass your message to jmerelo.
AlexDaniel .tell jmerelo speaking of streaming, have you ever seen a Ph.D defense streamed on Twitch?
10:19 markoong joined
yoleaux AlexDaniel: I'll pass your message to jmerelo. 10:19
AlexDaniel .tell jmerelo okay, I googled it. It's a thing! 10:23
yoleaux AlexDaniel: I'll pass your message to jmerelo.
10:35 stmuk_ joined 10:36 stmuk left 10:42 aborazmeh left 10:47 epony left 10:48 raynold left, epony joined
Ulti tyil[m]: thats even better since not everyone can see that yet 10:59
pmurias running a precompiled t/nqp/001-literals.nqp takes 0.03s - 0.01s on the SubstrateVM :) 11:01
compiling it is still slow as snails because we still cross-compile on the old JVM backend:/ 11:02
11:04 jameslenz joined 11:08 jameslenz left 11:11 Ven` left
tyil[m] Ulti: you mean CommaIDE, or my horrible code? :p 11:12
Ulti hah both 11:20
Im using CommaIDE too its definitely nice to have since I've gotten used to PyCharm in the last year 11:21
which reminds me there is a syntax highlight bug I've not reported 11:22
tyil I'm not convinced yet, coming from vim, but I do see a good reason to be mindful of CommaIDE 11:31
especially when introducing the language to new users, most will want a full IDE that is geared towards Perl 6 11:32
what bothers me most rn is that it will convert my glorious tabs into heathen spaces when I shift a line or block an indent, and that texas ops dont get auto-converted to unicode ops
Ulti you can change all that though... 11:35
also good re the tabs thing :P
b2gills I like the way Komodo handles leading spaces. It looks at what is already in the the file to determine the amount and type of indenting. 11:36
tyil Ulti: there's a feature in Comma that auto-converst texas to unicode ops? 11:37
b2gills: that's what Atom does too, but it's not always correct 11:38
vim has it's modeline which works p well
Ulti tyil Im sure there will be a ligatures addon for jetbrains IDEs 11:39
you can always set text replacements
tyil will that actually work well in practice?
and how much effort is it to set up
Ulti sure
tyil I want unicode ops >:(
Ulti not much, all the jetbrains IDEs have the same base so you can use all the addons its not a Comma specific thing 11:40
tyil but how to set it up
Ulti *shrug*
tyil I want texas ops to be converted into unicode ops as I type them
Ulti yeah I get it, thats not a complex thing in almost any IDE
tyil well...
Ulti they all have online text replacement
tyil it seems too complex for almost every IDE 11:41
Ulti usually you just say what string to replace with what
then you also usually have some ligatures stuff that works at a render level rather than the text in the file
tyil nobody sane wants that
Ulti I do
way more
tyil one of the last things I want is my editor not showing me what's in the file
what good is an editor that refuses you to show the contents of a file correctly 11:42
Ulti it can show you the file how you want to see it and ensure the file on disk is some standard format
rather than imposing your BS expectation of everything on everyone else
tyil if I recalled correctly, you didn't like tabs
your argumentation here is exactly in favour of tabs 11:43
Ulti depends im in favour of a mix
and it actually doesnt matter in my argument because your IDE just renders whitespace however you want
tyil except when it doesnt and your indentation is all weird 11:44
because your editor tried to be smarter than you and ruined the file
Ulti sure which is why I do favour spaces because some crazy person will set a tab stop to be like 8 spaces or something
tyil wat
so you want the file to be whatever and have the IDE fix it for you, but you don't actually like the file being fixed by the IDE 11:45
Ulti because the reality is no one uses an IDE in the world of Perl 11:46
tyil I don't think this is going to go anywhere
one second you want the editor to just render whatever, and the other you dont
Ulti in python for exmaple I couldnt give two shits what the indentation character is because the code is identical
and anywhere you get a bit more choice you're almost certainly using spaces anywhere to character align 11:47
El_Che I always run 's/\t/ /' in IntelliJ
tyil El_Che: then you'll ruin alignment, though 11:48
Ulti not really since you have no idea with tab how that renders
El_Che nope, alignement is fine
tyil no its not
if I used 3 spaces to align a line's = 11:49
and 4 spaces on the next line
now, the 2nd line is a tab
El_Che \t is 4 spaces
tyil and if you dont have tab as 4 spaces exactly, you're fucked
no, \t is a tab
Ulti < tyil> if I used 3 spaces to align a line's = <--- which is why a lot of people hate that to start with
El_Che that's how my ide renders tab
tyil that doesnt make \t 4 spaces
Ulti tab stops are variable spaces
tyil \t is a tab
Ulti tyil: you get that a tab isnt the same everywhere right?
tyil that's what I'm explaining you guys rn 11:50
Ulti so it could render as one space for me with your 4 space aligned = anyway
your argument makes no sense
El_Che I haven't use intellij for perl6 yet (I use atom and vim), but "go fmt" render the aligning discussion moot
tyil Ulti: I already said this isnt going anywhere, since you're clearly not trying to comprehend me
and I seem to be failing to comprehend you
Ulti I am trying very hard
tyil and still we both fail at it
because I'm clearly saying a \t is NOT the same as 4 spaces 11:51
because its a TAB
which is variable width
and then you tell me I'm trying to say that tabs are not variable width for some reason
which is the *exact opposite* of what I have been saying
Ulti so with your = alignment you mean you use a tab to align the =?
not spaces
tyil again, that's literally the opposite of what I said...
Ulti right so if you used spaces to make = in some assignments line up and then tabs below to keep that alignment you have no idea that it will look ok anywhere else other than yoursetup 11:52
tyil I'm not even sure how you can get to that conclusion when I said "if I used 3 spaces to align a line's ="
El_Che on my IDE a tab is *exactly* 4 spaces because it's so configured. I configured vim on the same way
I dislike variable space with ardor 11:53
Ulti tyil: because you then said my next logically true statement about tabs sucking was wrong
El_Che: even with it variable the actual tab stops are also entirely user defined
tyil I mean, there's two people talking to me acting like I'm saying everything I didn't say
I have no clue how you get to some conclusions in this "discussion"
Ulti as in what columns you tab upto
tyil: because we are reading what you say 11:54
tyil clearly not
Ulti maybe put it in an actual text file :Z
I can show all whitespace in vim like the best of them
tyil I mean, I said "used 3 spaces" and suddenly in your tell me I said I used tabs
Ulti you said that in direct follow up to alignment /with/ tabs 11:55
in response to saying if El_Che changed all the tabs to some fixed spaces it would no longer align
tyil I was trying to explain El_Che that just replacing all 4 space clusters with tabs will ruin your stuff
Ulti my point is the tabs dont necessarily have to align even as tabs
11:55 Ven` joined
tyil my point is that tabs shouldnt be used for alignment 11:56
because it simply doesn't work for that
Ulti tyil: right Im trying to explain to you I can set my tab stops to be every single character column and suddenly your tabs look like ass too
tyil the fact that it works for SOME people is simply luck in their setup
Ulti you better believe there are crazy people who do that
11:56 xtreak left
tyil it will look like ass to you 11:56
which is why you dont set it to 1-space width
Ulti but yeah tabs for indent and space for aligning Im totally comfortable with
11:57 pmurias left
tyil but it may look great to others, and they should be able to read the code in a way they enjoy 11:57
forcing spaces everywhere for indentation is silly
Ulti but Ive seen people use tabs to align and its horrible
so stuff like my $thing\t=\t"value"
masak notices a whitespace debate taking place, and smiles wistfully as he remember his younger self
Ulti if my tab stop is huge that looks gross
masak remembers* 11:58
tyil also, I can't find anything on Inttelij expanding text on the fly to other text (in my case, trying to convert texas to unicode ops)
Ulti the issue is people dogmatically using one or the other really
tabs have a clear purpose so do spaces
tyil I can only find ways to do it on hitting a certain key to expand abbreviations or templates
Ulti hmmm
tyil the only editor I've been able to get that working in (on-the-fly text replacement) is vim 11:59
because apparently it's "very hard"
El_Che masak: one is never to old to enjoy a good old tab/spaces or vim/emacs discussion ;)
Ulti tyil: abusing the code complete is probably the way to do it 12:00
jast no need to discuss when the answers are completely obvious ;)
Ulti which would involve an extra return to create the unicode I guess
which is perhaps nice
tyil I don't know enough about intellij to get into that
I'd also rather not spend my free time working on proprietary stuff
jast vim does make on-the-fly text replacement really easy
tyil so if I cant do it easily, I'm going for the "its not possible" route
masak El_Che: we should have a bot that detects the end of such a discussion, and summarizes: "congratulations, you spent 31 minutes on a whitespace discussion, during which you could have done [3 or 4 examples of constructive things]"
tyil masak: I'm on the bus anyway 12:01
Ulti its almost like people have these discussion to procrastinate
or are on IRC at all for that reason ;3
tyil the biggest issue was me and Ulti not understading eachother
jast "... during which you could have converted $n% of the linux source tree from $whitespace_style_1 to $whitespace_style_2"
El_Che masak: lol
Ulti yeah talking past people on the internet is so common its painful really
in person it happens so much less
masak Ulti: if only everyone else wasn't so slow to understand one's point ;) 12:02
tyil Ulti: thats why I try to avoid political discussion online
Ulti LOL
"slow"/actively not wanting to
El_Che We're all dogs on the Internet
masak \twoof
Ulti tyil: like tabs vs spaces
tyil I'm a little 2d girl on the Internet
Ulti Silicon Valley has my best tabs v spaces bits
tyil Ulti: that's not policital, that's just common sense 12:03
jast I got into a really pointless discussion by accident the other day and the other person got mortally offended or something
Ulti tyil: LOL
tyil also SV's epi on it was shit, the girl just smashes spacebar 4 times
Ulti the common sense thing is to actually have all code as a binary AST on disk and render it however anyone likes
jast that's silly, you should smash the tab key 4 times
tyil it felt like they googled "fun epic developer discussion argument crazy lol" on google
12:03 pmurias joined
tyil and took the first hit, which said something on spaces and tabs 12:03
and they completely dont understand how computers work, or how devs work, and they couldnt be arsed for an expert opinion 12:04
Ulti really we shouldnt have good compilers we should have super high level decompilers
where I can take any binary and see Ultilang with exactly 2.5 spaces indent
then I only ever have to know my programming language to work with you all
masak I'll try to say something that everything agrees to: if your team ends up having to fix each others' spaces/tabs after they've been merged to master, your project is not configured right.
jast all source code should just be XML, that's easy to read, right? right??
Ulti masak: yeah git hooks are your friend for that 12:05
masak jast: did you ever see Eidola?
Ulti jast: it is if you have a nice DOM aware editor
masak Ulti: 007 has Travis checking indentation and trailing spaces
jast masak: no, and I have a bad feeling about it because you're mentioning it in this context
Ulti masak what are your settings space or tab >:3
jast I prefer tabs, and I use whatever the project I'm working on uses 12:06
masak jast: it was an old project where code was "presentation-agnostic", closer to an AST than to text
jast I think there are quite a few projects, most of them probably vapourware, that do the AST thing
masak Ulti: in my own projects I use spaces-only (but I love the Tab key)
Ulti: but I'm fine with working in whatever project
jast my editor auto-detects the whitespace profile so I hardly ever think about it 12:07
12:07 pmurias left
jast I just default to using tabs 12:07
masak Ulti: I basically buy Atwood's argument that the Tab character is the imposter: blog.codinghorror.com/whitespace-t...nt-killer/
you should only ever have one indistinguishable horizontal invisible character in your source code, and we can't get rid of spaces. 12:08
Ulti yeah I should probably highlight I always work in whatever format I find code in
even if Im personally disgusted by it
12:08 HaraldJoerg left, broquaint left
Ulti which given my PhD supervisor used variable names $this $that and didnt believe in *any* white space.... 12:09
12:09 broquaint joined
masak I also have many other code conventions I personally don't prefer but am willing to work under if the team has decided on it. it's part of being a professional developer. 12:09
Ulti I literally put his stuff through perltidy then by hand edited it back
masak I am usually more annoyed by a lack of convention than any particular convention. 12:10
Ulti masak: there is an add on to that reaosning though, that sometimes the original author cargo culted something and doesnt care at all
and if you end up maintaining something it might as well not make you hate life
Im usually annoyed by copy pasta everywhere with like a bug fixed in one of ten copies of some code
thats the real wtf 12:11
not did they use spaces and the right number of them
masak Ulti: I liked getting contributions to 007, but I didn't like having to fix whitespace issues. so I added the whitespace tests; now the test suite fails if the whitespace is not right. problem solved. 12:12
Ulti its like some people dont understand you can replace 200 nested if statements with a single function and a parameter... yet these are somehow "professionals" you work alongside and its much harder to respect that than their white space use
masak Ulti: caring about the code's "looks" is an interesting mix of senior/junior behavior. it's senior in the sense that caring at all indicates a burgeoning maturity and (benign) sense of detail. it's junior in the sense that it's not directly connected to what the code *does* and the value it delivers. 12:13
Ulti actually are there any cyclomatic complexity tests for P6 yet?
we had a hard limit on that in the last place I worked and it saved many lives 12:14
masak that's the first good thing I've heard anyone say about cyclomatic complexity ever, I think
mentally, I had cyclomatic complexity filed in the bucket "the kind of code metric that people end up abusing/misunderstanding long before it ever has a chance to become useful" 12:15
lizmat
.oO( Tour de France ? )
masak lizmat: :D
Ulti masak: granted the main good use of it is discovering when someone super jr thought they were super smart scripting the generation of a giant monster that could be a single regex 12:16
I still have nightmares of the first time I saw goto semantics in some production Perl code 12:17
about twent ifs deep
12:18 HaraldJoerg joined
Ulti I think phasers are actually a killer feature for the sorts of people who think this way 12:18
masak you mean, shooting them to stun? :P 12:19
Ulti :D
I can see it now if (True) { LEAVE {} }
masak .oO( phasers: eats, shoots, and LEAVEs ) 12:20
Ulti that is a blog article title right there
12:22 ExtraCrispy left
lizmat m: LEAVE say "bye" 12:23
camelia bye
lizmat or perhaps:
LEAVE say "Goodbye Cruel World"
as an improved "Hello world" excercise :-)
masak today's mini-challenge: shortest program that will segfault (or similar) Rakudo. 12:25
if the programs are interesting enough, I might blog about it ;)
Ulti with or without using native call 12:26
feels like cheating if its native call 12:27
masak only rule is "shorter is better"
I would also recommend trying the MOP
12:27 ExtraCrispy joined
Ulti have you already won? <___< 12:27
masak no, but I'm actively thinking about it
I know we have a few wonderfully short ones in RT, but they might have been fixed 12:28
diakopter have found some wonderfully short ones over the years
Ulti signals feel like they might be ripe too
masak it was on one of those occasions I blurted out that I thought I loved him :P
Ulti well if short is best surely the easiest way is to just randomly search for them 12:29
with a little GA
masak because he said something like "I just think really hard about what the underlying semantics might be, and then I try to adversarially challenge that", and I wanted to say "wow, that's *exactly* what I do too, and I didn't know someone else thought like that" 12:30
but it came out like "I... I think I love you" :D
Ulti source mates
masak exactly
Ulti: I'm not aware that anyone has every run American Fuzzy Lop on Rakudo. maybe an opportunity there. 12:31
lizmat
.oO( great minds think alike )
Ulti it is fun when you meet a programmer with a similar enough mind you can go full short hand on everything, or a sufficienly better programmer than yourself
masak lizmat: "...but fools seldom differ" :P
Ulti: there's a story about Thompson and Richie when they are developing C, and they accidentally write the same bit of assembly code. about 100 instructions, I think. their versions were identical. 12:32
Ven` I wonder if someone wrote a perl6 fuzzer already 12:33
masak I first had the thought back in 2008.
masak <-- patent pending
especially since there was a point where we found a new bug just by combining two random features :P 12:34
I figured I could automate that, and use code templates somehow to just auto-generate code that combined features
timotimo i fuzzed nqp. it went very badly 12:35
masak timotimo: defined "badly" :)
define*
and was it with AFL?
timotimo yes, afl
i think it just ran into the timeout every single time
Ven` define "timotimo"
timotimo "timotimo defines badly"
Ven`
.oO( very carefully )
timotimo and the "crashes" it found all went away when running the files manually
masak ah, so "badly" as in "results were not useful" :( 12:36
timotimo yes
masak I was hoping for the "badly" that means "it found 1727 bugs" 12:37
timotimo it wasn't able to understand what the program was doing, so it wasn't quite as "guided" as you'd hope from afl
hack.p6c.org/~timo/ - the graphs on the right were nqp code
b2gills masak: my@a["antidisestablishmentarianism".ords.sort]X=1
masak b2gills: nice. I think I will allow memory overflow. 12:38
because why not
12:39 p6noob left
masak ok, b2gills has supplied us with a baseline: 49 characters. surely there are shorter programs which crash Rakudo? 12:39
b2gills It was an intermediate step on the way to this: codegolf.stackexchange.com/a/168437/1147
masak remember, as people find shorter solutions, the task actually gets *easier*, since the search space gets smaller :P
timotimo i wonder how exactly it interprets that list of ords 12:42
it's clearly taking it as a shape declaration 12:43
... oh my god
Ulti :D
12:43 domidumont joined
Ulti maybe I'll just get some popcorn rather than look for some 12:43
timotimo well, you're trying to declare an 28-dimensional array with around 100 fields in every direction
Ulti who doesnt do that every day
cmon
b2gills Yeah I did shortly realize that I needed to put parens around (my@a)
Ulti *deal with it*
masak should give some clues on how to do it shorter 12:44
timotimo m: my@a[100xx100]
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3my@a[1007⏏5xx100]
expecting any of:
whitespace
timotimo m: my@a[100 xx 100]
camelia ( no output )
timotimo m: my@a[100 xx 100] X= 1
camelia Cannot access 100 dimension array with 1 indices
in block <unit> at <tmp> line 1
masak m: my@a[9 xx 9]
camelia MoarVM panic: Memory allocation failed; could not allocate 3099363912 bytes
masak I think I just took the lead
m: my@[9 xx 9] 12:45
camelia MoarVM panic: Memory allocation failed; could not allocate 3099363912 bytes
masak ok, I'm gonna consider memory exhaustion as a sort of "honorable panic", but real panics will be considered slightly nobler in spirit 12:46
m: my@[1e9] 12:47
camelia MoarVM panic: Memory allocation failed; could not allocate 8000000000 bytes
masak m: my@[9e9] 12:48
camelia Illegal dimension in shape: 9000000000. All dimensions must be integers bigger than 0
in block <unit> at <tmp> line 1
masak I think that's a genuine bug. anyone care to rakudobug it?
Ulti locally I dont have these segfaults
:/
masak those are not segfaults; they are memory allocation failures.
Ulti ahh
masak but (as I said above) the contest is really about segfaults (or errors of similar severity) 12:49
Ulti Im not exactly memory rich so thats also surprising
masak I think the `my@[1e9]` (8 chars) is at or near the theoretical limit for how short a program can run out of memory anyway. 12:50
but I'm more interested in genuine segfaults.
jnthn A panic isn't a segfault, it's the VM knowing something is bad and doing better than a SEGV :) 12:51
masak I'm fine with it being a panic, but I think we've exhausted the joy in memory-related ones 12:52
real actual segfaults are a bonus, but I suspect we'll only find ones via the MOP, of the DIHWIDT variety
b2gills I just did "my@[{join ';',100 xx 100}]".EVAL in the REPL, did a Ctrl-C and got a segfault 12:53
masak haha
if you can get it reliably without the Ctrl+C, then we might be in business ;)
b2gills It might have been partially because of the combination of things I did in the REPL before that 12:54
masak looks like. the thing works here, from the command line. 12:55
b2gills my int $ = 's'␤my@[100]␤'my@[{100 xx100}]'.EVAL␤'my@[{100 xx 100}]'.EVAL␤"my@[{100 xx 100}]".EVAL␤"my@[{join ';',100 xx 100}]".EVAL␤^C 12:56
^ That was the exact sequence of commands I ran in the REPL 12:57
masak reproduced. 12:59
b2gills The `my@[100]` seems to be necessary
masak I got the segfault immediately, without having to Ctrl+C
b2gills I was running it through rlwrap 13:00
masak I'm getting a segfault just by running `"my@[{join ';',100 xx 100}]".EVAL` on the REPL. no rlwrap. 13:01
but not on the command line.
m: "my@[{join ';',100 xx 100}]".EVAL
camelia ( no output )
b2gills Actually running the "my@[{join ';',100 xx 100}]".EVAL twice in the REPL crashes it 13:03
masak I never get that far ;)
b2gills v2018.06.141.g.4.ef.8433 13:04
13:04 jameslenz joined
b2gills The first time I run it in the REPL I get "Cannot look up attributes in a array type object" 13:05
masak 2018.04.1-128-g27e8dab9f
looks like it's time to upgrade here :)
b2gills .oO(Maybe I could get a job as a human fuzzer) 13:06
masak I blithely notice that so far, we don't even have a _long_ consistently segfault-causing program in the running
b2gills I upgrade very regularly (sometimes 3 or more times a day)
13:09 jameslenz left
AlexDaniel tbrowder_: so what's up with the MIGRATING row in language.html? It doesn't look quite right, what's the plan? 13:09
Ven` I had a small SEGV with the MOP, but it's gone now :( lost in the limbs of the irc logs 13:11
13:11 xtreak joined
b2gills $ perl6 --repl-mode=interactive <<<'"my@[{join ";",100 xx 100}]".EVAL␤"my@[{join ";",100 xx 100}]".EVAL␤' 13:12
Ven` I remember jnthn++ giving me one 2-3 months back when I was doing specialization experiments 13:13
masak b2gills: reproduced. 13:14
b2gills: I wonder why that one menifests only when using the REPL
b2gills: I'm also getting 'Died with X::Method::NotFound' just before the segfault 13:15
b2gills I get `Cannot look up attributes in a array type object`
I wonder if it is precomp related 13:16
or if you have a different compiler version, and that is the difference
13:19 p6noob joined
tbrowder_ AlexDaniel: g’day! I’m working on it, but if that MIGRATING bothers you at the moment, I can remove it. 13:22
AlexDaniel it's ok as long as we plan not to have it :)
tbrowder_ My plan is pretty much exactly as I have outllined it in the Phase 2 page on the doc wiki. I am working on the p6 prog that does the work in a copy of the existing doc/Language dir. 13:24
Eventually, after my local testing, I will integrate my p6 code into htmlify.p6 if that suits everyone. I will also modify the Makefile to regen the proper files during a build after any change to the source files. 13:27
When all that is working to your satisfaction, I plan to work on the rendering part to make all look better. 13:29
13:29 xtreak left
tbrowder_ My progress is slower than I would like, but it is > 0. 13:31
13:32 eliasr joined
AlexDaniel that's good 13:40
13:59 xtreak joined
jkramer m: say "test" 14:02
camelia test
jkramer Hmm. Anyone know what the quotation bracket thingies are called that I see in use in P6 code sometimes? They look like this but apparently that's not them: 「Hello!」
moritz .u 「 14:03
yoleaux U+300C LEFT CORNER BRACKET [Ps] (「)
moritz m: say 'a' ~ /./
camelia Regex object coerced to string (please use .gist or .perl to do that)
a
in block <unit> at <tmp> line 1
moritz m: say 'a' ~~ /./
camelia 「a」
moritz .u 「」
yoleaux U+FF62 HALFWIDTH LEFT CORNER BRACKET [Ps] (「)
U+FF63 HALFWIDTH RIGHT CORNER BRACKET [Pe] (」)
moritz fun fact: the halfwidth corner brackets are *super* hard to find in monospace fonts 14:04
in the regex book I had to replace them with other, similar looking characters, because none of the monospace fonts that leanpub supports contained them 14:05
jkramer Thanks! But yeah, doesn't work with my font either :( I don't remember where I've seen them working
moritz .u ⌜⌟
yoleaux U+231C TOP LEFT CORNER [So] (⌜)
U+231F BOTTOM RIGHT CORNER [So] (⌟)
moritz that's what I replaced them with
jkramer Do they work as quotation marks in P6 code though? 14:06
No :(
14:06 curan left
moritz no, but there's no reason to copy&paste *output* from examples as Perl 6 code 14:06
jkramer I just wanted to fancy up my quotation game :) 14:07
14:08 skids joined 14:14 psychoslave joined 14:20 psychoslave left 14:39 Ven` left 14:40 Ven` joined 14:41 itaipu joined 14:47 fake_space_whale joined 14:48 xtreak left 14:49 warriors joined 14:50 warriors left, wamba left, warriors joined 14:55 BertolucciTalks joined 15:03 itaipu left 15:04 itaipu joined, jameslenz joined 15:07 robertle left, itaipu left 15:08 dakkar left 15:09 jameslenz left, dakkar joined, itaipu joined 15:15 itaipu left, itaipu joined 15:20 ufobat_ joined 15:23 itaipu left, itaipu joined 15:25 itaipu left 15:29 itaipu joined 15:30 itaipu left 15:31 troys joined 15:33 ufobat_ left 15:34 itaipu joined 15:40 itaipu left 15:41 itaipu joined 15:42 kerframil left 15:45 itaipu left 15:46 itaipu joined
AlexDaniel moritz: I think some modules are missing in perl6-all-modules, for example: github.com/moritz/perl6-all-module...thub/masak 15:51
I think this folder should have `yapsi` in it ( github.com/masak/yapsi ) 15:52
15:58 johan_ joined
AlexDaniel .tell masak can you please take a look at github.com/rakudo/rakudo/issues/2057 ? 16:01
yoleaux AlexDaniel: I'll pass your message to masak.
AlexDaniel .tell masak tests simply say that things did not compile, without any error or other help. I can investigate later, but for now that's all I see 16:02
yoleaux AlexDaniel: I'll pass your message to masak.
16:03 johan_ left 16:15 Schepeers left, fake_space_whale left 16:16 p6noob left, p6noob joined 16:17 domidumont left
moritz AlexDaniel: there are currently some shenanigans in the ecosystem that prevent the updater from working correctly 16:19
16:20 Schepeers_5 joined 16:21 Schepeers_5 left
moritz I guess I should debug a bit more what's going on exactly 16:22
16:25 Schepeers joined
AlexDaniel .seen dwarring 16:27
yoleaux I saw dwarring 1 Jun 2017 21:48Z in #perl6: <dwarring> tbrowder: got it thanks!
16:30 Ven` left, scimon left 16:37 raynold joined 16:41 donpdonp joined
[Coke] sake - is there a way to dynamically generate tasks aside from EVAL? 16:54
in an old school system, I'd have a config step that generated the makefile which then had explicit entries for, say, a dynamically generated list of files. 17:01
ilmari sake? is that Yet Another Make Replacement™? written in … sed? scheme? shell? 17:03
moritz in sed6 :-) 17:04
17:04 dakkar left 17:05 jameslenz joined 17:09 jameslenz left
[Coke] perl6 17:17
ilmari: github.com/perl6/p6-sake 17:18
ilmari surely it should be psake (pronounced the same, of course) 17:19
timotimo for pete's sake
[Coke] ilmari: github.com/perl6/p6-sake/issues/19 17:20
so far, "ake" seems to be the vote winner. 17:21
Geth doc/coke/build: 25 commits pushed by (Will "Coke" Coleda)++, Coke++
review: github.com/perl6/doc/compare/175ac...0ef2e58b85
17:23
timotimo no way there isn't already an ake 17:24
[Coke] AlexDaniel: ^^ that starts moving things out of htmlify.p6 into the sakefile. (plan on making that step smarter)
17:28 bwisti left 17:30 itaipu left 17:31 itaipu joined 17:35 itaipu left 17:36 itaipu joined 17:45 melezhik joined 17:49 domidumont joined 17:50 lizmat left
AlexDaniel [Coke]: not sure if it's the vote winner or if people just like Audrey so much :) 17:52
I was about to click 👍 too :)
warriors ake is fine p6-ake will probably be pronounced psake anyway :) 17:56
Geth doc/coke/build: f405db01eb | (Will "Coke" Coleda)++ | Sakefile
Only generate svg files that are out of date.

Don't generate in progress output.
17:57
doc/coke/build: 9370945570 | (Will "Coke" Coleda)++ | Sakefile
Run these sub-tasks in parallel

  (add back some diagnostics)
18:03 itaipu left 18:04 itaipu joined 18:06 itaipu left 18:08 pecastro joined 18:09 eliasr left, itaipu joined
tobs m: for ^10 { .print; NEXT print ', ' } 18:10
camelia 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
tobs What would be a good way to get rid of the trailing comma? I'd still like to use a loop, not a .join
timotimo you can get each item along with the next item using rotor :partial, then see if you get a second item or not 18:11
m: for ^10 .rotor(2=>1) { .perl.say }
camelia (0, 1)
(3, 4)
(6, 7)
timotimo m: for ^10 .rotor(2=>1, :partial) { .perl.say }
camelia (0, 1)
(3, 4)
(6, 7)
(9,)
timotimo oh, needs to actually be:
18:11 itaipu left
timotimo m: for ^10 .rotor(2=>-1, :partial) { .perl.say } 18:11
camelia (0, 1)
(1, 2)
(2, 3)
(3, 4)
(4, 5)
(5, 6)
(6, 7)
(7, 8)
(8, 9)
(9,)
timotimo so with comma it looks like this:
m: for ^10 .rotor(2=>-1, :partial) { .[0].print; ",".print if $_[1] } 18:12
camelia 0,1,2,3,4,5,6,7,8,9
tobs While that's a nice idea, my loop isn't so simple. I can rewrite it as a bunch of .maps but would rather not (this time) 18:13
18:14 itaipu joined
tobs or wait 18:14
I get what you mean now. Hopefully rotor works with a Seq
timotimo of course it does :) 18:16
perlbot Anonymous pasted a new file at f.perl.bot/p/o69vuo - 18:20
vrurg f.perl.bot/p/o69vuo – I wonder if this is a bug I found. Shall it be reported? 18:21
18:21 itaipu left
TimToady m: ($_ for ^10).join(', ') # you can still use a loop with join 18:22
camelia ( no output )
18:22 itaipu joined
TimToady m: say ($_ for ^10).join(', ') # you can still use a loop with join 18:22
camelia 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
tobs indeed timotimo++
something like this would be nicer to read I think: for |($_ = ^10) -> $x { print $x; NEXT print ", " if .consumed } 18:23
but Seq.consumed doesn't exist
TimToady that's equivalent to testing for eof, which is also a bad idea 18:24
tobs s/if/unless/
18:24 itaipu left
TimToady it's also equivalent to asking if you can ask a question, when you should just ask the question :) 18:25
tobs I don't do that 18:26
so that means, I shouldn't test for EOF either...
18:27 itaipu joined 18:28 itaipu left
TimToady in a language that already handles the ends of iterations for you, it's at best an unneeded mechanism, and at worst a race condition, and sometimes race conditions turn into security holes 18:31
18:32 itaipu joined, ExtraCrispy left 18:33 itaipu left
tobs Ah, I see. But when consuming strings, there is something like the % quantifier which handles the opposite of my problem above gracefully. 18:36
18:36 molaf joined 18:37 Zoffix joined
TimToady yes, which is the opposite of what join does :) 18:37
18:37 itaipu joined
El_Che lwn.net/Articles/759654/ "Guido van Rossum resigns as Python leader", in case someone missed it 18:37
Ulti tobs: this might also work for you docs.perl6.org/syntax/gather%20take
tobs touché
Ulti if you have complex logic in a loop and want to construct something seqy and then do a join afterwards 18:38
tobs yes, it makes sense to put the loop into a function of its own
Ulti especially if you want to do the join much later in your code
Zoffix vrurg: you could report it; maybe there's a way to offer a better error. But what happens is the $/ exists in the same scope, but it ain't got stuff in it yet (so it's null), but the regex that matches for /md/ there tries to write into it, hence the crash. Just don't use $/ as a name for that parameter. Use anything else 18:39
vrurg Zoffix: So damn simple. Thanks a lot! I have it reported already. Gonna add a comment about your note. 18:40
18:40 itaipu left
timotimo m: for ^10 { FIRST { 1 } || print ", "; .print } 18:40
camelia , 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
timotimo m: for ^10 { FIRST { 0 } && print ", "; .print } 18:41
camelia 0123456789
timotimo m: for ^10 { !(FIRST { 1 }) && print ", "; .print }
camelia , 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
timotimo dangit :D
Ulti El_Che: thats an interesting PEP why didnt they just use '=' :/
18:41 subroot joined
Ulti also that is a super good addition to Python it sucks how very little is an expression 18:41
18:42 itaipu joined
El_Che := like go 18:43
18:43 undersightable6 joined
El_Che I prefer "my" :) 18:44
warriors hi, is the fact that a space is required after a parent class name as in > class Child is Parent1{ .. } vs class Child is Parent1 { .. } a bug or not
TimToady odd that they still limit += etc to statement level
timotimo tobs: also be mindful about the difference between .join-ing the result of a sequence and using the .rotor(2->-1) thing; the latter will print immediately when a new value is available, while the other will suck up all values into memory and print it out at once
warriors the documentation doesnt mention that we need a white space after a parent class name 18:45
Zoffix warriors: not a bug. You left before I had a chance to give you a link to docs
geekosaur warriors, not a bug. {} directly suffixed to something is *always* a hash-style dereference (Associative postcircumfix)
Zoffix digs
Ulti TimToady: so odd it annoys me weekly when I catch myself getting it wrong
Zoffix warriors: there's a bunch of white-space sensitive "traps": docs.perl6.org/language/traps#Whitespace
geekosaur it's not specific to class names or anything else, it's always true. likewise other postcircumfixes like () and [] and <> 18:46
warriors ok
Zoffix m: class Child is Parent1{ … }
camelia 5===SORRY!5=== Error while compiling <tmp>
'Child' cannot inherit from 'Parent1' because it is unknown.
at <tmp>:1
Zoffix m: class Child is Int{ … }
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot resolve caller trait_mod:<is>(Child, Int, Block); none of these signatures match:
(Mu:U $child, Mu:U $parent)
(Mu:U $child, :$DEPRECATED!)
(Mu:U $type, :$rw!)
(Mu:U $type,…
Zoffix hehe
it gets intrepreted as a trait with a block arg given to it :) 18:47
m: sub trait_mod:<is>(\c, Int, Block) { dd c }; class Child is Int{…} 18:48
camelia 5===SORRY!5=== Error while compiling <tmp>
Type check failed in binding to parameter 'c'; expected Any but got Child (?)
at <tmp>:1
Zoffix m: sub trait_mod:<is>(Mu \c, Int, Block) { dd c }; class Child is Int{…}
camelia (Child without .perl method)
5===SORRY!5=== Error while compiling <tmp>
Unable to parse class definition
at <tmp>:1
------> 3, Block) { dd c }; class Child is Int{…}7⏏5<EOL>
18:48 itaipu left
Zoffix neat 18:48
18:48 itaipu joined
Zoffix m: sub trait_mod:<is>(Mu \c, Int, Block) { class ::(c) { method heh { say "hah" } } }; class Child is Int{…}; Child.heh 18:49
camelia ===SORRY!===
Name ::(c) is not compile-time known, and can not serve as a package name
Zoffix m: sub trait_mod:<is>(Mu \c, Int, Block) { class ::(BEGIN c) { method heh { say "hah" } } }; class Child is Int{…}; Child.heh
camelia Use of uninitialized value of type Mu in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
in any package_declarator:sym<class> at /home/camelia/rakudo-m-inst-2/share/nqp/lib/Perl6/Grammar…
Zoffix m: sub trait_mod:<is>(Mu \c, Int, Block) { class ::(BEGIN c.^name) { method heh { say "hah" } } }; class Child is Int{…}; Child.heh
camelia 5===SORRY!5=== Error while compiling <tmp>
Too late for unit-scoped class definition;
Please use the block form.
at <tmp>:1
------> 3 say "hah" } } }; class Child is Int{…};7⏏5 Child.heh
Zoffix oh well
warriors: but what you called a cryptic error has been filed as an LTA error ticket: R#2052 18:50
synopsebot R#2052 [open]: github.com/rakudo/rakudo/issues/2052 [LTA] LTA error in construct declaring `sub class`
Zoffix huggable: lta
huggable Zoffix, nothing found
Zoffix huggable: LTA
huggable Zoffix, "Less Than Awesome"; antonym: PDG "Pretty Damn Good"
18:50 itaipu left 18:51 Zoffix left
TimToady as an extensible language, Perl 6 tends to simply require whitespace anywhere you need to distinguish a circumfix from a postcircumfix, since neither of those categories are closed to extension 18:51
warriors thank you :)
TimToady and since the way that works is that anything that can be interpreted as postfix/postcircumfix will be, it even applies when the next thing isn't strictly a circumfox operator 18:52
like a block
heh, "circumfox"
.oO(I've been circumfoxed!)
18:53
18:53 itaipu joined
Ulti a sly circumfox operator 18:54
TimToady an additional wrinkle is that for various constructs, a block is the only term that we all to function as a terminator of the previous expression, technically violating the two-terms-in-a-row rule 18:55
*allow
but we can only do that when there's whitespace in front of it, and we're expecting a terminating block for control flow and such 18:56
the postfix vs non-postfix thing is one of the few places where we had to be a lot stricter on whitespace than Perl 5 for the sake of extensibility 18:58
18:59 itaipu left
TimToady you can't say $x<3 either, for the same reason 18:59
19:00 itaipu joined 19:05 jameslenz joined 19:06 itaipu left 19:07 itaipu joined, domidumont left 19:09 itaipu left 19:10 jameslenz left 19:12 itaipu joined 19:18 itaipu left 19:19 itaipu joined 19:20 dogbert17 joined 19:21 itaipu left 19:24 itaipu joined 19:28 itaipu left 19:29 itaipu joined 19:31 melezhik left 19:32 itaipu left 19:33 robertle joined 19:34 itaipu joined 19:38 itaipu left 19:39 mspo joined 19:56 stmuk joined
mspo that guido retirement thing is interesting in perl context :) 19:58
19:59 stmuk_ left 20:01 p6noob left 20:08 lizmat joined
El_Che mspo: whyN 20:28
mspo El_Che: guido is a larry contemporary, python is a perl contemporary, etc
El_Che: so it's interesting to see how it plays out 20:29
El_Che twitter.com/sheeshee/status/1017504731797876736
20:30 benchable6 left 20:32 benchable6 joined
mspo El_Che: I love OSS drama but that's a little aggressive ;) 20:33
warriors what happened?
mspo mail.python.org/pipermail/python-c...05664.html
so anyway we are reaching the start of retirement for that age of languages and their leaders 20:34
which is interesting
Summertime bit daunting, a lot of languages having a lot of potential changes in direction 20:36
warriors i am sure the python community have a lot of brilliant minds, who will step up, and take charge 20:37
this will hardly be noticeable for most python users 20:38
El_Che you're assuming they want/accept a new BDFL
Summertime that's assuming that anyone available could fit the position :u
warriors not at all, i am assuming, they will create a nice decision making process ... that may or may not (probably not) ha a new BDFL
El_Che big shoes
they do have a decision making process already 20:39
and that is wat seems to burnt out van Rossum
warriors Tcl doesnt have a BDFL, and i dont think it ever did, yet .. it never went away, still one of the nicest languages there is
they will survive 20:40
mspo they use a core team
well since 2000 anyway 20:42
it's probably the only sane way to proceed 20:45
but it makes things go slower
warriors i like their tip process a lot, very visible, very easy to see where they are going
Summertime does python have that much left to do? other than just staying modern and maybe adding some more core libraries?
[Coke] tcl had ousterhout, I think, but that was a different vibe.
mspo Summertime: that would be great 20:46
warriors ousterhout is out of the picture since very long time ago
mspo "python is done" :)
warriors: since about 2000?
20:46 subroot left
warriors but to be honest, i think ousterhout ... out smart most ppl ... ever, i wonder where tcl would be had he stayed around 20:47
he wrote a new book "A Philosophy of Software Design "
he idea, or using two languages, one for system programming and one for applications, is ... pure genius 20:48
his idea
grrr, his idea on
there is always almost always two levels of programming / development in most software project, low level , technical ... high level domain 20:49
20:55 itaipu joined 20:59 japhb_ joined
mspo anyway will there be a new generation that displaces current stuff? 21:03
will python adopt a core-group?
21:04 skids left 21:05 jameslenz joined
Summertime I'd imagine so, the core devs currently represent a very wide spread of opinions (education, scientific, startups) 21:05
I feel it'd be a bit silly to go any other direction 21:06
mspo a coup d'etat would be more entertaining, of course 21:08
MasterDuke maybe some strange women lyin' in ponds will step up to take control
21:08 telex left
lizmat
.oO( it's all a big conspiracy of the Perl 6 Cabal )
21:09
mspo the coupe attempts in perl has been kind of boring to outsiders, but fun to read about after-the-fact
21:09 jameslenz left 21:11 telex joined
Summertime what if python rights gets sold? growing the language would of finally paid off for guido! 21:11
mspo Summertime: amazing 21:12
so anyway- fun to watch
Summertime: don't give TimToady ideas about cashing out :)
Summertime I wonder what prices python or perl rights would get 21:13
timotimo what would you get, exactly?
mspo copyright
is all that there is 21:14
Summertime probs the logo too
timotimo you wouldn't even get the camel, though
lizmat www.computerhistory.org/fellowaward...minations/ # Computer History Museum Fellow Award Nominations 21:15
Summertime camel-buying money is a lot of money to throw around willy nilly!
lizmat I think I know someone who deserves to be nominated
mspo yeah camel is oreilly
timotimo my kingdom for a camel
mspo I drew a logo for python postgres at one point 21:16
and they accepted it!
timotimo cool
mspo timotimo: it was pretty bad :)
timotimo where can i see it? is it superceded already?
21:16 stmuk_ joined
timotimo the best (and only) logo i ever made was for the cellular automaton simulation framework i built 21:17
mspo timotimo: this was back when pypg was its own project
okay dinner time
timotimo github.com/timo/zasim/blob/master/docs/logo.svg
21:18 stmuk left 21:22 telex left
SmokeMachine my only logo: wormholeipc.sourceforge.net/images/...transp.png 21:24
thats not a very good logo... :(
timotimo i think it's cute 21:25
i don't know what it's for, but it's cute
SmokeMachine timotimo: it was for a IPC library called WormHoleIPC 21:27
timotimo ah, the logo fits, then 21:28
SmokeMachine sourceforge.net/projects/wormholeipc/files/
timotimo that seems like it's not going to get finished 21:29
21:29 HaraldJoerg left
SmokeMachine timotimo: as almost every project that I start... :( 21:31
timotimo same ;(
SmokeMachine Im trying to finish this one now: github.com/FCO/aybee (sorry the unwanted ad) 21:33
timotimo zasim had the benefit of being paid, and my supervisor was good at getting me to work on it
oh, i get the name 21:34
SmokeMachine timotimo: do you mean aybee? 21:35
if you like it: github.com/FCO/aybee-client 21:40
timotimo yeah 21:41
but without the tags i wouldn't have understood what's going on
21:42 telex joined 21:45 warriors left
Altreus Is there something like implicit construction? For example, if I define a class that can be constructed from a Str, can I populate a hash of that type just by providing strings? 21:58
22:01 telex left
timotimo we have only coercing types that will call a method on the incoming object to coerce it 22:02
but since you want Str to be your input type, that'd have to be monkey-patched in
i'd instead maybe suggest to mix in a role that supplies a custom AT-POS or something 22:03
AT-POS and ASSIGN-POS maybe? 22:04
Altreus can you point me to a doc that I can read so I understand that? xD
ah, enrole the hash itself
lizmat AT-POS should be enough, the default ASSIGN-POS just calls AT-POS
AT-POS should of course return a container :)
timotimo er 22:05
sorry, not POS, you need KEY
so you'd return a Proxy from that that'll react to something passed in by coercing, then storing it
22:05 ChoHag joined
Altreus That sounds hideously overengineered for my use case :D 22:06
lizmat m: my Str %h; %h<a> = 42 # would that do it ?
camelia Type check failed in assignment to %h; expected Str but got Int (42)
in block <unit> at <tmp> line 1
SmokeMachine m: my Str() %h; %h<a> = 42 22:09
camelia 5===SORRY!5=== Error while compiling <tmp>
Coercion Str(Any) is insufficiently type-like to qualify a variable
at <tmp>:1
------> 3my Str() %h7⏏5; %h<a> = 42
expecting any of:
constraint
SmokeMachine m: my Str(Int) %h; %h<a> = 42
camelia 5===SORRY!5=== Error while compiling <tmp>
Coercion Str(Int) is insufficiently type-like to qualify a variable
at <tmp>:1
------> 3my Str(Int) %h7⏏5; %h<a> = 42
expecting any of:
constraint
timotimo lizmat: i think they want to put in a string and actually store an object that's created by parsing the string 22:10
Altreus by passing the string sure
I suppose parsing will also happen 22:11
It's not strictly necessary but it would be nice
timotimo well, some kind of computation to go from string to object 22:12
22:27 kerframil joined
Ulti Ambiguous call to 'ASSIGN-KEY(Hash+{Inter}: Str, Str)'; these signatures all match: 22:44
thats interesting I assumed the role would override
timotimo if you put in a proto, it will 22:45
Ulti orly
timotimo otherwise if you have "multi method" it will be added to the pool
22:46 Juerd joined
Ulti hmm that does get rid of the error but I think my Int is just getting turned into a Str anyway 22:48
22:55 stmuk joined 22:57 stmuk_ left 23:03 titsuki joined 23:05 jameslenz joined 23:10 jameslenz left 23:11 rindolf left 23:16 raschipi joined 23:22 lizmat left 23:25 lizmat joined 23:46 pecastro left