apeiros changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.3.1; 2.2.5; 2.1.10: https://www.ruby-lang.org || Paste >3 lines of text on https://gist.github.com || Rails questions? Ask on #RubyOnRails || logs @ https://irclog.whitequark.org/ruby/
magellanicloud has quit [Read error: Connection reset by peer]
|ifei5g00d has quit [Read error: Message too long]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
|ifei5g00d has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
nekcode has joined #ruby
nekcode has quit [Quit: nekcode]
jenrzzz has quit [Ping timeout: 260 seconds]
|ifei5g00d has quit [Remote host closed the connection]
nekcode has joined #ruby
shmuli has joined #ruby
nekcode has quit [Client Quit]
Dohplay has quit [Quit: Leaving]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xall_ has joined #ruby
jottr_ has joined #ruby
Felipe__ has joined #ruby
Ropeney has joined #ruby
Felipe__ has quit [Remote host closed the connection]
Dohplay has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
al2o3-cr has quit [Ping timeout: 250 seconds]
xall_ has quit [Ping timeout: 244 seconds]
al2o3-cr has joined #ruby
ur5us has quit [Remote host closed the connection]
Jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sonikspin has quit [Ping timeout: 260 seconds]
Xeago has quit [Read error: Connection reset by peer]
patronus has joined #ruby
Xeago has joined #ruby
Pumukel has joined #ruby
Mia has quit [Read error: Connection reset by peer]
PsionTheory has joined #ruby
dminuoso_ has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
roamingdog has joined #ruby
hahuang61 has quit [Ping timeout: 265 seconds]
Prawnzy has quit [Quit: Leaving...]
Technodrome has joined #ruby
dminuoso_ has quit [Ping timeout: 250 seconds]
hahuang61 has joined #ruby
charliesome has joined #ruby
meinside has joined #ruby
Devalo has joined #ruby
bkxd has joined #ruby
jottr has joined #ruby
jottr_ has quit [Ping timeout: 245 seconds]
hahuang61 has quit [Ping timeout: 260 seconds]
Devalo has quit [Ping timeout: 250 seconds]
brendan- has joined #ruby
bbulpett has joined #ruby
bkxd has quit [Ping timeout: 265 seconds]
marr has quit [Ping timeout: 260 seconds]
zukin has quit [Ping timeout: 250 seconds]
ur5us has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
Madplatypus has quit [Quit: Connection closed for inactivity]
muelleme has joined #ruby
brendan- has quit [Quit: Textual IRC Client: www.textualapp.com]
jaykilleen has joined #ruby
jaykilleen has quit [Remote host closed the connection]
jaykilleen has joined #ruby
muelleme has quit [Ping timeout: 250 seconds]
rfoust_ has joined #ruby
bbulpett has quit [Remote host closed the connection]
rismoney1 has joined #ruby
ruby-lang200 has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
bklane has joined #ruby
mBailey_j has joined #ruby
renderful has joined #ruby
ruby-lang200 has quit [Quit: Page closed]
roamingdog has quit [Remote host closed the connection]
jaykilleen has quit [Quit: Leaving]
hutch34 has joined #ruby
renderful has quit [Ping timeout: 244 seconds]
elifoster has quit [Quit: out]
yqfvwal has quit [Ping timeout: 245 seconds]
solocshaw has joined #ruby
JeanCarloMachado has quit [Ping timeout: 244 seconds]
hutch34 has quit [Ping timeout: 260 seconds]
Felipe__ has joined #ruby
Ropeney_ has joined #ruby
Felipe__ has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
benlieb has joined #ruby
benlieb has quit [Client Quit]
benlieb has joined #ruby
shmuli has quit [Remote host closed the connection]
benlieb has quit [Client Quit]
Ropeney has quit [Ping timeout: 268 seconds]
benlieb has joined #ruby
benlieb has quit [Client Quit]
solocshaw has quit [Ping timeout: 260 seconds]
ruby-lang787 has joined #ruby
ruby-lang787 has quit [Client Quit]
jottr has quit [Ping timeout: 252 seconds]
CloCkWeRX has quit [Ping timeout: 244 seconds]
Pumukel has joined #ruby
tomchapin has joined #ruby
rismoney1 has quit [Ping timeout: 260 seconds]
smtudor has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
dminuoso_ has joined #ruby
Pumukel has quit [Ping timeout: 250 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
tomchapin has quit [Quit: Textual IRC Client: www.textualapp.com]
dminuoso_ has quit [Ping timeout: 260 seconds]
hahuang61 has joined #ruby
bklane has quit [Remote host closed the connection]
bklane has joined #ruby
Guest57477 has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
CloCkWeRX has joined #ruby
Jameser has joined #ruby
dezull has joined #ruby
bklane has quit [Ping timeout: 260 seconds]
shmuli has joined #ruby
NeverTired has joined #ruby
tomchapin has joined #ruby
ixti has quit [Quit: WeeChat 1.6]
dezull has quit [Quit: Leaving]
dezull has joined #ruby
dezull has quit [Client Quit]
dezull has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
bruce_lee has quit [Ping timeout: 265 seconds]
jaguarmagenta has joined #ruby
mBailey_j has left #ruby ["WeeChat 1.6"]
govg has quit [Quit: leaving]
govg has joined #ruby
bklane has joined #ruby
Guest66 has joined #ruby
swills has quit [Remote host closed the connection]
mikeiniowa has quit [Remote host closed the connection]
bklane has quit [Remote host closed the connection]
abernstein has joined #ruby
bklane has joined #ruby
jottr has joined #ruby
mikeiniowa has joined #ruby
Ropeney_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hypercube32 has joined #ruby
hypercube32 has quit [Max SendQ exceeded]
hypercube32 has joined #ruby
railssmith has joined #ruby
PsionTheory has quit [Remote host closed the connection]
Dohplay has quit [Read error: Connection reset by peer]
Puffball has quit [Remote host closed the connection]
dviola has quit [Quit: WeeChat 1.6]
dminuoso_ has joined #ruby
tvw has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 250 seconds]
dminuoso_ has quit [Ping timeout: 260 seconds]
Madplatypus has joined #ruby
nadir is now known as WSO
bkxd has joined #ruby
WSO is now known as nadir
govg has quit [Ping timeout: 256 seconds]
User458764 has joined #ruby
creat has joined #ruby
jottr has quit [Ping timeout: 260 seconds]
jgnagy has quit []
bkxd has quit [Ping timeout: 268 seconds]
d0nn1e has quit [Ping timeout: 244 seconds]
jenrzzz has joined #ruby
d0nn1e has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
d^sh has quit [Ping timeout: 256 seconds]
d^sh has joined #ruby
Guest57477 has quit [Ping timeout: 245 seconds]
jaguarmagenta has quit [Remote host closed the connection]
harai_ has quit [Ping timeout: 250 seconds]
harai has joined #ruby
optiz0r has quit [Ping timeout: 260 seconds]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
jaguarmagenta has joined #ruby
jgnagy has joined #ruby
Dohplay has joined #ruby
bluOxigen has joined #ruby
astrobunny has joined #ruby
Coldblackice has joined #ruby
LoneHermit has quit [Remote host closed the connection]
malconis has joined #ruby
hutch34 has joined #ruby
Coldblackice has quit []
yokel has quit [Ping timeout: 258 seconds]
hutch34 has quit [Ping timeout: 260 seconds]
yokel has joined #ruby
hypercube32 has quit [Read error: Connection reset by peer]
harai has quit [Ping timeout: 244 seconds]
swills has joined #ruby
harai has joined #ruby
palms has joined #ruby
govg has joined #ruby
Dohplay has quit [Read error: Connection reset by peer]
hanmac has quit [Ping timeout: 260 seconds]
harai has quit [Ping timeout: 260 seconds]
Dohplay has joined #ruby
Pumukel has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
palms has quit [Ping timeout: 260 seconds]
Pumukel has quit [Ping timeout: 260 seconds]
dminuoso_ has joined #ruby
hypercube32 has joined #ruby
malconis has joined #ruby
gusrub has joined #ruby
hahuang61 has joined #ruby
hanmac has joined #ruby
dminuoso_ has quit [Ping timeout: 260 seconds]
jottr has joined #ruby
_djbkd has joined #ruby
hypercube32 has quit [Client Quit]
hahuang61 has quit [Ping timeout: 260 seconds]
harai has joined #ruby
buglessdr has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
dezull has quit [Quit: Leaving]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Felipe__ has joined #ruby
jbomo has left #ruby [#ruby]
qguv has quit [Ping timeout: 256 seconds]
nalley has joined #ruby
cj has quit [Ping timeout: 258 seconds]
malconis has joined #ruby
Felipe__ has quit [Client Quit]
bkxd has joined #ruby
qguv has joined #ruby
govg has quit [Ping timeout: 250 seconds]
nalley has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bkxd has quit [Ping timeout: 250 seconds]
arescorpio has joined #ruby
eljimmy has quit [Quit: This computer has gone to sleep]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 260 seconds]
sonikspin has joined #ruby
bklane has quit [Remote host closed the connection]
palms has joined #ruby
gix has quit [Ping timeout: 260 seconds]
7YUAAHPUW has joined #ruby
optiz0r has joined #ruby
pawnbox has joined #ruby
gix has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
7YUAAHPUW has quit [Ping timeout: 268 seconds]
hutch34 has joined #ruby
xall_ has joined #ruby
dos000 has quit [Quit: Page closed]
hutch34 has quit [Ping timeout: 260 seconds]
aupadhye has joined #ruby
jcao219 has quit [Ping timeout: 265 seconds]
xall_ has quit [Ping timeout: 268 seconds]
_djbkd has quit [Remote host closed the connection]
Guest66 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blackwind_123 has quit [Ping timeout: 245 seconds]
xall_ has joined #ruby
jcao219 has joined #ruby
_djbkd has joined #ruby
harfangk has joined #ruby
raatiniemi has quit [Ping timeout: 250 seconds]
blackwind_123 has joined #ruby
dminuoso_ has joined #ruby
xall_ has quit [Ping timeout: 252 seconds]
Puffball has joined #ruby
_djbkd has quit [Ping timeout: 268 seconds]
elifoster has joined #ruby
jcao219 has quit [Ping timeout: 252 seconds]
dminuoso_ has quit [Ping timeout: 268 seconds]
xall_ has joined #ruby
nuck has quit [Quit: Nuck Off]
nuck has joined #ruby
arescorpio has quit [Quit: Leaving.]
brucebag has quit [Read error: Connection reset by peer]
xall_ has quit [Ping timeout: 260 seconds]
yeticry has quit [Ping timeout: 260 seconds]
perturbation has quit [Quit: Leaving]
govg has joined #ruby
yeticry has joined #ruby
pawnbox has quit [Ping timeout: 256 seconds]
brucebag has joined #ruby
brucebag has joined #ruby
brucebag has quit [Changing host]
gusrub__ has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xall_ has joined #ruby
gusrub__ has quit [Client Quit]
bklane has joined #ruby
yeticry has quit [Ping timeout: 256 seconds]
yeticry has joined #ruby
dminuoso_ has joined #ruby
palms has quit [Ping timeout: 260 seconds]
maximus_dynamo has joined #ruby
<maximus_dynamo> o-o
pawnbox has joined #ruby
<maximus_dynamo> Hi o-o
maximus_dynamo has left #ruby [#ruby]
juiko has joined #ruby
shmuli has quit [Remote host closed the connection]
LoneHermit has joined #ruby
dminuoso_ has quit [Ping timeout: 260 seconds]
<Radar> hi
the_drow has joined #ruby
<baweaver> they gone
renderful has joined #ruby
ur5us has quit [Remote host closed the connection]
ben__ has joined #ruby
LoneHermit has quit [Ping timeout: 252 seconds]
Tempesta_ has joined #ruby
renderful has quit [Ping timeout: 244 seconds]
hutch34 has joined #ruby
jeyraof has joined #ruby
Tempesta has quit [Ping timeout: 252 seconds]
ben__ has quit [Ping timeout: 260 seconds]
hutch34 has quit [Ping timeout: 265 seconds]
pawnbox has quit [Ping timeout: 268 seconds]
armyriad has quit [Read error: Connection reset by peer]
oyes has joined #ruby
xall has joined #ruby
xall_ has quit [Ping timeout: 256 seconds]
the_drow has quit [Read error: Connection reset by peer]
muelleme has joined #ruby
the_drow has joined #ruby
xall_ has joined #ruby
govg has quit [Ping timeout: 260 seconds]
amincd has joined #ruby
xall has quit [Ping timeout: 256 seconds]
xall has joined #ruby
shmuli has joined #ruby
muelleme has quit [Ping timeout: 252 seconds]
XV8 has joined #ruby
xall_ has quit [Ping timeout: 260 seconds]
Pumukel has joined #ruby
igniting has joined #ruby
pawnbox has joined #ruby
Dimik has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
Tempesta_ has quit [Ping timeout: 260 seconds]
Tempesta_ has joined #ruby
igniting has quit [Ping timeout: 268 seconds]
hahuang61 has joined #ruby
A5101 has quit [Quit: WeeChat 1.4]
hahuang61 has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
pawnbox has quit [Remote host closed the connection]
davix has quit [Ping timeout: 244 seconds]
shmuli has quit [Remote host closed the connection]
igniting has joined #ruby
amincd has quit [Quit: Page closed]
jenrzzz has quit [Ping timeout: 250 seconds]
ace05 has quit [Remote host closed the connection]
oyes has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zukin has joined #ruby
unreal has quit [Ping timeout: 256 seconds]
gusrub has quit [Quit: Leaving]
grh has joined #ruby
harfangk has quit [Ping timeout: 268 seconds]
bklane has quit [Quit: Leaving...]
bkxd has joined #ruby
Ropeney has joined #ruby
xall has quit [Ping timeout: 268 seconds]
harfangk has joined #ruby
jottr has joined #ruby
brianpWins has joined #ruby
bkxd has quit [Ping timeout: 245 seconds]
cj has joined #ruby
dminuoso_ has joined #ruby
sneakerhax has quit [Quit: Back later]
Toledo has joined #ruby
xall has joined #ruby
warrshrike has joined #ruby
unreal has joined #ruby
<warrshrike> boys i have a 'quasi json' file
ych has joined #ruby
<warrshrike> lines like this
<warrshrike> b"{'searchAppName': 'Facebook\\n', 'foundAppVersion': 'v2.3', 'foundAppName': 'Facebook', 'foundAppCode': '411962'}"
<warrshrike> how can I parse it to get the fields?
LoneHermit has joined #ruby
igniting has quit [Ping timeout: 260 seconds]
LoneHermit has quit [Ping timeout: 245 seconds]
<toretore> using python, probably
Devalo has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
<hanmac> warrshrike: thats YAML, ruby has a module for that
<hanmac> >> require "yaml"; YAML.load("{'searchAppName': 'Facebook\\n', 'foundAppVersion': 'v2.3', 'foundAppName': 'Facebook', 'foundAppCode': '411962'}")
<ruby[bot]> hanmac: # => {"searchAppName"=>"Facebook\\n", "foundAppVersion"=>"v2.3", "foundAppName"=>"Facebook", "foundAppCod ...check link for more (https://eval.in/669238)
<toretore> heh, i thought it was python..
railssmith has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dminuoso_ has quit [Remote host closed the connection]
<toretore> oh.. it is, but with yaml
<warrshrike> its python-ish
<warrshrike> the dudes who did this crawling shizz did it in python
igniting has joined #ruby
<warrshrike> i doubt its YAML....i think thats a ruby thing
<warrshrike> or is YAML a general purpose parser thing?
<toretore> yes
<toretore> yaml is a format
<warrshrike> so you think this is yaml spit out by python?
<toretore> it could very well be python "inspect" syntax too
<warrshrike> so whats a man to do? just manually parse it?
pwnd_nsfw` has quit [Read error: Connection reset by peer]
<toretore> you need: 1) output in a parseable format 2) to know what that format is
pwnd_nsfw` has joined #ruby
lxsameer has joined #ruby
<warrshrike> errr...if I just had these files...then what?
<warrshrike> couldnt some sort of regular expression shizz do it?
<toretore> "this kinda looks like x, if i remove this and add that" works for about 5 minutes
<warrshrike> No I mean if we just treat it as plain text...and dig out the data manually?
jottr has quit [Ping timeout: 260 seconds]
<toretore> as i said, it will work for exactly the data you test it on, and then it won't on some future, unknown data
igniting has quit [Ping timeout: 245 seconds]
<warrshrike> no i only need it to work now
<warrshrike> for this specific data
<apeiros> "boys"? srsly? the whole world tries to be more inclusive and you start with "boys". sheesh.
grh has quit [Remote host closed the connection]
<apeiros> well, I guess some people are forever from yesterday.
<toretore> relax bro, it's just locker room talk
<toretore> *hides*
<warrshrike> sorry man
<warrshrike> im just a backwards country boy
<apeiros> "I only need it to work now" - well, does yaml work or not? didn't sound like it wouldn't work?
<warrshrike> R U A GIRL?
<apeiros> maybe
benlieb has joined #ruby
<warrshrike> ive never seen a GURL on programming ircs
<warrshrike> and besides MOMMA SAID AVOID GULX
<toretore> because they hide from boys like you
<warrshrike> okay trying YAML...
<apeiros> warrshrike: stop it right there.
<warrshrike> hmm...okaky :/
ych has quit [Quit: Textual IRC Client: www.textualapp.com]
<warrshrike> wouldn't wanna hurt tech diversity ofc....
the_drow has quit [Quit: This computer has gone to sleep]
<apeiros> I've got no patience for this kind of bullshit behavior
<warrshrike> ;)
Dohplay has quit [Read error: Connection reset by peer]
<warrshrike> okay okay sorry
<apeiros> yeah, you can stuff that smiley elsewhere. it doesn't make it any more funny.
<warrshrike> sheesh ease up man...
<apeiros> no.
<warrshrike> okay then dont I guess...so trying yaml now...
bluOxigen has quit [Ping timeout: 265 seconds]
bluOxigen has joined #ruby
grh has joined #ruby
xall_ has joined #ruby
<warrshrike> so it parsed the one line but then said 'error:did not find expected key while...'
muelleme has joined #ruby
<warrshrike> I guess out of luck here...gotta learn the format or do some manual shit
xall has quit [Ping timeout: 265 seconds]
<toretore> warrshrike: provide: 1) all of the data 2) all of your code 3) the entire error message you get
<go|dfish> warrshrike: it's a python bytestring repr() that contains json
<toretore> warrshrike: as a properly formatted gist
<toretore> ?gist-usage warrshrike
xall has joined #ruby
<warrshrike> okay
<warrshrike> does gist reveal true identity? isnt codepaste.net better?
<toretore> it is anonymous if you want it to be
<toretore> use gist
<toretore> use gist
juiko has quit [Read error: Connection reset by peer]
igniting has joined #ruby
<toretore> and provide everything asked for
xall_ has quit [Ping timeout: 245 seconds]
armyriad has joined #ruby
<warrshrike> okay man
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
muelleme has quit [Ping timeout: 260 seconds]
<warrshrike> just a sec...
dminuoso_ has joined #ruby
<warrshrike> data
<warrshrike> code
lacour has quit [Quit: Leaving]
<toretore> ?gist-usage warrshrike
Devalo has quit [Remote host closed the connection]
<warrshrike> common its okay now...
<toretore> you obviously didn't read it
Immune has quit [Ping timeout: 260 seconds]
igniting has quit [Ping timeout: 260 seconds]
Devalo has joined #ruby
<warrshrike> I skimmed it sort of
<warrshrike> it just said you can make multiple tabbed files...
grh has quit [Ping timeout: 262 seconds]
ta__ has quit [Remote host closed the connection]
Puffball has quit [Remote host closed the connection]
<toretore> split("\n").map{|l| YAML.load(l[2..-2]) }
User458764 has joined #ruby
<warrshrike> l here is 'line' from my code?
<toretore> it is a line in the data
Puffball has joined #ruby
<warrshrike> I mean the foreach loop is already giving it line by line
<warrshrike> should i use map instead?
Devalo has quit [Ping timeout: 265 seconds]
<toretore> use whatever works for your case
ace05 has joined #ruby
warrshrike has quit [Ping timeout: 260 seconds]
armyriad has quit [Quit: Leaving]
armyriad has joined #ruby
igniting has joined #ruby
mvxlr has joined #ruby
Immune has joined #ruby
palms has joined #ruby
vali has quit [Ping timeout: 245 seconds]
ag4ve_ has joined #ruby
<ag4ve_> how do i tell if a key isn't defined in a hash?
abernstein_ has joined #ruby
<ag4ve_> i've tried: if not h.keys.grep(foo) also tried if h.keys.grep(foo).nil?
abernstein has quit [Ping timeout: 265 seconds]
abernstein_ is now known as abernstein
<ag4ve_> and nothing seems to return true
contradictioned has quit [Remote host closed the connection]
contradictioned has joined #ruby
<apeiros> ag4ve_: .has_key?
<apeiros> aka #key? and #include?
teclator has joined #ruby
<ag4ve_> come again w/ that last?
<ag4ve_> #include? ?
<apeiros> and Enumerable#grep will never return nil
palms has quit [Ping timeout: 260 seconds]
xall has quit [Ping timeout: 245 seconds]
<apeiros> Hash#has_key?, #key? and #include? are aliases.
<ag4ve_> oic
<ag4ve_> ty
<apeiros> yw
* dminuoso_ wants a new Ruby feature
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
warrshrike has joined #ruby
<warrshrike> sorry got dc'd
<warrshrike> so isnt foreach already giving the lines?
<dminuoso_> def foo; asm("putself; putobject_OP_INT2FIX_0_1_C; opt_send_without_block <callinfo!mid:a, argc:1, FCALL|ARGS_SIMPLE>, <callcache>"); end
<dminuoso_> apeiros: Do you think this should be a thing?
conta has joined #ruby
<dminuoso_> Because I think I can hack this into MRI quite easily... :o)
gusrub has joined #ruby
LoneHermit has joined #ruby
<ag4ve_> just curious, how would i do that w/ a regex?
<warrshrike> @tore-tore?
<warrshrike> care to tell me again?
zukin has quit [Ping timeout: 252 seconds]
<ag4ve_> (doesn't apply here, but i've done that type of thing in perl, so curious how it works in ruby)
yardenbar has joined #ruby
LoneHermit has quit [Ping timeout: 244 seconds]
<hanmac> ag4ve_: you where nearly on the solution: h.keys.grep(foo).empty?
hutch34 has joined #ruby
User458764 has joined #ruby
<warrshrike> i have file containing lines from python dictionary how can I parse it in ruby?
benlieb has quit [Quit: benlieb]
hutch34 has quit [Ping timeout: 252 seconds]
symm- has quit [Quit: Leaving...]
ur5us has joined #ruby
djbkd_ has joined #ruby
wugy has joined #ruby
<apeiros> dminuoso_: I can't decipher what it does :) mind explaining?
<hanmac> warrshrike: i did File.readlines("data.txt").map {|x| YAML.load(x[2..-3]) } and that works for your data ... (but i still think your data is ugly formated)
Derperperd has quit [Quit: Derperperd]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
xall_ has joined #ruby
firstdayonthejob has joined #ruby
shmuli has joined #ruby
AlexJakeGreen has joined #ruby
igniting has quit [Ping timeout: 260 seconds]
edwinvdgraaf has joined #ruby
Pumukel has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
quazimodo has quit [Ping timeout: 260 seconds]
xall_ has quit [Ping timeout: 268 seconds]
grh has joined #ruby
firstdayonthejob has quit [Ping timeout: 250 seconds]
xall has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
marsjaninzmarsa has quit [Remote host closed the connection]
aganov has joined #ruby
marsjaninzmarsa has joined #ruby
SesMan has joined #ruby
User458764 has joined #ruby
shmuli has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
Burgestrand has joined #ruby
warrshrike has quit [Ping timeout: 260 seconds]
benlieb has joined #ruby
SocratesTV has joined #ruby
elifoster has quit [Quit: sleep]
igniting has joined #ruby
hahuang61 has joined #ruby
ag4ve_ has quit [Ping timeout: 260 seconds]
Dimik has quit [Ping timeout: 260 seconds]
SocratesTV has quit [Client Quit]
alaing has joined #ruby
<alaing> hi i'm having problems with bundler
<alaing> I have just updated bundler to version 1.13.6 but when i run bundle --version its reporting 1.13.5
<alaing> gem uninstall bundler shows two version 1.12.5 and 1.13.6
hahuang61 has quit [Ping timeout: 250 seconds]
aidalgol has joined #ruby
igniting has quit [Ping timeout: 252 seconds]
<alaing> something odd is happening
<alaing> when i do bundle install i get the following error too activesupport-5.0.0.1 requires ruby version >= 2.2.2, which is incompatible with the current version, ruby 2.0.0p648
<alaing> but ruby --version says i'm using 2.3.1p112
jenrzzz has quit [Ping timeout: 260 seconds]
<apeiros> so you have multiple rubies installed and are using different ones
<alaing> apeiros: i'm using rbenv
<apeiros> make sure you use the same ruby for all those operations
brianpWins has quit [Ping timeout: 260 seconds]
<alaing> i think its bundler might be whats causing this fault
jenrzzz has joined #ruby
jenrzzz has joined #ruby
gusrub has quit []
<alaing> apeiros: how do i check which ruby version is running for all those operations?
<alaing> i though ruby --version would be the one its using
<apeiros> bundler doesn't change the used ruby
<apeiros> this is entirely your version manager in combination with any metainformation it uses to determine which ruby to use (such as a .ruby-version file f.ex.)
<apeiros> I'm not using rbenv, so I can't tell. but yes, I'd expect `ruby --version` in the same directory to be the ruby which is also used for commands like bundler.
<alaing> rbenv versions shows ruby 2.3.1 is being used because my project has a .ruby-version file that says 2.3.1
<apeiros> but as said, not using rbenv. if it uses shims, then the used ruby depends on the executable, not the directory.
<apeiros> try `which bundler`
<alaing> /usr/local/bin/bundler
<apeiros> maybe you're pulling in some a bundler executable which is "tied" to a ruby
<apeiros> is /usr/local/bin where rbenv puts executables?
<alaing> ah i see where you going with this
<alaing> I dont think it is
<alaing> thank you I'll dig around a bit more
xall_ has joined #ruby
ta__ has joined #ruby
xall has quit [Ping timeout: 265 seconds]
<apeiros> yw, good luck
alaing has quit [Ping timeout: 244 seconds]
davix has joined #ruby
djbkd_ has quit [Remote host closed the connection]
govg has joined #ruby
shmuli has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shmuli has quit [Remote host closed the connection]
shmuli has joined #ruby
Toledo is now known as croberts
davix has quit [Ping timeout: 244 seconds]
mark_66 has joined #ruby
claudiuinberlin has joined #ruby
davix has joined #ruby
shmuli has quit [Remote host closed the connection]
dionysus69 has joined #ruby
abernstein has quit [Quit: abernstein]
joneshf-laptop has quit [Quit: Leaving]
aufi has joined #ruby
jottr has joined #ruby
Silthias has joined #ruby
jottr has quit [Ping timeout: 252 seconds]
jaruga___ has joined #ruby
pokalyis has joined #ruby
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
mikecmpbll has joined #ruby
flying has joined #ruby
mikecmpbll has quit [Client Quit]
Jackneill_ has joined #ruby
Pumukel has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
muelleme has joined #ruby
roamingdog has quit []
govg has quit [Ping timeout: 250 seconds]
Pumukel has quit [Ping timeout: 250 seconds]
muelleme has quit [Ping timeout: 244 seconds]
antgel has joined #ruby
CloCkWeRX has quit [Ping timeout: 268 seconds]
j416 has quit [Ping timeout: 260 seconds]
the_drow has joined #ruby
ur5us has joined #ruby
Cohedrin has joined #ruby
roamingdog has joined #ruby
roamingdog has quit [Client Quit]
sonikspin has quit [Ping timeout: 252 seconds]
CloCkWeRX has joined #ruby
mikecmpbll has joined #ruby
govg has joined #ruby
palms has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mooru has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jsrn_ has joined #ruby
igniting has joined #ruby
palms has quit [Ping timeout: 260 seconds]
creat has quit [Ping timeout: 244 seconds]
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
LoneHermit has joined #ruby
renderful has joined #ruby
<dminuoso_> apeiros: I want inline assembly! :D
ace05 has quit [Remote host closed the connection]
<apeiros> dminuoso_: look for zenspider's inline stuff
ace05 has joined #ruby
<dminuoso_> :o
<apeiros> I think he did that. even if only as a joke. wilson or somesuch iirc
<dminuoso_> apeiros: That's inlined C code.
<dminuoso_> I would like inlined Ruby bytecode.
<apeiros> yes, afaik he also did inline asm with the same.
<xpt> but C allows inline asm
<xpt> so you can inline C with inline asm, right?
<apeiros> there. inline asm.
<apeiros> with a nice dsl.
wopsbp has joined #ruby
<apeiros> xpt: lol. inception!
<wopsbp> what is best udemy tut for ruby
<dminuoso_> 10:13 < dminuoso_> I would like inlined Ruby bytecode.
<dminuoso_> Not x86 assembly
<dminuoso_> Though that is still hilarious.
<apeiros> dminuoso_: aha
<apeiros> 10:12 dminuoso_: apeiros: I want inline assembly! :D
<apeiros> only saw this. sorry.
<dminuoso_> apeiros: fair enough, should have been more clear on the subject.
<apeiros> dminuoso_: go for it, build a gem! :D
bkxd has joined #ruby
<dminuoso_> I guess so.
LoneHermit has quit [Ping timeout: 268 seconds]
TomyWork has joined #ruby
hutch34 has joined #ruby
renderful has quit [Ping timeout: 260 seconds]
addisaden has joined #ruby
nankyokusei has joined #ruby
vali has joined #ruby
ziarkaen has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
miqlas-H has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
hutch34 has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
marr has joined #ruby
unclouded has joined #ruby
igniting has quit [Ping timeout: 260 seconds]
unclouded has left #ruby [#ruby]
sepp2k has joined #ruby
Chair has joined #ruby
xall has joined #ruby
ace05 has quit [Read error: Connection reset by peer]
jaguarmagenta has quit [Remote host closed the connection]
ace05 has joined #ruby
xall_ has quit [Ping timeout: 244 seconds]
benlieb has quit [Quit: benlieb]
User458764 has joined #ruby
Pumukel has joined #ruby
dionysus69 has quit [Ping timeout: 250 seconds]
elenatanasoiu has joined #ruby
kareeoleez has joined #ruby
igniting has joined #ruby
Pumukel has quit [Ping timeout: 250 seconds]
ag4ve_ has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
hahuang61 has joined #ruby
hightower3 has joined #ruby
User458764 has joined #ruby
creat has joined #ruby
hightower2 has quit [Ping timeout: 250 seconds]
j416 has joined #ruby
hahuang61 has quit [Ping timeout: 268 seconds]
Beams has joined #ruby
jeyraof has quit [Ping timeout: 252 seconds]
j416 has quit [Ping timeout: 244 seconds]
XV8 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aidalgol has quit [Quit: zZzZzZzZzzzzz]
j416 has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
astrobunny has quit [Read error: Connection reset by peer]
araujo has joined #ruby
workmad3 has joined #ruby
User458764 has joined #ruby
quazimodo has joined #ruby
Vile` has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
ziarkaen_ has joined #ruby
mluts has joined #ruby
LoneHerm_ has joined #ruby
anisha has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
anisha has quit [Client Quit]
rodfersou has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ur5us has quit [Remote host closed the connection]
ziarkaen has quit [Ping timeout: 245 seconds]
xall_ has joined #ruby
pokalyis has quit [Read error: Connection reset by peer]
pokalyis has joined #ruby
xall has quit [Ping timeout: 256 seconds]
LoneHerm_ has quit [Ping timeout: 244 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
jottr has joined #ruby
miqlas-H has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ldnunes has joined #ruby
mvxlr has joined #ruby
Beams has quit [Quit: .]
mooru has quit [Quit: Textual IRC Client: www.textualapp.com]
gingray has joined #ruby
CloCkWeRX has quit [Ping timeout: 244 seconds]
Beams has joined #ruby
Pumukel has joined #ruby
Pumukel has quit [Ping timeout: 250 seconds]
igniting has quit [Ping timeout: 268 seconds]
Jameser has quit [Ping timeout: 250 seconds]
rodfersou is now known as rodfersou|afk
jottr has quit [Ping timeout: 244 seconds]
CloCkWeRX has joined #ruby
biberu has joined #ruby
sparch has joined #ruby
koooge has quit [Quit: Leaving...]
igniting has joined #ruby
skweek has quit [Ping timeout: 260 seconds]
JeanCarloMachado has joined #ruby
GodFather has joined #ruby
igniting has quit [Ping timeout: 245 seconds]
workmad3_ has joined #ruby
bruce_lee has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bkxd has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
frozengeek has joined #ruby
hanmac has quit [Remote host closed the connection]
xall has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
xall_ has quit [Ping timeout: 268 seconds]
workmad3 has joined #ruby
hanmac has joined #ruby
c355e3b has joined #ruby
igniting has joined #ruby
workmad3_ has quit [Ping timeout: 260 seconds]
Technodrome has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
LoneHermit has joined #ruby
anisha has joined #ruby
Tempesta_ is now known as Tempesta
Tempesta has quit [Changing host]
Tempesta has joined #ruby
LoneHermit has quit [Ping timeout: 260 seconds]
hutch34 has joined #ruby
kareeoleez has quit []
antgel has quit [Ping timeout: 260 seconds]
hutch34 has quit [Ping timeout: 244 seconds]
jaguarmagenta has joined #ruby
bkxd has joined #ruby
pokalyis has quit [Read error: Connection reset by peer]
anisha has quit [Quit: This computer has gone to sleep]
pokalyis has joined #ruby
xall_ has joined #ruby
marr has quit [Ping timeout: 250 seconds]
jaguarmagenta has quit [Ping timeout: 268 seconds]
xall has quit [Ping timeout: 265 seconds]
marr has joined #ruby
Jameser has joined #ruby
Beams has quit [Quit: .]
hammed has joined #ruby
<hammed> anyone here has root
xall_ has quit [Ping timeout: 250 seconds]
haxrbyte has joined #ruby
<dminuoso_> hammed: No.
<dminuoso_> Im confident that someone here does not.
<toretore> i have a root
<Burgestrand> i am root
jeyraof has joined #ruby
govg has quit [Ping timeout: 250 seconds]
wopsbp has quit [Ping timeout: 244 seconds]
Beams has joined #ruby
Pumukel has joined #ruby
<hammed> anyone here help me with ubuntu root
<dminuoso_> toretore: Just one?
<dminuoso_> What do you do with it?
<Burgestrand> i'm also just one root
<Burgestrand> there are many like it
<dminuoso_> hammed: Please do not private message me.
<Burgestrand> hammed your question is very confusing, what are you after?
<hammed> i need root to get many roots
nekcode has joined #ruby
kaffepanna has joined #ruby
<Burgestrand> i don't have any caps today, it's like casual monday
<toretore> hammed: stop messaging people like that
<hammed> o
<hammed> ok
<hammed> i need root to get more of roots
<toretore> do you have a ruby related question?
User458764 has joined #ruby
<hammed> i know about ruby
<hammed> to add for user and pass
Pumukel has quit [Ping timeout: 250 seconds]
pandaant has joined #ruby
<Burgestrand> i'm afraid I don't understand what you're trying to do, or where you're trying to do it :(
<hammed> why some ruby dont add
<Burgestrand> crap, I capsed
<hammed> lol
acamargo has joined #ruby
rodfersou|afk is now known as rodfersou
jcao219 has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
igniting has quit [Ping timeout: 265 seconds]
hahuang61 has joined #ruby
hahuang61 has quit [Ping timeout: 260 seconds]
faces has joined #ruby
anisha has joined #ruby
nekcode has quit [Quit: nekcode]
hammed has quit [Excess Flood]
hammed has joined #ruby
john has joined #ruby
john has quit [Client Quit]
aphprentice has quit [Ping timeout: 250 seconds]
johnmilton has joined #ruby
lenwood has joined #ruby
synthroid has joined #ruby
Heero has quit [Ping timeout: 250 seconds]
aphprentice has joined #ruby
Heero has joined #ruby
aphprentice has quit [Client Quit]
skweek has joined #ruby
antgel has joined #ruby
millerti has joined #ruby
millerti has quit [Max SendQ exceeded]
Snowy has joined #ruby
Snowy has quit [Client Quit]
quazimodo has quit [Ping timeout: 256 seconds]
lenwood has quit [Ping timeout: 265 seconds]
nankyokusei has quit [Remote host closed the connection]
Ropeney has joined #ruby
hutch34 has joined #ruby
XV8 has joined #ruby
gingray has quit [Ping timeout: 260 seconds]
haxrbyte has quit [Quit: Leaving...]
<sparch> lula preso amanhã
<dminuoso_> mv a a/b #=> "Invalid argument"
<dminuoso_> Love these kinds of diagnostics.
<dminuoso_> "You fucked up but Im not gonna tell you how"
jottr has joined #ruby
<apeiros> yeah. tons of software have crap error messages. it's so sad. you'd think devs know the value of good error messages. but nooooo…
<apeiros> "fuck you for having an issue"
tessi_zz has quit [Remote host closed the connection]
<dminuoso_> apeiros: Honestly Ruby is not better. The fact that it emits raw flex token names on syntax errors can be super annoying to the inexperienced.
<dminuoso_> This is actually something I could relatively easily fix and perhaps even submit...
<apeiros> dminuoso_: I know :-/
tvw has joined #ruby
<apeiros> it has gotten better in some areas. but in many it's still bad.
<dminuoso_> I mean I know what a "tEND" is and why it's different from "end" - but ...
<apeiros> and I understand it where additional diagnostics are costly. but there's plenty of places where it isn't. and where it is, having them enabled optionally would be nice.
<dminuoso_> apeiros: Ruby has the luxury of a very simple grammar - making most diagnostics trivial to implement - unlike C++
<dminuoso_> Though the "void argument detected" is one of the shittiest.
<dminuoso_> In fact I feel like Ruby could simply ignore it.
<dminuoso_> Who cares if there's dead AST nodes.
<dminuoso_> "return nil; puts foo;" - Ruby should choke on this too or not at all.
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pokalyis has quit [Quit: Textual IRC Client: www.textualapp.com]
<toretore> what category of error should that be?
ziarkaen_ has quit [Read error: No route to host]
<dminuoso_> toretore: Either the same silly "void statement" kind of error, or none.
gnufied has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
<dminuoso_> return nil; puts foo should be no different from "return nil && puts foo"
<dminuoso_> But to Ruby it is massively different.
<blackbombay_> apeiros, dminuoso_ you guys use fuck more than drunk ppl at a bar ;)
<hanmac> i love soch error messages, telling you there is no error with a red icon XD ... with the buttons [abort] and [cancel] ;P
Pumukel has joined #ruby
<dminuoso_> >> return && puts
<ruby[bot]> dminuoso_: # => /tmp/execpad-775a38b32409/source-775a38b32409:2: void value expression (https://eval.in/669405)
<apeiros> blackbombay_: what shall I say? it's a great word.
mvxlr has joined #ruby
<apeiros> it's the most versatile english word in existence.
<blackbombay_> it doesn't bother me, but some ppl might find it offensive.
bkxd has joined #ruby
aupadhye has quit [Quit: Leaving]
<apeiros> blackbombay_: is this an innuendo to an argument about which kinds of offenses are acceptable and which aren't?
<blackbombay_> no, not an argument.
Pumukel has quit [Ping timeout: 260 seconds]
<apeiros> but an innuendo? :D
senayar has joined #ruby
<dminuoso_> blackbombay_: There is very little point to say things in a roundabout way in the internet. Expressive language makes it much clearer.
<apeiros> dminuoso_, blackbombay_: if we want to have that discussion - sure. but please over in either #ruby-offtopic or #ruby-community
<apeiros> (depending on whether it shall be discussing it for fun or for channel politics)
<dminuoso_> I don't give a fuck. :-P
* dminuoso_ goes back to productive things
claudiuinberlin has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
tessi_zz has joined #ruby
nankyokusei has joined #ruby
claudiuinberlin has quit [Ping timeout: 260 seconds]
nekcode has joined #ruby
ace05 has quit [Ping timeout: 256 seconds]
mluts has quit [Ping timeout: 250 seconds]
igniting has joined #ruby
ace05 has joined #ruby
workmad3_ has joined #ruby
vali has quit [Ping timeout: 245 seconds]
bkxd has quit [Quit: Lost terminal]
jcao219 has quit [Ping timeout: 260 seconds]
workmad3 has quit [Ping timeout: 250 seconds]
elomatreb has quit [Quit: mep mep]
nankyoku_ has joined #ruby
elomatreb has joined #ruby
Guest8256 is now known as kyle__
nankyokusei has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
workmad3_ has quit [Ping timeout: 256 seconds]
nopolitica has quit [Ping timeout: 260 seconds]
centrx has joined #ruby
tyang has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
mostlybadfly has quit [Quit: Connection closed for inactivity]
<rfoust_> Hi, not sure if this is the place to ask, but when I do a 'gem install mysql2' then I get an error that it doesn't know how to set rpath on my system. I'm on a mac.
<rfoust_> the more specific error is "Don't know how to set rpath on your system, if MySQL libraries are not in path mysql2 may not load"
renderful has joined #ruby
drogo has left #ruby [#ruby]
<dminuoso_> rfoust_: Please gist the *entire* output until the end, starting from "Fetching: mysql2.... yadayadayada"
ramortegui has joined #ruby
Asher has quit [Quit: Leaving.]
oyes has joined #ruby
Asher has joined #ruby
User458764 has joined #ruby
<dminuoso_> This is the real error you are getting. Use homebrew to install openssl
renderful has quit [Ping timeout: 244 seconds]
<rfoust_> brew says openssl is already installed
quazimodo has joined #ruby
<dminuoso_> rfoust_: you need to tell bundle how to find that new custom ssl library
<dminuoso_> rfoust_: bundle config --local build.mysql2 "--with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include"
<dminuoso_> You can thank Apple for deprecating OpenSSL and providing its own TLS library.
anisha has quit [Quit: This computer has gone to sleep]
skweek has quit [Ping timeout: 245 seconds]
kobain has joined #ruby
centrx has quit []
ben__ has joined #ruby
Littlemyu has joined #ruby
Littlemyu is now known as ryovaa
JoshS has quit [Ping timeout: 268 seconds]
jphase has joined #ruby
Vingador has joined #ruby
skweek has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
pokalyis has joined #ruby
h1fuelcell has joined #ruby
ben__ has quit [Remote host closed the connection]
bmurt has joined #ruby
Ropeney has quit [Remote host closed the connection]
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aegis3121 has joined #ruby
mluts has joined #ruby
malconis has joined #ruby
<rfoust_> dminuoso_: the bundle config command worked. should that make the gem install work? It still fails.
h1fuelcell has quit [Ping timeout: 244 seconds]
matp_ is now known as matp
ben__ has joined #ruby
nankyoku_ has quit [Remote host closed the connection]
nankyokusei has joined #ruby
Pumukel has joined #ruby
malconis has quit [Ping timeout: 252 seconds]
malconis has joined #ruby
jottr has joined #ruby
DLSteve has joined #ruby
cdg has joined #ruby
DLSteve has quit [Read error: Connection reset by peer]
Pumukel has quit [Ping timeout: 250 seconds]
DLSteve has joined #ruby
DLSteve has quit [Read error: Connection reset by peer]
hahuang61 has joined #ruby
<rfoust_> I verified those openssl paths exist on my system
<hanmac> rfoust_: does the error change? does it show some different output?
h1fuelcell has joined #ruby
<rfoust_> hanmac: looks like the same error
DLSteve has joined #ruby
lxsameer has quit [Quit: WeeChat 1.5]
h1fuelcell has quit [Read error: Connection reset by peer]
h1fuelce_ has joined #ruby
hahuang61 has quit [Ping timeout: 244 seconds]
dionysus69 has joined #ruby
DLSteve has quit [Client Quit]
DLSteve has joined #ruby
User458764 has joined #ruby
h1fuelce_ has quit [Ping timeout: 260 seconds]
jhack has joined #ruby
jottr has quit [Quit: WeeChat 1.5]
mostlybadfly has joined #ruby
rodfersou is now known as rodfersou|lunch
jaguarmagenta has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
nopolitica has joined #ruby
Beams has quit [Quit: .]
yardenbar has quit [Ping timeout: 252 seconds]
Guest57477 has joined #ruby
Beams has joined #ruby
claudiuinberlin has joined #ruby
<dminuoso_> Next one:
<dminuoso_> "invalid_grant: The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client."
<dminuoso_> #=> Now which one is it? ...........
harai has quit [Ping timeout: 260 seconds]
jhack has quit [Quit: jhack]
jhack has joined #ruby
jbeeze has joined #ruby
Guest66 has joined #ruby
ag4ve_ has quit [Ping timeout: 260 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
Guest66 has quit [Client Quit]
shinnya has joined #ruby
lipoqil has quit [Ping timeout: 250 seconds]
deimos has quit [Ping timeout: 250 seconds]
deimos has joined #ruby
chrisseaton has quit [Ping timeout: 250 seconds]
<toretore> dminuoso: probably not the case here, but sometimes it's good to be vague about exactly what went wrong with authentication/authorization
avdi has quit [Read error: Connection reset by peer]
zipkid has quit [Ping timeout: 250 seconds]
<dminuoso_> toretore: How can it be good to be vague?
avdi has joined #ruby
lipoqil has joined #ruby
chrisseaton has joined #ruby
pandaant has quit [Quit: Lost terminal]
lenwood has joined #ruby
pgib has quit [Quit: 00 PC LOAD LETTER]
zipkid has joined #ruby
rob_ has joined #ruby
<toretore> dminuoso: imagine someone trying to guess username/password combos, if you tell them "the username is right, but the password is wrong" you make it easier for them
Guest57477 has quit [Ping timeout: 252 seconds]
<dminuoso_> toretore: That has absolutely nothing to do with ruby exception messages.
<toretore> a little contrived, i know, but stuff like that
<dminuoso_> Exceptions are not meant to show the user what the problem was.
chouhoul_ has quit [Remote host closed the connection]
<dminuoso_> They are meant to tell the developer what the problem was.
jaguarmagenta has quit [Remote host closed the connection]
<dminuoso_> Being forced to byebug and loghell my way through OAuth is not what I consider a fun day at work.
Guest57477 has joined #ruby
whiteline has quit [Read error: Connection reset by peer]
jaguarmagenta has joined #ruby
whiteline has joined #ruby
<toretore> well, the question is, with the api it's using, is it able to be more specific? it seems like it's just forwarding the error from the server
<dminuoso_> toretore: It is the error message from doorkeeper yes. Diagnostics wise its extremely shitty.
<dminuoso_> If things go wrong, you are left with some pretty bizarre error messages.
jaguarmagenta has quit [Remote host closed the connection]
User458764 has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
CloCkWeRX has quit [Ping timeout: 245 seconds]
vondruch has left #ruby [#ruby]
Derperperd has joined #ruby
nekcode has quit [Quit: nekcode]
vondruch has joined #ruby
<dminuoso_> toretore: So I figured it out - I never set up a resource_owner_from_credentials block to tell Doorkeeper how to implement the Resource Owner Credential Flow - which caused it to default to a 401 unauthorized, adding the error message from top
<dminuoso_> Disgusting useless stuff.
oniifiv has quit [Quit: Who turned this off?! D:<]
Derperperd has quit [Client Quit]
Silthias1 has joined #ruby
nanoz has joined #ruby
Silthias has quit [Ping timeout: 260 seconds]
howdoi has joined #ruby
Pumukel has joined #ruby
<rfoust_> finally got it working... had to install the xcode command line tools. "xcode-select --install"
<rfoust_> no idea why. :)
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
nekcode has joined #ruby
symm- has joined #ruby
Pumukel has quit [Ping timeout: 250 seconds]
DroidBurgundy has joined #ruby
<dminuoso_> I have a spec that needs to decode a JWT and then run some expectations on the decoded token. Is there a way to have expect {}.not_to raise_error assign a value inside the block and then reuse it for the next expectation?
tercenya has quit [Remote host closed the connection]
tercenya has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
polishdub has joined #ruby
BackEndCoder has quit [Ping timeout: 260 seconds]
rippa has joined #ruby
kingkong- has quit [Remote host closed the connection]
ule has quit [Quit: leaving]
jhack has quit [Quit: jhack]
ule has joined #ruby
BackEndCoder has joined #ruby
abernstein has joined #ruby
kingkong- has joined #ruby
jhack has joined #ruby
vali has joined #ruby
kspencer has quit [Quit: switching over to znc]
Guest68326 has joined #ruby
Guest68326 is now known as kspencer
kspencer has joined #ruby
kspencer has quit [Changing host]
dviola has joined #ruby
<ljarvis> dminuoso_: why would you want that? just assign it without the block/expect?
<ljarvis> i never understood not_to raise_error
<dminuoso_> ljarvis: JWT.decode will raise exceptions when the JWT is invalid, expired and what not.
<ljarvis> it's kinda implied by just writing code
<ljarvis> right, but you're asserting that it doesnt raise an error
<dminuoso_> mmm
thisirs has joined #ruby
jrafanie has joined #ruby
<ljarvis> dunno, it's personal opinion but the stuff that asserts nothing was raised is pointless to me. All it really does it catch exceptions and then print them in a more friendly mannor, doesn't help the test suite at all imo
<ljarvis> manner*
bluOxigen has quit [Ping timeout: 268 seconds]
araujo has quit [Ping timeout: 250 seconds]
bluOxigen has joined #ruby
wugy has quit []
<Burgestrand> imo it does help if that's the only statement, having a single expression and no assertions in a test is kind of strange
araujo has joined #ruby
meshsmith has joined #ruby
rodfersou|lunch is now known as rodfersou
shinnya has quit [Ping timeout: 252 seconds]
benlieb has joined #ruby
<Burgestrand> it could just as easily be a comment too though, if that's what one prefers
grh has quit [Ping timeout: 256 seconds]
ChiefAlexander has joined #ruby
<ljarvis> i guess if it was a single expression i'd agree, but in which case the spec description should be explicit
<ljarvis> it "successfully does X" or it "does not raise an error when doing Y"
<ljarvis> no need for superfluous code or comments
chouhoulis has joined #ruby
ta__ has quit [Remote host closed the connection]
benlieb has quit [Client Quit]
rkazak has joined #ruby
<dminuoso_> ljarvis: Well Im just trying to be explicit about what the test actually covers.
dionysus69 has joined #ruby
<ljarvis> fair enough
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
dviola has quit [Quit: WeeChat 1.6]
dviola has joined #ruby
h1fuelcell has joined #ruby
mark_66 has quit [Remote host closed the connection]
workmad3 has quit [Read error: Connection reset by peer]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
en0x has quit [Changing host]
en0x has joined #ruby
jrafanie has joined #ruby
pawnbox has joined #ruby
workmad3 has joined #ruby
ben__ has quit [Remote host closed the connection]
ziarkaen has joined #ruby
ben__ has joined #ruby
Xentil has joined #ruby
h1fuelcell has quit []
dminuoso_ has quit [Ping timeout: 250 seconds]
aufi has quit [Ping timeout: 252 seconds]
zeroDi has joined #ruby
abernstein has quit [Ping timeout: 265 seconds]
Frankenstein has quit [Changing host]
Frankenstein has joined #ruby
Guest96381 is now known as alamar
Pumukel has joined #ruby
workmad3 has quit [Read error: Connection reset by peer]
tdy has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby
GodFather has quit [Ping timeout: 260 seconds]
aegis3121 has quit [Ping timeout: 256 seconds]
Pumukel has quit [Ping timeout: 250 seconds]
rodfersou is now known as rodfersou|afk
aegis3121 has joined #ruby
tdy has joined #ruby
nettoweb has joined #ruby
nankyokusei has quit [Remote host closed the connection]
hahuang61 has joined #ruby
railssmith has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Devalo has joined #ruby
Dohplay has joined #ruby
cpruitt has joined #ruby
GodFather has joined #ruby
hahuang61 has quit [Ping timeout: 252 seconds]
Devalo has quit [Ping timeout: 260 seconds]
marxarelli has joined #ruby
amclain has joined #ruby
jrafanie has joined #ruby
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
jrafanie has quit [Client Quit]
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
jphase has quit [Remote host closed the connection]
xall_ has joined #ruby
mhib has joined #ruby
aganov has quit [Remote host closed the connection]
eljimmy has joined #ruby
Guest66 has joined #ruby
aegis3121 has quit [Ping timeout: 252 seconds]
blackbombay has joined #ruby
Dohplay has quit [Read error: Connection reset by peer]
Guest66 has quit [Client Quit]
P1ro has quit [Remote host closed the connection]
blackbombay_ has quit [Ping timeout: 268 seconds]
SesMan has quit [Quit: Textual IRC Client: www.textualapp.com]
anisha has joined #ruby
gingray has joined #ruby
dviola has quit [Quit: WeeChat 1.6]
LeBlaaanc has joined #ruby
wrkrcoop has joined #ruby
igniting has quit [Ping timeout: 245 seconds]
<wrkrcoop> what is the difference between a mixin and a library?
<ljarvis> wrkrcoop: a mixin is a module, a library is a Ruby Gem
<wrkrcoop> ljarvis: but gems can be modules correct?
<baweaver> which is normally contained in a module
<ljarvis> wrkrcoop: gems can contain modules
<ljarvis> they don't *have* to though
railssmith has quit [Ping timeout: 260 seconds]
<ljarvis> a gem is just a collection of ruby code
<wrkrcoop> ljarvis: i see
<wrkrcoop> why not just call mixins modules?
flying has quit []
nekcode has left #ruby [#ruby]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nekcode has joined #ruby
dviola has joined #ruby
nekcode has quit [Client Quit]
Jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Jameser has joined #ruby
lenwood has quit [Ping timeout: 244 seconds]
LeBlaaanc has quit [Client Quit]
millerti has joined #ruby
jhack has quit [Quit: jhack]
<ljarvis> well they don't mean exactly the same thing
<wrkrcoop> whats the dif
<ljarvis> people refer to modules as mixins when they're designed to be included into a class
<ljarvis> but that's not the only use for a module as I'm sure you're aware
<millerti> I've got a Ruby program that's just too slow. It should be I/O bound, but it's CPU bound. The inner-most code takes a string of 16 hex digits and replaces "FF" with "F", "00" with "0" and anything else with "X" and then it counts up those patterns in a hash. Is there a faster way to do that string computation than slice!(0..1) and some if/else statements?
<ljarvis> millerti: str.squeeze("F0") might be faster, but obviously it's not exactly the same, since it'll replace "FFFF" with "F"
<ljarvis> so if that matters, perhaps use String#tr
nankyokusei has joined #ruby
<ljarvis> either way, you don't need conditions
<baweaver> showing the actual code helps divine more though.
<baweaver> !gist.
<ljarvis> ^ truth
<baweaver> !gist
<ljarvis> ?gist
<ruby[bot]> https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<baweaver> so many bot conventions I lose track
edwinvdgraaf has quit [Remote host closed the connection]
govg has joined #ruby
SeepingN has joined #ruby
<ljarvis> wrkrcoop: make sense?
edwinvdgraaf has joined #ruby
<millerti> ljarvis: byte=num.slice!(0..1); if (byte=="FF") pattern<<"F" elseif (byte=="00") pattern<<"0" else pattern<<"X" end
<wrkrcoop> sorry let me read that
<wrkrcoop> thanks ljarvis. i appreciate it
<millerti> ljarvis: I'm not sure how tr will do that...
<ljarvis> millerti: can you gist the full code?
igniting has joined #ruby
nanoz has quit [Quit: <3]
mluts has quit [Remote host closed the connection]
nikivi has joined #ruby
edwinvdgraaf has quit [Ping timeout: 256 seconds]
[ddmp] has quit [Read error: Connection reset by peer]
ben______ has joined #ruby
ryovaa has quit [Ping timeout: 265 seconds]
[ddmp] has joined #ruby
jaguarmagenta has joined #ruby
ben__ has quit [Ping timeout: 260 seconds]
roflmyeggo has joined #ruby
zukin has joined #ruby
gusrub has joined #ruby
ngrin has joined #ruby
tomphp has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
Guest57477 has quit [Ping timeout: 256 seconds]
skweek has quit [Ping timeout: 245 seconds]
vuoto has joined #ruby
jaguarmagenta has quit [Ping timeout: 265 seconds]
frankiee_ has joined #ruby
<roflmyeggo> it seems odd to me that ruby uses `def self.method` for class methods, yet instance methods just use the `def method`
senayar has quit []
<roflmyeggo> when its calling an instance method, wouldnt the underlying call be: `Class.method(instance)`
<al2o3-cr> Anyone no of a gem to determine image types
meshsmith has quit [Remote host closed the connection]
shmuli has joined #ruby
TomyWork has quit [Ping timeout: 256 seconds]
gizless has joined #ruby
gizmore has quit [Ping timeout: 244 seconds]
xall_ has quit [Ping timeout: 252 seconds]
zukin has quit [Ping timeout: 265 seconds]
Pumukel has joined #ruby
frankiee_ has quit [Quit: leaving]
Devalo has joined #ruby
grh has joined #ruby
<al2o3-cr> magic, thanks havenwood
benlieb has joined #ruby
whathappens has joined #ruby
vuoto has quit [Quit: Lost terminal]
Pumukel has quit [Ping timeout: 250 seconds]
quazimodo has quit [Ping timeout: 260 seconds]
wrkrcoop has quit [Quit: wrkrcoop]
whathappens has quit [Read error: Connection reset by peer]
jcao219 has joined #ruby
whathappens has joined #ruby
ta_ has quit [Remote host closed the connection]
elifoster has joined #ruby
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
frozengeek has quit [Quit: frozengeek]
User458764 has joined #ruby
User458764 has quit [Max SendQ exceeded]
<jokke> hey
pizzatonnocipoll has joined #ruby
<jokke> is it possible to somehow iterate over bundled gems?
User458764 has joined #ruby
User458764 has quit [Max SendQ exceeded]
<alexandernst> what is the difference between including something at the top of the file and including that same thing inside a class (in the same file) ?
xall has joined #ruby
wrkrcoop has joined #ruby
User458764 has joined #ruby
<jokke> i want to write a rake task which pushes the gem and all depencies that aren't available from rubygems to a remote server
<ljarvis> alexandernst: depends what it is, usually that's done so you don't need to define the class inside the file that's being required
<jokke> to find those dependencies i'd need to look at the dependencies and see if theyre fetched from a certain git server
the_drow has quit [Quit: This computer has gone to sleep]
<ljarvis> otherwise you need to write class Foo; class Bar. requiring it inside the class allows you to write class Foo::Bar because Foo is now defined
ngrin has quit [Quit: Leaving]
ngrin_ has joined #ruby
ngrin_ has quit [Remote host closed the connection]
<apeiros> alexandernst: beware, include and require are two different things. do you really mean include?
<ljarvis> right, I assumed require :)
ngrin has joined #ruby
<pizzatonnocipoll> is it true that ruby multi-threading doesn't take advantage of multiple cores?
<blackbombay> yes
<blackbombay> most of the time, that is true
<havenwood> pizzatonnocipoll: Not quite true as stated. Read this three-part article: http://www.jstorimer.com/blogs/workingwithcode/8085491-nobody-understands-the-gil
<apeiros> pizzatonnocipoll: no
<blackbombay> IO bound operations might run in parallel.
<apeiros> ruby, the language, doesn't prescribe anything in that regard
<jokke> pizzatonnocipoll: there are gems like Parallel for true multithreading
<jokke> except that spawns actual processes right?
<apeiros> MRI, one ruby interpreter, does not allow parallelism (which means multiple cores won't run ruby code at the same time)
<alexandernst> ljarvis: nothing too special. I have foo/bar.rb -> module Foo \n module Bar \n def say_moo ...and I use that as a filter for my methods in a controller (in rails)
<alexandernst> apeiros: yes, include
<jokke> yup, Parallel spawns processes
<havenwood> pizzatonnocipoll: CRuby has a GVL where some things might lock the VM but JRuby and Rubinius do not.
<apeiros> pizzatonnocipoll: jruby, another ruby interpreter, does allow parallelism
<blackbombay> apeiros: not totally true, to say it does not allow parallelism. there is fork, and IO bound operations.
<apeiros> blackbombay: correct. but the scope was threading.
<apeiros> blackbombay: also there's even with threads some parallelism happening. but (afaik) no ruby code ever.
<blackbombay> havenwood: rubinius is better forgotten about.
* apeiros afk, brb
<ljarvis> alexandernst: right, then you're including that module into the current module/class. If you add it to the top of the file you're including the module into the toplevel, which you probably dont want
benlieb has quit [Quit: benlieb]
<alexandernst> ljarvis: what exactly happens when I include it in the toplevel?
ngrin has quit [Client Quit]
ngrin has joined #ruby
igniting has quit [Ping timeout: 260 seconds]
jaruga___ has quit [Quit: jaruga___]
<havenwood> jokke: Are you using just RubyGems for your Gemfile or Bundler as well?
<jokke> havenwood: both
<jokke> havenwood: i specify all gems in gemspec
<jokke> and those that aren't on rubygems i add to the gemfile with git: '...'
<jokke> i just found Bundler.environment
sepp2k has quit [Quit: Leaving.]
<jokke> it's just a string, but better than nothing i guess
jsrn_ has quit [Quit: Leaving]
<jokke> oh
<jokke> no it's not
<jokke> ahh
<jokke> great
gusrub has quit [Remote host closed the connection]
<ljarvis> alexandernst: well the toplevel is call "main", and it's an instance of Object, when you include a module in main it'll be available as an instance method on Object (and thus available pretty much everywhere). There's a bit more to do, but in short, you shouldn't do it.
benlieb has joined #ruby
<blackbombay> millerti: what's the global for?
<blackbombay> you can just return a hash from that method instead.
<millerti> blackbombay: I'm counting occurrences of these patterns.
JoshS has joined #ruby
<millerti> blackbombay: Do you think the global is slowing things down
<millerti> ?
<blackbombay> you prob don't wanna use a global variable but i guess for a short script like that it doesn't matter.
AlexJakeGreen has quit [Remote host closed the connection]
<blackbombay> nope.
<blackbombay> it's just considered a bad practice, generally speaking.
pizzatonnocipoll has quit [Ping timeout: 260 seconds]
<blackbombay> i would rewrite to return a hash from that method instead, and initialize it there. if you need to increment it over multiple method calls & persist the hash, id accept it as a second arg.
igniting has joined #ruby
<alexandernst> ljarvis: hmm... so... the thing is that including that file in my toplevel I'm able to do say_moo() from anywhere
<blackbombay> but anyway for a short script it doesnt matter.
<millerti> blackbombay: I am calling that method many many times.
hahuang61 has joined #ruby
<alexandernst> but if I include that file inside my class, I can't call say_moo in any way
TomyLobo has joined #ruby
nitric has joined #ruby
benlieb has quit [Client Quit]
<ljarvis> alexandernst: you don't want to be able to call it *everywhere* though do you? that's pretty mental
<blackbombay> yeah, i would use a second argument, like def count_pattern(num, h={}).
chouhoul_ has joined #ruby
<alexandernst> ljarvis: yes, but I'd still like to call it from the file I'm including it
<alexandernst> ljarvis: I tried Foo::Bar.say_moo, but that's not working
jcao219 has quit [Ping timeout: 252 seconds]
<ljarvis> alexandernst: right, include will include those methods as instance methods
<ljarvis> alexandernst: try extend
jhack has joined #ruby
<ljarvis> alexandernst: then check the docs on include vs extend
<millerti> blackbombay: OK, but I'm not sure that's really the main bottleneck...
<havenwood> millerti: Does the pattern matching actually work like you want it to? Can more than two FFs or 00s be together or is it always two?
<blackbombay> millerti: no, it wouldn't be..
<ljarvis> the pattern matching thing makes no sense to me
<ljarvis> with the single assignment
<havenwood> me neither
<alexandernst> ljarvis: doesn't work either. The error I get is 'undefined method say_moo in Foo::Bar:Module'
<ljarvis> millerti perhaps you could add some examples of input => output?
<millerti> ljarvis: I'm trying to assess patterns of bytes in an L2 cache. When are bytes 0's, when are they FF's, and when are they something else?
<ljarvis> alexandernst: can you show me some code? :)
<alexandernst> (whenever I try to do Foo::Bar.say_moo)
<alexandernst> ljarvis: sure
Chair has quit [Ping timeout: 265 seconds]
<millerti> Ok, here's an example: FF300057FF00FF -> FX0XF0F
chouhou__ has joined #ruby
bmurt has joined #ruby
<millerti> Well, I miscounted, but you get the idea.
<ljarvis> ok, but that makes no sense for your example
<havenwood> >> 'FF300057FF00FF'.squeeze('F0').tr('^F0', 'X')
<ruby[bot]> havenwood: # => "FX0XXF0F" (https://eval.in/669500)
<millerti> "FFFF" needs to become "FF"
chouhoulis has quit [Ping timeout: 265 seconds]
<jokke> how do i run gem build foo.gemspec from ruby?
<alexandernst> ljarvis: http://pastebin.com/0kuT9Ck2 this is the code I try to include
<ruby[bot]> alexandernst: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/3ee119a656c001ab08bb0761cd38753e
<ruby[bot]> alexandernst: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
tomphp has quit [Ping timeout: 260 seconds]
<millerti> >> 'FFFF'.squeeze('F0').tr('^F0', 'X')
<ruby[bot]> millerti: # => "F" (https://eval.in/669501)
<ljarvis> jokke: `gem build foo.gemspec` :trollface:
<jokke> ljarvis: :D
muelleme has joined #ruby
aufi has joined #ruby
gusrub has joined #ruby
rcvalle has joined #ruby
<ljarvis> alexandernst: you'll need to show how you're using it + the error
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<blackbombay> jokke: Gem::Package.build i think
<alexandernst> ljarvis: how I use it: include Authz::Authorizable and then "Authz::Authorizable.authorize arg1 arg2" right on top of a def in a controller in my rails code
<jokke> blackbombay: uninitialized constant Gem::Package
<blackbombay> Gem::Package.build Gem::Specification.load('/path/to/gemspec')
<blackbombay> require 'gem/package' ?
<ljarvis> jokke: you'll need to require it
<jokke> ah
<blackbombay> erh
<blackbombay> rubygems/package
jcao219 has joined #ruby
chouhoul_ has quit [Ping timeout: 244 seconds]
<alexandernst> ljarvis: and the exact error: undefined method `authorize' for Authz::Authorizable:Module (NoMethodError)
<ljarvis> alexandernst: that's an instance method, you'll want `def self.authorize` or use `module_function` at the top of your module (which allows it to be both)
<havenwood> >> ['FF300057FF00FF', 'FFFF'].map { |s| s.tr('^F0', 'X').gsub(/F(F)/, '\1') } # millerti give more examples to see if it's what you want
<ruby[bot]> havenwood: # => ["FX000XXF00F", "FF"] (https://eval.in/669502)
<alexandernst> ljarvis: right. Let me check
<havenwood> millerti: I left the 00s for you
<millerti> Would it be faster if I made a hash that contains all patterns from "00" to "FF" as keys wtih 0, X, or F as the values?
<ljarvis> how fast do you want it?
<millerti> havenwood: I can generalize, but "FFFFFFFFFFFFFFFF" would need to turn into "FFFFFFFF"
<ljarvis> ^ lol
igniting has quit [Ping timeout: 250 seconds]
<millerti> I could have written this in C. :)
<ljarvis> why didn't you?
<ljarvis> if you want it super fast, you're pissing into the wind with Ruby
<millerti> ljarvis: I thought it wouldn't be this slow and would be mostly I/O bound.
<alexandernst> ljarvis: in works now :)
<ljarvis> alexandernst: super
<havenwood> >> "FFFFFFFFFFFFFFFF".tr('^F0', 'X').gsub(/F(F)/, '\1') # <- millerti is that not right?
<ruby[bot]> havenwood: # => "FFFFFFFF" (https://eval.in/669503)
benlieb has joined #ruby
<millerti> Part of the problem is that I needed to walk a directory hierarchy, and that was easier in Ruby.
<millerti> havenwood: I don't actually understand that code, so I'll take some time to parse it. But it looks cool, so thanks!
skweek has joined #ruby
<havenwood> millerti: You might want to take a look at the Find module as well: https://docs.ruby-lang.org/en/2.3.0/Find.html
jrafanie has joined #ruby
<jokke> hm
addisaden has quit [Quit: WeeChat 1.6]
<ljarvis> tr('^F0', 'X') = replace anything that's not F or 0 with X; gsub(/F(F)/, '\1') = replace all occurences of "FF" with "F" (the second F is being captured and used in the replacement in \1 -- you could also just write "F"
<jokke> ah
<ljarvis> )
Cohedrin has joined #ruby
<millerti> Ah, I was wondering what the \1 was for.
<ljarvis> it's kinda pointless here, but yeah it's for the capture
<millerti> Do I need to escape the \ or do the single quotes handle that?
<ljarvis> must be single quotes
<havenwood> millerti: I was thinking you might want to do both Fs and 0s at once, but left that to your exercise
<ljarvis> ah now it makes sense
<ljarvis> i always had faith
<millerti> havenwood: I could do them one after the other... would that be slower? Also, one thing that may not work right is if I get a number like "F0" which should be replaced by "X".
ramfjord has joined #ruby
<ljarvis> this problem is growing
<millerti> Another option....
<havenwood> millerti: Are all of these pairs or characters? Do a gist with the full problem laid out and lots of examples of correct conversions.
<havenwood> pairs *of characters
harfangk has joined #ruby
<millerti> I could read the string in and convert the hex number to an integer. Then I convert it to base 256, if there's some way to do that, then substitute. But I don't know what base 256 would come out like.
claudiuinberlin has quit []
<millerti> It's always in pairs. If a pair is FF, then I want F. It the pair is 00, I want 0. If it's anything else (even F0 or 30 or 0F or 0C or whatever), I want X.
<havenwood> base 256? :0
jcao219 has quit [Ping timeout: 245 seconds]
SCHAAP137 has joined #ruby
<millerti> havenwood: someinteger.to_s(256)
<millerti> >> 65534.to_s(256)
<havenwood> what are the 256 characters? i'm at a loss
<ruby[bot]> millerti: # => invalid radix 256 (ArgumentError) ...check link for more (https://eval.in/669504)
<millerti> Man, this student pacing outside my door is driving me crazy.
<millerti> havenwood: I was hoping. :)
<havenwood> >> 'FF300057FF00FF'.each_char.each_slice(2).map(&:join).map(&:hex)
<ruby[bot]> havenwood: # => [255, 48, 0, 87, 255, 0, 255] (https://eval.in/669505)
<havenwood> millerti: I think you should describe in detail what you're really trying to do in a Gist and paste us a link.
jshjsh has joined #ruby
_djbkd has joined #ruby
<millerti> havenwood: At what level? I mean, at a code level or semantically?
<elomatreb> Example input, example output is usually helpful
<millerti> For instance, I don't technically need to convert to a string. It could be an array.
<millerti> As the key for the hash I'm using to count patterns.
zeroDi has quit [Quit: WeeChat 1.5]
sepp2k has joined #ruby
<havenwood> millerti: Like I'm getting strings from X and I want to Y. Here are ten examples of initial input and the final result I'm looking for with each:
lenwood has joined #ruby
<millerti> Ok, doing it.
zeroDi has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JoshS has quit [Ping timeout: 260 seconds]
igniting has joined #ruby
Beams has quit [Quit: .]
<apeiros> millerti: case/when for small numbers is faster than if/else and hash lookup
mikecmpbll has quit [Ping timeout: 244 seconds]
i8igmac has quit [Read error: Connection reset by peer]
<apeiros> (and bytes being numbers from 0 to 255 are small numbers)
<millerti> apeiros: Ok, I was wondering about using case/when on this.
<apeiros> also I'd use .bytes and operate on the resulting integers. unless your input strings are huge.
<millerti> But first I'd have to do the conversion you describe that turns it into an array, which itself has overhead.
<millerti> apeiros: The strings are all 16 hex digits.
<apeiros> note: untested. this comes purely from my expectations as to what and how ruby behaves.
User458764 has joined #ruby
<apeiros> oh, right, you use slice(0..1) not 0,1…
<apeiros> slice 0,2 is faster than 0..1 btw. :-p
<millerti> huh.
<apeiros> there's probably a pack/unpack which fits this need.
<apeiros> 0..1 has to create an additional object (a range)
<millerti> Another alternative is to just start again in C. :)
<apeiros> sure.
<millerti> Even better...
<apeiros> or crystal.
<millerti> Do a popen of a C program in Ruby.
<apeiros> the task is certainly simple enough to do it in C and make it a native ext.
<millerti> Shove the strings into the C program and let it do all the counting and stuff.
<millerti> Better still, shove filenames into the C program, which is why I did it in Ruby in the first place.
<apeiros> meh. native exts are relatively simple. and then all you have to do is wrap the string. not pass it around through IOs
<millerti> I've done that before.
Mrgoose has quit [Ping timeout: 250 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> ah, yes. if you have to do it on a file basis.
railssmith has joined #ruby
muelleme has quit [Ping timeout: 256 seconds]
<millerti> I have yet another idea... have the Ruby program write out a file that contains the filenames, which is then read by the C program.
bmurt has joined #ruby
igniting has quit [Ping timeout: 250 seconds]
<apeiros> o0
grh has quit [Ping timeout: 260 seconds]
<millerti> Iterating directories in C is annoying.
<havenwood> >> %w[000000000180CC80 88740000008024A4 001F0FFFFFF91DE9].map { |s| s.each_char.each_slice(2).map { |a, b| a == b && %[F 0].include?(a) ? a : 'X' }.join }
ramfjord has quit [Ping timeout: 260 seconds]
<ruby[bot]> havenwood: # => ["0000XXXX", "XX000XXX", "0XXFFXXX"] (https://eval.in/669517)
<havenwood> requisite non-Regexp solution :-P
zukin has joined #ruby
<millerti> I have yet another idea... I could have done the whole thing in Java, where I get both speed and convenient file manipulation.
<millerti> lol
<havenwood> millerti: Or JRuby
<elomatreb> (Or literally any other language)
<apeiros> you can also try gsub
<millerti> havenwood: That's impressive!
<havenwood> that'd be fast
<apeiros> seeing how you actually map the pattern
Pumukel has joined #ruby
jphase has joined #ruby
Mrgoose has joined #ruby
<apeiros> >> "000000000180CC80 88740000008024A4 001F0FFFFFF91DE9".gsub(/\h\h/, Hash.new("X").merge({"FF" => "F", "00" => "0"}))
<ruby[bot]> apeiros: # => "0000XXXX XX000XXX 0XXFFXXX" (https://eval.in/669519)
<apeiros> millerti: ^
<millerti> apeiros: Wow.
<millerti> I just barely understand that.
<apeiros> if you bench those variants, please gist the benchmark and the results :)
pragmaticus has joined #ruby
renderfu_ has joined #ruby
<apeiros> and the example input, if it's large.
Pumukel has quit [Ping timeout: 250 seconds]
Cohedrin has joined #ruby
Jameser has quit [Read error: Connection reset by peer]
chouhou__ has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
railssmith has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
<eam> millerti: re: iterating directories in C -- are you aware of ftw(3)? It's pretty easy
<millerti> eam: Actually, I'm sure there's a simple way in C++... I should look it up.
<millerti> My excuse for not knowing this is that I'm a chip designer. :)
<eam> well there you go. ftw() takes a function pointer and will run it once per entity it passes
<apeiros> millerti: nice. what do you use ruby for?
skweek has quit [Ping timeout: 245 seconds]
<apeiros> (that dot after nice expresses excitement :D)
<eam> it's basically the ruby equiv of Find.find "dir" { |d| do_thing d}
<millerti> apeiros: All kinds of simple things. Lots of metaprogramming. Like, I have written Ruby code to generate C code or Verilog code.
<eam> I'm moderately surprised to see hardware folks using ruby and not python
<apeiros> fun. Find was one of the first things I learned about in ruby. But I don't think I've ever used it.
<millerti> eam: I only use Python for sympy. Otherwise, I don't like it.
igniting has joined #ruby
shmuli has quit [Remote host closed the connection]
<eam> lots of perl still alive in hardware orgs as well
tdy has quit [Ping timeout: 245 seconds]
<apeiros> why am I not surprised :D
jshjsh has quit [Ping timeout: 244 seconds]
d0nn1e has quit [Ping timeout: 260 seconds]
xall has quit [Ping timeout: 268 seconds]
railssmith has joined #ruby
d0nn1e has joined #ruby
benlieb has quit [Quit: benlieb]
Vingador has quit [Remote host closed the connection]
xall has joined #ruby
tyang_ has joined #ruby
ziarkaen has quit [Ping timeout: 252 seconds]
elifoster has quit [Quit: class]
Eiam has joined #ruby
mhib has quit [Quit: Leaving]
lenwood has quit [Ping timeout: 260 seconds]
benlieb has joined #ruby
tyang has quit [Ping timeout: 244 seconds]
shmuli has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
aufi has quit [Ping timeout: 265 seconds]
Technodrome has joined #ruby
railssmith has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bluOxigen has quit [Ping timeout: 245 seconds]
railssmith has joined #ruby
splud_ has joined #ruby
xall has quit [Ping timeout: 245 seconds]
warrshrike has joined #ruby
<warrshrike> hey guys
<warrshrike> how can I access a globalvariable in a thread?
<blackbombay> just like you normally would.
mikecmpbll has joined #ruby
<warrshrike> I mean like
<warrshrike> each thread has separate local variables right?
<blackbombay> generally speaking yes.
<apeiros> hell no
<warrshrike> my code is has a UDP socket which gets sensor values and stores them in an array. and a tcp socket that sends them to a mobile app
<apeiros> global variables are global. they are shared among all threads.
<apeiros> there are a limited number of predefined globals which are not actually globals and are indeed thread-local (and sometimes even frame-local)
<warrshrike> theyre running in separate threads so trouble is UDP socket updates itsown copy of the array which cant be accessed by TCP socket
JeanCarloMachado has quit [Ping timeout: 250 seconds]
<warrshrike> so a global variable is the answer?
<hanmac> millerti: you sound like what i do with my projects: using C-Marcos to generate functions to bind C++ method calls to Ruby functions
<warrshrike> here is the code
rodfersou|afk is now known as rodfersou
elenatanasoiu has quit [Ping timeout: 268 seconds]
<apeiros> if "a global" is the answer, then you're asking the wrong question.
<blackbombay> you usually want to avoid shared state as much as possible with threads, a global would be hacky.
<apeiros> globals are (almost) never the right answer.
GodFather has quit [Ping timeout: 260 seconds]
<warrshrike> hmm okay then you tell the right way. here is the few lines long code...
<blackbombay> if you meant, "globals become separate local variables", then that's not right, but you can have thread local variables and use sth like a queue for message passing, which is prob the most ideal way
jhack has quit [Quit: jhack]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<warrshrike> I need 'data' array to be updated in 't' thread so that the following tcp socket part can compute averages and send them
GinoManWorks has joined #ruby
<warrshrike> how do i do this message passing stuff
<apeiros> warrshrike: a class with an instance variable, use a Queue instead of an array.
<blackbombay> use a queue instead of an array?
bocaneri has quit [Read error: Connection reset by peer]
<apeiros> hm, the "use" didn't make the move to the front of that phrase.
<warrshrike> a normal queue will work?
<hanmac> hm there are some global variables which are "thread local" but thats because of their magic nature
<apeiros> warrshrike: Thread::Queue
<apeiros> it'll automatically schedule a thread when a value is pushed.
<apeiros> i.e. you can spin up multiple threads reading from the queue. they'll sleep until a value is added.
User458764 has joined #ruby
<warrshrike> okay so how can i calculate average of values in ruby queue then?
<warrshrike> or convert queue to array...
<warrshrike> will this work? [].tap { |array| array << queue.pop until queue.empty? }
<blackbombay> the 't' thread can push values onto the queue, and the main thread can then read from that queue, so you will have to write the code around that premise.
Dimik has joined #ruby
nankyokusei has quit [Remote host closed the connection]
amclain_ has joined #ruby
<blackbombay> in your infinite loop on the main thread: read a value, and push it onto an array.
[Butch] has joined #ruby
<apeiros> warrshrike: do you need to calculate the avg over multiple recvfroms, or over the data from a single read?
pawnbox has quit [Remote host closed the connection]
<apeiros> this seems to be a problem poorly suited for multiple threads
benlieb has quit [Quit: benlieb]
<apeiros> your code seems dysfunctional too, so it's hard to read what you actually intend to do.
amclain has quit [Ping timeout: 260 seconds]
<blackbombay> i think it is constantly reading from a socket, adding the values from it to an array, and then recalcuting the average at each tick of the infinite loop. that seems to be the idea...
izaac has quit [Ping timeout: 244 seconds]
<warrshrike> multiple...
<warrshrike> yes
VeryBewitching has joined #ruby
<warrshrike> exactly right bombay
nadir has joined #ruby
ramfjord has joined #ruby
<warrshrike> now im storing in queue instead of array. but how to get average from that?
<apeiros> you don't.
<apeiros> the queue is for delegating work to workers.
smlocal has joined #ruby
ta_ has joined #ruby
<warrshrike> but cant i pop everything and add and divide?
<apeiros> I mean, sure you can. but as said, seems poorly suited for threading.
<apeiros> you'd keep a sum variable, a count variable, and add to those when you deque a number
<blackbombay> you can transfer objects from the queue onto an array (which is local to the main thread), and recalculate the average that way.
<blackbombay> but why the empty? thing.. loop { q.pop } is the same no?
xall_ has joined #ruby
fpqc has joined #ruby
<fpqc> heya
nyuszika7h has quit [Killed (karatkievich.freenode.net (Nickname regained by services))]
<fpqc> I'm having a bit of trouble
<fpqc> I'm using pkg-config to compile something
<fpqc> on fedora
pawnbox has joined #ruby
matp has quit [Excess Flood]
<fpqc> and it is able to find _everything_ except ruby
Devalo has quit [Remote host closed the connection]
<apeiros> warrshrike: why do you use threads with that code?
<fpqc> -- checking for one of the modules 'ruby-2.3;ruby-2.2;ruby-2.1;ruby-2.0;ruby-1.9;ruby-1.8'
<warrshrike> hmm
<blackbombay> fpqc: you will probably get better answers in #fedora.
Devalo has joined #ruby
<fpqc> blackbombay, tried
<warrshrike> because how will two loops run concurrently otherwise?
<warrshrike> for two sockets
oyes has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<fpqc> the problem is probably that it can't find ruby.pc wherever
nyuszika7h has joined #ruby
<apeiros> warrshrike: doesn't seem like they'd need to run concurrently
<blackbombay> i have no idea. over 2-3 years since i used fedora. sorry.
antgel has quit [Ping timeout: 268 seconds]
<apeiros> warrshrike: you only ever write to the second socket once you've read data from the first socket.
<apeiros> warrshrike: you can do that easily in a single loop without any threads whatsoever.
harai has joined #ruby
ta_ has quit [Ping timeout: 265 seconds]
jeyraof has quit [Quit: This computer has gone to sleep]
<apeiros> while reading; text, sender = …; count += 1; sum += value(text); server.puts sum.fdiv(count); end
<warrshrike> no the thing is they're always running....
<warrshrike> like both run forever
<apeiros> so?
tomphp has joined #ruby
<warrshrike> I might be able to do something with timing and clocks
<warrshrike> this just seems cleaner separation of concerns
<apeiros> oh, you need that puts 35 each second?
guacamole has quit [Quit: leaving]
<apeiros> IO.select with timeout.
oyes has joined #ruby
Devalo has quit [Ping timeout: 250 seconds]
guacamole has joined #ruby
<apeiros> or put that in a separate thread. but don't forget to synchronize the write access on your socket.
<warrshrike> yes
<warrshrike> anyways
<apeiros> but for the read/calc avg/print avg part, I'd not use threads. doesn't help.
<warrshrike> I guess best way might be to convert to array after all
<warrshrike> yeah sure
<warrshrike> but queue is still needed right?
<warrshrike> so..
<apeiros> with single producer, single consumer - no.
<apeiros> but `arr.inject{ |sum, el| sum + el }.to_f / arr.size` is a race condition.
<apeiros> .size might have changed while you've been summing elements.
<apeiros> so there too, either use the sum+count variables approach, or synchronize access.
<apeiros> the above is regarding your current code
P1ro has joined #ruby
xall has joined #ruby
<apeiros> with only having the puts 35 in a separate thread, and keeping read/write of avg in the main thread, you can use array and don't have to synchronize (since it's in the same thread)
cdg has quit [Remote host closed the connection]
xall_ has quit [Ping timeout: 252 seconds]
last_staff has joined #ruby
dviola has quit [Quit: WeeChat 1.6]
shmuli has quit [Remote host closed the connection]
antgel has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
Pumukel has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
zukin has quit [Ping timeout: 244 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jtoyjtoy has joined #ruby
<jtoyjtoy> hi
crankharder has joined #ruby
<jtoyjtoy> can anyoen tell me what is wrong withthis simple command, it works in curl just fine: require 'oipen-uri'; open('https://firebasestorage.googleapis.com/v0/b/meaphotoeditor.appspot.com/o/images/ABA164D0-4CC1-474A-B3A0-7010A1A79582?alt=media';)
firstdayonthejob has joined #ruby
hanmac has quit [Ping timeout: 245 seconds]
Pumukel has quit [Ping timeout: 260 seconds]
Guest57477 has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
<apeiros> jtoyjtoy: and you gather that it does not work from…?
hypercube32 has joined #ruby
conta has quit [Ping timeout: 260 seconds]
warrshrike has quit [Ping timeout: 260 seconds]
<jtoyjtoy> apeiros: I get OpenURI::HTTPError: 400 Bad Request on all the machines I tried it from
<jtoyjtoy> apeiros: does that work for you?
<jtoyjtoy> if i do curl -O url it works from command line
antgel has quit [Ping timeout: 268 seconds]
pwnd_nsfw has joined #ruby
<apeiros> I get a 400 bad request too
<blackbombay> HTTP/1.1 400 Bad Request
<blackbombay> curl^
<jtoyjtoy> hmm, how do i debug something like this
<blackbombay> it's not just ruby
<blackbombay> you are probably passing invalid arguments somehow
<apeiros> jtoyjtoy: was just gonna say
<jtoyjtoy> works fine
<apeiros> you may want to look at the actual response jtoyjtoy
matp has joined #ruby
<apeiros> it's a json telling you that you're using the wrong http method/URL pair
pwnd_nsfw` has quit [Ping timeout: 260 seconds]
XV8 has quit [Quit: Textual IRC Client: www.textualapp.com]
<jtoyjtoy> hmm, it works everywhere except ruby, works in browser too
<SeepingN> there's no token in your url -I call
<SeepingN> broken even in a browser. "code": 400, "message": "Invalid HTTP method/URL pair."
<jtoyjtoy> yes, thank you
shmuli has joined #ruby
<jtoyjtoy> hmm, weird that curl and browser follow redirect to get token
Devalo has joined #ruby
claudiuinberlin has joined #ruby
millerti has quit [Quit: Textual IRC Client: www.textualapp.com]
<SeepingN> no redirect here
yanigisawa has joined #ruby
<SeepingN> this works
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<SeepingN> the link without "token" does not work in irb nor browser
<SeepingN> given that it's an API call... this seems obvious
claudiuinberlin has quit [Remote host closed the connection]
<workmad3> jtoyjtoy: hmm... doesn't `curl -I` issue a HEAD request?
marxarelli has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jtoyjtoy> im using curl -O to test
claudiuinberlin has joined #ruby
tomphp has joined #ruby
Ishido has joined #ruby
<apeiros> blackbombay used curl -I
<SeepingN> also works
<SeepingN> as long as you supply the API key (token)
SCHAAP137 has quit [Quit: Leaving]
<SeepingN> no key, no entry
<SeepingN> regardless of who's knocking
marxarelli has joined #ruby
<apeiros> sensible. but seems OP still thinks it's a ruby issue.
workmad3 has quit [Ping timeout: 268 seconds]
JeanCarloMachado has joined #ruby
<SeepingN> not sure how
hightower3 has quit [Remote host closed the connection]
sdothum has quit [Ping timeout: 245 seconds]
zeroDi has quit [Quit: WeeChat 1.5]
fpqc has quit [Quit: WeeChat 1.5]
SteenJobs has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
djellemah_ has joined #ruby
agent_white has joined #ruby
jcao219 has joined #ruby
anjen has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
anjen has quit [Client Quit]
nankyokusei has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
xall has quit [Ping timeout: 260 seconds]
Cohedrin has quit [Read error: Connection reset by peer]
Cohedrin has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
<Cohedrin> is it possible to add an error code to the exception?
<Cohedrin> outside of the error message?
sdothum has joined #ruby
tyang__ has joined #ruby
pawnbox has quit [Remote host closed the connection]
benlieb has joined #ruby
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
ta_ has joined #ruby
tyang_ has quit [Ping timeout: 244 seconds]
tomphp has joined #ruby
toretore has quit [Ping timeout: 250 seconds]
[twisti] has joined #ruby
<[twisti]> hey guys
pokalyis has quit [Quit: Textual IRC Client: www.textualapp.com]
Guest57477 has quit [Ping timeout: 268 seconds]
ta__ has joined #ruby
duracrisis has joined #ruby
en0x has left #ruby [#ruby]
ur5us has joined #ruby
bigmac has joined #ruby
<ljarvis> does anyone here work at/know anyone who works at SendGrid?
nebg has quit [Remote host closed the connection]
symm- has quit [Quit: Leaving...]
nebg has joined #ruby
pwnd_nsfw` has joined #ruby
dviola has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
elifoster has joined #ruby
nankyokusei has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 260 seconds]
pwnd_nsfw has quit [Ping timeout: 245 seconds]
frozengeek has joined #ruby
railssmith has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DroidBurgundy has quit [Remote host closed the connection]
DroidBurgundy has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
Pumukel has joined #ruby
tyang__ has quit [Quit: Leaving]
tomaw_ has joined #ruby
tyang has joined #ruby
sparch has quit [Ping timeout: 265 seconds]
symm- has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
Akuma has joined #ruby
tomphp has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
<SeepingN> we use them and their support was great but that's about all I can say
jackjackdripper has joined #ruby
DroidBur_ has joined #ruby
jcao219 has quit [Ping timeout: 250 seconds]
<ljarvis> interesting
<ljarvis> I have not had similar results with their support
johnmilton has quit [Remote host closed the connection]
cschneid_ has joined #ruby
gruggo has joined #ruby
DroidBurgundy has quit [Ping timeout: 244 seconds]
AndrewIsHere has joined #ruby
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
ta__ has quit [Quit: Leaving...]
charliesome has joined #ruby
_djbkd has quit [Remote host closed the connection]
railssmith has joined #ruby
_djbkd has joined #ruby
postmodern has joined #ruby
ziarkaen has joined #ruby
sdothum has quit [Ping timeout: 244 seconds]
jcao219 has joined #ruby
JeanCarloMachado has joined #ruby
_djbkd has quit [Ping timeout: 260 seconds]
ngrin has quit [Quit: Leaving]
benlieb has quit [Quit: benlieb]
_djbkd has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
ziarkaen has quit [Ping timeout: 252 seconds]
bronson_ has quit []
jshjsh has joined #ruby
c-c has joined #ruby
<c-c> Night
flashpoint9 has joined #ruby
jcao219 has quit [Ping timeout: 260 seconds]
whathappens has quit [Remote host closed the connection]
Pumukel has joined #ruby
<c-c> I have a shared hosting accoung (SElinux I think). How likely am I to get a relatively simple gems based app to run on it (via RVM)?
<c-c> *account
bronson has joined #ruby
<c-c> - going via pre-installed ruby I get lot of errors due to the fact that there is no write access to /var, and when installing gems in ~/.gems, the rubygems doesn't detect them.
bronson has quit [Remote host closed the connection]
whathappens has joined #ruby
GodFather has joined #ruby
bronson has joined #ruby
sdothum has joined #ruby
SeepingN has quit [Remote host closed the connection]
anisha has joined #ruby
<havenwood> c-c: Here're instructions for installing the latest Ruby with ruby-install and chruby without root: https://gist.github.com/havenwood/6233659
al2o3-cr has quit [Ping timeout: 245 seconds]
eljimmy has quit [Quit: This computer has gone to sleep]
eljimmy has joined #ruby
SeepingN has joined #ruby
<c-c> havenwood: interesting
postmodern has quit [Quit: Leaving]
acamargo has quit [Quit: Leaving]
aldodelgado has joined #ruby
<c-c> more cans with unknown worms! :)
<c-c> technically I can get ruby to work just fine, its the gems that give me complications
<havenwood> c-c: RVM is tens of thousands of lines of shell. You can review chruby's 100 lines here: https://github.com/postmodern/chruby/blob/master/share/chruby/chruby.sh
<havenwood> c-c: Are you using gems installed with RVM's Ruby?
<c-c> Ok, so the implication is your view is "it is possible in less than N*N time"
<havenwood> c-c: A user install of RVM should result in locally installed gems.
<c-c> havenwood: I've only attempted system wide and home-dir based gemming so far, with confusions
elifoster has quit [Quit: brb]
al2o3-cr has joined #ruby
railssmith has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Pumukel has quit []
<havenwood> c-c: A standard, non-root, non-sudo install of RVM will choose itself where to put gems (in your home dir). What's the problem you run into when doing a regular RVM install?
<c-c> I have not done a RVM install yet - I am using what I think is aptitude installed ruby2.1 and gem2.1 (rgems v2.2.2) on this shared host
<c-c> And, I can even install gems that do not require native extensions
c355e3b has joined #ruby
tdy has joined #ruby
Xiti has quit [Quit: Xiti]
Xeago has quit [Ping timeout: 268 seconds]
<c-c> but they cannot be used, due to gems not having them (my home-dir .gems) in its path --> /usr/lib/ruby/2.1.0/rubygems/dependency.rb:298:in `to_specs': Could not find 'nanoc' (>= 0) among 121 total gem(s) (Gem::LoadError)
ldnunes has quit [Quit: Leaving]
postmodern has joined #ruby
<havenwood> c-c: Have you tried installing gems with the --user-install flag?
<c-c> thats what I get when running $ nanoc (and I believe thats the line require 'nanoc')
<c-c> havenwood: ah, interesting
VeryBewitching has quit [Quit: Konversation terminated!]
Xeago has joined #ruby
<c-c> I have used --install-dir ~/.gems to install these
elifoster has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<c-c> ie. $ gem2.1 install nanoc --install-dir ~/.gems
Xiti has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
<c-c> let me try it just now...
<c-c> ..hey nice. It does work
claudiuinberlin has joined #ruby
<c-c> havenwood: thank you for your help 8)
marxarelli is now known as marxarelli|afk
pokalyis has joined #ruby
al2o3-cr has quit [Ping timeout: 245 seconds]
nopolitica has quit [Ping timeout: 252 seconds]
muelleme has joined #ruby
TomyLobo has quit [Ping timeout: 260 seconds]
<c-c> nice, even jekyll with its native extensions (?) seems to install correctly -- now I can compare jekyll and nanoc for my twisted media empire means!
tomaw_ has quit [Quit: Quitting]
bmurt has joined #ruby
<havenwood> c-c: you're welcome, happy hacking!
ag4ve_ has joined #ruby
ag4ve_ has quit [Max SendQ exceeded]
<c-c> I played a €5k (?) seven string Mayones in September
<c-c> oops wrong channel sorry!
ag4ve_ has joined #ruby
ag4ve_ has quit [Max SendQ exceeded]
ag4ve_ has joined #ruby
muelleme has quit [Ping timeout: 252 seconds]
JeanCarloMachado has quit [Ping timeout: 268 seconds]
TinkerTyper has quit [Read error: Connection reset by peer]
hutch34 has quit [Ping timeout: 268 seconds]
TinkerTyper has joined #ruby
rodfersou has quit [Quit: leaving]
jackjackdripper has quit [Quit: Leaving.]
tyang_ has joined #ruby
jenrzzz has joined #ruby
TPug has joined #ruby
gusrub has quit [Remote host closed the connection]
tyang has quit [Ping timeout: 244 seconds]
tyang_ has quit [Ping timeout: 244 seconds]
zeroDi has joined #ruby
dionysus69 has quit [Ping timeout: 250 seconds]
Uranio has joined #ruby
railssmith has joined #ruby
Uranio has left #ruby [#ruby]
nopolitica has joined #ruby
oyes has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Capela has joined #ruby
balazs has quit [Remote host closed the connection]
SteenJobs has quit [Quit: SteenJobs]
marxarelli|afk is now known as marxarelli
pwnd_nsfw has joined #ruby
biberu has quit [Read error: Connection reset by peer]
pwnd_nsfw` has quit [Ping timeout: 245 seconds]
marxarelli is now known as marxarelli|afk
grh has joined #ruby
dionysus69 has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
claudiuinberlin has quit [Remote host closed the connection]
flashpoint9 has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
last_staff has quit [Ping timeout: 260 seconds]
last_staff has joined #ruby
synthroid has quit []
ag4ve_ has quit [Ping timeout: 244 seconds]
Devalo has quit [Remote host closed the connection]
[twisti] has left #ruby [#ruby]
flashpoint9 has quit [Ping timeout: 265 seconds]
Devalo has joined #ruby
c355e3b is now known as cFFA500
xall_ has joined #ruby
elifoster has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
jhack has joined #ruby
DroidBur_ has quit []
Devalo has quit [Ping timeout: 250 seconds]
GodFather has quit [Ping timeout: 260 seconds]
muelleme has joined #ruby
vikaton has joined #ruby
gusrub has joined #ruby
GodFather has joined #ruby
bronson has quit [Read error: Connection reset by peer]
SuperLag has quit [Quit: leaving]
SuperLag has joined #ruby
phantompain has joined #ruby
flashpoint9 has joined #ruby
claudiuinberlin has joined #ruby
bronson has joined #ruby
aldodelgado has quit [Quit: aldodelgado]
anisha has quit [Quit: This computer has gone to sleep]
xall_ has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
railssmith has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oyes has joined #ruby
hahuang61 has quit [Ping timeout: 260 seconds]
johnmilton has joined #ruby
ta_ has quit [Remote host closed the connection]
vqrs has quit [Ping timeout: 252 seconds]
d0nn1e is now known as don
elenatanasoiu has joined #ruby
don is now known as Guest94844
Devalo has joined #ruby
palms has joined #ruby
jhack has quit [Quit: jhack]
ziarkaen has joined #ruby
Guest94844 is now known as d0nn1e
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
cdg has quit [Remote host closed the connection]
mistergibson has joined #ruby
nopolitica has quit [Ping timeout: 260 seconds]
SuperLag has quit [Quit: leaving]
ziarkaen has quit [Ping timeout: 265 seconds]
SuperLag has joined #ruby
Devalo has quit [Ping timeout: 252 seconds]
gusrub__ has joined #ruby
gusrub___ has joined #ruby
gusrub has quit [Read error: Connection reset by peer]
hutch34 has joined #ruby
frozengeek has quit [Quit: frozengeek]
gusrub___ has quit [Read error: Connection reset by peer]
tyang has joined #ruby
gusrub has joined #ruby
benlieb has joined #ruby
hanmac has joined #ruby
brianpWins has joined #ruby
gusrub__ has quit [Ping timeout: 256 seconds]
loincloth has joined #ruby
claudiuinberlin has quit []
hutch34 has quit [Ping timeout: 260 seconds]
gingray has quit [Ping timeout: 250 seconds]
Akuma has quit [Quit: So long sukkas!]
djellemah_ has quit [Ping timeout: 265 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
renderfu_ has quit [Ping timeout: 244 seconds]
muelleme has quit [Ping timeout: 244 seconds]
zukin has joined #ruby
sdothum has joined #ruby
vqrs has joined #ruby
hahuang61 has joined #ruby
malconis has quit [Read error: Connection reset by peer]
shum has joined #ruby
renderfu_ has joined #ruby
sdothum has quit [Ping timeout: 256 seconds]
zukin has quit [Ping timeout: 245 seconds]
muelleme has joined #ruby
shum has quit [Read error: Connection reset by peer]
vqrs has quit [Ping timeout: 256 seconds]
sdothum has joined #ruby
sdothum has quit [Read error: Connection reset by peer]
<cschneid_> I have an object, I need to replace it in-place with another object. So I'd like to call `o.superseded_by(new_obj)`, and have it setup a delegation to that new_obj, instead of the methods on self. So the next person to call o.foo gets forwarded to new_obj.foo. Is there a way to do that cleanly?
tristanp has quit [Remote host closed the connection]
sdothum has joined #ruby
johnmilton has quit [Ping timeout: 260 seconds]
<cschneid_> subclass Delegator, and switch the return val of __getobj__ from `self` to `new_obj`?
tristanp has joined #ruby
ramortegui has quit [Remote host closed the connection]
jhack has joined #ruby
sdothum has quit [Read error: Connection reset by peer]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sdothum has joined #ruby
yos7ph has joined #ruby
yos7ph has quit [Client Quit]
hammed has quit [Remote host closed the connection]
<c-c> cschneid_: it sounds like you don't want to replace, but channel messages
<hanmac> cschneid_ yeah Delegator looks like the only way to doing it
nikivi has quit [Remote host closed the connection]
Madplatypus has joined #ruby
tristanp has quit [Remote host closed the connection]
yos7ph has joined #ruby
<cschneid_> c-c: right. start by delegating to self, then to replacement. The issue is that the code that swaps it out can't know everywhere that may have a local variable referencing the original.
<cschneid_> ok - time to read up on delegator and figure it out :)
tristanp has joined #ruby
nikivi has joined #ruby
cpruitt has quit [Quit: cpruitt]
muelleme has quit [Ping timeout: 244 seconds]
code_ has joined #ruby
muelleme has joined #ruby
last_staff has quit [Quit: last_staff]
railssmith has joined #ruby
zukin has joined #ruby
hammed has joined #ruby
last_staff has joined #ruby
tristanp has quit [Ping timeout: 256 seconds]
sdothum has quit [Read error: Connection reset by peer]
kent\n has quit [Ping timeout: 260 seconds]
yos7ph has quit [Quit: Leaving]
hammed has quit [Read error: Connection reset by peer]
sdothum has joined #ruby
JeanCarloMachado has joined #ruby
sdothum has quit [Read error: Connection reset by peer]
vqrs has joined #ruby
izaac has joined #ruby
Fire-Dragon-DoL has quit [Ping timeout: 260 seconds]
elenatanasoiu has quit [Ping timeout: 250 seconds]
sdothum has joined #ruby
bmurt has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nettoweb has quit [Ping timeout: 245 seconds]
nettoweb has joined #ruby
blackwind_123 has quit [Ping timeout: 250 seconds]
skweek has joined #ruby
blackwind_123 has joined #ruby
gruggo has quit [Ping timeout: 252 seconds]
zukin has quit [Ping timeout: 268 seconds]
Jackneill_ has quit [Remote host closed the connection]
gruggo has joined #ruby
muelleme has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
shinnya has joined #ruby
nikivi has quit [Quit: irc]
[Butch] has quit [Quit: I'm out . . .]
railssmith has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hammed has joined #ruby
ta_ has joined #ruby
grh has quit [Ping timeout: 260 seconds]
jtoyjtoy has quit [Quit: Lost terminal]
ta_ has quit [Remote host closed the connection]
Pent has left #ruby ["Leaving"]
palms has quit [Ping timeout: 260 seconds]
<vktec> How do I make, err... module variables? That's probably the wrong term, but basically I want a variable that's global within a module. Defining locals in the root of the module doesn't seem to work...
<Papierkorb> vktec: with rails (or ActiveSupport): module Foo; mattr_accessor :bar; end - without: module Foo; class << self; attr_accessor :bar; end; end
ta_ has joined #ruby
aaronds has joined #ruby
palms has joined #ruby
<vktec> Papierkorb: Thanks, the second one works perfectly!
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
symm- has quit [Ping timeout: 245 seconds]
zukin has joined #ruby
polishdub has quit [Quit: Leaving]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
hypercube32 has quit [Ping timeout: 268 seconds]
bronson has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 252 seconds]
agent_white has quit [Quit: bbl]
NeverTired has quit [Quit: Connection closed for inactivity]
nopolitica has joined #ruby
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
NeverTired has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
brent__ has joined #ruby
charliesome has joined #ruby
zukin has quit [Quit: bsd!]
whathappens has quit [Ping timeout: 250 seconds]
whathapp_ has joined #ruby
lacour has joined #ruby
cdg has quit [Remote host closed the connection]
arescorpio has joined #ruby
smlocal has quit [Remote host closed the connection]
railssmith has joined #ruby
tristanp has joined #ruby
cschneid_ has quit [Remote host closed the connection]
elenatanasoiu has joined #ruby
thisirs has quit [Ping timeout: 268 seconds]
sdothum has quit [Read error: Connection reset by peer]
Ishido has quit [Remote host closed the connection]
mvxlr has joined #ruby
<alexandernst> ljarvis: I'm really sorry for pinging you directly. Remember the module I pasted in pastebin a few hours ago? (the issue I was having with the include statement)
<alexandernst> is there a way I can use 'say_moo' without writing 'Foo::Bar.say_moo' ?
elenatanasoiu has quit [Ping timeout: 260 seconds]
sdothum has joined #ruby
lel has joined #ruby
<c-c> you can include the module contents in the currect object scope?
<alexandernst> oh, so extend is what I'm looking for
<alexandernst> let me check if that works
<alexandernst> indeed, that's exactly what I was looking for
<alexandernst> thank you
<c-c> B)
ramfjord has quit [Ping timeout: 250 seconds]
zeroDi has quit [Quit: WeeChat 1.5]
dviola has quit [Quit: WeeChat 1.6]
SteenJobs has joined #ruby
jbeeze has quit [Remote host closed the connection]
Rodya_ has joined #ruby
dviola has joined #ruby
tyang_ has joined #ruby
dviola has quit [Client Quit]
zeroDi has joined #ruby
ramfjord has joined #ruby
dviola has joined #ruby
railssmith has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gusrub has quit [Remote host closed the connection]
tyang has quit [Ping timeout: 250 seconds]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SocalNick has joined #ruby
demio has joined #ruby
Jameser has joined #ruby
<demio> hey guys
elenatanasoiu has joined #ruby
tristanp has quit [Remote host closed the connection]
<demio> having some issues with mongoid
<demio> basically its not allowing my to override a previous scope
chouhoul_ has joined #ruby
<demio> ie, if i do:
<demio> `posts_for_show_route.any_in(:is_hidden.in => [true, false, nil])`
jhack has quit [Quit: jhack]
<demio> it will override the default selector properly
<demio> but with `scope :visible_or_hidden, -> { any_in(:is_hidden.in => [true, false, nil]) }`
<demio> and then `posts_for_show_route.visible_or_hidden`
<demio> it doesnt
<demio> any tips?
chouhoulis has quit [Ping timeout: 268 seconds]
flashpoint9 has quit [Remote host closed the connection]
elenatanasoiu has quit [Ping timeout: 256 seconds]
flashpoint9 has joined #ruby
chouhoul_ has quit [Ping timeout: 256 seconds]
quazimodo has joined #ruby
ziarkaen has joined #ruby
nopolitica has quit [Ping timeout: 260 seconds]
<SocalNick> Hi all, I'm experiencing this issue that appears to be fixed on Ruby 2.3 branch. When can we expect a stable version of Ruby 2.3 containing the bug fix? Is there a patch version we can try? Thanks! https://bugs.ruby-lang.org/issues/12292
flashpoint9 has quit [Ping timeout: 245 seconds]
ziarkaen has quit [Ping timeout: 250 seconds]
firstdayonthejob has quit [Ping timeout: 244 seconds]
last_staff has quit [Quit: last_staff]
hutch34 has joined #ruby
riskish has joined #ruby
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bobdobbs has quit [Read error: Connection reset by peer]
nitric has quit [Ping timeout: 260 seconds]
hutch34 has quit [Ping timeout: 252 seconds]
elenatanasoiu has joined #ruby
cdg has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
bronson has joined #ruby
railssmith has joined #ruby
elenatanasoiu has quit [Ping timeout: 250 seconds]
tristanp has joined #ruby
nikivi has joined #ruby
shmuli has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 250 seconds]
whathapp_ has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
gnufied has quit [Quit: Leaving]
whathappens has joined #ruby
railssmith has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
flashpoint9 has joined #ruby
palms has quit [Ping timeout: 260 seconds]
gnufied has joined #ruby
railssmith has joined #ruby
sdothum has quit [Read error: Connection reset by peer]
pragmaticus has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
sdothum has joined #ruby
elenatanasoiu has joined #ruby
hahuang61 has quit [Ping timeout: 268 seconds]
rcvalle has quit [Quit: rcvalle]
demio has quit [Quit: Computer has gone to sleep.]
SteenJobs has quit [Quit: SteenJobs]
ramfjord has quit [Ping timeout: 268 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
elenatanasoiu has quit [Ping timeout: 250 seconds]
jcao219 has joined #ruby