Arc Forumnew | comments | leaders | submit | mec's commentslogin
2 points by mec 4364 days ago | link | parent | on: Arc continuation puzzle

I've not a clue why but I got

  11213nil
I figured catching a throw would cancel out and you'd get '123 but apparently I need to go read more on them.

-----


If you're trying to debug print the value of a variable can't you do:

  arc> (let x 4
         (+ 1 2
            (/ prn.x 3)
            (/ 7 6)))
  4
  11/2
As long as print returns the the value it prints (and it appears to) this should work fine.

-----


Someone in an earlier thread of mine suggested this fix:

  ((pair? x)
   (cons (ac-qq1 level (car x) env) (ac-qq1 level (cdr x) env)))

-----

2 points by shlomif 4374 days ago | link

Thanks!

I applied the following patch eventually:

{{{{{{{{{ ((pair? x) - (map (lambda (x) (ac-qq1 level x env)) x)) + (let ((t (lambda (f) (ac-qq1 level (f x) env)))) + (cons (t car) (t cdr)))) }}}}}}}}}

-----

2 points by eds 4374 days ago | link

By the way, what is with the "{{{{{{{{{" and "<<<<<<<<" in your posts? (You can mark text as code by indenting it.)

-----

3 points by mec 4374 days ago | link

To use the auto code format add 2 newlines and the code indented by two spaces;

  like this

-----

2 points by shlomif 4374 days ago | link

Hi! Thanks for the tip.

I normally use "{{{" and "<<<<" as delimiteres in a plaintext . But obviously it doesn't work very well here, so I'll keep in mind to use indentation instead.

Thanks again.

-----

2 points by mec 4375 days ago | link | parent | on: Poll: What do you edit Arc code with ?

DrScheme, but unfortunately I can't figure out how to add it as a language instead of just running it through mzscheme so I don't get any useful syntax highlighting etc.

-----


Lua

-----


For quick prototyping I can see how Lua's tables would be extremely useful. I've been trying to think of a way to combine lisp macros with Lua tables to see how that turns out.

-----

1 point by mec 4381 days ago | link | parent | on: Anarki Windows Compatibility

I got the snapshot he posted and it won't even load in mzscheme:

  G:\Anarki\arc-wiki>mzscheme -m -f as.scm
  compile: bad yntax; function application is not allowed, because no %app syntax transformer is bound in: (quote nil)

   === context ===
  G:\Anarki\arc-wiki\ac.scm:978:0: aload1

  >
It'll only load in DrScheme but then I get:

  arc> (load "news.arc")
  nil
  arc> (nsv)
  The syntax of the command is incorrect.

  The syntax of the command is incorrect.
 
  The syntax of the command is incorrect.

  The syntax of the command is incorrect.

  load items: Error: "directory-list: could not open \"G:\\Anarki\\arc-wiki\\arc\\news\\story\\\" (The system cannot find the path specified.; errno=3)"
  arc>

-----

1 point by nex3 4381 days ago | link

Anarki was briefly incompatible with the latest MzScheme. The snapshot may have been made then. The latest revision should be better, though, at least with respect to MzScheme syntax errors.

-----

2 points by mec 4383 days ago | link | parent | on: Arc2.tar

Same thing here, using windows:

  arc> (nsv)
  The syntax of the command is incorrect.
  The syntax of the command is incorrect.
  The syntax of the command is incorrect.
  The syntax of the command is incorrect.
  The syntax of the command is incorrect.
  load items: Error: "directory-list: could not open \"G:\\MzScheme\\arc2\\arc/news/story/\""
  arc>

-----

2 points by nex3 4383 days ago | link

I believe Anarki works on Windows, although I wouldn't swear to it. If it doesn't, patches would be appreciated.

-----

2 points by mec 4383 days ago | link

Forgive my newbness but I've not used git before and don't really have a clue where to start. I did read that you can connect to git repos with other clients (I currently have TortoiseSVN installed) and would love to know how to do that as it would probably be the easier than setting up cygwin and figuring out git. Any help would be appreciated.

-----

3 points by nex3 4383 days ago | link

I think Cygwin is the official way to use Git on Windows, but there's a MinGW that seems to be very functional (http://code.google.com/p/msysgit/downloads/list).

Once you've got one of those installed, the basic workflow I talked about at http://arclanguage.org/item?id=1387 should work fine.

-----

3 points by raymyers 4382 days ago | link

I would encourage you to go ahead and try using git. However, here's a current snapshot of Anarki you can play with.

http://cadrlife.com/arc/arc-wiki.tar.gz

-----

2 points by sjs 4383 days ago | link

You can use git as a frontend to an svn repo but I haven't heard about doing it the other way. Because git is a superset of svn it may be possible but a quick search turns up nothing. Setting up cygwin is a snap. I am still a git noob. After an hour or two of reading you'll be able to use the git basics and after a few hours more reading you'll be able to use the basics and actually know wtf is going on underneath.

http://robsanheim.com/2008/02/22/learn-git-10-different-ways...

-----

1 point by czoon 4377 days ago | link

is there any solution for this? . . The syntax of the command is incorrect. load items: Error: "directory-list: could not open \"G:\\MzScheme\\arc2\\arc/news/story/\""

-----

1 point by eds 4377 days ago | link

Yes, the Anarki git repo has a fix for this.

http://arclanguage.org/item?id=3647

There is also Anarki Stable which consists of only arc2 and bug fixes.

http://arclanguage.org/item?id=3849

-----

1 point by czoon 4377 days ago | link

thanks i ll try

-----

1 point by czoon 4369 days ago | link

from http://jfkbits.blogspot.com/2008/01/digging-into-arc-in-24-m...

(xdef 'mkdir (lambda (path) (make-directory path))) redefine mkdir. its solves problem.

-----

1 point by mec 4387 days ago | link | parent | on: Confusing Macro Error

Very nice fix, with that I can finally do

  (define (read-square-brackets ch port src line col pos)
    `(fn (_ . __)
       ,(read/recursive port #\[ #f)))

-----

2 points by mec 4387 days ago | link | parent | on: Confusing Macro Error

The space was a typo when writing the post, not in the code.

-----

More