Coffee, and possibly horses #14

Open
wants to merge 62 commits into
from

Conversation

Projects
None yet
6 participants
@jcoglan

jcoglan commented Aug 18, 2012

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

This comment has been minimized.

Show comment
Hide comment
@jcoglan

jcoglan Aug 18, 2012

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

jcoglan commented Aug 18, 2012

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

@rkh

This comment has been minimized.

Show comment
Hide comment
@rkh

rkh Aug 18, 2012

Owner

Nice. Does it support fibers?

Owner

rkh commented Aug 18, 2012

Nice. Does it support fibers?

@arsduo

This comment has been minimized.

Show comment
Hide comment
@arsduo

arsduo Aug 18, 2012

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

arsduo commented Aug 18, 2012

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

@jcoglan

This comment has been minimized.

Show comment
Hide comment
@jcoglan

jcoglan Aug 18, 2012

Fiber support is coming when I rewrite in Fargo.

jcoglan commented Aug 18, 2012

Fiber support is coming when I rewrite in Fargo.

@rkh

This comment has been minimized.

Show comment
Hide comment
@rkh

rkh Aug 18, 2012

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.

Owner

rkh commented Aug 18, 2012

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.

@ComradeDOS

This comment has been minimized.

Show comment
Hide comment
@ComradeDOS

ComradeDOS Aug 24, 2012

Plz provide not obfuscated source code.

Plz provide not obfuscated source code.

This comment has been minimized.

Show comment
Hide comment
@jcoglan

jcoglan Dec 22, 2012

Owner

There is no non-obfuscated source, Berliner is written directly in that format.

Owner

jcoglan replied Dec 22, 2012

There is no non-obfuscated source, Berliner is written directly in that format.

This comment has been minimized.

Show comment
Hide comment
@ComradeDOS

ComradeDOS Dec 23, 2012

Hmm... You really think this is non-obfuscated source? I have bad news for you...

Hmm... You really think this is non-obfuscated source? I have bad news for you...

This comment has been minimized.

Show comment
Hide comment
@jcoglan

jcoglan Dec 23, 2012

Owner

No, it is deliberately obfuscated. It's a fork of almost-sinatra, the entire point is to make the code as small as possible.

Owner

jcoglan replied Dec 23, 2012

No, it is deliberately obfuscated. It's a fork of almost-sinatra, the entire point is to make the code as small as possible.

@jcoglan

This comment has been minimized.

Show comment
Hide comment
@jcoglan

jcoglan Aug 1, 2013

@rkh how the heck is this PR still open

jcoglan commented Aug 1, 2013

@rkh how the heck is this PR still open

@rkh

This comment has been minimized.

Show comment
Hide comment
@rkh

rkh Aug 1, 2013

Owner

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

Owner

rkh commented Aug 1, 2013

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

@rkh

This comment has been minimized.

Show comment
Hide comment
@rkh

rkh Jul 8, 2014

Owner

Still needs a rebase.

Owner

rkh commented Jul 8, 2014

Still needs a rebase.

@jcoglan

This comment has been minimized.

Show comment
Hide comment
@jcoglan

jcoglan Jul 8, 2014

Nope #sorrynotsorry

jcoglan commented Jul 8, 2014

Nope #sorrynotsorry

@fnx-ableton

This comment has been minimized.

Show comment
Hide comment
@fnx-ableton

fnx-ableton Jul 8, 2014

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

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

@rkh

This comment has been minimized.

Show comment
Hide comment
Owner

rkh commented Jul 8, 2014

image

@rkh

This comment has been minimized.

Show comment
Hide comment
@rkh

rkh Mar 18, 2017

Owner

Any updates on this?

Owner

rkh commented Mar 18, 2017

Any updates on this?

@rkh rkh requested a review from rentalcustard Mar 18, 2017

@jcoglan

This comment has been minimized.

Show comment
Hide comment

jcoglan commented Mar 19, 2017

lmao

@rentalcustard

i demand that you make it better.

@@ -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]

This comment has been minimized.

@rentalcustard

rentalcustard Mar 20, 2017

Collaborator

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

@rentalcustard

rentalcustard Mar 20, 2017

Collaborator

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

+ %title= title
+ %body
+ %p= site_name()
+ %a{href: '/hello?name=World'} Say hello!

This comment has been minimized.

@rentalcustard

rentalcustard Mar 20, 2017

Collaborator

I refuse.

@rentalcustard

rentalcustard Mar 20, 2017

Collaborator

I refuse.

+.git
+.gitignore
+.npmignore
+.redcar

This comment has been minimized.

@rentalcustard

rentalcustard Mar 20, 2017

Collaborator

Remove this line to make it merge cleanly

@rentalcustard

rentalcustard Mar 20, 2017

Collaborator

Remove this line to make it merge cleanly

+
+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,

This comment has been minimized.

@rentalcustard

rentalcustard Mar 20, 2017

Collaborator

what

@rentalcustard

rentalcustard Mar 20, 2017

Collaborator

what

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

This comment has been minimized.

@rentalcustard

rentalcustard Mar 20, 2017

Collaborator

no.

@rentalcustard

rentalcustard Mar 20, 2017

Collaborator

no.

+, "dependencies" : {"async":"", "faye-websocket":"", "vault-cipher":"", "haml":"", "ejs":"", "mime":""}
+, "devDependencies" : {"coffee-script":""}
+
+, "licenses" : [ { "type" : "MIT"

This comment has been minimized.

@rentalcustard

rentalcustard Mar 20, 2017

Collaborator

licences

@rentalcustard

rentalcustard Mar 20, 2017

Collaborator

licences

+ <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>

This comment has been minimized.

@rentalcustard

rentalcustard Mar 20, 2017

Collaborator

This pisses me off

@rentalcustard

rentalcustard Mar 20, 2017

Collaborator

This pisses me off

@jcoglan

This comment has been minimized.

Show comment
Hide comment
@jcoglan

jcoglan Mar 20, 2017

@rentalcustard or, maybe, I could not

jcoglan commented Mar 20, 2017

@rentalcustard or, maybe, I could not

@rentalcustard

This comment has been minimized.

Show comment
Hide comment
@rentalcustard

rentalcustard Mar 20, 2017

Collaborator

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

Collaborator

rentalcustard commented Mar 20, 2017

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

@rkh rkh added this to the Coffee, and possibly horses milestone May 26, 2018

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