all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: 36973@debbugs.gnu.org
Subject: bug#36973: NativeCall doesn't work with rakudo ?
Date: Thu, 8 Aug 2019 12:43:15 +0300	[thread overview]
Message-ID: <20190808094315.GC5507@E2140> (raw)
In-Reply-To: <20190808093151.GB5507@E2140>


[-- Attachment #1.1: Type: text/plain, Size: 241 bytes --]

forgot the two attachments

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #1.2: sdl.p6 --]
[-- Type: text/plain, Size: 863 bytes --]

use SDL2::Raw;

die "couldn't initialize SDL2: { SDL_GetError }"
if SDL_Init(VIDEO) != 0;

my $window = SDL_CreateWindow(
    "Hello, world!",
    SDL_WINDOWPOS_CENTERED_MASK, SDL_WINDOWPOS_CENTERED_MASK,
    800, 600,
    OPENGL
);
my $render = SDL_CreateRenderer($window, -1, ACCELERATED +| PRESENTVSYNC);

my $event = SDL_Event.new;

main: loop {
    SDL_SetRenderDrawColor($render, 0, 0, 0, 0);
    SDL_RenderClear($render);

    while SDL_PollEvent($event) {
        if $event.type == QUIT {
            last main;
        }
    }

    SDL_SetRenderDrawColor($render, 255, 255, 255, 255);
    SDL_RenderFillRect($render,
    SDL_Rect.new(
        2 * min(now * 300 % 800, -now * 300 % 800),
        2 * min(now * 470 % 600, -now * 470 % 600),
        sin(3 * now) * 50 + 80, cos(4 * now) * 50 + 60));

        SDL_RenderPresent($render);
    }
    SDL_Quit;

[-- Attachment #1.3: perl6-sdl2-raw.scm --]
[-- Type: text/plain, Size: 913 bytes --]

(define-module (perl6-sdl2-raw)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix git-download)
  #:use-module (guix build-system rakudo)
  #:use-module (gnu packages perl6))

(define-public perl6-sdl2-raw
  (package
    (name "perl6-sdl2-raw")
    (version "0.3")
    (source
      (origin
        (method git-fetch)
        (uri (git-reference
               (url "https://github.com/timo/SDL2_Raw-p6.git")
               (commit version)))
        (file-name (git-file-name name version))
        (sha256
         (base32
          "1h9g76bdps5aw14s6yxgnjfys9269vxiiq8728nrv8ccfynz64j3"))))
    (build-system rakudo-build-system)
    (home-page "https://github.com/timo/SDL2_Raw-p6")
    (synopsis "Sugar-free NativeCall binding for libSDL2")
    (description "Sugar-free NativeCall binding for libSDL2")
    (license license:artistic2.0)))

perl6-sdl2-raw

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2019-08-08  9:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190807153311.GA8932@prometheus.u-strasbg.fr>
2019-08-08  9:31 ` bug#36973: NativeCall doesn't work with rakudo ? Efraim Flashner
2019-08-08  9:43   ` Efraim Flashner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190808094315.GC5507@E2140 \
    --to=efraim@flashner.co.il \
    --cc=36973@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.