CARVIEW |
Select Language
HTTP/2 200
date: Sat, 19 Jul 2025 15:53:41 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-robots-tag: none
etag: W/"ae84a3433afb4a15e3ba26a1cec12e5c"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=2bxyfp9jyxAMciAXIXAKmn4OGx2S3KwrrGeycTtSZUYD%2Bz7MDVK9qbbR6kamVWRAqzDw0VpSRt3Kk9pcWn%2FrnyeB%2FSU8ZS6RdV44AGrHGcTVZQIMQoK8KV%2BLL0Xzk5TjiHMeXCczJkDYfFWMIPDUHOnJuNaJZtAMRyBhDW3XjxUeDl%2B1htJz8jzJ0pmHPGFjsrQCz%2FUPGhRFvKv1s4EtpLvdtfsKiYkhVuRuIeT%2FWvPomv%2BGLljhpiaxpXhcts10rwKYC6ZJRpGPYybTnKHqZA%3D%3D--FLiPwbL5SZ0C4fd%2F--1e5QnLi9Q2u6yHrwi67hJg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1717329519.1752940421; Path=/; Domain=github.com; Expires=Sun, 19 Jul 2026 15:53:41 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 19 Jul 2026 15:53:41 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 972E:305A02:214456:29748D:687BBF85
side by side comparison · satyr/coco Wiki · GitHub
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 48
side by side comparison
Gavin Haynes edited this page Oct 11, 2019
·
54 revisions
CoffeeScript | Coco |
---|---|
last = (a) -> a[a.length-1] |
last = -> it[*-1] |
class equals constructor: (x, y) -> return `x == y` |
function equals @@0 == @@1 |
$('.account') .addClass('active') .show 'slow' |
$ \.account .addClass \active .show \slow |
pythagoras = [] for a in [9..1] for b in [a...99] by 1 h = (a*a + b*b) ** 0.5 pythagoras.push [a, b, h] unless h % 1 |
pythagoras = for a from 9 to 1 by -1 for b from a til 99 h = (a*a + b*b) ** 0.5 [a, b, h] unless h % 1 |
for file, index in ['head', 'body', 'tail'] do (file, index, time = new Date) => fs.readFile file, (err, contents) => @compile file, index, contents, time |
for let file, index of <[head body tail]> let time = new Date err, contents <~ fs.readFile file @compile file, index, contents, time |
mixin = (objects...) -> for obj in objects @[key] = val for own key, val of obj this |
mixin = (...objects) -> for objects => @ <<< & this |
loop node = node.parentNode break unless node instanceof Element or node instanceof Elephant |
do node.=parentNode while node instanceof [Element, Elephant] |
alert( try nonexistent / undefined catch error "And the error is ... #{error}" ) |
alert do try nonexistent / void catch "And the error is ... #e" |
exports.Cat = class Cat extends Animal constructor: (@name) -> super @meowed = 0 @interval: 5000 meow: => ++@meowed play: -> setInterval @meow, @constructor.interval bark: -> throw Error 'unimplemented' |
export class Cat extends Animal (@name) -> super ... @meowed = 0 @meow = ~> ++@meowed @interval = 5000ms play: -> setInterval @meow, ..interval bark: -> ... |
switch day when "Fri", "Sat" if day isnt rainy go bingo go dancing when "Sun" then go church else go work |
switch day case \Fri \Sat if day is not rainy go bingo go dancing case \Sun then go church default go work |
(-> if match = /\d+/.exec location.hash @value = match[0] @focus() else @disabled = yes ).call document.getElementById 'page' |
let this = document.getElementById \page if /\d+/exec location.hash @value = that.0 @focus! else @disabled = true |
|
|
RegExp ///he (re){1,2} gex///.source, flag |
//he (re){1,2} gex #flag//? |
dicts = [ I2: [ [1, 0] [0, 1] ] , 'baz qux': 2 ] assert dicts[1]['baz qux'] is 2 |
|
child = new class extends prototype: parent child.x = 6 child.y = 9 |
child = ^parent <<< x: 6, y: 9 |
options = {} options[k] = v for own k, v of defaults options[key] = value run options |
run {...defaults, (key): value} |
x = !x |
!=x |
Array(-~num).join(str).replace /\D+/g, '' |
"#str" * num - /\D+/g |
biggest = if a > b then a else b |
biggest = a >? b |
pages = (com.github ||= {}).satyr ||= [] |
pages = com@github@@satyr |
options = collapsible: true, active: false |
options = {+collapsible, -active} |
rotate = (point) -> if 0 of point then [point[2], point[0], point[1]] else x: point.z, y: point.x, z: point.y |
rotate = (point) -> if 0 in point then point[2 0 1] else point{x: z, y: x, z: y} |
(String.fromCharCode i for i in [65..90]) |
[\A to \Z] |
You can’t perform that action at this time.