-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
include group parsing #28
Comments
The current mechanism for accessing parsed group members, and especially nested group members, is admittedly not great. But the parser currently avoids almost all semantic knowledge. To do something more with groups, it would need to know which tag numbers were Thus far, I've tried to avoid this kind of thing in simplefix: with its emphasis on being simple, I am reluctant to require a schema definition in order to parse a message. All that said, I have wondered whether optional layers on top of the basic simplefix functionality are a good idea. Networking has been the main possibility here, but a schema-checking layer has been another option, and perhaps a schema-aware parser as part of that would be useful? |
i like the idea of a simplefix as a parser with python only language about groups: we can copy fix group definitions from quickfix, for example: the idea is something like:
i think it works and is optimized with memoryview instead of double copy strings/bytearray |
So, the reason you'd rather not use QuickFIX is that it isn't pure Python? |
Well i just like the simplefix, quickfix have more features, but here with python world we don’t need a low level high speed lib, but a lib with python language is very nice, or cython/numba if we need speed I use simplefix mainly to parse strings |
Right -- that's the sweet spot for simplefix: it's not intended to be super fast, just quick and easy. So I am interested in making using repeating groups easier, but given that it requires using a schema definition, that's a big loss of simplicity to overcome to make it easier overall, I think. So, if it's ok with you, I'd like to leave this issue open while I think some more about it, and perhaps get some feedback from other users. I'd like to do something here, I'm just not certain how it should be structured yet. I'll post an update when I've thought some more. |
Yeap I’m think something like G= Simplefix.create_group(message, tag_id, simplefix.groups.marketdatasnapshot.nomdentries) The simplefix.groups is a module just to “save standard groups definition” And use the g to anything Like g.tags (all tags found in this group), g.groups (something to [for i in g.groups] or g.groups[0]), g.get_string(), g.startbyte, g.endbyte, g.mapsbytes (array of start/end) |
hi, maybe we could implement a group parsing object
it receive the group tags that exists in a group at construction
when init it receive the tag group name (nomdentries) and the group that will be read
it find the first tag and the last tag, with that we can recursive find group inside group
the point is find the start byte and final byte of a group
do you think it's a good idea? i could help implementing
The text was updated successfully, but these errors were encountered: