Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-04-07

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:11 Akagi201 joined #perl6
00:12 Sqirrel joined #perl6
00:13 timotimo i'm not feeling 100% up to the task of writing the weekly before i've had some sleep
00:17 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:21 timotimo man, TimToady, you confused the F out of me
00:21 timotimo it's difficult to make sense of things like that at 1am :)
00:42 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:43 ugexe i just have to digest this a little more before i write a pr
00:50 BenGoldberg joined #perl6
00:51 adu joined #perl6
01:14 eternaleye joined #perl6
01:17 slavik joined #perl6
01:20 laouji joined #perl6
01:50 ilbot3 joined #perl6
01:50 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend! | feather will shut down permanently on 2015-03-31
02:11 noganex_ joined #perl6
02:11 slavik joined #perl6
02:36 chenryn joined #perl6
03:05 yeahnoob joined #perl6
03:06 kaare_ joined #perl6
03:27 adu joined #perl6
03:29 adu joined #perl6
03:43 laouji joined #perl6
03:51 slavik joined #perl6
03:53 KCL joined #perl6
04:04 FROGGS_ joined #perl6
04:22 laouji joined #perl6
04:37 raviko joined #perl6
04:41 jack_rabbit joined #perl6
04:46 chenryn joined #perl6
05:04 bcode joined #perl6
05:10 dalek nqp: 041e1e2 | TimToady++ | src/QRegex/Cursor.nqp:
05:10 dalek nqp: knock a few % off stage parse
05:10 dalek nqp:
05:10 dalek nqp: 1) Avoid creating Match objects we'll just throw away.
05:10 dalek nqp: 2) Avoid traversing the cstack when we know nothing is wanted from it.
05:10 dalek nqp: review: https://github.com/perl6/nqp/commit/041e1e21f9
05:12 Sqirrel joined #perl6
05:14 travis-ci joined #perl6
05:14 travis-ci NQP build failed. TimToady 'knock a few % off stage parse
05:14 travis-ci http://travis-ci.org/perl6/nqp/builds/57435006 https://github.com/perl6/nqp/compare/35c589eafc73...041e1e21f993
05:14 travis-ci left #perl6
05:40 Sqirrel joined #perl6
05:41 dalek rakudo/nom: aff1762 | TimToady++ | tools/build/NQP_REVISION:
05:41 dalek rakudo/nom: bump NQP rev
05:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/aff1762f0c
05:41 dalek rakudo/nom: 13afa62 | TimToady++ | src/core/Cursor.pm:
05:41 dalek rakudo/nom: similar speedup for P6's MATCH maker
05:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/13afa62a72
05:41 dalek rakudo/nom: 1defad9 | TimToady++ | src/core/Cursor.pm:
05:41 dalek rakudo/nom: also do the $sawcaps optimization
05:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1defad95ae
05:46 Patterner joined #perl6
06:04 jack_rabbit joined #perl6
06:05 dalek rakudo/nom: a8435bb | TimToady++ | src/core/Cursor.pm:
06:05 dalek rakudo/nom: unbreak JVM build, oops
06:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a8435bb307
06:13 virtualsue joined #perl6
06:22 jnthn morning, #perl6
06:24 jnthn TimToady: I see failing tests in nqp's "make test" in t/qregex/01-qregex.t
06:30 jack_rabbit joined #perl6
06:31 TimToady hmm, well, it passes rakudo's tests...I guess I'll have to look at that tomorrow
06:32 TimToady 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:33 TimToady but basically I'm running a fever, and should probably rest soon...
06:36 TimToady looks like it lost track of <( and )> offhand
06:36 jnthn No, got it on Moar
06:36 jnthn yes, rest, it can wait for tomorrow
06:37 jnthn Not in the way of anything I plan to do today, anyways :)
06:37 TimToady probably needs to count <( and )> under $sawcaps somehow
06:40 TimToady m: $_ = "foo bar baz"; say / ^ \w+ ' ' <( \w+ )> ' ' \w+ $ /
06:40 camelia rakudo-moar ae6863: OUTPUT«␤»
06:40 TimToady m: $_ = "foo bar baz"; say / ^ \w+ ' ' ( \w+ ) ' ' \w+ $ /
06:40 camelia rakudo-moar ae6863: OUTPUT«␤»
06:40 TimToady hmm
06:40 TimToady m: $_ = "foo bar baz"; say m/ ^ \w+ ' ' ( \w+ ) ' ' \w+ $ /
06:40 camelia rakudo-moar ae6863: OUTPUT«「foo bar baz」␤ 0 => 「bar」␤»
06:41 TimToady m: $_ = "foo bar baz"; say m/ ^ \w+ ' ' ( \w+ ) ' ' \w+ $ /
06:41 camelia rakudo-moar ae6863: OUTPUT«「foo bar baz」␤ 0 => 「bar」␤»
06:41 TimToady m: $_ = "foo bar baz"; say m/ ^ \w+ ' ' <( \w+ )> ' ' \w+ $ /
06:41 camelia rakudo-moar ae6863: OUTPUT«「bar」␤»
06:41 TimToady they seem to work at the P6 level
06:41 TimToady oh, looks like not recompiled yet
06:42 TimToady yeah, they're busted here, so we're just not testing <( and )> well in roast, I guess
06:43 FROGGS joined #perl6
06:43 Woodi joined #perl6
06:44 TimToady yeah, they work if I put another capture in, so it's the sawcaps thing
06:45 TimToady 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'
06:45 [Tux] How do I track the couse of that?
06:46 FROGGS [Tux]: try REKUDO_MODULE_DEBUG=1 yourscript.pl
06:46 FROGGS [Tux]: err, RAKUDO_MODULE_DEBUG=1
06:47 [Tux] https://gist.github.com/Tux/a0ec0c9668ae3bebe950
06:47 jnthn TimToady: Aye, sounds like we need more roast tests :)
06:48 tinyblak joined #perl6
06:49 [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 ?
06:50 [Tux] https://gist.github.com/Tux/8dc3bcb1cd82a7c23d3b
06:51 [Tux] looks like Slang::Tuxic
06:52 dalek nqp: 73de526 | TimToady++ | src/QRegex/Cursor.nqp:
06:52 dalek nqp: temporarily disable sawcaps part of optimization
06:52 dalek nqp: review: https://github.com/perl6/nqp/commit/73de5269f3
06:52 FROGGS aye
06:52 Ven joined #perl6
06:52 FROGGS [Tux]: where is the source of Text-CSV6?
06:53 dalek rakudo/nom: a3b4710 | TimToady++ | / (2 files):
06:53 dalek rakudo/nom: bump NQP to get temporary disable of sawcaps opt
06:53 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a3b4710891
06:54 [Tux] I moved Text::CSV from test-t.pl to lib/Text/
06:54 [Tux] ah, on git?
06:54 [Tux] https://github.com/Tux/CSV
06:55 FROGGS yes, so I can take a look
06:55 [Tux] where the move did not yet happen
06:55 [Tux] $ git move test-t.pl lib/Text/CSV.pm
06:56 travis-ci joined #perl6
06:56 travis-ci NQP build passed. TimToady 'temporarily disable sawcaps part of optimization'
06:56 travis-ci http://travis-ci.org/perl6/nqp/builds/57441340 https://github.com/perl6/nqp/compare/041e1e21f993...73de5269f3ae
06:56 travis-ci left #perl6
06:56 [Tux] remove MAIN from that file into https://gist.github.com/Tux/11686e410ea6418b465a (new test-t.pl)
06:57 fhelmberger joined #perl6
06:58 jack_rabbit joined #perl6
07:01 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:02 FROGGS you probably want to golf it down
07:05 FROGGS [Tux]: I know what happens
07:05 FROGGS [Tux]: /pro/3gl/CPAN/Text-CSV6/Text/CSV.pm is still a symlink to t-test.pl
07:06 [Tux] not here
07:08 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
07:09 [Tux] right
07:09 [Tux] thnx!
07:09 FROGGS :o)
07:09 [Tux] FROGGS++, HERO!
07:10 * FROGGS .oO( Confidence in module loading restored )
07:10 FROGGS :D
07:11 [Tux] FWIW, this means that another serious slowdown in the core has been fixed!
07:12 dalek roast: 9266f4d | jnthn++ | S02-types/capture.t:
07:12 dalek roast: Test for RT #75850.
07:12 dalek roast: review: https://github.com/perl6/roast/commit/9266f4dd2b
07:16 abraxxa joined #perl6
07:16 telex joined #perl6
07:16 jack_rabbit joined #perl6
07:18 Rounin joined #perl6
07:28 Sqirrel joined #perl6
07:34 brrt joined #perl6
07:36 KCL_ joined #perl6
07:37 espadrine_ joined #perl6
07:38 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 #perl6
07:39 tinyblak joined #perl6
07:40 lizmat joined #perl6
07:41 diana_olhovik joined #perl6
07:41 lizmat good *, #perl6!
07:41 FROGGS hi lizmat! \o/
07:42 lizmat hi FROGGS
07:42 * lizmat is glad the snappiness level has decreased on #perl6
07:42 jnthn o/ lizmat
07:42 lizmat hi jnthn
07:42 chenryn joined #perl6
07:43 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
07:43 abraxxa FROGGS: is it in when I install moar from the nom branch?
07:43 lizmat however, I'm still not sure what to work on now
07:43 FROGGS abraxxa: yes
07:43 rurban_ joined #perl6
07:44 abraxxa brewing
07:44 lizmat the -Ofun has been drained from my system pretty much
07:44 FROGGS abraxxa: also here is an example: https://github.com/rakudo/rakudo/blob/nom/t/04-nativecall/15-rw-args.t
07:44 [Tux] lizmat, speed in Regex?
07:44 FROGGS :/
07:44 abraxxa FROGGS++ #thanks
07:45 abraxxa i've seen the work on unsigned ints too, do you mean they work but not with is rw?
07:45 yvan1 joined #perl6
07:45 FROGGS abraxxa: unsigned ints work with 'is rw' as long as you dont exceed the max of the signed int variant
07:46 FROGGS m: my int8 $a = 50; say $a
07:46 camelia rakudo-moar a3b471: OUTPUT«50␤»
07:46 FROGGS m: my int8 $a = 127; say $a
07:46 camelia rakudo-moar a3b471: OUTPUT«127␤»
07:46 FROGGS m: my int8 $a = 128; say $a
07:46 camelia rakudo-moar a3b471: OUTPUT«-128␤»
07:46 FROGGS m: my int8 $a = 129; say $a
07:46 camelia rakudo-moar a3b471: OUTPUT«-127␤»
07:46 FROGGS see?
07:46 moritz m: my uint8 $a = 129; say $a
07:46 camelia rakudo-moar a3b471: OUTPUT«-127␤»
07:46 moritz huh.
07:46 abraxxa FROGGS: got it
07:48 FROGGS abraxxa: that might even be enough for what you need currently
07:48 FROGGS lizmat: how far is the new-io branch from merging?
07:49 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
07:49 abraxxa it's way faster than p5
07:50 lizmat there's been no feedback about my speculation in the specs/newio branch
07:50 lizmat and the only feedback I *did* get, was ridicule
07:50 lizmat so motivated to work on it, I am not
07:50 moritz lizmat: I'm sorry to hear that
07:50 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)
07:50 FROGGS well, I followed your commits and would have hooked in where I'd thought it might not be the right thing to do
07:50 moritz lizmat: and I realize that I haven't given feedback either :(
07:51 moritz (mostly distracted by real life :( )
07:51 abraxxa nwc10: i see. does Perl6 with MoarVM not require the kind of detection the Configure script does?
07:51 FROGGS yeah, we should review it
07:51 moritz abraxxa: perl 5 does far, far more feature detection
07:51 * FROGGS compiles it now
07:51 nwc10 abraxxa: possibly it *should*, but right now it's not portably to as many systems
07:51 nwc10 and also, Configure dates from a time when I think that there were about 50 Unix variants
07:51 moritz abraxxa: and runs on obscure and/or ancient platforms that MoarVM has no amibitions (yet?) to support
07:51 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?"
07:52 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
07:52 lizmat not very helpful either
07:52 nwc10 stuff has become a lot more standard since then
07:53 nwc10 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
07:53 nwc10 On (at least Linux) we need something like -Wl,-E in the compiler flags for the link stage
07:53 nwc10 but
07:53 nwc10 1) I don't know what the portable apprach is
07:53 dalek rakudo/nom: c2f531a | jnthn++ | src/ (2 files):
07:53 dalek rakudo/nom: Complain on placeholders in attr initializers.
07:53 dalek rakudo/nom:
07:53 dalek rakudo/nom: Fixes RT #78112. Includes a typed exception, for easy testing.
07:53 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c2f531a8e6
07:53 nwc10 2) how to fit it in
07:53 dalek roast: 7bbcda1 | jnthn++ | S32-exceptions/misc.t:
07:53 dalek roast: Test for RT #78112.
07:53 dalek roast: review: https://github.com/perl6/roast/commit/7bbcda1cba
07:53 Silfa joined #perl6
07:54 Silfa left #perl6
07:54 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 :)
07:55 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 #perl6
07:56 lizmat don't really see that as part of QA necessarily, but otherwise I wouldn't be against it
07:57 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:59 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
07:59 abraxxa 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
08:00 FROGGS abraxxa: can you no-paste the entire error message and the command that triggers it?
08:00 lizmat that was the original idea
08:00 lizmat some of the code in newio branch was already ported back to nom by me
08:01 moritz abraxxa: hidden_from_backtrace is deprecated in favor of hidden-from-backtrace; current DBIish has followed that, though
08:01 abraxxa FROGGS: http://paste.scsys.co.uk/471279
08:01 moritz ... as the warning message says
08:01 abraxxa moritz: so the line number doesn't point to the invoking code but the one throwing the warning?
08:02 moritz abraxxa: seems like, yes
08:03 jnthn lizmat: OK, understood.
08:04 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
08:05 lizmat it's easier to donate
08:05 FROGGS abraxxa: what exactly?
08:06 abraxxa the Str bind which worked before
08:06 FROGGS abraxxa: can you show me the failing code? I don't know what 'Str bind' means to you
08:07 abraxxa https://github.com/abraxxa/DBIish/blob/master/lib/DBDish/Oracle.pm6#L431
08:07 Ven joined #perl6
08:08 darutoko joined #perl6
08:09 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?
08:10 FROGGS jnthn: the one I merged minutes ago?
08:10 dalek nqp: 02bdff1 | jnthn++ | src/vm/ (2 files):
08:10 dalek nqp: Add constants for Unicode normalization forms.
08:10 dalek nqp: review: https://github.com/perl6/nqp/commit/02bdff1c8e
08:10 jnthn FROGGS: Oh, the dalek output cut off before it showed you had merged it as a PR :)
08:11 jnthn abraxxa: Not unless MOAR_REVISION was bumped.
08:11 FROGGS I'll bump it..
08:12 dalek nqp: d559335 | FROGGS++ | tools/build/MOAR_REVISION:
08:12 dalek nqp: bump moar revision for nativecall fix
08:12 dalek nqp: review: https://github.com/perl6/nqp/commit/d559335b78
08:12 * abraxxa rebuilds nom
08:13 dalek rakudo/nom: b3b241d | FROGGS++ | tools/build/NQP_REVISION:
08:13 dalek rakudo/nom: bump nqp/moar revision for nativecall fix
08:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b3b241d0c3
08:13 FROGGS abraxxa:
08:13 FROGGS abraxxa: now you can pull/build
08:13 lizmat m: sub a { 42 }; for ^1000000 { a }; say now - INIT now
08:13 camelia rakudo-moar a3b471: OUTPUT«0.59222812␤»
08:13 abraxxa should running rakudobrew again work?
08:13 lizmat m: sub a { return 42 }; for ^1000000 { a }; say now - INIT now  # feels like some low-hanging optimizing fruit here
08:13 camelia rakudo-moar a3b471: OUTPUT«1.9954593␤»
08:13 dalek rakudo/newio: 64ac2bd | FROGGS++ | tools/build/NQP_REVISION:
08:13 dalek rakudo/newio: bump nqp/jvm revision for 'is rw' params in nativecall
08:13 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/64ac2bdeeb
08:13 dalek rakudo/newio: 143f621 | FROGGS++ | t/04-nativecall/15-rw-args. (2 files):
08:13 dalek rakudo/newio: add tests for 'is rw' params in nativecall
08:14 lizmat aka, using return is 4x as slow
08:14 nwc10 compared with what? Falling off the end of a function?
08:14 lizmat yup
08:14 dalek joined #perl6
08:14 nwc10 that feels like something that should be on a ticket to fix. Does a ticket exist?
08:14 nwc10 (possibly a post-September fix)
08:15 Ven o/, lizmat !
08:15 abraxxa still segfaulting
08:15 lizmat hi Ven
08:15 Ven also \o, #perl6
08:15 abraxxa I'll delete my nom dir to be sure
08:15 jnthn Note that the cost may not be "return" itself per se.
08:15 jnthn But rather "breaks inlining" or similar.
08:15 eli-se joined #perl6
08:15 kjs_ joined #perl6
08:15 FROGGS abraxxa: if it still segfaults we'd need a gdb backtrace
08:16 eli-se use clang memory sanitiser as well
08:27 abraxxa FROGGS: yes, still fails
08:27 abraxxa This is perl6 version 2015.03-182-gb3b241d built on MoarVM version 2015.03-57-g97c5ddf
08:27 abraxxa how do i create a gdb stacktrace
08:29 FROGGS abraxxa: I've described it here: https://github.com/perl6/DBIish/issues/8#issuecomment-88580074
08:29 abraxxa FROGGS: the cat output from 1) doesn't include exec
08:31 abraxxa FROGGS: it outputs #!/bin/sh
08:31 abraxxa /home/ahartmai/.rakudobrew/bin/../moar-nom/install/bin/perl6 "$@"
08:32 abraxxa which again is a shell script
08:32 FROGGS abraxxa: then do: cat home/ahartmai/.rakudobrew/bin/../moar-nom/install/bin/perl6
08:32 abraxxa got it
08:32 FROGGS this should show siomething with 'exec' and path to more etc
08:33 abraxxa FROGGS: http://paste.scsys.co.uk/471280
08:34 FROGGS hmmm, no debugging symbols :/
08:34 abraxxa how can I build with them?
08:36 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 FROGGS I dunno where your MoarVM directory is though
08:37 abraxxa me neither
08:37 FROGGS is there a /home/ahartmai/.rakudobrew/moar-nom/MoarVM ?
08:37 abraxxa as I installed with rakudobrew
08:37 FROGGS ahh, /home/ahartmai/.rakudobrew/moar-nom/nqp/MoarVM
08:37 abraxxa src/vm/moar/?
08:37 FROGGS no
08:37 FROGGS what I pasted
08:37 abraxxa ok
08:38 FROGGS after you reinstalled moar (the command above), just rerun gdb
08:39 moritz FROGGS: you should really write a gdbify script for perl6-m
08:39 moritz FROGGS: which spits out a perl6-m-gdb or so
08:39 abraxxa FROGGS: http://paste.scsys.co.uk/471281
08:39 FROGGS perl6-gdb-m would be my choice, and yes, that might make sense
08:40 FROGGS it could also propose the reconfigure options for moarvm and a description what is going on
08:40 FROGGS abraxxa: still no debugging symbols :/
08:40 FROGGS abraxxa: can you check the timestamp of /home/ahartmai/.rakudobrew/moar-nom/install/bin/moar ?
08:41 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?
08:41 abraxxa the output is much longer now
08:41 tadzik abraxxa: can you open a ticket?
08:41 FROGGS abraxxa: ahh, you pasted both
08:41 abraxxa tadzik: as nwc10 proposed a param would be the best option
08:41 tadzik sounds good
08:42 FROGGS abraxxa: please type this into your gdb prompt: p i
08:42 FROGGS abraxxa: then: p (MVMint64)*(DCshort *)free_rws[i]
08:43 abraxxa tadzik: https://github.com/tadzik/panda/issues/146
08:43 abraxxa FROGGS: $1 = 8
08:44 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 ;)
08:44 tadzik it feels like a common problem we have in multiple projects
08:44 tadzik :D
08:44 abraxxa tadzik: damn, did I get the wrong github repo
08:44 abraxxa toomanythingsinparallel
08:45 abraxxa tadzik: sorry, https://github.com/tadzik/rakudobrew/issues/36
08:46 abraxxa FROGGS: the second command prints: value has been optimized out
08:46 FROGGS hmpf
08:46 DarthGandalf joined #perl6
08:46 tadzik abraxxa: thank you
08:47 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 nwc10 1) generate more than 2**31 different forms
08:48 nwc10 2) generate fewer than 2**31, but use a lot of RAM doing it
08:48 nwc10 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)
08:49 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␤␤»
08:49 RabidGravy boo!
08:49 nwc10 but I suspect that it is possible to "GC" an NFG table, at the (relatively massive) cost of walking all strings
08:49 RabidGravy but, my question was that returns True
08:50 dalek nqp: f3def3c | jnthn++ | src/vm/ (2 files):
08:50 dalek nqp: Also need the option not to normalize.
08:50 dalek nqp: review: https://github.com/perl6/nqp/commit/f3def3cab3
08:50 dalek nqp: f0255fb | jnthn++ | docs/ops.markdown:
08:50 dalek nqp: Specify/document new normalization related ops.
08:50 dalek nqp: review: https://github.com/perl6/nqp/commit/f0255fb21b
08:50 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")
08:50 jnthn That'd be an option to make it cheaper, yes
08:51 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"
08:53 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
08:54 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.
08:54 FROGGS abraxxa: so it is not about OCIBindByName_Str
08:54 jnthn Yes, I'd figured that a "slow burn" attack is more the issue here.
08:55 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:56 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
08:56 FROGGS abraxxa: I know
08:57 FROGGS 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
08:57 abraxxa FROGGS: of course! it's just that the first test uses Str
08:58 nwc10 (because the attack would be to create transient strings which generate persistent NFG entries)
08:58 FROGGS abraxxa: exactly
08:58 nwc10 (the non-attack being to cr eate non-transient strings, because of couse they exhaust RAM without needing NFG)
08:58 abraxxa FROGGS: and as I had 'is rw' for all the attrs defined before it was supported it only now has an impact
08:58 FROGGS abraxxa: can you please run 'make test' in /home/ahartmai/.rakudobrew/moar-nom ?
08:59 abraxxa FROGGS: pass
09:00 FROGGS ohh
09:00 FROGGS wait
09:00 FROGGS that's the problem: https://github.com/abraxxa/DBIish/blob/master/lib/DBDish/Oracle.pm6#L424
09:00 espadrine_ joined #perl6
09:01 FROGGS or probably not...
09:01 jnthn nwc10: Yes; a web server would be a good example.
09:01 jnthn nwc10: Processes many requests over time.
09:01 FROGGS the question is: will $indp get changed? to NULL perhaps?
09:01 rindolf joined #perl6
09:02 abraxxa FROGGS: as it's an indicator for NULL/NOT NULL value only I don't think so
09:03 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 nwc10 (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 #perl6
09:07 jnthn nwc10: Possibly...
09:07 FROGGS abraxxa: please do: cd /home/ahartmai/.rakudobrew/moar-nom/nqp/MoarVM && git pull && make install
09:08 FROGGS abraxxa: and then retest with gdb
09:09 abraxxa FROGGS: are you sure that git pull is enough?
09:09 FROGGS abraxxa: depends...
09:10 FROGGS abraxxa: abraxxa better might be: git checkout master && git pull
09:10 abraxxa my git PS1 prompt still shows 97c5ddf
09:10 abraxxa yes, that did pull it in
09:11 abraxxa still
09:11 FROGGS damn
09:11 abraxxa want another stacktrace?
09:12 dalek nqp: 2438810 | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
09:12 dalek nqp: Map new codepoint/normalization ops for MoarVM.
09:12 dalek nqp: review: https://github.com/perl6/nqp/commit/2438810a3a
09:13 FROGGS abraxxa: I found the issue!
09:14 abraxxa FROGGS: great! what was it?
09:15 travis-ci joined #perl6
09:15 travis-ci NQP build failed. Jonathan Worthington 'Map new codepoint/normalization ops for MoarVM.'
09:15 travis-ci http://travis-ci.org/perl6/nqp/builds/57453975 https://github.com/perl6/nqp/compare/f0255fb21b5b...2438810a3aba
09:15 travis-ci left #perl6
09:18 darutoko joined #perl6
09:20 dalek nqp: 83ac21c | jnthn++ | tools/build/MOAR_REVISION:
09:20 dalek nqp: Bump MOAR_REVISION for new ops.
09:20 dalek nqp: review: https://github.com/perl6/nqp/commit/83ac21c300
09:24 FROGGS abraxxa: please pull again
09:24 travis-ci joined #perl6
09:24 travis-ci NQP build passed. Jonathan Worthington 'Bump MOAR_REVISION for new ops.'
09:24 travis-ci http://travis-ci.org/perl6/nqp/builds/57454833 https://github.com/perl6/nqp/compare/2438810a3aba...83ac21c300ac
09:24 travis-ci left #perl6
09:24 FROGGS in moar
09:27 abraxxa FROGGS: Unhandled exception: Unimplemented spesh ops hit
09:27 abraxxa FROGGS: http://paste.scsys.co.uk/471284
09:32 smls joined #perl6
09:32 smls m: say PromiseStatus ~~ Int
09:32 camelia rakudo-moar b3b241: OUTPUT«True␤»
09:32 smls ^^ is this really a good use of inheritance?
09:33 smls "a promise status is a special kind of integer" does not ring true
09:33 moritz smls: not inheritance; it's how our enums are constructed
09:34 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
09:34 jnthn m: enum Foo < Bar Baz >; say Baz.^mro
09:34 camelia rakudo-moar b3b241: OUTPUT«(Foo) (Int) (Cool) (Any) (Mu)␤»
09:36 smls moritz: Well, couldn't a routine that wants such flexibility expect an Int() instead of Int ?
09:36 dalek perl6-examples: 08f13d1 | paultcochrane++ | / (2 files):
09:36 dalek perl6-examples: Remove examples-metadata from Website class
09:36 dalek perl6-examples:
09:36 dalek perl6-examples: This is because the examples are now part of individual Category objects.
09:36 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/08f13d1c82
09:36 dalek perl6-examples: 30ab0f4 | paultcochrane++ | doc/example-template.pl:
09:36 dalek perl6-examples: Rewrite template to conform to current example form
09:36 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/30ab0f4e12
09:36 dalek perl6-examples: 479b71b | paultcochrane++ | categories/other/ (2 files):
09:36 dalek perl6-examples: Document the "other" category examples
09:36 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/479b71b1d7
09:36 dalek perl6-examples: 8b1be14 | paultcochrane++ | categories/best-of-rosettacode/ (8 files):
09:36 dalek perl6-examples: Add author information to Rosettacode examples
09:36 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/8b1be140c6
09:37 smls Personally I wouldn't mind if types were coercive by default
09:37 jnthn smls: Tough.
09:37 jnthn They're not.
09:38 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.
09:38 jnthn They're not always Int, you can pick the base type as anything you like, really.
09:38 jnthn Int is just the default, an a fairly sensible one.
09:38 jnthn *and
09:39 moritz m: enum A (b => 'some string'); say A.^mro
09:39 camelia rakudo-moar b3b241: OUTPUT«(A) (Str) (Cool) (Any) (Mu)␤»
09:40 jnthn An enum is "an enumeration of values".
09:41 jnthn The enum values are still basically values.
09:43 masak good almost-noon, #perl6
09:43 chenryn joined #perl6
09:44 smls jnthn: Right, but in a case like PromiseStatus you don't really care about what the values are
09:45 jnthn smls: And what, exactly, is making you care?
09:45 smls looking at they type graph http://doc.perl6.org/images/type-graph-Int.png ;)
09:46 jnthn Hmm :)
09:46 smls moritz: Maybe we can get enum types rendered differently from classes in those graphs?
09:46 jnthn If that's confusing, excluding enum subtypes could help.
09:46 smls right, or exclude them
09:46 moritz smls: sure, if you patch the type graph generation...
09:47 moritz (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
09:47 * smls will open a ticket
09:50 abraxxa FROGGS: any other ideas?
09:52 abraxxa jnthn: or you? @last paste
09:53 jnthn abraxxa: That tends to be version skew between Moar and NQP/Rakudo.
09:54 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. :)
09:54 jnthn And I think you probably ended up with one of those.
09:54 abraxxa jnthn: rebuilding nom then
09:55 pecastro joined #perl6
09:55 abraxxa can the C code be build with multiple cpus in parallel too?
09:56 brrt make -j4 :-) abraxxa
09:56 brrt if the Makefile supports it
09:56 FROGGS yes, it does
09:57 abraxxa does rakudobrew pass it on?
09:57 abraxxa brrt: i wish my notebook had so much cores ;)
09:57 brrt well you have to compensate for IO too :-)
09:58 abraxxa SSD
09:58 brrt also, you can use MAKEFLAGS="-j4"
09:58 brrt as an env var
09:58 abraxxa segfault
09:58 brrt what
10:00 abraxxa FROGGS: http://paste.scsys.co.uk/471285
10:00 dalek nqp: bbb164e | FROGGS++ | tools/build/MOAR_REVISION:
10:00 dalek nqp: bump moar revision for nativecall fix
10:00 dalek nqp: review: https://github.com/perl6/nqp/commit/bbb164ea4e
10:00 dalek rakudo/nom: b0bff33 | FROGGS++ | tools/build/NQP_REVISION:
10:00 dalek rakudo/nom: bump nqp/moar revision for nativecall fix
10:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b0bff33e27
10:01 masak smls: agree that having PromiseStatus in the type graph is confusing.
10:02 masak smls: thanks for being persistent enough to bring that up :)
10:02 masak I'm not sure I feel Signal should be in that graph either
10:02 jnthn Signal is also an enum, iirc
10:02 masak m: say Signal.HOW
10:02 camelia rakudo-moar b3b241: OUTPUT«Perl6::Metamodel::EnumHOW.new␤»
10:02 masak yep, seemingly
10:03 masak 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 masak (and that, frankly, makes me suspicious about the enum inheritance itself, though not enough to suggest anything else)
10:04 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
10:04 masak jnthn: oh, for sure.
10:04 masak jnthn: do note that I stopped short of suggesting that ;)
10:04 abraxxa FROGGS: i thought that after I saw the other two commits and are already rebuilding moar
10:05 abraxxa FROGGS: segfault is gone, test fails now, I'm checking why
10:06 FROGGS you can also upgrade all the things now using the rakudobrew functionality
10:07 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
10:07 abraxxa switching back to CArray[OCIBind]     $bindpp, gives me an Oracle error message
10:07 masak which makes sense, if we never inherit from anything non-Int
10:09 abraxxa i think https://rt.perl.org/Public/Bug/Display.html?id=123015 can be already closed with the mention of the .bytes method
10:11 masak seems typegraph.txt is kept up-to-date manually?
10:11 masak then the fix is simple.
10:11 masak ...ish.
10:12 masak 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
10:13 dalek doc: 728cb1b | (Carl Masak)++ | type-graph.txt:
10:13 dalek doc: avoid typing enums as 'is Int'
10:13 dalek doc:
10:13 dalek doc: This was perceived to be confusing, even if it's true.
10:13 dalek doc: review: https://github.com/perl6/doc/commit/728cb1bb4e
10:13 masak smls: that should do it.
10:14 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:15 FROGGS no idea offhand
10:16 FROGGS abraxxa: and btw, OpaquePointer is rw does nothing sensible atm
10:17 moritz masak: that's the wrong fix
10:17 masak ok
10:17 FROGGS so you still need CArray[...] ther
10:17 abraxxa when i remove the 'is rw' from $indp, $alenp, $rcodep and $corelep it works again
10:17 abraxxa FROGGS: ok
10:17 moritz masak: we want to be able to still show a type graph for the enum itself, including Int and its parent classes
10:18 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 http://paste.scsys.co.uk/471287
10:18 masak moritz: you're saying the fix should go in the renderer.
10:18 FROGGS abraxxa: then you did not pass a native int
10:19 moritz masak: correct
10:19 abraxxa FROGGS: i didn't, but do .Num and pass the output
10:19 ecocode joined #perl6
10:19 dalek doc: fe45e27 | (Carl Masak)++ | type-graph.txt:
10:19 dalek doc: Revert "avoid typing enums as 'is Int'"
10:19 dalek doc:
10:19 dalek doc: This reverts commit 728cb1bb4ee7fd57389e0ebf0b9831ec0cefa17b.
10:19 dalek doc: review: https://github.com/perl6/doc/commit/fe45e271b2
10:19 dalek doc: 9e4edad | (Carl Masak)++ | type-graph.txt:
10:19 dalek doc: fix comments, whitespace, enum/class
10:19 dalek doc: review: https://github.com/perl6/doc/commit/9e4edad988
10:19 abraxxa FROGGS: shouldn't NativeCall care about the conversion?
10:19 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 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
10:20 abraxxa or at least it didn't complain
10:22 abraxxa how do I convert something that ~~ Int to long?
10:34 cdc_ joined #perl6
10:36 grondilu joined #perl6
10:36 grondilu m: my enum Square <a1 b2>; say b2
10:37 camelia rakudo-moar b0bff3: OUTPUT«b2␤»
10:37 grondilu m: my enum Square ("a".."h" X~ 1 .. 8); say b2
10:37 camelia rakudo-moar b0bff3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1F2clCKkPm␤Undeclared routine:␤    b2 used at line 1␤␤»
10:37 grondilu m: say "a".."h" X~ 1..8
10:37 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␤»
10:40 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␤»
10:40 masak m: my enum Square ("a".."h" X~ 1 .. 8); BEGIN 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␤»
10:41 masak grondilu: I'd say it's a bug that 'b2' is not defined.
10:41 grondilu ok, noted
10:42 grondilu should I report it?
10:42 masak please do.
10:42 jnthn I think we have similar tickets about enum declarators.
10:42 jnthn But can always merge them, and it's good to collect test cases.
10:42 grondilu ok, reporting
10:43 DrForr Reminds me, I have to add an enum type to my Readline binding.
10:43 Ven joined #perl6
10:44 dalek roast: 9b7c90f | lizmat++ | integration/weird-errors.t:
10:44 dalek roast: Unfudge passing test on jvm backend
10:44 dalek roast: review: https://github.com/perl6/roast/commit/9b7c90fa01
10:44 DrForr And put it on github once it does more than echo its history and goes 'beep'.
10:44 psch \o
10:45 psch DrForr: that's about how far my readline-gnu binding went as well!
10:46 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
10:46 psch or rl_bind_key, as the lib itself calls it
10:47 psch 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.
10:49 * grondilu reported and got assigned ticket n°124251
10:50 DrForr I'll throw it on github tonight, though I've got to document it better.
10:51 DrForr I want badly to be able to have a CLI debugger for grammars.
10:51 lizmat grondilu: you mean #124251 ?
10:52 lizmat :-(   no bot??
10:52 masak seems not.
10:52 masak lizmat: nice to see you back on the channel. you were missed.
10:52 lizmat thank you for your kind words
10:54 chenryn joined #perl6
10:57 rivarun joined #perl6
10:58 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.
11:01 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:02 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.
11:02 masak mostly curious about the reversal here.
11:02 dalek rakudo/uni: 81063c0 | jnthn++ | / (2 files):
11:02 dalek rakudo/uni: Start implementing Uni type and its subclasses.
11:02 dalek rakudo/uni: review: https://github.com/rakudo/rakudo/commit/81063c03e6
11:02 abraxxa FROGGS: ^^
11:03 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)?
11:03 lizmat on top of that, many people are more used to say "open $file" than "$file.IO.open"
11:04 DrForr Did I mention I hadn't actually researched? :)
11:04 DrForr Thanks for the pointers.
11:04 jnthn ;)
11:05 dalek roast: d4d137e | jnthn++ | S15-normalization/test-gen.p6:
11:05 dalek roast: A script to generate normalization tests.
11:05 dalek roast:
11:05 dalek roast: It uses the Unicode database's NormalizationTests.txt as input, and
11:05 dalek roast: produces a bunch of .t files from it. I'll add those at some point,
11:05 dalek roast: as they only need generating once per Unicode version bump, but also
11:05 dalek roast: they may yet chnage while Uni is implemented.
11:05 dalek roast: review: https://github.com/perl6/roast/commit/d4d137e80f
11:07 masak IOU           # not recognized as something that exists
11:07 lizmat masak: so, make the shortest / most often used variant the fastest
11:07 DrForr The ecosystem is small enough that I questioned whether that had been done yet :)
11:07 masak unless I'm missing something "IOU" is a not-very-clear name that mainly appears to want to make a clever pun
11:07 lizmat masak: IOU was renamed to IO::Huh, thanks tou the cheery input of several folks on #perl6
11:07 masak ok, I dislike Huh less.
11:08 * psch remembers lizmat++ picking that to stop the bikeshedding
11:08 psch and maybe the puns too
11:08 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...
11:08 masak lizmat: ...but I'm going to let it rest, because I don't see a big reward in winning that debate. :)
11:09 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.
11:09 lizmat well, look at what happens now if you do $file.IO.open
11:10 lizmat .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.
11:10 masak seems s/IOU/IO::Huh/ hasn't happened yet in S16 on the newio branch, by the way.
11:11 lizmat well, I kinda get fed up at that point
11:11 lizmat *got
11:11 masak :(
11:11 lizmat .IO currently saves $*SPEC and $*CWD
11:12 lizmat then .open creates a new IO::Handle object
11:12 lizmat and then calls .open on that
11:13 dalek specs/newio: dc98fad | (Carl Masak)++ | S16-io.pod:
11:13 dalek specs/newio: s:g/IOU/IO::Huh/
11:13 dalek specs/newio: review: https://github.com/perl6/specs/commit/dc98fad3ff
11:13 masak (hope that was ok)
11:13 lizmat sure
11:14 masak lizmat: ok, so you're saying there's irreducible overhead in the method form? I can buy that.
11:14 masak and jnthn made some point about races too.
11:14 lizmat the current sub open does that in an even more convoluted way
11:14 masak o.O
11:15 masak ok, not where I expected this to go...
11:15 lizmat the new sub open basually creates an
11:16 lizmat 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
11:17 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 #perl6
11:21 masak next point: =head2 Functions makes it look like the only difference between `print` and `say` is a newline.
11:21 masak that's sadly not true.
11:22 masak 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␤»
11:22 masak I don't even know which one `note` uses, .Str or .gist
11:22 masak m: class C { method Str { "OH " }; method gist { "HAI" } }; given C.new -> $c { note $c }
11:22 camelia rakudo-moar b0bff3: OUTPUT«HAI␤»
11:23 masak apparently, .gist -- which is the slightly more consistent alternative.
11:23 nine_ So say's output is really intended for human consumptuion?
11:23 moritz yes
11:23 lizmat note is the same as say, except on $*ERR
11:23 lizmat with one exception:
11:23 masak yeah, and if you just want .Str but a newline, you're supposed to know to `print "$stuff\n"`
11:23 lizmat m: note
11:23 camelia rakudo-moar b0bff3: OUTPUT«Noted␤»
11:24 lizmat m: say
11:24 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 masak right.
11:24 JimmyZ m: die
11:24 camelia rakudo-moar b0bff3: OUTPUT«Died␤  in block <unit> at /tmp/cZJEQm0mL7:1␤␤»
11:24 lizmat m: say 42.Str
11:24 camelia rakudo-moar b0bff3: OUTPUT«42␤»
11:24 masak there still isn't a pragma to turn off the "beginner-friendly" corner case to `say`
11:25 * lizmat is glad with the extra set of eyes
11:26 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
11:27 masak lizmat: getting people to look at stuff for review is a Hard Problem in computing, up there with naming and cache invalidation... :)
11:28 masak many organizations have structures in place to force people to look at each other's stuff
11:30 espadrine_ joined #perl6
11:30 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:31 masak I rest my case.
11:31 masak there's some truth to this: https://twitter.com/ashalynd/status/152042138111188994
11:32 Woodi joined #perl6
11:34 lizmat afk
11:35 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.
11:35 masak nine_: that's a good point.
11:36 masak 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:40 FROGGS abraxxa: my long $foo = $bar
11:45 dalek rakudo/newio: b0bff33 | FROGGS++ | tools/build/NQP_REVISION:
11:45 dalek rakudo/newio: bump nqp/moar revision for nativecall fix
11:45 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/b0bff33e27
11:45 dalek rakudo/newio: 07d1c9a | FROGGS++ | tools/build/NQP_REVISION:
11:45 dalek rakudo/newio: Merge branch 'nom' of github.com:rakudo/rakudo into newio
11:45 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/07d1c9a64a
11:47 araujo joined #perl6
11:48 Hor|zon joined #perl6
11:52 mr-fooba_ joined #perl6
11:53 jnthn lunch &
12:11 chenryn joined #perl6
12:26 chenryn_ joined #perl6
12:38 abraxxa FROGGS: thanks. As the value can have different types I'd need a way to redefine a untyped to a typed var.
12:39 moritz (my long $) = $bar
12:41 abraxxa moritz: thanks
12:41 abraxxa moritz: why the my?
12:41 lizmat m: sub a(Str $a?) { say $a.perl }; a
12:41 camelia rakudo-moar b0bff3: OUTPUT«Str␤»
12:41 lizmat m: sub a(Str() $a?) { say $a.perl }; a   # sort of expected the same
12:41 camelia rakudo-moar b0bff3: OUTPUT«use of uninitialized value of type Any in string context  in sub a at /tmp/Ul8N1yxJ0f:1␤␤""␤»
12:42 FROGGS me too
12:43 abraxxa Unhandled exception: This type cannot unbox to a native integer
12:43 abraxxa again with no pointer to my line of code
12:43 FROGGS abraxxa: what did you do?
12:43 abraxxa (long $valuebuf) = $v;
12:43 abraxxa (num64 $valuebuf) = $v.Num;
12:43 abraxxa (Str $valuebuf) = $v;
12:44 abraxxa Int, Real, Str
12:44 FROGGS (long $valuebuf) = $v; <--- that invalid....
12:44 FROGGS that's*
12:44 abraxxa what is valid?
12:45 dalek rakudo-star-daily: 5fd8f28 | coke++ | log/ (2 files):
12:45 dalek rakudo-star-daily: today (automated commit)
12:45 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/5fd8f281ac
12:45 dalek perl6-roast-data: 9626f07 | coke++ | / (9 files):
12:45 dalek perl6-roast-data: today (automated commit)
12:45 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/9626f078ca
12:45 FROGGS you cannot change the type of $value#buf
12:45 FROGGS -#
12:45 rmgk_ joined #perl6
12:46 abraxxa FROGGS: do you have a suggestion how to handle this better? https://github.com/abraxxa/DBIish/blob/master/lib/DBDish/Oracle.pm6#L401
12:47 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
12:47 FROGGS like: my long $valuep = $v.Int; OCIBindByName_Int( ... )
12:47 abraxxa what I'm not sure of: should be native sub definition use native types or Perl 6 types?
12:48 FROGGS a sub where you apply 'is native' on should have natively typed params
12:48 FROGGS if that was the question
12:50 abraxxa exactly, thanks
12:50 abraxxa and the type conversion has to be done by the calling code
12:51 abraxxa initially I had the understanding that NativeCall handles that transparently
12:52 FROGGS the conversion has to happen before/when making the call, yes
12:52 FROGGS abraxxa: is rw is exceptional here I think
12:53 FROGGS 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:55 Hor|zon joined #perl6
12:59 abraxxa FROGGS: i still get the same error
12:59 abraxxa my long $valuebuf = $v.Int;
12:59 FROGGS have you pushed your changes?
12:59 smls m: say :16<DE AD BE EF>
12:59 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␤»
12:59 abraxxa my num64 $valuebuf = $v.Num;
12:59 abraxxa FROGGS: not so far
12:59 abraxxa my Str $valuebuf = $v;
12:59 smls (from http://doc.perl6.org/language/syntax)
12:59 smls NYI?
12:59 FROGGS smls: seems so
13:00 FROGGS 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␤»
13:00 FROGGS ohh
13:00 masak what should that mean_
13:00 masak ?
13:00 smls FROGGS: Should it be in p6doc then?
13:00 Ven joined #perl6
13:00 smls masak: That doc page claims it's a Blob literal
13:01 FROGGS masak: it is called "Blob literal"
13:01 FROGGS ahh, me is slooow
13:01 masak ah.
13:01 masak rings a bell, yes.
13:01 masak lizmat: can you combine things like :r and :W ?
13:03 lizmat :W  or :w ?
13:03 masak I meant one from each category.
13:03 * lizmat is not sure what :W is ?
13:03 masak "real uid/gid", according to newio/S16
13:03 masak oh!
13:04 zacts joined #perl6
13:04 masak but they're file test methods
13:04 masak not &open flags
13:04 masak sorry; nothing to see here -- move along
13:04 lizmat ok  :-)
13:04 * lizmat moves along to Amsterdam
13:05 masak std: given 1 { when :f :rwx {} }
13:05 camelia std 28329a7: OUTPUT«ok 00:00 136m␤»
13:06 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:07 brrt joined #perl6
13:07 diana_olhovik joined #perl6
13:07 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:08 masak in my own code, I'll probably put in the `&` for clarity.
13:08 moritz I think :f :rwx is short for :f, :rwx
13:08 moritz which would make 'when :f :rwx' smart-match against a list
13:08 moritz which is *totally* not what the one who wrote that probably intended
13:09 masak then that example DTWT.
13:09 masak (argh lag)
13:09 skids joined #perl6
13:09 masak ok, then that example should clearly be destroyed.
13:10 * moritz activates the IRC log blaster
13:11 dalek specs/newio: eaf8a9e | (Carl Masak)++ | S16-io.pod:
13:11 dalek specs/newio: insert a `&` for clarity
13:11 dalek specs/newio:
13:11 dalek specs/newio: And to make the example actually work.
13:11 dalek specs/newio:
13:11 moritz tadzik: any reason to keep your module "Threads" in the ecosytem? kthxbye
13:11 dalek specs/newio: See http://irclog.perlgeek.de/perl6/2015-04-07#i_10401701
13:11 dalek specs/newio: review: https://github.com/perl6/specs/commit/eaf8a9ee2a
13:12 [Coke] (sadly not true)++
13:14 zakharyas joined #perl6
13:14 [Coke] nqp-parrot still failing.
13:15 [Coke] rakudo-jvm has 61 failures.
13:15 [Coke] (and some passing todos)
13:15 nwc10 should we TODO the relevant nqp tests for parrot that fail? It would make it clearer whether new things started failing
13:15 [Coke] rakudo-moar still doesn't have stable S17 tests.
13:16 nwc10 S17 is the concurrency stuff?
13:16 moritz yes
13:17 [Coke] fixing is best, fudging is ok.
13:17 diana_olhovik_ joined #perl6
13:19 masak the only fudging I think is dangerous is marking as "TODO" things that used to work.
13:19 masak that's the thing that burns downstream consumers (some of them darkpan-ish) at some distant point in the future.
13:20 moritz also: marking flappers as TODO
13:20 masak flappers should be quarantined.
13:20 moritz either people see "ooh, a passing test", and un-TODO them
13:20 moritz or they became frightened of removing TODO markers when tests actually pass for good
13:22 huf joined #perl6
13:23 dalek rakudo/newio: 136abbe | FROGGS++ | src/core/IO.pm:
13:23 dalek rakudo/newio: fix MAKE-ABSOLUTE-PATH for being called with an empty Str as $path
13:23 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/136abbe5f5
13:23 lucasb joined #perl6
13:23 [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.
13:23 FROGGS hi lucasb
13:24 lucasb m: say :16<DE_AD_BE_EF>
13:24 camelia rakudo-moar b0bff3: OUTPUT«3735928559␤»
13:24 [Coke] moritz: the problem with skipping flappers, of course, is that then they never get fixed. You can't win.
13:24 lucasb ^^ It works if underscores instead of spaces O.o
13:24 lucasb *with
13:24 FROGGS m: say :16<DEADBEEF>
13:24 camelia rakudo-moar b0bff3: OUTPUT«3735928559␤»
13:25 FROGGS lucasb: because you can put in underscores in any number
13:25 FROGGS m: say :16<DEADBEEF>.WHAT
13:25 camelia rakudo-moar b0bff3: OUTPUT«(Int)␤»
13:25 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.
13:25 FROGGS though, if it was a blob literal it probably should create a blob
13:26 FROGGS masak: and what if you stop supporting a backend?
13:26 FROGGS or platform or whatever
13:26 masak then why worry that tests are failing?
13:26 FROGGS *nod*
13:27 [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.
13:28 jnthn It'd be worth seeing if we might fix them by "fixing" Parrot's nqp::index behavior to match.
13:29 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:30 rmgk joined #perl6
13:31 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
13:31 * jnthn didn't actually work on it and was a bit tied up at the time it happened :)
13:31 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
13:33 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.
13:34 FROGGS lucasb: yes, and it shall create a Blob, not an Int
13:34 tadzik moritz: not really
13:34 lucasb m: say :16{DE_AD_BE_EF}.WHAT
13:34 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␤»
13:35 FROGGS m: say :16<DE_AD_BE_EF>.WHAT
13:35 camelia rakudo-moar b0bff3: OUTPUT«(Int)␤»
13:35 lucasb IIUC, S02 says blob is :16{...}, :16<...> is just a number
13:36 FROGGS ahh
13:36 FROGGS interesting
13:36 lucasb but maybe blob is NYI, I don't know :)
13:36 lucasb *blob format, I mean
13:36 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)
13:37 FROGGS lucasb: yes, this blob syntax is NYI
13:37 smls is it "official" though?
13:38 FROGGS bartolin_: that feels correct
13:38 dalek rakudo/nom: c9b3ea1 | usev6++ | src/core/LoL.pm:
13:38 dalek rakudo/nom: Fix NullPointerException on JVM in find-reducer-for-op
13:38 dalek rakudo/nom:
13:38 dalek rakudo/nom: ... fixes spectest breakage on JVM
13:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c9b3ea1c1f
13:38 dalek rakudo/nom: d1ac6dd | FROGGS++ | src/core/LoL.pm:
13:38 dalek rakudo/nom: Merge pull request #402 from usev6/fix_reduce_jvm
13:38 dalek rakudo/nom:
13:38 dalek rakudo/nom: Fix NullPointerException on JVM in find-reducer-for-op
13:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d1ac6ddcb4
13:38 bartolin_ thanks for merging :-)
13:39 FROGGS bartolin_: thanks for patching :o)
13:40 FROGGS ohh, bartolin_ do we meet next Wednesday?
13:40 bartolin_ FROGGS: yes, I hope so! \o/
13:40 FROGGS \o/
13:40 FROGGS I'm looking forward to it :o)
13:42 nwc10 I have to say that "" being "not found" feels like a wrong special case
13:42 nwc10 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?
13:42 * bartolin_ too! (also happy to meet lizmat++, nine++, tadzik++ and others)
13:44 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:54 telex joined #perl6
14:01 Ven http://stevelosh.com/blog/2013/04/git-koans/
14:01 Ven I love git, but it's true some "ways" are a bit hard to understand :)
14:02 masak Git exemplifies how you can get the core data structures very very right and still have an API with undeniable flaws.
14:03 moritz well, git's UI should have been the one to throw away
14:03 moritz in the "plan to throw one away; you will anyway"
14:07 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 #perl6
14:09 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
14:10 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
14:12 abraxxa FROGGS: should that work? my num64 $valuebuf = $v.Num;
14:12 abraxxa or my long $valuebuf = $v;
14:13 moritz abraxxa: you can always try $!.backtrace.full or --ll-exception
14:14 abraxxa moritz: epic! --ll-exception changes the error to Variable '$errcode' is not declared
14:14 FROGGS O.o
14:15 FROGGS ahh
14:15 FROGGS that means we are failing to generate the high level error message
14:15 abraxxa back to ORA-01485: compile bind length different from execute bind length
14:16 FROGGS and "This type cannot unbox to a native integer" might be about the line number where the excetption was thrown
14:16 sirdancealot joined #perl6
14:16 moritz the string 'errcode' appears in none(rakudo, nqp, moar)
14:16 FROGGS abraxxa: I have no idea what that means :/
14:16 abraxxa moritz: that's one of my vars which is defined in the if's now
14:16 moritz abraxxa: have you googled that ORA error?
14:17 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:18 FROGGS abraxxa: does that mean it called OCIBindByName correctly and failed to when calling OCIStmtExecute?
14:18 FROGGS err
14:18 FROGGS s/to//
14:19 abraxxa it least the bind calls succeed
14:20 raiph joined #perl6
14:24 lucasb m: say now
14:24 camelia rakudo-moar d1ac6d: OUTPUT«Instant:1428416717.066069␤»
14:24 lucasb m: say DateTime.new(now)
14:24 camelia rakudo-moar d1ac6d: OUTPUT«2015-04-07T14:24:49Z␤»
14:24 lucasb Any reason for not having a method in Instant class that converts to DateTime (like now.DateTime)?
14:26 PerlJam m: DateTime.now.say
14:26 camelia rakudo-moar d1ac6d: OUTPUT«2015-04-07T16:26:49+0200␤»
14:27 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
14:30 FROGGS abraxxa: did you try to set maxarr_len to 1 ?
14:30 abraxxa FROGGS: no, 0
14:31 gcole joined #perl6
14:31 FROGGS abraxxa: can you try setting it to 1?
14:31 abraxxa FROGGS: same Oracle error
14:31 mr-foobar joined #perl6
14:32 abraxxa FROGGS: http://ora-01485.ora-code.com/
14:32 abraxxa that makes no sense to me as I don't use that type
14:33 abraxxa the Oracle cdemo81.c also uses 0 for all binds
14:39 FROGGS hmmm, in that example the placeholder is just ":FOO", in your code it would be ":pFOO"
14:42 Perl6_newbee joined #perl6
14:42 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:43 FROGGS and you pass SQLT_CHR for string where the example passes SQLT_STR
14:44 FROGGS abraxxa: that's all I can see... note, I still see 9 days old code in your repo
14:45 abraxxa FROGGS: yeah, just rebased my code here on the one in the repo which I did at home
14:45 tinyblak joined #perl6
14:48 6A4AB3HDY joined #perl6
14:49 abraxxa FROGGS: when I use SQLT_STR I get ORA-01480: trailing null missing from STR bind value
14:50 abraxxa 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
14:50 FROGGS yeah
14:51 molaf__ joined #perl6
14:52 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
14:52 FROGGS why are you hiding these highly interesting facts?
14:52 abraxxa just wrote the test
14:54 larion joined #perl6
14:54 abraxxa same for float
15:00 skids joined #perl6
15:02 abraxxa and I just found out why
15:03 abraxxa when i remove the 'is rw' from $indp, $alenp, $rcodep and $curelep it works
15:03 abraxxa i did that before but just for the _Str sub
15:04 FROGGS that means that you are supposed to pass a NULL pointer
15:04 FROGGS which is what happens now (in an incorrect way)
15:04 FROGGS and the 'is rw' gave you an allocated pointer that pointed to a value of zero, which is a difference
15:05 abraxxa which of the four params?
15:05 FROGGS for all four
15:05 FROGGS I guess
15:06 abraxxa FROGGS: https://docs.oracle.com/database/121/LNOCI/oci16rel003.htm#LNOCI17140
15:06 FROGGS the cdemo81.c also passes a NULL pointer and not a pointer pointing to a value 0
15:06 dalek roast: 15e0300 | usev6++ | S05-substitution/subst.t:
15:06 dalek roast: Add test for RT #123597
15:06 dalek roast: review: https://github.com/perl6/roast/commit/15e0300059
15:07 abraxxa FROGGS: let's try it out, $indp is ok with 'is rw'
15:08 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
15:12 abraxxa FROGGS: how can i set it to null? just define the var?
15:19 FROGGS abraxxa: what do you want to set to null?
15:20 abraxxa all those that are only relevant to arrays
15:20 abraxxa indp, alenp, rcodep and curlep
15:23 abraxxa FROGGS: OCI is really weird, the bind + execute for all three types combined works, the one for float only not
15:24 Juerd joined #perl6
15:26 chenryn_ joined #perl6
15:26 coreutil joined #perl6
15:26 FROGGS abraxxa: "the bind + execute for all three types combined works" -- what all three types?
15:26 abraxxa string, integer plus float
15:27 * FROGGS looks confused
15:27 lichtkind joined #perl6
15:27 FROGGS abraxxa: so you say it works for strings, integers and floats, but not for floats?
15:30 egrep joined #perl6
15:30 hoelzro o/ #perl6
15:30 abraxxa FROGGS: yes, super-weird
15:30 abraxxa FROGGS: ah, the insert without bind for all three works
15:30 FROGGS hi hoelzro
15:31 xinming_ joined #perl6
15:31 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:33 FROGGS abraxxa: but you cannot pass NULL when the param is 'int16 is rw'
15:34 FROGGS abraxxa: you need to make the param a Pointer to be able to pass NULL
15:34 abraxxa FROGGS: ARGHHHH
15:35 gfldex joined #perl6
15:36 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:37 raiph joined #perl6
15:37 abraxxa FROGGS: why does it work when I define $alenp as ub2 and pass my ub2 $alenp = 0; to it?
15:38 FROGGS abraxxa: because that might be what OCI expects?
15:38 pullphinger joined #perl6
15:38 abraxxa god the docs are shit!
15:38 FROGGS or this argument is simply ignored
15:38 FROGGS rule number 1 when reading foreign docs: docs are shit
15:38 abraxxa FROGGS: hm...regarding null, the cdemo81.c passes 0 to all four
15:39 FROGGS abraxxa: it passes NULL
15:39 abraxxa line 236 and up not
15:39 FROGGS (ub2 *) 0 <-- that is a cast to a NULL pointer
15:39 abraxxa really?
15:40 abraxxa I know why I hate C
15:40 FROGGS yes
15:40 abraxxa and how do i pass a pointer to 0?
15:40 FROGGS in C or perl 6?
15:40 abraxxa C
15:41 FROGGS ub2 *foo = malloc(sizeof(ub2)); *foo = 0; callsomething(foo);
15:41 abraxxa goddammit
15:42 tinyblak joined #perl6
15:42 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:43 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 #perl6
15:44 abraxxa geekosaur: so whatfor types then?
15:44 PerlJam abraxxa: sounds like someone has been spoiled by more dynamic languages :)
15:44 geekosaur type checking, not passing an (int) or a (bar *) where a (foo *) is wanted
15:44 abraxxa PerlJam: C is the root cause for 90% of all security problems, PHP for the rest 9%
15:44 geekosaur (with the (void *) special case)
15:45 geekosaur (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.   :)
15:45 geekosaur common refrain elsechannel: "C code. C code run. C code crash. Crash, code, crash!"
15:46 geekosaur 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:48 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'
15:48 FROGGS abraxxa: without the 'is rw' it could be that the C side treats it as an NULL pointer
15:49 FROGGS 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:50 FROGGS so, the called OCI function just gets garbage
15:50 FROGGS but that depends on the calling convention
15:50 abraxxa so how should I define those params for now? Pointer[ub2]
15:51 FROGGS depends... what are you going to pass?
15:51 abraxxa NULL ;)
15:51 FROGGS then declare it as a Pointer
15:51 abraxxa with the future possibility to pass a pointer to a ub2
15:51 FROGGS without any 'is rw'
15:52 FROGGS yes, Pointer[ub2] is a good choice then
15:52 abraxxa should I replace all OpaquePointer with Pointer?
15:52 Ven joined #perl6
15:53 FROGGS yes
15:53 abraxxa ok
15:54 abraxxa 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
15:54 abraxxa that works again
15:54 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 #perl6
15:55 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
15:55 FROGGS but the intention was to do what you described
15:56 FROGGS unsigned long * would be Pointer[ulong]
15:56 geekosaur right
15:56 FROGGS m: use NativeCall; say Pointer[ulong].of
15:56 camelia rakudo-moar d1ac6d: OUTPUT«(ulong)␤»
15:56 moritz abraxxa: you could just pass Pointer
15:56 FROGGS m: use NativeCall; say Pointer.of
15:56 camelia rakudo-moar d1ac6d: OUTPUT«(void)␤»
15:56 geekosaur aha,
15:56 abraxxa moritz: i'll keep the names to make supporting array binds later easier
15:56 moritz m: use NativeCall; say nativecallsize(Pointer)
15:56 camelia rakudo-moar d1ac6d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mvbNnQrGu7␤Undeclared routine:␤    nativecallsize used at line 1. Did you mean 'nativecast'?␤␤»
15:56 abraxxa thanks!
15:56 geekosaur was gonna say "Pointer[void]" seemed weird on its face
15:57 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'?␤␤»
15:57 FROGGS geekosaur: but you can do that
15:57 moritz m: use NativeCall; say nativesizeof(Pointer)
15:57 camelia rakudo-moar d1ac6d: OUTPUT«8␤»
15:57 geekosaur it still looks weird
15:57 geekosaur :)
15:57 FROGGS :o)
15:59 grondilu why export it?  Why not NativeCall::sizeof?
16:00 abraxxa FROGGS: current code is on github now if you're interessted
16:01 FROGGS we decided to rename it to native-sizeof() and native-cast() fwiw
16:01 FROGGS abraxxa: nice!
16:01 FROGGS though, I need to speed up coding to or I'll be late at dinner
16:01 FROGGS s/to/here/
16:04 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
16:04 abraxxa moritz: ok
16:05 moritz (in a branch that isn't master :-)
16:05 abraxxa haha
16:05 abraxxa nom?
16:05 abraxxa :P
16:05 moritz abraxxa: I'd call it "oracle", but YYMV
16:06 dalek ecosystem: 0f9d4dd | moritz++ | META.list:
16:06 dalek ecosystem: Remove Threads from META.list
16:06 dalek ecosystem:
16:06 dalek ecosystem: it requires rakudo-parrot, which is dead; instead, we have native threads!
16:06 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/0f9d4dd23b
16:09 tadzik so, it's now rakudo-parrot being dead, not just Star being frozen? :)
16:09 geekosaur ?
16:14 [Coke] rakudo-parrot support was removed, yes.
16:14 [Coke] nqp-parrot was as high as we were keeping.
16:15 [Coke] so, not "now", but "that's the plan as I understood all along"
16:15 jnthn dinner &
16:23 moritz tadzik: 2015.02 was the last rakudo release with parrot support
16:38 yvan1 joined #perl6
16:42 raydiak good morning #perl6
16:42 TimToady \o
16:43 tinyblak joined #perl6
16:44 raydiak o/ TimToady; hope the day is treating you well so far
16:48 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 * TimToady was coming down sick last week, which probably contributed to some of his normal level of grumpiness
16:49 TimToady that didn't come out right either, ss/some of //
16:49 TimToady I shouldn't do anything today that doesn't have good tests...
16:51 raydiak hm...glad you're not gurgling at least :)  lack of air does tend to make people grumpy
16:53 bobkare joined #perl6
16:54 Ven raydiak: depends whether you consider the deads grumpy or not, I guess
16:55 RabidGravy joined #perl6
16:57 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? :)
16:58 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 http://ecosystem-api.p6c.org/projects.json?
17:00 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 raydiak bobkare: that is correct, it should be
17:01 PerlJam bobkare: What's the problem exactly?
17:02 hobbs raydiak: o/` Casper, the friendly ghost -- the friendliest ghost you know! o/`
17:03 bobkare hm, looking at http://ecosystem-api.p6c.org/update.log it says https://raw.githubusercontent.com/tadzik/perl6-Term-ANSIColor/master/META.info 404, but that link works for me now
17:05 bobkare 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
17:06 PerlJam (I just tried installing Term::ANSIColor and panda hung)
17:06 PerlJam and now it's telling me it's not in the ecosystem as well
17:07 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 #perl6
17:07 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 .'
17:08 TimToady assuming, of course, that we can then GC the string intern table...
17:08 PerlJam It's too bad we don't have a set of distributed module servers that could provide service when github has problems  ;)
17:08 raydiak hobbs: but I haven't had the pleasure of meeting him! :)
17:08 TimToady we could also know where unique strings were coming from by who interned them, and maybe clamp misbehavior
17:09 TimToady jnthn: ^^
17:11 TimToady nwc10:
17:12 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:14 chenryn_ joined #perl6
17:15 abraxxa can i pass a pointer to NativeCall and Perl 6 knows how many bytes to read from it?
17:16 masak m: $_ = 0; s{^(\d+)$} = sprintf "%3d -", $_; say $_
17:16 camelia rakudo-moar d1ac6d: OUTPUT«  0 -␤»
17:19 sirdancealot joined #perl6
17:21 raydiak bobkare: glad it worked; good luck with your grammar :)
17:22 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:23 TimToady 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
17:23 abraxxa TimToady: I was wondering what happens when the param is defined as 'is encoded('utf8') is rw
17:25 mohij joined #perl6
17:26 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 #perl6
17:30 Rounin joined #perl6
17:31 FROGGS joined #perl6
17:32 FROGGS o/
17:32 raydiak hiya FROGGS
17:36 FROGGS PerlJam: at some point I'll merge panda/CPAN and then we will have an distributed module server network :o)
17:37 masak ahoj FROGGS
17:42 gcole joined #perl6
17:42 nine_ FROGGS: what's keeping you from doing that?
17:42 PerlJam FROGGS: and can anyone else help? :)
17:43 FROGGS nine_: the dependencies I have to pull in, and the that that Compress::Zlib was not Windows friendly until recently
17:43 FROGGS and the fact*
17:44 abraxxa that doesn't seem to do what I think: if $!statementtype ~~ OCI_STMT_CREATE, OCI_STMT_DROP, OCI_STMT_ALTER;
17:44 rindolf joined #perl6
17:44 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.
17:45 PerlJam abraxxa: put some brackets around the list and see if that helps
17:46 FROGGS m: say 42 if 4 ~~ any 5, 6, 7;
17:46 camelia rakudo-moar d1ac6d: ( no output )
17:46 FROGGS m: say 42 if 4 ~~ 5, 6, 7;
17:46 camelia rakudo-moar d1ac6d: OUTPUT«42␤»
17:46 abraxxa PerlJam: that revealed another error im my code that executed fine so far, very weird
17:46 abraxxa it swallowed Cannot locate symbol 'OCIAttrGet_ub4' in native library 'libclntsh.so' before because I forgot 'is symbol'
17:48 FROGGS abraxxa: you only get that error when you actually call OCIAttrGet_ub4
17:48 FROGGS so you just did not hit that code path it seems
17:49 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
17:51 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:55 _edwin joined #perl6
17:55 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)␤»
17:55 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)
17:55 camelia rakudo-moar d1ac6d: OUTPUT«trick␤like this␤»
17:55 pippo joined #perl6
17:56 TimToady obviously we should do away with commas
17:56 masak commas are the devil's work
17:57 PerlJam If juxtaposition is good enough for haskell, it's good enough for perl
17:57 lucasb .oO( commatraps... )
17:57 TimToady well, we could actually warn on this one; a list with literals makes little sense in a boolean context
17:58 TimToady 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
17:59 masak TimToady: I was surprised by the result, but the failure mode was pretty clear to me too, after some thinking.
18:00 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
18:01 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 :/
18:02 TimToady well, that won't actually help here, since it's a precedence problem
18:02 abraxxa what exactly did the syntax I used do?
18:02 TimToady m: say [1,2,3] ~~ [*,2,*]
18:02 camelia rakudo-moar d1ac6d: OUTPUT«True␤»
18:02 TimToady m: say [1,2,3] ~~ (*,2,*)
18:02 camelia rakudo-moar d1ac6d: OUTPUT«True␤»
18:03 raiph joined #perl6
18:03 TimToady I was thinking at the time a special list matcher to enable * to do that
18:03 TimToady rather than just any list doing globby matching
18:03 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.
18:04 abraxxa nine_: WTF?!
18:04 abraxxa commas aren't or's!
18:04 TimToady nine_: no, it didn't just look at the last one, that's P5
18:04 TimToady here it looked at the .elems of 3
18:05 TimToady we could warn "This boolean will always be true."
18:05 FROGGS m: say (4 ~~ 5, 6, 7)
18:05 camelia rakudo-moar d1ac6d: OUTPUT«False 6 7␤»
18:05 FROGGS abraxxa: see?
18:05 FROGGS m: say (4 ~~ 5, 6, 7).Bool
18:05 camelia rakudo-moar d1ac6d: OUTPUT«True␤»
18:05 dsx joined #perl6
18:05 FROGGS abraxxa: a list containing (False, 6, 7) is true, because it has elements
18:06 TimToady m: say (4 ~~ 5, 6, 0).Bool
18:06 camelia rakudo-moar d1ac6d: OUTPUT«True␤»
18:06 abraxxa some type conversions shouldn't be done automatically/defined at all
18:06 TimToady note that it's true even if the last elem is false
18:06 abraxxa that's why ecmascript came up with ===
18:06 abraxxa a list/array just doesn't have a boolean value
18:06 TimToady sure it does
18:06 FROGGS abraxxa: ohh, welcome to Java
18:06 FROGGS >.<
18:07 abraxxa that's stupid as everybody will expect something different
18:07 FROGGS abraxxa: no, a list that is non-empty is trueish
18:07 abraxxa defined-ness, whatever that means for a list, length > 0 and so on
18:07 FROGGS defined means instantiated to me
18:07 TimToady that's ruby that confuses define and true
18:07 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
18:08 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?
18:08 TimToady you keep using that word
18:09 abraxxa in that case 'defined' means 'defined in the code using my'
18:09 TimToady that's declared, not defined
18:09 FROGGS abraxxa: you mean 'declared'
18:09 abraxxa that's HARD for non-native speakers!
18:09 FROGGS true
18:09 FROGGS abraxxa: I am also a non-native something
18:09 nine_ FWIW I never know which one is which either. Same for the German words (which _are_ the same)
18:10 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)
18:11 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
18:11 abraxxa my @foo = ();
18:11 abraxxa is that defined or not?
18:11 abraxxa here the understandings start to differ
18:12 TimToady @foo is always defined
18:13 _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). https://github.com/rakudo/rakudo/pull/400
18:13 yoleaux _edwin: I'll pass your message to jnthn.
18:13 dsx left #perl6
18:14 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?
18:14 lucasb Thanks TimToady++ for fixing subst-mutate yesterday
18:16 TimToady m: my @foo; say @foo.defined
18:16 camelia rakudo-moar d1ac6d: OUTPUT«True␤»
18:16 TimToady m: my @foo; say @foo.so
18:16 camelia rakudo-moar d1ac6d: OUTPUT«False␤»
18:17 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'"
18:18 TimToady 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
18:18 camelia rakudo-moar d1ac6d: OUTPUT«False␤»
18:18 abraxxa so if ( @foo ) is absolutely pointless, always
18:18 TimToady well, that's cheating
18:18 TimToady NO!
18:18 hobbs raydiak: should probably paper over that :)
18:19 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?
18:19 nine_ abraxxa: if does not ask for definedness.
18:19 TimToady this is not ruby
18:19 FROGGS abraxxa: if (@foo) usually boils down to: if (@foo.elems > 0)
18:19 rindolf joined #perl6
18:19 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
18:19 abraxxa FROGGS: exactly
18:20 abraxxa FROGGS: only that the later doesn't require guessing by almost anybody who has learn any programming language
18:20 TimToady so for @foo it's the number of elements, but for a different type, the distinguished false value is somethign else
18:20 FROGGS abraxxa: so, an empty array ha no elems so it would be False in that condition
18:20 TimToady for numbers, it's 0
18:21 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)
18:21 FROGGS abraxxa: if "abc" { ... # what should that be about?
18:21 TimToady abraxxa: KISS is one of about 60 design principles here
18:21 abraxxa FROGGS: compile time error
18:21 FROGGS abraxxa: a string is true when it has chars in it... like an array has elems
18:21 FROGGS abraxxa: why that?
18:22 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
18:22 abraxxa FROGGS: it's static and boils down to a no-op
18:22 FROGGS abraxxa: and a no-op means compile time error to you?
18:22 abraxxa FROGGS: one that makes absolutely no sense in writing, sure
18:23 FROGGS ...
18:23 FROGGS abraxxa: my $a = "foo"; if $a { ... # better?
18:23 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.
18:23 FROGGS abraxxa: this will also be a compile time error in your book btw
18:23 abraxxa FROGGS: of course, $a could at least be changed by some code somewhere
18:24 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
18:24 FROGGS abraxxa: show me a language where putting a literal into an if condition results in a compile time error
18:24 TimToady abraxxa: this aspect of Perl is not going to change
18:25 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
18:26 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.
18:26 FROGGS as nine_ said one *does* use 'if 0 {' or 'if 1 || ... {'
18:26 FROGGS nine_++
18:26 abraxxa nine_: and instead of a simple compile time error we then need code analyzers to find never run else branches...great!@
18:26 TimToady abraxxa: in case you hadn't noticed, Perl is all about context, by design
18:27 TimToady that's what makes it Perl
18:27 abraxxa sorry, I have a text editor that can comment out a block
18:27 TimToady cool, TMTOWTDI
18:28 abraxxa so what is a list in boolean context? defined-ness? number of elements > 0?
18:28 abraxxa and what is defined-ness for it?
18:28 FROGGS abraxxa: boolean context is about call .Bool on it
18:28 FROGGS and the type is responsible for implementing such a .Bool method
18:29 TimToady m: my @a = (); my @b = (); say (@a,@b).Bool
18:29 camelia rakudo-moar d1ac6d: OUTPUT«True␤»
18:29 FROGGS and the .Bool of List checks for .elems > 0
18:29 TimToady m: my @a = (); my @b = (); say (@a,@b).list.Bool
18:29 camelia rakudo-moar d1ac6d: OUTPUT«False␤»
18:29 abraxxa FROGGS: yes, and that method doesn't instead in which context it is called
18:29 FROGGS abraxxa: doesn't what?
18:29 abraxxa and i'm not meaning 'context' as in boolean context which if enforces
18:29 FROGGS abraxxa: what's context to you then?
18:29 abraxxa smartmatch
18:29 FROGGS we need to use the same words
18:30 abraxxa is that a context?
18:30 FROGGS smartmatch is an operator
18:30 TimToady well, it's really a method too
18:30 FROGGS and 'a ~~ b' results in: b.ACCEPTS(a)
18:31 FROGGS 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
18:31 TimToady so you're basically just in OO context
18:31 FROGGS like, in "foo" ~~ "bar", here you want string equality
18:31 abraxxa and is that documented?
18:31 TimToady certainly
18:31 FROGGS and in "foo" ~~ /bar/, you want to pattern match
18:32 abraxxa i'm preferring methods that are called what they do
18:32 FROGGS yes, hence the .Bool and .elems and .ACCEPTS
18:32 TimToady .oO(why do these arguments always come down to "Then write your own language!"...)
18:32 abraxxa regarding my mistake, I though I've read that braces () don't create lists
18:33 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
18:33 abraxxa or was it semicolons?
18:33 FROGGS abraxxa: braces are for grouping and the comma creates a list
18:33 TimToady abraxxa: at the moment they create Parcels, but we're going to get rid of those, probably
18:34 FROGGS m: say (42).WHAT
18:34 camelia rakudo-moar d1ac6d: OUTPUT«(Int)␤»
18:34 abraxxa if $!statementtype ~~ OCI_STMT_CREATE, OCI_STMT_DROP, OCI_STMT_ALTER
18:34 TimToady well, they create Parcels if there's a comma
18:34 FROGGS no list
18:34 abraxxa so the tree constants are a list?
18:34 FROGGS abraxxa: correct
18:34 FROGGS like in:
18:34 TimToady there are not three constants
18:34 FROGGS m: my @a = 1, 2, 3
18:34 camelia rakudo-moar d1ac6d: ( no output )
18:34 TimToady there's a ~~, and two constants
18:34 FROGGS abraxxa: the right hand side here is also a list
18:35 TimToady just as if you said 1+2, 3, 4
18:35 abraxxa so the smartmatch operator has a higher precedence than the semicolon?
18:35 FROGGS comma*
18:35 TimToady *tighter :)
18:35 abraxxa but a comma isn't an operator?!
18:35 TimToady sure it is
18:35 TimToady m: say infix:<,>(1,2,3)
18:35 camelia rakudo-moar d1ac6d: OUTPUT«123␤»
18:36 FROGGS m: say &infix:<,>
18:36 camelia rakudo-moar d1ac6d: OUTPUT«sub infix:<,> (Any |) { #`(Sub+{<anon>}+{Precedence}|57246096) ... }␤»
18:36 arnsholt joined #perl6
18:37 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)
18:37 FROGGS m: say &infix:<,>.prec
18:37 camelia rakudo-moar d1ac6d: OUTPUT«assoc => list, prec => g=␤»
18:37 * PerlJam finds abraxxa's culture shock a little weird.
18:38 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?
18:38 PerlJam abraxxa: I would have thought you were around enough to get used to Perl's particular brand of crazy :)
18:38 TimToady comma is looser than some operators, and tighter than others
18:38 abraxxa TimToady: at least it loses to smartmatch
18:38 TimToady no, it wins :)
18:39 abraxxa or is it just a matter of what comes first?
18:39 TimToady no
18:39 abraxxa then I wouldn't have needed the braces
18:39 bartolin_ abraxxa: here is a nice table: http://design.perl6.org/S03.html#Operator_precedence
18:40 [Coke] What does the A column mean there?
18:40 abraxxa bartolin_: thanks! the smartmatch operator ~~ is before the comma operator
18:40 PerlJam [Coke]: associativity
18:40 PerlJam Though, I'm not sure what an associativity of X means
18:40 abraxxa L and R is left and right, but what is the rest?
18:40 TimToady list associative or non associative as it explains there
18:41 [Coke] a legend for that would be helpful.
18:41 FROGGS abraxxa: scroll down a little
18:41 FROGGS [Coke]: there is
18:41 TimToady comma is list associative, which is why I could say infix:<,>(1,2,3)
18:41 PerlJam [Coke]: what FROGGS sais
18:41 PerlJam er, said
18:41 TimToady L and R functions are only binary
18:41 * PerlJam needed to scroll down a little too
18:41 [Coke] ... it would be nice if that chart explained what it was . :)
18:41 [Coke] thanks.
18:42 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)␤»
18:42 TimToady see the difference?
18:43 abraxxa TimToady: what is infix?
18:43 TimToady + is left associative, and doesn't allow an N-ary call
18:43 TimToady a binary operator that goes between its arguemnts
18:43 TimToady like + or ~~
18:43 masak m: say infix:<,>(1, 2, 3)
18:43 camelia rakudo-moar d1ac6d: OUTPUT«123␤»
18:43 FROGGS abraxxa: the + in 42 + 1
18:43 FROGGS m: say infix:<+>(1, 2, 3)
18:43 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)␤»
18:43 abraxxa FROGGS: isn't that called an operator normally?
18:43 FROGGS m: say infix:<+>(1, 2)
18:43 camelia rakudo-moar d1ac6d: OUTPUT«3␤»
18:43 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)␤»
18:44 FROGGS abraxxa: it is just one kind of operator
18:44 TimToady abraxxa: if you say "operator" you're being imprecise
18:44 FROGGS abraxxa: $foo++ # the ++ is a postfix operator
18:44 masak apparently chaining things also accept only two arguments.
18:44 timotimo has to
18:44 timotimo the "chaining semantics" are built "outside" of the two-argument version
18:44 * PerlJam tries to imagine a trinary chaining op
18:44 timotimo 1 <= 2 <= 3 really turns into 1 <= 2 && 2 <= 3
18:44 abraxxa so infix means between two operands?
18:45 abraxxa in from inbetween?
18:45 TimToady if we did have a variadic form of it, it would have to alternate terms with operators
18:45 FROGGS abraxxa: exactly
18:45 abraxxa ah!
18:45 bartolin_ m: say (1 ~~ 2, 3, 4).perl
18:45 camelia rakudo-moar d1ac6d: OUTPUT«(Bool::False, 3, 4)␤»
18:45 bartolin_ abraxxa: the Bool::False is there because ~~ has a tighter precedence than the comma
18:45 FROGGS abraxxa: and then you know why prefix and postfix and circumfix is called that way :o)
18:45 FROGGS or even postcircumfix
18:45 tinyblak joined #perl6
18:46 abraxxa are () braces a circumfix operator?
18:46 TimToady we usually call {} braces here
18:46 TimToady () are parens
18:46 FROGGS abraxxa: if they just surround something, yes
18:46 abraxxa ah, ok
18:47 TimToady they're all generically "brackets" though
18:47 FROGGS in foo(42), they are a postcircumfix, because they also follow something
18:47 TimToady some cultures call () "round brackets"
18:47 lucasb m: use Test; my $_ = 42; is($_, 42, 'looks good'); done
18:47 abraxxa I always thought of operators as characters that are used for math, not to give the code structure or precedence
18:47 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␤»
18:47 TimToady sometimes we call [] "brackets", but use "square brackets" if we wish to be clearer
18:47 lucasb ^^ Test passes. Is that ok?
18:48 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
18:48 abraxxa FROGGS: is that just in Perl 6 so or do other languages call the characters for subroutine calls also operators?
18:49 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
18:49 PerlJam abraxxa: other languages may make such things a special syntax rather than a general operator
18:49 TimToady they all call them "operators", but not all languages give you access to the underlying functions
18:49 FROGGS abraxxa: but the most languages dont do it that way
18:50 abraxxa FROGGS: but you said that in the subrouting call foo(42) the brackets are postcircumfix operators?
18:50 FROGGS abraxxa: yes
18:50 FROGGS the parens are operators, not the function call...
18:50 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?
18:50 abraxxa with 'characters for subrouting calls' i meant the brackets, not the foo
18:51 FROGGS abraxxa: like and addition operation is not an operator, the + infix is
18:51 FROGGS ahh, ye
18:51 FROGGS yes
18:51 TimToady lucasb: it's not really a syntax error, but a semantic warning
18:51 FROGGS lucasb: "Potential difficulties" is a warning
18:51 abraxxa i always thought of all kind of brackets and command termination characters as line noise required by the parser
18:51 TimToady it's saying that you already had a $_ declared at this lexical level
18:51 lucasb Oh, now I see, just a warning... sorry
18:52 FROGGS lucasb: np
18:52 TimToady if you put that code inside a {} then it will not warn
18:52 TimToady because inside a block doesn't automatically have its own $_
18:52 abraxxa that's why I liked Python very much at first but also saw the drawbacks of indention instead of brackets later
18:52 FROGGS abraxxa: but programming is about all that... it is *your* way of telling the compiler what to do
18:52 lucasb m: { my $_ = 42; }
18:52 camelia rakudo-moar d1ac6d: OUTPUT«Potential difficulties:␤    Redeclaration of symbol $_␤    at /tmp/4hZLuERMPv:1␤    ------> 3{ my $_7⏏5 = 42; }␤»
18:52 TimToady uh
18:52 FROGGS it is callable
18:53 abraxxa FROGGS: sure, but i would have called ; an operator
18:53 TimToady that seems wrongish
18:53 FROGGS m: { my $_ = 42; }(42)
18:53 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␤␤»
18:53 abraxxa but something else I didn't know the word for
18:53 TimToady m: -> { my $_ = 42 }
18:53 camelia rakudo-moar d1ac6d: OUTPUT«===SORRY!===␤Cannot find method 'value'␤»
18:53 TimToady say wat
18:53 FROGGS abraxxa: I would not call ; an operator...
18:54 FROGGS abraxxa: like I would not call a comment or a newline an operator
18:54 FROGGS WAT
18:54 abraxxa FROGGS: don't puzzle me even more! S03 says it's a Terminator operator
18:54 FROGGS TimToady: at least that's easy to locate with --ll-exception
18:55 abraxxa FROGGS: i'd call that line noise for the programmer ;)
18:55 FROGGS :o)
18:55 abraxxa enough for today
18:55 abraxxa thanks for the insights, I hope they help me understand more of what's going on
18:55 TimToady you're welcome
18:56 abraxxa i hope there is or will be a glossary for terms like 'infix'
18:56 FROGGS there is
18:56 FROGGS S99
18:56 PerlJam abraxxa: S99
18:56 PerlJam (Is tadzik's bot not alive?)
18:56 abraxxa ah yes, that's great http://design.perl6.org/S99.html#infix
18:57 FROGGS PerlJam: it seems to rest in piece with feather :o)
19:02 abraxxa bye!
19:02 FROGGS o/
19:02 bartolin_ o/ abraxxa
19:03 chenryn_ joined #perl6
19:03 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...
19:03 PerlJam nine_: good luck!
19:03 nine_ PerlJam: thanks
19:03 FROGGS nine_: see ya!
19:04 FROGGS dang :P
19:04 dalek specs: d929944 | TimToady++ | S03-operators.pod:
19:04 dalek specs: be clearer that Terms and Terminators are not ops
19:04 dalek specs: review: https://github.com/perl6/specs/commit/d9299443dd
19:05 TimToady .oO(Isn't that a public disservice announcement?)
19:05 FROGGS hehe
19:06 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!!!
19:08 masak I heard Einstein started out by working at the Patient Office. guess he got impatient and became a physicist instead.
19:11 Vlavv_ joined #perl6
19:14 TimToady after he invented spacetime he couldn't tell whether he was impatient or immobile...
19:15 masak well, Heisenberg was uncertain on similar grounds...
19:20 muraiki unlike Heisenberg, Planck's views were pretty much constant
19:24 masak but quite small
19:25 PerlJam and short-lived
19:27 moritz and Hilbert blew up into Space before doing any great discoveries
19:28 kinslayer joined #perl6
19:32 braintwist joined #perl6
19:32 vendethiel joined #perl6
19:32 moritz http://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 moritz is that the right approach?
19:32 moritz oh wait, that was the Pointer[] instead of CArray[] approach
19:33 moritz but changing it to OpaquePointer $handle is rw (and passing in $conn instead of Pointer[$conn]) also segfaults
19:34 FROGGS moritz: the 'is rw' is for int and num only so far
19:35 FROGGS so 'int32 is rw' does mean 'int*'
19:35 FROGGS and then you can pass an int32, and it will be passed as a pointer instead
19:36 FROGGS and after the call you've got a modified int32 variable
19:40 spider-mario joined #perl6
19:40 abraxxa joined #perl6
19:43 moritz FROGGS: but Pointer[$conn] or Pointer[$conn].new should work, no?
19:45 FROGGS moritz: no, because Pointer[$thing].new does not malloc a pointer (yet)
19:48 FROGGS m: use NativeCall; sub malloc(long) is native { * }; my $ptr = Pointer[long].new(malloc(nativecallsizeof(long))); say $ptr
19:48 FROGGS ahh, yeah, camelia :/
19:48 moritz FROGGS: what does it do?
19:49 FROGGS moritz: what exactly?
19:49 moritz FROGGS: Pointer[$thing].new
19:49 FROGGS it gives you a thing that can carry a memory adress
19:49 FROGGS address*
19:49 moritz what does that mean?
19:50 FROGGS I dunno how to explain
19:51 moritz let's start this the other way round
19:51 moritz is Pointer[$thing].new *supposed* to DWIM?
19:51 FROGGS I don't think so
19:51 FROGGS Pointer[$thing].malloc will might DWYM
19:53 moritz will Pointer[$thing].new do anything useful?
19:54 FROGGS it creates a NULL pointer of your type
19:54 FROGGS and Pointer[$thing].new( other memory address here ) is like copying a pointer
19:55 virtualsue joined #perl6
19:55 moritz but isn't Pointer[$thing] already a NULL pointer of my type?
19:55 FROGGS yes
19:55 moritz then I don't see why we need Pointer[$thing].new doing the same thing
19:56 FROGGS I think because we also need a way to create a Pointer from a memory address
19:57 FROGGS and that address is optional (defaults to zero, which means NULL)
19:57 moritz .oO( timtowtmaNp )
19:58 FROGGS JNA also has a Pointer that does no memory management... they've got a Memory type
19:58 FROGGS but, I don't like that distinction...
19:59 FROGGS 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 FROGGS it just needs a good name
19:59 moritz does it need to be a type? can't it just be pointer($thing)?
20:00 ggoebel joined #perl6
20:00 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
20:00 FROGGS true
20:01 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
20:01 moritz and then I see the Pointer type
20:01 moritz I think "hey, using a proper pointer here would be far easier than this CArray workaround"
20:01 moritz except FAIL
20:01 FROGGS aye
20:08 pippo hi #perl6
20:08 FROGGS hi pippo
20:09 pippo Anybody nows how can I do this:
20:09 pippo m: grammar base { ... };  grammar G1 is base { ... }; my grammar G1 {TOP {<g1>}}; my grammar base {rule g1 {1}};
20:09 Hor|zon joined #perl6
20:10 pippo i.e. write base grammar after G1?
20:11 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.
20:11 pippo m: say "Hello";
20:11 moritz pippo: what's your use case?
20:12 moritz 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 moritz and a grammar is really just a class (with an additional superclass class Grammar)
20:12 pippo moritz: just to leave the uninportant parts at bottom of my file.
20:12 telex joined #perl6
20:12 moritz pippo: then I'd suggest to move them to another file (or let it be entirely)
20:13 pippo moritz: OK. Then how can I do to include another file?
20:15 pippo r: say "Hello";
20:16 geekosaur camelia's down for a bit
20:17 zakharyas joined #perl6
20:18 pippo geekosaur: thanks
20:19 grondilu std: grammar { TOP {} }
20:20 geekosaur ...
20:20 geekosaur [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 #perl6
20:26 nine joined #perl6
20:26 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
20:26 yoleaux 9 Feb 2015 16:53Z <ab5tract> nine: which then makes it explode when trying to stringify
20:26 yoleaux 13 Feb 2015 11:40Z <lizmat> nine: Thinking about P6 concurrence and Inline::Perl5
20:26 yoleaux 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
20:27 bartolin_ .oO(long time away)
20:28 nine Apparently when irssi started up it finally authenticated me again with nickserv
20:28 spider-mario joined #perl6
20:29 bartolin_ maybe I should disconnect as well, to get rid of that underscore :)
20:29 nine m: say 'back!';
20:29 camelia rakudo-moar d1ac6d: OUTPUT«back!␤»
20:29 bartolin_ \o/
20:30 diana_olhovik joined #perl6
20:37 brrt joined #perl6
20:41 Ven joined #perl6
20:48 tadzik synopsebot is down :(
20:48 tadzik moritz: can I have a p6c account?
20:49 PerlJam tadzik: I can make you one.
20:50 PerlJam tadzik: you want "tadzik" for your login id?
20:50 tadzik PerlJam: yep
20:59 fhelmberger joined #perl6
21:00 noganex joined #perl6
21:01 nine moritz: you're logged on to my old server
21:02 chenryn_ joined #perl6
21:03 PerlJam nine: kill his processes and that won't be true anymore ;>
21:05 pippo left #perl6
21:06 dalek rakudo/nom: 260e3cd | FROGGS++ | tools/build/ (2 files):
21:06 dalek rakudo/nom: install perl6-gdb-m and perl6-valgrind-m
21:06 dalek rakudo/nom:
21:06 dalek rakudo/nom: We do that to ease the user and to also get better error reports. Both runners are installed
21:06 dalek rakudo/nom: on non-Windows only for now.
21:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/260e3cd24a
21:06 timotimo ah, nice
21:07 FROGGS gnight
21:08 lucasb m: $_ = 'ABC'; s :i /b/x/; .say
21:08 camelia rakudo-moar d1ac6d: OUTPUT«AxC␤»
21:09 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␤»
21:09 lucasb ^^ Test that is failing in S05-substitution/subst.t
21:10 masak huh.
21:10 masak sounds like a job for Bisect Man.
21:10 nine PerlJam: already tried that and he came back. So I'm trying the direct communication now ;)
21:10 lucasb Bisect Man to the rescue /o/
21:11 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 * 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 brrt bbiab
21:12 geekosaur how does a bird merge compare to an octopus merge? >.>
21:13 lucasb I was just joking. I don't know if ever worked before. There is a "#?rakudo todo" in it.
21:14 masak ...then probably not.
21:16 Hor|zon joined #perl6
21:29 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:30 masak ooh, that would be totally sweet.
21:30 jercos ha, pi e
21:30 awwaiid I was surprised that it wasn't already there :)
21:30 masak awwaiid: maybe file a NYI ticket for that?
21:30 * awwaiid should learn what an NYI ticket is
21:30 PerlJam awwaiid: Not Yet Invented
21:30 PerlJam er, Implemented
21:30 awwaiid sure
21:31 masak Not Yet -i
21:31 awwaiid hmm. rakudo.com is not rakudo.org
21:31 PerlJam there's a rakudo.com?
21:32 lucasb Dance company :-O the way of the camel :)
21:32 PerlJam okay ... I *never* would have guessed what rakudo.com is
21:32 masak could be worse
21:38 awwaiid Like this, ya? https://rt.perl.org/Ticket/Display.html?id=124259&amp;results=d1f948c3bf4d3dbc9afc08a67d378818
21:39 masak ya rly!
21:39 awwaiid woo!
21:39 awwaiid ok bye bye
21:39 masak though I doubt you'll get -pie
21:39 awwaiid awwwww
21:39 masak since i takes a parameter
21:39 awwaiid I've always wanted that in p5
21:39 masak -i.bak
21:39 awwaiid and be like... yo! you want a param? use the long form!
21:40 masak that seems like a good behavior to me
21:40 awwaiid mine or the real one? :)
21:40 PerlJam awwaiid: I'd be find with yours
21:40 PerlJam er, finde
21:40 awwaiid great! let's start a revolution
21:40 PerlJam blah!
21:41 PerlJam *fine*
21:41 masak sounds like there's grounds for discussing this :)
21:41 masak I've never seen fault with the p5 behavior
21:41 awwaiid well that's simple. you don't write *pie*
21:42 lnr joined #perl6
21:42 lnr joined #perl6
21:43 lnr joined #perl6
21:43 lnr joined #perl6
21:43 PerlJam awwaiid: the only trick would be the mutual exclusion of the long and short forms.
21:43 lnr joined #perl6
21:44 lnr joined #perl6
21:44 lnr joined #perl6
21:45 lnr joined #perl6
21:45 Vlavv_ joined #perl6
21:45 lnr joined #perl6
21:45 lnr joined #perl6
21:46 lnr joined #perl6
21:46 lnr joined #perl6
21:47 lnr was kicked by masak: lnr
21:53 espadrine joined #perl6
21:58 dolmen joined #perl6
21:59 timotimo is there anything broken with regards to unsigned integers still?
22:02 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:07 lucasb ...which leads to my question: do you people really need {int,uint}{1,2,4}? :)
22:08 masak I think they're there mostly for compatibility with things like C, maybe?
22:09 masak I don't use them much, because I don't usually code at that level. Int tends to be good enough for me.
22:11 pdcawley joined #perl6
22:11 jercos joined #perl6
22:12 lucasb Thanks. I asked out of curiosity, because it seems too granularity to me. But I like having a bit (uint1) type.
22:13 mohij joined #perl6
22:13 Possum joined #perl6
22:14 masak I can see a use for them. when you're *very* concerned about memory.
22:14 masak unless I am in some situation, I'm not gonna bother about them much.
22:20 jercos seems like it might be a good idea to have an n-bit type for struct compatibility and the like...
22:20 jercos But perhaps that belongs in a library for handling integers in bitstrings
22:20 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
22:21 raydiak (or Buf/Blob)
22:29 * 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:32 masak 'night, #perl6
22:32 lucasb o/ masak
22:32 raydiak sleep well masak
22:34 lucasb About raydiak's question, I found the message here:
22:34 lucasb https://github.com/MoarVM/MoarVM/blob/master/src/strings/ascii.c#L21
22:35 lucasb In C, a char is 8bit *signed* ? Then I think the "code point < 0" is because of wrap around behaviour
22:35 jack_rabbit joined #perl6
22:36 lucasb But I don't know what I'm talking about :)
22:43 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:46 raydiak 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:51 lucasb Agreed. IMO, from rakudo's perspective the message is LTA.
22:59 fhelmberger joined #perl6
23:05 Hor|zon joined #perl6
23:08 chenryn_ joined #perl6
23:15 skids joined #perl6
23:20 andreoss joined #perl6
23:20 lucasb m: say blob8.new(354,377,357).decode('ascii')  # good night o/
23:20 camelia rakudo-moar 260e3c: OUTPUT«bye␤»
23:21 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␤»
23:21 andreoss m: say 22 % 1
23:21 camelia rakudo-moar 260e3c: OUTPUT«0␤»
23:22 TimToady m: say utf8.new(354,377,357)
23:22 camelia rakudo-moar 260e3c: OUTPUT«utf8:0x<62 79 65>␤»
23:22 TimToady m: say ~utf8.new(354,377,357)
23:22 camelia rakudo-moar 260e3c: OUTPUT«bye␤»
23:23 andreoss m: say 22.0 % 1
23:23 camelia rakudo-moar 260e3c: OUTPUT«0␤»
23:26 andreoss seems like $t is not just 22 deep inside
23:28 BenGoldberg joined #perl6
23:31 TimToady m: say utf8("abc")
23:31 camelia rakudo-moar 260e3c: OUTPUT«Cannot find method 'utf8'␤  in block <unit> at /tmp/ALCMldIRyV:1␤␤»
23:31 TimToady aww
23:31 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:31 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>␤»
23:32 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␤»
23:33 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␤»
23:34 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…»
23:34 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)
23:34 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␤␤»
23:34 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)
23:34 camelia rakudo-moar 260e3c: OUTPUT«Difference is 0.999999999999996␤»
23:35 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 TimToady normal float-point imprecision...
23:37 andreoss why it doesn't come out with convertion to string?
23:37 larion joined #perl6
23:38 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␤»
23:38 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)
23:38 camelia rakudo-moar 260e3c: OUTPUT«Difference is -4.4408920985006e-15␤»
23:38 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)
23:38 camelia rakudo-moar 260e3c: OUTPUT«Difference is -0.00000000000000␤»
23:39 TimToady by default it's probably using a format that throws away the last bit or two
23:41 TimToady m: say 0.999999999999996.fmt('%.14g')
23:41 camelia rakudo-moar 260e3c: OUTPUT«1␤»
23:44 andreoss thanks. i guess i will stick with $t.Str.Int
23:45 TimToady well, you can just use .round(0.00000000000000)
23:45 TimToady 0.00000000000001
23:46 TimToady or you can write a symbolic math package :)
23:47 TimToady .oO( Inline::Mathematica )
23:51 TimToady actually, that's the program, and the language would be Wolfram
23:51 * TimToady would never name a programming language after himself...

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo