»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
00:08 MasterDuke left 00:18 wildtrees left
Grinnz AlexDaniel / jnthn: one more opinion on the "shebangs in test files" track from perl 5 pov: given that almost all perl 5 test suites are made of entirely perl 5 test files, the shebang itself is actually ignored in most cases since you want to run using the interpreter that invoked the test tool, not whatever might be first in path or wherever the test writer thought you might have a perl. given that, the only shebang i use in my test 00:35
files is the same one i use in my CPAN-deployed scripts, which is #!perl so that it won't work without the tool and the intention is obvious
so tldr: interpreters not always being /usr/bin/foo complicates relying on the shebang 00:36
00:39 epony joined
Grinnz that's not to say the language couldn't require shebangs in test files, just that doing so might set up misleading expectations of what the shebang means 00:46
er, s/require/recommend/ 00:47
00:47 TeamBlast left 00:48 sivoais left 00:52 mowcat left 00:59 lucasb left, TeamBlast joined 01:01 sivoais joined 01:16 AlexDani` joined 01:17 shadowpaste left
tbrowder tony-o: hm, i think many midules will have other module dependencies. any way to handle that? 01:17
01:20 AlexDaniel left 01:22 shadowpaste joined 01:29 molaf left 01:41 molaf joined
cpan-p6 New module released to CPAN! Tomtit (0.1.4) by 03MELEZHIK 01:49
New module released to CPAN! Tomty (0.0.6) by 03MELEZHIK
02:13 Sgeo_ joined, KotH left 02:16 KotH joined, Sgeo__ left, veesh left 02:20 Itaipu left 02:21 Itaipu joined 02:30 veesh joined 02:41 radvendii joined, radvendii left 02:46 Cabanoss- joined 02:47 Cabanossi left, Cabanoss- is now known as Cabanossi 03:05 lgtaube left 03:20 Guest14120 left 03:23 success joined 03:24 success is now known as Guest8978 03:47 isBEKaml joined 03:51 Sgeo joined 03:53 Sgeo_ left 04:05 Doc_Holliwood left 04:28 khisanth_ left 04:35 reach_satori_ left
tony-o tbrowder: yea way, requires a little more finesse but looks like this: github.com/tony-o/travis-p6n/blob/...travis.yml 04:40
04:40 khisanth_ joined
tony-o i'm still paring down those docker run commands but the apt update stuff is necessary so curl can use https 04:41
you can see the log and config here: travis-ci.org/tony-o/travis-p6n/jo...662/config 04:45
04:46 molaf left 05:18 isBEKaml left 05:19 Sgeo left 05:36 wamba joined 05:41 lgtaube joined 05:49 jmerelo joined 06:13 sauvin joined 06:29 wamba left 06:30 jmerelo left 06:37 domidumont joined 06:39 Sgeo joined 06:46 TreyHarris left 06:51 TreyHarris joined 07:10 wamba joined 07:20 ambs left 07:25 AlexDani` is now known as AlexDaniel, AlexDaniel left, AlexDaniel joined 07:27 ambs joined, squashable6 left
SmokeMachine is there a easy way to make GitHub actions test a module (using a docker image no not have to install all de dependencies) and use mi6 to release it to CPAN? 07:29
07:30 squashable6 joined 07:31 ambs left 07:33 ambs joined 07:44 sena_kun joined
moritz hasn't found it easy to do anything with github actions 07:48
07:49 abraxxa left, abraxxa joined 07:54 abraxxa left 07:55 abraxxa joined 08:00 leont joined 08:01 zakharyas joined, dakkar joined 08:04 aindilis left 08:10 Itaipu_ joined 08:11 Itaipu left 08:14 leont left, Itaipu joined 08:15 Itaipu_ left 08:17 Doc_Holliwood joined 08:25 Itaipu left 08:29 Itaipu joined 08:34 ChoHag left 09:07 daxim left, cpan-p6_ joined, cpan-p6_ left, cpan-p6_ joined, cpan-p6 left, cpan-p6_ is now known as cpan-p6, cpan-p6_ joined, cpan-p6_ left, cpan-p6_ joined 09:08 cpan-p6_ left
Doc_Holliwood You guys ever looked at Kotlin? 09:11
09:14 daxim joined
sena_kun Doc_Holliwood, what's with it? 09:15
Doc_Holliwood I'm watching a video about it. Seems to be very expressive. 09:16
Just curious about peoples thoughts
sena_kun Doc_Holliwood, to me it sounded like a sugar upon java. in large projects java is ewww, but at least you can read/write even if you are tired beyond repair. 09:20
they write that "code is shorter" is a benefit, but... the code is shorter _compared to java_, so it is not really that cool 09:22
maybe that's just me, of course, don't saying it's a universal truth 09:25
09:31 cpage left
Doc_Holliwood It seems quite rakish to me at times 09:33
i like this syntax `someobject.someMethod().let( -> returnValue { ... } )` 09:34
09:52 aborazmeh joined, aborazmeh left, aborazmeh joined
sena_kun m: 42.abs().(->$a { say $a })() 09:52
camelia No such method 'CALL-ME' for invocant of type 'Int'
in block <unit> at <tmp> line 1
sena_kun m: 42.abs().&( ->$a { say $a })()
camelia 42
10:08 cpan-p6_ joined, cpan-p6_ left, cpan-p6_ joined, cpan-p6 left, cpan-p6_ is now known as cpan-p6, cpan-p6 left, cpan-p6 joined, cpan-p6 left, cpan-p6 joined
tyil woah 10:09
calm down, cpan-p6
timotimo cpan-chan
tyil wonder if I broke something :(
10:13 domidumont left
tyil I think I did :( 10:18
I guess the GHOSTing feature of IRC::Client::Plugin::NickServ is working at least 10:19
10:24 squashable6 left, Black_Ribbon left 10:25 squashable6 joined, ChanServ sets mode: +v squashable6 10:30 cpan-p6_ joined, cpan-p6_ left, cpan-p6_ joined, cpan-p6 left, cpan-p6_ is now known as cpan-p6 10:31 cpan-p6 left
tyil hmm 10:31
10:31 cpan-p6 joined, cpan-p6 left, cpan-p6 joined, wamba left
tyil ok, I'll turn it off for now, until I can fix that 10:31
10:31 wamba joined 10:32 cpan-p6 left 10:33 cpan-p6_ joined, cpan-p6_ left, cpan-p6_ joined, cpan-p6_ is now known as cpan-p6, cpan-p6 left
Altreus i don't like the idea of my code ghosting me 10:33
although, it happens
10:37 wamba left 10:41 zakharyas left
tbrowder .tell tony-o thanks, looks good, i'll try it today and report back! 10:51
tellable6 tbrowder, I'll pass your message to tony-o
11:03 wamba joined 11:06 squashable6 left 11:08 squashable6 joined 11:19 reach_satori joined 11:21 reach_satori_ joined 11:23 reach_satori left 11:35 ufobat__ left
tbrowder .tell tony-o wow!! test went from a bit over 10 minutes to a little under 5 minutes--good job! thank you! 11:46
.tell tony-o ^^^ 11:47
tellable6 tbrowder, I'll pass your message to tony-o
12:09 Doc_Holliwood left 12:19 jmerelo joined
Ulti is there something in core akin to Duration(:8days) so I dont have to specify seconds 12:27
Im aware of how terrible a general concept that is given a day isnt of equal length always 12:28
12:29 kiwi_7689 joined, kiwi_7689 left 12:32 holyghost left
[Coke] nope, it's just seconds; if you want day math, Date is probably a better choice. 12:34
m: say Date.new(2019,12,25)+7
camelia 2020-01-01
12:36 cpan-p6 joined, cpan-p6 left, cpan-p6 joined 12:37 wamba left 12:38 rbt joined 12:39 pat_js joined
[Coke] m: Date.new(Instant.from-posix: 11**7) 12:40
camelia ( no output )
[Coke] m: say Date.new(Instant.from-posix: 11**7)
camelia 1970-08-14
12:41 Doc_Holliwood joined
Doc_Holliwood Ok, so I just installed IntelliJ to look closer at Kotlin and I noticed something interesting. 12:45
12:45 reach_satori_ left
Doc_Holliwood jnthn++ is a cheater =) 12:45
I admired him so much how he can develop an IDE next to all the other work
tadzik :D 12:46
well it's "only" a modded IDEA, yes :)
jmerelo with "only" a plugin that allows you to visualize concurrent execution...
jnthn There's no way we could have done it without such a nice base platform to build it on :) 12:47
12:47 veesh left
jnthn It's still an incredible amount of work even with that. 12:47
tadzik what do you mean, how can VimScript not be enough for all this? :P
Doc_Holliwood I believe
[Coke] jnthn++
et al.++
jnthn Well, yes, not just me :)
jmerelo also sena_kun++ 12:48
Doc_Holliwood while we're at it. Also lizmat++
jmerelo Doc_Holliwood: that always applies 12:49
Doc_Holliwood she came up with a pull request regarding subclassing `Proxy`
12:53 reach_satori joined 12:54 reach_satori_ joined 12:56 pmurias joined
pmurias Doc_Holliwood: isn't Kotlin intended as a better Java? 12:57
12:58 reach_satori left
Doc_Holliwood It's definitly more concise 12:58
12:58 mowcat joined
pmurias Doc_Holliwood: that seems to be the *better* part ;) 13:00
Doc_Holliwood It has nice things. Multi-Paradigm too 13:01
youtu.be/0sPzDwS55wM?t=181 13:02
13:07 jmerelo left
pmurias Doc_Holliwood: just meant that from looking on the docs it seems like more fun replacement for Java rather (interesting in a pragmatic way instead of some new cool weird thing) 13:12
13:14 satori__ joined 13:15 reach_satori_ left
Doc_Holliwood Well it's definitly generating more buzz than Perl6 that's for sure 13:15
Man, we need a big corporate sponsor 13:16
13:16 aborazmeh left 13:17 vrurg joined
pmurias Doc_Holliwood: yes, one of those wouldn't hurt for sure ;) 13:18
Doc_Holliwood: making Java less tedious/more fun is a good niche
13:20 zakharyas joined
Doc_Holliwood perl6.org/compilers/ still states "Rakudo runs on MoarVM and the Java Virtual Machine (JVM)" 13:21
That's no longer true, is it?
[Coke] We target the JVM but it's not (never has been) as full featured. 13:32
I would at least change that to "has experimental support for the JVM" 13:33
Doc_Holliwood priorities 13:37
13:38 ambs left 13:40 ambs joined 13:48 lucasb joined 13:49 molaf joined 13:52 domidumont joined 13:58 satori__ left
SmokeMachine vrurg: Hi! are you there? why do you want to get the SQL from the AST? 14:01
14:02 rbt left
vrurg SmokeMachine: to simplify logging for users. It's not actually me wanting it but I'm just thinking of possible use cases. :) 14:10
14:11 Sgeo_ joined
SmokeMachine vrurg: do you think Red::Event should have a `method sql { die unless $!data ~~ Red::AST; $!db.translate: $!data }` ? 14:11
vrurg SmokeMachine: not necessarily. To my view it's enough if $ev.db.translate($ev.data) does what's expected. 14:13
14:13 Sgeo left 14:20 MilkmanDan left 14:25 domidumont left 14:27 MilkmanDan joined 14:31 pmurias left 14:33 wamba joined
SmokeMachine m: sub infix:<< < >>(*@a) is assoc<left> { dd @a; @a.join: "|" }; say 1 < 2 < 3 # is there a way to make this return `1|2|3` ? 14:39
camelia Array element = [1, 2]
2|3
Array element = [2, 3]
SmokeMachine m: sub infix:<< | >>(*@a) is assoc<left> { dd @a; @a.join: "|" }; say 1 | 2 | 3 # like this? 14:40
camelia Array element = [1, 2, 3]
1|2|3
discord6 <RaycatWhoDat> Seems like the first one is making multiple two-element arrays 14:43
<RaycatWhoDat> I dunno all of the syntax but maybe something is preventing it from parsed the other arguments as * 14:44
<RaycatWhoDat> Maybe < has some other behavior that prevents that 14:45
<RaycatWhoDat> Or maybe it's the other way around. Maybe | has behavior that happens to work in your favor. 14:47
<RaycatWhoDat> shrugs
14:48 pat_js left
SmokeMachine m: sub infix:<< a >>(*@a) is assoc<left> { dd @a; @a.join: "|" }; say 1 a 2 a 3 14:48
camelia Array element = [1, 2]
1|2|3
Array element = ["1|2", 3]
SmokeMachine m: sub infix:<< a >>(*@a) is assoc<list> { dd @a; @a.join: "|" }; say 1 a 2 a 3 14:49
camelia Array element = [1, 2, 3]
1|2|3
discord6 <RaycatWhoDat> Ey
SmokeMachine m: sub infix:<< < >>(*@a) is assoc<list> { dd @a; @a.join: "|" }; say 1 < 2 < 3
camelia Array element = [1, 2]
2|3
Array element = [2, 3]
discord6 <RaycatWhoDat> Ya got it
SmokeMachine RaycatWhoDat: No... I didn't... ^^ :(\ 14:50
discord6 <RaycatWhoDat> D:
SmokeMachine m: sub infix:<< a >>(*@a) is assoc<chain> { dd @a; @a.join: "|" }; say 1 a 2 a 3
camelia Array element = [2, 3]
1|2|3
Array element = [1, "2|3"]
discord6 <RaycatWhoDat> Wait. Is your array getting remade every time? 14:51
<RaycatWhoDat> @a 14:52
SmokeMachine RaycatWhoDat: sorry, what do you mean? 14:53
discord6 <RaycatWhoDat> Oh, never mind. @a is passed in as a parameter 14:54
AlexDaniel RaycatWhoDat can you try m: say 42 14:59
just wanna make sure it works
discord6 <RaycatWhoDat> no
<RaycatWhoDat> okay
<RaycatWhoDat> m: say 42
evalable6 42
discord6 <RaycatWhoDat> Ye
14:59 vike left
AlexDaniel k, thanks :) 14:59
discord6 <RaycatWhoDat> SmokeMachine, here's a thought 15:02
<RaycatWhoDat> Is that pipe operator making your other arguments a Junction?
<RaycatWhoDat> If so, would it cause this effect when called with .Str?
SmokeMachine m: say 1|2|3 # a junction would be printed like this 15:03
camelia any(1, 2, 3)
discord6 <RaycatWhoDat> Ah.
SmokeMachine I think there is something "hardcoded" on <... 15:04
discord6 <RaycatWhoDat> Agreed.
15:04 isBEKaml joined
discord6 <RaycatWhoDat> m: say | [2] | [3] | [4] 15:05
evalable6 any(2, [3], [4])
discord6 <RaycatWhoDat> m: say 2 | 3 | 4
evalable6 any(2, 3, 4)
discord6 <RaycatWhoDat> m: say |(2, 3, 4) 15:06
evalable6 234
discord6 <RaycatWhoDat> So strange
SmokeMachine |(2,3,4) is a Slip 15:08
m: |(2,3,4).^name.say
camelia List
SmokeMachine m:( |(2,3,4)).^name.say
evalable6 Slip
discord6 <RaycatWhoDat> blinks
<RaycatWhoDat> What even is?
<RaycatWhoDat> And what's a piece of clothing have to do with this? 😛 15:09
SmokeMachine m: say [1,2,3,(4,5,6), |(7,8,9)]
camelia [1 2 3 (4 5 6) 7 8 9]
discord6 <RaycatWhoDat> Oh, does it auto-flatten based on its parent container?
SmokeMachine m: say { a => 1, b => 2, c => {d => 4, e => 5}, |{f => 6, g=> 7}} 15:10
camelia {a => 1, b => 2, c => {d => 4, e => 5}, f => 6, g => 7}
15:11 vike joined
SmokeMachine m: sub bla(|c) {say c}; my @a = 1,2,3; bla @a; bla |@a 15:12
camelia \([1, 2, 3])
\(1, 2, 3)
SmokeMachine m: sub bla($a?, $b?, $c?) {say { :$a, :$b, :$c }}; my @a = 1,2,3; bla @a; bla |@a 15:13
camelia {a => [1 2 3], b => (Any), c => (Any)}
{a => 1, b => 2, c => 3}
AlexDaniel so I was thinking, maybe run `apt-file search .` and then pipe it into a script to generate some stats about extensions
discord6 <RaycatWhoDat> So, not based on the parent container, but it does auto-flatten. Additionally, it looks like a Slip can be any type underneath?
<RaycatWhoDat> Neat-o
AlexDaniel but that thing wouldn't output any paths before it reaches the end
so it just keeps counting millions of files and eating my memory 15:14
I can of course try the same on a machine with 64GB RAM, but uhh… 15:15
is there any easier way?
to just print some quick stats about extensions that are being used in the wild
ok I can narrow down the search with a regex 15:21
15:27 thowe joined
thowe Taking a sick day, so gonna play with Perl6. 15:32
silver lining
discord6 <RaycatWhoDat> Smart.
15:40 eythian left 15:42 eythian joined, eythian left, eythian joined
Geth_ perl6.org: Alexey-T++ created pull request #135:
CudaText has Perl 6 lexer too
15:42
15:53 isBEKaml left
AlexDaniel oh wow, that's the first time swap ever did some good for me 15:53
tony-o once is all ya need 15:54
tellable6 2019-09-25T10:51:12Z #perl6 <tbrowder> tony-o thanks, looks good, i'll try it today and report back!
2019-09-25T11:47:30Z #perl6 <tbrowder> tony-o ^^^
tony-o oh nice, hopefully that worked. writing an article breakinng down that and circle config 15:55
thowe The name change might be a bit of a pain in the ass for those who have published books, no? 15:57
lizmat yes 15:59
16:00 domidumont joined
jnthn For those of us who procrastinated heavily on attempting to write books, it's testimony to the power of procrastination, though. :P 16:01
16:02 MasterDuke joined
thowe heh. I made a point of buying all the books published since the official release. I use them for advocacy at work and have started learning Perl6 about 4 times now. I look forward to a book on Cro or somesuch. 16:03
I'm trying to rewrite one of the most complicate dthings I ever wrote in Perl6... I think I used to be smarter, though. 16:04
jnthn The chances of a concurrency/parallelism book went up quite a bit thanks to me having to do a lot of the thinking/writing that would need anyway when preparing the course I gave at PerlCon :) 16:12
16:19 ChoHag joined 16:21 obfusk__ left
tony-o .weekly deathbyperl6.com/rakudo-nightly-faster-ci/ 16:22
gah, can never remember that command
16:23 obfusk__ joined
timotimo i think just "weekly:" is enough? 16:23
tony-o weekly: deathbyperl6.com/rakudo-nightly-faster-ci/
notable6 tony-o, Noted! (weekly)
tony-o sure enough
16:24 leont joined
tony-o ty 16:24
16:25 grumble left 16:27 cpan-p6 left, cpan-p6 joined, cpan-p6 left, cpan-p6 joined
lizmat tony-o: posted on /r/perl6 as well 16:29
16:29 grumble joined
Juerd thowe: Changing a name is a PITA in any case, but sometimes it's a smaller PITA than keeping the old one :) 16:30
This is probably true for both people and projects. 16:31
lizmat :-)
16:31 leont left
tony-o ty lizmat 16:32
16:33 veesh joined
Geth_ perl6.org: 35eb03cd15 | Alexey++ (committed using GitHub Web editor) | source/whatever/index.html
CudaText has Perl 6 lexer too
16:40
perl6.org: 211943b002 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | source/whatever/index.html
Merge pull request #135 from Alexey-T/patch-1

CudaText has Perl 6 lexer too
AlexDaniel tony-o: re “can never remember that command” usually you just tell something to the bot 16:41
tony-o: so it should tab autocomplete :)
tellable6: test test (please ignore)
tellable6 AlexDaniel, I'll pass your message to test
AlexDaniel notable: test test (please ignore)
notable6 AlexDaniel, Noted! (weekly)
AlexDaniel sorry, wrong bot xD 16:42
16:42 krychu joined
tony-o ahh 16:42
unlike the m:
16:42 dakkar left
AlexDaniel evalable6: say 42 16:42
evalable6 42
AlexDaniel all *ables are more or less consistent 16:43
16:43 Sgeo joined 16:44 Sgeo_ left
AlexDaniel weekly: test test (ignore) 16:44
notable6 AlexDaniel, Noted! (weekly)
AlexDaniel that also works
El_Che tbrowder: github.com/nxadm/rakudo-pkg#using-...-on-travis 16:46
AlexDaniel note: test test test
right, that no longer does because people tend to say that sometimes 16:47
16:53 krychu left
tbrowder tony-o: you prob missed by report earlier: with yr travis, my module test went from 10+ minutes down to < 5 minutes--nice speedup for the impatient. good job, and thanks for the post! 16:58
17:01 dogbert11 joined 17:02 wildtrees joined
tbrowder El_Che: good, i forgot about that, thanks! 17:02
uzl[m] I often use `p6doc --doc=Markdown ...` to extract the markdown-ified Pod from a module. Although for the most part it does a great job, sometimes it's kind of wacky. For instance, declarator blocks for a subroutine's 17:11
parameters are formatted as H2-level headings while the subroutine's name is formatted as H3-level heading. This makes them seem out of place. Example: gist.github.com/uzluisf/ec9fa34e60...42e6d74ddc
Where should I submit this as an issue? perl6/doc?
17:13 krychu joined 17:20 wamba left
sena_kun uzl[m], Pod::To::Markdown? 17:21
17:21 wamba joined
sena_kun github.com/softmoth/perl6-pod-to-markdown 17:23
tony-o tbrowder: a+, glad that helped - building p6 with each change for ci is so time consuming. i think with circle ci it's even easier
uzl[m] sena_kun: Thanks. Will do that. 17:24
17:39 krychu left 17:41 zakharyas left 17:51 aindilis joined 18:00 SyrupThinker left 18:01 krychu joined
timotimo zostay: can you show some screenshots of p6-prometheus-client being used with, for example, a cro application or something? (obviously not just the client itself, more like graphs seen in the prometheus web interface) 18:02
18:03 lgtaube left 18:04 lgtaube joined 18:05 domidumont left
discord6 <RaycatWhoDat> Weird question. Are there any "hackish" parts of Perl 6? Anywhere certain concessions were made and pushed off 'til later? 18:11
timotimo there's a few things that are NYI 18:12
for example, shaped arrays cannot be sliced into arrays of a lower dimension yet
discord6 <RaycatWhoDat> What do you mean?
AlexDaniel blobs that are str-like but not really and honestly they shouldn't be 18:13
m: my Blob @blobs; my Blob $single-blob = [~] @blobs
camelia Type check failed in assignment to $single-blob; expected Blob but got Str ("")
in block <unit> at <tmp> line 1
timotimo m: my int @foo[3;3;3]; say @foo[1;2;*] 18:14
camelia Partially dimensioned views of shaped arrays not yet implemented. Sorry.
in block <unit> at <tmp> line 1
AlexDaniel at least that one says sorry
discord6 <RaycatWhoDat> What's the reasoning behind that one, timotimo? 18:15
timotimo nobody implemented it yet :)
discord6 <RaycatWhoDat> No-one got around to it yet?
<RaycatWhoDat> Ah.
timotimo yeah
it's not terribly easy, either
kybr macros are still being worked out too, right?
timotimo that's right 18:16
the "figure out how macros should be implemented" toy language has recently been finished
discord6 <RaycatWhoDat> Is that 007?
kybr every now and then i take a look at 007
timotimo just needs everything to be ported
yeah, 007
MasterDuke renamed to alma, though, right? 18:17
18:17 reach_satori joined
discord6 <RaycatWhoDat> So, overall, it seems like Perl 6 is in a very good spot. Just needs more hands, yeah? 18:17
timotimo i imagine alma to be more like a fork 18:18
but the kind of fork that's shaped like a knife i guess
yeah, more hands would be a benefit
not only in the compiler, though. more modules would also be pretty valuable 18:19
AlexDaniel timotimo: what are you even talking about
timotimo and the usual, articles, tutorials, examples, documentation, ...
AlexDaniel what do you mean everything needs to be ported, who is going to work on that?
timotimo AlexDaniel: 007 stopped, but alma starts where it ended
AlexDaniel yeah but we're not getting it on rakudo? 18:20
timotimo i don't actually know. masak or ven would be candidates AIUI
AlexDaniel or do we?
timotimo neither 007 nor alma can just be plugged into rakudo 1:1
AlexDaniel there are absolutely zero plans to get that in rakudo at this point
timotimo the research results are the main deliverable
AlexDaniel “just needs everything to be ported” is just false 18:21
timotimo i guess there are hopes and dreams
AlexDaniel hopes and dreams true
timotimo i thought the mechanisms are all explored sufficiently to be used for a rakudo-based implementation?
BBL 18:23
AlexDaniel well maybe masak can chime in and tell us how we can get macros in rakudo. For example, what would be the timeframe (2, 5, 10 or whatever years) and how can we work towards it 18:28
current timeframe is “none”
18:30 sauvin left, lel left 18:32 chloekek joined
jdv79 is the build broke again? 18:41
nopaste.xyz/?396c24350926146d#+DXV...N6VWmdug0= 18:42
vrurg: ^ ?
i ran git submodule update to resolve an initial issue 18:43
vrurg jdv79: why didn't submodule update??
Still, see if grep -r _m_bpv comes up with NQP/Macros.pm 18:44
thowe I want some classes to map to some database objects. I want them to share a database connection for the life of a script running. I think in the past (in other languages) I have created a singleton that I pass to things. Can I do that and have a DB::Pg connection in it; or should I create a closure with that in it? Are are those basically the same?
And yes, I know what an ORM is, but I'm not using one here (yet) for reasons.
vrurg jdv79: it's submodule in NQP which is stuck. 18:45
jdv79 i ran "git submodule update" - is that not enough?
vrurg jdv79: if you did it in rakudo – then it could be that it's stuck in nqp/.
They're different repos, after all. But I wonder how did it happen, after all? 18:46
jdv79 no idea - the last time i touched this checkout is the last time it got stuck like this
i ran git submodule update in nqp and its getting farther now 18:47
why were submodules introduced? they seem to be a bit of trouble. 18:48
vrurg jdv79: to avoid code duplication. nqp-configure is common code among Rakudo and NQP. Any other method of sharing it is even worse.
We anyway have other submodules too in both NQP and MoarVM 18:49
jdv79 its just a large change to the build process that involves a less used feature of git so its not obvious how to handle issues 18:56
maybe "git submodule update --init --recursive" is what i'm looking for 18:57
18:59 SyrupThinker joined
vrurg jdv79: Actually, at the first run Configure.pl does 'git config submodule.recurse true' so submodules are updated on any git pull. 19:02
That's why I wonder why does it happen to you? Can you check if this option is set for you in nqp/ 19:03
?
19:17 krychu left 19:18 hoelzro joined 19:26 wamba left, SyrupThinker left 19:29 wamba joined 19:49 reach_satori left
Voldenet submodules is the hairiest part of git 19:52
but afair submodule.recurse requires git 2.14 or higher
jdv79 i have git 2.7.4 19:55
19:55 reach_satori joined
jdv79 i have submodule.recurse=true 19:58
also, what is "rakudo.initialized=1" in my git config?
maybe it has something to do with i never git pull - i always git pull --rebase 19:59
20:01 Black_Ribbon joined 20:02 __jrjsmrtn__ left 20:04 __jrjsmrtn__ joined 20:05 zakharyas joined
jdv79 vrurg: oddly in git master config docs i see submodule.recursive - i see .recurse - github.com/git/git/blob/master/Doc...le.txt#L60 20:16
s/see/ don't see/ 20:17
vrurg jdv79: that's it, I mistyped it. 20:18
Erh, wait, no
jdv79 i'm not sure how to test it as i'm fairly ignorant of submodules
vrurg jdv79: I need to go now, will be back in ~2hrs and will re-check it
jdv79 ok. later! 20:19
vrurg: looks like that typo is mine. nevermind. 20:29
20:32 chloekek left 20:34 apathor joined 20:45 reach_satori left
Geth_ perl6.org: Alexey-T++ created pull request #136:
make Editors/IDEs part splitted per each editor, groups Atom items, g…
20:50
20:55 abraxxa left
SmokeMachine thowe: I would suggest you to try Red 20:55
tony-o Xoos is also nice.
SmokeMachine thowe: fco.github.io/Red/tutorials/start 20:56
thowe SmokeMachine, I am aware of Red. I'm just asking if passing a closure makes sense.
tony-o thowe: i think creating a singleton makes more sense 20:57
SmokeMachine I agree... 20:58
thowe OK. That's what I have done in the past. Not sure what that looks like in Perl6 yet. Need to learn Classes. 20:59
What is the state of Red? 21:00
discord6 <RaycatWhoDat> Overall? Not blue.
thowe Production ready-ish?
SmokeMachine ish 21:01
For simple stuff it works very well...
RaycatWhoDat: it was almost called Blue! :P 21:03
And it’s just Red because it’s not Blue :)
21:05 aborazmeh joined, aborazmeh left, aborazmeh joined 21:06 aborazmeh left 21:09 zakharyas left 21:12 aborazmeh joined, aborazmeh left, aborazmeh joined 21:13 reach_satori joined, aborazmeh left
sena_kun thowe, a dynamic variable at the top? as an alternative, I'd move it around using argument, but that depends on how much of a pain that sounds like in your particular case. 21:14
if lexical scoping can satisfy you completely, just closure way is great too
thowe I'm slightly more familiar with the singleton idea as that is how I have done it with Qt4 in the past. I'm going to look at Red also, though. I'm getting ahead of myself, though... Still working my way through Learning Perl and not to Classes yet. 21:16
21:17 lucasb left 21:18 aborazmeh joined, aborazmeh left, aborazmeh joined, Syrup joined
sena_kun m: my $foo = 42; class A { method a { say $foo } }; class B { method b { say $foo } }; A.new.a; B.new.b; 21:19
camelia 42
42
21:19 aborazmeh left
sena_kun but it restricts to you in where you can define your classes 21:19
also, that sounds like Scary Bad Practice of global variables.
21:20 Sgeo_ joined
sena_kun it doesn't matter for a simple script (in my humble opinion), but if you are not ok with that, then 21:20
m: role DB { has $.db }; class A does DB { method a { say $.db } }; class B does DB { method b { say $.db } }; my $db = 42; A.new(:$db).a; B.new(:$db).b; 21:21
camelia 42
42
sena_kun m: role DB { has $.db }; class A does DB { method a { say $!db } }; class B does DB { method b { say $!db } }; my $db = 42; A.new(:$db).a; B.new(:$db).b;
camelia 42
42
thowe Well, simple thing is to just pass around an object, but if it is a singleton or something like that you can manage the connection a bit better. 21:22
21:22 krychu joined, aborazmeh joined, aborazmeh left, aborazmeh joined
thowe There's probably other good ways I simply don't know. 21:22
sena_kun m: class DB { has $!db; method get-db { $!db } }; class A is DB { method a { say self.get-db; } }; class B is DB { method b { say self.get-db } }; my $db = 42; A.new(:$db).a; B.new(:$db).b; 21:23
camelia (Any)
(Any)
sena_kun hmm, the last one needs a constructor
21:23 Syrup left, Sgeo left
sena_kun stops procrastinating and goes back to writing 21:24
m: class Foo { my $single; method init { $single //= 42 }; method db { $single } }; say Foo.db; say Foo.init; say Foo.db; 21:28
camelia (Any)
42
42
sena_kun so you can once initialize class DBWrapper (or something) and then just call a method on it.
21:32 aborazmeh left
tony-o you might want state $single 21:32
21:50 sena_kun left
timotimo m: say <foo bar baz quux> ... "baz" 21:52
camelia (foo bar baz)
timotimo m: say <foo bar baz quux> ...^ "baz"
camelia (foo bar)
timotimo i love this
22:07 MasterDuke left 22:17 wamba left 22:32 Itaipu_ joined 22:33 Itaipu left, krychu left 22:34 wamba joined
tony-o o.O 22:40
23:03 wamba left 23:11 mowcat left 23:57 wildtrees left