apeiros changed the topic of #ruby-lang to: Ruby 2.1.0-p0; 2.0.0-p353; 1.9.3-p484: http://ruby-lang.org|| Paste >3 lines of text on http://gist.github.com || RubyConf 2013 at http://www.justin.tv/confreaks
bergin has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
lsegal has quit [Read error: Connection reset by peer]
robbyoconnor has quit [Quit: Konversation terminated!]
lsegal has joined #ruby-lang
r0bby_ has joined #ruby-lang
linc01n has quit [Ping timeout: 248 seconds]
linc01n has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
sepp2k has quit [Read error: Connection reset by peer]
benanne has quit [Quit: kbai]
waxjar has quit [Ping timeout: 272 seconds]
MrZYX is now known as MrZYX|off
kfpratt has joined #ruby-lang
waxjar has joined #ruby-lang
yfeldblum has quit [Read error: Connection reset by peer]
linc01n has quit [Ping timeout: 253 seconds]
linc01n has joined #ruby-lang
kurko__ has quit [Ping timeout: 272 seconds]
bin8me has joined #ruby-lang
waxjar has quit [Ping timeout: 245 seconds]
judofyr has joined #ruby-lang
postmodern has joined #ruby-lang
phracker has joined #ruby-lang
phracker has quit [Max SendQ exceeded]
bin7me has quit [Ping timeout: 272 seconds]
phracker has joined #ruby-lang
linc01n has quit [Read error: Operation timed out]
kurko_ has joined #ruby-lang
judofyr has quit [Ping timeout: 265 seconds]
waxjar has joined #ruby-lang
fragamus has joined #ruby-lang
linc01n has joined #ruby-lang
lfox has quit [Quit: ZZZzzz…]
atmosx has quit [Quit: computer went to sleep...]
simi has quit [Ping timeout: 264 seconds]
tylersmith has joined #ruby-lang
phracker has quit [Quit: Textual IRC Client: www.textualapp.com]
yfeldblum has joined #ruby-lang
tylersmith has quit [Ping timeout: 252 seconds]
mbj has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 252 seconds]
shinnya has joined #ruby-lang
vlad_starkov has joined #ruby-lang
bin8me has quit [Quit: Leaving]
bin7me has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
robmiller has quit [Quit: robmiller]
clamstar has quit [Quit: Computer has gone to sleep.]
clamstar has joined #ruby-lang
Asher has quit [Read error: Connection reset by peer]
VTLob has quit [Quit: VTLob]
judofyr has joined #ruby-lang
judofyr has quit [Ping timeout: 272 seconds]
bin7me has quit [Quit: Leaving]
jsrn has quit [Quit: Leaving]
knu has joined #ruby-lang
apeiros has joined #ruby-lang
Barrin6 has quit [Quit: Leaving]
styped has joined #ruby-lang
styped has quit [Max SendQ exceeded]
nathanstitt has quit [Quit: I growing sleepy]
mbj has joined #ruby-lang
KM has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
clamstar has quit [Quit: Computer has gone to sleep.]
mykoweb has joined #ruby-lang
clamstar has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
RoxasShadowRS has quit [Quit: Leaving]
saarinen has joined #ruby-lang
fuhgeddaboudit has joined #ruby-lang
saarinen has quit [Ping timeout: 264 seconds]
kfpratt has quit [Remote host closed the connection]
kfpratt has joined #ruby-lang
kurko_ has quit [Quit: Computer has gone to sleep.]
judofyr has joined #ruby-lang
fuhgeddaboudit has quit [Ping timeout: 272 seconds]
kfpratt has quit [Ping timeout: 252 seconds]
<chris2> anyone have this for ruby? https://medium.com/p/40e9b2b36148
kfpratt has joined #ruby-lang
iliketurtles has joined #ruby-lang
judofyr has quit [Ping timeout: 265 seconds]
iliketurtles has quit [Excess Flood]
Asher has joined #ruby-lang
r0bby_ is now known as robbyoconnor
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
iliketurtles has joined #ruby-lang
iliketurtles has quit [Excess Flood]
ikrima has joined #ruby-lang
yfeldblum has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
centrx has joined #ruby-lang
yfeldblum has quit [Ping timeout: 245 seconds]
mykoweb has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
elliotec has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
judofyr has joined #ruby-lang
dmwuw has quit []
elliotec has quit [Remote host closed the connection]
|jemc| has joined #ruby-lang
judofyr has quit [Ping timeout: 252 seconds]
simoz15 has joined #ruby-lang
elliotec has joined #ruby-lang
havenwood has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
elliotec_ has joined #ruby-lang
<ryanf> chris2: https://github.com/grosser/parallel I think?
<chris2> does that allow pool reuse?
<ryanf> I dunno
seanlinsley has quit [Quit: …]
<ryanf> nah, doesn't look like it has a pool object particularly
<chris2> doesnt look like it
<chris2> gonna try it myself
<ryanf> cool
<ryanf> haha wow
<ryanf> that looks like it was fun to figure out
seanlinsley has joined #ruby-lang
DEac- has quit [Ping timeout: 245 seconds]
mistym has joined #ruby-lang
Cakey has joined #ruby-lang
diss has joined #ruby-lang
<diss> Hello, just wondering if anyone could help me with this: http://stackoverflow.com/questions/21359331/lost-with-rails-has-many-through-multiple-search
mehlah has quit [Quit: Leaving...]
kfpratt has quit [Ping timeout: 252 seconds]
kfpratt has joined #ruby-lang
mistym has quit [Ping timeout: 252 seconds]
<centrx> diss, hmm
<diss> i'm sure i set my app up completely the wrong way to begin with haha.
<diss> or i'm doing something poorly
<badeball> diss: I believe it's not creating the query you think it will. calls to #where is concatenated with 'AND', making your query basically 'column = value AND column = different-value'
<diss> yes, I have realized that
Cakey has quit [Ping timeout: 272 seconds]
<diss> i think a find_by_sql with intersect would do it, but alas, mysql does not have intersect, and I haven't been able to get any of the "workarounds" to work
<ryanf> diss: you don't actually need to change very much I think. just make your query method take an array and then do where('tags.name IN (?)', tag_names)
stonerfish has joined #ruby-lang
<ryanf> and only call it once
<badeball> ryanf: I think he want the intersection of images tagged with A and images tagged with B
<ryanf> oh, whoops, thought he wanted union
<chris2> apeiros: wanna have a look at http://sprunge.us/PMYJ ? :)
<centrx> diss, The most performant way is probably to join to the ImageTags table twice, where one of the joins has one of the wheres, and the other join has the other
<diss> Thanks for taking a look ryanf, but yeah badeball is correct
<ryanf> one way would be to generate a separate left join for each tag and then make sure all of them are present
<ryanf> hopefully there's a less dumb way though
<diss> centrx: so it would have to be a find_by_sql then?
<centrx> Or actually it is has_many :through that's interesting
<ryanf> oh
clamstar has quit [Quit: Computer has gone to sleep.]
<ryanf> I guess I said the same thing as centrx. missed that
<ryanf> yes, it would need to be find_by_sql
<ryanf> actually, maybe not
yfeldblum has joined #ruby-lang
<centrx> Can't you do:
<centrx> Tag.where(name => [:funny, :political]).images
simoz15 has quit [Ping timeout: 264 seconds]
<ryanf> no, that generates an IN
<centrx> This would work, but probably not the fastest way: Tag.where(name => [:funny, :political]).map(&:images).uniq
<ryanf> no
<ryanf> that's still union
<centrx> So what?
<ryanf> he wants intersection
<ryanf> that would be like Tag.where(name: 'funny').map(&:images) & Tag.where(name: 'political').map(&:images)
<centrx> oh I see
<badeball> Tag.where(name => [:funny, :political]).map(&:images).reduce(:&)
<badeball> though intersecting in an application level might not be so effective, performance wise
<ryanf> nope, that's image1 & image2 & image3 & ...
yfeldblum has quit [Ping timeout: 252 seconds]
<badeball> doesn't seem like it, but I have just woken up and might just be seeing things that aren't there
<diss> I'm trying all of these. But regardless if they work or not I keep getting another error when I try them in console lol.
vlad_starkov has joined #ruby-lang
<badeball> diss: did you try my snippet?
<diss> yeah, using that exact line gave me: NameError: undefined local variable or method `name' for main:Object
elliotec_ has quit [Remote host closed the connection]
<ryanf> he meant :name
<ryanf> but it won't work
elliotec has joined #ruby-lang
<ryanf> that's trying to reduce individual images against each other with &
<diss> hmm
<diss> it seemed to work.
<badeball> ryanf: are you sure? it seems like the code states 'for each tag, map it with its images, creating an array of arrays of images, which are then reduced to their intersection'
nathanstitt has joined #ruby-lang
judofyr has joined #ruby-lang
<ryanf> oh shit, you're right. my brain isn't working correctly
<diss> yes, it is passing all of my use cases
vlad_starkov has quit [Ping timeout: 248 seconds]
<diss> thank you so much badeball :D
<badeball> be aware of scaling issues though, if you're using it to query with lots of tags
<ryanf> yeah
<ryanf> you could generate a query that is more efficient when each tag has a lot of images
<diss> noted and commented. i imagine we will move to something that supports intersect before it becomes an issue though
<ryanf> but it won't be pretty
<diss> well
<diss> would there have been a better way to make the models?
<ryanf> no, I don't think so
<diss> roger
<ryanf> I mean, you could have just denormalized the tag name so that there's just one tags table, but that isn't really "better"
judofyr has quit [Ping timeout: 252 seconds]
<diss> yeah lol
yatish27 has joined #ruby-lang
<badeball> I wonder if you can avoid creating more model instances than necessary by doing something like Image.find(Tag.where(name => [:funny, :political]).map { |tag| tag.images.pluck(&:id) }.reduce(:&))
fragamus has quit [Quit: Computer has gone to sleep.]
seanlinsley has quit [Quit: …]
<centrx> scope :has_tag, -> { |tag| joins(image_tags: tags).where('tags.name' => tag) }
stonerfish has quit [Quit: Leaving.]
<ryanf> centrx: I think the tags.name string is going to mess you up when there's more than one
<ryanf> but where(tags: { name: tag }) might work if it's smart enough to generate new table aliases
<ryanf> actually nah, I don't think it can tell that repeated joins calls with the same associations are meant to be different from each other
elliotec has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
bergin has quit [Remote host closed the connection]
elliotec has quit [Ping timeout: 252 seconds]
centrx has quit [Excess Flood]
musty_ has joined #ruby-lang
miqui has quit [Excess Flood]
fallenhi1okiri has joined #ruby-lang
miqui has joined #ruby-lang
fallenhitokiri has quit [Write error: Broken pipe]
rahul_j has joined #ruby-lang
musty has quit [Remote host closed the connection]
Rylee has quit [Excess Flood]
Rylee has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
rahul_j has joined #ruby-lang
kfpratt has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
speakingcode has joined #ruby-lang
judofyr has joined #ruby-lang
yfeldblum has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby-lang
mykoweb has quit [Ping timeout: 272 seconds]
judofyr has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Ping timeout: 265 seconds]
h0lyalg0rithm has joined #ruby-lang
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
h0lyalg0rithm has quit [Client Quit]
wallerdev has quit [Quit: wallerdev]
canaimero15d has joined #ruby-lang
seanlinsley has joined #ruby-lang
canaimero15d has quit [Ping timeout: 252 seconds]
ikrima has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby-lang
Cakey has joined #ruby-lang
elliotec has joined #ruby-lang
saarinen has joined #ruby-lang
saarinen has quit [Client Quit]
elliotec has quit [Remote host closed the connection]
Cakey has quit [Ping timeout: 260 seconds]
marr has joined #ruby-lang
diegoviola has joined #ruby-lang
marr has quit [Client Quit]
saarinen has joined #ruby-lang
mistym has joined #ruby-lang
imperator has joined #ruby-lang
mistym has quit [Ping timeout: 240 seconds]
setmeaway has quit [Ping timeout: 252 seconds]
mistym has joined #ruby-lang
elliotec has joined #ruby-lang
saarinen has quit [Quit: saarinen]
judofyr has joined #ruby-lang
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
yfeldblum has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
judofyr has quit [Read error: No route to host]
judofyr has joined #ruby-lang
yfeldblum has quit [Ping timeout: 240 seconds]
imperator has quit [Quit: Leaving]
judofyr has quit [Ping timeout: 245 seconds]
arBmind has joined #ruby-lang
hahuang65 has joined #ruby-lang
hahuang65 has quit [Ping timeout: 245 seconds]
elliotec has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
jacky is now known as ThisNickIsHowFre
ThisNickIsHowFre is now known as Jacky
saarinen has joined #ruby-lang
Cakey has joined #ruby-lang
yfeldblum has joined #ruby-lang
charliesome has joined #ruby-lang
|jemc| has quit [Ping timeout: 252 seconds]
Cakey has quit [Ping timeout: 248 seconds]
rahul_j has quit [Quit: rahul_j]
ikrima has joined #ruby-lang
mbj_ has joined #ruby-lang
mbj has quit [Ping timeout: 248 seconds]
judofyr has joined #ruby-lang
judofyr has quit [Ping timeout: 265 seconds]
saarinen has quit [Quit: saarinen]
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
rippa has joined #ruby-lang
Cakey has joined #ruby-lang
yatish27_ has joined #ruby-lang
enkristoffer has joined #ruby-lang
Cakey has quit [Ping timeout: 248 seconds]
bzalasky has joined #ruby-lang
yatish27 has quit [Ping timeout: 260 seconds]
Asher has quit [Ping timeout: 252 seconds]
Cakey has joined #ruby-lang
judofyr has joined #ruby-lang
judofyr has quit [Ping timeout: 252 seconds]
bzalasky has quit [Read error: Connection reset by peer]
bzalasky has joined #ruby-lang
Cakey has quit [Ping timeout: 265 seconds]
phansch has joined #ruby-lang
GarethAdams has quit [Ping timeout: 252 seconds]
Asher has joined #ruby-lang
vlad_starkov has joined #ruby-lang
ledestin has quit [Quit: ledestin]
vlad_starkov has quit [Remote host closed the connection]
ryez has joined #ruby-lang
vlad_starkov has joined #ruby-lang
GarethAdams has joined #ruby-lang
stonerfish has joined #ruby-lang
styped has joined #ruby-lang
styped has quit [Max SendQ exceeded]
styped has joined #ruby-lang
tbuehlmann has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 265 seconds]
elliotec has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
xxaM has joined #ruby-lang
vlad_starkov has joined #ruby-lang
ledestin has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
styped has left #ruby-lang [#ruby-lang]
Voker57 has quit [Ping timeout: 248 seconds]
judofyr has joined #ruby-lang
elliotec_ has joined #ruby-lang
judofyr has quit [Read error: Operation timed out]
matp has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
elliotec has quit [Read error: Operation timed out]
judofyr has joined #ruby-lang
simi has joined #ruby-lang
fragamus has joined #ruby-lang
elliotec_ has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Ping timeout: 245 seconds]
Cakey has joined #ruby-lang
yatish27_ has quit [Remote host closed the connection]
matp has joined #ruby-lang
Cakey has quit [Ping timeout: 240 seconds]
stonerfish has quit [Quit: Leaving.]
skade has joined #ruby-lang
xxaM has quit [Remote host closed the connection]
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblu_ has joined #ruby-lang
elliotec has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
yfeldblu_ has quit [Ping timeout: 240 seconds]
toretore has joined #ruby-lang
yatish27 has joined #ruby-lang
yatish27 has quit [Client Quit]
Cakey has joined #ruby-lang
diegoviola has quit [Quit: WeeChat 0.4.2]
elliotec has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby-lang
faces has joined #ruby-lang
enkristoffer has quit [Ping timeout: 265 seconds]
face has quit [Ping timeout: 272 seconds]
Lewix has quit [Remote host closed the connection]
simi has quit [Ping timeout: 264 seconds]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
simi has joined #ruby-lang
mistym has quit [Remote host closed the connection]
_tockitj has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Ping timeout: 245 seconds]
Voker57 has joined #ruby-lang
atmosx has joined #ruby-lang
hfp`away has quit [Ping timeout: 272 seconds]
face has joined #ruby-lang
hfp`away has joined #ruby-lang
faces has quit [Ping timeout: 252 seconds]
fragamus has quit [Quit: Computer has gone to sleep.]
jerrytgarcia has joined #ruby-lang
Cakey has quit [Ping timeout: 252 seconds]
MrZYX|off is now known as MrZYX
sepp2k has joined #ruby-lang
benanne has joined #ruby-lang
<ddfreyne> Why would this cause a syntax error on Travis, but not locally?
<ddfreyne> @wrapper = wrapper || -> (i) { i }
<ddfreyne> “unexpected tLPAREN_ARG, expecting keyword_do_LAMBDA or tLAMBEG” pointing to the i inside (i)
<Nilium> What version of Ruby does Travis use?
<ddfreyne> ruby 1.9.3p484
<ddfreyne> I am confused.
<Nilium> What happens if you wrap the lambda in parens?
* Nilium scratches his head
<Nilium> I am going with the "I have no idea" option.
RoxasShadowRS has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<havenwood> ddfreyne: `->() {}` is valid in 1.9 but `-> () {}` isn't < 2.0
<ddfreyne> havenwood: Ahh!
VTLob has joined #ruby-lang
<ddfreyne> I forgot I was running 2.0.
symm- has quit [Ping timeout: 252 seconds]
dik_dak has quit [Quit: Leaving]
rue has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
relix has joined #ruby-lang
relix has quit [Client Quit]
elliotec has quit [Ping timeout: 245 seconds]
camilleldn has quit [Remote host closed the connection]
DouweM has joined #ruby-lang
camilleldn has joined #ruby-lang
robmiller has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
setmeaway has joined #ruby-lang
symm- has joined #ruby-lang
bin7me has joined #ruby-lang
DEac- has joined #ruby-lang
sepp2k1 has joined #ruby-lang
setmeaway has quit [Ping timeout: 252 seconds]
sepp2k has quit [Ping timeout: 260 seconds]
prc has quit [Ping timeout: 248 seconds]
enkristoffer has joined #ruby-lang
_tockitj has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby-lang
mehlah has joined #ruby-lang
Cakey has joined #ruby-lang
mistym has joined #ruby-lang
yfeldblum has quit [Ping timeout: 245 seconds]
hahuang65 has joined #ruby-lang
mistym has quit [Ping timeout: 272 seconds]
hahuang65 has quit [Ping timeout: 264 seconds]
robmiller has quit [Quit: robmiller]
heftig has quit [Ping timeout: 245 seconds]
Fyyr13 has joined #ruby-lang
vlad_sta_ has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby-lang
vlad_sta_ has quit [Read error: Connection reset by peer]
vlad_st__ has joined #ruby-lang
vlad_st__ has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 245 seconds]
rue has joined #ruby-lang
Fyyr13 has quit [Remote host closed the connection]
Fyyr13 has joined #ruby-lang
rue has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
workmad3 has quit [Ping timeout: 272 seconds]
shinnya has quit [Read error: Operation timed out]
centrx has joined #ruby-lang
prc has joined #ruby-lang
prc has quit [Remote host closed the connection]
heftig has joined #ruby-lang
postmodern has quit [Quit: Leaving]
sree has joined #ruby-lang
johnmilton has joined #ruby-lang
sree has quit [Client Quit]
werebutt has joined #ruby-lang
werebutt has left #ruby-lang [#ruby-lang]
Cakey has quit [Ping timeout: 245 seconds]
CJD14 has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
cid404 has joined #ruby-lang
yfeldblum has joined #ruby-lang
elia has joined #ruby-lang
yfeldblum has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
guardianx_ has joined #ruby-lang
danijoo has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
<ljarvis> moin
guardianx_ has quit [Ping timeout: 252 seconds]
guardianx has joined #ruby-lang
<r0bglees0n> happy 3PM morning to you too
mbj_ has quit [Ping timeout: 272 seconds]
Oloryn_lt2 has quit [Read error: Connection reset by peer]
<ljarvis> r0bglees0n: :)
<ljarvis> it's always morning on irc
<r0bglees0n> true, left or right of us it's morning somewhere :))
judofyr has quit [Read error: Connection reset by peer]
simi has quit [Ping timeout: 245 seconds]
judofyr has joined #ruby-lang
patriciomacadden has joined #ruby-lang
mistym has joined #ruby-lang
dorei has joined #ruby-lang
rippa has joined #ruby-lang
mistym has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Ping timeout: 264 seconds]
judofyr_ has joined #ruby-lang
judofyr has quit [Read error: Connection reset by peer]
rue has joined #ruby-lang
mbj has joined #ruby-lang
mykoweb has joined #ruby-lang
mbj has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby-lang
IC84 has joined #ruby-lang
rue_ has quit [Read error: Connection reset by peer]
rue|w has quit [Disconnected by services]
rue_ has joined #ruby-lang
rue|w has joined #ruby-lang
anulman has quit [Quit: Leaving.]
anulman has joined #ruby-lang
rue_ has quit [Client Quit]
rue|w has quit [Disconnected by services]
rue_ has joined #ruby-lang
rue|w has joined #ruby-lang
<chris2> http://sprunge.us/eKQC how can i have these semantics in a class that only implements #map?
robmiller has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
robmiller has quit [Client Quit]
mbj has joined #ruby-lang
danijoo has joined #ruby-lang
<canton7> implement #each, include Enumerable
yfeldblum has joined #ruby-lang
<chris2> but i must implement #map, because it has special semantics
<canton7> implement #map and #each, then?
<chris2> but when each.map will use the enumerator map, no?
<canton7> yup
<canton7> you didn't say you wanted #each_with_index.map to have special semantics
<centrx> Pretty vague question
<chris2> i know :)
<chris2> well, my #map works in parallel
<canton7> you'll have to implement #each_with_index, then, and get it to return a custom enumerable
<chris2> of course i can write a trivial #each that throws away the result
<chris2> but mapping should use my #map
<apeiros> chris2: subclass Enumerator, patch its map
<apeiros> yield that custom enumerator on each without block
rogerchou has joined #ruby-lang
<apeiros> s/yield/return/
judofyr_ has quit [Read error: Connection reset by peer]
<chris2> hmm
<apeiros> not sure I'd want that as a user of your class, though
<chris2> :)
<apeiros> if I want your customized map, I'd use YourClass#map
judofyr has joined #ruby-lang
<canton7> I wouldn't change the semantics of well-established methods
<rue_> As a user of your class I want to
<chris2> i'm not sure implementing enumerator at all is useful for my case
<apeiros> I'd expect unaltered map from .each.map
<canton7> I'd want a #parallel_map or #pmap or something
<chris2> well, the idea was to provide (1..5).with_pool(5).map { ... }
rogerchou has left #ruby-lang [#ruby-lang]
<chris2> or .map.with_pool
yfeldblum has quit [Ping timeout: 245 seconds]
<centrx> You mean map_with_pool
<canton7> this is jruby?
<chris2> no, it could take the .map enumerator from the object
<chris2> so you can chain like .map.with_index.with_pool
<rue> I don’t know what ‘with pool’ means
havenwood has quit [Read error: Connection reset by peer]
centrx has quit [Quit: Leaving]
<chris2> problem is that enumerator is clearly non-parallel, so this doesnt make much sense
<rue> enum.parallel(N).map {…}
<chris2> rue: it's supposed to iterate in parallel with multiple threads
<chris2> yes
<canton7> chris2, first off: you're aware that MRI ruby doesn't have 'true' threads?
<chris2> except the pool also can be a object
<chris2> canton7: yes
<canton7> cool, just making sure :)
<chris2> been doing ruby since 2001, thanks :)
havenwood has joined #ruby-lang
<rue> Lies you were born in 2002
<chris2> :D
<canton7> I can't read your mind to determine that - I have to ask ;)
<chris2> not so much experience with the new stuff from 1.9/2.0 tho
guardianx has quit [Ping timeout: 248 seconds]
zlogan has joined #ruby-lang
<chris2> i guess i'll define Enumerator#map_with_pool
<chris2> then it's clear it's always mapping
<canton7> but anyway, to take a leaf out of C#, book, define Enumerable#with_pool, and have it return a custom ParallelEnumerable, which defines a bunch of iterators, each with a parallel implementation
rjrj has joined #ruby-lang
<chris2> :)
<canton7> so, the with_pool.map option :P
vlad_starkov has quit [Remote host closed the connection]
centrx has joined #ruby-lang
robmiller has joined #ruby-lang
IC84 has left #ruby-lang ["Leaving"]
mucker has joined #ruby-lang
guardianx has joined #ruby-lang
ikrima has quit [Quit: Computer has gone to sleep.]
simi has joined #ruby-lang
chris2 has quit [Ping timeout: 248 seconds]
patriciomacadden has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chris2 has joined #ruby-lang
knu has quit [Remote host closed the connection]
johnmilton has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vlad_starkov has quit [Remote host closed the connection]
knu has joined #ruby-lang
vlad_starkov has joined #ruby-lang
prc has joined #ruby-lang
<r0bglees0n> chris2: do you still work on rack?
<chris2> rarely
<chris2> i glance over the patches
<r0bglees0n> alright, just curious :)
<chris2> raggi does most of the work i think
johnmilton has joined #ruby-lang
wallerdev has joined #ruby-lang
judofyr has quit [Remote host closed the connection]
judofyr has joined #ruby-lang
robmiller has quit [Quit: robmiller]
judofyr has quit [Ping timeout: 252 seconds]
wallerdev has quit [Quit: wallerdev]
judofyr has joined #ruby-lang
yfeldblum has joined #ruby-lang
anulman has quit [Quit: Leaving.]
yfeldblum has quit [Ping timeout: 272 seconds]
elia has quit [Quit: Computer has gone to sleep.]
Fyyr13 has quit [Quit: Leaving...]
CJD14 has quit [Ping timeout: 272 seconds]
francisfish has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
RobertBirnie has joined #ruby-lang
_tockitj has joined #ruby-lang
francisfish has joined #ruby-lang
mistym has joined #ruby-lang
anulman has joined #ruby-lang
MouseTheLuckyDog has left #ruby-lang ["Leaving"]
arBmind1 has joined #ruby-lang
mistym has quit [Ping timeout: 245 seconds]
vlad_sta_ has joined #ruby-lang
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
houhoulis has joined #ruby-lang
arBmind has quit [Ping timeout: 252 seconds]
wallerdev has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 272 seconds]
Cakey has joined #ruby-lang
bougyman has quit [Remote host closed the connection]
arBmind has joined #ruby-lang
rjrj has quit [Remote host closed the connection]
tomkadwill has joined #ruby-lang
mbj has quit [Quit: leaving]
patriciomacadden has joined #ruby-lang
arBmind1 has quit [Ping timeout: 252 seconds]
Cakey has quit [Ping timeout: 260 seconds]
speakingcode has quit [Ping timeout: 245 seconds]
simi has quit [Read error: Operation timed out]
nathanstitt has joined #ruby-lang
yfeldblum has joined #ruby-lang
mucker has quit [Remote host closed the connection]
mucker has joined #ruby-lang
arBmind1 has joined #ruby-lang
phansch has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Ping timeout: 252 seconds]
phansch has joined #ruby-lang
arBmind has quit [Ping timeout: 272 seconds]
<centrx> Quack quack
mucker has quit [Ping timeout: 272 seconds]
<r0bglees0n> oink
bougyman has joined #ruby-lang
houhoulis has quit [Remote host closed the connection]
|jemc| has joined #ruby-lang
kurko_ has joined #ruby-lang
lcdhoffman has joined #ruby-lang
Onixs_ has quit [Ping timeout: 248 seconds]
lcdhoffman has quit [Client Quit]
DouweM has quit [Quit: Leaving...]
workmad3 has joined #ruby-lang
ivanskie has joined #ruby-lang
guardianx has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
tomkadwill has quit [Read error: Connection reset by peer]
tomkadwill has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
danijoo_ has joined #ruby-lang
nisstyre has joined #ruby-lang
vlad_sta_ has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
Cakey has joined #ruby-lang
dm78 has joined #ruby-lang
judofyr_ has joined #ruby-lang
judofyr has quit [Read error: Connection reset by peer]
Cakey has quit [Ping timeout: 245 seconds]
Johz has joined #ruby-lang
vlad_starkov has joined #ruby-lang
aef has quit [Remote host closed the connection]
fragamus has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
tomkadwill has quit [Read error: Connection reset by peer]
yfeldblum has quit [Read error: Operation timed out]
tomkadwill has joined #ruby-lang
RobertBirnie has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Lewix has joined #ruby-lang
havenwood has quit [Read error: Connection reset by peer]
fragamus has quit [Quit: Computer has gone to sleep.]
judofyr_ has quit [Remote host closed the connection]
judofyr has joined #ruby-lang
homjamba has joined #ruby-lang
judofyr has quit [Read error: No route to host]
judofyr has joined #ruby-lang
homjamba has quit [Client Quit]
homjamba has joined #ruby-lang
sree has joined #ruby-lang
tomkadwi_ has joined #ruby-lang
tomkadwill has quit [Ping timeout: 245 seconds]
tkuchiki has quit [Remote host closed the connection]
mistym has joined #ruby-lang
sree has quit []
judofyr has quit [Remote host closed the connection]
judofyr has joined #ruby-lang
Barrin6 has joined #ruby-lang
mistym has quit [Ping timeout: 272 seconds]
judofyr has quit [Read error: Connection reset by peer]
judofyr has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
deens has joined #ruby-lang
mistym has joined #ruby-lang
nathanstitt has joined #ruby-lang
mistym has quit [Remote host closed the connection]
kvs has quit [Ping timeout: 245 seconds]
kvs has joined #ruby-lang
linc01n has quit [Ping timeout: 245 seconds]
heftig has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
heftig has joined #ruby-lang
linc01n has joined #ruby-lang
robbyoconnor has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby-lang
enkristoffer has quit [Ping timeout: 240 seconds]
mistym has joined #ruby-lang
workmad3 has quit [Ping timeout: 260 seconds]
yfeldblum has joined #ruby-lang
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 272 seconds]
atmosx has quit [Quit: Lost in trance]
skade has quit [Quit: Computer has gone to sleep.]
mykoweb has quit [Remote host closed the connection]
francisfish has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
arooni-mobile has joined #ruby-lang
yfeldblum has joined #ruby-lang
bmurphy1976 has joined #ruby-lang
<bmurphy1976> is this the right place to ask a rake question?
<centrx> Sure
<centrx> bmurphy1976, You have to wait before you leave #ruby
<bmurphy1976> I don't understand
<centrx> You left #ruby quickly, but #ruby might have more people to answer your question, though both channels are rather inactive right now
<bmurphy1976> oh, ok. I went online and the ruby-lang.org said this was the channel
<bmurphy1976> anyway
<bmurphy1976> OK, rake question, I have a folder which contains erb templates. I want to recursively evaluate those templates into another folder. I don't want to define a task for every file because there would be 1000's AND I want to handle deletes. I also only trigger dependent tasks if something within this folder changes, not on every single invocation.
<bmurphy1976> so imagine I ultimately need to zip up the post-evaluation templates
<bmurphy1976> and upload the zip some place else, but obviously only want to do this if something changed
<bmurphy1976> I'm having a hell of a time figuring out the "right" way to do this
<bmurphy1976> and when I say I don't want to define a task, I don't want to write a task for each one. i'm ok generating a task from a filelist or something to that effect
<dorei> bmurphy1976: why not define something that will define those tasks for you?
<bmurphy1976> well, I've done something like that already, and it works, but it's clearly not like any other rake code I've seen
moneydouble has joined #ruby-lang
<bmurphy1976> I kinda want something like this: applytemplates :name, :src => "input path", :dst => "output path"
<bmurphy1976> thatn I can reuse
<dorei> i've done almost zero rake code, but from what you said that sounded like a reasonable aproache to your problem, maybe others could be more insightful
hahuang65 has joined #ruby-lang
<bmurphy1976> yeah, what I did is very... brute force and not reusable at the moment.
<bmurphy1976> I can imaging creating a subclass of Task and a new "DSL" entry, but I just can't find a good example that shows me the correct way to do it
<bmurphy1976> and looking at all the code (including rake itself) it's not every clear how its supposed to work
<bmurphy1976> maybe I should hit the mailing list on this one, I can describe it better and hopefully hit somebody who knows what to do
<|jemc|> bmurphy1976: you're aware of rake's 'file tasks' already, correct?
<bmurphy1976> yes, but I'm not copying a file, I'm copying a "set of files"
<|jemc|> cool, just checking
<|jemc|> you've probably got as good of a handle on the problem as I would then
<bmurphy1976> that's what I did, I brute force generated a "file" entry for every template
<bmurphy1976> but the structure is all wrong :)
<|jemc|> the other thing you might try is digging into the source of the file DSL method
<|jemc|> and seeing if you can duplicate its functionality for file groups
hahuang65 has quit [Ping timeout: 245 seconds]
<bmurphy1976> yeah, I did. It's not very straightforward. Lots of indirection and boiler plate. Hard to know what's necessary and what isn't.
<bmurphy1976> I'd probably have to step through the code and watch it line by line as it works to have any hope of understanding what its doing
marr has joined #ruby-lang
<bmurphy1976> figured I'd see if somebody else knew the answer first
<|jemc|> yeah
elliotec has joined #ruby-lang
dm78 has quit [Remote host closed the connection]
clamstar has joined #ruby-lang
dm78 has joined #ruby-lang
rsl has quit [Ping timeout: 260 seconds]
elliotec has quit [Remote host closed the connection]
tomkadwi_ has quit []
TheMoonMaster has quit [Quit: Later!]
rsl has joined #ruby-lang
elliotec has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
elliotec_ has joined #ruby-lang
dm78 has quit [Ping timeout: 252 seconds]
elliotec has quit [Ping timeout: 260 seconds]
chouhoulis has joined #ruby-lang
TheMoonMaster has joined #ruby-lang
patriciomacadden has quit [Quit: Textual IRC Client: www.textualapp.com]
dik_dak has joined #ruby-lang
Asher has quit [Quit: Leaving.]
Asher has joined #ruby-lang
chouhoulis has quit [Ping timeout: 265 seconds]
guns has joined #ruby-lang
danijoo_ has quit [Read error: Connection reset by peer]
bmurphy1976 has quit [Quit: bmurphy1976]
danijoo has joined #ruby-lang
benanne has quit [Quit: kbai]
amclain has joined #ruby-lang
skade has joined #ruby-lang
ledestin has quit [Remote host closed the connection]
ledestin has joined #ruby-lang
dm78 has joined #ruby-lang
DouweM has joined #ruby-lang
havenwood has joined #ruby-lang
homjamba has quit [Quit: Textual IRC Client: www.textualapp.com]
guns has quit [Quit: guns]
DrDetroit has joined #ruby-lang
RobertBirnie has joined #ruby-lang
DrDetroit has quit [Client Quit]
RobertBirnie has quit [Ping timeout: 252 seconds]
deens has quit []
_whitelogger has joined #ruby-lang
whitequark has joined #ruby-lang
hahuang65 has quit [Ping timeout: 245 seconds]
mistym has quit [Remote host closed the connection]
prc has left #ruby-lang [#ruby-lang]
vlad_starkov has joined #ruby-lang
meise has quit [Quit: leaving]
Mon_Ouie has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
Mon_Ouie has quit [Changing host]
vlad_starkov has quit [Read error: Connection reset by peer]
ikrima has joined #ruby-lang
mbj has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 252 seconds]
kurko_ has quit [Quit: Computer has gone to sleep.]
moneydouble has quit [Quit: Leaving.]
ikrima has quit [Quit: Computer has gone to sleep.]
guns has joined #ruby-lang
kfpratt has quit [Remote host closed the connection]
kfpratt has joined #ruby-lang
benanne has joined #ruby-lang
kfpratt has quit [Ping timeout: 240 seconds]
Asher has joined #ruby-lang
meise has joined #ruby-lang
Asher has quit [Client Quit]
meise has quit [Remote host closed the connection]
stonerfish has joined #ruby-lang
lsegal has joined #ruby-lang
stonerfish has quit [Client Quit]
stonerfish has joined #ruby-lang
Asher has joined #ruby-lang
stonerfish has quit [Client Quit]
moneydouble has joined #ruby-lang
bmurphy1976 has joined #ruby-lang
bmurphy1976 has quit [Client Quit]
Asher has quit [Read error: Connection reset by peer]
drbrain has joined #ruby-lang
x0f has joined #ruby-lang
kfpratt has joined #ruby-lang
meise has joined #ruby-lang
x0f_ has quit [Ping timeout: 240 seconds]
judofyr has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
lcdhoffman has joined #ruby-lang
hahuang65 has quit [Ping timeout: 252 seconds]
kfpratt has quit [Remote host closed the connection]
kfpratt has joined #ruby-lang
vlad_starkov has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
robmiller has joined #ruby-lang
kfpratt has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
clamstar has quit [Quit: Computer has gone to sleep.]
hahuang65 has joined #ruby-lang
mbj_ has joined #ruby-lang
mbj_ has quit [Client Quit]
mbj has quit [Quit: leaving]
johnmilton has quit [Remote host closed the connection]
Asher has joined #ruby-lang
bcardarella has joined #ruby-lang
judofyr has joined #ruby-lang
judofyr_ has joined #ruby-lang
judofyr has quit [Read error: Connection reset by peer]
airdisa has joined #ruby-lang
judofyr_ has quit [Ping timeout: 252 seconds]
apeiros has quit [Remote host closed the connection]
simoz15 has joined #ruby-lang
RobertBirnie has joined #ruby-lang
Cakey has joined #ruby-lang
heftig has quit [Ping timeout: 272 seconds]
heftig has joined #ruby-lang
simoz15 has quit [Ping timeout: 265 seconds]
apeiros has joined #ruby-lang
phansch_ has joined #ruby-lang
elliotec_ has quit [Remote host closed the connection]
odcinek has joined #ruby-lang
odcinek has quit [Client Quit]
odcinek has joined #ruby-lang
clamstar has joined #ruby-lang
phansch has quit [Ping timeout: 260 seconds]
phansch_ has quit [Client Quit]
simoz15 has joined #ruby-lang
<zenspider> just sent bmurphy1976 an email with more rake tips... sorry I missed that
odcinek has quit [Quit: odcinek]
<whitequark> an email! that's some oldschool dedication
<centrx> I sent him a postcard
odcinek has joined #ruby-lang
<whitequark> zenspider: do I remember it right, were you interested in CADs?
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
kurko_ has joined #ruby-lang
odcinek has quit [Quit: odcinek]
yfeldblum has quit [Read error: Connection reset by peer]
dm78 has quit [Remote host closed the connection]
dm78 has joined #ruby-lang
mistym has joined #ruby-lang
dm78 has quit [Ping timeout: 245 seconds]
<zenspider> whitequark: I wanted something to simulate (and lay out) digital logic. so... sorta?
guns has quit [Quit: guns]
centrx has quit [Quit: Leaving]
Asher has quit [Ping timeout: 264 seconds]
<zenspider> I can't see asher w/o thinking of sparticus
<zenspider> rat bastard
<zenspider> is there a way to split audio on a mac such that ONLY itunes plays to my bluetooth speaker and the rest goes to my regular laptop speakers?
ikrima has joined #ruby-lang
<zenspider> I don't want to hear adium w/ the music speaker
Asher has joined #ruby-lang
mistym has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby-lang
yfeldblum has joined #ruby-lang
<whitequark> zenspider: ahhh, digital logic. sorry, not relevant then
vlad_starkov has quit [Read error: Operation timed out]
Mon_Ouie has joined #ruby-lang
wnd has quit [Ping timeout: 246 seconds]
toretore has quit [Quit: This computer has gone to sleep]
<ryanf> zenspider: no, I don't think you can tell itunes what output to use unless it's airplay or w/e apple shit
<ryanf> it's really lame
Johz has quit [Quit: Leaving]
judofyr has joined #ruby-lang
jsullivandigs has joined #ruby-lang
wnd has joined #ruby-lang
<ryanf> I think you might be able to work around it with http://rogueamoeba.com/airfoil/mac/
hfp`away is now known as hfp
judofyr has quit [Ping timeout: 245 seconds]
jsullivandigs has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
dm78 has joined #ruby-lang
Cakey has quit [Remote host closed the connection]
Cakey has joined #ruby-lang
waxjar is now known as shadesaaaa
<zenspider> ryanf: I have airfoil, but it only works w/ airplay, not BT. *shrug* that's fine. I can live with that
mykoweb has quit [Read error: Connection reset by peer]
<zenspider> oh! you CAN do it.
mykoweb has joined #ruby-lang
insidious has joined #ruby-lang
<zenspider> FUCK I love my kitchen
dm78 has quit [Ping timeout: 240 seconds]
simoz15 has quit [Ping timeout: 252 seconds]
Cakey has quit [Ping timeout: 252 seconds]
clamstar has quit [Quit: Computer has gone to sleep.]
Cakey has joined #ruby-lang
benanne has quit [Quit: kbai]
jonahR has joined #ruby-lang
clamstar has joined #ruby-lang
guns has joined #ruby-lang
camilleldn has quit [Remote host closed the connection]
jvrmaia has joined #ruby-lang
relix has joined #ruby-lang
elia has joined #ruby-lang
coca_rails has joined #ruby-lang
jsrn has joined #ruby-lang
ikrima has quit [Quit: Computer has gone to sleep.]
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
Cakey has quit [Ping timeout: 264 seconds]
pabloh has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
airdisa has quit []
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
relix has joined #ruby-lang
patriciomacadden has joined #ruby-lang
ikrima has joined #ruby-lang
coca_rails has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vlad_starkov has joined #ruby-lang
_elia has joined #ruby-lang
relix has joined #ruby-lang
jvrmaia has quit [Remote host closed the connection]
elia has quit [Ping timeout: 252 seconds]
jvrmaia has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
_elia has quit [Client Quit]
relix has quit [Client Quit]
jvrmaia has quit [Read error: Connection reset by peer]
setmeaway has joined #ruby-lang
jvrmaia has joined #ruby-lang
MrZYX is now known as MrZYX|off
judofyr has joined #ruby-lang
workmad3 has joined #ruby-lang
speakingcode has joined #ruby-lang
ikrima has quit [Quit: Computer has gone to sleep.]
mbj has joined #ruby-lang
judofyr has quit [Read error: No route to host]
judofyr has joined #ruby-lang
_mtr has joined #ruby-lang
_mtr has quit [Max SendQ exceeded]
_mtr has joined #ruby-lang
_mtr has quit [Max SendQ exceeded]
VTLob has quit [Quit: VTLob]
judofyr has quit [Ping timeout: 252 seconds]