apeiros_ changed the topic of #ruby to: Ruby 2.2.0; 2.1.5; 2.0.0-p643: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
* baweaver hasn't used an IDE in years
tkuchiki has quit [Ping timeout: 256 seconds]
tkuchiki has joined #ruby
* jhass defines baweaver's vim setup to be an IDE
<jhass> ha, liear!
<jhass> *liar!
tjohnson has quit [Quit: Connection closed for inactivity]
pontiki has joined #ruby
<godd2> jhass thank you. "smart quotes" was the key
<baweaver> depends on what you define as an IDE
<baweaver> I tend to rip out most autocomplete things as they get in the way too often.
<godd2> apparently Ctrl+Shift+' turns them on for mirc and a handful of other applications *in winders*
juanpablo_ has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
<jhass> winders, is that the new name for windows 10?
mistermocha has joined #ruby
<jhass> I wouldn't be surprised at all
Azure has quit [Excess Flood]
vdamewood has quit [Ping timeout: 244 seconds]
commmmodo has joined #ruby
Azure has joined #ruby
tkuchiki has quit [Ping timeout: 250 seconds]
pontiki has quit [Ping timeout: 272 seconds]
lele has quit [Ping timeout: 272 seconds]
juanpablo_ has quit [Ping timeout: 250 seconds]
Motoservo has quit [Quit: Motoservo]
lanemeyer has joined #ruby
Zai00 has quit [Quit: Zai00]
razieliyo has joined #ruby
IrishGringo has joined #ruby
spyderman4g63 has joined #ruby
brb3 has quit [Quit: <.<]
dfinninger has joined #ruby
djbkd has quit [Remote host closed the connection]
nux443 has joined #ruby
RegulationD has quit [Remote host closed the connection]
Sawbones_ has joined #ruby
phoo1234567 has quit [Quit: Leaving]
lkba has quit [Ping timeout: 245 seconds]
lele has joined #ruby
Kricir has quit [Remote host closed the connection]
Sawbones_ has quit [Remote host closed the connection]
vdamewood has joined #ruby
beneggett has joined #ruby
mleung has quit [Quit: mleung]
commmmodo has quit [Quit: commmmodo]
spyderma_ has joined #ruby
bruno- has quit [Ping timeout: 265 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
spyderman4g63 has quit [Ping timeout: 244 seconds]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ghr has joined #ruby
GnuYawk has joined #ruby
devdazed has joined #ruby
oki has quit [Ping timeout: 255 seconds]
Takle has quit [Remote host closed the connection]
kaiZen has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
odigity has quit [Ping timeout: 256 seconds]
jlast has quit [Remote host closed the connection]
josiah14 has joined #ruby
<josiah14> I couldn't find this answer anywhere (I searched Google and SO, doesn't mean the answer isn't there though)...
<josiah14> is it expensive to convert between symbols and strings?
ghr has quit [Ping timeout: 255 seconds]
ghostpl_ has joined #ruby
jottr has quit [Ping timeout: 244 seconds]
tunaCanBruh has joined #ruby
<shevy> josiah14 nah
<shevy> symbols are immutable so the lookup is cheap. if you do it a billion times then yeah
<shevy> :verbose == ID2SYM( rb_intern("verbose") );
<shevy> rb_intern() returns a number
ghostpl_ has quit [Ping timeout: 252 seconds]
plashchynski has quit [Quit: plashchynski]
Joufflu has joined #ruby
drkush has quit [Ping timeout: 272 seconds]
kaiZen has joined #ruby
delianid_ has joined #ruby
tunaCanBruh has quit [Ping timeout: 256 seconds]
delianid_ has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
delianides has joined #ruby
<josiah14> cool, shevvy
<josiah14> I don't think I have to worry about it going a billion times in this case, but then, anything would be inefficient executed that many times in a row
delianides has quit [Client Quit]
blandflakes_away has joined #ruby
djbkd has joined #ruby
_cake has quit [Read error: Connection reset by peer]
spyderma_ has quit [Read error: Connection reset by peer]
odigity has joined #ruby
connor_goodwolf has quit [Ping timeout: 245 seconds]
_cake has joined #ruby
spyderman4g63 has joined #ruby
dfinninger has quit [Remote host closed the connection]
blandflakes_away has quit [Client Quit]
swistak35 has left #ruby [#ruby]
djbkd has quit [Ping timeout: 255 seconds]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hobodave has quit [Quit: Computer has gone to sleep.]
lkba has joined #ruby
scripore has joined #ruby
<godd2> josiah14 when you say "expensive" do you mean in O-time or constants?
jlast has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
charliesome has joined #ruby
momomomomo has quit [Quit: momomomomo]
systemd0wn has quit [Remote host closed the connection]
GaryOak_ has quit [Remote host closed the connection]
<josiah14> godd2: I'm thinking more along the lines of if I have to do a lot of converting in some function (or that function gets called a lot) is it better to just pass in strings and concat strings, and just use the hashrocket, or is there still some benefit to symbols
drkush has joined #ruby
<shevy> well you can't concat symbols
<josiah14> let's consider the general case, and then something that requires a lookup, like I concat the strings and then use the 'send' method off of some object
<jhass> josiah14: if your methods purpose is to concatenate some strings, pass strings, not symbols
<godd2> I'd say the benefits of symbols are more in their memory usage than their cpu load
<josiah14> right, but i could (sym1.to_s + sym2.to_s).to_sym
<shevy> if you have a string object already, you can use << to append the second string to it
<jhass> send accepts strings
<godd2> so if you're making lots of hashes with the same keys, symbols are a must-use for memory purposes
<jhass> also try to prefer public_send
<shevy> yeah but you can do this only when you have strings :)
<josiah14> right, but does sending strings hurt the lookup time for send?
baweaver has joined #ruby
<shevy> time to test it!
<jhass> did you benchmark that to be a bottleneck?
<jhass> in your real application?
lkba_ has joined #ruby
<josiah14> I'm just thinking theoretically, I was working in some code that got me wondering about it
<josiah14> it seems like something I could easily run into
<jhass> you waste your time
justin_pdx has quit [Quit: justin_pdx]
<josiah14> yah, probably
<godd2> yea, if anyone asks, just note that the concatenation throws away any optimization benefit youre getting from symbols
<jhass> worry if it becomes an issue, a real one
<jhass> s/if/when/
Kricir has joined #ruby
eat_multi has joined #ruby
commmmodo has joined #ruby
<godd2> josiah14 plus, this is an issue of constants, not O-times. The fact that you're using Ruby means you generally don't care about overhead
lkba has quit [Ping timeout: 265 seconds]
<shevy> Testing: String.send('string') 2.290000 0.000000 2.290000 ( 3.759803)
<shevy> Testing: String.send(:symbol) 0.730000 0.000000 0.730000 ( 1.201047)
<shevy> there you go josiah14
RegulationD has joined #ruby
<josiah14> noted
jonr22 has joined #ruby
<josiah14> I thought the benchmark might look like that
<shevy> so for every about 5 million runs, you will save ( 2.5 / 5_000_000) seconds
<godd2> haha
djbkd has joined #ruby
<shevy> though perhaps if you have some really huge app it'll become more noteworthy
<shevy> likes rails 10.0 or so
<josiah14> well, this is a pretty big app. buuut, it's also a small user base, so I think it will be fine
sarkis_ has quit [Ping timeout: 246 seconds]
<josiah14> there's also not a lot of inheritance going on in the app, so there isn't a huge inheritance tree to parse through (relatively) unless I were sending on a Rails object of some sort (which I'm not)
sarkis_ has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
<shevy> sounds tiny!
attamusc has quit [Quit: Connection closed for inactivity]
retornam has quit [Ping timeout: 246 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<godd2> Sound like you need more metaprogramming. I hear that's pretty webscale.
eat_multi has quit [Quit: leaving]
jonr22 has quit [Ping timeout: 265 seconds]
eat_multi has joined #ruby
marr has quit []
galeido has joined #ruby
Asher has quit [Quit: Leaving.]
eat_multi has quit [Client Quit]
spider-mario has quit [Read error: Connection reset by peer]
VBlizzard is now known as _blizzy_
eat_multi has joined #ruby
eat_multi has quit [Client Quit]
eat_multi has joined #ruby
jlast has quit [Remote host closed the connection]
davedev24_ has quit [Ping timeout: 256 seconds]
eat_multi has quit [Client Quit]
dblessing has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eat_multi has joined #ruby
<baweaver> josiah14: are you who I think you are?
IrishGringo has quit [Ping timeout: 256 seconds]
eat_multi has quit [Client Quit]
eat_multi has joined #ruby
davedev24_ has joined #ruby
fabrice31 has joined #ruby
drkush has quit [Ping timeout: 265 seconds]
blackmesa has quit [Quit: WeeChat 1.1.1]
eat_multi has quit [Client Quit]
eat_multi has joined #ruby
reset has quit [Quit: Leaving...]
eat_multi has quit [Client Quit]
jlast has joined #ruby
eat_multi has joined #ruby
<baweaver> Ahaha, unless there's another Josiah connecting from DST systems I doubt it.
<baweaver> Didn't know you were on IRC.
fabrice31 has quit [Ping timeout: 244 seconds]
djbkd has quit [Remote host closed the connection]
patrick99e99 has quit [Ping timeout: 265 seconds]
sarkis_ has quit [Ping timeout: 255 seconds]
kblake has quit [Remote host closed the connection]
ghostmoth has quit [Quit: ghostmoth]
patrick99e99 has joined #ruby
drkush has joined #ruby
cassianoleal has quit [Read error: Connection reset by peer]
zacstewart has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
connor_goodwolf has joined #ruby
eat_multi has quit [Quit: leaving]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ghr has joined #ruby
wallerdev has quit [Quit: wallerdev]
drkush has quit [Ping timeout: 264 seconds]
<meschi> Hi
sevvie has quit [Ping timeout: 255 seconds]
<meschi> is Net::HTTP HTTP/1.1 by default? can i change it?
<josiah14> beaweaver I am
VBlizzard has joined #ruby
<josiah14> It's been a while since I've worked with Ruby
<josiah14> getting back into it
<josiah14> haha
<baweaver> Traced your login IP to DST systems
<josiah14> doing a little (bad) meta programming
<baweaver> thought you were the only one there
<josiah14> yah, I figured
<baweaver> boo
<baweaver> meschi: I would look into faraday if you're not bound to Net::HTTP
<meschi> I try to access DuckDuckGo like this: uri = URI('http://duckduckgo.com/html/?q=test';) followed by Net::HTTP.get(uri). This gives me a 301 redirect
<meschi> is the default Net::HTTP so bad?
_blizzy_ has quit [Disconnected by services]
VBlizzard is now known as _blizzy_
<baweaver> It's slow and unwieldy
<baweaver> just give it a follow redirects, I don't remember what that was.
drkush has joined #ruby
ghr has quit [Ping timeout: 245 seconds]
duncannz has joined #ruby
DEA7TH has joined #ruby
snockerton has quit [Quit: Leaving.]
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
oo_ has joined #ruby
paolooo has joined #ruby
<meschi> when i use open-uri ( open('http://duckduckgo.com/html/?q=test';) ) i get "RuntimeError: redirection forbidden: http://duckduckgo.com/html/?q=test -> https://duckduckgo.com/html/?q=test"
wallerdev has joined #ruby
sevvie has joined #ruby
<baweaver> you might also check if DDG has an API
jstad has joined #ruby
Limix has quit [Quit: Limix]
Limix has joined #ruby
graydot has quit [Quit: graydot]
<baweaver> josiah14: hit up #kcruby, #javascript, and #angularjs
nb_bez___ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
denwo has joined #ruby
tkuchiki has joined #ruby
m4rCsi has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
peeja has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Qladstone has joined #ruby
Qladstone has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
Limix has quit [Quit: Limix]
oo_ has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
bim has quit [Remote host closed the connection]
reset has joined #ruby
reset has quit [Remote host closed the connection]
reset has joined #ruby
ramfjord has joined #ruby
<ramfjord> Sup guys?
<ramfjord> anyone familiar with URI params for the standard URI gem?
<ramfjord> I'm trying to issue a request to the facebook graph API, and URI.encode_www_form is giving me something like
<ramfjord> data_columns=adgroup_id&data_columns=reach&data_columns=frequency&data_columns=impressions
<ramfjord> whereas I need
<ramfjord> data_columns=adgroup_id%2Creach%2Cfrequency%2Cimpressions
<ramfjord> eg. comma separated string rather than array
FrankenDaemon has quit [Ping timeout: 252 seconds]
<baweaver> you'd have to custom value it
<baweaver> join it as a csv and pass it like that
<ramfjord> ugh
<baweaver> hacky, yes
<ramfjord> I don't even know how to do an array of arrays like that
<baweaver> better solution? Not really for Net::HTTP
juanpablo_ has joined #ruby
<ramfjord> I'm using the http gem
<baweaver> Example?
<ramfjord> trying to encode the following as parameters in the URL
<ramfjord> {:time_ranges=>[[2015-03-04 00:00:00 UTC, 2015-03-05 00:00:00 UTC], [2015-03-03 00:00:00 UTC, 2015-03-04 00:00:00 UTC], [2015-03-02 00:00:00 UTC, 2015-03-03 00:00:00 UTC]]}
<baweaver> >> [%w(1 2 3), %w(2 3 4)].flat_map { |ar| arr.join(',') }
<eval-in> baweaver => undefined local variable or method `arr' for main:Object (NameError) ... (https://eval.in/296247)
<baweaver> >> [%w(1 2 3), %w(2 3 4)].flat_map { |ar| ar.join(',') }
<eval-in> baweaver => ["1,2,3", "2,3,4"] (https://eval.in/296248)
<baweaver> >> [%w(1 2 3), %w(2 3 4)].flat_map { |ar| ar.join(',') }.join(',')
<eval-in> baweaver => "1,2,3,2,3,4" (https://eval.in/296249)
sevenseacat has joined #ruby
<baweaver> no...
jenrzzz has joined #ruby
<baweaver> >> [%w(1 2 3), %w(2 3 4)].flatten.join(',')
<eval-in> baweaver => "1,2,3,2,3,4" (https://eval.in/296250)
<baweaver> >> {:time_ranges=>[[2015-03-04 00:00:00 UTC, 2015-03-05 00:00:00 UTC], [2015-03-03 00:00:00 UTC, 2015-03-04 00:00:00 UTC], [2015-03-02 00:00:00 UTC, 2015-03-03 00:00:00 UTC]]}.values.flatten.join(',')
<eval-in> baweaver => /tmp/execpad-381b26b9f42f/source-381b26b9f42f:2: syntax error, unexpected tINTEGER, expecting ']' ... (https://eval.in/296251)
reset has quit [Ping timeout: 264 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
<ramfjord> >> [[2015-03-04 00:00:00 UTC, 2015-03-05 00:00:00 UTC], [2015-03-03 00:00:00 UTC, 2015-03-04 00:00:00 UTC], [2015-03-02 00:00:00 UTC, 2015-03-03 00:00:00 UTC]]
<eval-in> ramfjord => /tmp/execpad-07e206dcb2b2/source-07e206dcb2b2:2: syntax error, unexpected tINTEGER, expecting ']' ... (https://eval.in/296252)
<baweaver> >> {:time_ranges=>[['2015-03-04 00:00:00 UTC', '2015-03-05 00:00:00 UTC'], ['2015-03-03 00:00:00 UTC', '2015-03-04 00:00:00 UTC'], ['2015-03-02 00:00:00 UTC', '2015-03-03 00:00:00 UTC']]}.values.flatten.join(',')
<eval-in> baweaver => "2015-03-04 00:00:00 UTC,2015-03-05 00:00:00 UTC,2015-03-03 00:00:00 UTC,2015-03-04 00:00:00 UTC,2015-03-02 00:00:00 UTC,2015-03-03 00:00:00 UTC" (https://eval.in/296253)
<baweaver> You'd have to get them to strings
<ramfjord> probably need to map to_s first
<baweaver> not sure if it'll imply that or not
robustus|Off has quit [Ping timeout: 264 seconds]
Sgeo has quit [Read error: Connection reset by peer]
scripore has joined #ruby
RegulationD has joined #ruby
juanpablo_ has quit [Ping timeout: 272 seconds]
razieliyo has quit [Remote host closed the connection]
FrankenDaemon has joined #ruby
oki has joined #ruby
oo_ has joined #ruby
robustus has joined #ruby
eat_multi has joined #ruby
Sgeo has joined #ruby
cajone has quit [Ping timeout: 246 seconds]
qiffp has joined #ruby
Hobogrammer has quit [Ping timeout: 256 seconds]
atomiccc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermocha has quit [Remote host closed the connection]
oki has quit [Ping timeout: 272 seconds]
bricker has quit [Ping timeout: 250 seconds]
Kricir has quit [Remote host closed the connection]
tkuchiki has joined #ruby
rbennace_ has joined #ruby
RegulationD has quit [Ping timeout: 246 seconds]
zyxelthrone has quit [Ping timeout: 272 seconds]
jshultz has quit [Quit: Connection closed for inactivity]
nfk has quit [Quit: yawn]
maletor has joined #ruby
dandaman has joined #ruby
<baweaver> Curious, what's the point of Marshalling vs serializing with json?
iamjarvo has joined #ruby
duncannz has quit [Remote host closed the connection]
doodlehaus has joined #ruby
jerematic has quit [Remote host closed the connection]
bigkevmc_ has joined #ruby
longfeet has joined #ruby
blandflakes_away has joined #ruby
cajone has joined #ruby
pwh has quit []
ramfjord_ has joined #ruby
amclain has joined #ruby
kenneth has joined #ruby
blandflakes_away has quit [Client Quit]
skj3gg has joined #ruby
PaulCape_ has joined #ruby
TheNet_ has joined #ruby
bigkevmcd has quit [Ping timeout: 256 seconds]
scripore has quit [Quit: This computer has gone to sleep]
kaiZen has quit [Quit: Computer has gone to sleep.]
eval-in_ has joined #ruby
JoshGlzBrk has joined #ruby
claptor has joined #ruby
agarie has joined #ruby
PaulCape_ has quit [Max SendQ exceeded]
techietrash has joined #ruby
duper has joined #ruby
devyn_ has joined #ruby
LiquidIn1ect has joined #ruby
PaulCape_ has joined #ruby
kallisti6 has joined #ruby
qhartman_ has joined #ruby
julieeharshaw has joined #ruby
zachrab has joined #ruby
PaulePan1er has joined #ruby
baweaver has quit [Remote host closed the connection]
aerth_ has joined #ruby
_ixti_ has joined #ruby
f03lipe_ has joined #ruby
danshultz has quit [Ping timeout: 250 seconds]
duper` has quit [Ping timeout: 250 seconds]
devyn has quit [Ping timeout: 250 seconds]
ramfjord has quit [Ping timeout: 250 seconds]
LiquidInsect has quit [Ping timeout: 250 seconds]
finges has joined #ruby
sarlalian has quit [Ping timeout: 250 seconds]
bevvahlee has quit [Ping timeout: 250 seconds]
eval-in has quit [Ping timeout: 250 seconds]
linduxed has quit [Ping timeout: 250 seconds]
TheNet has quit [Ping timeout: 250 seconds]
aerth has quit [Ping timeout: 250 seconds]
ixti has quit [Ping timeout: 250 seconds]
f03lipe has quit [Ping timeout: 250 seconds]
qhartman has quit [Ping timeout: 250 seconds]
PaulCapestany has quit [Ping timeout: 250 seconds]
Dr3amc0d3r|away has quit [Ping timeout: 250 seconds]
jhass has quit [Ping timeout: 250 seconds]
finges has quit [Ping timeout: 250 seconds]
alexherbo2 has quit [Ping timeout: 250 seconds]
kallisti5 has quit [Ping timeout: 250 seconds]
PaulePanter has quit [Ping timeout: 250 seconds]
julie_harshaw has quit [Ping timeout: 250 seconds]
jhass has joined #ruby
beevalee has joined #ruby
danshultz has joined #ruby
ghostpl_ has joined #ruby
linduxed has joined #ruby
greenbagels has joined #ruby
jstad has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
patrick99e99 has quit [Ping timeout: 255 seconds]
Dr3amc0d3r|away has joined #ruby
patrick99e99 has joined #ruby
tunaCanBruh has joined #ruby
finges has quit [Ping timeout: 250 seconds]
spyderman4g63 has joined #ruby
finges has joined #ruby
yfeldblum has quit [Ping timeout: 256 seconds]
odigity has quit [Ping timeout: 256 seconds]
sarlalian has joined #ruby
ghostpl_ has quit [Ping timeout: 245 seconds]
spyderma_ has joined #ruby
m4rCsi has quit [Quit: No Ping reply in 180 seconds.]
doodlehaus has quit [Remote host closed the connection]
m4rCsi has joined #ruby
braincra- has joined #ruby
<eam> Marshalling is way faster and can represent many values that json cannot
<longfeet> but is marshalling hip???
ghr has joined #ruby
tunaCanBruh has quit [Ping timeout: 272 seconds]
spyderman4g63 has quit [Ping timeout: 272 seconds]
braincrash has quit [Ping timeout: 252 seconds]
shadoi has quit [Quit: Leaving.]
dandaman has quit [Quit: Leaving.]
alexherbo2 has joined #ruby
Rapier- has quit [Quit: (null)]
patrick99e99 has quit [Ping timeout: 264 seconds]
rbennace_ has quit [Remote host closed the connection]
netbun has quit [Read error: Connection reset by peer]
benlieb has joined #ruby
paolooo has quit [Quit: Page closed]
ghr has quit [Ping timeout: 264 seconds]
paolooo has joined #ruby
yfeldblum has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
benlieb has quit [Client Quit]
DadoCe has joined #ruby
Jinkins has joined #ruby
Lucky___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Lucky__ has joined #ruby
odigity has joined #ruby
agarie has quit [Remote host closed the connection]
rbennacer has joined #ruby
mleung has joined #ruby
dandaman has joined #ruby
rbennacer has quit [Remote host closed the connection]
Limix has joined #ruby
Limix has quit [Client Quit]
mleung has quit [Client Quit]
jaequery has joined #ruby
patrick99e99 has joined #ruby
tus has quit []
krz has joined #ruby
jaequery has quit [Client Quit]
ascarter has joined #ruby
bim has joined #ruby
graydot has joined #ruby
dzho has quit [Quit: leaving]
patrick99e99 has quit [Ping timeout: 255 seconds]
bruno- has joined #ruby
patrick99e99 has joined #ruby
jonr22 has joined #ruby
bim has quit [Ping timeout: 245 seconds]
spyderma_ has quit [Ping timeout: 244 seconds]
graydot has quit [Quit: graydot]
bruno- has quit [Ping timeout: 240 seconds]
jonr22 has quit [Ping timeout: 252 seconds]
Qladstone has joined #ruby
adriancb has joined #ruby
triple_b has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
amystephen has quit [Quit: amystephen]
oki has joined #ruby
vozcelik has joined #ruby
charliesome has quit [Quit: zzz]
charliesome has joined #ruby
dandaman has quit [Quit: Leaving.]
zorak8 has quit [Ping timeout: 265 seconds]
TheNet_ has quit [Remote host closed the connection]
TheNet has joined #ruby
tubuliferous has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
throstur has joined #ruby
throstur has joined #ruby
<throstur> how come when I have a gets active in one thread and another thread 'puts' whatever I type into gets doesn't get parsed
<throstur> I tried a simple new Thread { puts 'foo' ; sleep 2 } begin ; eval(gets.chomp); while true
fabrice31 has joined #ruby
versatiletech has joined #ruby
blandflakes_away has joined #ruby
<eam> longfeet: asking the important questions :)
krz has quit [Ping timeout: 265 seconds]
<eam> throstur: gist your actual code?
blandflakes_away has quit [Client Quit]
<throstur> eam http://ix.io/gJp
<eam> throstur: do you have a simplified but working example?
fabrice31 has quit [Ping timeout: 265 seconds]
RegulationD has joined #ruby
davejlong has joined #ruby
dopiee has joined #ruby
benlieb has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
mikecmpb_ has joined #ruby
nii236|irssi has joined #ruby
arescorpio has quit [Ping timeout: 240 seconds]
zachrab has quit [Remote host closed the connection]
Zarthus has quit [Ping timeout: 245 seconds]
scottstamp has quit [Ping timeout: 245 seconds]
<throstur> eam: http://sprunge.us/cUOX
Fluent has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
<eam> throstur: I'm gonna disappoint you by getting off this train and going offline for 15 min, will look after that though
<throstur> eam: okay :(
dopie has quit [Ping timeout: 245 seconds]
oki has quit [Ping timeout: 252 seconds]
scottstamp has joined #ruby
Zarthus has joined #ruby
drkush has quit [Ping timeout: 252 seconds]
Fluent has joined #ruby
_2_catlin has joined #ruby
<_2_catlin> hi
starless has joined #ruby
RegulationD has quit [Ping timeout: 265 seconds]
_2_catlin has quit [Client Quit]
krz has joined #ruby
enterprisedc has joined #ruby
mary5030 has quit [Remote host closed the connection]
DavidDudson has joined #ruby
drkush has joined #ruby
starless has quit [Quit: Leaving]
zorak8 has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
crdpink has quit [Ping timeout: 256 seconds]
mikeric has joined #ruby
drkush has quit [Ping timeout: 246 seconds]
ghr has joined #ruby
tgunr has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
graydot has joined #ruby
Sawbones has joined #ruby
drkush has joined #ruby
Xiti has quit [Quit: Xiti]
tgunr has joined #ruby
retornam has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
mary5030 has joined #ruby
rikai has joined #ruby
drkush has quit [Ping timeout: 244 seconds]
mary5030 has quit [Remote host closed the connection]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
marx has joined #ruby
marx is now known as Guest97324
DEA7TH has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
juanpablo_ has joined #ruby
vozcelik has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DadoCe has quit [Remote host closed the connection]
rikai has quit [Ping timeout: 264 seconds]
vozcelik has joined #ruby
bricker has joined #ruby
Limix has joined #ruby
DadoCe has joined #ruby
flori has quit [Ping timeout: 252 seconds]
Qladstone has quit [Remote host closed the connection]
zacstewart has quit []
flori has joined #ruby
elfuego has quit [Quit: elfuego]
juanpablo_ has quit [Ping timeout: 255 seconds]
tcrypt has quit [Ping timeout: 255 seconds]
DadoCe has quit [Ping timeout: 245 seconds]
bricker has quit [Ping timeout: 244 seconds]
keen__________78 has joined #ruby
drkush has joined #ruby
TheNet has quit [Remote host closed the connection]
TheNet has joined #ruby
<throstur> eam you still gone?
keen__________77 has quit [Ping timeout: 264 seconds]
red_horned_rihno has quit [Ping timeout: 245 seconds]
<eam> throstur: yo, just got in - I don't see Thread in your shortened example?
sankaber has joined #ruby
<eam> also, I can't repro the issues you're seeing
vozcelik has quit [Remote host closed the connection]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
Jinkins has quit [Quit: Leaving]
swgillespie has joined #ruby
drkush has quit [Ping timeout: 250 seconds]
rikai has joined #ruby
mistergibson has quit [Ping timeout: 256 seconds]
<throstur> ah, thanks eam, that was my issue
<throstur> was supposed to be spawning a new thread in there
keen__________78 has quit [Read error: Connection reset by peer]
vdamewood has quit [Remote host closed the connection]
drkush has joined #ruby
keen__________78 has joined #ruby
livingstn has quit []
startupality has quit [Quit: startupality]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roqo has quit [Ping timeout: 245 seconds]
startupality has joined #ruby
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
roqo has joined #ruby
Qladstone has joined #ruby
duncannz has joined #ruby
drkush has quit [Ping timeout: 252 seconds]
benlieb has quit [Quit: benlieb]
red_horned_rihno has joined #ruby
edwardly has joined #ruby
edwardly has joined #ruby
yfeldblum has joined #ruby
red_horned_rihno has quit [Max SendQ exceeded]
braincra- has quit [Quit: bye bye]
drkush has joined #ruby
red_horned_rihno has joined #ruby
jerrett has quit [Ping timeout: 246 seconds]
blandflakes_away has joined #ruby
jerrett has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nb_bez___ has quit [Quit: Connection closed for inactivity]
blandflakes_away has quit [Client Quit]
ghostpl_ has joined #ruby
lemur has joined #ruby
jaequery has joined #ruby
drkush has quit [Ping timeout: 250 seconds]
jlast has quit [Remote host closed the connection]
braincrash has joined #ruby
drkush has joined #ruby
nii236|irssi has quit [Quit: Lost terminal]
techietrash has quit [Quit: Bye! <(^_^<)]
tunaCanBruh has joined #ruby
qiffp has quit [Ping timeout: 255 seconds]
RegulationD has joined #ruby
gccostabr has quit [Ping timeout: 255 seconds]
ghostpl_ has quit [Ping timeout: 272 seconds]
tgunr has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
morenoh149 has joined #ruby
<morenoh149> what is this? :foo a symbol?
<sevenseacat> :foo is a symbol yes
tunaCanBruh has quit [Ping timeout: 252 seconds]
drkush has quit [Ping timeout: 245 seconds]
startupality has quit [Quit: startupality]
RegulationD has quit [Ping timeout: 255 seconds]
amystephen has joined #ruby
sivsushruth has quit [Ping timeout: 264 seconds]
sivsushruth has joined #ruby
davejlong has quit [Remote host closed the connection]
davejlong has joined #ruby
mikeric has quit []
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
duncannz has quit [Ping timeout: 264 seconds]
throstur has quit [Quit: WeeChat 1.1.1]
ascarter has joined #ruby
Joufflu has quit [Quit: Peace]
adriancb has quit [Read error: Connection reset by peer]
Joufflu has joined #ruby
Joufflu has quit [Read error: Connection reset by peer]
x77686d has quit [Ping timeout: 265 seconds]
davejlong has quit [Ping timeout: 264 seconds]
adriancb has joined #ruby
replay has quit []
gccostabr has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
a5i has quit [Quit: Connection closed for inactivity]
mikeric has joined #ruby
drkush has joined #ruby
adriancb has joined #ruby
DrShoggoth has quit [Ping timeout: 256 seconds]
Channel6 has joined #ruby
ramfjord_ has quit [Ping timeout: 252 seconds]
adriancb has quit [Read error: Connection reset by peer]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maknz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DavidDudson has joined #ruby
PaulCape_ is now known as PaulCapestany
justin_pdx has joined #ruby
charliesome has quit [Quit: zzz]
adriancb has joined #ruby
jonr22 has joined #ruby
danman has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zorak8 has quit [Quit: Leaving]
charliesome has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
sivsushruth has quit [Ping timeout: 264 seconds]
mistermocha has joined #ruby
sivsushruth has joined #ruby
jonr22 has quit [Ping timeout: 265 seconds]
coderhs has joined #ruby
dandaman has joined #ruby
n1x has joined #ruby
Sawbones has quit [Remote host closed the connection]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
bim has joined #ruby
pontiki has joined #ruby
drkush has quit [Ping timeout: 265 seconds]
coderhs has quit [Client Quit]
sarkis_ has joined #ruby
drkush has joined #ruby
peeja has joined #ruby
deric_skibotn has quit [Ping timeout: 264 seconds]
n1x has quit [Remote host closed the connection]
bim has quit [Ping timeout: 264 seconds]
commmmodo has quit [Quit: commmmodo]
OrbitalKitten has joined #ruby
fabrice31 has joined #ruby
ninedragon has quit [Ping timeout: 245 seconds]
bigkevmcd has joined #ruby
drkush has quit [Ping timeout: 244 seconds]
kyb3r_ has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
drkush has joined #ruby
bigkevmc_ has quit [Ping timeout: 272 seconds]
oki has joined #ruby
fabrice31 has quit [Ping timeout: 272 seconds]
amystephen has quit [Quit: amystephen]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kenneth has joined #ruby
justin_pdx has quit [Quit: justin_pdx]
BigRonnieRon has joined #ruby
dandaman has quit [Quit: Leaving.]
drkush has quit [Ping timeout: 250 seconds]
Deele has joined #ruby
adriancb has joined #ruby
oki has quit [Ping timeout: 264 seconds]
drkush has joined #ruby
dandaman has joined #ruby
kyb3r_ has quit [Read error: Connection reset by peer]
bigkevmc_ has joined #ruby
Hirzu has joined #ruby
blandflakes_away has joined #ruby
bigkevmcd has quit [Ping timeout: 252 seconds]
benlieb has joined #ruby
blandflakes_away has quit [Client Quit]
slawrence00 has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
ninedragon has joined #ruby
thumpba has joined #ruby
ninedragon has quit [Excess Flood]
kyb3r_ has joined #ruby
boshhead has quit [Ping timeout: 252 seconds]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
drkush has quit [Ping timeout: 255 seconds]
tcrypt has joined #ruby
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
justin_pdx has joined #ruby
drkush has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
ninedragon has joined #ruby
ninedragon has quit [Changing host]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
jerrett has quit [Remote host closed the connection]
jenrzzz has joined #ruby
danman has quit [Quit: danman]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
duncannz has joined #ruby
PaulCapestany is now known as PaulCape_
adriancb has joined #ruby
ninedragon has joined #ruby
ninedragon has joined #ruby
ninedragon has joined #ruby
ninedragon has quit [Changing host]
ninedragon has quit [Excess Flood]
Hirzu has quit [Remote host closed the connection]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
krz has joined #ruby
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
lolmaus has quit [Quit: Konversation terminated!]
jm0 has joined #ruby
thumpba has quit [Remote host closed the connection]
Hijiri has joined #ruby
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
commmmodo has joined #ruby
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
drkush has quit [Ping timeout: 256 seconds]
atal421 has joined #ruby
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
juanpablo_ has joined #ruby
drkush has joined #ruby
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
czj1 has joined #ruby
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
thumpba has joined #ruby
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby
adriancb has quit [Remote host closed the connection]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
ghr has joined #ruby
TheNet has quit [Quit: Leaving...]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
juanpablo_ has quit [Ping timeout: 252 seconds]
mistermocha has quit [Remote host closed the connection]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
mistermocha has joined #ruby
drkush has quit [Ping timeout: 250 seconds]
mistermocha has quit [Remote host closed the connection]
Czj has joined #ruby
czj1 has left #ruby [#ruby]
Czj has left #ruby [#ruby]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
benlieb has quit [Quit: benlieb]
mferrier has joined #ruby
Czj has joined #ruby
morenoh149 has quit [Ping timeout: 245 seconds]
Czj has left #ruby [#ruby]
RegulationD has quit [Ping timeout: 256 seconds]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
czj1 has joined #ruby
ghr has quit [Ping timeout: 245 seconds]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
czj1 has left #ruby [#ruby]
Qladstone has quit [Remote host closed the connection]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
Megtastique has quit []
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
paolooo has quit [Ping timeout: 246 seconds]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
Qladstone has joined #ruby
drkush has joined #ruby
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
rbennacer has joined #ruby
Soda has joined #ruby
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
oo__ has joined #ruby
charliesome has quit [Quit: zzz]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
Limix has quit [Quit: Limix]
versatiletech has quit [Quit: versatiletech]
Qladstone has quit [Remote host closed the connection]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
jenrzzz has quit [Ping timeout: 264 seconds]
PaulCape_ is now known as PaulCapestany
oo_ has quit [Ping timeout: 244 seconds]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
pork_clips has joined #ruby
rbennacer has quit [Ping timeout: 246 seconds]
nopolitica has joined #ruby
oo__ has quit [Read error: Connection reset by peer]
ninedragon has joined #ruby
JoshGlzBrk has joined #ruby
ninedragon has quit [Excess Flood]
thumpba has quit [Remote host closed the connection]
oo_ has joined #ruby
_cake has quit [Ping timeout: 265 seconds]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
beneggett has joined #ruby
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
buub has joined #ruby
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
ninedragon has joined #ruby
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
jlast has joined #ruby
JoshGlzBrk has quit [Quit: Textual IRC Client: www.textualapp.com]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
iamjarvo has joined #ruby
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
Qladstone has joined #ruby
Asher has joined #ruby
JoshGlzBrk has joined #ruby
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
dandaman has quit [Quit: Leaving.]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
IrishGringo has joined #ruby
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
f03lipe_ has quit [Ping timeout: 252 seconds]
dandaman has joined #ruby
wldcordeiro has joined #ruby
ltd has quit [Ping timeout: 240 seconds]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
pwnz0r has joined #ruby
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
cajone has quit [Remote host closed the connection]
oki has joined #ruby
ghostpl_ has joined #ruby
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
bricker has joined #ruby
dandaman has quit [Client Quit]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
dandaman has joined #ruby
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
commmmodo has quit [Quit: commmmodo]
tunaCanBruh has joined #ruby
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
oki has quit [Ping timeout: 246 seconds]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
ghostpl_ has quit [Ping timeout: 255 seconds]
drkush has quit [Ping timeout: 252 seconds]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
graydot has quit [Quit: graydot]
cajone has joined #ruby
djbkd has quit [Remote host closed the connection]
ninedragon has joined #ruby
ninedragon has quit [Excess Flood]
drkush has joined #ruby
tunaCanBruh has quit [Ping timeout: 264 seconds]
echevemaster has joined #ruby
jlast has quit [Remote host closed the connection]
drkush has quit [Ping timeout: 252 seconds]
drkush has joined #ruby
sivsushruth has quit [Ping timeout: 240 seconds]
ltd has joined #ruby
atal421 has quit [Read error: Connection reset by peer]
ascarter has joined #ruby
oki has joined #ruby
Musashi007 has joined #ruby
jlast has joined #ruby
Morkel has joined #ruby
n1x has joined #ruby
n1x has quit [Changing host]
n1x has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jlast has quit [Remote host closed the connection]
oki has quit [Ping timeout: 264 seconds]
iamjarvo has joined #ruby
n1x has quit [Client Quit]
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
buub has quit [Ping timeout: 264 seconds]
skj3gg has joined #ruby
dh64 has joined #ruby
bruno- has joined #ruby
diegoviola has joined #ruby
bruno- is now known as Guest91013
tobago has joined #ruby
jonr22 has joined #ruby
arup_r has joined #ruby
Hamled has joined #ruby
sevvie has quit [Ping timeout: 252 seconds]
juanpablo_ has joined #ruby
Hamled has quit [Client Quit]
Qladstone has quit [Remote host closed the connection]
Hamled has joined #ruby
<arup_r> certainty: Yo
sevvie has joined #ruby
jenrzzz has joined #ruby
adriancb has joined #ruby
Guest91013 has quit [Ping timeout: 240 seconds]
ghr has joined #ruby
Waheedi has joined #ruby
CorySimmons has joined #ruby
jonr22 has quit [Ping timeout: 256 seconds]
djbkd has joined #ruby
crazydiamond has quit [Ping timeout: 264 seconds]
anarang has joined #ruby
juanpablo_ has quit [Ping timeout: 255 seconds]
BigRonnieRon has quit [Quit: Textual IRC Client: www.textualapp.com]
Qladstone has joined #ruby
mistermocha has joined #ruby
dandaman has quit [Quit: Leaving.]
echevemaster has quit [Remote host closed the connection]
adriancb has quit [Ping timeout: 256 seconds]
krz has quit [Ping timeout: 244 seconds]
ghr has quit [Ping timeout: 246 seconds]
JoshGlzBrk has quit [Quit: Textual IRC Client: www.textualapp.com]
CorySimmons has quit [Quit: Bye!]
mistermocha has quit [Ping timeout: 256 seconds]
Synthbread has joined #ruby
n008f4g_ has quit [Ping timeout: 252 seconds]
Hirzu has joined #ruby
withnale_ has quit [Read error: Connection reset by peer]
withnale_ has joined #ruby
The_Phoenix has joined #ruby
CorySimmons has joined #ruby
CorySimmons has quit [Client Quit]
apeiros_ has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby
justin_pdx has quit [Quit: justin_pdx]
hvxgr has quit [Ping timeout: 256 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Hobogrammer has joined #ruby
fabrice31 has joined #ruby
tagrudev has joined #ruby
Channel6 has quit [Quit: Leaving]
longfeet has quit [Ping timeout: 244 seconds]
drkush has quit [Ping timeout: 264 seconds]
JoshGlzBrk has joined #ruby
cjim_ has joined #ruby
cjim_ has quit [Client Quit]
ptrrr has joined #ruby
drkush has joined #ruby
fabrice31 has quit [Ping timeout: 245 seconds]
<arup_r> so quiet place..
neanderslob has quit [Ping timeout: 255 seconds]
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
neanderslob has joined #ruby
lolmaus has joined #ruby
last_staff has joined #ruby
drkush has quit [Ping timeout: 240 seconds]
bricker has quit [Quit: leaving]
Xiti has joined #ruby
charliesome has joined #ruby
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
drkush has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
polysics has quit [Remote host closed the connection]
blandflakes_away has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
polysics has joined #ruby
Czj has joined #ruby
ptrrr has quit [Quit: ptrrr]
pwnz0r has quit [Remote host closed the connection]
blandflakes_away has quit [Client Quit]
frobs has joined #ruby
swgillespie has joined #ruby
apeiros_ has quit [Ping timeout: 256 seconds]
jtdowney has joined #ruby
drkush has quit [Ping timeout: 252 seconds]
sahilsk has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
<sahilsk> I need to know if there is a possible conflict, when running Sidekiq on more than 1 machine
anaeem1 has joined #ruby
polysics has quit [Ping timeout: 264 seconds]
Hirzu_ has joined #ruby
Qladstone has quit [Remote host closed the connection]
peeja has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
anaeem1 has quit [Remote host closed the connection]
IrishGringo has quit [Ping timeout: 256 seconds]
anaeem1 has joined #ruby
dandaman has joined #ruby
dandaman has quit [Client Quit]
drkush has joined #ruby
idoru has quit [Read error: Connection timed out]
idoru has joined #ruby
Hirzu has quit [Ping timeout: 272 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dj_zubehoer has joined #ruby
aganov has joined #ruby
codecop has joined #ruby
drkush has quit [Ping timeout: 252 seconds]
JohnBat26 has joined #ruby
_Andres has joined #ruby
drkush has joined #ruby
Hobogrammer_ has joined #ruby
hvxgr has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Wolland has joined #ruby
ghostpl_ has joined #ruby
pwnz0r has joined #ruby
wallerdev has joined #ruby
bal has joined #ruby
sinkensabe has joined #ruby
Hobogrammer has quit [Ping timeout: 264 seconds]
beneggett has quit [Ping timeout: 272 seconds]
Mon_Ouie has quit [Ping timeout: 272 seconds]
SouL has joined #ruby
ghostpl_ has quit [Ping timeout: 246 seconds]
RegulationD has joined #ruby
DEA7TH has joined #ruby
pontiki has quit [Quit: goodnight]
davejlong has joined #ruby
bigkevmc_ is now known as bigkevmcd
serivich has joined #ruby
RegulationD has quit [Ping timeout: 255 seconds]
Xiti has quit [Quit: Xiti]
<ddv> sahilsk: why don't you test this yourself?
davejlong has quit [Ping timeout: 264 seconds]
<ddv> sahilsk: lazy?
PaulePan1er is now known as PaulePanter
<sahilsk> nopes. am sysadmin and i need to deploy one app using it... just trying to figure out the sidekiq part of the application
davedev2_ has joined #ruby
<sahilsk> ddv: if you anything , then it'd be great
<ddv> sahilsk: just fire up 2 vm's
FooMunki has quit [Quit: FooMunki]
davedev24_ has quit [Ping timeout: 246 seconds]
<sahilsk> ddv: I'm already doing it.... that post was posted incase somebody like you might know teh answer already... anyway thanks for your suggestions, though not helpful
drkush has quit [Ping timeout: 252 seconds]
Hirzu_ has quit [Remote host closed the connection]
drkush has joined #ruby
nii236 has joined #ruby
Qladstone has joined #ruby
oki has joined #ruby
<ddv> sahilsk: you have to make sure your sidekiq job is thread safe
<sahilsk> you mean idempotent?
surs has joined #ruby
ta has joined #ruby
drkush has quit [Ping timeout: 245 seconds]
mferrier has quit []
<flughafen> moin
drkush has joined #ruby
sivsushruth has joined #ruby
OrbitalKitten has joined #ruby
polysics has joined #ruby
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
aswen has joined #ruby
Macaveli has joined #ruby
drkush has quit [Ping timeout: 240 seconds]
fabrice31 has joined #ruby
drkush has joined #ruby
Spami has joined #ruby
mleung has joined #ruby
andikr has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Xiti has joined #ruby
scripore has joined #ruby
harleypig has joined #ruby
tunaCanBruh has joined #ruby
crdpink has joined #ruby
OrbitalKitten has joined #ruby
benlieb has joined #ruby
nii236 has quit [Quit: WeeChat 1.1.1]
lemur has quit [Remote host closed the connection]
amclain has quit [Quit: Leaving]
nii236 has joined #ruby
Qladstone has quit [Remote host closed the connection]
hs366 has joined #ruby
nii236 has quit [Client Quit]
jtdowney has quit [Quit: Textual IRC Client: www.textualapp.com]
wicope has joined #ruby
chemiazpolski has joined #ruby
tunaCanBruh has quit [Ping timeout: 246 seconds]
ByronJohnson has quit [Quit: Restarting client.]
mikeric has quit []
ByronJohnson has joined #ruby
djbkd has quit [Remote host closed the connection]
nii236 has joined #ruby
strixd has joined #ruby
drkush has quit [Ping timeout: 252 seconds]
drkush has joined #ruby
Hirzu has joined #ruby
crack has quit [Disconnected by services]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Mia has quit [Read error: Connection reset by peer]
crack_ has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
serivich has quit [Ping timeout: 255 seconds]
<certainty> moin
sahilsk has left #ruby [#ruby]
davedev2_ has quit [Ping timeout: 246 seconds]
Soliah has quit [Quit: Soliah]
Macaveli has quit [Ping timeout: 246 seconds]
davedev24_ has joined #ruby
luckyruby has joined #ruby
CorySimmons has joined #ruby
ZJvandeWeg has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
pwnz0r has quit [Remote host closed the connection]
mleung has quit [Quit: mleung]
sivsushruth has quit [Ping timeout: 256 seconds]
ghostpl_ has joined #ruby
drkush has quit [Ping timeout: 256 seconds]
sivsushruth has joined #ruby
jonr22 has joined #ruby
juanpablo_ has joined #ruby
drkush has joined #ruby
pwnz0r has joined #ruby
Bounga has joined #ruby
benlieb has quit [Quit: benlieb]
agent_white has quit [Quit: nite.]
nopolitica has quit [Ping timeout: 250 seconds]
ghostpl_ has quit [Ping timeout: 264 seconds]
einarj has joined #ruby
jonr22 has quit [Ping timeout: 265 seconds]
Soda has quit [Remote host closed the connection]
ki0 has joined #ruby
juanpablo_ has quit [Ping timeout: 264 seconds]
pwnz0r has quit [Ping timeout: 256 seconds]
<arup_r> certainty: moin.. but too late today you are :)
<arup_r> flughafen: o/
kalusn has joined #ruby
davedev24_ has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
<flughafen> arup_r: ahoy
davedev24_ has joined #ruby
<flughafen> moioioioin certainty
drkush has quit [Ping timeout: 250 seconds]
Qladstone has joined #ruby
<arup_r> flughafen: working spree based rails app
<arup_r> reading Deface gem.. It seems so nice
<flughafen> arup_r: working on testsuite failures
<flughafen> booooo
<arup_r> I love writing unit tests.. But no scope :(
terlar has joined #ruby
<flughafen> i like unit tests too
bim has joined #ruby
<arup_r> Do you do TDD ?
morenoh149 has joined #ruby
<certainty> arup_r: yeah, busy times
<arup_r> I don't ... I write code .. then if I allowed then test.. :( I like TDD gurus...
drkush has joined #ruby
<arup_r> certainty: busy in coding I like
sigurding has joined #ruby
<flughafen> arup_r: no. i can't really say i' a ruby dev. but the only ruby i use is for the testsuite with capybara/cucumber
<arup_r> ohkay
<flughafen> but our product is in java, perl, python, bash and sql
<certainty> arup_r: not so much coding. more operations.
amundj has joined #ruby
<arup_r> ok... certainty: Are you Project manager/Lead ?
davedev24_ has quit [Read error: Connection reset by peer]
serivich has joined #ruby
davedev24_ has joined #ruby
krz has joined #ruby
<arup_r> flughafen: why not in Ruby ?
<flughafen> arup_r: we didn't start the fire
<flughafen> ;)
<arup_r> hehehe
<flughafen> um, we're a fork of another project
<certainty> arup_r: nope. with operations i meant i'm doing sysadmin/devop tasks today :)
bim has quit [Ping timeout: 250 seconds]
<arup_r> ok
<flughafen> but perl is being removed, woohoo
<flughafen> but i havent touched it
<certainty> remove the dark craft
<arup_r> You know lots of things.. I do write only Rails app code. nothing more than that.. I should enhance my skills too
<certainty> good i hear you can get all sorts of deseases when you touch perl
<flughafen> certainty: perl looks the same before and after encryption ;)
<arup_r> There are too many books on Perl..
<arup_r> they have fat documentations
<arup_r> like Pythoin
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
piotrj has joined #ruby
drkush has quit [Ping timeout: 250 seconds]
<certainty> flughafen: indistinguishable from random :)
ascarter has joined #ruby
<arup_r> certainty: do you write Rails too ?
<arup_r> ponga: is there... I see
rdark has joined #ruby
kyb3r_ has quit [Quit: Leaving]
sigurding has quit [Quit: sigurding]
<flughafen> i have a couple of small commits to an opensource rails project, but really small. but i do have another issue assigned to me i need to fix
<flughafen> so you can say things are getting pretty serious
<certainty> arup_r: yepp
<arup_r> cool
<certainty> we have 3 big rails apps and a couple smaller ones.
CustosLimen has quit [Ping timeout: 256 seconds]
<arup_r> wow
<arup_r> e-commerce?
<flughafen> we have a couple of rails apps here too, in yo face!
<certainty> nope, management solutions to run our business. crm, datacenter, and customer front end
<certainty> flughafen: hehe
Czj has quit [Ping timeout: 265 seconds]
<certainty> i wish we had fewer actually
<certainty> fewer projects in general
nopolitica has joined #ruby
razieliyo has joined #ruby
razieliyo has joined #ruby
<arup_r> why so ? :)
<certainty> many internal gems we have also
<certainty> management is not easy
marr has joined #ruby
<certainty> and we're a small shop so we have to do a good amount of time management
<arup_r> ok
<certainty> main business is providing hosting solutions. And naturally since we're small, we have to automate the heck out of it. That's what i do mostely
piotrj has quit [Remote host closed the connection]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
OrbitalKitten has joined #ruby
<flughafen> certainty: do you guys opensource your stuff?
drkush has joined #ruby
ghr has joined #ruby
davedev24_ has quit [Ping timeout: 264 seconds]
mikeric has joined #ruby
Qladstone has quit [Remote host closed the connection]
Macaveli has joined #ruby
blandflakes_away has joined #ruby
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
nopolitica has quit [Quit: leaving]
blandflakes_away has quit [Client Quit]
davidcelis has quit [Ping timeout: 246 seconds]
davidcelis has joined #ruby
dj_zubehoer has quit []
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hirzu has quit [Remote host closed the connection]
CorySimmons has quit [Quit: Bye!]
plashchynski has joined #ruby
antgel has joined #ruby
senayar has joined #ruby
elaptics is now known as elaptics_away
tcrypt has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 265 seconds]
sevenseacat has quit [Remote host closed the connection]
arup_r has quit [Remote host closed the connection]
mikecmpb_ has quit [Quit: i've nodded off.]
senayar_ has joined #ruby
senayar has quit [Read error: Connection reset by peer]
nii236 has quit [Ping timeout: 245 seconds]
chthon has joined #ruby
joonty has joined #ruby
mikecmpbll has joined #ruby
lolmaus_ has joined #ruby
aryaching has joined #ruby
dandaman has joined #ruby
lolmaus has quit [Ping timeout: 255 seconds]
Hirzu has joined #ruby
nii236 has joined #ruby
CustosLimen has joined #ruby
elaptics_away is now known as elaptics
dmolina1 has joined #ruby
RegulationD has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
wldcordeiro has quit [Ping timeout: 265 seconds]
dmolina1 has quit [Client Quit]
djbkd has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RegulationD has quit [Ping timeout: 264 seconds]
arup_r has joined #ruby
Hirzu has quit [Remote host closed the connection]
Musashi007 has joined #ruby
<certainty> flughafen: nope, most of it is not open source. We plan todo though. At least two gems
<certainty> personally i'd love to do more but, well
Musashi007 has quit [Client Quit]
duncannz has quit [Ping timeout: 264 seconds]
<arup_r> certainty: Did you use ever Deface geam
<certainty> arup_r: nope
<arup_r> ok np
ghostpl_ has joined #ruby
phutchins has quit [Ping timeout: 240 seconds]
RandyT has quit [Ping timeout: 245 seconds]
theotherstupidgu has joined #ruby
Zai00 has joined #ruby
<flughafen> you should totally check it out it's like totally cool and stuff
Soda has joined #ruby
<certainty> y
leafybasil has quit [Remote host closed the connection]
dANO__ has joined #ruby
chipotle has joined #ruby
_Andres has joined #ruby
theotherstupidgu has quit [Remote host closed the connection]
serivich has quit [Read error: Connection reset by peer]
tunaCanBruh has joined #ruby
Takle has joined #ruby
djbkd has quit [Remote host closed the connection]
kaiZen- has joined #ruby
sivsushruth has quit [Ping timeout: 246 seconds]
tunaCanBruh has quit [Ping timeout: 264 seconds]
ghostpl_ has quit [Remote host closed the connection]
kenneth has joined #ruby
adriancb has joined #ruby
joonty has quit [Quit: joonty]
nii236 has quit [Quit: WeeChat 1.1.1]
nii236 has joined #ruby
nii236 has quit [Client Quit]
red_horned_rihno has quit [Ping timeout: 245 seconds]
joonty has joined #ruby
MasterPiece has joined #ruby
adriancb has quit [Ping timeout: 244 seconds]
maximski has joined #ruby
ZJvandeWeg has quit [Ping timeout: 256 seconds]
bradleyp_ has quit [Remote host closed the connection]
selu has joined #ruby
sivsushruth has joined #ruby
lkba_ has quit [Ping timeout: 255 seconds]
imanzarrabian has joined #ruby
mikecmpb_ has joined #ruby
kupusc has joined #ruby
surs has quit [Ping timeout: 252 seconds]
surs has joined #ruby
mikecmpbll has quit [Ping timeout: 250 seconds]
<Phage> Is there any way I can make Ruby execute this code? https://dpaste.de/8LFc
red_horned_rihno has joined #ruby
Bounga has quit [Quit: Gone]
bruno- has joined #ruby
red_horned_rihno has quit [Max SendQ exceeded]
bruno- is now known as Guest59450
hanmac1 has joined #ruby
red_horned_rihno has joined #ruby
jonr22 has joined #ruby
juanpablo_ has joined #ruby
red_horned_rihno has quit [Max SendQ exceeded]
red_horned_rihno has joined #ruby
martinbmadsen has quit [Ping timeout: 256 seconds]
red_horned_rihno has quit [Max SendQ exceeded]
piotrj has joined #ruby
Guest59450 has quit [Ping timeout: 245 seconds]
red_horned_rihno has joined #ruby
sivsushruth has quit [Ping timeout: 264 seconds]
sivsushruth has joined #ruby
MasterPiece has quit [Remote host closed the connection]
Hirzu has joined #ruby
<rom1504> what is that
juanpablo_ has quit [Ping timeout: 252 seconds]
jonr22 has quit [Ping timeout: 256 seconds]
nettoweb has joined #ruby
Bounga has joined #ruby
buub has joined #ruby
joonty has quit [Quit: joonty]
bim has joined #ruby
Hirzu_ has joined #ruby
sivsushruth has quit [Ping timeout: 252 seconds]
leafybasil has joined #ruby
sivsushruth has joined #ruby
ZJvandeWeg has joined #ruby
Hirzu has quit [Ping timeout: 252 seconds]
codecop has quit [Remote host closed the connection]
ghostpl_ has joined #ruby
Qladstone has joined #ruby
timonv has joined #ruby
sprihodko has joined #ruby
<tobiasvl> uh
joonty has joined #ruby
decoponio has joined #ruby
maximski has quit []
aryaching_ has joined #ruby
DerisiveLogic has quit [Ping timeout: 256 seconds]
aryaching has quit [Ping timeout: 245 seconds]
aryaching_ has quit [Client Quit]
sivsushruth has quit [Ping timeout: 272 seconds]
<Phage> rom1504: What is what?
sivsushruth has joined #ruby
nii236 has joined #ruby
tvw has joined #ruby
<avril14th> Phage: it's just a bunch of hexadecimal values
Pupeno has joined #ruby
<avril14th> most likely an image
<avril14th> it's not code
<Phage> avril14th: Well, I have to somehow execute that o.o
<wasamasa> lol
<Phage> avril14th: I have to execute it and get the output.
<wasamasa> Phage: more context please
<Phage> And I'm on my bare feet.
<wasamasa> Phage: this sounds pretty silly
<Phage> wasamasa: It's part of some challenges I do.
diegoviola has quit [Quit: WeeChat 1.1.1]
<rom1504> you need to focus more on the "*I* do" part
<wasamasa> there's this german proverb about pulling someone's boogers out their nose
Axy has joined #ruby
Axy has joined #ruby
<Phage> I have to grab the apparently_not_shellcode and run it, get the output/flag.
<wasamasa> I feel like I'm doing that with Phage right now
MasterPiece has joined #ruby
<mikecmpb_> lmfao
<wasamasa> meaning, I ask them something, they answer as little as possible
<Phage> rom1504: Well, I have no clue how to run that. So, here I am, seeking knowledge.
<mikecmpb_> is this one of those gchq challenges?
<wasamasa> instead of being helpful
<wasamasa> Phage: reply with *everything*
<wasamasa> Phage: we don't magically know what challenge you're speaking of
<wasamasa> Phage: or why it involves shellcode
<Phage> wasamasa: You don't really have to?
<canton7> our resident mind-reader is out today
<wasamasa> Phage: or what the role of ruby is
<wasamasa> Phage: I DO
<rom1504> Phage: 1) use some magic on your code 2) execute it
mikecmpb_ is now known as mikecmpbll
<wasamasa> "Website Login (Do not brute force / hack this one)"
<wasamasa> this is some sort of joke, right
<canton7> Phage, that's a passworded login page. No-one's going to create an account just to help you
<wasamasa> anyways, I'm out
<Phage> I want to use Ruby to solve this (since it's a coding challenge and I want to learn ruby).
<flughafen> auf wiedersehen
<Phage> canton7: Why I stated you don't need to know the challenge...
<rom1504> but the problem has nothing to do with ruby ?
<wasamasa> ^
<Phage> All I have to do, is to execute the code I showed you.
<canton7> <Phage> Is there any way I can make Ruby execute this code? <us> no, not unless we know more context
<canton7> you're failing to give us the "more context" bit
<Phage> rom1504: Well, I'm pulling the code from the site with Ruby and I have to execute it and get the output then upload it again, with Ruby.
<wasamasa> Phage: apparently neither you nor us know what shellcode is
<wasamasa> Phage: so, perhaps work on that first
charliesome has quit [Quit: zzz]
<Phage> canton7: Okay... At this site, I login, grab the code I have to execute the code, get the flag and upload that flag to the site
<Phage> wasamasa: The site stated it was shellcode.
<canton7> Phage, I can't work out whether you want help writing ruby, or want help solving the challenge
<canton7> those are two very different questions
blandflakes_away has joined #ruby
<canton7> you don't give us any information on the challenge, so you can't want help with that. but you haven't asked any questions about ruby, so you can't want help with that either
<Phage> Hmm...
<canton7> so... conclusion: you don't actually want help? :S
<Phage> I just showed you a screenshot of the challenge description.
<canton7> so you want help solving the challenge?
<canton7> and it's nothing to do with ruby?
<mikecmpbll> randstr2 :o
senayar_ has quit [Remote host closed the connection]
<wasamasa> lol
<canton7> there are 2 parts to this: figuring out what you need to do, and doing it in under a second
blandflakes_away has quit [Client Quit]
<canton7> step 1, figuring out what you need to do, is best done by hand. play around, figure out how to solve it, get it done by hand in 10 mins or whatever
senayar has joined #ruby
<Phage> canton7: I can do it in under a second.
<canton7> then automate it. this is the step you can use ruby for
<mikecmpbll> lol
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<canton7> Phage, how? that's information you haven't given us
<Phage> canton7: I have code for this already.
<rom1504> LOL
<canton7> Phage, so... what's your question?
<mikecmpbll> :~
drkush has quit [Ping timeout: 264 seconds]
<canton7> if there are no questions, what are you doing here? :P
<rom1504> just trolling us
<canton7> I think so, yeah
<rom1504> it's working well
DaniG2k has joined #ruby
<canton7> meh, back to work
<Phage> o.o
<Phage> Forget it...
<canton7> come back when you've got an actual, specific question
<mikecmpbll> how can i forget H1?<??????͆??ˍ?????ɯ?? b?hHfcj[RANDSTR2]
Soda has quit [Remote host closed the connection]
<mikecmpbll> :'(
charliesome has joined #ruby
imanzarrabian has quit [Ping timeout: 264 seconds]
<Phage> rom1504: The output from that site, doesn't really many any sense.
drkush has joined #ruby
Macaveli has quit [Ping timeout: 252 seconds]
<rom1504> RANDSTR2 makes sense, so it's probably the right way to do it
senayar has quit [Ping timeout: 245 seconds]
<rom1504> and the rest is a random string, which makes sense too
<rom1504> (since they even tell us that's what it is with RANDSTR2)
<rom1504> so basically you need to convert the hexa to a string
<rom1504> apparently .pack('H*')
<canton7> rom1504, he's already solved it
<rom1504> yeah there's that
<canton7> he's already written the code to complete the challenge
gluten_hell has joined #ruby
yfeldblum has joined #ruby
Takle_ has joined #ruby
drkush has quit [Ping timeout: 245 seconds]
senayar has joined #ruby
drkush has joined #ruby
ZJvandeWeg has quit [Ping timeout: 264 seconds]
SixiS has quit [Quit: SixiS]
sprihodko has quit [Quit: (null)]
Takle has quit [Ping timeout: 246 seconds]
<mikecmpbll> canton7: lol ;d
Dmr has joined #ruby
elfuego has joined #ruby
Pumukel has joined #ruby
topolinux has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
plashchynski has quit [Quit: plashchynski]
plashchynski has joined #ruby
mikeric has quit []
Takle_ has quit [Remote host closed the connection]
nii236 has quit [Quit: WeeChat 1.1.1]
<argoneus> do symbols have a value
<argoneus> or are they just generic objects that are all the same in all contexts
RegulationD has joined #ruby
<canton7> that's like asking if a number has a value
<canton7> symbols are very similar to strings. the difference is that they're more expensive to create, but a lot cheaper to compare
<argoneus> right
<argoneus> so when I create :mything in my class
<argoneus> then I can use :mything everywhere in the same file
<argoneus> and it will have the same value
<argoneus> like an enum, after all
Pumukel has quit [Ping timeout: 265 seconds]
<mikecmpbll> value? ..
<canton7> it's like asking if using "hello" once, then using "hello" lots more times, if all the "hello"s have the same value
<canton7> the "hello" *is* the value
<argoneus> oh, right
RegulationD has quit [Ping timeout: 244 seconds]
<shevy> argoneus you did smalltalk before ruby?
<argoneus> so the symbols are pretty much something like -some numbers-
<argoneus> like I decide :pi is a symbol
<argoneus> and then I can use :pi everywhere
<shevy> argoneus YES. It returns a number. Let me show you the C source.
<argoneus> shevy: yes
lkba has joined #ruby
<shevy> <shevy> symbols are immutable so the lookup is cheap. if you do it a billion times then yeah
<shevy> <shevy> :verbose == ID2SYM( rb_intern("verbose") );
<shevy> <shevy> rb_intern() returns a number
<canton7> just as if you decide that '3' is a number, yes
<canton7> you can use { 3 => "hello", 4 => "goodbye } just fine
<shevy> argoneus once you realize how boring symbols is, you stop caring for them much at all
<shevy> *are
<canton7> similarly, you can do { :key => "hello", :key2 => "goodbye" }
<argoneus> oh, I see
<canton7> or, indeed, { "key" => "hello", "key2" => "goodbye" }
<shevy> argoneus still fascinated about symbols?
frobs has quit [Ping timeout: 264 seconds]
gfawcettpq has joined #ruby
<argoneus> more like still fascinated about ruby
<argoneus> I still don't know how half of these things work
drkush has quit [Ping timeout: 264 seconds]
<argoneus> library callbacks are magic
<shevy> callbacks?
<shevy> you mean Proc.new.call?
<argoneus> like all the
<argoneus> myfunc par1, par2 do | stuff stuff2 |
<shevy> well that is just a method call, and every method can have an optional block
<shevy> if it helps you, a block is like an extra argument to a method
<argoneus> yea
<argoneus> an anonymous function
drkush has joined #ruby
<argoneus> myfunc(par1, par2, function(stuff1, stuff2) { })
<shevy> but it has a name!
<shevy> myfunc
<shevy> it's attached to it too
<argoneus> no the block is anonymous
<mikecmpbll> the ruby 2.2 string/symbol perf stuff is interesting if you wanted to explore that more
jenrzzz has joined #ruby
<shevy> it's attached to the function
<shevy> erm, method
<shevy> stop writing myfunc it confuses me :D
Takle has joined #ruby
<argoneus> yesterday I was pretty stuck on how to do one thing
<shevy> there is more than one way
<argoneus> I somehow put things together, but then I was stuck on other things
Qladstone has quit [Remote host closed the connection]
<shevy> you can detach methods like so: http://ruby-doc.org//core-2.2.0/Method.html
<shevy> I am unsure how to detach a block though
<mikecmpbll> timtoady!
<argoneus> like if I have a class Tag
<shevy> yes, a class!
<argoneus> and the class has an attribute "It"
<shevy> what is an attribute
<argoneus> er
<argoneus> what is it called again
<shevy> @instance_variable?
<argoneus> ah yes
<argoneus> and then I have a method where It can give the tag to someone else
<argoneus> just like a game of tag
<argoneus> this is fine so far
<argoneus> but I also need to check if the current message sender is in fact It and if the person he's sending it to exists, and brr whatever I'll just figure ito ut
<argoneus> it's not hard in other languages, I just need to get my head around the syntax
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<canton7> you're not giving enough details to make sense, I'm afraid
<canton7> "but I also need to check if the current message sender is in fact It " <-- huh?
<argoneus> yeah that's what I figured halfway through
<argoneus> :D
<argoneus> it's hard to convey an idea from my head into irc
kedare has joined #ruby
Dmr has quit [Quit: Leaving]
<argoneus> I'll just figure it out somehow
jenrzzz has quit [Ping timeout: 245 seconds]
<shevy> well
<shevy> you use strange words
<shevy> things like attribute
<shevy> tags
<shevy> message senders :D
<godd2> No! shevy! You're scaring the children!
<shevy> though at least that one is easier to see through .send()
joonty has quit [Quit: joonty]
<shevy> argoneus what you also may realize is that you don't need to use everything in ruby in order to become productive
wallerdev has quit [Quit: wallerdev]
rkgudboy has joined #ruby
<shevy> godd2 I need to bring them down to less enthusiasm!
piotrj has quit [Remote host closed the connection]
joonty has joined #ruby
chiel has joined #ruby
drkush has quit [Ping timeout: 256 seconds]
mbwe has quit [Quit: WeeChat 0.4.2]
bruno- has joined #ruby
polysics has quit [Remote host closed the connection]
bruno- is now known as Guest22045
polysics has joined #ruby
chinmay_dd has joined #ruby
phale has joined #ruby
phutchins has joined #ruby
Zai00 has quit [Quit: Zai00]
bjornar has joined #ruby
Guest22045 has quit [Ping timeout: 245 seconds]
polysics has quit [Ping timeout: 255 seconds]
FooMunki_ has joined #ruby
drkush has joined #ruby
tunaCanBruh has joined #ruby
anekos has quit [Remote host closed the connection]
otisZart has joined #ruby
phutchins has quit [Ping timeout: 255 seconds]
x77686d has joined #ruby
senayar has quit [Remote host closed the connection]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
oki_ has joined #ruby
oki has quit [Read error: Connection reset by peer]
bMalum has joined #ruby
startupality has joined #ruby
oo_ has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
tunaCanBruh has quit [Ping timeout: 246 seconds]
chinmay_dd has quit [Quit: Leaving]
mbwe has joined #ruby
centrx has joined #ruby
mbwe has quit [Client Quit]
mbwe has joined #ruby
hirogen has left #ruby [#ruby]
tkuchiki has quit [Ping timeout: 265 seconds]
_Andres has joined #ruby
OrbitalKitten has joined #ruby
ldnunes has joined #ruby
Macaveli has joined #ruby
User458764 has joined #ruby
Takle has quit [Remote host closed the connection]
doodlehaus has joined #ruby
josephcs has joined #ruby
rohitkashyap has joined #ruby
kaiZen- has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
SouL has quit [Ping timeout: 256 seconds]
<wasamasa> Phage: don't worry, you won't learn much with these contrived challenges
Macaveli has quit [Ping timeout: 256 seconds]
<Phage> wasamasa: I'm doing them for the purpose of learning Ruby.
<wasamasa> Phage: if you want something actually useful: http://cryptopals.com/
denwo has quit [Remote host closed the connection]
<wasamasa> Phage: that's fine, the problem are the challenges themselves
<wasamasa> Phage: if all they require is turning an escaped string into an unescaped one...
<wasamasa> Phage: there's not much point in bothering with them, right?
<Phage> Not really.
rkgudboy has quit [Ping timeout: 244 seconds]
<certainty> unless that is a hard task
<certainty> for the person doing it
doertedev has joined #ruby
DaniG2k has quit [Read error: Connection reset by peer]
<doertedev> OHAI. is there another recommended way of installing ruby2.x on a wheezy server supposed to run a rails app ?
<doertedev> other than rvm *
<doertedev> sry
centrx has quit [Ping timeout: 272 seconds]
<wasamasa> well, the linked cryptography challenges do better
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wasamasa> since it's a relevant topic that's worth investigating into
<wasamasa> even if it's just for the takeaway that todays's systems are fragile in many unexpected ways
anekos has joined #ruby
ki0 has quit []
S0da has joined #ruby
memohg has joined #ruby
rdark has quit [Quit: leaving]
Takle has joined #ruby
clocKwize has quit [Ping timeout: 255 seconds]
<memohg> can someone give me an idea about this?
DaniG2k has joined #ruby
<memohg> #!/usr/bin/env ruby
<memohg> require 'rubygems'
<memohg> require 'socket'
<memohg> s=Socket.for_fd(STDIN.fileno)
<memohg> fails on 1.9.x
blandflakes_away has joined #ruby
blandflakes_away is now known as blandflakes
<godd2> ruby on rails? more like ruby on fails, amiright?
OrbitalKitten has joined #ruby
<godd2> okay I should go to sleep now
<phale> yes you are
AlexRussia has quit [Ping timeout: 264 seconds]
Bounga has quit [Quit: Gone]
apeiros_ has joined #ruby
spider-mario has joined #ruby
polysics has joined #ruby
centrx has joined #ruby
piotrj has joined #ruby
juanpablo_ has joined #ruby
jonr22 has joined #ruby
godd2 has quit [Ping timeout: 246 seconds]
Pumukel has joined #ruby
<wasamasa> phale: how's your image viewer project going?
FooMunki_ has quit [Quit: FooMunki_]
aswen has quit [Ping timeout: 245 seconds]
DaniG2k has quit [Read error: Connection reset by peer]
PaulCapestany is now known as PaulCape_
DaniG2k has joined #ruby
<bMalum> Is there alreay a gem which can read smart values from HDDs or not? Don’t wanna to the work twice
<bMalum> *already
PaulCape_ is now known as PaulCapestany
juanpablo_ has quit [Ping timeout: 246 seconds]
<phale> wasamasa : i failed horribly
<phale> then i tried to create an ASCII image viewer
<phale> that failed too
<wasamasa> lol, that's even more complex
<phale> i could parse PPM files though
<phale> awfully
jonr22 has quit [Ping timeout: 256 seconds]
<wasamasa> well, I plan to do a better emacs image viewer
<phale> oh cool
<wasamasa> and maybe write image encoders and decoders for a project involving image manipulation
<wasamasa> just for the heck of it
Macaveli has joined #ruby
dblessing has joined #ruby
workmad3 has joined #ruby
<phale> very buggay
<phale> s/buggay/buggy/
dblessing has quit [Client Quit]
<phale> maybe you could help me understand this raster foramt
<phale> format*
sdothum has joined #ruby
dblessing has joined #ruby
<wasamasa> no, I know very little about the topic
<phale> okay
<phale> i read the specification here
<wasamasa> all I've done was writing two games that turn into loads of svg and xbm images
<phale> :)
<phale> do you want me to recommend a good lisp for you
<wasamasa> so, perhaps try xbm or xpm
f03lipe_ has joined #ruby
<phale> scheme is a good one
<wasamasa> I'm learning CHICKEN
<phale> yeah that's the one
<phale> it's good
<wasamasa> it's pretty nice, but it's a bit more fun to develop in emacs
<phale> yeah
<wasamasa> so I've just written one script with it
<wasamasa> but I expect there to be more for everything non-silly I need
<wasamasa> where ruby just isn't cutting it
peterhu has quit [Ping timeout: 246 seconds]
FooMunki_ has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
<phale> can you please explain the 9th step
lolmaus__ has joined #ruby
jenrzzz has joined #ruby
rdark has joined #ruby
lolmaus_ has quit [Ping timeout: 245 seconds]
iamjarvo has joined #ruby
<centrx> phale, a 2d array of triplets
ghostpl_ has quit [Remote host closed the connection]
<centrx> phale, A raster is A usually rectangular pattern of parallel lines forming or corresponding to the display of a television screen, computer monitor
<centrx> etc
<centrx> A raster almost always corresponds to two orthogonal grids thus forming an image made up of a pattern of dots rather than lines.
<phale> thanks
tgunr has joined #ruby
<phale> hmm
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<phale> unpack("H*") doesn't return an array of hex'
greenbagels has quit [Read error: Connection reset by peer]
hs366 has quit [Remote host closed the connection]
<phale> how do i make it do so
lolmaus has joined #ruby
lolmaus__ has quit [Ping timeout: 244 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
Takle_ has joined #ruby
ZJvandeWeg has joined #ruby
<phale> nvm
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
piotrj_ has joined #ruby
Takle has quit [Ping timeout: 245 seconds]
piotrj has quit [Ping timeout: 264 seconds]
pwnz0r has joined #ruby
blandflakes has joined #ruby
<chiel> hi all, any capistrano fanatics in here? i'm using it to deploy an app and for some reason, the `release_path` variable is empty during an `after :deploy, :clear_cache` hook... anyone have any ideas?
<chiel> am i supposed to use another hook or so?
AlexRussia has joined #ruby
b1nd has quit [Ping timeout: 255 seconds]
Wolland has quit []
commmmodo has joined #ruby
dtordable has joined #ruby
lolmaus_ has joined #ruby
<phale> works :O
piotrj_ has quit [Remote host closed the connection]
bruno- has joined #ruby
bruno- is now known as Guest67784
<phale> it took 14.754 seconds to load the image tho
<phale> very slow
lolmaus has quit [Read error: Connection reset by peer]
elfuego has quit [Quit: elfuego]
pwnz0r has quit [Ping timeout: 256 seconds]
paradoja has joined #ruby
SpikeMaster has joined #ruby
SpikeMaster has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
ki0 has joined #ruby
mkaesz has joined #ruby
chinmay_dd has joined #ruby
b1nd has joined #ruby
Takle_ has quit [Remote host closed the connection]
<phale> i can't get his PPM format to work ever
<phale> this is very confusing
x77686d has quit [Ping timeout: 252 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
luckyruby has quit [Quit: Leaving...]
Bounga has joined #ruby
commmmodo has quit [Quit: commmmodo]
crazydiamond has joined #ruby
Zai00 has joined #ruby
<memohg> can someone run this? s=Socket.for_fd(STDIN.fileno)
<memohg> I'm really puzzled on why this fails on 1.9 and works on 1.8
<jhass> won't be fixed in 1.9, it's EOL'd, if broken won't be fixed in 2.0, it's in security maintenance phase. So why no try 2.1 and 2.2?
<shevy> ArgumentError: not a socket file descriptor
<shevy> memohg does not work on 2.2.1
<centrx> Why don't you tell us what the error message was
<workmad3> memohg: no idea why it works on 1.8, but the error is pretty descriptive
<shevy> cuz 1.8 was the best
<workmad3> memohg: given the error, I'd say the bug is it working on 1.8, not it erroring on 1.9 ;)
<memohg> the error message I am getting is
<memohg> `for_fd': not a socket file descriptor (ArgumentError)
<memohg> @workmad3: why do you say that?
<jhass> why would you open a pipe as a socket?
<workmad3> memohg: because you're trying to open a file that isn't a socket as a socket
<jhass> or whatever type of fd stdin actually is
<memohg> this code is part of the fcgi gem
<memohg> It's not my code
<memohg> let me check that doc for a second
<workmad3> memohg: ok, so *fcgi* is doing that, not you... still doesn't alter my previous statement :P
rohitkashyap has quit [Ping timeout: 244 seconds]
<shevy> time to kill fcgi!
<workmad3> memohg: read the comment
<workmad3> memohg: 'if invoked by inetd, STDIN etc. is a socket'
B1n4r10 has joined #ruby
<workmad3> memohg: I'm gonna guess you aren't invoking through inetd :P
<memohg> so ruby has a speciall call for inetd?
<memohg> hmm
<memohg> doesn't make sense
<workmad3> memohg: no... inetd will be setting up a process where STDIN, STDOUT and STDERR are sockets
<memohg> anyway, the problem is making fcgi work
<workmad3> memohg: nothing special about ruby, something special about inetd
<jhass> watcha need fcgi for?
<memohg> so which file descriptors can we put on the call if we are not running inetd?
<jhass> what's your goal?
<memohg> jhass, I have a php webserver based on fcgi where I intend to run Redmine
<memohg> I'd like to keep the same way of running things
<workmad3> memohg: tbh, it would be much more sensible to proxy through to a rack server or use phusion passenger
<jhass> what's the frontend server?
ixti has joined #ruby
<memohg> it is apache + mod_fcgid
<workmad3> memohg: CGI and FCGI are ancient and unsupported ways of running rails apps nowadays
<jhass> apacha, nginx, squid?
<jhass> lighttpd?
lolmaus__ has joined #ruby
<memohg> I have redmine working, Just not via apache
phale has left #ruby [#ruby]
<memohg> and this error is far from clear
<jhass> so Apache, go via passenger or a reverse proxy, it'll just work
lolmaus_ has quit [Ping timeout: 250 seconds]
<memohg> jhass, I will if I can't manage with fcgi
bMalum has quit [Quit: bMalum]
<memohg> still, now I'd like to understand what is going on
<workmad3> memohg: well, for that we'd need to see the fcgi rails or rack dispatcher you managed to dig up from the ancient bowels of the internet
<jhass> you probably need to wrap into spawn-fcgi or something for the fcgi route
_ixti_ has quit [Ping timeout: 252 seconds]
lolmaus__ has quit [Client Quit]
lolmaus__ has joined #ruby
<jhass> but meh
<workmad3> ^^ ditto
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
RegulationD has joined #ruby
<workmad3> if you want to run redmine through fcgi, ask the redmine support people :P
thiagovsk has joined #ruby
<shevy> let it die!
<memohg> workmad3, jhass :-)
<nickjj> is there a difference between $stdout.write and puts?
mkaesz has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 244 seconds]
doodlehaus has quit [Remote host closed the connection]
<memohg> workmad3, that's the ancient gem
<shevy> nickjj they do not do the same right
<shevy> but I think, $stdout.write() and print() are equivalent
<jhass> nickjj: yes, Kernel#puts delegates to $stdout.puts, not $stdout.write
<nickjj> ok thanks
<jhass> nickjj: IO#puts adds a trailing newline if there's none already, prints items of an array on new lines etc.
<nickjj> yeah
<nickjj> maybe i should just man up and look into the logger class for real logging to stdout
<jhass> another thing to note is that Kernel#gets is not $stdin.gets but ARGF.gets
anaeem1 has quit [Ping timeout: 264 seconds]
User458764 has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
blandflakes has joined #ruby
S0da has quit [Remote host closed the connection]
<memohg> workmad3, http://pastebin.com/v0RMKJD0 the offending code on line 54
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davedev24_ has joined #ruby
OrbitalKitten has joined #ruby
triple_b has joined #ruby
piotrj has joined #ruby
claptor has quit [Quit: this channel is bakas]
aclearman037 has joined #ruby
jerematic has joined #ruby
keen__________79 has joined #ruby
nahtnam has quit [Quit: Connection closed for inactivity]
ms7 has joined #ruby
<workmad3> memohg: a) that means you're using the pure-ruby version of that fcgi handler, which I doubt you really want. b) that's not the code that's somehow hacking a rails app into something that can launch via fcgi. c) ask Redmine support channels for help
keen__________78 has quit [Ping timeout: 256 seconds]
jerematic has quit [Client Quit]
<ms7> I have two identical “times”:
<ms7> Format is “Time”: 2015-03-05 12:58:45 UTC
<ms7> Format is “ActiveSupport::TimeWithZone: Thu, 05 Mar 2015 12:58:45 UTC +00:00
<ms7> How would I convert the second format to the first one?
jerematic has joined #ruby
<ms7> crap.. sorry for the multi-lines...
dtordable has quit [Changing host]
dtordable has joined #ruby
<jhass> ms7: what do you mean by format?
<jhass> class or string representation?
nfk has joined #ruby
Pumukel has quit [Ping timeout: 256 seconds]
<memohg> workmad3, got confused on a) I'm gonna look for a redmine channel
dtordable has quit [Quit: • IRcap • 8.72 •]
Deele has quit [Ping timeout: 256 seconds]
<ms7> jhass: class
<jhass> ms7: then what centrx said
Waheedi has quit [Ping timeout: 255 seconds]
<ms7> jhass: Actually, I’m not exactly sure now. I just ran my test and it tells me Time is an undefined method. Digging now..
<jhass> ms7: may I ask why though?
ghostpl_ has joined #ruby
<apeiros_> ms7: Time != time
<ms7> sure, let me get you a paste, one sec
coinrookie has joined #ruby
<workmad3> ms7: it's also worth noting that it looks like neither of those is really a 'format'... merely the .inspect output of a Time and a TimeWithZone respectively
brb3 has joined #ruby
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<ms7> jhass: there
spyderman4g63 has joined #ruby
Deele has joined #ruby
<ms7> I accidentally cleared the irc window, so I wasn’t able to read the previous messages after mine
mjuszczak has joined #ruby
gluten_hell has quit [Quit: Lingo - http://www.lingoirc.com]
mkaesz has joined #ruby
<jhass> ms7: the problem is not that the string representations of those two have a different format
gluten_hell has joined #ruby
<jhass> the problem is that they do not represent the same time
spyderma_ has joined #ruby
<jhass> there's exactly 6 minutes of difference
<ms7> jhass: oh, wait, that wasn’t like that a few test runs ago, let me make sure its the same time and different format
enebo has joined #ruby
phutchins has joined #ruby
f03lipe_ has quit [Ping timeout: 256 seconds]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros_> ms7: you probably want Time.zone.now
enebo has quit [Client Quit]
<ms7> ok, now it’s the same time, I removed the Time(…) method from the test
<jhass> ugh, TimeWithZone does not compare to a Time?
<apeiros_> also, comparing to "now" in unit tests is a bad idea.
<apeiros_> jhass: iirc it coerces
<apeiros_> yepp, comparing works fine.
<jhass> so, again, format is not the problem
<apeiros_> `t = Time.zone.now; t == t.to_time` # => true
<workmad3> it'll be millisecond precision though
<jhass> ms7: like apeiros said use fixed times or if you really can't, use the timecop gem
<workmad3> so Time.now will almost certainly have changed between the two invocations... making it what apeiros_ just mentioned ;)
Takle has joined #ruby
<ms7> apeiros_: Now it throws the following error message with Time.zone.now —> No visible difference in the ActiveSupport::TimeWithZone#inspect output. You should look at the iplementation of #== on ActiveSupport::TimeWithZone or its members.
DaniG2k has quit [Ping timeout: 244 seconds]
<jhass> ms7: yes, you still confuse the string representation with the actual value
<ms7> apeiros_: yes, I had a feeling using Time.now or similar in tests is a bad idea. I’m not sure how else to simulate a Time.now date when the data to be asserted comes from Time.now.utc
<workmad3> ms7: just before that line, take a look at 'puts "Time.now: #{Time.now.to_f}, ends_at: #{place_rent.ends_at.to_f}"
<apeiros_> ms7: wtf is Time() in your test?
<workmad3> ms7: I bet you the fractional will be different ;)
<hanmac1> TimeWithZone is AS Rails shit ;P that is "NotOurProblem" ;P
spyderman4g63 has quit [Ping timeout: 252 seconds]
<apeiros_> hanmac1: can you stop the vitriol for a second and be constructive?
mkaesz has quit [Remote host closed the connection]
<apeiros_> also ruby not supporting TZ proper by stdlib didn't help avoiding things like TimeWithZone
<ms7> ok, hold on. overload
sinkensabe has quit [Read error: Connection reset by peer]
<ms7> workmad3: trying your suggestion now
tunaCanBruh has joined #ruby
<apeiros_> ms7: AR uses TimeWithZone. Time.zone.(local/now) constructs TimeWithZone. when doing tests, it's best to use that.
phutchins has quit [Ping timeout: 240 seconds]
skj3gg has joined #ruby
mkaesz has joined #ruby
<ms7> :( using tmux, can’t simply copy paste my test in bah
<apeiros_> gist
JDiPierro has joined #ruby
<apeiros_> better than in irc anyway.
<workmad3> ms7: did you take a look at .to_f on both Time.now and ends_at then? were they different, as suspected?
mkaesz has quit [Remote host closed the connection]
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ms7> I mean I have to manually type my example :) using multiple panes when copying takes ALL the text in all panes
<workmad3> hehe
<ms7> workmad3: on it
josephcs has quit [Quit: (null)]
adriancb has joined #ruby
<jhass> ms7: use tmux internal copy paste
<ms7> jhass: ty :)
mkaesz has joined #ruby
mkaesz has quit [Remote host closed the connection]
sinkensabe has joined #ruby
charliesome has quit [Quit: zzz]
<ms7> workmad3: lol. Expected: 1425561645.013997 Actual: 1425561645.002989
<workmad3> ms7: there you go... it's that the time has changed ;)
<workmad3> ms7: the default .inspect doesn't show milliseconds though
OrbitalKitten has joined #ruby
agarie has joined #ruby
<apeiros_> ms7: and that would be why I said "comparing to now in tests is a bad idea"
<ms7> so it seems I should never be using Time.now in tests as it will always be different from the asserted value
<workmad3> ^^
<apeiros_> now changes *all* *the* *time*
<ms7> apeiros_: exactly. Timecop then?
tunaCanBruh has quit [Ping timeout: 264 seconds]
<apeiros_> that's one solution
tkuchiki has joined #ruby
<ms7> damn
mkaesz has joined #ruby
roshanavand has joined #ruby
<jhass> timecop for when you can't avoid using Time.now, yeah
Czj has joined #ruby
<jhass> I think I also prefer it to manually stubbing out Time.now
<jhass> (assuming that's how your code constructs the time)
<ms7> one of my mentors is saying to look into travel_to
JDiPierro has quit [Remote host closed the connection]
<workmad3> ms7: you could also work around it by doing 'assert (Time.now.to_f - place_rent.ends_at.to_f) < 0.5' (or something smaller)
<ms7> digging
mkaesz has quit [Remote host closed the connection]
Czj has left #ruby [#ruby]
<ms7> workmad3: HA
<jhass> workmad3: had something like that once, only leads to flaky tests really
<workmad3> jhass: yeah, was about to comment on that front
<workmad3> ms7: as jhass said, it does lead to tests that are a bit flakey, it introduces a bit of imprecision, and it's ugly to boot
Grumelo has joined #ruby
senayar has joined #ruby
* certainty sometimes passes the time as an argument. handy if you have to be able to rerun things later and pretend that some day in the past is actually now
<workmad3> ms7: but if you need something quickly, it can work :)
SouL has joined #ruby
<workmad3> certainty: I've been known to have methods that do 'def foo_bar(clock = Time); some_time = clock.now; end'
<workmad3> certainty: then I can inject a stub with a specific 'now' set up
<certainty> workmad3: yepp
<certainty> i did something similar
<workmad3> I stopped using timecop when I realised it seriously messed up my test time reporting on CI runs
<workmad3> I don't like runs that claim to have taken a year to run :)
<apeiros_> lol
sankaber has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
galeido has quit [Ping timeout: 244 seconds]
<apeiros_> that's why baretest did TestTime = Time.clone
<workmad3> right... lunch time
<workmad3> bbl
workmad3 is now known as wm3|away
<apeiros_> it actually cloned a couple of core classes to avoid silly stubbers killing the framework
n008f4g_ has joined #ruby
serivich has joined #ruby
dtordable has joined #ruby
sgambino has joined #ruby
<certainty> hah
adriancb has joined #ruby
<certainty> i should check our CI. I know we use timecop in some places
mjuszczak has quit []
Hirzu_ has quit [Ping timeout: 252 seconds]
mkaesz has joined #ruby
nettoweb has joined #ruby
paulfm has joined #ruby
marr has quit [Ping timeout: 255 seconds]
Hirzu has joined #ruby
adriancb has quit [Remote host closed the connection]
nettoweb_ has joined #ruby
<shevy> timecop
<shevy> van damme
nii236 has joined #ruby
Rapier- has joined #ruby
nettoweb has quit [Ping timeout: 256 seconds]
ndrei has quit [Ping timeout: 245 seconds]
dtordable has quit [Quit: • IRcap • 8.72 •]
amystephen has joined #ruby
gisli has joined #ruby
mkaesz has quit [Remote host closed the connection]
ndrei has joined #ruby
startupality has quit [Quit: startupality]
centrx has quit [Remote host closed the connection]
startupality has joined #ruby
PaulCapestany is now known as PaulCape_
startupality has quit [Client Quit]
topolinux has quit [Ping timeout: 256 seconds]
otisZart has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<gisli> hi guys, I'm new to ruby and I'm wondering about Gemfiles. Is it possible to install the gems I state in the Gemfile only for that project and not the whole machine? So it would work similarly to how Node/NPM does it with npm install and package.json.
<jhass> gisli: yes you can, bundle install --path vendor/bundle
mkaesz has joined #ruby
<jhass> bundle install --deployment, which you should use on your production server, does this by default
juanpablo_ has joined #ruby
<jhass> see the comprehensive help at bundle help and bundle help install
rbirch has joined #ruby
<avril14th> ms7: you also have Delorean if you want to compare gems
enebo has joined #ruby
selu has quit [Read error: Connection reset by peer]
topolinux has joined #ruby
davejlong has joined #ruby
arup_r has quit [Remote host closed the connection]
<gisli> jhass: oh okay so i could do a 'bundle install --path=/home/myrepo' and it will install everything from my Gemfile into the path, if I'm understanding this correctly.
senayar_ has joined #ruby
nii236 has quit [Quit: WeeChat 1.1.1]
<gisli> Does that create a problem if I want to maybe later install it system-wide?
juanpablo_ has quit [Ping timeout: 246 seconds]
<jhass> yes and no
<shevy> lol
<jhass> I mean, yes to first and no to second ;)
<gisli> jhass: thanks alot, I appreciate it ;)
<jhass> however it's uncommon to install outside the project tree when using --path
phale has joined #ruby
<gisli> jhass: okay, so it's best to do one or the other
centrx has joined #ruby
<jhass> gisli: you can also set the GEM_HOME environment variable to set a general installation location, respected by both bundler and rubygems itself
lordkryss has joined #ruby
rbirch has left #ruby [#ruby]
senayar has quit [Ping timeout: 240 seconds]
<phale> can i get the ip from a tcpserver accept
<gisli> jhass: okay, I'll look into that. cheers
<jhass> phale: probably
_maes_ has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
<jhass> phale: let's find out together!
sevenseacat has joined #ruby
<jhass> there we know we get a TCPSocket
<phale> yes
<jhass> not much interesting there, but it inherits Socket, let's look at that
yfeldblum has quit [Ping timeout: 256 seconds]
<jhass> IPSocket I mean
<jhass> now that was easy
<phale> :D
triple_b has joined #ruby
<phale> very fun
elfuego has joined #ruby
livingstn has joined #ruby
DaniG2k has joined #ruby
<ms7> jhass, workmad3: fixed for those that are interested. Using travel_to. http://pastebin.com/nAk4J8sW
kalusn has quit [Remote host closed the connection]
<jhass> ms7: is trave_to Time.now not just freeze?
<ms7> jhass: yes, it freezes the time, from my understanding. I was told that Timecop was required before Rails 4.2 (I think?) since travel_to was only added recently.
<jhass> mmh, travel_to is not Timecop actually?
<jhass> oh
<ms7> exactly
<jhass> I didn't notice
<ms7> so no need to install timecop gem for this particular case
<ms7> WOO
jenrzzz has joined #ruby
JDiPierro has joined #ruby
<apeiros_> so AS::TestCase copied TimeCop functionality. interesting.
triple_b_ has joined #ruby
vegardx has joined #ruby
benlieb has joined #ruby
serivich has quit [Ping timeout: 246 seconds]
<vegardx> Is it possible to get bundle to honor ANY path set at all? I'm using rbenv and rbenv-gemset in order to get a somewhat functional system. But bundler... bundler just does what ever the fuck it wantst do.
<apeiros_> it seems to omit DateTime
triple_b has quit [Ping timeout: 256 seconds]
piotrj has quit [Read error: Connection reset by peer]
<apeiros_> funny, travel_back just clears all stubs. what a misnomer.
<vegardx> TL; DR: How do you get bundler to work as you'd expect. It does not honor anything set by rbenv or rbenv-gemsets.
piotrj has joined #ruby
<apeiros_> "where's my stubs gone?!?" well… you traveled back, and back there were no stubs!
<shevy> back then there was not even any code!
jenrzzz has quit [Ping timeout: 244 seconds]
piotrj_ has joined #ruby
<jhass> vegardx: bundler honors GEM_HOME just perfectly fine
serivich has joined #ruby
<vegardx> Clearly it does not, as it installs the gems globally, not honoring the paths set by rbenv.
<vegardx> Which sort of defeats the purpose of environments.
polysics has quit [Remote host closed the connection]
ms7 has left #ruby [#ruby]
piotrj has quit [Ping timeout: 246 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros_> I don't think bundler does the installations on its own, I'm pretty sure it uses rubygems for that
polysics has joined #ruby
<vegardx> if I run "gem install foo" in the same directory rbenv-gemsets works as intended. It's just bundler.
scripore has joined #ruby
vclaud has joined #ruby
fryguy9 has joined #ruby
<jhass> I guess rbenv considers environment variables still as evil and chooses to monkey patch your gem executable instead
Parker0 has joined #ruby
topolinux has quit [Ping timeout: 264 seconds]
mkaesz has quit [Remote host closed the connection]
vclaud has quit [Remote host closed the connection]
topolinux has joined #ruby
fryguy9 has quit [Read error: Connection reset by peer]
<ponga> why is gitbook horidly buggy
<ponga> *uck
fryguy9 has joined #ruby
<vegardx> Beats me, I just want something that works. And as of now there doesn't seem to be much options.
<vegardx> rbenv looked promising.
mostlybadfly has joined #ruby
Parker0 has quit [Client Quit]
polysics has quit [Ping timeout: 244 seconds]
<jhass> why do you need gemsets btw?
jottr has joined #ruby
<vegardx> I want to keep things under wraps. I'd like to be able to "rm -rf ~/project" when I'm done and forget about it.
<vegardx> Just like I can with nodejs and python.
<jhass> bundle install --path vendor/bundle and done with that part
Parker0 has joined #ruby
<Jamo> doesn't rvm gemsets solve that issue?
<vegardx> That doesn't stop bundle for using the wrong version of ruby. The idea of enviroments is to have things isolated.
<jhass> Jamo: it did, before we had bundler
<jhass> now we have bundler
flip_digits has joined #ruby
devdazed has quit [Quit: Computer has gone to sleep.]
<vegardx> Is it possible to set the path in Gemfiles?
<jhass> vegardx: that has nothing to do with gemsets, it means you didn't run rbenv rehash as every second command like you gotta do with rbenv or your rbenv is borked in another way
<Jamo> jhass: ok, good to know; never really used it...
<jhass> vegardx: no
<jhass> but on servers you should use --deployment which sets that option to exactly the value I used as example
<vegardx> Then I cannot use that.
<jhass> because?
<vegardx> Because of maintainability and not "forgetting" to set path.
mrdtt has joined #ruby
<jhass> it's a remembered option
Kellin has joined #ruby
<vegardx> Exactly.
<jhass> you have to do it once when setting the project up on your machine
<phale> what is loop exactly?
<phale> not "for" or "while"
<phale> but loop literally
<vegardx> I have tons of projects, the mess that would make is laughable.
<jhass> phale: def loop; while true; yield; end; end;
<phale> is it good
<shevy> phale loop { sleep 1; puts 'hey phale' }
<shevy> the name makes it simple
<shevy> loop loops over things
<jhass> vegardx: I don't see where that's much different from adding it to the Gemfile or as adding a .ruby-gemset file
Parker0 has quit [Client Quit]
<shevy> and you can break out manually whenever you want to
<phale> cool
<shevy> with the keyword break
foureight84 has joined #ruby
RegulationD has joined #ruby
<vegardx> jhass: They live inside the project. Impossible to mix gems from projects then.
<shevy> ruby has cleverly named stuff :)
jaygen has quit []
<jhass> vegardx: it's impossible to do so with bundler active in the first place
<vegardx> I have a .ruby-gemsets-file, but bundler does not honor it.
<jhass> doesn't even matter whether you use --path or not
<waxjar> if bundler doesn't respect the gem_path/gem_home env vars, bundler is broken imo, even if they provide a workaround
tunaCanBruh has joined #ruby
<jhass> bundlers whole purpose is to keep your dependency environment consistent
<vegardx> waxjar: Exactly.
<jhass> waxjar: it does for me
<jhass> I rather don't trust rbenv/rbenv-gemsets to set it correctly
foureight84 has quit [Client Quit]
<vegardx> So you don't see any issue with bundler completely breaking a typical workflow?
<vegardx> I expect programs to honor the paths set by the shell.
coinrookie has quit [Quit: Leaving]
zenith_ has joined #ruby
freerobby has joined #ruby
RegulationD has quit [Ping timeout: 256 seconds]
<jhass> as said, it's not broken here
<jhass> working perfectly fine with chruby
<vegardx> Because you work around it.
<jhass> no, I don't use --path
<jhass> I said you could
mrdtt has quit [Quit: Textual IRC Client: www.textualapp.com]
tunaCanBruh has quit [Ping timeout: 244 seconds]
<vegardx> It's just more things that can, and will, break.
mrdtt has joined #ruby
<jhass> ok, I see
<vegardx> I want clean, consistent enviroments. With reproducability.
<shevy> bundler is broken
<jhass> you want to complain at some random people on the internet
<phale> wont owrk
<phale> wokr*
<phale> work*
<vegardx> I want to be able to say to some one "pull this repo" and they'll get it working because things are set properly up.
juanpablo_ has joined #ruby
garethrees has joined #ruby
<jhass> phale: it works, it's just not doing what you think it does ;). If you do a debugging puts into the if, you'll see that it is indeed properly executed
RandyT has joined #ruby
<phale> jhass: hm
<phale> the problem is that it's returning false
<phale> even when it's true..
<jhass> phale: it just doesn't leave the method just because of that
<phale> oh
<phale> i keep mixing up C and ruby...
<jhass> phale: I doubt that would work in C either
<shevy> that's because you haven't yet written enough ruby phale
JohnBat26 has joined #ruby
<phale> jhass: well not the hash of course
<shevy> phale you could also write: return true if @accounts[user] == password
<shevy> the way you wrote it right now, you always return false
<phale> but if you tried "if (ok) return true;"
<shevy> the other way around
<phale> no need to add an else, just add a return false at the end
Takle has quit [Remote host closed the connection]
lys has joined #ruby
fryguy9 has quit [Quit: Leaving.]
<jhass> phale: yes, but you don't have a return keyword there
<phale> shevy: okay
ghr has quit [Ping timeout: 256 seconds]
<shevy> you could use return in both cases :) but the last return is optional, people like to omit it
<shevy> return true if bla
<phale> or i could just do
<shevy> return false
<phale> return @accounts[user] == password
<phale> dont need a return either though
<shevy> yeah
<phale> can get rid of that
<shevy> indeed
<jhass> phale: the last expression of a method is its return value, making the return keyword in that instance optional
<shevy> you are already in the natural ruby flow now!
<shevy> soon you will write more ruby code than jhass does
<phale> shevy: now it breaks my loop
<shevy> because he is writing more crystal than ruby
avril14th has quit [Ping timeout: 256 seconds]
<shevy> phale just reshuffle your conditions in the loop; you can only break out early if you use break
<shevy> or if you have some other error, and no begin/rescue :P
doodlehaus has joined #ruby
Axy has quit [Read error: Connection reset by peer]
mikecmpbll has quit [Max SendQ exceeded]
Axy has joined #ruby
cphrmky has joined #ruby
rbennacer has joined #ruby
avril14th has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
psy_ has quit [Ping timeout: 244 seconds]
mikecmpbll has joined #ruby
Megtastique has joined #ruby
<phale> see?
<phale> im not sure what im doing wrong
ych4k3r has joined #ruby
centrx has quit [Remote host closed the connection]
Takle has joined #ruby
lesce has joined #ruby
skj3gg has joined #ruby
dys has joined #ruby
Zai00 has quit [Quit: Zai00]
scripore has quit [Quit: This computer has gone to sleep]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
topolinux has quit [Ping timeout: 250 seconds]
fryguy9 has joined #ruby
Macaveli has quit [Ping timeout: 250 seconds]
scripore has joined #ruby
<jhass> I seem to have missed the description of what's not working?
fryguy9 has quit [Read error: Connection reset by peer]
fryguy9 has joined #ruby
iamjarvo has joined #ruby
scripore has quit [Client Quit]
OrbitalKitten has joined #ruby
jottr has quit [Ping timeout: 256 seconds]
scripore has joined #ruby
aclearman037 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
topolinux has joined #ruby
jlast has joined #ruby
jimms has joined #ruby
aclearman037 has joined #ruby
marr has joined #ruby
plashchynski has quit [Quit: plashchynski]
ZJvandeWeg has quit [Ping timeout: 246 seconds]
jottr has joined #ruby
ghostpl_ has quit [Remote host closed the connection]
centrx has joined #ruby
dj_zubehoer has joined #ruby
tohsig has joined #ruby
adriancb has joined #ruby
startupality has joined #ruby
polysics has joined #ruby
otisZart has joined #ruby
ghostpl_ has joined #ruby
fryguy9 has quit [Read error: Connection reset by peer]
fryguy9 has joined #ruby
Guest67784 has quit [Ping timeout: 256 seconds]
werelivinginthef has joined #ruby
devdazed has joined #ruby
otisZart has quit [Read error: Connection reset by peer]
scripore has quit [Quit: This computer has gone to sleep]
adriancb has quit [Ping timeout: 252 seconds]
scripore has joined #ruby
adriancb has joined #ruby
qiffp has joined #ruby
Katselphrime has joined #ruby
RegulationD has joined #ruby
freerobby has quit [Quit: Leaving.]
<ducklobster> is it necessary to add the json gem to your Gemfile or Gemspec since it is a default gem?
freerobby has joined #ruby
sigurding has joined #ruby
<ducklobster> or I guess, is it good practice to even though the above?
<centrx> JSON is in stdlib
<centrx> so not necessary to add gem
benlieb has quit [Quit: benlieb]
<centrx> the 'json' gem is for JSRuby I believe
<centrx> JRuby rather
<jhass> I think it's basically vendored in but you might get a newer version via the gem
<ducklobster> centrx thanks, I always wondered why it was in the Rubydoc
<ducklobster> vendored in, as in it is a separate gem but they wrap it into stdlib?
mitchellhenke has joined #ruby
<jhass> like with rubygems and minitest
spider-mario has quit [Quit: No Ping reply in 180 seconds.]
<jhass> I think, dunno though
Zai00 has joined #ruby
rbennacer has quit [Remote host closed the connection]
Qladstone has joined #ruby
Takle has quit [Remote host closed the connection]
<wm3|away> centrx: I think updates are also released through the gem for MRI, so that you can grab fixes, etc. without waiting for a ruby version that vendors it
wm3|away is now known as workmad3
last_staff has quit [Read error: Connection reset by peer]
spider-mario has joined #ruby
tjohnson has joined #ruby
zenith_ has quit [Remote host closed the connection]
<workmad3> and, of course, there's yajl-ruby which provides ruby bindings to yajl, for another JSON option
mrdtt has quit [Ping timeout: 256 seconds]
<jhass> flori/json is the json gem
PaulCape_ is now known as PaulCapestany
Takle_ has joined #ruby
fmcgeough has joined #ruby
<apeiros_> workmad3: isn't oj still the fastest?
serivich has quit [Ping timeout: 246 seconds]
Macaveli has joined #ruby
tagrudev has quit [Remote host closed the connection]
<jhass> apeiros_: https://github.com/kostya/benchmarks/tree/master/json there, add cases for yajl and oj ;P
<jhass> (he does accept PRs ;) )
PaulCapestany is now known as PaulCape_
topolinux has quit [Ping timeout: 252 seconds]
rbennacer has joined #ruby
topolinux has joined #ruby
jshultz has joined #ruby
<apeiros_> I don't care enough
Katselphrime has quit [Remote host closed the connection]
jimms has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
Kricir has joined #ruby
havenwood has joined #ruby
justin_pdx has joined #ruby
rbennacer has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<nickjj> is there anything like golang's defer in ruby? i'm not seeing anything so far
tunaCanBruh has joined #ruby
chemiazpolski has quit [Read error: Connection reset by peer]
<jhass> don't assume everybody in here knows go...
ismaelga has joined #ruby
Macaveli has quit [Ping timeout: 264 seconds]
zenith_ has joined #ruby
<nickjj> jhass, sorry. it's just a way to run something at the end of a functional call regardless of where you exit (to my understanding at least)
<nickjj> *function call
<jhass> sounds like ensure
SouL has quit [Remote host closed the connection]
<jhass> def foo; code_that_may_return_or_raise; ensure; always_run; end
<nickjj> will ensure work even if no error is thrown?
<jhass> yes
SouL has joined #ruby
<jhass> >> def foo; return "bar"; ensure; raise; end; foo
<eval-in_> jhass => (RuntimeError) ... (https://eval.in/296369)
<apeiros_> *exception is raised # ruby terminology
Kricir has quit [Remote host closed the connection]
<nickjj> i like exiting early from functions and i want to log some stuff, but i don't want to call the log function 5 times with a different string each time
<jhass> oh, I thought we "fail" exceptions these days :P
<apeiros_> given that `throw :error` is valid ruby and has nothing to do with exceptions
<apeiros_> jhass.failed? # => true
<nickjj> i figured i could use something like refer/ensure to call it once and just set a variable before i exit early as the string
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 252 seconds]
dfinninger has joined #ruby
rbennacer has quit [Remote host closed the connection]
<jhass> nickjj: if it's a complex logger call I'd rather extract it to a private method though
<nickjj> jhass, it is already extracted to a method
diegoviola has joined #ruby
<nickjj> it's not super complex, it has 4 arguments. 1 of which is a "status" which would change based on the outcome of some code ran before running it
skj3gg has quit [Quit: ZZZzzz…]
bruno-_ has joined #ruby
Adran has quit [Quit: Este é o fim.]
<nickjj> it seems like i'm doing it wrong if i have to call that method 5 times just to change the status
senayar_ has quit [Remote host closed the connection]
memohg has quit [Quit: Leaving]
Kellin has quit [Ping timeout: 245 seconds]
<jhass> maybe just gist what you have?
Mia has quit [Read error: Connection reset by peer]
<apeiros_> nickjj: btw., porting idioms is often a bad idea. port meaning, not implementations.
Axy has quit [Read error: Connection reset by peer]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
topolinux_ has joined #ruby
Axy has joined #ruby
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
Adran has joined #ruby
slawrence00 has joined #ruby
<nickjj> jhass, something like this https://gist.github.com/nickjj/a25c04ce8575396c9415
<nickjj> it would be really easy to just call Scrape.log_message a few times with a different status but i thought maybe there's a better way
sevenseacat has quit [Remote host closed the connection]
<jhass> nickjj: it's hard to find a refacotring opportunity from that little :/
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kellin has joined #ruby
topolinux has quit [Ping timeout: 256 seconds]
<nickjj> jhass, reload it. i added more
<apeiros_> the `next` is suspicious
<jhass> meaning, I gathered that much from your explanations, I was hoping some insight into the complete structure
<apeiros_> mid-function returns = spaghetti
<nickjj> apeiros_, it's inside of a loop to skip to the next person in the list
<jhass> yeah, still
odigity has quit [Ping timeout: 265 seconds]
<apeiros_> nickjj: that's the same thing
<nickjj> how is that spaghetti?
<apeiros_> it's a mid-code return
justin_pdx has quit [Quit: justin_pdx]
<apeiros_> returns are not limited to functions
<jhass> nickjj: I'm interested in all cases, not just the failure/skip ones
PaulCape_ has quit [Quit: .]
<nickjj> mid-code returns are a good habit imo, why would i NOT want to exit early if i no longer care about the rest of the code in the fn/block/whatever?
agarie has quit [Remote host closed the connection]
KidCartouche has joined #ruby
<nickjj> jhass, in the success case it just writes the person to a db at the end of the function call
OrbitalKitten has joined #ruby
<jhass> what it does is not that important here actually
<jhass> the structure is
Takle_ has quit [Remote host closed the connection]
<nickjj> then it increments a few numbers to keep track how many were successful as part of the progress output in the log
topolinux_ has quit [Ping timeout: 246 seconds]
benlieb has joined #ruby
senayar has joined #ruby
OrangeJewce has joined #ruby
<nickjj> for example in the person_exists case, it just does a lookup in the db on a unique field and returns true/false if it exists or not
<jhass> gisting the whole thing would violate your NDA you think?
it0a has joined #ruby
PaulCapestany has joined #ruby
tgunr has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
timanema has quit [Ping timeout: 272 seconds]
<apeiros_> nickjj: mid-code returns are a horrible habit and you should quit it
<nickjj> i have 18 security cameras on me, if i share the code everyone here would have to be eliminated
<apeiros_> and you can read about it about everywhere. there's virtually no disagreement there.
<nickjj> seriously though, it's just scraping a website and looping through "people"
gizmore has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<apeiros_> you'd not want to quit early because your code becomes messy to read. you phrase your branching properly and move stuff to methods in a meaningful way. result: readable code.
<jhass> again, what it does is actually not relevant here, the structure and similarity of the cases and calls is
spicerack has quit [Ping timeout: 240 seconds]
<phale> jhass
<phale> I need the best tutorial money can buy
<phale> or can't buy
<nickjj> jhass, everything is the same except the "status" part of the fn call
PaulCapestany has quit [Max SendQ exceeded]
braincra- has joined #ruby
devyn_ has quit [Ping timeout: 240 seconds]
<jhass> phale: senior dev that personally mentors you, standing physically next to you
<phale> good one
<phale> haha
devyn has joined #ruby
zenith_ has quit [Remote host closed the connection]
<apeiros_> nickjj: it seems to me - from the limited code you gave - that you want to parametrize status: STATUS[:missing_person]
<apeiros_> and don't even need all those ifs
rbennacer has joined #ruby
PaulCapestany has joined #ruby
<nickjj> apeiros_, the ifs are database queries that return true/false
<nickjj> btw apeiros_ what's your opinion on this? https://gist.github.com/nickjj/dc269cf62f02528209e8
<apeiros_> nickjj: ugly
<nickjj> given my naming of the methods you can probably guess which one i prefer
JohnBat26 has quit [Ping timeout: 272 seconds]
<apeiros_> there's absolutely no reason to return early there.
braincrash has quit [Ping timeout: 252 seconds]
<canton7> imo that isn't a valid use-case for an early exit
<apeiros_> note: I do consider *immediate* returns a different thing than*mid-code* returns.
zenith_ has joined #ruby
jottr has joined #ruby
<apeiros_> but the example you gave is still poor
xtagmy has joined #ruby
<canton7> it took me about twice as long to mentally parse the second example
Qladstone has quit [Ping timeout: 256 seconds]
<nickjj> ok, let me gist this whole scrape thing after removing just a tiny bit of the NDA protected secret sauce
iamjarvo has joined #ruby
<nickjj> i'll simply rename a few urls and variable names
<apeiros_> nickjj: def yay; foo ? 'hello' : 'bar'; end
iamjarvo has quit [Max SendQ exceeded]
<workmad3> If it's really a single value for the condition, and two single-word branches (simple literals or single method calls), I'd personally do a ternary... foo ? "hello" : "bar"
<workmad3> as apeiros_ just said too :)
<apeiros_> as said, poor case, bad code.
iamjarvo has joined #ruby
jonr22 has joined #ruby
<nickjj> sure, but what if you wanted to do 2 things based on the condition of foo
<apeiros_> or if you dislike ternary, a fully written out if/else is still better.
<nickjj> my example was too simple i'm afraid
tgunr has joined #ruby
<apeiros_> then use an if/else, as the programming language elders command you to :-p
<canton7> if you want to do two different things based on a single parameter, imo you need two sub-methods
<apeiros_> and ^
<canton7> ... then it boils down to the same, and the if/else is clearer
<nickjj> ok, give me 2min to supply the gist, hold your horses
<apeiros_> "say what you mean"
<canton7> (depending on how large those two different things are, of course)
<apeiros_> canton7: was about to say the same
<canton7> :P
<workmad3> canton7: aww, you mean you'd disagree with my use of a ternary with an 80-character variable holding the condition and 2 60 character method names for each branch?
<canton7> sure, a ternary would work too
<apeiros_> workmad3: lol
<canton7> I would use a ternary for "do X if condition, else do Y", but for getting a value, sure
<apeiros_> I'm all for meaningful names, but 80 chars seems *slightly* excessive :D
<canton7> and I'm happy line-splitting ternaries, so long method names is fine :)
<phale> why wont this work??
polysics has quit [Remote host closed the connection]
ghostpl_ has quit [Remote host closed the connection]
<workmad3> apeiros_: if I'm not careful, I'm going to end up spending the afternoon integrating a password generator into vim as a variable name generator :)
<phale> i've been at it for five hours and it still is not fixing itself
<phale> im not even sure what the problem is
<canton7> code doesn't fix itself ;)
<phale> okay
<phale> but still, the loop will hang after a valid login
<phale> weird
<canton7> which line is it hanging on?
rippa has joined #ruby
hanmac1 has quit [Quit: Leaving.]
<workmad3> phale: err.... why is your loop *outside* your Thread? :/
<phale> it is?
<jhass> workmad3: it's fine, it's blocking on the accept
<workmad3> jhass: yeah, just spotted that
<jhass> workmad3: standard fork on connection thingy
<phale> how do I unblock it then
<jhass> phale: it's fine
<canton7> phale, what line is it blocking on?
<canton7> s/blocking/hanging/
<phale> well it sends "Login attempt: user password"
<phale> after that i can't input anything
odigity has joined #ruby
jlast has quit [Remote host closed the connection]
jonr22 has quit [Ping timeout: 264 seconds]
<workmad3> phale: well, after that the connection is closed and you'd need to start a new connection
<jhass> phale: where does statecmp come from?
<nickjj> i removed some comments and unimportant things like scrape implementation details (ie. extracting fields from selectors)
timonv has quit [Ping timeout: 240 seconds]
<canton7> phale, so is it line 19, line 25, line 20, etc, that hangs? which is the last exact line that executes?
<jhass> phale: oh, yeah, what workmad3 said first
<phale> statecmp
<canton7> if you're not sure, add more logging :)
<phale> u know
<phale> statecmp
<phale> uh
<phale> yeah that might be it
timonv has joined #ruby
ascarter has joined #ruby
mkaesz has joined #ruby
Cache_Money has joined #ruby
beneggett has joined #ruby
<phale> didn't fix it
<phale> it will execute the puts "Login attempt: user pass"
<phale> after that it just doesnt work
sinkensabe has quit [Read error: No route to host]
sinkensabe has joined #ruby
<workmad3> phale: hmm... actually, as jhass said... what is 'statecmp', where did it come from, what do you think it's doing?
<phale> i just got rid of it
<phale> it was an error
<workmad3> phale: also, where is @accounts initialised?
<phale> initialize
<phale> @accounts = Hash.new
<workmad3> phale: can't see that in the code you pasted
<phale> well it shouldn't be too much of a problem
<phale> if you don't see it that is
<workmad3> phale: unless it has a typo in initialization and you're hitting an exception that's killing the thread because @accounts in nil
ghostpl_ has joined #ruby
<workmad3> phale: seeing as it 'dies' between printing 'login attempt' and any other logging, and the only thing that happens there is 'valid_login', it's a fairly good candidate for an issue
phutchins has joined #ruby
<phale> hm
timanema has joined #ruby
<phale> maybe
hobodave has joined #ruby
<workmad3> phale: also, do you have an objection to normal if/else statements? :)
joonty has quit [Quit: joonty]
<nickjj> jhass, i'd be really curious to see how you'd refactor that
<phale> i use this because it's short
<phale> concise and clear
<phale> ;)
<workmad3> phale: err... not particularly
<phale> yes
<canton7> you check valid_login twice....
<workmad3> ^^
<canton7> once with an unless, once with an if
<phale> so what does a man do?
<canton7> if test ... else ... end
<jhass> nickjj: looking currently, not sure I follow the logic for resetting start_at_per_page, it'll always be 1 inside the loop
scripore has quit [Quit: This computer has gone to sleep]
<workmad3> phale: you have a long, ugly way of doing 'if valid_login(...); <blah>; else; <blah>; end'
<canton7> not if test ... end if !test ... end
<nickjj> jhass, reload the gist (i added a comment since then), but line 36 (after the reload) increments it
<phale> okay
<phale> i added an else removed the unless and put the code from unless into else
<phale> was that supposed to fix it?
lolmaus__ has quit [Quit: Konversation terminated!]
<nickjj> jhass, i reset it back to 1 because imagine this output, page 1 : 1/50 ... page 1 : 2/50 ... page 2 : 1/50
<workmad3> phale: no, just a comment on truly horrendous code
<workmad3> phale: also out of curiosity... where are 'name' and 'version' coming from?
scripore has joined #ruby
zenith_ has quit [Remote host closed the connection]
<nickjj> page_begins_at might be a better var name, this is just something i hacked together as a first iteration
<phale> truly horrendous
<phale> >truly horrendous
<phale> is this your first time writing ruby?
jenrzzz has joined #ruby
<phale> it's not maximally horrendous
<workmad3> phale: only if you ignore the last 8 years I've spent doing it :P
<phale> i agree it sucks at parts
jimms has joined #ruby
<phale> but the rest is good
Takle has joined #ruby
<nickjj> jhass, perhaps a case/when for each "exit early" condition is more clear?
<workmad3> phale: if it was good, it would work :P
<jhass> nickjj: gimme 10 minutes :)
<phale> >> ''.methods.length
<eval-in_> phale => 168 (https://eval.in/296372)
<nickjj> jhass, ok great
<workmad3> phale: still... 'name' and 'version'... where do they come from?
<phale> name is an attr_accessor
<phale> version is from initialize
tkuchiki has quit [Remote host closed the connection]
<workmad3> phale: is it 'version' or '@version'?
<phale> @version
<workmad3> phale: ok, then there's your issue
<phale> okay thanks
<workmad3> phale: ' c.puts "Welcome to #{name} #{version}", "Type help for some commands."' <-- 'version' is wrong there
joonty has joined #ruby
tkuchiki has joined #ruby
<phale> that fixed it
<phale> ty
<workmad3> phale: it'll be throwing a NoMethodError which will crash everything out
sj has quit [Ping timeout: 265 seconds]
<workmad3> phale: out of curiosity... are you a C programmer by day?
red_horned_rihno has quit [Ping timeout: 256 seconds]
AirstripOne has joined #ruby
* apeiros_ off for commute, curious to see jhass' refactoring when back online :D
<phale> workmad3: yes
<phale> but i dont program in it anymore
<workmad3> phale: it shows ;)
<phale> where
<workmad3> phale: in the way you wrote that method
<phale> hm
<phale> yes
apeiros_ has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 256 seconds]
sinkensabe has quit [Remote host closed the connection]
zenith_ has joined #ruby
<phale> workmad3: want an exercise?
<workmad3> phale: not particularly
<AirstripOne> Has anyone else on here done project euler?
<phale> it's okay
<phale> if i can't do it you probably can't do it either
<phale> uhh PPM parser + output raster width and height onto colors on terminal
<canton7> phale, that's not the point. most of us have our own lives to read, and making little networking toy scripts for you doesn't add value
<canton7> *to lead
gizmore has joined #ruby
<workmad3> phale: as I said, not particularly... and the backhanded insult to my capabilities doesn't entice me into it either
<canton7> trying to insult people into helping you doesn't work either. it just turns everyone watching against you
<workmad3> phale: I have no need to prove myself to you :P
<phale> i didn't see that i was insulting someone
tkuchiki has quit [Ping timeout: 272 seconds]
<phale> sorry
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
psy_ has joined #ruby
<workmad3> canton7: hear that? he doesn't think I'm a person! :(
<sivsushruth> lel
<canton7> <phale> if i can't do it you probably can't do it either <-- that's saying someone's worse than you
aganov has quit [Remote host closed the connection]
<phale> no
<phale> it means equal
<phale> same equality
<phale> wasn't saying he was worse
<canton7> when you're bad, that's still saying someone's bad :P
<phale> maybe if you interpret data that way
garethrees has quit [Remote host closed the connection]
<phale> i interpret it differently
<canton7> anyway, client call, yay
<workmad3> phale: unfortunately, insults don't work on how you interpret them, they work on how everyone else interprets them
ghr has joined #ruby
kblake has joined #ruby
<workmad3> phale: and it came across as a very "hey, if you're so good and judgemental, why don't you do this, but I bet you can't because you're just as bad as I am at this stuff"
senayar has quit []
<phale> with the same logic you could say a book is insulting you
<phale> if it gives you an exercise
bal has quit [Quit: bal]
mskaesz has joined #ruby
djcp has joined #ruby
<workmad3> phale: if a book stated 'try this, but I bet you can't do it because I can't and I can't even write simple ruby' then yes, it would be insulting
<phale> can't you let bygones be bygones?
<phale> i insulted you once accidentally, said i was sorry
<phale> what else do you want from me?
<workmad3> phale: a pint of blood and a pound of flesh, fedexed to an anonymous PO box...
<phale> i'll just ignore you to avoid any conflict
<phale> sorry
* workmad3 shrugs
mskaesz has quit [Remote host closed the connection]
cphrmky has quit [Quit: Textual IRC Client: www.textualapp.com]
ZJvandeWeg has joined #ruby
polysics has joined #ruby
spyderma_ has quit [Remote host closed the connection]
crueber has joined #ruby
mkaesz has quit [Ping timeout: 245 seconds]
<havenwood> AirstripOne: I haven't done all of them, but some.
startupality has quit [Quit: startupality]
<AirstripOne> It's pretty good practice for writting efficient algos when you move up. Although I notice the poeple tend to look down on Ruby
<phale> The Ruby Programming Language eh?
<phale> sounds like a splendid work of art
<phale> i'mma go read it
<AirstripOne> I guess they would feel better if you had to write every freaking method/function in C...no thanks
fabrice31 has quit [Remote host closed the connection]
paradoja has quit [Ping timeout: 240 seconds]
red_horned_rihno has joined #ruby
agarie has joined #ruby
<workmad3> AirstripOne: I've done a few of them, mostly did them in ruby
<havenwood> AirstripOne: There are quite a few now. It'd be quite an accomplishment to complete them all.
KidCartouche has quit [Quit: Leaving]
<AirstripOne> I'
<AirstripOne> I'm trying. Some of them now takes days
zenith_ has quit [Ping timeout: 264 seconds]
<havenwood> AirstripOne: Nice.
<workmad3> AirstripOne: to figure out? or to run?
<AirstripOne> to figure out
<AirstripOne> to run the max is 60secs
<workmad3> AirstripOne: ah, yeah... they're not intended to be easy :)
Hirzu has quit [Ping timeout: 246 seconds]
AlexRussia has quit [Ping timeout: 256 seconds]
spyderman4g63 has joined #ruby
<AirstripOne> workmad3: that's for sure. you get a false sense on the first 20 and then it goes up and up. although, like I said. Ruby gets no respect on the forum
<workmad3> AirstripOne: what I've encountered a few times is that I give up on a problem on PE, then when I look at it again a year or two later the answer is obvious :)
<AirstripOne> exactly! same for me
<AirstripOne> the subconcious takes over thinking about it
<AirstripOne> SERVLIST
<workmad3> AirstripOne: well, for me I think it's more that I've spent time reading various bits on maths, physics and thinking techniques in the interim, and I end up just spotting the answer quicker, rather than a subconcious process that lasted a year or more thinking about the one thing ;)
jaequery has joined #ruby
replay has joined #ruby
<AirstripOne> that too!
ghr has quit []
<AirstripOne> I haven't read this much on number theory in years
mistermocha has joined #ruby
<phale> anyone here who has read TRPL?
ghr has joined #ruby
<hoelzro> phale: I have
<hoelzro> I very much enjoyed it
<phale> did you learn ruby?
<phale> like at a very advanced level?
wallerdev has joined #ruby
<phale> including the syntax etc
<AirstripOne> I prefer the pick axe books, The well grounded rubyist, and Why's book
<phale> TRPL is written by the creator of ruby
<AirstripOne> Ruby is a fun language but it doesn't scale well.
mloveless has joined #ruby
Morkel has quit [Quit: Morkel]
<phale> im sure he knows how to explain it the best
<phale> seeing as he made the language..
max96at|off is now known as max96at
mistermo_ has joined #ruby
<AirstripOne> I think David Flanagan wrote TRPL and Matsumoto just signed his name
scripore has quit [Quit: This computer has gone to sleep]
hollywood has joined #ruby
<phale> dunno
aarkerio has joined #ruby
<aarkerio> I'm reviewing a class for a fellow programmer and in the bottom of the class I see the code:
<aarkerio> FtpConfig = Struct.new(:host, :user, :pass, :target)
<aarkerio> but between methods, I mean, out of any method
<aarkerio> is this a good practice?
ki0_ has joined #ruby
DaniG2k has quit [Quit: leaving]
zenith_ has joined #ruby
<phale> aarkerio: sure
<hoelzro> phale: I feel like I learned the syntax in its entirety
mistermocha has quit [Ping timeout: 272 seconds]
<phale> Structs are good in Ruby
<phale> i don't use them much though
<hoelzro> I think AirstripOne is right about the authorship
<aarkerio> but why is not in the top of the file? why in the bottom?
ki0 has quit [Ping timeout: 240 seconds]
Shazaum has joined #ruby
piotrj_ has quit [Remote host closed the connection]
<phale> aarkerio: probably because he wants to create the struct after all the method definitions
<phale> that's usual
<phale> methods -> variable definitions -> statements
sinkensabe has joined #ruby
scripore has joined #ruby
lordkryss has quit [Quit: Connection closed for inactivity]
Shazaum has quit [Changing host]
Shazaum has joined #ruby
ki0_ has quit [Ping timeout: 256 seconds]
<AirstripOne> I think in programming one can drive oneself crazy with the why. Best just to learn the rules and apple them.
Takle has quit [Remote host closed the connection]
<AirstripOne> like learning a foreign language
<AirstripOne> sometimes the syntax just "is"
harleypig has left #ruby [#ruby]
x77686d has joined #ruby
MasterPiece has quit [Remote host closed the connection]
tkuchiki has joined #ruby
maletor has joined #ruby
_maes_ has joined #ruby
Zai00 has quit [Quit: Zai00]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jlast has joined #ruby
<Morrolan> Eh, programming languages were usually designed. Unlike natural languages.
roshanavand has quit [Ping timeout: 256 seconds]
<phale> if I wanted i could write an entire library based on nothing
<phale> the library would do nothing
<phale> ;)
Goodbeard has joined #ruby
<AirstripOne> But some of the design decisions are arbitrary
<centrx> Such as?
<AirstripOne> indention vs putting end
<agarie> that's not arbitrary
<AirstripOne> having many ways to do something (the ruby way) vs python (generally one "correct" way)
<AirstripOne> it's by definition arbutary: the creator could have made it anyway he wanted
<phale> indentation is ignored by the compiler
<phale> all spaces are ignored by the compiler(and all tabs)
<diegoviola> Perl wasn't designed to be what it is now in its current form, programming languages also evolve
frog0909 has joined #ruby
<AirstripOne> not in python its not!
<phale> python is
<phale> well
<phale> python
triple_b_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<AirstripOne> well, you get my point. All languages have peccadillos
<phale> ok
buub has quit [Ping timeout: 255 seconds]
AirstripOne has quit [Quit: leaving]
skj3gg has joined #ruby
<centrx> I don't get his point
<centrx> Python is just goofy
ZJvandeWeg has quit [Quit: WeeChat 1.1.1]
anarang has quit [Quit: Leaving]
tkuchiki has quit [Ping timeout: 256 seconds]
AlexRussia has joined #ruby
<phale> python is just sucky
Takle has joined #ruby
<phale> anyways my gf just broke up with me
<phale> afk
Channel6 has joined #ruby
skj3gg has quit [Client Quit]
FooMunki_ has quit [Read error: Connection reset by peer]
skj3gg has joined #ruby
apeiros_ has joined #ruby
skj3gg has quit [Client Quit]
timonv has quit [Ping timeout: 265 seconds]
B1n4r10 has quit [Ping timeout: 246 seconds]
Rapier- has quit [Quit: (null)]
odigity has quit [Ping timeout: 265 seconds]
lemur has joined #ruby
<aarkerio> ¡Gracias phale!
mistermo_ has quit [Remote host closed the connection]
aarkerio has left #ruby ["Verlassend"]
<apeiros> jhass: did you gist any refactor?
<jhass> apeiros: not yet, almost done I think
<jhass> decoupling the increment from the logging is actually hard
<jhass> but just checking if I didn't change any logic atm
FooMunki_ has joined #ruby
<apeiros> I wonder whether I should give it a try too…
<jhass> please :)
ndrei has quit [Ping timeout: 265 seconds]
<apeiros> hm, just opened their gist - the status part is different from the earlier gist…
adriancb has quit [Read error: Connection reset by peer]
<nickjj> apeiros, that is the full one yeah
<jhass> yeah
qhartman_ has quit [Quit: Ex-Chat]
<nickjj> lines 19, 26 and 30 would be the log_message calls
<apeiros> nickjj: where's the status: STATUS[:person_exists] stuff?
adriancb has joined #ruby
<nickjj> and 20/26 would be the "nexting"
<apeiros> i.e. in your earlier gist you had different if's which did the same log_message…
<nickjj> apeiros, oh. i simplified it to a string -- the STATUS[:foo] is just a hash with symbol/string pairs for the actual log msg
zenith_ has quit [Remote host closed the connection]
<apeiros> seems to me like you also removed logic…
<jhass> nickjj: apeiros so I think http://paste.mrzyx.de/p5pgturna would be my idea, not super happy, especially about the names, but that's what it is when you have to work in the abstract
<apeiros> the if's are not present
spyderman4g63 has quit [Ping timeout: 272 seconds]
<nickjj> apeiros, yeah i reversed the logic in the first gist to make it more simple to read
<nickjj> the full one is the real actual logic
adriancb has quit [Read error: Connection reset by peer]
kaiZen- has joined #ruby
<nickjj> jhass, checking
boshhead has joined #ruby
adriancb has joined #ruby
<jhass> nickjj: basically regard page as an object containing multiple Foos, thus start by extracting them to their own builders/factories/parser whatever you want to call it
mistermocha has joined #ruby
lemur has quit [Remote host closed the connection]
<nickjj> jhass, i don't think the logic matches hmm
bruno-_ has quit [Ping timeout: 265 seconds]
<phale> jhass
<jhass> well, in your full gist, the actual logic was still very vague
maletor has quit [Quit: Computer has gone to sleep.]
<phale> Do you know a good Ruby Image Parser
<phale> for most file formats
<jhass> nickjj: for example .find_by_title? and Foo.exists? are basically the same thing
<nickjj> jhass, yeah. those are parts i did slightly change. realistically there's like 15 attributes and 3 of them are being checked
<jhass> nickjj: I assumed proper uniqueness validations so replaced the .exists? by just checking whether the save succeeded
danzilio has joined #ruby
<jhass> but those are details
OrangeJewce has quit [Quit: Leaving.]
odigity has joined #ruby
<jhass> the more important parts are decoupling the logging from the parsing by extracting parsing the individual item to its class and provide the relevant data for the logging as attributes
<jhass> its own
HOrangeJewce has joined #ruby
<jhass> phale: no
<nickjj> yeah i'm going over that now, but i wonder if the added complexity is worth it
_blizzy_ has quit [Ping timeout: 265 seconds]
<nickjj> let's say i were to remove those checks/nexts and validate things properly
multi_io has joined #ruby
<nickjj> it goes from around 25 lines of code to almost a 100 with your version
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass> assuming you have to read it fully to get a quick overview of what its intention is
MasterPiece has joined #ruby
<nickjj> i'm scraping 2 pages that are similar, the only difference is what model gets acted on and the logging status
<nickjj> some scraping details are a little different but almost all of process_page is the same
<jhass> well, that's the issue
<jhass> I can only work on what I know
<nickjj> yeah, i'm just saying with your version it might be a win
<jhass> so my solution optimized from what I know, not from your real requirements
<nickjj> because right now i'm basically duplicating your process_page method twice
<phale> Guys
<phale> How do most people parse files becausei m making a PPM parser
zenith_ has joined #ruby
<jhass> phale: they open them, read them and interpret their contents
ramfjord has joined #ruby
<nickjj> jhass, thanks for looking into it. this definitely gives me some ideas
paradoja has joined #ruby
<jhass> nickjj: all it should do, you're welcome :)
<nickjj> my version is kind of a hacky-but-works solution
<nickjj> yours seems more polished
jenrzzz has joined #ruby
<phale> jhass: That's pretty great
<phale> I know how to open and read them but how do I interpret their contents in The Ruby Programming Language 1.9.3+
krz has quit [Quit: WeeChat 1.0.1]
<jhass> nickjj: what I found to be the main thing that helps in writing more readable code is trying to keep the "same level of abstraction" inside a method rule
<nickjj> jhass, want me to PM you the unedited version?
<nickjj> you don't need to go nuts on it, but just see it
<jhass> nickjj: that makes you extract more code into private methods and by doing so you're more likely to recognize groups of methods (and thus chunks of code) that belong to their own class
<eam> phale: do you know the data structure of a PPM file?
<jhass> nickjj: tbh I have enough for the moment, should cook some food instead :P
<nickjj> jhass, yeah i was hoping you could give it a 30 second glance and then determine if your current refactor is still a good idea
<nickjj> in which case i'd adjust my code to that style
<phale> eam: yes
<jhass> it doesn't work like that for me unfortunately, I have to move code around until something emerges :)
<phale> What I did was use slices but the files are arbitrary.
bradleyprice has joined #ruby
<phale> So I need to read them somehow in a better way
ascarter has joined #ruby
<eam> phale: what do you mean slices?
<phale> [0, 1]
<phale> [4..-1]
<phale> etc
<nickjj> jhass, fair enough
agarie has quit [Remote host closed the connection]
<eam> phale: and your concern is that these byte offsets vary depending on the structure of the PPM?
<jhass> nickjj: let's wait for apeiros version :P
<apeiros> oh, didn't start yet, sorry
<apeiros> gotta fix dinner first
jenrzzz has quit [Ping timeout: 265 seconds]
dandaman has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<jhass> yeah, dinner
bruno- has joined #ruby
bruno- is now known as Guest56642
pontiki has joined #ruby
<phale> EAM: YES
<phale> sorry for cases
<phale> woops
scripore has quit [Quit: This computer has gone to sleep]
djcp has quit [Ping timeout: 246 seconds]
<eam> phale: well, read the first part of the PPM, which will inform you about the dimensions and locations of the subsequent structures
zenith_ has quit [Remote host closed the connection]
<pontiki> morning, folks
<phale> how do i read the first part
<pontiki> i'm looking for the HTML parser that has been recommended as the alternative to nokogiri -- fairly newish, faster... ?
<phale> Pontiki: SimpleHTMLparser?
<nickjj> apeiros, if you do get to it later, can you ping my name so i can check back
<eam> phale: the link you pasted describes the format. The first 8 steps are pretty straightforward
<apeiros> nickjj: sure
<phale> yeah
<pontiki> no, phale, it's a TLA
<phale> how do i do them
<nickjj> apeiros, thanks
joast has quit [Quit: Leaving.]
jottr has quit [Ping timeout: 244 seconds]
<pontiki> found it: oga
<eam> phale: you tell me, how do you do "A "magic number" for identifying the file type. A ppm image's magic number is the two characters "P6"."
blizzy has joined #ruby
<eam> how do you read the first two bytes of a file?
<nickjj> apeiros, i'm down for showing you the full deal too if you wanted
timonv has joined #ruby
agarie has joined #ruby
<phale> hm
Nahra has quit [Remote host closed the connection]
<phale> i could use [0, 1]
<eam> ok, so that's the first step done!
<phale> yee
<eam> now, how about the second?
<phale> another whitespace
<eam> how do you read through a file (or a buffer read from a file) skipping over whitespace?
Limix has joined #ruby
<phale> i have no idea
Cache_Money has quit [Quit: Cache_Money]
<phale> could split it into an array though
justin_pdx has joined #ruby
commmmodo has joined #ruby
BTRE has quit [Ping timeout: 255 seconds]
ascarter has quit [Ping timeout: 256 seconds]
wallerdev has quit [Quit: wallerdev]
Guest56642 has quit [Ping timeout: 240 seconds]
lemur has joined #ruby
User458764 has joined #ruby
<eam> ok, perhaps. But how about a super simple way: byte = file.read(1) and loop until you find non-whitespace?
dANO__ has quit []
OrbitalKitten has quit [Quit: Textual IRC Client: www.textualapp.com]
<eam> phale: if you can slurp the whole file into memory it's very easy and you can traverse the buffer as an array
zenith_ has joined #ruby
<eam> if you can't, you can step through the file with read() and seek()
devdazed has quit [Ping timeout: 252 seconds]
kobain has joined #ruby
<phale> hm
<phale> maybe
jaequery has joined #ruby
kobain has quit [Max SendQ exceeded]
js12345 has joined #ruby
mistermocha has quit [Ping timeout: 264 seconds]
versatiletech has joined #ruby
<phale> im really confused rn
yeticry has quit [Ping timeout: 246 seconds]
aphprentice has joined #ruby
<eam> about?
iamjarvo has quit [Read error: Connection reset by peer]
<phale> everything except the slice
iamjarvo_ has joined #ruby
adriancb has joined #ruby
ndrei has joined #ruby
<eam> welp, if you have a specific point of confusion I'm happy to help
snockerton has joined #ruby
<phale> the thing you said
<phale> slurp memory, read() and seek()
jimms has quit [Remote host closed the connection]
scripore has joined #ruby
arup_r has joined #ruby
spyderman4g63 has joined #ruby
Guest97324 is now known as marx
<eam> phale: whole_file_as_one_big_string = filehandle.read # reads (slurps) the entire file into memory
<phale> ah yes
<phale> i do that
<eam> if the file is larger than memory this won't work
maximski has joined #ruby
User458764 has quit [Client Quit]
yeticry has joined #ruby
<phale> a .ppm file(regularly) can be around 1.3mb
<phale> is that a lot?
<eam> generally no
<jhass> phale: a file descriptor does not only point to file, it points to a position inside the file. read reads from that position forward, seek sets that position
DerisiveLogic has joined #ruby
<phale> cool
<eam> phale: you can use [] to look at individual bytes in the file
<phale> one problem though
mistermocha has joined #ruby
<phale> GIMP adds a comment which can break everything
<eam> phale: your parser will have to understand comments
djbkd has joined #ruby
<phale> yeah
<phale> i just have to ignore them somehow
<eam> parsing is a fairly complex problem, you might want to start with a more fundamental approach
momomomomo has joined #ruby
devdazed has joined #ruby
<phale> well i can always just remove the comment
<phale> but my program should work arbitrarily
<workmad3> heh
OrbitalKitten has joined #ruby
<eam> phale: looks like there's a fully working example here: http://rosettacode.org/wiki/Bitmap/Read_a_PPM_file#Ruby
js12345 has quit [Quit: leaving]
<phale> looks good
<phale> ill just make it better
<phale> you can clearly see that some things are bad
<phale> in the code that is
beneggett has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<eam> sure, hopefully it'll get you started
danjordan has quit [Quit: danjordan]
zenith_ has quit [Ping timeout: 256 seconds]
odigity has quit [Ping timeout: 265 seconds]
stef204 has joined #ruby
spyderma_ has joined #ruby
Takle has quit [Remote host closed the connection]
Ankhers has joined #ruby
timonv has quit [Ping timeout: 246 seconds]
<phale> thanks
BTRE has joined #ruby
mistermo_ has joined #ruby
og01 has joined #ruby
spyderman4g63 has quit [Ping timeout: 264 seconds]
strixd has quit [Quit: 500]
momomomomo has quit [Ping timeout: 256 seconds]
misterm__ has joined #ruby
qiffp has quit [Ping timeout: 264 seconds]
ascarter has joined #ruby
zenith_ has joined #ruby
<og01> hi guys, I am not familiar with bundle and am trying to understand how it works, my problem is that im trying to run a ruby program but the gem kitchen-vagrant was older than what i needed (from git)
User458764 has joined #ruby
mistermocha has quit [Ping timeout: 246 seconds]
tag has joined #ruby
<og01> i tried using bundle at this point and added test-kitchen and kitchen-vagrant to the Gemfile, and did bundle install
arup_r has quit [Ping timeout: 265 seconds]
mistermocha has joined #ruby
mistermo_ has quit [Read error: Connection reset by peer]
ascarter has quit [Client Quit]
GaryOak_ has joined #ruby
<og01> unfortunatly when i ran the program (kitchen) it still used the ones i installed with gem, so I gem uninstall'ed both packages and run bundle install again
<og01> the kitchen binary was available again (presumably from the bundle install)
<og01> but it couldnt find the kitchen-vagrant gem which was installed via bundle
maximski has quit []
commmmodo has quit [Quit: commmmodo]
rocknrollmarc has joined #ruby
<og01> i guess this is to do with include paths with ruby, but im not really sure where and how ruby finds its modules, nor esactly where bundle installs them
JoshGlzBrk has joined #ruby
lemur has quit [Remote host closed the connection]
CustosLimen has quit [Ping timeout: 264 seconds]
<jhass> og01: prefix your command with bundle exec
leslie has quit [Quit: Have you ever tried to eat a clock? It's very time consuming.]
misterm__ has quit [Ping timeout: 246 seconds]
Bounga has quit [Quit: See ya]
oki_ has quit [Ping timeout: 240 seconds]
sinkensabe has quit [Remote host closed the connection]
triple_b has joined #ruby
<og01> jhass: kitchen is still unable to find the module kitchen-vagrant, give me a minute i'll play around with it
havenwood has quit [Remote host closed the connection]
<jhass> og01: make a gist with the full error output, your Gemfile and the exact commands you run if still fails
joonty has quit [Quit: joonty]
jonr22 has joined #ruby
dandaman has quit [Quit: Leaving.]
maletor has joined #ruby
rocknrollmarc has quit [Read error: Connection reset by peer]
Synthbread has quit [Ping timeout: 252 seconds]
hk3380 has joined #ruby
odigity has joined #ruby
Rapier- has joined #ruby
bricker has joined #ruby
js123456789 has joined #ruby
rbennacer has quit [Remote host closed the connection]
<og01> jhass: thanks, for helping, here is my gist: https://gist.github.com/og01/9a0829d71d050fc1f954
sigurding has quit [Quit: sigurding]
leslie has joined #ruby
leslie has joined #ruby
ZJvandeWeg has joined #ruby
livathinos has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
<jhass> og01: what about the mentioned log?
rbennacer has joined #ruby
jonr22 has quit [Ping timeout: 252 seconds]
serivich has joined #ruby
dh64 has quit [Quit: Konversation terminated!]
rbennacer has quit [Remote host closed the connection]
HOrangeJewce has quit [Quit: Leaving.]
js123456789 has quit [Client Quit]
jobewan has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
zenith_ has quit [Ping timeout: 264 seconds]
dandaman has joined #ruby
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<og01> i truncated the logoutput, as i beleive its the same error repeating from each time i've executed the command
deric_skibotn has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Megtastique has quit []
oki has joined #ruby
<jhass> og01: it looks like the test-kitchen version is incompatible with the kitchen-vagrant version you're trying to run
beneggett has joined #ruby
apeiros_ has quit [Remote host closed the connection]
beneggett has quit [Client Quit]
JDiPierro has quit [Remote host closed the connection]
adriancb has joined #ruby
js123456789 has joined #ruby
<jhass> test-kitchen tries to load kitchen/driver/kitchen-vagrant, while in the repository only kitchen/driver/vagrant exists
<jhass> using test-kitchen from git too might help
js123456789 has quit [Client Quit]
<og01> jhass: just trying that now
mikecmpbll has quit [Ping timeout: 250 seconds]
ismaelga has quit [Remote host closed the connection]
havenwood has joined #ruby
anaeem1 has joined #ruby
rbennacer has joined #ruby
<og01> jhass: I have it working after installing from git, many thanks
ascarter has joined #ruby
oki has quit [Ping timeout: 252 seconds]
ghostpl_ has quit [Remote host closed the connection]
js123456789 has joined #ruby
andikr has quit [Remote host closed the connection]
js123456789 has quit [Client Quit]
doertedev has quit [Quit: Lost terminal]
kobain has joined #ruby
User458764 has joined #ruby
livathinos has quit []
ramfjord has quit [Ping timeout: 264 seconds]
skj3gg has joined #ruby
serivich has quit [Ping timeout: 255 seconds]
kobain has quit [Max SendQ exceeded]
danzilio has quit [Quit: My computer has fallen asleep!]
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
adriancb has quit [Read error: Connection reset by peer]
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skj3gg has quit [Client Quit]
<phale> how do i speed up ruby interpretation
<jhass> what's slow?
<phale> file reading
<phale> it takes 1 second to do so
<jhass> for a plain File.read() ?
<Senjai> phale: Use a smaller file
<jhass> IO is slow
SouL has quit [Remote host closed the connection]
<phale> Senjai: it's 493.kb
<phale> 4.93kb*
joast has joined #ruby
<jhass> IO has nothing to do with ruby
<Senjai> ^
odigity has quit [Ping timeout: 265 seconds]
<jhass> *IO being slow I wanted to write
<jhass> so maybe you can read the file with less actual IO
joast has quit [Remote host closed the connection]
<jhass> and trade it against memory usage
<GaryOak_> What does the attach keyword do in ruby?
<Senjai> jhass: Additionally, if you're File.reading, the slowest thing that can happen on rubies side is the allocation of memory to hold it
<Senjai> which isn't a thing
joast has joined #ruby
<jhass> GaryOak_: not a keyword and dosn't seem to be a core method
joast has quit [Remote host closed the connection]
<phale> "\xFF^^\xFF\xD3\xD3\xFF\xFF\xFF\xFF22\xFF\xD3\xD3\xFF\xF9\xF9\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF22\xFF\xCD\xCD\xFF\xFF\xFF\xFF"
mikecmpbll has joined #ruby
<phale> what is this?
<jhass> bytes
tunaCanBruh has quit [Ping timeout: 250 seconds]
<jhass> in a string
<phale> can I convert them to characters?
<GaryOak_> jhass: ok thanks, must of been added through an include somewhere
CustosLimen has joined #ruby
<jhass> phale: what character is \xFF?
<phale> FF
<phale> a hex character
<jhass> what's a hex character
skj3gg has joined #ruby
chthon has quit [Ping timeout: 272 seconds]
<shevy> >> puts "\xFF"
<phale> you broke it shevy
adriancb has joined #ruby
<shevy> ÿ
<shevy> that is a strange looking y here
<jhass> shevy: sounds like ISO bla
<shevy> what is \xFF
rbennacer has quit [Remote host closed the connection]
<shevy> jhass show me
TheNumb is now known as OpenRC
<jhass> it's a proper "no codepoint questionmark" here
<phale> it's in my ppm file
<phale> parto f the raster colours
<shevy> a questionmark?
ghr has quit [Ping timeout: 244 seconds]
<jhass> yeah
polysics has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<phale> did that like break the interpreter?
<jhass> no
<shevy> lol
zz_twistedpixels is now known as twistedpixels
<jhass> phale: what's your goal? what do you need to do with it?
<phale> I want to output images in ASCII art
<phale> not like the kind you think
<phale> with blanks as colours
<jhass> >> "\xFF^^\xFF\xD3".unpack("C*")
<eval-in_> jhass => [255, 94, 94, 255, 211] (https://eval.in/296420)
<jhass> something like that?
<phale> yeah that seems
<phale> yep
<phale> one problem though
arup_r has joined #ruby
<phale> the color library i use doesn't have that many colours
<phale> only 15
<jhass> >> 255 % 15
<eval-in_> jhass => 0 (https://eval.in/296421)
<shevy> use kde konsole
<jhass> >> 254 % 15
<eval-in_> jhass => 14 (https://eval.in/296422)
<shevy> then you can use R,G,B values
<phale> 0 is black
<jhass> >> 128 % 15
<eval-in_> jhass => 8 (https://eval.in/296423)
<phale> shevy: no
<phale> remember that String.colors thing last night?
<phale> it wont help
<shevy> I wouldn't use that
<phale> what would you use
<jhass> mmh, there was a proper way to reduce grayscale... I suck at computer graphics :P
x77686d has quit [Ping timeout: 255 seconds]
<shevy> phale dunno. I ended up using my own colour stuff but I can't recommend that for anyone else
<davejlong> jhass: Here's a site to convert hex into ascii http://www.rapidtables.com/convert/number/hex-to-ascii.htm
plashchynski has joined #ruby
<phale> davejlong: if i were to do that on my program i'd have to create a tcpsocket and connect there everytime
<phale> inefficient
<jhass> davejlong: I have pry, why would I need it?
<Senjai> >>puts 0xFF
<eval-in_> Senjai => 255 ... (https://eval.in/296424)
longfeet has joined #ruby
<shevy> phale one gripe I have is that String.colors, that extends a core class of ruby, right?
<Senjai> phale:check out pack.
danzilio has joined #ruby
joast has joined #ruby
gluten_hell has quit [Quit: Computer has gone to sleep.]
<workmad3> jhass: you could probably reduce to 8-bit grayscale reasonably by either picking the highest value out of an RGB triple or by getting the mean of them
<Senjai> o/ workmad3
longfeet has quit [Client Quit]
rbennacer has joined #ruby
<agarie> Hey, I don't know if someone else already posted the link here, but SciRuby was selected for Google Summer of Code this year and we have some interesting projects: https://github.com/SciRuby/sciruby/wiki/Google-Summer-of-Code-2015-Ideas :)
<davejlong> jhass: It's just a simple site, as it sounded like you were just trying to find out what the hex FF is, which doesn't output in a lot of terminals.
<Senjai> agarie: I've seen it
<Senjai> agarie: I'd be happy to offer code review
<workmad3> jhass: you could probably then reduce it to 15 grays by doing colour.fdiv(17).round
<Senjai> agarie: but I know little about actual science
joast has quit [Client Quit]
<jhass> davejlong: I count in hex that far, thanks :)
User458764 has joined #ruby
<workmad3> jhass: and assuming a map of each integer to a suitable gray on the screen :)
<workmad3> Senjai: hi
<phale> shevy: in response to your question yes
<jhass> workmad3: I vaguely remembered to have learned the proper way is http://en.wikipedia.org/wiki/Color_quantization#Algorithms, if I dug out the right term
<agarie> Senjai: reviewing code is very useful :P there is a lot on NMatrix that could be improved (https://github.com/sciruby/nmatrix)
mjuszczak has joined #ruby
tcrypt has joined #ruby
odigity has joined #ruby
<shevy> phale let me show you kde konsole colours
sarkis has joined #ruby
<phale> jhass: what was the method you use to convert from \x to integer?
<phale> s/use/used/
versatiletech has quit [Quit: versatiletech]
<jhass> phale: do you have scrollwheel?
dandaman has quit [Quit: Leaving.]
<workmad3> jhass: 3 methods... one is an average as I said, one is to take the highest and lowest and average them, and the third is fairly specific percentages of R, G and B to create a combined gray :)
<phale> yes but im on terminal
<phale> it doesnt work on irssi
<shevy> phale shevegen.square7.ch/screenshot.png
arup_r has quit [Ping timeout: 245 seconds]
<workmad3> phale: if you hadn't ignored me, I could now tell you that pgup and pgdown work in irssi
<phale> workmad3: really?
<workmad3> phale: ah, so you unignored me :P
<shevy> use xchat!
<phale> i never ignored you lol
<shevy> either xchat or peechat
<phale> peechat?
<shevy> yeah!
<phale> sounds discomforting
<workmad3> phale: and yeah, pgup pgdown work fine, or if you're on a mac kb, then fn + uparrow/downarrow
<jhass> shevy: xchat doesn't support sane TLS though
ELLIOTTCABLE has quit [Disconnected by services]
<shevy> peechat! https://weechat.org/
antgel has quit [Ping timeout: 245 seconds]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> jhass you have anything to hide!
<shevy> well one day I can replace xchat with hexchat
<jhass> shevy: you don't?
phoo1234567 has joined #ruby
<shevy> but never with peechat
<shevy> jhass I use linux, I am secure
sarkis_ has quit [Ping timeout: 252 seconds]
last_staff has joined #ruby
<jhass> no with xchat
<jhass> *not
<phale> so
elaptics is now known as elaptics_away
<phale> i'll just make a hash
<phale> 255 => String.colors[9]
<phale> etc
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
phoo1234567 has quit [Max SendQ exceeded]
adriancb has quit [Ping timeout: 256 seconds]
thumpba has joined #ruby
phoo1234567 has joined #ruby
<phale> going to be annoying tho
ndrei has quit [Ping timeout: 244 seconds]
plashchynski has quit [Quit: plashchynski]
adriancb has joined #ruby
<shevy> don't worry
<shevy> use it for a while
<shevy> eventually you'll find a better way anyway
<phale> yeah
<workmad3> shevy: I'm still happy with irssi, been using it for a good few years now ;)
User458764 has joined #ruby
<workmad3> shevy: it helps that at a glance it looks like my vim window :)
RegulationD has quit [Remote host closed the connection]
graydot has joined #ruby
<phale> how do I make heights
<phale> etc
<phale> for now it only prints in one line
<workmad3> phale: @con = File.read(file, 'rb') would be better
<phale> it's the same?
<workmad3> phale: and doesn't leak the file handle
<phale> ok
baroquebobcat has joined #ruby
DouweM has joined #ruby
anaeem1 has quit [Remote host closed the connection]
<phale> Can not convert String into In teger
Limix has quit [Quit: Limix]
beneggett has joined #ruby
<phale> workmad3: that's what your method of reading gives me
kobain has joined #ruby
agarie has quit [Remote host closed the connection]
adriancb has quit [Ping timeout: 240 seconds]
wallerdev has joined #ruby
<workmad3> phale: ah, sorry... File.read(file, open_args: 'rb')
djbkd has quit [Remote host closed the connection]
<workmad3> phale: it was trying to use 'rb' as the offset to start reading at
adriancb has joined #ruby
<workmad3> gah, s/open_args/mode
<phale> cant convert string into array
<workmad3> stupid docs :)
<phale> ok
<phale> now it works
<phale> how do i make heights tho
<workmad3> (it's because you need the annoying binary specifier :P)
triple_b has joined #ruby
bruno- has joined #ruby
bruno- is now known as Guest42392
<phale> workmad3: oh
<workmad3> phale: well, you have all the information to know how to split the raster up
mistermocha has quit [Remote host closed the connection]
<workmad3> phale: namely, you have the width of each row and the number of rows there should be
<phale> well
<phale> 9th step is immensely confusing
<workmad3> phale: look at line 20 and 21 of your code
buub has joined #ruby
<workmad3> phale: how is it immensly confusing?
<phale> uh
<phale> read it
<workmad3> phale: it's saying that there are width * height pixels as the raster
<workmad3> phale: and each pixel consists of rgb triples
<phale> oooo right
_cake has joined #ruby
<workmad3> phale: you need to know the maxval to know whether it's 1 byte or 2 bytes per colour component though
<workmad3> phale: and if you read carefully, it even tells you the important bit about endianness of the bytes ;)
phoo1234567 has quit [Ping timeout: 240 seconds]
Guest42392 has quit [Ping timeout: 246 seconds]
pork_clips has quit [Ping timeout: 245 seconds]
ghr has joined #ruby
bruno-_ has joined #ruby
<phale> maxval is 255
dtordable has joined #ruby
<phale> for me ;)
<workmad3> phale: ok, then 1 byte per component ;)
<workmad3> phale: which means 3 bytes per pixel
<workmad3> phale: so your raster should be 3 * height * width pixels long, which you can then carve up into an array of arrays if you so desired
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<workmad3> s/pixels/bytes in my last comment
<phale> can you give me a ruby code example of this?
<phale> just to simplify things
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
agarie has joined #ruby
ereslibre has quit [Remote host closed the connection]
pontiki has quit [Remote host closed the connection]
gccostabr has quit [Quit: See you later!]
pontiki has joined #ruby
versatiletech has joined #ruby
jenrzzz has joined #ruby
JDiPierro has joined #ruby
ghr has quit [Ping timeout: 256 seconds]
ereslibre has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
HOrangeJewce has joined #ruby
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
scripore has joined #ruby
rdark has quit [Quit: leaving]
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
rocknrollmarc has joined #ruby
<workmad3> phale: you mean something like info[:raster_grid] = info[:height].to_i.times{|h| info[:raster][3 * h * info[:width].to_i, 3 * info[:with].to_i] }
tkuchiki has joined #ruby
rocknrollmarc has quit [Max SendQ exceeded]
Takle has joined #ruby
<phale> it's already an integer
rocknrollmarc has joined #ruby
<workmad3> phale: wrong :P
<phale> how
rocknrollmarc has quit [Max SendQ exceeded]
<phale> i put .to_i
<workmad3> phale: because you redid the split and assigned the string back to info[:height] and info[:width]
rocknrollmarc has joined #ruby
<graft> what are you guys talking about? storing an image?
rocknrollmarc has quit [Client Quit]
<phale> graft: kinda
<workmad3> graft: he's writing a PPM reader
<phale> not rly tho
<graft> what's happening after you read it?
<workmad3> graft: or rather, attempting to write a PPM reader
JDiPierro has quit [Ping timeout: 244 seconds]
iamjarvo_ has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 252 seconds]
ismaelga has joined #ruby
<workmad3> and I'm off to grab food now, so hf ;)
<phale> workmad3: thanks
beneggett has joined #ruby
thumpba has quit [Remote host closed the connection]
workmad3 is now known as wm3|away
<graft> phale, what are you doing after you load the ppm into memory?
tohsig has quit [Read error: Connection reset by peer]
<phale> splitting it into spaces
<phale> and then putting the information into a hash
thumpba has joined #ruby
<graft> i mean, to what end?
<phale> uh
kaiZen- has quit [Ping timeout: 245 seconds]
<phale> the literal end of the file
tohsig has joined #ruby
User458764 has joined #ruby
Takle has quit [Ping timeout: 256 seconds]
tkuchiki has quit [Ping timeout: 256 seconds]
<graft> ... what is your ultimate purpose? you're trying to extract some information or something?
<graft> why do you want to read a ppm file, is what i am asking
mistermocha has joined #ruby
bruno-_ has quit [Read error: No route to host]
chinmay_dd has quit [Quit: Leaving]
JDiPierro has joined #ruby
kaiZen- has joined #ruby
versatiletech has quit [Ping timeout: 272 seconds]
iamjarvo has joined #ruby
coderkevin has quit [Quit: Connection closed for inactivity]
Megtastique has joined #ruby
<phale> graft: well
Megtastique has quit [Max SendQ exceeded]
<phale> it's the easiest image format to use for my new ascii art image interpreter
<graft> so you have a drawing in ppm format and you want to print it in ascii
oki has joined #ruby
<phale> yes
<phale> but coloured ascii
<phale> print " ".colorize(:background => :white)
<graft> and it's 1 pixel => 1 ascii character?
<phale> for example
<phale> yes
djbkd has joined #ruby
Stalkr_ has joined #ruby
<phale> work3: your example is strange
mjuszczak has quit []
<phale> it gives me 4
ndrei has joined #ruby
ramfjord has joined #ruby
Megtastique has joined #ruby
mloveles_ has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
DEA7TH has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
xtagmy has quit [Remote host closed the connection]
grrrr__ has joined #ruby
dtordable has quit [Quit: • IRcap • 8.72 •]
Guest50 has joined #ruby
joast has joined #ruby
joast has quit [Remote host closed the connection]
mloveless has quit [Ping timeout: 264 seconds]
<graft> phale, you should move some of this stuff around. "info" should clearly be PPMImage class or something, not a bare hash, and you should probably do something like parser = ImageParser.new('bla.ppm',ImageType::PPM); ppm = parser.parse_ppm
<Stalkr_> Anyone here used Grape/Sinatra for APIs?
<graft> Stalkr_: i've been thinking about it
qiffp has joined #ruby
<Stalkr_> graft: Played with either of them?
<graft> Stalkr_: so far the disadvantage seems to be you don't get controllers with sinatra
<graft> not sure about grape
mloveles_ has quit [Ping timeout: 252 seconds]
<graft> i'm leaning towards rails API, if I can avoid activerecord
<Stalkr_> Why would you need controllers with an API?
mjuszczak has joined #ruby
<graft> eh, seems easier to organize endpoints that way
spider-mario has quit [Quit: No Ping reply in 180 seconds.]
<Stalkr_> I'm just playing with Grape/Sinatra but Grape seems so... verbose
sevvie has quit [Ping timeout: 246 seconds]
joast has joined #ruby
tunaCanBruh has joined #ruby
n0zz has joined #ruby
n0zz has quit [Client Quit]
<GaryOak_> I've used grape a little bit and it's a lot more strict because it's for API's
n0zz has joined #ruby
commmmodo has joined #ruby
<Stalkr_> GaryOak_: Is it easier to use compared to just Sinatra?
jenrzzz has joined #ruby
joast has quit [Client Quit]
ptrrr has joined #ruby
joast has joined #ruby
spider-mario has joined #ruby
einarj has quit [Remote host closed the connection]
tus has joined #ruby
joast has quit [Client Quit]
Megtasti_ has joined #ruby
benlieb has quit [Quit: benlieb]
<n0zz> Hey, can someone recommend me something to visualise data? I tried to use googlecharts, but this gem was for image google charts, which is old and not fun, and not everything works there... :/
tunaCanBruh has quit [Ping timeout: 246 seconds]
DouweM has quit [Read error: Connection reset by peer]
oki has quit [Ping timeout: 272 seconds]
joast has joined #ruby
joast has quit [Client Quit]
<phale> n0zz: data
<GaryOak_> Stalkr_: yeah for building APIs it's really nice, you can enforce params really easily, and do nice versioning
egtann has joined #ruby
joast has joined #ruby
ismaelga has quit [Remote host closed the connection]
sevvie has joined #ruby
Megtastique has quit [Ping timeout: 256 seconds]
red_horned_rihno has quit [Quit: Leaving]
joast has quit [Client Quit]
<GaryOak_> Stalkr_: although like it says in the README that it's definitely opinionated about how to structure things
<Stalkr_> GaryOak_: I'll try to play with it. Want to do some front-end work with some JS framework and have an API running behind
Channel6 has quit [Remote host closed the connection]
<Stalkr_> I don't mind opinionated, then I know whether I am doing something right or wrong
<phale> Stalkr_ GaryOak_: >>#ror
joast has joined #ruby
<GaryOak_> Yeah and it's got good documentation so that helps
<Stalkr_> phale: We're not even talking about RoR
baweaver has joined #ruby
<GaryOak_> RoR is opinionated too
VBlizzard has joined #ruby
<Stalkr_> and magic©
nettoweb_ has quit [Quit: Textual IRC Client: www.textualapp.com]
nettoweb has joined #ruby
red_horned_rihno has joined #ruby
red_horned_rihno has quit [Max SendQ exceeded]
<phale> I don't like RoR
<phale> >> ''.methods
<eval-in_> phale => [:<=>, :==, :===, :eql?, :hash, :casecmp, :+, :*, :%, :[], :[]=, :insert, :length, :size, :bytesize, :empty?, :=~, :match, :succ, :succ!, :next, :next!, :upto, :index, :rindex, :replace, :clear, :chr, ... (https://eval.in/296436)
graydot has quit [Quit: graydot]
<GaryOak_> >> ''.next!
<eval-in_> GaryOak_ => "" (https://eval.in/296437)
<phale> >> ''.methods.length
<eval-in_> phale => 168 (https://eval.in/296438)
blizzy has quit [Ping timeout: 264 seconds]
<phale> 168 methods for a String object
<phale> ayy
n0zz has quit [Quit: leaving]
<GaryOak_> >> 2.methods.length
<eval-in_> GaryOak_ => 131 (https://eval.in/296439)
<phale> >> "" + 1.to_s.methods.length
<eval-in_> phale => no implicit conversion of Fixnum into String (TypeError) ... (https://eval.in/296440)
graydot has joined #ruby
<phale> >> ("" + 1.to_s).methods.length
<eval-in_> phale => 168 (https://eval.in/296441)
<phale> i have 162 methods
<GaryOak_> >> ['a'].methods.length
<eval-in_> GaryOak_ => 172 (https://eval.in/296442)
<GaryOak_> >> {}.methods.length
<eval-in_> GaryOak_ => 150 (https://eval.in/296443)
Macaveli has joined #ruby
davidhq has joined #ruby
ELLIOTTCABLE_ has joined #ruby
RegulationD has joined #ruby
ELLIOTTCABLE_ is now known as ELLIOTTCABLE
Goodbeard has quit [Quit: Leaving]
bruno- has joined #ruby
Macaveli has quit [Ping timeout: 245 seconds]
bruno- is now known as Guest30239
gluten_hell has joined #ruby
tunaCanBruh has joined #ruby
michael_mbp has quit [Excess Flood]
aerth_ is now known as aerth
Grumelo has quit []
michael_mbp has joined #ruby
B1n4r10 has joined #ruby
B1n4r10 has quit [Max SendQ exceeded]
x1337807x has joined #ruby
momomomomo has joined #ruby
gluten_hell has quit [Ping timeout: 245 seconds]
mloveless has joined #ruby
rocknrollmarc has joined #ruby
digifiv5e has joined #ruby
digifiv5e is now known as Guest98794
baweaver has quit [Remote host closed the connection]
agarie has quit [Remote host closed the connection]
jonr22 has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oki has joined #ruby
Guest50 has quit [Quit: Textual IRC Client: www.textualapp.com]
valkyrka has joined #ruby
baweaver has joined #ruby
mloveles_ has joined #ruby
leafybasil has quit [Remote host closed the connection]
mlovele__ has joined #ruby
momomomomo has quit [Quit: momomomomo]
tier has joined #ruby
mloveless has quit [Read error: Connection reset by peer]
aninaki has joined #ruby
jonr22 has quit [Ping timeout: 256 seconds]
jamgood96 has joined #ruby
tkuchiki has joined #ruby
ghostpl_ has joined #ruby
agarie has joined #ruby
sinkensabe has joined #ruby
mloveles_ has quit [Ping timeout: 246 seconds]
mlovele__ has quit [Client Quit]
mitchellhenke has quit [Quit: Computer has gone to sleep.]
jimms has joined #ruby
doodlehaus has quit [Remote host closed the connection]
mitchellhenke has joined #ruby
lolmaus has joined #ruby
lesce has quit [Ping timeout: 252 seconds]
dtordable has joined #ruby
<GaryOak_> every time I rediscover ruby dynamic method calls, it's so cool
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
dandaman has joined #ruby
x1337807x has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
ghostpl__ has joined #ruby
tkuchiki has quit [Ping timeout: 265 seconds]
doodlehaus has joined #ruby
User458764 has joined #ruby
martinbmadsen has joined #ruby
adriancb has joined #ruby
x1337807x has quit [Client Quit]
jenrzzz has quit [Ping timeout: 256 seconds]
ghostpl_ has quit [Ping timeout: 255 seconds]
baweaver has joined #ruby
<Sou|cutter> >> {}.public_methods.size
<eval-in_> Sou|cutter => 150 (https://eval.in/296445)
<Sou|cutter> guess it's all the same
sinkensabe has quit [Remote host closed the connection]
<Sou|cutter> makes sense
<phale> it's an object
<phale> one object has to have at least one method
paradoja has quit [Ping timeout: 272 seconds]
crdpink has quit [Quit: q term]
maknz has joined #ruby
<GaryOak_> even nil has a method
maximski has joined #ruby
phale has quit [Quit: Lost terminal]
baweaver has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
spyderma_ has quit [Ping timeout: 244 seconds]
scripore has quit [Quit: This computer has gone to sleep]
crdpink has joined #ruby
<GaryOak_> a lot of methods actually
anaeem1 has joined #ruby
scripore has joined #ruby
momomomomo has joined #ruby
User458764 has joined #ruby
Musashi007 has joined #ruby
Rodya_ has joined #ruby
<centrx> >> zilch.to_nil
<eval-in_> centrx => undefined local variable or method `zilch' for main:Object (NameError) ... (https://eval.in/296446)
tohsig has quit [Read error: Connection reset by peer]
crdpink has quit [Client Quit]
commmmodo has quit [Quit: commmmodo]
tohsig has joined #ruby
dtordable has quit [Changing host]
dtordable has joined #ruby
thumpba has quit [Ping timeout: 265 seconds]
crdpink has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
BlakeRG has left #ruby ["Leaving..."]
AlexRussia has quit [Ping timeout: 255 seconds]
CAP5562 has joined #ruby
bluehavana has quit [Quit: Connection closed for inactivity]
Stalkr_ has quit [Read error: Connection reset by peer]
AlexRussia has joined #ruby
dtordable has quit [Disconnected by services]
mary5030 has joined #ruby
<havenwood> >> class Empty; instance_methods.each { |meth| undef_method(meth) unless meth == :public_methods } end; Empty.new.public_methods.size
<eval-in_> havenwood => /tmp/execpad-6d89802e0f22/source-6d89802e0f22:2: warning: undefining `object_id' may cause serious problems ... (https://eval.in/296450)
jenrzzz has joined #ruby
gluten_hell has joined #ruby
<havenwood> or rather:
<havenwood> >> class Empty; instance_methods.each { |meth| undef_method(meth) unless [:public_methods, :__send__, :object_id].include?(meth) } end; Empty.new.public_methods.size
<eval-in_> havenwood => 3 (https://eval.in/296451)
dtordable has joined #ruby
sinkensabe has joined #ruby
dtordable has quit [Changing host]
dtordable has joined #ruby
<havenwood> You can have no public methods, but then you can't call #public_methods. >.>
maletor has quit [Ping timeout: 245 seconds]
agarie has quit [Remote host closed the connection]
alkoma has joined #ruby
livathinos has joined #ruby
mjuszczak has quit []
CAP5562 has quit [Ping timeout: 246 seconds]
AlexRussia has quit [Quit: WeeChat 1.2-dev]
danzilio has quit [Quit: My computer has fallen asleep!]
Morkel has joined #ruby
AlexRussia has joined #ruby
agarie has joined #ruby
<GaryOak_> havenwood: can you readd methods after you've taken them out?
rbennacer has quit [Remote host closed the connection]
leafybasil has joined #ruby
max96at is now known as max96at|off
postmodern has joined #ruby
CAP5562 has joined #ruby
<havenwood> GaryOak_: undef_method just prevents the class from responding, but yeah the method is still there.
adriancb has quit [Read error: Connection reset by peer]
<havenwood> GaryOak_: I should have probably used remove_method instead for the example.
rbennacer has joined #ruby
dtordable has quit [Disconnected by services]
The_Phoenix has quit [Read error: Connection reset by peer]
danzilio has joined #ruby
CAP5562 is now known as dtordable
dtordable has quit [Changing host]
dtordable has joined #ruby
danzilio has quit [Max SendQ exceeded]
<havenwood> well
adriancb has joined #ruby
rbennacer has quit [Remote host closed the connection]
danzilio has joined #ruby
<havenwood> I guess we don't actually want to try super, I'm not really showing anything was just playing around.
agarie has quit [Ping timeout: 244 seconds]
odigity has quit [Ping timeout: 265 seconds]
swgillespie has joined #ruby
<havenwood> GaryOak_: Isn't BasicObject basic enough? :P
<GaryOak_> haha
<havenwood> >> BasicObject.instance_methods
<eval-in_> havenwood => [:==, :equal?, :!, :!=, :instance_eval, :instance_exec, :__send__, :__id__] (https://eval.in/296452)
_djbkd has joined #ruby
baweaver has joined #ruby
danzilio has quit [Client Quit]
OpenRC is now known as TheNumb
stef204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
rbennacer has joined #ruby
<havenwood> >> nil.!
<eval-in_> havenwood => true (https://eval.in/296453)
nfk|laptop has joined #ruby
<GaryOak_> that's how I'm gonna write true from now on
<havenwood> >> !true.!
<eval-in_> havenwood => true (https://eval.in/296454)
<havenwood> that's just emphatically true
<GaryOak_> very true
<havenwood> >> !!true.!.!
<eval-in_> havenwood => true (https://eval.in/296455)
MasterPiece has quit [Remote host closed the connection]
hobodave has quit [Quit: Computer has gone to sleep.]
baroquebobcat has quit [Ping timeout: 246 seconds]
jimms has quit []
<GaryOak_> >> !nil.!
<eval-in_> GaryOak_ => false (https://eval.in/296456)
roshanavand has joined #ruby
<eam> >> [not true]
<eval-in_> eam => /tmp/execpad-56a7ceac543d/source-56a7ceac543d:2: syntax error, unexpected keyword_true, expecting '(' ... (https://eval.in/296457)
<havenwood> >> nil.public_send ?!
<eval-in_> havenwood => true (https://eval.in/296458)
wldcordeiro has joined #ruby
versatiletech has joined #ruby
Ankhers has quit [Read error: Connection reset by peer]
phoo1234567 has joined #ruby
hollywood has quit [Quit: Leaving]
sinkensabe has quit [Remote host closed the connection]
<havenwood> I guess this is prettier:
<havenwood> >> nil.__send__(?!)
<eval-in_> havenwood => true (https://eval.in/296461)
<havenwood> Okay, done spamming. Sorry bout that.
phoo1234567 has quit [Max SendQ exceeded]
mary5030 has quit [Remote host closed the connection]
<wm3|away> havenwood: heh :) nice
wm3|away is now known as workmad3
* havenwood attempts eval-in restraint.
phoo1234567 has joined #ruby
_tpavel has joined #ruby
maximski has quit []
agarie has joined #ruby
_tpavel has quit [Client Quit]
monod has joined #ruby
Pumukel has joined #ruby
_honning_ has joined #ruby
odigity has joined #ruby
MasterPiece has joined #ruby
replay has quit [Ping timeout: 256 seconds]
martinbmadsen has quit [Ping timeout: 255 seconds]
zhan_ has joined #ruby
<zhan_> sd
<zhan_> dsf
skmp has joined #ruby
replay has joined #ruby
martinbmadsen has joined #ruby
JohnBat26 has joined #ruby
cyberarm has joined #ruby
hobodave has joined #ruby
hobodave has quit [Changing host]
hobodave has joined #ruby
AlexRussia has quit [Ping timeout: 245 seconds]
havenn has joined #ruby
DerisiveLogic has quit [Ping timeout: 240 seconds]
bigmac has joined #ruby
mdw has joined #ruby
hobodave has quit [Remote host closed the connection]
hobodave has joined #ruby
hobodave has quit [Client Quit]
mdw has quit [Read error: Connection reset by peer]
mistermocha has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
havenwood has quit [Ping timeout: 244 seconds]
odigity has quit [Ping timeout: 265 seconds]
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
godd2 has joined #ruby
triple_b has joined #ruby
martinbmadsen has quit [Ping timeout: 264 seconds]
bigmac has quit [Read error: Connection reset by peer]
kaiZen- has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
baweaver has quit [Remote host closed the connection]
bigmac has joined #ruby
versatiletech has quit [Quit: versatiletech]
lesce has joined #ruby
cVit_ has joined #ruby
Rodya__ has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maximski has joined #ruby
odigity has joined #ruby
it_tard has joined #ruby
Musashi007 has quit [Quit: Musashi007]
_djbkd has quit [Remote host closed the connection]
sevvie has quit [Remote host closed the connection]
rocknrollmarc has quit [Remote host closed the connection]
sevvie has joined #ruby
Rodya_ has quit [Ping timeout: 246 seconds]
JoshGlzBrk has joined #ruby
yfeldblum has joined #ruby
nfk|laptop has quit [Ping timeout: 264 seconds]
mkaesz has joined #ruby
gfawcettpq has quit [Ping timeout: 245 seconds]
maximski has quit []
momomomomo has quit [Ping timeout: 245 seconds]
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
ismaelga has joined #ruby
Rodya_ has joined #ruby
anarang has joined #ruby
mwlang has joined #ruby
Rodya__ has quit [Ping timeout: 255 seconds]
<mwlang> Surely, Ruby and LDAP aren’t still the most archaic, hardest thing to do in Ruby 8 years later. (grumbles)
anarang has quit [Client Quit]
livathinos has quit []
tvon has joined #ruby
piotrj has joined #ruby
sevvie has quit [Ping timeout: 256 seconds]
<mwlang> Are the only gems for LDAP net-ldap, ruby-net-ldap, and ruby-ldap?
FooMunki_ has quit [Read error: Connection reset by peer]
<jhass> rubygems.org would know
<mwlang> The latter two do not seem to be able to even make a connection to the ldap server whereas the first one does make a connection, but putting together a query is challenging at best.
valkyrka has quit [Read error: No route to host]
diego_ar has joined #ruby
goshdarnyou is now known as goshdarnyoutest
goshdarnyoutest is now known as goshdarnyou
FooMunki_ has joined #ruby
cVit_ has quit [Quit: Си одам]
<mwlang> jhass: Ah, I didn’t think to put a search on the rubygems.org site itself….google doesn’t know all after all!
<mwlang> lots of options to explore
tvon has quit [Read error: Connection timed out]
tvon has joined #ruby
<workmad3> mwlang: bleh, I had to deal with net-ldap for some integration recently... it really does suck badly :(
<zhan_> right so I got more of a math problem, 3 numbers, 219, 1241, 7024. The correlation between them is 17.65 percent going from big number to small, what's opposite? otherwise whats the number after 7024
decoponio has quit [Quit: Leaving...]
<workmad3> zhan_: you need to find out what number 7024 is 17.65% of ?
ramfjord has quit [Ping timeout: 265 seconds]
<zhan_> no 1241 is 17% of 7024
<zhan_> what number comes after 7024 with the same correlation though
morenoh149 has quit [Ping timeout: 240 seconds]
momomomomo has joined #ruby
<zhan_> whats the formula i use?
<mwlang> workmad3: it definitely feels like throwback to PHP or Perl rather than idiomatic Ruby
tmtwd has joined #ruby
<zhan_> uh yes
<workmad3> zhan_: lay it out as a multiplication, after converting the percentage to 0.17 form ;)
<zhan_> workman you're right
<zhan_> what?
<workmad3> zhan_: i.e. x * 0.1765 = 7024... very easy to figure out from there
g0bl1n has joined #ruby
<zhan_> uh jesus
<zhan_> true
<GaryOak_> Algebra!!!!
<workmad3> GaryOak_: basic algebra at that! :)
* GaryOak_ shakes fists at algebra
* mwlang thinks he’s in the wrong room...
<workmad3> GaryOak_: if you didn't have algebra, you wouldn't have the interwebs that you're now using to curse algebra
<GaryOak_> I know lolz
sevvie has joined #ruby
<workmad3> zhan_: what was that problem from btw?
<havenn> zhan_: So do it like a math student would: http://www.wolframalpha.com/input/?i=x+*+0.1765+%3D+7024
<havenn> >.>
DLSteve has joined #ruby
Musashi007 has joined #ruby
it_tard is now known as nfk|laptop
jonr22 has joined #ruby
dandaman has quit [Quit: Leaving.]
tvw has quit [Ping timeout: 252 seconds]
cyberarm has quit [Quit: Bye]
WhoNeedszZz has joined #ruby
dtordable has quit [Ping timeout: 252 seconds]
_Andres has joined #ruby
rocknrollmarc has joined #ruby
hobodave has joined #ruby
<zhan_> im trying to make an app for a game
<zhan_> so im figuring out relations of multipliers
peterhu has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
jonr22 has quit [Ping timeout: 256 seconds]
<centrx> zhan_, GaryOak_ is an expert in algebra
whoughton has joined #ruby
baweaver has joined #ruby
hobodave has quit [Client Quit]
baweaver has quit [Remote host closed the connection]
<GaryOak_> I am, just replace the numbers with the letters
versatiletech has joined #ruby
<zhan_> so than i'm creating a class or a toolbox for these multipliars?
Rephiax has joined #ruby
hobodave has joined #ruby
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
gluten_hell has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
crdpink has quit [Quit: q term]
Morkel has quit [Quit: Morkel]
tunaCanBruh has quit [Ping timeout: 264 seconds]
ramfjord has joined #ruby
chipotle has quit [Quit: cheerio]
anaeem1 has quit [Remote host closed the connection]
sinkensabe has joined #ruby
anaeem1 has joined #ruby
replay has quit [Ping timeout: 246 seconds]
momomomomo_ has joined #ruby
ldnunes has quit [Quit: Leaving]
momomomomo has quit [Ping timeout: 250 seconds]
momomomomo_ is now known as momomomomo
Hijiri has quit [Quit: WeeChat 1.0.1]
soulcake has joined #ruby
rocknrollmarc has quit [Ping timeout: 256 seconds]
sinkensabe has quit [Remote host closed the connection]
<zhan_> this modifier-class variable isn't syntax correct right? @@training_time = x * .6666
<zhan_> so that i could create instances of the class with different training times?
anaeem1 has quit [Ping timeout: 264 seconds]
<zhan_> wtv i'll just experiment as im suppose to
<havenn> zhan_: Float literals cannot start with a `.`.
havenn is now known as havenwood
crdpink has joined #ruby
<jhass> >> .2
<eval-in_> jhass => /tmp/execpad-b8c2207ef8bc/source-b8c2207ef8bc:2: no .<digit> floating literal anymore; put 0 before dot ... (https://eval.in/296483)
<zhan_> k
<zhan_> 0.6666?
<jhass> oh, "anymore", when did it change?
mjuszczak has joined #ruby
g0bl1n has quit [Quit: g0bl1n]
mary5030 has joined #ruby
tkuchiki has joined #ruby
yfeldblum has quit [Remote host closed the connection]
mjuszczak has quit [Client Quit]
swgillespie has joined #ruby
diego_ar has quit [Remote host closed the connection]
skj3gg has quit [Quit: ZZZzzz…]
ascarter has joined #ruby
ych4k3r has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kaiZen has joined #ruby
mary5030 has quit [Ping timeout: 256 seconds]
wallerdev has quit [Quit: wallerdev]
last_staff has quit [Quit: last_staff]
tkuchiki has quit [Ping timeout: 255 seconds]
mjuszczak has joined #ruby
skj3gg has joined #ruby
soulcake has quit [Quit: Quack.]
diegoviola has quit [Quit: WeeChat 1.1.1]
mkaesz has quit [Remote host closed the connection]
Musashi007 has joined #ruby
soulcake has joined #ruby
mkaesz has joined #ruby
cphrmky has joined #ruby
fryguy9 has quit [Quit: Leaving.]
morenoh149 has joined #ruby
elaptics_away is now known as elaptics
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Sembei has quit [Ping timeout: 244 seconds]
scripore has quit [Quit: This computer has gone to sleep]
baweaver has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
JoshGlzBrk has joined #ruby
JoshGlzBrk has quit [Remote host closed the connection]
mkaesz has quit [Ping timeout: 244 seconds]
pontiki has quit [Read error: Connection reset by peer]
_honning_ has quit [Ping timeout: 245 seconds]
momomomomo has quit [Quit: momomomomo]
<jhass> 1.8.0 oO
* jhass tempted to PR out the anymore :P
<havenwood> oh, that's just a change of the error
<zhan_> so can some1 talk me through basics again
<zhan_> in real world application
<havenwood> it's even earlier
mjuszczak has quit []
<zhan_> in private chat
tvon has quit [Quit: leaving]
roshanavand has quit [Read error: Connection reset by peer]
mkaesz has joined #ruby
ascarter has quit [Ping timeout: 246 seconds]
<zhan_> any1?!
<Senjai> zhan_: no
qpls has quit [Quit: ZNC - http://znc.in]
drkush has quit [Ping timeout: 264 seconds]
<Senjai> If you want a private mentor, you should throw some $, if not you should ask your questions in the channel so others can benefit from the answers
<zhan_> k
agarie has quit []
<zhan_> sec
enterprisedc has quit [Ping timeout: 245 seconds]
blackmesa has joined #ruby
roshanavand has joined #ruby
<havenwood> jhass: Yeah, the "anymore" seems like what you'd want just one version later for those confused. Now that it's more than a decade later... it's more confusing than helpful.
tvon has joined #ruby
crdpink has quit [Quit: q term]
<graft> who writes .6 anyway?
<zhan_> actually more of a global thing, should I create an array with modifiers for all of the skills and then create a class that can look at specific parts of array, or should i create a head class for skill, and create sub class for each skill
<GaryOak_> calling the 6 method on nullspace
<Senjai> zhan_: !ncnh
<havenwood> 10>> .6
<eval-in_> havenwood => 0.6 (https://eval.in/296486)
<helpa> zhan_: If you don't provide any code, it becomes really difficult for us to help you. Providing code to reproduce the problem increases your chances of getting great, accurate help immensely.
crdpink has joined #ruby
<zhan_> i don't know how to code in 2nd place
FooMunki_ has quit [Quit: FooMunki_]
<zhan_> like more specifically, i suppose that if i use an array I'll be writing code that writes code?
SolarSailor has joined #ruby
<zhan_> reason why private chat
it_tard has joined #ruby
mjuszczak has joined #ruby
WhoNeedszZz has quit [Quit: Leaving]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
drkush has joined #ruby
scripore has joined #ruby
nfk has quit [Ping timeout: 246 seconds]
<havenwood> zhan_: What does that have to do with private chat? I'm confused.
<zhan_> well im like figuring out strategy for an app
nfk|laptop has quit [Ping timeout: 256 seconds]
<graft> zhan_: what is your app? what are you trying to do?
spicerack has joined #ruby
thumpba has joined #ruby
<zhan_> its about a game, i want to peresent characters that have skills that have modifiers
grrrr__ has quit [Remote host closed the connection]
thumpba has quit [Remote host closed the connection]
startupality has joined #ruby
hobodave has joined #ruby
thumpba has joined #ruby
Hijiri has joined #ruby
iamjarvo has quit [Ping timeout: 246 seconds]
naftilos76 has joined #ruby
momomomomo has joined #ruby
mikeric has joined #ruby
aphprentice has quit [Ping timeout: 272 seconds]
fryguy9 has joined #ruby
iamjarvo has joined #ruby
jmignault has joined #ruby
apeiros_ has joined #ruby
paulfm has quit [Read error: Connection reset by peer]
mkaesz has quit [Remote host closed the connection]
paulfm has joined #ruby
mkaesz has joined #ruby
davejlong has quit []
nfk has joined #ruby
ndrei has quit [Ping timeout: 245 seconds]
Rapier- has quit [Quit: (null)]
aclearman037 has quit [Quit: I'm out!]
<apeiros_> igrigorik - one of the people I'd love to work with
<havenwood> apeiros_: no kidding!
JDiPierro has quit [Remote host closed the connection]
drkush has quit [Ping timeout: 265 seconds]
ndrei has joined #ruby
coderhs has joined #ruby
Musashi007 has quit [Quit: Musashi007]
mkaesz has quit [Ping timeout: 245 seconds]
naftilos76 has quit [Remote host closed the connection]
commmmodo has joined #ruby
drkush has joined #ruby
mitchellhenke has quit [Quit: Computer has gone to sleep.]
Crazy_Atheist has quit [Ping timeout: 265 seconds]
wallerdev has joined #ruby
Aswebb_ has joined #ruby
triple_b has quit [Ping timeout: 245 seconds]
paulfm has quit [Quit: Zzzzz...]
tvon has quit [Quit: leaving]
tvon has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Crazy_Atheist has joined #ruby
drkush has quit [Ping timeout: 246 seconds]
tvon has quit [Client Quit]
tvon has joined #ruby
agent_white has joined #ruby
ramfjord has quit [Ping timeout: 255 seconds]
coderhs has quit [Quit: Leaving]
tvon has quit [Client Quit]
sevvie has quit [Ping timeout: 255 seconds]
tvon has joined #ruby
SouL_ has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
enterprisedc has joined #ruby
drkush has joined #ruby
<baweaver> If Google used Ruby instead of Python it'd be a dream for me
sevvie has joined #ruby
ramfjord has joined #ruby
<baweaver> One of the only reasons I know Python is that I still want to work there some time
<ponga> baweaver: me too if google used ruby it's too good
<centrx> They also use C++, Java, and Go
<ponga> hi centrx
<baweaver> and Javascript
skj3gg has quit [Quit: ZZZzzz…]
<baweaver> Java I won't touch
<baweaver> Can't stand it
<centrx> That's very wise
<zhan_> don't you really need it for front end?
monod has quit [Quit: Sto andando via]
android6011 has joined #ruby
<baweaver> >> 'Java' == 'Javascript'
<eval-in_> baweaver => false (https://eval.in/296489)
piotrj has quit [Remote host closed the connection]
<baweaver> zhan_: ^
skj3gg has joined #ruby
piotrj has joined #ruby
Asher has quit [Quit: Leaving.]
<baweaver> Chalk it up to stupid naming conventions from Netscape and them wanting a java-like scripting language that's really more of a scheme derivative. That's a different matter though.
riotjon__ has joined #ruby
<zhan_> fuck you
<baweaver> Well there's another one for the mute list
<baweaver> bye
RegulationD has quit [Remote host closed the connection]
<zhan_> true programmer
tkuchiki has joined #ruby
<zhan_> whose up for more algebra?
<baweaver> Some people I suppose.
<baweaver> After being around Javascript, Ruby, and Haskell for a while I like my anonymous functions.
<baweaver> Granted Java 8 gives it a mild reprieve, but still...
riotjone_ has quit [Ping timeout: 246 seconds]
<zhan_> 2nd item has .6666 relation to 1st, and 3rd has relation .3333 to 1st, 16 item has .06249 to 1st, whats the incremental modifier?
bMalum has joined #ruby
piotrj has quit [Ping timeout: 252 seconds]
skj3gg has quit [Ping timeout: 252 seconds]
<zhan_> or rather 3rd item has relation .6666 to 2nd
<zhan_> sry
<zhan_> w8 scrap that
HOrangeJewce has quit [Quit: Leaving.]
<baweaver> Go I can't say I ever really understood the magic of. I should probably play with it a bit more before getting an opinion on it.
<baweaver> Any Go lovers have compelling reasons?
tkuchiki has quit [Ping timeout: 256 seconds]
RegulationD has joined #ruby
<zhan_> w8
<zhan_> don't go exploring with the thought just yet
tkuchiki has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chishiki has quit [Quit: WeeChat 1.1.1]
brb3 has quit [Quit: ZZZzzz…]
chishiki has joined #ruby
<baweaver> More tempted to play with Erlang / Elixir myself.
<zhan_> baweaver: 1st items relation to 2nd is .5, and 2nd items relation to 3 is .6666, and at those increments 16 items relation to 1st is 0.06249
<zhan_> how do i work this
<zhan_> increment modifier?
tobago has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
mitchellhenke has joined #ruby
tkuchiki has quit [Ping timeout: 256 seconds]
Guest30239 has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
ascarter has joined #ruby
bruno- is now known as Guest38722
skj3gg has joined #ruby
skj3gg has quit [Client Quit]
mitchellhenke has quit [Client Quit]
<zhan_> baweever: ?
bigmac_ has joined #ruby
bigmac_ has quit [Read error: No route to host]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> he put you on ignore
SolarSailor has quit [Quit: My Turing machine has gone to sleep. ZZZzzz…]
bigmac has quit [Ping timeout: 250 seconds]
<zhan_> he responded to me though
mitchellhenke has joined #ruby
<zhan_> joked when i said fuck you about his cheekiness
jottr has joined #ruby
<zhan_> or whoever wrote program claing java as false to my question
<zhan_> *claiming
elfuego has quit [Quit: elfuego]
<zhan_> or the way that mute works is that i can't "reply" to him by "bawearver:"
Asher has joined #ruby
thiagovsk has quit [Quit: Connection closed for inactivity]
<zhan_> how do i create an index with sets of variables"?
g0bl1n has joined #ruby
rbennacer has quit [Remote host closed the connection]
mitchellhenke has quit [Client Quit]
<android6011> when i use force_encoding('us-ascii') on a string and then when going character by character and get "invalid byte sequence in US-ASCII" when doing .ord what is happening? how can i tell what value is stored in memory?
<jhass> android6011: use "US-ASCII-8bit" or it's (properly named) alias "binary"
maletor has joined #ruby
<baweaver> jhass: referring to that person from earlier?
<eam> android6011: in terms of "what is happening," with unicode characters are no longer equal to bytes
it0a has quit [Ping timeout: 252 seconds]
<android6011> jhass: this is existing code. there is the force_encoding('us-ascii') and then data[idx..idx+3].unpack('V*')[0], so I am trying to see what is stored at each of those indexes
<jhass> baweaver: yeah
<baweaver> I tend to do that to people that are unnecessarily rude.
agent_white has quit [Quit: bbl]
<zhan_> baweaver have you actually muted me?
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> android6011: yeah, doesn't look correct
<eam> android6011: so, if you have a multi-byte sequence it will show up as one "character" using a character index
mitchellhenke has joined #ruby
doodlehaus has quit [Remote host closed the connection]
<eam> but if the multi-byte sequence is impossible then it'll produce an error
<jhass> android6011: unpack just doesn't care about encoding, opposed to .ord
<android6011> jhass: so how can i tell what value unpack is seeing?
<jhass> android6011: I already said?
g0bl1n has quit [Quit: g0bl1n]
<android6011> so itll use the ascii 8 bit value?
<jhass> mmh, depends on what V does, I don't have it in mind
beneggett has joined #ruby
<jhass> why don't you actually just look at the value that statement returns?
<havenwood> android6011: see also: http://ruby-doc.org/core/String.html#method-i-b
<eam> jhass: I believe [] is what's blowing up
rbennacer has joined #ruby
Hijiri has quit [Quit: WeeChat 1.0.1]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<eam> impossible to index to a character position if the byte sequence is invalid
<eam> data.b[idx..idx+3].unpack('V*')[0] oughta be fine though
mikeric has quit []
<jhass> eam: nah, they said they get that when doing .ord "to look at the value"
<eam> jhass: data[index].ord?
<jhass> wasn't that specific
<eam> that's my suspicion
<android6011> data = "HELLO"; data = data.force_encoding('us-ascii'); result = data[idx..idx+3].unpack('V*')[0]; this works but im trying to understand what it is that is actually being unpacked from that.
rbennacer has quit [Remote host closed the connection]
<android6011> the original value coming in is \xDC which is what is showing me the err
<jhass> android6011: add p result
<eam> >> idx = 1; data = "HELLO"; data = data.force_encoding('us-ascii'); result = data[idx..idx+3].unpack('V*')[0]
<eval-in_> eam => 1330400325 (https://eval.in/296490)
workmad3 has left #ruby [#ruby]
<jhass> android6011: also from http://ruby-doc.org/core-2.2.0/String.html#method-i-unpack "V | Integer | 32-bit unsigned, VAX (little-endian) byte order"
<android6011> jhass: i can see the result, but in python im getting a different result so I am trying to see what values it is ruby is operating on during the unpack
<eam> android6011: are you asking what unpack is doing?
<eam> android6011: what result do you see, and what do you expect?
<apeiros_> btw., data[idx, 4] IMO >>> data[idx..idx+3]
commmmodo has quit [Quit: commmmodo]
baweaver has quit [Remote host closed the connection]
<android6011> they are very close which is what makes me think it is just that character being processed differently
<jhass> apeiros_: I thought you'd hide in a corner on the .force_encoding("us-ascii" already :P
<apeiros_> you folks are already trying to explain encoding to them. no need for me to weigh in.
krowv has joined #ruby
<apeiros_> also I try to stay out of encoding discussions as it only makes me angry about people's ignorance.
<jhass> apeiros_: yeah, you should contribute proper encoding support to Crystal instead :P
sevvie has quit [Ping timeout: 252 seconds]
<android6011> ok so let me explain more so maybe its a little clearier what I'm looking for
mitchellhenke has quit [Quit: Computer has gone to sleep.]
<apeiros_> jhass: AS multibyte stuff is actually quite good
<apeiros_> I'd port that
<apeiros_> "I'd" = "you should"
<bradland> unpack template V is 32-bit unsigned, VAX (little-endian) byte order
<jhass> mmh, I make a mental note
<bradland> yowza
<bradland> what the hell are you working on? lol
<jhass> apeiros_: anything you'd port for Time/Date/Calendar?
St1gma has joined #ruby
<eam> bradland: ip address?
jonr22 has joined #ruby
<apeiros_> jhass: chronos
mikeric has joined #ruby
<jhass> thought so :P
<apeiros_> IMO still better than ruby's core stuff, even if unfinished.
<eam> little endian is internet byte order, isn't it?
<android6011> we have a ruby application that takes in data as utf8, converts to us ascii and does an unpack on 4 char substring sets of that whole data string. I have no control of the data coming in and ruby is providing the right result,
_djbkd has joined #ruby
sevvie has joined #ruby
<bradland> eam: i thought internet was N
<apeiros_> android6011: you are aware that us-ascii is only 7bit, right?
<eam> nope, ignore that I got it backwards, htons() is big endian
_honning_ has joined #ruby
<apeiros_> (why did I just do that?)
<bradland> v: 32-bit unsigned, network (big-endian) byte order
<eam> bradland: you're right
<android6011> but we have another internal application in python that also needs to process the data. when i do a char comparison to see why the result are different \xDC in python is showing me 65533 and ruby just errors when i try to see the val at that position
<bradland> yeez, i screwed that one up
<bradland> N: 32-bit unsigned, network (big-endian) byte order
<jhass> apeiros_: because I wasn't sure if it actually consumes 7bit per character or 8bit and thus didn't say so :P
<apeiros_> jhass: it consumes 8bit
<android6011> apeiros_: yes, i didnt make the original code base, just inherited it and thats how its written
<bradland> android6011: you're mixing a looooot of stuff here
<android6011> i know :/
<apeiros_> jhass: but no processing method will work with anything beyond 0x79
<eam> android6011: you're dealing in sets of 4 bytes, so what's a concrete example of all 4 bytes returning different values?
<bradland> when dealing with strings, the binary data and character display are co-dependent.
<eam> can you give an example string?
<apeiros_> jhass: and your "use binary" was spot on. I don't get why they still insist on us-ascii instead of binary.
<jhass> yeah...
_djbkd has quit [Remote host closed the connection]
juanpablo_ has quit [Quit: (null)]
<bradland> your method of inspection maters
<bradland> as these guys are suggesting, you should keep your string type as "binary", and rely only on the output of unpack
juanpablo_ has joined #ruby
<jhass> apeiros_: though I don't see why it would make a diff for the actual unpack code they showed
<bradland> using things like String#ord are only going to confuse you
<apeiros_> jhass: not for the unpack
<apeiros_> but for the ord
<android6011> apeiros_: binary produces the wrong result and breaks the unpack for the expected result
<jhass> well, sure, no debate in that
<apeiros_> >> "\x80".force_encoding('us-ascii').ord
<eval-in_> apeiros_ => invalid byte sequence in US-ASCII (ArgumentError) ... (https://eval.in/296493)
<apeiros_> >> "\x80".force_encoding('binary').ord
<eval-in_> apeiros_ => 128 (https://eval.in/296494)
mjuszczak has quit []
<apeiros_> android6011: your analysis is wrong
paradisaeidae has joined #ruby
<bradland> money
<apeiros_> android6011: force_encode does *not* change the data.
<apeiros_> so force_encoding it to binary will *not* change the unpack result
Pumukel has quit [Quit: ChatZilla 0.9.91.1 [Firefox 35.0.1/20150122214805]]
<android6011> apeiros_: ok so right there before .ord, tRESULT = "\x80".force_encoding('us-ascii') what happens right there. what is tresult
jonr22 has quit [Ping timeout: 265 seconds]
<apeiros_> android6011: read closer. .ord can't work with it. there is no result.
swgillespie has joined #ruby
<bradland> do not use ord to inspect binary data
<bradland> use unpack
<android6011> without the .ord, what does force_encode return into tRESULT
<bradland> ord tells you the ordinal of a character
<apeiros_> >> "\xEF\xF2\x9D\x12".force_encoding('binary').unpack("V")
<eval-in_> apeiros_ => [312341231] (https://eval.in/296497)
<apeiros_> >> "\xEF\xF2\x9D\x12".force_encoding('us-ascii').unpack("V")
<eval-in_> apeiros_ => [312341231] (https://eval.in/296498)
<bradland> you're not working with characters, you're working iwth binary data
<apeiros_> android6011: ^ tell me how binary changes the result
krowv has left #ruby ["Leaving"]
<apeiros_> I repeat: your analysis is wrong. but please, insist on it. but then: why ask for help if you don't accept it?
_djbkd has joined #ruby
laputa has joined #ruby
_djbkd has quit [Remote host closed the connection]
ghostpl__ has quit [Remote host closed the connection]
<android6011> im sorry, i understand what you're saying
mjuszczak has joined #ruby
sarkis has quit [Ping timeout: 250 seconds]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<android6011> what i mean is in the code set when i just change the line data = force_encoding('us-ascii') to data = force_encoding('binary') i end up with a different result later on with the unpack. there could be something else in the middle it affects though?
devdazed has quit [Quit: Computer has gone to sleep.]
mjuszczak has quit [Client Quit]
<apeiros_> android6011: I can't tell without seeing real code.
lkba_ has joined #ruby
<android6011> ill have to hop back on tomorrow with it,
vdamewood has joined #ruby
<bradland> android6011: the unpack method will return an array
<bradland> so if you want to see what's "really" being unpacked, inspect the results of the unpack call
<android6011> bradland: right, and because its taking 4 bytes when its parsed with V* it only returns one num
bMalum has quit [Quit: bMalum]
zachrab has joined #ruby
replay has joined #ruby
juanpablo_ has quit [Quit: (null)]
mjuszczak has joined #ruby
<bradland> V* slurps all bytes
<bradland> the reason it's only returning one number is because you're referencing the index at 0
juanpablo_ has joined #ruby
beneggett has joined #ruby
<bradland> data[idx..idx+3].unpack('V*')[0];
it_tard has quit [Quit: yawn]
davedev2_ has joined #ruby
<android6011> bradland: how could i tell how unpack is treating the 3rd byte when I do unpack('V')
x1337807x has joined #ruby
<bradland> unpack('V') and unpack('V*') are different
sarkis has joined #ruby
<bradland> i think you need to revisit how unpack works
mary5030 has joined #ruby
<bradland> the "template" passed to unpack tells the method how you want the data treated
davedev24_ has quit [Ping timeout: 246 seconds]
<apeiros_> bradland: not for 4 bytes, though
lkba has quit [Ping timeout: 250 seconds]
<bradland> .....
juanpablo_ has quit [Read error: Connection reset by peer]
jenrzzz_ has joined #ruby
beneggett has quit [Client Quit]
<apeiros_> and data[idx..idx+3] ensures it's 4 bytes
<android6011> bradland: is the difference that the first will only return the first 32uintle and the 2nd will return an array with all found in 4 byte chnks?
juanpablo_ has joined #ruby
Rollabunna has quit [Quit: Leaving...]
<apeiros_> the * is just pointless decoration with that
<apeiros_> android6011: no, it returns an array always
<android6011> i agree, again, didn't write the code
<apeiros_> >> "\xEF\xF2\x9D\x12".unpack("V")
<eval-in_> apeiros_ => [312341231] (https://eval.in/296499)
<bradland> agreed that you can drop the *
<apeiros_> >> "\xEF\xF2\x9D\x12".unpack("V*")
<eval-in_> apeiros_ => [312341231] (https://eval.in/296500)
<apeiros_> see, both return the same
<bradland> i would nail this down to some basic tests
<android6011> \xDC is the byte causing issues right now
jenrzzz has quit [Ping timeout: 240 seconds]
<bradland> and what happens when \xDC is encountered?
<bradland> (using unpack)
<apeiros_> android6011: gist code and input
_djbkd has joined #ruby
<bradland> you get a number you don't expect
<bradland> ?
<apeiros_> and expected output and actual output
buub has quit [Ping timeout: 250 seconds]
<apeiros_> you can gist the input by using `p data`
<apeiros_> don't forget `p idx`
FooMunki has joined #ruby
<android6011> no i do, the ruby stuff all works fine, what im trying to understand is what it becomes after force_encoding('us-ascii') has been run with it in the 4 byte string
<bradland> force_encoding doesn't change the binary data
<bradland> full stop
<android6011> ok
<jhass> you could even drop it when using .unpack
<android6011> so its not truly all ascii then
<bradland> ascii is a means of interpreting numbers
* apeiros_ sobs silently
<bradland> that is all
juanpablo_ has quit [Ping timeout: 244 seconds]
<bradland> there is no ascii on disk
<jhass> whatever it is, unpack doesn't care
davedev2_ has quit [Read error: Connection reset by peer]
<apeiros_> android6011: what does an encoding do?
<bradland> or in memory
<bradland> or in the CPU
<bradland> only numbers
jenrzzz has joined #ruby
<bradland> ascii says, "treat these numbers as these characters"
<android6011> ok i get that, so i think whats happening then is with python, when i try to read it as ascii its showing me 65533 as the ascii val
davedev24_ has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hobodave has quit [Quit: Computer has gone to sleep.]
jaequery has joined #ruby
<jhass> "ascii val"
maknz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> please explain what that is
Azure has quit [Excess Flood]
<android6011> like you guys said, force encoding doesnt change the data so if thats truly still the value and doesnt "default" to something when its invalid then i think i understand whats happening
jenrzzz_ has quit [Ping timeout: 265 seconds]
Azure has joined #ruby
<android6011> jhass: all i had is some js in front of me but with the \xDC in JS when I do .charAt(2) i get back 65533
<android6011> (sorry i know this conversatation is coming across as a mess)
centrx has quit [Remote host closed the connection]
<apeiros_> you mean charCodeAt?
<android6011> sorry yes
<apeiros_> funny, when I do that, I get 220
<android6011> huh
<apeiros_> which is correct, because 0xDC is 220
Stalkr_ has joined #ruby
<Stalkr_> After adding this to my configu.ru my POST to create new users won't work. My tests pass but my development site doesn't https://gist.github.com/anonymous/bebe579fabcc0fcf5dd4 What is the problem?
<android6011> one sec and ill have a full string as rails sees it coming in
slawrence00 has quit [Quit: Textual IRC Client: www.textualapp.com]
<android6011> "e\u0016\xDC\u0012\xA5Z\x9E\x8D\xC8` \xA4\u0014\u000F\u0017\xFE}\x9A7L\u0014\xB8\u001E1\u001D\u001A\u001A\xA2\x9F\xD1\xD2\u0003"
phutchins has quit [Ping timeout: 256 seconds]
startupality has quit [Quit: startupality]
baweaver has joined #ruby
<bradland> what's with the ` and the newline?
startupality has joined #ruby
<android6011> first thing that is done is the force_encoding('us-ascii')
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros_> android6011: yeah, which is stupid. because us-ascii is 7bit.
<apeiros_> and you clearly have binary data.
<android6011> then does that loop, data[idx.idx+3].unpack('V*')
<jhass> bradland: newline is your client, it's a space
<jhass> bradland: probably just a \x20 in the bytes
<apeiros_> could drop the loop and just unpack('V*')
RegulationD has quit [Remote host closed the connection]
<bradland> yeah that
<bradland> V* is just going to grab 4 bytes at a time anyway
<android6011> the first chunk in rails comes out as 316413541, but in python/js I get back 318576229
chipotle has joined #ruby
RandyT has quit [Read error: Connection reset by peer]
<android6011> in python and js still just having it parse a buffer with the 4 bytes for a 32bit uint little-endian
RandyT has joined #ruby
<bradland> what's the python code look like?
<android6011> i just have the js, one sec and ill paste bin it
bricker has quit [Ping timeout: 256 seconds]
davedev24_ has quit [Ping timeout: 240 seconds]
<apeiros_> with js you can run into problems easily as it expects utf-8. if you don't send the data properly to js, it'll not work correctly.
skj3gg has joined #ruby
startupality has quit [Quit: startupality]
axisys has quit [Remote host closed the connection]
sgambino has quit [Remote host closed the connection]
<android6011> pastebin.com/PqVpsu06
davedev24_ has joined #ruby
<apeiros_> gawd
ndrei has quit [Ping timeout: 265 seconds]
wldcordeiro has quit [Ping timeout: 265 seconds]
<apeiros_> WHY always pastebin
<android6011> the js that produces diff results
FooMunki has quit [Quit: FooMunki]
<android6011> lol sorry
<ponga> is pastebin java of paste page
chipotle has quit [Quit: cheerio]
<ponga> why does everyone in #ruby hate it
<apeiros_> pastebin is the walmart of paste page
<jhass> ponga: post a pastebin link to #RubyOnRails to find out
<ponga> jhass: why, do they ban me out ?
ndrei has joined #ruby
<jhass> no
<bradland> heh, no wonder the ruby code iterates chunks if the original was python
<jhass> apeiros_: we should file DMCA and one of those "forget me" claims to google
<bradland> "The string must contain exactly the amount of data required by the format"
<jhass> apeiros_: against pastebin.com
baroquebobcat has joined #ruby
n80 has joined #ruby
axisys has joined #ruby
charliesome has joined #ruby
<Senjai> ponga: !pastebin
<helpa> ponga: Make deryl happy, please use http://gist.github.com instead.
<ponga> lol
<jhass> apeiros_: maybe we should ask Radar to turn the automatic pastebin.com message here too?
<Senjai> !rule4
<helpa> Do not use any service that is not Pastie or Gist to post code. Pastebin, for example has a tiny font and it has ads on it which cause the page to load slowly. Other paste services generally look like crap.
<apeiros_> Radar: ping
<Radar> apeiros_: hi
maximski has joined #ruby
<apeiros_> o/
<Radar> patches welcome :)
<bradland> android6011: man, i hate javascript
<apeiros_> 00:24 jhass: apeiros_: maybe we should ask Radar to turn the automatic pastebin.com message here too?
<apeiros_> ^
<apeiros_> can you? :)
<android6011> bradland: ya not the best of all the langs
<Senjai> Radar: Such a radar thing to say :P
<Radar> Can you? :)
elfuego has joined #ruby
<bradland> i can say though that i feel pretty confident that Ruby is giving you the correct value for the first four bytes of that string though
axisys has quit [Changing host]
axisys has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Radar> Senjai: delegation is such a marvellous thing
piotrj has joined #ruby
fryguy9 has quit [Quit: Leaving.]
<bradland> android6011: have a look at this output: https://eval.in/296514
<ponga> why do i constantly confuse apeiros_ with arup_p...
<Senjai> just kind of yolod
<Senjai> no idea if it works
timanema has quit [Quit: leaving]
ta has quit [Read error: Connection reset by peer]
kaiZen has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<bradland> V* gives you an array of groups of 4 bytes, and C* gives you arrays of standard 8-bit integers
Musashi007 has joined #ruby
<Radar> Senjai: you'll need to replace the part of the message beneath that as well
<jhass> Senjai: almost, actual message needs to interpolate channel
<Radar> Senjai: railsbot is all YOLO code
<Radar> testing in production ftw
<apeiros_> Radar: done.
<apeiros_> didn't even have to clone to desktop :D
ta has joined #ruby
Sembei has joined #ruby
bricker has joined #ruby
<Senjai> apeiros_: beat me to it
<Radar> apeiros_: that doesn't interpolate the message either
<Senjai> TROLOLOLOL
<Radar> Line 296
<Senjai> Im going to let apeiros_ take this one
<Senjai> This is the fastest review-release cycle ever
<apeiros_> Radar: bah, minor
<android6011> bradland: thats interesting, i think that may help me
<apeiros_> Radar: how do I update a PR?
<apeiros_> just redo?
<Senjai> apeiros_: Edit it on your branch
<Radar> apeiros_: Yeah you can redo
<Radar> Or ^
<apeiros_> also L299
maximski has quit []
<android6011> i have to head out, if i cant get things sorted ill be back tomorrow more prepared. honestly i didnt expect so many people to jump in to help so thanks everyone
<bradland> you bet
piotrj has quit [Ping timeout: 246 seconds]
<Senjai> Radar: How can we cleanup/add tips?
roshanavand has quit [Remote host closed the connection]
paradisaeidae has quit [Ping timeout: 256 seconds]
<apeiros_> done
<Radar> Senjai: ! add <tip name> <text>
<Radar> Senjai: Cleaning up is done by me atm
<apeiros_> (and no, didn't run tests - does it have some?)
<Senjai> cheers
<Senjai> apeiros_: HAHA, Didnt run tests, btw, is there tests? xD
<Senjai> <3
<Radar> apeiros_: [10:28:12] <Radar>testing in production ftw
commmmodo has joined #ruby
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
<helpa> Hi jhass. We in #ruby would really appreciate it if you did not use pastebin during your time with us.
<helpa> Pastebin is not good because it loads slowly for most, has ads which are distracting and has terrible formatting. Please use Gist (http://gist.github.com) or Pastie (http://pastie.org) instead. Thanks!
<jhass> \o/
<Radar> \o/
<jhass> great job everyone!
<Radar> Thanks :)
chipotle has joined #ruby
<apeiros_> thx radar! much appreciated :)
<Senjai> #teamwork
<Senjai> #community
<Senjai> #togetheranythingispossible
nicolastarzia has joined #ruby
CorySimmons has joined #ruby
chipotle has quit [Max SendQ exceeded]
maximski has joined #ruby
enebo has quit [Quit: enebo]
maximski has quit [Max SendQ exceeded]
benlieb has joined #ruby
android6011 has quit [Ping timeout: 246 seconds]
<bradland> can someone remind me of how to use String#pack("B*") ?
jlast has quit [Remote host closed the connection]
<bradland> wasn't expecting to get an error on the last line
maximski has joined #ruby
<bradland> Derp
<bradland> Array#pack("B*"), not String
startupality has joined #ruby
tag has quit [Ping timeout: 246 seconds]
thumpba has quit [Ping timeout: 244 seconds]
jenrzzz has quit [Ping timeout: 265 seconds]
beneggett has joined #ruby
laputa has quit [Quit: WeeChat 1.1.1]
Musashi007 has quit [Quit: Musashi007]
fryguy9 has joined #ruby
wldcordeiro has joined #ruby
jenrzzz has joined #ruby
devdazed has joined #ruby
baweaver has quit [Remote host closed the connection]
mjuszczak has quit []
jottr has quit [Ping timeout: 265 seconds]
tier has quit [Remote host closed the connection]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby
<Senjai> bradland: Not sure, but arent you unpacking it into integers? and then using a string pack?
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
maximski has quit [Ping timeout: 256 seconds]
tunaCanBruh has joined #ruby
<bradland> Oy. You're right. Thanks! I think I can just go straight to bit string with unpack anyway
<Senjai> as far as I know you have to convert the array of integers to strings, to pack them
<Senjai> with B
ptrrr has quit [Quit: ptrrr]
phoo1234567 has quit [Quit: Leaving]
mjuszczak has joined #ruby
baweaver has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
adriancb has quit [Remote host closed the connection]
oki has quit [Ping timeout: 252 seconds]
n80 has quit [Quit: n80]
Guest38722 has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
bruno- is now known as Guest7768
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jobewan has quit [Quit: Leaving]
morenoh149 has quit [Ping timeout: 252 seconds]
baweaver has quit [Remote host closed the connection]
swgillespie has joined #ruby
fryguy9 has quit [Quit: Leaving.]
baweaver has joined #ruby
blackmesa has quit [Quit: WeeChat 1.1.1]
momomomomo has quit [Ping timeout: 246 seconds]
zachrab has quit [Remote host closed the connection]
wicope has quit [Remote host closed the connection]
zachrab has joined #ruby
<shevy> ruby leaves a warm fuzzy feeling behind
<bradland> this reminds me of doing the cryptopals challenges
whoughton has left #ruby ["Textual IRC Client: www.textualapp.com"]
snockerton has quit [Quit: Leaving.]
baweaver has quit [Remote host closed the connection]
doodlehaus has joined #ruby
baweaver has joined #ruby
zachrab has quit [Ping timeout: 250 seconds]
g0bl1n has joined #ruby
momomomomo has joined #ruby
baweaver has quit [Remote host closed the connection]
egtann has quit []
baweaver has joined #ruby
<jhass> bradland: that .force_encoding shouldn't make a diff, no?
ghostpl_ has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
<shevy> hmm
<shevy> if I have a loop {}
aerth is now known as noob
<shevy> commandline app... should I always expect that Ctrl-C leads to a termination of a program?
tunaCanBruh has quit [Ping timeout: 256 seconds]