Sami @ Somewhere

Blog about adventures in Dart language and other (un)related things

  • About

Cryptocurrencies

Posted by admin on October 19, 2017
Posted in: Uncategorized. Leave a Comment

Cryptocurrency is a type of digital currency that generally only exists electronically.

A cryptographic digital currency is one in which the key for any particular transaction can be coded into a unique code with no potential for being compromised by anyone other than the person to whom the code belongs, finding a safe online trading platform is also essential to avoid compromises.

Top Cryptocurrency News On June 28: Major Stories On Bitcoin, Binance  Exchange And Regulations

This doesn’t mean that Bitcoin is perfect. To the contrary, Bitcoin’s flaws have led many companies to issue Bitcoin-based digital currencies, as is the case with Monero (XMR). It also hasn’t been impossible to abuse the platform by using it as a money laundering tool. While there have been no reported cases of Bitcoin being used in money laundering, it is still possible for hackers or criminals to abuse the digital currency.

Two of the major security flaws with Bitcoin came to light as recently as 2014, when it was discovered that attackers could siphon thousands of Bitcoins away in a matter of minutes from the exchanges in Mt. Gox, a leading Bitcoin exchange. The Tokyo District Court held that the defendants involved could have known about the flaw and yet failed to fix it. (Although it is possible that the court’s decision was influenced by a political statement by then-Japanese Prime Minister Koizumi Jun’ichir, who said at the time, “One cannot seriously call it a problem if someone steals Bitcoins.)

Aside from the Mt. Gox breach, the biggest security issue with Bitcoin is that it is subject to various vulnerabilities. As long as the code governing Bitcoin is open and decentralized, it is capable of being exploited, such as the digital currency’s much-debated “block chain,” which effectively removes transaction records and prevents the creation of permanent record of Bitcoin transactions. As I explained in my previous blog on Bitcoin, a full backup of your Bitcoin wallet is always advisable, regardless of the security of your digital currency wallet; however, for those who are new to Bitcoin I always recommend getting advice from an expert (look here for more info). You can also learn about merchant services such as https://www.wecu.com/business-banking/merchant-services/ to know how you can manage cryptocurrency accounts.

The Satoshi Nakamoto white paper provides the most important background for understanding Bitcoin.

New version of the alphabets game

Posted by Sami Ylönen on March 1, 2014
Posted in: Dart. Tagged: Dart, Dartlang, webgl. Leave a Comment

Improved the rendering engine code a bit with shadows and particle systems.
Things are a bit rough on the edges and the performance is not so good yet, but atleast my daughter was delighted to see the particle system I call as “magical my little pony particle system” =)

Game here

game_screen_particles_shadowsjpg

Some things noticed:

  • IE11 does not support depth texture, so no shadows on IE11 for now.
  • Setting gl_PointSize has no effect on IE11, so my point sprite particle effects are quite.. small on IE11
  • Firefox has some performance issues with my animation system

Design tools

Posted by Sami Ylönen on December 29, 2013
Posted in: Dart. Leave a Comment

Regarding that game i released on the wild. [http://blockz3d.com]

I’ve also had to create few tools to help with the process.

First one is a material editor:
material_editor

And then also scene editor:
scene_editor

Not to mention the rendering and world engines.

This maddness then creates a game like this:
game

Naturally everything is quite unfinished =)

Small game

Posted by Sami Ylönen on December 29, 2013
Posted in: Dart. Tagged: Dart, Dartlang, webgl. Leave a Comment

Small game i released for my kids originally, now online also. Yes, there’s bugs.
Alphabets game

GigaPush (More and more so)

Posted by Sami Ylönen on May 29, 2013
Posted in: Dart, WebRTC. Tagged: Dart, Dartlang, WebRTC. Leave a Comment

After an intensive round of cpu profiling for bottlenecks, the GigaPush client (dart_rtc_client (Yea, messy code)) can now push data a bit faster again. On Local network I managed to get it peak at 2.5MB/s. Somewhat steady at 2.3MB/s.

This totally depends on your cpu though, the process of splitting the file to 500ish byte chunks, adding udp headers and converting to string takes some extreme cycles at the moment.

The latest speed up was due to finding an alternative way to convert ByteBuffer to String.
Original code looked like this:


new String.fromCharCodes(new Uint8List.view(buffer));

This worked somewhat well in Dartium, but the dart2js compiled javascript suffered a lot. There was almost an 1MB/s speed difference between Dartium and Chrome.
The new version uses a lookup table for characters, Since all content is Uint8 i just created an static List containing all characters that fit Uint8 and use that.
This change brought Chrome to same speed with Dartium.

Dart team (Emily Fortuna) has been looking at getting WebRTC working on Firefox, big thanks to her, hoping to see results soon. At this very moment at least RTCDataChannel is still not working.

Whats next? The current way of storing the file as Object url is not very cool. So, looking at FileSystem API and perhaps IndexedDB.

Not Mega, but Giga!

Posted by Sami Ylönen on May 22, 2013
Posted in: Dart, WebRTC. Tagged: Dart, Dartlang, WebRTC. Leave a Comment

Ok ok.. Not quite Giga.. yet =)
But since Kim Dotcom owns Mega, i decided to go for Giga.

Reached 1.40MB/s transfer rate with the gigapush.com site on local network.
This with dart2js compiled javascript version of the app. Pure Dart version is a bit faster.

Some nasty bottlenecks so far are:

Chrome doesn’t support sending binary data, so bytebuffers have to be converted to string and then back at the opposite end. This takes a bit of time.

Can not send large packets, so, at the moment i have to split the files to 500ish byte chunks and add udp headers for each packet.
Using sublist for the splitting didn’t quite amaze me with the speed and since sublist returns List<int>, it’s not going to work on the javascript side of the fence, which meant that i ended up with this

new Uint8List.fromList(new Uint8List.view(buffer).sublist(read, read+toRead));

Which was very slow.
I replaced that with a simplified home built version which gave me a speed boost of 100 KB/s.
There’s a bug for the sublist problem here https://code.google.com/p/dart/issues/detail?id=10354

Downloading the file after transfer is an issue also. At the moment i’m generating an object url for the finished download and use the html5 download attribute to set a filename and force download of the file. This sort of works, but consumes huge amounts of memory from the browser. Chromes filesystem api would be best solution but that works only on Chrome then.

Android issues. The object url download. This part does not work on Android version of Chrome. You can send files with the Chrome on Android, but receiving files will be a problem.

Firefox issues. dart2js is still not able to generate javascript which would work on Firefox, which is a shame and limits the site only to Chrome users.
Bug for this here https://code.google.com/p/dart/issues/detail?id=8361

Signaling issues, Sometimes when both participants on same signaling channel quit at the same time, an exception is thrown and i haven’t managed to trace that yet.

ACK issues. I’m no Udp expert so i just went with the solution i thought would be cool. Currently i’m waiting that either 50 packets arrive or time since last arrived packet is 5 ms, then build a ACK packet containing the sequence numbers from the received packets and send that back to the sender. The sender will retransmit the packets if no ACK is received within some time which i can’t remember at the moment =). Not sure if there’s a better way.

Connectivity issues are also quite nasty. If both participants are behind a router which has symmetric NAT, the peer connection will fail.
From Norwegian operators at least Nextgentel and Get both offer a wireless router by default which has symmetric NAT. I’m using Get at home and had to replace the router with shop bought D-Link router.

GigaPush (More so)

Posted by Sami Ylönen on May 11, 2013
Posted in: Dart, WebRTC. Tagged: Dart, Dartlang, WebRTC. Leave a Comment

Managed to push the gigapush.com speed up to 700KB/s on local network.
The udp library is still horribly inefficient but it’s getting there.. slowly =)

The site is good for sending pics of cats and such now =)

GigaPush (Not so)

Posted by Sami Ylönen on May 8, 2013
Posted in: Dart, WebRTC. Tagged: Dart, Dartlang, WebRTC. Leave a Comment

New experimental file transfer website I’ve made.
Located at gigapush.com.
It’s an early alpha version and the transfer speeds are not really Giga so far =).

Sunday hack

Posted by Sami Ylönen on April 7, 2013
Posted in: Dart, WebRTC. Tagged: Dart, Dartlang, WebRTC. Leave a Comment

Fun little app to share your local filesystem pics to anyone connected to you.
Pic transfer app.

Code for it Here.

Fun little p2p drawing app

Posted by Sami Ylönen on April 5, 2013
Posted in: Dart, WebRTC. Tagged: Dart, Dartlang, WebRTC. Leave a Comment

This is a fun little drawing app i made for demonstrating the ability to send binary data reliably and unreliably over WebRTC data channels.

Draw app

As usual, open the link and you will get redirected to a randomized url, then just copy the link to a new tab, new window or send it to a buddy and start drawing together =P

Works only on Chrome (Chrome canary has a bug that causes the awesome aww snap! error)

Posts navigation

← Older Entries
  • Recent Posts

    • Cryptocurrencies
    • New version of the alphabets game
    • Design tools
    • Small game
    • GigaPush (More and more so)
  • Links

    GigaPush.com
    dart_rtc_client
    dart_rtc_server
    dart_rtc_common
  • Recent Comments

    • » Simple video example Sami @ Somewhere on Updated example
  • Archives

    • October 2017
    • March 2014
    • December 2013
    • May 2013
    • April 2013
    • March 2013
    • February 2013
  • Categories

    • Dart
    • Uncategorized
    • WebRTC
  • Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org
Proudly powered by WordPress Theme: Parament by Automattic.