My photo

Mildred's Website

Tags:
My avatar

GoogleTalk, Jabber, XMPP address:
mildred@jabber.fr


GPG Public Key
(Fingerprint 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B)

Category: comp

Articles from 20 to 29

Wed 28 Nov 2012, 02:49 PM by Mildred Ki'Lya comp dev en lisaac lysaac

The overlooked problem

Let me explain the reason why I think Lisaac is broken and why I stopped working on it. The fundamental concept behind it is completely broken, and i never could solve the problem. First, let me explain a few things about Lisaac:

  • It is statically typed (like Eiffel)
  • It is prototype based (like Self)

It may not seem like it but those two things are mutually exclusive, unless something is done to reconcile the two. Being statically typed means you know the type (or a parent of the real type) at compile-time. Being prototype based means that the type can change completely.

Imagine you have a CUCUMBER that inherit VEGETABLE. If at some point during run-time, the cucumber inherit SOFTWARE (yes, cucumber is the name of a software as well) you have a problem. Yet, this is not the problem I want to talk about.

Lisaac solve this problem because you can only assign a child type as a parent. In the following object:

 Section Header
   + name := CUCUMBER;
 Section Inherit
   + parent :VEGETABLE := ...;

So, you're forbidden to assign a SOFTWARE in the parent slot because SOFTWARE is not a child of VEGETABLE. But, you're allowed to assign a GREEN_VEGETABLE. So not it becomes:

 Section Header
   + name := CUCUMBER;
 Section Inherit
   + parent :VEGETABLE := GREEN_VEGETABLE;

Now, let's say you send a message to your cucumber, and through the magic of inheritance, you end up in a slot of the parent. That is, you are executing code that is located in GREEN_VEGETABLE. Then, you have a problem.

 Section Header
   + name := GREEN_VEGETABLE;
 Section Public
   // inherited from VEGETABLE
   - do_something <- paint_it_green;
 Section Private
   // specific to GREEN_VEGETABLE
   - paint_it_green <- ( "green".println; );

In the code above, if you are executing the do_something slot and have SELF = CUCUMBER, you can't possibly call the paint_it_green slot because it does not exist in CUCUMBER, and the Lisaac compiler will refuse to compile your code. To explain it another way, the type of Self is not compatible with GREEN_VEGETABLE, and this is a problem for this is the code we are executing. You can't easily solve this problem.

In the Self language, if you had a similar situation, it would work because it is not statically typed. It would have failed to find paint_in_green in the cucumber and called the parent, which would have been a green vegetable. Somehow, the type of the cucumber would have changed at runtime, which is incompatible with a type system that can only compute types at compile time (and have them immutable at run time).

So, I stopped working on Lisaac

I tried to start up a new project, Lysaac, but got confronted to the same problem once the compiler was mature enough to start getting into inheritance. So I stopped again. Life getting in the way didn't help.

A new hope

I tried to look into virtual machines, convincing myself that compiled languages couldn't possibly answer such need to dynamic things in the language. I looked at Self for the first time. I tried to build a virtual machine that was fully concurrent. I looked at the Go language because I know that it has nice concurrent primitives ... and I found illumination.

The Go language feels like a dynamic language, but it is compiled. I always wondered how it could implement duck typing, and I found out. I also realized that the difference between a virtual machine with a JIT compiler, and a runtime for a compiled language that included a compiler was very narrow. Basically, nothing prevents any language from being compiled instead of being JIT compiled. You just have to include a compiler in the standard library.

Ironically, that what Common Lisp is doing.

A new language

I like how Go implements interfaces, and I want to do the same. In this new language, an object is composed of :

  • an opaque work (pointer sized)
  • a pointer to an interface

An interface is a collection of pointers to functions. There is always a pointer for the fallback implementation and a pointer for the case operation (to case an object to a new interface).

I want to use a smalltalk/Io type syntax. So the following will represent an object with one variable and one slot:

 obj := {
   var := obj slot;
   slot <- { ... };
 }

The data word of obj would be a pointer to a struct containing the variable "var" The interface of obj would be:

  • a function pointer for the fallback implementation that throws an error
  • a function pointer for the "cast" operation
  • a function pointer for the "slot" slot

I haven't figured out yet how to pass parameters to functions and return objects. This kind of things will require to comply to predefined interfaces (we need a way to tell which object type is returned by a slot for example). Interfaces would probably be defined at compile time and available as constants in code at run time (to be given as parameter to the cast slot).

If I want to be able to compile on the fly the code, I need to include the LLVM library. So I need to implement the language in a language that is compiled using LLVM (so bootstraping will be easier).

Thu 13 Sep 2012, 03:30 PM by Mildred Ki'Lya comp dev en idea wwwgen

I started writing wwwgen: a website generator that uses redo for its dependency tracking. Unfortunately, I might not have taken the correct approach to the problem. I reuse the webgen concepts, and that might be a bad idea.

Specifically, webgen (and my first version of wwwgen) are bottom-up systems (you take the sources and build everything they can generate). The problem is that redo itself is top-down (you take the target and build it, building sources as they are needed), and I tried to make the two match. It's very difficult, and impossible to do with a clean design.

What I'd like to have is a simple wwwgen binary that generates a HTML file from a source file. Let's imagine how it could work:

  • If the source file is a simple page with no templates, just generate the HTML and this is it

  • If the source file is a simple page with a template, redo-ifchange the template source and build the HTML combining the two

  • If the source file is an index, we have a problem because multiple outputs are generated. Redo doesn't support this case and we must find a way to make it work.

So, we have a problem here ...

Now, we have another problem. Specifically, my source file is called title.page and I want my output file to be title/index.html. In webgen, this is implemented by a configuration in title.page telling it to build in title/index.html.

There is a solution to solve both problems at once. the wwwgen command creates an archive (the formats needs to be defined, it could be tar, or different yaml documents in the same file for example). Then, the build process would be:

all.do:

 find src -name "*.src" \
   | sed 's/src$/gen/' \
   | xargs -d '\n' redo-ifchange
 find src -name "*.gen" \
   | xargs -d '\n' wwwgen unpack

default.gen.do:

 redo-ifchange "$2.src"
 wwwgen --redo-dependencies -o "$3" generate "$2.src"

wwwgen generate would parse the source file and generate an archive, that will be unpacked later by wwwgen unpack. Let's see how it can work:

  • The source file can choose where it unpacks, relatively to the directory where the source file is

  • If the source file is an index, it will redo-ifchange the other source files for the index and redo-ifchange the template, generate multiple pages packed together.

  • If the source file is a tag tree (a special source that doesn't output anything on its own but create index files dynamically), then it parses every child to find a canonical list of tags and the paths they refer to. Then, it creates the index files. Unfortunately, those index files will never be compiled until next build.

How an we improve the design to be able to create source files dynamically.

There are different views to the problem:

  • pages, index and tags should all generate all the output files they are related to. It means that index files should be able to generate pages, and tags should be able to generate indexes and pages.

  • pages should generate the output file, index should generate pages and feeds and tags should generate index.

  • mixed solution (the one described): pages generate output file, index should generate the output files as well and tags generates index.

How can we generate source files on the fly:

  • have a predefined compilation order: first tags, then index and lastly feeds and pages.

  • rebuild everything until no more source files are generated. We might build unnecessary things.

I prefer the second solution which is more flexible, but we need a way to avoid building things twice. For example, it's not necessary to build a page if on the next phase the page source is going to be regenerated.

Very simply, the generated page can contain a link to the index source file that generated it, and when generating the page, redo-ifchange is run on the index file.

Next question: what if a tag is deleted. The corresponding index page is going to stay around until the next clean. The tag page should keep around a list of index files it generated and delete them when a tag is no longer detected. And deleting the index should not be done using rm because the index will need to delete the pages it generated. The best solution would be to integrate to redo to detect these files.

The build scripts now are:

all.do:

 oldsrclist=
 srclist="$(find src -name "*.src")"
 while [ "$oldsrclist" != "$srclist" ]; do
   echo "$srclist" \
     | sed 's/src$/gen/' \
     | xargs -d '\n' redo-ifchange
   oldsrclist="$srclist"
   srclist="$(find src -name "*.src")"
 done

 find src -name "*.gen" \
   | xargs -d '\n' wwwgen unpack

default.gen.do:

 redo-ifchange "$2.src"
 wwwgen --redo-dependencies -o "$3" generate "$2.src"

Thu 02 Aug 2012, 11:15 AM by Mildred Ki'Lya comp dev en git

I was looking at Git, and which features may land in the next few releases, and I found the following things:

Git-SVN will be completely redesigned

If you worked with git-svn, you probably know that the git-svn workflow has nothing to do with git. Basically, you just have the svn history and have to use git-svn to push the changes back to the subversion repository. You can't use git-push and that's really annoying.

Recently, the git-remote-helpers feature was added. It allows git to interact with any kind of remote url, using a specific git-remote-* command. For example, you can already use mercurial this way (according to git-remote-hg):

Git allows pluggable remote repository protocols via helper scripts. If you have a script named "git-remote-XXX" then git will use it to interact with remote repositories whose URLs are of the form XXX::some-url-here. So you can imagine what a script named git-remote-hg will do.

Yes, this script provides a remote repository implementation that communicates with mercurial. Install it and you can do:

$ git clone hg::https://hg.example.com/some-mercurial-repo
$ cd some-mercurial-repo
$ # hackety hackety hack
$ git commit -a
$ git push

The plan is to do the same with subversion. You could just do:

 $ git clone svn::http://svn.host.org/repo/trunk/

Branches might be tricky to implement, they might not be there. But you will get what's already in git-svn but with a way better UI. And far more possibilities for the future.

Here is the summary from the GSoc page:

The submodule system of git is very powerful, yet not that easy to work with. This proposed work will strengthen the submodule system even more and improve the user experience when working with submodules.

Git repository: https://github.com/iveqy/git

Midterm evaluation: passed

Progress report / status:

  • [GSoC 11] submodule improvements at git mailing list
  • [GSoC 11 submodule] Status update at git mailing list
  • [RFC PATCH] Move git-dir for submodules at git mailing list

Submodules will be improved a lot

I wish it was already there. From the wiki page, the improvements will be:

As Dscho put it, submodules are the “neglected ugly duckling” of git. Time to change that …

Issues still to be tackled in this repo:

  • Let am, bisect, checkout, checkout-index, cherry-pick, merge, pull, read-tree, rebase, reset & stash work recursively on submodules (in progress)
  • Teach grep the --recursive option
  • Add means to specify which submodules shall be populated on clone
  • Showing that a submodule has a HEAD not on any branch in “git status”
  • gitk: Add popup menu for submodules to see the detailed history of changes
  • Teach “git prune” the “--recurse-submodules” option (and maybe honour the same default and options “git fetch” uses)
  • Better support for displaying merge conflicts of submodules
  • git gui: Add submodule menu for adding and fetching submodules
  • git status should call “git diff --submodule --ignore-submodules=dirty” instead of “git submodule summary” for providing a submodule summary when configured to do so.
  • Add an “always-tip” mode
  • Other commands that could benefit from a “--recurse-submodules” option: archive, branch, clean, commit, revert, tag.
  • In the long run git-submodule.sh should be converted to a rather simple wrapper script around core git functionality as more and more of that is implemented in the git core.

Submodule related bugs to fix

  • Cherry picking across submodule creation fails even if the cherry pick doesn’t touch any file in the submodules path
  • git submodule add doesn’t record the url in .git/config when the submodule path doesn’t exist.
  • git rebase --continue won’t work if the commit only contains submodule changes.

Issues already solved and merged into Junio’s Repo:

  • Since git 1.6.6:
    New --submodule option to “git diff” (many thanks to Dscho for writing the core part!)
    Display of submodule summaries instead of plain hashes in git gui and gitk
    
  • Since git 1.7.0:
    “git status” and “git diff*” show submodules with untracked or modified files in their work tree as “dirty”
    git gui: New popup menu for submodule diffs
    
  • Since git 1.7.1:
    Show the reason why working directories of submodules are dirty (untracked content and/or modified content) in superproject
    
  • Since git 1.7.2:
    Add parameters to the “--ignore-submodules” option for “git diff” and “git status” to control when a submodule is considered dirty
    
  • Since git 1.7.3:
    Add the “ignore” config option for the default behaviour of “git diff” and “git status”. Both .git/config and .gitmodules are parsed for this option, the value set in .git/config. will override that from .gitmodules
    Add a global config option to control when a submodule is considered dirty (written by Dscho)
    Better support for merging of submodules (thanks to Heiko Voigt for writing that)
    
  • Since git 1.7.4:
    Recursive fetching of submodules can be enabled via command line option or configuration.
    
  • Since git 1.7.5:
    fetch runs recursively on submodules by default when new commits have been recorded for them in the superproject
    
  • Since git 1.7.7:
    git push learned the --recurse-submodules=check option which errors out when trying to push a superproject commit where the submodule changes are not pushed (part of Frederik Gustafsson’s 2011 GSoC project)
    
  • Since git 1.7.8:
    The “update” option learned the value “none” which disables “submodule init” and “submodule update”
    The git directory of a newly cloned submodule is stored in the .git directory of the superproject, the submodules work tree contains only a gitfile. This is the first step towards recursive checkout, as it enables us to remove a submodule directory (part of Frederik Gustafsson’s 2011 GSoC project)
    

And the GSoC page:

The submodule system of git is very powerful, yet not that easy to work with. This proposed work will strengthen the submodule system even more and improve the user experience when working with submodules.

Git repository: https://github.com/iveqy/git

Midterm evaluation: passed

Progress report / status:

  • [GSoC 11] submodule improvements at git mailing list
  • [GSoC 11 submodule] Status update at git mailing list
  • [RFC PATCH] Move git-dir for submodules at git mailing list

Tue 28 Feb 2012, 11:07 AM by Mildred Ki'Lya comp en web

I just moved the site to webgen. For the occasion, forked the project on github and improved a lot of things. As webgen doesn't seem to be alive, I think I'll be the one maintaining it in the future.

I took the occasion to move my website over to my own web server, hosted at home. If I ever find it unsuitable, I can very easily host my website elsewhere as it is just a bunch of static pages.

More to come ...

Continue Reading ...

Wed 19 Oct 2011, 10:21 AM by Mildred Ki'Lya comp dev en privacy web

What is this all about: web privacy. We are tracked everywhere, and i'd like to help if possible. So, let's design a web browser that for once respects your privacy.

Main features:

  • Each website has its own cookie jar, its own cache and its own HTML5 local storage
  • History related css attributes are disabled
  • External plugins are only enabled on demand
  • Support for Tor/I2P is enabled by default
  • You have complete control over who receives what information
  • Let's you control in the settings if you want to allow referrers or not.
  • The contextual menu let's you open links anonymously (no referrer, anonymous session)

The browser is bundled with a particular UI that let you control everything during your browsing session. it is non intrusive and makes the best choice by default. I am thinking of a notification bar that shows at the bottom. I noticed that this place is not intrusive when I realized that the search bar in Firefox was most of the time open, even if most of the time I didn't use it.

First, let's define a session:

  • A session can be used my more than one domain at the same time.
  • A session is associated to a specific cache storage
  • A session is associated to a specific HTML5 storage
  • A session is associated to a specific cookie jar
  • A session acn be closed. When it is closed, session cookies are deleted from the session
  • A session can be reopened. All long lasting cookies, cache, HTML5 storage and such is then used again.
  • A session can be anonymous. In such a case, the session is deleted completely when it is closed.
  • A session is associated to none, one or more domains. These domains are the domains the end user can see in the address bar, not the sub items in the page.

Sessions are like Firefox profiles. If you iopen a new session, it's like you opened a new Firefox profile you just created. Because people will never create a different Firefox profile for each site.

If we want to protect privacy, when a link is opened, a new session should be created each time. To make it usable to browse web sites, it is made possible to share sessions in specific cases. Let's define the cases where it might be intelligent to share a profile:

  • You click a link or submit a form and expect to still be logged-in in the site you are viewing. You don't care if you follow a link to an external page.

    User Interface: If the link matches one of the domains of the session, then keep the session. No UI. If the user wanted a new session, the "Open anonymously" entry in the context menu exists. A button on the toolbar might be available to enter a state where we always want to open links anonymously.

    If the link points to another domain, then open the link in a new session unless "Open in the same session" was specified in the context menu. The UI contains:

    We Protected your privacy by separating <domain of the new site> from
    the site you were visiting previously (<domain of the previous site>).
    
    Choices: [ (1) Create a new anonymous session          | ▼ ]
             | (2) Continue session from <previous domain> |
             | (3) Use a previous session for <new domain> |
             | (4) Use session from bookmark "<name>"      |
    

    The first choice is considered the default and the page is loaded with it. If the user chooses a new option, then the page is reloaded.

    If the user chooses (2), the page is reloaded with the previous session and the user will be asked if "Do you want <old domain> and <new domain> to have access to the same private information about you?". Answers are Yes, No and Always. If the answer is Always, then in the configuration, the two domains are considered one and the same.

    The choice (3) will use the most recent session for the new domain. It might be a session currently in use or a session in the history.

    There are as many (4) options as there are bookmarks for the new domain. If different bookmarks share a single session, only one bookmark is shown. This choice will load the session from the bookmark.

    If (3) and (4) are the same sessions, and there is only one bookmark (4), then the (4) option is left out.

  • You use a bookmark and expect to continue the session you had for this bookmark (webmails)

    The session is simpely stored in the bookmark. When saving a bookmark, there is an option to store the session with it or not.

    [X] Do not save any personal information with this bookmark
    
  • You open a new URL and you might want reuse a session that was opened for this URL.

    The User Interface allows you to restore the session:

    We protected your privacy by not sending any personal information to
    <domain>. If you want <domain> to receive private information, please
    select:
    
    Choices: [ Do not send private information     | ▼ ]
             | Use a previous session for <domain> |
             | Use session from bookmark "<name>"  |
    

If you can see other use cases, please comment on that.

From these use cases, I can infer three kind of sessions:

  • Live sessions, currently in use
  • Saved sessions, associated to a bookmark
  • Closed sessions in the past, accessible using history. Collected after a too long time.

Now, how to implement that? I was thinking of QtWebKit as I already worked with Qt and it's easy to work with.

  • We have a main widget: QWebView. We want to change the session when a new page is loaded. So we hook up with the signal loadStarted.
  • We prevent history related CSS rules by implementing QWebHistoryInterface, more specifically, we store the history necessary to implement QWebHistoryInterface in the session.
  • We change the cache by implementing QAbstractNetworkCache and setting it using view->page()->networkAccessManager()->setCache(...)
  • We change the cookie jar by implementing QNetworkCookieJar and setting it using view->page()->networkAccessManager()->setCookieJar(...)
  • Change the local storage path using a directory dedicated for the session and using view->page()->settings()->setLocalStoragePath(QString)

After all that, we'll have to inspect the resulting browser to determine if there are still areas where we fail at protecting privacy.

Wed 28 Sep 2011, 10:42 AM by Mildred comp en privacy

Here is my Bug 660340. I created it after looking at the recent facebook 'enhancements' that makes privacy even more precious (article in French).

We need to quickly find a way to preserve our privacy on the Internet.

Hi,

With the recent threats of the various big internet companies on our privacy, it would be a great enhancement if epiphany allowed to have separate navigation contexts (cookies, HTML5 storage, cache) at will, and easily.

Some companies, especially facebook, and I suppose Google could do that as well, can use all kind of methods to track a user usiquely. using cache, HTML5 storage or cookies. I wonder if they can use the cache as well, but I heard it could be prevented. Firefox does.

One solution to counter these privacy threats is to have a different browser, or different browser profile, for each of the web sites we load. This is however very inconvenient, and it should made easily possible.

First let define the concept of session. A session is almost like a separate instance of the browser. It share bookmark and preferences with other session, but have separate cache, separate set of cookies and separate HTML5 DOM storage.

I imagine the following behaviour, based on the document.domain of the toplevel document:

  • If a page is loaded without referrer, and the domain is not associated with an existing session, start a new session for that domain

  • If a page is loaded without referrer, and the domain is a domain that is already associated with an existing session, then prompt non intrusively:

    "You already opened a session on example.com."
    Choices: [  Start a new session    ▼ ] [Use this session]
             [[ New anonymous session   ]]
             [  Replace existing session ]
    

    If the session is started anonymously, it would not be considered for reuse

  • If a page is loaded using a link from an existing window/tab, and the domain is the same, then share the session

  • If a page is loaded using a link from an existing window/tab, and the domain is NOT the same and, then a non intrusive message is displayed:

    "You are now visiting example2.com. Do you want to continue your session
    from example1.com?"
    Choices: [  Start a new session    ▼ ] [Share previous session]
    

    The "Start a new session" dropdown menu changes if the example2.com is already associated with a session or not. If example2.com is associated with a session:

     [[ New anonymous session            ]]
     [  Replace example2.com session      ]
     [  Use existing example2.com session ]
    

    If example2.com is not associated with a session:

     [[ New anonymous session    ]]
     [  New example2.com session  ]
    

The choices in [[xxx]] (as opposed to [xxx]) is the most privacy enhancing one, and would be the default if the user choose in the preferences

[x] allow me not to be tracked

The messages are non intrusive, they can be displayed as a banner on top of the page. The page is first loaded with the default choice, and if the user decides to use the other choice, the page will be reloaded accordingly (or the session will be reassigned).

This setting can traditionally be used to set the do not track header

Every settings should have a setting "do not prompt me again" that could be reset at some point.

About embedded content: Because toplevel pages do not share the same session (toplevel page opened at example.com have a different session than toplevel page opened at blowmyprivacy.org), if a page from example.com have embedded content from blowmyprivacy.org, the embedded content would not be able to track the user, except within the example.com website.

It is possible to imagine global settings that would hide some complexity:

[ ] When I load a page, always associate it with its existing session.
[ ] When I switch website, always reuse the existing session of the new
    website.

This user interface might seem complex at first, but it is far less complex than letting the user deal with different browser profiles by hand. Unfortunately, I don't think we can abstract privacy that easily. Keep in mind that all of these settings would be enabled only if the user choose to enable privacy settings.

I am ready to contribute to the implementation of this highly important feature (important for our future and our privacy). Do you think an extension might be able to do all of that, or do you think the browser code should be modified?

Further possible enhancements:

  • Add another choice for anonymous sessions using Tor (or I2P)

  • Add the possibility to have multiple session registered with the same domain. This would enable the user to have different profiles for the same website.

Fri 05 Aug 2011, 10:35 AM by Shanti comp en html web

First postulate: HTML was designed as a stateless protocol

Context: web sites need to maintain a context (or state) to track the client. This is required by the log-in procedures the various websites have. It is also useful to track the user in a web store, to know which items the user wants to buy. In fact, it is requires almost everywhere.

The first solution to be thrown out for this problem are the cookies. People didn't like cookies but now, everyone accepts them. Nothing works without cookies. Why did people dislike cookies back then? They liked their provacy and cookies makes it possible to track the user. Through advertisement networks, the advertiser known exactly which website the user visited. And it is still the case now. What changed is that the users got tried to fight cookies and have every website break, and they got used to it.

People got used to being tracked just as people are used to be watched by video cameras in the street and people are used to get tracked by the government and big companies and banks.

Cookies are a great way to track prople, all because HTTP didn't include session management. The way Google track you is very simple. Google Analytics puts a cookie on your computer and each time you access the Google Server, they know it's the same person. Google is everywhere:

  • Many web sites are using Google APIs, or the jQuery library at Google.
  • Many web sites ask Google to track their users to know how many prople visit their page.
  • Google makes advertisement.
  • Youtube, Blogger, Picasa and others are owned by Google

With this alone, Google is found on almost every page. If you have an account at Google (YouTube, Picase, Gmail, Blogger, Android or other), they can even give a name or an e-mail address to all of these information.

Google motto is Don't be Evil, they are perhaps not evil but can they become evil? Yes.

Whatever, my dream HTTP 2.0 protocol would include of course push support like WebSockets, but more importantly: session management. How should this be done?

HTTP and Session Management

When the server needs a session, it initiates the session by giving a session token to the client. The client needs to protect this token from being stolen and should display that a session is in pogress for this website. It could appear on the URL bar for example. The client could close the session at any moment.

With the token, the server provides its validity scope. Domains, subdomains, path. Only the resources in the session scope will receive the tocken back. If for example http://example.com starts a session at example.com but have an <iframe> that includes facebook. Facebook won't receive the session token. If Facebook wants to start a session (because the user wants to log-in) it will start a second session.

Session cannot escape the page. If you have two tabs open with facebook in each tab (either full page or embedded), the two facebook instances don't share the same session, unless the user explicitely allowed this. For instance, when Facebook starts a session, the browser could tell the user that Facebook already have an existing session and the user would be free to choose between the new session and the existing one.

How does this solve XSS

XSS is when a website you don't trust access the session of a website you trust, and steal it. At least I think so.

With this kind of session management, the session couldn't possibly be stolen. Suppose that the non-trusted site makes an XmlHttpRequest to gmail.com. If cross-domain wasn't forbidden, any web-site could read your mails.

With the new session management, if the untrusted site makes a request to gmail.com, gmail.com session wouldn't be available and the login page would be returned instead of the list of e-mails. If the non trusted website tries to log-in, you would be prompted to associate the Gmail session with the site you don't trust. If you aren't completely idion, you wouldn't allow the online pharmacy to connect to Gmail.

Extra

What is known about you? Let's take an average person that uses her credit card, have and Android phone with Gmail, uses Facebook:

  • All your relationships are known by Google (Gmail, Google+) and Facebook
  • All your interests are known by Google and Facebook (Ad Sense track which website you visit and Facebook have a huge profile on you)
  • All your posessions are known to your bank
  • Your photograph is known by Google and Facebook (people probably took a photo of you and placed it on their Android phone synchronized with Google)
  • Your location is known (using your Android phone, your credit card, or your RFID card you use for public transportation)
  • ...

If you ever want to keep private, it is becoming very difficult.

Tue 28 Jun 2011, 12:51 PM comp en lisaac lysaac misc

Lysaac is my reimplementation of the lisaac compiler. Until now, it wasn't very interesting to look at, but recently, I pushed a few interesting commits:

  • you now have variables
    • the default value is initialized correctly
    • the read works
    • the write works
  • you also have BLOCKs (sorry, no upvalues for now)

This may looks like nothing, but under the hood, the infrastructure is almost completely there.

Next thing to come: inheritance and error reporting.

Then perhaps, syntax improvements like keyword messages and later: operators. For now, I want the basic functionnality working well.

If you want to play with it, you can. If you get an error, create a use-case and propose it as a new feature. Please use as a model the .feature files.

Tue 28 Jun 2011, 12:51 PM comp fr lisaac lysaac misc

Lysaac c'est ma réimplémentation du compilateur lisaac. Jusqu'a présent, il n'y avait pas grand chose, mais dernièrement, il y a eu des commits intéressants:

  • les variables fonctionnent
    • avec des valeurs par défaut
    • on peut les lire
    • et y écrire
  • on a aussi des BLOCKs, mais sans upvalues

Ça ne paye peut être pas de mine, mais en fait, l'infrastructure du compilo est presque complète.

Prochaines avancées: héritage et affichage des erreurs

Et peut être après: des améliorations de syntaxe (appels de slot à paramètres et bien plus tard: opérateurs). Pour le moment, je me concentre sur les choses basiques.

Si vous voulez jouer, vous pouvez. Si vous avez une erreur inattendue, créez un scénario d'utilisation et donnez le moi (préférablement sous forme de fichier .feature).

Tue 28 Jun 2011, 12:17 PM comp configuration en misc

I always wanted to manage the files in my home directory. Generally, it's a complete mess and I wanted to get things right and understand the files I had.

At first, I just created a simple shell script that maintained symbolic links of the dotfiles and dordirs of my homedirs to .local/config, sort of early XDG configuration directory. I also changed my .bashrc and later .zshrc to point to files in .local/etc/profile.d. The shell script was reading a database in .local/config/database.sh that contained the link information in the form.

The script did the following for each file declared:

  • if the file existed in the homedir but not in the database directory, it was simply moved and a link was created in its place.
  • if the file existed at both places, tell there is a conflict.
  • if the file existed in the database directory but not in the homedir, create the link

The database looks like:

link ".bashrc" "bashrc"
link ".zshrc"  "zshrc"

# First file in home directory
# Second file in .local/config

My script just defined a function link and sourced the database. But links were not easy to construct in shell. So later, I decided to rewrite it in Tcl, simply because the syntax is compatible (I love the Tcl syntax for that) and because of the wonderful file command.

Later, I improved the script that was then called fixdir to list which files were not managed, and display them. So I could either delete those files (because I don't care about them) or integrate them in the database. The script gained a clean command to automatically remove files declared as noisy.

Now, I have a slightly different problem. I have now different computers which do not have all the same configuration. At first, I synchronized everything and just used the hostname in the database to get different links depending on the machine. But now, with my computer at work, I will not synchronize all the personal configurations. i have to get to a modular approach.

And this script did not help me in tracking what programs I installed in ~/.local/{bin,share,lib}. For this, I wanted something like stow. I tried using stow, but it failed with a conflict. Then I tried using homedir. I just didn't like it because it created an ugly ~/bin instead of ~/.local/bin.

Then I realized my fixdir script looks much like homedir already, and I patched it up to make it better. And there it is.

The current version of fixdir is on github.

Let me copy the README file:

What is it?

This is my homedir package manager. Written first in shell then translated in tcl. Originally, this was just to maintain a set of symbolic links from my home directory to a directory where all important comfig files were stored. Then I decided to make it a package manager.

How to install it?

git clone git://github.com/mildred/fixdir.git fixdir
fixdir_dir="$(pwd)/fixdir"
cd
"$fixdir_dir/fixdir" install "$fixdir_dir/hpkg.tcl"

fixdir is installed in ~/.local/bin. Make sure it is in your $PATH.

How does it work

fixdir works better when you are in your target directory (homedir)

Invoke one action with a database file. The database file is a tcl script that contain all files and directories that should be linked.

What else can it do?

fixdir unknown list all files not manages by fixdir in the current directory

fixdir clean remove files declared as noisy

Bugs

  • fixdir list doesn't work when pwd != target directory
Page: