|
Chops
Administrator
Posts:
2738( 21.37%) Threads: 326( 19.52%) Private Posts: 1
|
This user's posts are being ignored. Show Post?
|
Posted: 6/16/09 11:01:41pm
|
Edited: 6/16/09 11:04:25pm
|
|
So I'm working on my new project (a browser-based trivia game/chatroom thinger), and I'm doing it in Erlang (neat language, btw). The original plan was to use the Nitrogen web framework for Erlang, then I decided I was going to write the webserver myself, and then I went back to wanting to use the Nitrogen framework again, after looking at the code again (now that I know Erlang better, the code makes more sense to me). And I noticed this Comet functionality option. My mind is completely blown. I've been doing ajax regularly for 4 years now, and I completely missed Comet. Have you guys seen this? I feel like a complete retard for missing this (I actually feel like a retard for missing a lot of things, while I was just buried in PHP for the past 4 years not looking at any other languages seriously). I always assumed gtalk used a 1-pixel flash app (which was what I was going to do before discovering this) to interface with sockets, but apparently, it uses Comet instead. In short, Comet is a way for the server to push data to the client without requiring an ajax request. Granted, the methods used are still hacks of sorts, but fuck, this is incredible. And that nitrogen framework allows users to implement it in a handful of lines of code. So ridiculous. I'm completely mindfucked right now. I was getting bored with this project because I had been implementing some of the specifics of the backend protocol (which I found to be tedius and not engaging at all), and now I was ready to work on the website part, and I was really dragging my feet to write a webserver, but finding this - holy shit, I'm energized again. I forgot how straightforward nitrogen as a framework is, and how flexible it appears to be. I even donated $50 to the project for it's awesomeness. ---- Do it for the Lobster
|
skeezer65134
Veteran
Posts:
2364( 18.45%) Threads: 150( 8.98%) Private Posts: 0
|
This user's posts are being ignored. Show Post?
|
Posted: 6/17/09 9:44:26am
|
|
|
I actually heard about Comet about 3 years ago. I haven't made any use of it but it did seem like a really cool technology. Requests come from the server, not the client, now that's a cool idea! I've seen a lot of talk of Erlang but have yet to check it out at all. Like you, I'm completely in my own PHP world. I really want to sharpen my OOP skills though, so I was planning to learn Python. Then I was told that Ruby was where it's at. Now I see a lot about Erlang, so perhaps I should check that out instead? No idea what my next move is going to be anymore ---- no fat chicks
|
Chops
Administrator
Posts:
2738( 21.37%) Threads: 326( 19.52%) Private Posts: 1
|
This user's posts are being ignored. Show Post?
|
Posted: 6/17/09 1:13:19pm
|
Edited: 6/17/09 1:24:29pm
|
|
Looking more into comet, it's a very clever hack, but it can put some rough load on the server, particularly because an HTTP connection needs to stay open for each client. That's pretty rough, especially with stuff like my website. I have 4 web servers each at a 256-512 connection max, and when it gets busy (like if the WoW servers are down), most of those connections stay filled even with a max 1-2 second keepalive time.
If I had users all connected simultaneously, I wouldn't be able to hold any more connections and PHP would start eating up resources something fierce.
As for Erlang, it's a very neat language, immutable variables, mostly functional, amazing concurrency support (message passing is so intuitive with it's pattern-matching-variable-assignment). I'm a big fan so far.
It does have it's drawbacks though: Macros aren't as powerful as they are in lisp, the inability to choose field names dynamically without a lot of dicking around (for example, in php you can easily do:
$interesting_fields = Array("memberid","firstname","lastname"); foreach($interesting_fields as $fld) echo $row[$fld]."<br />";
In erlang, you pretty much need to know the field names ahead aof time and hardcode them in.
Granted, some of Erlang's code-shortening mechanisms (list comprehension is so short it feels like cheating) make the code longer, but when I'm doing list comprehension with records, some of the flexibility I'd hope is there is not, and it actually in some cases becomes necessary for me to build the list through iteration (or recursion, since the language doesn't have mutable variables, it doesn't have the traditional iterative operators like for or while).
But it's a neat language, and it really took me a long memorial day weekend (Thurs -> Tues) to read through the book and understand it enough to be comfortable with coding. Apparently it's similar syntax to prolog (I've heard say it's a derivitive of prolog), so if you're familiar with that, learning erlang should be faster. Unfortunately, I didn't pay attention very well during the one class where we did prolog, so I've completely forgotten that.
But yeah, it's neat as hell and I recommend at least tinkering with it (pick an easy project and go with it).
---- Do it for the Lobster
|
Chops
Administrator
Posts:
2738( 21.37%) Threads: 326( 19.52%) Private Posts: 1
|
This user's posts are being ignored. Show Post?
|
Posted: 6/17/09 1:22:46pm
|
Edited: 6/17/09 1:23:25pm
|
|
Interestingly, the only reason I really decided to tinker with Erlang was after " Erlang Day" on Hacker News, where PG made some comment about "We need less of these fluff pieces on HN, and more stuff like an analysis of the innards of Erlang". Geeks being what they are, and PG being who he is, the HN frontpage proceeded to be swamped with articles discussing Erlang (it was something like 75% or more of the top posts were Erlang related). But yeah, I'm in a similar position, where I'm wanting some new languages. I've got a book on Clojure right now that I'll likely be reading after I get really comfortable with Erlang, and I've also got a few Ruby and Rails books, since I should at least learn what that's all about. I have a python book that I started reading, though I don't know how long it'll be before I get to that, since I've still got SICP on the shelf awaiting digestion. Screeny from HN on Erlang day:  olzolz ---- Do it for the Lobster
|
stevo
Veteran
Posts:
924( 7.21%) Threads: 229( 13.71%) Private Posts: 0
|
This user's posts are being ignored. Show Post?
|
Posted: 6/17/09 4:21:24pm
|
|
|
| In erlang, you pretty much need to know the field names ahead aof time and hardcode them in. |
I know about zero about erlang, but that to me sounds like programming in erlang is more of a chore to actually get something practical done. I'm sure it's academically interesting, but probably not practical for most uses.
|
Chops
Administrator
Posts:
2738( 21.37%) Threads: 326( 19.52%) Private Posts: 1
|
This user's posts are being ignored. Show Post?
|
Posted: 6/17/09 5:10:32pm
|
Edited: 6/17/09 5:17:06pm
|
|
| I know about zero about erlang, but that to me sounds like programming in erlang is more of a chore to actually get something practical done. |
I haven't used erlang with mysql yet, and I imagine it would be a little more flexible in that way. I was talking specifically about Mnesia, the built-in Erlang database. It sounds worse than it is. Erlang's big benefit is the smooth way that deals with concurrency (very smooth spawning of new threads, even on other machines, and even on other machines that don't have the code there already). Because of it's lack of mutable variables, dealing with shared data across processes is almost completely eliminated. And because Mnesia allows the storing of any valid Erlang information, including Erlang lambda expressions. ---- Do it for the Lobster
|
stevo
Veteran
Posts:
924( 7.21%) Threads: 229( 13.71%) Private Posts: 0
|
This user's posts are being ignored. Show Post?
|
Posted: 6/18/09 12:08:14pm
|
Edited: 6/18/09 12:08:24pm
|
|
BTW, I was bouncing various software ideas off Sarah last night and your trivia thing came up, and it got me thinking that you really need to get on Facebook. Any kind of social gaming really should have some kind of FB component. You might even find some interesting ideas in extending your DKPsystem into FB: I bet well over 80% of your customer base is on FB.
If you know anything about FB, apparently everyone except me loves to take these stupid quizzes about everything from movies to cars to news and spam everyone with their results. FB is definitely the place for any group trivia game.
|
skeezer65134
Veteran
Posts:
2364( 18.45%) Threads: 150( 8.98%) Private Posts: 0
|
This user's posts are being ignored. Show Post?
|
Posted: 6/18/09 1:15:41pm
|
|
|
| apparently everyone except me loves to take these stupid quizzes |
You and me both, brother! That stuff is retarded. I hate to help the thread tangent, but you should look in to getting at least DKP if not also yourself on Twitter as well. It gives you a nice platform with which to check up on the world and it gives your clients a fast and convenient way to ask for help. You can also use it to post about updates you make to the system and potentially drive new clients to the site or existing clients to upgrades. My guess is that you'll have far more clients on Facebook than on Twitter, but Twitter is a FAR better platform for interacting with your audience. ---- no fat chicks
|
Chops
Administrator
Posts:
2738( 21.37%) Threads: 326( 19.52%) Private Posts: 1
|
This user's posts are being ignored. Show Post?
|
Posted: 6/18/09 3:42:26pm
|
|
|
| apparently everyone except me loves to take these stupid quizzes about everything from movies to cars to news and spam everyone with their results. |
Like, actual trivia question? Or more of that "Which character are you from Lord of the Rings?" shit? ---- Do it for the Lobster
|
stevo
Veteran
Posts:
924( 7.21%) Threads: 229( 13.71%) Private Posts: 0
|
This user's posts are being ignored. Show Post?
|
Posted: 6/18/09 4:07:11pm
|
|
|
| apparently everyone except me loves to take these stupid quizzes about everything from movies to cars to news and spam everyone with their results. |
Like, actual trivia question? Or more of that "Which character are you from Lord of the Rings?" shit? |
You need to sign up. It's everything. I've gotten a quiz on car manufacturer logos. Basically "How well do you know [blank]?, your friend [blank] scored 95%, can you beat him?" Don't know if you'd exactly call that trivia, but I'm sure there are a thousand other things that I haven't seen yet, since every time one of these pops up in my feed I hide it. Then there's all these games like Mob Wars and shit that people play. It's basically unlimited on what kind of game you can make. It's just that putting it inside FB gives you a great platform to "virally" market it. Plus a lot of people just spend a lot of time in FB to do casual social things like playing games with friends. So you already got the eyeballs there. Here's all you need to know about Twitter: http://blog.instructionalsolutions.com/2009/04/01/twitter-pros-and-cons-in-business-communication/
|
Chops
Administrator
Posts:
2738( 21.37%) Threads: 326( 19.52%) Private Posts: 1
|
This user's posts are being ignored. Show Post?
|
Posted: 6/18/09 4:33:07pm
|
|
|
Yeah, I was telling sorrell about how I plan to make the trivia thing work with facebook just this afternoon.
Someone else also told me that there are a handful of trivia bots for in-game as well, (like with WoW, Warcraft 3, etc), though they get banned pretty quickly for being "third party applications". I figure, I can just provide the API, and let other people use the API to make apps that can get their own accounts banned from Blizzard servers.
---- Do it for the Lobster
|
skeezer65134
Veteran
Posts:
2364( 18.45%) Threads: 150( 8.98%) Private Posts: 0
|
This user's posts are being ignored. Show Post?
|
Posted: 6/18/09 6:04:29pm
|
|
|
HILARIOUS! Yeah, most of Twitter is just total garbage and retards doling on and on. But, as a business, you can provide an avenue for people to quickly interact with your company. For example, if someone is having a problem with your site, they're likely to bring it up quickly, or even address your company account directly. If you're on top of your game (and it's so fucking easy to be!) then you can chime in and provide help super fast. The bast part is, everyone else sees it happen. I agree, the idea is retarded. Before I started using it, I thought it was the dumbest and most pointless thing on the net. But, it generated a huge amount of buzz every time I went to anything tech-related, so I thought I'd check it out. I fucking love it, and now I don't touch shitty Facebook at all (aside from when I have ping.fm update my status along with all my other site statuses, but that's a whole 'nother topic). The only advice I can give you is to get on there and spend some time actually using it. Take it seriously... and not bullshit like "going to work now" or "make i hate ryan seacrest", post links to cool articles and resources you find, follow some friends (search for me by name), ask technical questions, etc. I'd also recommend checking out a desktop app like Twhirl, Tweetdeck or any of the multitude of non-AIR apps to make it faster and easier to use. Enough gabbing, what's up with this trivia thing? I'm completely out of the loop here... ---- no fat chicks
|
Content of this site is © 2010 GummLANParty unless otherwise stated
Part of the SigmaSites Network.
© 2001-2010 Sigma Star Systems. All Rights Reserved.
|