alptrv
alptrv on Hacker News
Are there any plans to introduce generators or async/await?
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
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
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.
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.
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.
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.
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.
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.
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.
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...
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
On Mac OS it's not ok either, thanks to `-webkit-font-smoothing:antialised` and low contrast.
Yeah, he safe, he was pushed to the right, you can see it at 0:09
Uhm, didn't know about that it never happened to me
text-rendering: optimizeLegibility; may help in some cases
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/
can you elaborate why is client side encryption isn't secure at all?
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?
Yeah, I'm using it since it was created. Funny that visiting HN associates for me with visiting hckrnews.com
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.
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?
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.
Posted by
alptrv on Friday August 31, 2012 @08:52AM
from the ask-hn dept.
Hi HN.I have an offer from a local (Russian) company with headquarters in the Silicon Valley, they offer trips and working on site, they may relocate their best employees to the USA. But I was also thinking about working remotely for US companies, and the question is - given that firms hire remote workers to reduce costs is there any chances to eventually relocate to the USA?Are there any...
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.