Hacker Newsnew | past | comments | ask | show | jobs | submit | vivekprakash's commentslogin

This question is more related to websockets. I have seen that they use different protocol and doesn't work behind proxies or firewalls most of the time. How do you handle this?


Using websockets relies on a proxy that doesn't pass just the headers/body, but instead sends all packets in both directions. Nginx proxies do this, Apache requires a special proxy module.

Firewalls don't typically care, since it's effectively a long lived HTTP request, unless it digs into all of the packets and filters there.


IIRC SSL is recommended for Websockets.


Yes, the ways in which it can be used are huge. Some of the obvious ones are to teach someone to code and play the sequence later anytime. CodeTable supports collaborative editing which makes it even nice. Other use can be to ask someone to solve a problem and watch them how they approach it. And there could be many more!


Yes. Learning Python at the moment, and after I do a practice problem I often look at the writer's solution to the problem. I would find it much more informative if done in this way, with comments saying why he's doing what when he does it.


The first thing would be to gather more data, which might be difficult, because what percentage of people use online editors for daily work?


The timezone is Asia/Kolkata. The FAQ page is at http://www.hackerearth.com/judge/.


It would help if they just listed the UTC offset, actually. I know my own offset but not for every other timezone there is.

Apparently it's UTC+5:30.


Yes, it's UTC+5:30


The timezone is Asia/Kolkata (IST).


We crashed! It's up now :)


It's working now. Thanks.


This project is very much challenging and fascinating too. And Google Summer of Code is an incredible program for university students to get seriously involved in such projects and open source in general. Last year I worked on porting NetBSD userland to MINIX 3 as part of GSoC and believe me it was an invaluable experience for me which isn't even remotely possible without such program. This year I will work on porting GNU Compiler Collection to HelenOS ( http://blog.vivekp.me/2012/04/25/port-gcc-to-helenos-gsoc-pr... ) as part of GSoC and I am already very excited. I wish this guy good luck and thanks Google for running such amazing program successfully!


HelenOS looks very cool and a port of a compiler to it sounds like a great project!

But why GCC? GCC is the crufty old compiler of yesteryear. It's a solid workhorse but big and inflexible, and in my opinion its importance will be waning as LLVM/Clang matures. Had you considered porting LLVM/Clang instead?


The reason is that Clang does not support all architectures that HelenOS needs support for.


Never heard of HelenOS till now. Reminds me of Minix. Is that about right?


HelenOS (http://www.helenos.org/) and Minix (http://www.minix3.org/) are fundamentally different. While Minix is POSIX compliant, HelenOS has been designed and developed from scratch, improving upon some of the broken legacy conventions in the way. It is not even POSIX compliant, though it has libposix library for now to ease the task of porting foreign sources!

HelenOS uses its own microkernel written from scratch and supports SMP, multitasking and multithreading on both 32-bit and 64-bit, little-endian and big-endian processor architectures, among which are AMD64/EM64T (x86-64), ARM, IA-32, IA-64 (Itanium), 32-bit MIPS, 32-bit PowerPC and SPARC V9.

HelenOS is infact one of the most portable microkernel operating system! Currently it's not as much developed as it's counterparts but it will become a complete and usable modern operating system very soon given the amount of activity going on in there.


I had a one-to-one talk with Rasmus Lerdorf a few weeks ago. This is one of the few things he said:

"I wrote PHP as a hammer to do my stuff. Around 1993, the only way to write web apps was by hacking C and Perl. This was extremely painful, and you would have to do the same thing over and over again. So I started writing a tool which would make my work easier."

"I never thought while writing PHP that someday millions of people will be looking over my shoulder into my code. If I would have known that, I would have surely done a few things differently. But nobody knows that. Some appreciate the language, some don't. I don't blame them."

"PHP is a hammer. Use it for the right purpose at right place. Learn Python, Ruby, Haskell, Scala, etc. every language and use them where they fit. No language is perfect. There are trade-offs involved in each of them."

"When anything is too popular, criticism naturally follows. When people compare a language which is used in, say, 35% of the web apps to a language which is used in, say, 5%, their comparison is highly skewed because then they directly compare the number of things that have gone wrong in one with respect to another. They don't scale them to the same level and then see the faults. I don't blame anyone for that."

"You can scale horizontally with PHP as much as you want. There are many companies doing that, and they have been very successful."

"I can teach a semi-intelligent monkey to code in PHP in three hours."

There were many other cool and brilliant things he pointed out. What I learnt: Accept what it is. If you don't like it for your purpose, use another language which fits in.

P.S. In the new release of PHP, there are even driven servers (libevent), Support Vector Machine (SVM), Traits, Instance Method Call, built-in web server for testing, improved error messages, broad performance improvements, and many others. This language is not going to go away soon.


As far as I understand it, the real tragedy is that PHP as used at scale. PHP as Lerdorf intended it was the quick fix, the we-need-to-get-it-done-now fix. And then that fix grew and grew until the things that PHP fixed were eclipsed by the things in PHP that needed to be fixed--but PHP was already too big to be fixed; people were using PHP not just for fixes, but for everything, and to fix everything would break everything... And that's how we got here. Because nobody will understand your intention when your code is on the screen and the intention can only be inferred from someone who is not in the room with you.


Popularity doesn't determine how many design flaws exist in a language, merely how many people actually get screwed over by each of them. Python and Ruby aren't perfect, and they've had more than enough attention for the flaws to have been found. Even if every developer in the world migrated to one of those languages overnight (o happy day) that language would not suddenly become as profoundly inept as PHP.


There is a quote from Bjarne Stroustrup saying along the same line...

“There are only two kinds of languages: the ones people complain about and the ones nobody uses.” ― Bjarne Stroustrup, The C++ Programming Language: Special Edition


Do you have this in audio/video? It would be nice to hear/see this exchange.


Sorry, there is no audio/video of it. This was supposed to be just a casual chat, but it turned out to be an incredible exchange of more than one hour. I wasn't prepared to record the conversation, but I wish I had.


It's exactly the same that happens with me, and i guess with most of the people. Besides, whenever i am programming in a new language, it happens that I gradually come to know more tricks, hacks and lower level details about the language which makes me like it even more. And, then it becomes my favorite language. And, then I can argue with someone over it. And then one day, I start writing hello_world in a new language, or one of the languages which i had not touched for many years and it becomes my favorite language. And then, i think how foolish it was of me! Btw, i voted for C because nothing is more beautiful than it IMHO; you can do whatever you want so elegantly that it mesmerizes me.


Internet connectivity in India is increasing almost exponentially and in next five years half of the country (500+ million) is going to be connected to internet. In such times, when ecosystem is changing, market is getting bigger and there is an unprecedented growth of user base, there will be, sooner rather than later, when many very good startups will be visible in the Indian market. However, a regulation like this is surely going to adversely affect the Indian startup environment. It's not going to benefit anyone, and now founders have to bother to pay tax when they could be writing code and working on their product. Who will explain the <ignorant+foolish> government!


Yes, it has changed a lot since then and also put on some heavy weight in kernel and userland. The goal of Minix 3 is to become a highly reliable, flexible, and secure OS which can be used as a product in a serious way. Visit http://en.wikipedia.org/wiki/MINIX_3 for a comprehensive information.


Although vivek, it's worth pointing out that the size of the kernel itself hasn't grown much.


You are right to some extent. Yet, there has been many improvements in the kernel since 1988, especially after Minix 3 was announced. And yes, the code base has significantly grown in all of drivers, user-space servers and userland.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: