This isn't a comprehensive language design, it's just ideas for syntactical constructs I'd really like to see some day. It'd probably be some kind of object/functional hybrid a la Scala - I really like the recent trend of "post-functional" languages that take a lot of ideas/influence from functional programming, but aren't fascist about it, or so scary that only math Ph.Ds can learn them. The idea is to fuse OOP and FP into a language which gives you a high level of expressiveness and power, but is actually useable for Getting Real Things Done.
This file contains hidden or 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
A relatively simple application that demonstrates some advanced usage of GdkPixbuf and cairo. | |
Two most interesting functions are documented inside sources. |
This file contains hidden or 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
// Single-line comments start with // | |
/* | |
Multi-line comments look like this. | |
*/ | |
// Import ArrayList class inside of the java.util package | |
import java.util.ArrayList; | |
// Import all classes inside of java.lang package | |
import java.security.*; |
This file contains hidden or 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
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT && | |
iptables -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -j DROP && | |
iptables -A INPUT -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN -m state --state NEW -j DROP && | |
iptables -A INPUT -i lo -j ACCEPT && | |
iptables -D INPUT -p tcp -m tcp --dport 21 -j ACCEPT && | |
iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT && | |
iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT && | |
iptables -A INPUT -p tcp -m tcp --dport 1989 -j ACCEPT && | |
iptables -A INPUT -p tcp -m tcp --dport 1500 -j ACCEPT && | |
iptables -A INPUT -p tcp -m tcp --dport 18080 -j ACCEPT && |
This file contains hidden or 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
config.assets.precompile += [ | |
# precompile any CSS or JS file that doesn't start with _ | |
/(^inline[^_\/]|\/[^_])[^\/]*.(js|css)$/, | |
... |
This file contains hidden or 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
function nonCoercible(val) { | |
if (val == null) { | |
throw TypeError('nonCoercible shouldn\'t be called with null or undefined'); | |
} | |
const res = Object(val); | |
res[Symbol.toPrimitive] = () => { | |
throw TypeError('Trying to coerce non-coercible object'); | |
} | |
return res; | |
}; |
This file contains hidden or 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
$INPUTVIDEO='input.mp4' | |
$OUTPUTVIDEO='output.mp4' | |
ffmpeg -i $INPUTVIDEO -metadata:s:v rotate="-90" -codec copy $OUTPUTVIDEO |
References:
From man page: man apt_preferences
- Like C, but with garbage collection, memory safety, and special mechanisms for concurrency
- Pointers but no pointer arithmetic
- No header files
- Simple, clean syntax
- Very fast native compilation (about as quick to edit code and restart as a dynamic language)
- Easy-to-distribute executables
OlderNewer