9 ms·
Show HN: Papa Parse 3
- conickal 12y agoWhat happens when a remote server doesn't support Range headers?
- mholt 12y agoThen you can't use the streaming feature. Fortunately, most production-ready servers support the Range header.
- colinramsay 12y agoThis looks great, particularly the way the website breaks down the main functionality with plain explanations and code samples. I know that there's a bit of a bugbear with some people when it comes to reimplementing CSV parsing but having it in-browser could be very handy.
- jwblackwell 12y agoI thought this as well, really good way to explain the benefits and features - through common questions.
- tonyhb 12y agoYeah, it explains it so well. Being able to relate to each point and feature is such a key part of explaining your service. This site might be for a CSV parsing library and not a startup, but it does a better job of telling a story than most startups do. And, to me, that's how you sell and engage users.
- mholt 12y agoThanks for your feedback. If it helps to know, the Q&A format on the homepage is the result of scratching my head for a while, thinking "How would I explain this to somebody? There's a lot to it, and it's all immediately relevant." I eventually convinced myself that the last part isn't true. It could be disclosed in parts. So I decided to run the scenario in my mind instead: "I'll give somebody this library and imagine that they'll reveal their use cases one piece at a time and I'll help them through it." Then the conversation flowed naturally and came out while typing.
- ohitsdom 12y agoLoved the format!
- findjashua 12y agolove the conversational style of the documentation!
- andrey-p 12y agoWhat really got me was the desperation in the "voice" of the questions, slowly being won over by a calm father figure. I've never had to parse CSV in the browser, but now I feel like I should. Powerful stuff! I'm also a big fan of libraries where the library name is also the API (ie Papa Parse -> Papa.parse()). It just fills me with glee.
- cheese1756 12y agoWill the website itself be released under an open license? I could see this website format being useful for a ton of open source projects.
- mholt 12y agoI'd be okay with that, I just hadn't considered it. By format do you mean design or content (or both)? And are you thinking a Creative Commons license?
- cheese1756 12y agoI meant the design, since the page created such a clear template that would be fantastic for future open source projects to modify. But if you want to release the content in the open too, all the better. I just think that a lot of open source projects which struggle with onboarding would be greatly benefited by using the page as a base.
- dyeje 12y agoInteresting branding with the whole Papa motif.
- mschulze 12y agoThe link to File on developer.mozilla.org seems to be wrong.
- mholt 12y agoThanks, you're right! Fixed.
- prezjordan 12y agoReally digging the Q&A format
- sjs382 12y agoAwesome name/brand for this tool. I love it.
- peaton 12y agoHm, could somebody explain the multi-threaded part to me? I'm a little confused. I didn't think multiple threads were possible in js. Furthermore, does this only work on Firefox?
- padenot 12y agoMultithreading in js has been available for a while using Web Workers [1]. They are available in most major browser (including recent IE). [1]: https://developer.mozilla.org/en/docs/Web/Guide/Performance/Using_web_workers https://developer.mozilla.org/en/docs/Web/Guide/Performance/...
- peaton 12y agoOk! Interesting. Are web workers gaining traction? This is the first time I've heard of them. Are there any major users/libraries that depend on ww?
- dangoor 12y agoIt depends on your browser support requirements. On the Brackets project[1], we work within Chromium (and "modern browsers" with our in-browser branch), so we can rely on web workers for doing things like parsing JavaScript for autocompletion. Web workers are quite useful and I'm sure there are a fair number of webapps that take advantage of them. [1]: http://brackets.io/ http://brackets.io/
- shekhar101 12y agoThat's the coolest, most informative, clear and concise FAQ I've seen! Great job Devs. You are cool! :)
- ekmartin 12y ago"Mini Papa for production use - Fat Papa for debug and development."
- barnabask 12y agoGiven the jaunty tone of the documentation, I really think they missed an opportunity to somehow have a "Beard Papa" version. Randomly inserts cream puff ingredients or something.
- damncabbage 12y agoSlight off-topic, sorry – I'm having a hard time reading the text on the photo background: http://i.imgur.com/StACWqu.png http://i.imgur.com/StACWqu.png
- mholt 12y agoOops. That's awful. What browser are you using?
- bagels 12y agoIt looks somewhat similar for me on the android browser.
- sjs382 12y agoYou can use http://aboutbrowser.com http://aboutbrowser.com to share not just your browser, but it's capabilities & css support too.
- chaosmonkey 12y agoNice. They should give an option to choose what to share. For example, I don't want to share network info.
- grossvogel 12y agoDon't think it's a browser issue. The text just doesn't contrast enough with the diagonal shadows in the lower left of the bg image.
- kcmarshall 12y agoYour demo page is slick. I was able to parse and inspect a couple files I had laying around locally. Toggling the header and typing options worked great.
- mholt 12y agoAwesome, glad it's useful. I was unsure how visitors would feel about having to open the developer tools, but I feel like they give you a better way to explore the results than just stringifying some JSON.
- w00kie 12y agoPapa likes!
- deleted 12y ago[deleted]
- jakejake 12y agoFor what would otherwise be considered a mundane task, this page is absolutely epic. Nice work!
- thecodemonkey 12y agoYes! Thank you! We're using the d3 CSV parser for our CSV upload functionality [1] but are having a ton of issues with performance and cross-browser support. Can't wait to try this out. [1] http://geocod.io http://geocod.io
- mholt 12y agoCool, good luck! Disclaimer: some features definitely won't work in older browsers. I saw your service on HN a while back. It generated some excitement among us here at SmartyStreets, which also uses Papa to process customers' lists without requiring them to send us their whole file. I think these are great use cases.
- jflowers45 12y agoHaven't used the tool. Not sure I'll need it in the immediate future. But damn I love the website and how quickly and easily I understood what it does.
- stevoski 12y agoDoes it handle quoted CSV fields that spans multiple lines?
- mholt 12y agoYep. You can try it out on the demo page.
- jqueryin 12y agoThe explanation of features is one of the best I've seen on the landing page. I didn't even have to hit the documentation to fully understand usage under a variety of conditions/circumstances.
- mjburgess 12y agoOn the other hand, it's a CSV parser so it's fairly easy to explain the features and list all of them (rather than try to select some important ones).
- dmachop 12y agoAs jqueryin has said, the feature list is really good on what I can do. I don't even have to check on docs for my purpose.
- thegeomaster 12y agoDo you guys think it would be too cheesy/unoriginal to "steal" this Q&A format for other products? I have a free software library to publish pretty soon, and I absolutely love your way of explaining how it all works in a cool, conversational style.
- elwell 12y agoWait a month, swap "papa" with "mama", and you should be good to go.
- domiono 12y agoInnovation is cloning 80% and innovating on the remaining 20%. :) Edit: Hey why the downvotes, I didn't say it, Andrew Chen said it. Slide 23 http://andrewchen.co/2013/10/14/zero-to-productmarket-fit-presentation/ http://andrewchen.co/2013/10/14/zero-to-productmarket-fit-pr...
- rschmitty 12y agoSteve jobs (who stole it from Picasso, who took it from ?) said "Picasso had a saying -- 'good artists copy; great artists steal' -- and we have always been shameless about stealing great ideas." This was later "clarified" by Bud Tribble: "If you take something and make it your own ... it's your design and that is the dividing line between copying and stealing." My history teacher in high school had a simple challenge to get an A for the entire year, skipping all tests and quizzes, and free pass to sleep during class: "Give me a 100% unique idea" Obviously everyone tried and everyone failed. There are no unique ideas, only innovations upon existing and past work of others. So I find it odd anyone would downvote you for the truth!
- mtdewcmu 12y ago>> Steve jobs (who stole it from Picasso, who took it from ?) said "Picasso had a saying -- 'good artists copy; great artists steal' -- and we have always been shameless about stealing great ideas." That's faintly ironic -- he had too much shame to steal the quote from Picasso. Perhaps he meant that his company employed shameless great artists, not that he was one himself. Steve Jobs has always struck me as a businessman, primarily (which is probably what you want in a CEO, if you owned, say, Apple stock -- not a thief).
- atacrawl 12y agoAs others have said, really smart way of explaining features. But, I get the following console error on the demo: Can't find variable: performance
- mholt 12y agoAh; your browser doesn't support the performance API. (To measure how long it takes.) I'll fix that.
- owenversteeg 12y agoAmazing project! Everything seems really well put together. I really like the humor and the Q&A format. Do you mind if I borrow it for v2 of a project I'm releasing soon? Also, there is not a single negative comment here. That's a HN record. Congratulations!
- mholt 12y agoIt's not a CSV library, right? :) Go for it. And yeah, I've been surprised! I hadn't anticipated so many comments about the web site, since the feature is a Javascript library. It's like going to a movie for the previews. Definitely grateful for the feedback, though. It's great that quirks that are being constructively reported so they can be fixed.
- Kluny 12y agoIt's really great, usually people around here will tear into any detail of your site that they don't like or find unconventional.
- deleted 12y ago[deleted]
- javajosh 12y ago> I hadn't anticipated so many comments about the web site... Well, first, I think you need to accept the fact that you made a truly stand-out website, with a useful innovation (the Q&A format with code examples) that people are going to copy (and to good effec). But second, the comments about the web 'preview' is the GCD of HN - Haskell, .Net, and Python programmers might still take a peak at a JavaScript library web page, even if they won't use it immediately. Third, and this is most important, it would be significantly better if you published Papa Parse to the NPM registry, because then "real" javascript programmers can add it to their existing project with a simple "npm install papaparse --save". Publishing is trivial (install npm, run 'npm init', set values, then 'npm publish').
- benaiah 12y ago
- juergen 12y ago[Error] ReferenceError: Can't find variable: performance (anonyme Funktion) (demo.js, line 155) dispatch (jquery.min.js, line 3) handle (jquery.min.js, line 3)
- mholt 12y agoThat should be fixed now. Thanks!
- mqsiuser 12y agoWhen you convert CSV to and from JSON(/XML) then the interesting part IMHO is how to convert the hierarchy (of JSON/XML) to CSV and how to encode it (e.g. in a header-line). Do you account for that?
- mholt 12y agoThere are some assumptions made. Mainly, that you have an array of arrays or an array of objects to encode as CSV. For an array of arrays, that's easy: each array is a row. For an array of objects, each object is a row keyed by field name. Data with a varied structure is much trickier, if at all possible, to flatten. I haven't figured out a magic formula for that (yet?).
- mqsiuser 12y agoThanks for scrolling down :) and answering. Yes assumptions have to be made. I have just been curious, since I have done sth similar recently (http://www.use-the-tree.com http://www.use-the-tree.com). The assumptions I make there are "that these are reasonable business documents" (e.g. invoices, orders). E.g. A List of Customers having Orders with Order Lines (3 levels (or more))
- mnutt 12y agoThis seems like it might integrate really well with crossfilter[0] which is a really neat multi-dimensional filtering tool but can completely lock up the browser as the data is loaded. [0] http://square.github.io/crossfilter/ http://square.github.io/crossfilter/
- shamsulbuddy 12y agoIn Demo it says to get see the data in browsers console.. thats cool .. but how do we Download the data , like the results should directly prompt a Save dialog window..
- mholt 12y agoHmm... I'll consider that for a later upgrade to the demo. For most people, it seems that seeing the results in the console is enough to know if it does what they need.
- shamsulbuddy 12y agoyeah we can wait for later stages for the implementation in demo but in the meantime any documentation or pointers on how to achieve the direct download of results..
- mholt 12y agoA quick Google search yields this[0] which would probably do the trick. Just beware of browser compatibility[1] (something that plagues several features of Papa already, hence it requires a modern browser to use them). [0]: http://stackoverflow.com/questions/3665115/create-a-file-in-memory-for-user-to-download-not-through-server http://stackoverflow.com/questions/3665115/create-a-file-in-... [1]: https://www.google.com/webhp?q=max%20length%20of%20data%20uri&safe=active#q=max+length+of+data+uri&safe=active https://www.google.com/webhp?q=max%20length%20of%20data%20ur...
- fiatjaf 12y agoI looked at this amazing parser some time ago, but it depended on jQuery for basically nothing. Great news it doesn't anymore.
- retroencabulato 12y agoWhy?
- retroencabulato 12y agoI will probably receive flack for this, but am I the only one that thinks it is a little bizarre this much branding and visual design has gone into a CSV parser?
- wwwwwwwwww 12y agowelcome to the silicon valley bubble
- Camillo 12y agoGreat presentation. One question: since this is a performance-oriented library, did you consider the possibility of letting the user specify a "chunk" function that receives an array of lines, instead of a "step" function that only receives one? That way, if you are parsing a file with one million lines, you can invoke the callback ten thousand times (with a hundred lines each time) instead of a million times.
- mholt 12y agoSounds like a great idea. Since that will use more memory, I also want to allow users of the library to customize the chunk sizes. I'll try to build in these features for 3.1.
- mescalito 12y agoI am very interested in hearing use cases for this, I am having trouble coming up with something useful to do with it, but looks very interesting nonetheless and site's indeed really good.
- mholt 12y agoFor one, here's the use case that inspired the project: SmartyStreets uses it so people can process their address lists. It was difficult for some customers to upload their files full of personal data either because of regulations or just being concerned about privacy... so now they can just do it all in their browser. Scientific and research applications would find this useful... any web app dealing with tabular data could benefit I think. Even if you still have to upload the whole file to a server, being able to instantly render a preview is a big win.
- nobotty 12y agoHow do you have CSV data with a comma within a field?
- santoshsankar 12y agoThis will be huge financial data, operational data, etc that is spit out of age-old systems in CSV format. Excellent.