10 ms·
Here is it decoded: {"interval":"week","periodicity":1,"timeUnit":null,"candleWidth":4.3486590038314175,"flipped":false,"volumeUnderlay":true,"adj":true,"cross
by spullara 4y ago
Here is it decoded:
{"interval":"week","periodicity":1,"timeUnit":null,"candleWidth":4.3486590038314175,"flipped":false,"volumeUnderlay":true,"adj":true,"crosshair":true,"chartType":"line","extended":false,"marketSessions":{},"aggregationType":"ohlc","chartScale":"linear","studies":{" vol undr ":{"type":"vol undr","inputs":{"id":" vol undr ","display":" vol undr "},"outputs":{"Up Volume":"#00b061","Down Volume":"#ff333a"},"panel":"chart","parameters":{"widthFactor":0.45,"chartName":"chart"}}},"panels":{"chart":{"percent":1,"display":"F","chartName":"chart","index":0,"yAxis":{"name":"chart","position":null},"yaxisLHS":[],"yaxisRHS":["chart"," vol undr "]}},"setSpan":{"multiplier":5,"base":"year","periodicity":{"period":1,"interval":"week"}},"lineWidth":2,"stripedBackground":true,"events":true,"color":"#0081f2","stripedBackgroud":true,"eventMap":{"corporate":{"divs":true,"splits":true},"sigDev":{}},"customRange":null,"symbols":[{"symbol":"F","symbolObject":{"symbol":"F","quoteType":"EQUITY","exchangeTimeZone":"America/New_York"},"periodicity":1,"interval":"week","timeUnit":null,"setSpan":{"multiplier":5,"base":"year","periodicity":{"period":1,"interval":"week"}}}]}
I bet if they were more aggressive in using defaults it would be a lot smaller.
- a_c 4y agoOT, we used to joke about LISP source code contains mostly brackets. Nowadays we literally store, transform and pass around willy nillily
- hk__2 4y agoSpeaking about LISP and state in the URL, this is how OVH stores the state when you buy a domain from them: https://www.ovh.com/fr/order/webcloud/?#/webCloud/domain/options?selection=~(domains~(list~(~(name~'somethinghn.com))~options~(~'dnssec)))
- TeMPOraL 4y agoThat's Clojure's EDN encoded for ClojureScript isn't it? I recognize this syntax from briefly working on a CLJ/CLJS app.
- bsima 4y agoNope, edn uses square brackets and doesn't have a `list` keyword. This is some custom representation. Probably written in Common Lisp? Based on some quick searching I found this reference https://docs.ovh.com/us/en/web-paas/languages-lisp/ https://docs.ovh.com/us/en/web-paas/languages-lisp/
- mattpallissard 4y agoOr it could just be that s expressions are easy to parse.
- TeMPOraL 4y agoI found that joke funny until I realized that, if you sum the count of round, square, angle and curly braces together, your typical piece of C++ or Java code has more brackets than equivalent piece of Lisp code...
- spullara 4y agoRight, but having them all be the same is what people are joking about :) Although I might check the lisp/clojure vs java code on techempower or another rosetta stone like example.
- moring 4y agoThat, and the usual style of stacking all closing parentheses together at the end of the last line of a sub-expression / statement / whatever. People sometimes do this in Java and it's just as unreadable.
- User23 4y agoYou read it by indentation not by counting parentheses.
- WorldMaker 4y agoIt's still very easy to make mistakes reading it that way. If you are reading it by indentation anyway you may as well use a parser that closes parentheses for you at indentation changes. (Like the ML family and Haskell and Python all decided to do.)
- User23 4y agoI don't find reading properly indented Lisp any harder than reading properly indented Python. I agree however with respect to having the tooling help with balancing delimiters, although I let the editor do that job instead of the parser. And that's one of the major advantages of Lisp. Structural editing is considerably easier to implement. Parinfer[1] for example is really cool. I have to say I'm really excited about tree-sitter allowing similar structural editing for harder to parse languages. [1] https://shaunlebron.github.io/parinfer/ https://shaunlebron.github.io/parinfer/
- reaperducer 4y agowe used to joke about LISP source code contains mostly brackets. There was a programming language in the 1970's called SAM76 that didn't care how many closing parentheses you had, as long as it was more than the number of opening parentheses. So, something like this was perfectly valid: a(1+r(em(2)))))))))))))))))))
- bboygravity 4y agoThat's genious IMO. Making sure the amount of opening and closing parantheses is equal is annoying and unnecesary. It screams "trust me all good with the closing parantheses".
- andreareina 4y agoparedit and rainbow parens makes it a non-issue for me.
- paledot 4y agoI disagree. I would say when I get an unbalanced paren compiler error, it's more common for the omission to not be at the end of the line. Having the compiler silently swallow the error would lead to serious bugs very quickly.
- tonmoy 4y agoWhat if I wanted to copy that expression and use is as part of a different expression?
- NavinF 4y agoInteractive prompts already do that. Eg if you google "2+2)*3" it will correctly print "12". This effectively lets you append operations to an expression without editing both sides. On the other hand, auto closing parentheses in code is a terrible idea for obvious reasons. There are only like 7 languages used in industry and they all have excellent tooling that integrates with your editor to eliminate issues like this.
- ajuc 4y agoif ((v1.x()-v2.x())*(v1.x()-v2.x())+(v1.y()-v2.y())*(v1.y())-v2.y())+(v1.z()-v2.z())*(v1.z()-v2.z()) > distance*distance) { // collision } Would you like this to fail to compile? Or would you prefer it to silently return the wrong value?
- _fat_santa 4y agoI suspect it's probably a global library that handles this. So refactoring it in one place would be difficult. If I had to guess their implementation looks something like this. SomeUrlService.pushState(JSON.stringify({ foo: 'bar' })); SomeUrlService.navigate('/some/url/here') Likely, that "SomeUrlService" is also tacking on plenty of other shit to the URL that is passed along. I don't work for Yahoo and never have, so this is all pure speculation.
- spullara 4y agoHaving worked there years and years ago, I doubt it. All those parameters look like chart parameters to me, probably local to Y! Finance.
- Altho00 4y agoWhat is the point of the encoding ? Is it obfuscation for the common user ? What's wrong with http:// http:// url.com/api/?interval=week&periodicity=1... since the encoded version is not shorter.
- ninjanomnom 4y agoEncoding isn't usually to obscure but to allow using characters not allowed in a URL or wherever text is being stored. This makes it a bit easier to directly take that encoded text later and decode it into something like json.
- Altho00 4y agoThat makes sense, thank you
- deelly 4y ago> What is the point of the encoding ? Absence of special characters. No need to escape symbols like {}:/\?& etc, etc.
- rocho 4y agoThey have a nested structure, it's a pain to encode that in query parameters.
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]