Arc Forumnew | comments | leaders | submitlogin
2 points by tvvocold 4327 days ago | link | parent | on: How to install racket in fedora20?

but Fedora isn't based on Debian
1 point by tvvocold 4327 days ago | link | parent | on: Shader:plz help

i noticed that there is a blog feature in anarki, how to run it on openshift? (bsv)?
2 points by rocketnia 4327 days ago | link | parent | on: How to install racket in fedora20?

I recommend downloading one of the pre-built Debian or Ubuntu installers from http://racket-lang.org/download/, making sure to choose i386 or x86_64 depending on your system architecture.

I don't know if the Debian version or Ubuntu version would be better on Fedora, so I recommend installing either one into a self-contained folder in case it was the wrong choice.

1 point by shader 4328 days ago | link | parent | on: Shader:plz help

Force-stop shouldn't be what drops the www. The repo reset should only happen during the git push process. Otherwise I don't think it touches what's in the repo dir.

In any case, I think all of the stuff in the www folder should probably be moved to the data directory, so it doesn't get wiped regularly. I just haven't done it yet; partly because I didn't know exactly where I would put it.

Feel free to make a change to put it where you want it, and then send a pull request.

1 point by shader 4328 days ago | link | parent | on: Shader:plz help

It shouldn't be that hard to clone the latest anarki, and then checkout a specific tag. I just didn't bother because we haven't been using tags much that I know of.

Of course, my script only installs anarki once; it doesn't upgrade it out from under the user. The only issues are if something changes that affects the actual openshift base, like when you changed the boot script a few months ago.

1 point by tvvocold 4328 days ago | link | parent | on: Shader:plz help

also i noticed that there is a Downvote feature in arc but cannot see it in the page?
1 point by tvvocold 4328 days ago | link | parent | on: Shader:plz help

well, when i git push a png file and edit then restart, my app goes down and 8080 port is used.so i kill -9 the pid and (load "lib/news.arc") (nsv '("my ip" 8080)) , then i got a blank hacker news clone..so i app-force-stop it and start again then got a full-blank page...what happeded?

i just got it right :it seems force-stop will drop the repo/www file and those would got lost!!bazinga!

1 point by akkartik 4328 days ago | link | parent | on: Shader:plz help

Then you'll need to learn about html tables, I think. You need to create a row in the table that spans both columns. See if this helps: http://www.w3schools.com/html/html_tables.asp. Don't be afraid to experiment, and come ask more questions when you get stuck.
1 point by akkartik 4328 days ago | link | parent | on: Shader:plz help

Absolutely, I'd be the last person to suggest the backwards-incompatible changes (most of them mine :) stop. No, I meant, is there some way we can configure things like openshift to pick up at specific tags? Maybe you could hardcode to checkout to a specific hash? I don't know what the consequences would be, though. For example, if people want to hack on the code inside openshift. Thoughts?

Another approach may be for you to maintain a fork of anarki and clone from it instead of anarki directly. That way we wouldn't be dealing with detached heads inside openshift, and it'll still require a manual step to upgrade.

2 points by tvvocold 4328 days ago | link | parent | on: Shader:plz help

yes,it works but the copyright is out of page and don't looks good,check this https://fdnews-tvvocold.rhcloud.com/news how to fix?
2 points by shader 4328 days ago | link | parent | on: Shader:plz help

It's true that the constantly shifting nature of anarki has caused all of us more than a few issues in the past. There's even been more than one breaking change since I started supporting OpenShift. But I think that keeping anarki open to change is a good thing, and I don't want to get it locked down. You end up with issues like the python2.7 vs 3 fiasco.

On the other hand, it's probably a good idea to regularly catalog the changes, and employ some sort of semantic version tagging. Then it could be up to other users when they should upgrade, and they can be better informed of why.

2 points by akkartik 4328 days ago | link | parent | on: Shader:plz help

Do you want to just open stories in new tabs? I think this will do it. Try it and let me know.

   (def titlelink (s url user)
     (let toself (blank url)
       (tag (a href (if toself
                         (item-url s!id)
                        (or (live s) (author user s) (editor user))
                         url)
               rel  (unless (or toself (> (realscore s) follow-threshold*))
  -                   'nofollow))
  +                   'nofollow)
  +            target '_blank)
         (pr s!title))))
The way to read that is to delete the line that starts with a '-', and to replace it with the lines that start with a '+'. Don't include the '+' itself.
1 point by tvvocold 4328 days ago | link | parent | on: Shader:plz help

it will open every link include the head of page like "new | threads | comments | leaders | submit" but i dont like these also be open in the new tab,(so many tabs then), any idea?
2 points by akkartik 4328 days ago | link | parent | on: Shader:plz help

It's in the same place. Try adding some text outside the table tag. For example:

  (mac npage (title . body)
    `(tag html
       (tag head
         (gen-css-url)
         (prn "<link rel=\"shortcut icon\" href=\"" favicon-url* "\">")
         (prn "<meta name=\"viewport\" content=\"width=device-width\">")
         (prn "<base target=\"_blank\">")
         (tag script (pr votejs*))
         (tag title (pr ,title)))
       (tag body
         (center
           (tag (table border 0 cellpadding 0 cellspacing 0 width "85%"
                       bgcolor sand)
             ,@body)
           (prn "Copyright blah blah")))))
1 point by tvvocold 4328 days ago | link | parent | on: Shader:plz help

Thank you very much.and how can i add something like 'about' or copyright in app?like the bottom of http://news.dbanotes.net/ or hacker news?
1 point by akkartik 4328 days ago | link | parent | on: Shader:plz help

Add one line to lib/news.arc:

  (mac npage (title . body)
    `(tag html
       (tag head
         (gen-css-url)
         (prn "<link rel=\"shortcut icon\" href=\"" favicon-url* "\">")
         (prn "<meta name=\"viewport\" content=\"width=device-width\">")
         (prn "<base target=\"_blank\">")  ;; <--- add this line
         (tag script (pr votejs*))
         (tag title (pr ,title)))
       (tag body
         (center
           (tag (table border 0 cellpadding 0 cellspacing 0 width "85%"
                       bgcolor sand)
             ,@body)))))
1 point by tvvocold 4328 days ago | link | parent | on: Shader:plz help

ok,but how should i edit this in my app? i wanna user click url and open it in the new tab. need more detailes..

plz paste here. thx

1 point by tvvocold 4328 days ago | link | parent | on: Shader:plz help

Thx, shader,that works.another question is how can i add something like about or copyright in app?like the bottom of http://news.dbanotes.net/ or hacker news?
1 point by akkartik 4328 days ago | link | parent | on: Shader:plz help

Ah, so this was the culprit :/ https://github.com/arclanguage/anarki/commit/510419a584

The root cause is that when we made anarki open to incompatible changes we didn't think it would be automatically pulled into VMs like openshift or docker. You can only use a shifting substrate like anarki if you can control when to take in updates.

I'm not sure what to do about this. What do you think?

2 points by shader 4328 days ago | link | parent | on: Shader:plz help

The arc git repo is cloned under app-root/data, but it's not used as the root directory for the web application in case the user has other files they want to load.

I'll admit, the readme isn't the best. I mostly copied it from the original and changed the relevant bits.

Unfortunately, certain files like adminfile* should probably not be relative to the repo directory, because it's likely to get wiped. I'm not sure where the right place to put it would be though. Maybe data/config?

3 points by shader 4328 days ago | link | parent | on: Shader:plz help

Apparently the current version of arc uses (+ srvdir* "admins") as the adminfile*

Thus, the path you should be using is "repo/www/admins". The www directory should already exist. You can of course change this by setting either of those variables (srvdir* or adminfile*) in repo/main.arc. It might be best to relocate that data to the other directory, or it might be deleted on accident when updating later.

Also, I'm not sure that the openshift restart command actually restarted properly; it didn't seem to notice the admin changes until I actually did a force-stop and then start. Maybe I was mistaken, but you could try that if your www/admins file doesn't seem to stick.

1 point by akkartik 4328 days ago | link | parent | on: Shader:plz help

http://www.w3schools.com/tags/att_base_target.asp

Does that help? I can give more detailed instructions in a bit.

1 point by tvvocold 4329 days ago | link | parent | on: Shader:plz help

and anybody know how to set open links in new window?
1 point by tvvocold 4329 days ago | link | parent | on: Shader:plz help

my hacked way is change the admin'auth to 1 or 2 in /app-root/repo/www/news/profile,and admin got the right to edit other's submit.but still donnot have all the right it should have..should i change it to 100 or something?
1 point by tvvocold 4329 days ago | link | parent | on: Shader:plz help

i pasted all the step here http://paste.scratchbook.ch/view/915fbd57
1 point by tvvocold 4329 days ago | link | parent | on: Shader:plz help

i drop and drop out , all didnot work.
1 point by tvvocold 4329 days ago | link | parent | on: Shader:plz help

Thx,rocketnia.i pasted all the step here http://paste.scratchbook.ch/view/915fbd57 but i still cannot use admin's rights.which step was wrong?
1 point by rocketnia 4329 days ago | link | parent | on: Shader:plz help

When you're logged in as admin, can you see anything on the page http://....../newsadmin (replacing ...... as needed)?
1 point by akkartik 4329 days ago | link | parent | on: Shader:plz help

Maybe you need to drop the quotes in the file?
2 points by rocketnia 4329 days ago | link | parent | on: Shader:plz help

But is there a similar file under app-root/data/?

I think that's where the Arc code is actually supposed to be installed, at least according to the openshift-arc readme. Maybe the readme is out of date.... :/

More