Timeline for Tips for golfing in GolfScript
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 17, 2020 at 9:04 | history | edited | CommunityBot |
Commonmark migration
|
|
Jul 20, 2017 at 13:46 | comment | added | Ilmari Karonen |
@Dennis: "#{var'g','gpush Gstring.new(STDIN.gets)'.cc}"; would also let you define a new GolfScript operator g that reads a line from stdin and pushes it on the stack.
|
|
Feb 20, 2015 at 2:50 | history | wiki removed | Doorknob | ||
Jun 10, 2014 at 13:35 | comment | added | Dennis |
If you initialize i to any integer, '"#{'i):i';STDIN.gets}"'++~ will give a different result every time it is evaluated. Backticks may also be worth mentioning. If we assume Linux, we can use, e.g., `head -1` instead of STDIN.gets .
|
|
Jun 10, 2014 at 10:05 | history | edited | Justin | CC BY-SA 3.0 |
added 280 characters in body
|
Jun 10, 2014 at 9:43 | history | edited | Justin | CC BY-SA 3.0 |
added 24 characters in body
|
Jun 10, 2014 at 9:33 | history | edited | Justin | CC BY-SA 3.0 |
added 169 characters in body
|
Jun 10, 2014 at 9:26 | comment | added | Howard |
You might want to add a remark that {"#{STDIN.readline}"p}2* does not read 2 lines but instead the string is evaluated only once.
|
|
Jun 10, 2014 at 8:48 | history | answered | Justin | CC BY-SA 3.0 |