Re: Your thoughts on Padre?

2017-03-08 Thread Dominique Dumont
[ sorry, I'm late on my mails.. ]

On Monday, 27 February 2017 18:23:19 CET Luca Ferrari wrote:
> please note that at least in Ubuntu Padre is shipped as version 1
> while 1.01 is available.

I'm afraidr that won't last.

Due to the many bugs (debuggger test don't work with recent perl), and lack of 
stability (random crashes), I've given up on maintaining padre for Debian last 
year and requested its removal from Debian. 

Since Ubuntu uses padre Debian package, I'm afraid that padre will not be 
shipped on Ubuntu in the next future.

All the best
-- 
 https://github.com/dod38fr/   -o- http://search.cpan.org/~ddumont/
http://ddumont.wordpress.com/  -o-   irc: dod at irc.debian.org


Re: issues with

2017-03-08 Thread ToddAndMargo

On 03/08/2017 01:08 PM, ToddAndMargo wrote:

Hi All,

What is wrong with this?

$ perl6 -MX11::Xlib::Raw -e 'say "hi";'
===SORRY!===
Could not find X11::Xlib::Raw::X at line 5 in:
/home/tony/.perl6
/usr/share/perl6/site
/usr/share/perl6/vendor
/usr/share/perl6
CompUnit::Repository::AbsolutePath<68732640>
CompUnit::Repository::NQP<62202240>
CompUnit::Repository::Perl5<62202280>


$ zef install X11::Xlib::Raw
All candidates are currently installed
No reason to proceed. Use --force to continue anyway


$ zef install X11::Xlib::Raw::X
===> Searching for: X11::Xlib::Raw::X
No candidates found matching: X11::Xlib::Raw::X


Many thanks,
-T



You know what, never mind on this.  I will use Inline instead.



--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~


Re: How do I call system functions?

2017-03-08 Thread ToddAndMargo

On 03/08/2017 10:26 AM, Brandon Allbery wrote:


On Wed, Mar 8, 2017 at 1:23 PM, ToddAndMargo > wrote:


class Display is repr('CStruct') {}


Class Display has no attributes, which is illegal with
the CStruct representation.

What in the world?


It's an opaque pointer; CStruct is the wrong representation to use. Try
CPointer instead.



Hi Brandon,

The example over at:
http://rosettacode.org/wiki/Window_creation/X11#Perl_6
is a complete syntax mess.

Could I talk you into debugging it?

-T


Re: How do I call system functions?

2017-03-08 Thread ToddAndMargo

On 03/08/2017 06:51 AM, Will Coleda wrote:

Perl 6 uses "NativeCall" to call out to native library functions. I
would start with

https://docs.perl6.org/language/nativecall

and come back with specific questions.




Oh poop I have a lot of reading to do.  Found a
great example over at:

http://rosettacode.org/wiki/Window_creation/X11#Perl_6
I will start with reading what my display is (:0.0).

And I didn't get far trying to run the example:


class Display is repr('CStruct') {}


Class Display has no attributes, which is illegal with
the CStruct representation.

What in the world?

-T


Re: How do I call system functions?

2017-03-08 Thread Brandon Allbery
On Wed, Mar 8, 2017 at 1:00 PM, ToddAndMargo  wrote:

> On 03/08/2017 07:49 AM, Brandon Allbery wrote:
>
>>
>> On Wed, Mar 8, 2017 at 5:51 AM, ToddAndMargo > > wrote:
>>
>> int XStoreBytes(Display *display, char *bytes, int nbytes);
>>
>>
>> Do I want to know why you're using X11R3 compatibility functions?
>>
>
> Well now ...
>
> I am trying to put together a module to read and write to
> both X11 clipboards that does not use "xclip".
>
> What is that anyway?  C code?
>

Yes.

Also this is a particularly ugly hack (among other things: this is why
nobody realizes X11 can clipboard *any* data, not just text. But if you go
through the ancient cutbuffer stuff, simple text is all you get).

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net


Re: How do I call system functions?

2017-03-08 Thread ToddAndMargo

On Wed, Mar 8, 2017 at 5:51 AM, ToddAndMargo  wrote:

Hi All,

In Linux, how do I call system functions from Perl 6?

int XStoreBytes(Display *display, char *bytes, int nbytes);

And what is that?  "C"?

Is there an inline "C" call?

Many thanks,
-T


On 03/08/2017 06:51 AM, Will Coleda wrote:

Perl 6 uses "NativeCall" to call out to native library functions. I
would start with

https://docs.perl6.org/language/nativecall

and come back with specific questions.




Thank you!


Re: How do I call system functions?

2017-03-08 Thread Will Coleda
Perl 6 uses "NativeCall" to call out to native library functions. I
would start with

https://docs.perl6.org/language/nativecall

and come back with specific questions.

On Wed, Mar 8, 2017 at 5:51 AM, ToddAndMargo  wrote:
> Hi All,
>
> In Linux, how do I call system functions from Perl 6?
>
> int XStoreBytes(Display *display, char *bytes, int nbytes);
>
> And what is that?  "C"?
>
> Is there an inline "C" call?
>
> Many thanks,
> -T
>
>
> man XStoreBuffer
>
> NAME
>XStoreBytes, XStoreBuffer, XFetchBytes, XFetchBuffer,
>XRotateBuffers -  manipulate cut and paste buffers
>
> SYNTAX
>int XStoreBytes(Display *display, char *bytes, int nbytes);
>
>int XStoreBuffer(Display *display, char *bytes, int nbytes, int buf‐
>   fer);
>
>char *XFetchBytes(Display *display, int *nbytes_return);
>
>char *XFetchBuffer(Display *display, int *nbytes_return, int buffer);
>
>int XRotateBuffers(Display *display, int rotate);
>
>
> --
> ~~
> Computers are like air conditioners.
> They malfunction when you open windows
> ~~



-- 
Will "Coke" Coleda


Re: How do I use "&?ROUTINE"?

2017-03-08 Thread Brent Laabs
You must be doing something wrong then:

> sub LinuxCheck () { print &?ROUTINE.name ~ " " ~ "$*DISTRO OS\n"; }
sub LinuxCheck () { #`(Sub|140478449412680) ... }
> LinuxCheck();
LinuxCheck macosx OS


On Tue, Mar 7, 2017 at 11:54 PM, ToddAndMargo  wrote:

> On Tue, Mar 7, 2017 at 11:30 PM, ToddAndMargo >> > wrote:
>>>
>>> Hi All,
>>>
>>> I am trying to print out the name of the sub I am in.
>>>
>>> Reference:
>>>
>>> https://docs.perl6.org/language/variables#index-entry-%26%3FROUTINE
>>> >> >
>>> &?ROUTINE   Which routine am I in?
>>>
>>>
>>> 
>>> sub LinuxCheck () { print &?ROUTINE ~ " " ~ "$*DISTRO $OS\n"; }
>>> 
>>>
>>>  rhel linux
>>>
>>> &?ROUTINE resolves to "", which is not the name of the sub.
>>> What am I missing?
>>>
>>>
>>> Many thanks,
>>> -T
>>>
>>
> On 03/07/2017 11:42 PM, Brent Laabs wrote:
>
>> Try &?ROUTINE.name -- that should get you the sub's name.
>>
>>
> Hi Brent,
>
> Still prints "".  Rats!
>
> Thank you for the help!
> -T
>