HNHacker News
TopNewBestAskShowJobs

alptrv

61 karma · joined July 19, 2010

Alexander Petrovich
submissionscomments
alptrv··on Show HN: Bitesnap – Deep Learning Meets Food Logging
Got the same on nexus 5
alptrv··on Dart 1.5
Are there any plans to introduce generators or async/await?
alptrv··on Generational GC has landed in Firefox
The great thing about Firefox is that it is completely customisable. You could use a theme like this https://addons.mozilla.org/en-US/firefox/addon/fxchrome/ I personally like it even more than Australis
alptrv··on JSON5 is a proposed extension to JSON
I see this comment every time for many of years in almost every discussion about using JSON for configuration and while YAML is certainly used by many projects most of the people still continue to use JSON and I think that's because YAML sometimes feels like Scala of serialization markups when people just want something like Python. I personally think that TOML[0] is not only more simple but also as easy to read as YAML and we use it in our projects without any issues.

0. https://github.com/mojombo/toml

alptrv··on GitHub Organization Page Redesigned
I'd with the design would be more dense, it's a nice design and I understand that designers did it deliberately because they know whitespace does matters, but when it comes to web sites like Github I think the most important thing is functionality and not the cute and modern look. With the old design on my 13 inch MBP I could see 6 repos with the new design - only 5
alptrv··on CoffeeScript's Time is Waning For Me
I think that's not a problem with significant whitespace, but the problem with CoffeeScript syntax. I'm programming in Python and had been programming in Coffescript and I always found Coffescript code much harder to read than code in Python. I don't know exactly what causes this, but my guess is that indented blocks of code in CoffeScript can appear after any line, so you don't have visual anchors that will indicate where one block begins and other ends. In Python however, indentation is always comes after keywords like def, if, class, for etc... and those are always highlighted by your editor so your eyes can always catch the block start very quickly.
alptrv··on Ethereum: A Turing-Complete Cryptocurrency
The site is down for many hours. The cached version: http://webcache.googleusercontent.com/search?q=cache:http://...
alptrv··on RESTful Realtime
This is a Chrome bug https://code.google.com/p/chromium/issues/detail?id=236298
alptrv··on We switched from an icon font to SVG
Yeah, I have this issue too, though I'm using stable Chrome, I thought that if this is a bug it must be already reported, the funny thing is that I tried to google it and all I got was some articles about web-fonts and icon fonts rendering problems.
alptrv··on Ember.js 1.0 Released
Usually most of the people realise the need for this kind of tools when they are facing a need/requirement to develop a single page web application (SPA). If you don't need to make one then it's ok to use jquery or even add some PJAX to make your web site look more snappy. But if you have to develop a SPA, then you can't go far with jQuery because it just wasn't created for this type of things, you have to think about models, templates, about application state management and all other stuff, this is where frameworks like Ember and Angular shine.
alptrv··on Closures for class/module privacy considered harmful
It is exactly the point where our interests collide - when I'm using your library, I want to have a control over your library, because I'm using it. I don't want you library to control me an the way I use it. It's a tail wagging the dog analogy.

For example I use your library and everything goes great until I'm stuck because I need to have an information hidden in a private field, if I'm in Python I would do it and add a note, fixme, todo, whatever that this is a hack and things may break in a future, but my code would work right now. And I can fork your library later and submit changes. If this is a language with real private support the only way is to use hacks (reflection) which is the same as using the field directly like in python just with some additional PITA, or to fork your library and maintain it until you merge changes, or if you not, I have to maintain it forever.

alptrv··on Closures for class/module privacy considered harmful
Well, that depends on your starting point, if you're a private state proponent then it may be a hack for you. I'm more of a control freak and I'm on a side of 'everything is public, lets code by interface', so for me private state is a bit of a hack that some languages have because some other languages have it and and some other languages have because it was introduced in languages before them. My point was that the lack of private state in Python didn't made impossible to separate inner implementation from public interface.

Why not make everything global? For obvious reasons - modularity, memory consumption, and inconvenience of lengthy variables names.

alptrv··on Closures for class/module privacy considered harmful
Why hide it completely? What about exposing your interface by convention like in Python? Never heard anyone suffering from inability to make methods and fields private in Python.
alptrv··on Closures for class/module privacy considered harmful
Well if they use your private members thats all in theirs responsibility. What if they just want to make the thing work, ship the product, whatever else, and don't care about new versions.
alptrv··on Closures for class/module privacy considered harmful
I always wanted to know why would anyone want to hide their code at all? If you making a library you would never know how people going to use it. Why don't expose public interface using naming conventions and let the people freedom to break it when they really want to. I sometimes found myself using methods and variables that intended to be private because I wouldn't achieve needed functionality without touching them. Just imagine what if Backbone had all model's attributes private - that practically means that you wouldn't be able to extend a model or to inspect the model's attributes in the console. Of course you can say that adequate programmer would never do that, but that's exactly my point - you have to rely on programmer's ability to write decent code, while if everything was public you would also rely on your ability to hack things, yes this can be messy and you can shoot your leg, we all know that, but we all grown ups and we know what we are doing.

When I read about symbols in upcoming ES6 I can't get rid off the sense of anxiety because I fear thing would get worse, the only hope is that browser vendors would implement some means to inspect private state of the objects that use Symbols.

By the way, this was one of the reasons why Guido van Rossum had chosen not to add private state in Python: https://plus.google.com/115212051037621986145/posts/7wpbQTPR...

alptrv··on Monocle
Am I the only one who don't like this new trend when every second website now is designed with the low contrast and native OS antialiasing disabled? I'm 24 and I just can't read the summaries on this site. Just compare the two versions on this screenshot [1]: default on the top, and native antialiasing on the bottom with the slightly darker text (#67707c)

1.http://monosnap.com/image/OgCT8YKqEoHTAxAmgofKDxDNb.png

alptrv··on Monocle
On Mac OS it's not ok either, thanks to `-webkit-font-smoothing:antialised` and low contrast.
alptrv··on What is Happening in Istanbul?
Yeah, he safe, he was pushed to the right, you can see it at 0:09
alptrv··on 3px of padding makes all the difference in the world
Uhm, didn't know about that it never happened to me
alptrv··on 3px of padding makes all the difference in the world
text-rendering: optimizeLegibility; may help in some cases
alptrv··on I'm writing a book on Flask, the Python web framework
Basically JSONP is used by API providers, so that theirs API might be called by JavaScript running in browser. Until CORS[1] got supported by current browsers, JSONP was used to get some JSON from an API located on different domain (well it of course can be used today for browsers that don't support CORS) The code snipped you linked just wraps standard JSON response making it an executable script that when included on the page calls the supplied callback's name passing the JSON.

1. http://www.w3.org/TR/cors/

alptrv··on Coinpunk - Run your own Bitcoin wallet service
can you elaborate why is client side encryption isn't secure at all?
alptrv··on Bitcoin URL scheme whitelisted in HTML5
Maybe because there are many other currencies besides bitcoin, what about ripple, litecoin, etc? Would they alter the standart every time to add one of them?
alptrv··on New Hacker News
Yeah, I'm using it since it was created. Funny that visiting HN associates for me with visiting hckrnews.com
alptrv··on Python.org Redesign Preview
Why every second website now uses this -webkit-font-smoothing: antialized? Fonts look unreadable for me on mac os. Why to make a decision for user on how to render fonts?

EDIT: Made a screenshot to illustrate the problem: https://www.dropbox.com/s/orzn4f2utoxh4st/Screen-Shot-2013-0...

alptrv··on WebSocket proxy support added to nginx trunk
But I assumed that backend isn't connected to the client directly, it's connected to the proxy server, and the proxy server holds tcp connections to the clients, and of course can hold millions of them.
alptrv··on WebSocket proxy support added to nginx trunk
Can anyone explain how proxying websockets wouldn't hit the port number limit on the proxy server? If I understand correctly, when we would proxy tcp connections the workers on the backend server would able to hold only up to 64k connections to the proxy server (in the case when proxy server has only one IP-address)? Am I missing something?
alptrv··on XSS + "Save your password" = pwned
I think you need to update your post with the clarification that you don't have to add XSS directly to the login page - you can steal user's password from whatever page the user are currently in, even if they are already logged in.
alptrv··on Handling blocking IO in Go
I don't know why author thinks that blocking IO is a "One of the most frustrating things when you start with go" because from the very beginning of leaning Go most articles, tutorials and books tells that golang uses goroutines to achieve concurrency. I've started learning golang a few weeks ago and the fact that all IO is blocking was the most nicest part of the language. I mean you dont need to wrap your code in deeply nested callbacks as you do in node.js, and your code is always look straightforward. In fact IO is only looks blocking, AFAIK, go uses epoll/kqueue under the hood for IO operations.
alptrv··on Show HN: fontBomb - Stylishly destroy the web
Just curious, why it so faster in Safari then in Chrome?
Page 1 of 2Next →