»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! | feather will shut down permanently on 2015-03-31
Set by jnthn on 28 February 2015.
00:10 Akagi201_ left 00:11 Akagi201 joined 00:12 Sqirrel joined
timotimo i'm not feeling 100% up to the task of writing the weekly before i've had some sleep 00:13
TimToady ugexe: I didn't see the sig starting at line 108, so no -> needed after all 00:17
TimToady shouldn't try to diagnose other people's problems when undergoing the plague
00:19 Akagi201 left
timotimo man, TimToady, you confused the F out of me 00:21
it's difficult to make sense of things like that at 1am :)
ugexe for what its worth i figured out my problem. need to add a check before create-include-spec returns an invalid result for parse-include-spec 00:42
i just have to digest this a little more before i write a pr 00:43
00:46 BenGoldberg left 00:50 BenGoldberg joined 00:51 adu joined 00:54 eternaleye left 01:02 slavik left 01:14 eternaleye joined 01:16 adu left 01:17 slavik joined 01:20 laouji joined 01:45 ilbot3 left 01:50 ilbot3 joined 01:57 slavik left 02:11 noganex_ joined, slavik joined 02:13 noganex left 02:36 chenryn joined 03:05 yeahnoob joined 03:06 kaare_ joined 03:08 BenGoldberg left 03:19 slavik left 03:27 adu joined, adu left 03:29 adu joined 03:43 laouji left, laouji joined 03:46 chenryn left 03:47 laouji left 03:51 slavik joined 03:53 KCL joined 03:56 KCL_ left 04:04 FROGGS_ joined 04:06 Sqirrel left 04:08 FROGGS left 04:22 laouji joined 04:37 raviko joined, raviko left 04:41 jack_rabbit joined 04:46 chenryn joined 05:03 bcode left, skids left 05:04 bcode joined
dalek p: 041e1e2 | TimToady++ | src/QRegex/Cursor.nqp:
knock a few % off stage parse

1) Avoid creating Match objects we'll just throw away. 2) Avoid traversing the cstack when we know nothing is wanted from it.
05:10
05:12 Sqirrel joined 05:14 travis-ci joined
travis-ci NQP build failed. TimToady 'knock a few % off stage parse 05:14
travis-ci.org/perl6/nqp/builds/57435006 github.com/perl6/nqp/compare/35c58...1e1e21f993
05:14 travis-ci left 05:20 adu left 05:39 Sqirrel left 05:40 Sqirrel joined
dalek kudo/nom: aff1762 | TimToady++ | tools/build/NQP_REVISION:
bump NQP rev
05:41
kudo/nom: 13afa62 | TimToady++ | src/core/Cursor.pm:
similar speedup for P6's MATCH maker
kudo/nom: 1defad9 | TimToady++ | src/core/Cursor.pm:
also do the $sawcaps optimization
05:46 Patterner joined 05:48 Psyche^ left 06:00 jack_rabbit left 06:04 jack_rabbit joined
dalek kudo/nom: a8435bb | TimToady++ | src/core/Cursor.pm:
unbreak JVM build, oops
06:05
06:13 virtualsue joined 06:17 cdc left, jack_rabbit left
jnthn morning, #perl6 06:22
06:24 FROGGS_ left
jnthn TimToady: I see failing tests in nqp's "make test" in t/qregex/01-qregex.t 06:24
06:30 jack_rabbit joined, yvan1 left
TimToady hmm, well, it passes rakudo's tests...I guess I'll have to look at that tomorrow 06:31
it wouldn't happen to be jvm tests it's failing, would it, cuz there are #if thingies in P6's Match that aren't in nqp's Match 06:32
but basically I'm running a fever, and should probably rest soon... 06:33
looks like it lost track of <( and )> offhand 06:36
jnthn No, got it on Moar
yes, rest, it can wait for tomorrow
Not in the way of anything I plan to do today, anyways :) 06:37
TimToady probably needs to count <( and )> under $sawcaps somehow
m: $_ = "foo bar baz"; say / ^ \w+ ' ' <( \w+ )> ' ' \w+ $ / 06:40
camelia rakudo-moar ae6863: OUTPUT«␤»
TimToady m: $_ = "foo bar baz"; say / ^ \w+ ' ' ( \w+ ) ' ' \w+ $ /
camelia rakudo-moar ae6863: OUTPUT«␤»
TimToady hmm
m: $_ = "foo bar baz"; say m/ ^ \w+ ' ' ( \w+ ) ' ' \w+ $ /
camelia rakudo-moar ae6863: OUTPUT«「foo bar baz」␤ 0 => 「bar」␤»
TimToady m: $_ = "foo bar baz"; say m/ ^ \w+ ' ' ( \w+ ) ' ' \w+ $ / 06:41
camelia rakudo-moar ae6863: OUTPUT«「foo bar baz」␤ 0 => 「bar」␤»
TimToady m: $_ = "foo bar baz"; say m/ ^ \w+ ' ' <( \w+ )> ' ' \w+ $ /
camelia rakudo-moar ae6863: OUTPUT«「bar」␤»
TimToady they seem to work at the P6 level
oh, looks like not recompiled yet
06:42 chenryn left
TimToady yeah, they're busted here, so we're just not testing <( and )> well in roast, I guess 06:42
06:43 Woodi left, FROGGS joined, Woodi joined
TimToady yeah, they work if I put another capture in, so it's the sawcaps thing 06:44
well, that's something probably oughta be known at compile time anyway 06:45
[Tux] I was doing some moves (location on FS) and now I get Circular module loading detected involving module 'Text::CSV'
How do I track the couse of that?
FROGGS [Tux]: try REKUDO_MODULE_DEBUG=1 yourscript.pl 06:46
[Tux]: err, RAKUDO_MODULE_DEBUG=1
06:47 spider-mario left, kst left
[Tux] gist.github.com/Tux/a0ec0c9668ae3bebe950 06:47
jnthn TimToady: Aye, sounds like we need more roast tests :)
06:48 tinyblak left, tinyblak joined
[Tux] FWIW p6 = exec perl6 -I. -Ilib "$@" 06:49
FROGGS [Tux]: what's in /pro/3gl/CPAN/rakudobrew/moar-nom/install/share/perl6/site/44 ?
[Tux] gist.github.com/Tux/8dc3bcb1cd82a7c23d3b 06:50
looks like Slang::Tuxic 06:51
dalek p: 73de526 | TimToady++ | src/QRegex/Cursor.nqp:
temporarily disable sawcaps part of optimization
06:52
FROGGS aye
06:52 Ven joined
FROGGS [Tux]: where is the source of Text-CSV6? 06:52
06:53 jack_rabbit left, tinyblak left
dalek kudo/nom: a3b4710 | TimToady++ | / (2 files):
bump NQP to get temporary disable of sawcaps opt
06:53
[Tux] I moved Text::CSV from test-t.pl to lib/Text/ 06:54
ah, on git?
github.com/Tux/CSV
FROGGS yes, so I can take a look 06:55
[Tux] where the move did not yet happen
$ git move test-t.pl lib/Text/CSV.pm
06:56 travis-ci joined
travis-ci NQP build passed. TimToady 'temporarily disable sawcaps part of optimization' 06:56
travis-ci.org/perl6/nqp/builds/57441340 github.com/perl6/nqp/compare/041e1...de5269f3ae
06:56 travis-ci left
[Tux] remove MAIN from that file into gist.github.com/Tux/11686e410ea6418b465a (new test-t.pl) 06:56
06:57 fhelmberger joined 06:58 jack_rabbit joined
FROGGS hmmm, I can't reproduce it with a simple test case and I have not time atm to prepare your repo to test it 07:01
you probably want to golf it down 07:02
[Tux]: I know what happens 07:05
[Tux]: /pro/3gl/CPAN/Text-CSV6/Text/CSV.pm is still a symlink to t-test.pl
[Tux] not here 07:06
FROGGS and what is in /pro/3gl/CPAN/Text-CSV6/Text/CSV.pm ? 07:08
[Tux] 59247920 lrwxrwxrwx 1 merijn 12 2015-01-29 15:59:45 /pro/3gl/CPAN/Text-CSV6/Text/CSV.pm -> ../test-t.pl
right 07:09
thnx!
FROGGS :o)
[Tux] FROGGS++, HERO!
FROGGS .oO( Confidence in module loading restored ) 07:10
:D
[Tux] FWIW, this means that another serious slowdown in the core has been fixed! 07:11
dalek ast: 9266f4d | jnthn++ | S02-types/capture.t:
Test for RT #75850.
07:12
07:14 telex left, jack_rabbit left 07:16 abraxxa joined, telex joined, jack_rabbit joined 07:18 Rounin joined 07:26 Sqirrel left 07:28 Sqirrel joined 07:34 KCL left, brrt joined 07:35 jack_rabbit left 07:36 KCL_ joined 07:37 espadrine_ joined
FROGGS .tell abraxxa 'is rw' native int/num params are now supported, though unsinged ints are cames back as signed and therefore mangle their value 07:38
yoleaux FROGGS: I'll pass your message to abraxxa.
07:38 RabidGravy joined 07:39 tinyblak joined 07:40 lizmat joined 07:41 diana_olhovik joined
lizmat good *, #perl6! 07:41
FROGGS hi lizmat! \o/
lizmat hi FROGGS 07:42
lizmat is glad the snappiness level has decreased on #perl6
jnthn o/ lizmat
lizmat hi jnthn
07:42 chenryn joined
abraxxa FROGGS: seen it yesterday, thanks 07:43
yoleaux 07:38Z <FROGGS> abraxxa: 'is rw' native int/num params are now supported, though unsinged ints are cames back as signed and therefore mangle their value
abraxxa FROGGS: is it in when I install moar from the nom branch?
lizmat however, I'm still not sure what to work on now
FROGGS abraxxa: yes
07:43 rurban_ joined
abraxxa brewing 07:44
lizmat the -Ofun has been drained from my system pretty much
FROGGS abraxxa: also here is an example: github.com/rakudo/rakudo/blob/nom/...-rw-args.t
[Tux] lizmat, speed in Regex?
FROGGS :/
abraxxa FROGGS++ #thanks
i've seen the work on unsigned ints too, do you mean they work but not with is rw? 07:45
07:45 yvan1 joined
FROGGS abraxxa: unsigned ints work with 'is rw' as long as you dont exceed the max of the signed int variant 07:45
m: my int8 $a = 50; say $a 07:46
camelia rakudo-moar a3b471: OUTPUT«50␤»
FROGGS m: my int8 $a = 127; say $a
camelia rakudo-moar a3b471: OUTPUT«127␤»
FROGGS m: my int8 $a = 128; say $a
camelia rakudo-moar a3b471: OUTPUT«-128␤»
FROGGS m: my int8 $a = 129; say $a
camelia rakudo-moar a3b471: OUTPUT«-127␤»
FROGGS see?
moritz m: my uint8 $a = 129; say $a
camelia rakudo-moar a3b471: OUTPUT«-127␤»
moritz huh.
abraxxa FROGGS: got it
07:47 Ven left
FROGGS abraxxa: that might even be enough for what you need currently 07:48
lizmat: how far is the new-io branch from merging?
abraxxa why does Perl 6 compile so quickly? 07:49
lizmat I would say, far: I'm having trouble gathering up the willingness to work on the branch
abraxxa it's way faster than p5
07:49 chenryn left
lizmat there's been no feedback about my speculation in the specs/newio branch 07:50
and the only feedback I *did* get, was ridicule
so motivated to work on it, I am not
moritz lizmat: I'm sorry to hear that
nwc10 abraxxa: good question. I'm not quite sure. Perl 5 (the C stuff) does build very quickly. The slow parts are (1) all the extensions (even in parallel) (2) the Configure script (which is not in parallel)
FROGGS well, I followed your commits and would have hooked in where I'd thought it might not be the right thing to do
moritz lizmat: and I realize that I haven't given feedback either :( 07:51
(mostly distracted by real life :( )
abraxxa nwc10: i see. does Perl6 with MoarVM not require the kind of detection the Configure script does?
FROGGS yeah, we should review it
moritz abraxxa: perl 5 does far, far more feature detection
FROGGS compiles it now
nwc10 abraxxa: possibly it *should*, but right now it's not portably to as many systems
and also, Configure dates from a time when I think that there were about 50 Unix variants
moritz abraxxa: and runs on obscure and/or ancient platforms that MoarVM has no amibitions (yet?) to support
lizmat moritz: well, you did, in the beginning: it was more like "didn't we do this already before and didn't we ditch it?"
nwc10 and it also has a bunch of knowledge to build on about 15 years of everything 07:52
moritz lizmat: yes, I remember, but that's not very much
lizmat not very helpful either
nwc10 stuff has become a lot more standard since then
also, we *are* missing stuff. For example, I discovered that the build of MoarVM with --static doesn't let you build Rakudo 07:53
lizmat in any case, I'm going to be busy today with fitness and traveliing to Amsterdam for Amsterdam.pm meeting
nwc10 On (at least Linux) we need something like -Wl,-E in the compiler flags for the link stage
but
1) I don't know what the portable apprach is
dalek kudo/nom: c2f531a | jnthn++ | src/ (2 files):
Complain on placeholders in attr initializers.

Fixes RT #78112. Includes a typed exception, for easy testing.
nwc10 2) how to fit it in
dalek ast: 7bbcda1 | jnthn++ | S32-exceptions/misc.t:
Test for RT #78112.
07:53 Silfa joined 07:54 Silfa left
abraxxa tadzik: can we switch to https for the rakudobrew repo urls? that would allow me to use it behind our proxy 07:54
nine_ lizmat is back :)
lizmat hi nine_ : not really, just online again 07:55
nine_ lizmat: would newio be on topic for the Perl QA hackathon?
07:55 chenryn joined
lizmat don't really see that as part of QA necessarily, but otherwise I wouldn't be against it 07:56
07:56 virtualsue left
nwc10 abraxxa: ideally it needs to be switchable. I have access to some machines where https needs to go via a proxy, whereas git is free 07:57
jnthn lizmat: Is newio something we have to adopt "all at once", or is it possible to review/integrate stuff from it into nom a bit at a time? 07:59
abraxxa FROGGS: i get Routine trait "is hidden_from_backtrace" called at: with current nom when installing DBIish
src/Perl6/World.nqp, line 2047 08:00
lizmat jnthn: my idea was that it would be merged into nom with all deprecations being handled
FROGGS abraxxa: can you no-paste the entire error message and the command that triggers it?
lizmat that was the original idea
some of the code in newio branch was already ported back to nom by me
moritz abraxxa: hidden_from_backtrace is deprecated in favor of hidden-from-backtrace; current DBIish has followed that, though 08:01
abraxxa FROGGS: paste.scsys.co.uk/471279
moritz ... as the warning message says
abraxxa moritz: so the line number doesn't point to the invoking code but the one throwing the warning?
moritz abraxxa: seems like, yes 08:02
jnthn lizmat: OK, understood. 08:03
abraxxa FROGGS: the oracle test segfaults 08:04
lizmat jnthn: but at this point in time, I must admit, I don't care about it much anymore
it's easier to donate 08:05
FROGGS abraxxa: what exactly?
abraxxa the Str bind which worked before 08:06
08:06 espadrine_ left
FROGGS abraxxa: can you show me the failing code? I don't know what 'Str bind' means to you 08:06
abraxxa github.com/abraxxa/DBIish/blob/mas...e.pm6#L431 08:07
08:07 Ven joined 08:08 darutoko joined
jnthn FROGGS: Did you see the fix pushed to Moar for a bug in the rw code? Dunno if it's related in any way... 08:09
abraxxa jnthn: i just build nom so the bugfix should be in, right?
FROGGS jnthn: the one I merged minutes ago? 08:10
dalek p: 02bdff1 | jnthn++ | src/vm/ (2 files):
Add constants for Unicode normalization forms.
jnthn FROGGS: Oh, the dalek output cut off before it showed you had merged it as a PR :)
abraxxa: Not unless MOAR_REVISION was bumped. 08:11
FROGGS I'll bump it..
dalek p: d559335 | FROGGS++ | tools/build/MOAR_REVISION:
bump moar revision for nativecall fix
08:12
abraxxa rebuilds nom
dalek kudo/nom: b3b241d | FROGGS++ | tools/build/NQP_REVISION:
bump nqp/moar revision for nativecall fix
08:13
FROGGS abraxxa:
abraxxa: now you can pull/build
lizmat m: sub a { 42 }; for ^1000000 { a }; say now - INIT now
camelia rakudo-moar a3b471: OUTPUT«0.59222812␤»
abraxxa should running rakudobrew again work?
lizmat m: sub a { return 42 }; for ^1000000 { a }; say now - INIT now # feels like some low-hanging optimizing fruit here
camelia rakudo-moar a3b471: OUTPUT«1.9954593␤»
dalek kudo/newio: 64ac2bd | FROGGS++ | tools/build/NQP_REVISION:
bump nqp/jvm revision for 'is rw' params in nativecall
rakudo/newio: 143f621 | FROGGS++ | t/04-nativecall/15-rw-args. (2 files):
rakudo/newio: add tests for 'is rw' params in nativecall
08:13 dalek left
lizmat aka, using return is 4x as slow 08:14
nwc10 compared with what? Falling off the end of a function?
lizmat yup
08:14 dalek joined, ChanServ sets mode: +v dalek
nwc10 that feels like something that should be on a ticket to fix. Does a ticket exist? 08:14
(possibly a post-September fix)
Ven o/, lizmat ! 08:15
abraxxa still segfaulting
lizmat hi Ven
Ven also \o, #perl6
abraxxa I'll delete my nom dir to be sure
jnthn Note that the cost may not be "return" itself per se.
But rather "breaks inlining" or similar.
08:15 eli-se joined, kjs_ joined
FROGGS abraxxa: if it still segfaults we'd need a gdb backtrace 08:15
eli-se use clang memory sanitiser as well 08:16
08:22 eli-se left
abraxxa FROGGS: yes, still fails 08:27
This is perl6 version 2015.03-182-gb3b241d built on MoarVM version 2015.03-57-g97c5ddf
how do i create a gdb stacktrace
FROGGS abraxxa: I've described it here: github.com/perl6/DBIish/issues/8#i...t-88580074 08:29
abraxxa FROGGS: the cat output from 1) doesn't include exec
08:30 darutoko left
abraxxa FROGGS: it outputs #!/bin/sh 08:31
/home/ahartmai/.rakudobrew/bin/../moar-nom/install/bin/perl6 "$@"
which again is a shell script 08:32
FROGGS abraxxa: then do: cat home/ahartmai/.rakudobrew/bin/../moar-nom/install/bin/perl6
abraxxa got it
FROGGS this should show siomething with 'exec' and path to more etc
abraxxa FROGGS: paste.scsys.co.uk/471280 08:33
FROGGS hmmm, no debugging symbols :/ 08:34
abraxxa how can I build with them?
FROGGS go to your moar dir, and do: perl Configure.pl --prefix=/home/ahartmai/.rakudobrew/moar-nom/install --optimize --debug=3 && make install 08:36
I dunno where your MoarVM directory is though 08:37
abraxxa me neither
FROGGS is there a /home/ahartmai/.rakudobrew/moar-nom/MoarVM ?
abraxxa as I installed with rakudobrew
FROGGS ahh, /home/ahartmai/.rakudobrew/moar-nom/nqp/MoarVM
abraxxa src/vm/moar/?
FROGGS no
what I pasted
abraxxa ok
FROGGS after you reinstalled moar (the command above), just rerun gdb 08:38
moritz FROGGS: you should really write a gdbify script for perl6-m 08:39
FROGGS: which spits out a perl6-m-gdb or so
abraxxa FROGGS: paste.scsys.co.uk/471281
FROGGS perl6-gdb-m would be my choice, and yes, that might make sense
it could also propose the reconfigure options for moarvm and a description what is going on 08:40
abraxxa: still no debugging symbols :/
abraxxa: can you check the timestamp of /home/ahartmai/.rakudobrew/moar-nom/install/bin/moar ?
tadzik abraxxa: I have a feeling they were changed a couple of times both ways, so I'd like to re-egzamine the history before I make a decision :) 08:41
abraxxa FROGGS: did you look at the wrong paste?
the output is much longer now
tadzik abraxxa: can you open a ticket?
FROGGS abraxxa: ahh, you pasted both
abraxxa tadzik: as nwc10 proposed a param would be the best option
tadzik sounds good
FROGGS abraxxa: please type this into your gdb prompt: p i 08:42
abraxxa: then: p (MVMint64)*(DCshort *)free_rws[i]
abraxxa tadzik: github.com/tadzik/panda/issues/146 08:43
FROGGS: $1 = 8
tadzik abraxxa: ah, so that's for panda, not just rakudobrew? 08:44
abraxxa i guess that's called 'interactive debugging', FROGGS telling me what to type ;)
tadzik it feels like a common problem we have in multiple projects
:D
abraxxa tadzik: damn, did I get the wrong github repo
toomanythingsinparallel
08:45 DarthGandalf left
abraxxa tadzik: sorry, github.com/tadzik/rakudobrew/issues/36 08:45
FROGGS: the second command prints: value has been optimized out 08:46
FROGGS hmpf
08:46 DarthGandalf joined
tadzik abraxxa: thank you 08:46
nwc10 jnthn: slightly futher "random" thoughts about NFG. I can think of two ways to "attack it" (and thefore all others are "inconceivable") 08:47
1) generate more than 2**31 different forms
2) generate fewer than 2**31, but use a lot of RAM doing it 08:48
and I guess some of the question is "what's the shortest amount of data it would take to generate the 2**31th unique form" (which I suspect is more than 8Gb, but less than 16Gb, but I've not done the maths)
RabidGravy m: say open('/proc/cpuinfo').eof; 08:49
camelia rakudo-moar c2f531: OUTPUT«open is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting:1␤ in sub open at src/RESTRICTED.setting:9␤ in block <unit> at /tmp/kTPwFSU6CZ:1␤␤»
RabidGravy boo!
nwc10 but I suspect that it is possible to "GC" an NFG table, at the (relatively massive) cost of walking all strings
RabidGravy but, my question was that returns True
dalek p: f3def3c | jnthn++ | src/vm/ (2 files):
Also need the option not to normalize.
08:50
p: f0255fb | jnthn++ | docs/ops.markdown:
Specify/document new normalization related ops.
nwc10 but in turn, I wonder if that could be reduced by using a flag bit on strings, to say "this string does use some NFG" (and if unset, it's all "nothing outside of NFC here")
jnthn That'd be an option to make it cheaper, yes
RabidGravy so my solution at the moment is to loop comparing the length of the buffer returned with the amount requested 08:51
nwc10 really, for an "attack", what I think matters is "can you craft the input to get a multiplier on the LTA-ness, compared with random data"
FROGGS abraxxa: I have problems understanding what is going on 08:53
nwc10 and I'm not sure how easy it is to actually exploit NFG for an attack, without already being permitted to send >1Gb of data, either in one hit, or more interestingly, as repeated requests to a persistent process
FROGGS abraxxa: what I know is: it is about $indp, which happens to be the first arg that is in an 'is rw' param slot 08:54
nwc10 but my suspicion is, that the only really viable attack is "repeated requests", because if the way to attack NFG via one request is to send >1Gb of data, you've already got a DOS problem.
FROGGS abraxxa: so it is not about OCIBindByName_Str
jnthn Yes, I'd figured that a "slow burn" attack is more the issue here.
nwc10 at which point, the rather ugly "walk all strings and GC the NFG table" does mitigate the "repetated request" attack, albeit with an ugly pause time 08:55
abraxxa FROGGS: $indp is a OCIBindByName_Str arg 08:56
nwc10 OK, so I don't really have anything to add to what you'd already figured out, but on the other hand I haven't got any insights that contradict it
FROGGS abraxxa: I know
abraxxa: what I am saying is that expect the very same segfault for OCIBindByName_Int too 08:57
nwc10 I guess you can figure out (roughly) when the NFG needs cleaning, using the ratio of the total size of the NFG table to the total size of all strings currently stored which are using NFG
abraxxa FROGGS: of course! it's just that the first test uses Str
nwc10 (because the attack would be to create transient strings which generate persistent NFG entries) 08:58
FROGGS abraxxa: exactly
nwc10 (the non-attack being to cr eate non-transient strings, because of couse they exhaust RAM without needing NFG)
abraxxa FROGGS: and as I had 'is rw' for all the attrs defined before it was supported it only now has an impact
FROGGS abraxxa: can you please run 'make test' in /home/ahartmai/.rakudobrew/moar-nom ?
abraxxa FROGGS: pass 08:59
FROGGS ohh 09:00
wait
that's the problem: github.com/abraxxa/DBIish/blob/mas...e.pm6#L424
09:00 espadrine_ joined
FROGGS or probably not... 09:01
jnthn nwc10: Yes; a web server would be a good example.
nwc10: Processes many requests over time.
FROGGS the question is: will $indp get changed? to NULL perhaps?
09:01 rindolf joined
abraxxa FROGGS: as it's an indicator for NULL/NOT NULL value only I don't think so 09:02
nwc10 jnthn: sort of over-complex and nice-to-have - is it possible to signal a "GC soon please", and have the GC do something expensive at the next idle point in the event loop? 09:03
(eg during a server request you realise that things are low-ish, and get the VM to pause and do stuff between requests)
09:05 BenGoldberg joined, kjs_ left
jnthn nwc10: Possibly... 09:07
FROGGS abraxxa: please do: cd /home/ahartmai/.rakudobrew/moar-nom/nqp/MoarVM && git pull && make install
abraxxa: and then retest with gdb 09:08
09:09 BenGoldberg left
abraxxa FROGGS: are you sure that git pull is enough? 09:09
FROGGS abraxxa: depends...
abraxxa: abraxxa better might be: git checkout master && git pull 09:10
abraxxa my git PS1 prompt still shows 97c5ddf
yes, that did pull it in
still 09:11
FROGGS damn
abraxxa want another stacktrace?
dalek p: 2438810 | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
Map new codepoint/normalization ops for MoarVM.
09:12
FROGGS abraxxa: I found the issue! 09:13
abraxxa FROGGS: great! what was it? 09:14
09:15 travis-ci joined
travis-ci NQP build failed. Jonathan Worthington 'Map new codepoint/normalization ops for MoarVM.' 09:15
travis-ci.org/perl6/nqp/builds/57453975 github.com/perl6/nqp/compare/f0255...38810a3aba
09:15 travis-ci left 09:18 darutoko joined
dalek p: 83ac21c | jnthn++ | tools/build/MOAR_REVISION:
Bump MOAR_REVISION for new ops.
09:20
FROGGS abraxxa: please pull again 09:24
09:24 travis-ci joined
FROGGS in moar 09:24
travis-ci NQP build passed. Jonathan Worthington 'Bump MOAR_REVISION for new ops.'
travis-ci.org/perl6/nqp/builds/57454833 github.com/perl6/nqp/compare/24388...ac21c300ac
09:24 travis-ci left
abraxxa FROGGS: Unhandled exception: Unimplemented spesh ops hit 09:27
09:27 Ven left
abraxxa FROGGS: paste.scsys.co.uk/471284 09:27
09:32 smls joined
smls m: say PromiseStatus ~~ Int 09:32
camelia rakudo-moar b3b241: OUTPUT«True␤»
smls ^^ is this really a good use of inheritance? 09:33
"a promise status is a special kind of integer" does not ring true
moritz smls: not inheritance; it's how our enums are constructed
smls oh 09:34
moritz and since the values are integers, it makes sense to be able to pass them to a routine that expects an Int
jnthn m: enum Foo < Bar Baz >; say Baz.^mro
camelia rakudo-moar b3b241: OUTPUT«(Foo) (Int) (Cool) (Any) (Mu)␤»
smls moritz: Well, couldn't a routine that wants such flexibility expect an Int() instead of Int ? 09:36
dalek pan style="color: #395be5">perl6-examples: 08f13d1 | paultcochrane++ | / (2 files):
Remove examples-metadata from Website class

This is because the examples are now part of individual Category objects.
pan style="color: #395be5">perl6-examples: 30ab0f4 | paultcochrane++ | doc/example-template.pl:
Rewrite template to conform to current example form
pan style="color: #395be5">perl6-examples: 479b71b | paultcochrane++ | categories/other/ (2 files):
Document the "other" category examples
pan style="color: #395be5">perl6-examples: 8b1be14 | paultcochrane++ | categories/best-of-rosettacode/ (8 files):
Add author information to Rosettacode examples
smls Personally I wouldn't mind if types were coercive by default 09:37
jnthn smls: Tough.
They're not.
smls just seems weird to not have to coerce Enums to Int, when you have to coerce everything else 09:38
jnthn Also, the enum spec/implementation has been done over quite a few times to get to something that works well in practice.
They're not always Int, you can pick the base type as anything you like, really.
Int is just the default, an a fairly sensible one.
*and
moritz m: enum A (b => 'some string'); say A.^mro 09:39
camelia rakudo-moar b3b241: OUTPUT«(A) (Str) (Cool) (Any) (Mu)␤»
jnthn An enum is "an enumeration of values". 09:40
09:40 chenryn left
jnthn The enum values are still basically values. 09:41
masak good almost-noon, #perl6 09:43
09:43 chenryn joined, sirdancealot left
smls jnthn: Right, but in a case like PromiseStatus you don't really care about what the values are 09:44
jnthn smls: And what, exactly, is making you care? 09:45
smls looking at they type graph doc.perl6.org/images/type-graph-Int.png ;)
jnthn Hmm :) 09:46
smls moritz: Maybe we can get enum types rendered differently from classes in those graphs?
jnthn If that's confusing, excluding enum subtypes could help.
smls right, or exclude them
moritz smls: sure, if you patch the type graph generation...
(or open an issue if you don't want to do it yourself) 09:47
smls I haven't even looked at how we do that part of p6doc
smls will open a ticket
abraxxa FROGGS: any other ideas? 09:50
jnthn: or you? @last paste 09:52
jnthn abraxxa: That tends to be version skew between Moar and NQP/Rakudo. 09:53
abraxxa jnthn: FROGGS commit only changed moar 09:54
jnthn abraxxa: Yes, but I made commits that touched the lot while he was doing so. :)
And I think you probably ended up with one of those.
abraxxa jnthn: rebuilding nom then
09:55 pecastro joined
abraxxa can the C code be build with multiple cpus in parallel too? 09:55
brrt make -j4 :-) abraxxa 09:56
if the Makefile supports it
FROGGS yes, it does
abraxxa does rakudobrew pass it on? 09:57
brrt: i wish my notebook had so much cores ;)
brrt well you have to compensate for IO too :-)
abraxxa SSD 09:58
brrt also, you can use MAKEFLAGS="-j4"
as an env var
abraxxa segfault
brrt what
abraxxa FROGGS: paste.scsys.co.uk/471285 10:00
dalek p: bbb164e | FROGGS++ | tools/build/MOAR_REVISION:
bump moar revision for nativecall fix
kudo/nom: b0bff33 | FROGGS++ | tools/build/NQP_REVISION:
bump nqp/moar revision for nativecall fix
masak smls: agree that having PromiseStatus in the type graph is confusing. 10:01
smls: thanks for being persistent enough to bring that up :) 10:02
I'm not sure I feel Signal should be in that graph either
jnthn Signal is also an enum, iirc
masak m: say Signal.HOW
camelia rakudo-moar b3b241: OUTPUT«Perl6::Metamodel::EnumHOW.new␤»
masak yep, seemingly
it's not that enums are not "real types", it's that the way they inherit does not merit inclusion in the type graph 10:03
(and that, frankly, makes me suspicious about the enum inheritance itself, though not enough to suggest anything else)
jnthn The p6doc change I agree with. I have the p6l-ish allergy flare up when somebody at this point suggests we go revisit fundamental type system bits, though. :) 10:04
FROGGS abraxxa: you last paste does not include my changes to moarvm
masak jnthn: oh, for sure.
jnthn: do note that I stopped short of suggesting that ;)
abraxxa FROGGS: i thought that after I saw the other two commits and are already rebuilding moar
FROGGS: segfault is gone, test fails now, I'm checking why 10:05
FROGGS you can also upgrade all the things now using the rakudobrew functionality 10:06
abraxxa the OCIBind $bindpp is rw, still doesn't work 10:07
masak those two seem to be the only enums in the type graph
abraxxa switching back to CArray[OCIBind] $bindpp, gives me an Oracle error message
masak which makes sense, if we never inherit from anything non-Int
abraxxa i think rt.perl.org/Public/Bug/Display.html?id=123015 can be already closed with the mention of the .bytes method 10:09
10:09 brrt left
masak seems typegraph.txt is kept up-to-date manually? 10:11
then the fix is simple.
...ish.
if they don't inherit from Int, the question is what *do* they inherit from? Any? 10:12
masak just removes the 'is Int' and we'll see what happens
dalek c: 728cb1b | (Carl Masak)++ | type-graph.txt:
avoid typing enums as 'is Int'

This was perceived to be confusing, even if it's true.
10:13
masak smls: that should do it.
abraxxa FROGGS: any idea if something could mangle the length param? I'm getting ORA-01485: compile bind length different from execute bind length 10:14
FROGGS no idea offhand 10:15
abraxxa: and btw, OpaquePointer is rw does nothing sensible atm 10:16
moritz masak: that's the wrong fix 10:17
masak ok
FROGGS so you still need CArray[...] ther
abraxxa when i remove the 'is rw' from $indp, $alenp, $rcodep and $corelep it works again
FROGGS: ok
moritz masak: we want to be able to still show a type graph for the enum itself, including Int and its parent classes
masak moritz: ok, reverting it and then adding a fix commit for some other things that were wrong. 10:18
abraxxa FROGGS: the int binding gives paste.scsys.co.uk/471287
masak moritz: you're saying the fix should go in the renderer.
FROGGS abraxxa: then you did not pass a native int
10:18 chenryn left
moritz masak: correct 10:19
abraxxa FROGGS: i didn't, but do .Num and pass the output
10:19 ecocode joined
dalek c: fe45e27 | (Carl Masak)++ | type-graph.txt:
Revert "avoid typing enums as 'is Int'"

This reverts commit 728cb1bb4ee7fd57389e0ebf0b9831ec0cefa17b.
10:19
c: 9e4edad | (Carl Masak)++ | type-graph.txt:
fix comments, whitespace, enum/class
abraxxa FROGGS: shouldn't NativeCall care about the conversion?
masak ok. I might or might not have a look at the rendering later. someone else feel free to beat me to it :)
10:20 yeahnoob left
FROGGS abraxxa: maybe it should, but I am almost sure it is not capable of doing so 10:20
abraxxa interessting that it did work already
or at least it didn't complain
how do I convert something that ~~ Int to long? 10:22
10:22 RabidGravy left 10:24 ecocode left 10:34 cdc_ joined 10:36 grondilu joined
grondilu m: my enum Square <a1 b2>; say b2 10:37
camelia rakudo-moar b0bff3: OUTPUT«b2␤»
grondilu m: my enum Square ("a".."h" X~ 1 .. 8); say b2
camelia rakudo-moar b0bff3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1F2clCKkPm␤Undeclared routine:␤ b2 used at line 1␤␤»
grondilu m: say "a".."h" X~ 1..8
camelia rakudo-moar b0bff3: OUTPUT«a1 a2 a3 a4 a5 a6 a7 a8 b1 b2 b3 b4 b5 b6 b7 b8 c1 c2 c3 c4 c5 c6 c7 c8 d1 d2 d3 d4 d5 d6 d7 d8 e1 e2 e3 e4 e5 e6 e7 e8 f1 f2 f3 f4 f5 f6 f7 f8 g1 g2 g3 g4 g5 g6 g7 g8 h1 h2 h3 h4 h5 h6 h7 h8␤»
masak m: my enum Square ("a".."h" X~ 1 .. 8); say Square.enums.keys 10:40
camelia rakudo-moar b0bff3: OUTPUT«a1 a2 a3 a4 a5 a6 a7 a8 b1 b2 b3 b4 b5 b6 b7 b8 c1 c2 c3 c4 c5 c6 c7 c8 d1 d2 d3 d4 d5 d6 d7 d8 e1 e2 e3 e4 e5 e6 e7 e8 f1 f2 f3 f4 f5 f6 f7 f8 g1 g2 g3 g4 g5 g6 g7 g8 h1 h2 h3 h4 h5 h6 h7 h8␤»
masak m: my enum Square ("a".."h" X~ 1 .. 8); BEGIN say Square.enums.keys
camelia rakudo-moar b0bff3: OUTPUT«a1 a2 a3 a4 a5 a6 a7 a8 b1 b2 b3 b4 b5 b6 b7 b8 c1 c2 c3 c4 c5 c6 c7 c8 d1 d2 d3 d4 d5 d6 d7 d8 e1 e2 e3 e4 e5 e6 e7 e8 f1 f2 f3 f4 f5 f6 f7 f8 g1 g2 g3 g4 g5 g6 g7 g8 h1 h2 h3 h4 h5 h6 h7 h8␤»
masak grondilu: I'd say it's a bug that 'b2' is not defined. 10:41
grondilu ok, noted
should I report it? 10:42
masak please do.
jnthn I think we have similar tickets about enum declarators.
But can always merge them, and it's good to collect test cases.
grondilu ok, reporting
DrForr Reminds me, I have to add an enum type to my Readline binding. 10:43
10:43 Ven joined
dalek ast: 9b7c90f | lizmat++ | integration/weird-errors.t:
Unfudge passing test on jvm backend
10:44
DrForr And put it on github once it does more than echo its history and goes 'beep'.
psch \o
DrForr: that's about how far my readline-gnu binding went as well! 10:45
DrForr I want to do something in the example with Keymap before releasing. 10:46
psch i did add bind_key, too, i just saw
or rl_bind_key, as the lib itself calls it
that was around the time FROGGS++ implemented cglobals, but before it got merged 10:47
DrForr I've got everything in the API but the calls that deal with char**, but nothing that's actually tested.
grondilu reported and got assigned ticket n°124251 10:49
DrForr I'll throw it on github tonight, though I've got to document it better. 10:50
I want badly to be able to have a CLI debugger for grammars. 10:51
lizmat grondilu: you mean #124251 ?
:-( no bot?? 10:52
masak seems not.
lizmat: nice to see you back on the channel. you were missed.
lizmat thank you for your kind words
10:54 chenryn joined 10:56 rivarun left 10:57 rivarun joined
masak lizmat: also, your comment in the backlog about lack of feedback on the newio branch made me open up a terminal tab with `git log --reverse -p master..newio`. I haven't gotten very far yet, but I like what I'm reading thus far. 10:58
10:58 pecastro left
masak lizmat: `$newfile.IO.open(:w)` being syntactic sugar for `open $newfile, :w` -- not the other way around? the newio branch seems to change things from "sub is sugar for method" to "method is sugar for sub" 11:01
lizmat indeed, it does 11:02
masak it's a minor thing, for sure. but I get the feeling that usually, our global builtin subs end up being sugar for methods on a particular class.
mostly curious about the reversal here.
dalek kudo/uni: 81063c0 | jnthn++ | / (2 files):
Start implementing Uni type and its subclasses.
abraxxa FROGGS: ^^
lizmat masak: the same reasoning really that was used to make [], {} and () sub accesses rather than methods 11:03
jnthn DrForr: Is none of perl6-debug, Grammar::Tracer, or Grammar::Debugger functional (or sufficiently functional)?
lizmat on top of that, many people are more used to say "open $file" than "$file.IO.open"
DrForr Did I mention I hadn't actually researched? :) 11:04
Thanks for the pointers.
jnthn ;)
dalek ast: d4d137e | jnthn++ | S15-normalization/test-gen.p6:
A script to generate normalization tests.

It uses the Unicode database's NormalizationTests.txt as input, and produces a bunch of .t files from it. I'll add those at some point, as they only need generating once per Unicode version bump, but also they may yet chnage while Uni is implemented.
11:05
masak IOU # not recognized as something that exists 11:07
lizmat masak: so, make the shortest / most often used variant the fastest
DrForr The ecosystem is small enough that I questioned whether that had been done yet :)
masak unless I'm missing something "IOU" is a not-very-clear name that mainly appears to want to make a clever pun
lizmat masak: IOU was renamed to IO::Huh, thanks tou the cheery input of several folks on #perl6
masak ok, I dislike Huh less.
psch remembers lizmat++ picking that to stop the bikeshedding 11:08
and maybe the puns too
masak lizmat: here I could make the argument that the perf difference between method and sub calls is drowned out by the I/O cost of opening a file...
lizmat: ...but I'm going to let it rest, because I don't see a big reward in winning that debate. :)
jnthn It should be drowned out by it, but that maybe wasn't the reason the factoring was picked? 11:09
masak I only see arguments from perf (and habit) above.
lizmat well, look at what happens now if you do $file.IO.open
.IO creates a new IO::Path object 11:10
jnthn If doing .IO tries to figure out what kind of things you have, then there's a genuine perf and even race-avoidance reason for open not to do it like that, perhaps.
masak seems s/IOU/IO::Huh/ hasn't happened yet in S16 on the newio branch, by the way.
lizmat well, I kinda get fed up at that point 11:11
*got
masak :(
lizmat .IO currently saves $*SPEC and $*CWD
then .open creates a new IO::Handle object 11:12
and then calls .open on that
dalek ecs/newio: dc98fad | (Carl Masak)++ | S16-io.pod:
s:g/IOU/IO::Huh/
11:13
masak (hope that was ok)
lizmat sure
masak lizmat: ok, so you're saying there's irreducible overhead in the method form? I can buy that. 11:14
and jnthn made some point about races too.
lizmat the current sub open does that in an even more convoluted way
masak o.O
ok, not where I expected this to go... 11:15
lizmat the new sub open basually creates an
the new sub open basically creates an absolute path, creates a lowlevel PIO object with that, and then creates a handle with that PIO object 11:16
masak sounds kinda similar to the method form, apart from the "lowlevel" bit
lizmat the open sub does not create an IO object in the newio branch 11:18
nine_ Conceptually the sub form has to have an easier time being efficient, since it knows the origin (the file name string) and the desired result, while the .IO in the method form only knows the origin.
11:19 ggoebel joined
masak next point: =head2 Functions makes it look like the only difference between `print` and `say` is a newline. 11:21
that's sadly not true.
m: class C { method Str { "OH " }; method gist { "HAI" } }; given C.new -> $c { print $c; say $c } 11:22
camelia rakudo-moar b0bff3: OUTPUT«OH HAI␤»
masak I don't even know which one `note` uses, .Str or .gist
m: class C { method Str { "OH " }; method gist { "HAI" } }; given C.new -> $c { note $c }
camelia rakudo-moar b0bff3: OUTPUT«HAI␤»
masak apparently, .gist -- which is the slightly more consistent alternative. 11:23
nine_ So say's output is really intended for human consumptuion?
moritz yes
lizmat note is the same as say, except on $*ERR
with one exception:
masak yeah, and if you just want .Str but a newline, you're supposed to know to `print "$stuff\n"`
lizmat m: note
camelia rakudo-moar b0bff3: OUTPUT«Noted␤» 11:24
lizmat m: say
camelia rakudo-moar b0bff3: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at /tmp/nwmbY4Im2R:1␤------> 3say7⏏5<EOL>␤Other potential difficulties:␤ Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant or …»
11:24 espadrine_ is now known as espadrine
masak right. 11:24
JimmyZ m: die
camelia rakudo-moar b0bff3: OUTPUT«Died␤ in block <unit> at /tmp/cZJEQm0mL7:1␤␤»
lizmat m: say 42.Str
camelia rakudo-moar b0bff3: OUTPUT«42␤»
masak there still isn't a pragma to turn off the "beginner-friendly" corner case to `say`
lizmat is glad with the extra set of eyes 11:25
masak well, I'm really at $work, so I may get snatched away from reviewing the branch at any point... 11:26
lizmat is glad with any bit of review
masak lizmat: getting people to look at stuff for review is a Hard Problem in computing, up there with naming and cache invalidation... :) 11:27
many organizations have structures in place to force people to look at each other's stuff 11:28
11:30 espadrine_ joined
nine_ I got so tired of telling my team to look at the review queue that I made it the responsibility of the developers waiting for review to find someone who does them. 11:30
masak I rest my case. 11:31
there's some truth to this: twitter.com/ashalynd/status/152042138111188994
11:32 Woodi left, Woodi joined 11:34 espadrine left
lizmat afk 11:34
arnsholt masak: Yeah, like most other hard problems in technology, it's a social problem more than a technological one 11:35
nine_ masak: I cannot really confirm that. I think it's just that many programmers are doing this job for the creativity and building cool things part. And reviewing is neither while pair programming is.
masak nine_: that's a good point.
review is a bit like pair programming, except that at that point, the trail has already gone cold and all you see is the results of a thought process 11:36
11:36 espadrine_ is now known as espadrine
FROGGS abraxxa: my long $foo = $bar 11:40
dalek kudo/newio: b0bff33 | FROGGS++ | tools/build/NQP_REVISION:
bump nqp/moar revision for nativecall fix
11:45
kudo/newio: 07d1c9a | FROGGS++ | tools/build/NQP_REVISION:
Merge branch 'nom' of github.com:rakudo/rakudo into newio
11:47 araujo left, araujo joined, Hor|zon left 11:48 Hor|zon joined 11:52 cdc_ left, mr-fooba_ joined 11:53 mr-foobar left
jnthn lunch & 11:53
12:08 rurban_ left 12:10 chenryn left 12:11 chenryn joined 12:16 Hor|zon left 12:24 laouji left 12:26 chenryn_ joined, chenryn left 12:28 mr-fooba_ left
abraxxa FROGGS: thanks. As the value can have different types I'd need a way to redefine a untyped to a typed var. 12:38
moritz (my long $) = $bar 12:39
abraxxa moritz: thanks 12:41
moritz: why the my?
lizmat m: sub a(Str $a?) { say $a.perl }; a
camelia rakudo-moar b0bff3: OUTPUT«Str␤»
lizmat m: sub a(Str() $a?) { say $a.perl }; a # sort of expected the same
camelia rakudo-moar b0bff3: OUTPUT«use of uninitialized value of type Any in string context in sub a at /tmp/Ul8N1yxJ0f:1␤␤""␤»
FROGGS me too 12:42
abraxxa Unhandled exception: This type cannot unbox to a native integer 12:43
again with no pointer to my line of code
FROGGS abraxxa: what did you do?
abraxxa (long $valuebuf) = $v;
(num64 $valuebuf) = $v.Num;
(Str $valuebuf) = $v;
Int, Real, Str 12:44
FROGGS (long $valuebuf) = $v; <--- that invalid....
that's*
abraxxa what is valid?
dalek kudo-star-daily: 5fd8f28 | coke++ | log/ (2 files):
today (automated commit)
12:45
rl6-roast-data: 9626f07 | coke++ | / (9 files):
today (automated commit)
FROGGS you cannot change the type of $value#buf
-#
12:45 rmgk_ joined, rmgk is now known as Guest60354, Guest60354 left, rmgk_ is now known as rmgk
abraxxa FROGGS: do you have a suggestion how to handle this better? github.com/abraxxa/DBIish/blob/mas...e.pm6#L401 12:46
FROGGS abraxxa: instead of setting $method to somthing, you could just make the call 12:47
abraxxa i could move the actual call into each if block and get rid of $method but that would mean duplicating of several other lines of code
FROGGS like: my long $valuep = $v.Int; OCIBindByName_Int( ... )
abraxxa what I'm not sure of: should be native sub definition use native types or Perl 6 types?
FROGGS a sub where you apply 'is native' on should have natively typed params 12:48
if that was the question
abraxxa exactly, thanks 12:50
and the type conversion has to be done by the calling code
initially I had the understanding that NativeCall handles that transparently 12:51
FROGGS the conversion has to happen before/when making the call, yes 12:52
abraxxa: is rw is exceptional here I think
it can pull out the numeric value of Perl 6 types and pass it to non 'is rw' param slots, but since 'is rw' wants to write back it is not possible here yet 12:53
12:53 Ven left 12:55 Hor|zon joined
abraxxa FROGGS: i still get the same error 12:59
FROGGS have you pushed your changes?
abraxxa my long $valuebuf = $v.Int;
smls m: say :16<DE AD BE EF>
camelia rakudo-moar b0bff3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6U1wq6Kso6␤Malformed radix number␤at /tmp/6U1wq6Kso6:1␤------> 3say :16<DE7⏏5 AD BE EF>␤ expecting any of:␤ number in radix notation␤»
abraxxa my num64 $valuebuf = $v.Num;
FROGGS: not so far
my Str $valuebuf = $v;
smls (from doc.perl6.org/language/syntax)
NYI?
FROGGS smls: seems so
std: :16<DE AD BE EF> 13:00
camelia std 28329a7: OUTPUT«5===SORRY!5===␤Malformed radix number at /tmp/OMP18_PvVu line 1:␤------> 3:16<DE7⏏5 AD BE EF>␤ expecting any of:␤ number in radix notation␤ statement end␤ statement list␤Parse failed␤FAILED 00:00 134m␤»
FROGGS ohh
13:00 diana_olhovik left
masak what should that mean_ 13:00
?
smls FROGGS: Should it be in p6doc then?
13:00 Ven joined
smls masak: That doc page claims it's a Blob literal 13:00
FROGGS masak: it is called "Blob literal" 13:01
ahh, me is slooow
masak ah.
rings a bell, yes.
lizmat: can you combine things like :r and :W ?
lizmat :W or :w ? 13:03
masak I meant one from each category.
lizmat is not sure what :W is ?
masak "real uid/gid", according to newio/S16
oh!
13:04 zacts joined
masak but they're file test methods 13:04
not &open flags
sorry; nothing to see here -- move along
lizmat ok :-)
lizmat moves along to Amsterdam
13:04 lizmat left
masak std: given 1 { when :f :rwx {} } 13:05
camelia std 28329a7: OUTPUT«ok 00:00 136m␤»
masak the day I'll start appreciating the :f short forms for *.f is when someone takes that sugaring and exploits it for something *completely different* than IO filetest methods, and it comes out being absolutely beautiful. 13:06
13:07 brrt joined, diana_olhovik joined
masak I'm assuming `when :f :rwx` has the semantics of `when :f & :rwx` ? if adverb cascades didn't already parse in other circumstances, I'd say that saving that single `&` is crazy. 13:07
in my own code, I'll probably put in the `&` for clarity. 13:08
moritz I think :f :rwx is short for :f, :rwx
which would make 'when :f :rwx' smart-match against a list
which is *totally* not what the one who wrote that probably intended
masak then that example DTWT. 13:09
(argh lag)
13:09 skids joined
masak ok, then that example should clearly be destroyed. 13:09
moritz activates the IRC log blaster 13:10
dalek ecs/newio: eaf8a9e | (Carl Masak)++ | S16-io.pod:
insert a `&` for clarity

And to make the example actually work.
See irclog.perlgeek.de/perl6/2015-04-07#i_10401701
13:11
moritz tadzik: any reason to keep your module "Threads" in the ecosytem? kthxbye
[Coke] (sadly not true)++ 13:12
13:14 zakharyas joined
[Coke] nqp-parrot still failing. 13:14
rakudo-jvm has 61 failures. 13:15
(and some passing todos)
nwc10 should we TODO the relevant nqp tests for parrot that fail? It would make it clearer whether new things started failing
[Coke] rakudo-moar still doesn't have stable S17 tests.
13:16 diana_olhovik left
nwc10 S17 is the concurrency stuff? 13:16
moritz yes
[Coke] fixing is best, fudging is ok. 13:17
13:17 diana_olhovik_ joined
masak the only fudging I think is dangerous is marking as "TODO" things that used to work. 13:19
that's the thing that burns downstream consumers (some of them darkpan-ish) at some distant point in the future.
moritz also: marking flappers as TODO 13:20
masak flappers should be quarantined.
moritz either people see "ooh, a passing test", and un-TODO them
or they became frightened of removing TODO markers when tests actually pass for good
13:21 huf left 13:22 huf joined, skids left
dalek kudo/newio: 136abbe | FROGGS++ | src/core/IO.pm:
fix MAKE-ABSOLUTE-PATH for being called with an empty Str as $path
13:23
13:23 lucasb joined
[Coke] masak: these tests used to work (nqp-parrot). they were broken by the index/rindex changes a month or so ago 13:23
lucasb Hi.
FROGGS hi lucasb
lucasb m: say :16<DE_AD_BE_EF> 13:24
camelia rakudo-moar b0bff3: OUTPUT«3735928559␤»
[Coke] moritz: the problem with skipping flappers, of course, is that then they never get fixed. You can't win.
lucasb ^^ It works if underscores instead of spaces O.o
13:24 KCL_ left
lucasb *with 13:24
FROGGS m: say :16<DEADBEEF>
camelia rakudo-moar b0bff3: OUTPUT«3735928559␤»
FROGGS lucasb: because you can put in underscores in any number 13:25
m: say :16<DEADBEEF>.WHAT
camelia rakudo-moar b0bff3: OUTPUT«(Int)␤»
masak [Coke]: if they used to work, then marking as "TODO" feels dishonest to me. at least if the test suite is supposed to be a catalogue of/commitment to the public API for downstream consumers to depend on.
FROGGS though, if it was a blob literal it probably should create a blob
masak: and what if you stop supporting a backend? 13:26
or platform or whatever
masak then why worry that tests are failing?
FROGGS *nod*
[Coke] But we still support nqp on parrot, apparently. 13:27
jnthn I noted this before, but: for the tests that now fail the fix was done by changing things at the VM level in Moar, and in our binding code on JVM.
It'd be worth seeing if we might fix them by "fixing" Parrot's nqp::index behavior to match. 13:28
13:28 rmgk left
nwc10 the new desired behavior is that the substring of "" actually is found. And the current/was behaviour is that a substring of "" is hardwired to be "not found". ? 13:29
13:30 rmgk joined
jnthn Sounds about right, yes. 13:31
masak [Coke]: flappers shouldn't be skipped, they should be quarantined. the big sin isn't failing to fix them, it's failing to separate them from the big set of functioning tests where they do more harm than good
jnthn didn't actually work on it and was a bit tied up at the time it happened :)
lucasb I was expecting numbers with underscores to work. Just saying that it is written with spaces (like :16<DE AD BE EF>) in doc.perl6.org/language/syntax
FROGGS .tell lizmat do we want to move .cleanup from IO::Path to IO::Pathy? currently panda stumbles over IO::Dir.cleanup not being there 13:33
yoleaux FROGGS: I'll pass your message to lizmat.
FROGGS lucasb: yes, and it shall create a Blob, not an Int 13:34
tadzik moritz: not really
lucasb m: say :16{DE_AD_BE_EF}.WHAT
camelia rakudo-moar b0bff3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Uf4YYhPIh_␤Malformed radix number␤at /tmp/Uf4YYhPIh_:1␤------> 3say :167⏏5{DE_AD_BE_EF}.WHAT␤ expecting any of:␤ number in radix notation␤»
FROGGS m: say :16<DE_AD_BE_EF>.WHAT 13:35
camelia rakudo-moar b0bff3: OUTPUT«(Int)␤»
lucasb IIUC, S02 says blob is :16{...}, :16<...> is just a number
FROGGS ahh 13:36
interesting
lucasb but maybe blob is NYI, I don't know :)
*blob format, I mean
bartolin_ wrt failing tests for rakudo.jvm: I made a PR (402) which fixes those failures. (though there may be a cleaner way to solve this)
FROGGS lucasb: yes, this blob syntax is NYI 13:37
smls is it "official" though? 13:38
FROGGS bartolin_: that feels correct
dalek kudo/nom: c9b3ea1 | usev6++ | src/core/LoL.pm:
Fix NullPointerException on JVM in find-reducer-for-op

  ... fixes spectest breakage on JVM
kudo/nom: d1ac6dd | FROGGS++ | src/core/LoL.pm:
Merge pull request #402 from usev6/fix_reduce_jvm

Fix NullPointerException on JVM in find-reducer-for-op
bartolin_ thanks for merging :-) 13:39
FROGGS bartolin_: thanks for patching :o)
ohh, bartolin_ do we meet next Wednesday? 13:40
bartolin_ FROGGS: yes, I hope so! \o/
FROGGS \o/
I'm looking forward to it :o)
nwc10 I have to say that "" being "not found" feels like a wrong special case 13:42
but I've no idea whether parrot folks would view that as a bug to fix, or a "this is behaviour for a reason". Is there an open partto ticket about it? Or just an NQP ticket?
bartolin_ too! (also happy to meet lizmat++, nine++, tadzik++ and others)
jnthn nwc10: Well, making a Parrot ticket on it would be my first resort; if there answer is no then a dynop in NQP could work. 13:44
13:50 Sqirrel left 13:53 telex left, ggoebel left 13:54 telex joined 13:55 chenryn_ left
Ven stevelosh.com/blog/2013/04/git-koans/ 14:01
I love git, but it's true some "ways" are a bit hard to understand :)
masak Git exemplifies how you can get the core data structures very very right and still have an API with undeniable flaws. 14:02
moritz well, git's UI should have been the one to throw away 14:03
in the "plan to throw one away; you will anyway"
brrt (the old git vs hg issue is interesting because it rests on two different interpretations of 'simple') 14:07
abraxxa FROGGS: how can I find out what triggers Unhandled exception: This type cannot unbox to a native integer
14:09 rurban_ joined
FROGGS abraxxa: I fear you can't find out easily atm :S 14:09
abraxxa i just can't find out what triggers the error regardless of what I remove or change
moritz that error should really name the type that can't unbox 14:10
abraxxa moritz: it should point to the line of *my* code not moarvm's
FROGGS: should that work? my num64 $valuebuf = $v.Num; 14:12
or my long $valuebuf = $v;
moritz abraxxa: you can always try $!.backtrace.full or --ll-exception 14:13
abraxxa moritz: epic! --ll-exception changes the error to Variable '$errcode' is not declared 14:14
FROGGS O.o
ahh 14:15
that means we are failing to generate the high level error message
abraxxa back to ORA-01485: compile bind length different from execute bind length
FROGGS and "This type cannot unbox to a native integer" might be about the line number where the excetption was thrown 14:16
14:16 sirdancealot joined
moritz the string 'errcode' appears in none(rakudo, nqp, moar) 14:16
FROGGS abraxxa: I have no idea what that means :/
abraxxa moritz: that's one of my vars which is defined in the if's now
moritz abraxxa: have you googled that ORA error?
FROGGS moritz: yes, that's why I think rakudo fails to complain about his error 14:17
abraxxa moritz: sure, but unhelpful as always
14:17 tinyblak left
FROGGS abraxxa: does that mean it called OCIBindByName correctly and failed to when calling OCIStmtExecute? 14:18
err
s/to//
abraxxa it least the bind calls succeed 14:19
14:20 raiph joined 14:23 smls left
lucasb m: say now 14:24
camelia rakudo-moar d1ac6d: OUTPUT«Instant:1428416717.066069␤»
lucasb m: say DateTime.new(now)
camelia rakudo-moar d1ac6d: OUTPUT«2015-04-07T14:24:49Z␤»
lucasb Any reason for not having a method in Instant class that converts to DateTime (like now.DateTime)? 14:25
PerlJam m: DateTime.now.say 14:26
camelia rakudo-moar d1ac6d: OUTPUT«2015-04-07T16:26:49+0200␤»
PerlJam (just illustrating a slightly shorter way that uses the same words in different order :) 14:27
lucasb PerlJam: Oh, it already exists... in reverse order :) thanks
FROGGS abraxxa: did you try to set maxarr_len to 1 ? 14:30
14:30 gcole left
abraxxa FROGGS: no, 0 14:30
14:31 gcole joined, zakharyas left
FROGGS abraxxa: can you try setting it to 1? 14:31
abraxxa FROGGS: same Oracle error
14:31 mr-foobar joined
abraxxa FROGGS: ora-01485.ora-code.com/ 14:32
that makes no sense to me as I don't use that type
the Oracle cdemo81.c also uses 0 for all binds 14:33
FROGGS hmmm, in that example the placeholder is just ":FOO", in your code it would be ":pFOO" 14:39
14:42 Perl6_newbee joined
FROGGS and it looks like $placeh_len is allowed to be -1 and $value_sz needs to be one byte more then you pass right now 14:42
and you pass SQLT_CHR for string where the example passes SQLT_STR 14:43
abraxxa: that's all I can see... note, I still see 9 days old code in your repo 14:44
14:45 diana_olhovik_ left, egrep is now known as egrepnix, Rounin left
abraxxa FROGGS: yeah, just rebased my code here on the one in the repo which I did at home 14:45
14:45 tinyblak joined 14:46 egrepnix is now known as egrep 14:48 A4AB3HDY joined
abraxxa FROGGS: when I use SQLT_STR I get ORA-01480: trailing null missing from STR bind value 14:49
i'll write one test case per datatype as I wanted to do that for a long time 14:50
FROGGS abraxxa: you can append a "\0" to $valuep
yeah
14:51 molaf__ joined
abraxxa the (existing) string test is ok, the integer fails with ORA-01485: compile bind length different from execute bind length 14:52
FROGGS ahh
why are you hiding these highly interesting facts?
abraxxa just wrote the test
14:54 larion joined
abraxxa same for float 14:54
14:55 molaf_ left 15:00 skids joined
abraxxa and I just found out why 15:02
when i remove the 'is rw' from $indp, $alenp, $rcodep and $curelep it works 15:03
i did that before but just for the _Str sub
FROGGS that means that you are supposed to pass a NULL pointer 15:04
which is what happens now (in an incorrect way)
and the 'is rw' gave you an allocated pointer that pointed to a value of zero, which is a difference
abraxxa which of the four params? 15:05
FROGGS for all four
I guess
abraxxa FROGGS: docs.oracle.com/database/121/LNOCI...LNOCI17140 15:06
FROGGS the cdemo81.c also passes a NULL pointer and not a pointer pointing to a value 0
dalek ast: 15e0300 | usev6++ | S05-substitution/subst.t:
Add test for RT #123597
abraxxa FROGGS: let's try it out, $indp is ok with 'is rw' 15:07
FROGGS when $alenp is a pointer pointing to 0 then it probably expects the data in $curelep 15:08
abraxxa FROGGS: chaning $alenp to 'is rw' results in ORA-01461: can bind a LONG value only for insert into a LONG column
FROGGS: how can i set it to null? just define the var? 15:12
15:15 yvan1 left
FROGGS abraxxa: what do you want to set to null? 15:19
abraxxa all those that are only relevant to arrays 15:20
indp, alenp, rcodep and curlep
15:21 Juerd left 15:22 tinyblak left, larion left
abraxxa FROGGS: OCI is really weird, the bind + execute for all three types combined works, the one for float only not 15:23
15:23 Ven left 15:24 Juerd joined 15:26 chenryn_ joined, egrep is now known as coreutil
FROGGS abraxxa: "the bind + execute for all three types combined works" -- what all three types? 15:26
15:26 coreutil left, coreutil joined
abraxxa string, integer plus float 15:26
FROGGS looks confused 15:27
15:27 lichtkind joined
FROGGS abraxxa: so you say it works for strings, integers and floats, but not for floats? 15:27
15:29 coreutil left 15:30 egrep joined
hoelzro o/ #perl6 15:30
abraxxa FROGGS: yes, super-weird
FROGGS: ah, the insert without bind for all three works
15:30 chenryn_ left
FROGGS hi hoelzro 15:30
15:31 xinming_ joined
abraxxa FROGGS: so what I'm trying is keep the native sub definition correct, with 'is rw' for those four pointers, and pass the correct value to it which seems to be NULL for the non-array stuff a simple bind requires 15:31
FROGGS abraxxa: but you cannot pass NULL when the param is 'int16 is rw' 15:33
15:34 xinming left, brrt left
FROGGS abraxxa: you need to make the param a Pointer to be able to pass NULL 15:34
abraxxa FROGGS: ARGHHHH
15:34 raiph left 15:35 gfldex joined
FROGGS abraxxa: 'native type is rw' means 'I want to pass a numeric value as a pointer'... and there is no way to express a numeric value that could mean NULL 15:36
15:37 raiph joined
abraxxa FROGGS: why does it work when I define $alenp as ub2 and pass my ub2 $alenp = 0; to it? 15:37
FROGGS abraxxa: because that might be what OCI expects? 15:38
15:38 pullphinger joined
abraxxa god the docs are shit! 15:38
FROGGS or this argument is simply ignored
rule number 1 when reading foreign docs: docs are shit
abraxxa FROGGS: hm...regarding null, the cdemo81.c passes 0 to all four
FROGGS abraxxa: it passes NULL 15:39
15:39 gcole left
abraxxa line 236 and up not 15:39
FROGGS (ub2 *) 0 <-- that is a cast to a NULL pointer
abraxxa really?
I know why I hate C 15:40
FROGGS yes
abraxxa and how do i pass a pointer to 0?
FROGGS in C or perl 6?
abraxxa C
FROGGS ub2 *foo = malloc(sizeof(ub2)); *foo = 0; callsomething(foo); 15:41
abraxxa goddammit
15:42 tinyblak joined
abraxxa it knows the type and that it's a pointer and can't even do the malloc itself? 15:42
PerlJam Weren't we just talking about containers vs. values the other day? Even C has that "problem" sometimes.
15:42 tinyblak left
abraxxa FROGGS: and why does passing my ub2 $alenp = 0; work? is that a null pointer' 15:43
geekosaur it's C, it doesn't do memory management, that's the programmer's job
15:44 dolmen joined
abraxxa geekosaur: so whatfor types then? 15:44
PerlJam abraxxa: sounds like someone has been spoiled by more dynamic languages :)
geekosaur type checking, not passing an (int) or a (bar *) where a (foo *) is wanted
abraxxa PerlJam: C is the root cause for 90% of all security problems, PHP for the rest 9%
geekosaur (with the (void *) special case)
(welcome to C. C is very low level, barely has types, and does nothing whatsoever to help you) 15:45
PerlJam abraxxa: *people* are the root cause of all security problems. :)
geekosaur common refrain elsechannel: "C code. C code run. C code crash. Crash, code, crash!"
mind, it was a big step up for me in 1983 when I'd previously had only microcomputer BASIC and Z-80 assembler to play with... but it's not 1983 any more 15:46
FROGGS abraxxa: my ub2 $alenp = 0 is not a null pointer, it is an ub2 pointer pointing to the value 0 when the param in the nativecall sub has 'is rw' at that param 15:48
abraxxa FROGGS: without 'is rw'
FROGGS abraxxa: without the 'is rw' it could be that the C side treats it as an NULL pointer
abraxxa: though, since an ub2 has a different size compared to a pointer, it can very well be that you squish two args into on param when calling the C function 15:49
so, the called OCI function just gets garbage 15:50
but that depends on the calling convention
abraxxa so how should I define those params for now? Pointer[ub2]
FROGGS depends... what are you going to pass? 15:51
abraxxa NULL ;)
FROGGS then declare it as a Pointer
without any 'is rw'
abraxxa with the future possibility to pass a pointer to a ub2
FROGGS yes, Pointer[ub2] is a good choice then 15:52
abraxxa should I replace all OpaquePointer with Pointer?
15:52 Ven joined
FROGGS yes 15:53
abraxxa ok
and to pass a NULL pointer I just declare a variable my Pointer $alenp; and pass $alenp? 15:54
FROGGS either that, or you pass a Pointer directly
abraxxa that works again
geekosaur fwiw I;d understand OpaquePointer to be intended for lumps coming from external code whose internals you can't access; Pointer for anything else
15:55 gcole joined
FROGGS geekosaur: but OpaquePointer will go 15:55
geekosaur like, if you got a (FILE *) for some reason, that would be OpaquePointer, but (unsigned long *) would be Pointer
FROGGS but the intention was to do what you described
unsigned long * would be Pointer[ulong] 15:56
15:56 rurban_ left
geekosaur right 15:56
FROGGS m: use NativeCall; say Pointer[ulong].of
camelia rakudo-moar d1ac6d: OUTPUT«(ulong)␤»
moritz abraxxa: you could just pass Pointer
FROGGS m: use NativeCall; say Pointer.of
camelia rakudo-moar d1ac6d: OUTPUT«(void)␤»
geekosaur aha,
abraxxa moritz: i'll keep the names to make supporting array binds later easier
moritz m: use NativeCall; say nativecallsize(Pointer)
camelia rakudo-moar d1ac6d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mvbNnQrGu7␤Undeclared routine:␤ nativecallsize used at line 1. Did you mean 'nativecast'?␤␤»
abraxxa thanks!
geekosaur was gonna say "Pointer[void]" seemed weird on its face
moritz m: use NativeCall; say nativecallsizeof(Pointer) 15:57
camelia rakudo-moar d1ac6d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/24oBwLYXM6␤Undeclared routine:␤ nativecallsizeof used at line 1. Did you mean 'nativesizeof'?␤␤»
FROGGS geekosaur: but you can do that
moritz m: use NativeCall; say nativesizeof(Pointer)
camelia rakudo-moar d1ac6d: OUTPUT«8␤»
geekosaur it still looks weird
:)
FROGGS :o)
grondilu why export it? Why not NativeCall::sizeof? 15:59
abraxxa FROGGS: current code is on github now if you're interessted 16:00
FROGGS we decided to rename it to native-sizeof() and native-cast() fwiw 16:01
abraxxa: nice!
though, I need to speed up coding to or I'll be late at dinner
s/to/here/
16:01 dolmen left
abraxxa should I merge my github fork with the main DBIish repo and continue my work there? 16:04
moritz abraxxa: yes, but please in a branch
abraxxa moritz: ok 16:05
moritz (in a branch that isn't master :-)
abraxxa haha
nom?
:P
moritz abraxxa: I'd call it "oracle", but YYMV
dalek osystem: 0f9d4dd | moritz++ | META.list:
Remove Threads from META.list

it requires rakudo-parrot, which is dead; instead, we have native threads!
16:06
16:08 tadzik is now known as coffee, coffee is now known as tadzik
tadzik so, it's now rakudo-parrot being dead, not just Star being frozen? :) 16:09
geekosaur ?
[Coke] rakudo-parrot support was removed, yes. 16:14
nqp-parrot was as high as we were keeping.
so, not "now", but "that's the plan as I understood all along" 16:15
jnthn dinner &
16:17 FROGGS left
moritz tadzik: 2015.02 was the last rakudo release with parrot support 16:23
16:32 gcole left 16:35 noganex_ left 16:38 yvan1 joined
raydiak good morning #perl6 16:42
TimToady \o
16:43 tinyblak joined
raydiak o/ TimToady; hope the day is treating you well so far 16:45
TimToady maybe I won't run a fever today...still coughing pretty hard, but the gurgles went away in my lungs, so either they're all full of air, or all full of fluid :) 16:48
16:48 tinyblak left
TimToady was coming down sick last week, which probably contributed to some of his normal level of grumpiness 16:48
that didn't come out right either, ss/some of // 16:49
I shouldn't do anything today that doesn't have good tests...
raydiak hm...glad you're not gurgling at least :) lack of air does tend to make people grumpy 16:51
16:53 bobkare joined
Ven raydiak: depends whether you consider the deads grumpy or not, I guess 16:54
16:55 RabidGravy joined
raydiak Ven: I've never met a friendly ghost, as far as I know 16:57
Ven raydiak: well, we always say the media show us the bad things that happen in our world... maybe they also only show the bad things that happen to their world? :)
bobkare I have a fairly new rakudobrew install and am having trouble installing something that depends on Term::ANSIColor, am I right in assuming that should have been among the distributions listed in ecosystem-api.p6c.org/projects.json? 16:58
16:58 fhelmberger left
raydiak Ven: hm...true. you'd think after a few centuries of wandering around without bodily needs, people would get the hang of not wallowing in their misery...but I guess not :) 17:00
bobkare: that is correct, it should be
PerlJam bobkare: What's the problem exactly? 17:01
hobbs raydiak: o/` Casper, the friendly ghost -- the friendliest ghost you know! o/` 17:02
bobkare hm, looking at ecosystem-api.p6c.org/update.log it says raw.githubusercontent.com/tadzik/p.../META.info 404, but that link works for me now 17:03
PerlJam: Initial error was Dependency Term::ANSIColor is not present in the module ecosystem when trying to install Grammar::Debugger 17:05
PerlJam maybe github is having issues
(I just tried installing Term::ANSIColor and panda hung) 17:06
and now it's telling me it's not in the ecosystem as well
raydiak yeah we had another module randomly disappear the other day during the github ddos, came right back on the next projects.json rebuild 17:07
bobkare How often is that list rebuilt?
17:07 larion joined
raydiak can't recall...guess about once an hour or so? 17:07
TimToady wrt GC of the NFG table, if we interned all our strings, and interned all the strings that use NFG differently from those that don't, walking all the strings would be pretty trivial 17:08
raydiak you could always just clone it manually and then 'panda install .'
TimToady assuming, of course, that we can then GC the string intern table...
PerlJam It's too bad we don't have a set of distributed module servers that could provide service when github has problems ;)
raydiak hobbs: but I haven't had the pleasure of meeting him! :)
TimToady we could also know where unique strings were coming from by who interned them, and maybe clamp misbehavior
jnthn: ^^ 17:09
nwc10: 17:11
17:12 rindolf left
bobkare raydiak: yeah, did that now and it seems to work. And hopefully the problem with projects.json will self-correct soon. So, back to debugging this grammar I was working on... 17:13
17:13 larion left 17:14 chenryn_ joined
abraxxa can i pass a pointer to NativeCall and Perl 6 knows how many bytes to read from it? 17:15
masak m: $_ = 0; s{^(\d+)$} = sprintf "%3d -", $_; say $_ 17:16
camelia rakudo-moar d1ac6d: OUTPUT« 0 -␤»
17:17 sirdancealot left 17:18 Perl6_newbee left 17:19 chenryn_ left, sirdancealot joined
raydiak bobkare: glad it worked; good luck with your grammar :) 17:21
TimToady abraxxa: aiui, NativeCall is C-level interface, so you have to program the lengths yourself, to the extent the C API supports it (and if the API doesn's support it, you have a security issue) 17:22
so you'd want a layer above that to give a more P6-like interface 17:23
abraxxa TimToady: OCI returns the length in bytes in a second pointer to a ub4
TimToady: I was wondering what happens when the param is defined as 'is encoded('utf8') is rw
17:25 mohij joined
TimToady we could possibly have some traits that tie a pointer parameter to its length parameter to handle some of the common cases 17:26
abraxxa TimToady: that would be awesome!
17:27 beastd joined 17:30 Rounin joined 17:31 FROGGS joined
FROGGS o/ 17:32
raydiak hiya FROGGS
FROGGS PerlJam: at some point I'll merge panda/CPAN and then we will have an distributed module server network :o) 17:36
masak ahoj FROGGS 17:37
17:42 gcole joined
nine_ FROGGS: what's keeping you from doing that? 17:42
PerlJam FROGGS: and can anyone else help? :)
FROGGS nine_: the dependencies I have to pull in, and the that that Compress::Zlib was not Windows friendly until recently 17:43
and the fact*
17:43 espadrine left
abraxxa that doesn't seem to do what I think: if $!statementtype ~~ OCI_STMT_CREATE, OCI_STMT_DROP, OCI_STMT_ALTER; 17:44
17:44 rindolf joined
abraxxa the four are constants with the values 5, 6 and 7 and it still returns true for $!statementtype 4 17:44
PerlJam abraxxa: you've got a precedence problem I think.
abraxxa: put some brackets around the list and see if that helps 17:45
FROGGS m: say 42 if 4 ~~ any 5, 6, 7; 17:46
camelia ( no output )
FROGGS m: say 42 if 4 ~~ 5, 6, 7;
camelia rakudo-moar d1ac6d: OUTPUT«42␤»
abraxxa PerlJam: that revealed another error im my code that executed fine so far, very weird
it swallowed Cannot locate symbol 'OCIAttrGet_ub4' in native library 'libclntsh.so' before because I forgot 'is symbol'
FROGGS abraxxa: you only get that error when you actually call OCIAttrGet_ub4 17:48
so you just did not hit that code path it seems
abraxxa FROGGS: correct 17:49
FROGGS PerlJam: but before I merge panda/CPAN, I'll fix the currently introduces slowdown and the $*EXECUTABLE_NAME reporting
abraxxa FROGGS: the sqlite tests aren't run because the file is named /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 in my Ubuntu 14.10 x64 17:51
17:54 raiph left 17:55 _edwin joined
masak m: say "trick" if 4 ~~ 5, 6, 7; m: say "like this" if (4 ~~ 5), 6, 7; m: say "not like this" if 4 ~~ (5, 6, 7) 17:55
camelia rakudo-moar d1ac6d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7jLlK25WRh␤Redeclaration of symbol m␤at /tmp/7jLlK25WRh:1␤------> 3m: say "like this" if (4 ~~ 5), 6, 7; m:7⏏5 say "not like this" if 4 ~~ (5, 6, 7)␤»
masak m: say "trick" if 4 ~~ 5, 6, 7; say "like this" if (4 ~~ 5), 6, 7; say "not like this" if 4 ~~ (5, 6, 7)
camelia rakudo-moar d1ac6d: OUTPUT«trick␤like this␤»
17:55 pippo joined
TimToady obviously we should do away with commas 17:56
masak commas are the devil's work
PerlJam If juxtaposition is good enough for haskell, it's good enough for perl 17:57
lucasb
.oO( commatraps... )
TimToady well, we could actually warn on this one; a list with literals makes little sense in a boolean context
but how often do people make that mistake, really? 17:58
FROGGS TimToady: well, it is easy to not spot the error in: if $!statementtype ~~ OCI_STMT_CREATE, OCI_STMT_DROP, OCI_STMT_ALTER
masak TimToady: I was surprised by the result, but the failure mode was pretty clear to me too, after some thinking. 17:59
PerlJam Though, that code doesn't mean what the programmer wants it to mean anyway. (i.e. even if it worked, we have better ways to say what's meant) 18:00
TimToady I've considered whether list smartmatching should be more explicit, in which case that could just be malformed
PerlJam more explicit how? 18:01
TimToady PerlJam: yes, the smartmatching in P5 borrowed from P6 when it was full of implicit junctional assumptions, which we got rid of, and they added more :/
well, that won't actually help here, since it's a precedence problem 18:02
18:02 Ven left
abraxxa what exactly did the syntax I used do? 18:02
TimToady m: say [1,2,3] ~~ [*,2,*]
camelia rakudo-moar d1ac6d: OUTPUT«True␤»
TimToady m: say [1,2,3] ~~ (*,2,*)
camelia rakudo-moar d1ac6d: OUTPUT«True␤»
18:03 raiph joined
TimToady I was thinking at the time a special list matcher to enable * to do that 18:03
rather than just any list doing globby matching
nine_ abraxxa: you gave three comma separated expressions to the if. The if only looked at the last one and got a 7 which is trueish.
abraxxa nine_: WTF?! 18:04
commas aren't or's!
TimToady nine_: no, it didn't just look at the last one, that's P5
here it looked at the .elems of 3
we could warn "This boolean will always be true." 18:05
FROGGS m: say (4 ~~ 5, 6, 7)
camelia rakudo-moar d1ac6d: OUTPUT«False 6 7␤»
FROGGS abraxxa: see?
m: say (4 ~~ 5, 6, 7).Bool
camelia rakudo-moar d1ac6d: OUTPUT«True␤»
18:05 dsx joined
FROGGS abraxxa: a list containing (False, 6, 7) is true, because it has elements 18:05
TimToady m: say (4 ~~ 5, 6, 0).Bool 18:06
camelia rakudo-moar d1ac6d: OUTPUT«True␤»
abraxxa some type conversions shouldn't be done automatically/defined at all
TimToady note that it's true even if the last elem is false
abraxxa that's why ecmascript came up with ===
a list/array just doesn't have a boolean value
TimToady sure it does
FROGGS abraxxa: ohh, welcome to Java
>.<
abraxxa that's stupid as everybody will expect something different 18:07
FROGGS abraxxa: no, a list that is non-empty is trueish
abraxxa defined-ness, whatever that means for a list, length > 0 and so on
FROGGS defined means instantiated to me
TimToady that's ruby that confuses define and true
nine_ abraxxa: I'd say that's quite normal. while (@candidates) { my $candidate = shift; push @candidates, $new_candidate if $condition } is somewhat common P5 code
abraxxa which means if @foo would be useless because it would be a compile time error if @foo isn't defined 18:08
FROGGS huh?
TimToady you keep using that word
abraxxa in that case 'defined' means 'defined in the code using my' 18:09
TimToady that's declared, not defined
FROGGS abraxxa: you mean 'declared'
abraxxa that's HARD for non-native speakers!
FROGGS true
abraxxa: I am also a non-native something
nine_ FWIW I never know which one is which either. Same for the German words (which _are_ the same)
abraxxa but if my @foo; means if (@foo) returns true than the whole if is useless because it can't be false 18:10
nine_ OTOH a bit of Perl can actually help. my $foo; is clearly undefined, but it's there. So it must be declared (since there are only two words I could use)
TimToady abraxxa: my @foo does not mean that @foo is true 18:11
abraxxa declared doesn't matter because it's a compile time error
my @foo = ();
is that defined or not?
here the understandings start to differ
TimToady @foo is always defined 18:12
_edwin .tell jnthn I created a PR to fix RT #124204 (did not attempt to fix RT #124205 as by the comments of TimToady and masak the &with parameter of squish is not well-loved anyway). github.com/rakudo/rakudo/pull/400 18:13
yoleaux _edwin: I'll pass your message to jnthn.
18:13 dsx left
abraxxa TimToady: you just said it's always declared?! 18:14
lucasb Is S05-substitution/subst.t passing? I can't understand how it is passing if it has "my $_" in it. Is lexical "my $_" legal in P6?
Thanks TimToady++ for fixing subst-mutate yesterday
TimToady m: my @foo; say @foo.defined 18:16
camelia rakudo-moar d1ac6d: OUTPUT«True␤»
TimToady m: my @foo; say @foo.so
camelia rakudo-moar d1ac6d: OUTPUT«False␤»
18:17 rindolf left
abraxxa TimToady: so @foo.defined can never return False? 18:17
TimToady abraxxa: when I said "that's declared, not defined" I was meaning "the word we use for that is 'declared', not 'defined'"
abraxxa: correct; it's a container of containers which is always defined, but may contain individual undefined containers 18:18
raydiak m: my @foo := Array; say @foo.defined; # *almost* always
camelia rakudo-moar d1ac6d: OUTPUT«False␤»
abraxxa so if ( @foo ) is absolutely pointless, always
TimToady well, that's cheating
NO!
hobbs raydiak: should probably paper over that :)
timotimo recently i tried to build a patch that requires :D on @-sigiled arguments to functions; i think something about that failed but i can't remember what 18:19
TimToady why do you think 'if @foo' has anything to do with defined?
nine_ abraxxa: if does not ask for definedness.
TimToady this is not ruby
FROGGS abraxxa: if (@foo) usually boils down to: if (@foo.elems > 0)
18:19 rindolf joined
abraxxa nine_: see, I thought it would because that would make sense in *my* way of thinking 18:19
TimToady many of the built-in types have a convenient false-but-defined value
abraxxa FROGGS: exactly 18:20
FROGGS: only that the later doesn't require guessing by almost anybody who has learn any programming language
TimToady so for @foo it's the number of elements, but for a different type, the distinguished false value is somethign else
FROGGS abraxxa: so, an empty array ha no elems so it would be False in that condition
TimToady for numbers, it's 0
abraxxa so much for KISS 18:21
TimToady for strings, it's the null string (plus "0" currently but we're thinking of getting rid of that one)
FROGGS abraxxa: if "abc" { ... # what should that be about?
TimToady abraxxa: KISS is one of about 60 design principles here
abraxxa FROGGS: compile time error
FROGGS abraxxa: a string is true when it has chars in it... like an array has elems
abraxxa: why that?
TimToady we have lots of languages that are mean to the programmer already, Perl doesn't need to do that :) 18:22
rjbs Keep It Simple Sometimes
abraxxa FROGGS: it's static and boils down to a no-op
FROGGS abraxxa: and a no-op means compile time error to you?
abraxxa FROGGS: one that makes absolutely no sense in writing, sure
FROGGS ... 18:23
abraxxa: my $a = "foo"; if $a { ... # better?
nine_ abraxxa: I've used if (0) { ... } to temporarily disable some code many times. I'd hate if the compiler thought it knew better than I what I need and interfered.
FROGGS abraxxa: this will also be a compile time error in your book btw
abraxxa FROGGS: of course, $a could at least be changed by some code somewhere
FROGGS abraxxa: no, because you can resolv stuff statically, but we are starting to talk nonsense now 18:24
abraxxa FROGGS: no, because $a could be set to Bool False somewhere
FROGGS abraxxa: show me a language where putting a literal into an if condition results in a compile time error
18:24 Hor|zon left
TimToady abraxxa: this aspect of Perl is not going to change 18:24
abraxxa FROGGS: i don't know any because I haven't tried. I'm only saying that I would make it one 18:25
FROGGS abraxxa: that's insane
abraxxa my point was that defining defined-ness and Bool-ness for every type doesn't make sense imho because it depends on the context 18:26
nine_ The only time the compiler should assume that it's smarter than me is, when it actually _is_ smarter than me. And it should be really sure about that.
FROGGS as nine_ said one *does* use 'if 0 {' or 'if 1 || ... {'
nine_++
abraxxa nine_: and instead of a simple compile time error we then need code analyzers to find never run else branches...great!@
TimToady abraxxa: in case you hadn't noticed, Perl is all about context, by design
that's what makes it Perl 18:27
abraxxa sorry, I have a text editor that can comment out a block
TimToady cool, TMTOWTDI
abraxxa so what is a list in boolean context? defined-ness? number of elements > 0? 18:28
and what is defined-ness for it?
FROGGS abraxxa: boolean context is about call .Bool on it
and the type is responsible for implementing such a .Bool method
TimToady m: my @a = (); my @b = (); say (@a,@b).Bool 18:29
camelia rakudo-moar d1ac6d: OUTPUT«True␤»
FROGGS and the .Bool of List checks for .elems > 0
TimToady m: my @a = (); my @b = (); say (@a,@b).list.Bool
camelia rakudo-moar d1ac6d: OUTPUT«False␤»
abraxxa FROGGS: yes, and that method doesn't instead in which context it is called
FROGGS abraxxa: doesn't what?
abraxxa and i'm not meaning 'context' as in boolean context which if enforces
FROGGS abraxxa: what's context to you then?
abraxxa smartmatch
FROGGS we need to use the same words 18:30
abraxxa is that a context?
FROGGS smartmatch is an operator
TimToady well, it's really a method too
FROGGS and 'a ~~ b' results in: b.ACCEPTS(a)
so, just a method call and the b object's type is responsible for having a sensible ACCEPTS method 18:31
TimToady every type in Perl 6 is allowed to decide which of its values are true or false, and how to smartmatch other values
so you're basically just in OO context
FROGGS like, in "foo" ~~ "bar", here you want string equality
abraxxa and is that documented?
FROGGS and in "foo" ~~ /bar/, you want to pattern match
TimToady certainly
abraxxa i'm preferring methods that are called what they do 18:32
FROGGS yes, hence the .Bool and .elems and .ACCEPTS
TimToady
.oO(why do these arguments always come down to "Then write your own language!"...)
abraxxa regarding my mistake, I though I've read that braces () don't create lists
FROGGS but since this is not Java and we are not payed by character, we like it readable and comprehensive 18:33
nine_ TimToady: because at the end of the day it's all preferences
abraxxa or was it semicolons?
FROGGS abraxxa: braces are for grouping and the comma creates a list
TimToady abraxxa: at the moment they create Parcels, but we're going to get rid of those, probably
FROGGS m: say (42).WHAT 18:34
camelia rakudo-moar d1ac6d: OUTPUT«(Int)␤»
abraxxa if $!statementtype ~~ OCI_STMT_CREATE, OCI_STMT_DROP, OCI_STMT_ALTER
TimToady well, they create Parcels if there's a comma
FROGGS no list
abraxxa so the tree constants are a list?
FROGGS abraxxa: correct
like in:
TimToady there are not three constants
FROGGS m: my @a = 1, 2, 3
camelia ( no output )
TimToady there's a ~~, and two constants
18:34 arnsholt left
FROGGS abraxxa: the right hand side here is also a list 18:34
TimToady just as if you said 1+2, 3, 4 18:35
abraxxa so the smartmatch operator has a higher precedence than the semicolon?
FROGGS comma*
TimToady *tighter :)
abraxxa but a comma isn't an operator?!
TimToady sure it is
m: say infix:<,>(1,2,3)
camelia rakudo-moar d1ac6d: OUTPUT«123␤»
FROGGS m: say &infix:<,> 18:36
camelia rakudo-moar d1ac6d: OUTPUT«sub infix:<,> (Any |) { #`(Sub+{<anon>}+{Precedence}|57246096) ... }␤»
18:36 arnsholt joined
abraxxa when would I want a comma having less precedence than anything else? 18:37
TimToady (we prefer to say "tighter" over "higher" because then you don't have to stop and figure out every time whether higher precedence things bind more tightly or more loosely)
FROGGS m: say &infix:<,>.prec
camelia rakudo-moar d1ac6d: OUTPUT«assoc => list, prec => g=␤»
PerlJam finds abraxxa's culture shock a little weird.
TimToady abraxxa: it's not looser than everything else, where do you get the idea that it is? 18:38
FROGGS abraxxa: foo( $a+$b, $c ) # what should happen here?
PerlJam abraxxa: I would have thought you were around enough to get used to Perl's particular brand of crazy :)
TimToady comma is looser than some operators, and tighter than others
abraxxa TimToady: at least it loses to smartmatch
TimToady no, it wins :)
abraxxa or is it just a matter of what comes first? 18:39
TimToady no
abraxxa then I wouldn't have needed the braces
bartolin_ abraxxa: here is a nice table: design.perl6.org/S03.html#Operator_precedence
[Coke] What does the A column mean there? 18:40
abraxxa bartolin_: thanks! the smartmatch operator ~~ is before the comma operator
18:40 rindolf left
PerlJam [Coke]: associativity 18:40
Though, I'm not sure what an associativity of X means
abraxxa L and R is left and right, but what is the rest?
TimToady list associative or non associative as it explains there
[Coke] a legend for that would be helpful. 18:41
FROGGS abraxxa: scroll down a little
[Coke]: there is
TimToady comma is list associative, which is why I could say infix:<,>(1,2,3)
PerlJam [Coke]: what FROGGS sais
er, said
TimToady L and R functions are only binary
PerlJam needed to scroll down a little too
[Coke] ... it would be nice if that chart explained what it was . :)
thanks.
TimToady m: say infix:<+>(1,2,3) 18:42
camelia rakudo-moar d1ac6d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SnmQJ0bh_g␤Calling infix:<+>(Int, Int, Int) will never work with proto signature ($?, $?)␤at /tmp/SnmQJ0bh_g:1␤------> 3say 7⏏5infix:<+>(1,2,3)␤»
TimToady see the difference?
abraxxa TimToady: what is infix? 18:43
TimToady + is left associative, and doesn't allow an N-ary call
a binary operator that goes between its arguemnts
like + or ~~
masak m: say infix:<,>(1, 2, 3)
camelia rakudo-moar d1ac6d: OUTPUT«123␤»
FROGGS abraxxa: the + in 42 + 1
m: say infix:<+>(1, 2, 3)
camelia rakudo-moar d1ac6d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8RmmaqKphg␤Calling infix:<+>(Int, Int, Int) will never work with proto signature ($?, $?)␤at /tmp/8RmmaqKphg:1␤------> 3say 7⏏5infix:<+>(1, 2, 3)␤»
FROGGS m: say infix:<+>(1, 2)
abraxxa FROGGS: isn't that called an operator normally?
camelia rakudo-moar d1ac6d: OUTPUT«3␤»
masak m: say infix:<!=>(1, 2, 3) 18:44
camelia rakudo-moar d1ac6d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/65V3pKjR_S␤Calling infix:<!=>(Int, Int, Int) will never work with proto signature ($?, $?)␤at /tmp/65V3pKjR_S:1␤------> 3say 7⏏5infix:<!=>(1, 2, 3)␤»
FROGGS abraxxa: it is just one kind of operator
TimToady abraxxa: if you say "operator" you're being imprecise
FROGGS abraxxa: $foo++ # the ++ is a postfix operator
masak apparently chaining things also accept only two arguments.
timotimo has to
the "chaining semantics" are built "outside" of the two-argument version
PerlJam tries to imagine a trinary chaining op
timotimo 1 <= 2 <= 3 really turns into 1 <= 2 && 2 <= 3
abraxxa so infix means between two operands?
in from inbetween? 18:45
TimToady if we did have a variadic form of it, it would have to alternate terms with operators
FROGGS abraxxa: exactly
abraxxa ah!
bartolin_ m: say (1 ~~ 2, 3, 4).perl
camelia rakudo-moar d1ac6d: OUTPUT«(Bool::False, 3, 4)␤»
bartolin_ abraxxa: the Bool::False is there because ~~ has a tighter precedence than the comma
FROGGS abraxxa: and then you know why prefix and postfix and circumfix is called that way :o)
or even postcircumfix
18:45 tinyblak joined
abraxxa are () braces a circumfix operator? 18:46
TimToady we usually call {} braces here
() are parens
FROGGS abraxxa: if they just surround something, yes
abraxxa ah, ok
TimToady they're all generically "brackets" though 18:47
FROGGS in foo(42), they are a postcircumfix, because they also follow something
TimToady some cultures call () "round brackets"
lucasb m: use Test; my $_ = 42; is($_, 42, 'looks good'); done
abraxxa I always thought of operators as characters that are used for math, not to give the code structure or precedence
camelia rakudo-moar d1ac6d: OUTPUT«Potential difficulties:␤ Redeclaration of symbol $_␤ at /tmp/0bzM6Cu4iR:1␤ ------> 3use Test; my $_7⏏5 = 42; is($_, 42, 'looks good'); done␤ok 1 - looks good␤1..1␤»
TimToady sometimes we call [] "brackets", but use "square brackets" if we wish to be clearer
lucasb ^^ Test passes. Is that ok?
TimToady abraxxa: what languages have you programmed in? 18:48
FROGGS abraxxa: but that is very important, especially when you mix them... 42 + 1 * 3 # you know that it does the multiplication first, so there have to be precedence rules
abraxxa FROGGS: is that just in Perl 6 so or do other languages call the characters for subroutine calls also operators?
FROGGS abraxxa: subroutine calls are not operators, but operators are implemented as subroutines 18:49
abraxxa TimToady: mainly TurboPascal in school, damn C64 Basic at home, then Perl 5, a bit Python now and then
PerlJam abraxxa: other languages may make such things a special syntax rather than a general operator
FROGGS abraxxa: but the most languages dont do it that way
TimToady they all call them "operators", but not all languages give you access to the underlying functions
abraxxa FROGGS: but you said that in the subrouting call foo(42) the brackets are postcircumfix operators? 18:50
18:50 tinyblak left
FROGGS abraxxa: yes 18:50
the parens are operators, not the function call...
lucasb My previous snippet is about the lexical "my $_" I asked a little earlier. The interpreter exists with zero exit status, and the test passes; but it is still a syntax error?
abraxxa with 'characters for subrouting calls' i meant the brackets, not the foo
FROGGS abraxxa: like and addition operation is not an operator, the + infix is 18:51
ahh, ye
yes
TimToady lucasb: it's not really a syntax error, but a semantic warning
FROGGS lucasb: "Potential difficulties" is a warning
abraxxa i always thought of all kind of brackets and command termination characters as line noise required by the parser
TimToady it's saying that you already had a $_ declared at this lexical level
lucasb Oh, now I see, just a warning... sorry 18:52
FROGGS lucasb: np
TimToady if you put that code inside a {} then it will not warn
because inside a block doesn't automatically have its own $_
abraxxa that's why I liked Python very much at first but also saw the drawbacks of indention instead of brackets later
FROGGS abraxxa: but programming is about all that... it is *your* way of telling the compiler what to do
lucasb m: { my $_ = 42; }
camelia rakudo-moar d1ac6d: OUTPUT«Potential difficulties:␤ Redeclaration of symbol $_␤ at /tmp/4hZLuERMPv:1␤ ------> 3{ my $_7⏏5 = 42; }␤»
TimToady uh
FROGGS it is callable
abraxxa FROGGS: sure, but i would have called ; an operator 18:53
TimToady that seems wrongish
FROGGS m: { my $_ = 42; }(42)
camelia rakudo-moar d1ac6d: OUTPUT«Potential difficulties:␤ Redeclaration of symbol $_␤ at /tmp/kKEkXw1KWC:1␤ ------> 3{ my $_7⏏5 = 42; }(42)␤Cannot assign to an immutable value␤ in block <unit> at /tmp/kKEkXw1KWC:1␤␤»
abraxxa but something else I didn't know the word for
TimToady m: -> { my $_ = 42 }
camelia rakudo-moar d1ac6d: OUTPUT«===SORRY!===␤Cannot find method 'value'␤»
TimToady say wat
FROGGS abraxxa: I would not call ; an operator...
abraxxa: like I would not call a comment or a newline an operator 18:54
WAT
abraxxa FROGGS: don't puzzle me even more! S03 says it's a Terminator operator
FROGGS TimToady: at least that's easy to locate with --ll-exception
abraxxa FROGGS: i'd call that line noise for the programmer ;) 18:55
FROGGS :o)
abraxxa enough for today
thanks for the insights, I hope they help me understand more of what's going on
TimToady you're welcome
abraxxa i hope there is or will be a glossary for terms like 'infix' 18:56
FROGGS there is
S99
PerlJam abraxxa: S99
(Is tadzik's bot not alive?)
abraxxa ah yes, that's great design.perl6.org/S99.html#infix
FROGGS PerlJam: it seems to rest in piece with feather :o) 18:57
18:59 Vlavv_ left
abraxxa bye! 19:02
FROGGS o/
bartolin_ o/ abraxxa
19:02 abraxxa left 19:03 chenryn_ joined
rjbs #perl6++ # an inspiration 19:03
nine_ A public service announcement: me and camelia will go offline for a while during the migration to my new server. See you on the flipside...
PerlJam nine_: good luck!
nine_ PerlJam: thanks
19:03 nine_ left
FROGGS nine_: see ya! 19:04
dang :P
dalek ecs: d929944 | TimToady++ | S03-operators.pod:
be clearer that Terms and Terminators are not ops
19:04 camelia left
TimToady
.oO(Isn't that a public disservice announcement?)
19:05
FROGGS hehe
masak after we made microservices so small that they became negative, all we have left is disservices. 19:06
FROGGS "Thank you for your patience." -- I AM NOT PATIENT!!!
masak I heard Einstein started out by working at the Patient Office. guess he got impatient and became a physicist instead. 19:08
19:11 Vlavv_ joined
TimToady after he invented spacetime he couldn't tell whether he was impatient or immobile... 19:14
masak well, Heisenberg was uncertain on similar grounds... 19:15
19:17 chenryn_ left
muraiki unlike Heisenberg, Planck's views were pretty much constant 19:20
masak but quite small 19:24
PerlJam and short-lived 19:25
moritz and Hilbert blew up into Space before doing any great discoveries 19:27
19:28 kinslayer joined 19:32 braintwist joined, vendethiel joined
moritz perlpunks.de/paste/show/5524307e.43b4.2e8 when I try to change a CArray (from pre-Pointer times) to an 'is rw' in DBDish::SQLite, I get a segfault 19:32
is that the right approach?
oh wait, that was the Pointer[] instead of CArray[] approach
but changing it to OpaquePointer $handle is rw (and passing in $conn instead of Pointer[$conn]) also segfaults 19:33
FROGGS moritz: the 'is rw' is for int and num only so far 19:34
19:35 kinslayer left
FROGGS so 'int32 is rw' does mean 'int*' 19:35
and then you can pass an int32, and it will be passed as a pointer instead
and after the call you've got a modified int32 variable 19:36
19:40 spider-mario joined, abraxxa joined, abraxxa left
moritz FROGGS: but Pointer[$conn] or Pointer[$conn].new should work, no? 19:43
FROGGS moritz: no, because Pointer[$thing].new does not malloc a pointer (yet) 19:45
m: use NativeCall; sub malloc(long) is native { * }; my $ptr = Pointer[long].new(malloc(nativecallsizeof(long))); say $ptr 19:48
ahh, yeah, camelia :/
moritz FROGGS: what does it do?
FROGGS moritz: what exactly? 19:49
moritz FROGGS: Pointer[$thing].new
FROGGS it gives you a thing that can carry a memory adress
address*
moritz what does that mean?
FROGGS I dunno how to explain 19:50
moritz let's start this the other way round 19:51
is Pointer[$thing].new *supposed* to DWIM?
FROGGS I don't think so
Pointer[$thing].malloc will might DWYM
moritz will Pointer[$thing].new do anything useful? 19:53
FROGGS it creates a NULL pointer of your type 19:54
and Pointer[$thing].new( other memory address here ) is like copying a pointer
19:55 virtualsue joined
moritz but isn't Pointer[$thing] already a NULL pointer of my type? 19:55
FROGGS yes
moritz then I don't see why we need Pointer[$thing].new doing the same thing
FROGGS I think because we also need a way to create a Pointer from a memory address 19:56
and that address is optional (defaults to zero, which means NULL) 19:57
moritz
.oO( timtowtmaNp )
FROGGS JNA also has a Pointer that does no memory management... they've got a Memory type 19:58
but, I don't like that distinction...
it would be fine for me if Pointer.new would allocate, and something else would allow to just create a Pointer from a bare memory address 19:59
it just needs a good name
moritz does it need to be a type? can't it just be pointer($thing)?
20:00 ggoebel joined
moritz I think part of my problem is that in C, pointers and arrays are very much the same thing 20:00
FROGGS I thought of a method
true
moritz so when I set up a complicated one-element CArray construct to emulate what is a pointer in a C API 20:01
FROGGS hmmm, pointer($address) is not too bad
moritz and then I see the Pointer type
I think "hey, using a proper pointer here would be far easier than this CArray workaround"
except FAIL
FROGGS aye
pippo hi #perl6 20:08
FROGGS hi pippo
pippo Anybody nows how can I do this: 20:09
m: grammar base { ... }; grammar G1 is base { ... }; my grammar G1 {TOP {<g1>}}; my grammar base {rule g1 {1}};
20:09 Hor|zon joined
pippo i.e. write base grammar after G1? 20:10
20:10 telex left
pippo m: grammar base { ... }; grammar G1 is base { ... }; my grammar G1 {TOP {<g1>}}; my grammar base {rule g1 {1}}; say G1.parse("1"); 20:11
masak don't have to predeclare G1 in that code.
pippo m: say "Hello";
moritz pippo: what's your use case?
pippo: thing is, you can't inherit from a stubbed class, because the class must know its methods (including those from parent classes) at composition time 20:12
and a grammar is really just a class (with an additional superclass class Grammar)
pippo moritz: just to leave the uninportant parts at bottom of my file.
20:12 telex joined
moritz pippo: then I'd suggest to move them to another file (or let it be entirely) 20:12
pippo moritz: OK. Then how can I do to include another file? 20:13
20:14 darutoko left, Hor|zon left
pippo r: say "Hello"; 20:15
geekosaur camelia's down for a bit 20:16
20:17 zakharyas joined
pippo geekosaur: thanks 20:18
grondilu std: grammar { TOP {} } 20:19
geekosaur ... 20:20
[07 19:03] <nine_> A public service announcement: me and camelia will go offline for a while during the migration to my new server. See you on the flips
20:23 camelia joined 20:24 ChanServ sets mode: +v camelia 20:26 nine joined
nine And back again :) 20:26
yoleaux 9 Feb 2015 16:53Z <ab5tract> nine: sometimes i am getting back Bufs from Class::DBI, instead of strings. the column type is varchar with a utf8 character set
9 Feb 2015 16:53Z <ab5tract> nine: which then makes it explode when trying to stringify
13 Feb 2015 11:40Z <lizmat> nine: Thinking about P6 concurrence and Inline::Perl5
13 Feb 2015 11:41Z <lizmat> nine: You might want to make sure that all Inline::Perl5 accesses are done from the same $*THREAD.id
bartolin_
.oO(long time away)
20:27
nine Apparently when irssi started up it finally authenticated me again with nickserv 20:28
20:28 spider-mario left, spider-mario joined
bartolin_ maybe I should disconnect as well, to get rid of that underscore :) 20:29
nine m: say 'back!';
camelia rakudo-moar d1ac6d: OUTPUT«back!␤»
bartolin_ \o/
20:30 diana_olhovik joined, bartolin_ left 20:37 brrt joined 20:41 Ven joined 20:42 lichtkind left 20:45 kaare_ left
tadzik synopsebot is down :( 20:48
moritz: can I have a p6c account?
PerlJam tadzik: I can make you one. 20:49
tadzik: you want "tadzik" for your login id? 20:50
tadzik PerlJam: yep
20:59 fhelmberger joined 21:00 noganex joined
nine moritz: you're logged on to my old server 21:01
21:02 chenryn_ joined
PerlJam nine: kill his processes and that won't be true anymore ;> 21:03
21:03 fhelmberger left 21:05 pippo left
dalek kudo/nom: 260e3cd | FROGGS++ | tools/build/ (2 files):
install perl6-gdb-m and perl6-valgrind-m

We do that to ease the user and to also get better error reports. Both runners are installed on non-Windows only for now.
21:06
timotimo ah, nice
FROGGS gnight 21:07
21:07 FROGGS left
lucasb m: $_ = 'ABC'; s :i /b/x/; .say 21:08
camelia rakudo-moar d1ac6d: OUTPUT«AxC␤»
lucasb m: $_ = 'ABC'; s :i(True) /b/x/; .say 21:09
camelia rakudo-moar d1ac6d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ERpXvTpg0l␤Adverb i value must be known at compile time␤at /tmp/ERpXvTpg0l:1␤------> 3$_ = 'ABC'; s :i(True)7⏏5 /b/x/; .say␤»
lucasb ^^ Test that is failing in S05-substitution/subst.t
masak huh. 21:10
sounds like a job for Bisect Man.
nine PerlJam: already tried that and he came back. So I'm trying the direct communication now ;)
lucasb Bisect Man to the rescue /o/
timotimo star: $_ = 'ABC'; s :i(True) /b/x/; .say 21:11
camelia star-m 2013.03: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tstox2YYdw␤Adverb i value must be known at compile time␤at /tmp/tstox2YYdw:1␤------> 3$_ = 'ABC'; s :i(True)7⏏5 /b/x/; .say␤»
21:11 skids left
masak .oO( is it a bird? is it a plane? is it a commit somewhere in between? ) 21:11
brrt talking about commits... 21:12
bbiab
geekosaur how does a bird merge compare to an octopus merge? >.>
lucasb I was just joking. I don't know if ever worked before. There is a "#?rakudo todo" in it. 21:13
masak ...then probably not. 21:14
21:16 Hor|zon joined 21:20 zakharyas left 21:21 Rounin left, Hor|zon left 21:23 chenryn_ left
awwaiid So I am wanting to start using rakudo in my one-off scripts and such a bit, and also one-liners. I see there is no -i param? in-place-edit, like perl -pi -e 's/foo/bar/g' file.txt 21:29
masak ooh, that would be totally sweet. 21:30
jercos ha, pi e
awwaiid I was surprised that it wasn't already there :)
masak awwaiid: maybe file a NYI ticket for that?
awwaiid should learn what an NYI ticket is
PerlJam awwaiid: Not Yet Invented
er, Implemented
awwaiid sure
masak Not Yet -i 21:31
awwaiid hmm. rakudo.com is not rakudo.org
PerlJam there's a rakudo.com?
lucasb Dance company :-O the way of the camel :) 21:32
PerlJam okay ... I *never* would have guessed what rakudo.com is
masak could be worse
21:33 Vlavv_ left 21:36 pullphinger left
awwaiid Like this, ya? rt.perl.org/Ticket/Display.html?id...a67d378818 21:38
21:39 RabidGravy left
masak ya rly! 21:39
awwaiid woo!
ok bye bye
masak though I doubt you'll get -pie
awwaiid awwwww
masak since i takes a parameter
awwaiid I've always wanted that in p5
masak -i.bak
awwaiid and be like... yo! you want a param? use the long form! 21:40
masak that seems like a good behavior to me
awwaiid mine or the real one? :)
PerlJam awwaiid: I'd be find with yours
er, finde
awwaiid great! let's start a revolution
PerlJam blah! 21:41
*fine*
masak sounds like there's grounds for discussing this :)
I've never seen fault with the p5 behavior
awwaiid well that's simple. you don't write *pie*
21:42 lnr left, lnr joined, lnr left, lnr joined, lnr left 21:43 lnr joined, lnr left, lnr joined
PerlJam awwaiid: the only trick would be the mutual exclusion of the long and short forms. 21:43
21:43 lnr left, lnr joined, lnr left 21:44 lnr joined, lnr left, lnr joined, lnr left 21:45 lnr joined, lnr left, Vlavv_ joined, lnr joined, lnr left, lnr joined, lnr left 21:46 lnr joined, lnr left, lnr joined 21:47 ChanServ sets mode: +o masak, masak sets mode: +b *!*lnr@*.engr.arizona.edu, lnr was kicked by masak (lnr)), ChanServ sets mode: -o masak 21:48 _edwin left 21:49 brrt left 21:50 raiph left 21:53 espadrine joined 21:58 dolmen joined
timotimo is there anything broken with regards to unsigned integers still? 21:59
raydiak m: say blob8.new(128).decode('ascii') # either this should work or at least the error is LTA 22:02
camelia rakudo-moar 260e3c: OUTPUT«Will not decode invalid ASCII (code point < 0 found)␤ in method decode at src/gen/m-CORE.setting:6586␤ in block <unit> at /tmp/RkTAJhMFgR:1␤␤»
22:03 spider-mario left 22:04 mohij left
lucasb ...which leads to my question: do you people really need {int,uint}{1,2,4}? :) 22:07
22:08 muraiki left
masak I think they're there mostly for compatibility with things like C, maybe? 22:08
I don't use them much, because I don't usually code at that level. Int tends to be good enough for me. 22:09
22:10 diana_olhovik left 22:11 jercos left, pdcawley joined, jercos joined
lucasb Thanks. I asked out of curiosity, because it seems too granularity to me. But I like having a bit (uint1) type. 22:12
22:12 Possum left 22:13 mohij joined, Possum joined
masak I can see a use for them. when you're *very* concerned about memory. 22:14
unless I am in some situation, I'm not gonna bother about them much.
jercos seems like it might be a good idea to have an n-bit type for struct compatibility and the like... 22:20
But perhaps that belongs in a library for handling integers in bitstrings
raydiak I can see someone wanting to use CArray[uint1] for bit vectors e.g. for nativecall or binary I/O...maybe a nicer interface than a bunch of bitwise operators, shifting and ORing and so forth
(or Buf/Blob) 22:21
22:26 beastd left
raydiak has been thinking in circles again and comes to the conclusion that the simplest possible self-hosting compiler is arguably an empty file, which implements nothing :P 22:29
22:29 ggoebel left, Ven left, grondilu left
masak 'night, #perl6 22:32
lucasb o/ masak 22:33
raydiak sleep well masak
lucasb About raydiak's question, I found the message here: 22:34
github.com/MoarVM/MoarVM/blob/mast...scii.c#L21
In C, a char is 8bit *signed* ? Then I think the "code point < 0" is because of wrap around behaviour 22:35
22:35 jack_rabbit joined
lucasb But I don't know what I'm talking about :) 22:36
22:39 dolmen left
raydiak yeah I looked at it a bit earlier, and saw another error about > 127 elsewhere, so I don't think we're trying to support extended ascii at all, just the error needs to be a little more user-friendly 22:43
as far as char being signed or not, idk what's normal, I would have assumed unsigned but apparently not :P but wikipedia says it can be either depending on platform 22:47
22:47 vendethiel left
lucasb Agreed. IMO, from rakudo's perspective the message is LTA. 22:51
22:59 fhelmberger joined 23:03 fhelmberger left 23:05 Hor|zon joined 23:08 chenryn_ joined 23:10 Hor|zon left 23:12 chenryn_ left 23:15 virtualsue left, skids joined 23:20 andreoss joined
lucasb m: say blob8.new(354,377,357).decode('ascii') # good night o/ 23:20
camelia rakudo-moar 260e3c: OUTPUT«bye␤»
23:21 lucasb left
andreoss m: sub x(\a,\root,\d) { my $t = (root.sqrt - d) * (root.sqrt +d); say "$t % {a} = {$t % a}"}; say x(1,23,1); 23:21
camelia rakudo-moar 260e3c: OUTPUT«22 % 1 = 0.999999999999996␤True␤»
andreoss m: say 22 % 1
camelia rakudo-moar 260e3c: OUTPUT«0␤»
TimToady m: say utf8.new(354,377,357) 23:22
camelia rakudo-moar 260e3c: OUTPUT«utf8:0x<62 79 65>␤»
TimToady m: say ~utf8.new(354,377,357)
camelia rakudo-moar 260e3c: OUTPUT«bye␤»
andreoss m: say 22.0 % 1 23:23
camelia rakudo-moar 260e3c: OUTPUT«0␤»
andreoss seems like $t is not just 22 deep inside 23:26
23:28 BenGoldberg joined
TimToady m: say utf8("abc") 23:31
camelia rakudo-moar 260e3c: OUTPUT«Cannot find method 'utf8'␤ in block <unit> at /tmp/ALCMldIRyV:1␤␤»
TimToady aww
andreoss m: sub x(\root,\d) { my $t = (root.sqrt - d) * (root.sqrt +d); say $t == $t.Int ?? "OK" !! "Not OK $t is not {$t.Int}" ; x(23,4);
camelia rakudo-moar 260e3c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sHwozbNc4X␤Missing block␤at /tmp/sHwozbNc4X:1␤------> 3! "Not OK $t is not {$t.Int}" ; x(23,4);7⏏5<EOL>␤»
andreoss m: sub x(\root,\d) { my $t = (root.sqrt - d) * (root.sqrt +d); say $t == $t.Int ?? "OK" !! "Not OK $t is not {$t.Int}"} ; x(23,4); 23:32
camelia rakudo-moar 260e3c: OUTPUT«Not OK 7 is not 6␤»
andreoss m: sub x(\root,\d) { my $t = (root.sqrt - d) * (root.sqrt +d); say $t == $t.Int ?? "OK" !! "Not OK $t is not {(~$t).Int}"} ; x(23,4); 23:33
camelia rakudo-moar 260e3c: OUTPUT«Not OK 7 is not 7␤»
TimToady m: sub x(\root,\d) { my $t = (root.sqrt - d) * (root.sqrt +d); say $t == $t.Int ?? "OK" !! "Difference is { $t - $t.INT }" 23:34
camelia rakudo-moar 260e3c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9D5LPue2Rc␤Missing block␤at /tmp/9D5LPue2Rc:1␤------> 3 "OK" !! "Difference is { $t - $t.INT }"7⏏5<EOL>␤ expecting any of:␤ postfix␤ statement end␤ statement modifier…»
TimToady m: sub x(\root,\d) { my $t = (root.sqrt - d) * (root.sqrt +d); say $t == $t.Int ?? "OK" !! "Difference is { $t - $t.INT }"}; x(23,4)
camelia rakudo-moar 260e3c: OUTPUT«No such method 'INT' for invocant of type 'Num'␤ in sub x at /tmp/jvZBtgMWrs:1␤ in block <unit> at /tmp/jvZBtgMWrs:1␤␤»
TimToady m: sub x(\root,\d) { my $t = (root.sqrt - d) * (root.sqrt +d); say $t == $t.Int ?? "OK" !! "Difference is { $t - $t.Int }"}; x(23,4)
camelia rakudo-moar 260e3c: OUTPUT«Difference is 0.999999999999996␤»
TimToady m: sub x(\root,\d) { my $t = (root.sqrt - d) * (root.sqrt +d); say $t == $t.Int ?? "OK" !! "Difference is { $t - $t.round }"}; x(23,4) 23:35
camelia rakudo-moar 260e3c: OUTPUT«Difference is -4.44089209850063e-15␤»
23:36 mohij left
TimToady normal float-point imprecision... 23:36
andreoss why it doesn't come out with convertion to string? 23:37
23:37 larion joined
TimToady m: sub x(\root,\d) { my $t = (root.sqrt - d) * (root.sqrt +d); say $t == $t.Int ?? "OK" !! "Difference is { ($t - $t.round).fmt('%.15g') }"}; x(23,4) 23:38
camelia rakudo-moar 260e3c: OUTPUT«Difference is -4.44089209850063e-15␤»
TimToady m: sub x(\root,\d) { my $t = (root.sqrt - d) * (root.sqrt +d); say $t == $t.Int ?? "OK" !! "Difference is { ($t - $t.round).fmt('%.14g') }"}; x(23,4)
camelia rakudo-moar 260e3c: OUTPUT«Difference is -4.4408920985006e-15␤»
TimToady m: sub x(\root,\d) { my $t = (root.sqrt - d) * (root.sqrt +d); say $t == $t.Int ?? "OK" !! "Difference is { ($t - $t.round).fmt('%.14f') }"}; x(23,4)
camelia rakudo-moar 260e3c: OUTPUT«Difference is -0.00000000000000␤»
TimToady by default it's probably using a format that throws away the last bit or two 23:39
m: say 0.999999999999996.fmt('%.14g') 23:41
camelia rakudo-moar 260e3c: OUTPUT«1␤» 23:42
andreoss thanks. i guess i will stick with $t.Str.Int 23:44
TimToady well, you can just use .round(0.00000000000000) 23:45
0.00000000000001
or you can write a symbolic math package :) 23:46
23:47
actually, that's the program, and the language would be Wolfram 23:51
TimToady would never name a programming language after himself...
23:58 Zoffix left