Arc Forumnew | comments | leaders | submitlogin
3 points by akkartik 4689 days ago | link | parent

I've been playing with lite-nu and tried to load up srv.arc and news.arc. There seems to be a bug with the default for optional args:

  $ arc
  > (def foo((o a)) a)
  #<fn:foo>
  > (foo)
  #<fn:...nu/01 nu.rkt:106:50>
I was going to report it on github, but the repo seems to not have an issues tab. Is it because it's a fork?


1 point by Pauan 4689 days ago | link

That's right. I actually just discovered that a few hours ago when I tried to call "cut". It's already been fixed on my harddrive, I just need to push it out to git. It should be fixed within the new few minutes.

I don't know why it doesn't have an issues tab. In any case, any issues can either be posted here or e-mailed to me.

---

EDIT: Fixed.

-----

3 points by akkartik 4689 days ago | link

Thanks! I got news.arc up and running!

One other change I had to make was to add keywords to the call to open-output-file in nu.rkt:

  (open-output-file f #:mode 'text #:exists mode)
This is looking great.

-----

2 points by Pauan 4689 days ago | link

Ah, right, Nu is still using the mzscheme version of open-output-file, whereas Racket uses keywords... thanks, I'll fix that right now.

EDIT: Fixed.

-----

1 point by Pauan 4689 days ago | link

I just realized that Arc uses 'text mode with outfile... but that breaks on Windows if the file you're writing to isn't a regular file. Even worse, there's no way to specify 'binary from within Arc.

It does, however, allow Arc to pretend that "everything is Unix" since 'text mode automatically converts "\n" to "\r\n" on Windows. But infile uses 'binary mode, so in that case it should probably use 'text mode too, to maintain the illusion.

Alternatively, make outfile use 'binary mode. Just so long as outfile and infile are consistent and agree with each other.

-----