Bringing you the Quantum Cryptography.

So I started, finally, to work on some QKD (Quantum Key Distribution). IBM recently released a python API to their 5 qubit quantum computer. I’ve been playing around with it and found it pretty easy to use. I have only managed to entangle a couple qubits and teleport them, but gotta start somewhere. Anyway, I […]

via Quantum Cryptography — My Little Blog


Making games with Ruby and Gosu library.

Preface As a part of learning the Ruby programming language, while I continue the development of my Rails app (which I might go through in another series of posts), I thought it would neat to port my flagship computer game: Tokoton Shooter, which is a 2D, vertical shooter game that I created a long time […]

via Game Dev with Gosu, Ruby 1: Setting up the project – Part 1 — Boardsdon’thitback.org


Java method overloading

Method overloading allows a class to have two or more methods having same name. But there are some conditions applied if you overload a method. Let’s discuss on then. First of all we should know “ Why do we use method overloading in Java?” . Suppose we have to perform addition of given number but there […]

via Dive into Java Method Overloading — Linux_Point

Perl 6

Perl 6: Poking classes

Perl 6 came with class keyword.
For example on declaring class:
class Animal {}

Setting attributes in the class:

class Animal {
    has $.species;
    has $.family;
    has $.kingdom;

It is boring if we can’t do anything with the attributes right? So let’s take a look at creating method.

class Animal {
    has $.species;
    has $.kingdom;
    has $.family;
    has $.aka;

    method sayInfo() {
        say "The animal normally called as, $!aka. It is $!species species.";
        say "It is also belong to $!kingdom kingdom, $!family family.";
# instantiating

my $lion = Animal.new(species => 'P. leo', family => 'Felidae', kingdom => 'Animalia', aka => 'Lion');

Well, thats it. I will cover much more topics in the future posts. Peace out.


Subroutine dispatching or overloading.

#`(take note at the same subroutine name)

multi sub saySomething(Int $arg) {
    say "Hey, you inserted a number! $arg";

multi sub saySomething(Str $arg) {
    say "Hey, you inserted a string! $arg";

saySomething(20);   # => Hey, you inserted a number! 20
saySomething("hi");  # => Hey, you inserted a string! hi


Perl module: App::Pastebin::Create

What is App::Pastebin::Create?

It’s a pastebin creator + uploader for pastebin.com, a tool written in Perl.

How to use it?

pastebin-create --text "Your text" --format 'perl' --expiry 10m --private 0 --desc "My perl mod title"

This will result a link to the public paste, with “My perl mod title” as the paste description, that will expiry in 10 minutes, with perl syntax highlighting, and “Your text” as the content.

How to install?

make sure you already configured CPAN first!

I recommend using cpanm instead of cpan for installation. To install cpanm, you need to run cpan App::cpanminus first.

From my forked distribution on Github (maintained by me):

bash <(curl -L https://gist.githubusercontent.com/faraco/b6acb4626da6962ad46aa7e250d1ac12/raw/d433116845cb0a3ce849edb75789a6053ef4e2ce/install.bash)

With cpanm (official CPAN): > `cpanm App::Pastebin::Create`

with cpan:

cpan App::Pastebin::Create

Read More

Tags: perl, programming, linux, unix, module, library, pastebin