Arc Forumnew | comments | leaders | submitlogin
News.arc for newbies
1 point by gimondarake 5082 days ago | 9 comments
Hello,

I am learning how to program and I am currently trying to create a forum similar to Arc Forum and Hacker News for my winter break project. I am teaching myself PHP and Ruby atm. Is it possible to create a forum similar to Arc Forum and Hacker News with either PHP or Ruby using news.arc? If so, is it too difficult challenge for a programming learner to program such service!?

It would be great if I can get any advice, especially about news.arc. Thank you very much in advance.



1 point by thaddeus 5081 days ago | link

A few thoughts:

Trying to incorporate the news.arc code into another language is probably not a good path to follow, since all the code in news.arc is heavily dependent upon the core language and it's constructs or syntax. It's not like news.arc is a module or something with a ubiquitous interface.

Furthermore, If I were to create a news/forum in Ruby I would choose to use Ruby's constructs as opposed to trying to implement arc constructs that are not suited to the language. For example, in Ruby I would be using classes, where in Arc one would use templates. Each has a different approach to implementing the code and each would present a different set of challenges/options.

If you're just learning Ruby, I highly recommend learning how Ruby developers think. What's considered idiomatic for the language. Then just build it.

Honestly, even though much longer and harder, I would suggest as an option, you consider putting the other languages on hold, take some time to learn Arc and the ins/outs of news.arc, then go try to implement in Ruby, but in a more Ruby like approach.

I think you'll find the minute you try to figure out how to implement, for example, a template in Ruby that Ruby developers will guide you to a more idiomatic approach.

-----

1 point by gimondarake 5081 days ago | link

Hello thaddeus,

First of all, thank you very much for your reply :)!

I have never touched Arc and news.arc, so maybe I shouldn't even try to incorporate the news.arc code into another language.

I have never received an advice like "Learning how Ruby developers think.", but I believe it is one of the best advice I have received (especially for a newbie like myself.)

Maybe I am trying do to everything when I should be focusing on one thing and learning slowly but surely.

-----

1 point by rocketnia 5081 days ago | link

Unlike PHP, where generally the script is starts to run when a request is made to the server and ends once the complete reply is sent, news.arc is set up to run as a long-running process, handling requests as they come in. It would be a little tricky to port news.arc to PHP.

I don't know about Rails....

Either way, a message board is certainly a reasonable project to pursue in PHP. ^_^ How long have you been programming? It seems similar to a second-year final project I had in college. The important thing is to be comfortable with using some kind of persistent storage (not necessarily a database, but that works) and doing a lot of string output. :-p

-----

1 point by gimondarake 5081 days ago | link

Hello rocketnia,

First of all, thank you very much for your reply :)!

I see, I don't know anything about Arc and how news.arc works, so I didn't know that it would be difficult to use both news.arc and PHP.

I have been programming for about a year = newbie. But wanted to give a try since I love Hacker News and now that I love Arc Forum with the warm welcome I received :)!

Are there any services other than Hacker News and Arc Forum that was build with news.arc!?

-----

2 points by rocketnia 5068 days ago | link

Are there any services other than Hacker News and Arc Forum that was build with news.arc!?

Sorry for not answering your question sooner! These discussions list some examples of news.arc forums:

http://arclanguage.org/item?id=8716 ("Wiki list of websites & apps using Arc")

http://arclanguage.org/item?id=10584 ("Other sites running news.arc?")

http://arclanguage.org/item?id=12989 (a comment on "What would you like to see in a new code site for Arc?")

To find these, I just used http://af.searchyc.com.

-----

1 point by evanrmurphy 5082 days ago | link

Customizing news.arc to your liking shouldn't be too challenging if you're willing to program in Arc. Neither should writing your own application similar to news.arc using a web framework for one of those languages, e.g. Ruby on Rails. However, trying to use news.arc and somehow mix it in with your Ruby and PHP code would be a lot trickier, IMO.

Does this help?

-----

1 point by gimondarake 5081 days ago | link

Hello evanmurphy,

First of all, thank you very much for your reply!

To be honest, I am completely new to Arc and news.arc. I thought building a Hacker-News like forum with news.arc would be faster, but maybe I should be focusing on what I know and build with the languages that I actually know. Is it possible to reverse-engineer? news.arc, because I will probably have a bumpy ride to program "ranking algorithm" like the one used in news.arc (Hacker News).

-----

2 points by rocketnia 5080 days ago | link

Hacker News's ranking algorithm isn't public, is it?

At least, it probably isn't in our version of news.arc. As Paul Graham says at http://arclanguage.org/item?id=12468, "I should release a new version though. News.arc is greatly improved since the last release." (I assume the ranking algorithm wouldn't escape scrutiny....)

-----

3 points by kens 5076 days ago | link

I've written up a detailed analysis of the published parts of the news.arc ranking algorithm: http://www.arcfn.com/2009/06/how-does-newsyc-ranking-work.ht...

I noticed that a few pieces of the algorithm were not released, and the algorithm has surely changed since arc3.1, but the published code explains at least the overall behavior of Hacker News ranking.

-----