Arc Forumnew | comments | leaders | submitlogin
1 point by lark 4641 days ago | link | parent

Nope, that's not it. A different deftem name still causes this error.


1 point by akkartik 4641 days ago | link

It's probably my change for http://arclanguage.org/item?id=15664 again, just like http://arclanguage.org/item?id=16020. Let me take a look. Can you provide simple failing example?

Update 1: As part of that change I changed how we represent templates. In arc 3.1:

  arc> (deftem foo field1 34)
  arc> inst!foo
  #hash((field1 . 34))
vs in anarki:

  arc> (deftem foo field1 34)
  arc> inst!foo
  #(tagged tem (foo #hash() #hash() . nil))
This makes serialization of templates more reliable, but now templates aren't hash-tables anymore; instead of (maptable ... x) you have to say (maptable ... rep.x).

Does this sound like some code you wrote? I'm looking for any places in anarki that use table functions on templates.

Update 2: I'd forgotten to update blog.arc; that's now fixed (http://github.com/nex3/arc/commit/2bd80ecb65). But I don't think this fixes it for you.

-----

1 point by lark 4641 days ago | link

  (deftem bbb
   code nil)
  (withs (b (inst 'bbb 'code "3"))
         (save-table b (string "/dev/shm/" b!code)))

-----

1 point by lark 4641 days ago | link

temstore worked.

This change in Anarki breaks backward compatibility with Arc. news.arc for example doesn't work after this change.

-----

1 point by akkartik 4641 days ago | link

Great; sorry about that.

I just doublechecked news.arc and didn't see an issue. Can you be more specific? Note that you can't mix news.arc from arc3.1 with arc.arc from anarki because of this incompatible change.

-----

1 point by lark 4641 days ago | link

The issue is that everywhere that one was calling save-table now one needs to replace save-table with temstore.

One needs to modify the application so that saving works again.

-----

1 point by akkartik 4641 days ago | link

That is so, yes. Since arc can change at any time, to use it you have to be open to changing your app anytime you pull in updates. It's one of the reasons arc is small; it has no bloat from historical baggage. I've given up and even keep my own code directly in the arc directory.

I'm curious what your current setup is. Are you running off of anarki? Or copying parts of it over to your own repo?

-----

1 point by lark 4641 days ago | link

I'd rather not fork my own copy of Arc.

All I want is to be able to upload a file. Arc can't do it, Anarki can. Arc can change at any time, but Arc did not change in a long time.

I also noticed the following since switching the app to Anarki:

  procedure ...nk/anarki/ac.scm:972:33: expects 1 argument, given 0

-----

1 point by rocketnia 4641 days ago | link

I just looked in Arc 3.1, in all of Anarki's branches, a few commits back in Anarki's master ac.scm, and I didn't find anything at line 972 that would cause an error like that.

I did notice that some functions that are supposed to expect 1 argument in news.arc currently expect 0, so I fixed that: https://github.com/nex3/arc/commit/f311b3879c15a27518bbe0fad...

I don't know where to start testing news.arc, so please speak up if I've made things even worse.

-----

2 points by rocketnia 4641 days ago | link

Looks like I came in just after akkartik noticed the same thing, and I just fixed some overlooked places. XD

-----

1 point by akkartik 4641 days ago | link

I think I tracked this down. Can you pull from github?

-----

1 point by akkartik 4641 days ago | link

I'm still curious if you were seeing an issue in news.arc on anarki outside of your own code. If so I really should fix it, but I don't see anything wrong so far. When I made the change I tried to be careful and replace save-table with temstore: http://github.com/nex3/arc/commit/c125d0330c.

-----

1 point by akkartik 4641 days ago | link

Instead of (save-table ...) say (temstore bbb ...).

If you copied this way of doing things from somewhere, let me know and I'll try to update it.

-----