What can I do to my scala code so it will compile faster?

Here are the phases of the scala compiler, along with slightly edited versions of their comments from the source code. Note that this compiler is unusual in being heavily weighted towards type checking and to transformations that are more like desugarings. Other compilers include a lot of code for: optimization, register allocation, and translation to … Read more

Best practices for debugging linking errors

Not sure what your level of expertise is, but here are the basics. Below is a linker error from VS 2005 – yes, it’s a giant mess if you’re not familiar with it. ByteComparator.obj : error LNK2019: unresolved external symbol “int __cdecl does_not_exist(void)” (?does_not_exist@@YAHXZ) referenced in function “void __cdecl TextScan(struct FileTextStats &,char const *,char const … Read more

Understanding STG

GHC wiki contains an introductory article about STG written by Max Bolingbroke: The STG machine is an essential part of GHC, the world’s leading Haskell compiler. It defines how the Haskell evaluation model should be efficiently implemented on standard hardware. Despite this key role, it is generally poorly understood amongst GHC users. This document aims … Read more

Automatic #defines according to Debug/Release config in Visual Studio

The Visual Studio automatically defines _DEBUG symbol for Debug builds (and NDEBUG for non-debug builds). Another way to do this is to go to the project settings -> configuration properties -> C/C++ -> preprocessor, and edit the preprocessor definitions manually. See also: This answer explains the differences between _DEBUG and NDEBUG in more detail. This … Read more

Compiling php with curl, where is curl installed?

None of these will allow you to compile PHP with cURL enabled. In order to compile with cURL, you need libcurl header files (.h files). They are usually found in /usr/include/curl. They generally are bundled in a separate development package. Per example, to install libcurl in Ubuntu: sudo apt-get install libcurl4-gnutls-dev Or CentOS: sudo yum … Read more

Microsoft Visual C++ Compiler for Python 3.4

Unfortunately to be able to use the extension modules provided by others you’ll be forced to use the official compiler to compile Python. These are: Visual Studio 2008 for Python 2.7. See: https://docs.python.org/2.7/using/windows.html#compiling-python-on-windows Visual Studio 2010 for Python 3.4. See: https://docs.python.org/3.4/using/windows.html#compiling-python-on-windows Alternatively, you can use MinGw to compile extensions in a way that won’t depend … Read more

How to handle large Swift Project?

Swift toolchain is still a bit gross, you’ll need to use some temporary workarounds until Apple fixes it (see UPDATES below) Here is a list of items that you can do to keep yourself from going crazy. Slowness caused by immature Swift compiler Change your development workflow using Injection for Xcode. Once you installed the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)