These are chat archives for ProtoDef-io/node-protodef

4th
Apr 2017
William Gaylord
@wgaylord
Apr 04 2017 04:07
i said little not small. :P
Hans Elias J.
@hansihe
Apr 04 2017 09:12
mhsjlw: I did not bother putting it in, should be easy to do though
Hans Elias J.
@hansihe
Apr 04 2017 09:19
so the way I am doing it is that a single protodef file is a compilation unit
inside a compilation unit all types can refer to each other, even recursively
a compilation unit can also optionally have native types, they need to be defined for each language the spec file wants to support manually
when a spec file with native types wants to support a target, it needs to have a separate config file for that target. it contains things the compiler needs to know to link in those types, including what type of value it returns
(this is what enables the compiler to generate a match on certain values, like integers)
config file also contains additional info a specific language backend might need
Hans Elias J.
@hansihe
Apr 04 2017 09:24
once I have all of this done and working, I am going to add the ability to import a spec file into another spec file
I imagine this is how the protodef "builtins" would be handled, just a spec with common types implemented natively in all languages we support
when importing spec files, they will be handled as a completely separate compilation unit. it will be handled the same way as native types inside the compiler, but the needed information is taken from the spec file instead of per-language config files like for native types
in the future we can add support for including spec files from git repos if we want, that should be relatively easy
Hans Elias J.
@hansihe
Apr 04 2017 12:25
ok, namespace resolving is fully finished now
types now know about each other
mhsjlw
@mhsjlw
Apr 04 2017 12:26
hype !
I'm so excited
and I was thinking I'm going to work on a Swift backend as well
Java, Swift, Rust and Elixir
Hans Elias J.
@hansihe
Apr 04 2017 12:26
I will add a way of temporarily annotating information to native types now, that stuff should be in a separate config file for each language eventually
mhsjlw
@mhsjlw
Apr 04 2017 12:26
not in that order specifically
Hans Elias J.
@hansihe
Apr 04 2017 12:27
java is priority for me at least
mhsjlw
@mhsjlw
Apr 04 2017 12:27
yeah
are you using it in an Android app ?
Hans Elias J.
@hansihe
Apr 04 2017 12:27
because I need to find what extra info I need to expose for a statically typed language
mhsjlw
@mhsjlw
Apr 04 2017 12:27
or just for some other projects
ah I got ya
Hans Elias J.
@hansihe
Apr 04 2017 12:27
nope, being able to use minecraft-data in java is just something I think would be important
mhsjlw
@mhsjlw
Apr 04 2017 12:27
I agree
Hans Elias J.
@hansihe
Apr 04 2017 12:28
it would expand our demographic by a lot
mhsjlw
@mhsjlw
Apr 04 2017 12:28
And with compilation it will make it convenient
yes, it would
I think swift would as well
but maybe not as much for mc data but more for protodef
Hans Elias J.
@hansihe
Apr 04 2017 12:34
I still think of protodef as mainly for mcdata lol
mhsjlw
@mhsjlw
Apr 04 2017 12:36
I use it outside of Minecraft
Hans Elias J.
@hansihe
Apr 04 2017 12:38
oh, you do?
mhsjlw
@mhsjlw
Apr 04 2017 14:23
yeah
Robin Lambertz
@roblabla
Apr 04 2017 15:20
node-raknet still counts as minecraft stuff @mhsjlw :P
But more seriously, I do have grand plans for protodef outside minecraft.
Hans Elias J.
@hansihe
Apr 04 2017 15:46
roblabla: grand plans? :P
CertainLach
@CertainLach
Apr 04 2017 17:32
Protodef is a good replacement for protobuf :D
Robin Lambertz
@roblabla
Apr 04 2017 17:48
@hansihe: defining all the things :D
Hans Elias J.
@hansihe
Apr 04 2017 17:48
hah
Robin Lambertz
@roblabla
Apr 04 2017 17:48
TCP/UDP/IP definitions. Common protocol definitions (http2 anyone ?)
Wireshark integration
More metadata types so we can better document the format (description, title, etc...)
Some info about what's the "canonical" transport used (TCP/IP ? unix socket ? UDP ?)
Hans Elias J.
@hansihe
Apr 04 2017 17:50
are you interested in using the spec file format I invented, or do you want to use the json format?
Robin Lambertz
@roblabla
Apr 04 2017 17:50
I'm very interested in the spec file format
I kinda want to retain JSON as possible, but if down the road it becomes a roadblocker, I'm ok with ditching it
Reason why is that it's easy to hack some tooling around a JSON file
While the spec file is basically only usable through the compiler
I'm OK with making breaking changes to the JSON structure though
Hans Elias J.
@hansihe
Apr 04 2017 17:59
haha, I already took that liberty
but yeah, I agree we should have a JSON representation
Hans Elias J.
@hansihe
Apr 04 2017 19:33
codegen for whole protocol spec files works now
that includes references and usages between types
I haven't tested it, but this should start an infinite loop. remind me to fix that later
by infinite loop I mean in the compiler
or wait, it would just crash
still, I need to validate that stuff like that doesn't exist
I think that generated code is fairly optimal
internal functions could have better names, but i'll deal with that later
mhsjlw
@mhsjlw
Apr 04 2017 20:08
@roblabla I have a websocket service that uses protodef to serialize push notifications that remind me to refill my transit card
I did it in the worst possible way
I'll switch to gcm one day :0
Hans Elias J.
@hansihe
Apr 04 2017 20:09
or just use something like pushbullet :P
mhsjlw
@mhsjlw
Apr 04 2017 20:12
I wrote it for fun idk
does Pushbullet have an api ?
because I log in and scrape the site the same time everyday
so that's why there is pretty much no battery drain
not really worried too much about that right now
but on the topic of protodefc
how's it goin'
Hans Elias J.
@hansihe
Apr 04 2017 20:14
you just post to a rest endpoint and it notifies you on all your devices
I have used it for many things, it's very convenient actually
for protodefc status you can pretty much look at the latest gist
that's the kind of output it produces now
it fully supports namespaces and references between them
native types work
now that it's fairly standalone I should probably implement a simple CLI so people can start trying it out
mhsjlw
@mhsjlw
Apr 04 2017 20:18
wow
okay
lezz do this
the API isn't drop in though , yet
Hans Elias J.
@hansihe
Apr 04 2017 20:19
what do you mean
mhsjlw
@mhsjlw
Apr 04 2017 20:19
like , this doesn't replace node protodet
I have to rewrite things
Hans Elias J.
@hansihe
Apr 04 2017 20:19
oh right
mhsjlw
@mhsjlw
Apr 04 2017 20:20
I need a compiler for that
Hans Elias J.
@hansihe
Apr 04 2017 20:20
yeah, there is no protocol.json frontend yet
mhsjlw
@mhsjlw
Apr 04 2017 20:20
Typescript
:)
Hans Elias J.
@hansihe
Apr 04 2017 20:20
what about typescript? slightly confused
mhsjlw
@mhsjlw
Apr 04 2017 20:22
I mean , once we do Java backend
I need a typescript backend as well
it's for something else I'm working on for another project
Hans Elias J.
@hansihe
Apr 04 2017 20:22
that would be very very redundant
mhsjlw
@mhsjlw
Apr 04 2017 20:22
then generate typings ?
Hans Elias J.
@hansihe
Apr 04 2017 20:23
that would be a lot less redundant, yep
mhsjlw
@mhsjlw
Apr 04 2017 20:23
yeah I'll write a typing generator
that can be separate I think
Hans Elias J.
@hansihe
Apr 04 2017 20:23
they can
mhsjlw
@mhsjlw
Apr 04 2017 20:27
what license
I'll contribute​ build files and a readme
Just give me a bit
William Gaylord
@wgaylord
Apr 04 2017 21:08
I think I know a compromise I can use. There is a python JS interface library I think. (Or maybe on for exlair)
mhsjlw
@mhsjlw
Apr 04 2017 21:09
well, it doesn't matter because we can just write a backend
William Gaylord
@wgaylord
Apr 04 2017 21:10
I was told that that project was going to take a while...
Robin Lambertz
@roblabla
Apr 04 2017 21:11
Blizzard's Soon (TM)
Or maybe valvetime "Soon" :P
All hail the great MIT license
mhsjlw
@mhsjlw
Apr 04 2017 21:15
all hail the rust standard of dual mit apache2
Robin Lambertz
@roblabla
Apr 04 2017 21:15
what does apache2 give you ?
mhsjlw
@mhsjlw
Apr 04 2017 21:16
you can place warranty and have patent claims
Hans Elias J.
@hansihe
Apr 04 2017 21:16
i sorta want the compiler to be under the gpl
mhsjlw
@mhsjlw
Apr 04 2017 21:17
fuck no
Hans Elias J.
@hansihe
Apr 04 2017 21:17
there are no downsides to it really, it isn't gonna be embedded in anything else really
mhsjlw
@mhsjlw
Apr 04 2017 21:17
because then the produced code is
Hans Elias J.
@hansihe
Apr 04 2017 21:17
well, I wrote it though
no it isn't
that's not how it works
gcc is gpl, that doesn't mean everything compiled with it is
Robin Lambertz
@roblabla
Apr 04 2017 21:18
Actually, GPL is fine for the most part
I just sorta worry about how it interacts with the native types
mhsjlw
@mhsjlw
Apr 04 2017 21:18
yeah you wrote it , so you can do whatever you want , it just affects wether or not I feel like using it or contributing to it
Robin Lambertz
@roblabla
Apr 04 2017 21:19
Here's the thing : we want backends/frontends to be open source
but we don't really care if native types are.
mhsjlw
@mhsjlw
Apr 04 2017 21:19
if you can guarantee that it won't affect anything I write that's not protodefc
Hans Elias J.
@hansihe
Apr 04 2017 21:19
well, native types is analogous to linking
it shouldn't be a problem
Robin Lambertz
@roblabla
Apr 04 2017 21:19
Linking against GPL is ambiguous by the license ^^'
Hans Elias J.
@hansihe
Apr 04 2017 21:20
that's different
the linking exception is for gpl code that links to non-gpl code
this case is more like the linker itself
William Gaylord
@wgaylord
Apr 04 2017 21:21
or non-gpl code that links to gpl code.
^ not allowed.
Hans Elias J.
@hansihe
Apr 04 2017 21:21
sure
William Gaylord
@wgaylord
Apr 04 2017 21:21
which forces people who want to write backend to be GPL.
Hans Elias J.
@hansihe
Apr 04 2017 21:21
yeah
mhsjlw
@mhsjlw
Apr 04 2017 21:21
he wants that
Hans Elias J.
@hansihe
Apr 04 2017 21:22
that's exactly what I want to do
William Gaylord
@wgaylord
Apr 04 2017 21:22
why?
mhsjlw
@mhsjlw
Apr 04 2017 21:22
I'm not sure if I can get on board with this
Hans Elias J.
@hansihe
Apr 04 2017 21:22
because I want all backends to be open source
mhsjlw
@mhsjlw
Apr 04 2017 21:22
hmm
I'll think about it
Hans Elias J.
@hansihe
Apr 04 2017 21:22
why not?
William Gaylord
@wgaylord
Apr 04 2017 21:22
GPL is like the most limiting license out there...
Hans Elias J.
@hansihe
Apr 04 2017 21:22
do you have a reason why not?
William Gaylord
@wgaylord
Apr 04 2017 21:22
like it strips the end user of there rights to do what they want with there code...
Robin Lambertz
@roblabla
Apr 04 2017 21:23
Yes, but we want backends to be open source
Also, @chibill this is a compiler
it's not an interpreter
Hans Elias J.
@hansihe
Apr 04 2017 21:23
I would normally not use the GPL, but I feel like this is one of the very few situations where it really fits well
William Gaylord
@wgaylord
Apr 04 2017 21:23
still....
Robin Lambertz
@roblabla
Apr 04 2017 21:23
you may use the compiler output in your proprietary program
mhsjlw
@mhsjlw
Apr 04 2017 21:23
no , 'still' is not how I feel
Robin Lambertz
@roblabla
Apr 04 2017 21:23
You just can't change the compiler to do new stuff without open sourcing it
Hans Elias J.
@hansihe
Apr 04 2017 21:24
the only thing using the gpl for this will do is prevent some company from nicking it and improving without contributing back
mhsjlw
@mhsjlw
Apr 04 2017 21:24
Firstly I feel like the gpl is a fantasy
you can't enforce half this shit
I prefer encouraging
Robin Lambertz
@roblabla
Apr 04 2017 21:24
@mhsjlw it's not a problem of enforcing
it's a problem of communicating intent
MIT is more or less "IDGAF"
William Gaylord
@wgaylord
Apr 04 2017 21:24
no
mhsjlw
@mhsjlw
Apr 04 2017 21:24
not threatening to hit you with a stick in the dark where I can't see you
Robin Lambertz
@roblabla
Apr 04 2017 21:24
GPL is "Play nice".
mhsjlw
@mhsjlw
Apr 04 2017 21:25
funny,
William Gaylord
@wgaylord
Apr 04 2017 21:25
GPL is you can only add stuff if I can have it too.
Robin Lambertz
@roblabla
Apr 04 2017 21:25
I think it's a really good choice actually. If (and only if) we can make sure it doesn't screw over people who need proprietary native types
mhsjlw
@mhsjlw
Apr 04 2017 21:25
bukkit 100% was a play nice situation
William Gaylord
@wgaylord
Apr 04 2017 21:25
yep
:P
Robin Lambertz
@roblabla
Apr 04 2017 21:25
CraftBukkit wasn't.
they got what they deserved
William Gaylord
@wgaylord
Apr 04 2017 21:25
Craftbukkit was LGPL with a linked GPL......
Robin Lambertz
@roblabla
Apr 04 2017 21:25
I warned them a gazillion times.
CraftBukkit contained proprietary code
it couldn't be LGPL or GPL or whatever else
William Gaylord
@wgaylord
Apr 04 2017 21:25
LGPL lets you do that...
Robin Lambertz
@roblabla
Apr 04 2017 21:26
No, it doesn't.
William Gaylord
@wgaylord
Apr 04 2017 21:26
you can link to closed source code in LGPL...
Hans Elias J.
@hansihe
Apr 04 2017 21:26
LGPL doesn't let you relicense other code to it
Robin Lambertz
@roblabla
Apr 04 2017 21:26
It didn't link it
it tried to relicense proprietary code
William Gaylord
@wgaylord
Apr 04 2017 21:26
They never claimed Mojang code as LGLP..
LGPL
Robin Lambertz
@roblabla
Apr 04 2017 21:26
CraftBukkit contains the minecraft source code, which is All Rights Reserved
Yes they did
That's literally what they did
mhsjlw
@mhsjlw
Apr 04 2017 21:26
^
William Gaylord
@wgaylord
Apr 04 2017 21:26
they claimed there patches
Robin Lambertz
@roblabla
Apr 04 2017 21:26
Nope
Hans Elias J.
@hansihe
Apr 04 2017 21:26
Craftbukkit was largely decompiled proprietary mojang code
mhsjlw
@mhsjlw
Apr 04 2017 21:26
^^^
Robin Lambertz
@roblabla
Apr 04 2017 21:26
@chibill that's what spigot does
Hans Elias J.
@hansihe
Apr 04 2017 21:26
Spigot is patches
Robin Lambertz
@roblabla
Apr 04 2017 21:26
and spigot does it right.
mhsjlw
@mhsjlw
Apr 04 2017 21:27
um
William Gaylord
@wgaylord
Apr 04 2017 21:27
spigot = modded craftbukkit......
Robin Lambertz
@roblabla
Apr 04 2017 21:27
CraftBukkit, back when the shitstorm happened, was just the the minecraft source, changed.
mhsjlw
@mhsjlw
Apr 04 2017 21:27
From what understand spigot is still breaking the license
William Gaylord
@wgaylord
Apr 04 2017 21:27
thats all spigot is. When you build it you violate the GPL.
mhsjlw
@mhsjlw
Apr 04 2017 21:27
patches don't mean shit someone told me
Robin Lambertz
@roblabla
Apr 04 2017 21:27
the patches isn't the problem
William Gaylord
@wgaylord
Apr 04 2017 21:27
but because you are doing it not spigot its fine.
Robin Lambertz
@roblabla
Apr 04 2017 21:27
The problem is, spigot is distributing binaries
mhsjlw
@mhsjlw
Apr 04 2017 21:27
sorry , yes
That
Robin Lambertz
@roblabla
Apr 04 2017 21:28
@chibill yup, but it shifts the problem
I mean, spigot is entirely legal if you can obtain the minecraft sources :D
TBH, it doesn't matter all that much.
We're in an entirely different position.
William Gaylord
@wgaylord
Apr 04 2017 21:28
I have deobfuscated snapshot sources... (Well partly)
:P
Robin Lambertz
@roblabla
Apr 04 2017 21:29
Since all the code is ours :D
Well, @hansihe's in this case
And GPL fits really well.
roblabla is :+1: on GPL
William Gaylord
@wgaylord
Apr 04 2017 21:29
I would not touch GPL with a long stick....
I bearly like LGPL...
its just to restrictive on what you can use.
Hans Elias J.
@hansihe
Apr 04 2017 21:30
If you give me a good reason other than feels, then I will license it under something else
William Gaylord
@wgaylord
Apr 04 2017 21:30
Like if its not GPL you can't use it. SO alot of major libs are out the window for use in a GPL program)
Robin Lambertz
@roblabla
Apr 04 2017 21:31
@chibill protodefc is not a library
it's a program.
William Gaylord
@wgaylord
Apr 04 2017 21:31
GPL can't even link to LGPL which stupid..
I know
Robin Lambertz
@roblabla
Apr 04 2017 21:31
So what's the problem with making it GPL ?
William Gaylord
@wgaylord
Apr 04 2017 21:31
he has his libs he can use super limited by GPL which apparently he is fine with so have fun with that.
the fact that GPL makes doing anything a pain...
in a perfect world GPL would be fine. (I can actually directly compare GPL to Communism....)
Robin Lambertz
@roblabla
Apr 04 2017 21:33
I happen to be found of communism :3
William Gaylord
@wgaylord
Apr 04 2017 21:33
problem is it only works in a perfect world.... :(
Hans Elias J.
@hansihe
Apr 04 2017 21:35
You can use non-GPL libraries from within a GPL project
It's the other direction which is the problem
William Gaylord
@wgaylord
Apr 04 2017 21:35
No you can't
Robin Lambertz
@roblabla
Apr 04 2017 21:36
@chibill you can, but it has to be a gpl-compatibled license
Hans Elias J.
@hansihe
Apr 04 2017 21:36
Most of the rust ecosystem is licensed under apache2/MIT
William Gaylord
@wgaylord
Apr 04 2017 21:37
Which are few ones that are not just as limiting.
This also limits anyone that ever wants to integrate the compiler into something. For example a eclipse plugin.
As they are forced to make it GPL.
Robin Lambertz
@roblabla
Apr 04 2017 21:40
I'm fine with that.
Hans Elias J.
@hansihe
Apr 04 2017 21:44
You say these things as if they are bad, but they are exactly what I want to accomplish by using the GPL
Would you be more okey with LGPL?
mhsjlw
@mhsjlw
Apr 04 2017 21:45
i thought about it and im ok with gpl as long as I can use the code it produces any way I want under any license
Hans Elias J.
@hansihe
Apr 04 2017 21:45
yep, of course
Robin Lambertz
@roblabla
Apr 04 2017 21:45
That's how GPL works.
mhsjlw
@mhsjlw
Apr 04 2017 21:46
okay :+1:
I'm with this then
thank you for somewhat considering my opinion :)
@roblabla did you fix direct messages ? Or do you want me to send them again
Hans Elias J.
@hansihe
Apr 04 2017 21:58
btw, I added a simple cli
when inside the crate directory you can do cargo run compile input.pds output.js
and it will do what you think it should do
badly worded, it will do what you think it will
Robin Lambertz
@roblabla
Apr 04 2017 22:01
I'm working on fixing dms @mhsjlw :P
mhsjlw
@mhsjlw
Apr 04 2017 22:01
protodefc --out JavaScript --in input.pds > output.js
I'm thinking that would be a good final basic cli
Robin Lambertz
@roblabla
Apr 04 2017 22:01
why not --out output.js --in input.pds ?
look at the extension :D
mhsjlw
@mhsjlw
Apr 04 2017 22:02
yeah , sure that's fine
Robin Lambertz
@roblabla
Apr 04 2017 22:02
If you want to force a type, --out output.js --out-format js --in input.pds
that's how pandoc does it
mhsjlw
@mhsjlw
Apr 04 2017 22:02
but I want to be able to use > optionally
have it as output
then handle it with scripts or code
Robin Lambertz
@roblabla
Apr 04 2017 22:02
I think we should just rip pandoc's CLI
it's really the best CLI interface for text to text conversions
Hans Elias J.
@hansihe
Apr 04 2017 22:03
how does it look like?
mhsjlw
@mhsjlw
Apr 04 2017 22:03
or we can use the haxe cli
Hans Elias J.
@hansihe
Apr 04 2017 22:04
besides, cli is not a priority, this is how it is for now, it's not meant to be final or anything
priority is on making things work :)
mhsjlw
@mhsjlw
Apr 04 2017 22:05
are you working on the Java backend now ?
or what's on the to-do
Hans Elias J.
@hansihe
Apr 04 2017 22:06
i'm thinking support for json should come before that?
that way we can start thinking about trying out the files in minecraft-data
mhsjlw
@mhsjlw
Apr 04 2017 22:07
hmm
I would probably just write a conversion tool
And then put them in the Minecraft data repo
along side the Jon
*json
but if you really want to , I guess you can
idk you tell me
Hans Elias J.
@hansihe
Apr 04 2017 22:09
separate conversion tool would be more work
mhsjlw
@mhsjlw
Apr 04 2017 22:11
I would like pds in the Minecraft data repo though :P
but okay yeah I guess it would make sense to have Jon as a front end :)
Hans Elias J.
@hansihe
Apr 04 2017 22:12
yeah, pds is nicer to work with, but I would still want json as an option
as roblabla said, it is much easier to work with in other languages
William Gaylord
@wgaylord
Apr 04 2017 22:13
As long as the out out is not forced I am guess I am fine.... But I also stay away from GPL because it goes against was OS stands for... Opensoure stuff should be free to all to use in there own projects not just those who use GPL.... Just putting my reasons out there. Please not reply to this.
What the heck is a pds?
mhsjlw
@mhsjlw
Apr 04 2017 22:13
protodefscriptor
the new protodef language
Hans Elias J.
@hansihe
Apr 04 2017 22:14
.pds ProtoDefSpec
was what I was thinking :P
mhsjlw
@mhsjlw
Apr 04 2017 22:14
lol oops
Sorry
yeah that makes sense I guess
Hans Elias J.
@hansihe
Apr 04 2017 22:14
no problems, it doesn't really matter
mhsjlw
@mhsjlw
Apr 04 2017 22:14
what is .pb
mhsjlw
@mhsjlw
Apr 04 2017 22:14
maybe protocol blueprint
I like pds
William Gaylord
@wgaylord
Apr 04 2017 22:15
So your making a programming Lang to make it so people can make serialization stuff with out just programming.... I don't see the point.
mhsjlw
@mhsjlw
Apr 04 2017 22:15
it's not a programming language
Hans Elias J.
@hansihe
Apr 04 2017 22:15
it's not a programming language
it's a dsl
mhsjlw
@mhsjlw
Apr 04 2017 22:15
but it's damn awesome though
i beat you :)
William Gaylord
@wgaylord
Apr 04 2017 22:16
Wants a dsl other then slow internet?
mhsjlw
@mhsjlw
Apr 04 2017 22:16
lolololololol
there are plenty of valid reasons for having a DSL for something, I think being able to specify a binary format once and use it across many programming languages is a very valid one
mhsjlw
@mhsjlw
Apr 04 2017 22:17
output.js is self contained right ?
I hope we can do that with every backend
William Gaylord
@wgaylord
Apr 04 2017 22:17
Or I just write it once in the Lang I have been developing for a year or so and using its compiler system.
Hans Elias J.
@hansihe
Apr 04 2017 22:17
well, the way it's formatted right now it requires an object native_types to be in scope
but I plan to change that
chibill: go ahead and show us
William Gaylord
@wgaylord
Apr 04 2017 22:18
I mostly have been rewriting the lexer over and over.... By
So it's pointless...
Hans Elias J.
@hansihe
Apr 04 2017 22:18
ok
this is functional though
it works now
William Gaylord
@wgaylord
Apr 04 2017 22:19
Mine wqs function in python. But using a converter system.
Hans Elias J.
@hansihe
Apr 04 2017 22:19
wqs?
William Gaylord
@wgaylord
Apr 04 2017 22:19
Also its still a programming Lang.... That compiles down to other pants instead of to binary code.
Wqs should have been was.
mhsjlw
@mhsjlw
Apr 04 2017 22:20
I want to compile to pants
William Gaylord
@wgaylord
Apr 04 2017 22:20
I have androids autocorrect.....
It's changing my words
Like JSON becomes is in
Hans Elias J.
@hansihe
Apr 04 2017 22:20
there is no traditional control flow, it is not turing complete
it's not a programming language, it's a dsl
William Gaylord
@wgaylord
Apr 04 2017 22:21
What ever you say....
Robin Lambertz
@roblabla
Apr 04 2017 22:21
@chibill it's like protocol buffer files
It's nicer to work with
William Gaylord
@wgaylord
Apr 04 2017 22:21
Not really.
Robin Lambertz
@roblabla
Apr 04 2017 22:21
What do you mean not really ?
Hans Elias J.
@hansihe
Apr 04 2017 22:21
it's exactly like protobuf or thrift
Robin Lambertz
@roblabla
Apr 04 2017 22:22
I much prefer working w/ protobuf files than the JSON we have currently
but the JSON is important too for other reasons.
William Gaylord
@wgaylord
Apr 04 2017 22:22
Want if someone made a GUI for building the json files
Robin Lambertz
@roblabla
Apr 04 2017 22:22
JSON files are still supported
William Gaylord
@wgaylord
Apr 04 2017 22:22
That would be near.
Best*
Neat
God autocorrect Neat is a word.....
Hans Elias J.
@hansihe
Apr 04 2017 22:23
If you want to contribute that, I'm sure it would be very well received
Robin Lambertz
@roblabla
Apr 04 2017 22:23
The idea is to support both, and be able to go from pds to JSON. This allows us to keep using the tools we built, while still having a nicer format to work with.
William Gaylord
@wgaylord
Apr 04 2017 22:24
Considering json is easier then learning another Lang yeah
Hans Elias J.
@hansihe
Apr 04 2017 22:24
it's not learning another language though
Robin Lambertz
@roblabla
Apr 04 2017 22:24
Sure, but it's much harder to maintain. Look at the monster that is protocol.json XD
William Gaylord
@wgaylord
Apr 04 2017 22:24
It's a dsl it has language in the name.
Hans Elias J.
@hansihe
Apr 04 2017 22:24
it's the exact same structure and data as the json, except in a different representation
the json is a dsl as well
just in a different representation
William Gaylord
@wgaylord
Apr 04 2017 22:25
Pds looks much like java lambdas.... Sort of....
Or something weird
Just saying.
Hans Elias J.
@hansihe
Apr 04 2017 22:26
okey
your point being?
William Gaylord
@wgaylord
Apr 04 2017 22:27
Why are we making things more complicated to try and make it easier.
Hans Elias J.
@hansihe
Apr 04 2017 22:27
it's not more complicated though
it's just a different format
there is no semantic difference
there are some large advantages though
William Gaylord
@wgaylord
Apr 04 2017 22:27
Well considering you have to learn the syntax of it.
Hans Elias J.
@hansihe
Apr 04 2017 22:28
there's barely any syntax
mhsjlw
@mhsjlw
Apr 04 2017 22:28
yea^^
it's nice
Hans Elias J.
@hansihe
Apr 04 2017 22:28
the parser is <100loc
mhsjlw
@mhsjlw
Apr 04 2017 22:28
o
Hans Elias J.
@hansihe
Apr 04 2017 22:28
there is only a couple of rules
mhsjlw
@mhsjlw
Apr 04 2017 22:28
I will read it then
Hans Elias J.
@hansihe
Apr 04 2017 22:29
it's the kinda thing you learn in 10 seconds by skimming an example
William Gaylord
@wgaylord
Apr 04 2017 22:29
And once again your not looking at the point of view of someone who has never seen the stuff.
Robin Lambertz
@roblabla
Apr 04 2017 22:29
@chibill I've seen it for the first time a week ago
I can say it will make my work easier.
mhsjlw
@mhsjlw
Apr 04 2017 22:29
learnxiny
William Gaylord
@wgaylord
Apr 04 2017 22:29
It looks similar to nothing. It has strange syntax with =>
Hans Elias J.
@hansihe
Apr 04 2017 22:30
Dude
William Gaylord
@wgaylord
Apr 04 2017 22:30
And stuff that look like function calls.
Hans Elias J.
@hansihe
Apr 04 2017 22:30
have you ever used a non-c family language? syntax seems to mean a lot to you
William Gaylord
@wgaylord
Apr 04 2017 22:30
I
Hans Elias J.
@hansihe
Apr 04 2017 22:31
it's just meant to be easy for the human eye to pattern match
I think it succeeds fairly well at that
William Gaylord
@wgaylord
Apr 04 2017 22:31
Have used Java,Haskell,Python,Lua.
So sick have used Basic and Visual Basic.
Where did the word sick come from....
William Gaylord
@wgaylord
Apr 04 2017 22:33
The problem is the Json files looks much simpler and does not have this funky syntax of argument stuff That does not match u too things in a json file....
Hans Elias J.
@hansihe
Apr 04 2017 22:33
i guess it's ~100loc not <100loc
but yeah
chibill: if you don't want to use the .pds format, there will be a json based format which is supported as a first class citizen
you can fully avoid .pds if you want
William Gaylord
@wgaylord
Apr 04 2017 22:33
I am just bring up points that will keep many people from using It.
That you don't care about.
Hans Elias J.
@hansihe
Apr 04 2017 22:34
I just told you there will be a fully supported alternative to it
how is that not caring?
William Gaylord
@wgaylord
Apr 04 2017 22:34
I just like how to make your life easier you make a whole Lang thats not easier to read of write....
Hans Elias J.
@hansihe
Apr 04 2017 22:35
It certainly is to me
And roblabla seems to think so as well
The devs of protobuf and thift must have been thinking the same thing as well, since they made their own syntax as well
If you think it's difficult to read, you are fully free to use the JSON-based format
it will be fully supported
William Gaylord
@wgaylord
Apr 04 2017 22:36
The fact that people normally don't want to have to learn a new Lang to use a simple tool....
Hans Elias J.
@hansihe
Apr 04 2017 22:36
It's not a new language though!
There is a 1:1 mapping between the json format and the custom syntax
it's just much easier to read and write for humans
Besides, as I have said 4 times by now, you are not required to use it
You can use the JSON format if you like that better
mhsjlw
@mhsjlw
Apr 04 2017 22:43
I like pds, but if you like $, go for it
William Gaylord
@wgaylord
Apr 04 2017 22:50
whats $? unless thats what your calling json.
Just a question what is the json version of https://gist.github.com/hansihe/f3def06c5ee992e866f2b91e68a9d604#file-input-pds... Just for a true comparison for me...
Hans Elias J.
@hansihe
Apr 04 2017 22:52
i'll add it to the gist
nah
needs moar coloursss
if I write a tmLanguage then you can literally convert it to anything
Robin Lambertz
@roblabla
Apr 04 2017 23:01
@mhsjlw I want thaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaat
Hans Elias J.
@hansihe
Apr 04 2017 23:01
chibill: updated the gist, it should look something like that
mhsjlw: nice!
mhsjlw
@mhsjlw
Apr 04 2017 23:02
font not included
lol
Robin Lambertz
@roblabla
Apr 04 2017 23:02
wait actually, what's that funky font ?
I've never seen such a weird @ XD
Robin Lambertz
@roblabla
Apr 04 2017 23:03
Ah, it's fira
mhsjlw
@mhsjlw
Apr 04 2017 23:03
sublime doesn't have ligatures though, but i use them in vim and my terminal
Robin Lambertz
@roblabla
Apr 04 2017 23:04
:< no ligatures ? that shucks
you should use vscode
mhsjlw
@mhsjlw
Apr 04 2017 23:04
i do
Robin Lambertz
@roblabla
Apr 04 2017 23:04
It supports ligatures IIRC
mhsjlw
@mhsjlw
Apr 04 2017 23:04
i'm on sublime for this screenshot though
because i'm writing a tmLanguage
and my terminal does as well so i use nvim
William Gaylord
@wgaylord
Apr 04 2017 23:05
So why is the json file not a protoDef json file? Or has protoDef added a ton of new stuff in the last day?
mhsjlw
@mhsjlw
Apr 04 2017 23:05
vscode for typescript, nvim for everything else
Robin Lambertz
@roblabla
Apr 04 2017 23:05
IC
@chibill Basically, hansihe had a few ideas that he thought would make the JSON more readable, so they were added there as well.
notably, the union type, that combines Mapper and Switch
Hans Elias J.
@hansihe
Apr 04 2017 23:06
chibill: that's how the protocol.json equivalent would look like. some of the builtin types have been changed to be more composable
Robin Lambertz
@roblabla
Apr 04 2017 23:06
and the virtual type.
I like your union type so much better than the mapper type BTW
Hans Elias J.
@hansihe
Apr 04 2017 23:07
it also cleans up the way count works by a big margin
William Gaylord
@wgaylord
Apr 04 2017 23:07
so you made the JSON very make less sense? Not sure how its more readable now...... THe union type is fine...
Hans Elias J.
@hansihe
Apr 04 2017 23:08
what about it do you think makes less sense?
mhsjlw
@mhsjlw
Apr 04 2017 23:08
but i'll likely do tmLanguage (atom and sublime), vim and (maybe) emacs
William Gaylord
@wgaylord
Apr 04 2017 23:08
Guess either have to fight with messy json or use a new lang.... hard choices.
Hans Elias J.
@hansihe
Apr 04 2017 23:08
if you give me something concrete to work with, I can improve it
Suggestions?
William Gaylord
@wgaylord
Apr 04 2017 23:09
Well whats with fields? And why can a thing have more then one type?
Also would ref to do?
Robin Lambertz
@roblabla
Apr 04 2017 23:10
fields popped up because of virtual.
I wonder if we could find a not-too-shitty way to remove it though
Hans Elias J.
@hansihe
Apr 04 2017 23:10
I'm all for removing it if there is a nice way
William Gaylord
@wgaylord
Apr 04 2017 23:10
Also calling your unions unions might confuse people who code C... As unions are things that reference the same data different ways.
Robin Lambertz
@roblabla
Apr 04 2017 23:11
Well, that's sort of what we're doing here.
Hans Elias J.
@hansihe
Apr 04 2017 23:11
chibill: that's exactly what unions do here though
Robin Lambertz
@roblabla
Apr 04 2017 23:11
Specifically, we're a tagged union.
Hans Elias J.
@hansihe
Apr 04 2017 23:11
besides, calling them enums might confuse people who code java or rust
mhsjlw
@mhsjlw
Apr 04 2017 23:11
^
Robin Lambertz
@roblabla
Apr 04 2017 23:11
@hansihe well, they are pretty close to rust enums :P
Hans Elias J.
@hansihe
Apr 04 2017 23:11
calling them sum types might confuse mathematicians
Robin Lambertz
@roblabla
Apr 04 2017 23:12
And calling them switch might confuse old protodef users
:O
William Gaylord
@wgaylord
Apr 04 2017 23:12
its not an enum or union its a switch...... as it just maps a value to a type..
thats all it does.
Hans Elias J.
@hansihe
Apr 04 2017 23:12
it represents a "tagged union"
Robin Lambertz
@roblabla
Apr 04 2017 23:12
^
William Gaylord
@wgaylord
Apr 04 2017 23:12
unions reference the same data both ways at the same time... your union represents data in a way depending on what it is.
Robin Lambertz
@roblabla
Apr 04 2017 23:13
oh wait. That link has too much maths on it
@chibill Yup. And that's called a tagged union
here shortened "Union"
mhsjlw
@mhsjlw
Apr 04 2017 23:13
aside : i think this is fucking awesome compared to protodef's switch
William Gaylord
@wgaylord
Apr 04 2017 23:13
what ever.
mhsjlw
@mhsjlw
Apr 04 2017 23:13
fields obviously have to be in order, right ?
Robin Lambertz
@roblabla
Apr 04 2017 23:14
yup
mhsjlw
@mhsjlw
Apr 04 2017 23:14
@chibill we want your feedback, what do you suggest ?
Hans Elias J.
@hansihe
Apr 04 2017 23:14
that's the mathematically correct naming
mhsjlw
@mhsjlw
Apr 04 2017 23:14
with the constructive criticism that we've explained
William Gaylord
@wgaylord
Apr 04 2017 23:14
Also one problem... having two types like one of the things has won't work....
Hans Elias J.
@hansihe
Apr 04 2017 23:15
right, yeah
William Gaylord
@wgaylord
Apr 04 2017 23:15
And what does prop mean?
Hans Elias J.
@hansihe
Apr 04 2017 23:15
that's because I changed the format on the spot, it is not decided yet
Robin Lambertz
@roblabla
Apr 04 2017 23:15
I think, it was supposed to be ["virtual", { ref, data, type }]
Right ?
William Gaylord
@wgaylord
Apr 04 2017 23:15
if prop means property what does that mean in this case.
Hans Elias J.
@hansihe
Apr 04 2017 23:16
prop is a (standardized) way to access a property of another field
Robin Lambertz
@roblabla
Apr 04 2017 23:16
prop is the type of reference the virtual is
Hans Elias J.
@hansihe
Apr 04 2017 23:16
in this case the "tag" field of the union
so what happens is
Robin Lambertz
@roblabla
Apr 04 2017 23:16
(tag, count, ???)
Hans Elias J.
@hansihe
Apr 04 2017 23:16
when writing the type out
the virtual field will get it's value from the tag of the union
William Gaylord
@wgaylord
Apr 04 2017 23:16
so I will rest my case you your making the Json its own thing that will take a while to learn.
Hans Elias J.
@hansihe
Apr 04 2017 23:16
when reading the type, the union will get its value from the virtual field
Robin Lambertz
@roblabla
Apr 04 2017 23:17
erm, I meant { ref, prop, type } up there
@chibill we're adding new concepts to protodef. It's obvious that will go in the JSON as well.
William Gaylord
@wgaylord
Apr 04 2017 23:18
also you seem to be making the JSON files bigger with out adding anything new to them. Just changing how they work....
Robin Lambertz
@roblabla
Apr 04 2017 23:18
The whole idea of the JSON is that it's easier to work with because you don't have to write your own parser and w/e
Hans Elias J.
@hansihe
Apr 04 2017 23:18
chibill: what I did was remove hacks that only worked for some special cases and replaced them with more general and expandable mechanisms
case in point, mapper and switch
William Gaylord
@wgaylord
Apr 04 2017 23:19
I have no idea why mapper ever existed when you could have just used a switch to do that same job...
Hans Elias J.
@hansihe
Apr 04 2017 23:19
both of which were relatively specific, only used in some cases, interacted with each other in a complex way
you can't
that's the point
union is more flexible
it replaces them both
Robin Lambertz
@roblabla
Apr 04 2017 23:19
@chibill we needed to put a string in the container to get the name of the packet
We already had switch
The idea was that mapper takes the packet ID and turns it into a packet name
Hans Elias J.
@hansihe
Apr 04 2017 23:20
same with the count mechanism in array and buffer
Robin Lambertz
@roblabla
Apr 04 2017 23:20
while switch takes the packet ID and figures out what packet type to read from it
Hans Elias J.
@hansihe
Apr 04 2017 23:20
that could work in 3 different ways, depending on what arguments you give it
those 3 ways has been replaced with a single way which manages to be generic and not much more verbose
William Gaylord
@wgaylord
Apr 04 2017 23:20
switch takes a type and compares it to decide what to do. Mapper takes a type and compares it to decide what to output sounds exactly the same....
waht ever.
Hans Elias J.
@hansihe
Apr 04 2017 23:21
yeah. what ever.
it's not though
William Gaylord
@wgaylord
Apr 04 2017 23:21
the fact that everything I was working on will be trash pisses me off.
Robin Lambertz
@roblabla
Apr 04 2017 23:21
eeh, actually he does have a point. We might've been able to make something better by just creating a "const" type
Hans Elias J.
@hansihe
Apr 04 2017 23:22
well, the point of mapper is that it's two way
that's the whole trick of it, if I remember right
William Gaylord
@wgaylord
Apr 04 2017 23:22
mapper is one way according to the docs.
Robin Lambertz
@roblabla
Apr 04 2017 23:22
@hansihe so for arrays, we could do
def("test") => container(virtual: "true") {
    virtual_field("count", ref: "data", prop: "count") => u64;
    field("data") => array(type: "u8")
}
or something like that ?
Also, what does virtual really do on container ?
William Gaylord
@wgaylord
Apr 04 2017 23:23
But I have learned to not trust the docs but this time the Node version agrees.
Hans Elias J.
@hansihe
Apr 04 2017 23:23
sorry, I don't quite understand
what do you intend the type: "u8" to do here?
Robin Lambertz
@roblabla
Apr 04 2017 23:24
the array's content
This would create an array of bytes
William Gaylord
@wgaylord
Apr 04 2017 23:24
what about the array's size?
ohh nvm
Robin Lambertz
@roblabla
Apr 04 2017 23:24
that's what the virtual_field does
Hans Elias J.
@hansihe
Apr 04 2017 23:25
roblabla: I fail to see why you would specify the inner type like that
William Gaylord
@wgaylord
Apr 04 2017 23:25
because you have to...
Hans Elias J.
@hansihe
Apr 04 2017 23:25
why not field("data") => array() => u8
no
Robin Lambertz
@roblabla
Apr 04 2017 23:25
oh
true, my bad
I'm thinking in terms of the old json format XD
Hans Elias J.
@hansihe
Apr 04 2017 23:26
so what you mean is that the array should resolve the reference the other way automatically?
William Gaylord
@wgaylord
Apr 04 2017 23:26
I will just say this again.
Hans Elias J.
@hansihe
Apr 04 2017 23:26
I opted to mark it manually because I usually like making things explicit
over implicit
William Gaylord
@wgaylord
Apr 04 2017 23:26
mapper is one way according to the docs.
But I have learned to not trust the docs but this time the Node version agrees.
as no one said anything.
Robin Lambertz
@roblabla
Apr 04 2017 23:27
@chibill IDK. No one knows. I don't remember how mapper works, I'd need to dig into the source code of the mapper datatype. And I'm not too interested in knowing.
Mapper sucks and should die :P
@hansihe aaah I see. I missed the ref somehow
Makes sense now
Hans Elias J.
@hansihe
Apr 04 2017 23:28
chibill: mapper is two way. it maps a string to a constant
Robin Lambertz
@roblabla
Apr 04 2017 23:28
Last question : what does virtual do in containers ? Is it to signify that it contains virtual fields ?
William Gaylord
@wgaylord
Apr 04 2017 23:28
so why is it not that way in the impl? or is JS goofy syntax messing me up......
Hans Elias J.
@hansihe
Apr 04 2017 23:29
so when reading it could take 0 and map it to something like "packet_read"
when writing it would take "packet_read" and map it to 0
switch is not capable of doing that
Robin Lambertz
@roblabla
Apr 04 2017 23:30
It could
NVM
it can't.
My brain is not working
Hans Elias J.
@hansihe
Apr 04 2017 23:30
roblabla: when a container only has a single non-virtual field in it, you can mark the container as virtual
that removes the container from the output, the single non-virtual field replaces it in the serialized/deserialized data
Robin Lambertz
@roblabla
Apr 04 2017 23:31
ah, so it's like the old anon ?
William Gaylord
@wgaylord
Apr 04 2017 23:31
but would the non-virtual field not then be virtual? Unless there is a non-virtual tag or something on the field....
Robin Lambertz
@roblabla
Apr 04 2017 23:31
kinda sorta
Hans Elias J.
@hansihe
Apr 04 2017 23:31
no, not really
well, the other way around kinda
Robin Lambertz
@roblabla
Apr 04 2017 23:32
hmm, yeah I get it
Hans Elias J.
@hansihe
Apr 04 2017 23:32
it's a way of defining something like a length prefixed array type without specific built in language features
William Gaylord
@wgaylord
Apr 04 2017 23:32
how does it know that the field is not virtual along with the container?
Hans Elias J.
@hansihe
Apr 04 2017 23:32
it just helps with composability really
Robin Lambertz
@roblabla
Apr 04 2017 23:33
@chibill virtual just means you don't provide it data directly
instead it is derived from another field.
Hans Elias J.
@hansihe
Apr 04 2017 23:33
chibill: notice that there are fields and there are virtual_fields? fields are not virtual, virtual_fields are virtual
Robin Lambertz
@roblabla
Apr 04 2017 23:33
E.G. when writing, you don't have to specify the length of an array yourself. That's because "count" is a virtual field.
William Gaylord
@wgaylord
Apr 04 2017 23:33
so why not have virtual_container?
Robin Lambertz
@roblabla
Apr 04 2017 23:34
valid question.
Hans Elias J.
@hansihe
Apr 04 2017 23:34
because the container has the exact same semantics when specifying types wither it is virtual or not
William Gaylord
@wgaylord
Apr 04 2017 23:34
Also I did not notice virtual_field because its not in the example.
Hans Elias J.
@hansihe
Apr 04 2017 23:34
but yeah, that's a design decision
Robin Lambertz
@roblabla
Apr 04 2017 23:34
@chibill it is
in the pds
Hans Elias J.
@hansihe
Apr 04 2017 23:35
yep
look for it
it's there
Robin Lambertz
@roblabla
Apr 04 2017 23:35
virtual_field is just "virtual" in the JSON
which is interesting...
William Gaylord
@wgaylord
Apr 04 2017 23:36
so why not just add virtual into the type args... As thats what it will be in the json...
why make a new type?
Robin Lambertz
@roblabla
Apr 04 2017 23:36
It's not really a new type
it replaces count
and makes it more generic
William Gaylord
@wgaylord
Apr 04 2017 23:37
virtual_field is a new type if you look how the pds is. Each type is defined by a syntax like <type>()
But its a type that only exists in the pds
Robin Lambertz
@roblabla
Apr 04 2017 23:38
virtual_field is not a type in the pds, but it's a type in the JSON actually
in the pds, there are two kinds container fields. field and virtual_field.
In the JSON, field is just a pass-through, while virtual_field transforms into a type
Hans Elias J.
@hansihe
Apr 04 2017 23:41
Question, if you think protodef is so stupid in every single way, why don't you just design your own version/use something else? If you come up with something better I would definitely use it.
William Gaylord
@wgaylord
Apr 04 2017 23:42
I have never said it was stupid.
I am just questioning the questionable stuff that does not make sense.
Hans Elias J.
@hansihe
Apr 04 2017 23:44
It would help a lot if you could come up with alternative solutions instead of JUST criticizing. We are aware there is a lot of complexity in some places, but it's that way because we believe it to be necessary
Robin Lambertz
@roblabla
Apr 04 2017 23:44
Of all the points you gave, only one was valid : the new version make the semantics of container in the JSON dirtier
And when you did come up with that point, you didn't try to help make it better. You just criticized.
Hans Elias J.
@hansihe
Apr 04 2017 23:44
The easiest way to prove us wrong is to come up with something better
William Gaylord
@wgaylord
Apr 04 2017 23:44
I did suggest improvements....
but you did not like them
Hans Elias J.
@hansihe
Apr 04 2017 23:45
Tell us again
William Gaylord
@wgaylord
Apr 04 2017 23:45
Instead of adding an extra thing called virtual_field just make an optional virtual tag in the args types... Just like containers.
Hans Elias J.
@hansihe
Apr 04 2017 23:46
Unless I misunderstand you, that would completely break encapsulation
that opens a whole new can of worms
Robin Lambertz
@roblabla
Apr 04 2017 23:47
This message was deleted
Hans Elias J.
@hansihe
Apr 04 2017 23:47
To help us further understand, would you mind making your proposed changes to a forked version of the gist?
William Gaylord
@wgaylord
Apr 04 2017 23:47
its doing exactly whats in the json in the pds
Hans Elias J.
@hansihe
Apr 04 2017 23:48
That way we can be sure we don't misunderstand you
William Gaylord
@wgaylord
Apr 04 2017 23:48
okay.
Hans Elias J.
@hansihe
Apr 04 2017 23:48
chibill: Could you please make the change you propose to the gist first? I want to be sure we understand each other correctly.
William Gaylord
@wgaylord
Apr 04 2017 23:48
Its just making the PDS show the same info as the JSON .
Robin Lambertz
@roblabla
Apr 04 2017 23:51
@hansihe Any reason for the ; ? This is going to sound completely pedestrian, but I do find those rather ugly :P
William Gaylord
@wgaylord
Apr 04 2017 23:51
https://gist.github.com/chibill/c9b0a97d45be09b43fc5d72ab210af24 also the thing in the json I only changed to make it match container's because the way it was just got rid of what was said.
Hans Elias J.
@hansihe
Apr 04 2017 23:53
chibill: Okey, one of the reasons it is the way it is in the pds is because it's a lot easier to identify virtual fields when scanning quickly when it's at the beginning
The second reason is that I want items in a type to be mainly identified by their name. virtual_field and field behave so differently semantically that I thought it made a lot of sense to distinguish them
Robin Lambertz
@roblabla
Apr 04 2017 23:59
@hansihe how do you "extend" virtual_field to add new prop types ? Because external types might want to extend this.