»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
skink Is your SSL certs directory /etc/ssl/certs, /usr/local/share/ca-certificates, or /usr/lib/ssl/certs? 00:02
SVR4 It's /usr/local 00:04
I believe
00:04 hotel_california is now known as hotel, yqt left
SVR4 I can't check right now. 00:04
skink Ah, okay
'Cause that dir is empty for me on Linux
ugexe you can always create a HTTP server that accepts remote connections, have travis-ci on OSX run it, connect to it, and run your remote commands! (probably) 00:05
skink Why do that when I have IRC :)
ugexe because now i want such a script :( 00:06
skink It looks like any *nix with Firefox installed will have /etc/ssl/certs
SVR4 Ah 00:07
Good to know.
skink On NetBSD that's the mozilla-rootcerts package
I have several dirs that amount to a hodgepodge of OpenSSL and Mozilla certs
hotel my dad just told me something was "ok iguana" 00:08
skink ugexe, I'm adding certificate verification to the OpenSSL module. I'm including OpenSSL's ca-certificates.crt in resources/ for Windows, and I'm debating between that or a system dir for *nix 00:09
ugexe skink: maybe check out github.com/gisle/mozilla-ca to see how Perl 5 does it
00:10 wamba left
skink ugexe, That's pretty much how I'm doing it 00:11
I can use either Mozilla's or OpenSSL's
Doesn't make a huge difference
hotel I would say openssl, because imo it's more likely people have that than mozilla? 00:12
00:12 cognominal left
hotel is absolutely not an expert*** 00:12
00:13 hotel is now known as hotel|out 00:14 pierre_ left
geekosaur OS X won't have any of those by default; Apple stores its certs in the keychain, and has modified the openssl libs to use the keychain 00:15
ugexe skink: probably use openssls bundled with openssl, and release a module that can somehow allow it to use mozilla ca instead?
skink ugexe, Oh, actually, I'm dumb 00:16
There's already a use-certificate-file() :)
It's just not used by default
ugexe ah 00:17
00:18 pierre_ joined 00:20 pierre_ left, pierre_ joined 00:24 pierre_ left 00:31 hotel|out is now known as hotel
hotel well maybe yours is better? :3 00:31
00:34 SVR4 left 00:36 pierre_ joined
skink Actually, that function can only handle single pem files, not chained cert pem file ^^ 00:37
00:41 pierre_ left
skink ugexe, Right, so, current design: if any certificate issues are detected, an exception is thrown so you can pick what to do next (say, you're testing on a self-signed server) 00:42
00:42 mr-foobar left
skink Most commonly seen one will probably be "Certificate verification error: X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY", for example 00:42
00:44 mr-foobar joined 00:49 matiaslina left, matiaslina joined, BenGoldberg joined
skink The only other real option being openssl killing the socket upon error :) 00:52
00:53 winger left 00:58 cdg left, cdg joined 01:03 colomon left, cdg left 01:04 pierre_ joined 01:05 winger joined 01:07 hotel left 01:08 hotel joined
hotel it's funny: whenever windows loses internet connection, it tries to send you to a microsoft page online (presumably telling you how to troubleshoot the problem) 01:08
01:11 grondilu joined
timotimo psch: if you want to have a game or simulation with thousands of agents where each agent is allowed their own state and script, you're probably bound to lua or something; what's your take on that? 01:14
mst hotel: mine doesn't
hotel oh 01:15
01:15 mr-foobar left
hotel maybe it's my router then 01:15
timotimo could be something your OEM installed
hotel could be
01:16 pierre_ left
hotel oem is msi though, dunno why they would 01:16
already had enough bloatware on here lol
timotimo OEMs are shit, that's why :)
mst I'm running a Thinkpad Helix 2
maybe the thinkpad team turned it off
01:16 vendethiel joined
timotimo lenovo also put some real terrible shit onto their devices last year 01:16
01:17 vendethiel- left
mst consumer only though 01:17
my pet toys were basically fine
01:17 mr-foobar joined, uruwi joined
timotimo mhm 01:17
mst I mean they totally did it and wtf
but I still love my thinkpads
psch timotimo: i don't think i have much more of take than "depends on compiler/interpreter footprint unless you can compile AOT to machine code"
+a
timotimo if you want to have dynamic stuff, it's not so easy to get by without a VM 01:19
psch true
hotel oh well, does what I bought it to do 01:20
>write shitty code and play games 01:21
01:26 pierre_ joined
psch timotimo: well, there's of course the option of a feature stripped vm, i.e. the agents probably don't need any async or IO, or rather a very limited subset 01:26
timotimo: with that and mem sharing that's all you can do except "take a different vm that has less features in the first place" 01:27
...at least that's as far as i understand it :)
timotimo my thoughts are still that most of the "bloat" you get from extra features in your vm are going to be "passive" and also shared between all processes 01:28
psch right, in the end the runtime objects for each agents are always more than the vms own footprint 01:29
-s
timotimo well, at least hopefully :)
psch ...in any realistic scenario
hotel yeah that's best-case scenario
psch if the agents only add two ints, yeah
but if there's anything that lets them fit into the philosophical concept of agent they'll most likely eclipse the vm footprint :P 01:30
hotel /ignore-me
timotimo well, you won't get far if you run eclipse on the agent VMs :) :) :)
01:32 winger left
hotel s/on the agent VMs// 01:32
;-) 01:33
01:34 hotel left 01:35 finanalyst joined
MadcapJake tony-o: no, I actually haven't been at the keyboard much lately til today. Have you added anything new? 01:36
tony-o: I think the front page should have a recent-updates feed 01:37
01:37 hotel joined 01:38 ssotka left
MadcapJake speaking of updates, how do people document that? CHANGELOG.md? git tag descriptions? github releases? 01:38
s/people/Sixians/
what's the Perl 5 way? 01:39
timotimo isn't it usually "CHANGES"?
MadcapJake I've seen both 01:40
I think traditionally it was CHANGELOG no extension
github.com/perl6/user-experience/issues/12 01:47
01:49 winger joined 01:55 pierre_ left 01:56 pierre_ joined 01:58 molaf left 02:02 sufrostico left 02:06 skink left 02:09 uruwi left 02:10 kid511 joined, molaf joined 02:11 noganex_ joined 02:12 kid51 left 02:14 noganex left 02:17 kurahaupo left, MasterDuke left 02:18 kurahaupo joined 02:28 kurahaupo left, kurahaupo joined, kurahaupo left 02:29 hotel_california joined, hotel left 02:30 hotel_california is now known as hotel 02:32 SHODAN left 02:34 pierre_ left, SHODAN joined 02:35 |2701 left 02:39 cdg joined 02:41 kid511 left 02:47 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 02:52 hotel_california joined 02:53 hotel left, hotel_california is now known as hotel 02:55 zakharyas joined 02:59 huggable left 03:02 pierre_ joined 03:15 hotel is now known as hotel|netteiru, pierre_ left
tailgate Hi, I'm trying to resolve an error I'm having with type assignmetns in this gist. 03:17
gist.github.com/ahalbert/f7c56de80...7105de3651
# Cannot call mergeUnits(Units::Unit: Hash); none of these signatures match: 03:18
# (Units::Unit $: Units::Unit $u, *%_)
03:20 pierre_ joined, winger_ joined
grondilu try predeclaring the class 03:21
class Unit {...}
tailgate actually, ignore the above error, it's
Odd number of elements found where hash initializer expected 03:22
in sub infix:<*> at lib/math/units.pm6 line 65
in block <unit> at lib/math/units.pm6 line 77
grondilu m: class A { has A $.a }
camelia ( no output )
grondilu m: class A { has A $.a }; say A.new(:a(A.new))
camelia rakudo-moar df4eb8: OUTPUT«A.new(a => A.new(a => A))␤»
grondilu oh that works
I thought that was not possible without predeclaring. Nevermind.
raydiak one thing that sticks out is that $x.mergeUnits($y.units) probably ought to be $x.mergeUnits($y) on line 66 03:23
tailgate predeclare? define it at the beginning
03:24 winger left
tailgate what is the diffrence between predfine and defining? 03:24
raydiak: yes, I fixed that
grondilu I wrote "pre-declare", not predefine. 03:25
maybe explicit cast to Hash is necessary to set units
units => ($key => $value).Hash
not just
units => $key => $value
units => ($key => $value) 03:26
m: class { has %.h }.new: h => (foo => "bar")
camelia ( no output )
grondilu nope seems fine, my bad.
ugexe well cleanUnits never returns anything 03:27
yet you return .cleanUnits from mergeUnits
and try to put it into a hash?
i think you need to put in some say/print statements and figure out what you are really passing around 03:28
tailgate it seems to run into problems calling mergeUnits 03:30
$y is a unit
Odd number of elements found where hash initializer expected < what does this mean? 03:31
ugexe why dont you print out what its passing at that point
tailgate ugh, grondilu was right, It had to do $x.mergeUnits($y).Hash 03:32
thanks
grondilu m: say .h.perl given class { has %.h }.new: h => (foo => "bar") 03:34
camelia rakudo-moar df4eb8: OUTPUT«{:foo("bar")}␤»
grondilu meh 03:35
ugexe its the mergeUnits not returning anything 03:41
but being treated like it does
m: class Foo { has %.h; }; sub mergeUnits { }; Foo.new(h => mergeUnits);
camelia rakudo-moar df4eb8: OUTPUT«Odd number of elements found where hash initializer expected␤ in block <unit> at /tmp/arcyNjiWUm line 1␤␤»
ugexe m: class Foo { has %.h; }; sub mergeUnits { }; Foo.new(h => mergeUnits.hash); 03:42
camelia ( no output )
ugexe its all just side effects, there doesnt seem to be a reason to assign the return values from any of these o anything 03:44
03:51 matiaslina left
BenGoldberg m: sub empty { }; my @count = empty; say @count.elems; 04:09
camelia rakudo-moar df4eb8: OUTPUT«1␤»
BenGoldberg m: sub empty { }; my @count = empty; say @count;
camelia rakudo-moar df4eb8: OUTPUT«[(Any)]␤»
BenGoldberg would have expected an empty sub to return a slip. 04:10
m: my $test = slip; say $test;
camelia rakudo-moar df4eb8: OUTPUT«()␤»
BenGoldberg m: my $test = []; say $test; 04:11
camelia rakudo-moar df4eb8: OUTPUT«[]␤»
BenGoldberg m: my $test = (); say $test;
camelia rakudo-moar df4eb8: OUTPUT«()␤»
BenGoldberg m: my $test = (); say;
camelia rakudo-moar df4eb8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/IJBMoQRwez␤Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun␤at /tmp/IJBMoQRwez:1␤------> 3…»
04:11 BenGoldberg left 04:15 pierre_ left, sortiz left 04:16 pierre_ joined
ugexe m: sub foo returns Seq { }; say foo.perl 04:20
camelia rakudo-moar df4eb8: OUTPUT«Nil␤»
04:20 cdg left 04:23 hotel joined 04:25 hotel|netteiru left 04:26 winger__ joined 04:27 eshansingh joined
eshansingh Hello? 04:27
04:27 eshansingh left 04:29 winger_ left 04:33 pierre_ left
tony-o hello? 04:34
04:34 pierre_ joined, Woodi left 04:35 Woodi joined, pierre_ left 04:38 mr-foobar left 04:39 ssotka joined 04:55 Cabanossi left 04:57 Cabanossi joined 04:58 Possum joined 05:02 khw left 05:14 CIAvash joined 05:19 cpage_ left, molaf left
MadcapJake wrote a quick dailyprogrammer before bed: www.reddit.com/r/dailyprogrammer/c...ph/d2zlbl7 05:21
05:28 hotel_california joined, hotel left 05:36 domidumont joined 05:37 wbill joined 05:41 domidumont left, jack_rabbit joined 05:42 domidumont joined 05:46 pierre_ joined 05:47 espadrine_ joined
moritz \o 05:57
yoleaux 9 May 2016 21:44Z <psch> moritz: did something wrt ulimits change on hack? r-m builds get "Killed" during RESTRICTED.setting compilation for me since about half an hour ago
9 May 2016 22:32Z <psch> moritz: never mind, turns out i was just recursing infinitely
moritz psch: seems the ulimit worked :-)
05:58 domidumont left 06:06 wamba joined 06:09 domidumont joined 06:10 cpage_ joined 06:11 _mg_ joined 06:12 jjido joined
DrForr For those not on the book of Faces, I have 27 confirmed attendees for the tutorial next week. 06:16
06:18 rurban joined 06:22 alva joined 06:24 firstdayonthejob joined 06:27 darutoko joined 06:30 cpage_ left, stmuk_ joined 06:33 stmuk left 06:34 winger__ left 06:37 JustinHitla left 06:40 firstdayonthejob left 06:42 vendethiel- joined 06:43 vendethiel left 06:47 Xliff_ left 06:49 wamba left
moritz wow 06:51
06:52 ssotka left
moritz is this going to be a screencast? 06:52
06:57 Xliff joined 07:04 abraxxa joined 07:10 abraxxa left, jjido left 07:16 finanalyst left 07:17 sno left 07:26 rurban left 07:29 brrt joined, RabidGravy joined
RabidGravy weeee 07:42
moritz oomphf 07:45
07:46 AlexDaniel left 07:48 aries_liuxueyang left 07:50 aries_liuxueyang joined 07:53 rurban1 joined, El_Che left
ufobat morning! 07:54
07:55 pierre_ left
DrForr moritz: Well, I had to sign a video waiver, so I'm going to guess there will be something posted eventually. 07:57
RabidGravy boom 08:01
08:01 pierre_ joined
RabidGravy DrForr, is 27 attendees good, average, don't know? 08:01
DrForr Well, the room holds 165, so there's space to grow :) 08:02
RabidGravy It'll be great, even if one of those people makes a decisive PR or a great module it will be a good thing 08:04
08:06 g4 joined
DrForr Nod, if it brings anyone into the community I'll have done my work :) 08:07
08:07 El_Che joined 08:27 rindolf joined 08:32 zakharyas left 08:43 espadrine_ left 08:44 wamba joined
psch moritz: yeah, just weird that the code that looped on moar didn't on jvm, which made me not think of that particularly quickly... :) 08:52
08:58 wbill left 09:04 [particle] left, Xliff left 09:05 Xliff joined, [particle] joined 09:10 TEttinger left 09:16 jack_rabbit left 09:24 keix joined, cognominal joined 09:25 keix left, sjoshi joined 09:28 keix joined 09:35 espadrine_ joined 09:39 rindolf left
dalek osystem: c8ac6fa | (Siavash Askari Nasr)++ | META.list:
Add WebService::FootballData

see gitlab.com/CIAvash/WebService-FootballData
09:39
RabidGravy cool 09:40
09:44 rindolf joined 09:45 rurban joined 09:46 rurban1 left 10:03 ranguard joined 10:04 brrt left 10:08 tinita joined 10:29 kid51 joined 10:32 wamba left, kid511 joined 10:35 ZoffixWin joined, kid51 left 10:39 pierre_ left 10:41 dayangkun joined 10:50 dayangkun left 10:51 sno joined 10:56 obfusk left, obfusk joined 10:59 huggable joined 11:01 rurban1 joined 11:05 rurban left 11:15 Ven joined
Ven o/, #perl6 11:15
should `.say for 0..*` leak memory? 11:16
seems to hover around 2.4G mem, but never above that... 11:18
lizmat did you try for 0..* -> $a { $a.say } ? 11:21
but no, it shouldn't leak
ilmari hvering around 90MB here (2016.04 on debian unstable) 11:26
Ven weird.. 11:27
wait, I think it's rlwrap that's going awry >.> 11:30
lizmat++ ilmari++ # thanks 11:32
lizmat Ven: on a side note, it leaks very, very slowly for me, but now sits at 88.3 MB for me
oddly enough at 128% CPU, so I guess garbage collect is working in a separate thread :-) 11:33
Ven lizmat: oh, so it does leak *a bit*? are you sure it's not just the "int size" that's increasing?
(since, well, it needs bigger and bigger numbers)
lizmat still in native territory
Ven ok :-) 11:34
lizmat yw 11:35
11:49 kid511 left
Ven m: my $a //= 3 11:49
camelia ( no output )
11:51 CIAvash left
lizmat m: my $a //= 3; dd $a 11:52
camelia rakudo-moar f03564: OUTPUT«Int $a = 3␤»
Ven well, that makes sense 11:54
m: my $a &&= 3
camelia ( no output )
Ven that one's gonna be empty still, though :P
lizmat yup
11:58 CIAvash joined, Ven left 12:03 noreem joined 12:08 noreem left 12:09 Xliff_ joined 12:12 Xliff left
dalek osystem: ca47798 | (Siavash Askari Nasr)++ | META.list:
Add App::Football

See gitlab.com/CIAvash/App-Football
12:15
12:16 [particle] left 12:17 rindolf left 12:18 zakharyas joined 12:21 nchambers left, nchambers joined, M-matthew left 12:23 aindilis` joined, autarch left 12:25 aindilis left, kaare_ joined 12:27 autarch joined, M-matthew joined 12:28 rurban joined 12:29 |2701 joined
tadzik oh, a gitlab project :) 12:31
12:31 rurban1 left
tadzik I can't wait for all the tools to break because they expect everything to be on github 12:31
timotimo :)
it's very good we're giving our tools that workout
like when fedora named its release "Schrödinger's Cat" 12:32
RabidGravy are there any bitbucket ones yet 12:34
timotimo i ... think so? 12:35
not in the meta.list :\
12:35 araujo_ joined
timotimo i should move JSON::Fast to bitbucket :D 12:35
RabidGravy timotimo, where does it say that - it just says "Fedora 23 (Workstation Edition)" on mine
timotimo it was f22 or f21 12:36
12:39 araujo left
RabidGravy because you can't have too many passive low pass gates 12:41
12:41 M-matthew left 12:42 chee joined, chee left, chee joined 12:47 M-matthew joined
moritz thought the F22 was a fighter jet plane thingy 12:47
timotimo EuroFedora? :) 12:48
tony-o f22s are gross 12:50
moritz and f23s are about 4% grosser? :-) 12:51
tony-o Großer :-p 12:52
i've worked on a couple, and a bunch of 35s
oh cool, it only took the USMC 8 years to declare the 35 operational - destroying their record for the osprey that took over 25 years to become operational 12:54
12:55 pmurias joined
pmurias hi 12:55
tony-o hi pmurias
[Coke] yawns 13:03
13:03 vytas left
MadcapJake m: my $a = Nil; $a //= 3; dd $a; $a //= True; dd $a 13:03
camelia rakudo-moar f03564: OUTPUT«Int $a = 3␤Int $a = 3␤»
13:03 rurban1 joined
[Coke] Need a volunteer to do the May compiler release. 13:03
13:03 rurban left 13:08 rurban joined, rurban1 left 13:10 [particle] joined 13:12 rurban1 joined, rurban left 13:16 vytas joined, skids joined 13:17 rurban joined, rurban1 left 13:21 Sgeo left
tony-o MadcapJake: have you been using modules.zef.pm? 13:23
MadcapJake tony-o: yeah, it's great! 13:25
I was thinking the homepage should have a recently updated feed 13:26
have you made any recent changes? 13:29
tony-o MadcapJake: i haven't, was hoping for some feedback on what else you might like to see
i can do a feed of the modules most recently added 13:30
13:30 g4 left 13:38 aries_liuxueyang left 13:41 aries_liuxueyang joined
pmurias tony-o: having the result list in a more vertical format like on modules.perl6.org would be nicer 13:44
* more horizontal
13:52 rurban1 joined 13:55 rurban left 13:57 rindolf joined, zakharyas left 14:05 araujo_ left
tony-o pmurias: check that out 14:07
14:08 sufrostico joined 14:09 pierre_ joined 14:10 sjoshi left
pmurias tony-o: have you seen metacpan.org/recent? 14:10
tony-o i hadn't until just now 14:12
i'm working on something like that from MadcapJake's suggestion 14:13
14:13 tharkun left
tony-o pmurias++ MadcapJake++ 14:15
14:15 cdg joined, tharkun joined
MadcapJake tony-o++ # love the site! 14:16
llfourn m: my @a = (^5).map({ start { say "start $_"; sleep $_; $_ } }).eager.map({ say "await $_"; await $_; }).lazy; for @a { say "got $_" } 14:21
camelia rakudo-moar f03564: OUTPUT«start 0␤start 1␤start 2␤start 3␤start 4␤await 0␤got 0␤await 1␤got 1␤await 2␤got 2␤await 3␤got 3␤await 4␤got 4␤»
llfourn ^^ array where each element is created concurrently but works just like normal array
#LovePerl6
moritz m: my @a = (^5).map({ start { say "start $_"; sleep $_; $_ }.eager.map(*.result).lazy; for @a { say "got $_" } 14:22
camelia rakudo-moar f03564: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9bPhb4vLfU␤Missing block␤at /tmp/9bPhb4vLfU:1␤------> 3(*.result).lazy; for @a { say "got $_" }7⏏5<EOL>␤»
moritz m: my @a = (^5).map({ start { say "start $_"; sleep $_; $_ }).eager.map(*.result).lazy; for @a { say "got $_" }
camelia rakudo-moar f03564: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YalcB3lutw␤Missing block␤at /tmp/YalcB3lutw:1␤------> 3{ start { say "start $_"; sleep $_; $_ }7⏏5).eager.map(*.result).lazy; for @a { say␤ expecting any of:␤ statement end␤ s…»
14:22 andreoss joined
moritz m: my @a = (^5).map({ start { say "start $_"; sleep $_; $_ }}).eager.map(*.result).lazy; for @a { say "got $_" } 14:22
camelia rakudo-moar f03564: OUTPUT«start 0␤start 1␤got 0␤start 2␤start 3␤start 4␤got 1␤got 2␤got 3␤got 4␤» 14:23
moritz llfourn: .result implicitly awaits for the promise, so that's a tiny simplification
llfourn moritz: that's cool but the say "await" seems to be gone from your output?
oh of course
yes that's awesome!
moritz++
MadcapJake what does the .eager do in there? 14:24
moritz m: my @a = (^5).map({ start { say "start $_"; sleep $_; $_ }}).map(*.result).lazy; for @a { say "got $_" }
llfourn MadcapJake: makes sure that the threads are started -- might not be needed?
camelia rakudo-moar f03564: OUTPUT«start 0␤got 0␤start 1␤got 1␤start 2␤got 2␤start 3␤got 3␤start 4␤got 4␤»
llfourn ah no it is needed^^
moritz right
otherwise it'll only start the threads when one accesses the result 14:25
MadcapJake i see the difference but I don't understand it :)
jnthn m: my @a = lazy await (^5).map({ start { say "start $_"; sleep $_; $_ } }); for @a { say "got $_" }
camelia rakudo-moar f03564: OUTPUT«start 0␤start 1␤start 2␤start 3␤start 4␤got 0␤got 1␤got 2␤got 3␤got 4␤»
jnthn Hmm
moritz lazy await? :-) 14:26
jnthn kinda expected that to work
to make the assignment into @a not behave eagerly
MadcapJake oh I see, so without .eager, the start blocks are initialized at each iteration of the for loop accessing them
moritz jnthn: but isn't await eager anyway? 14:27
llfourn what didn't work? what jnthn did seems to work for me?
skids m: my @a := (^5).map({ start { say "start $_"; sleep $_; $_ } }).list; for @a { say "got $_" } 14:28
camelia rakudo-moar f03564: OUTPUT«start 0␤got 0␤start 1␤got 1␤start 2␤got 2␤start 3␤got 3␤start 4␤got 4␤»
MadcapJake await works on lists? I thought you needed Promise.allof for that?
jnthn moritz: Only on its input?
github.com/rakudo/rakudo/blob/nom/...ops.pm#L13
moritz MadcapJake: you don't :-) 14:29
jnthn: so I don't see the benefit of lazy assignment of an eager list
MadcapJake so is there a difference between `await @some-list` and `await Promise.allof(|@some-list)`?
moritz MadcapJake: no 14:30
jnthn moritz: Yes; Promise.allof doesn't give you any results/exceptions
uh, MadcapJake ^^ :)
moritz MadcapJake: the allof form returns a promise though, so you can say Promise.allof(list).then(...)
14:30 itaipu joined
moritz but in sink context, no difference I can see 14:31
jnthn m: my $p = start { die "oh no" }; await $p
camelia rakudo-moar 376f50: OUTPUT«oh no␤ in block <unit> at /tmp/PQA2jY4Uga line 1␤␤»
jnthn m: my $p = start { die "oh no" }; await Promise.allof($p)
camelia ( no output )
jnthn There's the difference 14:32
anyof/allof are purely used to convey that one/all of the things got done; they expect you'll then pay attention to those things so far as you care to.
MadcapJake via .then, right? 14:33
jnthn MadcapJake: Well, .then only receives the combination promise 14:34
MadcapJake how could you make the die happen while using .allof?
jnthn MadcapJake: By asking the Promise for its result, for example 14:36
MadcapJake how? I can't seem to figure it out
m: my $p = start { die "oh no" }; say Promise.allof($p).result # only gives the allof promise result, I assume
camelia rakudo-moar 376f50: OUTPUT«True␤»
jnthn m: my $p = start { die "oh no" }; await Promise.allof($p); say "alive here"; say $p.result
camelia rakudo-moar 376f50: OUTPUT«alive here␤oh no␤ in block <unit> at /tmp/tYf5DSkTU0 line 1␤␤»
14:36 pRiVi left
MadcapJake oh i see you have to have some access to the internal promise, you can't get that from allof? 14:37
jnthn Correct
If you're trying to do that, you probably should be using await rather than allof :) 14:38
MadcapJake got it! Thanks!
14:38 pRiVi joined
llfourn I'm still trying to figure out how "lazy await" works. await knows that it's being called in lazy context so it doesn't block for all values like it normally would but returns a lazy Seq where each iteration is a bit like awaiting the promise at that position? 14:41
moritz llfourn: it doesn't work that way 14:42
14:42 ZoffixW joined
ZoffixW [Coke], does that volunteer need prior experience with releases? 14:42
moritz llfourn: the await is eager. The lazy part is just where the result list is assigned to the array 14:43
ZoffixW: no
ZoffixW Then I can volunteer.
moritz \o/ 14:44
llfourn moritz: but I would expect then that where you iterate the array it wouldn't be smart enough to iterate the values as soon as they are ready. ie all the "got X" lines should come all at once after 4 seconds.
moritz ZoffixW: hoelzro++ just signed up for the May release (over in #p6dev or #p6release or so); are you available for the May Star release or the June compiler release? 14:45
perlpilot ZoffixW: also, read over docs/release_guide.pod to see what you're in for.
llfourn moritz: but it doesn't they all come one by one as they are ready from the threads.
14:45 molaf joined
llfourn m: my @a = lazy await (^5).map({ start { say "start $_"; sleep $_; $_ } }); for @a { say "$_:{now.Int}" }; 14:46
camelia rakudo-moar 376f50: OUTPUT«start 0␤start 1␤start 2␤start 3␤start 4␤0:1462891655␤1:1462891656␤2:1462891657␤3:1462891658␤4:1462891659␤» 14:47
moritz llfourn: now I'm also confused :-)
llfourn good :D
14:48 pierre_ left, khw joined, rurban1 left, ptolemarch joined
ZoffixW perlpilot, are there similar docs for R* release? 14:49
14:49 rurban joined
jnthn moritz: $i.eager.map(...) means that $i is evaluated eagerly before the map is performed 14:49
moritz: Not that the map itself will be eagerly performed
psch m: use nqp; my @a = lazy await (^5).map({ start { say "start $_"; sleep $_; $_ } }); say nqp::getattr(nqp::decont(@a), List, '$!reified');
camelia rakudo-moar 376f50: OUTPUT«start 0␤start 1␤start 2␤start 3␤start 4␤IterationBuffer.new␤»
MadcapJake ZoffixW: join #perl6-release
perlpilot ZoffixW: I haven't looked at R* in a long while, but I believe so.
moritz ZoffixW: yes, R* also has release docs, it's just under tools/star/ or something 14:50
14:50 pierre_ joined 14:52 pierre_ left, rurban1 joined
MadcapJake I found a JS syntax highlighter that (iiuc) supports heredocs! alexgorbatchev.com/SyntaxHighlighter/ 14:53
14:54 rurban left
MadcapJake The re they use is XRegExp and it has named captured and backreferences (so I should be able to utilize this for heredoc support) 14:54
14:54 perturbation left 14:55 itaipu left 14:56 pierre_ joined
MadcapJake RFC: github.com/perl6/user-experience/issues/12 14:57
14:57 sufrostico left
llfourn m: (await (^5).map({ start { say "start $_"; sleep $_; $_ } })).^name.say 14:58
camelia rakudo-moar 376f50: OUTPUT«start 0␤start 1␤start 2␤start 3␤start 4␤Seq␤»
14:58 itaipu joined, rurban joined
llfourn m: (await (start {},start {})).^name.say 14:59
camelia rakudo-moar 376f50: OUTPUT«Seq␤»
14:59 huggable left
llfourn moritz: the mystery is solved. await LIST returns a Seq -- it doesn't actually behave like .allof 14:59
15:00 rurban1 left
llfourn m: Promise.allof(start {},start {}).^name.say 15:00
camelia rakudo-moar 376f50: OUTPUT«Promise␤»
llfourn m: Promise.allof(start {},start {}).result.^name.say 15:01
camelia rakudo-moar 376f50: OUTPUT«Bool␤»
15:01 pierre_ left
llfourn m: (await start {}).^name.say 15:02
camelia rakudo-moar 376f50: OUTPUT«Nil␤»
llfourn m: (await [start {}]).^name.say
camelia rakudo-moar 376f50: OUTPUT«Seq␤»
llfourn very cool
15:03 diakopter left
dalek ar: 6c23c19 | PerlJam++ | tools/star/ (3 files):
Add alternate nick to docs
15:04
15:05 ssotka joined 15:06 rurban left, rurban joined 15:08 pierre_ joined 15:09 diakopter joined 15:10 pierre_ left 15:11 wamba joined 15:12 rurban1 joined, wbill joined 15:13 rurban left 15:14 pierre_ joined 15:18 vendethiel- left 15:20 pierre_ left 15:22 pierre_ joined 15:28 esh joined, Amnez777 left 15:29 araujo joined 15:30 rurban joined 15:34 rurban1 left 15:36 pierre_ left 15:37 pierre_ joined 15:38 pierre_ left 15:41 ZoffixW left 15:49 rurban1 joined, Actualeyes left 15:50 Actualeyes joined 15:53 rurban left 15:54 ponbiki joined 15:55 ponbiki is now known as Guest44583 15:56 domidumont left 15:59 _mg_ left 16:12 nJohn joined 16:13 captain-adequate left 16:18 rurban1 left 16:20 nJohn left 16:25 Hor|zon left
MadcapJake so funny that #p6dev is amok and #perl6 is dead right now xD 16:29
but to beat a dead horse: words are tools for understanding, "transpile" was created to inform (perhaps less competent, perhaps not) programmers of a specific type of compilation that is taking place and it serves that purpose well, I think. 16:30
geekosaur: do you have any links for that source-to-source translator you mentioned? That sounds like a real etymology of the word 16:31
nine_ To be clear: my impression of JS people does not come from that word alone. More like from the horrors I've seen.
16:32 rurban joined
geekosaur I'm looking, it was a produce in the 1980s and I've forgotten details since then 16:32
*product
pmurias nine_: maybe they were just php people writing js ;)
MadcapJake nine_: I know and agree. But I also think that "transpiled" langauges were designed to reduce those same horrors :)
timotimo "transpiled" languages are basically macro languages :P
jast well you can "transpile" C++ to javascript ;) 16:33
and if C++ is a macro language I don't want to know what m4 is
psch perl -MO=Deparse is a transpiler /o\
timotimo dunno, m4 is a practical joke gone out of hand? 16:34
MadcapJake and Scala, OCaml, Java, Erlang, and tons of others!
pmurias timotimo: you mean in the lovecraftian sense of things going out of hand?
jast if the output is bytecode I think transpiling isn't really the right term 16:35
timotimo are IRs transpiled to?
16:35 rurban left
psch timotimo: i honestly can't tell 16:35
jast Cthulhu M4'lyeh wgah'nagl fhtagn 16:36
geekosaur bleh. near impossible to search for stuff like that that predates the internet
and my collection of computer mags from back then is long since gone
psch timotimo: i mean, there's one person saying Java is transpiled, and one saying it isn't vOv
timotimo need to go to a physical library for that :P
psch timotimo: and java bytecode is somewhat of an IR, fsvo IR
well, jvm bytecode*
timotimo i agree
jast I would define transpilation as something that translates one language used by humans to another language used by humans 16:37
with a fairly wide definition of 'human' if we're going to include the really terrible languages ;)
psch well, if i'm writing jvm bytecode semi-manually with aid of a framework, is jvm bytecode used by humans..? 16:38
jast no
in that situation you're half compiler and half human
timotimo would you actually handle the resulting javascript code that, say, the coffeescript transpiler spits out? what about emscripten?
psch so js-minifiers are also not transpilers, but compilers, because no one writes minified js manually?
profan maybe if intended to be used by humans is more accurate
MadcapJake github.com/jashkenas/coffeescript/...pile-to-js
jast timotimo: certainly I wouldn't... but I also wouldn't handle a lot of code written by humans 16:39
profan: I think that's what I meant
profan :)
i love this channel, it's always so civil
ugexe let them self identify 16:40
jast there are more of those... always nice to find another one
MadcapJake timotimo: coffeescript prints out very readable JS, but others do not. However source maps make this moot.
profan coffeescripts semantics aren't super far from js itself either, so that helps 16:41
geekosaur was gonna say, rarely does a human want to work with the output of any of these things...
16:41 domidumont joined
profan before sourcemaps was a thing, it was probably more important 16:41
MadcapJake profan: totally disagree, coffeescript is quite different
jast I find it funny when people claim the solution to a problem is to write a code generator 16:42
jast .oO( now you have two problems )
MadcapJake but the code generator can be made to always solve the other
jast I'm sure
MadcapJake well that's the idea :)
profan MadcapJake: it is? a lot of coffescript is largely syntactic sugar the way i see it, some things a bit different (everything as expresssions and such)
it looks very different, but practically? 16:43
MadcapJake profan: yes true you can avoid using coffeescript's sugar but then why are you using coffeescript. However if you *do* use it, then there are some very weird semantics that you must follow (and really learn if you want to read coffeescript)
profan well my point was more, what in coffeescript is bulky to represent in javascript? like, what would come out as strange code if written as coffeescript and compiled to js, something that a js programmer normally wouldnt write 16:45
MadcapJake coffeescript is generally-speaking a set of semantic rules that make the use of curlies/parens less needed.
16:45 |2701 left
pmurias jast: re define transpilation, we already have a name for that: translator 16:45
profan the destructuring perhaps might look a bit weird, but mostly a problem in pre ES6 js as it didnt have it in the lang itself then?
jast pmurias: that doesn't sound nearly as magical, though 16:47
MadcapJake profan: go to coffeescript.org, click Try ... and type class <space>
for those who haven't played with coffeescript's online transpiler, it's really cool, dynamically shows you what coffeescript code will generate 16:48
profan ah right, sicne js didnt have them in the lang itself until later, makes sense
16:48 sno left
geekosaur geh. found someone else noting the word is older than current transpilers ("from last century") but nothing on where it came from, sigh 16:49
MadcapJake pmurias: translator doesn't tell you that it's for programming though, that's why the old term for it was source-to-source translator which was shortened to transpiler for ease-of-use
en.wiktionary.org/wiki/transcompiler 16:50
also: en.wikipedia.org/wiki/Source-to-source_compiler
[Coke] m: Supply.from-list(1..5).rotor 16:51
camelia ( no output )
[Coke] m: dd Supply.from-list(1..5).rotor
camelia rakudo-moar 9c8989: OUTPUT«Supply.new␤»
geekosaur yeh, wiktionary doesn't know about the late-1980s product either but knows the other antecedents (some of which predated even the ones they mention --- source to source translation was often used to translate programs in one system programming language (last century style, stuff like DEC's BLISS series) to another one for a different CPU 16:52
pmurias MadcapJake: I would consider there to be a big difference between a source-to-source compiler and a source-to-source translator 16:54
MadcapJake pmurias: what would that difference be?
pmurias MadcapJake: a translator like some p5-to-p6 attempts would give you useable source code 16:55
MadcapJake It seems that transcompilation is the old term and I'm guessing (though I'm not able to find a definitive source) that transpilation just came about as a shortened form of that
pmurias a compiler like rakudo-js gives you something that's not supposed to be editable
MadcapJake ahh I see, well I don't think that's really inherent in the terms, I *do* like how you distinguish the two :)
MadcapJake off to appointment & 16:56
geekosaur I really wish I had my old computer mags now --- I am almost certain that the shortened form was a marketing term for a particular commercial product 16:57
(not a widely known one, obviously; their marketing made it pretty obvious they desperately wanted to not be niche...) 16:58
MadcapJake neat! It really seems that on the internet nobody has a clue where it originated from (but I confess to only having done some cursory digging)
16:59 sufrostico joined
geekosaur anything that advertised in the back of a computer magazine in the 1980s was not going to be --- or, by most people, expected to be --- remembered :) 17:00
heck, people barely remember the magazines themselves 17:01
ssotka Beagle Bros. Ads. 17:04
geekosaur I could pick the one I'm thinking of out of a lineup but don't remember the name off the top of my head. was related to databases, and was mostly aimed at the marketing and sales level instead of engineering, with a bit of executive level stuff
17:05 lostinfog joined 17:06 ZoffixW joined
ZoffixW m: say  5 + 10 17:06
camelia rakudo-moar 9c8989: OUTPUT«15␤»
ZoffixW :trollface:
17:07 cdg left
ZoffixW m: my $x                      = 42; say $x 17:07
camelia rakudo-moar 9c8989: OUTPUT«42␤»
ZoffixW ^_^
17:07 cdg joined 17:08 itaipu left
[Coke] COMPUTE! 17:10
ZoffixW (what prompted that is Python can't handle the above, despite allowing unicode for var names) 😘 Perl 6 17:13
geekosaur heh, I considered naming Compute! as one of those mags. it was one of the better known ones though; plenty of people remember Compute!/Byte/DDJ 17:15
psch .u   17:16
yoleaux U+1680 OGHAM SPACE MARK [Zs] ( )
ZoffixW m: my‸$x‸‹=‸‹‸‹‸‹‸‹5;‹say‹$x
camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ouTmb5v4sS␤Malformed my␤at /tmp/ouTmb5v4sS:1␤------> 3my7⏏5‸$x‸‹=‸‹‸‹‸‹‸‹5;‹say‹$x␤»
ZoffixW awww
psch .u ‸ 17:17
yoleaux U+2038 CARET [Po] (‸)
geekosaur m: my⌴$x 17:18
camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qA8WC4MDMz␤Malformed my␤at /tmp/qA8WC4MDMz:1␤------> 3my7⏏5⌴$x␤»
ZoffixW Oh, I just have fat fingers. It should've been 2028
17:19 kurahaupo joined
ZoffixW m: my
$x
=
5
;
say

















$x;
say
"Look, ma! No errors!" 17:19
camelia rakudo-moar 9c8989: OUTPUT«5␤Look, ma! No errors!␤»
ZoffixW haha
17:19 sufrostico left
ZoffixW That looks funny on my client: i.imgur.com/2XjhKeO.png 17:20
masak evening, #perl6
ZoffixW \o
masak here's a fun riddle: in Java, what does `c1 == c2` do when c1 and c2 are objects of type java.lang.Class? 17:23
(warning: the riddle is not actually fun)
17:24 itaipu joined 17:25 buharin joined
buharin hello my friends 17:25
psch masak: not the same that == always does?
on objects that is
masak psch: oh yes, the same, the same. reference comparison, since they are reference types. 17:26
...but...?
ZoffixW Cześć, Mr. Buharin
[Coke] that's "is this the same object", yes? 17:27
17:27 Coleoid_north joined
psch i'm somewhat confused now :P 17:27
as in, it feels like i should expect a different gotcha than "it's not .equals"
but i wouldn't think there is one
[Coke] were you hoping for c1.equals(c2) ?
[Coke] appears tob e 2 lines behind psch pretty consistently here. :) 17:28
buharin ZoffixW Czesc :P
ZoffixW masak, so what's the but? :) 17:29
17:29 CIAvash left
masak ZoffixW: before I tell you, let me just say that the exception screwed up an exercise of a course I was delivering today. 17:30
psch oh, classes are interned?=
masak not as far as I know. 17:31
Strings are, which indeed does mess with `==`
psch ...i'm just getting more confused :)
masak but Java devs have learned this the hard way and use .equals for Strings anyway.
ZoffixW masak, I guess this SO question is about it: stackoverflow.com/questions/1418876...h-operator
masak .equals for Class objects is defined in terms of `==` though, so there's no difference.
ZoffixW You get an exception if you do == ?
masak nope.
ZoffixW knows exactly 0% of Java
masak it works. it returns a boolean value. 17:32
Coleoid_north Hi, #perl6!
Can I, or how can I call a method from an object's BUILD submethod?
ZoffixW hi
Coleoid_north, I believe it'd just be self.whatever or for privates: self!whatever 17:33
17:33 rindolf left
ZoffixW m: class Foo { submethod BUILD { self.frob }; method frob { say 'weeee' } }; Foo.new 17:34
camelia rakudo-moar 9c8989: OUTPUT«weeee␤»
17:34 pmurias left
Coleoid_north Yes, that works! Thanks--I've seen 'self' around in channel, but I didn't find that in docs.p6 on objects, and I tried $self, $!self... 17:35
masak ZoffixW: I didn't know about that exception. in my case though, that's not the issue. I got `false` from the comparison in the case where I expected `true`. (and, even weirdlier, only on some machines and not on others. though consistently the same result on a given machine.)
Coleoid_north: `self` was one of the most difficult parts of the language to agree on, back in ~2005
Coleoid_north: it used to be `self` didn't exist and the invocant was simply in $_ 17:36
looong ago
early Pugs era
nine_ I guess $self has been a contender though?
masak probably; don't remember 17:37
oh -- haha -- for a while $?SELF was the favored candidate. 17:38
17:38 andreoss left
psch masak: stackoverflow.com/questions/3026127...41#3026141 17:38
oh and the accepted answer here stackoverflow.com/questions/3738919...t-getclass
arnsholt masak: Oooh, so given a "class Foo { ... }" "a == b", where both a and b contain the Foo.class object may or may not be true, depending on deep and mystical peculiarities of how the class objects were obtained? 17:39
17:39 ZoffixW left
masak arnsholt: there you go. 17:39
psch that is interesting
arnsholt Freaky!
psch class loader determins the class token
Coleoid_north Yep, 'self' is all through the doc, I just focussed too narrowly on the object construction section. Thanks, ZoffixW and masak!
masak yup
I had completely forgotten it, but for a brief while we wrote `self.foo` in Perl 6 as `./foo` 17:40
psch so with multiple classloaders we can't even be sure if any given class is equals another..?
i wonder if that already happens in nqp-j somewhere :P
masak I suggest we find out 17:41
[Coke] masak: nifty.
psch i think every P6Opaque is at least loaded with the same class loader, but interop uses a different one 17:42
i'm not sure if each interop use reuses that classloader or not, though
so it probably isn't a problem for normal r-j use
masak I *think* the solid workaround is to do a mutual .isAssignableFrom check on the two class objects.
17:43 Coleoid_north left 17:45 _mg_ joined
psch heh, one SO question about this has an answer suggesting stringy comparison... :) 17:45
17:47 nine_ is now known as nine
nine Ah...finally me again 17:47
17:50 Actualeyes left
masak psch: stringy comparison would be unwise. 17:54
psch: at least if you have something against false positives.
17:56 sufrostico joined
arnsholt Indeed 17:57
I'm reminded of a masak++ quote on doing things stringly: "Like a barbarian!" =D
18:00 cdg left 18:04 tomboy64 left 18:05 tomboy64 joined
nine I need to get the current position in a file after reading a couple of lines. /win 40 18:05
18:05 espadrine_ left 18:06 YP-QMUL-W joined
MadcapJake elm-lang.org/blog/farewell-to-frp sounds like supplies right? 18:08
masak arnsholt: I said that? :P 18:09
(anyway, present me agrees.)
18:12 |2701 joined 18:15 sufrostico left
arnsholt masak: irclog.perlgeek.de/perl6/2016-03-20#i_12211922 =) 18:22
No exclamation mark, as it turns out, but otherwise correct =)
masak aha :) 18:28
oh, that bit of coding was fun.
it did lead to some actual commits in a branch
I've yet to write it up as a blog post, but I still want to
and yes, I did end up comparing strings, like a barbarian: github.com/masak/007/commit/6baecb...67f1ffdb13 18:29
18:32 dvinciguerra joined 18:39 spider-mario joined, acrussell joined, acrussell left 18:41 uvtc joined, acrussell joined
ufobat heya :) 18:41
18:42 |2701 left, |2701 joined, uvtc left, uvtc joined 18:43 grondilu left 18:44 sjoshi joined, grondilu joined 18:46 jjido_ joined
uvtc Just read on p6weekly about TimToady's "Perl 6: Believe it or not!" keynote coming up this month at OSCON. Hoping a good recording of it will be available. 18:50
18:51 Amnez777 joined 18:53 uvtc left 18:56 ZoffixW joined
ZoffixW m: my \Ε = 42; my \E = 1295; say E + Ε; 18:57
camelia rakudo-moar 9c8989: OUTPUT«1337␤»
ZoffixW Bug :P
moritz Zoffixbug :-) 18:59
ZoffixW :} 19:00
masak looks fine to me. 19:01
.u ΕE
yoleaux U+0045 LATIN CAPITAL LETTER E [Lu] (E)
U+0395 GREEK CAPITAL LETTER EPSILON [Lu] (Ε)
19:02 sno joined
ZoffixW m: sub infix:<⁤> { $^a + $^b }; say 2⁤2 19:02
camelia rakudo-moar 9c8989: OUTPUT«4␤»
ZoffixW Magic trick! :D
19:05 Guest44583 is now known as ponbiki 19:06 rindolf joined
moritz ZoffixW: there are times when you scare me :-) 19:06
ZoffixW heh 19:07
.u ⁤
yoleaux U+2064 INVISIBLE PLUS [Cf] (<control>)
nine WAT?
19:11 yqt joined
jnthn .u INVISIBLE 19:16
yoleaux U+2062 INVISIBLE TIMES [Cf] (<control>)
U+2063 INVISIBLE SEPARATOR [Cf] (<control>)
U+2064 INVISIBLE PLUS [Cf] (<control>)
geekosaur .u 2061 19:17
jnthn m: say "a\c[INVISIBLE SEPARATOR]b"
camelia rakudo-moar 9c8989: OUTPUT«a⁣b␤»
yoleaux U+2061 FUNCTION APPLICATION [Cf] (<control>)
jnthn hah, it really is an invisible separator
m: say "a\c[INVISIBLE SEPARATOR]b".chars
camelia rakudo-moar 9c8989: OUTPUT«3␤»
jnthn Not *that* invisible, though :)
ufobat whats the difference between a method foo($e) { $.e = $e} and method foo($e) { self.e = $e} or what could cause a 'Cannot assign to a readonly variable or a value' with a '$.e = $e'. for 'has $.e is rw;' 19:18
moritz ufobat: it shouldn't cause that problem; but you can still try to assign to $!e directly 19:21
19:21 acrussell left
moritz m: class A { has $.e is rw; method foo($e) { self.e = $e } }; my $x = A.new; $x.foo(42); say $x.e 19:21
camelia rakudo-moar 9c8989: OUTPUT«42␤»
moritz m: class A { has $.e is rw; method foo($e) { $!e = $e } }; my $x = A.new; $x.foo(42); say $x.e
camelia rakudo-moar 9c8989: OUTPUT«42␤»
ufobat moritz, yeah, i did that.. but then something else seems to be strange. i'll try to reduce the code to a tiny example. 19:22
thanks
moritz ufobat: .e is a virtual method call, so if you override that in a subclass, it might cause weird behavior
ufobat hm.. but thats not the case
19:23 acrussell joined
ZoffixW m: class A { has $.e; method foo($e) { self.e = $e }; }; A.new.foo: 42 19:24
camelia rakudo-moar 9c8989: OUTPUT«Cannot modify an immutable Any␤ in method foo at /tmp/PqoH6njfG5 line 1␤ in block <unit> at /tmp/PqoH6njfG5 line 1␤␤»
ZoffixW Your error is somewhere else, since the error is different ^
ufobat aye
19:31 sno left
ufobat whats the sense behind the '$, $value' in this code: Proxy.new( FETCH => { $!env }, STORE => -> $, $value { 19:33
skids One is what you are storing into, iirc. 19:34
ZoffixW m: my $x := Proxy.new( FETCH => { ; }, STORE => { say $^a.WHAT; say $^b.WHAT }); $x = 42 19:35
camelia rakudo-moar 9c8989: OUTPUT«(Proxy)␤(Int)␤»
ZoffixW Seems to be
19:36 rindolf left
ZoffixW And since the question is vague: $, $value takes two parameters, similar to $foo, $bar, except it ignores the first argument. 19:36
m: my $x := Proxy.new( FETCH => { ; }, STORE => method ($a, $b) { say $a.WHAT; say $b.WHAT }); $x = 42 19:37
camelia rakudo-moar 9c8989: OUTPUT«Too few positionals passed; expected 3 arguments but got 2␤ in method <anon> at /tmp/QpJ01m4Vzx line 1␤ in block <unit> at /tmp/QpJ01m4Vzx line 1␤␤»
ZoffixW ufobat, where is that from? I wonder if it's better rewritten using `method` instead
ufobat i think the method is automatically creating the "self" 19:38
bailador :(
github.com/ufobat/Bailador/blob/ma...Context.pm
i find the whole Bailador::Context strange 19:39
19:40 jjido_ is now known as jjido
ufobat but so far i am thinking maybe this makes some sense that i just dont get yet 19:40
but there is a bug because in line 21 and 22 it invokes the methods in the request rather then "resetting" it github.com/ufobat/Bailador/blob/ma...est.pm#L57 19:41
19:42 domidumont left
ufobat i wanted to fix is and add a method reset and then, boom my error from above 19:42
skids ZoffixWin: the FETCH is actually supposed to have a $ as well, but there's smarts in there to fudge it if you don't provide a 1-ary. 19:43
I think that's mainly so you can get a unique ID from the Proxy object.
ZoffixW ufobat, ah, I see why the block form was used. method form would make those attributes inaccessible
m: class Foo { has $!foo = 42;method bar { my $x := Proxy.new( FETCH => { ; }, STORE => method ($a) { say $!foo; } ); $x = 42 } }; Foo.new.bar
camelia rakudo-moar 9c8989: OUTPUT«-> ;; $_? is raw { #`(Block|71611040) ... }␤»
ZoffixW m: class Foo { has $!foo = 42;method bar { my $x := Proxy.new( FETCH => { ; }, STORE => sub ($, $a) { say $!foo; } ); $x = 42 } }; Foo.new.bar
camelia rakudo-moar 9c8989: OUTPUT«42␤»
19:44 skink joined, marcusramberg left 19:45 jjido_ joined
ZoffixW m: my $x := Proxy.new( FETCH => { say 'Weee'; }, STORE => { say $^a.WHAT; say $^b.WHAT }); $x = 42; say $x 19:45
camelia rakudo-moar 9c8989: OUTPUT«(Proxy)␤(Int)␤Weee␤Weee␤Weee␤Weee␤Weee␤Weee␤Weee␤Weee␤Weee␤Weee␤Weee␤Weee␤True␤»
19:46 cdg joined
ZoffixW m: my $x; quietly $x 19:46
camelia rakudo-moar 9c8989: OUTPUT«WARNINGS for /tmp/427B9l5C6p:␤Useless use of $x in sink context (line 1)␤»
moritz wow, bitkeeper is now open source
psch m: my $x; quietly { $x }
camelia ( no output )
19:46 cdg left
ZoffixW Thanks. 19:47
19:47 jjido left
diakopter anyone have a solid comparison of gitlab vs github? 19:47
yoleaux 2 May 2016 07:41Z <psch> diakopter: 'twas about dalek, but moritz++ took care off that
19:47 cdg joined
ZoffixW diakopter, gitlab is slow as hell, so I only use it for a couple of repos that I have to keep private (it offers private repos for free) 19:47
19:48 jjido_ is now known as jjido
diakopter is paid gitlab faster [if that's even possible 19:48
]?
ZoffixW ¯\_(ツ)_/¯
perlpilot bitbucket offers private repos for free too and it's not slow as hell
FYI 19:49
19:49 huggable joined 19:50 ZoffixW left
diakopter ohh 19:50
skids One of the database app devels here was griping about gitlab, but mainly he was just angry due to some data loss occurring in the comments on an issue and thought comments should be revision controlled as well. Or something.
diakopter data people want more data 19:51
19:52 YP-QMUL-W left 19:53 rindolf joined
skink If I don't care about what a pointer points to, can I just use my Pointer $ptr and pass that? 19:53
MadcapJake skink: it needs to be generated by a prior nativecall sub 20:02
skink Ah, I see 20:08
ufobat i dont find it :-( and it seems to work if i reduce the code.. gist.github.com/ufobat/445b31daef2...fc95c80455 20:10
20:12 darutoko left
ufobat aha! 20:16
20:16 prammer joined
skink Hm... MadcapJake, if I needed to have a pre-existing ULONG_PTR, would that be my Pointer[ulong] .= new? 20:16
ufobat gist.github.com/ufobat/b32e8825640...6b51672a9f 20:18
MadcapJake m: my Pointer[ulong] $l .= new; dd $l 20:19
camelia rakudo-moar 9c8989: OUTPUT«5===SORRY!5===␤Type 'Pointer' is not declared␤at /tmp/9MUgmvzMj8:1␤------> 3my Pointer7⏏5[ulong] $l .= new; dd $l␤Malformed my␤at /tmp/9MUgmvzMj8:1␤------> 3my7⏏5 Pointer[ulong] $l .= new; dd $l␤␤»
MadcapJake m: use NativeCall; my Pointer[ulong] $l .= new; dd $l
camelia rakudo-moar 9c8989: OUTPUT«NativeCall::Types::Pointer[NativeCall::Types::ulong] $l = NativeCall::Types::Pointer[NativeCall::Types::ulong].new(0)␤»
MadcapJake looks like you can actually create a generic pointer this way too, not sure if that will work for you though
m: use NativeCall; my Pointer $p .= new; dd $p 20:20
camelia rakudo-moar 9c8989: OUTPUT«NativeCall::Types::Pointer $p = NativeCall::Types::Pointer.new(0)␤»
skink Well I never use the pointer for anything but passing between a few C functions
So that's why I was wondering about just using a generic one
20:21 _mg_ left
MadcapJake what do these C functions expect to be at the end of the pointer? 20:22
skink ULONG_PTR which is actually __int3264 which is actually __int32 or __int64 depending on environment :) 20:23
20:23 firstdayonthejob joined
MadcapJake __int32 as in int32? 20:24
skink Seems like an alias yeah
Specifically I have two functions which require an HCRYPTPROV, and one that requires a pointer to an HCRYPTPROV, where HCRYPTPROV is typedef'd as ULONG_PTR 20:25
MadcapJake yeah just Pointer[int64] should work (or int32)
MadcapJake typedefs are why I hate C code :P
MadcapJake doesn't know why he used /me there xD
skink An alias of an alias of an alias
20:25 buharin left
psch m: use NativeCall; sub malloc(int32 $size) is native {*}; my $ptr = malloc(8); say $ptr.perl 20:26
camelia rakudo-moar 9c8989: OUTPUT«Mu␤»
psch uhm, not quite apparently vOv
but that's hacky and "don't do that" anyway i guess :P
20:27 mr-foobar joined
skink Because the type of ULONG_PTR changes according to environment, I wasn't sure if specifically Pointer[int32] or [int64] would cause it to crash and burn 20:27
psch skink: it probably would
masak .oO( OOLONG_PTR )
psch at least that's what my (limited) NC experience points at... :)
ufobat good night :-) 20:28
psch skink: you have to have a way to make sure you have the same size as the env, somehow
20:28 nicq2 joined 20:31 acrussell left
masak 'night, #perl6 20:31
20:31 TEttinger joined 20:32 nicq2 left
MadcapJake m: use NativeCall; BEGIN constant ARCHINT = $*KERNEL.arch.ends-with('64') ?? int64 !! int32; my Pointer[ARCHINT] $i .= new; dd $i; # <-- skink 20:34
camelia rakudo-moar 9c8989: OUTPUT«NativeCall::Types::Pointer[int64] $i = NativeCall::Types::Pointer[int64].new(0)␤»
MadcapJake nine++ # for that idea 20:35
skink Neat, I'll keep that in mind 20:37
geekosaur betting that has platform issues 20:38
(OS X, at minimum)
skink ... O_O
Cannot locate symbol 'CryptAcquireContext' in native library 'Advapi32.dll'
msdn.microsoft.com/en-us/library/w...85%29.aspx
20:39 itaipu left 20:40 firstdayonthejob left 20:41 hotel joined 20:42 sno joined
skink The docs, they lie! 20:43
20:43 hotel_california left, sjoshi left
skink geekosaur, This is for the Windows-specific submodule 20:43
20:47 jjido left 20:51 firstdayonthejob joined 20:53 sortiz joined, jjido joined
sortiz \o #perl6 20:53
skink hey sortiz
20:53 kaare_ left 20:57 jjido left 21:00 prammer left 21:04 skids left 21:05 jjido joined 21:06 lostinfog left
sortiz That you are on a 64 bits platform don't imply that 'long' is 64bits. That is valid LP64 systems like linux, but no for LLP64, like windows. 21:06
*valid on 21:07
21:07 ZoffixWin left 21:08 cdg left 21:15 Actualeyes joined
MadcapJake geekosaur: well you could make the condition more robust, I just left it small as an example. 21:16
geekosaur heh. OS X will defeat you, I'm afraid. 21:17
admittedly the only systems where this actually matters are ones running 10.5, since 10.6 and on are 64 bit
but 10.5 systems running 32 bit kernels can run 64 bit userspace programs 21:18
MadcapJake sortiz: I think in this specific case, the typedefs boil down to ints
geekosaur and finding out what's actually going on programmatically is insanely difficult
sortiz Well yes, all those are ints.
21:19 AlexDaniel joined
MadcapJake Oi! Well last time I did anything on a Mac was pre OSX so I don't have a clue 😲 21:19
AlexDaniel m: say <1 2 3> »+« <4 5 6>
camelia rakudo-moar 9c8989: OUTPUT«(5 7 9)␤»
AlexDaniel m: say <1 2 3> «+» <4 5 6>
camelia rakudo-moar 9c8989: OUTPUT«(5 7 9)␤»
geekosaur (10.4 could also do that trick but only libSystem (think libc) had a 64 bit version so it didn't matter much) 21:20
21:21 _dolmen_ joined
MadcapJake Doesn't $*KERNEL or $*DISTRO provide what you would need to decide what int to use? 21:22
21:23 itaipu joined
lizmat m: say $*KERNEL.bits 21:23
camelia rakudo-moar 9c8989: OUTPUT«64␤»
geekosaur but is that about the kernel, or about the CPU? a 32-bit OS X kernel has no problem running 64-bit userspace code on a 64-bit-capable processor 21:24
MadcapJake Nice! Does that work on OSX?
lizmat $ 6 'say $*KERNEL.bits; say $*KERNEL.name' 21:25
64
darwin
geekosaur I think you can get information about whether the CPU is 64 bit capable from sysctl, but not from much else
21:25 Actualeyes left
geekosaur (and if you're running 10.6 or later then it is definitely 64 bit as Apple dropped the 32-bit kernel) 21:25
lizmat MadcapJake: mind you, it's pretty naive: $!bits //= $.hardware ~~ m/_64|w|amd64/ ?? 64 !! 32; # naive approach
MadcapJake Ahh that's what I was wondering 21:26
21:26 kurahaupo left
sortiz Yep, but what I'm saying is that in Windows64 sizeof(long) == 4, but in Linux64 sizeof(long) == 8; and MoarVM know that so 'long' is the correct type in both systems. 21:26
geekosaur which is why I said it's only really relevant for 10.5 and maybe 10.4 (but not practically as no 64-bit libs to speak of)
21:27 kurahaupo joined
MadcapJake sortiz: would be nice if the same was true for int 21:28
psch method bits { $!bits //= $.hardware ~~ m/_64|w|amd64/ ?? 64 !! 32; # naive approach }
just fyi
21:28 cdg joined
geekosaur that said you can run stuff in 32 bit mode with the arch command --- and configure scripts can't generally tell you did it and will try to build for 64-bit 21:29
21:29 cdg left
psch oh lizmat++ pasted that already 21:29
psch goes back to other things, instead of skimming and repeating other people... :)
21:29 cpage_ joined, cdg joined
sortiz m: use NativeCall; nativesizeof(size_t).say; # For the size of pointers. 21:30
camelia rakudo-moar 9c8989: OUTPUT«8␤»
sortiz afk& 21:33
21:36 TEttinger left 21:40 jjido left, Technaton joined 21:43 _dolmen_ left 21:47 dvinciguerra left 21:50 sufrostico joined 21:51 hotel left, hotel_california joined 21:53 jeek left, Su-Shee joined
Su-Shee good evening.. is Zoffix still grooming the perl6.org website? 21:53
timotimo github.com/perl6/perl6.org/commits/master - last thing he did was for the "recent blog posts" thing 21:55
are you asking because you have a feature request or bug report? 21:58
Su-Shee just something minor, really. nothing important. 21:59
22:04 lichtkind__ left
skink Can someone on Windows 'use NativeCall; sub CryptAcquireContext is native('Advapi32') { * }' 22:10
I'm wondering if this is an appveyor thing
22:14 eyck left 22:15 eyck joined 22:17 Sgeo joined
AlexDaniel From docs: “I will not be explaining Perl 6 syntax in detail.” … who you? :D 22:18
grondilu skink: works fine for me 22:21
I have no idea what that does though 22:22
skink Okay, interesting. It's not working on AppVeyor
On AppVeyor I get Cannot locate symbol 'CryptAcquireContext' in native library 'Advapi32.dll'
22:22 hotel joined 22:23 hotel_california left
grondilu FYI I was using rakudo* on Windows 10 22:23
22:25 RabidGravy left 22:26 wamba left
skink Right now Crypt::Random::Win uses RtlGenRandom() for entropy because it was really, really simple to bind to 22:26
That's one of the functions CryptGenRandom() depends upon 22:27
22:28 itaipu left 22:36 cdg left 22:40 cpage_ left
skink grondilu, Any chance you'd be willing to lend a hand for a minute? 22:41
22:46 BenGoldberg joined
grondilu skink: hang on 22:55
22:55 Actualeyes joined
grondilu skink: ok, I'm available now. 22:55
22:58 hotel_california joined 22:59 hotel left 23:00 Technaton left
sortiz skink, ping 23:00
skink sortiz, pong 23:01
sortiz Try "sub CryptAcquireContextA(...) is native('Advapi32')"; # Note the A at end. 23:02
skink There's an A suffix for ANSI-encoded string and W for Unicode
But according to MS' own policy regarding that, there should be a generic function without a suffix 23:03
sortiz Yep, and in C++ you don't need it, but for NC you need to add that, 'cus the library provide both, but only those.
skink Hm, interesting 23:04
Shouldn't we prefer the Unicode version then?
Not that it matters in this case, I'm passing NULL there
sortiz Ie the compiler chooses one, depending on Defines.
No, 'cus if use the Wide, you should supply encoded Str in utf-16. :-) 23:05
psch m: my $w = "foo".encode("utf-16"); say $w.WHAT 23:09
camelia rakudo-moar 9c8989: OUTPUT«(utf16)␤»
BenGoldberg m: utf16.new("foo").say; 23:10
camelia rakudo-moar 9c8989: OUTPUT«Type check failed in initializing element #0 to utf16; expected uint16 but got Str ("foo")␤ in block <unit> at /tmp/5ILcgxVNce line 1␤␤Actually thrown at:␤ in any at gen/moar/m-Metamodel.nqp line 3055␤ in block <unit> at /tmp/5ILcgxVNce line …»
23:12 firstdayonthejob left 23:13 cpage_ joined
sortiz In NC, the signature needs "Str is encoding('utf16'),… 23:15
(for the Wide versions) 23:16
psch multi trait_mod:<is>(Parameter $p, :$encoded!) 23:17
sortiz Oops
psch no worries, i had to look it up :)
sortiz The source is the best reference. 23:18
23:24 ptolemarch left 23:25 cdg joined 23:27 spider-mario left 23:28 Actualeyes left 23:33 mr-foobar left 23:34 BenGoldberg left, mr-foobar joined
skink sortiz, Yay, symbol found, just regular errors now :) 23:50
Progress!
sortiz :) 23:51
23:53 TEttinger joined 23:54 jervo joined 23:55 jeek joined
skink Yup, exactly as expected. ERROR_INVALID_PARAMETER 23:56
"This is most often a pointer that is not valid."
TimToady
.oO(In NC, your signature must declare your birth gender...)
23:57