Better HN
topnewbestaskshowjobs
Log inSign up

Gikoskos

86 karma · joined Aug 29, 2015 (11y ago) · 14 submissions

Submissions

comment 7y ago · link · parent

I think you missed something here https://i.imgur.com/CtFLsSm.png

comment 7y ago · link · parent

Can you find this article and post it please? I have to show it to someone

comment 7y ago · link · parent

> Only a tiny minority of Web developers test on anything other than Chrome and mobile safari

I work in a web dev shop and nearly everyone here uses Firefox as their main dev browser. We do run tests on other browsers as well but we mainly develop with Firefox and its tools.

Although part of the reason could be that we know most of our customers use it instead of Chrome. Don't ask me why, but if I had to venture I'd guess it's because Firefox is quite popular in my country for some reason.

comment 7y ago · link · parent

IIRC there was at least one language that implemented CCRs natively in its syntax. I want to say it's Ada but I could be wrong. If anyone else knows about it please correct me.

To understand it better here's the solution to the producer/consumer problem (from wikipedia), using mutexes and semaphores:

  mtx buffer_mutex;
  sem fillCount = 0;
  sem emptyCount = BUFFER_SIZE;
  
  procedure producer() 
  {
      while (true) 
      {
          item = produceItem();
          down(emptyCount);
          down(buffer_mutex);
          putItemIntoBuffer(item);
          up(buffer_mutex);
          up(fillCount);
      }
  }
  
  procedure consumer() 
  {
      while (true) 
      {
          down(fillCount);
          down(buffer_mutex);
          item = removeItemFromBuffer();
          up(buffer_mutex);
          up(emptyCount);
          consumeItem(item);
      }
  }
and the same problem solved using CCRs:

  int avl = 0;
  
  procedure producer() 
  {
      while (true) 
      {
          item = produceItem();
          region R when (avl < BUFFER_SIZE)
          {
              putItemIntoBuffer(item);
              avl++;
          }
      }
  }
  
  procedure consumer() 
  {
     while (true) 
     {
         region R when (avl > 0)
         {
             item = removeItemFromBuffer();
             avl--;
         }
         consumeItem(item);
     }
  }

The most important thing about CCRs is that they are supposed to guarantee fairness, along with mutual exclusion. A well-designed solution uses two binary semaphore queues to achieve this.

If anyone wants to see what an implementation looks like here's a small C library I wrote a while ago, to use for some of my own personal projects, and to solve some homework for Uni https://github.com/Gikoskos/libccr

comment 7y ago · link · parent

Sir Tony Hoare is a legend! Personally one of my favorite concurrency constructs that he invented, but aren't mentioned in the interview, are conditional critical regions. A very simple abstraction that helps you write concurrent code that's maintainable and easy to read. Plus, from my experience, they provide a much more elegant way to solve various concurrency problems.

Only possible drawback is that they might perform worse than the alternative, at least in some cases.

comment 7y ago · link · parent

No plans yet but I guess I'd have to adapt. Do you know of any ways to get that look on 8.1 or 10 natively? At least without having to install a third-party theming app.

comment 7y ago · link · parent

I love the early Windows design, especially the Windows 2000 look. Other than the well designed icons, I find it to be much more intuitive and consistent than modern Windows GUIs and Metro. Part of the reason why I use the classic style on my Windows 7 machine (the other part is better performance). I like it so much I implemented it in ReactJS https://github.com/Gikoskos/react-win32dialog/

Moreover, if you guys haven't read it yet you should definitely check out Raymond Chen's Old New Thing, which talks about the reasoning behind some of the design choices that went down in earlier Windows desktops.

comment 8y ago · link · parent

Damn this idea is really cool and works for me. I wish I knew this site existed much earlier

comment 8y ago · link · parent

How can a human being evolve to this level?

comment 9y ago · link · parent

I've noticed this as well in all the Gtk apps that I've run through the terminal.

Never having programmed in Gtk, what is the cause of this? Is Gtk broken or are all the programmers using it incorrectly? I've programmed a great deal in WinAPI and stuff like that never happens.

comment 9y ago · link · parent

GitLab works and looks pretty well to me, for the past year I've been using it. Maybe these other problems are specific to your use-cases? You should send them an e-mail, or a pull-request since GitLab is open-source, if you encountered an issue with their website. If I had a product like that, and one of my clients was dissatisfied for various reasons, I'd want to listen to their feedback.

comment 9y ago · link · parent

Is "toolbelt" an actual term for a piece of software? Every single week I see another github project with a completely new term, similar to this one. If it's real what does it mean?

comment 11y ago · link · parent

From my experience it's the channels that don't have a lot of active members, maybe like 10 or 20 people logged in at all times. The value of conversation is increased majorly in those channels.

comment 11y ago · link · parent

I've never thought about fonts in coding environments before; you guys must be very experienced if you're thinking of stuff like that.

This is what my editor(Kate) looks like, is this a good font or a bad font? http://i.imgur.com/QtP1csu.jpg