Re: New doc site

2023-02-27 Thread yary
Really liking the look of the site and responsiveness of the search bar- first impression  -y On Mon, Feb 27, 2023 at 10:54 AM Will Coleda wrote: > Embarrassing! > > Thanks for catching that, thankful she got it right in the weekly! > > > On Mon, Feb 27, 2023 at 8:51 AM Marcel Timmerman

Re: New doc site

2023-02-27 Thread Will Coleda
Embarrassing! Thanks for catching that, thankful she got it right in the weekly! On Mon, Feb 27, 2023 at 8:51 AM Marcel Timmerman wrote: > > On 27-02-2023 01:08, Will Coleda wrote: > > Since I know not everyone is on IRC: > > > > The updated raku.docs.org site is now live! Big thanks to

Re: New doc site

2023-02-27 Thread Marcel Timmerman
On 27-02-2023 01:08, Will Coleda wrote: Since I know not everyone is on IRC: The updated raku.docs.org site is now live! Big thanks to everyone who helped make this happen! If you find any issues please let me know at https://github.com/raku/doc/issues - content

New doc site

2023-02-26 Thread Will Coleda
Since I know not everyone is on IRC: The updated raku.docs.org site is now live! Big thanks to everyone who helped make this happen! If you find any issues please let me know at https://github.com/raku/doc/issues - content https://github.com/raku/doc-website/issues - site, search, styling,

The SF Perl Raku Study Group, 02/26 at 1pm PDT

2023-02-23 Thread Joseph Brenner
"We live surrounded by a chaos of undifferentiated factoids and half-formed allusions, and in the absence of convincing structural links, we rely on, search for, or imagine flashes, intuitions, hovering conceptual affinities, and hyperbolic recurrences that can be explained only by

Re: Upcoming documentation meetings

2023-02-11 Thread Will Coleda
Team - I missed the call! My back has been troubling me the last day after traveling for business this week and I spent the day unplugged and half asleep. I’ll do a write up of what I’ve been working on recently and post it on the wiki. Thanks to everyone who has been working on getting us to

The SF Perl Raku Study Group, 02/12 at 1pm PDT

2023-02-09 Thread Joseph Brenner
Samuel Taylor Coleridge, "The Destiny of Nations" (1817): "But some there are who deem themselves most free When they within this gross and visible sphere Chain down the winged thought, scoffing ascent, Proud in their meanness; and themselves they cheat With noisy emptiness of

Re: Upcoming documentation meetings

2023-02-06 Thread Polgár Márton
Hey, you thought right! We were just doing a little testing (or at least offered to do) so that functionality concerns can be checked. By the way, I brought up the example of the Rakudo classes were Jitsi kind of failed us and the second occasion was moved to Zoom. It could be that something

Re: Upcoming documentation meetings

2023-02-06 Thread Richard Hainsworth
I thought it was for 2nd Saturday, which is the 11-th On 04/02/2023 23:13, Ralph Mellor wrote: That's super short notice but if you mean EST, so 5pm UK time, it would work for me. On Fri, Feb 3, 2023 at 7:07 PM Will Coleda wrote: I can do a test tomorrow at noon if there's interest. On Fri,

Re: Upcoming documentation meetings

2023-02-04 Thread Ralph Mellor
D'oh. Time for sleep. Hopefully see or hear y'all next Sat. On Sat, Feb 4, 2023 at 11:21 PM Will Coleda wrote: > > Yes, Eastern- but the time had already passed, sorry. > > On Sat, Feb 4, 2023 at 18:13 Ralph Mellor wrote: >> >> That's super short notice but if you mean EST, so 5pm UK time, >>

Re: Upcoming documentation meetings

2023-02-04 Thread Will Coleda
Yes, Eastern- but the time had already passed, sorry. On Sat, Feb 4, 2023 at 18:13 Ralph Mellor wrote: > That's super short notice but if you mean EST, so 5pm UK time, > it would work for me. > > On Fri, Feb 3, 2023 at 7:07 PM Will Coleda wrote: > > > > I can do a test tomorrow at noon if

Re: Upcoming documentation meetings

2023-02-04 Thread Ralph Mellor
That's super short notice but if you mean EST, so 5pm UK time, it would work for me. On Fri, Feb 3, 2023 at 7:07 PM Will Coleda wrote: > > I can do a test tomorrow at noon if there's interest. > > On Fri, Feb 3, 2023 at 10:27 AM Parrot Raiser <1parr...@gmail.com> wrote: > > > > I think I had

Re: Upcoming documentation meetings

2023-02-04 Thread Will Coleda
Ok,we joined at noon eastern but only two of us were there. We'll see folks next week! On Fri, Feb 3, 2023 at 2:06 PM Will Coleda wrote: > > I can do a test tomorrow at noon if there's interest. > > On Fri, Feb 3, 2023 at 10:27 AM Parrot Raiser <1parr...@gmail.com> wrote: > > > > I think I had

Re: Upcoming documentation meetings

2023-02-03 Thread Will Coleda
I can do a test tomorrow at noon if there's interest. On Fri, Feb 3, 2023 at 10:27 AM Parrot Raiser <1parr...@gmail.com> wrote: > > I think I had problems finding the audio options on Jitsi, and wasted > a couple of meetings doing so. I'd suggest a "test" setup meeting, > where the whole agenda

Re: Upcoming documentation meetings

2023-02-02 Thread Elizabeth Mattijsen
> On 2 Feb 2023, at 21:11, Ralph Mellor wrote: > My internet is flakey when humidity is around 80%+ and the weather > forecast suggests it may be but with luck I'll be "there" 5pm UK time > (noon EST, 9am US west coast time) Saturday Feb 11. If you switch off your camera, you will reduce the

Re: Upcoming documentation meetings

2023-02-02 Thread Ralph Mellor
On Thu, Feb 2, 2023 at 6:10 AM Bruce Gray wrote: > > On Feb 1, 2023, at 6:00 PM, Elizabeth Mattijsen wrote: > >> On 2 Feb 2023, at 00:53, Ralph Mellor wrote: > >> It required an international phone call. > > ??? I've never had to make *any* phone call to be able to use Jitsi. > To clarify,

Re: Upcoming documentation meetings

2023-02-01 Thread Bruce Gray
> On Feb 1, 2023, at 6:00 PM, Elizabeth Mattijsen wrote: > >> On 2 Feb 2023, at 00:53, Ralph Mellor wrote: >> I looked at Jitsi when vrurg suggested it for their Core class. >> It required an international phone call. > > ??? I've never had to make *any* phone call to be able to use Jitsi.

Re: Upcoming documentation meetings

2023-02-01 Thread Elizabeth Mattijsen
> On 2 Feb 2023, at 00:53, Ralph Mellor wrote: > I looked at Jitsi when vrurg suggested it for their Core class. > It required an international phone call. ??? I've never had to make *any* phone call to be able to use Jitsi. And the RSC uses it every 2 weeks or so. Liz

Re: Upcoming documentation meetings

2023-02-01 Thread Ralph Mellor
On Tue, Jan 24, 2023 at 9:50 PM Polgár Márton wrote: > > Since there is a public Jitsi link, I don't think this would get cancelled > because of personal problems. This is my "unofficial opinion" but I > think whether the proposed dates (noon Eastern time, second > Saturday of February, March an

Re: `lines.contains( / \h / )` returning True for input strings not containing horizonal whitespace

2023-01-28 Thread Elizabeth Mattijsen
lines.contains... is really short for: lines.Str.contains... Do you then understand what's going on? > On 28 Jan 2023, at 21:41, William Michels via perl6-users > wrote: > > Some more examples: > > ~$ raku -e 'put "1\n2\n3";' | raku -e 'lines.contains(/ \h /).put;' > True > ~$ raku -e 'put

Re: `lines.contains( / \h / )` returning True for input strings not containing horizonal whitespace

2023-01-28 Thread William Michels via perl6-users
Some more examples: ~$ raku -e 'put "1\n2\n3";' | raku -e 'lines.contains(/ \h /).put;' True ~$ raku -e 'put "1\02\03";' | raku -e 'lines.contains(/ \h /).put;' False ~$ raku -e 'put "1\02\03";' | raku -e 'lines.contains(/ 12 /).put;' False ~$ raku -e 'put "1\02\03";' | raku -e 'lines.contains(/

The SF Perl Raku Study Group, 01/29 at 1pm PDT

2023-01-26 Thread Joseph Brenner
George Sand to Gustave Flaubert, November 29th, 1866: "I have never ceased to wonder at the way you torment yourself over your writing. Is it just fastidiousness on your part? There is so little to show for it... As to style, I certainly do not worry myself, as you do, over

Re: `lines.contains( / \h / )` returning True for input strings not containing horizonal whitespace

2023-01-26 Thread William Michels via perl6-users
Thanks Sean. Made some progress. I like this result better: ~$ raku -e 'put "1\n2\n3";' | raku -e 'lines.map(*.contains(/ \h /)).put;' False False False Thx, Bill. On Thu, Jan 26, 2023 at 12:12 PM Sean McAfee wrote: > On Thu, Jan 26, 2023 at 12:05 PM William Michels via perl6-users < >

Re: `lines.contains( / \h / )` returning True for input strings not containing horizonal whitespace

2023-01-26 Thread Sean McAfee
On Thu, Jan 26, 2023 at 12:05 PM William Michels via perl6-users < perl6-users@perl.org> wrote: > ~$ raku -e 'put "1\n2\n3";' | raku -e 'put lines.contains(/ \h /) ?? True > !! False;' > True > lines() returns a Seq. The contains method for a Seq coerces its argument to a Str and calls contains

`lines.contains( / \h / )` returning True for input strings not containing horizonal whitespace

2023-01-26 Thread William Michels via perl6-users
Hi, I'm seeing an issue where I try to write parallel code between `slurp` and `lines`, expecting that when I feed each one-liner a string with vertical whitespace (but not horizontal whitespace), the two methods will be differentiated--since lines autochomps by default. ~$ raku -e 'put

Upcoming documentation meetings

2023-01-24 Thread Polgár Márton
Hi, since the broader topic of Raku documentation came up on a SF Raku Study Group meeting - and there have been various important news since - it seems fitting to announce the planned schedule for the next couple of documentation meetups, as it became publicly available at

The SF Perl Raku Study Group, 01/15 at 1pm PDT

2023-01-10 Thread Joseph Brenner
"Hermes the messenger helps us glimpse the powerful archetypal connections between magic, tricks, and technology. But the god does not bloom into a genuine Promethean technomage until he heads south, across the wine dark sea, to Egypt. Here, in the centuries before the birth of Jesus, the

Re: $/ not always set after a regex match?

2023-01-02 Thread Vadim Belman
There are little known operators `andthen`, `orelse`, `notandthen` (I always forget about the latter one too). What you are looking for would be: given $s { m/ $=\w+ / andthen ..say } Or, if you want a named variable: given ("aaa") { (my $m = m/$=\w+/) andthen $m..say } Best regards, Vadim

Re: $/ not always set after a regex match?

2023-01-02 Thread yary
I like statement modifiers, though not so much using side-effect variables set by a postfix modifier, I'd like to see the side effect before seeing the variable it sets. Something like / .+ / && put "The root of $_ is $/."; though the discussion is about not setting $/ in the caller's context

Re: $/ not always set after a regex match?

2022-12-31 Thread Vadim Belman
A side effect is a side effect, it's something we cannot generally predict and must not rely upon. Besides, that effect is caused by a regex which is a separate entity on its own. The primary point is that your sequence objects gets `.sink` method invoked on it because the object itself is,

Fwd: $/ not always set after a regex match?

2022-12-31 Thread William Michels via perl6-users
RESENDING: The code examples below should read `` in all cases, not ``, although either works (erroneously?). --- Interested in answering the question: WHICH CODE EXAMPLE IS THE PRETTIEST? Vote for your favorite (or post your own): [#] > #REPL (line numbers altered to

Re: $/ not always set after a regex match?

2022-12-31 Thread William Michels via perl6-users
Interested in answering the question: WHICH CODE EXAMPLE IS THE PRETTIEST? Vote for your favorite (or post your own): [#] > #REPL (line numbers altered to differentiate) Nil [0] > $_ = 'gracefully' gracefully [1a] > put "The root of $_ is $/." if / .+ /; The root of gracefully is graceful.

Re: $/ not always set after a regex match?

2022-12-30 Thread Sean McAfee
On Fri, Dec 30, 2022 at 4:12 PM The Sidhekin wrote: > On Fri, Dec 30, 2022 at 8:51 PM Vadim Belman wrote: > >> It is not "untrue". The sequence you produced goes nowhere. Thus the sink >> context. >> > > "Sink context" is true. > > "Useless use" is debatable, at least. > It's not useless

Re: $/ not always set after a regex match?

2022-12-30 Thread The Sidhekin
On Fri, Dec 30, 2022 at 8:51 PM Vadim Belman wrote: > It is not "untrue". The sequence you produced goes nowhere. Thus the sink > context. > "Sink context" is true. "Useless use" is debatable, at least. Eirik

Re: $/ not always set after a regex match?

2022-12-30 Thread Vadim Belman
It is not "untrue". The sequence you produced goes nowhere. Thus the sink context. Best regards, Vadim Belman > On Dec 30, 2022, at 11:08 AM, Sean McAfee wrote: > > Ah, got it, thanks. > > It's mildly vexing, but the kind of side-effecty coding I described isn't a > great idea in general.

Re: $/ not always set after a regex match?

2022-12-30 Thread Sean McAfee
Ah, got it, thanks. It's mildly vexing, but the kind of side-effecty coding I described isn't a great idea in general. I only stumbled across the phenomenon while code golfing. As a side note, code like this: sub f { 1 ... * ~~ /9/; $/ } ...produces an untrue warning "Useless use of ... in

Re: $/ not always set after a regex match?

2022-12-30 Thread Vadim Belman
I guessed this answer. :) It makes it extra typing and some linenoise. So, I wouldn't be really happy about it. Use of `with` would be less cumbersome, actually. So `with $s ~~ /.../ { . }`. Or `$s ~~ /.../ andthen .`. The "extra typing issue" is not gone in this case, but the code clarity

Re: $/ not always set after a regex match?

2022-12-30 Thread Elizabeth Mattijsen
if $s ~~ /$=[\w+]/ -> $/ { say $ } > On 30 Dec 2022, at 03:54, Vadim Belman wrote: > > Optimizations, yes... But then, how could we not use code like `if $s ~~ > /$=[\w+]/ { say $ }`? > > Speaking of the subject itself, I don't remember how sequences are actually > implemented in details,

Re: $/ not always set after a regex match?

2022-12-29 Thread Vadim Belman
Optimizations, yes... But then, how could we not use code like `if $s ~~ /$=[\w+]/ { say $ }`? Speaking of the subject itself, I don't remember how sequences are actually implemented in details, but most likely the regex is processed inside the sequence iterator which owns the $/ used by the

Rakudo CoreDev Class, session 2

2022-12-28 Thread Vadim Belman
Dear rakoons, Since I have a Zoom meeting allocated for the class, the previously announced schedule for the second session remains the same: Jan 7, 2022. A bit more details can be found in a reddit post here: https://www.reddit.com/r/rakulang/comments/zxsmvy/rakudo_coredev_class_session_2

Re: $/ not always set after a regex match?

2022-12-28 Thread Elizabeth Mattijsen
Yes, for that code it would have to. But that code pattern is really from Perl, and predates `with`. $ raku -e 'say .Str with 9 ~~ /9/' 9 And I think that is what we should be teaching people to use, rather than depend on the magic lexical $/. Liz > On 28 Dec 2022, at 21:37, William Michels

Re: $/ not always set after a regex match?

2022-12-28 Thread William Michels via perl6-users
Doesn't it have to? At least for the following case? [0] > #REPL Nil [0] > say $/.Str if 9 ~~ /9/; 9 Best regards. --B On Wed, Dec 28, 2022, 09:49 Elizabeth Mattijsen wrote: > That's because it at one time was decided that smart-match would set $/ in > the caller's scope. Which is a pain for

Re: $/ not always set after a regex match?

2022-12-28 Thread Elizabeth Mattijsen
That's because it at one time was decided that smart-match would set $/ in the caller's scope. Which is a pain for implementation and optimizations. I would be very much in favour of getting rid of that "feature", fwiw. > On 28 Dec 2022, at 18:45, Sean McAfee wrote: > > But if a sequence

Re: $/ not always set after a regex match?

2022-12-28 Thread Sean McAfee
But if a sequence has its own $/, why does * ~~ /9/ set $/? Actually it's not just sequences, as a little more experimentation showed: [0] > first /9/, ^Inf 9 [1] > $/ Nil [2] > grep /9/, ^10 (9) [3] > $/ Nil The * ~~ "trick" sets $/ in these cases too. On Wed, Dec 28, 2022 at 12:01 PM

Re: $/ not always set after a regex match?

2022-12-28 Thread Elizabeth Mattijsen
This isn't specific to the REPL: $ raku -e 'say 1 ... /9/; say $/' (1 2 3 4 5 6 7 8 9) Nil I can only assume that the sequence has its own scope for $/, and thus isn't visible outside of it. Liz > On 28 Dec 2022, at 16:47, Sean McAfee wrote: > > In a fresh 2022.12 Raku REPL, when the

$/ not always set after a regex match?

2022-12-28 Thread Sean McAfee
In a fresh 2022.12 Raku REPL, when the endpoint of a sequence is a Regex, the $/ variable seems not to be set: [0] > 1 ... /9/ (1 2 3 4 5 6 7 8 9) [1] > $/ Nil If I match more explicitly using a WhateverCode, it works: [2] > 1 ... * ~~ /9/ (1 2 3 4 5 6 7 8 9) [3] > $/ 「9」 Is this the intended

The SF Perl Raku Study Group, 01/01 at 1pm PDT

2022-12-23 Thread Joseph Brenner
"Looking up at the purple panorama of the galaxy highway, a shooting star pierces my heart" -- "Macross 7" (1994), "Seventh Moon" by Fire Bomber, The Raku Study Group. January 1st, 2023 1pm in California, 9pm in the UK An informal meeting: drop by when you can, show us what you've got,

The SF Perl Raku Study Group, 12/18 at 1pm PDT

2022-12-15 Thread Joseph Brenner
"Is it any wonder if we at last grow distrustful, lose patience, and turn impatiently away? That this Sphinx teaches us at last to ask questions ourselves?" -- Nietzsche, "Beyond Good and Evil", trans. Helen Zimmern The Raku Study Group December 18, 2022 1pm in California, 9pm in the UK An

Re: Name of calling program

2022-12-07 Thread ToddAndMargo via perl6-users
On 12/7/22 09:06, Gianni Ceccarelli wrote: On Wed, 7 Dec 2022 08:58:19 -0800 ToddAndMargo via perl6-users wrote: When I am in a module (pm6), is there one of those fancy system variables that will tell me the name of calling (pl6) program?

Re: Name of calling program

2022-12-07 Thread Gianni Ceccarelli
On Wed, 7 Dec 2022 08:58:19 -0800 ToddAndMargo via perl6-users wrote: > When I am in a module (pm6), is there one of those > fancy system variables that will tell me the > name of calling (pl6) program? https://docs.raku.org/language/variables#index-entry-$*PROGRAM -- Dakkar -

Name of calling program

2022-12-07 Thread ToddAndMargo via perl6-users
Hi All, When I am in a module (pm6), is there one of those fancy system variables that will tell me the name of calling (pl6) program? Many thanks, -T

Re: "returns" question

2022-12-07 Thread ToddAndMargo via perl6-users
On 12/7/22 02:02, ToddAndMargo via perl6-users wrote: On my sub declarations, I like to use "export" I had been doing a lot of module coding. I should have said "returns", not "export[s]" -- ~~ Computers are like air conditioners. They malfunction when

Re: "returns" question

2022-12-07 Thread ToddAndMargo via perl6-users
On 12/7/22 02:02, ToddAndMargo via perl6-users wrote: use "export" "exports", I forgot the "s" -- ~~ Computers are like air conditioners. They malfunction when you open windows ~~

Re: When to use .new?

2022-12-07 Thread ToddAndMargo via perl6-users
On 12/5/22 11:19, Ralph Mellor wrote: I forgot to mention one other shortcut that is always available if you do have to use `.new` (which is the case for most types). You can write: ``` my $foo = 42; ``` The `42` on the RHS of the `=` is the shortest way to create an integer value corresponding

"returns" question

2022-12-07 Thread ToddAndMargo via perl6-users
Hi All, On my sub declarations, I like to use "export" sub abc() returns Str {...} becasue it makes eh sub easier to figure out at a glance when I go to maintain it. Two exports I have not figured out are 1) an array, 2) an object created from a custom class. returns @ gets

Re: pointer confusion

2022-12-06 Thread Ralph Mellor
On Tue, Dec 6, 2022 at 11:55 PM ToddAndMargo via perl6-users wrote: > > > Oh, I figured out the "*ppX" double pointer. > "Pointer[Pointer]". Ironically I wrote that in a comment on your SO question before any other comments or the answers were written. But it was just a wild guess. I don't

Re: pointer confusion

2022-12-06 Thread ToddAndMargo via perl6-users
On 12/6/22 15:40, ToddAndMargo via perl6-users wrote: On 12/5/22 16:35, Ralph Mellor wrote: On Mon, Dec 5, 2022 at 10:20 PM ToddAndMargo via perl6-users wrote: use NativeCall; my Pointer $foo .= new: 42; say $foo;   # NativeCall::Types::Pointer<0x2a> print $foo; #

Re: pointer confusion

2022-12-06 Thread ToddAndMargo via perl6-users
On 12/5/22 16:35, Ralph Mellor wrote: On Mon, Dec 5, 2022 at 10:20 PM ToddAndMargo via perl6-users wrote: use NativeCall; my Pointer $foo .= new: 42; say $foo; # NativeCall::Types::Pointer<0x2a> print $foo; # NativeCall::Types::Pointer<5895604297984> `say` concatenates the `.gist`s

Re: Raku opens a notepad when executing a .bat

2022-12-06 Thread ToddAndMargo via perl6-users
On 12/6/22 07:31, ToddAndMargo via perl6-users wrote: On 12/6/22 01:44, ToddAndMargo via perl6-users wrote: Hi All, Windows Pro Chromebook Edition 22H2  (W11) raku -v  Welcome to RakudoΓäó v2022.07. When ever I run the following, it opens a Notepad with the text of the calling raku program.

Re: Raku opens a notepad when executing a .bat

2022-12-06 Thread ToddAndMargo via perl6-users
On 12/6/22 01:44, ToddAndMargo via perl6-users wrote: Hi All, Windows Pro Chromebook Edition 22H2  (W11) raku -v  Welcome to RakudoΓäó v2022.07. When ever I run the following, it opens a Notepad with the text of the calling raku program. raku -e "use lib '.'; use NativeWinUtils :RunCmd; say

Re: Raku opens a notepad when executing a .bat

2022-12-06 Thread ToddAndMargo via perl6-users
On 12/6/22 03:31, ToddAndMargo via perl6-users wrote: This is obviously not a raku issue, but a Windows issue. I think I misspoke. I do believe qqx is trying to run the sub from the module. I will put together a few tests in a couple of days to see if I can get it to repeat, then I will tag

Re: Raku opens a notepad when executing a .bat

2022-12-06 Thread ToddAndMargo via perl6-users
On 12/6/22 03:31, ToddAndMargo via perl6-users wrote: On 12/6/22 03:13, ToddAndMargo via perl6-users wrote: On 12/6/22 02:40, Ralph Mellor wrote: Please confirm that: * Entering `ls` at the command line prompt does what it says    on the tin, it does not open notepad. * A Raku program that

Re: Raku opens a notepad when executing a .bat

2022-12-06 Thread ToddAndMargo via perl6-users
On 12/6/22 03:13, ToddAndMargo via perl6-users wrote: On 12/6/22 02:40, Ralph Mellor wrote: Please confirm that: * Entering `ls` at the command line prompt does what it says    on the tin, it does not open notepad. * A Raku program that consists of the single line `qqx 'ls'` does    what it

Re: Raku opens a notepad when executing a .bat

2022-12-06 Thread ToddAndMargo via perl6-users
On 12/6/22 02:40, Ralph Mellor wrote: Please confirm that: * Entering `ls` at the command line prompt does what it says on the tin, it does not open notepad. * A Raku program that consists of the single line `qqx 'ls'` does what it says on the tin, and does not open notepad. If those

Re: Raku opens a notepad when executing a .bat

2022-12-06 Thread Ralph Mellor
Please confirm that: * Entering `ls` at the command line prompt does what it says on the tin, it does not open notepad. * A Raku program that consists of the single line `qqx 'ls'` does what it says on the tin, and does not open notepad. If those are true, then this code: ``` use lib '.';

Raku opens a notepad when executing a .bat

2022-12-06 Thread ToddAndMargo via perl6-users
Hi All, Windows Pro Chromebook Edition 22H2 (W11) raku -v Welcome to RakudoΓäó v2022.07. When ever I run the following, it opens a Notepad with the text of the calling raku program. raku -e "use lib '.'; use NativeWinUtils :RunCmd; say RunCmd(Q[ls]);" This is RunCmd sub RunCmd( Str

Re: pointer confusion

2022-12-05 Thread Ralph Mellor
On Mon, Dec 5, 2022 at 10:20 PM ToddAndMargo via perl6-users wrote: > > > use NativeCall; > > my Pointer $foo .= new: 42; > > say $foo; # NativeCall::Types::Pointer<0x2a> > > print $foo; # NativeCall::Types::Pointer<5895604297984> `say` concatenates the `.gist`s of each of its arguments.

Re: pointer confusion

2022-12-05 Thread ToddAndMargo via perl6-users
On 12/5/22 09:25, Ralph Mellor wrote: On Sat, Dec 3, 2022 at 11:44 AM ToddAndMargo via perl6-users wrote: I am confused I think the following is a golf of your confusion: ``` use NativeCall; my Pointer $foo .= new: 42; say $foo; # NativeCall::Types::Pointer<0x2a> print $foo; #

Re: Session ID

2022-12-05 Thread ToddAndMargo via perl6-users
On 12/5/22 09:17, Ralph Mellor wrote: On Mon, Dec 5, 2022 at 9:45 AM ToddAndMargo via perl6-users wrote: Answer 3: https://stackoverflow.com/questions/74665162/how-do-i-assign-the-value-in-carray-that-contains-a-memory-address-to-a-poi#74674303 Håkon Hægland is astonishing good at this

Re: When to use .new?

2022-12-05 Thread Ralph Mellor
I forgot to mention one other shortcut that is always available if you do have to use `.new` (which is the case for most types). You can write: ``` my $foo = 42; ``` The `42` on the RHS of the `=` is the shortest way to create an integer value corresponding to `42`. But you could also write: ```

Re: When to use .new?

2022-12-05 Thread Ralph Mellor
On Thu, Dec 1, 2022 at 4:28 AM ToddAndMargo via perl6-users wrote: > > Why can I get away with `my Str $x = "";` > > But I have to use .new here (an other places too) `my $ppSession = > NativeCall::Types::Pointer.new();` There are ways to write the value of some data types with minimum fuss.

Re: pointer confusion

2022-12-05 Thread Ralph Mellor
On Sat, Dec 3, 2022 at 11:44 AM ToddAndMargo via perl6-users wrote: > > I am confused I think the following is a golf of your confusion: ``` use NativeCall; my Pointer $foo .= new: 42; say $foo; # NativeCall::Types::Pointer<0x2a> print $foo; # NativeCall::Types::Pointer<5895604297984> ``` I

Re: Session ID

2022-12-05 Thread Ralph Mellor
On Mon, Dec 5, 2022 at 9:45 AM ToddAndMargo via perl6-users wrote: > > Answer 3: > https://stackoverflow.com/questions/74665162/how-do-i-assign-the-value-in-carray-that-contains-a-memory-address-to-a-poi#74674303 > > Håkon Hægland is astonishing good at this stuff. Indeed he is! If one of his

Re: Session ID

2022-12-05 Thread ToddAndMargo via perl6-users
On 11/14/22 12:54, ToddAndMargo via perl6-users wrote: Hi All, Windows 11 22H2 Is there a way to find session ID of the current running program?  Any predefined system variable for that? Many thanks, -T Answer 3:

pointer confusion

2022-12-03 Thread ToddAndMargo via perl6-users
Hi All, NativeCall question: I am confused about how to assign an address to a pointer [1] > use lib '.'; use NativeCall; use NativeConstants Nil [2] > my $x=0xFE45DDCC; 4265991628 [3] > my Pointer $Ptr2Ptr = NativeCall::Types::Pointer[BYTES].new($x);

Tip: use of pointers example

2022-12-01 Thread ToddAndMargo via perl6-users
Hi All, Windows 11 pro 22H2 The following is a test example of the use of pointers for calling Windows DLL's and for copying data out of structures when given a pointer to the structure. Before you tell me there is an easier way to get the computer name out of "GetComputerNameA," this is to

Re: NativeCall and pointers question

2022-11-30 Thread ToddAndMargo via perl6-users
On 11/30/22 12:53, ToddAndMargo via perl6-users wrote: Let me ask this question a little simpler: To answer my own questions, which I figured out the hard way. 1) how to I tell NativeCall I only want the C pointer back, not what it points to? By declaring it as a pointer and creating it

When to use .new?

2022-11-30 Thread ToddAndMargo via perl6-users
Hi All, Why can I get away with my Str $x = ""; But I have to use .new here (an other places too) my $ppSession = NativeCall::Types::Pointer.new(); Is there some rule I can follow that let me know when I have to use .new and when I do not? (I am getting tired of figuring it out the

Re: [sf-perl] The SF Perl Raku Study Group (postponed)

2022-11-30 Thread deloreanx via perl6-users
Sounds good to me. Sent from Yahoo Mail for iPhone On Monday, November 28, 2022, 9:30 PM, Joseph Brenner wrote: On the next few Sundays, I've got some schedule conflicts, so I've got to skip holding the Raku Study Group when we usually would on December 4th. Instead the next meeting will be

Re: NativeCall and pointers question

2022-11-30 Thread ToddAndMargo via perl6-users
Let me ask this question a little simpler: 1) how to I tell NativeCall I only want the C pointer back, not what it points to? 2) how do I tell NativeCall I am sending it a C pointer? Many thanks, -T

NativeCall and pointers question

2022-11-30 Thread ToddAndMargo via perl6-users
Hi All, In the following: use NativeCall; constant BYTE := uint8; constant LPDWORD := uint64;# long pointer to a DWORD constant LPSTR= CArray[BYTE]; # long pointer to a string constant DWORD:= uint32; constant HANDLE = Pointer[void]; sub WTSOpenServerA( #`{

Re: What is this "\t"?

2022-11-29 Thread Marcel Timmerman
On 29-11-2022 15:08, Elizabeth Mattijsen wrote: Perhaps it would make sense to export these to a separate Gnome::Constants module? Wel, I have done that, sort of. The file is generated in the Build phase of the installation of Gnome::N where I run a C program outputting the sizes from several

Re: What is this "\t"?

2022-11-29 Thread Elizabeth Mattijsen
Perhaps it would make sense to export these to a separate Gnome::Constants module? > On 29 Nov 2022, at 15:05, Marcel Timmerman wrote: > > On 29-11-2022 10:13, Francis Grizzly Smit wrote: > > Hi Francis, >> >> Personally I never use \name are I hate how it looks, and so far I have >> never

Re: What is this "\t"?

2022-11-29 Thread Marcel Timmerman
On 29-11-2022 10:13, Francis Grizzly Smit wrote: Hi Francis, Personally I never use \name are I hate how it looks, and so far I have never needed it, so unless I can find something it can do that I cannot do any other way, I'll keep on not using it To show an example where I could use it I

Re: What is this "\t"?

2022-11-29 Thread ToddAndMargo via perl6-users
On 11/29/22 01:13, Francis Grizzly Smit wrote: Personally I never use \name are I hate how it looks, and so far I have never needed it, so unless I can find something it can do that I cannot do any other way, I'll keep on not using it I have seen it use and it was sneaky as all heck. Very

Re: What is this "\t"?

2022-11-29 Thread Francis Grizzly Smit
On 29/11/22 13:21, ToddAndMargo via perl6-users wrote: On 11/28/22 17:40, ToddAndMargo wrote: Sigilless variable https://docs.raku.org/language/glossary#Sigilless_variable   Sigilless variables are actually aliases to the   value it is assigned to them, since they are   not 

We want you to write an article for the Advent Calendar!

2022-11-28 Thread JJ Merelo
And you, and you, yes, you too. There are still some slots available. You want to talk about your module, your experience, a little tutorial, whatever, request a slot here https://github.com/Raku/advent/blob/master/raku-advent-2022/authors.md (and also send me via email a way to contact you)

Re: What does this line mean?

2022-11-28 Thread ToddAndMargo via perl6-users
On 11/25/22 19:21, ToddAndMargo via perl6-users wrote: Hi All, I am confused! sub blob-from-pointer(Pointer:D \ptr, Int :$elems!, Blob:U :$type = Buf) is export { What is `Pointer:D \ptr`? Why the `\`? What is `:$elems!`? Why the `:`? Why the `!`? What is `Blob:U :$type = Buf`

Re: Pointer to bug question

2022-11-28 Thread ToddAndMargo via perl6-users
On 11/27/22 19:13, Clifton Wood wrote: ToddAndMargo: Why are you referencing NativeHelpers::Blob when I've linked to the code you need. The bug was in the code snippet I've sent. NONE of my stuff is available via zef because CURI (and hence zef) have problems with large scale code that I am

The SF Perl Raku Study Group (postponed)

2022-11-28 Thread Joseph Brenner
On the next few Sundays, I've got some schedule conflicts, so I've got to skip holding the Raku Study Group when we usually would on December 4th. Instead the next meeting will be on December 18th, and after that we'll most likely do one on New Years Day itself, January 1st, 2023.

Re: What is this "\t"?

2022-11-28 Thread ToddAndMargo via perl6-users
On 11/28/22 17:40, ToddAndMargo wrote: Sigilless variable https://docs.raku.org/language/glossary#Sigilless_variable  Sigilless variables are actually aliases to the  value it is assigned to them, since they are  not containers. Once you assign a sigilless  variable (using 

Re: Pointer to bug question

2022-11-28 Thread ToddAndMargo via perl6-users
On 11/27/22 19:13, Clifton Wood wrote: ToddAndMargo: Why are you referencing NativeHelpers::Blob when I've linked to the code you need. The bug was in the code snippet I've sent. NONE of my stuff is available via zef because CURI (and hence zef) have problems with large scale code that I am

Re: What is this "\t"?

2022-11-28 Thread ToddAndMargo via perl6-users
On 11/27/22 19:02, Clifton Wood wrote: @ToddAndMargo: These are all explained in the Raku documentation. For advanced users that already know what they are doing and do not need it Long story short: "my \t" -- this is a RAW definition. You can use it to hold types, as in this case. ".of"

Re: Pointer to bug question

2022-11-27 Thread Clifton Wood
ToddAndMargo: Why are you referencing NativeHelpers::Blob when I've linked to the code you need. The bug was in the code snippet I've sent. NONE of my stuff is available via zef because CURI (and hence zef) have problems with large scale code that I am still trying to resolve. You should be able

Re: What is this "\t"?

2022-11-27 Thread Clifton Wood
@ToddAndMargo: These are all explained in the Raku documentation. Long story short: "my \t" -- this is a RAW definition. You can use it to hold types, as in this case. ".of" is a method for Parametric Roles. It generally returns a type "??" is the trinary operator. (expr) ?? !! If you are

What is this "\t"?

2022-11-27 Thread ToddAndMargo via perl6-users
Hi All, On https://github.com/salortiz/NativeHelpers-Blob/blob/master/lib/NativeHelpers/Blob.pm6 Line 96 my \t = ptr.of ~~ void ?? $type.of !! ptr.of; What is `\t`? What of `.of` What is `??`? What is `!!` Yours in confusion. -T

Re: What does this line mean?

2022-11-26 Thread ToddAndMargo via perl6-users
On 11/25/22 21:06, Bruce Gray wrote: On Nov 25, 2022, at 9:21 PM, ToddAndMargo via perl6-users wrote: Hi All, I am confused! The documentation at https://github.com/salortiz/NativeHelpers-Blob would certainly benefit from example code! No examples in the t/ directory use the

Re: What does this line mean?

2022-11-25 Thread Bruce Gray
> On Nov 25, 2022, at 9:21 PM, ToddAndMargo via perl6-users > wrote: > Hi All, > I am confused! The documentation at https://github.com/salortiz/NativeHelpers-Blob would certainly benefit from example code! No examples in the t/ directory use the `blob-from-pointer` sub. The main doc for

What does this line mean?

2022-11-25 Thread ToddAndMargo via perl6-users
Hi All, I am confused! sub blob-from-pointer(Pointer:D \ptr, Int :$elems!, Blob:U :$type = Buf) is export { What is `Pointer:D \ptr`? Why the `\`? What is `:$elems!`? Why the `:`? Why the `!`? What is `Blob:U :$type = Buf` What does `Blob:U` mean? What does `:type` mean? Is

Rakudo CoreDev Class

2022-11-25 Thread Vadim Belman
Since no other proposals were made I plan to hold the class on Saturday, Dec 3, 20:00UTC. Here is the link to Google Calendar entry with Jitsy Meet reference: https://calendar.google.com/calendar/event?action=TEMPLATE=MGdpYWNpZGNmdHMxZHYzNnA5bGJhdG5qc2IgdnJ1cmcwMUBt=vrurg01%40gmail.com Comments

<    1   2   3   4   5   6   7   8   9   10   >