»ö« 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
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
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
hotel is absolutely not an expert*** 00:12
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
hotel well maybe yours is better? :3 00:31
skink Actually, that function can only handle single pem files, not chained cert pem file ^^ 00:37
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
skink Most commonly seen one will probably be "Certificate verification error: X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY", for example 00:42
skink The only other real option being openssl killing the socket upon error :) 00:52
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
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
hotel maybe it's my router then 01:15
timotimo could be something your OEM installed
hotel could be
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
timotimo lenovo also put some real terrible shit onto their devices last year 01:16
mst consumer only though 01:17
my pet toys were basically fine
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
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 :) :) :)
hotel s/on the agent VMs// 01:32
;-) 01:33
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
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
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, *%_)
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
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
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…»
ugexe m: sub foo returns Seq { }; say foo.perl 04:20
camelia rakudo-moar df4eb8: OUTPUT«Nil␤»
eshansingh Hello? 04:27
tony-o hello? 04:34
MadcapJake wrote a quick dailyprogrammer before bed: www.reddit.com/r/dailyprogrammer/c...ph/d2zlbl7 05:21
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 :-)
DrForr For those not on the book of Faces, I have 27 confirmed attendees for the tutorial next week. 06:16
moritz wow 06:51
moritz is this going to be a screencast? 06:52
RabidGravy weeee 07:42
moritz oomphf 07:45
ufobat morning! 07:54
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
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
DrForr Nod, if it brings anyone into the community I'll have done my work :) 08:07
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
dalek osystem: c8ac6fa | (Siavash Askari Nasr)++ | META.list:
Add WebService::FootballData

see gitlab.com/CIAvash/WebService-FootballData
09:39
RabidGravy cool 09:40
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
Ven m: my $a //= 3 11:49
camelia ( no output )
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
dalek osystem: ca47798 | (Siavash Askari Nasr)++ | META.list:
Add App::Football

See gitlab.com/CIAvash/App-Football
12:15
tadzik oh, a gitlab project :) 12:31
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 :\
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
RabidGravy because you can't have too many passive low pass gates 12:41
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
pmurias hi 12:55
tony-o hi pmurias
[Coke] yawns 13:03
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␤»
[Coke] Need a volunteer to do the May compiler release. 13:03
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
pmurias tony-o: having the result list in a more vertical format like on modules.perl6.org would be nicer 13:44
* more horizontal
tony-o pmurias: check that out 14:07
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
tony-o pmurias++ MadcapJake++ 14:15
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…»
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(...)
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␤␤»
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!
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
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.
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
ZoffixW perlpilot, are there similar docs for R* release? 14:49
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
MadcapJake I found a JS syntax highlighter that (iiuc) supports heredocs! alexgorbatchev.com/SyntaxHighlighter/ 14:53
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
MadcapJake RFC: github.com/perl6/user-experience/issues/12 14:57
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␤»
llfourn m: (await (start {},start {})).^name.say 14:59
camelia rakudo-moar 376f50: OUTPUT«Seq␤»
llfourn moritz: the mystery is solved. await LIST returns a Seq -- it doesn't actually behave like .allof 14:59
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␤»
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
dalek ar: 6c23c19 | PerlJam++ | tools/star/ (3 files):
Add alternate nick to docs
15:04
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.
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?
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...
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.
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
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)
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
ZoffixW m: say  5 + 10 17:06
camelia rakudo-moar 9c8989: OUTPUT«15␤»
ZoffixW :trollface:
ZoffixW m: my $x                      = 42; say $x 17:07
camelia rakudo-moar 9c8989: OUTPUT«42␤»
ZoffixW ^_^
[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
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
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)
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
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
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
ZoffixW m: class Foo { submethod BUILD { self.frob }; method frob { say 'weeee' } }; Foo.new 17:34
camelia rakudo-moar 9c8989: OUTPUT«weeee␤»
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
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
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.
psch heh, one SO question about this has an answer suggesting stringy comparison... :) 17:45
nine Ah...finally me again 17:47
masak psch: stringy comparison would be unwise. 17:54
psch: at least if you have something against false positives.
arnsholt Indeed 17:57
I'm reminded of a masak++ quote on doing things stringly: "Like a barbarian!" =D
nine I need to get the current position in a file after reading a couple of lines. /win 40 18:05
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.)
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
ufobat heya :) 18:41
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
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] (Ε)
ZoffixW m: sub infix:<⁤> { $^a + $^b }; say 2⁤2 19:02
camelia rakudo-moar 9c8989: OUTPUT«4␤»
ZoffixW Magic trick! :D
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?
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
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
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
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
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
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
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␤»
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␤»
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 )
ZoffixW Thanks. 19:47
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
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
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
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
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
ufobat aha! 20:16
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
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
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
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
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
masak 'night, #perl6 20:31
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
skink The docs, they lie! 20:43
skink geekosaur, This is for the Windows-specific submodule 20:43
sortiz \o #perl6 20:53
skink hey sortiz
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
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.
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
MadcapJake Doesn't $*KERNEL or $*DISTRO provide what you would need to decide what int to use? 21:22
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
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
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)
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
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
psch oh lizmat++ pasted that already 21:29
psch goes back to other things, instead of skimming and repeating other people... :)
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
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
skink Can someone on Windows 'use NativeCall; sub CryptAcquireContext is native('Advapi32') { * }' 22:10
I'm wondering if this is an appveyor thing
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'
grondilu FYI I was using rakudo* on Windows 10 22:23
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
skink grondilu, Any chance you'd be willing to lend a hand for a minute? 22:41
grondilu skink: hang on 22:55
grondilu skink: ok, I'm available now. 22:55
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 …»
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
skink sortiz, Yay, symbol found, just regular errors now :) 23:50
Progress!
sortiz :) 23:51
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