Hacker News new | past | comments | ask | show | jobs | submit login
REPL: To JSON what Excel is to CSV (repl.cc)
87 points by spolu on Feb 19, 2014 | hide | past | favorite | 64 comments



That'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.


+1. Also, being written in uppercase, it seems to be an abbreviation but I couldn't find a possible expansion on the site (Assuming the intended meaning is something other than Read-Eval-Print-Loop)


Its 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/

Edited: for more positive feedback.


Yes, 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.


they should have called it "rep" and put up a rant proclaiming "REP IS THE ONE TRUE REPL"


jspipe is indeed a good name... repl is vague I have to admit.


I have exactly the same complaint for the Go language. The game of go is famous enough (the new Drosophila of AI), to not reuse its name.


And added on that is there is already a pretty established site with same domain name (excluding TLD) called "http://repl.it/"


Add the misuse of the term "polyfill" to that list...

some passionate debate here:

http://remysharp.com/2010/10/08/what-is-a-polyfill/


Haha, absolutely. I wondered how can REPL have something to JSON at all :)


Pretty 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).


Yeah, 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?


It doesn't have very SQLish syntax, but there are various JSON ports of XPath and XQuery from the XML world.


Ooh, that's exactly what I was looking for. Thanks!


linq 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.



Does anyone know of a JavaScript-powered Excel clone? As in, roughly the same spreadsheet UI, but I could write custom functions in JS rather than having to write everything in Visual Basic.


Google Docs SpreadSheet supports javascript. And I manage to use it to build weekly memory reports when I was working on Halo 4 : http://www.youtube.com/watch?v=INHh3EN3jfI

Here's a link : https://docs.google.com/spreadsheet/ccc?key=0Ak0Zu3w86Ux5dEt...


Have you looked at the spreadsheets in Google Drive?


Yep 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!


Maybe 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.


I played with it too, and I still don't get it. I completely missed the Excel comparison.



I'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.


Ouah jq is pretty cool. REPL is more targeted to the occasional coder, or the advanced developer looking to quickly manipulate some JSON


jq 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.


Yes, It can.


While we are there, if you want to manipulate JS not just JSON:

http://graspjs.com/


Do you mean Excel the expensive PC program found on legacy corporate Windows intranets, or Excel the hard to decipher proprietary file format?


He probably means Excel the industry standard program for data collection, management and analysis for everyone not working in IT.


And 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


Not 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.


CSV > 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.


lol


Please, 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.


No key on the front page visible


No, of course not, but the example suggests you could put your key in and pull down your invoices from stripe to do data mining on them.


I 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?


If 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 :)


Seems 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?


Maybe 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.


Yep. We are trying to push our bizdev to use it as well. It's still slightly complicated... but they're starting to get it! :)


Am 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.


Yes you're right. 49mb is slightly large for REPL. but I've been working successfully with 200k lines CSV of over 15mb without issue


Your 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).


I 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?


...undocumented and bloated?


I just don't get this.


thank 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.


My favorite feature is the ability to expand and collapse at the object level. Anybody have a favorite tool for this?


The last thing I want to use Excel for is CSV. It seems to me what JSON needs is an equivalent to XSLT


Could 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).


I 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).


Take a look at this: https://voyager.datanitro.com/


Wow, 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.


More meta-negativity than anyone was expecting.



"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...


Pretty 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.


I 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.


What 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?


When 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.


What's wrong?

Spreadsheets are great for all sorts of reasons. However, they are not some magical tool that makes csv files usable.


It would be cool if you could use coffeescript instead of js.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: