Wednesday, May 28, 2014

json-ld (part 1 of 3)

Subject: json-ld (part 1 of 3)

  • note: originally emailed 05/28/2014 and sanitized for public consumption
  • sidenote: posting here so i can lead people here whenever they ask me about this stuff...
  • series: part 2 & part 3



[Boss,]

Over the weekend, I looked into more about the JSON-LD stuff -- I get what it's doing -- but, we [are not] building a social network nor do we want dynamically generated 'queries' in areas that should be 'sanitized' (input validated, [...] etc.).

That said, the inventor of JSON-LD complained about a lot of things and the reason for creating JSON-LD (but hated on quad store a.k.a. named-graph).

I'll getting to the "sparkle" part in just a bit. But, here's a sneak peek:



Anyways, if you ever read any of Microsoft's HTML exporter from their Word app you would see things like:
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
xmlns="http://www.w3.org/TR/REC-html40">
<head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><title></title>
<style>
...
See all those xmlns: items?

Those are never used outside of your work, except for tracking purposes outside of your company. To "help" them figure out what you're document "means" instead of just a bunch of "content". This is what is known as the RDF annotation. RDF stands for Resource Description Format -- basically meta data for your content.


So, going back to JSON-LD: they want to transform something like this:
  • http://XYZ/ajax/api/path.php?user=name1
  • That would return something like this:
    • { "result" : "pass", "balance" : "111111" }
  • To returning something like this:
    {
        "@context": {
            "name": "http://xmlns.com/foaf/0.1/name",
            "balance": "http://json-ld-server/rdf/0.1/name",
        },
        "name": "X name1",
        "balance": "111111"
    }
    
  • In other words, you need to describe what the data is -- instead of just dumping it.
    • Do note, this will also mean there's no stopping them from changing the simple ajax request of:
      • http://XYZ/ajax/api/path.php?user=name1
    • To something more convoluted like:
      • POST: http://json-ld-server/
      • POSTDATA:
        {
            "@context": {
                "name": "http://xmlns.com/foaf/0.1/name",
                "query": "http://json-ld-server/rdf/0.1/query",
            },
            "name": "X name1",
            "query": "balance"
        }
        
  • Again, all meant for systems outside of ours to help them understand our system (i.e. route around/through our data)...

Finally, SPARQL (pronounced -- sparkle) can be seen like this: S(PAR)QL -- which stands for: SPARQL Protocol and RDF Query Language
  • This allows you to do all things SQL (CREATE, INSERT, UPDATE, DROP, etc.) with this terse way of representing all of the data (highly error prone if written by humans -- this will need to be generated with tools just to be safe)
  • The named-graphic link above earlier, shows some examples -- but it's still means this needs someone to write the query... this is all duplicated work...

Tuesday, February 11, 2014

[ containers ]

Subject: [ containers ]
12/17/2012 06:21 PM

  • note: originally emailed 02/11/2014 and sanitized for public consumption
  • sidenote: posting here so i can lead people here whenever they ask me about this stuff...


XXX mentions this way up the [internal] thread:
  • "we see open systems that move away from the monolithic closed stack (old way of delivering transactional systems) as the way forward." ...
  • "we see products such as the [abc] product converging with [xyz] POS solutions that allow us to extend our networks to open new and interesting sales channels (and other services such as promotions/advertising). it is a really exciting time."

I like the direction this is going.


It is no secret for my absolute disdain for VMware and those type of giant images (monolithic -- full OS on an image).  Don't get me wrong -- I love LIVE distros (very flexible -- more importantly, runs on the bare metal) -- I just hate full blown 'images' that runs in a VM (too slow).


That said, projects like the docker *IS* the future of server/[software deployment] (fast and easy).  <snip>

(Update: TODO: add link to unikernel post)


Here are some links for the OpenStack environment:


Sent: 12/17/2012 06:21 PM
Subject: [ server 1 & server 2]

Wow, it took about 2 hours to dance with vmware.

I would like to re-iterate my absolute detestation for OS-level virtual-machines.

In fact, just like my prediction of [xyz] going away -- I am going to say by the time we hand off [abc], it will NOT be a VMware image.

(I could NOT believe how LONG it took to make windows [change from] a static IP to dynamic and vice versa -- did this on the DB VM and was shocked at how long it took windows [on vmware] to complete that task -- it was faster to reboot the [image] instead of waiting for it to complete [the manual change over].)

<snip>

Monday, February 10, 2014

webGL supplemental

Subject: webGL supplemental

  • note: originally emailed 02/10/2014 and sanitized for public consumption
  • sidenote: posting here so i can lead people here whenever they ask me about this stuff...



I forgot that I sent myself some links to write up about last weekend.  And over this past weekend I found more stuff.  < SNIP >

webGL traction

3D modeler, animation and scene editor in a browser

webGL development

webGL demos

There’s a pile out there:


[...] I think that’s enough for now…



Thursday, February 6, 2014

webGL

Subject: webGL

  • note: originally emailed 02/06/2014 and sanitized for public consumption
  • sidenote: posting here so i can lead people here whenever they ask me about this stuff...


From: [name1]
The limiting factor (as expressed in the posts comments) is that it is depending on webGL – a standard/feature that has very little traction just yet.

From: [name2]
Ohhhhh Nick is going to freak out at you [name1]  :)


All major desktop browser supports webGL. But, whether they are enabled (by default) is another question.

webGL is even supported in IE11: (even though they had a kung-fu death grip on their Direct3D < SNIP >)


Most 'native' mobile browsers do not (out of the box) support webGL.  But, again, all major mobile browsers do -- and one in particular requires to be jailbroken to be enabled or a ‘custom browser’ built with the iAd library.
  • I will say that mobile makers will try to delay webGL on their hardware as far away as possible due to the power hungry usage 3D visuals normally chews up compared to basic 2D render once and draw counterparts...  anyways...


Now, as to whether there’s little traction or not:


[...] O'Reilly books [...] wrote this:



Little traction, huh...



I will make this prediction:  (oh wait, I already did -- RE: News: Epic shows... & Unity Dropping Flash...)...



  • Let's go along the lines of my last claim that: HTML5 will kill flash projects in [XXX]:
    • webGL will be used on [XXX product]s running off of webservers
      • true multi-game deployment
      • no custom OS requirements
      • easy on-the-fly upgrades
      • easy versioning deployment
      • etc. etc. etc.


    Tuesday, November 5, 2013

    Git branch naming

    Subject: Git branch naming

    • note: originally emailed 10/30/2013 and sanitized for public consumption
    • sidenote: posting here so i can lead people here whenever they ask me about this stuff...



    Sent by XXX:
    > One thing I was thinking about since we are going to start using
    > branches a lot more is that we start labeling branches versus tags. Say
    > something like….'feature-branch' or 'feature-B' and
    > 'ZZZ-1.1-T' or ZZZ-1.9-release'. This way it is easier to see
    > which branches are tags and which branches are tags for release.


    Don’t confuse a branch with a tag.


    A tag is a ref like any other:
    git checkout -b branchname tag

    Which is a shortcut for
    git branch branchname tag
    git checkout branchname

    “You cannot checkout a tag.”

    http://www.gelato.unsw.edu.au/archives/git/0610/28708.html

    [ Git ]

    Subject: [ Git ]

    • note: originally emailed 11/05/2013 and sanitized for public consumption
    • sidenote: posting here so i can lead people here whenever they ask me about this stuff...



    Git is an extremely flexible and powerful revision control system.  PerForce was my #1 fav until Git showed up.

    Anyways, we had a new contractor start up here with us -- but has no CVS access.  So I've setup a dual RCS configuration where I would manually merge between our team's updates to CVS with the contractor's GIT repository.

    Quite possibility the easiest I have ever encountered.  I would love to see the whole organization move to GIT.


    That said, I have collected a number of links to get our contractor up to speed with GIT.

    *** must reads ***
    https://www.atlassian.com/git/workflows
    • branching workflow (very relevant to this current thread -- and please see the attached note: it was in my drafts folder -- it didn't seem appropriate to send it at the time, whereas now, it is obvious)

    http://www.slideshare.net/hbalagtas/simple-daily-workflow-with-git
    • a very good 'overview' of a lot of the common ways RCS can be used
    http://agilewarrior.wordpress.com/2012/04/17/git-workflow/
    • an example of why there's no 'central repository' in the GIT universe (so the excuse of "we don't have access to GIT to upload our changes -- we're stuck in the water!!!" isn't really true)


    The following are a little more terse and detailed, I highly recommend spending a few moments whenever you can:


    My most favorite feature of GIT is the "stash" command
    • you can "stash" you current work (i.e. a temp checkin to your local GIT depo)
    • which will _then_ revert your changes to your latest checkout (previous to your "changes")
    • do your work
    • checkin (commit)
    • and then "unstash" your work-in-progress, continuing as if nothing changed

    There is no limit to the number of stashes you can do...


    Btw, the VIM fugitive plugin is amazing.


    Enjoy!

    Wednesday, March 27, 2013

    [ LLVM ]

    Subject: [ LLVM ]

    • note: originally emailed 03/27/2013 and sanitized for public consumption
    • sidenote: posting here so i can lead people here whenever they ask me about this stuff...



    [BOSS,]

    [SNIP]

    While looking at the [XYZ] features, and wanting to use node.js – it is possible to take existing code (logic mostly) that can be 'converted' (for example, from C or C++) to run in the Google's V8 javascript engine – that node.js also uses.

    But this isn't about javascript.  The piece of technology I want to bring to attention is called LLVM – Low Level Virtual Machine.  This project was only called a VM for legacy reasons.  But LLVM is much much more.  It's now known as the "LLVM compiler infrastructure".


    Basically, it is possible to take (for example) a C++ library, convert it (for example) to javascript.


    And since we like pictures to help describe things:
    • At the core, the programming language is generated to an "intermediate representation" (IR)
    • This IR object can then be used to be 'compiled to' the target platform
      • This can hardware (machine code)
      • But can also be software (byte code)


    • Here's an example of how nVidia took the LLVM project make their CUDA compiler


    • Here's another example of how source code from one language can be used to generate source code in another language

    Here’s a pretty good slide deck intro to LLVM:

    Mozilla and UE GDC talk

    Subject: Mozilla and UE GDC talk

    • note: originally emailed 03/27/2013 and sanitized for public consumption
    • sidenote: posting here so i can lead people here whenever they ask me about this stuff...


    -----Original Message-----
    From: XXX
    Sent: Wednesday, March 27, 2013
    Subject: Mozilla and UE GDC talk

    I went to a talk given by mozilla and UE this morning. They demonstrated the UE3 engine, and game, running natively in the firefox web browser. Mozilla developed 2 tools that were used to port the engine
    • emscripten converts c/c++ into js
    • they created a js library called asm.js that creates and executes high performance java script. This is accomplished through AOT js compilation and by enforcing types in the js.
    [SNIP] UE and mozilla said this is the key to getting performance out of js running in a web browser.

    With the use of these tools they said the port took 1 week. The [UE3] running in a browser gets about half the performance of the native engine on the same hardware. It was a really impressive demo.  They showed a full game getting 60fps and said they can get 100fps.

    The solution requires webGL so it works with firefox, Chrome, safari and any browser that supports web gl. IE does not support webGL.

    Really cool stuff. What you can do natively in browsers (no plug ins) is very impressive.

    [Boss,]

    This jogged my memory a bit:

    About a year and a half ago: UE on flash and my comments about webGL under the hood.
    From: Nick Shin
    Sent: Friday, October 07, 2011 12:01 PM
    Subject: News: Epic shows Unreal Tournament 3... running in a web browser - ComputerAndVideoGames.com

    This is webGL under the hood. The fact that you need to go through a flash layer is, in my humble opinion, kinda redundant.

    Once webGL becomes open for public consumption (in other words, the browsers have them enabled by default) flash will go away.

    Flash will not run on iPad.

    You will see the Unreal Engine, Unity and all other game engines, 3D modelers and even 2D animation tools all move to webGL without the intermediary flash layer.

    [ ... SNIP ... ]


    -----Original Message-----
    From: [Boss]
    Sent: Friday, October 07, 2011 11:52 AM
    Subject: News: Epic shows Unreal Tournament 3... running in a web browser - ComputerAndVideoGames.com

    Thoughts? Would this run on an Android or iPad?
    http://www.computerandvideogames.com/321291/epic-shows-unreal-tournament-3-running-in-a-web-browser/

    Before that, I also wrote about emscripten
    Sent: Monday, June 20, 2011 6:20 PM
    Subject: Weekend Tech updates

    A few weeks ago, we were looking into javascript frameworks
    -----Original Message-----
    Sent: Tuesday, May 31, 2011
    Subject: JavaScript and UI Frameworks comparisons...

    Here's a fun page I just ran into recently:
    https://github.com/jashkenas/coffee-script/wiki/List-of-languages-that-compile-to-JS

    This basically means you can use (almost) any common programming languages to generate javascript code, greatly increasing the number of frameworks you can use.

    [ SNIP ]

    My most favorite: a C/C++ LLVM (low level virtual machine) to JavaScript compiler: Emscripten


    and I noted: Emscripten from the following project:
    • https://github.com/jashkenas/coffee-script/wiki/List-of-languages-that-compile-to-JS

    Continuing with the original email thread:
    We all know DOOM can run in a browser, but how many of you know how he did it?
    • http://www.readwriteweb.com/hack/2011/05/doom-ported-to-javascript-and.php

    [ ... SNIP ... ]

    Really, I thought this would be a good excuse to talk about the LLVM (low level virtual machine) project. [snip] LLVM practically replaces the need to learn that (old stuff) with a much easier to grasp and modern programming methods. As a bonus, you get to learn about compiling architectures. If you ever wanted to create your own programming language, as well as a compiler for it to run natively -- this is a really cool tool to use.




    A couple months ago, I wrote this to the lunch crowd: [a] full game engine that was also ported converted to JS (again via emscripten).
    Sent: Thursday, Janurary 17, 2013 9:12 AM
    Subject: Weekend Tech updates

    http://www.ubuntuvibes.com/2012/08/open-source-cube-2-sauerbraten-engine.html
    Here's the article I was talking about -> C++ project ported to JS (with webGL) via Emscripten.



    I really like where webGL is going.
    Sent: Monday, February 13, 2012 1:40 PM
    Subject: streaming full application to an HTML5 browser

    I'm a big fan of openGL and the 3D modeler Blender.

    Here's a fun project that shows a live feed of the 3D modeler's output in action in a webGL enabled browser.

    http://www.blendernation.com/2012/02/10/live-3d-stream-from-blender-to-browser/

    This is truly going to be the future of seamless, plug-in-less, extremely powerful apps in a browser.


    [ SNIP ]

    -----Original Message-----
    Sent: Wednesday, February 08, 2012 4:59 PM
    Subject: streaming full application to an HTML5 browser

    So I was reading through my RSS feeds and ran into this article:

    [ SNIP ]

    But it leads me to find this:

    http://www.webupd8.org/2011/09/gtk-32-released-with-html5-allows.html
    The HTML5 "Broadway" backend allows rendering GTK applications in HTML5-capable browsers.

    [ SNIP ]


    [ SNIP ]

    I've saved the following for last: but I will email it in a follow up message (it's been sitting in my drafts folder for a few weeks -- waiting for a good reason to send it [snip]...

    And this is the CORE of what [XXX] is talking about.  The AOT (ahead of time) 'compiler' part of the demo.

    What I'm talking about is LLVM - or Low Level Virtual Machine.


    The [new] thing I got out of the message [above] is "asm.js" - which isn't a javascript file that I can download and use.

    But it is a spec that I would *love* to see the browsers pick up and run with it.  However, I have some serious doubts that we'll see this get picked up by all major browsers and I don't think we'll see this on the mobile platform at all...

    =)