;; add support for C++ and Python
(org-babel-do-load-languages
'org-babel-load-languages
'((C . t) (python . t)))
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// very basic embedded Ruby interpreter for C++ programs | |
// thrown together by Jeff Trull <jetrull@sbcglobal.net> based on googling and asking questions on #ruby-lang | |
#include <ruby.h> | |
// access to C variables | |
static VALUE getter(VALUE ns, VALUE var) { | |
return Qfalse; | |
} | |
VALUE setter(VALUE ns, VALUE var, VALUE val) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.section .text._Z11extract_fooIeET_N5boost6python3api6objectE,"axG",@progbits,long double extract_foo<long double>(boost::python::api::object),comdat | |
.p2align 4 | |
.weak long double extract_foo<long double>(boost::python::api::object) | |
.type long double extract_foo<long double>(boost::python::api::object), @function | |
long double extract_foo<long double>(boost::python::api::object): | |
.LFB10151: | |
.cfi_startproc | |
.cfi_personality 0x9b,DW.ref.__gxx_personality_v0 | |
.cfi_lsda 0x1b,.LLSDA10151 | |
endbr64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq lsp-clients-clangd-args | |
(list (concat "--compile-commands-dir=" | |
(projectile-project-root) | |
"build") | |
"--log=verbose" | |
"-j=1" | |
"--debug" | |
"--clang-tidy" | |
"--background-index"))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example of running Ruby in a separate thread | |
// 2012-01-08 by Jeff Trull <jetrull@sbcglobal.net> | |
#include <iostream> | |
#include <queue> | |
#include <string> | |
#include <set> | |
#include <boost/thread.hpp> | |
#include <boost/thread/mutex.hpp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright 2010-2012 Karsten Ahnert | |
Copyright 2011-2013 Mario Mulansky | |
Copyright 2013 Pascal Germroth | |
Distributed under the Boost Software License, Version 1.0. | |
(See accompanying file LICENSE_1_0.txt or | |
copy at http://www.boost.org/LICENSE_1_0.txt) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// testcase for nice error messages in lexer-based parser | |
#define BOOST_SPIRIT_USE_PHOENIX_V3 | |
#include <iostream> | |
#include <sstream> | |
#include <boost/spirit/include/phoenix.hpp> | |
#include <boost/spirit/include/lex_lexertl.hpp> | |
#include <boost/spirit/include/lex_lexertl_position_token.hpp> | |
#include <boost/spirit/include/qi.hpp> | |
#include <boost/spirit/include/support_istream_iterator.hpp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Attempt at making a Boost grammar that successfully parses Jason Shankel's predicate logic language | |
// #define BOOST_SPIRIT_DEBUG | |
#include <boost/spirit/include/qi.hpp> | |
#include <boost/variant/recursive_variant.hpp> | |
#include <boost/fusion/include/adapt_struct.hpp> | |
#include <boost/spirit/include/phoenix.hpp> | |
#include <boost/optional.hpp> | |
// start with the AST |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// std::vector<Eigen::VectorXf> -> Eigen::MatrixXf | |
#include <iostream> | |
#include <vector> | |
#include <Eigen/Dense> | |
int main() { | |
using namespace Eigen; | |
const int cols = 10; | |
const int rows = 10; // or do you get it from the sizes of each entry in *d? | |
std::vector<VectorXf> * d = new std::vector<VectorXf>(cols); |
NewerOlder