;; 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
#+TITLE: Creating a Custom Plot Type for org-mode | |
#+AUTHOR: Jeff Trull | |
* Introduction | |
- Motivated by last month's discussion of PLOT | |
- I wanted to understand the semantic meaning of PLOT for my Keynote backend | |
- Ihor pointed out the newly released "sectors" feature in gnuplot | |
- makes it theoretically possible to implement things like pie charts that Keynote has |
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
** Jeff Trull: thing-at-point | |
*** Generalizes "things" - parseable elements in a buffer | |
- words, lines, sentences | |
- symbols and sexps | |
- emails and urls | |
- uuids | |
Imagine anything that might come after ~forward-~ | |
**** Example |
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
# Meme-compliant gnuplot 6 pie chart demo | |
# Jeff Trull 2024-07-12 | |
set terminal png | |
unset border | |
unset xtics | |
unset ytics | |
unset rtics | |
unset key | |
set theta clockwise top |
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
// 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); |
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
// demonstrating use of Eigen::Map | |
#include <iostream> | |
#include <vector> | |
#include <Eigen/Dense> | |
int main() { | |
using namespace Eigen; | |
std::vector<float> foo{1.0, 2.0, 3.0, 4.0}; | |
Map<Matrix<float, Dynamic, 1>> foom(foo.data(), foo.size()); | |
IOFormat OctaveFmt(StreamPrecision, 0, ", ", ";\n", "", "", "[", "]"); |
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
// experimenting with zip iterator and sort | |
#include <vector> | |
#include <iostream> | |
#include <boost/iterator/zip_iterator.hpp> | |
#include <boost/fusion/adapted/std_tuple.hpp> | |
using zip_it = boost::zip_iterator<std::tuple<std::vector<std::size_t>::iterator, | |
std::vector<std::size_t>::iterator, |
NewerOlder