Posts Tagged ‘ adobe ’

Forking heck

Posted on June 21st, 2025 Comments Off on Forking heck

It was close to 10 years ago that I announced that I’d been working on a crypto-based, peer-to-peer poker project named CypherPoker. That initial version was written in a programming language called ActionScript which produced software for the now-defunct Flash platform.

I admit that I still have a soft spot for the language and the platform on which it ran (a.k.a. the runtime).

Not only did Flash allow me to produce code for a broad variety of operating systems and hardware, it was also very creatively expressive. The platform/runtime was originally a way to produce streaming audio and video content for the web which was a groundbreaking advancement for its time. With the addition of a robust programming language, those “movies” could be made to react to user input and that’s when things got really interesting.

A few years later I found myself working for an online casino company and realized that a product like provably fair online poker software that didn’t require a middleman (e.g. PokerStars), was singularly unique. So I set out to write CypherPoker. I learned a lot about cryptography and peer-to-peer networking and pretty soon I knew that the idea was viable.

However, although it solved a lot of the problems associated with such an endeavour, my solution didn’t answer the questions of: who enforces the rules if someone does cheat, and moreover, who holds the money (pot) during the game?

It was suggested that I use Ethereum for the answers. You may have heard of Ethereum due the popular cryptocurrency Ether but this is only one half of this particular blockchain. The other half is a set of fairly open-ended programming instructions (a.k.a. Turing-complete), that run the blockchain. Those instructions can be created using any number of programming languages — in my case one called Solidity — and the resulting programs are called smart contracts.

Because smart contracts are run across the entire Ethereum network, an incentive system was included to ensure that people participate (like all blockchains that I know of, Ethereum uses a cryptographic consensus model), hence the Ether cryptocurrency. If you want to store your code on the blockchain, you pay Ether. If you want to run that code, you pay Ether.

If smart contracts and Ether had hips they would literally be joined at them, so much so that even the most basic transactions on Ethereum (e.g. “send X amount of Ether to recipient Y”), require basic smart contracts to do their thing. It’s also why even these most basic transactions require a fee, payable in Ether.

In the process of developing smart contracts I learned how to create my own Ethereum blockchain, which could have helped to keep transaction costs minimal — at least initially. Due to the intrinsically speculative nature of cryptocurrencies, however, I expected the inevitable eventuality of the same problem that I encountered with the official Ethererum blockchain: playing a hand of poker would eventually become prohibitively expensive. In addition, the consensus model meant I’d need a network of people to help run the blockchain, which I didn’t have.

Nevertheless, I received positive, even enthusiastic comments on the project, and as of the last time I checked it had been starred (the equivalent of “likes“), 70 times on GitHub. Perhaps more importantly, it had been forked 13 times, which means that GitHub users copied the code into their own repositories for their own use, adaptation, etc.

Unfortunately, that rotten piece of shit Steve Jobs (my consistent opinion), bashed Flash and with the help of his drooling and ignorant minions helped to prematurely kill off the technology. I won’t go into the numerous reasons why most of what he’d written was pure crap but it doesn’t change the fact that Flash would ultimately be doomed. Plus, the price of Ether skyrocketed so even without any rake the smart contracts were useful for only very high-stakes games in which expensive blockchain fees would make sense.

So, some years later when browsers began to offer some of the functionality that previously only Flash could offer, I decided to re-write the game for JavaScript. Thankfully, the similarity in names between the two programming languages is more than just coincidence. Not only do they both look and feel similar but they’re functionally related.

In fact, an ActionScript developer would often have to also learn JavaScript since Flash content tended to run within a browser window, and browsers use JavaScript to make web pages functional (i.e. more than just static content). In other words, the ActionScript runtime (Flash) was often embedded in a JavaScript runtime (browser), although this wasn’t always the case.

Sufficed to say, other than having to code everything again, going from one language and runtime to another wasn’t a huge leap. I learned a bunch of lessons in the development of the ActionScript version so its follow-up was produced considerably more quickly and robustly.

Instead of incorporating smart contracts directly, I created a plugin architecture into which they could eventually be slotted and wrote a module using Node.js (another JavaScript runtime), to act as a stand-in. Due to its popularity I added support for Bitcoin which, unlike Ethereum, comes with a highly restrictive set of programming instructions (not even close to Turing-complete), called Script.

With Bitcoin, instead of smart contracts someone would have to assume the role of a “trusted banker and game verifier”. It wasn’t ideal but would allow for completely private games, albeit with someone playing the role of a trusted third party. Besides, I figured, I’d written the smart contracts once and I should be able to dust them off at some point and slot them in.

However, that never happened.

Ether is still way too expensive and I’m no nearer to having enough people to help me create a CypherPoker blockchain so I added support for Bitcoin Cash (a cryptocurrency similar to Bitcoin), tidied up the code, updated the documentation so that anyone else could adapt it, and shelved the project. At this point it has been sitting idle on GitHub for about 6 years.

A couple of days ago I had a look at the repository and was pleasantly surprised to see that it had been starred 106 times and forked 44 times, twice this year and 5 times last year. In addition, 13 people have set a “watch” on the repository so that they can be alerted should it ever be updated.

Between the original CypherPoker and the newer CypherPoker.js, the project has been starred 176 times and forked 127 times with a total of 23 people watching.

Every once in a while I also receive a comment telling me that someone has implemented some changes or done something interesting with CypherPoker.js

As recently as the 6th of this month, for example, someone added a “spectator mode” to the game (not sure if this is a good idea), and someone else claimed that they used the project as a basis for their university thesis (LOL … I’m a Canadian college dropout!)

Altogether, it’s nice to know that the interest is still there.

If you or anyone you know share this interest, drop me a note and maybe we can resuscitate what I still consider to be a unique and very promising project.

Filed under: B Sides, Patrick Bay, Pictures

So it’s come to this

Posted on March 29th, 2012 1 Comment

I attended FlashInTO last night. The event bills itself as a “Toronto Flash User Group”, a monthly gathering of anyone interested in Adobe Flash and related technologies. I hadn’t attended in well over a year because the turnouts were becoming depressingly low, probably due to the previous subterranean location in Kensington Market, the regular mid-week date, and the exclusive availability of overpriced bottled beer and very little in the way of anything else.

Still, I thought, I’d give it another try – schmooze a bit, maybe chat about SocialCastr, and just see what was happening out there in the world of Flash and AIR. After all, Adobe recently released its roadmap for the Flash runtime, and just a couple of days ago announced even more news surrounding upcoming features and new pricing models. If anything, one might think that such topics would at the very least have been brought up at some point during the evening.

Well, one would be wrong. In fact, the entire evening was dominated by topics such as Unity, and HTML5, and ending with a shameless Apple love-in with literally not one mention of Flash. At all.

The “Emerging technologies in the real world” topic was interesting enough, with Demi Kandylis describing how his company used Unity to produce an interactive shadow puppet display for Sapporo, the Japanese beer maker. Demi’s team happened to use Unity, a 3D engine that can also be used to output to Flash, which could have become an interesting launchpad to at least mention some of the interesting work being done with Flash and 3D. But no mention of Flash, of course. Not even a hint.

The next presentation was part of what I see as the ongoing, and frankly insane push to get everyone to develop in HTML5. Here, Ken Peleshok demonstrated Adobe Edge, now in its 5th version and still able to perform only basic animations of the kind that Flash was capable of 15 years ago. The demonstration was pretty much a failure as Ken couldn’t get basic animations going with his code, but there was plenty of Apple-wielding supporters standing to the side exclaiming, “just you wait!” There was certainly enough opportunity to at least draw parallels to Flash animation, but of course that was never brought up. But why would anyone want to discuss Flash at an event called FlashInTO?!

I had to walk out on the final panel discussion because it turned into one of the most disgustingly overt Apple advertisements I’d ever witnessed, not to mention the conclusions that the panelists came to. The Apple logo featured prominently in every slide along with the panelists’ children, and everyone took the opportunity to casually wave around their iPads, Macs, or whatever piece of Apple hardware they were carrying to show that, yes, they were just the coolest people ever and could be trusted to deliver unbiased and reasoned opinions. Simon Conlin, the founder of FlashInTO (and later Flash In The Can…see below), started off by saying, “This isn’t supposed to be an advertisement for Apple or anything…”, and then motioned to the front of his laptop with the glowing Apple logo just to drive the point home before starting the accompanying slide show of panelists’ kids brandishing Apple hardware, often with the company’s logo as the primary focus and the kids in the corner of the images. Most of the time the kids weren’t in the picture at all, it was just photos of iPads, iPhones, and other iDevices.

Despite this end-of-night panel being billed as “A look at apps for kids, what’s good, what’s bad and much more”, there was literally one app that was shown while the discussion centered entirely around the “brilliance” of Apple’s marketing and design. And once again, not even a passing mention of Flash, Flash Builder, Catalyst, or any of the other Flash-related products that could easily have been incorporated into the discussion. Even Adobe wasn’t mentioned…it was a complete Apple circle jerk.

Believe it or not, though, the couple of overpriced pints I had downed allowed me to stomach things up until that point; it was only when the conversation turned to, “What the youth of today can teach us” that I packed it in. Once again with all attention on how Apple was genius for doing so, the panel began discussing how we, as software developers, should be tailoring our apps towards infants. After all, kids are completely uninhibited and have no preconceived notions about interacting with hardware or software, and so we should all be striving to dumb down our own products and make them as basic and infantile as possible. That way everyone could use what we produce without any real learning curve or impediments. And wouldn’t it be a good idea to cripple device functionality through our software to ensure that people only use our software when, how, why, and where we want them to?

I was this close to standing up and reminding them how their device-weaned spawn don’t have the wherewithal to keep their hands off of hot stoves or not run out into traffic (maybe that’s why adults think for a few moments before adorably mashing $800 devices with ball-peen hammers), but it was clear that they were really only into publicly masturbating to Apple propaganda and rhetoric. When, at some point in the past I’d mentioned that Applites offer up their firstborn to Steve Jobs, I thought I was only exaggerating – clearly I was wrong.

And just to drive home the point of the evening, a draw was held for tickets to this year’s FITC. That’s Flash In The Can, if you’ve never been. I haven’t, mostly because the tickets are ridiculously priced, and partially because even when I might’ve had a chance to attend, people who had deigned to call me their friend ended up attending, on free tickets, with other “friends” who had absolutely no interest in Flash, and without even mentioning the event until I found out about it accidentally afterwards. And that the FITC was held directly across from the street where I worked at the time just helped to drive that screw in a little deeper. Then there was the childish crap they pulled and subsequently tried to cover up using threats and intimidation, that just completed the picture of what kinds of people self-avowed Applites really are. Not all, of course – you may have an iDevice right now — but be aware that going down the Apple path almost always invariably ends up leading out of the asshole of one thing or another.

But while FITC of the past was actually about Flash, look at the lineup of topics for this year’s FLASH In The Can: HTML5 • Online Video • Kinect Hacking • Javascript • OOP • WebGL • OpenFrameworks. • CSS3 • Starling • jQuery • Flash Stage 3D • Augmented Reality • Digital Art • Robotlegs 2.0 + much more!
Out of the 80 or so presentationsfive mention Flash. And these are: “Deep Dive in the Flash Platform Roadmap”, “Flash and HTML5″, “Moving Forward with Flash (or Not?)”, “OpenFrameworks 101 for Flash Developers”, “Tangled: HTML5 <video> and Flash”. In effect, that’s one presentation on the Flash Platform Roadmap I’d mentioned earlier, one presentation for beginner Flash developers, and three about how you should be abandoning Flash for HTML5 hype.

And just in case you had any doubt about their dedication to Flash, the only Flash element on the FITC website is the banner, FlashInTO has no Flash elements whatsoever.

Yeah, this is what things have come to. The word “ridiculous” doesn’t even begin to cover it, and although I tried not to make this into an Apple-bashing post, it’s unavoidable considering how it’s flaunted in everyone’s face so openly and readily; exclusively, even. And I can’t help but wonder when it’ll stop. What will it take for people to notice this insanity?

Filed under: B Sides, Patrick Bay

818 seconds

Posted on May 9th, 2010 2 Comments

Regional transit and brooding days seem to go hand in hand for me. Here’s another example from yesterday: me going to meet family to celebrate a birthday out west. Way out west. The flipbook movie is about 13 minutes long (out of a 40 minute trip to Oakville), so give it some time to load. Maybe this is a good time to call your mum?

… Continue Reading

Filed under: B Sides, Videos