Re: rmdir question

2019-12-03 Thread Timo Paulssen
On 03/12/2019 04:46, Paul Procacci wrote: > On success it return a Bool::True. > On failure it throws an exception. > It doesn't crash the program. > If you are interested in handling the exception, add logic to handle it. > > Examples: > --- > # mkdir a ; `which perl6` -e

Re: Quoting issue in Windows

2019-11-30 Thread Timo Paulssen
On 30/11/2019 09:05, ToddAndMargo via perl6-users wrote: > One of the weirdest was > > for @Result.kv -> $I, $Line { >    if $I % 2 = 0 > > being told I could not change an immutable object. Here you're trying to assign 0 to the result of $I % 2, if that's actually exactly the code. You want

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

2020-03-05 Thread Timo Paulssen
Hi William, The line that has the important difference is where you put a `my` in front of `%stash{'monsters'} = @monsters`. Probably a copy-paste error or something like that. >> my %stash> {}>> my @monsters = <> fingfangfoom>> tingler>>> [godzilla grendel wormface blob fingfangfoom tingler]>>

Re: Question about Blob and Buf

2020-02-11 Thread Timo Paulssen
On 11/02/2020 10:56, David Santiago wrote: > Hi! > > Can someone explain me why this doesn't work: > > my Blob $read; > $read ~= $socket.read(1024); > > Dies with error: > > X::Buf::AsStr: Cannot use a Buf as a string, but you called the Stringy > method on it > > This also doesn't work: > > my

Re: Question about Blob and Buf

2020-02-11 Thread Timo Paulssen
On 11/02/2020 14:14, David Santiago wrote: > Awesome explanation! Thank you! > > BTW, >> my Blob $read = Buf.new; > Is it creating either a Blob or a Buf? > > Regards, > David Santiago Hi David, "my Blob $read" will define the variable $read to 1) only accept things that typecheck against

Re: printf question

2020-02-10 Thread Timo Paulssen
Hi Paul and Todd, just a little extra info: the limitation for nameds to come after positionals is only for declarations of signatures. Usage of subs/methods as well as capture literals (which you don't use often, i imagine, so feel free to disregard) allow you to mix nameds and positionals

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

Re: subst :g and captures in the replacement

2020-04-19 Thread Timo Paulssen
Hi Yary, in the first example you've got a WhateverCode, but in the second one you're actually just passing a string to subst, i.e. you're evaluating $0 before subst is even called. Check this as well: > raku -e '"whoa" ~~ /(.)/; say \'fosdffgg\'.subst(/(f+)/,"( $0 )", :g)' > ( w )osd( w )gg

Re: fill in form

2020-05-13 Thread Timo Paulssen
00:47, ToddAndMargo via perl6-users wrote: > >> Hi All, > >> > >> I want to create a fill in form in Windows: city, > >> state, etc., you fill in the data. > >> > >> Is there some library out there for that? > >> > >> Any w

Re: fill in form

2020-05-12 Thread Timo Paulssen
Hi Todd, normally I'd expect you want to create a grid with labels on the left and text inputs on the right. the examples/ folder in the GTK::Simple distribution (or the source on github) has an example of the Grid class, which is very powerful. The grid is possibly more complicated than you

Re: NativeCall questions

2020-05-08 Thread Timo Paulssen
Hi David, the first thing that catches my eye is that your struct and the class have the members switched around, so you're already almost guaranteed to read a bogus pointer when trying to get the data. Also, please note that returning structs directly, or passing structs directly, as arguments

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

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

2020-10-10 Thread Timo Paulssen
On 10/10/2020 23:21, William Michels via perl6-users wrote: > So I guess the first question I have is whether the 'auto-joining' of > array elements is specc'ed or not. > > What you seem to be saying is that when calling a function on an > array, the first response is for Raku to call something

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

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

2020-08-08 Thread Timo Paulssen
Hi Fernando, do you happen to have the exact error message? The simplest search through the zef source didn't find anything related, so perhaps it was actually "too many open files" caused by a too-low limit on open file descriptors? `ulimit -a` on my system gives me `Maximum number of open file

Re: junctions and parenthesis

2020-06-24 Thread Timo Paulssen
On 22/06/2020 20:12, Joseph Brenner wrote: > > Speculating wildly: could there be a need for a different type of > function with different precedence? I would suggest calling .any on the list, that gives you just the tight preference you want; even if there were no .any method available on the

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

Re: Metamodel parent and return values ...

2020-10-30 Thread Timo Paulssen
On 30/10/2020 07:58, Paul Procacci wrote: Here is what I have ... trimmed. # use JSON::Pretty; use Staticish; unit class MyClass is Static; method client(::?CLASS:D: Str:D $service! --> MyClass) {         my %data := from-json

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/2021 16:48,

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 Chantreux wrote: hello rakoons, I

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

<    1   2   3