Re: How do I do this pop up?

2025-06-12 Thread Timo Paulssen via perl6-users
Hi Todd, for a popup such as this, you will probably need a full GUI library. There are utilities to show very simple GUI dialogs like KDialog (probably linux-only), Zenity (two different windows ports exist, both have been abandoned almost a decade ago). These are all inspired by "dialog" w

Re: unhandled target type

2024-11-16 Thread Timo Paulssen via perl6-users
On 11/16/24 08:21, ToddAndMargo via perl6-users wrote: On 11/15/24 04:49, ToddAndMargo via perl6-users wrote: And in less than 24 hours, Timo located the regression and placed a pull request to fix it. In the 30 years I have been doing this stuff, I have NEVER seen that kind of a rapid

Re: things I miss in Raku (from perl)

2024-10-10 Thread Timo Paulssen via perl6-users
eady .Str to key and value joined by a \t by default. I'm not sure what you mean by $o->$_ exactly, my guess is the @user{ @attrs } = ... bit? For addressing an attribute by its name, you would want to use "method named by string" syntax: $foo."the_name_is_$foo"() which you can then assign to if you like. Hope that helps!   - Timo

Re: serach.brave.com's AI and Raku

2024-10-10 Thread Timo Paulssen via perl6-users
On 10/10/24 12:31, ToddAndMargo via perl6-users wrote: Oh you know it would be helpful to show the results: [...]     Specify a prefix and suffix for the filename: my ($filename, $filehandle) = tempfile(:prefix('foo'), :suffix(".txt")); Note that tempfile returns a tuple containing the filen

Re: Raku is removed from Debian

2024-09-04 Thread Timo Paulssen via perl6-users
ne as well, of course. Hopefully we can have some packages for you to "sponsor" soon :) Kind Regards   - Timo * I can only speak for myself, I'm just assuming Will is fine with my claims / suggestions

Re: my zenity adventure

2023-03-26 Thread Timo Paulssen via perl6-users
Hey Todd, Its likely that because you are using the shell sub the < and > characters have been interpreted by the shell to mean redirection. Check for odd files in your working directory that have the text you saw zenity output in them, and perhaps there is even a file with heat the capital let

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: 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: 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: 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: 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: Metamodel parent and return values ...

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

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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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

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: 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

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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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
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-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: 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-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: 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: 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: .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: .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: 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: 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: 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
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: 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: [perl #133791] perl 6 parser bugging out on a comment thinking it is a real var

2019-01-26 Thread Timo Paulssen via RT
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: [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: 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: 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 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: 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: 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: wxWidgets nativecall

2018-11-27 Thread Timo Paulssen
ng list, or on Stack Overflow, or real-time discussions on IRC, links can be found on perl6.org I haven't actually tried the C++ stuff in NativeCall, but we can surely figure it out together :) HTH   - Timo On 21/11/2018 03:31, Perry Sebastian wrote: > Hi, > I built an odd little app

Re: How to use sub/method 'dir'

2018-11-24 Thread Timo Paulssen
you check what "a/b".IO.d outputs? Maybe that can give us a clue. HTH   - Timo On 24/11/2018 22:18, Fernando Santagata wrote: > Hello, > > I think that I don't understand how the 'test' argument of 'dir' works. > I have a directory 'a

Re: sub name has unexpected interaction with s///

2018-10-23 Thread Timo Paulssen
"s() / b() / x()", but b and x aren't defined, so it errors out at the end of compilation. I hope that makes things a bit clearer   - Timo

Re: "put" vs "say"

2018-10-21 Thread Timo Paulssen
put is meant for machines, while say is meant for humans. this is implemented by having say call the .gist method and put calling the .Str method. Try using say and put on a list of a thousand elements or more and you'll see what I mean. HTH   - Timo On 21/10/2018 18:29, Parrot Raiser

Re: Testing Was: Appropriate last words

2018-10-21 Thread Timo Paulssen
ot you there, and not some random exception like "file not found". On 21/10/2018 10:32, Richard Hainsworth wrote: > How does this answer the question about testing? > > Ok so there is code, but where do I go to find what that code is? > Where in the Rakudo repo would I start look

Re: Testing Was: Appropriate last words

2018-10-21 Thread Timo Paulssen
https://docs.perl6.org/language/variables#index-entry-%24%2AEXIT this should help you get to where you want to be. Someone™ can feel free to open up a ticket on the doc repository that the routine page for exit doesn't have a link to or explanation of &*EXIT. HTH   - Timo

Re: Run tests only if a module is available

2018-10-11 Thread Timo Paulssen
I'd go with run-time loading and if the module doesn't exist, just "flunk" or "skip" or what Test.pm6 offers. Here's a link that explains checking if a module is installed and loading it if it is:     https://rakudo.org/post/lexical-require-upgrade-info Hope

Re: Use of the --output flag

2018-10-09 Thread Timo Paulssen
--output is for the compiler's compilation stages for example: > timo@schmand ~> perl6 --output=/tmp/outputtest --target=mbc -e 'say "hi"' > timo@schmand ~> moar --dump /tmp/outputtest | head > > MoarVM dump of binary compilation unit: > >

Re: bitwise or?

2018-10-05 Thread Timo Paulssen
h could either be [Z+]= or Z[+=]. On 06/10/2018 00:36, Trey Harris wrote: > > On Fri, Oct 5, 2018 at 8:33 AM Timo Paulssen t...@wakelift.de > <http://mailto:t...@wakelift.de> wrote: > > It's important to point out that inside metaoperators ("composed > op

Re: routine declaration line question

2018-10-05 Thread Timo Paulssen
You're probably thinking of ;; in a signature. On 05/10/2018 20:02, Trey Harris wrote: > But right now we have a situation where “everything within the > signature /except for/ the return constraint can participate in multi > dispatch”, which does feel weird. But is that actually true? > Something

Re: bitwise or?

2018-10-05 Thread Timo Paulssen
It's important to point out that inside metaoperators ("composed operators", "combined operators", ...) the [ ] are just for bracketing things together — sometimes it's needed to disambiguate, but you can put it in anyway to make things clearer. This has nothing to do with [+] 1, 2, 3, which is a

Re: routine declaration line question

2018-10-03 Thread Timo Paulssen
e time", but I felt i should really point it out before causing too much confusion. On 04/10/2018 03:07, ToddAndMargo wrote: > Hi All, > > In another thread, Timo wrote me: > >    The "-->" part of the signature is optional. If there isn't >    one, it d

Re: "temp" vs "my"

2018-10-03 Thread Timo Paulssen
you can refer to the outer $v as OUTER::('$v'), that ought to help :) On 03/10/2018 08:10, yary wrote: > Reading and playing with https://docs.perl6.org/routine/temp > > There's an example showing how temp is "dynamic" - that any jump > outside a block restores the value. All well and good. > > Th

Re: What are the official names?

2018-10-02 Thread Timo Paulssen
I just saw that this was already kind of answered in the other thread, sorry about that!

Re: What are the official names?

2018-10-02 Thread Timo Paulssen
t;. postcircumfix is kind of a combination of postfix and circumfix where there is one thing that the routine goes after, and another thing that the routine goes around. That's how you get @a[1]; the [ ] from the view of @a is a postfix and from the view of 1 is a circumfix. Hence, postcircumfix. Hope that helps   - Timo

Re: need doc help with []

2018-10-02 Thread Timo Paulssen
optional. If there isn't one, it defaults to Mu, which is the type that everything conforms to, i.e. the sub or method that either has "--> Mu" explicitly, or has it by leaving it out, may return absolutely whatever it wants. After all, the "-->" part is a constraint, and it gets validated at compile time every time a sub or method returns. > Yours in confusion, > -T Hope that helps a little   - Timo

Re: Could this be any more obscure?

2018-09-26 Thread Timo Paulssen
block at -e line 1 You aren't using [] there, you're just putting the strings and numbers inside the (), which is the difference that people are trying to explain, but not finding the right words to make you understand. Can you help us by explaining how you get from "every method takes [ ]" to "i'll try it with ()"? Perhaps some place wrongly claimed that () and [] are the same? That might require a bit of re-wording in the docs, then. Hope any of that helps   - Timo

Re: Ping Larry and Friends: Need NativeCall help

2018-09-18 Thread Timo Paulssen
painful. Hope that helps!   - Timo

Re: need p5/p6 :: help

2018-09-14 Thread Timo Paulssen
It's important for the PrintRed sub inside PrintColors to be declared "our", otherwise it is "my" scoped, i.e. limited to the lexical extent of the module file. On 14/09/2018 12:59, Todd Chester wrote: > Hi All, > > I am in the process of converting a YUGE program I wrote in > Perl 5 to Perl 6.  I

Re: I need -M help

2018-09-14 Thread Timo Paulssen
The equivalent of "use lib 'blah'" on the commandline is "-I blah", just like "-M bloop" is the equivalent of "use 'bloop'" in code. HTH   - Timo On 14/09/2018 12:52, Todd Chester wrote: > Hi All, > > With a one liner, how

Re: .new?

2018-09-14 Thread Timo Paulssen
get to the documentation of the class by that name, which explains what it is, how you get it, and how you use it. I'll file a bug for the "new" routine page. Hope that helps!   - Timo On 14/09/2018 12:30, Todd Chester wrote: > Hi All, > > What exactly is going on with .new?

Re: how do I do this index in p6?

2018-09-11 Thread Timo Paulssen
      in block at -e line 1 using ~~ instead of =:= should also be okay, or checking for definedness with either .defined or using "with" instead of "if", which is very useful especially for index and friends. HTH   - Timo

Re: Please explain this to me

2018-09-11 Thread Timo Paulssen
Class.new; $tc.test-method("hello"); $tc.test-method(1234); So you have the same name, but multiple candidates that have different signatures. Does that help?   - Timo

Re: Please explain this to me

2018-09-11 Thread Timo Paulssen
On 11/09/18 12:38, Curt Tilmes wrote: > > On Tue, Sep 11, 2018 at 6:27 AM ToddAndMargo > wrote: > > method ($a: @b, %c) {};       # first argument is the invocant > > > I might say rather that $a is a parameter for the invocant.  The @b > parameter holds all the p

Re: Please explain this to me

2018-09-11 Thread Timo Paulssen
syntax alone already tells you a lot about how a sub or method works. Since the signatures are so expressive, they can of course also be "a bit much" to understand, unfortunately. Hope that helps   - Timo

Re: Please explain this to me

2018-09-11 Thread Timo Paulssen
On 11/09/18 12:18, JJ Merelo wrote: > > > El mar., 11 sept. 2018 a las 12:15, Timo Paulssen ( <mailto:t...@wakelift.de>>) escribió: > > The colon at the end of "Str:D:" signifies that it's a type > constraint on what you call the method on. For

Re: Please explain this to me

2018-09-11 Thread Timo Paulssen
contain? Without having to look at the docs, I would expect $pos to mean the position in the string that should be checked for presence of the needle (as in: find a needle in a haystack). The return value isn't shown in this definition, but I'd say that's an oversight that should be

Re: "contains" beginning, end?

2018-09-07 Thread Timo Paulssen
It does not, but there are methods .starts-with and .ends-with that probably do what you need. HTH   - Timo On 08/09/18 02:00, ToddAndMargo wrote: > Hi All, > > Does "contains" have options for "at the start of" and > "at the end" of matches? > > > Many thanks, > -T

Re: A grammar to provide substitution

2018-08-29 Thread Timo Paulssen
I should point out that the trans method has a mode that lets you pass placeholders and substitutions and it will Do The Right Thing regarding overlaps and order and everything. On 29/08/18 16:21, Timo Paulssen wrote: > There's a problem with your code, if any of the substitutions

Re: A grammar to provide substitution

2018-08-29 Thread Timo Paulssen
There's a problem with your code, if any of the substitutions contains something that looks like the placeholder thing, and if it comes later in the iteration of the hash keys (which is randomized now) it will substitute again. This is very likely not what you want, though. HTH   - Timo On

Re: How do I test my substitutions?

2018-08-14 Thread Timo Paulssen
You're putting your starting string in a variable, $x, but aren't telling the s/// operator specifically what to operate on, so it defaults to $_, which is still at its default value. On 14/08/18 13:08, ToddAndMargo wrote: > Hi All, > > The Perl 5 guys have it pounded into my head that I > always

Re: I need the rules for running modules from the command line

2018-08-14 Thread Timo Paulssen
Please be aware that passing a folder with many files in it as the -I path will cause a tremendous slowdown when loading modules, since it goes through the whole file hierarchy starting at that path. If /home/linuxutil is actually a typical home folder with dotfiles and documents and what have you,

Re: I need the rules for running modules from the command line

2018-08-14 Thread Timo Paulssen
gh. perl6 -Ilib -MPrintColors -e 'PrintBlue( "Blue\n");' should do what you meant to do. HTH   - Timo On 14/08/18 12:01, ToddAndMargo wrote: > Hi All, > > > I presume this is failing as the current directory is not > in the "lib" path: > > &

  1   2   3   4   >