<baweaver>
mainly because rails and json are a thing
juanpablo__ has joined #ruby
<baweaver>
To a degree I think there's a lot of borderline religious dogma against monkeypatching things, when some things are truly of ubiquitous use.
kblake has quit [Remote host closed the connection]
<Ikri>
mozzarella: '5' + '5' is turning out 55, not 10
fabrice31 has joined #ruby
mjuszczak has joined #ruby
<mozzarella>
yeah, because that's how you concatenate strings
Guest1421 has joined #ruby
mrmargolis has joined #ruby
wldcordeiro__ has quit [Remote host closed the connection]
drocsid has joined #ruby
<jhass>
Ikri: yes, Ruby is a sane language and thus has strong typing
<mozzarella>
this is no php
<jhass>
convert explicitly, .to_i
<Ikri>
sorry, new to ruby! so '5'.to_i?
<Ikri>
'5'.to_i + '5'.to_i would return 10? okay. thank you!
<jhass>
well, x.to_i, if you have literally '5' just write 5 directly
wldcordeiro__ has joined #ruby
<aewffwea>
jhass: Although it has dynamic typing too
<Ikri>
it's name.length :P
fabrice31_ has quit [Read error: Connection reset by peer]
<drocsid>
I'm trying to send an email with my exception / error string captured, using rescue Exception => e
<mozzarella>
should be an integer
<mozzarella>
already
<jhass>
aewffwea: strong/weak typing and dynamic/static typing are orthogonal, though implementing weak typing in a strongly typed language would be hard
<drocsid>
but when I use #{e} or #{e.to_s} I get getaddrinfo: Name or service not known
<jhass>
Ikri: yeah, .length (or its shorter alias .size) return int already
<aewffwea>
jhass: I know
Pupeno has joined #ruby
Pupeno has joined #ruby
<drocsid>
but not the error E.G. SocketError
<aewffwea>
jhass: But I personally like Strong and static typing :)
<drocsid>
and I don't get the stack trace either.
<drocsid>
anybody know how I can get that information?
ismael has joined #ruby
ghr has joined #ruby
<jhass>
drocsid: e.backtrace (returns an array). Btw don't rescue Exception, rescue StandardError more more specific
ismael is now known as Guest91219
<jhass>
(or RuntimeError? I can never remember. The one you get if you specify none)
<Ikri>
mozzarella: "There are " first_name.length + last_name.length + " characters in your name!"
<apeiros>
weak typing in a strongly typed language would be a paradoxon jhass :-D
<jhass>
not really, you could have union types
towski__ has quit [Remote host closed the connection]
jokester has joined #ruby
fabrice31_ has joined #ruby
fabrice31 has quit [Read error: Connection reset by peer]
<apeiros>
jhass: it'd still be either a strongly or a weakly typed language
<jhass>
oh, bah, I meant statically typed of course
<apeiros>
:o)
<apeiros>
why are you up at this time anyway?!?
<jhass>
Ikri: "There are #{first_name.size + last_name.size} characters in your name!"
PhantomSpank has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 264 seconds]
nii236 has quit [Ping timeout: 252 seconds]
Pupeno has quit [Ping timeout: 272 seconds]
<pontiki>
what's the issue?
felixjet has joined #ruby
platosha has quit [Ping timeout: 252 seconds]
gambl0re has joined #ruby
zorak8 has quit [Remote host closed the connection]
nii236 has joined #ruby
mitchellhenke has joined #ruby
felixjet__ has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby
zorak8 has joined #ruby
<bintelli>
it's substituting the full array instead of by index
Rollabun_ has joined #ruby
havenwood has quit []
rgb-one has quit [Ping timeout: 252 seconds]
Rollabunna has quit [Read error: No route to host]
<bintelli>
the array of records for the Product class is being substituted, instead of one record at a time.
<bintelli>
so 9 new records are created, instead of 3
hackeron_ has quit [Ping timeout: 272 seconds]
<pontiki>
you told it to use all the products
<pontiki>
Product.all
<bintelli>
yes
<sevenseacat>
well yes, 3xproducts x 3x data = 9 records
<bintelli>
I just need to substitute all the product ids
<bintelli>
I used Product.all as a way to access those records.
<pontiki>
yes?
<pontiki>
and?
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sevenseacat>
what are you actually trying to do
funburn has quit [Quit: funburn]
diegoaguilar has joined #ruby
<bintelli>
well, I only want to access one record at a time from Product
<sevenseacat>
you are
<sevenseacat>
Product.all.each
workmad3 has quit [Ping timeout: 255 seconds]
<bintelli>
I want my product array index[0] to be substituted with data[0]; product[1] with data[1]; product[2] with data[2]
jenrzzz has joined #ruby
<sevenseacat>
so you dont want a nested loop
<sevenseacat>
you want a single loop over products
rgb-one has joined #ruby
<sevenseacat>
while keeping track of the array index
CloCkWeRX has quit [Ping timeout: 256 seconds]
Sawbones has quit [Remote host closed the connection]
penzur has joined #ruby
rgb-one has quit [Remote host closed the connection]
dorei has quit []
Sawbones has joined #ruby
sargas has quit [Quit: This computer has gone to sleep]
musashi has quit [Quit: Connection closed for inactivity]
mordocai has joined #ruby
ghr has joined #ruby
davedev24_ has quit []
phutchins1 has quit [Ping timeout: 240 seconds]
stirfryad has joined #ruby
<bintelli>
how do I substitute the 2nd array dynamically if it's only 1 loop
fabrice31 has joined #ruby
bruno- has joined #ruby
ducklobster has joined #ruby
mitchellhenke has quit [Quit: Computer has gone to sleep.]
<sevenseacat>
look into each_with_index
Zenon has joined #ruby
fabrice31_ has quit [Read error: Connection reset by peer]
Zenon has quit [Client Quit]
Sawbones has quit [Remote host closed the connection]
fabrice31_ has joined #ruby
<sevenseacat>
that will give you the index of the product in the Product.all relation, and then you can just access data[index]
Zenon has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
<bintelli>
ok, great, thanks for the help
fr0de has quit [Remote host closed the connection]
arescorpio has joined #ruby
Sawbones has joined #ruby
fabrice31 has quit [Read error: Connection reset by peer]
bruno- has quit [Ping timeout: 272 seconds]
ramfjord has quit [Ping timeout: 272 seconds]
mistermo_ has joined #ruby
yh has joined #ruby
jbc has quit [Quit: Page closed]
mistermocha has quit [Ping timeout: 264 seconds]
zorak8 has quit [Quit: Leaving]
zorak8 has joined #ruby
fabrice31_ has quit [Ping timeout: 256 seconds]
Guest91219 has quit [Remote host closed the connection]
mistermo_ has quit [Ping timeout: 252 seconds]
felixjet_ has joined #ruby
ElusiveNinJay has joined #ruby
felixjet has quit [Ping timeout: 244 seconds]
Kricir has quit [Remote host closed the connection]
yosafbridge has quit [Ping timeout: 265 seconds]
slash_nick has joined #ruby
<ElusiveNinJay>
I've done a tiny bit of java and some stuff in this game coding engine called byond, but I want to get really good at some language. Currently a total newb. Pros and cons of that language being ruby? My other idea was python.
<ElusiveNinJay>
My name is Freenode. Huh.
MrSamuel has joined #ruby
hippyphysicist has joined #ruby
mordocai has quit [Quit: to lvm!]
hippyphysicist has quit [Client Quit]
thatslif_ has joined #ruby
tuelz has quit [Ping timeout: 265 seconds]
psy_ has quit [Quit: Leaving]
psy_ has joined #ruby
A124 has quit [Quit: Luke's IRC Client v0.94 build 682]
Akagi201 has quit [Remote host closed the connection]
thatslifeson has quit [Ping timeout: 244 seconds]
Akagi201 has joined #ruby
ramfjord has joined #ruby
yosafbridge has joined #ruby
doodlehaus has quit [Remote host closed the connection]
stirfryad has quit [Remote host closed the connection]
Akagi201 has quit [Ping timeout: 250 seconds]
Akagi201 has joined #ruby
braincrash has quit [Quit: bye bye]
Pupeno has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
Oka has quit [Quit: さようなら]
juanpablo__ has joined #ruby
yfeldblum has joined #ruby
penzur has quit [Quit: dc]
Pupeno_ has quit [Ping timeout: 264 seconds]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
apurcell has joined #ruby
bintelli has quit [Quit: Page closed]
slackbotgz has quit [Remote host closed the connection]
braincrash has joined #ruby
ElusiveNinJay has left #ruby [#ruby]
narcan has joined #ruby
juanpablo__ has quit [Ping timeout: 264 seconds]
multi_io has quit [Ping timeout: 264 seconds]
penzur has joined #ruby
penzur has quit [Read error: Connection reset by peer]
multi_io has joined #ruby
konsolebox has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
mrmargolis has quit [Remote host closed the connection]
crdpink has quit [Quit: q term]
nettoweb has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
nii236 has quit [Read error: Connection reset by peer]
nettoweb has quit [Client Quit]
hgl- has joined #ruby
hgl has quit [Read error: Connection reset by peer]
hgl- is now known as hgl
quazimod1 has joined #ruby
<quazimod1>
how do I make a Pathname like "images/whatever" into "/images/whatever" ?
crdpink has joined #ruby
<quazimod1>
nvm
Rollabun_ has quit [Ping timeout: 256 seconds]
towski_ has joined #ruby
barhum2013 has joined #ruby
Channel6 has joined #ruby
nii236 has joined #ruby
gizmore has joined #ruby
duderonomy has quit [Read error: No route to host]
konsolebox has joined #ruby
balazs has joined #ruby
cryptarium has quit [Ping timeout: 264 seconds]
psy_ has quit [Ping timeout: 240 seconds]
towski_ has quit [Remote host closed the connection]
thalesribeiro has joined #ruby
bluOxigen has joined #ruby
diegoaguilar has joined #ruby
diegoaguilar has quit [Read error: Connection reset by peer]
SleepDeprived has quit [Quit: SleepDeprived]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
Sawbones has quit [Remote host closed the connection]
i8igmac has joined #ruby
Sawbones has joined #ruby
slash_nick has quit [Ping timeout: 272 seconds]
alvaro_o has joined #ruby
Pupeno_ has joined #ruby
Musashi007 has joined #ruby
ramenboy_ has joined #ruby
edwinvdgraaf has joined #ruby
Pupeno has quit [Ping timeout: 265 seconds]
ramenboy__ has joined #ruby
baweaver has joined #ruby
ramenboy__ is now known as ramenboy
ramenboy has quit [Client Quit]
ramenboy has joined #ruby
Guest1421 has quit [Ping timeout: 255 seconds]
beneggett has joined #ruby
nettoweb has joined #ruby
icebourg has quit []
ramenboy_ has quit [Ping timeout: 252 seconds]
edwinvdgraaf has quit [Ping timeout: 265 seconds]
greenbagels has quit [Read error: Connection reset by peer]
lidenskap has joined #ruby
mostlybadfly has joined #ruby
ramenboy_ has joined #ruby
ramenboy_ has quit [Remote host closed the connection]
nettoweb has quit [Client Quit]
cgrieger^away is now known as cgrieger
hmsimha_ has joined #ruby
Sawbones has quit [Remote host closed the connection]
ramenboy has quit [Ping timeout: 252 seconds]
hmsimha_ has quit [Read error: Connection reset by peer]
Sawbones has joined #ruby
DynamicMetaFlow has quit [Quit: Leaving]
ramenboy has joined #ruby
PhantomSpank has joined #ruby
towski_ has joined #ruby
mitchellhenke has joined #ruby
Eiam has joined #ruby
swgillespie has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
PhantomSpank has quit [Ping timeout: 245 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
slash_nick has joined #ruby
mordocai has joined #ruby
workmad3 has joined #ruby
ramenboy_ has joined #ruby
Joufflu has quit [Read error: Connection reset by peer]
ramenboy has quit [Ping timeout: 250 seconds]
ramenboy_ is now known as ramenboy
lkba_ has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
Fingel has joined #ruby
tuelz has joined #ruby
CloCkWeRX has joined #ruby
lkba has quit [Ping timeout: 265 seconds]
jeromelanteri has joined #ruby
thalesribeiro_ has joined #ruby
thalesribeiro has quit [Read error: Connection reset by peer]
ramenboy has quit [Quit: Bye]
CaptainCibai has quit [Ping timeout: 240 seconds]
mistermocha has joined #ruby
tuelz has quit [Ping timeout: 250 seconds]
icebourg has joined #ruby
slash_nick has quit [Ping timeout: 245 seconds]
lessless has joined #ruby
<lessless>
Hey folks, help me please to get on track with floating point calculations: everything is correct with literals - `6.0 / 100 / 12` => 0.005, but it's rounded when variable is used: int_p = 6.0 and int_p / 100 / 2 => 0.03
yfeldblum has quit [Ping timeout: 256 seconds]
<Radar>
lessless: what is int_p?
<Radar>
Oops, sorry. I can't read.
<Radar>
lessless: Your second example divides by 2, whereas your first divides by 12.
<Radar>
The calculations are working exactly as you are telling them to.
beneggett has quit [Quit: ...zzz ¯\_(ツ)_/¯ zzz...]
<lessless>
Ha ha, omg :D
<lessless>
those are my favorite type of mistakes - apparently I can't see ;)
i8igmac has quit [Ping timeout: 276 seconds]
scripore has quit [Quit: This computer has gone to sleep]
nahtnam has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
kalleth has quit [Remote host closed the connection]
kalleth has joined #ruby
badhatter has quit [Remote host closed the connection]
someguy has quit [Quit: This computer has gone to sleep]
barhum2013 has quit [Quit: barhum2013]
that1guy has joined #ruby
chrissonar has joined #ruby
mordocai has quit [Quit: trying new user config]
scripore has joined #ruby
balazs has quit [Remote host closed the connection]
moretti has joined #ruby
chimche has quit [Quit: Leaving.]
fabrice31 has joined #ruby
moretti has quit [Client Quit]
Rollabunna has joined #ruby
amclain has quit [Quit: Leaving]
konsolebox has joined #ruby
Fingel has quit [Ping timeout: 255 seconds]
arescorpio has quit [Read error: Connection reset by peer]
konsolebox has quit [Read error: Connection reset by peer]
that1guy has quit [Quit: This computer has gone to sleep]
michael_mbp has quit [Excess Flood]
that1guy has joined #ruby
wldcordeiro__ has quit [Ping timeout: 246 seconds]
<Eiam>
grr
<Eiam>
hate when someone elses code seems to work fine and mine does not when it looks the same =/
fabrice31_ has joined #ruby
fabrice31 has quit [Read error: Connection reset by peer]
michael_mbp has joined #ruby
<Eiam>
jenrzzz: oh, look, its you =)
<Eiam>
somehow I suspected I'd find you in here
turtil has quit [Ping timeout: 246 seconds]
mordocai has joined #ruby
juanpablo__ has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
kp666 has joined #ruby
<Eiam>
he ran!
poguez_ has joined #ruby
<Radar>
Wouldn't you? ;)
that1guy has quit [Quit: This computer has gone to sleep]
thatslifeson has quit [Read error: Connection reset by peer]
yosafbridge has joined #ruby
ahmetkapikiran has joined #ruby
haxrbyte has joined #ruby
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lessless has quit [Read error: Connection reset by peer]
lessless has joined #ruby
blackmesa has joined #ruby
rohit has quit [Ping timeout: 240 seconds]
zzing has quit [Read error: Connection reset by peer]
LJT has quit [Quit: Sleeping...]
jtdowney has joined #ruby
yosafbridge has quit [Ping timeout: 248 seconds]
chthon has quit [Ping timeout: 244 seconds]
ypasmk has joined #ruby
Leef_ has joined #ruby
platzhirsch has left #ruby [#ruby]
doodlehaus has joined #ruby
MrSamuel has quit [Quit: MrSamuel]
DefV_ is now known as DefV
RegulationD has joined #ruby
luriv has quit [Read error: Connection reset by peer]
allcentury has joined #ruby
LJT has joined #ruby
LJT has quit [Remote host closed the connection]
doodlehaus has quit [Remote host closed the connection]
rohit has joined #ruby
blueOxigen has joined #ruby
bluOxigen has quit [Ping timeout: 264 seconds]
RegulationD has quit [Ping timeout: 272 seconds]
Hounddog has quit [Ping timeout: 245 seconds]
coderhs has joined #ruby
coderhs has quit [Client Quit]
Hirzu has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
yosafbridge has joined #ruby
chthon has joined #ruby
pandaant has joined #ruby
zzing has joined #ruby
haxrbyte_ has joined #ruby
postmodern has quit [Quit: Leaving]
Rickmasta has joined #ruby
doodlehaus has joined #ruby
haxrbyte has quit [Ping timeout: 276 seconds]
juanpablo__ has joined #ruby
pontiki has joined #ruby
fabrice31 has joined #ruby
bluOxigen has joined #ruby
Doow has joined #ruby
blueOxigen has quit [Ping timeout: 256 seconds]
Zai00 has quit [Quit: Zai00]
juanpablo__ has quit [Ping timeout: 240 seconds]
wolflee____ has quit [Remote host closed the connection]
Hirzu_ has joined #ruby
wolflee____ has joined #ruby
iwishiwerearobot has joined #ruby
pontiki has quit [Ping timeout: 276 seconds]
mooe has joined #ruby
sdothum has joined #ruby
Hirzu has quit [Ping timeout: 264 seconds]
mathie has quit [Quit: Quitting...]
mathie has joined #ruby
colorados has quit [Quit: Leaving]
pokui has joined #ruby
colorados has joined #ruby
vikaton has joined #ruby
ItSANg___ has quit [Ping timeout: 265 seconds]
iamninja has quit [Read error: Connection reset by peer]
alex88 has quit [Ping timeout: 245 seconds]
serivich has joined #ruby
iamninja has joined #ruby
NinjaOps has joined #ruby
ascarter_ has joined #ruby
rohit has quit [Ping timeout: 256 seconds]
decoponyo has joined #ruby
decoponio has quit [Ping timeout: 250 seconds]
wolflee_____ has joined #ruby
leafybas_ has quit [Remote host closed the connection]
wolflee_____ has quit [Remote host closed the connection]
wolflee____ has quit [Read error: Connection reset by peer]
leafybasil has joined #ruby
wolflee_____ has joined #ruby
wolflee______ has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
iotouch has quit [Quit: This computer has gone to sleep]
edwinvdgraaf has joined #ruby
icebourg has quit [Ping timeout: 240 seconds]
shredding has joined #ruby
moeabdol has quit [Ping timeout: 245 seconds]
wolflee_____ has quit [Ping timeout: 240 seconds]
SOLDIERz has joined #ruby
MatthewsFace[SEA has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
vtunka has quit [Quit: Leaving]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
decoponyo has quit [Ping timeout: 256 seconds]
iotouch has joined #ruby
bruno- has joined #ruby
MatthewsFace[SEA has quit [Ping timeout: 264 seconds]
jimms has joined #ruby
icebourg has joined #ruby
jtdowney has quit []
Perdomo has joined #ruby
vudew has joined #ruby
rodfersou has joined #ruby
<adaedra>
Mmmh, better_errors seems not very active
jtdowney has joined #ruby
shredding has quit [Ping timeout: 264 seconds]
edwinvdg_ has joined #ruby
ItSANgo has joined #ruby
KnownSyntax has joined #ruby
vudew has quit [Read error: Connection reset by peer]
vudew has joined #ruby
<DefV>
still awesome project
<adaedra>
Yeah, but I'm having a weird bug with it, which seems to have been reported already, without answers... :x
edwinvdgraaf has quit [Ping timeout: 244 seconds]
Cust0sL1men has quit [Ping timeout: 246 seconds]
krz has quit [Quit: WeeChat 1.0.1]
blackmesa has quit [Ping timeout: 256 seconds]
craigp has joined #ruby
lidenskap has joined #ruby
gregf_ has joined #ruby
yosafbridge has quit [Ping timeout: 248 seconds]
jtdowney_ has joined #ruby
jtdowney has quit [Read error: Connection reset by peer]
lidenskap has quit [Ping timeout: 256 seconds]
scripore has joined #ruby
diegoaguilar has joined #ruby
chinmay_dd has quit [Quit: Leaving]
Papierkorb has joined #ruby
jtdowney_ has quit [Read error: Connection reset by peer]
chthon has quit [Ping timeout: 244 seconds]
jtdowney has joined #ruby
jimms has quit [Ping timeout: 272 seconds]
quimrstorres has quit [Remote host closed the connection]
moeabdol has joined #ruby
claptor has quit [Quit: this channel is bakas]
craigp has quit [Ping timeout: 245 seconds]
decoponio has joined #ruby
fabrice31 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
DEA7TH has joined #ruby
Cust0sL1men has joined #ruby
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Doow has left #ruby ["Leaving"]
ahmetkapikiran has quit [Quit: ahmetkapikiran]
quimrstorres has joined #ruby
yosafbridge has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
jtdowney has quit [Read error: Connection reset by peer]
ascarter_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jtdowney has joined #ruby
Soda has joined #ruby
stoffus has joined #ruby
tuelz has joined #ruby
quimrstorres has quit [Remote host closed the connection]
chthon has joined #ruby
quimrstorres has joined #ruby
serivich has quit [Ping timeout: 244 seconds]
scripore has joined #ruby
jtdowney_ has joined #ruby
jtdowney has quit [Read error: Connection reset by peer]
jehannimoh has joined #ruby
<shevy>
code fuels our life!
<shevy>
adaedra go take over that project :)
jehannimoh has quit [Quit: ChatZilla 0.9.91.1 [Firefox 37.0.2/20150415140819]]
<adaedra>
shevy: If only I had time to manage such a big thing
arup_r has quit [Remote host closed the connection]
phutchins1 has joined #ruby
quimrstorres has quit [Remote host closed the connection]
OddJob has joined #ruby
arup_r has joined #ruby
SouL_|__ has quit [Ping timeout: 272 seconds]
<shevy>
maaaan
<shevy>
what are you doing!
<shevy>
you work until it rains
thatslifeson has joined #ruby
<shevy>
work less, and sit more in the sun
<shevy>
then you have plenty of more time as well
scripore has quit [Quit: This computer has gone to sleep]
<OddJob>
hey all. I am very new to ruby, and programming in general. can someone help me out with this? https://gist.github.com/anonymous/87fb96c8529603c5c4a0 It finds the entry just fine, but when the entry doesnt exist it should be set back to nil.
barkerd427 is now known as zz_barkerd427
last_staff has joined #ruby
yosafbridge has quit [Ping timeout: 248 seconds]
arup_r has quit [Remote host closed the connection]
<shevy>
yeah you guys are in the far west... I hope your bad weather does not come over here, please keep it!
allcentury has quit [Ping timeout: 240 seconds]
<shevy>
OddJob the code should do fine right?
jimms has joined #ruby
<shevy>
can regvalue become nil?
<shevy>
as your if checks don't handle that case; I have no idea what the above method returns or does, that is highly domain-specific code
yosafbridge has joined #ruby
arup_r has joined #ruby
jtdowney has joined #ruby
pwattste has joined #ruby
davedev24_ has joined #ruby
jtdowney_ has quit [Read error: Connection reset by peer]
<jhass>
OddJob: just notepadpp = regvalue if regvalue && !regvalue.empty?, it defaults to nil
chimche has joined #ruby
quazimodo has joined #ruby
Zai00 has joined #ruby
jtdowney_ has joined #ruby
jtdowney has quit [Read error: Connection reset by peer]
serivich has joined #ruby
doodlehaus has quit [Remote host closed the connection]
<adaedra>
better_errors is generating more problems than it solves :x
<OddJob>
shevy: this is the return I get if there is no entry. Is this saying it is a nil value? - Could not retrieve fact='notepadpp', resolution='<anonymous>': The system cannot find the file specified.
<OddJob>
shevy: i just worry that would break in the rest of my code elsewhere. Not used to knowing what a successful (yet empty/nil) return looks like
asmodlol has quit [Ping timeout: 240 seconds]
dramagods has joined #ruby
<OddJob>
jhass: are you saying to replace lines 10 - 13 with that single line?
Rickmasta has joined #ruby
asmodlol has joined #ruby
<adaedra>
better_errors is returning Session Expired for every requests, any ideas?
<adaedra>
every except the initial one*
shevy has quit [Ping timeout: 276 seconds]
<adaedra>
duh, I think I know why
<OddJob>
jhass: even with that change I get - Could not retrieve fact='notepadpp', resolution='<anonymous>': The system cannot find the file specified. - I would expect to get nothing in return (or am expecting)
Dopagod has quit [Ping timeout: 264 seconds]
<adaedra>
Stupid browser and his /favicon.ico -_-
chinmay_dd has joined #ruby
tuelz has quit [Ping timeout: 256 seconds]
marr has quit [Ping timeout: 264 seconds]
RegulationD has joined #ruby
ldnunes has joined #ruby
quimrstorres has joined #ruby
<jhass>
OddJob: you want to consult the facter people
narcan has joined #ruby
zzing has quit [Read error: Connection reset by peer]
<OddJob>
jhass: isnt there a simple way to just tell the code to not do anything if regvalue returns nothing?
<jhass>
OddJob: the code you showed doesn't do anything then
<OddJob>
jhass: i guess i dont know what "doesnt do anything" means
jtdowney has joined #ruby
jtdowney_ has quit [Read error: Connection reset by peer]
<OddJob>
it does everything, except for not doing anything when there is no entry for the regvalue
<jhass>
and I guess what you want it to mean is specific to Facter
shevy has joined #ruby
<OddJob>
hmm. facter is just based of ruby code, so how could it not be a ruby question? or are you saying, the code is correct (as in it should return nil if that regvalue doesnt exist) but my expectation of what the code is doing is wrong
RegulationD has quit [Ping timeout: 240 seconds]
laurentide has quit [Read error: Connection reset by peer]
<OddJob>
i guess i thought there would be a much simpler and straight forward way to just return nil
laurentide has joined #ruby
Akagi201_ has quit [Remote host closed the connection]
avat has joined #ruby
jtdowney_ has joined #ruby
<jhass>
you return nil
jtdowney has quit [Read error: Connection reset by peer]
badlands has joined #ruby
zzing has joined #ruby
<avat>
Hello guys, I have a question. I am receiving data, how can I parse it to some readable format? It looks like this: type=profile&fired_at=2015-05-05+11%3A52%3A55&data%5Bid%5D=dc4dc5c3ba&data%5Bemail%5D=jussi.hyvarinen%40mbnet.fi&data%5Bemail_type%5D=html&data%5Bip_opt%5D=195.116.209.87&data%5Bweb_id%5D=71393301&data%5Bmerges%5D%5BFNAME%5D=&data%5Bmerges%5D%5BLNAME%5D=&data%5Bmerges%5D%5BCOMPANY%5D=Suomen+EkoKuppi+Oy&data%5Bmerges%5D%5BEM
<jhass>
OddJob: the return value of the block passed to setcode is in my version and in your version nil if regvalue is either nil or an empty string
<jhass>
avat: looks like formencoded HTTP POST data?
<OddJob>
jhass: i got the answer - else nil end
<badlands>
I'm writing an open source app that uses a database and therefore needs different configuration to run on different machines, what's the best way to configure a gem that is hosted in a public git repo?
<avat>
Yes, it is. Whats the function to encode? I'm not really sure what should i write in google :)
roshanavand_ has joined #ruby
roshanavand has quit [Ping timeout: 264 seconds]
<jhass>
avat: cgi should have something
<jhass>
avat: try if CGI.parse eats it
<avat>
jhass: thank you, I'll look into it
arup_r has quit [Remote host closed the connection]
terlar has joined #ruby
jtdowney_ has quit [Read error: Connection reset by peer]
<badlands>
for example, I have the app configured to run on my computer and a server, the file is config/database.yml, which for obvious reasons I don't publish to git, how then, after running rake install and running an executable command, should me gem read configuration?
<hanmac1>
avat: URI.decode also works
tus has joined #ruby
<avat>
CGI parse did well, thanks a lot
jtdowney has joined #ruby
jtdowney has quit [Max SendQ exceeded]
jtdowney has joined #ruby
GreyHands has joined #ruby
<jhass>
badlands: so it's a CLI tool?
<badlands>
yes
alex88 has joined #ruby
<badlands>
jhass yes
jtdowney has quit [Read error: Connection reset by peer]
Sawbones has quit [Remote host closed the connection]
<omegahm>
You could also consider that `some_method` just works for `nil` as well.
<gregf_>
if val = ARGV.shift; Obj.call(val);end <= could be more readable
barhum2013 has quit [Quit: barhum2013]
<omegahm>
Maybe doing nothing.
<omegahm>
Let it be the responsibility of the callee instead of caller.
juanca_ has joined #ruby
<shevy>
omegahm yeah I wondered about that too
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<adaedra>
Depends on the method
juanca___ has joined #ruby
kp666 has quit [Quit: Leaving]
thatslifeson has joined #ruby
mrdmi has quit [Ping timeout: 252 seconds]
Guest15 has joined #ruby
mrmargolis has joined #ruby
mrdmi has joined #ruby
juanca__ has quit [Ping timeout: 240 seconds]
juanca_ has quit [Ping timeout: 256 seconds]
unreal has joined #ruby
juanca_ has joined #ruby
asmodlol has quit [Ping timeout: 265 seconds]
paulcsmith has joined #ruby
juanca__ has joined #ruby
nettoweb has joined #ruby
_ixti_ has joined #ruby
premera has joined #ruby
segfalt has quit [Ping timeout: 276 seconds]
asmodlol has joined #ruby
juanca___ has quit [Ping timeout: 276 seconds]
juanca_ has quit [Ping timeout: 240 seconds]
ixti has quit [Ping timeout: 276 seconds]
kaspernj has quit [Ping timeout: 272 seconds]
failshell has joined #ruby
kaleido has joined #ruby
Bira has joined #ruby
fabrice31_ has quit []
scripore has quit [Quit: This computer has gone to sleep]
scripore has joined #ruby
<Raverix>
Hello, I'm having a problem deploying a rails site to a new server that passenger appears to be ignoring. From what I can tell, passenger is installed properly, and apache is loading the module, but the site is just serving the default page. Any suggestions?
endash has joined #ruby
vudew has quit [Read error: Connection reset by peer]
umgrosscol has joined #ruby
ponga has quit [Quit: Leaving...]
ponga has joined #ruby
airdisa has quit [Remote host closed the connection]
chthon has joined #ruby
JDiPierro has joined #ruby
pandaant has quit [Remote host closed the connection]
<adaedra>
Raverix: see #RubyOnRails for specific Rails questions. Don't forget to inform if you cross-post though.
fabrice31 has joined #ruby
riotjone_ has quit [Remote host closed the connection]
nszceta has joined #ruby
blueOxigen has joined #ruby
iwishiwerearobot has quit [Quit: >:(]
bluOxigen has quit [Ping timeout: 276 seconds]
Dopagod has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
Xiti` has quit [Ping timeout: 250 seconds]
iasoon has joined #ruby
scripore has joined #ruby
fabrice31 has quit [Remote host closed the connection]
<Raverix>
adaedra: Sorry for not specifying it was a cross post, I wasn't getting much help in #RubyOnRails, so I thought I'd try here. The issue IMO is not related to rails, but rather with Passenger.
kaspernj has joined #ruby
nszceta has quit [Client Quit]
jsrn has quit [Ping timeout: 256 seconds]
fabrice31 has joined #ruby
<adaedra>
ah
arup_r has quit []
kaleido has quit [Ping timeout: 265 seconds]
shellfu_afk has joined #ruby
Matachines has joined #ruby
shellfu_afk is now known as shellfu
RegulationD has joined #ruby
EagleDelta has joined #ruby
Xiti has joined #ruby
fabrice31_ has joined #ruby
yosafbridge has quit [Ping timeout: 248 seconds]
juanca__ has quit [Remote host closed the connection]
Stalkr has joined #ruby
fabrice31 has quit [Ping timeout: 240 seconds]
senayar has joined #ruby
leafybas_ has joined #ruby
moeabdol has joined #ruby
marr has joined #ruby
werelivinginthef has joined #ruby
airdisa has joined #ruby
normalra has joined #ruby
leafybasil has quit [Ping timeout: 264 seconds]
tvw has quit []
zzing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dorei has joined #ruby
OddJob has quit [Quit: Page closed]
zzing has joined #ruby
rbennacer has joined #ruby
lessless has joined #ruby
asmodlol has quit [Ping timeout: 272 seconds]
yosafbridge has joined #ruby
blueOxigen has quit [Ping timeout: 246 seconds]
rrichardsr3 has joined #ruby
juanca_ has joined #ruby
bluOxigen has joined #ruby
MatthewsFace[SEA has joined #ruby
mitchellhenke has joined #ruby
rgb-one has quit [Read error: Connection reset by peer]
asmodlol has joined #ruby
zzing has quit [Ping timeout: 256 seconds]
<waxjar>
does someone have a good article (or talk) on caching headers bookmarked by any chance?
cryptarium has quit [Remote host closed the connection]
bollullera has joined #ruby
<shevy>
ohh
<shevy>
I think it is: <%= emojify "I like chocolate :heart_eyes:!", image_size: "36x36" %>
<shevy>
damn
<shevy>
Array#first is slower than Array#[0]
<shevy>
and here I was replacing all [0] with .first .... :(
<dudedudeman>
shevy: where are you located? because beer for me right now would mean beer at 9:15 in the morning. lol
<shevy>
central europe! \o/
chrissonar has quit [Remote host closed the connection]
<shevy>
and the sun is shining too, unlike ~500 km to the west of here haha
<shevy>
though I hate drinking beer when it is hot....
<dudedudeman>
oh oh. that's right, that cool country
* dudedudeman
wishes he was in not america
<shevy>
"Enumerable#each vs for loop"
mary5030 has joined #ruby
<shevy>
for loop is slower, haha
<shevy>
Array#reverse_each is faster than Array#reverse.each ... makes sense
<axisys>
m = Mechanize.new; m.get('https://www.google.com') gives nice output.. but m.get('https://www.companysite.com') gives OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed .. how to get around it?
<shevy>
Enumerable#sort_by code is faster than Enumerable#sort strangely enough
<jhass>
sort with a block has to make at least one transition more between Ruby and C land after all
<shevy>
sort_by has a block too or?
stoffus has quit [Ping timeout: 265 seconds]
<jhass>
yes, but the block content of .sort_by is usually less expensive
<shevy>
hmm
Parker0 has joined #ruby
<jhass>
a.something <=> b.something
<jhass>
vs x.something
<jhass>
method call dispatch Ruby<->C for <=>
<jhass>
and potentially additional recomputations of .something
asmodlol has quit [Ping timeout: 244 seconds]
ki0 has quit [Remote host closed the connection]
asmodlol has joined #ruby
<axisys>
m.get('https://www.cnn.com') gives same openssl cert verification error
andikr has quit [Remote host closed the connection]
<shevy>
hmm
ki0 has joined #ruby
<axisys>
I am testing it from within pry>
Guest15 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ndrei has quit [Ping timeout: 252 seconds]
<shevy>
axisys I am still trying to figure out openssl myself; I wanted to add a SSL certification to my ancient IRC bot and gave up when I could not find documentation
bluOxigen has quit [Ping timeout: 250 seconds]
<axisys>
may be some debug option will disclose the problem? I downloaded the ca cert from http://curl.haxx.se/
<axisys>
I am using ubuntu
Guest1421 has joined #ruby
juanpablo__ has joined #ruby
mengu has joined #ruby
moeabdol has quit [Ping timeout: 264 seconds]
jakolehm has quit [Ping timeout: 240 seconds]
Xoro has joined #ruby
yalue has joined #ruby
bluOxigen has joined #ruby
slash_nick has joined #ruby
Fingel has joined #ruby
mooe has quit [Quit: Connection closed for inactivity]
leafybas_ has quit [Read error: Connection reset by peer]
leafybasil has joined #ruby
jimms has joined #ruby
Oka has joined #ruby
lkba has joined #ruby
icebourg has joined #ruby
icebourg has quit [Max SendQ exceeded]
<axisys>
now getting little different error hostname 'www.cnn.com' does not match the server certificate
<axisys>
I changed the store.add_file to store.add_path
Igorshp has quit [Read error: Connection reset by peer]
paulcsmith has quit [Quit: Be back later ...]
soc42 has joined #ruby
asmodlol has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
paulcsmith has joined #ruby
jordanm has quit [Ping timeout: 276 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
moeabdol has quit [Ping timeout: 240 seconds]
huddy has joined #ruby
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
<axisys>
shevy: thanks.. currently I am doing a not recommended approach and by passing the verification.. I need to scrub the web page for some other testing.. I will go back and try to make it secure later..
<axisys>
shevy: after all all these are accessible from intranet only
Igorshp_ has quit [Ping timeout: 252 seconds]
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
snockerton has joined #ruby
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
Kricir has quit [Remote host closed the connection]
The_Phoenix has joined #ruby
rhllor has quit [Ping timeout: 264 seconds]
tjbiddle has joined #ruby
chrishough has joined #ruby
leafybasil has quit [Remote host closed the connection]
iotouch has quit [Quit: This computer has gone to sleep]
The_Phoenix has quit [Read error: Connection reset by peer]
Igorshp has joined #ruby
jhass has left #ruby ["WeeChat 1.1.1"]
jhass has joined #ruby
vtunka has quit [Quit: Leaving]
jobewan has joined #ruby
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
The_Phoenix has joined #ruby
iasoon has quit [Ping timeout: 240 seconds]
loechel has joined #ruby
chipotle has quit [Quit: cheerio]
rhllor has joined #ruby
failshell has quit [Remote host closed the connection]
that1guy has quit [Quit: This computer has gone to sleep]
momomomomo has joined #ruby
KeroroGunsou is now known as d0lph1n98
Igorshp has quit [Ping timeout: 264 seconds]
scripore has quit [Quit: This computer has gone to sleep]
anisha has quit [Quit: Leaving]
kraljev11 has joined #ruby
hackeron has joined #ruby
_tpavel has joined #ruby
alex88 has joined #ruby
mistermocha has joined #ruby
seako has left #ruby [#ruby]
JimmyNeutron has quit [Ping timeout: 256 seconds]
gsd has joined #ruby
mwlang has joined #ruby
JimmyNeutron has joined #ruby
<mwlang>
what’s the modern day approach to profiling ruby code? I haven’t done this since Ruby 1.8.6 and have an app I need to optimize. I have fully covering test specs in rspec if that helps.
_tpavel has quit [Client Quit]
symbol has joined #ruby
Igorshp has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
kraljev11 has quit [Read error: Connection reset by peer]
moeabdol has joined #ruby
GaryOak_ has joined #ruby
juanca_ has quit [Remote host closed the connection]
nettoweb has joined #ruby
Eiam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
Then, you join again with join(' ') and get a string
dANO has quit []
SouL_|_ has joined #ruby
Igorshp has joined #ruby
<gambl0re>
what if we did the code without the &: and just(capitalize)
<mwlang>
gambl0re: &:capitalize is short-hand for .collect{|str| str.capitalize}
barhum2013 has joined #ruby
<adaedra>
capitalize is not a variable
The_Phoenix has quit [Read error: Connection reset by peer]
<adaedra>
&: is just syntax sugar
pokui has quit [Remote host closed the connection]
<ericwood>
& converts it to a proc basically
jackjackdripper has joined #ruby
msgodf has quit [Remote host closed the connection]
<ericwood>
but only when used in a method arg it's kinda weird
<kenichi>
every question in here is symbol.to_proc lately
<adaedra>
*dunno face*
<kenichi>
mwlang: does not include '.collect', just the proc
<gambl0re>
whats the difference between .collect and .map and .each?
<mwlang>
kenichi: I was unclear about that.
<adaedra>
#collect and #map are the same
<adaedra>
#each just iterates other each element, not returning a new array, iirc
<kenichi>
collect/map are aliases, both creating new arrays with results; each just interates
freerobby has joined #ruby
<adaedra>
s/other/over/
The_Phoenix has joined #ruby
joonty has quit [Quit: joonty]
<adaedra>
English iz hard
<kenichi>
adaedra++ ;)
that1guy has joined #ruby
rbennacer has joined #ruby
<gambl0re>
we can only use .each with an array or hash?
moretti has joined #ruby
<adaedra>
With any Enumerable
slash_nick has quit [Changing host]
slash_nick has joined #ruby
<mwlang>
adaedra: only because it’s a mashup of every other language in the world. If we like something in another language, we adopt it and toss the accents. :-p
<adaedra>
mwlang: "café"
The_Phoenix has quit [Read error: Connection reset by peer]
colorados has quit [Ping timeout: 246 seconds]
alex88 has quit []
juanca_ has joined #ruby
barhum2013 has quit [Ping timeout: 265 seconds]
<mwlang>
adaedra: some are slower than others to drop…”cafe” and "café" are common.
<adaedra>
so you write deja-vu?
konsolebox has quit [Remote host closed the connection]
<adaedra>
eh, it's still better than swedish that just keeps the word but rewrites it
The_Phoenix has joined #ruby
<mwlang>
adaedra: yeah…we write deja vu (no hyphen)
<adaedra>
:|
<adaedra>
déjà-vu
<mwlang>
who’s got time to type accents on a keyboard anyhow? :-)
chipotle has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
<adaedra>
Like it's hard
rbennacer has quit [Ping timeout: 252 seconds]
<thatslifeson>
it's harder than it should be
<gambl0re>
"David Copperfield".split.collect(&:capitalize).join(' ') =====>.split (splits strings into array) .collect (collects string elements) &:capitalize (& used to conver array into proce in order to capitalize array elements) .join(' ') used to convert array to string?
<thatslifeson>
we should have UTF-16 keyboards
<thatslifeson>
with every possible key
<thatslifeson>
should work great
<thatslifeson>
wouldn't take up much room
asmodlol has quit [Ping timeout: 272 seconds]
<mwlang>
thatslifeson: that sounds like a fun keyboard to put on Kickstarter
<adaedra>
gambl0re: collect doesn't really collects... it will take each element, pass it in the given block (here &:capitalize which just calls capitalize) and return a new array containing the result
<thatslifeson>
lol
<thatslifeson>
it would be ridiculously huge
<thatslifeson>
and if it wasn't, it'd be overcomplicated
konsolebox has joined #ruby
<adaedra>
but otherwise, seems right
<thatslifeson>
there is no easy solution except to unify languages :P
<thatslifeson>
(not CS languages)
Zekka has quit [Ping timeout: 250 seconds]
<adaedra>
thatslifeson: 102 keys are enough already
asmodlol has joined #ruby
Sawbones_ has joined #ruby
<thatslifeson>
lol
<adaedra>
Compose-key system is great
<thatslifeson>
for english
<thatslifeson>
thank god for pinyin
kraljev11 has quit [Read error: Connection reset by peer]
<adaedra>
why don't they use letters like anybody else >_>
bricker has joined #ruby
<mwlang>
thatslifeson: sounds like you just described English, to me. :-D
scripore has joined #ruby
kraljev11 has joined #ruby
Sawbones_ has quit [Remote host closed the connection]
vire has quit [Ping timeout: 252 seconds]
<gambl0re>
and becaues capitalize is not a variable with need to put the : in front of it?
Mezjin has quit [Ping timeout: 264 seconds]
<adaedra>
:capitalize is a symbol
<thatslifeson>
^
<adaedra>
you put & before to transform it as a proc and pass it to capitalize
<symbol>
I chose a terrible name :)
<adaedra>
yeah, I saw your name colored, and told myself "oops"
<thatslifeson>
lol
<adaedra>
but at least, typing "symbol" is easy with completion :p
<symbol>
heh, yeah. I still like it despite the occasional ping
<symbol>
It makes me feel like I have friends.
<symbol>
bahaha.
* adaedra
pats symbol
* symbol
sniff
<symbol>
Thanks.
<apeiros>
adaedra: actually you transform it to a block, not a proc
<gambl0re>
so i can do &:upcase , &:downcase &:swapcase ?
<apeiros>
and as adaedra said, it denotes an instance variable. and instance variables belong to/are scope to a self
moeabdol has joined #ruby
<baweaver>
JS Scope is notoriously finicky.
<adaedra>
JS is a mess :x
<claw_>
i am receiving some deflated data from a server as a string. I can tell the server how much data i want (number of lines) . sometimes i get "incorrect header check" by zlib. if i reduce the number of lines the exception is not raised.
<baweaver>
you're going to want to read through a few articles on it.
<eam>
claw_: what do you mean number of lines? There aren't any lines in a compressed stream
granthatcher has quit []
EagleDelta has quit [Remote host closed the connection]
<claw_>
eam: i tell the server i want 50 lines and it deflates them an sends them as a stream terminated by ".\r\n"
<claw_>
where line is a formatted dataset
psy_ has joined #ruby
<claw_>
actually its nntp using xover if you know about nntp
dramagods has quit []
baweaver has quit [Remote host closed the connection]
<eam>
claw_: have you dumped out the data you're reading to see what's actually in it?
quimrstorres has quit [Remote host closed the connection]
<claw_>
yes and it looks just valid
leafybas_ has joined #ruby
<eam>
the header is correct?
Cust0sL1men has quit [Ping timeout: 255 seconds]
<eam>
claw_: I'm curious if you're perhapss mixing deflate and gzip compression formats
gazay has joined #ruby
lkba has quit [Ping timeout: 256 seconds]
mjuszczak has joined #ruby
quimrstorres has joined #ruby
Rollabunna has quit [Remote host closed the connection]
lidenskap has joined #ruby
leafybasil has quit [Ping timeout: 252 seconds]
Rollabunna has joined #ruby
<mwlang>
has anyone tried to use the stackprof gem? I’m using it, but all it seems to capture is my rspec examples and not the actual calls into the app’s code.
leafybas_ has quit [Ping timeout: 240 seconds]
c0m0 has quit [Ping timeout: 264 seconds]
<claw_>
eam: its correct in 99.9% of the time. and i am doing nothing different with the 0.01% thats what actually confuses me the most
jobewan has quit [Quit: Leaving]
<eam>
where's the input coming from?
ismaelga has quit [Remote host closed the connection]
<claw_>
from an nntp server i cant control
gluten_hell has quit [Quit: Computer has gone to sleep.]
<eam>
right so, perhaps it's presenting a different compressed format? There are AFAIK three possibilities
<mwlang>
claw_: I’m just speculating, but I’m thinking there’s a possible boundary issue with the size of the data being returned. perhaps the error’s only occurring when you have an input size that is a multiple of 64 or is not a multiple of 64.
<claw_>
mwlang: i works most of time so multiple of 64 theorie might fit
thiagovsk has joined #ruby
<claw_>
mwlang: if that happens to be true how could i fix it ?
Soda has quit [Remote host closed the connection]
RegulationD has quit [Remote host closed the connection]
<mwlang>
claw_: I’d work on capturing the data so you can examine it offline and then see if that’s the case before trying to figure out how to fix.
<mwlang>
I’m just not all that familiar with decompressing the way you’re doing it with Ruby…but I’ve done similar tasks with C and Pascal back in the day.
<claw_>
yes i am currently waiting for that data because it happens rarely
<mwlang>
and it was a matter of ensuring the buffer sizes were correct.
giuseppesolinas has quit [Quit: Leaving]
ismaelga has joined #ruby
nik_-_ has joined #ruby
Hijiri has quit [Quit: WeeChat 1.0.1]
kraljev11 has quit [Ping timeout: 264 seconds]
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
wchun has quit [Quit: Leaving]
xcesariox has joined #ruby
segfalt_ has joined #ruby
ismaelga has quit [Remote host closed the connection]
peteykun has joined #ruby
fuzzyhorns1 has joined #ruby
mrmargol_ has joined #ruby
segfalt has quit [Ping timeout: 256 seconds]
segfalt_ is now known as segfalt
ismaelga has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
<fuzzyhorns1>
is there any way to pass a ruby option in to an executable? like i want to pass a ruby level option in to rubocop — nonsense?
ki0 has joined #ruby
zlude has joined #ruby
nik_-_ has quit [Remote host closed the connection]
ndrei has joined #ruby
<shevy>
you can modify rubocop's behaviour
<zlude>
Hello! I want to 'simulate' a browser request using Ruby. Why? Because I need access a page that set some cookies and then access another page that require these cookies, is that possible? someone can help me? thank you!
mrmargolis has quit [Ping timeout: 256 seconds]
<shevy>
I am not sure what you mean with an "executable" though
noname1 has joined #ruby
moted has quit [Read error: Connection reset by peer]
failshell has quit []
<mwlang>
Is there a good call graph viewer for macs? Something like KCachegrind?
<shevy>
fuzzyhorns1 why not define an alias? alias rubocop=path_to_rubocopy; or use a script with a proper shebang, then you don't have to use leading "ruby"
<shevy>
alias rubocop='path to rubocop here'
baweaver has joined #ruby
<shevy>
hmm it is probably in bin/rubocop so just add it to PATH, and look at the shebang line is correct
scripore has quit [Client Quit]
pabloh has quit [Remote host closed the connection]
Mohan__ has quit [Ping timeout: 256 seconds]
jackjackdripper has quit [Quit: Leaving.]
charliesome has joined #ruby
Mohan has joined #ruby
scripore has joined #ruby
Mohan is now known as Guest56508
swgillespie has joined #ruby
rbirch has quit []
<shevy>
is there a way to find out how non-flattened an array is, at max?
scripore has quit [Client Quit]
<shevy>
[[['foo','bar']]].flatten_level? # 3
cryptarium has joined #ruby
<shevy>
I just inflated one Array from [['foo,bar']] into [[['foo','bar']]] precisely... wonder how I did that
casadei_ has quit [Remote host closed the connection]
<shevy>
obviously one new layer I got via .split(',')
<shevy>
ohhh .flatten accepts an argument
<picasso>
hey y'all, whats the cleanest way to split an array into first, [rest] ?
<gambl0re>
i dont dont under stand this ===> if %w(the and over).include?(word)
<jhass>
gambl0re: let's do something called rubber ducking, explain to us what you think the code does (and everybody else remains silent for a moment)
<baweaver>
>> if ["the","and","over"].include?('and') then :true else :false end
<dudedudeman>
don't change the subject on me mister
<shevy>
we have a beaver and a dudette
joelataylor has joined #ruby
<dudedudeman>
who's the dudette!?
ki0 has quit [Ping timeout: 264 seconds]
<shevy>
why do you have double dude there
blackmesa has quit [Ping timeout: 272 seconds]
loechel has quit [Ping timeout: 256 seconds]
<dudedudeman>
because i can't use dude... dude.... man... come on... as a user name
bigmac has quit [Ping timeout: 272 seconds]
<dudedudeman>
:P
<gambl0re>
i could never understand the ruby-docs. they use a simple concept and put in a very confusing example.
lavros has quit [Quit: leaving]
musty_ has quit [Quit: leaving]
jottr has joined #ruby
<baweaver>
Really? They're a lot better than some other docs
DerisiveLogic has joined #ruby
quimrstorres has quit [Remote host closed the connection]
<shevy>
gambl0re yeah. I ended up collecting documentation on my own - in german though
<gambl0re>
what about the "david copperfield" example?
<jhass>
gambl0re: IME it helps a lot to play around with it, do you have irb or pry locally?
<gambl0re>
i have irb
moretti has joined #ruby
<jhass>
?pry
<ruboto>
Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting ’binding.pry’ directy in your source code. Visit https://pryrepl.org/ or get it now with gem install pry pry-doc
<shevy>
\o/
qwertme has joined #ruby
<shevy>
now you can test stuff!
<baweaver>
Rails docs are a step up, ala Radar
<shevy>
I guess so
<shevy>
rails will become the new ruby eventually
jaygen has quit []
moretti has quit [Remote host closed the connection]
moretti_ has joined #ruby
swgillespie has joined #ruby
<gambl0re>
david copperfield does not match "the" "and" "over" so it passes to else statement
<gambl0re>
word.capitalize
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<gambl0re>
word.capitlize = David Copperfield ?
fuzzyhorns1 has left #ruby [#ruby]
<gambl0re>
and i assume it would be the same for "jaws"
baweaver has quit [Remote host closed the connection]
<gambl0re>
if its thats the case then line 14-15 for?
huddy has quit [Quit: Connection closed for inactivity]
<GaryOak_>
audience.gasp && audience.applause
dfinninger has quit [Remote host closed the connection]
<Peetooshock>
NoMethodError
swgillespie has quit [Client Quit]
postmodern has joined #ruby
<dudedudeman>
i have a field which writes to my database as a boolean, but i want the user to only be able to input yes or no as options, not type out true or false. i've attempted to type out a method for this, but i'm apparently doing it wrong.. is there a better way to do this?
RegulationD has quit [Ping timeout: 272 seconds]
<jhass>
gambl0re: s is "david copperfield", so what's s.split ?
<gambl0re>
i removed lines 14-15 and it still passed the test..
ndrei has joined #ruby
<adaedra>
GaryOak_: I laughed
Mon_Ouie has joined #ruby
<shevy>
gambl0re remember = vs. ==
<GaryOak_>
adaedra: I'm glad someone got it ;)
Guest1421 has joined #ruby
jobewan has joined #ruby
<gambl0re>
i think we all know who david copperfield is..
<shevy>
p0rnstar
tonyhb has quit [Quit: peace]
<shevy>
or a trickster
<shevy>
a PICKPOCKET
<shevy>
he stole an airplane once
<gambl0re>
["david","copperfield]
<shevy>
that is not valid syntax!
RegulationD has joined #ruby
<jhass>
gambl0re: so what's word?
<gambl0re>
it doesnt match the first if statement. passed on to else and gets capitalized..
<gambl0re>
word is "david" and "copperfield"
psy_ has quit [Read error: Connection reset by peer]
<jhass>
and what's the result of the .map call?
surs has quit [Ping timeout: 244 seconds]
<shevy>
:)
psy_ has joined #ruby
<shevy>
.map is a super convenient method gambl0re
<gambl0re>
i dont know...
<shevy>
you can check live in irb
<shevy>
if you are on linux, just have one irb session running all the time
kiki_lamb has quit [Ping timeout: 272 seconds]
<gambl0re>
im on windows with linux vm
<shevy>
awww :(
ramfjord has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
towski_ has joined #ruby
<gambl0re>
what is the result of the .map?
kiki_lamb has joined #ruby
yfeldblum has joined #ruby
<shevy>
.map should yield you back a modified array
<shevy>
either the normal word (unchanged), or upcased, in your example
<shevy>
perhaps crystal will become the simpler ruby
<shevy>
gambl0re how did you come to pick ruby by the way?
Igorshp has joined #ruby
<jhass>
shevy: doubt it ;)
ramfjord has quit [Ping timeout: 240 seconds]
<gambl0re>
im trying to learn web development....i had already learned html/css. learned some javascript/jquery for front end then chose ruby as backend
scripore has joined #ruby
Motoservo has joined #ruby
scripore has quit [Client Quit]
<gambl0re>
i didnt choose...the course chose it for me..
<jhass>
shevy: though Matz seems to watch it :D
<gambl0re>
and im worried that what im learning now wont be relevant in the next 10 years or so..
casadei_ has joined #ruby
<gambl0re>
and ill have to relearn a whole new programming language.
<dudedudeman>
are you working on the Cyrstal project, jhass?
<jhass>
gambl0re: at this stage you're learning programming
jackjackdripper has joined #ruby
<jhass>
gambl0re: the language is just the tool, the skill is easily transferred to others
<gambl0re>
yea cant you tell by the questions im asking..
<shevy>
jhass really? how do you know?
<al2o3-cr>
yxhuvud: yeah i was just wondering what use case a flip flop op would have in day to day coding :)
<shevy>
gambl0re well what other language would you want to pick? php? python?
<jhass>
dudedudeman: mh, more as evangelist I guess ;P
<gambl0re>
i keep reading php is dieing and has security flaws..
<dudedudeman>
jhass: ha, i support it. i've been lurking along with it, over on reddit as well
scripore has joined #ruby
scripore has quit [Client Quit]
jack_rabbit has joined #ruby
<shevy>
well there is python then
<shevy>
you could use django
<gambl0re>
and a lot of these coding bootcamps are teaching ruby/rails so i thought i should learn it.
lodgenbd has quit [Quit: Leaving]
<gambl0re>
and like i said ruby was supposed to be "easy" to learn..
<dudedudeman>
gambl0re: you're very much where i was a year or two ago. i had learned html/css and was looking for a scripting language to go along with it, and i started touching python
<dudedudeman>
gambl0re: but what I realized, is that i was focusing on learning a syntax, rather than the actual logic and patterns that would lead me to using that syntax in the first place
<shevy>
ruby is quite big as a whole
ndrei has joined #ruby
swgillespie has joined #ruby
<jhass>
gambl0re: don't worry, ruby is fine to teach you programming, other languages won't make it easier, once you can work with Ruby it'll be a lot easier to pick up other languages
yokel has quit [Ping timeout: 272 seconds]
<shevy>
jhass haha matz announced crystal?!
<jhass>
shevy: well, shared the release blogpost ;)
<jhass>
we also have his permission to copy paste documentation :D
jobewan has joined #ruby
<gambl0re>
well im hoping to learn enough about ruby/rails in 3 months combined with my html/css,javascript skills to get a entry level job
ferr has quit [Quit: WeeChat 1.1.1]
<gambl0re>
i dont know if thats realistic or not but who knows..
sohrab has quit [Ping timeout: 272 seconds]
casadei_ has quit [Ping timeout: 264 seconds]
yokel has joined #ruby
<jhass>
gambl0re: it depends on the person tbh, some can do it in 3 months, some take more time
<gambl0re>
dudeman are you web developer?
Hirzu has quit [Remote host closed the connection]
lidenskap has quit [Remote host closed the connection]
<jhass>
there's no general rule
<dudedudeman>
gambl0re: it is of my opinion that if you're going to gun for a job that quickly, then you might want to just focus on the html/css/javascript side of things, get the postiion, then keep learning/implementing ruby until you are extremely comfortable with it
Matthews_ has quit [Remote host closed the connection]
quimrstorres has joined #ruby
<dudedudeman>
gambl0re: yes? i have a few freelance clients that i've coded for on top of a template, and then i have my projects which i've been using to learn. those projects are going ot be what i hope get my first entry level job
<gambl0re>
if you take a look you'll see that theres crap loads of ruby...
<gambl0re>
have you done it?
<dudedudeman>
i've gone through a good chunk of it
<gambl0re>
how far are you?
<dudedudeman>
let me log in and check
casadei_ has joined #ruby
freerobby has quit [Quit: Leaving.]
ndrei has quit [Ping timeout: 240 seconds]
cryptarium has quit [Ping timeout: 272 seconds]
<dudedudeman>
well, i was using that as a guide, but learned a bit of out of order
tonyhb has joined #ruby
Guest1421 has quit [Ping timeout: 240 seconds]
<dudedudeman>
i 'learned' html5, css, basic javascript and jquery before doing any ruby
claw has quit [Ping timeout: 264 seconds]
<dudedudeman>
and a lot of the ruby i know now would pass for what this course has you learning
<dudedudeman>
if that makes sense
cryptarium has joined #ruby
claw has joined #ruby
quimrstorres has quit [Ping timeout: 255 seconds]
Zekka has quit [Ping timeout: 255 seconds]
<gambl0re>
are you sure? you should take a look at some of the stuff they want you to do.
<gambl0re>
some of the ruby assignments are hard..
<dudedudeman>
yeah but they're not meant to be hard enough to impede your learning advancement
moretti_ has quit [Remote host closed the connection]
<dudedudeman>
don't let yourself get stuck on one for a week. if you need to move on, refresh your mind, and then come back, do it
Guest1421 has joined #ruby
<gambl0re>
yea but i hate it when i cant understand a certain concept but sometimes its better to continue on and later things click.
<dudedudeman>
are you ingesting any other learning resources aside from the odin project?
yoni has joined #ruby
<gambl0re>
irc...and google.
yoni is now known as Guest56726
<gambl0re>
codecademy, codeschool and any other free lessons i can fidn online.
Sawbones_ has joined #ruby
Altonymous has joined #ruby
<dudedudeman>
ah. word. i found for me, this is just my personal experience, that sometimes stepping away from the exact project/lesson i'm working on, and ingesting something similar but presented in an entirely different way, was really helpful
<dudedudeman>
for instance, listening to the ruby rogues podcast. i started hearing all these terms and buzzwords that seemingly everyone already knew, and i was like, wait... i need ot go look those up
Parker0 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dudedudeman>
so i would, and i would start finding things that i had been learning about codecademy or codeschool and it would start tying together
jamesaxl has joined #ruby
<jamesaxl>
hi
<jamesaxl>
could i convert script ruby to binary ?
<shevy>
gambl0re yeah that would be my advice in ruby - keep it as simple as possible. ignore any concept that you don't need for now, make your life as simple as possible - minimal ruby
Hirzu has joined #ruby
ixti has joined #ruby
slash_nick has joined #ruby
<shevy>
you could use ruby just like javascript really
<gambl0re>
ok!!
<dudedudeman>
gambl0re: do you like reading books? the prag prog guide to programming ruby is really good
<shevy>
ruby has Structs and OpenStruct too, so you can have objects at runtime where you can at-will add new methods and have query methods and setter methods to them
<shevy>
I guess these would be similar to the javascript objects
_djbkd has quit [Remote host closed the connection]
_djbkd has joined #ruby
DerisiveLogic has quit [Ping timeout: 256 seconds]
asmodlol has quit [Ping timeout: 250 seconds]
workmad3 has joined #ruby
keen________ has quit [Ping timeout: 250 seconds]
Rapier- has quit [Quit: (null)]
longfeet has joined #ruby
asmodlol has joined #ruby
Hijiri has quit [Ping timeout: 246 seconds]
wolflee_______ has joined #ruby
codecop has quit [Remote host closed the connection]
yh has quit [Ping timeout: 256 seconds]
wolflee______ has quit [Read error: Connection reset by peer]
<shevy>
cute little beaver
workmad3 has quit [Ping timeout: 265 seconds]
<shevy>
trying to teach itself how to code when it could instead rampage some trees down
crus has quit [Remote host closed the connection]
crus has joined #ruby
blueOxigen has quit [Ping timeout: 272 seconds]
casadei_ has joined #ruby
eichenwald has quit [Ping timeout: 256 seconds]
al2o3-cr has quit [Ping timeout: 256 seconds]
Sawbones_ has joined #ruby
alol___ has quit [Ping timeout: 256 seconds]
cbetta has quit [Ping timeout: 256 seconds]
Guest15 has joined #ruby
poguez_ has quit [Read error: Connection reset by peer]
mostlybadfly has quit [Read error: Connection reset by peer]
cardoni has quit [Read error: Connection reset by peer]
frem has quit [Read error: Connection reset by peer]
BackEndCoder has quit [Ping timeout: 256 seconds]
Billias has quit [Ping timeout: 256 seconds]
alol___ has joined #ruby
cardoni has joined #ruby
cbetta has joined #ruby
konsolebox has quit [Remote host closed the connection]
poguez_ has joined #ruby
sfr^ has quit [Ping timeout: 256 seconds]
eichenwald has joined #ruby
frem has joined #ruby
mostlybadfly has joined #ruby
vickleton has quit [Ping timeout: 256 seconds]
kofione has quit [Quit: Leaving...]
Hien has quit [Ping timeout: 256 seconds]
lidenskap has quit [Remote host closed the connection]
maletor has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cgrieger is now known as cgrieger^away
andikr has quit [Remote host closed the connection]
sfr^ has joined #ruby
BackEndCoder has joined #ruby
Billias has joined #ruby
asmodlol has quit [Ping timeout: 252 seconds]
Kricir has joined #ruby
tvw has joined #ruby
Soda has quit [Ping timeout: 255 seconds]
vickleton has joined #ruby
sohrab has joined #ruby
asmodlol has joined #ruby
Soda has joined #ruby
Guest26504 has quit [Ping timeout: 244 seconds]
Hien has joined #ruby
yh has joined #ruby
neonalpine has joined #ruby
MatthewsFace[SEA has joined #ruby
kofione has joined #ruby
Mohan__ has joined #ruby
neonalpine has quit [Remote host closed the connection]
Bira has quit [Remote host closed the connection]
TheHodge has joined #ruby
wolf4ood_ has joined #ruby
joonty has joined #ruby
joonty has quit [Client Quit]
quimrstorres has joined #ruby
shock_one has joined #ruby
JDiPierro has quit [Remote host closed the connection]
Hirzu has joined #ruby
tvw has quit []
Matachines has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
quimrstorres has quit [Ping timeout: 264 seconds]
mrmargol_ has quit [Remote host closed the connection]
x1337807x has joined #ruby
Hijiri has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
Hirzu has quit [Ping timeout: 246 seconds]
momomomomo has joined #ruby
hololeap has joined #ruby
momomomomo has quit [Client Quit]
bruno- has joined #ruby
Mohan__ has quit [Ping timeout: 255 seconds]
nemesit|znc has quit [Quit: quit]
Hirzu has joined #ruby
bruno- is now known as Guest39059
doodlehaus has quit [Remote host closed the connection]
<hololeap>
how can i remove an arbitrary amount of parent directories from a Pathname? for instance, i have Pathname.new('/mnt/cifs/foo/bar') and i want to get 'foo/bar' (the '/mnt/cifs/' part is chopped off)
Mohan has joined #ruby
rien has joined #ruby
Mohan is now known as Guest63259
baweaver has quit [Remote host closed the connection]
mallu has joined #ruby
<rien>
"this string has a number: 4567".what_method_am_I_looking_for(/(\d+)/, "the number was $1") # => "the number was 4567"
<hololeap>
apeiros: awesome. i missed that method in the docs. thanks!
al2o3-cr has joined #ruby
<apeiros>
rien: it helps to understand the tools you use instead of just swearing about how they are not supposed to be used…
leafybasil has joined #ruby
Hirzu has joined #ruby
<apeiros>
mallu: found a solution yet?
someguy has quit [Quit: This computer has gone to sleep]
<rien>
apeiros: are you saying there's a way to have gsub do this?: "this number: 4567 and another: 55".simple_gsub(/(\d+)[^\d]+(\d+)/, "here: $1 and $2") # => "here: 4567 and 55"
<rien>
apeiros: I read a bunch of pages on capture groups and backreferences in ruby and none of them have a clear example like that
Bira has joined #ruby
<apeiros>
no
<apeiros>
gsub is the wrong tool
<apeiros>
but it's unclear to me what you want to achieve.
<rien>
apeiros: it seems right with its block variant
<apeiros>
>> "here: %d and %d" % "this number: 4567 and another: 55".scan(/\d+/)
<apeiros>
otherwise I'll show you an example of an expanding number series and let you guess the algorithm behind.
<rien>
apeiros: I want to be able to provide some capture groups and then have them be accessible via backreferences in the new string I'm building
zzing_ has joined #ruby
jenrzzz_ has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chipotle has quit [Quit: cheerio]
<apeiros>
rien: you're describing your desired solution instead of the problem.
Soda has quit [Remote host closed the connection]
jerius has quit [Quit: /quit]
<apeiros>
gsub provides you the captures. in the replacement string via \1-\n
rbennace_ has joined #ruby
<rien>
apeiros: I'm describing the function/method I'm looking for in terms of inputs and outputs. its inputs must be the capture groups, the string matched, and the string that contains the backreferences. the output should be the string with the backreferences having been replaced by the result of matching the capture groups
<apeiros>
rien: as said, you're describing your desired solution. not your problem. to the extent of your question, I gave you two answers.
<mallu>
apeiros: Testing hololeap's suggestion
<rien>
apeiros: regarding what you said about gsub and \1 \2... : "this number: 4567 and another: 55".gsub(/(\d+)[^\d]+(\d+)/, "here: \1 and \2") #=> "this number: here: \u0001 and \u0002"
<apeiros>
if you want better answers, come up with a better question. best by describing the actual problem.
zzing has quit [Ping timeout: 256 seconds]
baweaver has joined #ruby
<apeiros>
rien: \ in " is an escape character. you need either ' or \\
someguy has joined #ruby
<apeiros>
>> "this number: 4567 and another: 55".gsub(/\D*(\d+)\D+(\d+)/, "here: \\1 and \\2")
<rien>
apeiros: yep, that is indeed the example I never could find: "this number: 4567 and another: 55".gsub(/(\d+)[^\d]+(\d+)/, "here: \\1 and \\2")
<rien>
apeiros: thanks!
<apeiros>
from `ri String#gsub`: ""hello".gsub(/([aeiou])/, '<\1>') #=> "h<e>ll<o>""
barkerd427 is now known as zz_barkerd427
rbennacer has quit [Ping timeout: 256 seconds]
rodfersou has quit [Quit: leaving]
rbennace_ has quit [Ping timeout: 272 seconds]
Hirzu has quit [Ping timeout: 256 seconds]
Cust0sL1men has joined #ruby
<hololeap>
mallu: what version of ruby are you using?
<rien>
apeiros: thanks again for the help and patience, this helped me!
<apeiros>
yw
baweaver has quit [Remote host closed the connection]
<mallu>
hololeap: 1.9.3
baweaver has joined #ruby
edwinvdg_ has joined #ruby
<mallu>
hololeap: sorry I had a space between map and (
someguy has quit [Quit: This computer has gone to sleep]
<hololeap>
mallu: ok :)
rien has quit [Quit: Page closed]
edwinvdgraaf has quit [Ping timeout: 264 seconds]
<mallu>
hololeap: this is giving me all the ELBs. I only want the ELBs that has instance.status == OutOfService
rodfersou has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
someguy has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
<hololeap>
mallu: that's why i included select {|i| i.state == "OutOfService" } ... that should do the same filtering that you had in your original code
Guest63259 has quit [Ping timeout: 256 seconds]
normalra has quit [Quit: WeeChat 1.1.1]
shock_one has quit [Remote host closed the connection]
jph98 has joined #ruby
Hijiri has quit [Quit: WeeChat 1.0.1]
shock_one has joined #ruby
<mallu>
hololeap: puts " ELB: #{elb} InstanceID: " + This will display all the ELBs
Guest24 is now known as lele
Mohan__ has joined #ruby
tonyhb has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mallu>
hololeap: I only want to display elbs that has i.state == OutOfService
zzing_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
m8 has quit [Quit: Sto andando via]
<apeiros>
mallu: hololeaps code does that. so if yours doesn't - gist up what you did
workmad3 has joined #ruby
Matachines has joined #ruby
chrishough has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<[Franklin]>
is line 224 a function call to config?
<apeiros>
`config` can be either a local variable or a method
<apeiros>
with the given excerpt it's not possible to determine.
<[Franklin]>
sorry, never really used ruby before :(
<[Franklin]>
time for a little crash course before I get back
<apeiros>
you know it's a method call if there's no assignment to a local variable in the same local variable scope.
<apeiros>
if there's none, then it's a method call.
someguy has quit [Client Quit]
<apeiros>
and in `config['allowed_ips']`, the ['allowed_ips'] is then a method call on the value of `config`
momomomomo has quit [Ping timeout: 276 seconds]
<[Franklin]>
ok
chipotles has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
with the ||= it's actually up to two method calls.
<apeiros>
`a ||= b` is syntax sugar and expands to `a || a = b`
Hijiri has joined #ruby
<apeiros>
so `config['allowed_ips'] ||= []` expands to `config['allowed_ips'] || config['allowed_ips'] = []`
michael_mbp has quit [Excess Flood]
quimrstorres has joined #ruby
<[Franklin]>
so is the [...] like a subscript in C?
quazimodo has quit [Ping timeout: 272 seconds]
<apeiros>
which means in english: either the value at key 'allowed_ips', or an empty array - and the empty array is also associated with the 'allowed_ips' key in the same turn
rhllor has quit [Quit: rhllor]
<apeiros>
no, [] is a method ca..
<apeiros>
*call
CaptainCibai has joined #ruby
<[Franklin]>
which performs a key->value lookup?
Zen-Zen has joined #ruby
yh has quit [Ping timeout: 264 seconds]
<apeiros>
>> class Foo; def [](key); "You called [] with #{key.inspect}"; end; end; foo = Foo.new; foo["plerp"]
<apeiros>
[Franklin]: no, which performs whatever your method definition states to perform
slash_nick has quit [Ping timeout: 240 seconds]
asmodlol has quit [Ping timeout: 250 seconds]
<apeiros>
the only thing special about it is how you can invoke it. i.e. that you can do foo[arg1, arg2, …] instead of foo.[](arg1, arg2, …) - note, the latter works too.
<[Franklin]>
ok
michael_mbp has joined #ruby
<apeiros>
but yes, with a hash - which config likely is - it's a key-value lookup
AlphaAtom has joined #ruby
<apeiros>
if you know the author of the code, you can tell them that there's YAML.load_file
<ruboto>
al2o3-cr # => ''-..-''-..-''-..-''-...-''-..-''-..-''-..-'''-..-''-..-''-..-''-...-''-..-''-..-''-..-'''-..-''-..- ...check link for more (https://eval.in/328350)
Juanchito has quit [Quit: Connection closed for inactivity]
<apeiros>
so, personal playtime with the bot is over kids
<apeiros>
use your own pry/irb please
someguy has quit [Quit: This computer has gone to sleep]
<ericwood>
shut up, dad!
Altonymous has quit [Quit: Altonymous]
SouL_|_ has quit [Ping timeout: 272 seconds]
<apeiros>
this dad wields the !kick and !ban hammers, so careful there with the uppity :-p
DynamicMetaFlow has joined #ruby
<al2o3-cr>
whos zzak?
someguy has joined #ruby
riotjones has quit [Ping timeout: 272 seconds]
<al2o3-cr>
i thought founder was fflush?
scripore has joined #ruby
Bira has joined #ruby
<apeiros>
was
<apeiros>
he was retired
<al2o3-cr>
he gave it up?
<apeiros>
zzak is a member of ruby-core
<apeiros>
no
<al2o3-cr>
ah ok ;)
someguy has quit [Client Quit]
chipotles has joined #ruby
<claw>
mwlang: remember me ? zlib error ?
<claw>
eam: you there ?
<apeiros>
he was chronically unreachable and barely ever in the channel
momomomomo_ has joined #ruby
DefV has joined #ruby
goggy has quit [Ping timeout: 240 seconds]
shock_one has quit [Remote host closed the connection]
<Radar>
claw: just ask your question and someone else can probably help
Pupeno has quit [Remote host closed the connection]
<mozzarella>
What, did he have a social life?
<Radar>
mozzarella: Unfortunately it would seem that way.
momomomomo has quit [Ping timeout: 240 seconds]
momomomomo_ is now known as momomomomo
jottr has quit [Ping timeout: 244 seconds]
chinmay_dd has quit [Read error: Connection reset by peer]
<al2o3-cr>
apeiros: so did you have to beg freenode or what?
that1guy has joined #ruby
<claw>
okay well then: i am facing sometimes a error when inflating a deflated stream. the stream is sent from the server. i specify the ammount data it should send as the amount of dataset i want
<apeiros>
al2o3-cr: something like that.
<al2o3-cr>
;p
<claw>
the error is buffer error followed by incorrect header check
<claw>
from zlib class
<claw>
if i get that error an rerequest the same amount of data i am getting the same error. so there no data malformed randomly by transfer or something
<claw>
if i change the amount of data i am requesting i can inflate it
<claw>
no a few hours after asking that question already i was able to export a stream i cannot inflate
wallerdev_ has joined #ruby
maxmanders_ has joined #ruby
<claw>
mwlang: thought i might be that its because has the size of a multiple of 64 ( which i am buffering in my method ) a the stream i can not inflate has the size of 332 which is a multiple of 64
bollullera has left #ruby [#ruby]
<claw>
but if i change the buffer size in my inflate method the exception is still raised
chrisseaton_ has joined #ruby
kyrylo has quit [Ping timeout: 264 seconds]
akitada_ has joined #ruby
bestie_ has joined #ruby
brb3_ has joined #ruby
artmann has joined #ruby
aef has quit [Remote host closed the connection]
flori_ has joined #ruby
_Tristan-Speccy_ has joined #ruby
gkra_ has joined #ruby
_jasonmit has joined #ruby
speaking1ode has joined #ruby
jack_rabbit_ has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
akitada has quit [Ping timeout: 252 seconds]
amitchellbullard has quit [Ping timeout: 252 seconds]
kwd has quit [Ping timeout: 252 seconds]
maxmanders has quit [Ping timeout: 252 seconds]
chrisseaton has quit [Ping timeout: 252 seconds]
wallerdev has quit [Ping timeout: 252 seconds]
Tristan-Speccy has quit [Ping timeout: 252 seconds]
hellschreiber has quit [Ping timeout: 252 seconds]
jmcc has quit [Ping timeout: 252 seconds]
bestie has quit [Ping timeout: 252 seconds]
jasonmit has quit [Ping timeout: 252 seconds]
brb3 has quit [Ping timeout: 252 seconds]
speakingcode has quit [Ping timeout: 252 seconds]
exadeci has quit [Ping timeout: 252 seconds]
fumduq has quit [Ping timeout: 252 seconds]
[diecast] has quit [Ping timeout: 252 seconds]
A205B064 has quit [Ping timeout: 252 seconds]
shellfu has quit [Ping timeout: 252 seconds]
machty has quit [Ping timeout: 252 seconds]
fumduq has joined #ruby
Muz has quit [Ping timeout: 252 seconds]
zrl has quit [Ping timeout: 252 seconds]
dukedave has quit [Ping timeout: 252 seconds]
gsd has quit [Ping timeout: 252 seconds]
vikram_ has quit [Ping timeout: 252 seconds]
gkra has quit [Ping timeout: 252 seconds]
flori has quit [Ping timeout: 252 seconds]
artmann_ has quit [Ping timeout: 252 seconds]
jack_rabbit has quit [Ping timeout: 252 seconds]
linduxed has quit [Ping timeout: 252 seconds]
tobiasvl has quit [Ping timeout: 252 seconds]
FrankenDaemon has quit [Ping timeout: 252 seconds]
iceden has quit [Ping timeout: 252 seconds]
wallerdev_ is now known as wallerdev
[diecast] has joined #ruby
[diecast] has joined #ruby
[diecast] has quit [Changing host]
amitchellbullard has joined #ruby
tvl has joined #ruby
aef has joined #ruby
Muz_ has joined #ruby
tvl is now known as tobiasvl
ebbflowgo has quit [Quit: ebbflowgo]
zrl_ has joined #ruby
zz_barkerd427 is now known as barkerd427
A205B064 has joined #ruby
iceden has joined #ruby
hellschreiber has joined #ruby
chrisseaton_ is now known as chrisseaton
akitada_ is now known as akitada
dukedave has joined #ruby
bestie_ is now known as bestie
gsd has joined #ruby
FrankenDaemon has joined #ruby
kwd has joined #ruby
brb3_ is now known as brb3
zzing has joined #ruby
linduxed has joined #ruby
vikram_ has joined #ruby
icebourg has quit []
jmcc has joined #ruby
baweaver has quit [Remote host closed the connection]