ecnalyr has quit [Remote host closed the connection]
shterrett has quit [Quit: shterrett]
saarinen has joined #ruby-lang
saarinen has quit [Client Quit]
Oloryn_lt2 has quit [Read error: Connection reset by peer]
Oloryn_lt2 has joined #ruby-lang
ecnalyr has joined #ruby-lang
dingus_khan has quit [Ping timeout: 252 seconds]
dingus_khan has joined #ruby-lang
retro|cz has quit [Ping timeout: 252 seconds]
tdm00 has joined #ruby-lang
tdm00 has quit [Client Quit]
ecnalyr has quit [Ping timeout: 245 seconds]
mucker has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
arooni-mobile has joined #ruby-lang
bzalasky has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 252 seconds]
bzalasky has quit [Ping timeout: 272 seconds]
fosky has joined #ruby-lang
datanoise has joined #ruby-lang
nisstyre has joined #ruby-lang
ecnalyr has joined #ruby-lang
bradsmith has joined #ruby-lang
yatish27 has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
ecnalyr has quit [Remote host closed the connection]
ecnalyr has joined #ruby-lang
dingus_khan has quit [Ping timeout: 246 seconds]
ecnalyr has quit [Ping timeout: 245 seconds]
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
kurko_ has joined #ruby-lang
hogeo has quit [Remote host closed the connection]
knu has joined #ruby-lang
vlad_starkov has joined #ruby-lang
benwoody has quit [Quit: benwoody]
jsullivandigs has quit [Ping timeout: 246 seconds]
arooni-mobile has quit [Ping timeout: 246 seconds]
kurko__ has quit [Ping timeout: 260 seconds]
zz_michael_mbp is now known as michael_mbp
musty has joined #ruby-lang
iliketurtles has quit [Quit: zzzzz…..]
jhulten has quit [Remote host closed the connection]
jhulten has joined #ruby-lang
jackhammer2022 has quit [Quit: Computer has gone to sleep.]
dhruvasagar has joined #ruby-lang
ninetyw has quit [Quit: leaving]
Onixs has quit [Ping timeout: 272 seconds]
jhulten has quit [Ping timeout: 264 seconds]
lun__ has joined #ruby-lang
dalegribble80 has joined #ruby-lang
rwk1 has joined #ruby-lang
wallerdev_ has joined #ruby-lang
yfeldblum has joined #ruby-lang
ItSANg___ has joined #ruby-lang
hogeo has joined #ruby-lang
lun__ has quit [Ping timeout: 272 seconds]
rwk1 has quit [Ping timeout: 260 seconds]
alekst has quit [Quit: Computer has gone to sleep.]
kurko_ has quit [Quit: Computer has gone to sleep.]
pothibo_ has joined #ruby-lang
maloik_ has joined #ruby-lang
banisterfiend has joined #ruby-lang
sevvie has joined #ruby-lang
jxie_ has joined #ruby-lang
dhruvasa1ar has joined #ruby-lang
ahf_ has joined #ruby-lang
Raycaster1 has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
dumfries_ has joined #ruby-lang
charlespeach has joined #ruby-lang
nofxx has joined #ruby-lang
jperry2 has joined #ruby-lang
dhruvasagar has quit [*.net *.split]
musty has quit [*.net *.split]
Mon_Ouie has quit [*.net *.split]
Cakey has quit [*.net *.split]
jxie has quit [*.net *.split]
Raycaster has quit [*.net *.split]
pothibo has quit [*.net *.split]
bahar has quit [*.net *.split]
wallerdev has quit [*.net *.split]
Olipro has quit [*.net *.split]
jperry has quit [*.net *.split]
banisterfiend` has quit [*.net *.split]
ahf has quit [*.net *.split]
ItSANgo has quit [*.net *.split]
joonty has quit [*.net *.split]
ndrst has quit [*.net *.split]
xybre has quit [*.net *.split]
maloik has quit [*.net *.split]
valeri_ufo has quit [*.net *.split]
bri has quit [*.net *.split]
dumfries has quit [*.net *.split]
iliketurtles has joined #ruby-lang
wallerdev_ is now known as wallerdev
jperry2 is now known as jperry
bryno has joined #ruby-lang
ahf_ is now known as ahf
pothibo_ is now known as pothibo
valeri_ufo has joined #ruby-lang
Cakey has joined #ruby-lang
io_syl has quit []
vlad_starkov has quit [Write error: Connection reset by peer]
charlespeach has quit [Client Quit]
bzalasky has joined #ruby-lang
bahar has joined #ruby-lang
robonerd has quit [Ping timeout: 246 seconds]
dalegribble80 has quit [Quit: leaving]
bahar has quit [Changing host]
bahar has joined #ruby-lang
musty has joined #ruby-lang
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
sh1ken has joined #ruby-lang
joonty has joined #ruby-lang
<sh1ken>
Hi. I have a noob question. Is this the right place to make this kind of question?
<lianj>
just ask
<sh1ken>
I'm using Twitter::Tweet with the twitter gem. I'm trying to get any method to work, but when I call a method it just return nil, even the methods that are suppose to return integers... What am I doing wrong?
hogeo has quit [Ping timeout: 272 seconds]
bradsmith has quit [Remote host closed the connection]
bradsmith has joined #ruby-lang
bzalasky has quit [Ping timeout: 263 seconds]
itsraining has joined #ruby-lang
nisstyre has quit [Quit: Leaving]
symm- has quit [Ping timeout: 255 seconds]
jackhammer2022 has joined #ruby-lang
hogeo has joined #ruby-lang
fosky has quit [Ping timeout: 265 seconds]
bradsmith has quit [Ping timeout: 252 seconds]
musty has quit [Ping timeout: 252 seconds]
fosky has joined #ruby-lang
dhruvasa1ar has quit [Ping timeout: 246 seconds]
macmartine has joined #ruby-lang
pothibo has left #ruby-lang [#ruby-lang]
albioner has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
itsraining has quit [Quit: itsraining]
vladgh has quit [Ping timeout: 252 seconds]
yatish27 has joined #ruby-lang
rwk1 has joined #ruby-lang
sevvie has quit [Ping timeout: 246 seconds]
sh1ken has quit [Quit: leaving]
vlad_starkov has joined #ruby-lang
michael_mbp is now known as zz_michael_mbp
ecnalyr has joined #ruby-lang
big_ has joined #ruby-lang
ecnalyr has quit [Ping timeout: 245 seconds]
nisstyre has joined #ruby-lang
xcess_denied has joined #ruby-lang
Onixs has joined #ruby-lang
iliketurtles has quit [Quit: zzzzz…..]
hogeo has quit [Remote host closed the connection]
MartynKeigher has quit [Ping timeout: 252 seconds]
jhulten has joined #ruby-lang
gianlucadv has quit [Ping timeout: 260 seconds]
dhruvasagar has joined #ruby-lang
stardiviner has joined #ruby-lang
yfeldblum has quit [Read error: Connection reset by peer]
Onixs has quit [Read error: Connection reset by peer]
jhulten has quit [Ping timeout: 264 seconds]
charlespeach has joined #ruby-lang
mdedetrich has quit [Quit: Computer has gone to sleep.]
mdedetrich has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
rwk1 has quit [Remote host closed the connection]
pothibo has joined #ruby-lang
hogeo has joined #ruby-lang
pothibo has quit [Client Quit]
bjh13 has quit [Quit: leaving]
pr0ton has quit [Quit: pr0ton]
bjh13 has joined #ruby-lang
io_syl has joined #ruby-lang
Olipro has joined #ruby-lang
bzalasky has joined #ruby-lang
Olipro has quit [Ping timeout: 265 seconds]
albioner has quit [Ping timeout: 240 seconds]
albioner has joined #ruby-lang
mucker has quit [Remote host closed the connection]
mucker has joined #ruby-lang
hogeo has quit [Remote host closed the connection]
bzalasky has quit [Remote host closed the connection]
hogeo has joined #ruby-lang
bzalasky has joined #ruby-lang
hogeo has quit [Read error: Connection reset by peer]
<zirconcode>
why do I need to namespace twice, but if I were to require the code inside the brackets from another file, they would be in the same namespace Fun::
<zirconcode>
inside the comments*
<r0bgleeson>
no they wouldn't
<r0bgleeson>
require is scoped to TOPLEVEL_BINDING.
<r0bgleeson>
require inside the first Foo isn't scoped to "Foo"
<zirconcode>
oh, so the require is not _inside_ the module? so it requires the file on the same scope as the first module?
<r0bgleeson>
correct
dingus_khan has quit [Ping timeout: 260 seconds]
<zirconcode>
r0bgleeson: thanks
<r0bgleeson>
np
Mon_Ouie has quit [Ping timeout: 244 seconds]
datanoise has quit [Ping timeout: 265 seconds]
kurko_ has joined #ruby-lang
vlad_starkov has joined #ruby-lang
macmartine has joined #ruby-lang
<ReinH>
zzak: np :)
sandeepk has quit [Quit: Leaving...]
kurko__ has joined #ruby-lang
banisterfiend has quit [Quit: Computer has gone to sleep.]
kurko_ has quit [Ping timeout: 244 seconds]
yatish27 has joined #ruby-lang
sandeepk has joined #ruby-lang
albioner has quit [Quit: Laptop went to sleep. ZZZzzz…]
Tearan has quit [Quit: Sleepy Badger....]
xcess_denied has quit [Quit: Leaving...]
barttenbrinke has joined #ruby-lang
riffraff_ has joined #ruby-lang
lun__ has joined #ruby-lang
DouweM has quit [Ping timeout: 252 seconds]
rwk1 has joined #ruby-lang
dagobah has joined #ruby-lang
xcess_denied has joined #ruby-lang
datanoise has joined #ruby-lang
xcess_denied has quit [Client Quit]
sandeepk has quit [Quit: Leaving...]
macmartine has quit [Read error: Connection reset by peer]
macmartine has joined #ruby-lang
lun__ has quit [Ping timeout: 252 seconds]
rwk1 has quit [Ping timeout: 272 seconds]
barttenbrinke has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
barttenbrinke has joined #ruby-lang
JohnBat26 has joined #ruby-lang
stardiviner has joined #ruby-lang
barttenbrinke has quit [Read error: Operation timed out]
relix has joined #ruby-lang
macmartine has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
h_kon has joined #ruby-lang
Cakey has quit [Ping timeout: 272 seconds]
dhruvasagar has quit [Ping timeout: 244 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
RickHull has quit [Quit: Leaving.]
solars has joined #ruby-lang
heftig has quit [Quit: Quitting]
Coincidental has joined #ruby-lang
Zeeo has joined #ruby-lang
tylersmith has joined #ruby-lang
jackhammer2022 has quit [Quit: Computer has gone to sleep.]
wallerdev has quit [Quit: wallerdev]
jackhammer2022 has joined #ruby-lang
dhruvasagar has joined #ruby-lang
jackhammer2022 has quit [Client Quit]
xcess_denied has joined #ruby-lang
sandeepk has joined #ruby-lang
tbuehlmann has joined #ruby-lang
tylersmith has quit [Ping timeout: 264 seconds]
arooni-mobile has joined #ruby-lang
RickHull has joined #ruby-lang
<Zeeo>
Good day gentlemen, I'm gonna need some help with this. I'm trying to join two words into a regular exp (using r =Regexp.union). Everything works fine, no problem with that but I wanna make this case insensitive, so I make it (r2 = Regexp.new(r, Regexp::IGNORECASE) and I get this warning:
<Zeeo>
warning: flags ignored
<Zeeo>
how do I get rid of this?
<igalic>
how do I run a specific rspec test suite, or one specific test in that file?
<Zeeo>
igalic: just comment-out the other ones, I'ts rude and it works
ledestin has joined #ruby-lang
<Zeeo>
igalic: or try google, you can probably pass an argument to rspec
snafoo has joined #ruby-lang
mistym has quit [Remote host closed the connection]
<igalic>
currently running, ruby -S rspec spec/defines/vhost_spec.rb --color # however, that gives me this output, ..............................F.........................F.F.F....F. -- which is utterly useless.
<Zeeo>
igalic: doesn't your rspec list all the failures by name?
<UziMonkey>
Regexp.union just calls Regexp.new, which if its first argument is a regexp, it will ignore any additional flags you try to give it and instead read the flags from the regexp
<UziMonkey>
in other words, you'll need to do Regexp.union(/a/i, /b/i)
<UziMonkey>
or build the regular expression with text and use Regexp.compile
<igalic>
Zeeo: maybe it will, in some kind of summary at the end, but right now it's just doing this annoying and not very useful thing.
<Zeeo>
igalic: rspec version?
<igalic>
Zeeo: what I want, apparently, is --format documentation
mistym has joined #ruby-lang
datanoise has quit [Ping timeout: 244 seconds]
datanoise has joined #ruby-lang
<Zeeo>
whitequark: apparently there is so many stuff I need to learn before I even read this, I'm gonna tank you later, but later is gonna be like... later
heftig has joined #ruby-lang
mucker has joined #ruby-lang
mistym has quit [Remote host closed the connection]
io_syl has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby-lang
ezkl has joined #ruby-lang
yfeldblum has quit [Ping timeout: 260 seconds]
arooni-mobile has quit [Ping timeout: 264 seconds]
albioner has joined #ruby-lang
rwk1 has joined #ruby-lang
ryez has quit [Ping timeout: 250 seconds]
iliketurtles has joined #ruby-lang
lun__ has joined #ruby-lang
<ljarvis>
igalic: you can just refer to the line number
<ljarvis>
igalic: rspec file/to/foo.rb:13
rwk1 has quit [Ping timeout: 268 seconds]
kurko__ has quit [Quit: Computer has gone to sleep.]
knu has joined #ruby-lang
dc5ala has joined #ruby-lang
michael_mbp is now known as zz_michael_mbp
kek has joined #ruby-lang
rippa has quit [Read error: Connection reset by peer]
sandeepk has quit [Quit: Leaving...]
heftig has quit [Quit: Quitting]
<Zeeo>
UziMonkey: by the way, whenever I try Regexp.union(/a/i, /b/i) => /\/a\/i|/\b\/i/ T__T
<Zeeo>
wich is actually Regexp.union([/a/i, /b/i])
marr has joined #ruby-lang
symm- has quit [Ping timeout: 246 seconds]
symm- has joined #ruby-lang
<Zeeo>
*Regexp.union(["/a/i" , " /b/i"])
ikrima has quit [Read error: Connection reset by peer]
albioner has quit [Quit: Laptop went to sleep. ZZZzzz…]
<manveru>
anw, i don't want to hire a consultant every time i have to read a erlang error message
<r0bgleeson>
rails seemed like a good idea in 1995 but i've lost much of my faith in these days
<r0bgleeson>
in it*
<manveru>
i didn't like it even in 2005 :P
<ljarvis>
i actually think it's getting better (shock)
<ljarvis>
I didn't like it back then, but i dont mind it now
h_kon has quit [Ping timeout: 265 seconds]
<manveru>
it's not getting better, people just get used to it
<ljarvis>
i didn't use it until 3.0 though (refused to use it before rack)
<ljarvis>
yeah maybe
<manveru>
ok, it may also get better :)
<r0bgleeson>
it's fundamentally broken by design imo, and by that I mean it encourages monolithic applications you can't distribute as independent or decoupled parts, since rails hosts the whole thing which doesnt even encourage you to think that way (imho)
<yorickpeterse>
it works for small boring crud stuff
<yorickpeterse>
but lol at scaling it
hogeo has quit [Remote host closed the connection]
<ljarvis>
maybe at a stupid scale (like twitter)
<ljarvis>
but we scale it relatively ok
<yorickpeterse>
Good luck fitting a few Rails apps on the same medium sized server
<r0bgleeson>
it just does too much and encourages people to write some horrible horrible code
<yorickpeterse>
the fact that it starts with around 100MB of RAM use is already bonkers
<yorickpeterse>
I also laugh at the people who think it's a great idea to write APIs in Rails
h_kon has joined #ruby-lang
<r0bgleeson>
worst idea ever
<yorickpeterse>
then I cry because they're serious about it
<ljarvis>
:D
<manveru>
atm i'm actually hollowing out a rails app and putting all the logic into a go api server
<ljarvis>
manveru: I did that a few months back
<ljarvis>
saved almost 2 gb memory on one server it was running on
<manveru>
aye
<ljarvis>
a friend of mine has a server with 90gb of RAM, and he's using ~70gb just for ruby apis
<ljarvis>
or is that 100gb, top format is disgusting on the eyes
<ljarvis>
16gb free
<ljarvis>
lolboat
<r0bgleeson>
thats so sad
<r0bgleeson>
and people blame ruby
<r0bgleeson>
but i blame rails mostly
<r0bgleeson>
it needs to go on a diet
<ljarvis>
none of those are rails
faces has quit [Ping timeout: 244 seconds]
<ljarvis>
there's not 1 rails app on this server
<r0bgleeson>
what are they?
<r0bgleeson>
sinatra?
<ljarvis>
there are about 13 sinatra apis, all being monitored by the god library
<r0bgleeson>
do they talk to a database?
<ljarvis>
yup, pg
<r0bgleeson>
with what ?
<ljarvis>
?
<r0bgleeson>
what library
<ljarvis>
ah sequel mostly
<yorickpeterse>
oi, quick one: if anybody is running homebrew, what's the package name for OpenJDK 1.7?
<yorickpeterse>
LOLOLOL god
<yorickpeterse>
Fattest monitoring lib I ever used
<ljarvis>
i think i used ar on one
<yorickpeterse>
and it leaked memory too
<r0bgleeson>
thats very strange - to me at least. i was at a place that had 8-9 webmachine-ruby services (backed by a HTTP/riak client) and it used almost de nada
<chris2>
haha
<ljarvis>
yorickpeterse: yeah totally
yatish27 has quit [Remote host closed the connection]
<ljarvis>
r0bgleeson: oh there's some python processes running 24/7 that do image conversions too
<r0bgleeson>
ah
<ljarvis>
it's quite the beast, i hope it doesn't just decide to go to sleep one day
<r0bgleeson>
hehe
<mikecmpbll>
:/
<r0bgleeson>
you bet!
<r0bgleeson>
one machine....
<ljarvis>
nuts eh
<r0bgleeson>
yeah not very fail safe
<ljarvis>
also fwiw you know this guy (but we'll leave that there)
<r0bgleeson>
sure
<yorickpeterse>
dhh?
<ljarvis>
haha
<r0bgleeson>
lol
<yorickpeterse>
does he restart the server every 10 minutes?
<ljarvis>
it was using more before turbolinks
hogeo has joined #ruby-lang
<yorickpeterse>
we're using Turbolinks for one app
<yorickpeterse>
;_;
<yorickpeterse>
I still have to measure if it actually speeds things up or if the JS overhead nullifies that
<ljarvis>
heh
<r0bgleeson>
preload the rails environment to make it usable, turbolinks to make it fast, <any other bandaid to avoid the problem of rails being a beast>
<workmad3>
yorickpeterse: don't forget to do user surveys to see if they feel it's faster ;)
<ljarvis>
A-B test that shit!
<workmad3>
yorickpeterse: as that's the main thing IMO... it may not be faster in reality, but if it feels snappier that's a win
<yorickpeterse>
I was going to measure the entire roundtrip inc DOM loadings
Thanatermesis has joined #ruby-lang
mucker has quit [Remote host closed the connection]
symm- has joined #ruby-lang
yatish27 has joined #ruby-lang
mucker has joined #ruby-lang
hogeo has quit [Remote host closed the connection]
<yorickpeterse>
hm, apparently openjdk is not in homebrew
<workmad3>
isn't the apple jdk open-jdk based nowadays?
<yorickpeterse>
yeah but I think they still ship 1.6
<yorickpeterse>
not 1.7
<workmad3>
depens on OS
<workmad3>
pretty sure they ship 1.7 on 10.7+
<workmad3>
or at least updated to it
<workmad3>
*depends
CoreData has quit [Ping timeout: 272 seconds]
<workmad3>
java -version in a terminal would tell you ;)
<yorickpeterse>
I know
<yorickpeterse>
but I'm trying to figure out how to easily tell people how they should install 1.7
<yorickpeterse>
without saying "Download this blob, then change a bunch of files there, then fuck yourself"
<yorickpeterse>
apparently you have to run an installer, lol OS X
<ljarvis>
you have to run an installer on any platform?
<yorickpeterse>
On linux: sudo pacman -S jdk7-openjdk
<yorickpeterse>
that's all
<yorickpeterse>
I don't need to download shit manually, run an installer, etc
<yorickpeterse>
plus I don't have to navigate a fucking Oracle website
<ljarvis>
did it install it?
atmosx has joined #ruby-lang
<workmad3>
yorickpeterse: hmm... you could write a brew-cask recipe for it, then you can tell your users 'brew tap phinze/cask; brew install brew-cask; brew cask install your-java'
<yorickpeterse>
too much effort, I'll just point them to that link
<yorickpeterse>
chances are they're not even using brew to begin with
<workmad3>
:)
<ljarvis>
are these people not developers?
<workmad3>
so prefix that with the brew installer? :P
<yorickpeterse>
ljarvis: they are researches
<yorickpeterse>
so no, they're not
<yorickpeterse>
they're good at copy-pasting shell commands but that's about it
<yorickpeterse>
some can write some code
<ljarvis>
ah
<workmad3>
I got a load of testers to install homebrew under-the-radar at one place :)
<ljarvis>
some copy paste shell commands, some write code
<ljarvis>
that's quite a difference
<workmad3>
gave them scripts to set up a local test environment... first line of that script installed homebrew if it wasn't there, then used homebrew to install everything else I needed :)
<workmad3>
the only thing I couldn't automate was installing the xcode tools :(
<yorickpeterse>
granted most of these users are on some flavour of Debian/Poobuntu so that should be covered
<yorickpeterse>
Yeah no, I'm not going to force them to install homebrew, gcc-installer and optionally xcode just to get Java
<yorickpeterse>
That's retarded
<workmad3>
blame oracle and apple, not me :P
<ljarvis>
that's why they need to use installers, because they cant build anything because they dont have gcc because they dont have xcode because fuck you apple
<workmad3>
although in my case, it wasn't just java that was needed... was installing a ruby environment, vagrant, virtualbox, git, etc :)
<ljarvis>
i never understood how people enjoy vagrant, i find the whole process painfully slow
<yorickpeterse>
actually I'll probably be building Vagrant and Docker images too
<yorickpeterse>
and Amazon AMIs
<ljarvis>
so that rds problem was because i had the security group but i accidentally removed it from that db instance
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
<yorickpeterse>
the radiator in my kitchen doesn't work
dhruvasa1ar has quit [Ping timeout: 272 seconds]
<yorickpeterse>
hasn't worked ever since I moved in
<yorickpeterse>
shit's pretty cold
<yorickpeterse>
(I have a small hot air thing)
<yorickpeterse>
at least the radiators work in my living room
alekst has joined #ruby-lang
tbuehlmann has quit [Ping timeout: 264 seconds]
vondruch has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby-lang
tbuehlmann has joined #ruby-lang
hogeo has quit [Remote host closed the connection]
lun__ has quit [Remote host closed the connection]
lun__ has joined #ruby-lang
x0f has quit [Read error: Operation timed out]
bazaretas has joined #ruby-lang
xcess_denied|awa has quit [Quit: Leaving...]
sandeepk has quit [Quit: Leaving...]
lun__ has quit [Ping timeout: 244 seconds]
atmosx has quit [Quit: Lost in trance]
<ljarvis>
r0bgleeson: srsly
<ljarvis>
my office radiator is on the other side of the room, and I'm pretty sure it doesn't reach here
<ljarvis>
desk is next to the window and it's a victorian house so there may as well be big holes in the wall to outside
mistym has joined #ruby-lang
x0f has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
rwk1 has joined #ruby-lang
thelorax123 has quit [Remote host closed the connection]
guns has joined #ruby-lang
thelorax123 has joined #ruby-lang
mistym has quit [Ping timeout: 244 seconds]
<r0bgleeson>
ljarvis: i have no idea how heat works where i stay, except that it comes on by magic when its too cold
sdpy has joined #ruby-lang
<ljarvis>
lol
<ljarvis>
fuck, when it gets cold i have to build a fucking fire
rwk1 has quit [Remote host closed the connection]
<ljarvis>
the heating system in this house is pretty technical
<ljarvis>
its like trying to write cobol just turning the heating on
<r0bgleeson>
lol
lfox has joined #ruby-lang
heftig has quit [Ping timeout: 252 seconds]
<ledestin>
in Soviet Russia the house heats you
<ljarvis>
wat
<ledestin>
that's one of the advantages of living there
<ljarvis>
isn't that the case here
<ledestin>
it's cold, so you heat the house
<ljarvis>
you're a smart cookie
<ledestin>
I just have got a lot of experience with it, sadly
yatish27 has joined #ruby-lang
<ledestin>
it's got central heating in other word
<ledestin>
and you don't care about such things there
solars has quit [Ping timeout: 272 seconds]
<r0bgleeson>
ireland has this dumb thing called an 'immersion' that has to be turned on 30mins prior to a shower for hot water
<r0bgleeson>
if you forget to turn it off... costs a bomb
solars has joined #ruby-lang
<ledestin>
and central hot water as well, unless something breaks and then you're out of hot water
hogeo has joined #ruby-lang
freppa has quit [Remote host closed the connection]
smashwilson has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
yalue has joined #ruby-lang
heftig has joined #ruby-lang
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby-lang
hogeo has quit [Remote host closed the connection]
dhruvasagar has joined #ruby-lang
vondruch_ has joined #ruby-lang
xcess_denied has joined #ruby-lang
spike|spiegel has quit [Ping timeout: 245 seconds]
spike|spiegel has joined #ruby-lang
vondruch has quit [Ping timeout: 265 seconds]
_Bravado has quit [Quit: _Bravado]
symm- has quit [Ping timeout: 272 seconds]
cored has joined #ruby-lang
<r0bgleeson>
ljarvis: wtf is o7? guy from the uk is saying it to me anytime he says hello
<r0bgleeson>
hello o7
dhruvasagar has quit [Ping timeout: 264 seconds]
<cored>
hi
<r0bgleeson>
hi cored o7
<cored>
r0bgleeson: hello
<gnufied>
perhaps temperature today?
<yxhuvud>
r0b: he is waving. o is the head.
<r0bgleeson>
ahhh
<r0bgleeson>
why not o/ -_-
<ljarvis>
it's a salute
<yxhuvud>
maybe he don't like heiling.
<r0bgleeson>
it looks like someone with a pistol to their head
<ljarvis>
look at it clearly
<maloik_>
o7 is definately scratching head emoji
<ljarvis>
it's a salute, but definitely better applied for scratching the head
<gnufied>
lol
<r0bgleeson>
or suicide
<maloik_>
o/ is a salute
ruby-lang288 has joined #ruby-lang
<ljarvis>
no that's a wave
<maloik_>
do you see the slash moving? DO YOU????
<maloik_>
:-)
<ljarvis>
so it's a nazi salute, perhaps
<maloik_>
oh I see what you mean by salute now
<maloik_>
military kind of salute
<maloik_>
gotcha
<ljarvis>
right
<cored>
ljarvis: I kept trying yesterday with mechanize, without any sucess. Even when the page result have the other table, it seems that the returned content after submitting the form thought mechanize doesn't have it
<r0bgleeson>
oi oi sir
<r0bgleeson>
reporting for duty
<r0bgleeson>
o7
<yorickpeterse>
wat
<ljarvis>
cored: are you sure it's being submitted properly?
spike|spiegel has quit [Ping timeout: 260 seconds]
<cored>
ljarvis: I'm sending the same info that I use in the form through the browser
<ljarvis>
and the responses are different?
<cored>
ljarvis: and I see the new form action changing to /update as in the browse
barttenbrinke has joined #ruby-lang
spike|spiegel has joined #ruby-lang
mikecmpbll has joined #ruby-lang
heftig has quit [Ping timeout: 268 seconds]
enebo has joined #ruby-lang
ruby-lang288 has quit [Quit: Page closed]
<cored>
ljarvis: are you still there?
<ljarvis>
cored: yep
<cored>
now I confirm what I said, the new page from the submitted form has a h2 heading in it
pothibo has joined #ruby-lang
vladgh has joined #ruby-lang
pothibo has quit [Read error: Connection reset by peer]
<cored>
with the value Reisende
RickHull has quit [Quit: Leaving.]
<cored>
but if I do subitted_form.search('//table').size to get all the tables
<cored>
the size just says 1
<ljarvis>
im not really sure how to help, do you have actual code to run and work?
<cored>
ljarvis: sure, wait
CoreData has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
<maloik_>
quick question about api design... is it a best practice to basically 'accepts_nested_attributes' or should people first create the 'parent' object before creating any associated objects via separate api calls ?
<cored>
ljarvis: can you clone that ? you can run the spec like rspec spec/integration/aldi_spec.rb
diegoviola has joined #ruby-lang
<ljarvis>
maloik_: i would say it's fine to create associations at the same time, the client doesn't care about data structure
lfox has quit [Quit: ZZZzzz…]
Cygnus has joined #ruby-lang
vladgh has quit [Ping timeout: 264 seconds]
Cygnus is now known as Guest49533
retro|cz has joined #ruby-lang
<maloik_>
but they do care (maybe anyway) about complex api calls
<maloik_>
just wanted to check... I just broke a test because the nested attributes aren't getting validated properly
<maloik_>
:/
<maloik_>
probably because they're still in memory
heftig has joined #ruby-lang
Guest49533 has left #ruby-lang [#ruby-lang]
vladgh has joined #ruby-lang
Cygnus_ has joined #ruby-lang
<ljarvis>
cored: you're not grabbing the submitted page anywhere?
<ljarvis>
i dont understand
<ljarvis>
you dont even submit the form
Cygnus_ has left #ruby-lang [#ruby-lang]
<cored>
ljarvis: I was doing it before, but at the moment as I'm debugging I remove some of the code and went ahead and use pry to submit it by myself and see
<ljarvis>
uh
<ljarvis>
so when i said "do you have actual code to run and work" you meant to say "no"
<ljarvis>
you haven't once shown me what you're doing to cause the problem
<ljarvis>
that's what i was hoping to see
<cored>
oki
<cored>
let me push some changes then
<cored>
wait a sec
bzalasky has quit [Remote host closed the connection]
MaddinXx has joined #ruby-lang
simoz has joined #ruby-lang
solars has quit [Ping timeout: 244 seconds]
bjh13 has quit [Ping timeout: 260 seconds]
<cored>
ljarvis: check it out now
<ljarvis>
cored: and then spec passes?
<ljarvis>
the*
<cored>
ljarvis: yeap it's passes
<cored>
ljarvis: but that's wrong because I'm forcing it to pass at this time
* ljarvis
jumps out the window
<cored>
ljarvis: what I don't know what's happening is the fact that I can see in the source from the browser two tables but when I issue //table to get all the tables I just get one
<cored>
that's the problem I have if I could get the second table I can ask for the info in it and just extract what I need
solars has joined #ruby-lang
banisterfiend has joined #ruby-lang
<ljarvis>
is this for searching trains?
<cored>
yes
<ljarvis>
and the table you want returns results?
<cored>
yes
<cored>
I'm using the exact same data from the form
<cored>
there is no API on that site
h_kon has quit [Remote host closed the connection]
<ljarvis>
no doubt, we dont have one either for 120 million reasons (i work at a place that does rail travel)
<ljarvis>
what's the url for your search?
vlad_starkov has quit [Remote host closed the connection]
<ljarvis>
because without seeing anything, my guess is results are pulled in via an external api, and unless they clog up requests.. they're probably loading that table via javascript
soba has quit [Ping timeout: 252 seconds]
<ljarvis>
obviously if that's happening, you can't scrape them without having javascript
<ljarvis>
aka how you're doing it now
<cored>
ljarvis: I see
<cored>
ljarvis: can I talk you in private for the others details?
<rue|w>
Such as ASL
<ljarvis>
cored: i have too many windows open and im trying to juggle work too, if you have a url you can paste it there but i'd rather talk in here so others can help too
<ljarvis>
when I search it asks me to select an option..
<cored>
the parameters that I set were this Berlin FHT
<ljarvis>
even though i have
MrZYX|off is now known as MrZYX
<cored>
Dresden NST
solars has quit [Ping timeout: 272 seconds]
<ljarvis>
that doesn't exist, there's 1 option
<cored>
and the date was 1.12.2013
<cored>
oh ok, it's getting loaded using JS
<cored>
so what you should do now
<cored>
is checking one city
<cored>
and then check it back to Berlin FHT
CoreData has quit [Quit: CoreData]
<ljarvis>
is this a public service?
<cored>
the other select box will change and then you can pick Dresden NST and then add the date 1.12.2013 and hit submit
<cored>
ljarvis: nop
<ljarvis>
thank god
CoreData has joined #ruby-lang
lun__ has joined #ruby-lang
<ljarvis>
cored: right, so if it's being loaded via js then you can't scrape it like this
<cored>
ljarvis: but I thought that if I was adding the value to the form lke forms[0]["name_of_combo"] = value
<cored>
it should work
<workmad3>
cored: hmm... why when I select the 18th Nov in the calendar does the date box get filled in with 'NaN.NaN.NaN'? :D
<ljarvis>
cored: im talking about the results
<ljarvis>
workmad3: srsly
<cored>
ljarvis: oh, I see what you mean now
<whitequark>
workmad3: batman
<cored>
ljarvis: because of the div inside the tabs right?
<cored>
workmad3: :-)
<ljarvis>
sure
<workmad3>
btw, I'd have run a search, but the the drop-downs had no other values and every time I tried to do a search it told me to select a value first :(
<ljarvis>
^
<yorickpeterse>
PFFF I WROTE TOO MUCH NON CODE TODAY
<apeiros>
yorickpeterse: stop irc-ing then
<mikecmpbll>
^
<cored>
ljarvis: after hitting one of the tabs on top of the tables, I notice a new request
<ljarvis>
you pipe down and keep writing those readme's buddy
<yorickpeterse>
apeiros: I AM NOT
<yorickpeterse>
I AM WRITING MERKBOWN
<yorickpeterse>
Not in capitals
<ljarvis>
cored: they're loaded via js, you can't scrape them like this, end of story
<workmad3>
yorickpeterse: you're writing readmes in markdown?
<mikecmpbll>
that's code, yo.
<cored>
ljarvis: oki, which is the other way to scrap that out ?
<workmad3>
cored: or, more accurately... if you want to scrape them, you're going to need to use a headless browser that can deal with JS, which ain't mechanize
<yorickpeterse>
workmad3: No, PDF/HTML documents
<ljarvis>
you can use phantom and mechanize
<cored>
workmad3: got it
havenwood has quit []
<ljarvis>
but in general, i would not
<workmad3>
^^ ditto
<yorickpeterse>
fun fact: more often than not you don't even need JS to get to the booty
<ljarvis>
i wouldn't be scraping js responses in general
<cored>
ljarvis: but what if I need this information?
<ljarvis>
and you'd have to poll for changes
<cored>
ljarvis: you said I would not
<cored>
:-)
<ljarvis>
cored: you pay the thousands of dollars to rail companies to access their apis
<yorickpeterse>
or their PHP APIs
<yorickpeterse>
lol
<ljarvis>
all soap yo
CoreData has quit [Ping timeout: 272 seconds]
<mikecmpbll>
i'm a soap dodger.
<yorickpeterse>
ljarvis: so this one API we use
<yorickpeterse>
they show your rate limits
<yorickpeterse>
in a fucking Docuwiki wiki
<workmad3>
woo!
<yorickpeterse>
requesting the rate limit counts up to the limit
<cored>
ljarvis: sounds great, and I would love to. But I don't control that part of the bussiness :-)
<cored>
ljarvis: so, phantom and mechanize will be
<ljarvis>
yorickpeterse: :D
<yorickpeterse>
there's no other way to get it, so we have to keep track of it ourselves using memcached
<ljarvis>
cored: have fun
<ljarvis>
also
<ljarvis>
watch out when the company comes back to sue you
canton7 has quit [Remote host closed the connection]
<ljarvis>
mikecmpbll: like who?
<ljarvis>
cored: yes
<freedrull>
is anyone here in tokyo?
<cored>
ljarvis: neat
<yorickpeterse>
workmad3: actually there's very little you can legally do about scraping
<mikecmpbll>
ljarvis: i applied for a role at a company a few years ago whose sole business was aggregating travel pricing info and selling it onto comparison websites, 90% of the data they aggregated was through screenscraping
<ljarvis>
cored: fwiw i've only ever used it for testing so can't provide much
<yorickpeterse>
unless you actively resell their data
<ljarvis>
which they do
<ljarvis>
that's the confusing part for me
<ljarvis>
i get screen scraping, but for financial gain means you're breaking the law (at least i thought)
rwk1 has joined #ruby-lang
<ljarvis>
if their TOS mention it
<yorickpeterse>
depends on what the data is
<mikecmpbll>
ljarvis: nah, read up about it, it's notoriously difficult to sue for screen scraping.
<ljarvis>
heh fair enough
<workmad3>
yorickpeterse: and whether it's publicly available or not
lacrosse_ has joined #ruby-lang
lacrosse has quit [Ping timeout: 272 seconds]
<workmad3>
yorickpeterse: if the data is behind some form of walled garden, and to gain access you explicitly clicked through a licence agreement saying you are not allowed to scrape this data with any form of automated program, then there's more that can be legally done
<yorickpeterse>
of course
<yorickpeterse>
that's how Aaron got screwed over
<yorickpeterse>
(plus a fucked legal system)
sausyn has joined #ruby-lang
lfox has joined #ruby-lang
breakingthings has joined #ruby-lang
barttenbrinke has quit [Remote host closed the connection]
barttenbrinke has joined #ruby-lang
<mikecmpbll>
anyway, if anyone's that fussed about screen scraping put in a reCAPCHA
<yorickpeterse>
those aren't exactly bullet proof
<mikecmpbll>
no?
<freedrull>
my company's business is basically screen scraping :\
<yorickpeterse>
if anything they annoy users more than computers
<mikecmpbll>
i would guess they're good enough to stop 99% of would-be scrapers
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
<cored>
ljarvis: quick question, to send a request to a form which have csrf protection, do I have to make two requests if I'm using farday one for getting the token and the other one to sending the actual post request?
<cored>
or is there a easier way with a middleware or something like that, that you know of
<ljarvis>
cored: no that's not how it works
Snibble has joined #ruby-lang
<cored>
?
<ljarvis>
cored: use mechanize...
mistym has joined #ruby-lang
canton7 has joined #ruby-lang
<cored>
but then again I will have the same javascript issue
ecnalyr has quit [Read error: Connection reset by peer]
ecnalyr has joined #ruby-lang
mistym_ has joined #ruby-lang
Snibble1 has joined #ruby-lang
bzalasky has quit [Ping timeout: 252 seconds]
<ljarvis>
you have that issue using mechanize or faraday
apeiros has joined #ruby-lang
mistym_ has quit [Remote host closed the connection]
mistym has quit [Ping timeout: 246 seconds]
Snibble has quit [Ping timeout: 246 seconds]
<bougyman>
I thought mechanize handled csrf better?
<bougyman>
I haven't had a problem using it.
<ljarvis>
it does, that was my point
tylersmith has quit [Remote host closed the connection]
diegoviola has quit [Ping timeout: 246 seconds]
<ljarvis>
but cored is scraping a website that uses js to generate content
<bougyman>
ah, I see.
macmartine has joined #ruby-lang
rue|w has quit [Remote host closed the connection]
<cored>
bougyman: yeap, the js part is the probem
<cored>
I'm trying with a lot of things by now
<cored>
have like 3 days trying it
<cored>
capybara can't see the dropdown
<ljarvis>
3 days
<ljarvis>
wow
rue|w has joined #ruby-lang
<gnufied>
use something built on top of phantomjs
<gnufied>
so as you have a js runtime
<ljarvis>
your company has a big budget just for scraping a website
<cored>
ljarvis: thinking in another thing now, after submiting the form with mechanize I will get a new object with the returned page, but to access it using watr/capybara I will have to know which is the URL, correct?
<ljarvis>
you would, yes, because you'd need to wait until js delivered results and then revist that page
<ljarvis>
or you poll it somehow
<cored>
I'm guessing that it will be the same URI from mechanize
thelorax123 has quit [Remote host closed the connection]
dalegrib1le80 has quit [Read error: Connection reset by peer]
Coincide_ has joined #ruby-lang
Coincidental has quit [Write error: Broken pipe]
Coincide_ has quit [Read error: Connection reset by peer]
Coincidental has joined #ruby-lang
ddd has quit [Ping timeout: 252 seconds]
<yorickpeterse>
ugh, all these blags about "SANDI MATZ SAYSS!!!!!!" are getting a bit old
Tearan has joined #ruby-lang
<cored>
yorickpeterse: Matz ?
<yorickpeterse>
it's a pun
<cored>
she is quite nice lady I met her at Rubyconf
<yorickpeterse>
her actual name is Sandi Metz
<yorickpeterse>
Oh I know, I'm not criticising her
<yorickpeterse>
just the cult following of her rules, which if you remove the actual numbers (e.g. the method line count) make sense
ecnalyr has quit [Ping timeout: 245 seconds]
<yorickpeterse>
It might also be that I just find articles/talks about code quality *insanely* boring
sdpy has joined #ruby-lang
<cored>
yorickpeterse: probably
<yxhuvud>
Some of her talks are really good, and some makes me want to fetch my YAGNI bat
<cored>
but most of those things wre common sense in my honest opinion
<yorickpeterse>
yxhuvud: her book is pretty good
<cored>
been doing most of her advices seems reading the thoughtworks anthology article 'object oriented calestenics'
<yorickpeterse>
though people, as always, take the numbers literally
<yorickpeterse>
"OMG 5 LINES IS THE MAX OR YOU'RE FIRED"
<cored>
yorickpeterse: he
<cored>
yorickpeterse: that's kinda funny
<cored>
I would go with 2 lines or you are fire
<cored>
s/fire/fired
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yorickpeterse>
You're a terrible person
sdpy has quit [Read error: No route to host]
momomomomo has joined #ruby-lang
<cored>
I like the fact that she is reminding people with practical advice how to get better at coding, there is a lot of Rails way of doing things around
<yorickpeterse>
Don't get me started on that part
<cored>
yorickpeterse: I got the exact same discussion at the conference, the problem was that I had a lot of rum in my body
<yorickpeterse>
heh, good thing I hardly drink
<yorickpeterse>
People laughed when I ordered tea in a French bar during dotRB :<
sevvie has joined #ruby-lang
<yorickpeterse>
granted it was pretty funny
<cored>
yorickpeterse: I'm planning on switch to tea too
<cored>
great advice
Coincidental has quit [Remote host closed the connection]
<yorickpeterse>
black tea bra
* cored
adding that advice to the Sandi Metz rules
<yorickpeterse>
it's the new gatorade
<yorickpeterse>
Lifting at the gym? Have some Rooibos
<yorickpeterse>
Kickboxing while deploying? Black tea!
Coincidental has joined #ruby-lang
Coincidental has quit [Read error: Connection reset by peer]
Coincidental has joined #ruby-lang
<yorickpeterse>
I should probably start a talk show about all this
<yorickpeterse>
"Hating on thangs with Yorick"
<cored>
you are such a hater
<cored>
like it :-D
iliketurtles has quit [Quit: zzzzz…..]
ykk` has quit [Quit: ykk`]
<yorickpeterse>
I can get pretty worked up about things that are close to me
loincloth has joined #ruby-lang
<yorickpeterse>
especially if a bunch of neckbeards go around making things hard for others
dalegribble80 has joined #ruby-lang
<yorickpeterse>
grrrr neckbeards
* cored
go to the bathroom to shave
LanceHaig has quit [Changing host]
LanceHaig has joined #ruby-lang
<yorickpeterse>
inform us on the results using pictures
<yorickpeterse>
and a 200 page essay
Snibble has joined #ruby-lang
lun__ has quit [Remote host closed the connection]
Onixs_ has quit [Read error: Connection reset by peer]
itsraining has quit [Quit: itsraining]
rwk1 has quit [Remote host closed the connection]
rwk1 has joined #ruby-lang
mistym_ has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
mistym has quit [Disconnected by services]
mistym_ is now known as mistym
tris has quit [Excess Flood]
rwk1 has quit [Ping timeout: 272 seconds]
tris has joined #ruby-lang
musty has joined #ruby-lang
bjh13 has joined #ruby-lang
Thanatermesis has left #ruby-lang ["ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ"]
dingus_khan has joined #ruby-lang
ruby-lang283 has joined #ruby-lang
CaptainJet has quit []
benwoody has quit [Quit: benwoody]
jerrytgarcia has joined #ruby-lang
dingus_khan has quit [Ping timeout: 272 seconds]
Cakey has joined #ruby-lang
momomomomo has joined #ruby-lang
momomomomo has quit [Client Quit]
ruby-lang283 has quit [Ping timeout: 250 seconds]
Coincidental has quit [Remote host closed the connection]
jamesn has joined #ruby-lang
Coincidental has joined #ruby-lang
ezkl has joined #ruby-lang
ezkl has quit [Max SendQ exceeded]
Cakey has quit [Ping timeout: 260 seconds]
ezkl has joined #ruby-lang
saarinen has joined #ruby-lang
dingus_khan has joined #ruby-lang
sevvie has quit [Quit: leaving]
mistym has quit [Remote host closed the connection]
ezkl has quit [Client Quit]
vsorlov has joined #ruby-lang
Coincidental has quit [Ping timeout: 268 seconds]
bjh13 has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby-lang
bri has left #ruby-lang [#ruby-lang]
ItSANg___ has quit [Quit: Leaving...]
Snibble has quit [Quit: Leaving.]
vsorlov has quit [Ping timeout: 251 seconds]
yfeldblu_ has joined #ruby-lang
Onixs_ has joined #ruby-lang
Onixs has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 272 seconds]
Snibble has joined #ruby-lang
bazaretas has quit [Ping timeout: 252 seconds]
yalue has quit [Quit: Leaving]
Zeeo has joined #ruby-lang
Andrevan has joined #ruby-lang
arBmind has joined #ruby-lang
vsorlov has joined #ruby-lang
Oloryn_lt2 has quit [Read error: Connection reset by peer]
<Zeeo>
Hello again gentlemen, I need a method like uniq that does, unlike uniq, remove 'all' the duplicates such as [1, 1, 1, 1, 2, 3].**** #=>[2, 3]. I was looking for an implementation of the Array#uniq method to see how it works but from what I learned it looks like it's not written in ruby
thelorax123 has quit [Remote host closed the connection]
Coincidental has joined #ruby-lang
saarinen has quit [Quit: saarinen]
thelorax123 has joined #ruby-lang
Oloryn_lt2 has joined #ruby-lang
bazaretas has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
saarinen has joined #ruby-lang
bf4 has quit [Ping timeout: 260 seconds]
<rue>
So only_uniques?
<atmosx>
Zeeo: it's C, you could write a method that does that yourself though
bazaretas has quit [Quit: Leaving]
bazaretas has joined #ruby-lang
musty has quit [Ping timeout: 265 seconds]
<whitequark>
Zeeo: uniq uses a hash table internally
<whitequark>
knowing that, the implemenetation should be trivial
<Zeeo>
atmosx: I hope so, I was looking for the source code in order to make it simpler for me to understand how Array#uniq exactly retrieves values and how it does remove them
<atmosx>
Zeeo: premature implementation is the mother of all evils
<Zeeo>
atmosx: the one thing I need is a variable that stores all duplicates
<atmosx>
err
<atmosx>
optimization
<atmosx>
I'd go first create a version that it's simple and I understand every step. If that happens to be too slow for large arrays, then I'd take a look elsewhere.
<MrZYX>
array.select {|e| array.count(e) == 1 }, O(n^2) but who cares :P
<cored>
rue: it's just all the 4 letter alpha sequence on a word
vlad_sta_ has quit [Ping timeout: 252 seconds]
jsullivandigs has quit [Ping timeout: 252 seconds]
<cored>
probably Iwill have to iterate like I was
<rue>
#each_cons + #map?
<rue>
Or summat
DEac- has quit [Read error: Connection reset by peer]
<cored>
summat
<cored>
hm
<rue>
Or select I guess rather than map. If you need to discard nonalpha
DEac- has joined #ruby-lang
<cored>
rue: shouldn't each_cons be chars
<cored>
?
jsullivandigs has joined #ruby-lang
Guest2994 has quit [Read error: Connection reset by peer]
MaddinXx has quit [Quit: Leaving...]
sevvie has joined #ruby-lang
ItSANgo has joined #ruby-lang
<rue>
…Maybe? Not sure what you’re asking
albioner has joined #ruby-lang
<Zeeo>
Guys, I'm asking you for some enlightment, tell me if this is ok for you: started working this morning, Regexp.new("a|b", Regexp::IGNORECASE) #=> /a|b/i, wich was what I wanted, switch off computer, go back to work, now Regexp.new("a|b", Regexp::IGNORECASE) #=> (?i-mx:a|b). Why is that? did I do something wrong that made my regex class want to complicate my work?