5 ms·
REPL: To JSON what Excel is to CSV
- n1cked 13y agoMaybe explain on the main page a bit better? I didn't understand what this was at first and the screenshots for the example didn't really help. I had to play with it for a minute before I got it.
- snorkel 13y agoI played with it too, and I still don't get it. I completely missed the Excel comparison.
- northisup 13y agohttp://stedolan.github.io/jq/ http://stedolan.github.io/jq/
- meowface 13y agojq is cool, but can it also be used to construct JSON? It's great for parsing, but OP's tool covers all the different aspects.
- dontdieych 13y agoYes, It can.
- spolu 13y agoOuah jq is pretty cool. REPL is more targeted to the occasional coder, or the advanced developer looking to quickly manipulate some JSON
- ordinary 13y agoI've been using jq for a handful of small personal projects over the last month or so. I was sceptical of its promise to be to JSON what sed is to flat text, because those are big shoes to fill. But now, looking back at where and how I've used it, jq really has come through. Definitely staying in my toolkit.
- maninalift 13y agoWhile we are there, if you want to manipulate JS not just JSON: http://graspjs.com/ http://graspjs.com/
- 97-109-107 13y agoSeems like exactly the tool we needed just two days ago for pruning down a 49mb json file. We ended up parsing it in nodejs as it could simply spit out the output to a file. I didn't want to risk crashing my browser again - is there any chance that a client-side web-app parser (like yours) would be able to handle files that big?
- spolu 13y agoYep. We are trying to push our bizdev to use it as well. It's still slightly complicated... but they're starting to get it! :)
- 97-109-107 13y agoAm I missing something, but wouldn't that require pasting the 49mb file into your app through my clipboard? Just getting a file like that into the clipboard, let alone pasting into the browser, seems like a task in itself.
- spolu 13y agoYes you're right. 49mb is slightly large for REPL. but I've been working successfully with 200k lines CSV of over 15mb without issue
- maninalift 13y agoYour bandwidth has nothing to do with it, it runs in the browser. All it does is JSON.parse, execute your series of functions then JSON.stringify. Unless I'm missing something there is no advantage over ad-hoc javascript. If you want to load a file from disk, deserialize and do some processing in javascript then node is absolutely the right tool (and this isn't).
- Cthulhu_ 13y agoMaybe if you could install it locally / if it supports the file API without having to upload it to the server. I would like to see a 'pure' client-side implementation, though.
- blueskin_ 13y ago...undocumented and bloated?
- micheljansen 13y agoPretty clever, but pretty obscure compared to Excel. The power of Excel is that you can manipulate the data within the view itself, so for that comparison to make sense, I would expect to be able to add a node to the data, for example, and define its contents using a formula (function).
- cousin_it 13y agoYeah, I don't understand the comparison to Excel either. What I really want is SQL for JSON. Regular SQL is a declarative language for transforming flat lists of records into other flat lists of records, and the challenge is extending it to allow nested records. Has that been done?
- _delirium 13y agoIt doesn't have very SQLish syntax, but there are various JSON ports of XPath and XQuery from the XML world.
- cousin_it 13y agoOoh, that's exactly what I was looking for. Thanks!
- schrodinger 13y agolinq in .Net does a pretty good job with SQL-like queries against nested records. Also, many SQL implementations support querying against XML data stored within the database, which is effectively a nested record.
- antfarm 13y agohttp://stedolan.github.io/jq/ http://stedolan.github.io/jq/
- spolu 13y agoYep that's true. The main idea behind repl is to empower our bizdev to manipulate simple JSON data when Excel is not enough or whenever an API is required. For now it's really at prototype stage of course and we still have to figure out if it's really useful and how we could make it more useful!
- bru 13y agoThat's a stupid name... REPL has had a precise meaning (Read-Eval-Print-Loop) for the last 50 years, and I don't know how one can choose to give that name to a project.
- vdm 13y agoIts a template for building a pipeline. Naming it after this metaphor ("jspipe"?) might work better. It's more like a OpenRefine[0] than Excel; that analogy doesn't work at all for me. It's a REPL in the sense that when you click Run, the value of the current evaluation is used (Looped) as the input for the next expression, but this stretches the common understanding, and naming it this way fails to communicate. The full page transition when you click Run loses the implicit history from a teletype or terminal scrollback. A shell works because you can see two or more values were visible at the same time. The second pane could then show the code of the currently selected value. You could even show the diff/patch between the values as well. The 'Run' text should look like a button rather than a label, and be moved to the right. It might work even better to just evaluate the code on a timeout without an explicit gesture. 0. http://openrefine.org/ http://openrefine.org/ Edited: for more positive feedback.
- mkl 13y agoYes, it's a repl, sort of, but calling it "repl" is like calling a new text editor "editor" or a new programming language "language", seriously confusing and impossible to search for.
- zem 13y agothey should have called it "rep" and put up a rant proclaiming "REP IS THE ONE TRUE REPL"
- spolu 13y agojspipe is indeed a good name... repl is vague I have to admit.
- naiquevin 13y ago
- fulafel 13y agoDo you mean Excel the expensive PC program found on legacy corporate Windows intranets, or Excel the hard to decipher proprietary file format?
- spolu 13y agolol
- TeMPOraL 13y agoHe probably means Excel the industry standard program for data collection, management and analysis for everyone not working in IT.
- baldfat 13y agoAnd therefore doing it in a way that is NOT reproducible, easy to audit nor reliable. How many times have we seen papers and science blown because someone made a mistake in the 50 steps they did to get their results? CSV > Excel
- TeMPOraL 13y agoCSV > Excel in every way except the ones people working care about. I'd be hard-pressed to find a more convenient and flexible tool than Excel. Relational databases are too inflexible, toolchain just sucks, and as for the CSV manipulation - sure, if you know how to code. There's a reason people in banks, accounting, etc. keep doing everything in Excel even after proper systems are introduced. It's not because they're stupid; it's because all the "right" solutions suck hard and they need to work around the broken tools to do their job. There's a huge market opportunity here.
- schrodinger 13y agoNot understanding how you can rank CSV vs Excel. Excel is a platform that let's you easily build up complex calculations with different statistics, graphs, formatting, and a lot more. CSV is an interop file format for plain text tabular data. Yes, I'd rather a raw dump of data in CSV than XLS, but it seems like you're making a more general statement than that.
- duncans 13y agoCould probably do with turning those screenshots into an animated GIF as it took me a while to work out the flow, and that presumably each stage is persistent (I'm guessing, from the Run 0>1>2 chevrons).
- acron0 13y agoI just don't get this.
- rip747 13y agothank god i'm not the only one. I don't know what it is, some of the products/projects being shown on HN lately have the problem of coherently explaining and demoing what the they do.
- adnans 13y agoI think this is exactly what I needed yesterday when someone asked me is it possible to get a report from Asana into excel (Asana doesn't have this ability, just the json API).
- karamazov 13y agoTake a look at this: https://voyager.datanitro.com/ https://voyager.datanitro.com/
- lotsofcows 13y ago"Excel is to CSV" You mean a huge bloated mess that takes forever to load and encourages people to turn my beautiful data into some proprietary bollocks because they're to lazy to learn awk? Sorry, that was quite a long sentence, let me see if I can turn it into a useless but pretty chart...
- xmonkee 13y agoPretty wrong. It's a huge bloated mess that takes forever to lead and can be used to store data and code seamlessly in cells to make a single document holding both presentation and logic. Excel suffers from being a microsoft product, not from a being a bad idea. Spreadsheets are a fucking great idea. Visual programming, code as data, etc etc.
- baldfat 13y agoI disagree. It isn't reproducible AND people make mistakes and then present papers and other outcomes that later is shown to be false. Spreadsheets are treated as Swiss Army Knifes. People believe all they need to do anything is Word and Excel.
- vvvVVVvvv 13y agoWhen dealing with non tech-savy people on data (reports), Excel is perfectly fine (especially pivot tables, conditional formatting, etc...). Anything else is obviously a mess - and people can use gDocs or OpenOffice for that as well.
- schrodinger 13y agoWhat could the same people who are using excel have used instead that would have prevented them from making an error in their steps of calculation?
- lotsofcows 13y agoWhat's wrong? Spreadsheets are great for all sorts of reasons. However, they are not some magical tool that makes csv files usable.
- cjfont 13y agoWow, I was expecting this to get some criticism as I clicked the comments, but this is a bit more negativity than I would have expected from HN.
- threepipeproblm 13y agoMore meta-negativity than anyone was expecting.
- aercolino 13y agoI don't get why should I need an app like this.. Isn't it enough to use something like the Chrome console with jQuery.map?
- nly 13y agoThe last thing I want to use Excel for is CSV. It seems to me what JSON needs is an equivalent to XSLT
- keenerd 13y agohttp://kmkeen.com/jshon/ http://kmkeen.com/jshon/
- conradfr 13y agoIf you're a coder that had to generate CSV files to be opened in Excel, you don't necessarily associate those two things as a good match :)
- maninalift 13y agoI don't get this at all. I can build a pipeline of functions and view the output just as conveniently in a plain node or browser environment and I would have much more flexibility. Has anyone got a use case? Anyone?
- hughes 13y agoPlease, please don't try the example on the front page. Putting your stripe api key in a script on an insecure host is totally crazy.
- mparr4 13y agoMy favorite feature is the ability to expand and collapse at the object level. Anybody have a favorite tool for this?
- freefrancisco 13y agoIt would be cool if you could use coffeescript instead of js.