HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
facebookarchive
warp
D2014–2021
facebookarchive / warp · Archived

warp

A fast preprocessor for C and C++

10Distinct people
16Mentions
0Explicit recommenders
528GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A fast preprocessor for C and C++

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year16 dated mentions

Observed mentions: 2014-05-26 08:22:38 UTC to 2021-05-10 17:07:18 UTC.

012342014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2021

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC202
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC404
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC202
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC303
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC202
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC202

What Hacker News says

16 sources
But dlang has a long problem of change constantly without backward compatibility and a lot of projects just die because of it, for example the mentioned https://github.com/facebookarchive/warp : ==== make dmd -c -O -inline -release -ofwarp.o cmdline.d constexpr.d context.d directive.d expanded.d file.d id.d lexer.d loc.d macros.d main.d number.d outdeps.d ranges.d skip.d sources.d stringlit.d textbuf.d charclass.d context.d(222): Error: Implicit string concatenation is error-prone and disallowed in D context.d(222): Use the explicit syntax instead (concatenating literals is @nogc): "# 1 \"%2$s//\"\x0a" ~ "# 1 \"<command-line>\"\x0a" context.d(223): Error: Implicit string concatenation is error-prone and disallowed in D context.d(223): Use the explicit syntax instead (concatenating literals is @nogc): "# 1 \"<command-line>\"\
Read the rest
x0a" ~ "# 1 \"%1$s\"\x0a" macros.d(329): Error: Built-in hex string literals are obsolete, use std.conv.hexString!"FD 61 FD" instead. macros.d(333): Error: Built-in hex string literals are obsolete, use std.conv.hexString!"FD" instead. macros.d(338): Error: Built-in hex string literals are obsolete, use std.conv.hexString!"FD 61 62 FD FD" instead. ranges.d(71): Error: Implicit string concatenation is error-prone and disallowed in D ranges.d(71): Use the explicit syntax instead (concatenating literals is @nogc): "Buffer overflowed. Possibly caused by forgetting to " ~ "complete a git merge in your code." Makefile:44: recipe for target 'warp.o' failed make: ** [warp.o] Error 1 ====
In Adding ANSI C11 C compiler to D so it can import and compile C files directly
Context: Walter Bright created the first native C++ compiler, Zortech C++. This pull request actually implements its own C compiler! For Walter, considering he's implemented C++98 alone, implementing C must be nothing :) He implemented the ANSI C compiler here in just 5 days. Semi-related project, using libclang to import C++ directly (with C++ templates and all the other features, regular D has C++ linking and exception support built-in): https://github.com/Syniurge/Calypso Some quotes from the forum https://forum.dlang.org/post/s7a37h$2bbv$1@digitalmars.com : - Writing a C preprocessor is a nightmare. Fortunately, I already did that https://github.com/facebookarchive/warp and we can use it if we choose. - The D code will be able to inline C code, and even CTFE it. - There are a lot of wacky C extensions out there. We only need to implem
Read the rest
ent currently used ones (not the 16 bit stuff), and only the stuff that appears in C headers. - Without a C compiler, we're stuck with, wedded to, and beholden to libclang. I wouldn't be surprised that the eventual cost of adapting ourselves to libclang will exceed the cost of doing our own C compiler.
In Adding ANSI C11 C compiler to D so it can import and compile C files directly
My experience, which of course is anecdotal, is that the advantage is it's easy to change the algorithms and data structures. I've maintained C and C++ code bases for decades, and I've found that the first algorithm I tried has stayed there in the code. It gets tweaked, optimized, refactored, but it's the same algorithm and data structure. With D, when I developed the Warp preprocessor, https://github.com/facebookarchive/warp I continually tried different algorithms & data structures to see which was faster. One reason it's easier is that in C/C++ the . is used for value field access, while -> for pointer field access. In D, . is used for both. So you can easily switch between a value and a pointer to the value by changing little code.
In Using D to Create the World’s Fastest File System
> Does D have a thing? Probably its most useful feature is rather subtle. It's very easy to express diverse ideas in code in D without having to resort to contortions. It's something people realize after having worked with D for a while. It is not the result of having feature X (you can always find feature X in other languages or a way to make X work), it's the combination of various X's. For example, some algorithms express naturally in a functional manner, some imperative, some OOP, etc. It isn't necessary to buy into a manner for the whole program, just use the manner that fits the particular part of the program. You might like to use FP here and there, but don't want to deal with monads. You can use OOP for the AST, but don't want to box integers into an OOP class. You like dynamic typing for one type, but it's a bad fit for another.
Read the rest
You can garbage collect for a quick prototype or a seldom used part of the code, and carefully manage memory for the release or the hot spots. (The Warp preprocessor I wrote did that. https://github.com/facebookarchive/warp) There's a lot less time hammering square pegs into round holes. I've seen more than enough presentations on "How To Do Technique X In Language Y" and everyone says how clever that is but the contortions are just too awful to contemplate. The flip side is that D won't be satisfying to a purist adherent of any of those paradigms.
In The reference D compiler is now open source
Excellent work, perseverance proves! D is a very good language, avoiding most of the pitfalls of C++. I have wondered why D isn't picking up. Even Facebook has abandoned Warp [1]. Other than the lack of corporate backup, The complexity of the language gets out of hold as we move forward. DMD is the official compiler, but it doesn't optimize as much as LDC/GDC does. LDC/GDC is not available on the Enterprise platforms on which C++ is used (at least on the servers with RHEL/CentOS). There are 3 different compilers and the resource is not concentrated on improving just one. I agree that competition is good for health, but when things are not picking up why not focus the efforts on making the better the best (probably GDC/LDC)? Albeit few community members are very helpful and humble, personal attacks are a common thing in the forum. The foru
Read the rest
In Running a D game in the browser
> I've literally seen 20x or more speedups in multithreaded cases just by making sure I reuse every buffer rather than create new ones. Reuse rather than free and reallocate is a core practice whenever you feel the need for speed, regardless of the memory allocate strategy used. For some very fast D code: https://github.com/facebook/warp Minimizing the amount of heap memory allocated is a core strategy.
In How does D improve on C++17?
> Does anyone else find it sorta ironically odd that one of the masterminds behind this great stuff is now a .... gasp Facebook ... employee?? Would you be referring to the business morals or technical requirements of Facebook? You need a lot of good hacks to deal with large bulks of data. For example: https://github.com/facebook/warp I heard Goooogle developed Go partially because they were fed up with the time taken up compiling massive C programs.
In Compile like it's 1992

Showing the 15 most recent of 16 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.