HNHacker News
TopNewBestAskShowJobs

yogsototh

2,489 karma · joined June 7, 2010

- https://yannesposito.com - https://her.esy.fun
submissionscomments
yogsototh··on How To Safely Store A Password
I am surprised nobody had already talked about scrypt yet. Here is an old hackernews entry about it.

http://news.ycombinator.com/item?id=601408

I would have loved to use scrypt, but there is only a C implementation. I would had loved to have at least a javascript one.

yogsototh··on Google: What do you love?
Exactly what I believe. I tried "haskell" and "epistemology". See epistemology in 3D with sketch?
yogsototh··on Top ISPs Poised to Adopt Graduated Response to Piracy
There is an institution dedicated to "graduated response to piracy" in France. It is a complete fail. As far as I know, nobody ever received a letter claiming their Internet access will be restricted.

While they rely on technical system to stop piracy, they will fail.

For now it is more a societal behavior problem than a technical one. The only way I see to fight efficiently piracy is to make easier to pay than to pirate things. I predict a very long mouse and cat fight.

yogsototh··on Remember Slashdot?
Meanwhile in France :-(

http://www.google.com/trends?q=reddit%2C+digg%2C+slashdot...

Also interresting:

http://www.google.com/trends?q=hacker+news%2C+slashdot&c...

yogsototh··on Javascript to CoffeeScript converter
Yes, thank you.
yogsototh··on Imperative vs Functional Programming
I am currently learning Haskell. I started by not really knowing where to start. Now I follow this advice, and until now I find it very helpful:

http://stackoverflow.com/questions/1012573/how-to-learn-hask...

yogsototh··on Javascript to CoffeeScript converter
It was one of my complain about CoffeeScript[^1].

This with the existence of CoffeeScript.eval and now, I believe I will use CoffeeScript.

[^1]: http://yannesposito.com/Scratch/en/blog/2011-01-03-Why-I-sad...

yogsototh··on Ask HN: How 'little' sleep should I get?
I had read some research paper showing the optimal number of sleep hour is between 6h 30 and 7h 30.

One thing to note is sleep deprivation is really problematic. Don't do this.

But you could sleep far less if you sleep in 3 our 4 times instead of only one time. But one thing to experience is the nap.

Try sleep only 4 to 5 hours. Then take nap at 12:00 for about 30min to 1h. And for me it worked well for some months.

yogsototh··on Ask HN: How to set up get-shit-done app?
I believe it should work nonetheless.

To help you I've rewritten it and you should be able to use it on Mac.

https://github.com/yogsototh/get-shit-done

Happy working! Do not hesitate to ask me if something goes wrong.

yogsototh··on Get-shit-done - Easy way to stop distractions
Yep, beware I didn't even tested it:

    #!/usr/bin/env zsh

    (($#<1)) && {
        print -- "usage: $0:t (play|work)"
            exit 1
    }>&2
    blacklist=(
            reddit.com
            ycombinator.com
            slashdot.com
            )

    hostfile=/etc/host

    if [[ $1 = "play" ]]; then
        if [[ ! -e $hostfile.orig ]]; then
            cp $hostfile{,.orig}
        else
            print -- "You're already playin" >&2
            exit 1
        fi
        cp $hostfile{.orig,}
        for elem in $blacklist; do
            print -- "127.0.0.1\t$elem" >> /etc/host
            print -- "127.0.0.1\twww.$elem" >> /etc/host
        done
    fi

    if [[ $1 = "work" ]]; then
        cp $hostfile{.orig,}
        \rm $hostfile.orig
    fi

    /etc/init.d/networking restart
yogsototh··on Ask HN: Help me, I fuck around on the Internet too much
Great idea! Should be mixed with crontab that disable "play mode" every 30 minutes forcing you to manually copy the play host file.
yogsototh··on Nondeterministic programming
There is no known real world non-deterministic Turing Machine. We could only simulate it using a deterministic Turing Machine (like a common computer).

Using this operator make the code really clear (IMHO) and I suppose it is its purpose.

Furthermore, if one day we discover an hardware able to be a non-deterministic Turing machine is discovered, the code will work.

[1]: I doubt such an hardware exists. But you could look about quantum computer for something close to what is a non-deterministic Turing machine.

yogsototh··on Play Git Like A Violin
I trully believe that no one should use "git reset --hard" unless really know what he is doing (understand for beginer).

This is why, I aliased an "uncommit". You can see the details in this article[1] I had written for my friend who were learning git.

usage:

    git uncommit 3
effect: add another point in the history where it is said you get back 3 commit in time. Which is better in most case than modifying the history when you want to push it.

[1]: http://yannesposito.com/Scratch/en/blog/2009-11-12-Git-for-n...

yogsototh··on My Extravagant Zsh Prompt
May I suggest to use this prompt for git users[1]. I use it daily and I am really happy with it.

[1]: http://sebastiancelis.com/2009/11/16/zsh-prompt-git-users/

yogsototh··on Ask HN: Too many concepts/ideas. What to do?
I'd do like this.

For each idea is the idea easy to make it real? Yes? Do it now No? Analyze more (give point on difficulty, probability of success, enjoyment doing it, etc...)

Once you only have _hard_ project, take the one with most point, start doing it. Only one at a time. Learn from your mistake for the next project.

yogsototh··on How do you choose between job and family?
Not making what you like should have a negative effect on your self esteem and therefore on your family.

There is no simple answer.

I personally began to choose work and I wasn't so happy with it. Then I choose my family and I feel better. But you have to consider I had the chance my corporate job didn't pressure me too much.

Furthermore my wife work at Hospital in a field where, last month, she saw four children die. It is something that make you think about priorities. And clearly, now family is my first priority. But I also don't forget my feeling have direct consequences on the happiness of my family.

yogsototh··on Goodbye to academic research
My vision:

A rabbit is writing into a forest.

A fox see him:

Fox: "What are you writing?"

Rabbit: "How rabbit eat Foxes"

Fox: "It is completely wrong! You deserve I eat you now!"

Rabbit: "Please, just go see my supervisor before. He's in this cave."

The Fox enter into the cave and never go out. The rabbit continue to write.

The same occurs with a wolf. And a bit latter with a bear. Except the bear cannot enter into the cave. Then a Lion go out and kill the bear.

Conclusion. No matter if you are good or not. No matter the subject of your thesis. Only matter who's your supervisor.

yogsototh··on How Effective are Technical Interviews?
I've done it on my computer. Clearly it works, but without a computer at hand, I am pretty sure I would have made many errors. For example initialize strsize to 1 instead of 0 (in order to add the '\0' at the end of the string).

I believe it is far harder than one could imagine, even more if you are nervous during the interview.

Why not just a binary search. I remember an article claiming 90% of engineer can't write it without bug.

I personnaly asked simply to write a function foo(c,string) (in any language) such that if the string contain the character c, then it returns true. And even with a question as simple as that I had more error I could have imagined.

char itoa(int i) { int strsize; int tmp; char res; int j;

    if (i==0) return "0";

    // allocate the right size
    strsize=0;
    if (i<0) strsize++;
    tmp=i>0?i:-i;
    while (tmp > 0) {
        strsize++;
        tmp /= 10;
    }
    res=(char *)malloc(strsize);

    // write the values
    j=strsize;
    res[j]='\0';
    if (i<0) {
        i=-i;
        res[0]= '-';
    }
    while (i != 0) {
        // printf(".%d(%c)", j, '0'+i%10);
        res[--j] = '0' + i%10;
        i/=10;
    }
    return res;
}
yogsototh··on HN: DuckDuckGo, Blekko, or Stumpedia?
I use DDG from one month now. It is really good.
yogsototh··on Update on Internet Censorship in Iran - Tor Blog
May the next level will be steganography.
yogsototh··on Ask HN: Do you meditate? How/Why?
I am curious what I should do to meditate:

- should I try not to think about anything

- let my thoughts go free

- think about _nice_ things

- make some construction (like visualizing a tree, visualize all element of a clock, visualize a mathematic object)

yogsototh··on Ask HN: Functionnal programming for UI?
There is no _major_ problem, but the syntax can be terrible. May be I'm wrong but, the main problem for me was to access the current instance of a class.

1st level : use this 2nd level : var self=this; then use self; 3rd level : var sefl=this; and pass self as parameter.

Typically, when a new view appear, I load dynamically the resources nee: other javascript files and an HTML template file. I use jquery to handle AJAX.

Here is some code:

    ConsumptionView.prototype.show = function(){
        var self=this;
        
        var files=[];
        var tests=[];

        files.push('/static/js/date.js');
        tests.push('Date.prototype.setISO8601');

        mainApplication.run_after_dependencies( files, tests,
                function() {
                    $('#content').load("/static/html/user_consumption.html",
                        function(){ self.htmlLoaded(self);});
                });
    }
the `run_after_dependencies` function will mostly do some getScript only if needed. The last function will do (mostly):

    $.getScript('/static/js/data.js', function() {
        $('#content').load("/static/html/user_consumption.html",
            function() { self.htmlLoaded(self);}
        );}
    );
But in the end, I _have_ to pass 'self' in parameter to 'htmlLoaded' function and I cannot use the 'var self=this;' at the top of the definition of the function html_loaded.
yogsototh··on The project manager from hell (integrates with Git)
My 2 cents:

I don't like much the idea of naming a branch by a number. I use git-flow (https://github.com/nvie/gitflow) and there is a standard name convention.

It would be nice to adapt the pit hook to branch name of the form : pit<num> or in regexp /.pit\d+$/

On the other hand I use wedoist.com They don't have any API for now (http://wedoist.com/Help/showQuestion/137) It would definitively be great to have the ability to synchronize task with this service.

yogsototh··on Yahoo is Shutting Down Del.icio.us
The day Yahoo bought delicious I immediately switched to Magnolia first and now I use diigo and I am _really_ happy with it for a long time now.
yogsototh··on Security in 2020
It was a really nice article.

Coincidence? Today I've switched my default search engine to DuckDuckGo instead of Google. I'll give it a one week try.

I am a coFounder for an electric smart grid company. A major long term problem for us is to find a way to provide our customer the complete propriety of their data.

How could we manage data without knowing much about it? Is there any simple way of encrypting some data and be able to make some transformation to them?

Something like:

    F(enc(x)) = enc(F(x)) ?
We are managing mostly consumption values, it would be nice to provide functions like the mean, max, FFT? I don't know.

Thanks for any idea.

yogsototh··on SSH Commands / Tricks
I use

  ssh -D9999 user@remotehost.com
And now I have a local SOCKS proxy running. I just have to change the proxy configuration in my browser using SOCKS4a at localhost:9999 and I can surf as if I were on remotehost
yogsototh··on Ask HN: How have you applied computer science IRL?
I count to 31 with one hand.

I use the standard count up to 5 with one hand just for communication purpose.

yogsototh··on Ask HN: How do you secure yourself on public WiFi?
Thank you. I didn't knew this one. It will be very useful.
yogsototh··on Ask HN: How do you secure yourself on public WiFi?
What I do:

I have a reachable personnal computer with an ssh server. Then on my local machine I do:

    ssh -D 9050 username@host
Then in your web browser you should simply use localhost:9050 as SOCKS proxy. Now you're safe about the WiFi sniffers.

I made a short post about this:

http://goo.gl/zTQM

yogsototh··on Ask HN: Is working for parts in a business a good deal?
Thanks for your answer. I believe you understood clearly the deal.

Thanks for your kindness, I'm French. May I should try to make smaller sentences.

← PreviousPage 5 of 6Next →