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
use ACME::Autowrap qr/modify/ => sub{'modified'}; | |
sub modify{ 'foo'} | |
sub keep { 'bar'} | |
say modify(); # modified | |
say keep(); # bar | |
{ | |
no ACME::Autowrap; |
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
% Hey, I gave the things you did a little thought. | |
% But altered almost everything, that's why I don't think it's an sufficient answer anylonger so I made a gist. | |
% Firstof: I removed all your string construction with format and use one atom_codes | |
% (btw there is a string type in SWI-Prolog for efficient string handling). | |
% Next, I thought it should be part of the predicate if you end with a newline or had reached the end of file. | |
% After that, I put some neat little tricks in there to get backtracking behaviour for the get_line/3 - predicate. | |
% I hope this helps you in any way. |
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
#ifdef GL_ES | |
precision highp float; | |
#endif | |
uniform sampler2D from, to; | |
uniform float progress; | |
uniform vec2 resolution; | |
// default interpolationPower = 5; | |
uniform float interpolationPower; |
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
#ifdef GL_ES | |
precision highp float; | |
#endif | |
uniform sampler2D from, to; | |
uniform float progress; | |
uniform vec2 resolution; | |
uniform vec3 r; // ( left/right,top/bottom, radius) | |
bool isBlack(float progress, vec2 p){ |
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
#ifdef GL_ES | |
precision highp float; | |
#endif | |
uniform sampler2D from, to; | |
uniform float progress; | |
uniform vec2 resolution; | |
float f(float p, float x,float y){ | |
float a = x<.5 ? | |
x<.25? 2. : |
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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
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
# somewhere | |
extendMaybe = (classObjs...) -> | |
for classObj in classObjs | |
(methodName, method) -> classObj::[methodName] = method unless classObj::[methodName]? | |
# top of your file: | |
[extend] = extendMaybe String | |
# usage: | |
extend "append", (stringToAppend)-> @ + if stringToAppend then stringToAppend else '' |
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
h=100 | |
IO.puts(([200,h,50,20,10,5,2,1]|>Enum.reduce{h*elem(Float.parse(hd System.argv),0)|>trunc,[]},fn(i,{c,l})->{rem(c,i),List.duplicate(i<h&&"#{i}¢ "||"#{div(i,h)}€ ",div(c,i))++l}end)|>elem 1) |
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
# possible solution for http://rosettacode.org/wiki/Amb | |
my @a = | |
(all «the that a»), | |
(all «frog elephant thing»), | |
(all «walked treaded grows»), | |
(all «slowly quickly»); | |
sub test (Str $l, Str $r) { | |
$l.ends-with($r.substr(0,1)) |
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
v8.9.1 | |
5.6.0 | |
/home/pat/Scripts/js/nyc-bug | |
└─┬ [email protected] | |
├── [email protected] | |
├── [email protected] | |
├─┬ [email protected] | |
│ ├── [email protected] deduped | |
│ ├── [email protected] deduped | |
│ └─┬ [email protected] |
OlderNewer