_djbkd has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
timanema has quit [Ping timeout: 264 seconds]
mcclurmc has quit [Remote host closed the connection]
matrisking has quit [Ping timeout: 255 seconds]
hakunin has quit []
<oak1>
thanks
<drbrain>
oak1: you want to use postgres fulltext search, that should give you some google results
workmad3 has quit [Ping timeout: 240 seconds]
_djbkd has joined #ruby-lang
<oak1>
cool, thanks drbrain I'll look into that and direct my questions to the other channel
thang_ has quit [Ping timeout: 245 seconds]
thang has joined #ruby-lang
oak1 has quit [Quit: oak1]
<wiggl3>
How to do a script that would tell me how many days are left to the 1st of each onth?
intinig has joined #ruby-lang
<pipework>
wiggl3: With ruby, obviously.
<wiggl3>
I got a bash oneliner but it's not that pretty
<pipework>
You'd need to get todays date, figure out how many days are in that month, then subtract current date from the days in the month.
<wiggl3>
yup
<pipework>
The figuring out how many days are in the month part is left as exercise to the reader. It should be in the docs for Date or Time or DateTime.
duderonomy has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
houhoulis has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
Antivan has joined #ruby-lang
<pipework>
wiggl3: Hint, it involves a -1
trajing|Mobile has joined #ruby-lang
<wiggl3>
thank you =)
Aova has quit [Read error: Connection reset by peer]
Lewix has quit [Ping timeout: 252 seconds]
shazaum has quit [Quit: This computer has gone to sleep]
_djbkd has quit [Remote host closed the connection]
_djbkd has joined #ruby-lang
_fritchie has joined #ruby-lang
intinig has quit [Ping timeout: 276 seconds]
timanema has joined #ruby-lang
Aova has joined #ruby-lang
mcclurmc has joined #ruby-lang
centrx has joined #ruby-lang
lcdhoffman has joined #ruby-lang
yusuf has joined #ruby-lang
yusuf has quit [Max SendQ exceeded]
yusuf has joined #ruby-lang
lcdhoffman has quit [Client Quit]
jo__ has joined #ruby-lang
spuk has quit [Ping timeout: 255 seconds]
spuk has joined #ruby-lang
houhoulis has joined #ruby-lang
thang has quit [Remote host closed the connection]
thang has joined #ruby-lang
deol has joined #ruby-lang
king313 has joined #ruby-lang
trajing|Mobile has quit [Read error: Connection reset by peer]
|jemc| has quit [Ping timeout: 245 seconds]
fcanela has joined #ruby-lang
timanema has quit [Ping timeout: 246 seconds]
<pipework>
wiggl3: In case you haven't found it yet: `require 'date'; Date.new(some_year, some_month, -1).mday`
yfeldblum has quit [Ping timeout: 272 seconds]
michael_mbp has quit [Excess Flood]
unreal has quit [Ping timeout: 272 seconds]
rickyrickyrice has joined #ruby-lang
michael_mbp has joined #ruby-lang
timanema has joined #ruby-lang
sferik has joined #ruby-lang
rickyrickyrice has quit [Ping timeout: 252 seconds]
unreal has joined #ruby-lang
mattc007 has joined #ruby-lang
thang has quit [Ping timeout: 244 seconds]
thang has joined #ruby-lang
migbar has quit [Remote host closed the connection]
mattc007 has quit [Ping timeout: 245 seconds]
fcanela has quit [Quit: leaving]
fcanela has joined #ruby-lang
fcanela has quit [Client Quit]
king313 has quit [Quit: .]
rbowlby has joined #ruby-lang
rkrdo has joined #ruby-lang
rkrdo has quit [Client Quit]
lcdhoffman has joined #ruby-lang
|jemc| has joined #ruby-lang
mcclurmc has quit [Remote host closed the connection]
RobertBirnie has quit [Ping timeout: 276 seconds]
RobertBirnie has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
intinig has joined #ruby-lang
yfeldblum has joined #ruby-lang
Aova has joined #ruby-lang
marr has quit [Ping timeout: 246 seconds]
rbowlby has quit [Remote host closed the connection]
intinig has quit [Ping timeout: 252 seconds]
hanjin has joined #ruby-lang
postmodern has quit [Quit: Leaving]
hendranata_ has joined #ruby-lang
nathanstitt has joined #ruby-lang
tkuchiki has joined #ruby-lang
lytol has quit [Remote host closed the connection]
p3ery has joined #ruby-lang
wallerdev has joined #ruby-lang
mshieldsdunn has joined #ruby-lang
nofxx has joined #ruby-lang
Blaguvest has quit []
gwendall has quit [Remote host closed the connection]
wprice has quit [Quit: wprice]
thang has quit [Ping timeout: 244 seconds]
thang has joined #ruby-lang
postmodern has joined #ruby-lang
jxie_ has joined #ruby-lang
jxie has quit [Ping timeout: 240 seconds]
Sgeo_ has joined #ruby-lang
Antivan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Sgeo has quit [Ping timeout: 244 seconds]
hahuang61 has quit [Ping timeout: 255 seconds]
_djbkd has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 245 seconds]
gwendall has joined #ruby-lang
mattc007 has joined #ruby-lang
gwendall_ has joined #ruby-lang
Sadin has joined #ruby-lang
workmad3 has joined #ruby-lang
migbar has joined #ruby-lang
mattc007 has quit [Ping timeout: 245 seconds]
gwendall_ has quit [Ping timeout: 276 seconds]
gwendall has quit [Ping timeout: 276 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
amsi has quit [Quit: Leaving]
migbar has quit [Ping timeout: 240 seconds]
Musashi007 has joined #ruby-lang
Lewix has joined #ruby-lang
workmad3 has quit [Ping timeout: 264 seconds]
rahul_j has joined #ruby-lang
rahul_j has quit [Client Quit]
p3ery has quit [Quit: (null)]
sent-hil has quit [Quit: Connection closed for inactivity]
fujimura has joined #ruby-lang
amclain has joined #ruby-lang
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Aova has quit [Read error: Connection reset by peer]
mshieldsdunn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
leonshalimov has joined #ruby-lang
Aova has joined #ruby-lang
ta has joined #ruby-lang
Sirupsen has joined #ruby-lang
intinig has joined #ruby-lang
leonshalimov has quit [Ping timeout: 276 seconds]
Antivan has joined #ruby-lang
ta has quit [Ping timeout: 245 seconds]
ruby-lang724 has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
mshieldsdunn has joined #ruby-lang
intinig has quit [Ping timeout: 256 seconds]
martinbmadsen has quit [Ping timeout: 246 seconds]
<ruby-lang724>
I have a model School that has_many of another model Sale. I want to run code on each School, if it has a Sale that meets some conditions. Any ideas? Using DataMapper, but think I just need a keyword to Google what this is called.
<ruby-lang724>
Currently accomplishing this by iterating through sales and adding the parent school to an array if it isn't already in it. Then working with the array. But I feel it could be more elegant.
lcdhoffman has joined #ruby-lang
spuk has quit [Ping timeout: 240 seconds]
simi has quit [Ping timeout: 252 seconds]
<bougyman>
select *, case when <yourcontition> then <something> else <otherthing|nil> end as some_name ...
spuk has joined #ruby-lang
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wallerdev has quit [Quit: wallerdev]
jxie_ has quit [Quit: leaving]
rahul_j has joined #ruby-lang
hahuang61 has joined #ruby-lang
mshieldsdunn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ta has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
mcclurmc has joined #ruby-lang
nofxx has quit [Ping timeout: 245 seconds]
ta has quit [Ping timeout: 276 seconds]
spuk has quit [Ping timeout: 246 seconds]
spuk has joined #ruby-lang
imperator has quit [Quit: Valete!]
timanema has quit [Ping timeout: 246 seconds]
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yfeldblum has quit [Remote host closed the connection]
ruby-lang724 has quit [Ping timeout: 246 seconds]
Aova has quit [Read error: Connection reset by peer]
stardiviner has quit [Ping timeout: 245 seconds]
rickyrickyrice has joined #ruby-lang
jacecore has joined #ruby-lang
timanema has joined #ruby-lang
Aova has joined #ruby-lang
ta has joined #ruby-lang
ta has quit [Ping timeout: 276 seconds]
intinig has joined #ruby-lang
wallerdev has joined #ruby-lang
timanema has quit [Ping timeout: 245 seconds]
ta has joined #ruby-lang
stardiviner has joined #ruby-lang
ledestin has joined #ruby-lang
hahuang61 has quit [Ping timeout: 246 seconds]
ta has quit [Ping timeout: 245 seconds]
RobertBirnie has joined #ruby-lang
intinig has quit [Ping timeout: 255 seconds]
mattc007 has joined #ruby-lang
Sgeo_ has quit [Read error: Connection reset by peer]
yfeldblu_ has joined #ruby-lang
workmad3 has joined #ruby-lang
migbar has joined #ruby-lang
vozcelik has joined #ruby-lang
mattc007 has quit [Ping timeout: 245 seconds]
hahuang61 has joined #ruby-lang
migbar has quit [Ping timeout: 245 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
tkuchiki has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby-lang
_djbkd has joined #ruby-lang
jacecore has quit [Ping timeout: 245 seconds]
hahuang61 has quit [Ping timeout: 265 seconds]
jdecuirm has joined #ruby-lang
arBmind1 has quit [Quit: Leaving.]
Sadin has quit []
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jdecuirm>
Hi all! i have an error passing an object to another class, it says that there's no method but it exists let me show you
<zenspider>
@@scenes is defined right then and there... when the file is loaded and that line(s) is run
hramrach has quit [Ping timeout: 250 seconds]
gix has joined #ruby-lang
<jdecuirm>
there is no point then to send @hero as an attribute to OldHouse.new() inside the hash?
hramrach has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
<zenspider>
I have no idea. I don't know what it does.
<zenspider>
does an OldHouse have_a hero?
<jdecuirm>
at def initialize(hero)
<jdecuirm>
then @hero = hero
nathanstitt has joined #ruby-lang
<zenspider>
how many houses come with heros attached to them?
<zenspider>
that's hat "have_a" (or has_a) means
<zenspider>
what...
<zenspider>
seems more appropriate, looking at the code, to pass your hero to enter_scene
<jdecuirm>
i was thinking about that, i have a parent class called scene, for all of the scenarios, but, i'm thinking how to create the hero and pass it to all
Aova has quit [Read error: Connection reset by peer]
martinbmadsen has quit [Ping timeout: 245 seconds]
Lewix has quit [Remote host closed the connection]
jgpawletko has quit [Quit: jgpawletko]
nathanstitt has quit [Quit: I growing sleepy]
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby-lang
jacecore has joined #ruby-lang
Miphix has joined #ruby-lang
deol has joined #ruby-lang
Lewix has joined #ruby-lang
Lewix has joined #ruby-lang
mkaesz has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
rickyrickyrice has quit []
amystephen has quit [Quit: amystephen]
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
Lewix has joined #ruby-lang
nofxx has joined #ruby-lang
<|jemc|>
jdecuirm: all requires load into a global namespace, so no need to require a file more than once in a given execution - it will have no effect
Lewix has quit [Ping timeout: 252 seconds]
fsvehla has quit [Quit: fsvehla]
postmodern has quit [Ping timeout: 244 seconds]
Aova has quit [Read error: Connection reset by peer]
postmodern has joined #ruby-lang
Aova has joined #ruby-lang
martinbmadsen has joined #ruby-lang
mattc007 has joined #ruby-lang
ta has joined #ruby-lang
workmad3 has joined #ruby-lang
migbar has joined #ruby-lang
mattc007 has quit [Ping timeout: 264 seconds]
migbar has quit [Ping timeout: 252 seconds]
workmad3 has quit [Ping timeout: 246 seconds]
ta has quit [Ping timeout: 255 seconds]
funnel has quit [Remote host closed the connection]
jacecore has quit [Ping timeout: 276 seconds]
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
houhoulis has quit [Remote host closed the connection]
<ljarvis>
a yorick factory would be an errie place
<ljarvis>
I'd imagine it would be 90% rage and 10% cats
<yorickpeterse>
50/50
<ljarvis>
bullshit
<yorickpeterse>
cats fo lyfe
dangerousdave has quit [Client Quit]
malconis has joined #ruby-lang
Pugsley_ has joined #ruby-lang
malconis has quit [Remote host closed the connection]
<darix>
yorickpeterse brixen: 2.5.1 crashes even earlier :p
<darix>
ah no
<darix>
same place
dangerousdave has joined #ruby-lang
stamina has joined #ruby-lang
Sirupsen has joined #ruby-lang
malconis has joined #ruby-lang
Sirupsen has quit [Client Quit]
dangerousdave has quit [Client Quit]
leonshalimov has joined #ruby-lang
chills42 has quit [Remote host closed the connection]
timanema has joined #ruby-lang
leonshalimov has quit [Ping timeout: 240 seconds]
mattc007 has joined #ruby-lang
sankaber has joined #ruby-lang
Integralist has joined #ruby-lang
Mau has joined #ruby-lang
leonshalimov has joined #ruby-lang
marr has quit [Ping timeout: 264 seconds]
Integralist has quit [Ping timeout: 265 seconds]
shinnya has joined #ruby-lang
jwaldrip has joined #ruby-lang
<jwaldrip>
Question on ruby style with >= 2.1... is it now common practice to prepend method definitions with (public/private/protected)
leonshalimov has quit [Ping timeout: 256 seconds]
<jwaldrip>
or is the split-file method still prefereable?
Integralist has joined #ruby-lang
ledestin has quit [Quit: ledestin]
sl01_ has joined #ruby-lang
sl01_ has left #ruby-lang [#ruby-lang]
Aova has quit [Read error: Connection reset by peer]
<ljarvis>
jwaldrip: the latter is still generally prefered
cih_ has quit [Read error: Connection reset by peer]
leonshalimov has joined #ruby-lang
cih has joined #ruby-lang
<jwaldrip>
ljarvis: it's definately what I am used to, but I have been considering the sybmol method for some time now. I think it is something to explain at first with people who have only been doing ruby, but it aligns well with other languages.
nickpassarella has joined #ruby-lang
cih has quit [Read error: Connection reset by peer]
arBmind1 has joined #ruby-lang
Aova has joined #ruby-lang
<yorickpeterse>
There's no point in writing "public def ..." all over the place
<yorickpeterse>
since public is the default
cih has joined #ruby-lang
arBmind has quit [Ping timeout: 252 seconds]
melter has joined #ruby-lang
SuMo_D has joined #ruby-lang
<ljarvis>
tbh, even when I only need to apply it to one i still write it under the methods end
<ljarvis>
protected def xxx just feels weird in Ruby
rahul_j has quit [Quit: rahul_j]
banister has joined #ruby-lang
chills42 has joined #ruby-lang
sferik has joined #ruby-lang
banister has quit [Client Quit]
sferik has quit [Client Quit]
sferik has joined #ruby-lang
nertzy has quit [Read error: Connection reset by peer]
nertzy has joined #ruby-lang
<yorickpeterse>
oh boy, I get to play the "Spot the Java syntax error"
<yorickpeterse>
because obviously where maven reports the error to be is not actually the error
Xzanron has quit [Ping timeout: 264 seconds]
hirzu has quit [Ping timeout: 264 seconds]
gwendall has quit [Remote host closed the connection]
gwendall has joined #ruby-lang
gwendall has quit [Remote host closed the connection]
Xzanron has joined #ruby-lang
|jemc| has joined #ruby-lang
sonic_boom has joined #ruby-lang
<darix>
he said jehova
enebo has joined #ruby-lang
whippythellama has joined #ruby-lang
jxie has quit [Quit: leaving]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
nathanstitt has joined #ruby-lang
matrisking has joined #ruby-lang
sonic_boom has quit [Ping timeout: 245 seconds]
iamninja has quit [Quit: ZZZzzz…]
chills42 has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
Lewix has joined #ruby-lang
loincloth has joined #ruby-lang
wm3|away is now known as workmad3
leonshalimov has quit [Ping timeout: 245 seconds]
Aova has quit [Read error: Connection reset by peer]
mcclurmc has joined #ruby-lang
druznek has quit [Quit: Leaving]
fcanela has quit [Ping timeout: 256 seconds]
chouhoulis has joined #ruby-lang
Aova has joined #ruby-lang
mcclurmc has quit [Ping timeout: 272 seconds]
loincloth has quit []
Sadin has joined #ruby-lang
Sadin has quit [Remote host closed the connection]
fujimura has quit [Read error: Connection reset by peer]
fujimura_ has joined #ruby-lang
Xzanron has quit [Read error: Connection reset by peer]
ta_ has quit [Ping timeout: 276 seconds]
rahul_j has joined #ruby-lang
ta_ has joined #ruby-lang
xcesariox has joined #ruby-lang
wprice has joined #ruby-lang
fujimura_ has quit [Ping timeout: 272 seconds]
mcclurmc has joined #ruby-lang
michael_mbp has quit [Excess Flood]
havenwood has joined #ruby-lang
michael_mbp has joined #ruby-lang
ta_ has quit [Ping timeout: 245 seconds]
jxie has joined #ruby-lang
oleo has joined #ruby-lang
<yorickpeterse>
wat
|jemc| has quit [Ping timeout: 264 seconds]
<brixen>
darix: 2.5.1 crashes on what?
lcdhoffman has joined #ruby-lang
arBmind1 has quit [Quit: Leaving.]
rahul_j has quit [Quit: rahul_j]
<darix>
brixen: see bug
<darix>
brixen: #3256
chills42 has joined #ruby-lang
rahul_j has joined #ruby-lang
<brixen>
darix: I probably have a fix for this today
marr has joined #ruby-lang
<brixen>
darix: |jemc| discovered a use-after-free using valgrind that is probably this issue
<darix>
brixen: if you have a patch i can throw it at the package.
Integralist has quit [Quit: leaving]
<brixen>
darix: I'll probably just release :)
<brixen>
darix: working on getting releases deployed via Travis right now
<brixen>
so we just tag a commit and voilà, release deployed
<brixen>
darix: we could probably add in webhook stuff to ping you when a release deploys
<brixen>
if you want something like that
<brixen>
we're going to do that with the official Docker packages, for example
<darix>
brixen: well if you want i can test the fix before the release :)
<darix>
osc build is not much work
<brixen>
darix: if you can build master, that's fine
<brixen>
but I've long since stopped caring about testing things "before release"
kapil__ has quit [Quit: Connection closed for inactivity]
<brixen>
we just release again
tkuchiki has quit [Remote host closed the connection]
konr has quit [Quit: Connection closed for inactivity]
tkuchiki has joined #ruby-lang
rippa has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
ta_ has joined #ruby-lang
apeiros_ has joined #ruby-lang
RobertBirnie has joined #ruby-lang
hanjin has quit [Ping timeout: 245 seconds]
tkuchiki has quit [Ping timeout: 272 seconds]
help has joined #ruby-lang
help is now known as jimbobaby
<jimbobaby>
hey guys
hanjin has joined #ruby-lang
<jimbobaby>
i'm trying to figure out how to check if each element of an array is a hash
<jimbobaby>
can i put it in an if
apeiros_ has quit [Ping timeout: 244 seconds]
chouhoulis has quit [Remote host closed the connection]
<jimbobaby>
i'm trying to select a portion of the string '2014-01-01'
<jimbobaby>
but for some reason string[5,7] returns '01-01'
<jimbobaby>
as does string[5,8] and string[5,9
<jimbobaby>
]
<jimbobaby>
why is that?
<workmad3>
jimbobaby: string[x,y] is 'get y characters, starting at index x'
<workmad3>
jimbobaby: not 'get the characters between x and y'
<jimbobaby>
that makes a lot more sense
<jimbobaby>
thanks so much
<jimbobaby>
i have trouble parsing the docs sometimes
<apeiros_>
5..8 is offset..offset
<apeiros_>
5,8 is offset, length
<jimbobaby>
ohhhh that's what i was remembering
<jimbobaby>
is there a reason to use one over the other? just whatever makes more sense?
<apeiros_>
and in all places, offsets can be negative.
<workmad3>
pretty much
|jemc| has left #ruby-lang ["WeeChat 1.0.1"]
<apeiros_>
yes, the one which makes more sense.
<apeiros_>
the differences are mostly academical
<jimbobaby>
if you had a realllly long string i guess it'd make more sense to do 38234723, 4 than 38234723, 38234727
<apeiros_>
it depends
<jimbobaby>
but i feel like in that case thats a sign you should be doing something differently in the first place?
<apeiros_>
if what you have are already two offsets, then there's no point to convert it yourself
djbkd_ has quit [Ping timeout: 256 seconds]
<apeiros_>
no, I had use cases for both situations
<workmad3>
and whether you have 2 offsets or an offset and a length will depend a bit on how you end up working out which bit of the string you need
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros_>
large offset values or slice lengths are IMO not an indicator of having done something wrong
<apeiros_>
but you have to be aware that variable length encodings will give you increasingly slow access
<apeiros_>
e.g. utf-8
solars has quit [Ping timeout: 272 seconds]
chrisdaish has joined #ruby-lang
mkaesz has quit [Remote host closed the connection]
<chrisdaish>
Hi there, Im looking for some help if possible. I am attempting to modify https://github.com/sensu/sensu-community-plugins/blob/master/handlers/notification/slack.rb to use a proxy (not from environment variables). I thought changing line 58 to http = Net::HTTP.new(uri.host, uri.port, proxyaddr, proxyport) would do the job, but no dice. Can anyone assist at all?
mshieldsdunn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wallerdev has joined #ruby-lang
<chrisdaish>
riotjone_: Thanks, but it looks like thats obsolete. It should now be defined in the new method. Would I have to provide user details of nil If I dont use them perhaps?
banister has joined #ruby-lang
<riotjone_>
nil is standard value so you dont have to do anything
<riotjone_>
only serveradress and serverport of the proxy
gwendall has quit [Remote host closed the connection]
<riotjone_>
and let the other parameter untouched
gwendall has joined #ruby-lang
<riotjone_>
chrisdaish:
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gwendall has quit [Ping timeout: 256 seconds]
<chrisdaish>
This is what my code currently looks like
Aova has quit [Read error: Connection reset by peer]
mshieldsdunn has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
Aova has joined #ruby-lang
simi has quit [Ping timeout: 255 seconds]
fusillicode has joined #ruby-lang
lytol has joined #ruby-lang
migbar has quit [Read error: No route to host]
<chrisdaish>
but no dice
bb010g has quit [Quit: Connection closed for inactivity]
migbar has joined #ruby-lang
Vivex_ has quit [Read error: Connection reset by peer]
mikecmpbll has quit [Ping timeout: 264 seconds]
RobertBirnie has joined #ruby-lang
mikecmpbll has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
intinig has joined #ruby-lang
the_real_intinig has quit [Ping timeout: 246 seconds]
lcdhoffman has quit [Quit: lcdhoffman]
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Torrieri has joined #ruby-lang
Torrieri has joined #ruby-lang
Iskarlar has joined #ruby-lang
fusillicode1 has joined #ruby-lang
amsi has joined #ruby-lang
fusillicode has quit [Ping timeout: 264 seconds]
cih has quit [Remote host closed the connection]
skade has joined #ruby-lang
lcdhoffman has joined #ruby-lang
skade has quit [Client Quit]
Miphix has quit [Quit: Leaving]
wallerdev has joined #ruby-lang
workmad3 has quit [Ping timeout: 256 seconds]
Lewix has quit [Remote host closed the connection]
sferik has joined #ruby-lang
Lewix has joined #ruby-lang
Lewix has quit [Changing host]
Lewix has joined #ruby-lang
RobertBirnie has quit [Read error: Connection reset by peer]
RobertBirnie has joined #ruby-lang
Iskarlar_ has joined #ruby-lang
mikecmpbll has quit [Quit: ciao.]
Iskarlar has quit [Ping timeout: 255 seconds]
cschneid has joined #ruby-lang
<cschneid>
Does the 2.1 version of CSV do lazy-loading? I have a 1.5mil line CSV file that I can read, but would prefer to not read all at once :)
donove has joined #ruby-lang
<ljarvis>
cschneid: in short, yes. CSV.foreach
<cschneid>
ok, cool
<cschneid>
is there a way to tell it to work in chunks? "read 100, pass to parse function" - or do I have to buffer for myself
stayhero has joined #ruby-lang
simi has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
<cschneid>
hmm, I could make an instance, do `to_enum(:each)`, then repeatedly do `take 100` until it errors or nils. right?
<ljarvis>
cschneid: you'd surely want to parse it line-by-line
<cschneid>
ljarvis: yeah, but the output side needs to push in large chunks to an external service. I just am lazy and don't want to manage that buffering :)
<centrx>
cschneid, the function you pass it to is probably working on line-by-line as well, seems like batching the CSV wouldn't have much effect
<ljarvis>
cschneid: I dont see how you'd need to
<cschneid>
<read csv> -> run func on each line -> buffer till 100 or so -> push to web service
gwendall has joined #ruby-lang
<cschneid>
I was thinking <read csv in 100 batches> -> run function over each line -> push to web service. But you're right, that's a bit silly :)
<cschneid>
thanks
<centrx>
cschneid, your mention of the enum is correct, using ::foreach without block will return an enum
<cschneid>
centrx: ahh, nice of it
<ljarvis>
yeah I would read in line-by-line then every X lines you can emit that data
<cschneid>
ljarvis: there's no builtin buffer like that in ruby is there? I have to build that myself
<ljarvis>
cschneid: yeah you'd want to build something yourself, should be really simple
skade has joined #ruby-lang
Aova has joined #ruby-lang
skade has quit [Client Quit]
<ljarvis>
just make sure your "push to web service" is not blocking your reading
<stayhero>
Hey. In regard to CVE-2015-0235 http://bit.ly/1yLtIeg (on Ubuntu 12.04): Does anybody know if upgrading libc6 is sufficient when Ruby is compiled via rbenv or do I have do re-compile it?
skade has joined #ruby-lang
skade has quit [Client Quit]
djbkd has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
rbrs has joined #ruby-lang
skade has joined #ruby-lang
djbkd_ has joined #ruby-lang
sarkyniin has joined #ruby-lang
ta_ has joined #ruby-lang
skade has quit [Ping timeout: 252 seconds]
djbkd_ has quit [Ping timeout: 252 seconds]
skade has joined #ruby-lang
ta_ has quit [Ping timeout: 276 seconds]
migbar has quit [Remote host closed the connection]
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #ruby-lang
fcanela has joined #ruby-lang
sferik_ has joined #ruby-lang
sferik has quit [Ping timeout: 264 seconds]
ddd has joined #ruby-lang
crazysim has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
gwendall has quit [Remote host closed the connection]
gwendall has joined #ruby-lang
gwendall has quit [Remote host closed the connection]
rahul_j has quit [Quit: rahul_j]
dagda1 has quit [Ping timeout: 245 seconds]
dagda1 has joined #ruby-lang
chris2 has quit [Quit: trotz alledem!]
djbkd has joined #ruby-lang
Iskarlar has joined #ruby-lang
chris2 has joined #ruby-lang
Iskarlar_ has quit [Ping timeout: 264 seconds]
Iskarlar_ has joined #ruby-lang
stayhero has quit [Quit: Leaving...]
mkaesz has joined #ruby-lang
iamninja has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
Iskarlar has quit [Ping timeout: 256 seconds]
leonshalimov has quit [Ping timeout: 252 seconds]
nertzy has quit [Quit: Leaving]
arBmind has joined #ruby-lang
timanema has joined #ruby-lang
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
lytol has quit [Remote host closed the connection]
nickpassarella has quit [Quit: nickpassarella]
mshieldsdunn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
martinbmadsen has joined #ruby-lang
timanema has quit [Ping timeout: 255 seconds]
intinig has quit [Ping timeout: 276 seconds]
lytol has joined #ruby-lang
nertzy has joined #ruby-lang
shazaum has joined #ruby-lang
intinig has joined #ruby-lang
leonshalimov has joined #ruby-lang
mkaesz has quit [Quit: Leaving...]
yfeldblum has joined #ruby-lang
ta_ has joined #ruby-lang
migbar has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sferik__ has quit [Ping timeout: 264 seconds]
skade has joined #ruby-lang
skade has quit [Client Quit]
<apeiros_>
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: can't open file: a.out (No such file or directory)
<yorickpeterse>
Driver.java is the actual parser driver, most of the factorying/beaning happens there
wprice has quit [Quit: wprice]
elia has quit [Quit: Computer has gone to sleep.]
enebo has joined #ruby-lang
ta_ has quit [Ping timeout: 252 seconds]
shazaum has quit [Quit: This computer has gone to sleep]
cih has joined #ruby-lang
crdpink has joined #ruby-lang
crdpink2 has quit [Ping timeout: 245 seconds]
cih has quit [Ping timeout: 264 seconds]
dzejrou has quit [Ping timeout: 276 seconds]
<darix>
drbrain: you dont need to rebuild imho
wprice has joined #ruby-lang
djellemah has joined #ruby-lang
iamninja has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
iamninja has joined #ruby-lang
sarkyniin has quit [Quit: Quitte]
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
chills42 has quit [Remote host closed the connection]
ta_ has joined #ruby-lang
spastorino_ is now known as spastorino
migbar has quit []
yalue has quit [Quit: return 0;]
apeiros_ has quit [Ping timeout: 255 seconds]
saramic has joined #ruby-lang
cih has joined #ruby-lang
Iskarlar_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ta_ has quit [Ping timeout: 276 seconds]
fsvehla has quit [Quit: fsvehla]
timanema has quit [Read error: Connection reset by peer]
datazombie has joined #ruby-lang
timanema has joined #ruby-lang
nickpassarella has quit [Quit: nickpassarella]
havenwood has quit []
Aova has quit [Read error: Connection reset by peer]
<cschneid>
In a line like: [[1,2]].each {|(a,b)| ... } - is there a method that says how the inner array gets destructured? ie, can I make my own classes that can be destructured?
trajing|Mobile has joined #ruby-lang
djbkd_ has joined #ruby-lang
<bougyman>
i think it's just a matter of mixing in enumerable.
<centrx>
cschneid, it should work if you implement #to_a on your class (instance method)