Re: thread behavior

2017-09-04 Thread JuhiMarcel LangbroekTimmerman
Hi liz, Thanks for your anwer. I assume there are a few things I can rely on; - the main thread is where the code starts and will always have id 1 - a continuation of statements/blocks will always be excecuted on the same thread except for those hyper thingies which are again separate blocks or

Re: How to I create a file?

2017-03-22 Thread JuhiMarcel LangbroekTimmerman
As a side note I would test for existence only using .e because a directory could exist by that same name. Method .f would return False following an attempt to create a file which will fail. Marcel On March 21, 2017 12:28:13 Philip Hazelden wrote: $PathAndName.IO.f or $PathAndName.IO.open(

Re: RFE: throw an error on a single "="when used in an "if"

2017-03-18 Thread JuhiMarcel LangbroekTimmerman
Hi, This is the same behaviour you can find in perl5 and is not a flaw. It is an assignment just before testing. So $x gets the value of $y and then test which becomes True. This can also be very covenient when e.g calling a sub, then assign to a value then test like below in a while; while

Re: Fwd: Re: Variables in modules

2017-03-15 Thread JuhiMarcel LangbroekTimmerman
st my $TheValue = $?FILE.subst(/.* "/"/, "" :g); near the top of your module? Hi Timo, Because it gives you "Use of uninitialized value $TheValue" when you go to use it inside one of the "is export" subs :'( Many thanks, -T On 03/13/2017 02:

Re: Fwd: Re: Variables in modules

2017-03-13 Thread JuhiMarcel LangbroekTimmerman
now we are at it, for readability perhaps instead of substitutes do, my $thevalue = $?FILE.IO.basename; Marcel On March 10, 2017 10:32:43 PM Theo van den Heuvel wrote: Not with me it doesn't. my $TheValue = $?FILE.subst(/.* "/"/, "", :g); sub sayfn is export { $TheValue.say } Could some

Re: [perl #128404] @list.permutations errors out if @list has a single element

2016-06-16 Thread JuhiMarcel LangbroekTimmerman
Hi, Shouldn't you do the following; add a comma to force a list (can't test it here in the pub though ;-) my @list = 1, ; marcel On June 15, 2016 05:35:46 Rob Hoelz (via RT) wrote: # New Ticket Created by Rob Hoelz # Please include the string: [perl #128404] # in the subject line of

Re: Blobs and IEEE floating point

2016-04-18 Thread JuhiMarcel LangbroekTimmerman
Hi Kevin I've made something up for the time being. You can find it in the BSON module. Look for the file lib/Document.pm6 and the subs encode-double and decode-double. This code must be rewritten though for speed but at least it works. Marcel P.s. I've seen that not all comments in the pro

Re: Union

2016-04-11 Thread JuhiMarcel LangbroekTimmerman
Hi David, Thanks very much for your code, I will try it when I get home at the end of the week although I only have little endian Intell chips. I will have to look around for others. Btw, are there still chips storing big endian paired in two bytes? So your example number would become 0x23, 0x

Re: [perl #127856] LTA error message when declaring variables without a space between “my” and parens (my($test);)

2016-04-09 Thread JuhiMarcel LangbroekTimmerman
Hi My previous interpretation of the error was wrong, its just about a function called my having an argument $test which is not declared. The if(1) gave another message becaouse 1 was parsed and evaluated right, but try if($test) and it should give the same error. Regards, Marcel On April

Re: [perl #127856] LTA error message when declaring variables without a space between “my” and parens (my($test);)

2016-04-08 Thread JuhiMarcel LangbroekTimmerman
Hi, Perhaps the error is caused by the assignment wanting to store 42 at the address of $test, which is not there yet. See also doc about 'sub () is rw { ••• }'. Look for rw traits! Furthermore, to declare and assign more variables use (my $a, my $b) = ( 42, 43); Greetings Marcel On Apr

Re: [perl #109586] .pick on a large range needs more entropy

2016-04-07 Thread JuhiMarcel LangbroekTimmerman
Hi, For the dropped leading zeros try .fmt('%064b') Greetings Marcel On April 7, 2016 6:53:44 PM "Matthew Wilson via RT" wrote: 12:52 < diakopter> m: say (^2**64).pick.fmt('%64b') 12:52 <+camelia> rakudo-moar 61d231: OUTPUT« 11100101000101110001110100