Readit News logoReadit News
epiceric commented on Show HN: Duper – The Format That's Super   duper.dev.br/... · Posted by u/epiceric
epiceric · 4 months ago
My reasoning is that they are normally transmitted as strings in JSON, and you could use an identifier like DateTime("2025-11-02T02:33:00Z") if you need to be explicit.

Making them part of the language would increase the complexity of parsers - how would you validate that a date is actually valid? It's doable (YAML and TOML do it, after all) but requires extra steps.

epiceric · 4 months ago
Although given the feedback I've received, date/time might get included into the format.
epiceric commented on Show HN: Duper – The Format That's Super   duper.dev.br/... · Posted by u/epiceric
jitl · 4 months ago
I think a neat route would be to use this as an authoring plugin in VS Code, like prettier: write Duper (or JSON5, or whatever), and then downlevel it to regular json automatically when pressing cmd-s. You wouldn't get to keep your comments (or they could be transformed to { "//": "comment text" }).

Outside of that, it's tough to compete with JSON in the "human readable unschematized serialization format" market, especially targetting JavaScript:

Use in the browser requires some degree of bundle size increase, since the parser code needs to be loaded before your format can be used. WebAssembly libraries are usually quite large compared to a pure-JS implementation. According to [bundlejs](https://bundlejs.com/?q=%40duper-js%2Fwasm&treeshake=%5B*%5D), @duper-js/wasm weighs in at about 488 kB uncompressed, 159 kB gzip.

Use in any JavaScript runtime means you're competing against the runtime's native `JSON.parse` and `JSON.stringify`. In v8, these are very quick and have runtime-level tricks to go faster, for example see [v8's recent post on making JSON.stringify 2x faster](https://v8.dev/blog/json-stringify) when serializing plain objects with no funny business .toJSON methods, replacer, or indent formatting.

Besides those points, my major complaint about JSON is how expensive it is to encode binary data for transmission; in JSON I usually do base64, with your format it's transformed to escape characters that are less efficient than base64, right? \xNN is base16 with 2 extra bytes wasted on the \ and x, or \uNNNN which is base 10 with 2 extra bytes. Is there a way you can fit binary with no expensive encode/decode step into the format?

So, for me this seems suitable as a config file format: there you get good benefit from comments, identifiers, easier string authoring. Not sure I need the binary raw string thingy in config files that much, but I guess it doesn't hurt.

epiceric · 4 months ago
Duper certainly won't outperform the native JSON implementation (and it likely never will), though I do think benchmarks would be a great addition. Bundle size and binary representation are definitely things I'll keep in mind!

The config file transpiration to JSON idea is quite interesting. It's pretty similar to how I'm already defining the TextMate grammar used by the website's syntax highlighter, so I'll certainly try to incorporate that into the tooling.

epiceric commented on Show HN: Duper – The Format That's Super   duper.dev.br/... · Posted by u/epiceric
anonzzzies · 4 months ago
Why no date and time?
epiceric · 4 months ago
My reasoning is that they are normally transmitted as strings in JSON, and you could use an identifier like DateTime("2025-11-02T02:33:00Z") if you need to be explicit.

Making them part of the language would increase the complexity of parsers - how would you validate that a date is actually valid? It's doable (YAML and TOML do it, after all) but requires extra steps.

epiceric commented on Show HN: Duper – The Format That's Super   duper.dev.br/... · Posted by u/epiceric
aappleby · 4 months ago
Where the ** is the grammar specification? Prose is nice, but with a BNF I could plug this into my parsing expression grammar library right quick and give it a rundown.
epiceric · 4 months ago
Good point. I'll see about making one.
epiceric commented on GitHub CLI is now in beta   github.blog/2020-02-12-su... · Posted by u/twapi
Aissen · 6 years ago
I wish some people at github would address the bad mobile version of their website. It's impossible to do anything done with the current mobile UI without going through the desktop version:

- see the language stats for this repo

- see commit history in one tap

- read the full readme

- see all files at top level

- etc.

If you're already hard at work on this, thanks in advance.

epiceric · 6 years ago
I think they are going to avoid any web mobile changes while they are building and promoting their mobile app, which is still in beta.

And honestly, this official app personally feels that it's even worse to navigate. Hard to navigate to your most recent repos, reading/following issues/PRs is terrible (a good 1/6th of my screen is covered by a tab in the bottom corner that I accidentally open a lot of the time when scrolling), no CI information, can't differentiate what's new and old discussion when opening a notification, can't check other branches, can't generate tokens (very useful when commiting from someone else's machine if you have 2FA), and in general it prioritizes elements without a clear reason, like the "subscribe"/"unsubscribe" button for repos.

I currently still prefer the Fasthub app for now. It still doesn't have all features above or from the web version, and it's not updated often since the app is being refactored entirely, but it's open source and it has a decent UI/UX. Definitely better than the beta official app.

epiceric commented on Help me ask why you didn't just   blog.plover.com/tech/why-... · Posted by u/psanford
hirako2000 · 6 years ago
I find that 3 can become a mental down spiral for the carer.

Praise anywhere, criticise anyware, make sure to do it sometimes in public. Otherwise, it becomes a game of fools, which at scale may lead us all to insanity.

epiceric · 6 years ago
Care to elaborate? I don't understand why it's a "game of fools" or how it would lead to insanity.

Honest question.

epiceric commented on Chessvision.ai – Analyze chess position from websites, images or video   chessvision.ai/... · Posted by u/innerspirit
epiceric · 7 years ago
Maybe it's just me, but I'd be wary of any browser extension that captures and analyzes my screen over-the-wire, especially if it is closed-source like this one.

Not to say that this is necessarily malicious. But I personally wouldn't recommend this to anybody as of right now, unless you want to risk leaking potentially sensitive data to a third-party.

epiceric commented on Telegram Login for Websites   telegram.org/blog/login... · Posted by u/jfroma
gant · 8 years ago
Took a while for me to reinstall it, this is what it looks like (just after SMS auth):

https://i.imgur.com/BAnddlg.png

I counted the asterisks, they do in fact reveal the length of the password.

epiceric · 8 years ago
Isn't that a user-defined hint? Mine shows text that I manually entered the last time I changed my password.

u/epiceric

KarmaCake day25December 21, 2017View Original