HNHacker News
TopNewBestAskShowJobs

scscsc

698 karma · joined June 13, 2009

I'm a lecturer in Computer Science at the "Al. I. Cuza" University in Iasi, Romania. I've received my PhD from ENS Cachan, France.

ciobaca.ro profs.info.uaic.ro/~stefan.ciobaca

In my spare time, I've developed NoThree - a puzzle game for Android.

https://play.google.com/store/apps/details?id=com.ovaludi.nothree.android

submissionscomments
scscsc··on Counting Bugs in Windows Calculator
Still, the comparison ratio == threshold has very little chance to turn out true.

When you want to check whether A >= B (where A and B are numbers represented as floats), you would probably want to use the check A >= B - epsilon.

scscsc··on A Critique of Standard ML (1992) [pdf]
So you are agreeing with the author, since he is critiquing Standard ML (not Haskell). It is clear that the paper was influential, since Haskell does not have the shortcomings described.
scscsc··on A Critique of Standard ML (1992) [pdf]
What are the "many" other issues (other than the two you mentioned in your comments)?
scscsc··on A Dutch first: Ingenious BMW theft attempt
Actually you would just have to file a theft report with the local police and the car would not even enter Romania without the driver likely arrested and the car confiscated, as there is a real time db of cars reported stolen that is shared among the EU members and more. I imagine it could take a bit more effort to actually get the car back. You would probably have to worry much more about the car being torn apart and sold for pieces or leaving Europe through Rotterdam.
scscsc··on Logic Theorist
Assuming p V !p (read: p or not p) as an axiom means that you are admitting excluded middle. This axiom is part of "classical propositional logic". So a proof using this case distinction (p true or p false) would be valid, in the classical sense.

There is a stronger system, called "intuitionistic propositional logic", where this axiom is not valid. There are less formulae that are valid intuitionistically, but any formula that is valid intuitionistically is also valid clasically.

There are various philosophical reasons why one prefers intuitionistic logic, but note that in any case it is stronger to have an intuitionistic proof, so these are preferable (when they exist).

scscsc··on A Short Introduction to the Art of Programming (1971) [pdf]
Quite an insightful thought for 1971:

"With the advent of what is called "large scale integration" (being a term from the computer field, its acronym LSI is better known!) it seems to become technically feasible to build machines more like "clouds of arithmetic units" with information processing activities going on simultaneously all over the place, for shorter periods of time even independently of each other. Programming for such machines will pose completely different trade-off problems: one will be willing to invest in potentially useful computing activity before its actual usefulness has been established, all for the sake of speeding up the whole computation. But although I know such machines may be coming, I shall not touch these problems for the following reasons. First, as far as general purpose applications are concerned, I have my doubts about the effectiveness with which such forms of parallelism can ever be exploited. Second —and that is the most important consideration— parallel programming is an order of magnitude more difficult than sequential programming."

Also, the first mention of "cloud", although with a different meaning.

scscsc··on Microsoft and GitHub team up to take Git virtual file system to macOS, Linux
The title is terrible. Here is an excerpt from the article that explains what's going on: "The company's solution was to develop Git Virtual File System (GVFS). With GVFS, a local replica of a Git repository is virtualized such that it contains metadata and only the source code files that have been explicitly retrieved. By eliminating the need to replicate every file (and, hence, check every file for modifications), both the disk footprint of the repository and the speed of working with it were greatly improved. Microsoft modified Git to handle this virtual file system. The client was altered so that it didn't needlessly try to access files that weren't available locally and a new transfer protocol was added for selectively retrieving individual files from a remote repository."

This style of working is needed in large code bases, where not all files are checked out on developer workstations (for performance or privacy reasons).

scscsc··on Binary Puzzle
I have implemented a while ago an Android version (https://play.google.com/store/apps/details?hl=en-gb&id=com.o...).

By far, the most interesting part is automatically generating the levels by difficulty. In my implementation, I first generate a full puzzle and then start removing pieces one by one, as long as the part just removed can be logically deduced. The only difference between easy/medium/hard is the amount of work performed in the logical deduction: one step for easy, two steps for medium and three for hard.

scscsc··on Mihai Pătrașcu, 1982–2012
Mihai absolutely revolutionised his field (lower bounds for data structures). Science lost a great mind with his death. But his friends lost more. The article is more about Mihai - the person, for those who want to find out who he really was.

http://mipmemorial.blogspot.ro/p/cheers-to-mihai.html

scscsc··on Visual Studio Code is now open source
For those who are, like me, ignorant: VS Code is a source code editor...

I find it funny that nowhere on the official page (code.visualstudio.com) does it say that it's an editor.

scscsc··on The Humble Programmer
Your are (most probably) wrong.

Has your client ever reported a bug?

Was it a bug you cared about?

Why haven't you discovered it during testing?

scscsc··on Go in Go
i.e. can a bug that existed early in the toolchain history propagate in the binaries but not the sources?

c_i is the i'th version of the compiler.

    c1 c2 // c1 compiles c2

    c2 c3 // c2 compiles c3
Source code of c1 has bug, source code of c2 and c3 is fixed. Bug in c1 causes binary of c2 to have bug. Binary bug in c2 causes binary bug in c3.
scscsc··on CompCert: A formally verified optimizing C compiler
Well, that's also true.

But apparently there is no better thing to do.

There is always a disconnect between what you mean and what you say. It happens all the time and the risk is not going to go away. People who work with proof assistants understand this risk better and most of them are pretty happy that the risk is sufficiently small for their purposes.

scscsc··on CompCert: A formally verified optimizing C compiler
It is true that there might be errors in anything.

However, this is mitigated by having only a very small core that checks the proofs. Basically if there if a wrong proof goes through, there must be an error in the core (which was checked by many people and is very small).

scscsc··on 0h n0 – A new game from the makers of 0h h1
Nice game, quite polished.

Is the solution unique to each puzzle?

The style is similar to my game NoThree for Android (https://play.google.com/store/apps/details?id=com.ovaludi.no...).

scscsc··on From Object Algebras to Finally Tagless Interpreters
If you forget to write view for the Mul case, does the compiler issue an error? (in other words, is it strongly typed?)
scscsc··on SAT solving – An alternative to brute force Bitcoin mining (2013)
Exactly. And I do not see zeroes as fewer variables, but as more constraints. The two points of view are actually equivalent. If you have actual variables for the digits that need to be zero, you can either get rid of these variables and replace them with zero everywhere else or you simply add constraints that require those digits to be zero.
scscsc··on SAT solving – An alternative to brute force Bitcoin mining (2013)
Yes it's from 2013 it seems but I just bumped into it and it seemed cool and interesting. I think this community will appreciate the idea.

I was curios if anyone here is mining bitcoins and if it's worth their time.

scscsc··on SAT solving – An alternative to brute force Bitcoin mining (2013)
Actually I'm not sure that claim is accurate (they state it as an intuition). The fact that there are more constraints (that was the word you're looking for) does not necessarily mean that SAT will be easier. It could be that the constraints make finding a solution more difficult.
scscsc··on SAT solving – An alternative to brute force Bitcoin mining (2013)
I think you misread the article. They are not claiming to break SHA, they are claiming they can get better than bruteforce performance on mining bitcoins.
scscsc··on Flip – A ReactJS Game
I like the concept, but the graphics is a bit off. First of all, I would suggest making the board as big as possible and lose the shades of grey.
scscsc··on Programming without objects
My thesis is that by trying to write functional/imperative UI code you will create your own ad-hoc OOP system.
scscsc··on Programming without objects
It seems to me that everyone is missing the point behind object-orientation.

Object-orientation sucks for everything except user interfaces. If you don't believe me, try writing a UI library without objects and see what happens. UI is OOP's best (and only compelling) use case.

For all other algorithms classical data structures/ADTs are much better. If you don't believe me, try writing an OOP compiler.

scscsc··on Running an indie game store
Very interesting. They seem to have gained some traction. I'm curious how they solved their chicken and egg problem (not enough buyers versus not enough sellers).
scscsc··on Ask HN: What are you building?
https://play.google.com/store/apps/details?id=com.ovaludi.no...

I've been working (and still am) on an Android puzzle game using libgdx. The puzzle requires to fill a board with Xs and Os while obeying the no-three rule (no three Xs or Os in a row) and the same number rule (same number of Xs and Os on each line and column).

The puzzle turned out to be quite challenging and addictive, similar to sudoku. The most difficult part of development was that I would start the game to see check a new feature and I wouldn't get back to development until I finished filling the board.

The most interesting part of development was writing the algorithm that generates the board in order to ensure a unique solution and account for the various levels of difficulty.

I've already published a version of the game and I'm currently working on adding some features to it.

scscsc··on Interactive Design and Optimization of Free-formed Free-flight Model Airplanes
Seems not. Their webpage is: http://www-ui.is.s.u-tokyo.ac.jp/~ume/GliderDesign/2014_sigg... but I haven't seen any download link. I would love to play with it, thought.
scscsc··on Travelling Salesman – Official Movie Site
The trailer is here: http://www.youtube.com/watch?v=6ybd5rbQ5rU
scscsc··on India’s elites have a ferocious sense of entitlement
It's not the rich. It's the "nouveaux riches"... Happens all over the world. Little education + fast money does that.
scscsc··on Two Star Programming
Lists are recursive, right. Better than double pointer indirection is to have the function return the new head. Note that the following code is not functional, but returning the new head makes it cleaner.

    node *remove_if(node *head, remove_fn rm)
    {
        if (rm(head)) {
            return remove_if(head->next);
        }
        head->next = remove_if(head->next);
        return head;
     }
A good use of this technique (returning pointers to the resulting node) is the following code which very cleanly implements AVL trees in C (from http://infoarena.ro/multe-smenuri-de-programare-in-cc-si-nu-... -- scroll to the end (sorry, main article in Romanian)):

    #define max(a, b) ((a) > (b) ? (a) : (b))
    #define geth(n) (n->h = 1 + max(n->l->h, n->r->h))
     
    struct node
    {
          int key, h;
          struct node *l, *r;
    } *R, *NIL;
    typedef struct node node;
     
    void init(void)
    {
          R = NIL = (node *) malloc(sizeof(node));
          NIL->key = NIL->h = 0,
                  NIL->l = NIL->r = NULL;
    }
     
    node* rotleft(node *n)
    {
          node *t = n->l;
     
          n->l = t->r, t->r = n,
                  geth(n), geth(t);
          return t;
    }
     
    node* rotright(node *n)
    {
          node *t = n->r;
      
          n->r = t->l, t->l = n,
                  geth(n), geth(t);
          return t;
    }
     
    node* balance(node *n)
    {
          geth(n);
          if (n->l->h > n->r->h + 1)
          {
                  if (n->l->r->h > n->l->l->h)
                          n->l = rotright(n->l);
                  n = rotleft(n);
          }
          else
                  if (n->r->h > n->l->h + 1)
                  {
                          if (n->r->l->h > n->r->r->h)
                                  n->r = rotleft(n->r);
                          n = rotright(n);
                  }
          return n;
    }
     
    node* insert(node *n, int key)
    {
          if (n == NIL)
          {
                  n = (node *) malloc(sizeof(node));
                  n->key = key, n->h = 1, n->l = n->r = NIL;
                  return n;
          }
          if (key < n->key)
                  n->l = insert(n->l, key);
          else
                  n->r = insert(n->r, key);
          return balance(n);
    }
     
    node* erase(node *n, int key)
    {
          node *t;
          if (n == NIL) return n;
          if (n->key == key)
          {
                  if (n->l == NIL || n->r == NIL)
                  {
                          t = n->l == NIL ? n->r : n->l;
                          free(n); return t;
                  }
                  else
                  {
                          for (t = n->r; t->l != NIL; t = t->l);
                          n->key = t->key,
                                  n->r = erase(n->r, t->key);
                          return balance(n);
                  }
          }
          if (key < n->key)
                  n->l = erase(n->l, key);
          else
                  n->r = erase(n->r, key);
          return balance(n);
    }
     
    int search(node *n, int key)
    {
          if (n == NIL) return 0;
          if (n->key == key) return 1;
          if (key < n->key)
                  return search(n->l, key);
          else
                  return search(n->r, key);
    }
scscsc··on How I Read Programming Books
Nice that the author has read so many programming books so that creating an algorithm for reading such books is cost-effective.
← PreviousPage 2 of 7Next →