Compiler: previously, constant lists in rule heads were compiled in a way that was very fast at runtime, but could crash if the lists were too large. Now, large (> 10 entries) constant lists are compiled the same way as constant lists in rule bodies, which is slower but has no limit on size.
Debugger: pressing Ctrl-D at a [more] prompt closes the program.
Compiler: predicates that are queried but not defined will now include a line number in the compiler warning. This was always supposed to be the case, but was bugged.
Backend: (inline status bar $) will now produce a line break on Z-machine. It’s unclear whether this was Linus’s intent, but it matches both the Node and 6502 Å-machine interpreters, so the Z-machine has been updated for consistency.
Unit test runner: unit.dg has been redesigned. Unit tests written against the version from 1b/01 will need to be rewritten along the lines of time-tests.dg in the test/unit directory. (It was just released, so we don’t expect many – or any – tests to have been written against the old version.)
loving the new error warnings in dgdebug. but i think i found an edge problem.
i haven’t updated to the latest point update but i think this will be present in that as well.
i’m using 2 identical fungible objects but the warning system doesn’t seem to recognize them properly or that they’re being used.
Warning: Object #ruby1 was used, but never declared as topic.
Warning: Object #ruby2 was used, but never declared as topic.
Warning: Object #248 was used, but never declared as topic.
Warning: Object #249 was used, but never declared as topic.
Warning: Object #250 was used, but never declared as topic.
Warning: Object #251 was used, but never declared as topic.
both rubies are being used throughout the code and i’m not even sure why there are four backend objects mentioned when i’ve only made 2 rubies.
the code itself still runs fine within the debugger so it’s a minor thing. i’m chalking this up to "fungible objects are weird and confusing even to the debugger. " but might want to turn the warnings off for fungible objects?
Ooh, good catch! I never use the automatic object generation feature so I didn’t think to test it with the new warnings. It should be a one-line fix, but I don’t know if I’ll have time to tackle it tonight, so I’ll put it on the issue tracker for now.
The code for (generate $ $) is on line 1982 of frontend.c; that code needs to set the topic flag on each object’s name.
The rubies, on the other hand, I’m less sure about. You’re sure you have them both declared as the current topic somewhere?
That’s when you put the object at the very start of a line, so that you can refer to it with *:
#apple %% <- this bit here
(name *) apple
(item *)
I added those warnings because Dialog doesn’t require objects to be declared. So you can easily end up with code like:
(#couch is #in #livingrom)
At which the compiler will happily create a #livingrom completely separate from the #livingroom and your couch will disappear into the void.
These warnings try to prevent those errors in “big” projects (i.e. any projects that include the standard library). If you don’t want them, though, you can pass --no-warn-not-topic in your command line and they’ll disappear.
ah. i’ve been doing that forever and never knew that was the actual term for it.
i didn’t do that because it’s not done in the manual section on “identical objects” (i just copy and paste the “marble” code and customize what i need).
I mostly didn’t give it one because I didn’t expect it to be used very often, and I didn’t want to use up all the one-letter options (there are only 52 of them!). If people end up using it a lot (outside of unit test mode), it wouldn’t cause any problems to add one.