Hacker GitHub

← All repos

meta/folly

View on GitHub ↗ ★ 30,556 C++

An open-source C++ library developed and used at Facebook.

144 mentions on Hacker News by 90 people: 15 stories, 129 comments · first 2012-06-02 · latest 2026-01-14

Mentions per year 144 mentions · busiest year 2020 (16)
20082026
  1. Facebook's open source C++11 library: https://github.com/facebook/folly
    comment by personjerry · 2017-03-13 · in Ask HN: What are some examples of good code?
  2. …> n, you'll still have the identity over the first n numbers. Personally I just use folly::Hash ( https://github.com/facebook/folly/blob/da08e63ce3bac9196b18d... ) as it uses sane defaults for hash functions, and contrary to std::hash it's…
    comment by ot · 2017-02-27 · in I Wrote My Fastest Hashtable
  3. …in C++ programs; this change shaved a few MBs of .text from a bunch of large services at FB: https://github.com/facebook/folly/commit/be4c6d6b3e21914df8a... .
  4. …and linearizeable. It's used extensively inside Facebook. Disclaimer: I work at Facebook. [1] https://github.com/facebook/folly/blob/master/folly/MPMCQueu...
  5. Facebook's folly also has a MPMC queue: https://github.com/facebook/folly/blob/master/folly/MPMCQueu...
  6. …"hello" after We had to deprecate the initializer_list constructor and fix all the occurrences ( https://github.com/facebook/folly/commit/07dc3ce5923b2d761ca... , https://github.com/facebook/folly/commit/d458b0a14486b9d80d5... ).
  7. …structs. This can generate better code. Folly has a generic `loadUnaligned()` that uses this trick: https://github.com/facebook/folly/blob/5d52fb8c30e567403b8cc...
  8. The TimerWheel abstraction, implemented for example: - https://github.com/facebook/folly/blob/master/folly/io/async... (Facebook/Folly) - https://github.com/real-logic/Agrona/blob/886d7744fa15fc3de1... (Real-Logic/Argona) and in turn based…
    comment by markpapadakis · 2016-07-06 · in Implementing Software Timers (1990)
  9. …the coroutines proposals working their way through the C++ committee can make lives better. [1] https://github.com/facebook/folly/tree/master/folly/fibers [2] https://github.com/facebook/folly/tree/master/folly/futures [3]…
  10. Facebook's Folly library implements something similar: https://github.com/facebook/folly/blob/master/folly/ScopeGua... It provides some macros to make it easier to use, e.g. SCOPE_EXIT { cleanup(); more_cleanup(); if…
    comment by Kristine1975 · 2016-04-28 · in Custom Deleters for C++ Smart Pointers
  11. I just tried to compile folly in OSX and it fails to compile with homebrew. https://github.com/facebook/folly/issues/400 Also, Once I manage to compile folly and then wangle, what kind of database drivers can I use in conjunction with…
  12. …although anecdotally GCC makes better use of these hints. Folly has a function to make it portable: https://github.com/facebook/folly/blob/bb5ed8070d533c016e1e9...
  13. ▲ 1
    Folly futures
    story by marvel_boy · 2016-02-16 · 0 comments
  14. ▲ 2
    Folly C++11 libaray
    story by autoreleasepool · 2016-02-03 · 0 comments
  15. …has the same trick, and it's a std::string compliant implementation used in production at Facebook. https://github.com/facebook/folly/blob/master/folly/docs/FBS...
  16. …fd callbacks and event_base, as well as providing implementations for many common types of fd uses. https://github.com/facebook/folly/blob/master/folly/io/async... grepping the codebase for `asio` brings up nothing.
  17. …combinators. You get all the map/filter/take/drop/reduce primitives, but in a much cleaner way. See https://github.com/facebook/folly/blob/master/folly/gen/test... for an example.
  18. https://github.com/facebook/folly/blob/master/folly/Benchmar...
    comment by ot · 2015-07-16 · in GCC 5.2 released
  19. Folly Futures support interrupts and cancellations. See https://github.com/facebook/folly/blob/master/folly/futures/...
    comment by jsedgwick · 2015-06-20 · in Futures for C++11 at Facebook
  20. …goodness as a real futex, but is fully portable. For an example of this technique, check out https://github.com/facebook/folly/blob/master/folly/detail/F... . That code only implements wake and wait, but it would be straightforward to…
    comment by ngbronson · 2015-04-24 · in Show HN: Evenk C++ concurrency library
  21. …idea. It also has some nice features like buffered file reading, fork-join parallelism, etc. [1]: https://github.com/facebook/folly/blob/75278c6326af4e6a81b87...
    comment by ajtulloch · 2015-04-06 · in C++ Streams
  22. …most 23 characters in-place, and it's a widely used implementation (at least within Facebook :) ) https://github.com/facebook/folly/blob/master/folly/FBString...
  23. …and libraries, completely replacing std::string both for our own code and third-party code. https://github.com/facebook/folly/blob/master/folly/docs/FBS... In addition, it is worth noting folly::StringPiece (from folly/Range.h), which is…
  24. …Proxygen as well. Proxygen heavily relies on folly's buffer management abstractions such as IOBuf ( https://github.com/facebook/folly/blob/master/folly/io/IOBuf... ) and Cursor ( https://github.com/facebook/folly/blob/master/folly/io/Curso.…
    comment by seasonedschemer · 2014-11-05 · in Proxygen, Facebook's C++ HTTP Framework
  25. …[1], this is just: using namespace folly::gen; byLine('/a/file/with/numbers') | eachTo<int> | sum; https://github.com/facebook/folly/tree/master/folly/gen
  26. …library is much more interesting and can yield better performance (if you hit the sweet spot). https://github.com/facebook/folly/blob/master/folly/docs/sma... From what I understand, using a "rvalue-reference ready" vector implementation…
    comment by shin_lao · 2014-08-30 · in Facebook's std::vector optimization
  27. ▲ 275
    Facebook's std::vector optimization
    story by iamsalman · 2014-08-30 · 89 comments
  28. …have the cleanup code optimized away. An updated version of ScopeGuard doesn't have this problem ( https://github.com/facebook/folly/blob/master/folly/ScopeGua... ). So, yes, I'll concede that code that expects you to cast some kind of…
    comment by maxlybbert · 2014-06-24 · in Why C++ Sails When the Vasa Sank [pdf]
  29. …library contains a really clean lock-free SPSC queue [1], and a really fast MPMC queue [2]. [1]: https://github.com/facebook/folly/blob/master/folly/Producer... [2]: https://github.com/facebook/folly/blob/master/folly/MPMCQueu...
  30. …| filter([](int i){ return i % 2 == 0; }) | mapped([](int i){ return i * i; }) | as<vector>(); } https://github.com/facebook/folly/tree/master/folly/gen
    comment by ajtulloch · 2014-04-11 · in C++ – From goto to std::transform
  31. …Folly from facebook. I haven't taken a close look, but I know they do some jemalloc-specific code: https://github.com/facebook/folly/tree/master/folly The other allocated-related thing that C++ really wants (and could benefit C as well) is…
    comment by bodyfour · 2014-04-06 · in A Story Of realloc (And Laziness)
  32. …an infinite amount of samples and keeping the minimum is the actual time that needs measuring. [0]: https://github.com/facebook/folly/blob/master/folly/Benchmar... [1]: https://github.com/facebook/folly/blob/master/folly/docs/Ben...
  33. https://github.com/facebook/folly
  34. …way (and also prevents access without acquiring the lock): SYNCHRONIZED(data) { // modify data } https://github.com/facebook/folly/blob/master/folly/Synchron...
    comment by zeroonetwothree · 2014-02-07 · in In the C++ bag of tricks: scoped locks
  35. I hadn't heard of Folly; so for others: https://github.com/facebook/folly
    comment by emmelaich · 2013-05-21 · in A fast lock-free queue for C++
  36. …of a single-producer single-consumer lock-free queue in Facebook's folly C++ library. https://github.com/facebook/folly/blob/master/folly/Producer... (code) https://github.com/facebook/folly/blob/master/folly/docs/Pro... (docs)
  37. ▲ 2
    The nuances of implementing a resizing vector efficienctly
    story by elehack · 2013-02-19 · 0 comments
  38. ▲ 1
    Ask HN: Object realocation with memmove
    story by dhucerbin · 2012-09-03 · 1 comment
  39. ▲ 1
    Folly: The Facebook Open Source Library
    story by oneofthose · 2012-06-04 · 0 comments
  40. ▲ 2
    Folly (acronymed loosely after Facebook Open Source Library)
    story by chorola · 2012-06-03 · 0 comments
  41. …code, but I'm sure as hell going to look at making my C vector code do some of what FBVector does: https://github.com/facebook/folly/blob/master/folly/docs/FBV...
    comment by tptacek · 2012-06-03 · in Folly - The Faceboook open source library
  42. I'm going to be taking a serious look at this for my own projects. I like Format: https://github.com/facebook/folly/blob/master/folly/docs/For... Histogram is going to come in handy. :) fbstring seems to be exactly what the doctor ordered.…
    comment by luser001 · 2012-06-02 · in Folly - The Faceboook open source library
  43. This all fits into Folly: The Facebook Open Source Library. https://github.com/facebook/folly
    comment by ramisayar · 2012-06-02 · in Facebook C++ Conference Live Blogging
  44. ▲ 4
    Fbstring open-sourced
    story by ramisayar · 2012-06-02 · 1 comment