Questions tagged [folly]

Folly ("Facebook Open Source Library") is a C++ library of relatively low-level components, with very few dependencies, developed by Facebook. It's published under the Apache 2.0 license and is under active development as of November 2015.

folly is a C++ library of relative low-level components, developed by Facebook. It's published under the Apache 2.0 license and is under active development as of November 2015.

Among its feature one can find bit manipulation code snippets, an atomic hash map, Andrei Alexandrescu's ScopeGuard mechanism, and many more.

The library professes to complement the C++ Standard Library and Boost, i.e. avoid duplicate functionality with them.

See the overview of the library, or go to its github root.

68 questions
2
votes
1 answer

Cmake file for a Folly project

I am trying to write a toy example to use Facebook's Folly library. The program is brought in what follows: #include #include #include #include #include…
MTMD
  • 1,162
  • 2
  • 11
  • 23
2
votes
1 answer

'folly/folly-config.h' file not found

I'm having this problem when I want to run the application via xcode Showing All Errors Only /Users/ugur/Documents/Projects/MyApp/node_modules/react-native/ReactCommon/cxxreact/JSBundleType.h:10:10: 'folly/Portability.h' file not found # Uncomment…
Ugur
  • 750
  • 9
  • 20
2
votes
1 answer

big endian and little endian in folly of Facebook

I have read the code of folly created by Facebook,In this page https://github.com/facebook/folly/blob/master/folly/FBString.h ,I found that author considers big endian and little endian when he set some value, such as capacity_ , The code is as…
shengfu zou
  • 560
  • 1
  • 7
  • 16
2
votes
1 answer

How can I use boost::lexical_cast with folly::fbstring?

The following program: #include #include #include #include class foo { }; std::ostream& operator<<(std::ostream& stream, const foo&) { return stream << "hello…
Tavian Barnes
  • 12,477
  • 4
  • 45
  • 118
2
votes
2 answers

How to send HTTP chunked response to emulate a video stream using Proxygen and Folly?

I am writing a HTTP video streaming server based on Facebooks Proxygen. There is no seeking planned. Using the proxygen::ResponseBuilder I am abled to send chunks of a webm encoded video as HTTP response, i.e. chunked transfer encoding is working.…
malik
  • 66
  • 9
1
vote
0 answers

What exactly does each ZSTD compression level do?

The ZSTD compression library by Facebook offers over 19 compression levels, but sometimes some seem to have more effect on overall compression efficiency and compression time than others. What exactly is the difference between, for e.g., level 5 and…
1
vote
1 answer

What does it mean for folly::Synchronized object to be const?

I want to write some utility functions that operate on Synchronized objects. I could write 2 versions one for const and one for non-const but that seems silly. Alternatively I could write 1 version just for const. I'm not sure if there's any…
1
vote
2 answers

Library not found for -lFolly

After updating react-native from version 0.63.2 to 0.66.1, i get the following error in Xcode when i try to build my app. library not found for -lFolly I've tried running pod install and cleaning the build folder. My Library Search Paths look like…
Pavel Raul
  • 11
  • 2
1
vote
1 answer

Max capacity for FBString?

For FBString, max_size() simply returns std::numeric_limits::max(). However, the higher two bits of capacity_ in struct MediumLarge is used to denotes the type of FBString(small/medium/large), which means the max of capacity_ will be…
konchy
  • 573
  • 5
  • 16
1
vote
0 answers

Is it possible to override a function by changing the return type from optional to non-optional in C++?

In C++, I have a parent function whose return type is folly::Optional. My question is: Can we override the function and return int in the derived function? I know this is doable in Java. For C++, I searched for some documents and saw that C++…
Andy Wang
  • 13
  • 2
1
vote
0 answers

Using absl::flat_hash_set with folly::small_vector

I'm trying to create a absl::flat_hash_set of folly::small_vector. The documentation for adding support for a custom type for absl::Hash says: An AbslHashValue overload for a type should only be declared in the same file and namespace as said type.…
Thomas Johnson
  • 10,776
  • 18
  • 60
  • 98
1
vote
1 answer

Curly braces in variable names

Lately I've been browsing through some code of facebooks folly library and saw a variable named like HTTPServer* const server_{nullptr}; as a class member. I've never seen something like this before and wondered if there is any special meaning.…
1
vote
2 answers

When to use folly Unit type

In the following code snippet, I saw this Unit type but couldn't figure out when to use it and what it is doing? I read this https://github.com/facebook/folly/blob/master/folly/Unit.h but still don't know how to use this Unit in my program. What are…
Zack
  • 1,205
  • 2
  • 14
  • 38
1
vote
1 answer

Pod install failing for react-native app (NoMethodError - undefined method `basename' for #)

Pod install in ios folder of react-native app fails with the following error: The exact same repository when cloned on a different machine installs all pods without any issue. I am deleting my node_modules and Pods/ and then running npm install…
1
vote
0 answers

iterator_adapter.hpp file not found

In our react-native app, we're using cocoapods. After the usual set up for a new computer, including cloning the repo, installing node_modules installing and updating pods, then launching the app, I get the dreaded message Print: Entry,…
Mike S.
  • 2,048
  • 1
  • 32
  • 55