Arc Forumnew | comments | leaders | submit | idoh's commentslogin
3 points by idoh 4040 days ago | link | parent | on: New version of Arc/Nu

Thanks Pauan, I'm an Arc/Nu user for my personal projects and I'll be checking it out.

-----

1 point by Pauan 4039 days ago | link

A quick note if you're migrating old code to the new version: the "parameter" macro is gone. Use an ordinary variable and "w/" instead. In other words, rather than doing this:

  (parameter foo ...)
  (w/foo ...)
Do this:

  (= foo ...)
  (w/ foo ...)
Also, "=" still works like it does in Arc, but I recommend using "var" rather than "=", because it's hyper-static:

  (var foo ...)
  (w/ foo ...)
---

Another difference is that keyword arguments are no longer supported at all. This is because it's quite difficult to implement them properly, only a single function in Arc/Nu actually used them, and they're not backwards compatible with Arc 3.1, so I decided it wasn't worth it.

If you run into any other difficulties, feel free to post here and we can work it out.

-----

1 point by Pauan 4039 days ago | link

By the way, if you use "parameter" and can't be bothered to change to the new system, you can use this macro:

  (mac parameter (x y)
    (w/uniq (var body)
      `(do (var ,x ,y)
           (mac ,(sym:string "w/" x) (,var . ,body)
             `(w/ ,',x ,,var ,@,body))
           ,x)))
Why didn't I just include it in Arc/Nu? Because I think the new system is better, so in the long run I really do want people to switch to the new system.

-----

1 point by idoh 4075 days ago | link | parent | on: Best way to deploy arc code

Thanks Kartik. My git knowledge is about the level where I can pull and push to github and resolve minor conflicts, so this is probably a really basic question -

I know how to install git, but how hard is it to set up a git server to receive the remote pushes from dev?

-----

1 point by akkartik 4075 days ago | link

It sounds like you have ssh access to your server, in which case it's super easy, no server needed at all, git push will work over ssh.

-----

2 points by idoh 4399 days ago | link | parent | on: Lisp on the iPad

I got the app, I think the vision is good but for some reason it is really hard to actually write out the code. My feeling is that it is really heavy on modal dialog boxes, and I feel like I'm always opening and closing them. That blocks me from really getting into the flow.

-----

1 point by akkartik 4398 days ago | link

Thanks for sharing the feedback!

-----

3 points by idoh 4475 days ago | link | parent | on: Bay Area Lisp meetup

I'm coming. Long time no see btw!

-----

1 point by idoh 4731 days ago | link | parent | on: Ask Arc Forum: arc - racket converter

I thought about that but I've decided to leave arc behind, but take my favorite things about it with me. In particular, I really like the http server because it is great to do web dev on a repl-based server.

-----

1 point by aw 4731 days ago | link

I'm not sure whether you mean by "leaving Arc behind but taking some things with you" you want to be able to write your own programs in Racket but use Arc libraries that are useful to you, or to have no Arc code running in your system at all?

If you mean you'd like to use Arc's http server from Racket, the answer is yes, you can write your programs in Racket and use Arc libraries if you want to. It's currently rather awkward, but we can help you with that if you want.

Or if you mean you don't want to be running any Arc code at all, I suppose you could translate the Arc library you want into Racket. I can't quite tell why you'd want to do that, because it would be a lot of work and you would end up with a library that did the same thing anyway as the Arc library you already can use anyway.

You also asked if there's an "automatic" way to translate Arc into Racket. The answer to that as rntz explained is yes, that's what the Arc compiler does. It takes Arc code and translates it into Racket. But that's really the same as option one.

Perhaps you're asking if there's an automatic way to translate Arc into readable Racket. No, the Arc compiler produces a giant blob of Racket code. The Arc compiler produces working Racket code, but not code that you can look at and see what it's doing (not without a lot of work, at any rate), or to be able to modify yourself at all easily. So the answer to the question "is there an automatic way to translate Arc code into Racket code readable by humans" the answer to that one is no.

Or, if using Arc libraries from your Racket program is more trouble than it's worth right now (and I imagine it could be), perhaps you'd like to implement a REPL with Racket's web server. Of course the Arc forum probably isn't the best place to ask about that, the Racket email lists would probably be more help, but I imagine it's probably possible since Racket does have eval.

-----

1 point by rocketnia 4731 days ago | link

"Or, if using Arc libraries from your Racket program is more trouble than it's worth right now (and I imagine it could be), perhaps you'd like to implement a REPL with Racket's web server. Of course the Arc forum probably isn't the best place to ask about that, the Racket email lists would probably be more help, but I imagine it's probably possible since Racket does have eval."

It's actually kind of an example in (the most advanced part of) the Racket getting started pages:

> Given the "many" example, it’s a small step to a web server that accepts arbitrary Racket code to execute on the server. In that case, there are many additional security issues besides limiting processor time and memory consumption. The racket/sandbox library provides support to managing all those other issues. (http://docs.racket-lang.org/more/index.html)

The racket/sandbox module reference has another example:

> For example, here is a quick implementation of a networked REPL... (http://docs.racket-lang.org/reference/Sandboxed_Evaluation.h...)

These examples complement each other. The first doesn't actually 'eval any client input, and the second uses a TCP socket directly rather than bothering with session handling or HTTP, but each of them picks up the other's slack. I'm a bit surprised there aren't many Racket Web REPLs for Racket the way there are for Arc.

-----

5 points by idoh 5174 days ago | link | parent | on: Poll: All things not arc?

If you have something that you think might be interesting, just post it. The votes / comments will tell you whether it was a good idea better than a poll.

-----

2 points by idoh 5201 days ago | link | parent | on: My full-time arc app for the last 3 months

I think it's great that there are more arc web apps out there. Having said that, I'm having a lot of trouble figuring out what the site does or even how to navigate around. I do get the sense that something complicated is going on in the background, but I am not sure what the benefit is.

If you'd like feedback (at least an opinion) on how to make the site stronger, let me know.

-----

2 points by akkartik 5201 days ago | link

Thanks idoh, I should have said something about what I'm trying to do.

I've been using feedreaders for about 4 years, but I still remember that I went past the RSS icon several-score times before I figured out what it meant and how I should use it. I think the notion of subscribing is a huge reason feedreaders haven't caught on in the mainstream. So goal #1: to give the benefit of feedreaders - one place to read - to lay users without requiring them to create subscriptions. On readwarp you just vote on what you like, and you get subscribed to feeds behind the scenes.

Even if you understand feedreaders, they have several issues. First, since they sort by time, one high-volume feed can swamp others. This implicitly gives people an incentive to post more frequently rather than with higher quality (http://akkartik.name/blog/2009-05-19-21-30-46-soc). Second, feedreaders today look too much like my inbox. At some number of feeds google reader starts to seem like work, and I start skimming rather than reading. So goal #2: to be fair to all my feeds, to eliminate the sense of 'falling behind', and to force me to not skim. The current UI forces me to focus on one story at a time, even if I hit the red button within 3s of looking at a story.

Goal #3 is to be less concerned with social recommendations than, say, stumbleUpon. Reddit tried to do recommendations by clustering users, and it failed partly because we all have such diverse interests, just because I overlap with you on programming doesn't mean I overlap with you on indian news. A special-case of 'not being social' is to not be concerned with what's popular. What we all read should drive what's popular, not the other way around. But lots of sites today will just show you what's popular, simply because that's easy to do. When we all tend to read what's popular, the people who read a lot end up disproportionately influencing what we read. No conspiracy theory here, I just want us to make more independent reading choices, and I think that'll improve our level of discourse and make the world a better place.

The implication of goal #3 is that I use more text mining than graph algorithms to make recommendations. I'll prob factor in recommendations from your friends at some point, but it'll just be one signal among many to decide what you should read. The program currently is about 4k lines of arc. Much is going on behind the scenes that the current UI doesn't really expose. There's algorithms to prioritize your feeds based on affinity with other stories you said you liked. Subscription isn't boolean but grey-scale. But the current UI doesn't separate multiple users, and it's trying to minimize how much you tell me about yourself. If you'd like to try out a feedreader personalized to your tastes, send me an email. I'll import your feeds for you, and you can try out my algorithms to prioritize your feeds.

Any feedback y'all have is most appreciated. I applied to YC with this last time, and I've applied this time as well. Wish me luck!

-----

2 points by idoh 5200 days ago | link

Hi Kartik - Small world, I remember you presenting this at SuperHappyDevHouse 30. Nice to see you plugging away on it. My friend presented a joint project of ours during the same lightning talk, lawnelephant (a site that just took feature requests and implemented them).

I'll give your product a try - just shoot me an email at idoh@idoh.com. I'm not sure it is for me though - I like the google reader layout, because I like reading all of the feeds from one source and then switching to another, e.g. read everything from daring fireball and then read avc.

-----

1 point by akkartik 5200 days ago | link

Holy crap, I think I remember you. Hola.

"I like reading all of the feeds from one source and then switching to another"

That's the sort of thing that would be a trivial change for readwarp. I've received this feedback a couple of times, and have been mulling a 'more from this feed' button.

Let's take this offline. Why don't you shoot me an email? (address in my profile)

-----

1 point by idoh 5223 days ago | link | parent | on: Loading files repeatedly in the repl

Thanks - I'm using 1.

-----

3 points by idoh 5280 days ago | link | parent | on: Macros are a menace

I've found them really useful to build up html. Compare "tag" as a macro versus "tag" as a function.

  (tag body
    (tag div
      (map display-thread threads)))

  (tag body
    `(tag div
       ,@(map display-thread threads)))
This is sort of a simplistic example, but once you get deep into it, you are always quoting and unquoting, and it just gets too tedious.

-----


Thanks!

-----

More