Skip to content

Metaprogramming and Macros in Julia | Stefan Karpinski #150

@KZiemian

Description

@KZiemian

Metaprogramming and Macros in Julia, https://www.youtube.com/watch?v=EpNeNCGmyZE

00:00 How many of you write program that writes another program?
00:27 Metaprogramming allow you to simplify creating programs that write programs
00:45 Searching for example of metaprogramming inside Julia code
02:38 Typical problem: how to call LAPACK from inside your code?
03:47 Example: calling function written in C from inside your code
06:17 Example: using for loop and @eval to generating code of the functions
10:52 Julia code is represented by Julia data structure
13:06 Question: what symbol can go in between symbols a and b (variables)?
13:58 Refining of last question: what is default symbol for operator after + and *.
14:26 a + b is just convenient way of writing +(a, b)
15:25 You can construct expressions from the ground up
18:18 Comment on Julia and MATLAB
18:47 Question: what is relation of Julia syntax and Abstract Syntax Tree (AST)?
19:42 @eval is just shorthand for eval(quote(...))
20:40 Macros is a Julia
22:40 Example: @time macro
27:07 Question: role of esc in macro hygiene

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions