the phrygian cap


luisbg

@luisbg

luis@debethencourt.com



Ohloh profile for Luis de Bethencourt
Blogalia




<Octubre 2024
Lu Ma Mi Ju Vi Sa Do
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Creative Commons License


planet gnome
planet ubuntu
alberto ruiz
andy wingo
jeff fortin
slomo's blog
jan schmidt
vincent's random waffle



"all religions, arts and sciences are branches of the same tree. all these aspirations are directed toward ennobling man's life, lifting it from the sphere of mere physical existence and leading the individual towards freedom." albert einstein

C++ Cheat Sheet



I spend most of my time writing and reading C code, but every once in a while I get to play with a C++ project and find myself doing frequent reference checks to cppreference.com. I wrote myself the most concise cheat sheet I could that still shaved off the majority of those quick checks. Maybe it helps other fellow programmers who occasionally dabble with C++.

class ClassName {
  int priv_member;  // private by default
protected:
  int protect_member;
public:
  ClassName() // constructor
  int get_priv_mem();  // just prototype of func
  virtual ~ClassName() {} // destructor
};

int ClassName::get_priv_mem() {  // define via scope
  return priv_member;
}

class ChildName : public ClassName, public CanDoMult {
public:
  ChildName() {
    protect_member = 0;
  } ...
};

class Square {
  friend class Rectangle; ... // can access private members
};


Containers: container_type<int>
 list -> linked list
  front(), back(), begin(), end(), {push/pop}_{front/back}(), insert(), erase()
 deque ->double ended queue
  [], {push/pop}_{front/back}(), insert(), erase(), front(), back(), begin()
 queue/stack -> adaptors over deque
  push(), pop(), size(), empty()
  front(), back() <- queue
  top() <- stack
 unordered_map -> hashtable
  [], at(), begin(), end(), insert(), erase(), count(), empty(), size()
 vector -> dynamic array
  [], at(), front(), back(), {push/pop}_back, insert(), erase(), size()
 map -> tree
  [], at(), insert(), erase(), begin(), end(), size(), empty(), find(), count()

 unordered_set -> hashtable just keys
 set -> tree just keys

1721 Comentarios


Git Cheat Sheet



A few weeks ago I created this Git Cheat Sheet as a reference for commands I use at least once a month. I've found it useful and I'm sharing it so others find it useful too. There are also markdown and org-mode versions available.

  • Configure
    • git config –global user.name "[name]"
      • Sets the name you want attached to your commit transactions
    • git config –global user.email "[email address]"
      • Sets the email you want attached to your commit transactions
    • git config –global color.ui auto
      • Enables helpful colorization of command line output
    • git config –global push.default current
      • Update a branch with the same name as current branch if no refspec is given
    • git config –global core.editor [editor]
      • Which editor to use when commit and tag that lets you edit messages
    • git config –global diff.tool [tool]
      • Specify which command to invoke as the specified tool for git difftool

  • Create repositories
    • git init [project-name]
      • Creates a new local repository with the specified name
    • git clone [url]
      • Downloads a project nd its entire version history

  • Make changes
    • git status
      • Lists all new or modified files to be committed
    • git status -s
      • Short view of status
    • git diff
      • Shows file differences not yet staged
    • git add [file]
      • Snapshots the file in preparation for versioning
    • git add .
      • Add all modified files to be commited
    • git add '*.txt'
      • Add only certain files
    • git add –patch filename.x (or -p for short)
      • Snapshot only chunks of a file
    • git rm [file]
      • Tell git not to track the file anymore
    • git diff –staged
      • Show what has been added to the index via git add but not yet committed
    • git diff HEAD
      • Shows what has changed since the last commit.
    • git diff HEAD^
      • Shows what has changed since the commit before the latest commit
    • git diff [branch]
      • Compare current branch to some other branch
    • git difftool -d
      • Same as diff, but opens changes via difftool that you have configured
    • git difftool -d master..
      • See only changes made in the current branch
    • git diff –no-commit-id –name-only –no-merges origin/master…
      • See only the file names that has changed in current branch
    • git diff –stat
      • See statistics on what files have changed and how
    • git reset [file]
      • Unstages the file, but preserves its contents
    • git commit
      • Record changes to git. Default editor will open for a commit message
    • git commit -m "[descriptive message]"
      • Records file snapshots permanently in version history
    • git commit –amend
      • Changing the history, of the HEAD commit

  • Group changes
    • git branch
      • Lists all local branches in the current directory
    • git branch [branch-name]
      • Create a new branch
    • git checkout [branch-name]
      • Switches to the specified branch and updates the working directory
    • git checkout -b <name> <remote>/<branch>
      • Switches to a remote branch
    • git checkout [filename]
      • Return file to it's previous version, if it hasn’t been staged yet
    • git merge [branch]
      • Combines the specified branch's history into the current branch
    • git merge –no–ff [branch]
      • Merge branch without fast forwarding
    • git branch -a
      • See the full list of local and remote branches
    • git branch -d [branch]
      • Deletes the specified branch
    • git branch -D [branch]
      • Hard branch delete, will not complain
    • git branch -m <oldname> <newname>
      • Rename a branch

  • Refactor filenames
    • git rm [file]
      • Deletes the file from the working directory and stages the deletion
    • git rm –cached [file]
      • Removes the file from version control but preserves the file locally
    • git mv [file-original] [file-renamed]
      • Changes the file name and prepares it for commit

  • Suppress tracking
    • .gitignore
      • *.log
      • build/
      • temp-*
      • A text file named .gitignore suppresses accidental versioning of files and paths matching the specified patterns
    • git ls-files –other –ignored –exclude-standard
      • Lists all ignored files in this project

  • Save fragments
    • git stash
      • Temporarily stores all modified tracked files
    • git stash pop
      • Restores the most recently stashed files
    • git stash list
      • Lists all stashed changesets
    • git stash drop
      • Discards the most recently stashed changeset

  • Review history
    • git log
      • Lists version history for the current branch
    • git log –follow [file]
      • Lists version history for a file, including renames
    • git log –pretty=format:"%h %s" –graph
      • Pretty commit view, you can customize it as much as you want
    • git log –author='Name' –after={1.week.ago} –pretty=oneline –abbrev-commit
      • See what the author has worked on in the last week
    • git log –no-merges master..
      • See only changes in this branch
    • git diff [file-branch]…[second-branch]
      • Shows content differences between two branches
    • git show [commit]
      • Outputs metadata and content changes of the specified commit

  • Redo commits
    • git reset
      • Unstage pending changes, the changes will still remain on file system
    • git reset [commit/tag]
      • Undoes all commits after [commit], preserving changes locally
    • git reset –hard [commit]
      • Discards all history and changes back to the specified commit

  • Synchronize changes
    • git fetch [bookmark]
      • Downloads all history from the repository bookmark
    • git fetch -p
      • Update history of remote branches, you can fetch and purge
    • git merge [bookmark]/[branch]
      • Combines bookmark's branch into current local branch
    • git push
      • Push current branch to remote branch
    • git push [remote] [branch]
      • Manually specify remote and branch to use every time
    • git push -u origin master
      • If a remote branch is not set up as an upstream, you can make it so
    • git pull
      • Downloads bookmark history and incorporates changes
    • git pull [remote] [branch]
      • Specify to pull a specific branch
    • git remote
      • See list of remote repos available
    • git remote -v
      • Detailed view of remote repos available
    • git remote add [remote] [url]
      • Add a new remote

813 Comentarios


Notes from the GStreamer Summer Hackfest 2015





A week ago a dozen cool guys, who happen to be GStreamer developers, met at Montpellier for the GStreamer Summer Hackfest 2015. We got together to work for 3 days, over the weekend, without a fixed agenda. The hacking venue coworkin' Montpellier was provided by Edward Hervey (bilboed) and most meals were provided by GStreamer.

With the opportunity to work in the same room and enjoy the lovely city of Montpellier, developers speed up the patch reviews and fixes by being able to easily discuss them with colleagues through the high-bandwith low-latency face-to-face protocol. They also took the chance to discuss major features and try to settle on problems that have been waiting for design decisions for a long time in the community. This is a non-exhaustive list of work done in the event:

  • Performance improvement for Caps negotiations: Caps negotiation is part of the GStreamer applications startup and was vastly optimized. Initial tests show it is taking 49.6% less time to happen.


  • nvenc element: A new nvenc element for recent NVIDIA GPU's was made released. It currently implements h264.


  • 1.6 release: At the hackfest a few blocker issues were revisited to get the project ready for releasing version 1.6. This will be a stable release. The release candidate just took place right after the hackfest, the 1.5.90 version.


  • decodebin3 design proposal/discussion: A new version of the playback stack was proposed and discussed. It should maintain the same features of the current version but cover use cases needed by targets with restricted resources, such as embedded devices (TV, mobile, for example), and providing a stream selection API for applications to use. This is a very important feature for Tizen to support more hardware-enabled scenarios in its devices.


  • Moving to Phabricator: The community started experimenting with the recently created Phabricator instance for GSteamer's bug and code tracking. Tweaking of settings and scripts, before a full transition from Bugzilla can be made.


  • Improvements on GtkGLSink: The sink had flickering and scaling noise among some other problems. Most are now fixed.


  • libav decoders direct rendering: Direct rendering allows decoders to write their output directly on screen, increasing performance by reducing the number of memory copies done. The libav video decoders had their direct rendering redone for the new libav API as is now enabled again.


  • Others: improvements to RTP payloaders and depayloadres of different formats, discussions about how to provide more documentation, bug fixes and more.
    Without any major core design decision pending, this hackfest allowed the attendees to work on different areas they wanted to focus on and it was very productive in many fronts. With the GStreamer Conference being around the corner, people in the organizing committee discussed which talks should be accepted and other organizational details.


A huge gratitude note to our host, Edward Hervey (shown below). The venue was very comfortable, the fridge always stocked and the city a lot of fun!


Lively discussion about GST Streams and decodebin3


If you missed the notes from the previous Hackfest. Read them here

1932 Comentarios


Building GStreamer for Mac OS X and iOS



As part of the 1.4.3 release of GStreamer I helped the team by making the OS X and iOS builds. The process is easy but has a long sequence of steps. So it is worth sharing it here just in case you might want to run your own GStreamer in any of these platforms.

1. First, you need to download CMake
http://www.cmake.org/files/v3.0/cmake-3.0.2-Darwin-universal.dmg

2. Add CMake to your PATH
$ export PATH=$PATH:/Applications/CMake.app/Contents/bin

3. Prepare the destination (as root)
$ mkdir /Library/Frameworks/GStreamer.framework
$ chown user:user /Library/Frameworks/GStreamer.framework


4. Check out the GStreamer release code
$ git clone git://anongit.freedesktop.org/gstreamer/sdk/cerbero
$ cd cerbero
$ git checkout -b 1.4 origin/1.4


5. Pin the commits to build
edit config/osx-universal.cbc to have the following:

prefix='/Library/Frameworks/GStreamer.framework/Versions/1.0'

recipes_commits = {
'gstreamer-1.0' : '1.4.3',
'gstreamer-1.0-static' : '1.4.3',
'gst-plugins-base-1.0' : '1.4.3',
'gst-plugins-base-1.0-static' : '1.4.3',
'gst-plugins-good-1.0' : '1.4.3',
'gst-plugins-good-1.0-static' : '1.4.3',
'gst-plugins-bad-1.0' : '1.4.3',
'gst-plugins-bad-1.0-static' : '1.4.3',
'gst-plugins-ugly-1.0' : '1.4.3',
'gst-plugins-ugly-1.0-static' : '1.4.3',
'gst-libav-1.0' : '1.4.3',
'gst-libav-1.0-static' : '1.4.3',
'gnonlin-1.0' : '1.2.1',
'gnonlin-1.0-static' : '1.2.1',
'gst-editing-services-1.0' : '1.2.1',
'gst-rtsp-server-1.0' : '1.4.3',
}


6. Run the bootstrap
$ ./cerbero-uninstalled bootstrap
$ echo "allow_parallel_build = True" > ~/.cerbero/cerbero.cbc


7. Run the build for OS X. Patience, it needs to build ~80 modules.
$ ./cerbero-uninstalled -c config/osx-universal.cbc package gstreamer-1.0

8. Run the build for iOS. Some extra steps are necessary for this build.
$ ./cerbero-uninstalled -c config/cross-ios-universal.cbc buildone gettext libiconv
$ ./cerbero-uninstalled -c config/cross-ios-universal.cbc package gstreamer-1.0
$ ./cerbero-uninstalled -c config/cross-ios-universal.cbc buildone gstreamer-ios-templates



edit: The last step, rebuilding gettext and libiconv, is not needed anymore thanks this bug fix
http://cgit.freedesktop.org/gstreamer/cerbero/commit/?id=b6acf4aa85c1e43b445fd3a292a9109854044df1

665 Comentarios


Now Samsung @ London





I just moved back to Europe, this time to foggy London town, to join the Open Source Group at Samsung. Where I will be contributing upstream to GStreamer and WebKit/Blink during the day and ironically mocking the local hipsters at night.

After 4 years with Collabora it is sad to leave behind the talented and enjoyable people I've grown fond of there, but it's time to move on to the next chapter in my life. The Open Source Group is a perfect fit: contribute upstream, participate in innovative projects and be active in the Open Source community. I am very excited for this new job opportunity and to explore new levels of involvement in Open Source.

I am going to miss Montreal. It's very particular joie de vivre. Will miss the poutine, not the winter.

For all of those in London, I will be joining the next GNOME Beers event or let me know if you want to meet up for a coffee/pint.

479 Comentarios


GStreamer and emacs



Debug logs are an extremely helpful tool in the GStreamer developer's toolbox.
Most will say you can't live without them.

Something I've always missed when reading them is a convenient way to jump back and forth between the logs and the source code. So I went ahead and wrote an emacs mini mode that does exactly this:

emacs-gstreamer
an emacs mini module to navigate GStreamer debug logs.


When hitting Enter or M-. in a log file it will open the source code to the line that generated that debug message. If you have multiple emacs windows open, it will open the GStreamer source code file in the second to last active so you can continue reading the log in the active window. If you only have one window open it will open the source code file in the current one. After that you can use your favorite window and buffer handling to surf the files. Read, learn, write, and develop.

Click here to watch a screencast


To get it running you need to have loaded a tags table with the source code. Read this other article to learn how. I run it as part of my gst-uninstalled script.
Then just run M-x gst-debug in the debug log file's buffer.

Let me know if it helps your development workflow!

361 Comentarios


snappy has arrived to 1.0



snappy is an open source media player that gathers the power and flexibility of GStreamer inside the comfort of a minimalistic Clutter interface.

The snappy development team is proud to announce it's 1.0 release.
Codename: "I'll be back", Terminator

We think the project has achieved the maturity worthy of a 1.0 release. It does one thing and it does it well.



Some of the changes you will notice are:
  • It’s been given some needed visual polish
  • Playback speed adjustable
  • Video and audio synchronization tweeking
  • Time left of stream viewer
  • Better drag and drop
  • Better media history handling
  • More features accessible from Clutter interface
  • Bug fixes


Features already included from previous releases:
  • Subtitle support
  • Desktop launcher
  • Video and audio synchronization tweeking.
  • Multi-screen full-screen
  • Media queues
  • History of played media
  • Seeking/muting/cycling through languages (audio streams)
  • Frame stepping
  • Much more


Download a tarball: xz
Clone the git repo
Packages in distributions will be updated soon


Thanks to all who helped in snappy's creation!


Disclaimer: No moose were harmed during the making of this release. One got homesick and an other disappeared for days in a Breaking Bad marathon, but that's about it.

484 Comentarios


Resilience



"It always seems impossible until its done."
Nelson Mandela



My first Soyuz simulator! Summer 1964, nearly 5 years old."
Chris Hadfield

278 Comentarios


Why Coding Is Fun





"First is the sheer joy of making things. As the child delights in his mud pie, so the adult enjoys building things, especially things of his own design. [...]

Second is the pleasure of making things that are useful to other people. Deep within, we want others to use our work and to find it helpful. [...]

Third is the fascination of fashioning complex puzzle-like objects of interlocking moving parts and watching them work in subtle cycles, playing out the consequences of principles built in from the beginning. [...]

Fourth is the joy of always learning, which springs from the non-repeating nature of the task. In one way or another the problem is ever new, and its solver learns something; sometimes practical, sometimes theoretical, and sometimes both.

Finally, there is the delight of working in such a tractable medium. The programmer [...] works only slightly removed from pure thought-stuff. He builds his castles in the air, from air, creating by exertion of the imagination. Few media of creation are so flexible, so easy to polish and rework,so readily capable of realizing gran conceptual structures.

Yet the program construct [...] is real in the sense that it moves and works, producing visible outputs separate from the construct itself.
"



From Fred Brooke's "Mythical Man Month"
Image from Hello Ruby

395 Comentarios


OpenStack Swift and Temporary URLs How To



One of the many amazing features of Swift, OpenStack's object storage component, is how it creates URLs to provide temporary public access to objects. Thanks to the middleware component called tempurl. For example, imagine a website wants to provide a link to a media file stored in Swift for HTML5 playback. Instead of needing a Swift account with public access, and all the problems that would bring, Swift can generate a URL with limited access time to the resource. This way the browser can access the object directly instead of needing the website to act as a proxy and objects can selectively be made publicly accessible without compromising the rest or using expensive copies between private to public accounts. If the link is accidentally leaked, the access is time limited until the expiration time set.

So how do you use this temporary urls? Glad you asked.

Let's assume you have the following Swift installation:
http://192.168.1.42:8080

Account: AUTH_data
Container: media
Object: example_obj


The first thing we need to do is add temporary URL secret keys to the Swift account. Since tempurl will look at the Temp-URL-Key and Temp-URL-Key-2 metas when an object is requested through a temporary URL to decide if access is allowed. Only one key is neccessary, but a second one is useful to rotate through keys while keeping existing temporary urls validated. Any arbitrary string can serve as a secret key.

We add the temporary urls secret keys with the command:
$ swift post -m "Temp-URL-Key:secrete_key_a"
$ swift post -m "Temp-URL-Key-2:secrete_key_b"


Once we have the keys we can allow public access to objects. The easiest way is to use the tool swift-temp-url which returns a temporary URL. The arguments it needs are; HTTP method, availability period in seconds, object path and one temp-url-key. For example to GET the object we mentioned above:

$ swift-temp-url GET 60 /v1/AUTH_data/media/example_obj secret_key_a

/v1/AUTH_data/media/example_Obj?temp_url_sig=b9746f2e38313635257877abdb8340c48ebd622c&temp_url_expires=1392925673


Now you can retrieve the file via this temporary URL, you just need to add the hostname to have the full URL.

$ curl http://192.168.1.42:8080/v1/AUTH_data/media/example_Obj?temp_url_sig=b9746f2e38313635257877abdb8340c48ebd622c&temp_url_expires=1392925673


Eventhough you probably already guessed it, let's note the format of the temporary URL. Typical object path, plus temp_url_sig, and temp_url_expires.
In this example:

http://192.168.1.42:8080/v1/AUTH_data/media/example_Obj?
temp_url_sig=b9746f2e38313635257877abdb8340c48ebd622c&
temp_url_expires=1392925673


There you have it. Notice we set it up for a GET method. You could do the same with a PUT method to allow a user to push data to a specified path. Perhaps using this in combination with browser form post translation middleware to allow direct-from-browser uploads to specific locations in Swift. Besides GET and PUSH, you can use HEAD to retrieve the header of the object.

At this stage you must be happy to see how easy and convenient this is, but wondering how you can integrate it with your code. You can replicate swift-temp-url with the following block of Python code:

import hmac
from hashlib import sha1
from time import time

# Get a temporary public url for the object
method = 'GET'
duration_in_seconds = 60*60*3
expires = int(time() + duration_in_seconds)
path = '/v1/AUTH_test/%s/%s' % (self.container, track)
key = self.temp_url_key
hmac_body = '%s\n%s\n%s' % (method, expires, path)
sig = hmac.new(key, hmac_body, sha1).hexdigest()
s = 'https://{host}/{path}?temp_url_sig={sig}&temp_url_expires={expires}'
url = s.format(host=self.url, path=path, sig=sig, expires=expires)



Have in mind that any alteration of the resource path or query arguments results in a 401 Unauthorized error. Similarly, a PUT where GET was the allowed method returns a 401. HEAD is allowed if GET or PUT is allowed. Changing the X-Account-Meta-Temp-URL-Key invalidates any previously generated temporary URLs within 60 seconds (the memcache time for the key).

That's all for now. What else would you like to learn regarding Swift?

293 Comentarios


Happy Birthday Grace Hopper





Link to video for people in planets.



"She developed the first compiler for a computer programming language. She conceptualized the idea of machine-independent programming languages, which led to the development of COBOL, one of the first modern programming languages. She is credited with popularizing the term "debugging" for fixing computer glitches (inspired by an actual moth removed from the computer)." Wikipedia

By the way, for anybody wondering why the COBOL in the Google Doodle for her today:
"SUBTRACT CurrentYear from BirthYear GIVING Age
Display Age"
doesn't return a negative value, it is because age is defined unsigned in the data division. Since ages can't be negative, and COBOL handles this negative return to an unsigned value Gracefully.

288 Comentarios


Basic Data Structures and Algorithms in the Linux Kernel



Thanks to Vijay D'Silva's brilliant answer in cstheory.stackexchange.com I have been reading some of the famous data structures and algorithms used in the Linux Kernel. And so can you.

Links based on linux 2.6:

2704 Comentarios


Minimalist illustrations reflective of Modern time




Technology Pride




Inner Child




Icons that screw up our day





more at cinismoilustrado.com

1115 Comentarios


GStreamer Conference 2013






I just returned from the GStreamer Conference at Edinburgh and I'm still processing the extremely interesting conversations we had there. Once again the conference was a great success, fascinating and great fun. Big kudos to the awesome organizers.

After a quick welcome by Christian Schaller, Tim-Phillip Muller gave the keynote. His approach was to get the ball rolling and get the conversation going from the beginning, instead of giving the usual summary of what has happened in the last year he looked forward into the future and talked about taking GStreamer to the next level. Not only patting ourselves in the back for a good year of development but also reminded us of what is missing and should be done. Afterwards he asked the audience and there was heavy emphasis in more and better documentation and testing from the participants.

Thanks to Tim the hall conversation where very constructive from the get-go, but after the coffee break I went back to the Kylsith room to be amazed by David Röthlisberger's automated testing of set-top boxes user interfaces. He introduced us to stb tester, which is occam's razor applied to testing. With the power of OpenCV and GStreamer, they have built a Python state machine that navigates the menus of the set-top box by triggering infrared signals, recognizes patterns/behaviour on the screen and checks any use case you might consider.

Right after came David Schleef, who was been working on GStreamer Streaming Server. Solving the common and interesting modern web problem of smooth streaming, via bitrate switching and adaptive streaming. Thanks to his work you can easily stream live video streams to thousands of clients from an HTTP server. I definitely plan to play with this technology in the near future.

My two favorite talks were yet to happen. Tuesday brought us Edward Hervey talking about Time \ and Synchronization. I appreciate that he took the time, no pun intended, to explain the concept of time itself before the actual problem of synchronizing with it. A refreshing summary about how time isn't a thing or a unit, but durations of time are what we use. How clocks work and how sometimes there is no reference on when they started and their pace, which complicate things. Ending with the three times GStreamer has and why. This topic is too long and enjoyable to do it any justice by summarizing it, I will update once Ubicast has the talk videos out. I recommend watching it.

Wednesday had the surprise of the conference. Håvard Graff presented gst-harness. A deterministic testing infrastructure for GStreamer that can properly test elements in a self contained sandbox. They are planning to merge this into gst-tools before the end of the calendar year. Of everything I saw and heard during the conference, this is without a doubt, the thing that could change the GStreamer ecosystem the most. Huge potential for improving and solidifying the stability of the elements.

All in all, the GStreamer Conference is still my favorite conference of the year. The content of the talks is just superb, and tied with GUADEC with how cool the attendants are. Big hug or chest bump to everybody I talked with there, and a big thank you to the organization and sponsors. See you all next year!

740 Comentarios


The Git Hobgoblin



All the credit to Steve Losh



A novice was learning at the feet of Master Git. At the end of the lesson he looked through his notes and said, “Master, I have a few questions. May I ask them?”

Master Git nodded.

“How can I view a list of all tags?”

git tag“, replied Master Git.

“How can I view a list of all remotes?”

git remote -v“, replied Master Git.

“How can I view a list of all branches?”

git branch -a“, replied Master Git.

“And how can I view the current branch?”

git rev-parse --abbrev-ref HEAD“, replied Master Git.

“How can I delete a remote?”

git remote rm“, replied Master Git.

“And how can I delete a branch?”

git branch -d“, replied Master Git.

The novice thought for a few moments, then asked: “Surely some of these could be made more consistent, so as to be easier to remember in the heat of coding?”

Master Git snapped his fingers. A hobgoblin entered the room and ate the novice alive. In the afterlife, the novice was enlightened.


402 Comentarios


snappy 0.3 is out!



snappy is an open source media player that gathers the power and flexibility of GStreamer inside the comfort of a minimalistic Clutter interface.

The snappy development team is proud to announce it's second release: 0.3
codename: "Rosebud", Citizen Kane



Some of the changes you will notice are:
  • UI redesign with nicer icons and layout.
  • Has a cool logo
  • It is a GNOME Project
  • Sample video player of the GStreamer SDK
  • Drag and drop media files into snappy
  • Support for subtitle streams
  • Ported to GStreamer 1.0
  • Launcher from the desktop
  • Works in Windows, OS X and Android
  • Multi-screen Desktop full-screening
  • Support for media queues
  • Code style fixes for readibility
  • Option to run without a User Interface
  • More bug fixes than we are proud of :P


Give it a spin and let us know how it can be even better for you.

download a tarball: bz2, gz or xz
clone the git repo
packages in distributions will be updated soon



Thanks to all who helped in snappy's 0.3 creation!


Disclaimer: No narwhals were harmed during the making of this release. One got homesick and an other disappeared for days in a The Wire marathon, but that's about it.

503 Comentarios


Do you use Vim? donate to Uganda



Independently of where you stand in the Vim versus Emacs infamous battle, it is hard to deny that Vim is an amazing text editor, but did you knew about Vim's peculiar license? Vim is charityware, with a GPL-compatible license. It's distributed freely, but they ask that if you find it useful you make a donation to help children in Uganda through the ICCF.



Bram Moolenaar, author and maintainer of Vim, helped establish a foundation called ICCF Holland that works to support a children's center in Uganda. He encourages users to consider making a donation to this foundation, which he serves as treasurer of and visits the site in Uganda nearly every year to monitor the center's progress.

You can become a registered user by sponsoring 10 euros or more, and you can vote for new features. Amazing.

Inside Vim try :help sponsor, and :help uganda, for more information.

299 Comentarios


Vector killed the pixel star





Might the pixel be on it's way out and dead in 5 years? This project developing a vector based video codec predicts so. The project team consists of researches of the University, Root6 Technology, Smoke & Mirrors and Ovation Data Services.

The pixel isn't perfect. A grid simplification of the original image, at any scale bigger than it was intended the image looks blocky. To that add the aliasing problems regarding edges and lines that don't match the grid nicely, and even at the original size things can look chunky.

The transition from pixel based bitmaps to vector based images has been happening for a long time in the static image world. This team of researchers is saying this is also a better way to record moving images and that it will replace the pixel in five years.

The team developed something called a vector-based video codec that attempts to overcome the challenges of a typical vector display. A typical vector display features drawn lines and contoured colors on a screen (rather than the simple, geometrical map of pixels we're all accustomed to). But it has problems--notably, areas between colors can't be filled in well enough for a high-quality image to be displayed, the researchers say.

Professor Phil Willis, from the University's Department of Computer Science, said: "This is a significant breakthrough which will revolutionize the way visual media is produced."

Read more here.

299 Comentarios


hipstercrite



Lyra Howell, a talented artistic friend, coined the word 'hipstercrite' during a recent conversation. I couldn't help laughing at the pure genius and wordsmith-juggling skill of her creation and now want it to become part of our urban lingo:

hip·ster·crite
/ˈhipstərkrit/

Noun
1. A person who hates on so-called hipsters while actually being a hipster himself and denies it.


I secretly wait for any conversation where I can drop and share this new gem into the urban vernacular.

Apparently the word already exists in urban dictionary. Proving once again the rule that if it doesn't exist on the internet, it doesn't exist. Damn you internets full of hipstercrites, even the domain (which I wanted to buy) is gone.


364 Comentarios


Primeval C: two very early compilers



Dennis Ritchie, the creator of the C programming language and co-creator of UNIX operating system, had been curating some old DECtapes, and he offered some of the artifacts. Unfortunately existing tapes lack interesting things like earliest Unix OS source, but some indicative fossils have been prepared for exhibition.

"As described in the C History paper, 1972-73 were the truly formative years in the development of the C language: this is when the transition from typeless B to weakly typed C took place, mediated by the (Neanderthal?) NB language, of which no source seems to survive. It was also the period in which Unix was rewritten in C.

In looking over this material, I have mixed emotions; so much of this stuff is immature and not well-done, and there is an element of embarrassment about displaying it. But at the same time it does capture two moments in a period of creativeness and may have some historical interest.

Two tapes are present here; the first is labeled "last1120c", the second "prestruct-c". I know from distant memory what these names mean: the first is a saved copy of the compiler preserved just as we were abandoning the PDP-11/20, which did not have multiply or divide instructions, but instead a separate, optional unit that did these operations (and also shifts) by storing the operands into memory locations. [...]

"prestruct-c" is a copy of the compiler just before I started changing it to use structures itself.

It's a bit hard to get really accurate dates for these compilers, except that they are certainly 1972-73. There are date bits on the tape image, but they suffer from a possible off-by-a-year error because we changed epochs more than once during this era, and also because the files may have been copied or fiddled after they were the source for the compiler in contemporaneous use.

The earlier compiler does not know about structures at all: the string "struct" does not appear anywhere. The second tape has a compiler that does implement structures in a way that begins to approach their current meaning. Their declaration syntax seems to use () instead of {}, but . and -> for specifying members of a structure itself and members of a pointed-to structure are both there.
"

mortdeus, from Hacker News, has mirrored these files into a github repo where you can view these files.

Read more at Dennis Ritchie's original article.

1988 Comentarios


©2007-2015 luis de bethencourt guimera
powered by Blogalia