Re: classes and objects questions

2020-12-15 Thread WFB
JJ may be right about the OO thing, but it makes the > tutorial pretty much useless. How "class" and "object" > *relate* to Raku needs to be explained. > When we are talking about describing Classes and Objects in a few words, then I agree. Searching on the web reveals lots of tutorials for Java,

Re: classes and objects questions

2020-12-14 Thread WFB
Hi ToddAndMargo, Thanks for the effort to improve the Raku docs. However, this is a Raku not OO (Object Oriented ) related tutorial. As JJ already pointed out, these pages are to show the reader how you get things done in Raku, not what OO

Re: Access violation when creating class instance

2020-06-25 Thread WFB
Not reproducible with raku star 2020.05.1 \o/ Thanks for the help On Thu, 25 Jun 2020 at 09:23, WFB wrote: > Uh, thanks Will!! > > On Thu, 25 Jun 2020 at 01:16, Will Coleda wrote: > >> The download page requires an update. You can get 2020.05.1 here: >> >> htt

Re: Access violation when creating class instance

2020-06-25 Thread WFB
Uh, thanks Will!! On Thu, 25 Jun 2020 at 01:16, Will Coleda wrote: > The download page requires an update. You can get 2020.05.1 here: > > https://rakudo.org/downloads/star/ > > On Wed, Jun 24, 2020 at 6:11 AM WFB wrote: > > > > Thanks JJ, > > > > I am

Re: Access violation when creating class instance

2020-06-24 Thread WFB
from C code handling some Windows stuff. On Wed, 24 Jun 2020 at 10:13, JJ Merelo wrote: > > > El mié., 24 jun. 2020 a las 10:05, WFB () > escribió: > >> Hi all, >> >> I have an access violation on Windows for one of my classes and think it >> is

Access violation when creating class instance

2020-06-24 Thread WFB
Hi all, I have an access violation on Windows for one of my classes and think it is a bug, but not entirely sure about that. Every now and then creating a class instance ended my script with error: Process finished with exit code -1073741819 (0xC005) The class looks like that: class Knowled

Re: fill in form

2020-05-12 Thread WFB
Years ago I played around with qt and GTK::Simple. It works fine, but the installation process on Windows is poor, to say at least. It might be not better, but you could use the PowerShell to show a GUI and store something in a txt file you then parse. On Tue, 12 May 2020 at 10:22, ToddAndMargo vi

Re: Raku -npe command line usage

2020-05-08 Thread WFB
ay 8, 2020 at 5:49 PM yary wrote: >> >> >> >> >> >> All good ideas so far, in the "more than one way to do it" spirit, >> can use "state" instead of "my", since state only initializes 1st time it's >> hit. >> >> >

Raku -npe command line usage

2020-05-08 Thread WFB
Hi, I am trying to write an one-liner to go through all lines in a logfile and look for an certain key word, store the line and sort them before printing them out. My approach was: raku -ne "BEGIN {my @i }; @i.push($_); if $_ ~~ /^WARN/; END { @i.sort.say }" That does not work because @i does not

Re: printf question

2020-02-11 Thread WFB
the %*SUB-MAIN-OPTS > hash, which you will also need to create. There's an example in that doc > page. > > Kevin. > > On Tue, 11 Feb 2020 at 20:07, WFB wrote: > >> Interesting stuff. >> I would like to take the change and ask one question: >> One thing, I h

Re: printf question

2020-02-11 Thread WFB
Interesting stuff. I would like to take the change and ask one question: One thing, I had to get used to is the MAIN handling of parameters. On the command line it is important to write then named parameter in front of the positional ones: MAIN('compile', :$verbose, :$test-only) needs to write: bui

Re: Bug to report: cardinal called an integer

2020-01-12 Thread WFB
Hi Todd, For years, I have been playing around with programming stuff. I never stumbled across the term "cardinal". Its obvious that I am not an native English speaker and it does not hurt to learn new stuff. But, you makes it harder to understand your problems if you not use the common jargon. R

Re: int and Str in sub declaration question

2020-01-08 Thread WFB
For the sake of readability you might want use a subset: https://docs.raku.org/language/typesystem#subset On Thu, 9 Jan 2020 at 08:13, WFB wrote: > Hi, Todd, > > If I understand your question right, then you mean something like that: > > sub do-soemthing($value where { .WHAT

Re: int and Str in sub declaration question

2020-01-08 Thread WFB
Hi, Todd, If I understand your question right, then you mean something like that: sub do-soemthing($value where { .WHAT ~~ Str || .WHAT ~~ Int }) {} https://docs.raku.org/type/Signature#index-entry-where_clause Regards On Thu, 9 Jan 2020 at 03:58, ToddAndMargo via perl6-users < perl6-us...@per

Re: type?

2020-01-08 Thread WFB
Hi Todd, dd or .WHAT will give you that information. dd $i; say $i.WHAT; Greetings On Thu, 9 Jan 2020 at 03:58, ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > Hi All, > > Is there a way to ask a variable what "type" it is? > > Many thanks, > -T >

Re: Request for Enhancement: Native Call error

2020-01-07 Thread WFB
83124F923A6BF6F8D76B > >> (NativeCall) line 587 in sub WinReadRegKey at > >> K:\Windows\NtUtil\WinReg.pm6 (WinReg) line 177 in block at -e > >> line 1 > >> > >> > >> "references a native integer, but got P6int" is NOT REALLY HELPFUL.

Re: Request for Enhancement: Native Call error

2020-01-01 Thread WFB
Hi Todd, Sounds like in WinReg.pm6 line 177 is a definition like : sub RegOpenKeyExW( DWORD, WCHARS, DWORD, DWORD, DWORD is rw) is native("Kernel32.dll") returns DWORD { * }; and you put a "my $i = 0" variable instead of "my int32 $i = 0" in it somewhere. Greetings, Wolf On Wed, 1 Jan 2020 at 03

Re: null and native call question

2019-12-29 Thread WFB
Hi Todd, I am curious, what was the problem? I tried 0 in the first place and the script died. Though it has something to do with the 0 but obviously it has not. On Sun, 29 Dec 2019 at 10:31, ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2019-12-29 00:28, ToddAndMargo via perl6

Re: how do I read registry key?

2019-12-27 Thread WFB
be *NULL*. In your code there is a 1 given. Unfortunately, just a 0 does not helped. Here, I have no idea how a NULL is given. Regards, Wolf On Fri, 27 Dec 2019 at 08:22, WFB wrote: > I would love to look into that, however, my son needs all my free time and > I do have very little knowl

Re: how do I read registry key?

2019-12-26 Thread WFB
I would love to look into that, however, my son needs all my free time and I do have very little knowledge about NativeCall. I hope I will find time in the next days to learn more of this stuff, but I will not much help :-( On Fri, 27 Dec 2019 at 07:31, ToddAndMargo via perl6-users < perl6-us...@

Re: My pop ups for windows module

2019-12-26 Thread WFB
Hi Todd, I refactored your code a bit to make it a bit more readable IMHO. Thinking on publish it on modules.raku.org if you are not interested to do so. #`{ Reference: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-messagebox https://stackoverflow.com/questions/591

Re: how do I read registry key?

2019-12-25 Thread WFB
On Wed, 25 Dec 2019 at 23:10, ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > Hi All, > > Windows > > > https://docs.microsoft.com/en-us/windows/win32/sysinfo/retrieving-data-from-the-registry > > How do I use this to read retrieve a value of a registry key? > > Many thanks, > -T >

Re: Multibyte string in Windows command line

2018-09-17 Thread WFB
fter that there won't be a reason > to do the dance I described earlier. > > The following should just work in the next release. > > run $install-file, :out, :enc > > On Thu, Sep 13, 2018 at 11:23 PM WFB wrote: > > > > Never mind. .lines gives ba

Re: Multibyte string in Windows command line

2018-09-13 Thread WFB
Never mind. .lines gives back Str and thus .encode is needed... Thanks again On Fri, 14 Sep 2018 at 06:20, WFB wrote: > @Andreas Thanks, I was thinking to do that with regex by myself, but that > would be a ugly workaround and only as a last resort. > > @Brad: Cool, thanks, I got t

Re: Multibyte string in Windows command line

2018-09-13 Thread WFB
n1').decode('utf16')) -> $line { Why .encode? I would assume the IO::Handle is allready given back latin-1 because of the :enc<"latin-1"> in the Run command. On Thu, 13 Sep 2018 at 18:20, Brad Gilbert wrote: > On Thu, Sep 13, 2018 at 7:22 AM WFB wrote: > &g

Re: Multibyte string in Windows command line

2018-09-13 Thread WFB
t; your program in a textfile (from within the command interpreter: > cmd.exe): > > c:\> install.exe > x.txt > > and the 'hex' your x.txt.. > > A. > > > On 13.09.18 14:21, WFB wrote: > > Hi all, > > > > My perl6 runs an executab

Multibyte string in Windows command line

2018-09-13 Thread WFB
Hi all, My perl6 runs an executable and prints its output. This output is printed as multibyte string. I assume the executable gives back a multibyte string and perl6 interpret its as one byte string for whatever reasons. I tried Run with different encodings like windows-1251, utf16 and so on. No

Re: ctxlexpad needs an MVMContect

2017-08-03 Thread WFB
Well spotted. I totally muss that. However, that was not the only mistakes I did. Another problem is to use # commentaries in grammars. Which causes also the exception. Thanks for the help! On 4 August 2017 at 08:22, yary wrote: > Is this line intentional? > > token trid { } > > > it look

ctxlexpad needs an MVMContect

2017-08-03 Thread WFB
Hi all, I am writing a script to compare to text file. More precisely, certain data is compared not line by line. To find this information I use grammars. At the beginning it worked great. But then, my script hangs. Started with the debugger perl6-debug-m I got this exception: Unhandled exception

Re: [perl #88674] \n should be 0x0d 0x0a on win32

2015-10-09 Thread WFB
hmm. \r\n is not a Perl5 compatibility issue. WIndows uses \r\n by default while \r is used on Linux and Mac. So, you have to convince Microsoft to change WIndows behavour not Perl :-) greetings wolf On 8 October 2015 at 17:49, Yasuhiro Matsumoto via RT < perl6-bugs-follo...@perl.org> wrote: > O