Re: Is passing excess parameters while creating object legal?

2014-05-27 Thread timo
uch as the automatically generated new method) take an implicit *%_ parameter, which will slurp up the excess named parameters. This is called "interface consistency". You can find more about it in the synopsis here: http://perlcabal.org/syn/S12.html#Interface_Consistency Hope to help! - T

Re: Perl6 and wxwidgets

2014-06-08 Thread timo
appy/ https://github.com/retupmoca/P6-Compress-Zlib-Raw/ https://github.com/dagurval/perl6-gd-raw/ https://github.com/perl6/gtk-simple/ https://github.com/mrhdias/perl6-Imlib2/ Hope to help! - Timo signature.asc Description: OpenPGP digital signature

Re: Rewrite using map? Trasformation array into hash of hash

2014-06-13 Thread timo
://perlcabal.org/syn/S32/Containers.html#categorize will allow you to return a parcel from the "categorization" you provide (such as -> $_ { (.a, .b) }) and build a multi-leveled hash. Sadly, I wasn't able to make it work right away. Cheers, - Timo signature.asc Description: OpenPGP digital signature

Re: Rewrite using map? Trasformation array into hash of hash

2014-06-14 Thread timo
s a result. Could that be the problem? Cheers - Timo signature.asc Description: OpenPGP digital signature

Re: Grammars and biological data formats

2014-08-09 Thread timo
to imply that :p for subparse doesn't work. I'll look into that, because I believe it ought to be implemented already. Perhaps not properly hooked up, though. Hope to help! - Timo

Re: Grammars and biological data formats

2014-08-09 Thread timo
potential confusion before it can arise - Timo

Re: Can we add Data::Tables to modules.perl6.org?

2014-09-15 Thread timo
give us a battle-hardened interface (meta::cpan or something?) for our modules, but until then I see no reason to have modules.perl6.org be less than awesome. If you'd like to implement things yourself, you can find the repository here: https://github.com/perl6/modules.perl6.org Thank you for your interest and time! - Timo

Re: time and now showing different time?

2015-01-10 Thread timo
t full seconds than the calls > to 'time' ? > > Gabor > One of them counts leap seconds, the other doesn't. Instant is supposed to be a monotonic clock, the other isn't. regards - Timo

Re: Memory leak in Rakudo Star 2014.12.1 ?

2015-01-10 Thread timo
That happens because the result of the for statement is a list that is then sunk; it contains one scalar and one Int object for each iteration and rakudo doesn't yet know to throw it away immediately. Regards - Timo

Re: Memory leak in Rakudo Star 2014.12.1 ?

2015-01-10 Thread timo
ing kept around. There was also an optimization that turns a for ^1000 loop into a while loop with a native counter for great performance improvements, but that got b0rked at some point ;( regards - Timo

Re: Memory leak in Rakudo Star 2014.12.1 ?

2015-01-10 Thread timo
out https://github.com/szabgab/Perl6-Maven/ Can you point me at the actual pieces of code where this problem appears? regards - Timo

Re: Exactly what is type match?

2018-12-21 Thread Timo Paulssen
and probably wrong. Then you get errors for using uninitialized Str, which $D0 and $D1 are in both situations (since you never assign anything to it). What you need is to put a = between $D0 and ~$0 and between $D1 and ~$1 That should work. Hope that made some sense   - Timo

Re: Exactly what is type match?

2018-12-21 Thread Timo Paulssen
ent". "$a ~= $b" does almost the same as "$a = $a ~ $b". it works for every infix operator, too: $a += 1 is probably known to many $a max= 5 will leave $a containing either $a or 5, whichever is higher $a **= 2 will leave $a with the result of $a ** 2 and so on, and so forth. Does that clear things up?   - Timo

Re: I need hash inside a hash help

2019-01-11 Thread Timo Paulssen
like this: perl6 -e 'my %Vendors=("acme" => %( "ContactName" => "Larry", "AccountNo" => 1234 ) ); say %Vendors;' {acme => {AccountNo => 1234, ContactName => Larry}} Hope that helps!   - Timo On 11/01/2019 19:41, ToddAndMargo via p

Re: I need m/ help

2019-01-12 Thread Timo Paulssen
, > -T Hi Todd, it looks like you have an accidental l in there: the third capture group has <:Nl> instead of <:N>. Changing that makes it work for me   - Timo

Re: I need m/ help

2019-01-13 Thread Timo Paulssen
VE U VARIANT FORM 74859: 𒑫 CUNEIFORM NUMERIC SIGN SIX U VARIANT FORM 74860: 𒑬 CUNEIFORM NUMERIC SIGN SEVEN U VARIANT FORM 74861: 𒑭 CUNEIFORM NUMERIC SIGN EIGHT U VARIANT FORM 74862: 𒑮 CUNEIFORM NUMERIC SIGN NINE U VARIANT FORM On 13/01/2019 09:42, ToddAndMargo via perl6-users wrote: > On 1/12/19 3

Re: [perl #133791] perl 6 parser bugging out on a comment thinking it is a real var

2019-01-26 Thread Timo Paulssen
I believe the problem comes from `"{"` which actually starts an interpolated code block containing a string immediately. That's also why it doesn't complain about the "else" being in an odd place; it's also inside the string! So here's an equivalent piece of code that shows what's wrong: if reque

Re: filever.exe sub?

2019-02-01 Thread Timo Paulssen
header files, or where and how symbols/types that are used in the code are defined: https://source.winehq.org/source/dlls/version/version.c Sorry for not giving a super simple solution. Perhaps there's something on the net for "PE metadata parser" or "PE file parser" or whatever. Hope that gets you closer to your goal!   - Timo

Re: subs and variables speed question

2019-02-11 Thread Timo Paulssen
Please be aware that WHERE will give you the actual memory address of an object, but moarvm has a moving garbage collector, which means that objects can change their memory location. at the moment it will only happen up to two times, i believe. you'll probably have a better result with .WHICH for

Re: subs and variables speed question

2019-02-11 Thread Timo Paulssen
WHICH doesn't give you a numerical value. just print it as it is. On 11/02/2019 12:16, ToddAndMargo via perl6-users wrote: > On 2/11/19 2:52 AM, Timo Paulssen wrote: >> Please be aware that WHERE will give you the actual memory address of an >> object, but moarvm has a movi

Re: subs and variables speed question

2019-02-11 Thread Timo Paulssen
> On 2/11/19 3:27 AM, Timo Paulssen wrote: > > WHICH doesn't give you a numerical value. just print it as it is. > > > $ p6 'sub a (Buf $b) { say $b.WHICH }; my $c = Buf.new(1,2,3); say > $c.WHICH; a($c);' > Buf|71848984 > Buf|71848984 > > If &quo

Re: Typed Arrays and for-loops

2019-02-13 Thread Timo Paulssen
You could use the @ sigil for your files variable, too. Then you can just "for @files". There's two ways to get that to work: my Str @files = "Test", "Test 2"; or my @files := Array[Str].new("Test", "Test 2"); Hope to help   - Timo On 1

Re: .payload

2019-02-28 Thread Timo Paulssen
oad with PrintRedErr("$Payload\n") anyway. On top of that, every Exception object implements message. Hope that helps!   - Timo On 28/02/2019 12:46, ToddAndMargo via perl6-users wrote: > Hi All, > > https://docs.perl6.org/language/exceptions#Catching_exceptions > > I a

Re: .payload

2019-02-28 Thread Timo Paulssen
rap \" \"$NotifyStr\"" ); >>> } >>> >>> >>> But keep pulling the following error: >>> >>>   No such method 'payload' for invocant of type >>>   'X::TypeCheck::Assignment' in block >>&g

Re: perl6.org down and documentation

2019-04-21 Thread Timo Paulssen
#x27;m not sure why zef is trying to install p6doc system-wide, but you could try creating and giving your user write access to /usr/share/perl6/site/doc to see what it comes up with next … Cheers,   - Timo On 21/04/2019 10:27, mimosinnet wrote: > Dear perl6 users, > > Perl6 web [1]

Re: Why so slow?

2019-04-22 Thread Timo Paulssen
g "zef install .") and removed the line "use lib 'lib';", it might start a lot faster when you run it the second time. Hope that helps!   - Timo On 22/04/2019 03:32, ToddAndMargo via perl6-users wrote: > Hi All, > > One liners are fast, but my own programs ar

Re: Why so slow?

2019-04-22 Thread Timo Paulssen
It's the second line: use v6; use lib 'lib';  # ← this line right here use GTK::Simple; use GTK::Simple::App;   -Timo On 22/04/2019 12:51, ToddAndMargo via perl6-users wrote: >>> On 22/04/2019 03:32, ToddAndMargo via perl6-users wrote: >>>> Hi All, >&

Re: gtk widget?

2019-04-22 Thread Timo Paulssen
phically put a GUI together. https://glade.gnome.org/ Good Luck!   - Timo On 22/04/2019 05:44, ToddAndMargo via perl6-users wrote: > Hi All, > > I see > > https://github.com/perl6/gtk-simple/tree/master/examples > > but I have no clue what is going on. > > Is there s

Re: Why so slow

2019-04-27 Thread Timo Paulssen
file that you can just open in your browser to get an interactive performance inspection tool thingie. Be aware, though, that it can become very big in the case of --profile-compile, depending on the structure of the program being compiled. Hope any of that helps   - Timo On 21/04/2019 05:58

Re: Why so slow

2019-04-28 Thread Timo Paulssen
working hypothesis. HTH   - Timo On 28/04/2019 08:41, ToddAndMargo via perl6-users wrote: > On 21/04/2019 05:58, ToddAndMargo via perl6-users wrote:>> Hi All, >> >> One liners are fast, but my own programs are very slow to start. >> >> I download >> >>

Re: Why so slow

2019-04-28 Thread Timo Paulssen
t;> >>> https://github.com/perl6/gtk-simple/blob/master/examples/05-bars.pl6 >>> >>> >>> To check it out and it also takes ten second to start. >> >>> What gives? >>> >>> Many thanks, -T > > >On 4/27/19 11:14 PM, Timo Paulssen

Re: Why so slow

2019-04-28 Thread Timo Paulssen
in them, but i'm not exactly sure how it influences precompilation and such. On 28/04/2019 09:21, ToddAndMargo via perl6-users wrote: Hi Timo, This tell you anything? $ perl6 --stagestats GetUpdates.pl6 Stage start  :   0.000 Stage parse  :  13.150 Stage syntaxcheck:   0.000 S

Re: Something happened to the chat line

2019-04-28 Thread Timo Paulssen
I'm just about to go to bed, but you can use this link instead (i think what was there before was just a redirect anyway):     https://webchat.freenode.net/?channels=#perl6 HTH   - Timo On 29/04/2019 00:38, ToddAndMargo via perl6-users wrote: > Hi All, > > Going to > >   

Re: library search path ?

2019-04-29 Thread Timo Paulssen
you can use these one-liners:     perl6 -e '.say for $*REPO.repo-chain'     perl6 -e '.perl.say for $*REPO.repo-chain' On 29/04/2019 00:33, ToddAndMargo via perl6-users wrote: > Hi All, > > Could not find xxx::yyy at line zz in: >     file#/home/linuxutil/p6lib >     inst#/home/tony/.perl6 >    

Re: Short term Zef fix

2019-04-30 Thread Timo Paulssen
Doesn't updating zef to the latest version fix everything up nicely?   - Timo On 30/04/2019 12:06, Simon Proctor wrote: > Until the p6c system is fixed here's a short term fix that will at > least let zef install modules from cpan. > > zef --help > This li

Re: LogP6 not working as I expect

2019-05-10 Thread Timo Paulssen
Hi Patrick, It could be that compile time is too early for the logger object to properly be set up; try to see if "my \Log" instead of "constant Log" fixes it, then we can perhaps find a better solution that still has "constant" (for example a feature request for LogP6) Kind Regards   - Timo

Re: Odd Complex behavior

2019-06-13 Thread Timo Paulssen
Unfortunately, that's what the IEEE prescribes, so all we can really do is: *shrug* On 13/06/2019 21:01, Sean McAfee wrote: On Thu, Jun 13, 2019 at 11:12 AM Brad Gilbert > wrote:     > (-i).reals     (-0 -1) Ah, so it's nothing particular to Complex: > bag

Re: Odd Complex behavior

2019-06-14 Thread Timo Paulssen
would come up at just the right time to ruin your day :( On 14/06/2019 00:28, Elizabeth Mattijsen wrote: We could potentially give 0e0 and -0e0 the same .WHICH, which would solve the bag issue. On 13 Jun 2019, at 21:02, Timo Paulssen wrote: Unfortunately, that's what the IEEE prescribe

Re: is inlinable trait missing from docs

2019-07-13 Thread Timo Paulssen
I wouldn't put "is inlinable" in the docs; it requires the user to put a QAST tree in the value, which isn't a thing an end-user would touch, IMO. In fact I'm not sure why we have a trait for that at all, since it's not used anywhere in rakudo's source. On 13/07/2019 12:33, Marcel Timmerman wrote:

Re: is inlinable trait missing from docs

2019-07-13 Thread Timo Paulssen
udo/blob/master/src/Perl6/Actions.nqp#L4193 On top of that, there's MoarVM's spesh, which also does inlining. The profiler can tell you what was inlined and what wasn't, and IIRC the spesh log can give you more specific info on why an inline was not performed in a given case. HTH   - Tim

Re: Teaching Rakudo the tricks of Perl 5's regex optimiser

2019-08-13 Thread Timo Paulssen
ent At least at the moment, that's not 100% accurate (only by virtue of leaving out a piece): timo@schmand ~> perl6 -e 'grammar test { regex before($re) { { say "yo" } }; regex TOP { <.before "hi"> } }; test.parse("hi")' yo Too few positional

Re: Teaching Rakudo the tricks of Perl 5's regex optimiser

2019-08-13 Thread Timo Paulssen
Here's some stuff that anybody who wants to work on regex optimization in perl6 will want to know: You can get a print-out of rakudo's internal AST that is generated for the regex by passing --target=ast or --target=optimize to the perl6 commandline. I recommend grep -C5 Regex to skip some of the

Passing on Fates [was: Re: Teaching Rakudo the tricks of Perl 5's regex optimiser]

2019-08-13 Thread Timo Paulssen
ly into . However, it does not currently have a way to communicate deeper results to the regex engine. I hope that explanation makes sense even if you're not deep in the regex engine with your head already. Kind Regards   - Timo

Re: Typed Pairs

2019-09-05 Thread Timo Paulssen
You can try defining a subset type a bit like this: subset StrArrStrsPair of Pair where .key ~~ Str && .value ~~ Positional[Str]; Please be aware that the arrays have to be explicitly created with the type constant of Str for this to work. On 5 September 2019 14:34:05 CEST, Mikkel wrote: >Hell

Re: FC31 can't find my module subs

2019-11-04 Thread Timo Paulssen
st :ModuleTest :ModuleTst; ModuleTest; ModuleTst;  # missing the comma' it should look like in the first line, the comma right between :ModuleTest and :ModuleTst Thanks   - Timo On 04/11/2019 03:56, ToddAndMargo via perl6-users wrote: > On 11/3/19 3:15 PM, ToddAndMargo via perl6-users wrote: &g

Re: getting comb to return match objects

2019-11-16 Thread Timo Paulssen
as above; True being interpreted as 1 >> say comb(/\w+/, "a;b;c", 2, True).perl; > Too many positionals passed; >> expected 2 or 3 arguments but got 4 in > block at line 1 There's no syntax here that distinguishes 2, a positional parameter, from True, also a positional parameter. >> say comb(/\w+/, "a;b;c", 2, :True).perl; > Unexpected named argument 'True' >> passed in block at file> line 1 The issue here is that :True is short for True => True, i.e. passing the value True to the named parameter called "True", easy to get confused by the error message here! > Any help appreciated, Bill. I hope the explanations make sense!   - Timo

Re: getting comb to return match objects

2019-11-16 Thread Timo Paulssen
n the code from my mail will retroactively become correct ;) HTH   - Timo On 16/11/2019 18:35, William Michels wrote: > Hello Timo, and thank you for taking the time to explain how "comb" > routine signatures work. I have no doubt your description is the > correct way to use com

Re: split to walk into an HoH ?

2019-11-22 Thread Timo Paulssen
  "B,2,garbage .",   "B,2,garbage .",   "B,2,garbage ."     ]   } } Things to note are: it makes hashes, so the order isn't retained. if that's important, you could, for example, use/build a Hash that retains its key insertion order and c

Re: Quoting issue in Windows

2019-11-30 Thread Timo Paulssen
ally exactly the code. You want to compare here, not assign, i.e. use == instead of = HTH   - Timo

Re: rmdir question

2019-12-03 Thread Timo Paulssen
mdir: no such file or directory"), backtrace > => Backtrace.new) > # mkdir a ; `which perl6` -e "try { 'b'.IO.rmdir.perl.say; CATCH { > default { 'tsk tsk'.say }}}" > tsk tsk Hi Paul, thanks to your email I found and fixed an oversight in the Raku docs: it says it throws an exception, when actually it returns a Failure. Thank you!   - Timo

Re: NQPMu ??

2020-01-09 Thread Timo Paulssen
Yes, native integers/nums don't work in the REPL (that's any uint or int with number after it, or num32 or num64 or num or int or long etc). On 09/01/2020 19:16, ToddAndMargo via perl6-users wrote: > On 2020-01-09 10:11, ToddAndMargo via perl6-users wrote: >> Hi All, >> >> What am I doing wrong he

Re: printf question

2020-02-10 Thread Timo Paulssen
s (like :ignorecase / :i, :global, etc) have been moved to the front of regexes. Hope that's interesting   - Timo On 10/02/2020 07:48, Paul Procacci wrote: > Named parameters must come after all positional parameters. > Your example subroutine is invalid for this reason, while the > fo

Re: Question about Blob and Buf

2020-02-11 Thread Timo Paulssen
that you're mixing strings and bufs. I'm not sure if there is a good solution for inside rakudo or the raku language. Setting an initial value for the variable is one correct way to do this, though. Hope that helps!   - Timo

Re: Question about Blob and Buf

2020-02-11 Thread Timo Paulssen
he assignment into the existing object. This is why "my %foo = SetHash.new()" will result in a Hash. For this example, you would want "my %foo is SetHash = " instead. Hope that clears things up   - Timo

Re: stashing an array in a hash and yanking it back out

2020-03-05 Thread Timo Paulssen
lla grendel wormface blob fingfangfoom tingler]>> my %stash{'monsters'} = @monsters;> {fingfangfoom => tingler, godzilla => grendel, wormface => blob}>> my @m = %stash{'monsters'};> [(Any)]>> say @m> [(Any)]>> exit timo@schmand ~>

Re: OAuth2?

2020-03-23 Thread Timo Paulssen
The link was just missing a "../" at the beginning. The example code lives here:     https://github.com/tbrowder/Google-API-Client/blob/master/eg/get-calendar-data.p6 Hope that helps   - Timo On 23/03/2020 04:34, ToddAndMargo via perl6-users wrote: > On 2020-03-22 16:43, Tom

Re: subst :g and captures in the replacement

2020-04-19 Thread Timo Paulssen
bst(/(f+)/,"( $0 )", :g)' > ( w )osd( w )gg Hope that helps   - Timo On 19/04/2020 23:53, yary wrote: > Question from today's Raku meetup. This works in a way I expect > > > 'fosdffgg'.subst(/f+/,"( "~ * ~" )", :g); > ( f )osd( ff )

Re: NativeCall questions

2020-05-08 Thread Timo Paulssen
e a struct to be passed as argument or received as return value in NativeCall, you will get "TheStruct *" on the C side. Not sure if that's all it takes to fix this. Feel free to write back to the list. Hope to Help   - Timo On 08/05/2020 12:44, David Santiago wrote: > Hello, &

Re: fill in form

2020-05-12 Thread Timo Paulssen
sible so it (almost) touches the end of the label, so different words ("city" vs "first name") could result in different-sized text inputs. hope that helps   - Timo On 12/05/2020 00:47, ToddAndMargo via perl6-users wrote: > Hi All, > > I want to create a fill in f

Re: fill in form

2020-05-13 Thread Timo Paulssen
Is this not anything like what you're after? https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fwww.w3.org%2FTR%2F2016%2FCR-css-grid-1-20160929%2Fimages%2Fauto-placed-form.png&f=1&nofb=1 Kind Regards   - Timo On 12/05/2020 20:44, ToddAndMargo via perl6-users wrote: > &g

Re: junctions and parenthesis

2020-06-24 Thread Timo Paulssen
le on the object you've got, or you want a different function, you can .&mysub LMKWYT   - Timo

Re: I cannot install any lib with Zef

2020-07-21 Thread Timo Paulssen
I would assume the ffi, tommath, atomic_ops, and uv linker flags come straight from moarvm's linker flags, probably because the build script of Digest::SHA256::Native uses the flags used to compile moarvm itself. If you've compiled your moarvm yourself, this is a safe bet; these libraries are guara

Re: Raku version of "The top 10 tricks of Perl one-liners" ?!?

2020-07-22 Thread Timo Paulssen
Try it with a very filled folder, though. I would expect the majority of the time spent is setup and actually going through the lines themselves isn't very slow. On 22/07/2020 22:31, Aureliano Guedes wrote: > That is a little bit disappointing: > > $ time ls -l | perl -lane 'print "$F[7] $F[1]"' >

Re: zef: too many files in ~/.raku/short

2020-08-08 Thread Timo Paulssen
h a directory or something, so tracking that down further could be interesting if that is the case. HTH   - Timo On 01/08/2020 22:46, Fernando Santagata wrote: > Hello, > > I found out that on my system at a certain point zef was unable to > read the content of ~/.raku/short and bec

Re: Language Design: 'special casing' of split()? (i.e. .split performs concomitant .join? )

2020-10-10 Thread Timo Paulssen
in "hello" again. Trigonometric methods like sin, cos, tan, are all "numerical cool methods" so the first thing they do is coerce to Numeric, that's why "99".tan.say gives you roughly -25.1. Please check out the table near the beginning of this documentation page:     https://docs.raku.org/type/Cool hope that makes things more clear   - Timo

Re: Metamodel parent and return values ...

2020-10-30 Thread Timo Paulssen
pass the actual type object. Hope that helps!   - Timo

Re: Missing NullPointerException

2020-12-02 Thread Timo Paulssen
On 02/12/2020 17:18, William Michels via perl6-users wrote: Does this explain why calling "dd" in the REPL returns Nil on the final line, but Nil doesn't seem to be returned on the final line when using "dd" from the Bash shell? user@mbook:~$ raku -e 'dd "0123456789";' "0123456789" user@mbook:

Re: msi of 2020.10?

2020-12-02 Thread Timo Paulssen
Hi todd, please give this a try:     https://setxkbmap.de/rakudo-2020-11-windows-32bit.zip good luck! btw I forgot you wanted 2020.10 so I just made 2020.11. And I assumed you wanted a 32bit build, since that was what I remember you wanted last time? HTH   - Timo On 02/12/2020 22:39

Re: dimensions in a multidimensional array

2021-02-05 Thread Timo Paulssen
Shaped Arrays and Native Shaped Arrays already use one contiguous blob to store all their data; in Shaped Arrays that's an array of pointers to the stored objects, in a Native Shaped Array it'll be like a big array of 32bit integers or whatever you have. Regards   - Timo On 05/02/

Re: Performance of matrix arithmetic in Raku

2021-02-08 Thread Timo Paulssen
good at making python code go fast, and perhaps with Cython? Hope this doesn't add too many more questions, and actually answers a thing or two?   - Timo On 09/02/2021 02:18, Parrot Raiser wrote: There's a post online comparing Python's performance of matrix arithmetic to C, ind

Re: the MAIN questions

2021-12-29 Thread Timo Paulssen
Hey marc, since the default value for a "Bool" is an undefined Bool, you can just boolify whatever happens to be in :$diff, which will be False for "no flag passed" or True for "flag passed and was True". Hope that helps   - Timo On 29/12/2021 13:00, Marc Chant

Re: [perl #130763] [BUG][LTA] Weird error in anonymous class value in Hash

2017-02-12 Thread Timo Paulssen
This is caused by the way we differentiate between anonymous blocks and hashes; we just parse it as a block first, and if at the end it turns out it should be a hash instead, we change it around. I suppose at that point the class will already have been defined and its stuff will point at the "not a

Re: [perl #130793] explicit .resume on Broken promise exception "not resumable", implicit fine

2017-02-16 Thread Timo Paulssen
You might be confusing resuming an exception with leaving the CATCH block with the exception marked as "handled". When you leave the block after having matched the exception successfully with a default or when block (or whatever else), the exception is marked as handled, which means it won't get r

Re: sub for die?

2017-02-18 Thread Timo Paulssen
It is usually considered The Right Thing to output error messages to stderr instead of stdout; you can use "note" to output to stderr (and it'll also put a newline at the end for you, which print doesn't do).

Re: reverse of .lines?

2017-02-18 Thread Timo Paulssen
amples were confusing your original question where you said "reverse of .lines", but you meant "inverse of .lines". So you can just leave out the .reverse from these examples. Hope that helps! - Timo

Re: cifs control

2017-02-18 Thread Timo Paulssen
On 18/02/17 06:04, ToddAndMargo wrote: > Hi All, > > Sorry for the 1000 questions today, but I have anb entire > week to think them up. And I have another one. > > In Windows, I am noticing that Cobian Backup and Windows > Explorer (not Internet Explorer) can tool around CIFS > (Windows) shares ba

Re: intercept STDERR

2017-02-18 Thread Timo Paulssen
Normally it's enough to override $*ERR for this purpose. I suggest using IO::MiddleMan to do that, or maybe IO::Capture::Simple. HTH - Timo

Re: net::SMTP in rpm land?

2017-02-18 Thread Timo Paulssen
ntil something gets figured out by all the involved parties. HTH - Timo

Re: need {} help

2017-02-18 Thread Timo Paulssen
assignment form which looks like s{ foo } = "bar"). Sadly, I couldn't find any docs about the assignment form of s///, but it does explain the thing with balanced parenthesis: https://docs.perl6.org/syntax/s$SOLIDUS%20$SOLIDUS%20$SOLIDUS Hope that helps! - Timo

Re: sub for die?

2017-02-19 Thread Timo Paulssen
ram is "not all that useful" as you correctly point out. HTH - Timo

Re: print to STDERR problem

2017-02-19 Thread Timo Paulssen
> And then a bit lower you can see: > Date: 4 Aug 2000 > Last Modified: 14 Sep 2000 thanks - Timo

Re: print to STDERR problem

2017-02-19 Thread Timo Paulssen
Oh, another question: please tell us how you reached that site? I expect you did a google search or something; can you tell us what search terms you've used to get there? We should obviously improve the docs so that they get found instead of the archive …

Re: print to STDERR problem

2017-02-19 Thread Timo Paulssen
On 02/19/2017 11:15 PM, ToddAndMargo wrote: > On 02/19/2017 07:15 AM, Timo Paulssen wrote: >> Oh, another question: >> >> please tell us how you reached that site? I expect you did a google >> search or something; can you tell us what search terms you've used to &

Re: [perl #130845] Some things that are less than 5 aren't

2017-02-23 Thread Timo Paulssen
This is because the implementation of infix:(Rat:D, Rat:D) is kind of bad: multi sub infix:(Rational:D \a, Rational:D \b) is default { a.Num cmp b.Num } We'll have to do a proper comparison of rats, rather than convert to Num which can give wrong results like this. On 23/02/17 04

Re: [perl #130845] Some things that are less than 5 aren't

2017-02-23 Thread Timo Paulssen
Actually, I was mistaken. The code i pointed at there already works for this very case. observe: 131338 timotimo │ m: say 4.999 cmp 5.0 131338 +camelia │ rakudo-moar 1811b8: OUTPUT: «Less␤» The real problem is this implementation of &infix:: multi sub infix:(Real:D \a,

Re: I am having trouble installing panda

2017-02-24 Thread Timo Paulssen
its "new" method, and the raw interface has "switch-to-ssl()" and "starttls()" methods. HTH - Timo

Re: [perl #130886] multi subs with inconsistent where clauses don't work correctly

2017-02-28 Thread Timo Paulssen
test 90 90 91 92 93 94 95 96 97 98 99 test 100 100 timo@schmand ~> cat /tmp/inconsistent.p6 my \one-out-of-ten = (|(False,False,False,False,False,False,False,False,False,True,True,True) xx *).iterator; multi sub rarely ( $

Re: I need the rules for qx with a pipe inside

2017-03-06 Thread Timo Paulssen
This is because of how xclip works. It keeps running until you kill it, or until the number of pastes has been reached that you specify with -loops. You will want to use Proc::Async or run with an :in parameter instead of shelling into a redirect with echo, here's why: timo@schmand ~

Re: $*DISTRO

2017-03-06 Thread Timo Paulssen
Doesn't seem to be, but there's $*DISTRO.is-win, which is usually enough (i.e. you have to do one dumb thing on windows and another sane thing on literally anything else)

Re: I need the rules for qx with a pipe inside

2017-03-06 Thread Timo Paulssen
> Is there a way to send and "end of file" marker to terminate the pipe? That is exactly what the call to .close does.

Re: program/script question

2017-03-07 Thread Timo Paulssen
On 07/03/17 10:54, Brandon Allbery wrote:> Perl compiles to an internal AST, as does Python --- but there are > "compilers" for both, at various levels [...] more precisely, python code compiles down to bytecode rather than sticking around at an AST level.

Re: Design question re: function parameters

2017-03-07 Thread Timo Paulssen
r lists: sub postfix:(Int(Cool) $n) { [*] 2 .. $n } That'll explode early when the string you pass doesn't intify properly. It'll also allow you to pass lists and use their length for example - not sure if you want that. Hope that helps! - Timo

Re: I need the rules for qx with a pipe inside

2017-03-07 Thread Timo Paulssen
ommand 'echo "oh my "what do we have here > " | cat' exited unsuccessfully (exit code: 1) > in block at -e line 1 Or what if there's backtick quotes? > timo@schmand ~> perl6 -e 'my $Str = $*IN.slurp-rest(:close); shell > qq/echo "$Str"

Re: Variables in modules

2017-03-09 Thread Timo Paulssen
"my" variables are lexically scoped to the curly braces that contain them. That means that your $IAm is limited exactly to that init block. Also, =~ isn't in perl6. You can put "my $IAm" outside that block and assign to it inside the block, though. HTH - Timo

Re: issues with

2017-03-09 Thread Timo Paulssen
Hey, X11::Xlib::Raw is buggy. It has to have all modules it uses internally inside its "provides" section in the META6.json, otherwise "use" will not find them. I'll open a ticket with the module author. HTH - Timo On 08/03/17 22:08, ToddAndMargo wrote: > Hi All,

Re: How to defined reversed word in a perl6 grammar ?

2017-03-09 Thread Timo Paulssen
Hi, Wouldn't it be enough to use something that backtracks? As you might know, "token" is "regex + ratcheting" and "rule" is "token + sigspace". HTH - Timo

Re: Your thoughts on Padre?

2017-03-09 Thread Timo Paulssen
ed plugins for atom, so they are generally of high quality. HTH - Timo

Re: debugging modules

2017-03-10 Thread Timo Paulssen
rce a full recompile of all used modules (transitively) in memory, but you can copy-paste the modules you're interested in into a "lib/" folder and just -Ilib on the commandline. just make sure to rm -rf lib/.precomp between runs, i think! hope that helps! - Timo

Re: Fwd: Re: Variables in modules

2017-03-10 Thread Timo Paulssen
I don't quite understand what's wrong with just my $TheValue = $?FILE.subst(/.* "/"/, "" :g); near the top of your module?

Re: my command line notes:

2017-03-15 Thread Timo Paulssen
@*ARGS.perl ~ ">\n"; But even with "" you don't have to backslash the @ and the * there. You only would have to do that if you had a method call that includes parenthesis or if you had a subscript after something that looks just like an array variable. (these rules

  1   2   3   4   >