HNHacker News
TopNewBestAskShowJobs

jarek-foksa

1,958 karma · joined April 19, 2011

I'm the developer of boxy-svg.com and xel-toolkit.org.
submissionscomments
jarek-foksa··on WebKit: An Objective View
I don't think that even faster JS engines would improve overall performance of web apps significantly. DOM performance seems to be the bottleneck currently and another arms race in this area would be beneficial for the web.
jarek-foksa··on WebKit: An Objective View
WebKit project consits from four components:

  - WebCore - the rendering engine
  - JavaScriptCore (aka SquirrelFish or Nitro) - JavaScript engine
  - WebKit - synchronous API
  - WebKit2 - asynchronous API
All WebKit-based browsers are using the same rendering engine (that is WebCore). Only some of them are using other WebKit components.

Google did not fork WebKit to implement Gamepad API and WebGL, those features are implemented in upstream WebKit project (check http://goo.gl/5M9gN). Safari does not support them probably because of its longer release cycle.

It's true that there is no single version of WebKit though. Browser vendors are free to take any SVN snapshot, replace any component, toggle on/off any feature and brand it with any version number they prefer.

jarek-foksa··on Opera moves to WebKit
I can see almost exclusively Open Source libraries there, they are listing them because this what MIT/GPL/MPL licenses require.
jarek-foksa··on Ask HN:Whats the problem with SVG?
I'm not contradicting myself, as I said: except for filters, animations and fonts, all modern browsers have good support for SVG 1.1. By "good support" I mean it's on pair or even better than HTML5 and CSS3 support.

Files that break cross-origin policy or use non-standard tags are poorly authored by my standards.

I have a lot of experience with SVG under WebKit-based browsers and so far everything renders just fine for me except for advanced features mentioned earlier.

jarek-foksa··on Ask HN:Whats the problem with SVG?
Just because browsers can't render poorly authored SVG files doesn't mean that the format is not ready for prime use. Except for filters, animations and fonts, all modern browsers have good support for SVG 1.1, there are definitely fewer issues than with say CSS3 transitions or flexbox which are nonetheless misused by web develoeprs.

Inkscape is doing layer compositing by applying filters on groups. This is not SVG 1.2 feature. It was present in SVG 1.1 for years and it's still not properly implemented by all browsers and authoring tools: http://www.w3.org/TR/SVG/filters.html#feBlendElement

jarek-foksa··on Brython, Python in the browser
I don't like the fact that underscore and camelCase notations must be mixed, e.g. in the clock demo:

    def set_clock():
      ctx.beginPath()
      ctx.fillStyle = "#FFF"
      ctx.arc(width/2,height/2,ray*0.89,0,2*math.pi)
      ctx.fill()
      show_hours()
This is not the case with some other languages that compile to JavaScript, e.g. LiveScript allows dash-case almost everywhere.
jarek-foksa··on Ask HN:Whats the problem with SVG?
SVG fonts are dead, so what? You can still embed other font formats the same way you do it in HTML/CSS.

You don't need to sanitize SVGs to host them safely - you just put them inside <img> tag and browsers will do sandboxing for you.

What features do you actually miss in SVG 1.1? Gradient meshes? 3d transforms? multiple fills? I can think of only advanced stuff that is rarely used and tricky to do with other web technologies anyway.

Also, why would you want to strip browser-incompatible SVG elements? Browsers will simply ignore such elements.

jarek-foksa··on Ask HN: which is the most influencing quote you ever came across?
I do not remember the authors and exact words, but here it goes:

1. If you do something that is not moving you towards your goal then it's moving you away from your goal.

2. What you DO NOT include in your product is as important as what you DO include.

jarek-foksa··on What are your most used design patterns?
I'm not aware of the observer pattern. I'm using CoffeeScript and my implementation of pub/sub is here https://gist.github.com/4489352

Sample usage:

    button =
      toggleOn: ->
        @trigger 'toggled', 'on'

    window =
      init: ->
        button.listen 'toggled', (buttonState) =>
          @showWindow if buttonState is 'on'
jarek-foksa··on What are your most used design patterns?
Publisher/subscriber and composite patterns had the greatest impact on the quality of my code, apps that are composited from small decoupled parts are much easier to reason about.

I'm also using delegate and prototype patterns a lot, though those are rather dangerous when misused. Deep inheritance chains or excessive method overrides can easly make the code unmaintainable.

jarek-foksa··on Let's improve U.S. copyright law in 2013
Yes, most EULAs and DRM systems impose restrictions that greatly limit what you are allowed to do with software. If you think this is fooling people then don't buy such software, donate money to Open Source projects or contract Open Source developers directly. Open Source model is great if you want to really own quality software without spending millions on it.

What I fail to see is how legalizing file sharing on massive scale (akin to MegaUpload) and banning DRM technologies would improve consumer rights. The natural response from the market would be to move to the cloud which means even more restrictions and privacy concerns than in the current model.

I agree that there are some reforms needed, but I'm against revolution that this document proposes.

jarek-foksa··on Let's improve U.S. copyright law in 2013
Companies behind MPAA and RIAA are representing a huge part of the US economy. Pirate Party and simillar movements are mostly based in Europe and have marginal influence on the economy of any country. Now if you are the president of the United Stated, whose advices would you trust more?
jarek-foksa··on Let's improve U.S. copyright law in 2013

  Legalized file sharing, shorter protection times for the commercial
  copyright monopoly, free sampling and a ban on DRM.
Sorry, I didn't read the document. Do those lunatics also want to ban SaaS? Because if software is in the cloud you can't easily pirate it.

I strongly believe that such legislation would only complicate my life. With high-speed networks and new protocols it's not that hard to imagine companies like Adobe or Autodesk moving their products almost completely to cloud. You would no longer "own" professional software, you would only rent access to it.

jarek-foksa··on Revisiting JavaScript Objects
ES6 will introduce class syntax, but it's also going to standardise __proto__ property [1] making it easier to write both classical and prototypical code.

[1] http://javascript.spec.whatwg.org/#object.prototype.__proto_...

jarek-foksa··on Revisiting JavaScript Objects
When you do "var B = Object.create(A);", should B be called a clone of A or a copy of A?

I have seen various definitions of the term "clone", e.g. Io language documentation says that "a clone is an empty object that has the parent in its list of protos", this article defines clone as an exact shallow copy of another object.

jarek-foksa··on Ask HN: What is your preferred text editor color scheme?
I use Resesif color scheme.

Screenshot: http://i.imgur.com/oUL5U.png

Download: https://github.com/sonereker/resesif.tmbundle

jarek-foksa··on Ask HN: Best podcasts in 2012?
I was listening to Mohammed Abshaun's videlog [1] most often this year. It helped me a lot in getting stuff done and kept me motivated to work on my startup. I also like Mixergy, but I guess everybody here knows about it.

[1] http://www.youtube.com/user/mohammedabshaun/videos?view=0

jarek-foksa··on Is it worth selling software on Ubuntu Software Centre?
Short answer: no, it's not worth it.

I'm selling the same app on both Ubuntu Software Center [1] and Mac App Store [2]. Between June and December I have sold 29 licenses on Ubuntu store and ~2000 licenses on Mac App Store.

Chrome Web Store [3] seems to be a much more promising distribution channel for Linux apps. With the new APIs it will be possible to access native window manager, USB ports, filesystem or webcam. Besides, you don't have to deal with incompatibilities between distros.

[1] https://apps.ubuntu.com/cat/applications/type-fu/

[2] https://itunes.apple.com/us/app/type-fu/id509818877?ls=1&...

[3] http://developer.chrome.com/apps/about_apps.html

jarek-foksa··on Stop Generalizing About Europe
If I were to design a new international language I would take the vocabulary and grammar from Basic English [1] and modernize the writting system to be fully phonetic.

Still, I'm afraid that such Newspeak-like language could be implemented only in some totalitarian dictatorship, so I hope that it won't happen any time soon...

[1] http://en.wikipedia.org/wiki/Basic_English

jarek-foksa··on Microsoft Kills Expression Suite
I would say that Freehand and CorelDraw were the closest competitors to Illustrator back then. I didn't even know about Creature House before Microsoft acquisition.
jarek-foksa··on W3C finalizes HTML5 specification
Why did they call the spec "HTML5"? This nonsense reminds me of Java versioning and I'm afraid that "HTML5 2.0" or "HTML5SE 1.4" will follow next.
jarek-foksa··on 2D Game Art for Programmers
Being able to draw basic geometric figures in 3D space is the fundamental skill. Drawing a cylinder instead of a circle is not that much harder, but it sets you in a totally different mindset.
jarek-foksa··on 2D Game Art for Programmers
When sketching objects you should be thinking in terms of cubes, cylinders or ellipsoids, not rectangles or ovals. Thinking in 3D makes it much easier to get perspective and shading right.
jarek-foksa··on Changing times for web developers
Building UI libraries on top of canvas feels like reinventing the weel, HTML/SVG/CSS already provide you advanced APIs for accessability, text layout, theming and drawing. All you really need is a tiny abstraction layer.
jarek-foksa··on Google's campaign for a free and open internet
This is just Google running FUD campaign to protect its own business. Strong enforcement of intelectual property laws means problems to any company that indexes or hosts user generated content, but I fail to see how it could endanger free speech.
jarek-foksa··on Jewish Problems
The term "affirmative action" is so easy to manipulate that it could be used to cover any form of discrimination. I guess Soviets would describe their discriminatory policy as an affirmative action to increase the social and ethnic diversity of the class of intellectuals, or something between those lines.
jarek-foksa··on Chrome Canary for Developers
There are also daily builds of Chromium for Linux: http://commondatastorage.googleapis.com/chromium-browser-con...

You can launch it without installation (just unzip the archive). I think there were daily builds of Chrome as well, but I can't recall the link.

jarek-foksa··on Mario 3 recreated with CSS3 animations and media queries
I disagree, <g> element can be animated with JavaScript as easily as e.g. <div>. You just change the value of transform attribute. Rotations can be handled easily once you understand how matrixes work.
jarek-foksa··on Creating SVG vector graphics for maximum browser compatibility
The data included in that table is totally wrong. Chrome supports most of the filter primitives defined in SVG spec, IE9 supports none of them, Firefox supports vast majority but with serious performance issues.

The real blocker for SVG is the lack of good authoring tools. Illustrator (used by the author of this article) apparently generates SVG files by rasterising many vector effects.

I suspect that there is a bug in WebKit that breaks bitmap rendering in certain circumstances, this would explain why some Illustrator-generated effects failed on Chrome.

jarek-foksa··on Creating SVG vector graphics for maximum browser compatibility
Filters render just fine for me in embedded SVG files (I'm using direct embedding via <svg> tag in HTML5 documents). Not all primitives are fully implemented, but performance is definitely better than in Firefox. IE9 does not support filter effects at all, I don't see how WebKit is "lagging" here.
← PreviousPage 7 of 11Next →