Here's the canonical TOML example from the TOML README, and a YAML version of the same. Which looks nicer?
|
| bl_info = { | |
| "name": "Julia console", | |
| "blender": (4, 0, 0), | |
| "category": "Scripting", | |
| } | |
| def register(): | |
| # install JuliaCall within Blender's Python environment (if not already installed) | |
| import importlib | |
| if importlib.util.find_spec('juliacall') is None: |
| ###### test 1 | |
| function gamblers_falacy_1(n) | |
| h,t = 0,0; c=0; r=0 | |
| for i=1:n | |
| p = t>h ? :h : (h>t ? :t : nothing) | |
| o = rand((:h,:t)) |
| module OpenCV | |
| export CvCapture, release, grabFrame, retrieveFrameIplImage, retrieveFrame, namedWindow, showImage, waitKey, destroyAllWindows | |
| import Images | |
| struct CvCapture | |
| cvCapturePtr::Ptr{Cvoid} | |
| sizes::Vector{Cint} | |
| function CvCapture(device::Int = 0) | |
| ptr = ccall((:cvCreateCameraCapture, "libopencv_highgui"), Ptr{Cvoid}, (Cint,), device) |
| #include <atomic> | |
| #include <chrono> | |
| #include <condition_variable> | |
| #include <deque> | |
| #include <future> | |
| #include <iostream> | |
| #include <mutex> | |
| #include <thread> | |
| #include <vector> |
Here's the canonical TOML example from the TOML README, and a YAML version of the same. Which looks nicer?
|
| cmake_minimum_required(VERSION 2.6) | |
| project(subclassdispatchtests) | |
| set(CMAKE_BUILD_TYPE Release) | |
| add_definitions(-std=c++11) | |
| add_executable(subclassdispatchtests subclassdispatchtests.cpp) |
| using FixedSizeArrays: Mat, FixedVector | |
| immutable Vec{N, T} <: FixedVector{N, T}; _::NTuple{N, T}; end | |
| macro fsa(expr) | |
| if expr.head == :vect | |
| Expr(:call, :Vec, expr.args...) | |
| elseif expr.head == :hcat | |
| Expr(:call, :Mat, [Expr(:tuple, a) for a in expr.args]...) | |
| elseif expr.head == :vcat | |
| if isa(expr.args[1], Expr) && expr.args[1].head == :row |
| import Base.(.^) | |
| function .^{T<:FloatingPoint, N}(A::Array{T, N}, x::Integer) | |
| if abs(x) > 42 # the "Answer to the Ultimate Question of Life, the Universe, and Everything" | |
| A.^float(x) | |
| elseif x > 1 | |
| B = similar(A) | |
| @inbounds for i in 1:length(A) | |
| B[i] = A[i] | |
| for k in 1:x-1 B[i] *= A[i] end |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE language SYSTEM "language.dtd"> | |
| <language name="LaTeX" version="1.53" section="Markup" kateversion="2.3" priority="10" extensions="*.tex;*.ltx;*.dtx;*.sty;*.cls;*.bbx;*.cbx;*.lbx;*.tikz" mimetype="text/x-tex" casesensitive="1" author="Jeroen Wijnhout ([email protected])+Holger Danielsson ([email protected])+Michel Ludwig ([email protected])+Thomas Braun ([email protected])" license="LGPL" > | |
| <highlighting> | |
| <contexts> | |
| <!-- Normal text --> | |
| <context name="Normal Text" attribute="Normal Text" lineEndContext="#stay"> | |
| <RegExpr String="\\begin(?=[^a-zA-Z])" attribute="Structure" context="FindBeginEnvironment" beginRegion="block" /> | |
| <RegExpr String="\\end(?=[^a-zA-Z])" attribute="Structure" context="FindEndEnvironment" /> | |
| <RegExpr String="\\(cite|citet|citep|parencite|autocite|Autocite|citetitle)\*(?=[^a-zA-Z])" attribute="Structure" context="Label"/> |