apeiros changed the topic of #ruby 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 || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
rpattabi has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 272 seconds]
nateberkopec has joined #ruby
fgo has joined #ruby
juarlex has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 260 seconds]
juarlex has joined #ruby
dayepa has joined #ruby
m00nlight__ has quit [Quit: Konversation terminated!]
Hobogrammer_ has quit [Ping timeout: 252 seconds]
dayepa1 has quit [Ping timeout: 276 seconds]
gregoriokusows-1 has joined #ruby
burlyscudd has joined #ruby
asteros has quit [Quit: asteros]
dayepa1 has joined #ruby
asteros has joined #ruby
juarlex has quit [Ping timeout: 245 seconds]
dayepa has quit [Ping timeout: 276 seconds]
aryaching has quit [Ping timeout: 260 seconds]
gregoriokusowski has quit [Ping timeout: 260 seconds]
dayepa has joined #ruby
psyl0n has joined #ruby
cbetta_afk is now known as cbetta
tt1187 has quit [Ping timeout: 252 seconds]
aspires has joined #ruby
momomomomo has joined #ruby
psst has quit [Ping timeout: 246 seconds]
dayepa1 has quit [Ping timeout: 276 seconds]
burlyscudd has quit [Ping timeout: 276 seconds]
tt1187 has joined #ruby
Emmanuel_Chanel has joined #ruby
troyready has quit [Ping timeout: 272 seconds]
thenovices has joined #ruby
momomomomo has quit [Client Quit]
petey has quit [Remote host closed the connection]
b00stfr3ak has quit [Ping timeout: 248 seconds]
dayepa1 has joined #ruby
fedesilva has joined #ruby
gusblan has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
rootshift has joined #ruby
Vivekananda has joined #ruby
freerobby has joined #ruby
cj3kim has joined #ruby
Azure has joined #ruby
Virtualize has quit [Quit: Leaving...]
thenovices has quit [Ping timeout: 245 seconds]
dayepa1 has quit [Ping timeout: 276 seconds]
petey has joined #ruby
dayepa has joined #ruby
senj has quit [Quit: Textual IRC Client: www.textualapp.com]
sassamo has quit [Remote host closed the connection]
sassamo has joined #ruby
Red_Onyx has joined #ruby
psyl0n has quit [Remote host closed the connection]
kitak_ has joined #ruby
alekst has joined #ruby
benlieb has quit [Quit: benlieb]
dayepa has quit [Ping timeout: 276 seconds]
Xeago has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
ce_afk is now known as cescalante
kuzushi has joined #ruby
sassamo has quit [Ping timeout: 272 seconds]
pel_daniel has left #ruby [#ruby]
aryaching has joined #ruby
Deele has quit [Ping timeout: 260 seconds]
fgo has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
RagingDave has joined #ruby
dayepa1 has joined #ruby
guardianx has joined #ruby
alekst has quit [Quit: Computer has gone to sleep.]
Hobogrammer_ has joined #ruby
RagingDave has quit [Client Quit]
benzrf has joined #ruby
<benzrf> whats new
<benzrf> new adventure time and new archer tonite!
ndrei has quit [Ping timeout: 245 seconds]
sLi_ has joined #ruby
vlad_starkov has joined #ruby
dayepa has joined #ruby
teddyp1cker has joined #ruby
psst has joined #ruby
SilentHobo has quit [Ping timeout: 276 seconds]
troyready has joined #ruby
dayepa1 has quit [Ping timeout: 276 seconds]
snath has quit [Ping timeout: 252 seconds]
dayepa1 has joined #ruby
VTLob has quit [Quit: VTLob]
vlad_starkov has quit [Read error: Connection reset by peer]
lifestream has joined #ruby
lifestream has joined #ruby
deens has quit [Remote host closed the connection]
dayepa has quit [Ping timeout: 276 seconds]
teddyp1cker has quit [Ping timeout: 265 seconds]
ndrei has joined #ruby
nide has quit [Quit: Leaving]
psyl0n has joined #ruby
Jdubs has quit [Remote host closed the connection]
dayepa has joined #ruby
cj3kim_ has joined #ruby
dayepa1 has quit [Ping timeout: 276 seconds]
cj3kim has quit [Read error: Connection reset by peer]
binw has quit [Read error: Connection reset by peer]
byprdct has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Megtastique has quit []
gusblan has quit [Remote host closed the connection]
thenovices has joined #ruby
mneorr has quit [Remote host closed the connection]
dayepa1 has joined #ruby
vlad_starkov has joined #ruby
deception has quit [Quit: Goodbye]
mneorr has joined #ruby
awkwords has quit [Quit: Connection closed for inactivity]
kevind has quit [Quit: kevind]
m00nlight has joined #ruby
troyready has quit [Ping timeout: 245 seconds]
benlieb has joined #ruby
psst has quit [Ping timeout: 260 seconds]
SilentHobo has joined #ruby
geggam has quit [Remote host closed the connection]
NCS_One has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
<NCS_One> hi
mneorr has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
dayepa has joined #ruby
nowthatsamatt has joined #ruby
<NCS_One> can someone help me with this error on Ocra: /var/lib/gems/1.8/gems/ocra-1.3.1/bin/ocra:18:in `quote': can't convert nil into String (TypeError)
shadoi has joined #ruby
thenovices has quit [Ping timeout: 248 seconds]
binw has joined #ruby
Hobogrammer_ has quit [Read error: Operation timed out]
lockweel has quit [Ping timeout: 272 seconds]
dayepa1 has quit [Ping timeout: 276 seconds]
cj3kim_ has quit [Ping timeout: 245 seconds]
dayepa1 has joined #ruby
predator217 has joined #ruby
<shevy> NCS_One seems like sloppy code in that gem
<shevy> you also seem to run an ancient debian ruby
Spami_ has quit [Quit: This computer has gone to sleep]
Virtualize has joined #ruby
Liquid-- has quit [Quit: Computer has gone to sleep.]
<NCS_One> shevy: ruby 1.9.3
predator117 has quit [Read error: Operation timed out]
<shevy> unlikely
<shevy> I have 1.9.3 myself and the site dir is at /usr/lib/ruby/gems/1.9.1/gems/
CpuID has joined #ruby
<shevy> you run a debian-based system right?
mehlah has quit [Quit: Linkinus - http://linkinus.com]
<shevy> "ocra" is the ocra gem at https://rubygems.org/gems/ocra ?
dayepa has quit [Ping timeout: 276 seconds]
<shevy> to have a path 1.8 in a directory while you have a version that is not 1.8.x shows that someone or something messed with the system
fphilipe has joined #ruby
dayepa has joined #ruby
IcyDragon has joined #ruby
yarou has joined #ruby
yarou has quit [Changing host]
yarou has joined #ruby
sassamo has joined #ruby
<bnagy> using gems from 1.8 ABI with 1.9 is also unlikely to be fun
byprdct has joined #ruby
tkuchiki has joined #ruby
zz_karupanerura is now known as karupanerura
<NCS_One> shevy: yes, ubuntu
IceDragon has quit [Disconnected by services]
IcyDragon is now known as IceDragon
<shevy> Hanmac here also uses ubuntu
<bnagy> NCS_One: long story short, I'd try installing 1.9 properly then reinstall the gem
dayepa1 has quit [Ping timeout: 276 seconds]
blackmesa has quit [Ping timeout: 248 seconds]
figgleberry has joined #ruby
dayepa1 has joined #ruby
<benzrf> i use it too B)
<NCS_One> I'm going to try to uninstall and install all
<bnagy> benzrf: wow, that's super softcore for you, dude. I would have picked you as a gentoo or slack user
<bnagy> with twm
sLi_ has quit [Remote host closed the connection]
dayepa has quit [Ping timeout: 276 seconds]
fphilipe has quit [Ping timeout: 252 seconds]
psyl0n has quit [Remote host closed the connection]
<bnagy> or maybe awesome, so you can tile all your vim windows
aspires has quit []
sLi_ has joined #ruby
dayepa has joined #ruby
<shevy> benzrf one day you will become a powerful user
fgo has joined #ruby
<shevy> and the unity world can be left behind
tylersmith has quit [Remote host closed the connection]
momomomomo has joined #ruby
NCS_One has quit [Quit: leaving]
habanany has joined #ruby
dayepa1 has quit [Ping timeout: 276 seconds]
figgleberry has quit [Ping timeout: 272 seconds]
Hobogrammer_ has joined #ruby
rudisimo has joined #ruby
habanany has quit [Client Quit]
dayepa1 has joined #ruby
byprdct has quit [Ping timeout: 272 seconds]
gusblan has joined #ruby
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
mocfive has quit [Remote host closed the connection]
Hamburglr has joined #ruby
asteros has quit [Quit: asteros]
wildroman2 has quit [Remote host closed the connection]
gusblan has quit [Remote host closed the connection]
amacgregor__ has joined #ruby
sLi_ has quit [Ping timeout: 272 seconds]
dweeb_ has quit [Quit: Computer has gone to sleep.]
benlieb has quit [Quit: benlieb]
dayepa has quit [Ping timeout: 276 seconds]
cbetta is now known as cbetta_afk
dayepa has joined #ruby
mojjojo has quit [Quit: mojjojo]
amacgregor_ has quit [Ping timeout: 246 seconds]
SilentHobo has quit [Ping timeout: 248 seconds]
gusblan has joined #ruby
flubba has quit [Remote host closed the connection]
<benzrf> bnagy: haha rly?
mary5030 has joined #ruby
<benzrf> bnagy: i do not see the point in making things hard for yourself
<benzrf> using slax or w/e does not give significant advantages over ubuntu so why go to the trouble ?
flubba has joined #ruby
stryek has joined #ruby
<Hamburglr> could someone help me with using rbenv? I have a gem installed and trying to run it gets this error: https://gist.github.com/anonymous/166c0c9aca9ff31758ba as far as I can tell it's because I don't have my gem path right but I don't know where to specify it
cescalante is now known as ce_afk
<benzrf> i tried xmonad and it was p nice but my screen is not nearly big enough to really get the most out of it
dayepa1 has quit [Ping timeout: 276 seconds]
habanany has joined #ruby
lfox has joined #ruby
lfox has quit [Client Quit]
deens has joined #ruby
lfox has joined #ruby
dayepa1 has joined #ruby
robustus has quit [Ping timeout: 252 seconds]
Lewix has joined #ruby
gusblan has quit [Ping timeout: 245 seconds]
binaryhat has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
robustus has joined #ruby
flubba has quit [Ping timeout: 252 seconds]
dayepa has joined #ruby
burlyscudd has joined #ruby
sLi_ has joined #ruby
Alina-malina has quit [Ping timeout: 252 seconds]
dayepa1 has quit [Ping timeout: 276 seconds]
asteros has joined #ruby
troyready has joined #ruby
Alina-malina has joined #ruby
Spami_ has joined #ruby
dayepa1 has joined #ruby
Hobogrammer_ has quit [Ping timeout: 276 seconds]
dayepa has quit [Ping timeout: 276 seconds]
burlyscudd has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby
dayepa has joined #ruby
earthquake has quit [Quit: earthquake]
agjacome has quit [Ping timeout: 272 seconds]
shadoi has quit [Quit: Leaving.]
vlad_starkov has quit [Read error: Connection reset by peer]
dayepa1 has quit [Ping timeout: 276 seconds]
<shevy> benzrf do you use debian ruby?
petey has quit [Remote host closed the connection]
dayepa1 has joined #ruby
otherj has joined #ruby
<benzrf> idk
<benzrf> benzrf@benzrf-laptop:~$ ruby -v
<benzrf> ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
olivier_bK has quit [Ping timeout: 245 seconds]
dayepa has quit [Ping timeout: 276 seconds]
<shevy> hmm
sLi_ has quit [Remote host closed the connection]
colonolGron has left #ruby [#ruby]
<benzrf> bnagy: what do you use?
<bnagy> jruby
<shevy> Hamburglr seems as if you miss rack. I dont use rbenv myself, I compile everything from source including ruby
sLi_ has joined #ruby
dayepa has joined #ruby
<benzrf> bnagy: *OS
<benzrf> also, why
<bnagy> osx on desktops, linux on servers
<benzrf> hmmmmmmm ok
dayepa1 has quit [Ping timeout: 276 seconds]
<Hamburglr> shevy: thanks but it is installed. I found someone else having the same problem here: http://stackoverflow.com/questions/16867516/rbenv-command-line-gems-setup-with-system-install but unfortunately rbenv rehash isn't making a difference for me
psyl0n has joined #ruby
nullsign has quit [Quit: Changing server]
<RubyPanther> rbenv generally does compile everything from source
<shevy> it falls flat on the face in this case
psyl0n has quit [Remote host closed the connection]
psyl0n has joined #ruby
psyl0n has joined #ruby
<shevy> RubyPanther what do you use to get the latest ruby running?
MrZYX is now known as MrZYX|off
<RubyPanther> Hamburglr: it looks like your gem got installed with the system ruby or something
marr has quit [Ping timeout: 272 seconds]
sLi_ has quit [Ping timeout: 272 seconds]
dayepa has quit [Ping timeout: 276 seconds]
dayepa1 has joined #ruby
<Hamburglr> RubyPanther: I don't think it's that either, I can see the gems in /usr/local/opt/gems
<RubyPanther> Hamburglr: you should remove other rubies, or fix your PATH so that the rbenv bin dir is before the system bin dirs. And then install the gem
<benzrf> yo if anybody watches adventure time here the new episode can be dl'd @ http://www.reddit.com/r/downloadtime/comments/1v5ju9/s05e22b_apple_wedding/
<benzrf> </offtopic.
<shevy> Hamburglr that is a very unusual path
DrShoggoth has quit [Quit: Leaving]
<RubyPanther> Right, the gems should be in with the rbenv stuff
<RubyPanther> but normally you install rbenv in userspace, not in some crufty local unix dir
gusblan has joined #ruby
lyanchih_ has joined #ruby
freerobby has quit [Quit: Leaving.]
<shevy> one day people will fearlessly grab the source again
<RubyPanther> shevy: I use ruby-build as a plugin, the releases show up within a few hours usually
shadoi has joined #ruby
<RubyPanther> I have at times build a custom one, you just stick it in the right dir (or symlink it) and it shows up
<postmodern> shevy, yeah building from source isn't hard
<postmodern> shevy, ./configure && make && sudo make install
<postmodern> shevy, only catch is you have to install all the libraries ruby needs, otherwise certain things are disabled
gusblan has quit [Remote host closed the connection]
dayepa has joined #ruby
gusblan has joined #ruby
cj3kim has joined #ruby
caesura has joined #ruby
momomomomo has quit [Quit: momomomomo]
<shevy> yes but I am ready to paste the relevant links!
<shevy> libyaml
<shevy> zlib
<shevy> throw it at me!
dayepa1 has quit [Ping timeout: 276 seconds]
<shevy> Hamburglr when everything else fails, try the source :>
mlpinit has quit [Remote host closed the connection]
<shevy> ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.0.tar.bz2
<shevy> hmm readline possibly, can be annoying
Spami has quit [Read error: Connection reset by peer]
<RubyPanther> yeah don't fly without readline
zarul has quit [Remote host closed the connection]
<shevy> depends a lot on the system. on slackware things are smooth and perfect, on ubuntu they are not because the users are not very knowledgable
cycorld has joined #ruby
dayepa1 has joined #ruby
<shevy> and so much is split up
<shevy> well
<RubyPanther> on slackware people fix their problems before they admit to them, so it always looks smooth ;)
<postmodern> copy/paste those commands, should be good
<shevy> postmodern, pacman on archlinux I group together with slackware
<shevy> so people who use either these distributions are usually clever
<RubyPanther> Or, they cry a lot
<postmodern> shevy, im on fedora, does that make me dumb :P
<postmodern> shevy, or shall i say doomb
<shevy> yes
<shevy> sorry :(
<shevy> I think slackware is slowly dying
<RubyPanther> fedora is for devs, historically
<shevy> #archlinux +1600 vs. #slackware ~+200
<postmodern> shevy, jokes on you, i ran Gentoo for years, i've paid my dues
<shevy> hah!
<shevy> gentoo!
<shevy> that python shit!
zxd has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
kep has quit [Quit: WeeChat 0.4.2]
zarul has joined #ruby
<postmodern> i believe capistrano was a gentoo project originally
<benzrf> come now python is pretty nice
<shevy> wheee... +1040 people on #gentoo
<RubyPanther> gentoo was cool, that was the difference with fedora. gentoo drew off the fanboys and let fedora focus on bridging the server/workstation gap
cj3kim has quit [Remote host closed the connection]
kitak has joined #ruby
<postmodern> shevy, only the package manager was python, the package definitions were actually bash
<shevy> benzrf I want a ruby centric distribution, not portage/emerge/eselect
<postmodern> shevy, only used python to extract metadata and build the db
<shevy> debian still uses perl in dpkg
<shevy> I found out when I removed perl
dayepa has joined #ruby
<postmodern> pfff i want a Rust centric package manager
<shevy> stupid dpkg was no longer working :(
cj3kim has joined #ruby
mneorr_ has joined #ruby
zeade has quit [Quit: Leaving.]
<shevy> Rust? is anyone using that?
_mtr has joined #ruby
cj3kim has quit [Remote host closed the connection]
Virtualize has quit [Quit: Leaving...]
<RubyPanther> yum is also python, I know this from years of making fun of the error messages.
dayepa1 has quit [Ping timeout: 276 seconds]
Virtualize has joined #ruby
Virtualize has quit [Client Quit]
kitak_ has quit [Ping timeout: 245 seconds]
dayepa1 has joined #ruby
<shevy> hmm
<shevy> python is like the ultimate virus
Virtualize has joined #ruby
diegoviola has joined #ruby
<shevy> very successful
freezey has quit [Ping timeout: 252 seconds]
<postmodern> we should write a package manager in PHP, just because
<lethjakman> hey, I'm trying to run a method in my class on instantiation like this: https://gist.github.com/lethjakman/8411538
<lethjakman> am I thinking about this wrong?
mneorr has quit [Ping timeout: 245 seconds]
<lethjakman> I just need an array of @searchable
Jetchisel has joined #ruby
mneorr_ has quit [Ping timeout: 248 seconds]
dayepa has quit [Ping timeout: 276 seconds]
freezey has joined #ruby
<postmodern> lethjakman, you need to extend ClassMethods as well?
<nhhagen> I'm calling a method from a route with a querystring parameter as the method attribute, and ruby claim that the method map is not found?
<nhhagen> in sinatra
sassamo has quit [Remote host closed the connection]
<postmodern> lethjakman, i generally avoid ActiveSupport stuff, just do def self.included(base); base.extend ClassMethods; end
<lethjakman> postmodern: nah, that's being pulled in with the extend, it's a rails thing.
<lethjakman> hmm
<lethjakman> good to know
sassamo has joined #ruby
alexfreidah has joined #ruby
dayepa1 has quit [Ping timeout: 276 seconds]
thenovices has joined #ruby
RoxasShadowRS has quit [Read error: Connection reset by peer]
freezey_ has joined #ruby
vlad_starkov has joined #ruby
freezey_ has quit [Remote host closed the connection]
dayepa has joined #ruby
cashnguns has joined #ruby
ewnd9 has joined #ruby
okinomo has quit [Quit: Lost terminal]
freezey has quit [Ping timeout: 246 seconds]
dayepa1 has joined #ruby
otherj has quit []
asteros has quit [Quit: asteros]
sassamo has quit [Ping timeout: 252 seconds]
alexfreidah has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Ping timeout: 245 seconds]
dayepa has quit [Ping timeout: 276 seconds]
Virtualize has quit [Quit: Leaving...]
dayepa has joined #ruby
pen has quit [Remote host closed the connection]
thenovices has quit [Ping timeout: 272 seconds]
Virtualize has joined #ruby
w4pm has quit [Read error: Operation timed out]
fgo has quit [Remote host closed the connection]
_mtr has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dayepa1 has quit [Ping timeout: 276 seconds]
linguini has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
io_syl has quit [Ping timeout: 245 seconds]
e62 has quit [Ping timeout: 276 seconds]
dayepa has quit [Ping timeout: 276 seconds]
io_syl has joined #ruby
IceDragon has quit [Ping timeout: 246 seconds]
<shevy> lethjakman the gist is gone!
nhhagen has quit []
dayepa has joined #ruby
phipes has quit [Remote host closed the connection]
dayepa1 has joined #ruby
_mtr has joined #ruby
saarinen has quit [Quit: saarinen]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
io_syl has quit [Client Quit]
dayepa has quit [Ping timeout: 276 seconds]
dayepa has joined #ruby
sassamo has joined #ruby
<lethjakman> shevy: I fixed it :)
<lethjakman> thank you for looking though!
dayepa2 has joined #ruby
havenwood has quit [Remote host closed the connection]
dayepa1 has quit [Ping timeout: 276 seconds]
doodlehaus has joined #ruby
phipes has joined #ruby
ce_afk is now known as cescalante
senayar_ has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
zxd has quit [Ping timeout: 245 seconds]
danshultz has joined #ruby
w4pm has joined #ruby
dayepa has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
dayepa1 has joined #ruby
dayepa2 has quit [Ping timeout: 276 seconds]
IceDragon has joined #ruby
ttlnow has joined #ruby
pen has joined #ruby
burlyscudd has joined #ruby
senayar has quit [Ping timeout: 252 seconds]
e62 has joined #ruby
tt1187 has quit [Ping timeout: 245 seconds]
brunops has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
wildroman2 has joined #ruby
otherj has joined #ruby
jerius has quit []
dayepa1 has quit [Ping timeout: 276 seconds]
fgo has joined #ruby
alexfreidah has joined #ruby
burlyscudd has quit [Ping timeout: 245 seconds]
dayepa has joined #ruby
<HashNuke> Hey guys ~!
sergicles has quit [Ping timeout: 252 seconds]
<shevy> wattup HashNuke
brunops has quit [Client Quit]
guardianx has quit [Ping timeout: 248 seconds]
<HashNuke> Anyone here using RestClient and trying to send files? I get IO error because the stream is closed.
<benzrf> sup HashNuke
cescalante is now known as ce_afk
<benzrf> hows it goin
<HashNuke> Not going when debugging :)
brunops has joined #ruby
<wang> yeah didn't you hear the stream dried up mid last year we've been hoping for rain for months
dayepa1 has joined #ruby
ewnd9 has quit [Ping timeout: 252 seconds]
wildroman2 has quit [Ping timeout: 272 seconds]
meatherly has joined #ruby
mercwithamouth has joined #ruby
fgo_ has joined #ruby
dayepa has quit [Ping timeout: 276 seconds]
sergicles has joined #ruby
fgo has quit [Ping timeout: 260 seconds]
<RubyPanther> I wanted to drink from a stream so bad, I dug up an empty IO object just to place it against my eyes and imagine
gusblan has quit [Remote host closed the connection]
dayepa has joined #ruby
amclain has joined #ruby
dayepa1 has quit [Ping timeout: 276 seconds]
wallerdev has quit [Quit: wallerdev]
<benzrf> uh
Virtualize has quit [Quit: Leaving...]
nari has joined #ruby
afhammad has joined #ruby
Cephalostrum has joined #ruby
Cephalostrum has quit [Max SendQ exceeded]
fgo has joined #ruby
Cephalostrum has joined #ruby
<benzrf> ttyl
benzrf has left #ruby [#ruby]
habanany has quit [Quit: habanany]
fgo_ has quit [Ping timeout: 245 seconds]
gregoriokusows-1 has quit [Quit: gregoriokusows-1]
Hanmac1 has joined #ruby
Virtualize has joined #ruby
doodlehaus has quit []
bricker`LA has joined #ruby
freerobby has joined #ruby
Hanmac has quit [Ping timeout: 248 seconds]
afhammad has left #ruby [#ruby]
pen has quit [Read error: Connection reset by peer]
alexfreidah has quit [Ping timeout: 252 seconds]
deens has quit [Remote host closed the connection]
pen has joined #ruby
cavenick has joined #ruby
fgo_ has joined #ruby
Spami_ has quit [Quit: This computer has gone to sleep]
freerobby has quit [Ping timeout: 245 seconds]
cavenick has quit [Client Quit]
fgo has quit [Ping timeout: 276 seconds]
Jake232 has joined #ruby
Targen has quit [Ping timeout: 245 seconds]
njs126 has joined #ruby
teddyp1cker has joined #ruby
pencilcheck has joined #ruby
havenwood has joined #ruby
pen has quit [Read error: Connection reset by peer]
rootshift has quit [Quit: rootshift]
havenwood has quit [Read error: Connection reset by peer]
xjiujiu has joined #ruby
havenwood has joined #ruby
sLi_ has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
teddyp1cker has quit [Ping timeout: 252 seconds]
fphilipe has joined #ruby
psyl0n has quit [Remote host closed the connection]
danijoo has joined #ruby
cashnguns has quit [Quit: I'm just an old fashioned cowboy]
thenovices has joined #ruby
fgo_ has quit [Remote host closed the connection]
danijoo has quit [Read error: Connection reset by peer]
havenwood has quit [Ping timeout: 252 seconds]
danijoo has joined #ruby
Es0teric has joined #ruby
carif has quit [Ping timeout: 252 seconds]
Txandy|away is now known as Txandy
aryaching_ has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
fphilipe has quit [Ping timeout: 272 seconds]
lethjakman has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
mercwithamouth has quit [Ping timeout: 272 seconds]
mneorr has joined #ruby
mneorr has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 272 seconds]
gwb3 has quit [Quit: leaving]
mneorr has joined #ruby
Virtualize has quit [Quit: Leaving...]
<shevy> so one regex to rule them all
<shevy> string1 = 'short-mime-1.0.0-rc1'
<shevy> regex = /(.+)-(\d.+)/
vlad_starkov has quit [Read error: Connection reset by peer]
<shevy> 'short-mime-1.0.0-rc1'[/(.+)-(\d.+)/]
<shevy> $1 # => "short-mime"
aryaching_ has quit [Ping timeout: 272 seconds]
<shevy> $2 # => "1.0.0-rc1"
<shevy> works for this input
<shevy> won't work for WebKit-r93670
nateberkopec has quit [Quit: Leaving...]
asteros has joined #ruby
soba has joined #ruby
mocfive has joined #ruby
ixti has quit [Ping timeout: 252 seconds]
stkowski has joined #ruby
aryaching has joined #ruby
freerobby has joined #ruby
senayar_ has quit [Remote host closed the connection]
asteros has quit [Ping timeout: 245 seconds]
<krainboltgreene> shevy: You want a SEMVER regex?
<krainboltgreene> The spec has it.
<shevy> oh?
pencilcheck has quit [Ping timeout: 245 seconds]
freerobby has quit [Ping timeout: 260 seconds]
pu22l3r_ has joined #ruby
Virtualize has joined #ruby
mneorr has quit [Remote host closed the connection]
rudisimo has left #ruby [#ruby]
rudisimo has joined #ruby
mneorr has joined #ruby
Guest7625 has quit [Remote host closed the connection]
<RubyPanther> shevy: I didn't look up the spoiler, but my try is: /(.+?)-([^\d-]*\d[^0]*(-?.*))$/
binaryhat has quit [Quit: Leaving]
vallieres_ has quit [Quit: Textual IRC Client: www.textualapp.com]
heidi has quit [Quit: Leaving.]
<shevy> hmm
<shevy> the .+? part
<shevy> that makes it optional ?
<RubyPanther> oops I have a typo /(.+?)-([^\d-]*\d[^-]*(-?.*))$/
<RubyPanther> ? makes it less greedy, more scroogey
<RubyPanther> Oh, the other ? makes it optional, yeah
Txandy is now known as Txandy|away
petey has joined #ruby
<shevy> ok, need to wrap my head around it fully to grasp it
<krainboltgreene> Or there was.
sLi_ has quit [Remote host closed the connection]
shadoi has quit [Quit: Leaving.]
<RubyPanther> I didn't wrap my head around it, I just stuffed parts in until the examples came out right :o the spec probably has a better one lol
otherj has quit []
sLi_ has joined #ruby
mneorr has quit [Ping timeout: 272 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
<krainboltgreene> I'm not sure where I got this from: https://gist.github.com/krainboltgreene/8412309
<krainboltgreene> But I'm fairly sure it's from before they removed it from the spec.
<krainboltgreene> shevy: ^
snath has joined #ruby
sLi_ has quit [Ping timeout: 246 seconds]
kenndel_ has joined #ruby
mneorr has joined #ruby
kenndel has quit [Ping timeout: 245 seconds]
gusblan has joined #ruby
fgo has joined #ruby
gwb3 has joined #ruby
simoz4 has joined #ruby
bkparso has joined #ruby
tyl has joined #ruby
aspires has joined #ruby
rylinaux has quit [Quit: Quit - ZNC]
sepp2k has quit [Read error: Connection reset by peer]
axl_ has joined #ruby
gwb3 has quit [Quit: leaving]
Wolland has quit [Remote host closed the connection]
lioninawhat has quit [Ping timeout: 252 seconds]
rylinaux has joined #ruby
gwb3 has joined #ruby
rylinaux is now known as Guest80723
digital-ghost has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 0.4.2]
gwb3 has quit [Client Quit]
gwb3 has joined #ruby
carif has joined #ruby
diegoviola has joined #ruby
asteros has joined #ruby
ss_ has quit [Remote host closed the connection]
asteros has quit [Client Quit]
reset has quit [Ping timeout: 248 seconds]
Voodoofish430 has quit [Quit: Leaving.]
Guest80723 has quit [Quit: Quit - ZNC]
Xaitec has quit [Remote host closed the connection]
Targen has joined #ruby
heidi has joined #ruby
gja has joined #ruby
tyl has quit [Ping timeout: 248 seconds]
radic has quit [Ping timeout: 252 seconds]
tyl has joined #ruby
radic has joined #ruby
lfox has quit [Quit: ZZZzzz…]
pu22l3r_ has quit [Remote host closed the connection]
fgo has quit [Remote host closed the connection]
heidi has quit [Ping timeout: 246 seconds]
coderhs has joined #ruby
rylinaux_ has joined #ruby
rickruby has joined #ruby
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
<hostess> I'm trying to refactor some ugly code. Can anyone prettify this? configs.grep(/http_username=(\S+)/i)[0].match(/http_username=(\S+)/i)[1] it's essentially reading through an array (configs) and just pulling out the value of the http_username=asdf for the single item in the array named "http_username"
gwb3 has quit [Quit: leaving]
havenwood has joined #ruby
lioninawhat has joined #ruby
Hobogrammer has joined #ruby
<ddd> hrmm. say I have a @user.role string. where the string is like 'rescue_group'. How would I turn that into @user.rescue_groups ?. I mean @user.role = "rescue_group". @user has a plural collection of the same name as the role. So, I want to do something like @collection = @user.#{@user.role.pluralize}
kenndel_ has quit [Ping timeout: 245 seconds]
<ddd> the reason for this is role can change, but role will always contain the singular form of @user's attached collection
<ddd> so I want to turn that into the attr name to call on @user
vedic has joined #ruby
<RubyPanther> hostess: I'm trying to picture what the larger codebase would look like that has that excerpt... I'm picturing a full rewrite
<hostess> RubyPanther: it's a really small script actually. I'm just a ruby retard
<hostess> If it were C#, I could use Linq like a master, but I still can't grasp enumerables in ruby, which is almost the same thing
mneorr has quit [Remote host closed the connection]
freerobby has joined #ruby
smathieu has quit [Ping timeout: 276 seconds]
<hostess> Interesting, this kinda works: configs.grep(/http_username=(\S+)/i) { |v| $1 }
luckyruby has quit [Remote host closed the connection]
mneorr has joined #ruby
aspires has quit []
yedimind has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
havenwood has quit [Ping timeout: 272 seconds]
<bnagy> configs.map {|c| c[/http_username=(\S+)/i,1] } maybe
aspires has joined #ruby
danshultz has quit [Remote host closed the connection]
<ddd> i got it. its @user.send(@user.role.pluralize) if anyone else was interested. (many thanks to drbrain)
vlad_starkov has joined #ruby
simoz4 has quit [Ping timeout: 272 seconds]
danshultz has joined #ruby
subbyyy__ has quit [Ping timeout: 272 seconds]
e62 has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
<RubyPanther> hostess: configs.find(/http_username=(\S+)/i){|s| s}
mneorr has quit [Ping timeout: 265 seconds]
pu22l3r_ has joined #ruby
<hostess> bnagy: That returns an array with a nil for every item in the original array that doesn't match, and then matches on the 1 config value properly. I'd then have to remove all nil values
gwb3 has joined #ruby
i_s has quit [Remote host closed the connection]
<hostess> RubyPanther: that just returns the first item in the original array
gwb3 has quit [Client Quit]
<centrx> Hold on, I feel an inspiration coming on
<RubyPanther> hostess: Without seeing the whole script, or test data, I'm not really sure what is going on
danshultz has quit [Ping timeout: 272 seconds]
<hostess> RubyPanther: no worries, I think I can go with this pretty well: configs.grep(/http_username=(\S+)/i) { |v| $1 }
i_s has joined #ruby
<hostess> it returns the value of the one config key that matches the regex
<hostess> well, technically it would return multiple if they existed
nateberkopec has joined #ruby
<bnagy> match globals are awful
petey has quit [Remote host closed the connection]
<RubyPanther> On my test data, that is what mine did, except giving at most 1 result
gwb3 has joined #ruby
i_s has quit [Remote host closed the connection]
danijoo has quit [Read error: Connection reset by peer]
Mars has joined #ruby
marcgg_ has quit [Ping timeout: 272 seconds]
<RubyPanther> If you really want $1 you can leave out the |v|, but yeah... I'm allergic to globals
danijoo has joined #ruby
Mars is now known as Guest30150
marcgg has joined #ruby
gwb3 has quit [Client Quit]
_mtr has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
IcyDragon has joined #ruby
<centrx> hostess, May want to use reduce/inject
havenwood has joined #ruby
gwb3 has joined #ruby
gwb3 has quit [Client Quit]
<centrx> hostess, Also as mentioned if there is other code, there might be a better way to do the code over-all, e.g. if it splits on new line to get the config option
<bnagy> hostess: add .compact to the end, then
parduse has quit [Ping timeout: 272 seconds]
<RubyPanther> yeah just stick it in the compactor, that will fix it
lioninawhat has quit [Ping timeout: 276 seconds]
lifestream has quit [Quit: Leaving]
sandGorgon has joined #ruby
nateberkopec has quit [Ping timeout: 272 seconds]
<hostess> Ok, that may be a slightly better option than the global method
IceDragon has quit [Ping timeout: 252 seconds]
parduse has joined #ruby
gwb3 has joined #ruby
parduse has quit [Changing host]
parduse has joined #ruby
parduse has quit [Killed (hitchcock.freenode.net (Nickname regained by services))]
parduse has joined #ruby
parduse has quit [Changing host]
parduse has joined #ruby
troyready has quit [Ping timeout: 272 seconds]
axl_ has quit [Quit: axl_]
sassamo has quit [Remote host closed the connection]
havenwood has quit []
lfox has joined #ruby
sassamo has joined #ruby
_mtr has joined #ruby
HashNuke has left #ruby [#ruby]
Virtualize has quit [Quit: Leaving...]
thomasxie has joined #ruby
parduse has quit [Ping timeout: 265 seconds]
lyanchih_ has quit [Quit: lyanchih_]
sandGorgon has quit [Ping timeout: 246 seconds]
ss_ has joined #ruby
sassamo has quit [Ping timeout: 260 seconds]
sLi_ has joined #ruby
sLi_ has quit [Client Quit]
parduse has joined #ruby
parduse is now known as Guest354
fgo has joined #ruby
stryek has quit [Ping timeout: 246 seconds]
Montes has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
braincrash has quit [Quit: bye bye]
ss_ has quit [Ping timeout: 248 seconds]
Montes has quit [Remote host closed the connection]
pardusf has joined #ruby
pardusf has quit [Changing host]
pardusf has joined #ruby
pardusf is now known as parduse
Guest354 has quit [Ping timeout: 260 seconds]
cyberarm has quit [Quit: Bye]
_mtr has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
braincrash has joined #ruby
freerobby has quit [Quit: Leaving.]
meatherly has quit [Remote host closed the connection]
gja has quit [Quit: This computer has gone to sleep]
JohnBat26 has joined #ruby
vpretzel has quit [Read error: Connection reset by peer]
vpretzel has joined #ruby
mneorr has joined #ruby
braincra- has joined #ruby
simoz4 has joined #ruby
_mtr has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
meatherly has joined #ruby
tylersmith has joined #ruby
tharindu has joined #ruby
braincrash has quit [Ping timeout: 272 seconds]
larissa has quit [Quit: Leaving]
i_s has joined #ruby
subbyyy__ has joined #ruby
aspires has quit []
Guest30150 has quit [Remote host closed the connection]
aspires has joined #ruby
juni0r has quit [Ping timeout: 245 seconds]
heidi has joined #ruby
aspires has quit [Client Quit]
alexfreidah has joined #ruby
mneorr has quit [Remote host closed the connection]
fphilipe has joined #ruby
caesura has quit [Quit: Leaving]
mneorr has joined #ruby
aspires has joined #ruby
rezzack has quit [Quit: Leaving.]
juni0r has joined #ruby
heidi has quit [Client Quit]
i_s has quit [Ping timeout: 276 seconds]
brunops has quit [Ping timeout: 272 seconds]
mocfive has quit [Remote host closed the connection]
alexfreidah has quit [Ping timeout: 260 seconds]
mocfive has joined #ruby
fphilipe has quit [Ping timeout: 260 seconds]
subbyyy__ has quit [Ping timeout: 272 seconds]
mneorr has quit [Ping timeout: 252 seconds]
Fire-Dragon-DoL has left #ruby [#ruby]
vedic has left #ruby [#ruby]
figgleberry has joined #ruby
io_syl has joined #ruby
teddyp1cker has joined #ruby
Wolland has joined #ruby
aspires has quit []
mocfive has quit [Ping timeout: 272 seconds]
mneorr has joined #ruby
simoz4 has quit [Quit: Nettalk6 - www.ntalk.de]
io_syl has quit [Read error: Operation timed out]
mocfive has joined #ruby
teddyp1cker has quit [Ping timeout: 272 seconds]
juarlex has joined #ruby
io_syl has joined #ruby
vlad_starkov has joined #ruby
OdNairy has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
<multi_io> ruby -rdebug doesn't work here
flubba has joined #ruby
<multi_io> e.g. "ruby -rdebug -e 1" prints Debug.rb\nEmacs support available, then cosumes all available CPU and is only killable via kill -9
OdNairy has quit [Client Quit]
<multi_io> can anyone confirm?
<multi_io> what is this?
kobain has quit []
stetho has joined #ruby
<multi_io> what I want is to debug ruby scripts in Emacs :)
synergy_ has quit [Ping timeout: 245 seconds]
wallerdev has joined #ruby
<multi_io> rdebug (from the debugger gem) works, but I don't know how to use that in Emacs' debugger ui
figgleberry has quit [Ping timeout: 252 seconds]
mneorr has quit [Remote host closed the connection]
<centrx> eww emacs
nateberkopec has joined #ruby
mneorr has joined #ruby
<multi_io> centrx: what do you propose instead?
<centrx> vim!
<centrx> multi_io, When I run ruby -rdebug -e 1 it works
<multi_io> Yeah sure :P Does that have a debugger ui?
e62 has joined #ruby
<centrx> multi_io, I don't know. I let my users debug my code. Much easier
<multi_io> centrx: so it comes up with the (rdb:1) prompt?
io_syl has quit [Ping timeout: 272 seconds]
<multi_io> centrx: what ruby do you use? I'm on 1.9.3
kenndel has joined #ruby
<centrx> 2.0.0
Oog has joined #ruby
<centrx> superman@bede:~$ ruby -rdebug -e 1
<centrx> Debug.rb
<centrx> Emacs support available.
<centrx> /usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:123:
<centrx> (rdb:1)
<multi_io> OK
<Oog> how do i put a non-printable ctrl+A character in a string?!
<multi_io> maybe a bug, then
<Oog> google is on crack with their auth api
<centrx> ruby 2.0.0p353 (2013-11-22) [x86_64-linux-gnu]
<Oog> base64("user=" {User} "^Aauth=Bearer " {Access Token} "^A^A")
danshultz has joined #ruby
<Oog> ^A represents a Control+A (\001).
CpuID has quit [Quit: This computer has gone to sleep]
<Oog> wtf is this
<centrx> Oog, \u1234
yasushi has joined #ruby
<centrx> Oog, So it is probably \u001
<Oog> i tried that it no work :(
<Oog> oauth="user=someuser@example.com\u0001auth=Bearer vF9dft4qmTc2Nvb3RlckBhdHRhdmlzdGEuY29tCg==\u0001\u0001"
<Oog> Base64.encode64 oauth
<Oog> and i get different than their answer
mneorr has quit [Ping timeout: 260 seconds]
<Oog> beginning of base64 is correct
<centrx> Oog, How about \x01
nateberkopec has quit [Ping timeout: 248 seconds]
<Oog> nope
<Oog> correct base64 is dXNlcj1zb21ldXNlckBleGFtcGxlLmNvbQFhdXRoPUJlYXJlciB2RjlkZnQ0cW1UYzJOdmIzUmxja0JoZEhSaGRtbHpkR0V1WTI5dENnPT0BAQo=
<Oog> hat gives "dXNlcj1zb21ldXNlckBleGFtcGxlLmNvbQFhdXRoPUJlYXJlciB2RjlkZnQ0\ncW1UYzJOdmIzUmxja0JoZEhSaGRtbHpkR0V1WTI5dENnPT0BAQ==\n"
flubba has quit [Remote host closed the connection]
e62 has quit [Ping timeout: 272 seconds]
<Oog> wait its so close
flubba has joined #ruby
_mtr has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Oog> ruby gives ==
<Oog> google says o= at end...
danshultz has quit [Ping timeout: 272 seconds]
sassamo has joined #ruby
bean__ has joined #ruby
<Oog> any idea?
fedesilv_ has joined #ruby
w4pm has quit [Ping timeout: 252 seconds]
amacgregor__ has quit [Ping timeout: 276 seconds]
flubba has quit [Ping timeout: 252 seconds]
fedesilva has quit [Ping timeout: 246 seconds]
Deele has joined #ruby
Grrearan has joined #ruby
gja has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx> Oog, Use String#unpack ?
lioninawhat has joined #ruby
sassamo has quit [Ping timeout: 245 seconds]
<Oog> google is on crack
<Oog> i just tried their tool
<Oog> it matches ruby
meatherly has quit [Remote host closed the connection]
jkline has joined #ruby
<bnagy> \n chars aren't significant for base64
<Oog> their website is wrong
lyanchih has joined #ruby
mocfive has quit [Remote host closed the connection]
<Oog> that o should be an = ut still my code is not work authenticating...
mocfive has joined #ruby
<Oog> they must have been on crack when they decided ot make it so complicated
yfeldblum has joined #ruby
meatherl_ has joined #ruby
BraddBitt has joined #ruby
<bnagy> the only diff between the two base64 strings is the top one has \n in the decoded string
BraddPitt has quit [Ping timeout: 252 seconds]
agjacome has joined #ruby
<Oog> it works...
<Oog> thanks for the help
<Oog> soemthing is messed up
ahmedelgabri has joined #ruby
apeiros_ has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
<bnagy> fwiw you can use "\u0001" or "\x01", same same
mocfive_ has joined #ruby
mocfive has quit [Read error: Connection reset by peer]
CpuID has joined #ruby
CpuID has joined #ruby
phinfonet has quit [Ping timeout: 272 seconds]
CodeBunny has joined #ruby
gusblan has quit []
CodeBunny has quit [Client Quit]
CodeBunny has joined #ruby
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yfeldblum has quit [Remote host closed the connection]
CodeBunny has quit [Client Quit]
rickruby has quit [Remote host closed the connection]
yfeldblum has joined #ruby
CodeBunny has joined #ruby
digital-ghost has joined #ruby
ohwhoa has joined #ruby
CodeBunny has quit [Client Quit]
CodeBunny has joined #ruby
Grrearan has left #ruby [#ruby]
mocfive_ has quit [Remote host closed the connection]
ahmedelgabri has quit [Remote host closed the connection]
mocfive has joined #ruby
el_cristobal has joined #ruby
ahmedelgabri has joined #ruby
baroquebobcat has joined #ruby
Pixels has quit [Ping timeout: 252 seconds]
petey has joined #ruby
aspires has joined #ruby
i_s has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
mary5030 has quit [Remote host closed the connection]
mocfive has quit [Ping timeout: 252 seconds]
<Oog> google is on crack now it worked without any of the base64 silliness.....?!
<Oog> whatever
<Oog> thanks
Oog has quit [Quit: Page closed]
pen has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
mykeus has quit [Ping timeout: 272 seconds]
i_s has quit [Ping timeout: 252 seconds]
fedesilv_ has quit [Remote host closed the connection]
centrx has quit [Quit: Leaving]
yasushi has quit [Remote host closed the connection]
aspires has quit []
<Fuzai> Instead of using .is_a? Something to guess what an object type is, is there a way to look it up instead?
Mars has joined #ruby
Mars is now known as Guest57823
OdNairy has joined #ruby
<RubyPanther> Fuzai: you're supposed to use .respond_to? instead, to test for the interface you need, instead of asking the type
<Fuzai> ty
<Fuzai> A friend of mine that is new was asking and I didn't have an answer for him
jkline has quit [Quit: jkline]
teddyp1cker has joined #ruby
<RubyPanther> Ruby is all about duck-typing. If it quacks, it's good.
kevinykc_ has joined #ruby
mneorr has joined #ruby
Guest57823 has quit [Ping timeout: 252 seconds]
nateberkopec has joined #ruby
pranny has joined #ruby
kevinykchan has quit [Ping timeout: 272 seconds]
dh64 has joined #ruby
IcyDragon has quit [Read error: Connection reset by peer]
IcyDragon has joined #ruby
justsee has joined #ruby
IcyDragon has quit [Client Quit]
nateberkopec has quit [Ping timeout: 248 seconds]
ace_striker has joined #ruby
justsee has quit [Client Quit]
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
fgo has quit [Remote host closed the connection]
teddyp1cker has quit [Remote host closed the connection]
yarou has quit [Quit: This computer has gone to sleep]
Macaveli has joined #ruby
sergicles has quit [Quit: sergicles]
Spami has joined #ruby
BrixSat has quit [Remote host closed the connection]
BrixSat has joined #ruby
stkowski has quit [Quit: stkowski]
baroquebobcat has joined #ruby
lioninawhat has quit [Ping timeout: 246 seconds]
sassamo has joined #ruby
thesheff17 has quit [Ping timeout: 252 seconds]
io_syl has joined #ruby
mocfive has joined #ruby
fgo has joined #ruby
sassamo has quit [Ping timeout: 272 seconds]
Spami has quit [Quit: This computer has gone to sleep]
baroquebobcat has quit [Quit: baroquebobcat]
petey has quit [Remote host closed the connection]
lfox has quit [Quit: ZZZzzz…]
pu22l3r_ has joined #ruby
apeiros has joined #ruby
apeiros_ has quit [Read error: Connection reset by peer]
fphilipe has joined #ruby
rickruby has joined #ruby
EngierkO_ has joined #ruby
EngierkO has quit [Ping timeout: 252 seconds]
fphilipe has quit [Ping timeout: 245 seconds]
justsee has joined #ruby
teddyp1cker has joined #ruby
ahmedelgabri has quit [Remote host closed the connection]
mweshi has joined #ruby
Txandy|away is now known as Txandy
mocfive has quit [Remote host closed the connection]
dweeb_ has joined #ruby
mocfive has joined #ruby
rickruby has quit [Ping timeout: 265 seconds]
gja has quit [Quit: This computer has gone to sleep]
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
DJJeff has joined #ruby
apeiros has quit [Ping timeout: 245 seconds]
alexfreidah has joined #ruby
mocfive has quit [Read error: Operation timed out]
MissionCritical has quit [Ping timeout: 252 seconds]
apeiros has joined #ruby
ahmedelgabri has joined #ruby
<Jason> /wc/7
<Jason> err
tagrudev has joined #ruby
juarlex has quit [Remote host closed the connection]
alexfreidah has quit [Ping timeout: 272 seconds]
albedoa has joined #ruby
dweeb_ has quit [Quit: Computer has gone to sleep.]
pu22l3r_ has quit [Remote host closed the connection]
_tpavel has joined #ruby
ambushsabre has quit [Quit: rip]
Spami has quit [Quit: This computer has gone to sleep]
noop has joined #ruby
Mission-Critical has joined #ruby
coderhs has quit [Ping timeout: 245 seconds]
jrhorn424 is now known as zz_jrhorn424
teddyp1cker has quit []
albedoa has quit [Quit: Textual IRC Client: www.textualapp.com]
mykeus has joined #ruby
Spami has joined #ruby
justsee has quit [Quit: leaving]
justsee has joined #ruby
mengu has joined #ruby
sergicles has joined #ruby
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
starkhalo has quit [Ping timeout: 272 seconds]
apeiros_ has joined #ruby
meatherl_ has quit [Remote host closed the connection]
apeiros has quit [Ping timeout: 272 seconds]
heftig has quit [Quit: Quitting]
krz has joined #ruby
krz has joined #ruby
charliesome has quit [Ping timeout: 260 seconds]
Mission-Critical is now known as MissionCritical
nateberkopec has joined #ruby
mykeus has quit [Ping timeout: 246 seconds]
e62 has joined #ruby
renklaf has quit [Read error: No route to host]
renklaf has joined #ruby
nateberkopec has quit [Ping timeout: 248 seconds]
BizarreCake has joined #ruby
e62 has quit [Ping timeout: 260 seconds]
coderhs has joined #ruby
sergicles has quit [Quit: sergicles]
agent_white has left #ruby [#ruby]
zipper has joined #ruby
xjiujiu_ has joined #ruby
Txandy is now known as Txandy|away
browndawg has joined #ruby
jbueza has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
e62 has joined #ruby
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
bmn has quit [Ping timeout: 272 seconds]
fixl has joined #ruby
xjiujiu has quit [Ping timeout: 272 seconds]
bmn has joined #ruby
CodeBunny has quit [Quit: CodeBunny needs a carrot. Be back later.]
lyanchih has quit [Quit: lyanchih]
benlieb has joined #ruby
e62 has quit [Ping timeout: 272 seconds]
EngierkO_ has quit [Read error: Connection reset by peer]
EngierkO has joined #ruby
PhilK has quit [Ping timeout: 245 seconds]
w_alexus[afk] is now known as w_alexus
Jetchisel has joined #ruby
w4pm has joined #ruby
relix has joined #ruby
amclain has quit [Quit: Leaving]
__tpavel has joined #ruby
_tpavel has quit [Quit: Leaving]
krz has quit [Quit: WeeChat 0.4.2]
__tpavel has quit [Client Quit]
tyl has joined #ruby
_tpavel has joined #ruby
_tpavel has quit [Read error: Connection reset by peer]
_tpavel has joined #ruby
sandGorgon has joined #ruby
xjiujiu_ has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
meatherly has joined #ruby
Macaveli has quit [Ping timeout: 245 seconds]
krz has joined #ruby
krz has quit [Client Quit]
fgo has quit [Remote host closed the connection]
gja has joined #ruby
krz has joined #ruby
w4pm has quit [Ping timeout: 245 seconds]
klaut has joined #ruby
vlad_starkov has joined #ruby
fgo has joined #ruby
meatherly has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Remote host closed the connection]
Txandy|away is now known as Txandy
Macaveli has joined #ruby
<pontiki> type those ducks
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
Anarch has quit [Ping timeout: 246 seconds]
<ddd> woot! wife is lovin the way the new app is coming along! Actually turning out pretty sweetly!
jkline has joined #ruby
vlad_starkov has joined #ruby
darthdeus has quit [Read error: Connection reset by peer]
gja has quit [Quit: This computer has gone to sleep]
jbueza has joined #ruby
fphilipe has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
Azure has quit [Quit: My MBP went to sleep.]
xjiujiu has joined #ruby
sassamo has joined #ruby
tesuji has joined #ruby
himsin has joined #ruby
tesuji has quit [Excess Flood]
el_cristobal has quit [Ping timeout: 252 seconds]
Red_Onyx has quit [Quit: Leaving]
cj3kim has joined #ruby
el_cristobal has joined #ruby
Azure has joined #ruby
thenovices has quit [Remote host closed the connection]
sassamo has quit [Ping timeout: 248 seconds]
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
camilasan has joined #ruby
wildroman2 has joined #ruby
e62 has joined #ruby
agjacome has quit [Ping timeout: 246 seconds]
ferr has joined #ruby
Fractional has joined #ruby
pen has quit []
wildroman3 has joined #ruby
ayaz has joined #ruby
ayaz has quit [Changing host]
ayaz has joined #ruby
nfk has quit [Quit: yawn]
wildroman3 has quit [Remote host closed the connection]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
wildroman3 has joined #ruby
wildroman2 has quit [Read error: No route to host]
xjiujiu has joined #ruby
mneorr has quit [Ping timeout: 276 seconds]
e62 has quit [Ping timeout: 260 seconds]
Azure has quit [Ping timeout: 265 seconds]
fgo has quit [Remote host closed the connection]
nateberkopec has joined #ruby
digital-ghost has quit [Remote host closed the connection]
tylersmith has quit [Remote host closed the connection]
dik_dak has quit [Quit: Leaving]
tylersmith has joined #ruby
digital-ghost has joined #ruby
charliesome has joined #ruby
kenndel_ has joined #ruby
dweeb_ has joined #ruby
wallerdev has quit [Quit: wallerdev]
nateberkopec has quit [Ping timeout: 245 seconds]
ahmedelg_ has joined #ruby
tylersmith has quit [Ping timeout: 248 seconds]
kenndel has quit [Ping timeout: 245 seconds]
ndrei has quit [Ping timeout: 248 seconds]
amacgregor_ has joined #ruby
lilly19 has joined #ruby
fphilipe has quit [Remote host closed the connection]
<lilly19> hi. how do you get all dependencies of a gem. > gem dependency NAME -R does not give you gems that are used by gems there and there.
fphilipe has joined #ruby
ahmedelgabri has quit [Ping timeout: 272 seconds]
bricker`LA has quit [Quit: leaving]
coderhs has quit [Read error: Connection timed out]
coderhs has joined #ruby
Azure has joined #ruby
aryaching has quit [Ping timeout: 272 seconds]
gja has joined #ruby
fphilipe has quit [Ping timeout: 272 seconds]
zxd has joined #ruby
aryaching has joined #ruby
gja has quit [Client Quit]
ndrei has joined #ruby
<Fractional> How would I write a method that translates a string containing hex values to decimals?
camilasan has quit [Ping timeout: 252 seconds]
tesuji has joined #ruby
h_kon has joined #ruby
phipes has quit [Remote host closed the connection]
renklaf_ has joined #ruby
zipper has quit [Ping timeout: 272 seconds]
renklaf has quit [Ping timeout: 260 seconds]
gja has joined #ruby
zipper has joined #ruby
meatherly has joined #ruby
thenovices has joined #ruby
mweshi has quit [Quit: mweshi]
petey has joined #ruby
andikr has joined #ruby
fire has joined #ruby
lyanchih has joined #ruby
meatherly has quit [Ping timeout: 245 seconds]
aganov has joined #ruby
finnnnnnnnnnn has joined #ruby
thenovices has quit [Ping timeout: 260 seconds]
petey has quit [Ping timeout: 272 seconds]
CpuID has quit [Ping timeout: 248 seconds]
gja has quit [Quit: This computer has gone to sleep]
claymore has joined #ruby
jkline has quit [Quit: jkline]
gja has joined #ruby
nvrch has joined #ruby
Olipro has quit [Read error: Connection reset by peer]
phipes has joined #ruby
yasushi has joined #ruby
zigomir has joined #ruby
zigomir_ has joined #ruby
zigomir has quit [Read error: Connection reset by peer]
mykeus has joined #ruby
cads has quit [Ping timeout: 252 seconds]
gja has quit [Quit: This computer has gone to sleep]
fgo has joined #ruby
Bosox20051 has quit [Read error: Connection reset by peer]
cycorld has quit []
yasushi has quit [Ping timeout: 252 seconds]
alexfreidah has joined #ruby
ndrei has quit [Ping timeout: 265 seconds]
gja has joined #ruby
gja has quit [Changing host]
gja has joined #ruby
<Fractional> How would I write a method that translates a string containing hex values to decimals?
fgo has quit [Ping timeout: 252 seconds]
Styles has quit [Quit: Quitting...]
marcgg_ has joined #ruby
alexfreidah has quit [Ping timeout: 265 seconds]
<Hanmac1> Fractional: you mean like that? "A".to_i(16) #=> 10
<Hanmac1> or are you looking for something like gsub?
<Fractional> hex = "0BFFA0"
<Fractional> hex.to_dec #=> [11,255,160]
juarlex has joined #ruby
senayar has joined #ruby
ahawkins has joined #ruby
pardusf has joined #ruby
parduse is now known as Guest97116
pardusf has quit [Changing host]
pardusf has joined #ruby
pardusf is now known as parduse
afhammad has joined #ruby
Guest97116 has quit [Ping timeout: 245 seconds]
<Fractional> Hanmac:
finnnnnnnnnnn has quit [Quit: finnnnnnnnnnn]
sassamo has joined #ruby
justsee has quit [Quit: leaving]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
cj3kim has quit [Remote host closed the connection]
CpuID has joined #ruby
dfranciosi has joined #ruby
marcgg has quit [Ping timeout: 265 seconds]
fire has quit [Quit: WeeChat 0.4.1]
ndrei has joined #ruby
<Hanmac1> Fractional: "0BFFA0".scan(/\h{2}/).map(&:hex) #=> [11, 255, 160]
Hanmac1 is now known as Hanmac
juarlex has quit [Ping timeout: 265 seconds]
tharindu is now known as tharindu|away
<Fractional> What does the regex do?
<Hanmac> find each section of two hex numbers
sassamo has quit [Ping timeout: 246 seconds]
<tobiasvl> Fractional: \h matches a hex digit, {2} matches two of the preciding group
ferr has quit [Ping timeout: 272 seconds]
<Fractional> tobiasvl: I assume it is recommended to learn more about regexs. I'll have to do that this weekend.
zegerjan has joined #ruby
<tobiasvl> *preceding
<tobiasvl> yes, regexes are useful
einarj has joined #ruby
noname001__ has joined #ruby
Anarch has joined #ruby
<Fractional> I've a question for another problem;
<Hanmac> also read more about CharacterClasses on http://www.ruby-doc.org/core-2.0.0/Regexp.html
shime has joined #ruby
tharindu|away is now known as tharindu
jhaals has joined #ruby
suvash has joined #ruby
suvash has left #ruby [#ruby]
<Fractional> Bookmarked :)
amacgregor_ has quit [Read error: Connection reset by peer]
fphilipe has joined #ruby
amacgregor_ has joined #ruby
Kar- has joined #ruby
<Fractional> Going to experience some more with regexs :D
<Fractional> regexes*
<Hanmac> reg-hexes ;P
wildroman3 has quit [Remote host closed the connection]
jprovazn has joined #ruby
Parker0 has joined #ruby
Parker0 has quit [Client Quit]
phipes has quit [Remote host closed the connection]
<Fractional> There is no \h on that website
nateberkopec has joined #ruby
vpretzel has quit [Ping timeout: 272 seconds]
dweeb_ has quit [Quit: Computer has gone to sleep.]
senayar has quit [Remote host closed the connection]
<tobiasvl> sure there is
<tobiasvl> /\h/ - A hexdigit character ([0-9a-fA-F])
senayar has joined #ruby
kreantos has joined #ruby
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
<Fractional> I can't see it on the Rubular website.
wildroman2 has joined #ruby
<tobiasvl> oh, yeah.
tharindu has quit [Ping timeout: 248 seconds]
Fractional has quit [Remote host closed the connection]
apeiros_ has quit [Remote host closed the connection]
apeiros has joined #ruby
vpretzel has joined #ruby
nateberkopec has quit [Ping timeout: 252 seconds]
Wolland has quit [Remote host closed the connection]
dukz has joined #ruby
ferr has joined #ruby
Fly80 has joined #ruby
sergicles has joined #ruby
ahmedelg_ has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 260 seconds]
drumusician has joined #ruby
troessner has joined #ruby
io_syl has quit []
Spami has quit [Quit: This computer has gone to sleep]
phansch has joined #ruby
maoko has joined #ruby
ace_striker has quit [Ping timeout: 272 seconds]
timonv has joined #ruby
dagobah has joined #ruby
<Fly80> hello everybody
gja has quit [Quit: This computer has gone to sleep]
dukz_ has joined #ruby
noop has quit [Ping timeout: 246 seconds]
<Fly80> i would like to write some text (in my ERB script) and return it as a file to the client. Is it possible with Ruby? How to do that? Should I set the http response header?
cj3kim has joined #ruby
jlebrech has joined #ruby
claymore has quit [Ping timeout: 276 seconds]
ahmedelgabri has joined #ruby
terrellt_ has joined #ruby
CpuID has quit [Quit: This computer has gone to sleep]
claymore has joined #ruby
dukz has quit [Ping timeout: 252 seconds]
terrellt has quit [Ping timeout: 265 seconds]
marr has joined #ruby
klaut has quit [Remote host closed the connection]
meatherly has joined #ruby
Xeago has joined #ruby
sergicles has quit [Quit: sergicles]
thenovices has joined #ruby
roolo has joined #ruby
darthdeus has joined #ruby
Fractional has joined #ruby
m00nlight has quit [Quit: Konversation terminated!]
decoponio has joined #ruby
rdark has joined #ruby
meatherly has quit [Ping timeout: 252 seconds]
monkegjinni has joined #ruby
cj3kim has quit [Ping timeout: 272 seconds]
sergicles has joined #ruby
arturaz has joined #ruby
thenovices has quit [Ping timeout: 260 seconds]
cbetta_afk is now known as cbetta
sergicles has quit [Client Quit]
noop has joined #ruby
zegerjan has quit [Ping timeout: 260 seconds]
mehlah has joined #ruby
heftig has joined #ruby
ephemerian has joined #ruby
fella6s has joined #ruby
joumunji has joined #ruby
fgo has joined #ruby
Mon_Ouie has joined #ruby
rootshift has joined #ruby
Kneferilis has quit [Read error: Connection reset by peer]
carif has quit [Ping timeout: 252 seconds]
dukz has joined #ruby
_Andres has joined #ruby
wildroman2 has quit [Remote host closed the connection]
krz has quit [Ping timeout: 276 seconds]
fgo has quit [Ping timeout: 272 seconds]
lewellyn has quit [Ping timeout: 276 seconds]
dseitz has joined #ruby
TMM has joined #ruby
dukz_ has quit [Ping timeout: 276 seconds]
krz has joined #ruby
mechanicles has joined #ruby
<mechanicles> Hi all
ozgun has joined #ruby
<mechanicles> How do I convert binary file into text file?
sassamo has joined #ruby
<mechanicles> I have csv file which has type as binary? How can read it?
zegerjan has joined #ruby
timonv has quit [Remote host closed the connection]
<Hanmac> mechanicles: show me your code in a gist and then tell me what is wrong ... (normally it should automaticlly open files in the correct mode ... )
juni0r has quit [Ping timeout: 245 seconds]
juni0r has joined #ruby
maoko has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
camilasan has joined #ruby
<Fly80> hello, I would like to write some text (in my ERB script) and return it as a file to the client. Is it possible with Ruby? How to do that? Should I set the http response header?
sassamo has quit [Ping timeout: 260 seconds]
lsmola_ has quit [Ping timeout: 276 seconds]
<Hanmac> Fly80 isnt erb more used in rails? if yes you can try #rubyonrails for more help
shaunbaker has joined #ruby
ss_ has joined #ruby
dweeb_ has joined #ruby
_tpavel has quit [Quit: Leaving]
tt1187 has joined #ruby
olivier_bK has joined #ruby
nateberkopec has joined #ruby
psyl0n has joined #ruby
Advocation has joined #ruby
alexherbo2 has quit [Quit: WeeChat 0.4.2]
alexherbo2 has joined #ruby
Olipro has joined #ruby
Macaveli has quit [Ping timeout: 272 seconds]
tvw has joined #ruby
joumunji has quit [Remote host closed the connection]
Kneferilis has joined #ruby
ferr has quit [Remote host closed the connection]
workmad3 has joined #ruby
lsmola_ has joined #ruby
nateberkopec has quit [Ping timeout: 260 seconds]
Macaveli has joined #ruby
<mechanicles> Hanmac: If I open bynary typed csv file like File.readlines(path)...it shows me some different output
<mechanicles> Hanmac: I just tried in rails console
benlieb has quit [Quit: benlieb]
<Hanmac> mechanicles: File.readlines(path,:mode=>"rb")
DJJeff has quit [Ping timeout: 252 seconds]
dangerousdave has joined #ruby
mikecmpbll has joined #ruby
DJJeff has joined #ruby
tylerdmace has joined #ruby
h0lyalg0rithm has joined #ruby
<Takumo> Hi all, I'm writing a REST client using Faraday (and the Twitter gem as a reference) but I've not seen any documentation on how to work with a dynamic endpoint
Hanmac1 has joined #ruby
timonv has joined #ruby
<Hanmac1> mechanicles: PS: DONT open a csv file with readlines ... there is a CSV module in stdlib for that
braddeicide has left #ruby ["Leaving"]
Hanmac has quit [Ping timeout: 252 seconds]
h0lyalg0rithm has quit [Client Quit]
diegoviola has quit [Quit: WeeChat 0.4.2]
Hanmac1 is now known as Hanmac
<mechanicles> Hanmac1: File.readlines(path,:mode=>"rb") did not work. It does not show me text format. Now testing with CSV standard library.
<Hanmac> mechanicles: What "textFormat" do you mean? are you sure you didnt do something wrong?
<Fly80> Hanmac: i'll ask there, thx
<workmad3> Takumo: sorry, I don't understand what you mean by 'dynamic endpoint'
aspiers has quit [Quit: WeeChat 0.4.1]
maoko has joined #ruby
aspiers has joined #ruby
krz has quit [Ping timeout: 246 seconds]
<Takumo> workmad3: I think I've solved it, e.g. the twitter APi is always at https://api.twitter.com/api/1.1/ , some have endpoints like "https://#{account}.myapp.com"
<Takumo> I've just given my client an .endpoint method
_Andres has quit [Read error: Connection reset by peer]
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
<workmad3> Takumo: ah, you threw me because 'account.app.com' actually went to a site ;)
<Takumo> really? well someone paid top $$ for that domain
tvw has quit []
<workmad3> Takumo: but what you meant is that you need to set the account name or potentially even the entire API endpoint url
wildroman2 has joined #ruby
gja has joined #ruby
xjiujiu has quit [Read error: Connection reset by peer]
albertgrala has joined #ruby
<Takumo> yeah
poulson has joined #ruby
<workmad3> Takumo: it didn't help that you said 'i.e.' instead of 'e.g.' for an example :)
<Takumo> so instead of having a constant "ENDPOINT" I've defined a method to use to get the endpoint
<Takumo> wildroman2: i.e = informative example
vpretzel has quit [Read error: Connection reset by peer]
<Takumo> i.e. giving an example which has additional information to illustrate a concept :)
<wildroman2> Takumo: you must have meant workmad3 :)
vpretzel has joined #ruby
xjiujiu has joined #ruby
<workmad3> Takumo: right... so I read the 'i.e.' as meaning 'this is the URL with a dynamic endpoint of the type I'm meaning'
klip has quit [Ping timeout: 272 seconds]
senayar_ has joined #ruby
<workmad3> Takumo: whereas e.g. would have meant (to me at least) 'this is the style of URL I mean'
noop has quit [Ping timeout: 252 seconds]
shime has quit [Ping timeout: 246 seconds]
Azure has quit [Ping timeout: 272 seconds]
sfiggins has quit [Ping timeout: 272 seconds]
cj3kim has joined #ruby
meatherly has joined #ruby
tannerburson has quit [Read error: Connection reset by peer]
tylerdmace has quit [Ping timeout: 272 seconds]
hypnosb has quit [Ping timeout: 272 seconds]
thedonvaughn has quit [Ping timeout: 272 seconds]
DefV has quit [Ping timeout: 272 seconds]
xjiujiu has quit [Read error: Connection reset by peer]
afhammad has quit [Remote host closed the connection]
tylerdmace has joined #ruby
thedonvaughn has joined #ruby
tannerburson has joined #ruby
DefV has joined #ruby
ttlnow has quit [Remote host closed the connection]
mjc_ has quit [Quit: No Ping reply in 180 seconds.]
zeeraw has joined #ruby
<Takumo> ah well
ttlnow has joined #ruby
petey has joined #ruby
mjc_ has joined #ruby
Zhwazi has quit [Quit: Bouncer shutting down]
thenovices has joined #ruby
xjiujiu has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
senayar has quit [Ping timeout: 272 seconds]
hypnosb has joined #ruby
<workmad3> Takumo: yeah, communication is fun :)
cgore has quit [Ping timeout: 260 seconds]
gja has quit [Quit: This computer has gone to sleep]
Zhwazi has joined #ruby
mordocai has quit [Ping timeout: 264 seconds]
lkba has quit [Ping timeout: 248 seconds]
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
psyl0n has quit [Remote host closed the connection]
meatherly has quit [Ping timeout: 252 seconds]
ndrei has joined #ruby
emocakes has joined #ruby
emocakes has left #ruby [#ruby]
cj3kim has quit [Ping timeout: 260 seconds]
cgore has joined #ruby
mordocai has joined #ruby
popl has joined #ruby
popl has joined #ruby
Fractional has quit [Remote host closed the connection]
fphilipe has quit []
petey has quit [Ping timeout: 272 seconds]
thenovices has quit [Ping timeout: 272 seconds]
MrZYX|off is now known as MrZYX
<Hanmac> mechanicles: i think your data format is shitty ... i tryed : CSV.parse(s.b.encode("UTF-8",invalid: :replace,undef: :replace,replace: "",fallback: "").gsub("\x00",""), :col_sep=> "|") #=> [["id", "system_code", "assembly_code", "description", "created_at", "updated_at"]]
rickruby has joined #ruby
digital-ghost has quit [Remote host closed the connection]
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
<mechanicles> Hanmac: could you share your code?
klaut has joined #ruby
camilasan has quit []
<Hanmac> oO i already shared my code with you if you had read my line to the end oO
Jrz has joined #ruby
noop has joined #ruby
Jrz has quit [Max SendQ exceeded]
skaflem has joined #ruby
h0lyalg0rithm has joined #ruby
h0lyalg0rithm has quit [Max SendQ exceeded]
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
camilasan has joined #ruby
razibog has joined #ruby
h0lyalg0rithm has joined #ruby
klaut_ has joined #ruby
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
Bosox20051 has joined #ruby
krz has joined #ruby
<Hanmac> mechanicles: i found your problem ... the file is not "binary" its UTF-16LE encoded ... try something like that: s.force_encoding("UTF-16").encode("UTF-8",invalid: :replace,undef: :replace,replace: "",fallback: "")
rickruby has quit [Ping timeout: 248 seconds]
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
xjiujiu has joined #ruby
decoponio has quit [Quit: My PC Restarting]
Eiam has quit [Ping timeout: 260 seconds]
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
bluenemo has joined #ruby
klaut has quit [Ping timeout: 245 seconds]
gregoriokusowski has joined #ruby
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
mojjojo has joined #ruby
h0lyalg0rithm has quit [Client Quit]
Jrz has joined #ruby
dukz has quit [Remote host closed the connection]
m00nlight has joined #ruby
mengu has quit [Remote host closed the connection]
dukz has joined #ruby
ewnd9 has joined #ruby
dukz has quit [Read error: Connection reset by peer]
<mechanicles> Hanmac: How do you know that file is UTF-16LE encoded?
alexfreidah has joined #ruby
soukihei has quit [Ping timeout: 260 seconds]
<Hanmac> because s.force_encoding("UTF-16LE") #=> "\uFEFF\"id\"|\"system_code\"|\"assembly_code\"|\"description\"|\"created_at\"|\"updated_at\"\r\x0A" ... then i encode it back to UTF-8 and remove the unwanted stuff like "\uFEFF"
<mechanicles> Hanmac: cool and thanks for your help :)
diegoviola has joined #ruby
sandGorgon has quit [Ping timeout: 246 seconds]
mpereira_ has quit [Excess Flood]
alexfreidah has quit [Ping timeout: 252 seconds]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
juarlex has joined #ruby
marcgg has joined #ruby
mpereira has joined #ruby
xjiujiu has joined #ruby
nomenkun has joined #ruby
niharvey has quit [Quit: No Ping reply in 180 seconds.]
niharvey has joined #ruby
sassamo has joined #ruby
shime has joined #ruby
supergeek has joined #ruby
marcgg_ has quit [Ping timeout: 252 seconds]
juarlex has quit [Ping timeout: 272 seconds]
nari has quit [Ping timeout: 276 seconds]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
coderhs has quit [Ping timeout: 272 seconds]
xjiujiu has joined #ruby
sassamo has quit [Ping timeout: 245 seconds]
mklappstuhl has joined #ruby
lsmola_ has quit [Ping timeout: 252 seconds]
h0lyalg0rithm has joined #ruby
billiam has quit [Quit: WeeChat 0.4.1]
gigetoo has quit [Remote host closed the connection]
gigetoo has joined #ruby
kreantos has quit [Ping timeout: 245 seconds]
sandGorgon has joined #ruby
joonty_ has joined #ruby
joonty has quit [Ping timeout: 252 seconds]
kreantos has joined #ruby
gja has joined #ruby
joonty_ has quit [Client Quit]
joonty has joined #ruby
nateberkopec has joined #ruby
LekeFly has joined #ruby
zipper has quit [Ping timeout: 276 seconds]
zipper has joined #ruby
psst has joined #ruby
nateberkopec has quit [Ping timeout: 245 seconds]
lsmola_ has joined #ruby
aspiers has quit [Ping timeout: 276 seconds]
nettoweb has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
diegoviola has quit [Quit: WeeChat 0.4.2]
joshwines_ has quit [Remote host closed the connection]
gja has quit [Quit: This computer has gone to sleep]
marcgg_ has joined #ruby
psyl0n has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chrisseaton has joined #ruby
marcgg has quit [Ping timeout: 245 seconds]
h0lyalg0rithm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dukz has joined #ruby
decoponio has joined #ruby
gja has joined #ruby
lewellyn has joined #ruby
_5kg has joined #ruby
mikecmpbll has quit [Read error: Operation timed out]
mengu has quit [Ping timeout: 272 seconds]
h0lyalg0rithm has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
aryaching has joined #ruby
h0lyalg0rithm has quit [Client Quit]
coderhs has joined #ruby
GeorgesLeYeti has joined #ruby
<GeorgesLeYeti> Hi
[_aeris_] is now known as _aeris_
Speed has joined #ruby
<GeorgesLeYeti> I want to truncate a string with 2 separators
zeeraw has joined #ruby
<shevy> example string looks like?
mikecmpbll has joined #ruby
<GeorgesLeYeti> and i can't find the syntax for 2 separators
<workmad3> GeorgesLeYeti: example input and output strings, and work from there
cj3kim has joined #ruby
lyanchih has quit [Ping timeout: 272 seconds]
meatherly has joined #ruby
<workmad3> GeorgesLeYeti: and what do you mean 'syntax for 2 separators'?
<GeorgesLeYeti> Let say : "Hello World!\nCow"
<GeorgesLeYeti> The 2 separators are ' ' and \n
<shevy> GeorgesLeYeti there are several ways
<GeorgesLeYeti> So the result should be: "Hello"
<GeorgesLeYeti> "World!"
<GeorgesLeYeti> and "Cow"
<shevy> a simple way is via .split() method
<workmad3> GeorgesLeYeti: ah, so you want to split the string, not truncate it
<GeorgesLeYeti> heu yes sorry
<workmad3> GeorgesLeYeti: yeah, just use split with a regex or
<shevy> or for simplicity, you can convert the \n into ' ' and then split via "Hello World!\nCow".split(' ')
<GeorgesLeYeti> ok Thx a lot
<Hanmac> GeorgesLeYeti: "Hello World!\nCow".split(/[ \n]/) #=> ["Hello", "World!", "Cow"]
<shevy> "Hello World!\nCow".tr("\n", ' ').split(' ') # => ["Hello", "World!", "Cow"]
Xeago has quit [Remote host closed the connection]
tvw has joined #ruby
<workmad3> hmm...
<workmad3> >> "Hello World!\nCow".split(" ")
<eval-in> workmad3 => ["Hello", "World!", "Cow"] (https://eval.in/88890)
<workmad3> Hanmac: explain? :)
Xeago has joined #ruby
w4pm has joined #ruby
* Hanmac did hear the sentence with a darlek voice ;P
<yo61> Any HTTParty users around??
<workmad3> Hanmac: EXPLAIN!
terlar has quit [Quit: leaving]
<Hanmac> XDDD
<yo61> I have some proof of concept code that submits a request to a puppedb server
<workmad3> Hanmac: EXPLAIN NOW OR BE EXTERMINATED!
thenovices has joined #ruby
decoponio has quit [Quit: PC Restarting]
<workmad3> Hanmac: and now my internal voice has gone all dalek-ey :(
meatherly has quit [Ping timeout: 246 seconds]
<Hanmac> workmad3: split(" ") is treated specially: compare it with "Hello World!\nCow".split(/ /) #=> ["Hello", "World!\nCow"]
cj3kim has quit [Ping timeout: 248 seconds]
<shevy> hmm
<shevy> newlines are treated like ' ' ?
<yo61> I want to do the same thing with HTTParty
aspiers has joined #ruby
<yo61> (because I'm extending a puppetdb ruby library that uses HTTParty)
<shevy> very odd
<shevy> I would have assumed " " to be like / /
<workmad3> shevy: same
tharindu has joined #ruby
marcofernandez has joined #ruby
<shevy> GeorgesLeYeti well there you go, workmad3 found the simplest way :D .split(" ")
<Hanmac> shevy: "ruby - the language where everything is odd, even if its even too" ;P
<workmad3> GeorgesLeYeti: ok, so there you go... in general, you can either .tr the separators so that they're all the same, then split on the one separator, or you can use a regex with .split with a [] character class to determine what to split on
<workmad3> GeorgesLeYeti: but if your separators are just newlines and spaces, then .split(" ") seems to be your man ;)
<workmad3> GeorgesLeYeti: on top of that, if you happen to have your separators in an array, you can do something like 'str.split(Regexp.union(array_of_separators))
Xeago has quit [Ping timeout: 248 seconds]
<workmad3> Hanmac: ruby is real - everything is even!
* Hanmac really like Regexp.union ;P
mklappstuhl has quit [Read error: Connection reset by peer]
w4pm has quit [Ping timeout: 272 seconds]
thenovices has quit [Ping timeout: 272 seconds]
senayar_ has quit [Remote host closed the connection]
gja has quit [Quit: This computer has gone to sleep]
senayar has joined #ruby
<Hanmac> workmad3: ri String#split => "If pattern is a single space, str is split on whitespace, with leading whitespace and runs of contiguous whitespace characters ignored."
<workmad3> Hanmac: awesome :)
ndrei has quit [Ping timeout: 276 seconds]
<workmad3> Hanmac: unless you want to split on single spaces...
zegerjan has quit [Ping timeout: 260 seconds]
fedesilva has joined #ruby
<workmad3> Hanmac: now I just need to get the dalek out of my head :(
vlad_starkov has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
<Hanmac> workmad3: did you already see the DoctorWho 50th year and the last Christmas special?
gja has joined #ruby
ewnd9 has quit [Ping timeout: 272 seconds]
<tobiasvl> you can just do split with no patterns
<tobiasvl> >> "Hello World!\nCow".split
<eval-in> tobiasvl => ["Hello", "World!", "Cow"] (https://eval.in/88894)
fgo has joined #ruby
vlad_starkov has joined #ruby
eka has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<Hanmac> tobiasvl: "If pattern is omitted, the value of $; is used. If $; is nil (which is the default), str is split on whitespace as if ` ' were specified."
ocline`` has joined #ruby
<tobiasvl> :)
<tobiasvl> interesting
decoponio has joined #ruby
<workmad3> Hanmac: yup
<workmad3> Hanmac: I get to watch Doctor Who as it happens on UK tv ;)
tharindu is now known as tharindu|away
psyl0n has left #ruby [#ruby]
ocline` has quit [Ping timeout: 246 seconds]
<Hanmac> workmad3: i mean the last Christmas was AWESOME ... i mean a wooden Cyberman? a WOOD-MAN? now thats what i call "low-tec" ;P
klip has joined #ruby
ndrei has joined #ruby
fgo has quit [Ping timeout: 260 seconds]
agjacome has joined #ruby
wildroman2 has quit [Remote host closed the connection]
colonolGron has joined #ruby
MindfulMonk has joined #ruby
<workmad3> Hanmac: except, logically, it was still very hi-tec
<workmad3> Hanmac: it's still a highly advanced machine, it still seemed to have electricity powering it, it was carrying a flamethrower...
<Hanmac> workmad3: and also the darlek "meat puppets" ;P ... specially the SILENCE Darlek meat puppets ... (its like pick your two most frightening monsters and splice them together xD )
<workmad3> the dalek meat puppets had been seen before, iirc :)
<workmad3> but not the silence ones... I did like that the silence were just confessional priests :)
<shevy> you guys are geeks
<Hanmac> yeah but they are "fighting priests" ;P with the lightning powers they could nearly stop the invasion
<workmad3> shevy: yup
canton7-mac has joined #ruby
<workmad3> shevy: got any more facts to state? :)
mojjojo has quit [Quit: mojjojo]
sassamo has joined #ruby
freggles has joined #ruby
mojjojo has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
monkegjinni has quit [Remote host closed the connection]
karupanerura is now known as zz_karupanerura
gregoriokusowski has quit [Ping timeout: 246 seconds]
postmodern has quit [Quit: Leaving]
<shevy> workmad3 regexes are hard on the brain
<workmad3> :)
gregoriokusowski has joined #ruby
sassamo has quit [Ping timeout: 245 seconds]
monkegjinni has joined #ruby
sandGorgon has quit [Ping timeout: 245 seconds]
<Hanmac> other facts for share: "Hanmacs code is creepy but mostly the best way" ;P
mklappstuhl has quit [Remote host closed the connection]
<workmad3> Hanmac: how is your code creepy? :/
<shevy> only hanmac understands it
<workmad3> that's not creepy, that's job security
gja has joined #ruby
mklappstuhl has joined #ruby
w_alexus has left #ruby [#ruby]
<Hanmac> workmad3: something like that:
<Hanmac> >> data=["/path/to/file/file.fil", "/path/to/file/dir1/file.fil"].map {|s|s.split(/\//) }.sort_by(&:size); chunk = data[1].to_enum(:zip,data[0]).chunk{|a,b| a == b };[chunk.first.last.map(&:first).join("/"),chunk.to_a.last.last.map {|s| s.compact.join("/")}]
<eval-in> Hanmac => ["/path/to/file", ["dir1/file.fil", "file.fil"]] (https://eval.in/88899)
fgo has joined #ruby
ndrei has quit [Ping timeout: 276 seconds]
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
<workmad3> Hanmac: nice :)
wildroman2 has joined #ruby
ndrei has joined #ruby
chihhsin has quit [Ping timeout: 260 seconds]
nateberkopec has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
Xeago has joined #ruby
banister has quit [Ping timeout: 265 seconds]
tharindu|away has quit [Ping timeout: 260 seconds]
gja has quit [Quit: This computer has gone to sleep]
nateberkopec has quit [Ping timeout: 276 seconds]
claymore has quit [Read error: Operation timed out]
gregoriokusowski has quit [Ping timeout: 252 seconds]
freggles has quit [Remote host closed the connection]
gregoriokusowski has joined #ruby
chrisseaton has quit []
Kar- has quit [Ping timeout: 272 seconds]
senayar_ has joined #ruby
lkba has joined #ruby
LadyRainicorn has joined #ruby
coderhs has quit [Read error: Connection timed out]
mklappstuhl has joined #ruby
dukz has quit [Remote host closed the connection]
coderhs has joined #ruby
ewnd9 has joined #ruby
Jetchisel has quit [Ping timeout: 252 seconds]
senayar has quit [Ping timeout: 252 seconds]
<Takumo> Does faraday not have a JSON encoding middleware for requests?
sandGorgon has joined #ruby
adac has joined #ruby
coderhs has quit [Client Quit]
soba has quit [Ping timeout: 260 seconds]
coderhs has joined #ruby
gokul has joined #ruby
ohwhoa has quit [Quit: woah!]
banister has joined #ruby
claymore has joined #ruby
<adac> I would need to connect to mysql database via tcp and not via socket, and using "host" for the active_record configuration file which should than automatically use the tcp connection. However it does not work and it still tries to use the unix socket. Does anyone know what might be wrong
cj3kim has joined #ruby
meatherly has joined #ruby
<Takumo> adac: do you have "socket" defined?
<adac> Takumo, nope just using "host" and leaving socket undfined
fwaokda has quit [Remote host closed the connection]
<MrZYX> you might get better answers in #rubyonrails
petey has joined #ruby
fwaokda has joined #ruby
mklappstuhl has quit [Read error: Connection reset by peer]
_aeris_ is now known as [_aeris_]
wildroman2 has quit [Remote host closed the connection]
<shevy> hmm
<shevy> is there a simple way to have like a system where there are lots of ruby objects running in the background
<shevy> and you can specifically call any of these at any time
<shevy> like making 1000 .rb files persistent and running all the time (in idle mode)
justsee has quit [Quit: leaving]
mklappstuhl has joined #ruby
<MrZYX> why would you want to?
<MrZYX> also making "ruby objects" == "rb file" confuses me...
HansPampel has joined #ruby
<shevy> MrZYX certain .rb files take rather long to do their specific tasks
thenovices has joined #ruby
<shevy> MrZYX for instance, one is reading in data from 2500 yaml files here and processing that
hiall has joined #ruby
<HansPampel> what is the recommended way to include rake tasks in a self-built gem? I want to install the gem and execute a certain raketask afterwards ?
meatherly has quit [Ping timeout: 252 seconds]
<shevy> then it generates several files
<MrZYX> shevy: top level code? so you spawn a new ruby process for each "task"?
afhammad has joined #ruby
<shevy> MrZYX it is spawned right now every time that .rb file is run. there is a slight delay before it can start generating the new files
<shevy> that delay is rather annoying
petey has quit [Ping timeout: 276 seconds]
rdark has quit [Ping timeout: 272 seconds]
<MrZYX> make it a class
bkparso has quit [Quit: bkparso]
<shevy> it already is
shime has quit [Ping timeout: 272 seconds]
<MrZYX> then just keep a process running and build a cli to it, might as simple as starting it through irb
claymore has quit [Ping timeout: 252 seconds]
<shevy> hmm
sergicles has joined #ruby
rudisimo has quit [Remote host closed the connection]
thenovices has quit [Ping timeout: 272 seconds]
claymore has joined #ruby
rickruby has joined #ruby
supergeek has quit [Quit: Goodbye, cruel world.]
fgo has quit [Remote host closed the connection]
nfk has joined #ruby
pranny has quit [Quit: Leaving.]
rdark has joined #ruby
nettoweb has quit [Quit: nettoweb]
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rickruby has quit [Ping timeout: 245 seconds]
mehlah has quit [Quit: Leaving...]
ss_ has quit [Remote host closed the connection]
ss_ has joined #ruby
TheLarkInn has joined #ruby
alexfreidah has joined #ruby
failshell has joined #ruby
nettoweb has joined #ruby
BrixSat has quit [Quit: No Ping reply in 180 seconds.]
banister has quit [Read error: Connection reset by peer]
vulcfunc has joined #ruby
[_aeris_] is now known as _aeris_
gja has joined #ruby
shredding has joined #ruby
ss_ has quit [Ping timeout: 245 seconds]
afhammad has quit []
gregoriokusowski has quit [Ping timeout: 245 seconds]
BrixSat has joined #ruby
vulcfunc is now known as auget
dukz has joined #ruby
amacgregor_ has quit [Read error: Connection reset by peer]
juarlex has joined #ruby
alexfreidah has quit [Ping timeout: 276 seconds]
gja has quit [Client Quit]
noop has quit [Ping timeout: 246 seconds]
newbie|8 has joined #ruby
fgo has joined #ruby
nowthatsamatt has joined #ruby
ixti has joined #ruby
sassamo has joined #ruby
mercwithamouth has joined #ruby
max96at has joined #ruby
jkamenik has joined #ruby
yasushi has joined #ruby
juarlex has quit [Ping timeout: 252 seconds]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
wildroman2 has joined #ruby
gregoriokusowski has joined #ruby
sassamo has quit [Ping timeout: 245 seconds]
gja has joined #ruby
manfred_macx has quit [Read error: Connection reset by peer]
vim_shim_ has joined #ruby
OdNairy has quit []
nettoweb has quit [Quit: nettoweb]
kep has joined #ruby
_aeris_ is now known as [_aeris_]
fgo has quit [Remote host closed the connection]
OdNairy has joined #ruby
karnowski__ has left #ruby [#ruby]
nettoweb has joined #ruby
pmlarocque has joined #ruby
tharindu has joined #ruby
shredding has quit [Quit: shredding]
nateberkopec has joined #ruby
MindfulMonk has quit [Ping timeout: 260 seconds]
figgleberry has joined #ruby
timonv has quit [Remote host closed the connection]
fixl has quit [Remote host closed the connection]
tharindu has quit [Ping timeout: 276 seconds]
figgleberry has quit [Ping timeout: 245 seconds]
yalue has joined #ruby
nateberkopec has quit [Ping timeout: 252 seconds]
chihhsin has joined #ruby
<Takumo> Anyone here familiar with WebMock?
colonolGron has quit [Ping timeout: 260 seconds]
banister has joined #ruby
Xeago has quit [Remote host closed the connection]
pmlarocque has quit [Quit: pmlarocque]
Xeago has joined #ruby
wildroman2 has quit [Remote host closed the connection]
colonolGron has joined #ruby
ndrei has quit [Read error: Operation timed out]
tt1187 has quit [Ping timeout: 272 seconds]
spyderman4g63 has joined #ruby
tt1187 has joined #ruby
Briareos1 has joined #ruby
ss_ has joined #ruby
ewnd9 has quit [Ping timeout: 245 seconds]
phansch has quit [Quit: Leaving]
MindfulMonk has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
zegerjan has joined #ruby
nickchow has joined #ruby
nettoweb has quit [Quit: nettoweb]
<HansPampel> what is the recommended way/pattern to include rake tasks in a self-built gem? I want to install the gem and execute a certain raketask afterwards ? I could add a class that to ./bin and add the execution of a rake task to it, but i am not sure if that is what i want..
timonv has joined #ruby
newbie|8 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
pushpak has joined #ruby
Attic has joined #ruby
Virtualize has joined #ruby
popl has quit [Quit: Hoppe hoppe Reiter]
nickchow has quit [Client Quit]
pmlarocque has joined #ruby
pranny has joined #ruby
RaCx has joined #ruby
j^^ has joined #ruby
MindfulMonk has quit [Ping timeout: 245 seconds]
Attic has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Jrz has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
zegerjan has quit [Quit: WeeChat 0.4.2]
mikecmpbll has joined #ruby
colonolGron has quit [Quit: Lost terminal]
meatherly has joined #ruby
tt1187 has quit [Ping timeout: 272 seconds]
krz has quit [Quit: WeeChat 0.4.2]
nari has joined #ruby
tt1187 has joined #ruby
nateberkopec has joined #ruby
drumusician has quit [Read error: Operation timed out]
rdark has quit [Ping timeout: 245 seconds]
w4pm has joined #ruby
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yacks has joined #ruby
thenovices has joined #ruby
rdark has joined #ruby
ndrei has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
meatherly has quit [Ping timeout: 272 seconds]
Pixels has joined #ruby
w4pm has quit [Ping timeout: 272 seconds]
nettoweb has joined #ruby
thenovices has quit [Ping timeout: 248 seconds]
nettoweb has quit [Client Quit]
gja has quit [Quit: This computer has gone to sleep]
sepp2k has joined #ruby
tyl has joined #ruby
tkuchiki has quit [Remote host closed the connection]
rudisimo has joined #ruby
colonolGron has joined #ruby
tkuchiki has joined #ruby
_5kg has quit [Ping timeout: 248 seconds]
tyl has quit [Client Quit]
shredding has joined #ruby
shadesaaaa has quit [Ping timeout: 265 seconds]
RaCx has joined #ruby
pranny has quit [Quit: Leaving.]
tkuchiki has quit [Ping timeout: 272 seconds]
securitycrush has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
phansch has joined #ruby
gregoriokusowski has quit [Quit: gregoriokusowski]
alekst has joined #ruby
JohnBat26 has joined #ruby
mark_locklear has joined #ruby
ohwhoa has joined #ruby
ewnd9 has joined #ruby
sassamo has joined #ruby
aryaching has quit []
mojjojo has quit [Quit: mojjojo]
clamstar has joined #ruby
IceyEC has joined #ruby
nettoweb has joined #ruby
mak|idle is now known as makkura
dEPy has joined #ruby
failshell has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
ahmedelgabri has quit [Remote host closed the connection]
sassamo has quit [Ping timeout: 265 seconds]
ahmedelgabri has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
ffranz has joined #ruby
binw has quit [Read error: Connection reset by peer]
dEPy has quit [Quit: Computer has gone to sleep.]
ItSANgo has quit [Quit: Leaving...]
nettoweb has quit [Quit: nettoweb]
jkamenik has quit [Quit: Leaving.]
senayar_ has quit [Remote host closed the connection]
senayar has joined #ruby
klaut_ has quit [Read error: No route to host]
tharindu has joined #ruby
browndawg has quit [Quit: Leaving.]
klaut has joined #ruby
coder_neo has joined #ruby
kaldrenon has joined #ruby
RaCx has joined #ruby
coderhs has quit [Ping timeout: 265 seconds]
fedez77 has joined #ruby
fire has joined #ruby
nowthatsamatt has joined #ruby
ffio has joined #ruby
binw has joined #ruby
ItSANgo has joined #ruby
jovon has joined #ruby
diegoviola has joined #ruby
Hanmac1 has joined #ruby
timonv has quit [Remote host closed the connection]
_Andres has joined #ruby
Fractional has joined #ruby
yasushi has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 246 seconds]
breakingthings has joined #ruby
waxjar has joined #ruby
dkamioka has joined #ruby
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
fire has quit [Ping timeout: 260 seconds]
terlar has joined #ruby
ffio has quit [Ping timeout: 272 seconds]
wildroman2 has joined #ruby
lowski has joined #ruby
jerius has joined #ruby
<Fractional> Good evening!
<TheLarkInn> Good morning!
enebo has joined #ruby
<Fractional> One can not say good morning in the near evening!
dblessing has joined #ruby
<colonolGron> depends on where he lives
timonv has joined #ruby
<TheLarkInn> sure does ;-)
<TheLarkInn> Tis 8:00AM here.
<TheLarkInn> But good evening to you sir!
<Fractional> 'Muricah
m00nlight has quit [Ping timeout: 246 seconds]
m00nlight has joined #ruby
himsin has quit [Quit: himsin]
mlpinit has joined #ruby
auget has quit [Remote host closed the connection]
<Fractional> Good UGT evening MrZYX!
<Fractional> Good UGT morning*
<MrZYX> good morning ;P
j^^ has quit [Quit: Page closed]
<Fractional> It is almost evening here but now that I follow the UGT time I shall say good morning!
sassamo has joined #ruby
lowski has quit [Quit: Textual IRC Client: www.textualapp.com]
RaCx has quit [Quit: Computer has gone to sleep.]
mechanicles has quit []
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mary5030 has joined #ruby
drumusician has joined #ruby
mary5030 has quit [Remote host closed the connection]
<Fractional> Easiest way to count how many numbers there are in an array of each number? For instance [1, 1, 2, 3, 3] # => 1:2, 2:1, 3:2
danshultz has joined #ruby
coderhs has joined #ruby
relix has joined #ruby
sandGorgon has quit [Ping timeout: 245 seconds]
stryek has joined #ruby
<Hanmac1> Fractional:
<Hanmac1> >> [1, 1, 2, 3, 3].group_by {|i|i}.map {|k,v|[k,v.size].join(":")}.join(",")
<eval-in> Hanmac1 => "1:2,2:1,3:2" (https://eval.in/88932)
Hanmac1 is now known as Hanmac
CogitoErgoSum has joined #ruby
ahmedelgabri has quit [Remote host closed the connection]
maoko has quit [Quit: Textual IRC Client: www.textualapp.com]
mercwithamouth has quit [Ping timeout: 252 seconds]
mvangala has quit [Read error: Connection reset by peer]
gja has joined #ruby
mvangala has joined #ruby
gwb3 has quit [Quit: leaving]
<waxjar> >> [1,1,2,3,3].each_with_object(Hash.new 0) { |no,hash| hash[no] += 1 } # :D
<eval-in> waxjar => {1=>2, 2=>1, 3=>2} (https://eval.in/88933)
<Fractional> Do you have any good sources for learning more about algorithms with arrays?
HansPampel has left #ruby ["http://quassel-irc.org - Chat comfortably. Anywhere."]
<Fractional> Preferably with tasks after every read.
<waxjar> read the Enumerable documentation every once in a while, it's so helpful
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mehlah has joined #ruby
dukz has quit [Remote host closed the connection]
gwb3 has joined #ruby
_tpavel has joined #ruby
dukz has joined #ruby
lmickh has joined #ruby
thenovices has joined #ruby
<Fractional> Do you have any "tasks" for those?
dukz has quit [Read error: Connection reset by peer]
shredding has quit [Read error: Connection reset by peer]
dukz has joined #ruby
<waxjar> i don't, but I'm sure some exist
yasushi has joined #ruby
shredding has joined #ruby
tharindu has quit [Ping timeout: 252 seconds]
thenovices has quit [Ping timeout: 245 seconds]
dukz has quit [Ping timeout: 272 seconds]
noop has joined #ruby
tyl has joined #ruby
tyl has quit [Client Quit]
burlyscudd has joined #ruby
maasha has joined #ruby
alexfreidah has joined #ruby
jedimind has joined #ruby
petey has joined #ruby
cj3kim has quit [Ping timeout: 276 seconds]
gregoriokusowski has joined #ruby
<maasha> hi
figgleberry has joined #ruby
amacgregor_ has joined #ruby
alexfreidah has quit [Ping timeout: 265 seconds]
jprovazn has quit [Quit: Leaving]
<maasha> I am trying to understand why my scheme of named pipes hang: https://gist.github.com/maasha/aa39e0f65ce7dbcec58c
sailias has joined #ruby
juarlex has joined #ruby
coderhs has quit [Read error: Connection timed out]
sLi_ has joined #ruby
coder_neo has quit [Quit: This computer has gone to sleep]
coderhs has joined #ruby
coder_neo has joined #ruby
dukz has joined #ruby
nateberkopec has quit [Quit: Leaving...]
danijoo has quit [Read error: Connection reset by peer]
juarlex has quit [Ping timeout: 272 seconds]
danijoo has joined #ruby
thomasxie has quit [Remote host closed the connection]
wildroman2 has quit [Remote host closed the connection]
pedda has joined #ruby
mojjojo has joined #ruby
<LadyRainicorn> You know Ruby has support for pipes, right?
marcgg_ has quit [Ping timeout: 245 seconds]
lyanchih_ has joined #ruby
browndawg has joined #ruby
kcombs has joined #ruby
<LadyRainicorn> Omg, I was thinking of Python.
<LadyRainicorn> It actually doesn't.
jkamenik has joined #ruby
<LadyRainicorn> Such wow.
<LadyRainicorn> Anyway.
marcgg has joined #ruby
<lupine> for named pipes? sure it does
hypnosb has quit [Quit: Leaving]
<LadyRainicorn> maasha: require 'mkfifo'
kevind has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
<LadyRainicorn> lupine: Sure? All I can see on Google are people talming about how Ruby doesn't have a builtin for named pipes.
flubba has joined #ruby
wildroman2 has joined #ruby
Xeago has quit [Remote host closed the connection]
wildroman2 has quit [Remote host closed the connection]
Xeago has joined #ruby
wildroman2 has joined #ruby
<LadyRainicorn> I was pretty shocked too.
vlad_starkov has joined #ruby
<maasha> LadyRainicorn: I did note the mkfifo gem, but I simple used a system call instead.
Cephalostrum has quit [Quit: Aim higher. Try this: why am I here? Why do I exist, and what is my purpose in this universe? (Answers: 'Cause you are. 'Cause you do. 'Cause I got a shotgun, and you ain't got one.)]
vlad_sta_ has joined #ruby
<lupine> ohhh. no, you're right
<lupine> no mknod() wrapper
<lupine> *vomit*
<LadyRainicorn> Yeah I know. ;-;
<LadyRainicorn> wtf right?
<LadyRainicorn> maasha: Your solution is insecure.
<lupine> well, could be worse
<LadyRainicorn> You need to call system with multiple arguments.
dkamioka has quit [Remote host closed the connection]
coderhs has quit [Read error: Connection timed out]
<LadyRainicorn> Using interpolation with it is vert bad.
<maasha> LadyRainicorn: worse, it aint working
<LadyRainicorn> And chmod 666 is bad too.
mojjojo has quit [Quit: mojjojo]
ss_ has quit [Remote host closed the connection]
<sweeper> mark of the beast
coderhs has joined #ruby
zeeraw has joined #ruby
ambushsabre has joined #ruby
<LadyRainicorn> What error do you get?
Xeago has quit [Ping timeout: 246 seconds]
lfox has joined #ruby
<maasha> No error, but it hangs - so I have missed something
Shidash has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
Bira has joined #ruby
<LadyRainicorn> Why are you opening with r+ and w+?
<LadyRainicorn> You want r and either w or a.
vlad_sta_ has quit [Remote host closed the connection]
<LadyRainicorn> You want to send if you must instead of method(x).call
himsin has joined #ruby
<Fractional> Looking for a ruby mentor or programming partner! :)
<maasha> LadyRainicorn: After googling examples of named pipes I saw they were using r+ and w+ (besides, without + it still hangs)
Megtastique has joined #ruby
<LadyRainicorn> You'll get extra newlines with puts.
Briareos1 has quit [Remote host closed the connection]
* maasha makes a note of send
jlast has joined #ruby
tyl has joined #ruby
<maasha> LadyRainicorn: Sure, but that is not my main concern.
<LadyRainicorn> Ah, you're not closing the fifo.
xjiujiu has quit [Ping timeout: 272 seconds]
interactionjaxsn has joined #ruby
cj3kim has joined #ruby
<LadyRainicorn> It will hang reading until you do.
<LadyRainicorn> You can't just iterate over them.
<LadyRainicorn> You need to specifically send an EOF.
razibog has quit [Ping timeout: 272 seconds]
sassamo has quit [Remote host closed the connection]
yasushi has quit [Remote host closed the connection]
sassamo has joined #ruby
<maasha> LadyRainicorn: hm, yeah, I was suspecting some buffer issue. But input and output which are IO objects are invoked in block context and hence closed?
<maasha> Oh, but not without EOF.
<LadyRainicorn> No, the FIFO is still alive.
arturaz has quit [Remote host closed the connection]
<maasha> So how can I do this?
wallerdev has joined #ruby
Macaveli has quit [Ping timeout: 272 seconds]
gijsje has joined #ruby
<LadyRainicorn> system("cat blah.txt | wc -l")
<LadyRainicorn> (This is why you never interpolate with system.
gja has joined #ruby
<gijsje> k i'm totally confused about ruby, why is: (if hash.keys.first == "string") not true?
<LadyRainicorn> Or IO.pipe with your solution.
axl_ has joined #ruby
<LadyRainicorn> That's not valid syntax?
<tobiasvl> gijsje: well, what is the first key of your hash?
<gijsje> so my first key is "name" and i want to compare it to "name"
pu22l3r_ has joined #ruby
<gijsje> i tried chomp etc
<gijsje> key.class says String
madb055 has joined #ruby
sassamo has quit [Ping timeout: 272 seconds]
<MrZYX> >> {"foo": "bar"}.keys.first == "foo"
<eval-in> MrZYX => /tmp/execpad-40e7b539526f/source-40e7b539526f:2: syntax error, unexpected ':', expecting => ... (https://eval.in/88945)
<MrZYX> ups
<MrZYX> >> {"foo" => "bar"}.keys.first == "foo"
<eval-in> MrZYX => true (https://eval.in/88946)
<gijsje> MrZYX, i'm using CSV.foreach(file.path, col_sep: ';', headers: true) do |row|
arturaz has joined #ruby
<gijsje> in where row.to_hash has the key
<gijsje> and that doesn't match
marcgg_ has joined #ruby
<MrZYX> print it using p (not puts or print)
<MrZYX> p row.to_hash.keys.first
<LadyRainicorn> p
<gijsje> lemme try it
<gijsje> don't see how its different tho
interactionjaxsn has quit [Remote host closed the connection]
gja has quit [Client Quit]
<MrZYX> copy paste the output
monkegjinni has quit [Remote host closed the connection]
<apeiros> gijsje: possible reasons: a) your hash.keys.first is not "string", b) it is "string" but in a different encoding, c) it is something which just has the same inspect
<apeiros> I suspect b) without further information.
<maasha> LadyRainicorn: so the commands in the Pipe class here are place holders for something more advanced that needs to be coded, so I am particularly interested in a way of piping commands which is easy to fork.
diegoviola has quit [Quit: WeeChat 0.4.2]
<LadyRainicorn> What do you need to code?
axl_ has quit [Ping timeout: 272 seconds]
<gijsje> row.to_hash.keys.first says name, if row.to_hash.keys.first == "name" is false
<LadyRainicorn> Ask the question you need answered rather than the one you think you need.
marcgg has quit [Ping timeout: 245 seconds]
<gijsje> how do i drop encoding?
<apeiros> you don't *drop* encoding
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
krz has joined #ruby
<apeiros> encoding is an integral part of a string.
<gijsje> :p
DouweM has quit [Ping timeout: 252 seconds]
Cephalostrum has joined #ruby
<gijsje> i mean in the compare
<apeiros> you can inform ruby about what encoding your string actually has, and you can transcode a string into another encoding.
dkamioka has joined #ruby
interactionjaxsn has joined #ruby
coder_neo has quit [Quit: This computer has gone to sleep]
<apeiros> again, you don't. you can't compare two strings in different encodings. so what you do is make sure they're in the same encoding before comparing.
<gijsje> ok, how do i check the current encoding, i know the file is utf8
MrThePlague has joined #ruby
MrThePlague has joined #ruby
wildroman2 has quit [Remote host closed the connection]
mary5030 has joined #ruby
klaas has quit [Quit: ZNC - http://znc.sourceforge.net]
gja has joined #ruby
<apeiros> str.encoding
klaas has joined #ruby
gja has quit [Changing host]
gja has joined #ruby
ctp has joined #ruby
Hobogrammer has quit [Ping timeout: 272 seconds]
ahmedelgabri has joined #ruby
mary5030 has quit [Remote host closed the connection]
heftig has quit [Quit: Quitting]
tesuji has quit [Ping timeout: 272 seconds]
<gijsje> hmm both say utf-8
mary5030 has joined #ruby
xjiujiu has joined #ruby
<gijsje> the key and the string
<apeiros> then the remaining possibilities are a) you do something wrong (can't tell without code and data) or b) you have unprintables and did't check the inspects
pu22l3r_ has quit [Remote host closed the connection]
<gijsje> i'm gonna pastebin
<apeiros> please use something that is not ad-ridden like pastebin.com
pu22l3r_ has joined #ruby
<apeiros> gist.github.com eg.
heftig has joined #ruby
vallieres_ has joined #ruby
momomomomo has joined #ruby
fantazo_ has joined #ruby
<gijsje> sorry
fantazo has joined #ruby
<apeiros> *sob*
<gijsje> :D
<apeiros> add `logger.debug row.to_hash.keys.first.inspect`
<apeiros> and the output
tharindu has joined #ruby
<apeiros> you can publish multiple files in the same gist
thenovices has joined #ruby
nateberkopec has joined #ruby
sassamo has joined #ruby
ctp has quit [Quit: Leaving...]
danijoo has quit [Read error: Connection reset by peer]
tylersmith has joined #ruby
mojjojo has joined #ruby
Txandy is now known as Txandy|away
danijoo has joined #ruby
Txandy|away is now known as Txandy
ohwhoa has quit [Quit: woah!]
<fbernier> I've got lots of .yml files to which I want to add a namespace node... I'd look through them all, add it, but then how do I indent the rest of the file?
<apeiros> fbernier: that's really a $EDITOR question
<fbernier> yeah probably
<Takumo> Hi all, can anyone help me with this issue I'm having with WebMock? https://gist.github.com/LeoAdamek/8419967
<Takumo> my request is being made with HTTP Authentication...
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<Takumo> and I've told WebMock to expect authentication
freerobby has joined #ruby
ctp has joined #ruby
tharindu has quit [Ping timeout: 260 seconds]
<gijsje> i really think its magical why it isnt working
renklaf_ has quit [Remote host closed the connection]
<gijsje> such a simple thing
thenovices has quit [Ping timeout: 272 seconds]
yasushi has joined #ruby
ericwood_ is now known as ericwood
fedesilva has quit [Remote host closed the connection]
<momomomomo> gijsje: What's your issue?
monkegjinni has joined #ruby
<gijsje> that if statement never shows
<gijsje> the hallo never shows
nettoweb has joined #ruby
mary5030 has quit [Ping timeout: 272 seconds]
<apeiros> gijsje: ok, something is off. if the shown output is correct, it should be ==
ctp has quit [Client Quit]
<gijsje> so it suppose to work?
<apeiros> yes
<gijsje> i feel so stupid
<apeiros> but I have no further idea how to remote-debug that
gja has quit [Quit: This computer has gone to sleep]
yasushi has quit [Ping timeout: 246 seconds]
coder_neo has joined #ruby
Kar- has joined #ruby
nateberkopec has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
tagrudev has quit [Remote host closed the connection]
<gijsje> logger.debug row.to_hash.keys.first <=> "name" says 1
Virtualize has quit [Quit: Leaving...]
<Takumo> oh I found the issue, my spec didn't expect it with the auth... but now its failing on posting JSON
mklappstuhl has quit [Remote host closed the connection]
b00stfr31k has joined #ruby
mengu has quit [Remote host closed the connection]
<apeiros> gijsje: what does .length say?
<apeiros> (though, .inspect should show unprintables)
wildroman2 has joined #ruby
urbanmonk has joined #ruby
_5kg has joined #ruby
gja has joined #ruby
<gijsje> wow..
mary5030 has joined #ruby
sandGorgon has joined #ruby
kpshek has joined #ruby
<gijsje> what the banana's
<gijsje> logger.debug row.to_hash.keys.first.length = 5 logger.debug "name".length = 4
qhartman has quit [Quit: Ex-Chat]
<apeiros> sounds familiar
<apeiros> what's keys.first[0].ord?
<Fractional> Looking for mentor or programming partner in the Ruby language! :)
<gijsje> 65279
* Hanmac thinks there is a "\n" inside the keys ...
<gijsje> chomp is the same
mary5030_ has joined #ruby
ahri_ has joined #ruby
SCommette has joined #ruby
<apeiros> that's a BOM
<ahri_> hi, is there any way to determine the call chain resulting in the current running instance of ruby? ideally i'd like to find out the names of the binaries -- this is on windows
<apeiros> while utf-8 doesn't need one, it can have one
mary5030 has quit [Read error: Connection reset by peer]
<apeiros> gijsje: use CSV.foreach(file.path, col_sep: ';', headers: true, encoding: "bom|utf-8") do |row|
<apeiros> annoying that .inspect doesn't print that one
dangerousdave has joined #ruby
<gijsje> pff amazing
<gijsje> what is bom?
bluOxigen has joined #ruby
figglebe_ has joined #ruby
mojjojo has quit [Quit: mojjojo]
<apeiros> google :-p
<apeiros> byte order mark
bline79 has joined #ruby
<gijsje> sorry for not googling i was a bit frustrated
<apeiros> lol
fire has joined #ruby
mdpatrick_ has quit [Quit: No Ping reply in 180 seconds.]
vongrippen has quit [Quit: No Ping reply in 180 seconds.]
mansi has joined #ruby
figgleberry has quit [Ping timeout: 260 seconds]
sambao21 has joined #ruby
thenovices has joined #ruby
mojjojo has joined #ruby
<bline79> I want to create an 8 character string. The first 3-4 characters are predefined, but then I want to have the remaining 4-5 characters be the randomized numbers
fmcgeough has joined #ruby
nari has quit [Ping timeout: 272 seconds]
freerobby1 has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
coder_neo has quit [Quit: This computer has gone to sleep]
<apeiros> bline79: will you also ask a question?
bluenemo has quit [Remote host closed the connection]
<bline79> good point, just one moment. :p
Targen has quit [Ping timeout: 260 seconds]
thesheff17 has joined #ruby
<Fractional> Looking for mentor or programming partner in the Ruby language! :)
geggam has joined #ruby
monkegjinni has quit [Remote host closed the connection]
ambushsabre has quit [Quit: rip]
gokul has quit [Quit: Leaving]
vlad_starkov has joined #ruby
vlad_sta_ has joined #ruby
freezey has joined #ruby
<bline79> so, I have a variable assigned to the prefix. That prefix will be 3-4 characters. What function should I use to create the remaining 4-5 characters as numberic digits randomly?
<workmad3> bline79: rand(10 * digits_remaining).to_s ?
freezey has quit [Remote host closed the connection]
freezey has joined #ruby
dkamioka has quit [Remote host closed the connection]
<workmad3> bline79: oh, and some string padding
Rainicorn has joined #ruby
<apeiros> workmad3: you meant **, right?
ohwhoa has joined #ruby
<workmad3> apeiros: yes
<workmad3> apeiros: deliberate mistake for the reader...
<apeiros> :)
ahmedelgabri has quit []
dkamioka has joined #ruby
ozgun has quit [Quit: Leaving]
nwertman has quit [Quit: Lost terminal]
wald0 has joined #ruby
vlad_starkov has quit [Ping timeout: 272 seconds]
<apeiros> bline79: btw., number and numeric, there's no numberic ;-)
_maes_ has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
LadyRainicorn has quit [Read error: Connection reset by peer]
shime has joined #ruby
ahmedelgabri has joined #ruby
nettoweb has quit [Quit: nettoweb]
bean__ has joined #ruby
Wolland has joined #ruby
b00stfr31k has quit [Quit: Lost terminal]
deception has joined #ruby
lorelei_ has joined #ruby
acrussell has joined #ruby
Macaveli has joined #ruby
<bline79> typo with the b
<bline79> still getting coffee in me here
<soahccc> Damn one index in the database any my import script is fast again :S
Rainicorn has quit [Ping timeout: 245 seconds]
mojjojo has quit [Quit: mojjojo]
<Fractional> Is this a good way to calculate the median?
meatherly has joined #ruby
Xeago has joined #ruby
<workmad3> Fractional: no
<wald0> why is @@var so broken by default? i mean, seems like to be an improtant bug in ruby: http://www.railstips.org/blog/archives/2006/11/18/class-and-instance-variables-in-ruby/
<Fractional> workmad3: Why not? D:
<workmad3> Fractional: think integer division and then tell me ;)
colonolGron has quit [Read error: Operation timed out]
<workmad3> Fractional: also think in terms of precedence
CogitoErgoSum has quit [Ping timeout: 260 seconds]
kpshek has quit []
CogitoErgoSum has joined #ruby
ylluminate has joined #ruby
<apeiros> Fractional: I assume `self` is a sorted array?
<Fractional> data = [6,2,4,5,7,1,9,7,9]
<Fractional> puts data.median #=> 7
<workmad3> Fractional: right... now try with an array with an even number of elements
himsin has quit [Ping timeout: 276 seconds]
<apeiros> Fractional: which would be wrong…
BuSerD_away has quit [Remote host closed the connection]
<Fractional> Oh, thanks :P
<Fractional> Weird, I thought I got the right answer before.
joshu has quit [Ping timeout: 272 seconds]
<workmad3> Fractional: and yeas, as apeiros says, that is not the right answer with that data set
lorelei_ has quit [Quit: Leaving.]
<workmad3> Fractional: the median is only the middle value on *sorted* data sets
CaptainJet has joined #ruby
<workmad3> Fractional: what you have there is basically meaningless in statistical terms ;)
<workmad3> wald0: it's not 'broken'
<apeiros> workmad3: oh, no, it's a semi-random number :D
<apeiros> sample
<workmad3> wald0: it's just not the same as a class-instance variable
cyberarm has joined #ruby
<workmad3> wald0: the issue really is that the default behaviour is a bit surprising and not as useful as the slightly harder to use class-instance variable stuff
<workmad3> wald0: not that it's broken :)
moshef has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
RaCx has joined #ruby
<workmad3> apeiros: I think you'd have a bit of trouble getting a single value past a statistician as a 'sample' ;)
<moshef> Hi. I have a mixing module (A) that is included in B. I want to make some of the methods in module B private, how do I do that?
<moshef> simply adding private doesn't do much
mklappstuhl has joined #ruby
<apeiros> workmad3: reminds me of a comedy show… "we did a survey about the upcoming elections, we asked one person, who voted for party X. we extrapolated from there and predict, that the whole Bundestag will be occupied by party X."
<moshef> the second solution here http://stackoverflow.com/questions/318850/private-module-methods-in-ruby works, i was wondering if there is another way which isn't as ugly.
dkamioka has quit [Remote host closed the connection]
Virtualize has joined #ruby
<bline79> https://gist.github.com/bline79/8420749 it doesn't appear to guarantee that the length is 8 digits
<bline79> I ran it a bunch of times and once it was 7 digits
<workmad3> bline79: I did say you might need to padd :P
fedesilva has joined #ruby
heftig has quit [Quit: Quitting]
<apeiros> bline79: didn't you say 4-5? :D
ahawkins has quit [Quit: leaving]
<bline79> 4-5 randoms because the prefix can vary
<bline79> between 3-4
<workmad3> bline79: e.g. with hostname.rjust(8-prefix.length, "0")
Spami has joined #ruby
<apeiros> moshef: `private` marks instance methods as private
sambao21 has joined #ruby
blackmesa has joined #ruby
<apeiros> moshef: so assuming you define class methods like the poster in that SO thread, of course it won't work
<moshef> I'm not defining class methods, I don't have a deal
<moshef> i have 2 modules
<workmad3> bline79: btw, there's also no guarantees at all about uniqueness here
<apeiros> moshef: then show your code?
<bline79> that's okay. We won't have more then a dozen or two hostnames with any particular prefix
<apeiros> moshef: yeah, "I have 2 modules" is not equivalent to "I don't have class methods". modules can have class methods. they're those you define with def self.foo
<bline79> changes of conflict are pretty small i think
<apeiros> chances?
<bline79> yes :( sorry
<apeiros> :)
senj has joined #ruby
Soulcutter has quit [Quit: WeeChat 0.4.2]
<apeiros> typohunt!
<workmad3> bline79: 2.5% if the random generator was *truly* random
<Fractional> self[(self.size / 2)].to_f #=> 4 self[(self.size-1 / 2)].to_f #=> 0 when it should return 2
<workmad3> bline79: but it's not
<Fractional> On the array data = [6,2,4,6]
_maes_ has quit [Read error: Connection reset by peer]
<Fractional> What looks wrong?
h_kon has quit [Remote host closed the connection]
<workmad3> Fractional: precedence
Virtualize has quit [Ping timeout: 272 seconds]
<workmad3> Fractional: which is *not* managed with whitespace ;)
dweeb_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<Fractional> workmad3: Thanks, solved it! :D
<Fractional> Really appreciate you all helping me! :)
<workmad3> Fractional: btw, I'd probably suggest you calculate the middle with '(ary.size * 0.5).to_i
Shidash has quit [Ping timeout: 245 seconds]
<workmad3> Fractional: rather than checking the array size and doing an if off it
<Fractional> Sorry, I do not quite think I understand what you mean
gja has joined #ruby
bahar has quit [Changing host]
bahar has joined #ruby
<workmad3> Fractional: oh, make that '(ary.size.succ * 0.5).to_i
<apeiros> moshef: and your problem there is what? that you can call show_name there?
<moshef> yes
<moshef> i want it to be called only by other methods within that module
Virtualize has joined #ruby
<apeiros> moshef: um, I think you haven't understood what private does
<moshef> posibly
<apeiros> private means you can't call a method from *outside* the current object
nettoweb has joined #ruby
<workmad3> Fractional: I'm suggesting that you could replace your entire method body with 'self[(size.succ * 0.5).to_i]'
<apeiros> i.e., if you do obj.show_name
<moshef> and here I'm inside
<moshef> yeah yeah
<moshef> ok
<moshef> what should i do then ?
kotk has joined #ruby
<apeiros> separate your stuff
<Fractional> workmad3: Ok, is there any specific reason for it? Does it look better? =P
lethjakman has joined #ruby
<moshef> well
<workmad3> Fractional: it's got less complexity to it
joshu has joined #ruby
m8 has joined #ruby
<Fractional> I can't find .succ in the array class.
<apeiros> I don't think Array has one
<workmad3> Fractional: that's because size doesn't give you an array
<Fractional> Fixnum.
<workmad3> >> 1.succ
<eval-in> workmad3 => 2 (https://eval.in/88966)
<workmad3> >> 2.succ
<eval-in> workmad3 => 3 (https://eval.in/88967)
RaCx has quit [Quit: Computer has gone to sleep.]
IceDragon has joined #ruby
thenovices has quit [Remote host closed the connection]
<workmad3> Fractional: if you wanted, you could do self[((size + 1) * 0.5).to_i]
tharindu has joined #ruby
<workmad3> Fractional: but that introduces another layer of braces
marcgg_ has quit [Ping timeout: 252 seconds]
<shevy> Fractional you could get .succ-like behaviour on an array by applying .each on it, then call .next. array = %w( a b c d ); _ = array.each; _.next; _.next
<apeiros> workmad3: bah, size>>1
<workmad3> apeiros: size.succ >> 1
<apeiros> why succ?
<workmad3> >> 25 >> 1
<eval-in> workmad3 => 12 (https://eval.in/88968)
<workmad3> apeiros: because that should be 13
<apeiros> ah, sure, zero based counting
<workmad3> oh... good point...
ambushsabre has joined #ruby
<workmad3> size >> 1 is correct
<workmad3> Fractional: there you go - 'def median; self[size >> 1]; end' ;)
kreisys has joined #ruby
marcgg has joined #ruby
marcgg has quit [Remote host closed the connection]
marcgg has joined #ruby
<apeiros> or /2 if you prefer :)
<apeiros> I'll just pretend that I didn't completely mess up my rationale
<workmad3> :)
* apeiros looks clever now
<workmad3> apeiros: although looking again, I now see what Fractional is doing in his median example... the definition of the median on an array with an even number of items is the middle two items divided by 2
<workmad3> although it does need to be sorted for that result to make sense
<apeiros> average?
<workmad3> apeiros: only of the middle two items
agent_white has joined #ruby
<apeiros> I mean, average of the two median values?
<workmad3> yeah
<apeiros> k
<workmad3> item '13.5' if you will :)
<workmad3> of a 26 item list
tharindu has quit [Ping timeout: 245 seconds]
<apeiros> size.even? ? self[size/2].quo(self[size/2+1]) : self[size/2]
<apeiros> or fdiv, if you want a float in every case
Wolland has quit []
<apeiros> interpolation
<Fractional> Oh, why wasn't I using .even? haha
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<workmad3> apeiros: that's not quite right
adac has quit [Quit: Leaving]
<workmad3> apeiros: it would be '(self[size/2] + self[size/2 + 1]).quo(2)'
<shevy> you two are like those two old men in the muppet show
vongrippen has joined #ruby
<apeiros> argh, lol
* workmad3 wonders about overloading [] on an array to give a concept to ary[1.5] :)
Sou|cutter has joined #ruby
<apeiros> workmad3: somebody did that and pasted it on rubyflow
<workmad3> hehe
mephux has quit [Quit: w0ots...]
RaCx has joined #ruby
<workmad3> apeiros: linear interpolation between the two values?
<apeiros> the idea is actually nice for things where you need interpolations
<apeiros> I'd not use Array for that, but a separate class
<ddd> shevy what you know about some Muppets.. Beaker!
<apeiros> allowing to provide an inter- and extrapolation strategy
<Hanmac> apeiros: did you read about W3C & DRM & HTML5 => http://lists.w3.org/Archives/Public/public-restrictedmedia/2014Jan/0060.html ?
<workmad3> apeiros: yeah, that would be more sensible
<apeiros> workmad3: I think the one I saw used linear interpolation, yes
<apeiros> Hanmac: only superficially
cj3kim has quit [Read error: Connection reset by peer]
moted has quit [Ping timeout: 252 seconds]
e62 has joined #ruby
cj3kim has joined #ruby
po10 has quit [Quit: ZZZzzz…]
Macaveli has quit [Ping timeout: 245 seconds]
<workmad3> apeiros: so something like 'self[float.floor] + (float - float.floor) * self[float.ceil]' ?
po10 has joined #ruby
juarlex has joined #ruby
LadyRainicorn has joined #ruby
<apeiros> I think that's incorrect
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zipper has quit [Ping timeout: 272 seconds]
kpshek has joined #ruby
ahmedelgabri has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
<apeiros> self[floor]+(index-floor)*(self[ceil]-self[floor])
alexfreidah has joined #ruby
<workmad3> apeiros: ah yes
<Fractional> I just finnished all my programming assignments, woho! :)
<workmad3> apeiros: forgot the last difference
<apeiros> doesn't cover extrapolations, though
<apeiros> PolatedGraph? :)
drumusician has quit [Remote host closed the connection]
<workmad3> apeiros: how about spherical interpolation on a 3-Sphere? :)
pedda has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> blergh. not been to uni for a decade. I don't even remember what that is.
<Fractional> Anyone here who can give me some array-algorithm based problems to solve?
<Fractional> For a beginner.
<apeiros> I thought about automatic polynomial interpolation
<workmad3> apeiros: a 3-sphere is a sphere in 4d space
<apeiros> but I have not the faintest idea anymore how to do that
<apeiros> workmad3: ah, the equivalent of a hypercube?
<workmad3> apeiros: yeah
drumusician has joined #ruby
noname001__ has quit [Read error: Operation timed out]
<workmad3> apeiros: you could call it a 4d hypersphere too, but 3-sphere works (because it's a sphere where you need 3 co-ordinates to specify a point on the surface)
<sweeper> yay hyperspace :v
alex88 has joined #ruby
<alex88> hi guys, I'm using https://github.com/gmarik/rack-try_static to serve a static website, is possible to make it respond also to POST as with GET?
cbetta is now known as cbetta_afk
<workmad3> apeiros: and the only reason I know much about it is because that's what you do with quaternions to do smooth interpolations for rotations :)
* LadyRainicorn lives in an infinite-dimensional world.
DaniG2k has joined #ruby
brunosanches has joined #ruby
alexfreidah has quit [Ping timeout: 245 seconds]
brunops has quit [Changing host]
brunops has joined #ruby
<workmad3> LadyRainicorn: if you're counting 'the world' as a phase space of particle configurations and assume that the universe is infinite in extent then yes, arguably you do ;)
LekeFly has joined #ruby
slick- has joined #ruby
<LadyRainicorn> No silly, an infinite number of spacial dimensions!
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
egomez has joined #ruby
alexherbo2 has joined #ruby
pu22l3r__ has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
Bira has quit [Remote host closed the connection]
bluOxigen has quit [Remote host closed the connection]
kep has quit [Quit: WeeChat 0.4.2]
bluOxigen has joined #ruby
<workmad3> LadyRainicorn: iirc, the dimensions in such a phase space are space-like
gja has quit [Quit: This computer has gone to sleep]
sambao21 has quit [Quit: Computer has gone to sleep.]
pu22l3r_ has quit [Ping timeout: 245 seconds]
Txandy is now known as Txandy|away
sambao21 has joined #ruby
cj3kim has quit [Remote host closed the connection]
moshef has quit [Quit: moshef]
bluOxigen has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
cj3kim has joined #ruby
burlyscudd has quit [Quit: Leaving.]
gja has joined #ruby
<LadyRainicorn> Yes, but they're not physical spatial dimensions.
wildroman2 has quit [Remote host closed the connection]
fijimunkii has quit [Ping timeout: 276 seconds]
maletor has joined #ruby
Hobogrammer has joined #ruby
arturaz has quit [Ping timeout: 272 seconds]
coder_neo has joined #ruby
rickruby has joined #ruby
<Fractional> apeiros: Mind if I ask how I "use" a regex on a string? Like you did earlier on when I needed help
<apeiros> Fractional: depends on what you understand as "use"
<apeiros> "string" =~ /regex/ # test whether a string matches a regex
<wald0> workmad3: so it is not going to be "fixed" (improved) in the future versions of ruby?
Txandy|away is now known as Txandy
spider-mario has joined #ruby
<Fractional> I want to exclude everything that doesn't match my regex and pass a command to it on one line.
<wald0> i want to use @@objects_created :)
<wald0> well, @@sides :)
gijsje has quit [Ping timeout: 245 seconds]
<apeiros> Fractional: I don't understand that
<Fractional> string/regex/.each do |obj| end
<DaniG2k> ive been thinking of writing a program lately :\
<DaniG2k> but totally not sure what
<DaniG2k> actually I have no idea
<DaniG2k> just an itch to program
<DaniG2k> any suggestions?
<DaniG2k> something not tooooo hard
<apeiros> Fractional: do you have an example? with input and desired output?
<apeiros> (gist)
<workmad3> wald0: the behaviour of class variables is well specified and sometimes useful
<workmad3> wald0: there's nothing to be 'fixed'
ahri_ has quit [Ping timeout: 272 seconds]
egomez has quit [Quit: egomez]
<workmad3> wald0: it sounds like you want a class instance variable but don't like that you need jump through a couple of hoops for it ;)
<Fractional> string/\h{2]/.each do |obj| array << obj end
samuel02 has joined #ruby
<wald0> workmad3: well defined? not in the book that i readed about :) is was thanks to a friend which reviewed my tutorial which says "do not use @@ its b0rk3d!"
<wald0> workmad3: well, ruby was made for make the life of the developer easier so your statement is against ruby lol :) j/k
<workmad3> wald0: class instance variables work exactly the same as any other instance variable
Fly80 has quit [Quit: Konversation terminated!]
<workmad3> wald0: to do otherwise would be a greater violation of the principle of least surprise
senj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Targen has joined #ruby
petey has quit [Remote host closed the connection]
<workmad3> wald0: you could argue that @@ class vars (which are not class instance variables) could probably be removed
MrThePlague has quit [Remote host closed the connection]
TheLarkInn has quit [Quit: Leaving.]
<workmad3> wald0: but not easily that they should act as another way to access an instance variable that happens to be on the class
petey has joined #ruby
<wald0> no, i dont mean removed, i meant the problematic of their inheritance modifications, like shown on that link
TheLarkInn has joined #ruby
<wald0> bad side-effect
<workmad3> wald0: you mean the very thing thang makes them not just a class instance variable?
<apeiros> Fractional: that's not really an example, also it lacks in-/output
kraljev1 has joined #ruby
<workmad3> wald0: and the *well-known* way that they behave?
<apeiros> I need something concrete
dukz has quit [Remote host closed the connection]
troyready has joined #ruby
<shevy> apeiros a HAMMER!
<Fractional> apeiros: Someone here helped me with it this morning but the code is on my laptop.
<kraljev1> Hello guys, is it possible to use PRY or other REPL engine
<kraljev1> to pass the typed thing as a string
ahmedelgabri has joined #ruby
m00nlight has quit [Quit: Konversation terminated!]
<apeiros> Fractional: well, I'm afraid, I'm not your laptop
<shevy> wat
<kraljev1> to a custom function
<wald0> workmad3: not sure, i just discovered this "problem" told by a friend to not use @@ because this bug and im asking here :)
m8 has quit [Quit: Sto andando via]
<shevy> you want another language than ruby?
godd2 has joined #ruby
cj3kim has quit [Remote host closed the connection]
h0lyalg0rithm has joined #ruby
<shevy> foo('bla') there is a string passed
<workmad3> wald0: your friend mis-informed you that it's a bug
petey_ has joined #ruby
<shevy> wald0 @@stink
lethjakman has quit [Ping timeout: 252 seconds]
<wald0> well, its an unwanted side-effect
petey has quit [Read error: Connection reset by peer]
burlyscudd has joined #ruby
<shevy> the use of @@ is a whole unwanted side effect
<kraljev1> So, if I write SELECT * FROM x
<workmad3> wald0: in the cases where @@cvars are suitable, it's not an unwanted side-effect
mityaz has joined #ruby
<kraljev1> then it gets passed to a function as a while
<workmad3> wald0: just those cases are limited
<shevy> a while?
<workmad3> wald0: and your case is not one of them
<kraljev1> *whole
<wald0> shevy: maybe, im just asking here about the unwanted bug behaviour asking if ruby would fix that in the future (removing inheritance access/modification) like:
<apeiros> workmad3: so limited that I haven't come across it in the last 10 years :)
colonolGron has joined #ruby
<colonolGron> hi
<kraljev1> in other words, is it possible for pry not to eval the input?
Targen_ has joined #ruby
<workmad3> wald0: if you don't want the single copy across the inheritance tree, use a class instance variable
<workmad3> apeiros: :)
lyanchih_ has quit [Quit: lyanchih_]
<workmad3> wald0: it's *not* a bug though
Targen has quit [Ping timeout: 276 seconds]
mikecmpbll has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zigomir_ has quit [Remote host closed the connection]
rickruby has quit [Remote host closed the connection]
m8 has joined #ruby
<wald0> workmad3: where i can read / how to use an "class instance variable" ?
zigomir has joined #ruby
doodlehaus has joined #ruby
pel_daniel has joined #ruby
<workmad3> wald0: well, you know how to use an instance variable, right?
<godd2> I made my first real gem! Check it out if you like: https://github.com/nicklink483/riffy
<godd2> It's a RIFF file parser.
coder_neo has quit [Quit: This computer has gone to sleep]
<workmad3> wald0: it's exactly the same, but on a class
<workmad3> wald0: as classes are instances of Class themselves
cj3kim has joined #ruby
<godd2> Any feedback (positive ot negative) is welcome :)
Txandy is now known as Txandy|away
IcyDragon has joined #ruby
rodneyfool has joined #ruby
bluOxigen has quit [Ping timeout: 252 seconds]
mercwithamouth has joined #ruby
bluOxigen has joined #ruby
Cephalostrum has quit [Quit: Aim higher. Try this: why am I here? Why do I exist, and what is my purpose in this universe? (Answers: 'Cause you are. 'Cause you do. 'Cause I got a shotgun, and you ain't got one.)]
<wald0> mmh, just use @var ? what is the difference with @@var then ? im a bit confused now
mneorr has joined #ruby
shime has quit [Ping timeout: 276 seconds]
aganov has quit [Remote host closed the connection]
<DaniG2k> godd2: well done Dominic
IceDragon has quit [Disconnected by services]
digital-ghost has joined #ruby
IcyDragon is now known as IceDragon
zigomir has quit [Ping timeout: 248 seconds]
_mtr has joined #ruby
<workmad3> wald0: @@var creates a class variable
<workmad3> wald0: which is shared across the entire inheritance tree below the point it is first defined
<workmad3> wald0: @var creates an instance variable
coder_neo has joined #ruby
LekeFly has joined #ruby
ephemerian has quit [Quit: Leaving.]
<workmad3> wald0: if you do it at the class level, it creates an instance variable on the class
LekeFly has quit [Client Quit]
<workmad3> wald0: which is not shared across the inheritance tree
thenovices has joined #ruby
einarj has quit [Remote host closed the connection]
dkamioka has joined #ruby
Bira has joined #ruby
<godd2> DaniG2k: Thank you :)
RaCx has joined #ruby
ewnd9 has quit [Remote host closed the connection]
<workmad3> wald0: e.g. 'class Foo; def self.class_ivar; @class_ivar; end; def self.class_ivar=(new_value); @class_ivar = new_value; end; end'
godd2 is now known as godd2|away
pmlarocque has quit [Ping timeout: 245 seconds]
andikr has quit [Remote host closed the connection]
<Hanmac> workmad3: or use attr_accessor inside a class << self ;P
<workmad3> Hanmac: yeah, I was spelling it out ;)
freerobby1 has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
vongrippen has quit [Read error: Operation timed out]
h0lyalg0rithm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ewnd9 has joined #ruby
dagobah has quit [Remote host closed the connection]
sassamo has quit [Remote host closed the connection]
cj3kim has quit [Remote host closed the connection]
shredding has quit [Quit: shredding]
sassamo has joined #ruby
ahmedelgabri has quit [Remote host closed the connection]
rippa has joined #ruby
wallerdev has quit [Quit: wallerdev]
gja has joined #ruby
gja has joined #ruby
gja has quit [Changing host]
dukz has joined #ruby
dkamioka has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
fire has quit [Ping timeout: 276 seconds]
mercwithamouth has quit [Ping timeout: 276 seconds]
alex88 has left #ruby ["Leaving..."]
vongrippen has joined #ruby
havenwood has joined #ruby
mercwithamouth has joined #ruby
smathieu has joined #ruby
CorySimmons has joined #ruby
kraljev1 has quit [Ping timeout: 252 seconds]
kreantos has quit [Ping timeout: 246 seconds]
<CorySimmons> Does anyone know off the top of their head if RMagick is a fully featured port of ImageMagick?
w4pm has joined #ruby
Hobogrammer_ has joined #ruby
<workmad3> CorySimmons: no, it's not a port at all
<workmad3> CorySimmons: it's an interface to imagemagick
yfeldblum has quit [Ping timeout: 252 seconds]
iceden has joined #ruby
itadder has joined #ruby
OdNairy has joined #ruby
<itadder> why aftter few days ruby community seems rather nice
<itadder> but having time to learn is hard, I came from work and ate food and fell asleep
Jake232 has joined #ruby
Liquid-- has joined #ruby
xjiujiu has quit [Ping timeout: 272 seconds]
<itadder> the basic are okay, but then learning about loops and other stuff getiting comple
tharindu has joined #ruby
Leehro has joined #ruby
<wald0> itadder: are you a procrastinator master? :)
<itadder> big time
<itadder> how did you know
<wald0> im a bit too, i recognize those words lol
<itadder> and if I do not get enough sleep I do nto function well the next day
<wald0> "no time", procrastinators NEVER found time
maletor has joined #ruby
<itadder> I almost did not make to the gym this morning
<wald0> by any reason :)
kobain has joined #ruby
aspires has joined #ruby
<itadder> wald0: but I am liking ruby.. I wish I met a girl who liked ruby and we could work on learning it togther or she could teacah me
kraljev1 has joined #ruby
<itadder> I join a ruby nyc meetup group for nebies to ruby
Liquid-- has quit [Client Quit]
Hobogrammer has quit [Read error: Operation timed out]
RaCx has quit [Quit: Computer has gone to sleep.]
<DaniG2k> itadder good luck
<wald0> my last conclusion is that there's no any valid "technique" or tool or anything that can solve the procrastination problem, the only way is "when you ignore the tools for help you and you just do it, no-matter-what"
<kraljev1> Looking for something like pry, except that it would not eval
<kraljev1> but rather give me a raw string
<itadder> yea I guess so
<itadder> how do I sneak time at work on my windows box to do ruby
<itadder> learning
<itadder> with out getting in trouble
<wald0> so basically, forget tools, forget all, do only what you want to do IF you want to do it, otherwise, do another thing lol
<itadder> bbl
w4pm has quit [Ping timeout: 252 seconds]
senj has joined #ruby
<itadder> yea I want to acutally learn becuase I find it very usefull and fun
<wald0> when you really want, youll simply do it, you will found time "magically" lol
<itadder> but when it gets complex I feel like giving up
<itadder> okay will take those words
<itadder> brb
fedez77 has quit [Ping timeout: 265 seconds]
* wald0 reading up
<wald0> as a suggestion, if you want to work "out of trouble" in a windows box... well, first remove windows, its totally useless to "try" to work on it, you will just lose your time
<CorySimmons> workmad3: Hi again. :) So if I put RMagick in my Rails app on Heroku, I'd need to also put ImageMagick on Heroku?
<wald0> itadder: ^
<itadder> I dislike windows
<itadder> I love my macintosh so much more usefull
vpretzel_ has joined #ruby
<itadder> it even comes with ruby preisntalled
nvrch has quit [Quit: nvrch]
<workmad3> CorySimmons: yes
tharindu has quit [Ping timeout: 276 seconds]
<workmad3> CorySimmons: which, if it's not there by default, involves finding or making a heroku buildpack with it
vpretzel has quit [Ping timeout: 272 seconds]
doodlehaus has quit []
Wolland has joined #ruby
<itadder> wald0: thanks
bbloom has joined #ruby
<kraljev1> So, anything like pry, except not evaling what user typed in???
<kraljev1> Noting in the whole ruby wold?
jwang_ has quit [Ping timeout: 252 seconds]
brunops has quit [Ping timeout: 246 seconds]
<Mon_Ouie> What do you mean by that?
<kraljev1> You know pry?
DaniG2k has quit [Quit: leaving]
<Mon_Ouie> SUre
<kraljev1> but it evals what user types in
<kraljev1> i'd like to get that raw string
Liquid-- has joined #ruby
<kraljev1> so i could do:
<kraljev1> SELECT * FROM something
<kraljev1> even if that is not valid ruby code
MrThePlague has joined #ruby
<kraljev1> basically looking for an interactive console
catphish has joined #ruby
<Mon_Ouie> loop { line = Readline.readline(">> "); puts run_command(line) }
<kraljev1> sure
<catphish> can anyone point me in the direction of a multithreaded websocket server?
<kraljev1> that's too simple
<kraljev1> you can't use arrows
<Mon_Ouie> Sure you can, using the second argument to Readline.readline
<kraljev1> up arrow to repeat previous command, left and right to edit typed text
mneorr has quit [Remote host closed the connection]
<Mon_Ouie> And left and right work as-is
<Mon_Ouie> loop { line = Readline.readline(">> ", true); puts run_command(line) }
SilentHobo has joined #ruby
mneorr has joined #ruby
<CorySimmons> workmad3: As always, thanks
<kraljev1> hey, thanks
<kraljev1> this seems more like it
Spami has quit [Quit: This computer has gone to sleep]
Eiam has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
Voodoofish4301 has joined #ruby
_mtr has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hobogrammer has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
fedesilv_ has joined #ruby
fedesilva has quit [Ping timeout: 252 seconds]
<Fractional> What do you use Ruby for?
Txandy|away is now known as Txandy
Hobogrammer_ has quit [Ping timeout: 276 seconds]
DrShoggoth has joined #ruby
JaTochNietDan has quit [Quit: Right.]
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
petertretyakov has joined #ruby
end_guy has quit [Ping timeout: 240 seconds]
SilentHobo has quit [Ping timeout: 252 seconds]
petey_ has quit [Remote host closed the connection]
makkura has quit [Remote host closed the connection]
VTLob has joined #ruby
kraljev1 has left #ruby [#ruby]
ohwhoa has quit [Quit: woah!]
starkhalo has joined #ruby
dweeb_ has joined #ruby
petey has joined #ruby
TMM has quit [Quit: Ex-Chat]
MrThePlague has quit [Ping timeout: 245 seconds]
petey has quit [Read error: Connection reset by peer]
<Eiam> Fractional: I use Ruby to solve problems
urbanmonk has quit [Quit: urbanmonk]
petey has joined #ruby
<Eiam> last week I wanted to know how long the average keystroke was while I typed
kate_r has joined #ruby
<kate_r> hi
<Eiam> so I used ruby. The week before I wanted to parse some 70mb file that was an organization structure for a shitton of employees... off to ruby
<kate_r> for a RESTful API, would it be better to opt for nginx or apache?
Hobogrammer_ has joined #ruby
<Eiam> kate_r: I imagine most people here are going to suggest nginx
<kate_r> Eiam, hmm why's that though?
TheLarkInn has quit [Quit: Leaving.]
TheLarkInn has joined #ruby
pel_daniel1 has joined #ruby
<LadyRainicorn> Apache is not so good.
burlyscudd has quit [Quit: Leaving.]
pml has joined #ruby
<havenwood> kate_r: I prefer to configure Nginx.
jane_doe has joined #ruby
thenovices has quit [Remote host closed the connection]
sassamo has quit [Remote host closed the connection]
burlyscudd has joined #ruby
ghr has quit [Quit: Computer has gone to sleep.]
<kate_r> right
sassamo has joined #ruby
<havenwood> Or write the whole API in Nginx!: http://c7.se/tiny-api-with-nginx/
<havenwood> j/k, but pretty neat you can...
<kate_r> yikes
TheLarkInn has quit [Client Quit]
pel_daniel has quit [Ping timeout: 248 seconds]
<Fractional> I want to learn more Ruby but I am not sure what to do/learn =<
<havenwood> Fractional: Read some Ruby code for inspiration maybe?
pel_daniel has joined #ruby
RaCx has joined #ruby
<Fractional> havenwood: But what code? I'm a beginner. Perhaps I should start doing some basic 2D games? Yes.
pml has quit [Remote host closed the connection]
<Fractional> Then I could make a clone of some classics.
<Fractional> That would be fun to do.
<workmad3> Fractional: start with zork ;)
Hobogrammer has quit [Ping timeout: 272 seconds]
<jane_doe> Fractional: Have you tried codecademy or something similar?
end_guy has joined #ruby
<havenwood> Fractional: Maybe try some text based games, tic-tac-toe, checkers, chess, a card game.
<Fractional> jane_doe: For math & physics
colonolGron has quit [Quit: leaving]
<havenwood> Fractional: If you know or want to learn a bit of math, going through Project Euler problems is good practice.
pel_daniel1 has quit [Ping timeout: 245 seconds]
<jane_doe> codecademy's python curriculum teachs you how to write a battleship game.
<Fractional> havenwood: Already done tic-tac-toe, checkers and a card game in text.
<havenwood> Fractional: excellent!
lethjakman has joined #ruby
RaCx has quit [Client Quit]
h0lyalg0rithm has joined #ruby
<Fractional> Havenwood: But there are plenty of card games! What is a quite easy one to write?
sassamo has quit [Ping timeout: 245 seconds]
petey has quit [Remote host closed the connection]
petey has joined #ruby
pel_daniel1 has joined #ruby
<havenwood> Fractional: Blackjack maybe?
i_s has joined #ruby
zoscoy has joined #ruby
camilasan has quit []
<havenwood> with an auto-dealer
pel_daniel has quit [Ping timeout: 260 seconds]
thenovices has joined #ruby
<havenwood> and for a bit extra, expose the command line game to the web with a little Sinatra app :O
<itadder> wald0: are you on twitter
<itadder> who should I follow in the ruby community on twitter
<itadder> what is the IOS ruby app that you people liek to use
<wald0> itadder: i removed my twitter and facebook accounts because they are useless in my life and a hole of distractions, very bad for procrastinator ppl like me :)
<itadder> ahh same here good point
godd2|away is now known as godd2
<wald0> in fact i lost the entire conctact with my family and friends removing facebook, but i dont give a shit, i want time -for me-
<itadder> maybe thier a IOS ruby app for the iphone so when I am in line wating for something I can write code
petey_ has joined #ruby
<itadder> wald0: oh wow, I can't leave FB my family will nto be happy
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<itadder> and call me antisocial
sassamo has joined #ruby
petey has quit [Read error: Connection reset by peer]
<CorySimmons> What is a memory leak? I keep looking at using RMagick but there's a lot of mentions of it being terrible at memory leaks
<itadder> it would be cool to test out and learn ruby while I wait for stuff
rootshift has quit [Quit: rootshift]
<wald0> itadder: oh btw, this is the BEST article that i have found about this topic, after long researches in the past: http://blog.iqmatrix.com/overcome-procrastination
fantazo_ has quit [Quit: Verlassend]
coderhs has quit [Ping timeout: 252 seconds]
mmcdaris has joined #ruby
RaCx has joined #ruby
jane_doe has left #ruby [#ruby]
<wald0> itadder: for iphone, the best is to have a pdf reader and put some books on it :), i even hilighted my books on it and so i have my own summaries for future checks
<havenwood> itadder: here are some just looking down my twitter feed: @rubygems @rubyrogues @postmodern_mod3 @bascule @steveklabnik @avdi @tenderlove @drbrain
Neomex has joined #ruby
<havenwood> itadder: i tweet like twice annually, and one is probably retweet, so following me would be *super* exciting
heidi has joined #ruby
<CorySimmons> Also just out of curiosity, what are your favorite image manipulation libraries in Ruby?
pel_daniel1 has quit [Ping timeout: 272 seconds]
<havenwood> @rubygems will flood you, but fun to watch every newly cut gem go by
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
Bira has quit []
Neomex has quit [Client Quit]
bline79 has quit [Quit: leaving]
brunops has joined #ruby
deens has joined #ruby
<ddd> i won't follow steveklabnic but the rest we match on
<havenwood> CorySimmons: I don't have a lot of experience in the area, but MiniMagick has treated me right: https://github.com/minimagick/minimagick#readme
Spami_ has joined #ruby
timonv has joined #ruby
maycon has joined #ruby
zeropx has joined #ruby
tvw has quit [Ping timeout: 272 seconds]
thenovices has quit [Remote host closed the connection]
fantazo has quit [Ping timeout: 248 seconds]
vpretzel_ is now known as vpretzel
MrThePlague has joined #ruby
mneorr has quit [Ping timeout: 265 seconds]
mneorr_ has joined #ruby
zeade has joined #ruby
saarinen has joined #ruby
nomenkun has quit [Ping timeout: 246 seconds]
<CorySimmons> havenwood: Yeah that's what I was looking at
roolo has quit [Remote host closed the connection]
petey_ has quit [Remote host closed the connection]
phipes has joined #ruby
troessner has quit [Quit: Leaving]
TMM has joined #ruby
browndawg has quit [Read error: No route to host]
vlad_sta_ has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
browndawg has joined #ruby
nowthatsamatt has left #ruby [#ruby]
phipes has quit [Remote host closed the connection]
thenovices has joined #ruby
vlad_starkov has joined #ruby
phipes has joined #ruby
<Eiam> kate_r: because its pretty easy to configure and has lots of tooling around it I suppose
sandGorgon has quit [Ping timeout: 252 seconds]
brunops has quit [Ping timeout: 245 seconds]
freerobby has quit [Quit: Leaving.]
meatherly has quit [Remote host closed the connection]
cj3kim has joined #ruby
meatherly has joined #ruby
sandGorgon has joined #ruby
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
carraroj has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
LekeFly has joined #ruby
Txandy is now known as Txandy|away
mmcdaris has quit [Quit: mmcdaris]
mneorr_ has quit [Remote host closed the connection]
mneorr has joined #ruby
subbyyy has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
IceDragon has quit [Ping timeout: 252 seconds]
mmcdaris has joined #ruby
klaut has quit [Remote host closed the connection]
flubba has quit [Quit: Leaving...]
maasha has quit [Quit: Page closed]
CorySimmons has quit [Quit: Leaving.]
Virtualize has quit [Read error: Connection reset by peer]
Virtualize|away has joined #ruby
teddyp1cker has joined #ruby
nanoyak has joined #ruby
Lewix has quit [Remote host closed the connection]
meatherly has quit [Ping timeout: 272 seconds]
Lewix has joined #ruby
zoscoy has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
RaCx has joined #ruby
rodneyfool has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mneorr has quit [Ping timeout: 248 seconds]
Es0teric has quit [Quit: Nigga, im OUTIE 5000]
Kar- has quit [Read error: Operation timed out]
yacks has quit [Quit: Leaving]
yacks has joined #ruby
meatherly has joined #ruby
yfeldblum has joined #ruby
canton7-mac has quit [Quit: Leaving]
CorySimmons has joined #ruby
Lewix has quit [Ping timeout: 245 seconds]
itadder has quit [Remote host closed the connection]
TMM has quit [Quit: Ex-Chat]
deens has quit [Remote host closed the connection]
cj3kim has quit [Remote host closed the connection]
rodneyfool has joined #ruby
rodneyfool has quit [Max SendQ exceeded]
GeorgesLeYeti has quit [Quit: Quitte]
eka has quit [Quit: Textual IRC Client: www.textualapp.com]
duggiefresh has joined #ruby
gasbakid has joined #ruby
olivier_bK has quit [Ping timeout: 252 seconds]
rootshift has joined #ruby
Jake232 has quit [Ping timeout: 276 seconds]
IceDragon has joined #ruby
Czupa has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
claymore has quit [Ping timeout: 245 seconds]
recurrence has joined #ruby
tharindu has joined #ruby
Speed has left #ruby ["WeeChat 0.4.2"]
eka has joined #ruby
thesheff17 has quit [Read error: Operation timed out]
SilentHobo has joined #ruby
shaunbaker has quit [Remote host closed the connection]
Txandy|away is now known as Txandy
claymore has joined #ruby
nanoyak_ has joined #ruby
browndawg has quit [Quit: Leaving.]
ndrei has joined #ruby
tt1187 has quit [Read error: Operation timed out]
bluOxigen has quit [Read error: Connection reset by peer]
mocfive has joined #ruby
bluOxigen has joined #ruby
nanoyak has quit [Ping timeout: 265 seconds]
Hobogrammer_ has quit [Read error: Connection reset by peer]
h0lyalg0rithm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hobogrammer has joined #ruby
deens has joined #ruby
nwertman has joined #ruby
h0lyalg0rithm has joined #ruby
tharindu has quit [Ping timeout: 260 seconds]
kobain has quit []
SilentHobo has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
thesheff17 has joined #ruby
Cephalostrum has joined #ruby
jonbradley has joined #ruby
<jonbradley> : am i wrong in thinking i can do something like @object[0]."#{i}_amount" in ruby?
Cephalostrum has quit [Remote host closed the connection]
cads has joined #ruby
m8 has quit [Quit: Sto andando via]
mengu has joined #ruby
mengu has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
gja has quit [Quit: This computer has gone to sleep]
mneorr_ has joined #ruby
<Hanmac> jonbradley: yes you can, look at #send method
Sc0rp10n has joined #ruby
Mars has joined #ruby
<jonbradley> thanks reading on send now
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hobogrammer has quit [Read error: Operation timed out]
<Sc0rp10n> hey guys
Mars is now known as Guest54044
<Sc0rp10n> a quick question
<Sc0rp10n> I created my first gem yesterday and pushed it to ruby gems
Advocation has quit [Quit: Advocation]
<Sc0rp10n> but today I saw it already had 33 downloads. Can anyone tell me who's downloading it? I mean how do people know about my gem?
h0lyalg0rithm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alexfreidah has joined #ruby
Guest54044 has quit [Read error: Connection reset by peer]
timonv has quit [Remote host closed the connection]
<apeiros> Sc0rp10n: mirrors probably
<Sc0rp10n> is there a list of latest gems or something?
maasha has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
<Sc0rp10n> hey apeiros , can you tell me the mirror sites for ruby gems?
gregoriokusowski has quit [Quit: gregoriokusowski]
senayar has quit [Remote host closed the connection]
mneorr has quit [Ping timeout: 252 seconds]
<shevy> Sc0rp10n bot downloads
Asher has quit [Quit: Leaving.]
alexfreidah has quit [Ping timeout: 272 seconds]
kenndel_ has quit [Read error: Connection reset by peer]
jonbradley has quit [Quit: jonbradley]
<apeiros> Sc0rp10n: no, I can't
kenndel_ has joined #ruby
_Andres has quit [Read error: Connection reset by peer]
dweeb_ has quit [Quit: Computer has gone to sleep.]
mneorr_ has quit [Remote host closed the connection]
jbueza has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Txandy is now known as Txandy|away
banister has joined #ruby
mneorr has joined #ruby
sassamo has quit [Remote host closed the connection]
sassamo has joined #ruby
Morrolan has quit [Max SendQ exceeded]
Morrolan has joined #ruby
mneorr_ has joined #ruby
momomomomo has joined #ruby
momomomomo has quit [Client Quit]
CorySimmons has quit [Quit: Leaving.]
mengu has quit [Remote host closed the connection]
Lewix has joined #ruby
zoscoy has joined #ruby
zoscoy has quit [Client Quit]
tylerdmace has quit [Ping timeout: 276 seconds]
tjbiddle has joined #ruby
rdark has quit [Quit: leaving]
mneorr has quit [Ping timeout: 245 seconds]
mocfive has quit [Remote host closed the connection]
Hobogrammer has joined #ruby
w4pm has joined #ruby
CorySimmons has joined #ruby
mocfive has joined #ruby
zahna has joined #ruby
nanoyak_ has quit [Quit: Computer has gone to sleep.]
sassamo has quit [Ping timeout: 245 seconds]
<zahna> is there a way to have Socket.getaddrinfo() bypass nscd?
catphish has quit [Quit: Leaving]
RaCx has quit [Ping timeout: 248 seconds]
nanoyak has joined #ruby
petertretyakov has quit [Quit: Computer has gone to sleep.]
Asher has joined #ruby
RaCx has joined #ruby
zipper has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
momomomomo has joined #ruby
ewnd9 has quit [Ping timeout: 272 seconds]
mocfive has quit [Ping timeout: 252 seconds]
danshultz has joined #ruby
dkamioka has joined #ruby
<Sc0rp10n> alright, thanks guys
Es0teric has joined #ruby
jbueza has joined #ruby
phipes has quit [Remote host closed the connection]
<zahna> i'm seeing that libc allows __nss_not_use_nscd_hosts to be set to allow getaddrinfo() to not use nscd and was just wondering if there's a way to access that from the ruby Socket.getaddrinfo method
mocfive has joined #ruby
<zahna> i'm just not seeing it in the documentation i'm reading
danijoo has quit [Read error: Connection reset by peer]
danijoo_ has joined #ruby
CorySimmons has quit [Quit: Leaving.]
CorySimmons has joined #ruby
petertretyakov has joined #ruby
Eiam has joined #ruby
reset has joined #ruby
zipper has quit [Ping timeout: 245 seconds]
blaxter has quit [Quit: foo]
TheLarkInn has joined #ruby
finnnnnnnnnnn_ has joined #ruby
mmcdaris_ has joined #ruby
sandGorgon has quit [Ping timeout: 253 seconds]
Sc0rp10n has quit [Quit: Leaving]
Liquid-- has quit [Quit: Computer has gone to sleep.]
senayar has joined #ruby
Sc0rp10n has joined #ruby
mephux has joined #ruby
jprovazn has joined #ruby
mmcdaris has quit [Ping timeout: 245 seconds]
mmcdaris_ is now known as mmcdaris
mmcdaris has left #ruby [#ruby]
hiall has quit [Read error: Operation timed out]
dkamioka has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
Leehro has quit [Ping timeout: 245 seconds]
<CorySimmons> Hey guys, I suck at syntax. I'm trying `MiniMagick::Image.format('pdf', 'svg')` and here is the doc on it: http://www.rubydoc.info/github/probablycorey/mini_magick/master/MiniMagick/Image#format-instance_method
tannerburson has quit [Quit: tannerburson]
<CorySimmons> Any idea what I'm doing wrong? I keep getting this err: "private method `format' called for MiniMagick::Image:Class"
<shevy> then you are not allowed to call it directly
<shevy> can you show the real code you use
tannerburson has joined #ruby
zoscoy has joined #ruby
zoscoy has quit [Client Quit]
jlast_ has joined #ruby
blackmesa has quit [Quit: WeeChat 0.4.2]
<apeiros> CorySimmons: you're probably calling `format` on the wrong receiver.
<apeiros> there's a global `format` method (Kernel#format), which is private
<CorySimmons> shevy: Here's the code I'm using http://pastie.org/8633341
<CorySimmons> apeiros: How do I access/use it?
sambao21 has joined #ruby
<apeiros> CorySimmons: I don't use MiniMagick. Read its docs.
<CorySimmons> I'm trying, hence the link
phansch has quit [Read error: Operation timed out]
<apeiros> but you probably need an instance of MiniMagick.
<CorySimmons> The docs are sparse, so I'm trying to understand that syntax
IcyDragon has joined #ruby
<apeiros> I don't see by what magic it'd know what you expect from it by doing MiniMagick::format('pdf', 'svg')
Liquid-- has joined #ruby
IceDragon has quit [Disconnected by services]
IcyDragon is now known as IceDragon
Cooler_ has quit []
jlast has quit [Ping timeout: 252 seconds]
nettoweb has quit [Quit: nettoweb]
momomomomo has quit [Quit: momomomomo]
finnnnnnnnnnn_ has left #ruby [#ruby]
freerobby has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
nettoweb has joined #ruby
phansch has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
phipes has joined #ruby
_tpavel has quit [Ping timeout: 248 seconds]
freerobby has quit [Ping timeout: 260 seconds]
burlyscudd has quit [Quit: Leaving.]
jlebrech has quit [Quit: Konversation terminated!]
mocfive has quit [Read error: Connection reset by peer]
figglebe_ has quit [Ping timeout: 252 seconds]
mocfive has joined #ruby
dfranciosi has quit [Remote host closed the connection]
dangerousdave has joined #ruby
EngierkO has quit [Quit: Textual IRC Client: www.textualapp.com]
phipes has quit [Client Quit]
mehlah has quit [Quit: Leaving...]
<shevy> CorySimmons where is the file that you want to convert?
zoscoy has joined #ruby
<shevy> CorySimmons look at the examples there https://github.com/minimagick/minimagick they are usually like so: MiniMagick::Image.open("input.jpg")
<shevy> then you apply processing on it
Urocyon has joined #ruby
gja has joined #ruby
Urocyon is now known as sfiggins
ndrei has quit [Ping timeout: 260 seconds]
figgleberry has joined #ruby
petey has joined #ruby
marz_skilex has joined #ruby
ndrei has joined #ruby
nettoweb has quit [Quit: nettoweb]
sepp2k has quit [Quit: Konversation terminated!]
nettoweb has joined #ruby
marz_skilex has quit [Client Quit]
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rootshift has quit [Quit: rootshift]
leo-the-manic has joined #ruby
<leo-the-manic> In IRB, how can I look at the type of a variable? E.g. in Python I can do a = 'b'; type(a) and it will say 'str'
<drPoggs> foo.class
<leo-the-manic> drPoggs: tyty
sixtenei1hty has left #ruby [#ruby]
pskosinski has joined #ruby
_Andres has joined #ruby
<drPoggs> leo-the-manic: pleasure :) i wish everyone else asked straightforward, easy questions :D
<LastWhisper> do any of you guys use webmock?
tt1187 has joined #ruby
poulson has quit [Remote host closed the connection]
momomomomo has joined #ruby
bean__ has joined #ruby
PhilK has joined #ruby
[_aeris_] is now known as _aeris_
LastWhisper has quit [Ping timeout: 272 seconds]
zxd has quit [Ping timeout: 248 seconds]
fedez77 has joined #ruby
Advocation has joined #ruby
<CorySimmons> shevy: Thanks
mikepack has joined #ruby
Mars has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
Mars is now known as Guest42408
Cephalostrum has joined #ruby
Guest42408 has quit [Read error: Connection reset by peer]
krz has quit [Quit: WeeChat 0.4.2]
Cephalostrum has quit [Read error: Connection reset by peer]
noop has quit [Ping timeout: 245 seconds]
Cephalostrum has joined #ruby
brianpWins has joined #ruby
rayners has joined #ruby
mmcdaris has joined #ruby
RaCx has quit [Ping timeout: 252 seconds]
acrussell has quit [Quit: Leaving.]
kirun has joined #ruby
asteros has joined #ruby
RaCx has joined #ruby
Cephalostrum has quit [Remote host closed the connection]
rezzack has joined #ruby
Cephalostrum has joined #ruby
vallieres_ has quit [Quit: Textual IRC Client: www.textualapp.com]
zoscoy has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
klaut has joined #ruby
interactionjaxsn has joined #ruby
coder_neo has quit [Quit: Leaving]
burlyscudd has joined #ruby
freerobby has joined #ruby
timonv has joined #ruby
cgore has quit [Remote host closed the connection]
aaronmcadam has joined #ruby
Cephalostrum has quit [Remote host closed the connection]
Cephalostrum has joined #ruby
danijoo_ has quit [Remote host closed the connection]
cek has joined #ruby
<cek> how do you stub authlogic stuff?
danijoo has joined #ruby
<cek> need this https://gist.github.com/jschoolcraft/184518 implemented -- it dosn't work now.
<cek> produces error about usersession being not activemodel
Cephalostrum has quit [Client Quit]
<cek> oops, wrong channel probably
asteros has quit [Quit: asteros]
Cephalostrum has joined #ruby
Cephalostrum has quit [Max SendQ exceeded]
sassamo has joined #ruby
cek has left #ruby [#ruby]
Cephalostrum has joined #ruby
MrThePlague has quit []
kreisys has quit [Quit: Textual IRC Client: www.textualapp.com]
dazeddev has joined #ruby
gf3 has quit [Quit: ZNC - http://znc.in]
mehlah has joined #ruby
asteros has joined #ruby
skaflem has quit [Quit: Leaving]
teddyp1cker has quit []
kuzushi has quit [Ping timeout: 272 seconds]
teddyp1cker has joined #ruby
Megtastique has quit []
mneorr_ has quit [Remote host closed the connection]
mneorr has joined #ruby
samuel02 has quit []
<CorySimmons> Anyone have any idea what I'm doing wrong? http://pastie.org/private/yikhywv41ejcjsoxfdacq
<CorySimmons> I'm trying to use MiniMagick to convert a .pdf to an .svg
Styles has joined #ruby
Megtastique has joined #ruby
<shevy> does 'identify -quiet -ping fooooo.svg' even work
<shevy> identify belongs to ImageMagick
<shevy> perhaps you do not have this binary
havenwood has quit []
colonolGron has joined #ruby
gf3 has joined #ruby
jkline has joined #ruby
marcofernandez has quit [Read error: Connection reset by peer]
cads has quit [Ping timeout: 246 seconds]
mneorr has quit [Ping timeout: 245 seconds]
gf3 has quit [Client Quit]
Jake232 has joined #ruby
gf3 has joined #ruby
benlieb has joined #ruby
<shevy> I hate bugs
burlyscudd has quit [Quit: Leaving.]
Txandy|away is now known as Txandy
jenskarlsen has joined #ruby
sethen has joined #ruby
pushpak has quit [Quit: Linkinus - http://linkinus.com]
mikepack has quit [Remote host closed the connection]
kuzushi has joined #ruby
_aeris_ is now known as [_aeris_]
senayar has joined #ruby
DrShoggoth has quit [Quit: Leaving]
keen__ has joined #ruby
<godd2> CorySimmons: just shootin in the dark, but maybe it needs foooo.svg to exist beforehand?
shadoi has joined #ruby
momomomomo has quit [Quit: momomomomo]
Hobogrammer has quit [Ping timeout: 246 seconds]
<godd2> On line ~254 of lib/mini_magick.rb it says it runs the identify command to "Verify that we have a good image"
keen_ has quit [Ping timeout: 272 seconds]
DrShoggoth has joined #ruby
yekta has joined #ruby
<godd2> presumably if the file doesn't exist yet, that can cause a problem?
<shevy> I think the whole MiniMagick project seems to be sloppy
<shevy> it should check before running any system-commands
shime has joined #ruby
laphlaw has joined #ruby
colonolGron has left #ruby [#ruby]
mneorr has joined #ruby
<CorySimmons> shevy: I brew installed ImageMagick
IceDragon_ has joined #ruby
IceDragon has quit [Disconnected by services]
IceDragon_ is now known as IceDragon
senayar has quit [Ping timeout: 252 seconds]
<CorySimmons> godd2: I don't think so. It creates it.
<CorySimmons> shevy: Prefer RMagick?
<shevy> well it obviously did not create it :)
<shevy> no
<CorySimmons> It creates it
<shevy> you have a .svg ?
<CorySimmons> It just creates a horrible version of it and it's 30MB!!!
<shevy> hahaha
<CorySimmons> 400kb.pdf to 30mb.svg horrible quality with black background
<CorySimmons> X_____X
Azure has joined #ruby
RaCx has quit [Ping timeout: 260 seconds]
tannerburson has quit [Quit: tannerburson]
<shevy> that's some quality there
mikepack has joined #ruby
<shevy> why dont you file a bug report?
saarinen has quit [Quit: saarinen]
Virtualize|away has quit [Read error: Connection reset by peer]
Virtualize has joined #ruby
mikepack has quit [Remote host closed the connection]
mikepack has joined #ruby
gf3 has quit [Quit: LOLeaving]
<Nilium> The questions I get about how to use my OpenGL bindings gem are always kind of weird..
OdNairy has quit [Ping timeout: 252 seconds]
gf3 has joined #ruby
RaCx has joined #ruby
<Nilium> Pretty sure everyone who's emailed me about it has never used C or C++ or OpenGL.
<godd2> CorySimmons: try this from the command line to see if imagemagick does the same thing: `convert illustrator_17.pdf fooooo.svg`
dobie_gillis has joined #ruby
aspires has quit []
rootshift has joined #ruby
<Nilium> Which would be kind of normal for most Ruby people, I guess. I doubt a lot of them leave their cloistered Rails-holes.
danijoo has quit [Read error: Connection reset by peer]
Mars___ has joined #ruby
Briareos1 has joined #ruby
danijoo has joined #ruby
decoponio has quit [Quit: Leaving...]
Spami_ has quit [Quit: This computer has gone to sleep]
m8 has joined #ruby
<benlieb> Are the differences in procs and lambdas meant to solve specific common programming challenges?
<CorySimmons> godd2: Good idea
CorySimmons has quit [Quit: Leaving.]
<benlieb> Because I thing of procs as "not strict" lambdas, as there is no argument enforcement.
lorelei_ has joined #ruby
lorelei_ has quit [Changing host]
lorelei_ has joined #ruby
<shevy> benlieb no idea, they seem artificial a separation but so is module vs. class distinction
<benlieb> Right now the differences are just something I've memorized, but have not really learned that one or the other is more or less useful, or more applicable to specific situations
<shevy> what do you mean with "learn"
<shevy> as far as I know the main difference is that one has mandatory arguments, the other has not
timonv has quit [Remote host closed the connection]
<benlieb> shevy: I mean I can almost always use either, I just have to make sure my implementation accounts for their behavior
IceDragon_ has joined #ruby
<shevy> yeah
<benlieb> which makes me feel that one or the other is kinda unnecessary
<shevy> yeah
<godd2> benlieb: sometimes you want to "save" a return for "later", in which case, lambda is your friend. A Proc will faithfully have a return get called even if it's in the body of the block, but a lambda will keep it hidden away until you acually call it.
Mars____ has joined #ruby
IceDragon has quit [Ping timeout: 272 seconds]
rootshift has quit [Quit: rootshift]
<Nilium> Consider the difference in behavior when using `return` in a proc vs. a lambda and you'll probably have an idea of what it solves (e.g., like a function vs. control structure)
mneorr has quit [Ping timeout: 245 seconds]
rootshift has joined #ruby
<godd2> You can think of the binding of a lambda to be tighter than a proc. when a lambda is called, the code is more encapsulated from its environment than a proc
IceDragon_ is now known as IceDragon
<benlieb> Nilium: godd2: right so proc is more like a block (like 'if'), and lambda is more like a function when return is concerned?
Txandy is now known as Txandy|away
Mars___ has quit [Ping timeout: 272 seconds]
<benlieb> is that right?
<Nilium> You have those backwards
<benlieb> damn
<Nilium> Wait.. no
<benlieb> undamn
RaCx has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<benlieb> don't confuse me! :)
<Nilium> You had it right. Nevermind, this cold is scrambling my brain.
Mars___ has joined #ruby
kevinykc_ has quit [Quit: Computer has gone to sleep.]
Mars____ has quit [Read error: Connection reset by peer]
<godd2> if you call a return in a proc, it will behave as if that return is at the scope of the function "outside" of it. but if you have a return in a lambda, it's walled off from it's surrounding scope
kuzushi has quit [Ping timeout: 245 seconds]
<godd2> so the return in the lambda won't interfere with the return in a function that it's embedded in
<benlieb> godd2: ok I get that
Jake232 has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby
<benlieb> godd2: so a lambda is kind of like an anonymous function (kinda)
securitycrush has quit [Ping timeout: 240 seconds]
<godd2> a lambda is precisely an anonymous function
Hobogrammer has joined #ruby
albertgrala has quit [Quit: Leaving]
<godd2> and a proc is just a useful chunk of code floating around
shaunbaker has joined #ruby
<benlieb> and a proc is like a 'saved' block?
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
glundgren has joined #ruby
glundgren is now known as guilund
RaCx has joined #ruby
<benlieb> do they behave the same in terms of closure-"ness"?
<i_s> main diff between proc and lambda is that 'return' does different things
<i_s> proc will return from the outer scope, whereas return in lambda just returns from the lambda
<workmad3> benlieb: lambdas also throw argument errors if called with incorrect numbers of args
<workmad3> benlieb: but yes, they create the same kind of closure
Mars___ has quit [Remote host closed the connection]
shaunbaker has quit [Remote host closed the connection]
nanoyak has quit [Quit: Computer has gone to sleep.]
charliesome has joined #ruby
petey has quit [Remote host closed the connection]
kate_r has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
maasha has quit [Quit: Page closed]
<benlieb> when you pass a block to a method via 'do' is that a block, a proc, or a lambda?
lockweel has joined #ruby
saarinen has joined #ruby
mocfive has quit [Remote host closed the connection]
mocfive has joined #ruby
ahmedelgabri has joined #ruby
<apeiros> benlieb: neither
dweeb_ has joined #ruby
<apeiros> benlieb: when you convert it, it's a proc
<godd2> "By passing a block to a method whose last parameter is prefixed with an ampersand. That parameter will receive the block as a Proc object." - Programming Ruby
yosafbridge has quit [Ping timeout: 245 seconds]
<benlieb> so if it's not 'converted' it's just a block that can be 'yielded' to...
shaunbaker has joined #ruby
<guilund> hey guys
<apeiros> benlieb: yes
<benlieb> is there a way to convert it to a lambda?
<apeiros> hm, could try lambda(&block)
mneorr has joined #ruby
<guilund> i have a 2 modules, with the same method_names, i require and include both, but how can i access the method in the specific module? i mean: Module1::method_name
<benlieb> apeiros: in the method params def?
Txandy|away is now known as Txandy
<guilund> something like that
<apeiros> benlieb: no, in the method body
Hanmac1 has joined #ruby
<workmad3> guilund: please don't cross-post after it was suggested in #rubyonrails that you do some research on OO design :P
<benlieb> wouldn't it just be lamda(block) at that point if you have &block in the params area?
aryaching has quit [Ping timeout: 272 seconds]
<guilund> workmad: they told me to ask here, for christ sake :P
tannerburson has joined #ruby
<apeiros> benlieb: hm, nope, seems lambda(&block) is a noop
sepp2k has joined #ruby
g3orge has joined #ruby
<guilund> workmad3: and you are what? the polcie of ruby?
mocfive has quit [Ping timeout: 252 seconds]
<guilund> police
<guilund> ruby police
<guilund> :P
alexfreidah has joined #ruby
mansi has quit [Read error: Connection reset by peer]
CorySimmons has joined #ruby
<workmad3> guilund: no, I leave that to apeiros who has ban-stick command and an intolerance for cross-posting ;)
mansi has joined #ruby
<guilund> apeiros is ma brotha from anotha matha man
petey has joined #ruby
<guilund> he always help me
<guilund> sorry!!!
<benlieb> apeiros: so if at some point I want to get a lambda into a method, I would pass it as a regular param, and not rely no whatever the mechanism is that grabs the block started with "do" ?
<guilund> i need help
Hanmac has quit [Ping timeout: 265 seconds]
lorelei_ has quit [Read error: Operation timed out]
<benlieb> rely *on*
<guilund> apeiros: put that gun down man
<apeiros> guilund when you cross-post, inform the channels where you're cross-posting. that's the least.
momomomomo has joined #ruby
* apeiros bang
<guilund> :P
wallerdev has joined #ruby
shaunbaker has quit []
mansi has quit [Read error: Connection reset by peer]
momomomomo has quit [Client Quit]
<guilund> cross posting? i mean, you are independent entitys, different channels?
<guilund> i dont get it, but ok
aspires has joined #ruby
mansi has joined #ruby
<apeiros> I really really need a canned reply why cross-posting people usually are dicks.
maasha has joined #ruby
<guilund> i can assure you i have a dick, but im not
Sawbones has joined #ruby
smathieu has quit [Remote host closed the connection]
<workmad3> guilund: there's a lot of people in both, and it's polite to let people know that you've asked in multiple places so that it isn't a slap in the face when someone cross-posting questions suddenly ups and vanishes because a different channel answered it
<guilund> now im offende
<guilund> sorry...
<guilund> i'll google for help
<guilund> thanks
asteros has quit [Quit: asteros]
smathieu has joined #ruby
mneorr has quit [Ping timeout: 245 seconds]
asteros has joined #ruby
<guilund> workmad3: thaks for the explanation, but i didnt get an answer in one place, THEN i came here
<apeiros> guilund: 99% of all cross-posters abandon the question once answered. I for one don't want to waste my time on somebody doing that.
alexfreidah has quit [Ping timeout: 265 seconds]
<guilund> apeiros: i get the logic
<guilund> apeiros: but it doesnt apply on my case :P
<apeiros> guilund: said every cross-poster ever.
jenskarlsen_ has joined #ruby
<apeiros> yet in the last 10 years I've seen, I think, two cases
<Sawbones> "I'm a special snowflake"
jenskarlsen_ has quit [Client Quit]
<maasha> workmad3: that Pipe class ... I am trying something new in order to make it run on multiple cores.
<guilund> no, not because of that, the guys on rails told me to ask here
jenskarlsen has quit [Ping timeout: 272 seconds]
jenskarlsen_ has joined #ruby
<maasha> workmad3: so I am using named pipes to share data between processes: https://gist.github.com/maasha/103ab16038030f6ca95d
jenskarlsen_ is now known as jenskarlsen
ce_afk is now known as cescalante
ephemerian has joined #ruby
vlad_starkov has joined #ruby
<maasha> workmad3: seems flawed though. It works on small test data sets, but bigger files are hanging.
<guilund> you guys are stressed out today, holy mother :P
deception has quit [Quit: Goodbye]
Hobogrammer has quit [Ping timeout: 248 seconds]
<apeiros> Sawbones: that quote sounds familiar, where's it from? :)
Xeago has quit [Remote host closed the connection]
<guilund> where is the brogramming i'm used to over here?
<guilund> hehehe
Xeago has joined #ruby
<Sawbones> apeiros: Couldn't tell you, but my gf quotes it all the time to people who complain too much
<apeiros> workmad3: btw., I usually only kick for cross-posting (and that only because people proved not to listen/care if I just tell them)
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
<guilund> apeiros: sorry dude, i didnt know about this cross-posting, but now i'm aware
<guilund> can i ask again here? or it still will be considered cross posting
<guilund> ?
punkcat has joined #ruby
<shevy> you'll never know beforehand!
<apeiros> guilund: I told you the rule - just state that you're crossposting
kuzushi has joined #ruby
<benlieb> guilund: you've apologized. just re-ask your question.
drumusician has quit [Read error: Connection reset by peer]
<lilly19> Do you know know a way to get all of the gem dependencies recursively, 'gem dependency [name] -R' is not what I saying, dependencies of a gem with all of it's dependences and so on..?
Mars has joined #ruby
drumusician has joined #ruby
<guilund> i have two modules, they have the same method names, how can i call a method specifying the module? something like Module1.method_name Module2.method_name
<guilund> it makes any sense?
<guilund> in ruby?
Valesk has joined #ruby
Mars is now known as Guest7218
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
<benlieb> guilund do the modules rely on vars defined in the class?
mocfive has joined #ruby
<benlieb> in the class their included into?
<benlieb> *they
<benlieb> r
<shevy> guilund several ways. a simple one is to add extend self in that module
<guilund> belieb: yes, i require and include both
<benlieb> *they're*
asteros has quit [Quit: asteros]
lorelei_ has joined #ruby
<shevy> module Foo; def hi; puts 'hi'; end; extend self; end; Foo.hi # "hi"
nfk has quit [Quit: yawn]
laphlaw has quit [Quit: Computer has gone to sleep.]
<guilund> shevy: nice
mengu has joined #ruby
<guilund> shevy: thanks
blackmesa has joined #ruby
<guilund> thanks guys, you are the best
<shevy> other ways would be to explicitely do def self.method_name
<shevy> if you won't need the "def hi"
<shevy> and the annoying class << self probably works, but it is so ugly, nobody likes it
carraroj has quit [Quit: Konversation terminated!]
lorelei_ has quit [Changing host]
lorelei_ has joined #ruby
<shevy> facebook is like the ultimate brotherhood
<shevy> "You must log in to continue."
<shevy> :(
soba has joined #ruby
tonni has quit [Read error: Connection reset by peer]
tonni_ has joined #ruby
ahmedelgabri has quit []
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
lassebunk has joined #ruby
lassebunk has quit [Remote host closed the connection]
zoscoy has joined #ruby
lassebunk has joined #ruby
RaCx has quit [Ping timeout: 248 seconds]
CpuID has joined #ruby
CpuID has quit [Changing host]
CpuID has joined #ruby
yosafbridge has joined #ruby
<godd2> maasha: Jim Weirich talks about Celluloid::IO in this talk: http://www.youtube.com/watch?v=vIHdhaF2R2w
RaCx has joined #ruby
<godd2> Celluloid provides a framework for multi-threaded programming so you can send messages between processes easily
shaunbaker has joined #ruby
atmosx has joined #ruby
lorelei_ has quit [Ping timeout: 276 seconds]
drumusician has quit [Ping timeout: 265 seconds]
Hanmac1 is now known as Hanmac
Czupa has quit [Ping timeout: 245 seconds]
<maasha> godd2: right, multi-threading is easy with ruby, but multi CPU is different
<godd2> If you want multi-core, you should be using Rubinius or JRuby
Hobogrammer has joined #ruby
CpuID has quit [Ping timeout: 260 seconds]
petertretyakov has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
<godd2> Or just switch to Scala :P
CpuID has joined #ruby
CpuID has quit [Changing host]
CpuID has joined #ruby
senayar has joined #ruby
CpuID has quit [Client Quit]
asteros has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
fmcgeough has quit [Ping timeout: 272 seconds]
smathieu has quit [Remote host closed the connection]
asteros has quit [Client Quit]
smathieu has joined #ruby
asteros has joined #ruby
teddyp1cker has quit []
RaCx has quit [Quit: Computer has gone to sleep.]
<benlieb> on the block / proc / lambda theme again: is there a way for a passed block to interact with the internal environment of a method, or is it always separate? This behavior kind of surprised me: https://gist.github.com/pixelterra/8425653
sambao21 has joined #ruby
lockweel has quit [Ping timeout: 272 seconds]
Guest7218 has quit [Remote host closed the connection]
Leehro2 has joined #ruby
JohnBat26 has quit [Ping timeout: 245 seconds]
rootshift has quit [Ping timeout: 245 seconds]
<canton7> benlieb, I prefer to avoid the 'yield' syntax when explaining how blocks work: http://pastie.org/8633683
shime has quit [Ping timeout: 272 seconds]
<canton7> so line 4 calls a method - why should that method be scoped to the test method?
<apeiros> benlieb: local variables you have to pass
heftig has joined #ruby
<apeiros> benlieb: you can "rebind" a block to be executed in the context of self, using instance_eval or instance_exec
<canton7> *calls something like a method
<apeiros> that'll affect ivars and method calls
alexherbo2 has quit [Quit: WeeChat 0.4.2]
Txandy is now known as Txandy|away
alexherbo2 has joined #ruby
shime has joined #ruby
asteros has quit [Quit: asteros]
dweeb_ has quit [Quit: Computer has gone to sleep.]
<Hanmac> you can use binding to get the local variables ... but it still does not work as you want
<godd2> benlieb: "Some people like to think of the association of a block with a method as a kind of argument passing. This works on one level, but it isn’t really the whole story. You may be better off thinking of the block and the method as coroutines, which transfer control back and forth between themselves." - Programming Ruby
lockweel has joined #ruby
<godd2> So in your example, you can think of the code "jumping back" to the point at which you wrote the block and looks around for the variables you wrote in it, and uses those local variables, not the ones in the method definition
kcombs has quit [Remote host closed the connection]
<leo-the-manic> Can I replae File.open('foo') { | f | bar(f) } with something like File.open('foo') bar?
ambushsabre has quit [Quit: rip]
brunops has joined #ruby
lassebunk has quit []
prc1 has joined #ruby
<godd2> leo-the-manic: What are you trying to do, run the method bar on every line of the file?
Advocation has quit [Quit: Advocation]
centrx has joined #ruby
<leo-the-manic> godd2: I guess it's a poor example. One method generates a stream of bytes pre-split into chunks, and I want to write it to a Gzip file. So I have two nested do's and it just looks a little noisy
jlast_ has quit [Remote host closed the connection]
ambushsabre has joined #ruby
[_aeris_] is now known as _aeris_
IceDragon has quit [Ping timeout: 246 seconds]
<IceyEC> File.open('foo').map(&:bar) might work leo-the-manic
lockweel has quit [Ping timeout: 272 seconds]
<canton7> that calls f.bar, not bar(f)
<IceyEC> but you'd be calling the method bar on a string
Jdubs has joined #ruby
vikhyat has joined #ruby
ry4nn has joined #ruby
punkcat has quit [Quit: punkcat]
ry4nn has quit [Remote host closed the connection]
thesheff17 has quit [Quit: Leaving]
_aeris_ is now known as [_aeris_]
nanoyak has joined #ruby
ryan__ has joined #ruby
thesheff17 has joined #ruby
Txandy|away is now known as Txandy
Liquid-- has quit [Quit: Computer has gone to sleep.]
jprovazn has quit [Quit: Odcházím]
BizarreCake has quit [Ping timeout: 260 seconds]
petey has quit [Remote host closed the connection]
laphlaw has joined #ruby
petey has joined #ruby
sassamo has quit [Remote host closed the connection]
sassamo has joined #ruby
Spami_ has joined #ruby
lockweel has joined #ruby
yalue has quit [Quit: Leaving]
IceDragon has joined #ruby
petey has quit [Ping timeout: 246 seconds]
Fernandos has joined #ruby
gregoriokusowski has joined #ruby
<Fernandos> Is there a downside to using middleman?
petey has joined #ruby
<Fernandos> Talking abouthttp://middlemanapp.com/
<Fernandos> eh sorry http://middlemanapp.com/
<centrx> Fernandos, I don't know much about it, but downside compared to what?
<centrx> Fernandos, It says it is a static site generator, so the downside would be it does not do dynamic pages
<Fernandos> to using a cms be it a flatfile cms with a caching system or one with a db
<Fernandos> centrx: it does dynamic pages..
lkba has quit [Ping timeout: 260 seconds]
<canton7> hmm they aren't *really* dynamic pages....
<centrx> It is dynamic generation, but the output is static pages
<canton7> either way, same as every static site generator probably: no chance for anything dynamic (comments, contact forms, etc)
<Fernandos> hmm, not sure... what about this http://middlemanapp.com/basics/pretty-urls/ they say you can set php files as index
itadder has joined #ruby
sLi_ has quit [Remote host closed the connection]
asteros has joined #ruby
lockweel has quit [Ping timeout: 272 seconds]
asteros has quit [Client Quit]
<centrx> Fernandos, What is the use case?
asteros has joined #ruby
sLi_ has joined #ruby
maasha has quit [Quit: Page closed]
<Fernandos> I'm just thinking about using that for coming up projects which involve a cms
eka has quit [Quit: Computer has gone to sleep.]
whomp has joined #ruby
<whomp> what's the best way these days to set a breakpoint in ruby?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
framling has quit [Read error: Connection reset by peer]
<Fernandos> I prefer having an API first CMS, such that I have A) command-line-tools for it B) A REST API which I can use to integrate business data or to consume from mobile devices
Txandy is now known as Txandy|away
neoice has joined #ruby
<Fernandos> whomp: check the jetbrains IDE
<whomp> *without having to change IDEs
<itadder> what so good about jetbrains
<itadder> another ide
<benlieb> For those not sick of my questions about lambdas / procs, here' my last one: if a lambda is a Proc (lambda{}.class = > Proc < Object), why is it different from a proc?
<whomp> yeah like... how can i break a program without moving off vim?
<neoice> I'm trying to do something like: log.level = Logger::#{sev}... I've seen .send() for using variables as method names, but I'm not sure how to instantiate an object identified by a variable.
kep has joined #ruby
<canton7> neoice, Logger.const_get(...)
clamstar has quit [Quit: Computer has gone to sleep.]
<MrZYX> whomp: IMO binding.pry
<Fernandos> itadder: it's just an editor which works out of the box, that's about it. I can tune me vim to do the same, but I'm more comfortable with an IDE sometimes than with vim. It's about coding, not luxury or coolness
<centrx> Fernandos, It seems like with middleman you would need to set up a system to generate pages that are saved in the CMS
<Fernandos> I use vim in addition to the ide, here btw.
<whomp> MrZYX, how do i break with pry?
<itadder> I like vim and textmate
prc1 has quit [Quit: Leaving.]
<centrx> Fernandos, It does not seem to be designed for a CMS with unprivileged users, without adding extra scripting on top of it
<MrZYX> whomp: check pry-byebug (or pry-debugger for 1.9)
sLi_ has quit [Ping timeout: 260 seconds]
fedez77 has quit [Ping timeout: 246 seconds]
<Fernandos> centrx: oh good point! No ACL,RBAC.. big thing
<MrZYX> or just write binding.pry where you want to break
jkamenik has quit [Quit: Leaving.]
<centrx> benlieb, For one, lambda requires the exact number of argument specified
Targen has joined #ruby
Targen_ has quit [Ping timeout: 248 seconds]
<benlieb> centrx: I understand that, but my question in this case is if they're different, why is a lambda a proc? Why not make it a lambda class, that is maybe a subclass of proc. The whole syntax around this makes the subtle differences a bit dicier than it needs to be, in my opinion
<whomp> MrZYX, thx :)
mityaz has quit [Quit: See ya!]
<benlieb> normally in programming when something is mostly like something else but a bit different, it's a subclass
<Fernandos> centrx: I really think about creating a binary cms that can be used as cli tool to manage other cms remotely and then generate client libraries that leverage it on the server-side
<Fernandos> centrx: do you think that's a good idea?
<centrx> benlieb, lambda is a language keyword, not a class of anything
<whomp> MrZYX, now it dumps all of the variables at the breakpoint. i just want it to stop there!
<benlieb> centrx: exactly!
<benlieb> I know what it IS, I'm wondering why?
<MrZYX> benlieb: centrx actually lambda is a method: http://rubydoc.info/stdlib/core/Kernel#lambda-instance_method
ambushsabre has quit [Quit: rip]
<Fernandos> And what could go wrong with a binary cms having client libraries in many languages?
<Fernandos> I know a lot about cms, workflows and that there is no single cms with a decent gui. Also tinymce and wysiwyg sucks a big time, because it takes too much time to do what you want.
<centrx> MrZYX, Thanks
<centrx> MrZYX, benlieb -> is a keyword though... ?
<benlieb> it seems like internally it would have to subclass Proc, or at least somehow set some internal environment to make it behave differently.
Mars___ has joined #ruby
jlast has joined #ruby
<MrZYX> whomp: never saw it dumping all variables, it is intended to drop you into a pry session and that prints the current context
<MrZYX> centrx: yep
<godd2> Anyone have any resources so I can learn to "professionalize" my gem? The code is kinda hacked together and messy.
<neoice> canton7: thanks for the tip. is there a place I can learn about things like .send() and .const_get()?
drumusician has joined #ruby
Leehro2 has quit [Quit: Textual IRC Client: www.textualapp.com]
CorySimmons has left #ruby [#ruby]
<centrx> Fernandos, Sounds like a great idea. If it is really an empty space with no available free software for that.
<MrZYX> neoice: read the docs of Object, Kernel, Class and Module
<Fernandos> Also permissions, roles , caching and extensions are a pain in the ass in most cms. Deploying permissions isn't even possible in any of those for example.
<centrx> Fernandos, I would recommend making as much use of existing libraries as possible
lockweel has joined #ruby
<godd2> neoice: You could check out Metaprogramming Ruby by Paolo Perrotta. It's nto as intimidating as it sounds.
<canton7> neoice, IRC? :) Otherwise, reading all methods on the lower-level classes can be very handy (Object, BasicObject, Kernel, IO, etc)
wildroman2 has joined #ruby
<Fernandos> centrx: hmm.. idk. if there is already such a thing. I was thinking of a single binary and didn't want to use a huge framework and am still not sure of the language to use.
spacemud has quit [Quit: ZNC - http://znc.in]
SCommette has quit [Quit: SCommette]
RSTJNII has joined #ruby
troyready has quit [Read error: Operation timed out]
<Fernandos> maybe I should write it in C99, or Haskell, should just have ZERO dependencies, drop a binary, run it, go
<centrx> benlieb, I agree though. It might be to add language syntax/behavior to be similar to lambda in other languages like LISP
spacemud has joined #ruby
tommylom1ykins is now known as tommylommykins
kobain has joined #ruby
Jake232 has joined #ruby
<benlieb> interestingly lambda{}.lambda? => true, lambda{}.proc? => undefined method
<centrx> Fernandos, Web apps is the trend these days. Does help for compatibility across platforms
<benlieb> Proc.new{}.proc? => undefined method
<neoice> godd2: I wasn't sure if "metaprogramming" was the right term. "metaprogramming" always sounds like such a lofty concept
<Fernandos> centrx: no idea about the language to choose really, but would you use such a thing? Having client libraries in many languages, remote control via cli and a realtime interface connecting to the API that's just static html/js/css interface.
sparrovv has joined #ruby
<godd2> neoice: ruby is built for it, and trust me when I say that book is pretty straightforward
<centrx> Fernandos, I am not sure I am the target user. I don't have any content :)
<Fernandos> I mean CMS's are doomed to fail, because you say it. People need webapps, not a cms.
beneggett has joined #ruby
<Fernandos> But webapps almost always evolve to a cms
<Fernandos> but a cms very rarely evolves to a webapp and when it does it's big, clunky and ugly, not even talking about security here
<centrx> I would think that a webapp could be a CMS. Maybe I am wrong, but the concept does not require a desktop application
deens has quit [Remote host closed the connection]
<centrx> A CMS deployed internally on an internet with a web interface is still a "webapp" even if no one on the "World Wide Web" connects to it via the public Internet
<centrx> intranet
guilund has quit [Remote host closed the connection]
kewubenduben has joined #ruby
dj21 has joined #ruby
pu22l3r__ has quit [Remote host closed the connection]
<Fernandos> A webapp often times evolves to a cms, when projects grow, like facebook for example. They have a highly complex RBAC/ACL system that manages security and access and a way to add content. That's it
<dj21> is there a gem that'll let me take a screenshot of a webpage - preferably besides ancient selenium-webdriver?
<kewubenduben> Hi guys, how do you do a regex if you have a variable? trying like -> a="sfs" ; "mysfs01" =~ /a/ <- is not possible
geggam_ has joined #ruby
w4pm has quit [Ping timeout: 248 seconds]
<Fernandos> dj21: idk about a gem, but there are many SaaS services that do that. phantomjs could help you do that yourself, iirc
<dj21> i just found one actually, link_thumbnailer, thx
<centrx> kewubenduben, Either: /#{a}/ or Regexp.new(a)
mengu has quit [Remote host closed the connection]
<dj21> kewubenduben: what are you trying to do, match or substitute?
phansch has quit [Quit: Leaving]
lockweel has quit [Ping timeout: 272 seconds]
<dj21> oh n/m
robert_ has joined #ruby
lorelei_ has joined #ruby
thenovices has quit [Remote host closed the connection]
<dj21> what does ~> mean in the context of bundler?
<Fernandos> centrx: what would you need? I mean what project do you think would help you other than a cms then?
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Fernandos> just trying to fix shit, because email and cms suck so hard I wanna fix it asap
ambushsabre has joined #ruby
Usse has joined #ruby
mocfive has quit [Read error: Connection reset by peer]
burlyscudd has joined #ruby
<centrx> Fernandos, What's wrong with e-mail?
mocfive has joined #ruby
CogitoErgoSum has quit [Ping timeout: 248 seconds]
<shevy> dj21 it has to do with version checks
SCommette has joined #ruby
<shevy> dj21 I believe it somehow checks for major or minor version (probably major)
RaCx has joined #ruby
<Fernandos> centrx: idk, where to start... your question sounds so legitimate, but when you look at how email works at the protocol level, you'll see how bad it is and how much it sucks.
<centrx> Oh SMTP, yeah I don't think you are going to be able to change that :)
jkline has quit [Quit: jkline]
<dj21> my app depends on nokogiri 1.6.1, but a new gem (link_thumbnailer) demands ~. 1.4.0
sambao21 has quit [Quit: Computer has gone to sleep.]
IceyEC has quit [Quit: IceyEC]
<dj21> ~> *
geggam_ has quit [Client Quit]
<dj21> rock and a hard place
<godd2> dj21: its says "look for the newest release that is in the same minor release category"
<Fernandos> centrx: smtp, pop3, exchange, imap etc.. there is a lot of bullshit that re-invents the wheel
CogitoErgoSum has joined #ruby
itadder has quit [Read error: Connection reset by peer]
Virtualize has quit [Quit: Leaving...]
<dj21> ahhh cutycapt :]
timonv has joined #ruby
<Fernandos> centrx: and that's "low-level", on the interface side the things are even worse than that. That's why social networks sprout, because email sucks. Each and everyone tries to solve a similar problem, without knowing the actual problem.
gijsje has joined #ruby
Liquid-- has joined #ruby
Spami_ has quit [Quit: Leaving]
Spami has joined #ruby
<centrx> Fernandos, I am all for anything that eliminates Facebook
lorelei_ has quit [Ping timeout: 245 seconds]
mary5030_ has quit [Ping timeout: 248 seconds]
klaut has quit [Remote host closed the connection]
<Fernandos> centrx: what frustrates me personaly is that I cannot integrate flows in to what I used to do, the sofware is dumb and writing extension requires too much time, because the software sucks at making things "easy" to extend
beneggett has joined #ruby
Txandy|away is now known as Txandy
<Fernandos> not joking, I tested many more than 100 cms, didn't count after a while..
dweeb_ has joined #ruby
<Fernandos> and I looked through the source of almost all of them, regardless of the language they were written in (excluding any commercial or SaaS cms)
timonv has quit [Ping timeout: 276 seconds]
w4pm has joined #ruby
olivier_bK has joined #ruby
<Fernandos> Adva CMS is the only one in that list I didn't know
<Fernandos> ah and BrowserCMS
bbloom has quit [Quit: Textual IRC Client: www.textualapp.com]
Sawbones has quit []
spider-mario has quit [Remote host closed the connection]
petey has quit [Remote host closed the connection]
petey has joined #ruby
el_cristobal has quit [Ping timeout: 245 seconds]
figgleberry has quit [Ping timeout: 252 seconds]
mary5030 has joined #ruby
danshultz has quit [Remote host closed the connection]
max96at has quit [Quit: Textual IRC Client: www.textualapp.com]
aaronmcadam has quit [Ping timeout: 272 seconds]
danshultz has joined #ruby
<Fernandos> thanks for listening and your input centrx, gotta go now, see you
<centrx> Fare thee well
bluOxigen has quit [Ping timeout: 245 seconds]
top4o has joined #ruby
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
beneggett has joined #ruby
Sawbones has joined #ruby
atmosx has quit [Quit: Lost in trance]
figgleberry has joined #ruby
lkba has joined #ruby
<Sawbones> So I'm working with rails and I see this thing that says 'yield :nav' What the heck is that doing?
petey has quit [Ping timeout: 245 seconds]
nettoweb has quit [Quit: nettoweb]
IceDragon_ has joined #ruby
<bnagy> yielding a symbol
<Sawbones> a symbol?
<bnagy> :nav is a symbol
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
petey has joined #ruby
<banister> bnagy sup nags
<bnagy> symbols are special because each symbol is unique, so having many refs to it saves memory etc
beneggett has quit [Client Quit]
zoscoy has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<bnagy> morning banister
<banister> bnagy time for u?
<bnagy> whereas if you use "nav" there can be arbitrary numbers of copies of that same string
<banister> 11:15pm here :)
<bnagy> 1015
agjacome has quit [Ping timeout: 260 seconds]
RaCx has quit [Quit: Computer has gone to sleep.]
IceDragon has quit [Disconnected by services]
beneggett has joined #ruby
IceDragon_ is now known as IceDragon
danshultz has quit [Ping timeout: 252 seconds]
<bnagy> UTC+12 here at the edge of the world
<bnagy> although NZ is at +13 because daylight savings, which still freak me out
ffranz has quit [Quit: Leaving]
blackmesa has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
Nightmare has quit [Quit: DDoS has died, DDoS has risen, DDoS comin' again]
wildroman2 has quit [Remote host closed the connection]
jkline has joined #ruby
Nightmare has joined #ruby
mlpinit has quit [Remote host closed the connection]
lockweel has joined #ruby
nanoyak has quit [Ping timeout: 252 seconds]
<Fractional> How do I run my ruby program in RubyMine?
<bnagy> sounds like a question for the rubymine docs
bw_ has quit [Ping timeout: 272 seconds]
Xeago has quit [Remote host closed the connection]
hiall has joined #ruby
Xeago has joined #ruby
<Fractional> binagy: Didn't find anything it earlier on.
whomp has quit [Ping timeout: 245 seconds]
parduse has quit [Ping timeout: 272 seconds]
nanoyak has joined #ruby
<shevy> Hanmac hehe. could be decoay
ItSANgo has quit [Quit: Leaving...]
<shevy> *decoy
el_cristobal has joined #ruby
<shevy> Hanmac or just raise awareness
cbetta_afk is now known as cbetta
<Sawbones> So a symbol is a string?
havenwood has joined #ruby
<shevy> Sawbones of course not
<godd2> Sawbones: a symbol is very much like a string,but there're things you cant do to it like a string
<bnagy> Fractional: well it took me about as long as it took to type 'rubymine run program' into google, so maybe you weren't looking right
<shevy> Sawbones the first thing one should remember is that symbols are super boring, they only have a cool name
Mars___ has quit [Read error: Connection reset by peer]
<Sawbones> because in the rails code it calls params[:id]
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Mars has joined #ruby
<Sawbones> Is :id a variable in this case?
<Sawbones> I'm confused.
<bnagy> no, it's a symbol
Mars is now known as Guest86704
<centrx> Sawbones, A symbol is a constant that looks very much like a string to the programmer
<shevy> Sawbones what does a symbol have as identifier for you?
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx> Sawbones, The only difference between a symbol and a string is a) it is stored once internally, as a constant, so it is more efficient to re-use, and b) the syntax is cleaner, : vs ""
<godd2> Sawbones: we use symbols as keys in hashes. in the params hash, the :id symbol will get you the id in that hash. so if params = {:id => 3, :name => "Jim"} then params[:id] will spit back 3 to you
<Fractional> bnagy: I only found it for rails.
<LadyRainicorn> Also, importantly, symbols are not garbage collected.
Xeago has quit [Ping timeout: 260 seconds]
<shevy> ponicorns are not garbage collected either!
<centrx> Sawbones, A symbol also lacks many of the methods a string has, it is less bulky
<Sawbones> godd2: Can I just get the id from that hash with 'id'?
<LadyRainicorn> That is true shevy.
yekta has quit [Quit: yekta]
<shevy> Sawbones of course not
* LadyRainicorn flies around uncollected.
beneggett has joined #ruby
<bnagy> so when we say 'the only difference between a symbol and a string' we really mean 'they're pretty much different in ever significant way'
<shevy> because 'id' is a string Sawbones
rayners has quit [Remote host closed the connection]
<Hanmac> Sawbones: did you had other programing exp before with other language?
nanoyak has quit [Quit: Computer has gone to sleep.]
<Sawbones> Yeah
<shevy> Sawbones there exists this abomination HashWithIndifferentAccess or something
<bnagy> unless you use Fails "hash with indifferent access" or whatever horror they have
<shevy> if symbols are too DIFFICULT for you, use that hash
<bnagy> heh
<Sawbones> but usually hashes use a string for their key
mark_locklear has quit [Ping timeout: 260 seconds]
<Hanmac> Sawbones: ... Symbols are rubys way like a creepy hybrid between a String and the Enums in C
<bnagy> no
<shevy> Sawbones in which language though?
<Sawbones> It's not difficult I just want to understand why they chose these symbols and when I should use them
<godd2> Sawbones: try this. open up irb and try the code in this gist: https://gist.github.com/nicklink483/8427155
<shevy> Sawbones because a symbol has the same object_id all the time, always. a string object does not have
<bnagy> string keys are uncommon in ruby
<shevy> but they are garbage collected!!!
<LadyRainicorn> Symbols are for when you care about identity.
<LadyRainicorn> Strings are for when you care about value.
<bnagy> in idiomatic ruby you'll mostly only see them when a hash is going into or coming out of json or some other serialisation format
<godd2> youll see that "a" got created twice and has two different object ids because they aren't the same object, but when :a was created, it was created once and forever in that code
<LadyRainicorn> Also, never use to_sym.
<LadyRainicorn> Ever.
nanoyak has joined #ruby
LekeFly has joined #ruby
claymore has quit [Quit: Leaving]
<LadyRainicorn> You will die
<bnagy> eh?
<Sawbones> bnagy: I just started using the ruby json library and I acquired my values with strings
<LadyRainicorn> Painfully.
<Hanmac> Sawbones: for sample : 1000.times.map {"a"} creates 1000 different strings ... 1000.times.map {:a} create ONE symbol
sethen has quit [Ping timeout: 252 seconds]
beneggett has quit [Client Quit]
<godd2> LadyRainicorn: unless you're getting a string that you want to send as a method, then object.send(some_string.to_sym) would be the way
CogitoErgoSum has quit [Ping timeout: 245 seconds]
rakm has joined #ruby
<bnagy> send works with strings these days
<Sawbones> Hanmac: ok, see that makes sense then
Fractional has quit [Quit: Leaving]
<LadyRainicorn> If some_string is user controlled, to_sym is a DoS vuln.
<Sawbones> that would explain why you'd write attr_accessor :thing :another_thing, because you want the same object
Fernandos has left #ruby ["PONG :hubbard.freenode.net"]
<Hanmac> attr_accessor "thing" would work too but it is not nessary
postmodern has joined #ruby
alexfreidah has joined #ruby
<Sawbones> wait what?
mneorr has joined #ruby
<Sawbones> that's stupid
synergy_ has joined #ruby
<centrx> *~*~**!*!~*~* YOU SAID THE WORD OF THE DAY ~*~**!*!*!**~*~*~
<bnagy> there's no particular reason for attr_* to use symbols apart from style
<bnagy> you could easily write those methods to take string params
<Hanmac> for sample most of the methods that takes Symbols like define_method or send does work with Strings too
<bnagy> now
vikhyat has quit [Read error: Connection reset by peer]
<bnagy> used to be a pain in the ass
<Sawbones> bbl to discuss more
heftig has quit [Quit: Quitting]
Sawbones has quit []
CogitoErgoSum has joined #ruby
<LadyRainicorn> Not accepting strings is very bad.
<godd2> Fun fact, if you want a space in your symbol, just wrap it in quotes. :"Hello, world!"
vikhyat has joined #ruby
parduse has joined #ruby
<bnagy> :<
<centrx> :"Hello, world!".to_s
ItSANgo has joined #ruby
<rakm> how do I get rake to invoke consecutive tasks?
<godd2> my_str = "Hello"; :"#{my_str}, world!"
* LadyRainicorn fals out of the air.
figgleberry has quit [Ping timeout: 260 seconds]
alexfreidah has quit [Ping timeout: 272 seconds]
mneorr has quit [Ping timeout: 245 seconds]
<Hanmac> bad that symbols does not support the creepy C string cat :P "abc""def" works but :"abc""def" works not ;P
<bnagy> ih8u
heftig has joined #ruby
<workmad3> Hanmac: should string literals and symbol literals really automatically concat? :P
jkline has quit [Quit: jkline]
<godd2> :"#{"Hello, " + "world!"}"
cads has joined #ruby
shaunbaker has quit []
<workmad3> godd2: :"#{"Hello, " "world!"}"
<workmad3> godd2: down with redundant + signs!
<bnagy> this is almost awful enough to force me to work on the awful code I don't want to work on
<Hanmac> workmad3: did you know? "def#{"xyz"}abc" is parsed as ONE string, not two ;P
freerobby has quit [Quit: Leaving.]
<workmad3> Hanmac: I didn't, but fun :)
g3orge has quit [Quit: WeeChat 0.4.2]
sassamo has quit [Remote host closed the connection]
<LadyRainicorn> 1000000.times{|i|i.to_s.to_sym}
<godd2> what about "a#{"b#{"c"}d"}e"
brunops has quit [Ping timeout: 272 seconds]
sassamo has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
madb055 has quit [Quit: Konversation terminated!]
madb055 has joined #ruby
<Hanmac> godd2 does this answer your question?
<Hanmac> >> RubyVM::InstructionSequence.compile('"a#{"b#{"c"}d"}e"').disasm.lines[2]
<eval-in> Hanmac => "0002 putstring \"abcde\"\n" (https://eval.in/89290)
jasonp has joined #ruby
jasonp is now known as jasonpp
<godd2> >> RubyVM::InstructionSequence.compile('"a#{"b#{String.new("c")}d"}e"').disasm.lines[2]
<eval-in> godd2 => "0002 putobject \"ab\"\n" (https://eval.in/89291)
<bnagy> eval-in is back! yay!
deens has joined #ruby
<Hanmac> workmad3: Ruby was written by the Founder of the History Monks: "Wen the Eternally »Surprised«" ;P
<workmad3> Hanmac: :)
Liquid-- has quit [Quit: Computer has gone to sleep.]
LastWhisper has joined #ruby
<godd2> does that mean that "a#{"b#{String.new("c")}d"}e" is parsed as more than one string?
Valesk has quit [Quit: Textual IRC Client: www.textualapp.com]
havenwood has quit [Ping timeout: 248 seconds]
<LastWhisper> hey! does anyone here use webmock?
sassamo has quit [Ping timeout: 265 seconds]
<shevy> anyone who would use "a#{"b#{String.new("c")}d"}e" should be killed on the spot
Jake232 has quit [Ping timeout: 272 seconds]
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cads has quit [Ping timeout: 272 seconds]
<Hanmac> godd2: the difference is that they are not only string literals ... for sample "a#{1}b" is not autmaticlly cutted by the parser to "a1b"
jasonpp has left #ruby [#ruby]
CogitoErgoSum has quit [Ping timeout: 252 seconds]
sLi_ has joined #ruby
marr has quit [Ping timeout: 245 seconds]
ctp has joined #ruby
Txandy is now known as Txandy|away
jasonpp has joined #ruby
<Mon_Ouie> It's just a form of constant folding: since you're preforming that operation with string literals, the result can be calculated at constant time, no need to do it everytime the string is evaluated
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
madb055 has quit [Ping timeout: 272 seconds]
sLi_ has quit [Ping timeout: 252 seconds]
gasbakid has quit [Read error: Connection reset by peer]
CodeBunny has joined #ruby
<CodeBunny> Cucumber SUCKS!
mansi has quit [Read error: Connection reset by peer]
drumusician has quit [Remote host closed the connection]
<CodeBunny> Shoot me!
mansi has joined #ruby
drumusician has joined #ruby
drumusician has quit [Remote host closed the connection]
drumusician has joined #ruby
deens has quit [Remote host closed the connection]
lioninawhat has joined #ruby
laphlaw has quit [Quit: Computer has gone to sleep.]
mercwithamouth has quit [Ping timeout: 246 seconds]
mercwithamouth has joined #ruby
<shevy> why would anyone shoot you
DJJeff has quit []
gijsje has quit []
sailias has quit [Quit: Leaving.]
mneorr has joined #ruby
Animawish has joined #ruby
* Hanmac throws an apple
Liquid-- has joined #ruby
jkline has joined #ruby
jkline has quit [Client Quit]
<CodeBunny> So sick of cucumber. It takes an hour to do in cucumber to do what I can do in minitest in 5 minutes
m8 has quit [Quit: Sto andando via]
<Hanmac> cucumber are only for kappas
<CodeBunny> kappas?
adil_jarulin has joined #ruby
beneggett has joined #ruby
yfeldblum has quit [Remote host closed the connection]
clamstar has joined #ruby
drumusician has quit [Ping timeout: 252 seconds]
<Hanmac> CodeBunny: Japanese Water Daemons ... they like cucumber :P
lfox has quit [Quit: ZZZzzz…]
mary5030 has quit [Remote host closed the connection]
<CodeBunny> Oh good. Now I know what it's useful for.
Virtualize has joined #ruby
Virtualize has quit [Remote host closed the connection]
<CodeBunny> Because it's certainly not useful for what this guy wants to use it for
<CodeBunny> NOT a testing tool people. Not a testing tool
Virtualize has joined #ruby
yfeldblu_ has joined #ruby
<godd2> I'm having trouble finding some good resources to learn about Unit Testing and best practices in the Ruby ocmmunity regarding testing. Anyone have any links or recommendations?
mikepack_ has joined #ruby
kenndel_ is now known as kenndel
<CodeBunny> Oooh.... google micheal feathers
mikepack_ has quit [Remote host closed the connection]
<CodeBunny> and POOTR
fgo has joined #ruby
spastorino has joined #ruby
sassamo has joined #ruby
<CodeBunny> poodr rather
<bnagy> godd2: the general practice is to have hundreds of tests written in a DSL that is a sexily natural language looking as possible, while never actually writing any tests that expose actual bugs or security issues
Liquid-- has quit [Quit: Computer has gone to sleep.]
<CodeBunny> Ummmmm
<nateberkopec> bnagy: #bestpractice
<CodeBunny> i think that still counts as bad
<nateberkopec> godd2: try MiniTest! https://github.com/seattlerb/minitest minitest helped me understand testing.
<CodeBunny> bad programmer, no donut
<CodeBunny> Yes. Minitest is the bomb
Usse has quit []
<nateberkopec> godd2: also, try reading the tests of small libraries/gems and figuring out what's going on.
<CodeBunny> Minitest is the reason I currently want to claw my eyes out being forced to fuck with cucumber
laphlaw has joined #ruby
adil_jarulin has left #ruby [#ruby]
lorelei_ has joined #ruby
brunops has joined #ruby
<godd2> Thank you very much you guys :)
xea has quit [Ping timeout: 246 seconds]
<CodeBunny> no problem
lorelei_ has quit [Changing host]
lilly19 has quit [Quit: Page closed]
lorelei_ has joined #ruby
mikepack has quit [Ping timeout: 248 seconds]
<CodeBunny> all the seattlerb projects use minitest... you can learn from those
enebo has quit [Quit: enebo]
spastorino has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
petey has quit [Remote host closed the connection]
<godd2> I tried to use test/unit with one project, and I was following along, but I didn't really grok what I was doing even though it worked
xea has joined #ruby
shadoi has quit [Quit: Leaving.]
Zackio has quit [Read error: Connection reset by peer]
<CodeBunny> The minitest docs are much better
beneggett has quit [Ping timeout: 245 seconds]
<CodeBunny> and you will suddenly grob your test unit tests
petey has joined #ruby
<nateberkopec> godd2: it took me a while to understand too. reading other project's tests helped me a lot - so did contributing to open-source and having to write unit tests for the stuff I did :)
lioninawhat has quit [Remote host closed the connection]
Txandy|away is now known as Txandy
<CodeBunny> Travis will make you understand
petey has quit [Read error: Connection reset by peer]
<CodeBunny> With a big red stick
charliesome has joined #ruby
Wolland has quit [Remote host closed the connection]
petey has joined #ruby
Fractional has joined #ruby
e62 has quit [Ping timeout: 272 seconds]
larissa has joined #ruby
nhhagen has joined #ruby
<Fractional> Can you do like: "if !foo" in ruby? foo is a boolean
<LastWhisper> CodeBunny: How come you hate cucumber?
fedesilva has joined #ruby
brunops has quit [Ping timeout: 272 seconds]
<bnagy> Fractional: normally we'd write unless foo
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<nhhagen> good evening
fedesilv_ has quit [Ping timeout: 276 seconds]
clamstar has quit [Quit: Textual IRC Client: www.textualapp.com]
<godd2> Fractional: fire up irb and try it out! THats what it's for :)
<CodeBunny> LastWhisper: Because it takes going back and forth between umteen files to get anything done, and it doesn't play nice in my build system, and.... overhead overhead overhead
fedesilva has quit [Remote host closed the connection]
<Fractional> godd2: It works but Rubymine gives me errors :/
lifestream has joined #ruby
<Fractional> bnagy: Thanks! Exactly what I was looking for! :D
kirun has quit [Quit: Client exiting]
<CodeBunny> LastWhisper: if something is really truely borked and I can't figure it out, I have to go gather up all the bits that are strewn from hell to breakfast, pull them into a single minitest file, debug, then go fix it in cucumber
<nhhagen> I have a tab seperated file that I want to read each line from, split it, select a column and only keep unique values of that column. This is what I though was right: File.open("NO.txt", "r:utf-8").each_line.map {|line| line.split("\t")[1]}.uniq do |place|
<CodeBunny> LastWhisper:It's a pain in a ankle
<LastWhisper> Gotcha. CodeBunny Is your test suite that large that it happens that often?
<nhhagen> but that does not work
shime has quit [Ping timeout: 272 seconds]
<bnagy> nhhagen: there's a csv lib in stdlib
<nateberkopec> nhagen: require 'csv' #BOOM
<CodeBunny> LastWhisper:it's not a matter of large...
<bnagy> which works with tab separators as well, obviously
Some-body_ has joined #ruby
dweeb_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<Fractional> I recently started using Rubymine and there is something weird with the IDE. It gives me errors unless I give the optional parameters of a method arguments.
Zackio has joined #ruby
<Fractional> Has anyone experienced anything in the like?
<nhhagen> bnagy: I'm not suprised, I'll check it out, but it is the selecting unique part I need help with. I'm guessing that my method chaining does not work as I expected
<CodeBunny> LastWhisper:it's more a matter of 'how do I get this fiddley bit to work... Oh hell, I have to get it to work in this stupid DSL on top of getting it to work in the first place. fuck me
Some-body_ is now known as DarthGandalf
<bnagy> nhhagen: well 'doesn't work' is not a useful problem description
<godd2> Fractional: I think it's only a warning, not an error. While it's probably a good idea to use unless in that case, always choose the control statement which makes the most sense and don't force yourself to use one that feels uncomfortable.
<bnagy> if you can provide sample input that's the best way
<CodeBunny> LastWhisper:It's not hard. It's just very time consuming.
<nhhagen> bnagy: well, I get duplicates
<Fractional> godd2: Rubymines highlights the code with underlined red unless I fill in all the arguments for a method (even the ones that are optional). Unless feels more ruby-ish :)
<godd2> nhhagen: you're using #uniq when you should use #uniq!
<godd2> nhhagen: without the exclamation point, you aren't changing the object
vikhyat has quit [Read error: Connection reset by peer]
<bnagy> no, it's not that
<LastWhisper> I hear ya CodeBunny
<bnagy> you're passing a block straight to uniq - doubt that's what you want
<bnagy> try uniq.each
<nhhagen> godd2: thx, I'm new to ruby, and haven't read enough yep
<LastWhisper> Are any of you guys familiar with WebMock at all? In terms of creating stub_requests and then checking pages via a web browser/driving it?
iceden has quit [Remote host closed the connection]
vikhyat has joined #ruby
danshultz has joined #ruby
<Hanmac> nhhagen & godd2: but you need to beware from ! methods ... some of them might return nil, so you need to be careful when you want the return value for chaining
jtbw has joined #ruby
<bnagy> uniq {|blah| ... uses the block result for the uniqueness test
<godd2> nhhagen: a couple others like that to be aware of are .sort vs .sort! and reverse! vs reverse
deever_ has quit [Ping timeout: 265 seconds]
<bnagy> basically just don't chain with ! methods
<Hanmac> nhhagen: also beware, use File.open() always with a block like File.open() { ... } otherwise you leave the FileDescriptor open
<bnagy> it makes no sense anyway
deever has joined #ruby
<godd2> bnagy: unless you want to iterate over a uniq array and have the array still be uniq afterward, surely?
<bnagy> well if you're chaining then the intermediate result is lost anyway
<bnagy> so it's pointless
<nhhagen> Hanmac: ok, what would I put the in the block in the case
<bnagy> plus the wacked return values - basically it's just safer and cleaner to never do it
<Fractional> http://puu.sh/6lb8i.png <- Rubymine tell me that I need to fill in 4 more optional arguments.
<Fractional> Anyone knows how to fix this?
<bnagy> nhhagen: where you have uniq do use uniq.each do
<nhhagen> #uniq! worked, I got the correct number of objects
<godd2> Fractional: that's not an error. Gosu::Image.new can take three arguments just fine
troyready has joined #ruby
<nhhagen> bnagy: I'll try that to, just to learn
MatthewsFace has joined #ruby
<Fractional> godd2: Yes, but the red underlining that comes from "Missing 4 arguments" is annoying.
<Fractional> How can one disable it?
<bnagy> by uninstalling rubymine
danshultz has quit [Ping timeout: 245 seconds]
<Hanmac> nhhagen: for sample: File.open("NO.txt", "r:utf-8") {|f|f.each_line.map { ... } } so let the block close it ... otherwise look at File.foreach which does all you want for you
<bnagy> it's linting is idiotic
shadoi has joined #ruby
<bnagy> isn't there File.each, anyway?
<Hanmac> bnagy: i meaned the class method
<godd2> Fractional: I don't know enough about RubyMine to answer your question. My solution is to use Notepad++ :P
hiall has quit [Ping timeout: 248 seconds]
kpshek has quit []
<workmad3> there's also File.readlines(filename).each
wildroman2 has joined #ruby
<nhhagen> Hanmac: thx, this script only reads the file and loads the content into elasticsearch, just didn't want to spam to much
lockweel has quit [Ping timeout: 272 seconds]
mikepack has joined #ruby
hiall has joined #ruby
<Fractional> godd2: Then back to Sublime it is! :)
<Hanmac> "File.foreach(filename) VS File.readlines(filename).each " know the difference
jovon_ has joined #ruby
<nhhagen> Hanmac: thx
<bnagy> something obscure and horrible that you're going to tell us anyway?
* Hanmac uses Eclipse for Ruby and C++, but i would not recommend it for everyone
<godd2> Fractional: if you ctrl+click on the error, what libraray does it open up?
mneorr has quit [Remote host closed the connection]
Txandy is now known as Txandy|away
petey has quit [Remote host closed the connection]
mansi has quit [Remote host closed the connection]
vikhyat has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
<shevy> hehe
mansi has joined #ruby
duggiefresh has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
<Hanmac> godd2: i have the feeling that the gosu interface documentation (a fake method list for the parsers) is not 100% that what it is
vikhyat has joined #ruby
aryaching has joined #ruby
<Hanmac> Fractional: i wanted to make you a Tileset class ... i forgot it again ... maybe i have time tomorrow ... (try to remember me about that)
jovon has quit [Ping timeout: 272 seconds]
MatthewsFace has quit [Quit: This computer has gone to sleep]
<godd2> Fractional: have you heard of Ludum Dare?
<Fractional> godd2: I've heard about it yes :)
wildroman2 has quit [Ping timeout: 260 seconds]
<Fractional> Hanmac: I will if I remember as well! :D
mikepack has quit [Ping timeout: 252 seconds]
vikhyat has quit [Read error: Connection reset by peer]
nateberkopec has quit [Quit: Leaving...]
workmad3 has quit [Ping timeout: 272 seconds]
alvaro_o has joined #ruby
<Fractional> godd2: Why do you ask? :)
marr has joined #ruby
vikhyat has joined #ruby
<shevy> Fractional are you already thinking in ruby?
juarlex has quit [Remote host closed the connection]
mansi has quit [Ping timeout: 252 seconds]
<Fractional> shevy: I'm doing my best to do so! Currently writing gamestate and gamestate manager classes.
<godd2> Fractional: I had jsut recently gotten into Gosu and Ludum Dare because of this talk: http://www.youtube.com/watch?v=irMfy8I2OVQ
<godd2> Unfortunately Hasu requires Ruby 2.0 and Gosu will only work with 1.9.3 on windows
mikepack has joined #ruby
* Hanmac point an laugh about gosu because it cant be installed on my system because pango is not where gosu think it is
mneorr_ has joined #ruby
Soliah has joined #ruby
juarlex has joined #ruby
<shevy> Hanmac where is pango?
<Fractional> Godd2: The biggest project I've made is a improved "clone" of the Asteroids game in Chingu. You can give it a play if you want! www.github.com/freddan962
freezey has quit [Ping timeout: 252 seconds]
<godd2> Fractional: awesome! Ill check it out. I made a pseudo-remake of Combat! for the atari: https://github.com/nicklink483/combat
sergicles has quit [Quit: sergicles]
<nhhagen> Hanmac: Have I understood it correctly that File.foreach will not work in my case since I want unique values?
<godd2> Fractional: Also, Id really love to dig into Metro: https://github.com/burtlo/metro/ and make it so that games are independently distributable
dblessing has quit [Quit: dblessing]
e62 has joined #ruby
mneorr has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
<Fractional> godd2: http://puu.sh/6lbTp.jpg & http://puu.sh/6lbV7.jpg (Chinguroids) =D
benlieb has quit [Quit: benlieb]
dreamchaser has quit [Quit: ZNC - http://znc.in]
mikepack has quit [Ping timeout: 272 seconds]
juarlex has quit [Ping timeout: 272 seconds]
carif has joined #ruby
meatherly has quit [Remote host closed the connection]
dreamchaser has joined #ruby
dreamchaser has quit [Changing host]
dreamchaser has joined #ruby
dreamchaser has quit [Excess Flood]
meatherly has joined #ruby
tyl has joined #ruby
dreamchaser has joined #ruby
dreamchaser has joined #ruby
dreamchaser has quit [Changing host]
dreamchaser has left #ruby [#ruby]
nanoyak has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
Spleeze has quit [Quit: QUIT]
<bnagy> nhhagen: nah it would work
sambao21 has joined #ruby
<nhhagen> bnagy: hmm, then I'm doing something wrong
Azure has quit [Quit: Textual IRC Client: www.textualapp.com]
<godd2> nhhagen: bnagy was right, File.open("NO.txt", "r:utf-8").each_line.map {|line| line.split("\t")[1]}.uniq.each do |place|; #place logic; end will work since youre passing a block to the each iterator.
<bnagy> nhhagen: File.foreach("whatever.txt").map {|l| l.split("\t")[1]}.uniq.each {|e| ...
thesheff17 has quit [Quit: Leaving]
whomp has joined #ruby
Lewix has quit [Remote host closed the connection]
<nhhagen> bnagy: that is what I tried
mordocai has quit [Remote host closed the connection]
<Fractional> godd2: I like that video a lot!
Lewix has joined #ruby
<nhhagen> godd2: that is what I am doing, do the descriptor should close right
<godd2> Fractional: but yea, fair warning, if you're on windows, dont get your hopes up
meatherly has quit [Ping timeout: 272 seconds]
tyl has quit [Ping timeout: 260 seconds]
<bnagy> nhhagen: provide sample input then
<Fractional> godd2: I'm on Ubuntu, OS X and Windows.
<bnagy> cause I don't believe you :)
<nhhagen> bnagy: ?
tyl has joined #ruby
<shevy> down with your pants!
<shevy> show the code
<godd2> nhhagen: I would use File.read personally, if you pass it a block, it will iterate over each line for you and close the file in one go like this: https://gist.github.com/nicklink483/8428254
asteros has quit [Quit: asteros]
sparrovv has quit [Remote host closed the connection]
nanoyak has joined #ruby
timonv has joined #ruby
deens has joined #ruby
lorelei_ has quit [Ping timeout: 252 seconds]
<bnagy> eh?
<bnagy> on what version does read do that?
rudisimo has quit []
Lewix has quit [Ping timeout: 272 seconds]
<bnagy> read should read the whole thing as one string
<bnagy> readlines is by line
sambao21 has quit [Quit: Computer has gone to sleep.]
tyl has quit [Client Quit]
<bnagy> or File.read(...).lines, which I guess is quite pretty
vlad_starkov has quit [Remote host closed the connection]
Animawish has quit [Quit: Animawish]
benlieb has joined #ruby
vlad_starkov has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
Guest86704 has quit [Remote host closed the connection]
mneorr_ has quit [Remote host closed the connection]
deens has quit [Ping timeout: 245 seconds]
Mars has joined #ruby
timonv has quit [Ping timeout: 265 seconds]
mneorr has joined #ruby
<nhhagen> bnagy: here is the complete code: https://gist.github.com/nhhagen/8428317
Olipro has quit [Ping timeout: 246 seconds]
Mars is now known as Guest15306
laphlaw has quit [Quit: Computer has gone to sleep.]
Azure has joined #ruby
lfox has joined #ruby
<bnagy> meh, looks ok
<godd2> nhhagen: can you gist NO.txt?
Olipro has joined #ruby
<bnagy> I don't think you even need each_line there
<bnagy> you can map right off File.open
SCommette has quit [Quit: SCommette]
<bnagy> by lines
<bnagy> it's an old perlism hangover :S