Machine code: Difference between revisions

m
→‎{{header|Raku}}: enable syntax highlighting
m (→‎{{header|Raku}}: remove redundant code)
m (→‎{{header|Raku}}: enable syntax highlighting)
Line 858:
=={{header|Raku}}==
I don't know how to translate this C line <lang C>c = ((int (*) (int, int))buf)(a, b);</lang> so cannot solve the task with an idiomatic solution. I have also tried with Go's approach by adding a helper program but it also doesn't work out. Nonetheless I just present the attempt here so perhaps someone can fix that in 10 seconds.
<lang rakuperl6>use NativeCall;
 
constant PROT_READ = 0x1; #
Line 920:
}</lang>
mcode.raku
<lang rakuperl6>#!/usr/bin/env raku
 
# 20200501 Raku programming solution
10,339

edits