mistym has quit [Remote host closed the connection]
<erikh>
ermagherd
GeissT has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Remote host closed the connection]
v1rr3n has quit [Quit: WeeChat 0.4.1]
<charliesome>
drbrain: github registration is borked
<drbrain>
charliesome: ?
<charliesome>
drbrain: when you go to sign in via github oauth
<charliesome>
it errors and says invalid redirect url
tylersmith has quit [Remote host closed the connection]
<charliesome>
and redirects back to heroku
<drbrain>
for rubyconf? I don't have anything to do with that
<charliesome>
oh
<charliesome>
ok :p
hinbody has joined #ruby-lang
<drbrain>
sorry
<drbrain>
I'm just a mindless promoter of RubyConf
tenderlo_ has quit [Ping timeout: 268 seconds]
mbull9 has quit [Remote host closed the connection]
cd has joined #ruby-lang
pskosinski has quit [Quit: Til rivido Idisti!]
cd is now known as Guest5421
hogeo has joined #ruby-lang
cored has quit [Ping timeout: 246 seconds]
tenderlove has joined #ruby-lang
mistym has joined #ruby-lang
marr has quit [Ping timeout: 248 seconds]
Guest5421 has quit [Quit: This computer has gone to sleep]
iliketurtles has quit [Quit: zzzzz…..]
iliketurtles has joined #ruby-lang
mistym has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
havenwood has joined #ruby-lang
cHarNe2 has quit [Quit: leaving]
rwk1 has joined #ruby-lang
gregmoreno has quit [Read error: No route to host]
gregmoreno has joined #ruby-lang
cordax has quit [Quit: Computer has gone to sleep.]
hakunin has quit [Ping timeout: 264 seconds]
flip_digits has quit [Remote host closed the connection]
rwk1 has quit [Ping timeout: 240 seconds]
nathanstitt has quit [Quit: I growing sleepy]
mdedetrich has quit [Quit: Computer has gone to sleep.]
tbuehlmann has quit [Remote host closed the connection]
tenderlove has quit [Remote host closed the connection]
iliketurtles has quit [Quit: zzzzz…..]
henrikhodne has joined #ruby-lang
mbull9 has joined #ruby-lang
gregmoreno has quit [Remote host closed the connection]
skmp has quit [Quit: Leaving.]
robbyoconnor has joined #ruby-lang
prezJFK has quit [Remote host closed the connection]
flip_digits has joined #ruby-lang
xxaM has joined #ruby-lang
pr0ton has joined #ruby-lang
tylersmith has joined #ruby-lang
flip_digits has quit [Remote host closed the connection]
flip_digits has joined #ruby-lang
mdedetrich has joined #ruby-lang
gregmoreno has joined #ruby-lang
pr0ton has quit [Ping timeout: 240 seconds]
Domon has joined #ruby-lang
dhruvasagar has joined #ruby-lang
iliketurtles has joined #ruby-lang
gregmoreno has quit [Ping timeout: 268 seconds]
wallerdev has joined #ruby-lang
nathanstitt has joined #ruby-lang
joshuawscott has quit [Quit: Leaving.]
mistym has joined #ruby-lang
wmoxam has joined #ruby-lang
Quatrerwin has joined #ruby-lang
lsegal` has joined #ruby-lang
hinbody has quit [Quit: leaving]
Nisstyre has quit [Quit: Leaving]
saarinen has joined #ruby-lang
firstdayonthejob has quit [Ping timeout: 240 seconds]
D9 has quit [Read error: Connection reset by peer]
rickhull has joined #ruby-lang
D9 has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
Bwild_ has quit [Ping timeout: 240 seconds]
Bwild has joined #ruby-lang
lsegal` has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
pr0ton has joined #ruby-lang
Guest14254 has quit [Read error: Connection reset by peer]
KM has joined #ruby-lang
shinnya has quit [Ping timeout: 260 seconds]
wallerdev has quit [Quit: wallerdev]
KM is now known as Guest70784
rsync has joined #ruby-lang
rwk1 has joined #ruby-lang
hakunin has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 264 seconds]
lsegal` has joined #ruby-lang
malev has quit [Remote host closed the connection]
rikai has quit [Read error: Connection reset by peer]
hahuang65 has quit [Quit: Computer has gone to sleep.]
pr0ton has quit [Quit: pr0ton]
tkuchiki has quit [Ping timeout: 268 seconds]
fosky has quit [Remote host closed the connection]
tomzx_mac_ has joined #ruby-lang
bzalasky has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 240 seconds]
<hagabaka>
is there a library that replaces accented letters with ascii, like é -> e? And it's not that simple, for example it seems éc "e\xCC\x81c" and éc "\xC3\xA9c" are supposed to be equivalent
mdedetrich has quit [Quit: Computer has gone to sleep.]
<ryanf>
hagabaka: check out babosa
<ryanf>
there might be other options, but that's the one I've used
<ryanf>
I think the built-in Encoding class might be able to do some transliteration too, but I'm not sure it does anything very sophisticated
<whitequark>
hagabaka: the latter one is unicode normalization
<whitequark>
google for NFD/NFKD
<hagabaka>
I did
<hagabaka>
is é -> e transliteration?
<whitequark>
unicode gem does part of what you want
rikai has joined #ruby-lang
gja has joined #ruby-lang
gja has quit [Changing host]
gja has joined #ruby-lang
<hagabaka>
basically my problem is, I have a database that contains a list of French words, and an "index" that's supported by the ascii forms of the words, linking the ascii form to the position of the word in the huge file. I'm using a binary search to find the words, but that fails unless I convert the search keyword to ascii form first
sstrickl has joined #ruby-lang
sstrickl has joined #ruby-lang
sstrickl has quit [Changing host]
<hagabaka>
*index that's sorted by the ascii forms
rickruby has joined #ruby-lang
v1rr3n has joined #ruby-lang
saarinen has quit [Quit: saarinen]
jonahR has joined #ruby-lang
duckinator has quit [Quit: Nickname collision due to Services enforced nickname change, your nick was overruled]
akurilin has joined #ruby-lang
akurilin has left #ruby-lang [#ruby-lang]
joshuawscott has joined #ruby-lang
stardiviner has joined #ruby-lang
tylersmith has joined #ruby-lang
flip_digits has quit [Remote host closed the connection]
duckinator has joined #ruby-lang
tylersmith has quit [Ping timeout: 240 seconds]
dhruvasagar has quit [Ping timeout: 246 seconds]
rwk1 has quit [Remote host closed the connection]
rwk1 has joined #ruby-lang
ryez has quit [Ping timeout: 250 seconds]
duphus has quit [Quit: Leaving.]
nathanstitt has quit [Quit: I growing sleepy]
vikhyat has joined #ruby-lang
krz has joined #ruby-lang
rwk1 has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
wmoxam has quit [Ping timeout: 245 seconds]
rwk1 has joined #ruby-lang
mistym has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 240 seconds]
hahuang65 has joined #ruby-lang
Drago has joined #ruby-lang
rwk1 has quit [Remote host closed the connection]
woollyams has joined #ruby-lang
woollyams has quit [Client Quit]
woollyams has joined #ruby-lang
iliketurtles has quit [Ping timeout: 256 seconds]
Guest43006 has quit [Remote host closed the connection]
mdedetrich has joined #ruby-lang
iliketurtles has joined #ruby-lang
jsullivandigs has joined #ruby-lang
hhatch has joined #ruby-lang
andrew has joined #ruby-lang
andrew is now known as Guest70704
lsegal` has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
lsegal has joined #ruby-lang
mistym has joined #ruby-lang
iliketurtles has quit [Quit: zzzzz…..]
woollyams has quit [Ping timeout: 252 seconds]
Domon has quit [Remote host closed the connection]
setmeaway2 has quit [Read error: Connection reset by peer]
joooooo has joined #ruby-lang
cordax has joined #ruby-lang
woollyams has joined #ruby-lang
northelks has quit [Ping timeout: 246 seconds]
northelks has joined #ruby-lang
Guest70704 has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brianpWins has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 264 seconds]
pbj has joined #ruby-lang
dhruvasagar has joined #ruby-lang
pbj has quit [Client Quit]
pbj has joined #ruby-lang
atmosx has joined #ruby-lang
atmosx has quit [Client Quit]
vikhyat has quit [Ping timeout: 246 seconds]
joshuawscott has quit [Quit: Leaving.]
TTilus has quit [Ping timeout: 264 seconds]
rshetty has joined #ruby-lang
TTilus has joined #ruby-lang
pbj has left #ruby-lang [#ruby-lang]
ruby-lang464 has joined #ruby-lang
Drago has quit [Remote host closed the connection]
_ffio_ has quit [Quit: WeeChat 0.4.1]
ruby-lang464 has quit [Ping timeout: 250 seconds]
ffio has joined #ruby-lang
henrikhodne has quit [Ping timeout: 246 seconds]
charliesome has joined #ruby-lang
mbull9 has quit [Remote host closed the connection]
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 240 seconds]
Domon has joined #ruby-lang
iliketurtles has joined #ruby-lang
rsync has left #ruby-lang [#ruby-lang]
tomzx_mac_ has quit [Ping timeout: 264 seconds]
cd has joined #ruby-lang
cd is now known as Guest54888
jsullivandigs has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
atmosx has joined #ruby-lang
atmosx has quit [Client Quit]
apeiros has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
woollyams has quit [Ping timeout: 252 seconds]
jonahR has quit [Quit: jonahR]
havenwood has quit [Ping timeout: 240 seconds]
JohnBat26 has joined #ruby-lang
D9_ has joined #ruby-lang
D9 has quit [Ping timeout: 240 seconds]
D9 has joined #ruby-lang
D9_ has quit [Ping timeout: 240 seconds]
v1rr3n has quit [Quit: WeeChat 0.4.1]
<freedrull>
is free sidekiq better than resque :\
SilverKey has joined #ruby-lang
mytrile has joined #ruby-lang
<freedrull>
couldn't someone just fork free sidekiq and add the pro features
<whitequark>
i guess the people who are capable of it also don't mind paying
gja has quit [Quit: This computer has gone to sleep]
Domon has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
Domon has joined #ruby-lang
lele` has left #ruby-lang [#ruby-lang]
lele has joined #ruby-lang
bzalasky has quit [Read error: Connection reset by peer]
bzalasky has joined #ruby-lang
benlovell has joined #ruby-lang
workmad3 has quit [Ping timeout: 245 seconds]
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
Oldsage has joined #ruby-lang
firstdayonthejob has joined #ruby-lang
<freedrull>
makes sense
jsullivandigs has quit [Ping timeout: 264 seconds]
stef_204 has joined #ruby-lang
solars has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
<freedrull>
spent so long trying to debug why my resque failure backend wasn't firing in my test, then realized failures aren't ran when jobs are inlined. which i guess makes sense.
skinny_much has joined #ruby-lang
pabs_ has joined #ruby-lang
shaman42 has joined #ruby-lang
SilverKey has quit [Quit: Cheerio!]
mdedetrich has quit [Quit: Computer has gone to sleep.]
davidbalbert has joined #ruby-lang
pabs has quit [*.net *.split]
soraher has quit [*.net *.split]
skinny_much_ has quit [*.net *.split]
shaman42_ has quit [*.net *.split]
davidbalber|away has quit [*.net *.split]
Kabaka has quit [*.net *.split]
iliketurtles has quit [Ping timeout: 264 seconds]
fullybaked has joined #ruby-lang
fullybaked has left #ruby-lang [#ruby-lang]
soraher has joined #ruby-lang
eleanor has quit [Ping timeout: 246 seconds]
mreq has joined #ruby-lang
iliketurtles has joined #ruby-lang
maxmanders has joined #ruby-lang
iliketurtles has quit [Client Quit]
Guest54888 has quit [Quit: This computer has gone to sleep]
Oldsage has quit [Quit: Leaving]
<Nilium>
I wonder what I could do to get people interested in making games and shite with Ruby and OpenGL and GLFW 3 or some other library for events/windowing..
<Nilium>
Preferably said shite is not shite in terms of quality, too, but beggars can't be choosers for very long without being crushed under the heel of capitalist society!
firstdayonthejob has quit [Quit: WeeChat 0.4.1]
cordax has quit [Quit: Computer has gone to sleep.]
mbj has joined #ruby-lang
MartynKeigher2 has quit [Ping timeout: 245 seconds]
ledestin has joined #ruby-lang
<yorickpeterse>
morning
Kabaka has joined #ruby-lang
<ddfreyne>
moing
judofyr has joined #ruby-lang
apeiros has joined #ruby-lang
rshetty has quit [Quit: Sleeping]
mdedetrich has joined #ruby-lang
mdedetrich has quit [Ping timeout: 246 seconds]
ridders has joined #ruby-lang
ahf has joined #ruby-lang
ffio_ has joined #ruby-lang
ffio has quit [Ping timeout: 240 seconds]
ridders has quit [Client Quit]
vlad_starkov has joined #ruby-lang
Voker57 has quit [Ping timeout: 264 seconds]
mbj has quit [Quit: leaving]
r0bby has joined #ruby-lang
<injekt>
moin
rolfb has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Remote host closed the connection]
Voker57 has joined #ruby-lang
<judofyr>
hey 'jekt
<injekt>
howdy 'fyr
<judofyr>
imma playing with Docker
<judofyr>
cool stuff
<injekt>
yeah I have it setup on a vps, its cool
<judofyr>
making my own little Heroku
<injekt>
you could always use dokku :D
<judofyr>
doesn't it have very slow compilation times?
Kabaka has quit [Remote host closed the connection]
<injekt>
I installed docker/dokku and setup a new vps and deploy a sinatra app in less than 5 minutes
<injekt>
deployed*
<judofyr>
injekt: doesn't it pull down Ruby etc. on every deploy?
<injekt>
no
<injekt>
the ruby buildpack is installed on first push, and detected on subsequent deploys
<injekt>
just like on heroku
Kabaka has joined #ruby-lang
ridders_24 has joined #ruby-lang
<injekt>
wanna install 2.0.0? just add it to your gemfile and push, boom
<judofyr>
that's a no-go for some of our Perl projects
<injekt>
yeah some of my larger rails projects would struggle too
<injekt>
with something small like this it's ok, but i mean.. this is a essentially a hello world app
<injekt>
which isn't the greatest example of real world
<yorickpeterse>
#inspect driven development
tbuehlmann has joined #ruby-lang
<yorickpeterse>
feels too much like PHP
<injekt>
judofyr: with all the interest though, I think things like this will get cleaned up pretty quickly, though this probably isn't an easy problem to solve, what with docker installing a new app on each deploy
<injekt>
so detecting build packs is fine? detecting gems that don't exist on this virtual platform? not so much
<injekt>
s/?//
<judofyr>
injekt: the problem here is that dokku doesn't use a cache
<injekt>
judofyr: that seems hard to manage with multiple apps, though
<injekt>
like, possibly hundreds
<injekt>
though that's in most cases a massive exhaggeration
<injekt>
exaggeration*
<judofyr>
injekt: Docker 0.5 makes it possible to bind a directory on the host inside the container
<injekt>
judofyr: using that for deps of all apps though? that's gonna get messy
<injekt>
I guess in the case of 90% of deploys, most things don't actually change (dependency wise)
<judofyr>
injekt: hm? /home/git/cache/foo is mounted as /cache on the container when you deploy an app named `foo`. then the buildpack just cp's stuff from the cache into the container
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
<charliesome>
sup yall
<injekt>
judofyr: yeah I guess, in theory it all sounds great. Maybe there's more to it, though (and why it's not done already)
<judofyr>
anyone knows how you can stream input using Curl::Easy?
ridders24 has joined #ruby-lang
<yorickpeterse>
You guys remember that view from yesterday? I'm still retractoring it
<yorickpeterse>
apparently it was more bugged than expected
DefV has quit [Quit: leaving]
julweber has joined #ruby-lang
DefV has joined #ruby-lang
swav_ has joined #ruby-lang
thang has quit [Read error: Operation timed out]
<injekt>
judofyr: if you do go down the path of creating something yourself, keep me updated, I'm hacking around with an app server for work and interesting on improving things where I can
dominikh1 is now known as dominikh
thang has joined #ruby-lang
ridders24 has quit [Ping timeout: 268 seconds]
ridders24 has joined #ruby-lang
swav has quit [Read error: Connection reset by peer]
canton7 has quit [Ping timeout: 276 seconds]
rshetty has joined #ruby-lang
benwoody has quit [Ping timeout: 276 seconds]
scottschecter has quit [Ping timeout: 276 seconds]
scottschecter has joined #ruby-lang
<injekt>
interested*
benwoody has joined #ruby-lang
Pupeno has joined #ruby-lang
Pupeno has joined #ruby-lang
Pupeno has quit [Changing host]
Nss has joined #ruby-lang
cd has joined #ruby-lang
cd is now known as Guest90066
Pupeno_ has joined #ruby-lang
Pupeno has quit [Read error: Connection reset by peer]
gja has quit [Quit: This computer has gone to sleep]
rwk1 has joined #ruby-lang
gja has joined #ruby-lang
gja has quit [Changing host]
gja has joined #ruby-lang
gja has quit [Client Quit]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<andrewvos>
God damnit I will never remember what to pluralise and what not to pluralise in rails.
rickhull has quit [Quit: Leaving.]
skmp has joined #ruby-lang
rolfb has quit [Quit: Leaving...]
<Nilium>
It's hard to sleep when there's a cat on my lap and I don't want to disturb it by moving.
<andrewvos>
Any significantly advanced routes.rb file is indistinguishable from parody.
ahf has quit [Read error: Connection reset by peer]
skmp1 has joined #ruby-lang
Guest90066 has quit [Ping timeout: 240 seconds]
skmp has quit [Ping timeout: 264 seconds]
ahf has joined #ruby-lang
ahf has joined #ruby-lang
ahf has quit [Changing host]
s0ber has joined #ruby-lang
Guest90066 has joined #ruby-lang
<injekt>
andrewvos: wat
<injekt>
just keep singular routes single
<injekt>
that's it
<andrewvos>
injekt: I don't understand
<injekt>
andrewvos: resources :users vs resource :user
<injekt>
both map to 'UsersController' but do different things
<injekt>
the latter for managing singular resources, where you dont have an index page for example
Domon has quit [Remote host closed the connection]
<injekt>
you might use this for a has_one
<GarethAdams>
andrewvos: was your pluralisation line linked to your routes line, or were they different problems?
<andrewvos>
injekt: That's a good explanation thanks
<andrewvos>
GarethAdams: Different problems
<andrewvos>
GarethAdams: Or maybe not actually
<andrewvos>
Can't remember that far back :)
<injekt>
a good example that is fairly descriptive wouldbe: resources :users do; resource :profile; end
atmosx has joined #ruby-lang
<yxhuvud>
andrewvos: I intend to generate my routes.rb soon, so I believe the parody will be moved to another file. (mainly because I'm fucking tired of repeating myself. describing the same hierarchy in different ways for routes, breadcrumbs, url generation for searching purposes, manual generation etc get very repetetive)
<injekt>
just add helpers? the routes file is just basic ruby, there's no need for it to look like shit even if it's easy to be unorganized using rails defaults
glebm has quit [Quit: Computer has gone to sleep.]
mytrile has quit [Remote host closed the connection]
rshetty has joined #ruby-lang
Sarcophabus has quit [Quit: Leaving...]
anonymuse has joined #ruby-lang
joshuawscott has joined #ruby-lang
rolfb has joined #ruby-lang
nwjsmith has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
mistym has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
gja has joined #ruby-lang
gja has joined #ruby-lang
gja has quit [Changing host]
solars has quit [Read error: Operation timed out]
Pupeno_ has quit [Ping timeout: 240 seconds]
henrikhodne has joined #ruby-lang
malev has joined #ruby-lang
kstuart has joined #ruby-lang
mistym has quit [Remote host closed the connection]
GeissT_ has quit [Ping timeout: 246 seconds]
mbj_ has joined #ruby-lang
mbj has quit [Ping timeout: 260 seconds]
threeday1onk is now known as threedaymonk
grosscoldesk has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 276 seconds]
jsullivandigs has joined #ruby-lang
<yorickpeterse>
so Rails question because fuck switching channels:
<yorickpeterse>
my route is called "contextvoices" ("contextvoice" gives a collision) but the actual resource being modified is a Connection model. This causes rails to try and post stuff to '/foo/bar/blabla/connections' instead of '.../contextvoices'
mistym has joined #ruby-lang
apeiros has joined #ruby-lang
<yorickpeterse>
Now I don't want to override the :url parameter manually because that means I'll end up with a ternary to check if we're dealing with a new record or not
jxie has joined #ruby-lang
rshetty has quit [Ping timeout: 246 seconds]
<yorickpeterse>
one option would be to create a Contextvoice model that extends the Connection model, but meh for noop classes (basically)
<yorickpeterse>
Is there a nicer way of doing this?
<gnufied>
isn't there a controller involved somewhere?
<injekt>
what's wrong with connections controller
<gnufied>
^
<yorickpeterse>
injekt: already used
<yorickpeterse>
for different things
<yxhuvud>
contextvoice_connection ?
<injekt>
so use resources :connections, controller: :contextvoices
<yorickpeterse>
(as in, regular controllers)
<gnufied>
you should namespace it then
<yorickpeterse>
injekt: then you'd end up with this:
<injekt>
yorickpeterse: oh they're both on the same scope?
<gnufied>
if you have different types of "connections"
<yorickpeterse>
injekt: Yeah, it's the same collection but just slightly different fields
<injekt>
well, you have to give something
imperator has quit [Quit: Leaving]
benlovell has quit [Ping timeout: 248 seconds]
<yorickpeterse>
also, there's already a connections resource in the same scope
<yorickpeterse>
so that would still conflict me thinks
<gnufied>
quit your job
<injekt>
^
<yorickpeterse>
k
<injekt>
yorickpeterse: is this form_for @connection or form_for [@foo, @bar, @connection]?
s0ny123 has joined #ruby-lang
<yorickpeterse>
form_for([@company, @connection]) to be specific
<injekt>
heh
rshetty has joined #ruby-lang
<yorickpeterse>
Lets see if I can much around with the routes a bit
<gnufied>
when I deal with resource with same names, I reach for namespacing them
<gnufied>
lot of rails projects put all controllers in same namespace
<injekt>
I stop being a dick and wiring up my controllers wrong
<yorickpeterse>
Hm no, the resource name *has* to be != connections
<yorickpeterse>
otherwise Rails doesn't get it
<yxhuvud>
in this case it may be that it really should be the same controller as it is the same model anyhow?
<yorickpeterse>
Different controller, same model, different fields
<yorickpeterse>
The collection (= connections) contains a bunch of shit, in this case I only want to let users edit a specific set of fields
<injekt>
^ see
<gnufied>
enough rails for today on #ruby-lang.
<gnufied>
next question!
<injekt>
do silly things, be faced with silly things
<yorickpeterse>
injekt: How is this silly? This is CRUD 101
<yorickpeterse>
it's the same as having a separate controller for "users" and "admins" while the underlying model is identical
<yxhuvud>
yorick: this is what you get for putting too much logic in your controller. Simple controllers should not care about what fields are set. push that logic to the model instead.
<yorickpeterse>
.....
<injekt>
yorickpeterse: model<->controller different controllers for the same model but with different fields? sounds like a major dick fest
<yorickpeterse>
HOW IS THIS RELATED TO THE CONTROLLER?
<yorickpeterse>
How....how do you bring up "herp derp complexity in the controller"? Like, the controller is piss poor code wise
<yorickpeterse>
either way
<yorickpeterse>
injekt: how so?
<injekt>
also I wouldn't have a separate controller for users vs admins
<injekt>
i'd have a single controller and a namespace
<injekt>
if they're both managing users
grosscoldesk has quit [Quit: Nettalk6 - www.ntalk.de]
glebm has joined #ruby-lang
<yorickpeterse>
how would you then distinguish the two in the controller?
<yorickpeterse>
inb4 if/else
<injekt>
well
<injekt>
fuck you
<mjc_>
I use cancan's load_and_authorize_resource for that
<injekt>
omg
<injekt>
please no-one ever use that
<yxhuvud>
:D
<apeiros>
#rubyonrails, please?
retro|cz has quit [Ping timeout: 258 seconds]
<yorickpeterse>
I like the part where I asked a pretty basic question and basically got one answer and a bunch of bikeshedding/red herring arguments
<gnufied>
apeiros: most questions on #rubyonrails will be this, link_to method isn't working
<yorickpeterse>
"OMG HAVE YOU TRIED HUNNY?"
<gnufied>
you forgot 5th key!
<yorickpeterse>
fuckit, ternary it is
<apeiros>
gnufied: I am in #rubyonrails, I know :-p
maxmanders has quit [Quit: Computer has gone to sleep.]
<gnufied>
:html =>!
<injekt>
yorickpeterse: but in all seriousness, I have this shit and I end up using a ternary with url option, it sucks but it works
benlovell has joined #ruby-lang
<yorickpeterse>
Yeah I know it does, but I was wondering if there was a better way
<yorickpeterse>
I mean, the end solution is to move Contextvoice crap out of the connections collection
<yorickpeterse>
since right now it's basically a "herp derp all the things" collection for a bunch of different things. 99% of the time it's just a URL you set but then there's Contextvoice (now Ubervu)
<injekt>
yorickpeterse: yeah, I'd usually mess with routes and use alternative resources/controllers but it sounds like a noop due to conflicts
<yorickpeterse>
and we also have some other non URL based stuff in there
<yxhuvud>
what are you connecting to? maybe you could put the url beneath that resource instead?
<yorickpeterse>
yxhuvud: Oracle DB running behind a Squid SSH proxy that's reverse backtraced through HTTP
<gnufied>
ha ha
<yorickpeterse>
(that answer makes as much sense as your arguments)
<yorickpeterse>
No offense
<yxhuvud>
..
<yorickpeterse>
The order isn't relevant, Rails sees two resources with the same name and just poops itself
<injekt>
lol oracle db
<yorickpeterse>
(in the same scope)
<yorickpeterse>
"OOOOH GOOOODDD THIS IS NOT THE RAILS WAY Hnnngggg *poop sound*""
julweber has quit [Remote host closed the connection]
<whitequark>
angsty
<whitequark>
oh right
<whitequark>
hey yorickpeterse so you're from netherlands right?
<yorickpeterse>
Yes
<whitequark>
same country as edsger dijkstra then
<yorickpeterse>
I don't smoke weed and I don't have clogs, just an FYI
<whitequark>
that explains... some things
<andrewvos>
LIES
<andrewvos>
CLOG WEARING LIAR
<yorickpeterse>
It explains everything. This country is full of crazy people, including me
<yorickpeterse>
andrewvos: I used to have plastic ones
<yorickpeterse>
pretty sweet to run around without having to put on shoes
<whitequark>
yorickpeterse: what i specifically meant is that dijkstra wrote over two thousand (not an exaggeration) rants like yours
s0ny123 has left #ruby-lang [#ruby-lang]
<whitequark>
though his are much more elaborate
<whitequark>
"arrogance in computing science is measured in nanodijkstras" :D
<mjc_>
whitequark: hahah
rolfb has quit [Quit: Leaving...]
<yorickpeterse>
whitequark: Dutch people are known to complain about a lot
<yorickpeterse>
at least that's how I see it
<yorickpeterse>
we're also terrible drivers but like to think we're the best
<whitequark>
yeah you'd like him
<whitequark>
read his rants
<yorickpeterse>
"WATCH OUT 5 NERDS ON A BIKE RING RING OUT OF THE WAY" - Amsterdam
<whitequark>
i think yours will be much more entertaining to read afterwards
<whitequark>
maybe even insightful
<whitequark>
*cough* poop sound *cough*
<whitequark>
it's way more fun to spend three paragraphs explaining that americans got wrong: 1) mathematics 2) computing 3) education, and do it in such tone that you will be offered to speak at more conferences instead of less
<yorickpeterse>
ha, he lived pretty close to where I used to live
<whitequark>
every sentence is brilliantly vicious
<yorickpeterse>
Fucking worst province of the country too
skade has quit [Quit: Computer has gone to sleep.]
<whitequark>
well, it's called "netherlands" after all
<yorickpeterse>
The province is "Noord brabant", basically a bunch of rednecks but without guns and the inbreeding
<yorickpeterse>
they do know how to party though
<yorickpeterse>
Carnival above the rivers (the ones in the center) is pathetic compared to it
maxmanders has joined #ruby-lang
<yorickpeterse>
Those few days the entire south grinds to a halt and everybody just gets super wasted while wering goofy costumes
<yorickpeterse>
* wearing
<yorickpeterse>
The north? Fuck all, they don't even know how to dance
<whitequark>
you just *had* to confirm your image lol
<yorickpeterse>
haha
<yorickpeterse>
Hey I lived in both parts
mbj_ is now known as mbj
zzak has quit [Quit: leaving]
<whitequark>
neither dancing nor partying?
zzak has joined #ruby-lang
zzak_ has joined #ruby-lang
<yorickpeterse>
No, having lived in both the south and north
henrikhodne has quit [Ping timeout: 252 seconds]
<yorickpeterse>
oh and the west
<yorickpeterse>
(mind you our country is tiny so that doesn't mean a whole lot)
shinnya has joined #ruby-lang
<yorickpeterse>
at most it takes 2 hours to go from one end to the other
dhruvasagar has joined #ruby-lang
<whitequark>
so it's smaller than moscow, because here you may need eight hours to do the same? :D
mbull9 has joined #ruby-lang
<whitequark>
actually it's just 20 times bigger by area and has less people living in
<yorickpeterse>
most of the people here are crammed together in the western part
<yorickpeterse>
if you go to the east it's basically sheep and some farmers
<yorickpeterse>
slightly up north it's sheep and old people
<yorickpeterse>
south its rednecks
<yorickpeterse>
Though I do like the place I currently live in. It's not too big (for Dutch standards, otherwise it's tiny) but there are still plenty of shops
<yorickpeterse>
Close to Amsterdam but far away enough for the air to not be super polluted
<yorickpeterse>
tl;dr: locks put on bridge to symbolize love, grumpy dude removes them because fuck you
<injekt>
anything that's allowed as a method name probably
<yorickpeterse>
his motivation: "People mess with public property without permission"
<yorickpeterse>
WELL GEE, I WONDER WHAT YOU'RE DOING
* yorickpeterse
shakes his cane and yells at the people outside
<mjc_>
EWD comparison gets more and more apt
MarianM has joined #ruby-lang
dagobah has quit [Remote host closed the connection]
<yorickpeterse>
home tiem, bbl
GaelanAintAround is now known as Gaelan
MarianM has left #ruby-lang [#ruby-lang]
rickruby has joined #ruby-lang
vlad_starkov has joined #ruby-lang
benanne has joined #ruby-lang
tomkadwill has quit [Remote host closed the connection]
Pupeno has joined #ruby-lang
Pupeno has quit [Changing host]
Pupeno has joined #ruby-lang
realDAB has joined #ruby-lang
headius has joined #ruby-lang
rolfb has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 248 seconds]
Pupeno has quit [Read error: Operation timed out]
io_syl has joined #ruby-lang
iliketurtles has quit [Quit: zzzzz…..]
bzalasky has joined #ruby-lang
rolfb has quit [Ping timeout: 240 seconds]
benanne has quit [Quit: kbai]
realDAB has quit [Quit: realDAB]
charliesome has joined #ruby-lang
hahuang65 has quit [Quit: Computer has gone to sleep.]
rickruby has quit [Remote host closed the connection]
bwarsing has joined #ruby-lang
bwarsing has left #ruby-lang [#ruby-lang]
mbj has quit [Remote host closed the connection]
bzalasky has quit [Remote host closed the connection]
nwjsmith has quit [Remote host closed the connection]
nwjsmith has joined #ruby-lang
mbj has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
ecnalyr has joined #ruby-lang
cored has quit [Ping timeout: 248 seconds]
<ecnalyr>
I have the following method: http://pastebin.com/y8j0rGzv and it looks very complex at first glance. Does anyone have any tips on a clean way of refactoring this code?
Voker57 has quit []
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
<injekt>
ecnalyr: not really, you can shorten it slightly..
<ndrst>
yorickpeterse: so in every dutchie there is a self proclaimed robin hood? lekker!
<ecnalyr>
injekt You're probably right, maybe it's more 'readable' than I'm thinking. (I have less than a year of ruby under my belt, trying to get the hang of things still)
jxpx777 has joined #ruby-lang
<injekt>
ecnalyr: it's readable enough, you could separated it into different methods if it helps, though
gregmoreno has joined #ruby-lang
natevick has quit [Quit: natevick]
<yorickpeterse>
ecnalyr: break it up in to two methods
<Nilium>
You might need a bit more context to that.
<Scader>
logic, sry
Mon_Ouie has quit [Quit: WeeChat 0.4.1]
<Scader>
no, I mean only this if logic with { |m| ..}
<Scader>
and ...end after this
marr has quit [Read error: Connection reset by peer]
<Nilium>
So what about it would be broken? Looks like it'll just return matchdata or nil if no match is found.
<Nilium>
That is, the result of the block is matchdata or nil
marr has joined #ruby-lang
<Nilium>
Actually, scratch that, the result of the block is apparently an integer. Forgot how =~ worked.
<Scader>
so, I pass the output of .match() to the m and do regexp compare
<Scader>
the outcome of this goes into if evaluation and will be checked for true/false, right or not?
<Nilium>
If the regexp matches, the matchdata is yielded to the block, which then checks the matchdata for something or other
<Nilium>
Might need a .to_s on that m.. maybe?
<Scader>
yielded. hm...
<Scader>
but the result of this block is verified by if, right?
<Nilium>
It's tested since it's the conditional part of an if statement, yes.
<Nilium>
Verified is probably a bad term to use.
<Scader>
thx:)
<Nilium>
As is, from the looks of it, that particular expression is always nil
<Scader>
is it possible somehow what this if ... {} ... end construction works in some envs without problems, but doesn't work on other environment?
<Nilium>
Object by default returns nil on =~ and MatchData doesn't implement it, so it's pretty much 1) it doesn't match and it's nil or 2) it does match and it's also nil
<Nilium>
I suppose it's possible if their parsers aren't up to snuff?
<Nilium>
Unless there's a known case for it failing, I wouldn't bother worrying about it.
anonymuse has quit [Remote host closed the connection]
<Scader>
it fails...my quick solution without to dive deep into ruby was to change the whole expression to simple regexp, the upstream don't want to accept the patch without explanation what fails here in detail
<Nilium>
The real issue I see is just that the conditional there is always nil, unless I'm missing something
anonymuse has joined #ruby-lang
cmaxw_ has quit [Quit: cmaxw_]
stamina has quit [Ping timeout: 248 seconds]
<Nilium>
Do you have an issue created for it?
<Scader>
nope, only pull request
henrikhodne has quit [Ping timeout: 246 seconds]
<Nilium>
Also, what's the ideal return value for blkid(path)?
maxmanders has joined #ruby-lang
<Nilium>
Assuming the call succeeds and everything's otherwise fine
<Scader>
string like /dev/vg/root: LABEL="/" UUID="6a1e5f4f-37c9-4809-969a-89cf6725cbbd" TYPE="ext4"
malev has joined #ruby-lang
mistym has quit [Remote host closed the connection]
<Nilium>
Basically, even with good data, it will never work.
<Nilium>
Someone misunderstood how =~ and MatchData worked.
<Scader>
yep, exactly
<Nilium>
The fix is simple though, and illustrated at the bottom of the script.
<Scader>
thx for you help!
<Nilium>
Basically, they've forgotten to pull the stupid capture out of the matchdata.
<Scader>
I will refer you gist in the pull request/bug
<Nilium>
Hang on, I'm tweaking it.
<Nilium>
There we go, a more realistic case for failure.. assuming anyone uses reiserfs
nwjsmith has left #ruby-lang [#ruby-lang]
<Nilium>
Which I used to because it was actually pretty nice back then, but that's neither here nor there
Nss has quit [Ping timeout: 245 seconds]
<Scader>
no reseizefs then...there are some other pull requests in the pipe to extend it to xfs I remember
<Nilium>
Not really important whether it exists or not, the point is just that it's not ext3/ext4, which is what the expression is looking for
<Scader>
yes
retro|cz has joined #ruby-lang
<Nilium>
Though admittedly their regular expression for checking for ext3/4 would also succeed if there were a hypothetical type named next3 or next4 or text32
jus is now known as zz_jus
<Nilium>
Whoever wrote that code probably wasn't thinking very straight at the time.
gregmore_ has joined #ruby-lang
<Scader>
you are right, I tried to stick it to the whole TYPE="" expression because of this
<Nilium>
Yeah. Either way, your proposed solution would work.
mistym has joined #ruby-lang
<Nilium>
Though you might want to throw a \b at the beginning of the TYPE= regexp.
nathanstitt has quit [Quit: I growing sleepy]
<Nilium>
Just on the off chance that you somehow end up with OTYPE="ext3" and TYPE="ext3" in the same blkid string, which is probably unrealistic but better safe than sorry
<Scader>
hm, yes, will do it
<Nilium>
I think years of coding in C and C++ have made me extremely paranoid..
<Scader>
:)
maxmanders has joined #ruby-lang
nathanstitt has joined #ruby-lang
anonymuse has joined #ruby-lang
iliketurtles has joined #ruby-lang
zz_jus is now known as jus
pabs_ is now known as pabs
<Scader>
Nilium, one intersting thing with your gist
<erikh>
the system packages from puppet labs that is
<Nilium>
That said, either of the gists still shows that the current conditional fails, so that should be good enough, anyway
hakunin has quit [Remote host closed the connection]
<Nilium>
And your modified regexp should succeed regardless of version.
<Nilium>
That is, it will produce the expected results rather than what's currently happening
stamina has joined #ruby-lang
hakunin has joined #ruby-lang
pr0ton has joined #ruby-lang
Nss has joined #ruby-lang
realDAB has joined #ruby-lang
henrikhodne has joined #ruby-lang
jus is now known as zz_jus
realDAB has quit [Client Quit]
vlad_starkov has joined #ruby-lang
TvL2386 has joined #ruby-lang
grosscol has quit [Remote host closed the connection]
grosscol has joined #ruby-lang
Oloryn_lt2 has joined #ruby-lang
grosscol has quit [Remote host closed the connection]
gcol has joined #ruby-lang
jonahR has joined #ruby-lang
rolfb has quit [Quit: Leaving...]
flip_digits has joined #ruby-lang
<TvL2386>
hi guys, I'm looking into documentation (yard). Now I have a method that will return an instance of ModA::ModB::Message::Plain::V1, or ModA::ModB::Message::Secure::V1, etc.... The Message class is dynamically found. What's the best way to document this in the @return tag?
saarinen has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
headius has joined #ruby-lang
mreq has quit [Ping timeout: 268 seconds]
forrest has joined #ruby-lang
realDAB has joined #ruby-lang
<drbrain>
TvL2386: I find it problematic that your design is so complicated you're struggling to document it in an understandable way
<drbrain>
TvL2386: can't you say something like "returns a ModA::ModB::Message [thingy]"
pr0ton has quit [Quit: pr0ton]
<drbrain>
you're returning something from a set of classes, so there is probably a simpler way to describe it that doesn't require knowledge of large parts of your library
havenwood has quit [Remote host closed the connection]
<TvL2386>
drbrain, what you say makes a lot of sense actually
jonahR has quit [Quit: jonahR]
<drbrain>
documentation is a tricky thing
<TvL2386>
drbrain, I'm creating a message protocol and want it to be future proof, by trying to make it dynamic and automatically loading the correct Message wrapper class
<drbrain>
it's hard to find the balance between necessary, useful and overwhelming :/
<TvL2386>
true :)
<drbrain>
if the user doesn't need to care about which Message wrapper class they get back, I would say so
<drbrain>
if they need to care a little bit, I would say that
<grosscoldesk>
TvL, are both message classes going to be used in the same way?
<drbrain>
and point to a place where they can learn the differences
loincloth has quit [Remote host closed the connection]
<drbrain>
(a terribly fuzzy suggestion)
zz_jus is now known as jus
gcol has quit [Remote host closed the connection]
gcol has joined #ruby-lang
<TvL2386>
grosscoldesk, that's the idea
jonahR has joined #ruby-lang
<grosscoldesk>
TvL2386, so the specific return type is not functionally important as the interface is going to be the same, but you'd like to document that it could be one of many classes?
<TvL2386>
grosscoldesk, I'd rather not, but I'd like to follow the standards... Don't know what would apply here
Kabaka has quit [Ping timeout: 240 seconds]
hhatch has quit [Ping timeout: 268 seconds]
charliesome has joined #ruby-lang
realDAB has quit [Quit: realDAB]
<grosscoldesk>
If all the returned classes inherit from message, I would document that a Message class is returned. The children are stand ins for the parent class. Might just add a note that the appropriate Message class is returned or something of that nature.
Gaelan is now known as GaelanAintAround
<grosscoldesk>
How are you determining which class to actually return?
GaelanAintAround is now known as Gaelan
<TvL2386>
grosscoldesk, a json piece (Hash) is thrown into Message.parse which will read the 'type' key. That will determine what class to instantiate
havenwood has joined #ruby-lang
Nisstyre has joined #ruby-lang
<TvL2386>
grosscoldesk, In my example 'type' would be 'secure_v1' or 'plain_v1'
jus has quit [Read error: Connection refused]
jus has joined #ruby-lang
workmad3 has joined #ruby-lang
<Nilium>
Scader: Actually, your issue is slightly incorrect. The current implementation doesn't even work on Ruby 1.8
<Nilium>
Also totally not sure why I'm being emailed about the issue
saarinen has quit [Quit: saarinen]
<grosscoldesk>
TvL2386, since subsequent uses will be using Message methods, I think it makes sense to document that as the return type. Not sure where you would add the the specific type is determined at runtime.
<Scader>
:) I just referenced you in the pull req because of gist;)