[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1739048386570447.png (131 KB, 707x472)
131 KB
131 KB PNG
.
>>
>>107212764
what kind of mentally ill person would design a notation and be like
>yep the user will type " " " " and : : : 9000 times, this is so convenient
>>
troon
>>
>>107212788
i think it's fine as a machine format that happens to be human-readable/writable. but if your primary goal is to make it easy to manually write then other options are better
>>
NIGGA YOU JUST REINVENTED CSV NIGGA
>>
>>107212764
Toon is just csv. It's better to use the Token Usage Reduction Data Structure
>>
>>107212764
I hate human readability desu.
>>
>>107212764
deprecated by alists
>>
change [3] to [4] and wonder what the point is
>>
>>107212788
They were analogously reasoning from popular programming language topics circa the 60s. Later we discovered the hidden costs of OOP.
>>
>>107212764
Not even close, json excels at unstructured data while this shit clearly has a structure.
>>
>>107212788
Your first mistake was assuming that "users" would type any of this... or developers, for that matter. It's not meant to be written by humans, it's meant for computers.
>>
>>107213035
it's reasonable for a text format to be comfortable for humans to write
>>
>>107212764
You do realize that there are many use cases where different nodes in json would have different fields
>>
>>107213066
dynamic typing was a mistake
>>
>>107212835
Lmao
>>
>>107212764
>whitespace for syntax
>>
>>107212764
What is this bullshit?
Just do a CSV.
>>
>>107213252
relax
>>
nevermind, it's actually worse than a CSV, because whenever you add a line you have to update the products[3] counter
>>
>>107212856
>Token Usage Reduction Data Structure
TURDS for short
>>
I always found YAML the best format
>>
>>107212789
my first thought
>>
>>107212764
>products[3]
dropped
>>
>>107213279
You're not supposed to manually edit it.
I think it's largely about reducing bytes required to store/transmit the same data.
>>
>>107213832
It's intended to be used by LLMs, as it requires less tokens.
>>
>>107212764
What does duolingo have to do with any of these?
>>
>>107212764
>take out the newlines from json
>now 100 tokens
wow
>>
>>107212788
json is for machines.
>>
>>107212764
>>107212788
json is fine, it's a tree-like structure object, good for the language for easy parsing since it's just javascript's object
but it's bad for humans who have to write it
>>
>>107214534
you're not supposed to write json as a human
you're supposed to use something like yaml
>>
>>107214542
exactly my point, you write json by generating it inside the code
it's supposed to be a representation of an object
>>
>>107212764
Now show a 3d array.
>>
File: op-btfo.png (26 KB, 525x366)
26 KB
26 KB PNG
>>107212764
.
>>
>>107212764
>CR as item separator
>cannot use custom object structure in array items
DOA.

>>107212789
kek

>>107212904
Having the array length baked in will tell you for how long it needs to loop into its items, if only there was a "end of array" character though, it would save some space.

>>107213832
>>107214454
JSON is for humans.
You should save and transmit objects in bytecode to save a ton of space, bandwidth and execution time.

>>107213852
If LLMs were able to read bytecode this would not be a problem, oh wait, they can.
>>
>>107212764
nothing will beat s-expression. mit people already had figured everything out in the 50's
>>
>>107214786
>Having the array length baked in will tell you for how long it needs to loop into its items
it really only complicates things, because the stated length of the array may not agree with the real length of the array. that's two extra situations you need to account for (or just crash) when you loop over the items.
>>
>>107214542
If yaml is so good, then why does kyaml look like json
>>
What if I want some but not all products to have a field called "certifications"?
>>
>>107212764
>TROON
>>
>>107215288
yes, 12-year-old retard, we saw it the first two times
>>
>>107214786
>Having the array length baked in will tell you for how long it needs to loop into its items
And it must be ignored for security.
>>
>>107212764
Is this language LL(1)?
>>
File: 1761334430228753.png (83 KB, 847x435)
83 KB
83 KB PNG
>>107212788
>he doesn't know
someone tell him
>>
>>107212789
>>
>>107212789
/thread
>>
>>107213267
no. fuck kikethon, too
>>
>>107212764
I'm more of a jsonl person
>>
>>107212764
finally, a data format.
Now I can finally make the high quality software I've been thinking of.
>>
>>107214534
It's not javascript object, there's a bunch of extra ".
>>
>>107212764
zoomer discovers CSV, calls it TROON
>>
>>107212981
Elaborate
>>
>>107215667
what's your problem?
>>
>>107212764
JSON is meant to be easily human readable. If you want to send information over the wire most efficiently then you'd use some sort of binary encoding or custom protocol for your application, you do not send it as text in the first place.
>>
>>107214953
>>107215365
That is why I said
>if only there was a "end of array" character
Hinting that JSON does have exactly that.

Don't know if you also noticed this but the array starts at 1, which is retarded for computers, arrays should start at 0.
>>
>>107216322
only a retard would say it's retarded for the nth item to reside at the nth index.
>>
>>107216322
>>107216576
It doesn't matter where it starts, trusting program input to tell its own length is suicide.
>>
>>107212764
All the web stuff is made for convience, not performance.
If you want efficiency then switch entirely to a binary format.
>>
>>107216062
>you accidentally put in a space somewhere
>control flow changes entirely, no warnings or errors
>you create temporary variables for a longer function call
>that's not zen reeeeeeeeee
>you inline all parameters
>line too long reeeeeeeeeee
I fucking hate kikethon with every fiber of my being.
>>
>>107212764
So it's CSV but worst? lmao
>>
>>107216021
it's a javascript object with extra " so the parser can read correctly
>>
>>107216322
you're talking about array index, OP pic is array length
>>
>>107212764
T[R]OON
>>
>>107212788
i remember when JSON replaced XML because it was cleaner... lol
>>
>>107212904
idk what the point of the 3 even is, like it's already surrounded by [], why not just surround the whole array in [] to define how large it is? not only would it save the character 3 uses, it also avoids potential desyncs
>>
>>107217121
which it is

>>107217160
it stinks of a clueless webshitter who just wants to publish some pointless rubbish made with <3
>>
File: file.png (21 KB, 375x289)
21 KB
21 KB PNG
>>107217121
>>
>>107212764
For me? It's a NULL-byte separated database, with no index
>>
>>107217902
This will never be used as it needs white space for it to work and some stored values trim off white space.
>>
>>107218357
*stored value fields.
>>
>>107212764
toon just looks like a csv
>>
>>107218357
I assume you are talking about DB serialization?
>>
>>107217902
James Kirk, 40
Jean-Luc Picard,45
Weasley Crusher, 7
>>
>>107219135
>threw data hierarchy out the window
>>
>>107212764
So it's just CSV with a mandatory header?
>>
File: file.png (112 KB, 942x832)
112 KB
112 KB PNG
>>107212764
>nested array of objects
>becomes yaml

stupidest format ever
>>
>>107212789
I LIKE TO TALK ABOUT TRANNIES
>>
>>107212764
>troon
>>
ah so its json but without newlines
interesting!
>>
>>107219244
probably works better for cases where the array can be written as a table without missing values (without the "pets" field in your example).
but yeah it is pretty dumb how quickly it falls apart.
>>
>>107219244
lol this is dogshit
>>
>>107212764
That's just CSV with a better header
>>
>>107219296
literally stop posting
>>
>>107212764
What's the purpose of
>[3]
in the toon example? Seems redundant.
>>
>>107212764
Turns out this was made for AIcels who want to dump entire JSON files into an LLM, but run out of tokens doing so.
Lol. LMAO even.
>>
>>107220225
It's likely for languages like C when parsing, so you can initialize the array to the correct size.
>>
>>107212764
dtd
xml
xslt
>>
>>107220225
Yeah, it's DoA with that kind of crap, especially if it's meaning to be more human-friendly. What happens when they end up desynchronized? Does the whole thing crash? If the length int is longer than actual entries, do you make some empty ones? If the length is shorter, do you drop some? Which ones, from the beginning, from the end? Why have that redundancy in the first place?
>>
This “TOON” crap is peak cargo-cult optimization.

>b-b-but it saves 20% tokens!!

yeah bro, on the 0.0001% of tokens that are actually JSON in a typical prompt. Congrats, you saved half a cent this decade. Meanwhile it throws out every useful thing JSON/TOML/YAML have: structure, tooling, escaping rules, nesting, sanity. It’s literally CSV with a hat. Try putting a comma in a string and watch the whole thing detonate.

Have we learned nothing from the JS-minify-everything era? We spent a decade un-fucking that mess with sourcemaps and bundlers because people thought shaving 3kb off a file was “the future(tm)”

Now we’re doing the same thing for LLM prompts.
Pure brainrot.
>>
>>107219282
normal people aren't triggered by these kinds of comments
>>
>>107213454
what was our second thought?

hint: n*gger
>>
>>107212764
>Totally Retarded Object Oriented Notation
whoah, it sure delivers!
>>
>>107212764
what is this ass thread about. pros have been using yaml for like 15 years now.
>>
>>107212764
OK, but what about if there is multiple laptops? JSON wins because it's OBJECT notation. Looking at "Toon" your ID's can't be unique?
>>
>>107217121
<employee name="James T. Kirk" age="40" />
>>
>>107222616
terse, but a complete misappropriation of a markup format.
>>
>>107222648
using attributes is "misappropriation" how? will the employee ever have two ages? use your head.
>>
>>107222701
markup is for markup dumb retard.
>>
>trannies reinventing serialization formats
We need to get that 41% to 100%
>>
What does this have to do with Duolingo?
>>
So what if you write a wrong length on the header? Sounds like a really stupid idea
>>
>>107213039
not really, the whole point of this shit is to reduce the input size so you can squeeze more context up the AI's ass
>>
>>107222648
it might not be "pretty" by xml standards, but it's functionally equivalent in this case.
>>
Man.. all the retards in this thread missing the point of this.

It's literally made for sending data to LLMs to save on token count. That's it.

>b-but what if you write the wrong length in the header!
You won't you just encode your JSON into TOON before sending it to the AI. Why would you be manually writing TOON?
>>
>>107212764
What if products have 7 different child types at once? How do you write it in troon?
>>
>>107222930
Nothing, it is jus some shit that went viral in linkedin. I assume it has to do with "translating"
>>
>>107220225
loops with known bounds are fast to vectorize because you know the bounds
it's an optimization
>>
>>107212764
how /g/ has fallen
a programmer will always prefer the first one
the second is zoomer normie shit
>>
File: xml linus torvaldsonn.png (26 KB, 496x320)
26 KB
26 KB PNG
>>107217121
>>
>>107212764
IT'S JUST FUCKIN YAML BUT WORSE
>>
we should transmission all our data as parquet
>>
>>107212789
op btfo spbp gg /thread
>>
>>107212764
>Surname, Name strings now impossible
Nice format retard
>>
>>107212764
Why is the Duolingo owl there
>>
>>107223217
it would be quite a shame if someone fed the AI maliciously crafted toon files...
>>
>>107212764
>what is csv
>>
>>107217121
>JSON replaced XML because it was cleaner
>cleaner
>SOAP flashback
damn i hated that shit
>>
>>107212764
That JSON is not identical.
>>
>>107215595
fuck nazis and not in the hot way.
>>
>>107212764
>CSV
vibe coders really dont know how computers work
>>
>>107213112
Dynamic typing is allows for scalability.
>>
bup
>>
>>107221798
Normal people don't constantly obsess over trannies. Normal people would see OP's image and just think 'oh, like a cartoon character'. You aren't normal, you're mentally ill.
>>
>>107230322
Which is why all the biggest software projects in the world use dynamic typing.
>>
>>107212764
Cool, now collapse it all into a single string.
>>
>>107217121
Conveniently ignored all XML bloat that makes this not a valid XML.
>>
>>107226630
>saves JSON to database
What now?
>>
>Toon
Seems dumb, its just worse CSV. A problem I see is that type isn't clear. You are just stuck assuming everything is a string making parsing worse. I think that type should be clear. I would also be clear how to deal with commas within a string.
>>
>>107232670
SQL supports JSON but that's not what he said.
>>
File: 1760432300120772.jpg (318 KB, 1112x756)
318 KB
318 KB JPG
But XML is the best format for LLMs and showed the best benchmark results

counting tokens is a midwit trap. if you're using a significant portion of your prompt on json format vs t(r)oon your'e doing it wrong and need to break up the data you are analyzing or process it
>>
>>107212764
what about CUE?
>>
honestly i wonder if storing shit in sqlite is even better of an idea considering agents can directly query it and run all sort of complex logic
right now with json i get them doing a lot of multiline python -c shit, i wouldnt' be surprised if it would be cleaner running queries, and instead of shitting up your project with a trillion json files it can shit up one sqlite file with a trillion tables
>>
>>107226630
his opinions are pretty good
but him thinking storing big data in json is retarded, json is for small things that are easily parseable and human-writable, database is purely for machines
>>
File: 1762120890703007.jpg (164 KB, 1080x810)
164 KB
164 KB JPG
JSON just needs trailing commas and it would be perfect.
>>
>>107212764
>be me
>have stream of objects
>want to write json
>{ "objects": [
>object arrives
>{ ... },
>end of stream
>] }
>want to write toon
>objects[
>store all objects in memory as they arrive
>end of stream
>have n objects
>n]{sig}: ...
retarded format
>>
>>107212764
this is a bait thread but how do you handle cases where values are of varying types, ie one the first one is an obect with 3 numbers and the second is an object with 2 numbers and 2 strings
>>
>>107221775
wow a very smart and actually thought out post on the matter on a very otherwise DUMB board for fucking retards its truly a wonder a sight to behold
>>
>TROON
>the fucking duolingo owl

why is that there?
>>
>>107235650
It has no relationship. Somebody thought it was cute and it went viral in LinkedIn.
>>
>>107233266
u mean it not glitching out if you forget to remove the last one in an array?
thats so fucking annoying and stupid yeah
>>
>>107212764
This makes sense except for the part where LLMs don't actually understand these two things are the same, so prompts that work on the left side will break for the right side.
>>
>>107217160
Using brackets for scope makes SAX-style parsers harder to implement well since you have to catch unterminated blocks and backtrack if you just don't reject the text outright.
>>
>>107235975
i don't really buy that, because it assumes a malformed input, which could just as well be the case for specifying the number elements. what if the number is wrong?
>>
>>107212764
niggas just reinvented csv lmfao
>>
>>107212764
why is data stored in the code? fucking fail
>>
>>107212789
My brain is so fucking rotted that I knew this comment woukd here in easily the first 5 replies and when I read it I fucking keked hard.
>>
>>107212789
FPBP OP lost
>>107232449
>you're mentally ill
That would be you, sis
>>
It's called Grammar.

Json Grammar.
YAML Grammar.
TOML Grammar.

You write in grammar.
>>
For example this

${sneed}


This is a grammar rule for string interpolation technology in javascript.
>>
>>107217121
No, mostly because JavaScript won.
>>
grammar notation invokes the execution of functionality
>>
>>107220939
>especially if it's meaning to be more human-friendly
Do you know what tokens are? It's obviously trying to be more LLM-friendly.
>>
>>107235936
>Javascript has trailing commas
>JSON doesn't

huh
>>
>>107226630
INI is so simple you can parse it with scanf without any fancy tricks, and it's readable.
>>
>>107212764
great for when you have 150 entries and 85 columns



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.