Perhaps PRI drawLines(pLine: sLine, count) | i, i.e. var: type? This is what Python and Rust do. But would this interact badly with specifying types on return variables?
We went over this in the live forum meeting today and decided to just keep the ^.
I am going to add passing and returning of whole structures that can fit in the method parameters and return values. Tonight I added passing structures whole, and I think returning whole structures only requires some compiler changes. Lots to think about and it overflows my mental stack a bit.
@Rayman said:
Is the order of elements within the structure kept as written or reordered in some way?
Also is everything stored in longs even if bytes? Or, compacted?
Everything is kept in the order. It was declared and it is all packed without regard to alignments.
When structures get passed on the stack as parameters and return values, they will need to be rounded up to the next long, in size, so they amount to a number of whole longs.
Hi Chip, i have a Problem with PNUT v44.
My P2 Projekt ist very big and I want to rewrite it with the new structures in V44.
With PNUT v35u it compiles without Errors.
With PNUT v44 it compiles with Error: "OBJ data exceeds 1024k limit."
Can you expand the OBJ data space in v44?
I think the structures in V44 are very very useful, but I need a built-In Method sizeof(struct) witch return the structure length in bytes.
Hi Chip, I try the other PNUT versions.
The Error: "OBJ data exceeds 1024k limit." comes with v37 - v44.
In v37 "Parameterization to child-object instantiations" is added and I think this will take much more OBJ data space.
@macca said:
Please update the Spin interpreter source (and any other updated sources) in both the package and git repository.
Thanks.
Will do, but there is a problem:
I have been changing the way data structures work, so that in the next version, there may be differences in how you use them. I hope to have this done soon, but it will need another week of time to get ironed out.
@wummi said:
Hi Chip, I try the other PNUT versions.
The Error: "OBJ data exceeds 1024k limit." comes with v37 - v44.
In v37 "Parameterization to child-object instantiations" is added and I think this will take much more OBJ data space.
I need to discover why this is happening. I think it may have to do with CON data being treated as part of the binary image space, initially, but I am not sure yet.
@macca said:
Please update the Spin interpreter source (and any other updated sources) in both the package and git repository.
Thanks.
Will do, but there is a problem:
I have been changing the way data structures work, so that in the next version, there may be differences in how you use them. I hope to have this done soon, but it will need another week of time to get ironed out.
No problem, it was a "general remainder" to update the sources, I noticed that even in v43 the source was still a bit older.
I'm a bit behind with the structure implementation and for now I'm more interested in implementing the new methods since they have renumbered the existing bytecodes.
Comments
It's something like 16 longs I think.
I believe it's 16 as that's the number of parameters you can pass to a method.
In the P2 meeting Chip just said that its 128 longs.
That's a quarter of total cogRAM! If you use all that then I bet you'll be taking an axe to usable space for things like regload().
Parameters can be from 0 to 127 longs .
Return values can be from 0 to 15 longs.
Ok, seems like enough to pass some sensibly sized structures by value then
We went over this in the live forum meeting today and decided to just keep the ^.
I am going to add passing and returning of whole structures that can fit in the method parameters and return values. Tonight I added passing structures whole, and I think returning whole structures only requires some compiler changes. Lots to think about and it overflows my mental stack a bit.
Is the order of elements within the structure kept as written or reordered in some way?
Also is everything stored in longs even if bytes? Or, compacted?
Everything is kept in the order. It was declared and it is all packed without regard to alignments.
When structures get passed on the stack as parameters and return values, they will need to be rounded up to the next long, in size, so they amount to a number of whole longs.
Hi Chip, i have a Problem with PNUT v44.
My P2 Projekt ist very big and I want to rewrite it with the new structures in V44.
With PNUT v35u it compiles without Errors.
With PNUT v44 it compiles with Error: "OBJ data exceeds 1024k limit."
Can you expand the OBJ data space in v44?
I think the structures in V44 are very very useful, but I need a built-In Method sizeof(struct) witch return the structure length in bytes.
Please update the Spin interpreter source (and any other updated sources) in both the package and git repository.
Thanks.
Hi Chip, I try the other PNUT versions.
The Error: "OBJ data exceeds 1024k limit." comes with v37 - v44.
In v37 "Parameterization to child-object instantiations" is added and I think this will take much more OBJ data space.
Will do, but there is a problem:
I have been changing the way data structures work, so that in the next version, there may be differences in how you use them. I hope to have this done soon, but it will need another week of time to get ironed out.
I need to discover why this is happening. I think it may have to do with CON data being treated as part of the binary image space, initially, but I am not sure yet.
No problem, it was a "general remainder" to update the sources, I noticed that even in v43 the source was still a bit older.
I'm a bit behind with the structure implementation and for now I'm more interested in implementing the new methods since they have renumbered the existing bytecodes.
Thanks Chip,
I removed the parallel arrays from my LED Matrix driver and replaced them with data structures.
HydraHacker
@cgracey
Any further thoughts or progress on enabling command line specification of the comm port for download?
Thanks,