Skip to content

Coffee, and possibly horses - #14

Open
jcoglan wants to merge 62 commits into
rkh:trunkfrom
jcoglan:coffee
Open

Coffee, and possibly horses#14
jcoglan wants to merge 62 commits into
rkh:trunkfrom
jcoglan:coffee

Conversation

@jcoglan

@jcoglan jcoglan commented Aug 18, 2012

Copy link
Copy Markdown

Yeah, so I don't think is really going to scale to meet the growing needs of HorseBook. I need to support 1,000,000 requests per second and the only way you can do this is with a lightweight modern platform like CoffeeScript.

I've ported your framework to Coffee and am already running it in production. Features:

  • Routes based on path and method
  • Sets params to url-encoded body or query string values
  • Before blocks
  • Renders HAML and EJS
  • In-memory sessions
  • Works great with MongoDB

I hope you can see how this is clearly better than doing it in Ruby, which everyone knows isn't a real language.

@jcoglan

jcoglan commented Aug 18, 2012

Copy link
Copy Markdown
Author

Oh and it supports PATCH which is a real deal-breaker for the Ruby version. Can Ruby even do PATCH, idk?

@rkh

rkh commented Aug 18, 2012

Copy link
Copy Markdown
Owner

Nice. Does it support fibers?

@arsduo

arsduo commented Aug 18, 2012

Copy link
Copy Markdown

The irony that this is 28 lines largely because you can't use semi-colons in Coffeescript overwhelms me.

@jcoglan

jcoglan commented Aug 18, 2012

Copy link
Copy Markdown
Author

Fiber support is coming when I rewrite in Fargo.

@rkh

rkh commented Aug 18, 2012

Copy link
Copy Markdown
Owner

The irony that this is 28 lines largely because you can't use semi-colons in Coffeescript overwhelms me.

It's 15 lines if you replace semicolons with newlines in the Ruby version.

@jcoglan

jcoglan commented Aug 1, 2013

Copy link
Copy Markdown
Author

@rkh how the heck is this PR still open

@rkh

rkh commented Aug 1, 2013

Copy link
Copy Markdown
Owner

Hahaha. Amazing. It's not mergeable anymore, could you maybe rebase?

@rkh

rkh commented Jul 8, 2014

Copy link
Copy Markdown
Owner

Still needs a rebase.

@jcoglan

jcoglan commented Jul 8, 2014

Copy link
Copy Markdown
Author

Nope #sorrynotsorry

@fnx-ableton

Copy link
Copy Markdown

@rkh Why can't you just merge it anyway. Don't be such a pedant.

@rkh

rkh commented Jul 8, 2014

Copy link
Copy Markdown
Owner

image

@rkh

rkh commented Mar 18, 2017

Copy link
Copy Markdown
Owner

Any updates on this?

@rkh
rkh requested a review from rentalcustard March 18, 2017 04:12
@jcoglan

jcoglan commented Mar 19, 2017

Copy link
Copy Markdown
Author

lmao

@rentalcustard rentalcustard left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i demand that you make it better.

Comment thread berliner.coffee
@@ -0,0 +1,17 @@
[J,M,duc,euc,n,e,w]=[JSON,Math,decodeURIComponent,encodeURIComponent,((p)->p.replace(/\/*$/,'').replace /^\/?/,'/'),((d,s)->d[k]=(if d[k]instanceof Array then d[k].concat v else v)for k,v of s;d),(s,c)->s.split(/\s+/).map c]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure this should be [K,M,dfm,euc,n,e,w]=

Comment thread example/views/index.haml
%title= title
%body
%p= site_name()
%a{href: '/hello?name=World'} Say hello!

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I refuse.

Comment thread .npmignore
.git
.gitignore
.npmignore
.redcar

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line to make it merge cleanly

Comment thread README.markdown

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the 'Software'), to deal in
the Software without restriction, including without limitation the rights to use,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what

Comment thread example/app.coffee
next()

app.get '/', ->
@cookie message: {value: 'Sinatra; it’s a framework', path: '/hello'}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no.

Comment thread package.json
, "dependencies" : {"async":"", "faye-websocket":"", "vault-cipher":"", "haml":"", "ejs":"", "mime":""}
, "devDependencies" : {"coffee-script":""}

, "licenses" : [ { "type" : "MIT"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

licences

Comment thread site/index.html
<div class="sub"><pre class="prettyprint">$ curl 'localhost:4567/hello?name=_why'
Hello _why, welcome to Awesome.net!</pre></div>

<p>You can also register templates in the app code itself:</p>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pisses me off

@jcoglan

jcoglan commented Mar 20, 2017

Copy link
Copy Markdown
Author

@rentalcustard or, maybe, I could not

@rentalcustard

Copy link
Copy Markdown

@jcoglan as a man in the Open Source Community I demand your labour time on this

@jtarchie

Copy link
Copy Markdown

Still needs a rebase.

@simi

simi commented Jan 23, 2020

Copy link
Copy Markdown

@jtarchie yes, still waiting for rebase.

@tekknolagi

Copy link
Copy Markdown

Any movement on this? I require this critical infrastructure for my application.

@jtarchie

Copy link
Copy Markdown

Anyway to get this merged in? We've been waiting awhile for the new features.

@rkh rkh mentioned this pull request Mar 31, 2023
@rkh rkh linked an issue Apr 12, 2023 that may be closed by this pull request
@rkh

rkh commented Apr 12, 2023

Copy link
Copy Markdown
Owner

We missed the chance to merge this on its tenth anniversary. We should revisit it in 2032.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

missing run or map statement

9 participants